query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Obtiene un paquete del proyecto | public Paquete getPaquete(int index) {
return paquetes.get(index);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void reposicionarPersonajes() {\n // TODO implement here\n }",
"public void setProyecto(java.lang.String proyecto) {\n this.proyecto = proyecto;\n }",
"public void setProyecto(java.lang.String proyecto) {\n this.proyecto = proyecto;\n }",
"public Polipara() {\n // Iniciar el programa cargando el archivo de propiedades si existe.\n\n if (this.validarSerializacion()) {\n int response = JOptionPane.showConfirmDialog(null, \"Hay una versión anterior de una copa,\\n\"\n + \"¿Desea cargar esa versión? (Al seleccionar \\\"No\\\", se eliminará el avance anterior y se cargará una copa nueva.)\");\n if (response == 0) {\n this.cargarSerializacion();\n } else {\n this.iniciarCopa();\n }\n } else {\n this.iniciarCopa();\n }\n }",
"public void almacenar( Proyecto proyecto) {\n\n }",
"public static void pesquisarTest() {\n\t\t\n\t\tlistaProfissional = profissionalDAO.lista();\n\n\t\t//user.setReceitas(new ArrayList<Receita>());\n\t\t\n\t\t\n\t\tSystem.out.println(\"Entrou PEsquisar ====\");\n\t\tSystem.out.println(listaProfissional);\n\n\t}",
"@Override\n\tpublic List<Proyecto> listarProyectos() {\n\t\treturn proyectoRepo.findAll();\n\t}",
"public Procesamiento(Context context){\n\t\tthis.context = context;\n\t\tOrdenacion o = new Ordenacion();\n\t\ttry {\n\t\t\tplayas = obtenerPlayas();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Ordenamos las playas por nombre.\n\t\to.ordenarPlayasNombre(playas);\n\n }",
"public void enviarProyectos(Proyecto proyecto){\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tplantilla.postForObject(\"http://localhost:5000/proyectos\", proyecto, Proyecto.class);\n\t\t}",
"@Override\r\n public void parar(Conexion conexion){\n }",
"public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }",
"public ControladorPrueba() {\r\n }",
"public Proyecto proyectoPorId(int id) {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tProyecto proyecto =plantilla.getForObject(\"http://localhost:5000/proyectos/\" + id, Proyecto.class);\n\t\t\treturn proyecto;\n\t\t}",
"@Override\n public String traerProyecto(Proyecto p) {\n JSONObject json = new JSONObject();\n //json.put(\"codigo\", 0004);\n json.put(\"nombre\", p.getNombre());\n json.put(\"descripcion\", p.getDescripcion());\n json.put(\"duracionSprints\", p.getDuracionDeSprints());\n json.put(\"numeroSprints\", p.getNumeroSprints());\n JSONArray jHUs = new JSONArray();\n for (HistoriaDeUsuario h : p.getProductBacklog().getHistorias()) {\n JSONObject historia = new JSONObject();\n historia.put(\"nombre\", h.getNombre());\n historia.put(\"descripcion\", h.getDescripcion());\n historia.put(\"puntos\", h.getPuntosHistoria());\n historia.put(\"estado\", h.getEstado());\n historia.put(\"prioridad\", h.getPrioridad());\n ArrayList<Criterio> criteriosH = h.getListaCriterios();\n JSONArray criterios = new JSONArray();\n for (Criterio crit : criteriosH) {\n criterios.add(crit.getDescripcion());\n }\n historia.put(\"criterios\", criterios);\n jHUs.add(historia);\n }\n json.put(\"historias\", jHUs);\n return json.toJSONString();\n }",
"@Override\n\tpublic void altaProyecto(Proyecto proyecto) {\n\t\tproyectoRepo.save(proyecto);\n\t\t\n\t}",
"List<Plaza> consultarPlazas();",
"@Override\n\tpublic void ejecutarActividadesConProposito() {\n\t\t\n\t}",
"private void limpiarDatos() {\n\t\t\n\t}",
"public Propiedad() {\n bdPropiedad = new DaoPropiedad();\n bdComentario = new DaoComentario();\n }",
"public void aplicarDescuento();",
"public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }",
"public Puntaje() {\n nombre = \"\";\n puntos = 0;\n }",
"public static void main(String[] args) {\n\t\tControladorProducto controlaPro = new ControladorProducto();\n\n\t\t// Guardamos en una lista de objetos de tipo cuenta(Mapeador) los datos\n\t\t// obtenidos\n\t\t// de la tabla Cuenta de la base de datos\n\t\tList<Producto> lista = controlaPro.findAll();\n\n\t\t// Imprimimos la lista\n\t\tSystem.out.println(\"\\n\\nEntidades de la tabla Cuenta:\");\n\t\tfor (Producto c : lista) {\n\t\t\tSystem.out.println(c);\n\t\t}\n\t\t// Vamos a guardar en un objeto el objeto que obtenemos pasando como parametro\n\t\t// el nombre\n\t\tProducto productoNombre = controlaPro.findByNombre(\"Manguera Camuflaje\");\n\n\t\t// Mostramos el objeto\n\t\tSystem.out.println(\"\\nEl objeto con el nombre Manguera Camuflaje es: \\n\" + productoNombre);\n\n\t\t// Vamos a guardar en un objeto el objeto que obtenemos pasando como parametro\n\t\t// su pk\n\n\t\tProducto productoPk = controlaPro.findByPK(2);\n\n\t\t// Mostramos el objeto\n\t\tSystem.out.println(\"\\nEl objeto con la Pk es: \\n\" + productoPk);\n\n\t\t// Vamos a crear un nuevo producto\n\t\tProducto nuevoProducto = new Producto();\n\n\t\tnuevoProducto.setNombreproducto(\"Embery Mono\");\n\t\t\n\t\t//Persistimos el nuevo producto\n\t\tcontrolaPro.crearEntidad(nuevoProducto);\n\n\t\tlista = controlaPro.findAll();\n\t\t// Imprimimos la lista\n\t\tSystem.out.println(\"\\n\\nEntidades de la tabla con nuevo producto:\");\n\t\tfor (Producto c : lista) {\n\t\t\tSystem.out.println(c);\n\t\t}\n\t\t\n\t\t//Modificamos el nuevo producto\n\t\tnuevoProducto.setNombreproducto(\"Caesar Dorada\");\n\n\t\tcontrolaPro.ModificarEntidad(nuevoProducto);\n\t\t\n\t\tlista = controlaPro.findAll();\n\t\t// Imprimimos la lista\n\t\tSystem.out.println(\"\\n\\nEntidades de la tabla con nuevo producto modificado:\");\n\t\tfor (Producto c : lista) {\n\t\t\tSystem.out.println(c);\n\t\t}\n\t\t\n\t\t//Borramos el nuevo producto\n\t\tcontrolaPro.borrarEntidad(controlaPro.findByPK(2));\n\t\t\n\t\tlista = controlaPro.findAll();\n\t\t// Imprimimos la lista\n\t\tSystem.out.println(\"\\n\\nEntidades de la tabla con nuevo producto eliminado:\");\n\t\tfor (Producto c : lista) {\n\t\t\tSystem.out.println(c);\n\t\t}\n\t\t\n\t}",
"private void grabarIndividuoPCO(final ProyectoCarreraOferta proyectoCarreraOferta) {\r\n /**\r\n * PERIODO ACADEMICO ONTOLOGÍA\r\n */\r\n OfertaAcademica ofertaAcademica = ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId());\r\n PeriodoAcademico periodoAcademico = ofertaAcademica.getPeriodoAcademicoId();\r\n PeriodoAcademicoOntDTO periodoAcademicoOntDTO = new PeriodoAcademicoOntDTO(periodoAcademico.getId(), \"S/N\",\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaInicio(), \"yyyy-MM-dd\"),\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaFin(), \"yyyy-MM-dd\"));\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().write(periodoAcademicoOntDTO);\r\n /**\r\n * OFERTA ACADEMICA ONTOLOGÍA\r\n */\r\n OfertaAcademicaOntDTO ofertaAcademicaOntDTO = new OfertaAcademicaOntDTO(ofertaAcademica.getId(), ofertaAcademica.getNombre(),\r\n cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaInicio(),\r\n \"yyyy-MM-dd\"), cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaFin(), \"yyyy-MM-dd\"),\r\n periodoAcademicoOntDTO);\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().write(ofertaAcademicaOntDTO);\r\n\r\n /**\r\n * NIVEL ACADEMICO ONTOLOGIA\r\n */\r\n Carrera carrera = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n Nivel nivel = carrera.getNivelId();\r\n NivelAcademicoOntDTO nivelAcademicoOntDTO = new NivelAcademicoOntDTO(nivel.getId(), nivel.getNombre(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"nivel_academico\"));\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().write(nivelAcademicoOntDTO);\r\n /**\r\n * AREA ACADEMICA ONTOLOGIA\r\n */\r\n AreaAcademicaOntDTO areaAcademicaOntDTO = new AreaAcademicaOntDTO(carrera.getAreaId().getId(), \"UNIVERSIDAD NACIONAL DE LOJA\",\r\n carrera.getAreaId().getNombre(), carrera.getAreaId().getSigla(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"area_academica\"));\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().write(areaAcademicaOntDTO);\r\n /**\r\n * CARRERA ONTOLOGÍA\r\n */\r\n CarreraOntDTO carreraOntDTO = new CarreraOntDTO(carrera.getId(), carrera.getNombre(), carrera.getSigla(), nivelAcademicoOntDTO,\r\n areaAcademicaOntDTO);\r\n cabeceraController.getOntologyService().getCarreraOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getCarreraOntService().write(carreraOntDTO);\r\n /**\r\n * PROYECTO CARRERA OFERTA ONTOLOGY\r\n */\r\n \r\n ProyectoCarreraOfertaOntDTO proyectoCarreraOfertaOntDTO = new ProyectoCarreraOfertaOntDTO(proyectoCarreraOferta.getId(),\r\n ofertaAcademicaOntDTO, sessionProyecto.getProyectoOntDTO(), carreraOntDTO);\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().write(proyectoCarreraOfertaOntDTO);\r\n }",
"private void populaParteCorpo()\n {\n ParteCorpo p1 = new ParteCorpo(\"Biceps\");\n parteCorpoDAO.insert(p1);\n ParteCorpo p2 = new ParteCorpo(\"Triceps\");\n parteCorpoDAO.insert(p2);\n ParteCorpo p3 = new ParteCorpo(\"Costas\");\n parteCorpoDAO.insert(p3);\n ParteCorpo p4 = new ParteCorpo(\"Lombar\");\n parteCorpoDAO.insert(p4);\n ParteCorpo p5 = new ParteCorpo(\"Peito\");\n parteCorpoDAO.insert(p5);\n ParteCorpo p6 = new ParteCorpo(\"Panturrilha\");\n parteCorpoDAO.insert(p6);\n ParteCorpo p7 = new ParteCorpo(\"Coxas\");\n parteCorpoDAO.insert(p7);\n ParteCorpo p8 = new ParteCorpo(\"Gluteos\");\n parteCorpoDAO.insert(p8);\n ParteCorpo p9 = new ParteCorpo(\"Abdomen\");\n parteCorpoDAO.insert(p9);\n ParteCorpo p10 = new ParteCorpo(\"Antebraço\");\n parteCorpoDAO.insert(p10);\n ParteCorpo p11 = new ParteCorpo(\"Trapezio\");\n parteCorpoDAO.insert(p11);\n ParteCorpo p12 = new ParteCorpo(\"Ombro\");\n parteCorpoDAO.insert(p12);\n }",
"Compuesta createCompuesta();",
"public Puntaje getPuntaje() \r\n {\r\n return puntaje;\r\n }",
"public paciente()\n {\n con = new bdconexion(); //instancia la clase bdconexion\n }",
"public ArrayList<Proposta> retornaPropostasPeloIdFreela(int idUsuario) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idUsuario == rs.getInt(\"id_usuario\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do Freelancer = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }",
"static void executa() {\n\t\tlistaProdutos = LoaderUtils.loadProdutos();\n\n\t\t// imprime lista de produtos cadastrados\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tloadEstoque();\n\t\t\n\t\t// imprime estoque\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tprintEstoque(listaEstoque);\n\t}",
"public PanelNewProject getNewProject(){\n return nuevoProyecto;\n }",
"ProjetoRN createProjetoRN();",
"public Produto() {}",
"public PresuTipoProyectoLogic()throws SQLException,Exception {\r\n\t\tsuper();\r\n\t\t\r\n\t\ttry\t{\t\t\t\t\t\t\r\n\t\t\tthis.presutipoproyectoDataAccess = new PresuTipoProyectoDataAccess();\r\n\t\t\t\r\n\t\t\tthis.presutipoproyectos= new ArrayList<PresuTipoProyecto>();\r\n\t\t\tthis.presutipoproyecto= new PresuTipoProyecto();\r\n\t\t\t\r\n\t\t\tthis.presutipoproyectoObject=new Object();\r\n\t\t\tthis.presutipoproyectosObject=new ArrayList<Object>();\r\n\t\t\t\t\r\n\t\t\t/*\r\n\t\t\tthis.connexion=new Connexion();\r\n\t\t\tthis.datosCliente=new DatosCliente();\r\n\t\t\tthis.arrDatoGeneral= new ArrayList<DatoGeneral>();\r\n\t\t\t\r\n\t\t\t//INICIALIZA PARAMETROS CONEXION\r\n\t\t\tthis.connexionType=Constantes.CONNEXIONTYPE;\r\n\t\t\tthis.parameterDbType=Constantes.PARAMETERDBTYPE;\r\n\t\t\t\r\n\t\t\tif(Constantes.CONNEXIONTYPE.equals(ConnexionType.HIBERNATE)) {\r\n\t\t\t\tthis.entityManagerFactory=ConstantesCommon.JPAENTITYMANAGERFACTORY;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.datosDeep=new DatosDeep();\r\n\t\t\tthis.isConDeep=false;\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\tthis.presutipoproyectoDataAccess.setConnexionType(this.connexionType);\r\n\t\t\tthis.presutipoproyectoDataAccess.setParameterDbType(this.parameterDbType);\r\n\t\t\t\r\n\t\t\t\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.invalidValues=new InvalidValue[0];\r\n\t\t\tthis.stringBuilder=new StringBuilder();\r\n\t\t\tthis.conMostrarMensajesStringBuilder=true;\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t \r\n }",
"public static void main(String[] args) {\n Pessoa p1 = new Pessoa();\n p1.nome = \"João\";\n p1.rg = \"12345678910\";\n \n // Criando uma primeira conta para associar com a primeira pessoa\n Conta c1 = new Conta();\n c1.agencia = \"0872-9\";\n c1.numero = 887878;\n c1.cliente = p1; // Associando a pessoa com a conta\n }",
"public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}",
"public Collection<Proyecto> leerProyectosCollection() {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tProyecto[] proyecto = plantilla.getForObject(\"http://localhost:5000/proyectos\", Proyecto[].class);\n\t\t\tList<Proyecto> listaProyectos = Arrays.asList(proyecto);\n\t\t\treturn listaProyectos;\n\t\t}",
"public static void inicializacionPartidaConsola() {\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\tControladorConsola c = new ControladorConsola(f, p, in);\n\n\t\tnew VistaConsola(c);\n\n\t\tc.run();\n\t}",
"private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela Paciente\\n\");\n\t\tpaciente = new Paciente();\n\t\tlistaPaciente = pacienteService.buscarTodos();\n\t\t\n\t}",
"@Override\r\n public List<Prova> consultarTodosProva() throws Exception {\n return rnProva.consultarTodos();\r\n }",
"protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"@Test\n public void publicadorPreguntaEnPublicacionAPostulante() {\n Mensaje mp = new Mensaje();\n mp.setPublicacionId(7);\n mp.setPregunta(\"Tenes jardin?\");\n mp.setUsuarioPreguntaId(usuario.getId());\n mp.setUsuarioRespuestaId(3);\n mp.guardarPregunta(usuario.getToken());\n assertTrue(mp.getId() > 0);\n\n }",
"public Prova() {}",
"@GET(\"montaje/proyectos/ver/\")\n Call<List<clsProyecto>> getProyectos();",
"List<ParqueaderoEntidad> listar();",
"@Override\n public List<Paciente> listar(){\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"vesaliusPU\"); \n EntityManager em = factory.createEntityManager();\n List<Paciente> listaPaciente = em.createQuery(\"SELECT pac FROM Paciente pac\").getResultList(); \n em.close();\n factory.close();\n return (listaPaciente);\n }",
"ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);",
"@Override\n\tpublic void pausaParaComer() {\n\n\t}",
"private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}",
"public Propiedad(){\n\t}",
"public ProyectoRSA(int tamPrimo) {\n this.tamPrimo = tamPrimo;\n\n generaClaves(); //Generamos e y d\n\n }",
"public java.lang.String getProyecto() {\n return proyecto;\n }",
"public java.lang.String getProyecto() {\n return proyecto;\n }",
"public TelaProduto() {\n initComponents();\n \n carregaProdutos();\n }",
"private static void pruebas() {\n\t\tResultadosDaoImpl resultadosDao = new ResultadosDaoImpl();\r\n\t\tPartidosDaoImpl partidosDao = new PartidosDaoImpl();\r\n\t\tEquiposDaoImpl equiposDao = new EquiposDaoImpl();\r\n\t\tJornadasDaoImpl jornadasDao = new JornadasDaoImpl();\r\n\t\tEstadisticasDaoImpl estadisticasDao = new EstadisticasDaoImpl();\r\n\t\t\r\n//\t\tLong goles = resultadosDao.getGolesTotalesCasa();\r\n\t\t\r\n\t\tEquipos equipoC = equiposDao.getEquipoById(7);\r\n\t\tEquipos equipoF = equiposDao.getEquipoById(6);\r\n\t\tJornadas jornada = jornadasDao.nextJornada();\r\n//\t\t\r\n//\t\tpartidosDao.getPartidosCasa(equipo,jornada);\r\n\t\t\r\n//\t\tLong goles = resultadosDao.getGolesFavorCasa(equipo);\r\n\t\t\r\n//\t\tLong goles = resultadosDao.getGolesContraFuera(equipo);\r\n//\t\tdouble phiVM = staticsC.getValorMercado() / (estadisticasDao.getValorMercadoMedio());\r\n\t\t\r\n\t\tEstadisticas staticsC = estadisticasDao.getStatics(equipoC);\r\n\t\tEstadisticas staticsF = estadisticasDao.getStatics(equipoF);\r\n\t\t\r\n\t\tDouble phiF = PlayMethods.analizeStaticsFuera(staticsF,staticsC,jornada);\r\n\t\tDouble phiC = PlayMethods.analizeStaticsCasa(staticsC,staticsF,jornada);\r\n\t\t\r\n\t\t\r\n\t}",
"public void cargarProveedor() {\n\t}",
"public Plato(){\n\t\t\n\t}",
"private List<Produto> todosProdutos() {\n\t\treturn produtoService.todosProdutos();\n\t}",
"public FacturaCompra pagoPSE(String userName,TipoMoneda tipoMoneda);",
"public Propuestas() {}",
"public String getPoblacion() {\r\n\t\treturn poblacion;\r\n\t}",
"public agregarProyectos() {\n initComponents();\n }",
"private void grabarProyectoCarrerasOferta() {\r\n try {\r\n if (!sessionProyecto.getEstadoActual().getCodigo().equalsIgnoreCase(EstadoProyectoEnum.INICIO.getTipo())) {\r\n return;\r\n }\r\n for (ProyectoCarreraOferta proyectoCarreraOferta : sessionProyecto.getCarrerasSeleccionadasTransfer()) {\r\n Carrera c = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n List<ProyectoCarreraOferta> proyectoCarreraOfertas = proyectoCarreraOfertaService.buscar(\r\n new ProyectoCarreraOferta(sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE));\r\n \r\n Long pcoId = devuelveProyectoCarreraId(proyectoCarreraOfertas, proyectoCarreraOferta);\r\n proyectoCarreraOferta = proyectoCarreraOfertaService.buscarPorId(new ProyectoCarreraOferta(pcoId));\r\n if (proyectoCarreraOferta == null) {\r\n proyectoCarreraOferta = new ProyectoCarreraOferta(sessionProyecto.getProyectoSeleccionado(), c.getId(), sessionProyecto.getOfertaAcademicaSeleccionada().getId(),\r\n Boolean.TRUE);\r\n if (contieneCarrera(proyectoCarreraOfertas, proyectoCarreraOferta) == false) {\r\n proyectoCarreraOfertaService.guardar(proyectoCarreraOferta);\r\n this.grabarIndividuoPCO(proyectoCarreraOferta);\r\n logDao.create(logDao.crearLog(\"ProyectoCarreraOferta\", proyectoCarreraOferta.getId() + \"\", \"CREAR\", \"Carrera=\"\r\n + proyectoCarreraOferta.getCarreraId() + \"|Oferta=\" + proyectoCarreraOferta.getOfertaAcademicaId() + \"|Proyecto= \"\r\n + proyectoCarreraOferta.getProyectoId().getId(), sessionUsuario.getUsuario()));\r\n }\r\n }\r\n proyectoCarreraOferta.setEsActivo(true);\r\n proyectoCarreraOfertaService.actualizar(proyectoCarreraOferta);\r\n logDao.create(logDao.crearLog(\"ProyectoCarreraOferta\", proyectoCarreraOferta.getId() + \"\", \"EDITAR\", \"Carrera=\"\r\n + proyectoCarreraOferta.getCarreraId() + \"|Oferta=\" + proyectoCarreraOferta.getOfertaAcademicaId()\r\n + \"|Proyecto= \" + proyectoCarreraOferta.getProyectoId().getId(), sessionUsuario.getUsuario()));\r\n }\r\n } catch (Exception e) {\r\n LOG.info(e.getMessage());\r\n }\r\n }",
"public Funcionalidad() {\n Cajero cajero1 = new Cajero(\"Pepe\", 2);\n empleados.put(cajero1.getID(), cajero1);\n Reponedor reponedor1 = new Reponedor(\"Juan\", 3);\n empleados.put(reponedor1.getID(), reponedor1);\n Producto producto1 = new Producto(\"Platano\", 10, 8);\n productos.add(producto1);\n Perecedero perecedero1 = new Perecedero(LocalDateTime.now(), \"Yogurt\", 10, 8);\n }",
"@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}",
"public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }",
"Persistencia() {\n\t}",
"@GetMapping(\"/procesadors\")\n @Timed\n public List<Procesador> getAllProcesadors() {\n log.debug(\"REST request to get all Procesadors\");\n List<Procesador> procesadors = procesadorRepository.findAll();\n return procesadors;\n }",
"private void cargarDatos()\n {\n // Pantalla carga\n showProgress(true, mView, mProgressView, getContext());\n Comando login = new LoginComando(KPantallas.PANTALLA_PERFIL);\n String email = UtilUI.getEmail(getContext());\n String password = UtilUI.getPassword(getContext());\n login.ejecutar(email,password);\n }",
"public List<ProcesoEncuestaDTO> obtenerEncuestasProceso(Long idProceso);",
"private void cargarDeDB() {\n Query query = session.createQuery(\"SELECT p FROM Paquete p WHERE p.reparto is NULL\");\n data = FXCollections.observableArrayList();\n\n List<Paquete> paquetes = query.list();\n for (Paquete paquete : paquetes) {\n data.add(paquete);\n }\n\n cargarTablaConPaquetes();\n }",
"public ProyectoInfraestructura crearProyectoInfraestructura(Proponente p,String nombre, String descrL, String descC , double cost,String croquis ,String imagen,HashSet<String> distritos){\r\n\t\tProyectoInfraestructura proyecto;\r\n\t\t\r\n\t\tif(p.getClass().getSimpleName().equals(\"Colectivo\")) {\r\n\t\t\tColectivo c = (Colectivo) p;\r\n\t\t\tproyecto = new ProyectoInfraestructura(p,c.getUsuarioRepresentanteDeColectivo() , nombre, descrL, descC , cost , croquis , imagen,distritos);\r\n\t\t\t\r\n\t\t}else {//Usuario\r\n\t\t\tUsuario u = (Usuario) p;\r\n\t\t\tproyecto = new ProyectoInfraestructura(u,u , nombre, descrL, descC , cost , croquis , imagen,distritos);\t\t\t\r\n\t\t}\r\n\t\tp.proponerProyecto(proyecto);\r\n\t\t\r\n\t\tthis.proyectos.add(proyecto);\r\n\t\tthis.lastProjectUniqueID++;\r\n\t\treturn proyecto;\r\n\t\t\r\n\t}",
"public List<Prodotto> getListaProdotti() {\n\t\treturn Shop.getInstance().getProdotti();\n\t}",
"public void testGetAllProjetos() {\n List<Projeto> lista = ProjetoDAO.getAllProjetos();\n assertTrue(lista != null && !lista.isEmpty());\n }",
"@Override\n public Paciente procurarPorId(int id) {\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"vesaliusPU\"); \n EntityManager em = factory.createEntityManager();\n Paciente paciente = em.find(Paciente.class, id);\n em.close();\n factory.close();\n return (paciente);\n }",
"private void controladorNuevoProyecto(Controlador controlador){\n this.contCargarImagen = controlador.getCargarImagen();\n nuevoProyecto.setControlFoto(contCargarImagen);\n\n this.contNuevoProyecto = controlador.getNuevoProyecto();\n nuevoProyecto.setControlProponerProyecto(contNuevoProyecto);\n }",
"public static void main(String args[]){\n \n Produto p3 = new Produto(\"Figo\", 5.99 , 200);\n \n System.out.println(p3.getDescricao() \n + \"\\n\" + p3.getPreco() \n + \"\\n\" + p3.getEstoque());\n \n }",
"public void setProdotto(String prodotto) {\r\n\t\tthis.prodotto = prodotto;\r\n\t}",
"@Override\r\n\tpublic Collection<ProyectoDTO> getProyecto(ProyectoDTO proyectoFilter) {\n\t\treturn null;\r\n\t}",
"private static void consultaProduto() throws Exception {\r\n boolean erro;\r\n int id;\r\n Produto p;\r\n Categoria c;\r\n System.out.println(\"\\t** Consultar produto **\\n\");\r\n do {\r\n erro = false;\r\n System.out.print(\"ID do produto a ser consultado: \");\r\n id = read.nextInt();\r\n if (id <= 0) {\r\n erro = true;\r\n System.out.println(\"ID Inválida! \");\r\n }\r\n System.out.println();\r\n } while (erro);\r\n p = arqProdutos.pesquisar(id - 1);\r\n if (p != null && p.getID() != -1) {\r\n c = arqCategorias.pesquisar(p.idCategoria - 1);\r\n System.out.println(\r\n \"Id: \" + p.getID()\r\n + \"\\nNome: \" + p.nomeProduto\r\n + \"\\nDescricao: \" + p.descricao\r\n + \"\\nPreco: \" + tf.format(p.preco)\r\n + \"\\nMarca: \" + p.marca\r\n + \"\\nOrigem: \" + p.origem\r\n );\r\n if (c != null) {\r\n System.out.println(\"Categoria: \" + c.nome);\r\n } else {\r\n System.out.println(\"Categoria: \" + p.idCategoria);\r\n }\r\n } else {\r\n System.out.println(\"Produto não encontrado!\");\r\n }\r\n }",
"ParqueaderoEntidad agregar(String nombre);",
"public ConsultaPNporproducto() {\n initComponents();\n ListarPro();\n }",
"public static void main(String[] args) {\n\t\tPessoa PF1 = new PessoaFisica(1,\"Michel\",\"31/03/1988\",\"15785465-01\",\"145.217.365-54\");\n\t\tPF1.AdicionaContato(\"898\",\"222\");\n\t\tPF1.AdicionaEndereco(\"avenida das gar�as\", 1110, \"padre cicero\", \"petrolina\", \"PE\", \"56326000\");\n\t\t\n\t\t// criando cliente pessoa Juridica\n\t\tPessoa PJ1 = new PessoaJuridica(2,\"Tectronic\",\"TECLTDA\",\"10-1009290/0001\");\n\t\tPJ1.AdicionaContato(\"00000\",\"11111\");\n\t\tPJ1.AdicionaEndereco(\"avenida do bambu\", 878, \"jo�oo pio 10\", \"juazeiro\", \"BA\", \"56326000\");\n\t\t\n\t\t// criando objetos produtoodutos\n\t\t/*Produto produto1 = new Produto(10, \"impressora\",35,1,100);\n\t\tProduto produto2 = new Produto(11, \"MicroSystem\",550, 2,80);\n\t\tProduto produto3 = new Produto(12, \"Faqueiro Ipanema\",75, 3,70);\n\t\tProduto produto4 = new Produto(13, \"Mangueira de Jardim\",19, 4,80);\n\t\tProduto produto5 = new Produto(14, \"Mouse multilaser\",25,5,90);*/\n \n Facade fachada = new Facade();\n fachada.incializarProdutos();\n \n\n\t\t// algumas forma de pagamento\n\t\t/*FormaPagamento Pagamento1 = new CartaoCredito(1,\"visa\",\"credito\", 3, \"Mariano Ribeiro\", \"10/10/23\", \"54212345212\",\"132\");\n\t\tFormaPagamento Pagamento2 = new CartaoCredito(2,\"mastercard\",\"debito\", 1, \"Juliana Marinalva\", \"12/09/29\", \"232356789\",\"787\");\n\t\tFormaPagamento Pagamento3 = new Boleto(3,\"19/04/2017\",\"12345678912\",\"Sanatander\");\n\t\tFormaPagamento Pagamento4 = new Boleto(4,\"20/04/2017\",\"12232344423\",\"Banco do Brasil\");\t\t*/\n \n \n\t\t//------------------------------------------------------------------------------------------------------------------------\n\t\t// criando um pedido com cliente e numero de itemens\n\t\tPedido pedido1 = new Pedido(30,PF1,3);\n\t\t\t\t\n\t\t// adicionando produtos como itens da lista de pedido\n\t\t/*ItemPedido item1 = new ItemPedido(20,produto1,3);\n\t\tItemPedido item2 = new ItemPedido(21,produto2,9);\n\t\tItemPedido item3 = new ItemPedido(22,produto3,2);\n\t\tItemPedido item4 = new ItemPedido(23,produto4,4);\n\t\tItemPedido item5 = new ItemPedido(24,produto5,1);*/\n\t\t\n\t\t// adicionando itens a lista de pedido\n\t\t/*pedido1.AdicionandoItemLista(item1,0);\n\t\tpedido1.AdicionandoItemLista(item3,1);\n\t\tpedido1.AdicionandoItemLista(item5,2);*/\n\t\t\t\t\n\t\t//forma de pagamento para o pedido 1\n\t\t//pedido1.setPagamento(Pagamento3);\n\n\t\t// Mostrar dados\n\t\tpedido1.mostrarPedido();\n\t\tSystem.out.println(\"Valor total com desconto: \" + Pedido.desconto(pedido1.getValorTotal(),(float)0.1));\n\t\tpedido1.getPagamento().realizaPagamento(true, \"16/04/17\");\n\t\t\n\t\t\n\t\t\n\t}",
"public void setPoblacion(String poblacion) {\r\n\t\tthis.poblacion = poblacion;\r\n\t}",
"public Pacotinho(Repositorio repositorio, int quantItensNoPacotinho) {\n this.repositorio = repositorio;\n this.quantItensNoPacotinho = quantItensNoPacotinho;\n\n adicionarFigurinhasAleatorias();\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Profilo> getAll() {\r\n\t\t//Recupero la sessione da Hibernate\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\t\t\r\n\t\t//Creo la query usando il linguaggio HQL (Hibernate Query Language)\r\n\t\tQuery query = session.createQuery(\"FROM Vocelicenza\");\r\n\t\t\t\r\n\t\t//Restituisco la lista di Profili\r\n\t\treturn query.list();\r\n\t}",
"public Puntaje(String nom, int puntaje) {\n this.nombre = nom;\n this.puntos = puntaje;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ComPermiso> escuelas() {\n\t\t\r\n\t\treturn em.createQuery(\"select c.dependencia.id,c.dependencia.nombre from ComPermiso c \").getResultList();\r\n\t}",
"public void publicarPropuestas() {\n try {\n //SISTEMA VERIFICA QUE LOS COMPROMISOS PARA EL PERIODO HAYAN SIDO INGRESADO\n if (this.listaCompromiso == null || this.listaCompromiso.isEmpty()) {\n //MUESTRA MENSAJE: 'DEBE INGRESAR LOS COMPROMISOS PARA PODER PUBLICAR ', NO ES POSIBLE PUBLICAR LOS RESULTADOS \n addErrorMessage(keyPropertiesFactory.value(\"cu_ne_6_lbl_mensaje_add_comprimiso_faltantes\"));\n return;\n }\n String mensajeValidacion = validarCompromisosPeriodoByPropuestaNacesidad(this.propuestaSeleccionada);\n if (mensajeValidacion != null) {\n addErrorMessage(keyPropertiesFactory.value(mensajeValidacion));\n return;\n }\n if (IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_PRE_APROBADA.compareTo(this.propuestaSeleccionada.getConstantes().getIdConstantes()) != 0) {\n addErrorMessage(\"La propuesta debe estar en estado Pre-Aprobado\");\n return;\n }\n /*byte[] bitesPdf;\n //GENERAMOS EL REPORTE - CREADOR DE REPORTES\n try {\n HashMap mapa = new HashMap();\n mapa.put(\"p_id_periodo\", periodoSeleccionado.getIdPeriodo().intValue());\n bitesPdf = GeneradorReportesServicio.getInstancia().generarReporte(mapa, \"reporte15.jasper\");\n } catch (Exception e) {\n adicionaMensajeError(\"ERROR, Se presentaron errores al general el reporte JASPER\");\n Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, \"CU-NE-06(publicarPropuestas)\", e);\n return;\n }*/\n String iniciaCodigoVic = keyPropertiesFactory.value(\"cu_ne_6_codigo_proyecto_inicia_generacion\");\n if (iniciaCodigoVic.contains(\"-----NOT FOUND-----\")) {\n addErrorMessage(keyPropertiesFactory.value(\"cu_ne_6_error_no_existe_codigo_proyecto_inicia_generacion\"));\n return;\n }\n //EL SISTEMA CAMBIA EL ESTADO DE TODAS LAS PROPUESTAS DEL LISTADO DE ''PRE-APROBADA ' A 'APROBADA' \n //Y LOS DE ESTADO 'REVISADA' A 'NO APROBADA' \n List<SieduPropuestaAsignada> lstPropuestaasignada = this.servicePropuestaAsignada.findByVigencia(this.propuestaSeleccionada);\n List<Long> lstLong = new ArrayList<>();\n for (SieduPropuestaAsignada s : lstPropuestaasignada) {\n lstLong.add(s.getPropuestaNecesidad().getIdPropuestaNecesidad());\n }\n Proyecto proyecto = new Proyecto();\n int contarProyecto = iProyectoLocal.contarProyectoByVigencia(lstLong);\n Constantes constantes = iConstantesLocal.getConstantesPorIdConstante(IConstantes.DURACION_PROYECTOS_INSTITUCIONALES);\n int numeroMesesEstimacionProyecto = Integer.parseInt(constantes.getValor());\n UsuarioRol usuarioRol = new UsuarioRol(loginFaces.getPerfilUsuarioDTO().getRolUsuarioPorIdRolDTO(IConstantesRole.EVALUADOR_DE_PROPUESTAS_DE_NECESIDADES_EN_LA_VICIN).getIdUsuarioRol());\n if (this.propuestaSeleccionada.getConstantes().getIdConstantes().equals(IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_PRE_APROBADA)) {\n EjecutorNecesidad ejecutorNecesidadResponsable = iEjecutorNecesidadLocal.getEjecutorNecesidadPorPropuestaNecesidadYRolResponsable(this.propuestaSeleccionada.getIdPropuestaNecesidad());\n if (ejecutorNecesidadResponsable == null || ejecutorNecesidadResponsable.getUnidadPolicial() == null || ejecutorNecesidadResponsable.getUnidadPolicial().getSiglaFisica() == null) {\n addErrorMessage(\"Error, Verifique la sigla física de la Unidad Policial asociada a la propuesta: \" + this.propuestaSeleccionada.getTema());\n return;\n }\n\n this.propuestaSeleccionada.setConstantes(new Constantes(IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_APROBADA));\n //POR CADA PROPROPUESTA APROBADA SE CREA UN PROYECTO\n //CREA UN PROYECTO DE INVESTIGACIÓN POR CADA PROPUESTA CON EL ESTADO 'APROBADA', \n //ASIGNÁNDOLE EL CÓDIGO DE INVESTIGACIÓN DE ACUERDO AL MÉTODO ESTABLECIDO(VER REQUERIMIENTOS ESPECIALES), \n //ASIGNÁNDOLE EL ÁREA Y LA LÍNEA DE INVESTIGACIÓN Y EL TEMA PROPUESTO COMO TITULO PROPUESTO\n //VIC - [Consecutivo de proyectos en el periodo][Año]- [Código interno de la Unidad Policial o Escuela]\n String codigoInternoUnidad = ejecutorNecesidadResponsable.getUnidadPolicial().getSiglaFisica();\n String codigoProyecto = iniciaCodigoVic.concat(\"-\");//VIC \n contarProyecto += 1;\n codigoProyecto = codigoProyecto.concat(String.valueOf(contarProyecto));//[Consecutivo de proyectos en el periodo]\n codigoProyecto = codigoProyecto.concat(String.valueOf(lstPropuestaasignada.get(0).getSieduPropuestaAsignadaPK().getVigencia()));//[Año]\n codigoProyecto = codigoProyecto.concat(\"-\");\n codigoProyecto = codigoProyecto.concat(codigoInternoUnidad);//[Código interno de la Unidad Policial o Escuela]\n Date fechaHoy = new Date();\n proyecto.setCodigoProyecto(codigoProyecto);\n proyecto.setLinea(this.propuestaSeleccionada.getLinea());\n proyecto.setTituloPropuesto(this.propuestaSeleccionada.getTema());\n proyecto.setTema(this.propuestaSeleccionada.getTema());\n proyecto.setPeriodo(this.propuestaSeleccionada.getPeriodo());\n proyecto.setUsuarioRol(usuarioRol);\n proyecto.setEstado(new Constantes(IConstantes.TIPO_ESTADO_PROYECTO_EN_EJECUCION));\n proyecto.setUnidadPolicial(ejecutorNecesidadResponsable.getUnidadPolicial());\n proyecto.setPropuestaNecesidad(this.propuestaSeleccionada);\n proyecto.setFechaEstimadaInicio(fechaHoy);\n Calendar fechaFinalEstimadaProyecto = Calendar.getInstance();\n fechaFinalEstimadaProyecto.setTime(fechaHoy);\n fechaFinalEstimadaProyecto.add(Calendar.MONTH, numeroMesesEstimacionProyecto);\n proyecto.setFechaEstimadaFinalizacion(fechaFinalEstimadaProyecto.getTime());\n proyecto.setFechaActualizacion(fechaHoy);\n //CREAMOS LOS COMPROMISOS PROYECTOS\n List<CompromisoProyecto> listaCompromisosProyecto = new ArrayList<CompromisoProyecto>();\n //CONSULTAMOS LOS COMPROMISOS DE ESTE PERIODO\n List<CompromisoPeriodo> listaComprimiso = iCompromisoPeriodoLocal.buscarCompromisoPeriodoByIdPropuestaNecesidad(this.propuestaSeleccionada);\n for (CompromisoPeriodo unCompromisoPeriodo : listaComprimiso) {\n CompromisoProyecto compromisoProyecto = new CompromisoProyecto();\n compromisoProyecto.setCompromisoPeriodo(unCompromisoPeriodo);\n compromisoProyecto.setProyecto(proyecto);\n compromisoProyecto.setEstado(new Constantes(IConstantes.ESTADO_COMPROMISO_PROYECTO_PENDIENTE));\n compromisoProyecto.setFechaCreacion(new Date());\n compromisoProyecto.setMaquina(loginFaces.getPerfilUsuarioDTO().getMaquinaDTO().getIpLoginRemotoUsuario());\n compromisoProyecto.setUsuarioRegistro(loginFaces.getPerfilUsuarioDTO().getIdentificacion());\n compromisoProyecto.setUsuarioRolRegistra(usuarioRol);\n listaCompromisosProyecto.add(compromisoProyecto);\n }\n //CREAMOS LAS UNIDADES EJECUTORAS PARA EL PROYECTO\n List<EjecutorNecesidadDTO> listadoEjecutorNecesidadDTOPropuesta = iEjecutorNecesidadLocal.getEjecutorNecesidadDTOPorPropuestaNecesidad(this.propuestaSeleccionada.getIdPropuestaNecesidad());\n List<EjecutorNecesidad> listaEjecutorNecesidadProyecto = new ArrayList<EjecutorNecesidad>();\n for (EjecutorNecesidadDTO unaEjecutorNecesidadDTO : listadoEjecutorNecesidadDTOPropuesta) {\n EjecutorNecesidad ejecutorNecesidadLocal = new EjecutorNecesidad();\n ejecutorNecesidadLocal.setPropuestaNecesidad(new PropuestaNecesidad(this.propuestaSeleccionada.getIdPropuestaNecesidad()));\n ejecutorNecesidadLocal.setProyecto(proyecto);\n ejecutorNecesidadLocal.setRol(new Constantes(unaEjecutorNecesidadDTO.getIdRol()));\n ejecutorNecesidadLocal.setUnidadPolicial(this.iUnidadPolicialLocal.obtenerUnidadPolicialPorId(unaEjecutorNecesidadDTO.getIdUnidadPolicial()));\n listaEjecutorNecesidadProyecto.add(ejecutorNecesidadLocal);\n }\n proyecto.setEjecutorNecesidadList(listaEjecutorNecesidadProyecto);\n proyecto.setCompromisoProyectoList(listaCompromisosProyecto);\n\n } else if (this.propuestaSeleccionada.getConstantes().getIdConstantes().equals(\n IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_REVISADA)) {\n this.propuestaSeleccionada.setConstantes(new Constantes(IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_NO_APROBADA));\n }\n\n //ACTUALIZAMOS EL CAMPO ROL_ACTUAL\n //CON EL OBJETIVO SE SABER EN DONDE SE ENCUENTRA LA PROPUESTA\n //ESTO SE REALIZA PARA CORREGIR \n //LA INCIDENCIA #0002754: Mientras no se publiquen los resultados de las necesidades, el estado debe ser 'Enviada a VICIN'.\n this.propuestaSeleccionada.setRolActual(IConstantes.PROPUESTA_NECESIDAD_PUBLICADA_JEFE_UNIDAD);\n /* \n\n //GENERAMOS EL NOMBRE DEL ARCHIVO DEL REPORTE\n String nombreReporteUnico = \"PROP_NECES_PERIODO\".concat(\"_\").concat(String.valueOf(System.currentTimeMillis())).concat(\".pdf\");\n String nombreReporte = \"PROP_NECES_PERIODO_\" + (periodoSeleccionado.getAnio() == null ? periodoSeleccionado.getIdPeriodo().toString() : periodoSeleccionado.getAnio().toString()) + \".pdf\";\n */\n //SE ACTUALIZAN LAS PROPUESTAS DE NECESIDAD\n servicePropuestaNecesidad.guardarPropuestaYgenerarProyecto(\n this.propuestaSeleccionada,\n proyecto);\n\n addInfoMessage(keyPropertiesFactory.value(\"cu_ne_6_lbl_mensaje_propuestas_actualizadas_ok_publicar\"));\n\n navigationFaces.redirectFacesCuNe01();\n\n } catch (Exception e) {\n\n addErrorMessage(keyPropertiesFactory.value(\"general_mensaje_error_exception\"));\n Logger.getLogger(this.getClass().getName()).log(Level.SEVERE,\n \"CU-NE-06 Evaluar propuestas de necesidades de investigación - (publicarPropuestas)\", e);\n\n }\n\n }",
"public void setPuesto(String puesto) {\n this.puesto = puesto;\n }",
"public String getProdotto() {\r\n\t\treturn prodotto;\r\n\t}",
"public String altaGenero(){\n int id = coleccionGenero.size() + 1;\n Genero gen = new Genero(id, generoSeleccionado);\n //graba en bd\n GeneroService serv = new GeneroService();\n //refrescar otra vez la lista\n return \"lista-genero\";\n }",
"private void enviarRequisicaoPalpite() {\n if (servidor.verificarPalpitar(nomeJogador)) {\n String palpite = NomeDialogo.nomeDialogo(null, \"Informe o seu palpite\", \"Digite o seu palpite:\", false);\n if (palpite != null && !servidor.palpitar(nomeJogador, Integer.parseInt(palpite))) {\n JanelaAlerta.janelaAlerta(null, \"Este palpite já foi dado!\", null);\n }\n }\n }",
"private PropiedadesComunicacion() throws IOException {\r\n try {\r\n\r\n Properties propiedades = new Properties();\r\n InputStream stream = ClassLoader.getSystemResourceAsStream(RUTA_PROPIEDADES);\r\n propiedades.load(stream);\r\n\r\n puerto = Integer.parseInt(propiedades.getProperty(KEY_PORT));\r\n\r\n stream.close();\r\n\r\n stream.close();\r\n if (!validarPuerto(puerto)) {\r\n throw new IOException(\"Error de direccion ip del servidor\");\r\n }\r\n } catch (IOException ex) {\r\n throw ex;\r\n }\r\n }",
"public ProyectoElements getProyectoAccess() {\n\t\treturn pProyecto;\n\t}",
"public static void main(String[] args) {\n Produto prod1 = new Produto(1, \"coca-cola\",200.99, true, 10 );\n\n //objeto instanciado pelo construtor 2\n Produto prod2 = new Produto();\n prod2.setCodigo(2);\n prod2.setNome(\"Fanta\");\n prod2.setDisponivel(true);\n prod2.setValor(300.88);\n prod2.setQuantidade(10);\n\n System.out.println(\"Empresa dos Produtos: \");\n\n\n }",
"public static Paquete insertPaquete(String nombre_paquete, \n String descripcion_paquete){\n Paquete miPaquete = new Paquete(nombre_paquete, descripcion_paquete);\n miPaquete.registrarPaquete();\n return miPaquete;\n \n }",
"public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}",
"public Prova getProva(int codProva) {\n\t\tTransactionManager txManager = new TransactionManager();\n\t return txManager.doInTransactionWithReturn((connection) -> {\n\t \t\n\t\t\tps = connection.prepareStatement(\n\t\t\t\t\t\"SELECT codigo, codProfessor, codDisciplina, titulo, questoes, valorTotal, valorQuestoes, tempo, data, allowAfterDate, allowMultipleAttempts FROM prova WHERE codigo=?\");\n\t\t\tps.setInt(1, codProva);\n\t\t\trs = ps.executeQuery();\n\t\t\tif(rs.next()) {\n\t\t\t\tint codigo = rs.getInt(1);\n\t\t\t\tint codProfessor = rs.getInt(2);\n\t\t\t\tint codDisciplina = rs.getInt(3);\n\t\t\t\tString titulo = rs.getString(4);\n\t\t\t\tString questoes = rs.getString(5);\n\t\t\t\tfloat valorTotal = rs.getFloat(6);\n\t\t\t\tfloat valorQuestoes = rs.getFloat(7);\n\t\t\t\tint tempo = rs.getInt(8);\n\t\t\t\tString data = rs.getString(9);\n\t\t\t\tboolean allowAfterDate = rs.getBoolean(10);\n\t\t\t\tboolean allowMultipleAttempts = rs.getBoolean(11);\n\t\t\t\t\n\t\t\t\treturn new Prova(codigo, codProfessor, codDisciplina, titulo, questoes, valorTotal, valorQuestoes, tempo, data, allowAfterDate, allowMultipleAttempts);\n\t\t\t}\n\t\t\treturn new Prova();\n\t\t});\n\t}",
"@Override\n\tpublic void parada(Participante p) {\n\t\t\n\t}"
] | [
"0.652463",
"0.64935577",
"0.64935577",
"0.64709586",
"0.64002377",
"0.63512087",
"0.63428015",
"0.6311043",
"0.62802786",
"0.6272359",
"0.6233288",
"0.617026",
"0.61303115",
"0.6128556",
"0.6108338",
"0.6091863",
"0.6028535",
"0.60205436",
"0.601242",
"0.59924126",
"0.59829605",
"0.5966107",
"0.5964793",
"0.5958589",
"0.59554744",
"0.5951931",
"0.5885213",
"0.5884468",
"0.5881889",
"0.58803964",
"0.58710116",
"0.5860443",
"0.5857688",
"0.5850811",
"0.58443713",
"0.5842537",
"0.583467",
"0.58307797",
"0.5825605",
"0.5797928",
"0.57965285",
"0.5777069",
"0.57748216",
"0.57737786",
"0.5770361",
"0.5768157",
"0.5767629",
"0.57582915",
"0.5756792",
"0.5755586",
"0.5755254",
"0.5744248",
"0.5744248",
"0.57414085",
"0.57366925",
"0.570645",
"0.57048154",
"0.5701687",
"0.57008195",
"0.5698623",
"0.5694707",
"0.56905997",
"0.56864953",
"0.56720656",
"0.56716406",
"0.5663918",
"0.5660445",
"0.56598055",
"0.56575584",
"0.56484944",
"0.5647229",
"0.56440896",
"0.56338847",
"0.56336385",
"0.5630733",
"0.5628506",
"0.5624951",
"0.5608259",
"0.560571",
"0.5603991",
"0.5603578",
"0.56029844",
"0.560244",
"0.5601624",
"0.5600139",
"0.5595052",
"0.5590252",
"0.5585859",
"0.5579154",
"0.5575502",
"0.55737245",
"0.55731326",
"0.55717224",
"0.5570757",
"0.55681694",
"0.55639404",
"0.55537033",
"0.5551739",
"0.55516034",
"0.5546314"
] | 0.5787434 | 41 |
Cambia el nombre del proyecto | public void setNombre(String nombre) {
this.nombre = nombre;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getProjectName();",
"String getProjectName();",
"@Override\r\n\tString getProjectName();",
"public static String getName() {\n\t\treturn ProjectMain._name;\n\t}",
"private String getSimplicityProjectName() {\n return properties.getProperty(\"simplicity.starter.projectName\");\n }",
"public void setProyecto(java.lang.String proyecto) {\n this.proyecto = proyecto;\n }",
"public void setProyecto(java.lang.String proyecto) {\n this.proyecto = proyecto;\n }",
"public String getProjectName() { return DBCurrent.getInstance().projectName(); }",
"public String getProjectName() { return DBCurrent.getInstance().projectName(); }",
"public String getProjectName(){\n return projectModel.getProjectName();\n }",
"public void setNamePro(String namePro) {\n this.namePro = namePro;\n }",
"public void actualizarNombrePoder(){\n\t\tString name = ( game.getCurrentSorpresa() == null )?\"No hay sorpresa\":game.getCurrentSorpresa().getClass().getName();\n\t\tn2.setText(name.replace(\"aplicacion.\",\"\"));\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn nombre;\n\t}",
"private static String nameOf(GitHubProject project) {\n return String.format(\"[%s/%s](%s)\",\n project.organization().name(), project.name(), project.scm().toString());\n }",
"public String getNamePro() {\n return namePro;\n }",
"public java.lang.String getProyecto() {\n return proyecto;\n }",
"public java.lang.String getProyecto() {\n return proyecto;\n }",
"public static String name(){\n return \"10.Schneiderman.Lorenzo\"; \n }",
"public static String getActiveProjectName() {\r\n Project project = ProjectPlugin.getPlugin().getProjectRegistry().getCurrentProject();\r\n \r\n if (project == null)\r\n project = ProjectPlugin.getPlugin().getProjectRegistry().getDefaultProject();\r\n \r\n return project.getName();\r\n }",
"public String getNomeProduto() {\r\n\t\treturn nomeProduto;\r\n\t}",
"@Override\n\tpublic String getResProjectName() {\n\t\treturn applCenter;\n\t}",
"String getName() ;",
"String getDepotname();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();"
] | [
"0.69190454",
"0.68217885",
"0.66013616",
"0.6551231",
"0.6531832",
"0.65173125",
"0.65173125",
"0.64926064",
"0.64926064",
"0.64625627",
"0.6327251",
"0.6326667",
"0.6293809",
"0.6258614",
"0.6256754",
"0.6223304",
"0.6223304",
"0.6222807",
"0.61060244",
"0.609539",
"0.607803",
"0.60556614",
"0.60273194",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963",
"0.59856963"
] | 0.0 | -1 |
Obtiene los colaboradores del proyecto | public ArrayList<String> getColaboradores() {
return colaboradores;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic List<Proyecto> listarProyectos() {\n\t\treturn proyectoRepo.findAll();\n\t}",
"public void setColaboradores(ArrayList<String> colaboradores) {\n this.colaboradores = colaboradores;\n }",
"private void pickListCarreras(Proyecto proyecto) {\r\n sessionProyecto.getCarrerasProyecto().clear();\r\n sessionProyecto.getFilterCarrerasProyecto().clear();\r\n List<Carrera> carrerasProyecto = new ArrayList<>();\r\n List<Carrera> usuarioCarreras = new ArrayList<>();\r\n try {\r\n List<ProyectoCarreraOferta> lips = proyectoCarreraOfertaService.buscar(new ProyectoCarreraOferta(proyecto, null, null, Boolean.TRUE));\r\n if (lips != null) {\r\n for (ProyectoCarreraOferta pco : lips) {\r\n Carrera c = carreraService.find(pco.getCarreraId());\r\n if (!carrerasProyecto.contains(c)) {\r\n carrerasProyecto.add(c);\r\n }\r\n }\r\n }\r\n for (Carrera carrera : sessionProyecto.getCarreras()) {\r\n if (!usuarioCarreras.contains(carrera)) {\r\n usuarioCarreras.add(carrera);\r\n }\r\n }\r\n sessionProyecto.setCarrerasDualList(new DualListModel<>(carreraService.diferenciaProyectoCarrera(\r\n usuarioCarreras, carrerasProyecto), carrerasProyecto));\r\n sessionProyecto.setCarrerasProyecto(carrerasProyecto);\r\n sessionProyecto.setFilterCarrerasProyecto(sessionProyecto.getCarrerasProyecto());\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n }",
"private void cargaComonentes() {\n\t\trepoInstituciones = new InstitucionesRepository(session);\n\t\trepoInstitucion_usuario = new Institucion_UsuariosRepository(session);\n\t\tList upgdsList = null;\n\t\tif(mainApp.getUsuarioApp().getPer_Usu_Id().equalsIgnoreCase(\"Alcaldia\")){\n\t\t\tupgdsList = repoInstituciones.listByMunicipio(mainApp.getUsuarioApp().getMun_Usu_Id());\n\t\t\tInstituciones instiL=new Instituciones();\n\t\t\tIterator iter = upgdsList.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tinstiL=(Instituciones) iter.next();\n\t\t\t\tinstitucionesList.add(instiL);\n\t\t\t}\n\t\t}else{\n\t\t\tInstitucion_Usuarios institucion_usuario = new Institucion_Usuarios();\n\t\t\tupgdsList = repoInstitucion_usuario.getListIpsByUsuario(mainApp.getUsuarioApp().getUsu_Id());\n\t\t\tIterator iter = upgdsList.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tinstitucion_usuario = (Institucion_Usuarios) iter.next();\n\t\t\t\tinstitucionesList.add(repoInstituciones.findById(institucion_usuario.getIps_Ipsu_Id()));\n\t\t\t}\n\t\t}\n\t\t\n\t\tinstitucionesBox.setItems(institucionesList);\n\t\tinstitucionesBox.setValue(mainApp.getInstitucionApp());\n\n\t\tinstitucionesBox.valueProperty().addListener(new ChangeListener<Instituciones>() {\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends Instituciones> observable, Instituciones oldValue,\n\t\t\t\t\tInstituciones newValue) {\n\t\t\t\tmainApp.setInstitucionApp(newValue);\n\t\t\t}\n\t\t});\n\t}",
"private void reposicionarPersonajes() {\n // TODO implement here\n }",
"public Collection<Proyecto> leerProyectosCollection() {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tProyecto[] proyecto = plantilla.getForObject(\"http://localhost:5000/proyectos\", Proyecto[].class);\n\t\t\tList<Proyecto> listaProyectos = Arrays.asList(proyecto);\n\t\t\treturn listaProyectos;\n\t\t}",
"public List<Jogo> getListaDeJogosComprados() {\r\n\t\treturn listaDeJogosComprados;\r\n\t}",
"public void listadoCarreras() {\r\n try {\r\n this.sessionProyecto.getCarreras().clear();\r\n this.sessionProyecto.getFilterCarreras().clear();\r\n this.sessionProyecto.getCarreras().addAll(sessionUsuarioCarrera.getCarreras());\r\n this.sessionProyecto.setFilterCarreras(this.sessionProyecto.getCarreras());\r\n } catch (Exception e) {\r\n }\r\n }",
"private static void mostrarListaDeComandos() {\n System.out.println(\"Lista de comandos:\");\n for (int i = 0; i < comandos.length; i++){\n System.out.println(comandos[i]);\n }\n }",
"@Override\n\tpublic List<CiclosCarreras> listar() {\n\t\treturn repoCiclos.findAll();\n\t}",
"@Override\n\tpublic List<Ciclo> listarCiclos() {\n\t\treturn repository.findAll();\n\t}",
"public List<Companhia> getCompanhiasDoJogador() {\r\n return companhiasDoJogador;\r\n }",
"public void listOfCourses() {//admin cagirisa bulunna kurslarin hepsi\n if (Courses.size() != 0) {\n System.out.printf(\"%s kullanicisinin dersleri\\n\", this.getUsername());\n for (int i = 0; i < this.Courses.size(); ++i) {\n System.out.printf(\"%d-%s\\n\", i, Courses.get(i));\n }\n } else {\n System.out.printf(\"%s kullanicinin dersi yok\\n\", this.getUsername());\n }\n }",
"private void getCodigosCasas(){\n mCodigosCasas = estudioAdapter.getListaCodigosCasasSinEnviar();\n //ca.close();\n }",
"public interface IMovidaCollaborations {\n\n\t/**\n\t * Identificazione delle collaborazioni dirette di un attore\n\t * \n\t * Restituisce gli attori che hanno partecipato ad almeno un film con l'attore\n\t * <code>actor</code> passato come parametro.\n\t * \n\t * @param actor attore di cui cercare i collaboratori diretti\n\t * @return array di persone\n\t */\n\tpublic Person[] getDirectCollaboratorsOf(Person actor);\n\n\t/**\n\t * Identificazione del team di un attore\n\t * \n\t * Restituisce gli attori che hanno collaborazioni dirette o indirette con\n\t * l'attore <code>actor</code> passato come parametro.\n\t * \n\t * Vedi slide per maggiori informazioni su collaborazioni e team.\n\t * \n\t * @param actor attore di cui individuare il team\n\t * @return array di persone\n\t */\n\tpublic Person[] getTeamOf(Person actor);\n\n\t/**\n\t * Identificazione dell'insieme di collaborazioni caratteristiche (ICC) del team\n\t * di cui un attore fa parte e che ha lo score complessivo pi� alto\n\t * \n\t * Vedi slide per maggiori informazioni su score e ICC.\n\t * \n\t * Si noti che questo metodo richiede l'invocazione del metodo precedente\n\t * <code>getTeamOf(Person actor)</code>\n\t * \n\t * @param actor attore di cui individuare il team\n\t * @return array di collaborazioni\n\t */\n\tpublic Collaboration[] maximizeCollaborationsInTheTeamOf(Person actor);\n\n}",
"public void colocarComentariosResultado()\r\n\t{\r\n\t\tresultadoprueba.colocarTextoComentarios(\"\");\r\n\t}",
"public List<Carona> getCaronas() {\r\n\t\tList<Carona> retorno = new LinkedList<Carona>();\r\n\r\n\t\tfor (Usuario UsuarioTemp : listaDeUsuarios) {\r\n\t\t\tretorno.addAll(UsuarioTemp.getCaronas());\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}",
"public String getComentarios() {\n return comentarios;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ComPermiso> escuelas() {\n\t\t\r\n\t\treturn em.createQuery(\"select c.dependencia.id,c.dependencia.nombre from ComPermiso c \").getResultList();\r\n\t}",
"public List<Propriedade> getListaDePropriedadesComMonopolio(){\r\n List<Propriedade> proComMonopolio = new ArrayList<>();\r\n for(Propriedade pro: this.propriedadesDoJogador){\r\n for(String cor: this.monopolioNoGrupoDeCor){\r\n if(pro.getCor().equals(cor)){\r\n proComMonopolio.add(pro);\r\n break;\r\n }\r\n }\r\n }\r\n \r\n return proComMonopolio;\r\n }",
"public List<ParCuentasGenerales> listaCuentasGeneralesPorAsignar() {\n return parParametricasService.listaCuentasGenerales();\n }",
"@GetMapping(\"/tema/{id}/comentarios\")\n public Iterable<Comentario> findAllComentarios(@PathVariable(\"id\") Long id) {\n return repository.findById(id).get().getComentarios();\n }",
"public void getAllCursos() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT * FROM curso;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n int familia = rs.getInt(\"id_familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n System.out.format(\"%d,%s,%d,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"public static ArrayList<Course> ottieniCorsi() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.GET_COURSES;\n\t\t\tReceiveContent resP = sendReceive(rp);\n\t\t\tArrayList<Course> lista = (ArrayList<Course>) resP.parameters[0];\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Errore nell'ottenimento dei corsi\");\n\t\t}\n\t\treturn new ArrayList<Course>();\n\t}",
"public Collection<OrdenCompra> traerTodasLasOrdenesDeCompra() {\n Collection<OrdenCompra> resultado = null;\n try {\n controlOC = new ControlOrdenCompra();\n bitacora.info(\"Registro OrdenCompra Iniciado correctamente\");\n resultado = controlOC.traerTodasLasOrdenesDeCompra();\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro OrdenCompra por \" + ex.getMessage());\n }\n return resultado;\n }",
"private List<PromocionConcursoAgr> listaPromocionConcursoAgr() {\r\n\t\tString select = \" select distinct(puesto_det.*) \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab \"\r\n\t\t\t\t+ \"on estado_cab.id_estado_cab = estado_det.id_estado_cab \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial cargo \"\r\n\t\t\t\t+ \"on cargo.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \" where puesto_det.id_concurso_puesto_agr is null \"\r\n\t\t\t\t+ \"and lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and lower(estado_cab.descripcion) = 'concurso' \"\r\n\t\t\t\t//+ \"and puesto_det.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t//+ \" and cargo.permanente is true\"\r\n\t\t\t\t;\r\n\r\n\t\tList<PromocionConcursoAgr> lista = new ArrayList<PromocionConcursoAgr>();\r\n\t\tlista = em.createNativeQuery(select, PromocionConcursoAgr.class)\r\n\t\t\t\t.getResultList();\r\n\r\n\t\treturn lista;\r\n\t}",
"public void buscarComprobantesEntreFechas(){\n listaComprobantes = this.getEjbFacadeComprobantes().buscarEntreFechasConEstadoSinRendicionExterna(desde,hasta);\n \n System.out.println(\"listaComprobantes cantidad >> \" + listaComprobantes.size());\n }",
"@Override\n public ArrayList<Comentario> getComentarios(String pId) throws SQLException {\n ArrayList<Comentario> comentarios = new ArrayList<Comentario>();\n comentarios = (ArrayList<Comentario>) bdComentario.selectQuery(\"SELECT * FROM COMENTARIO WHERE \"\n + \"ID_PROPIEDAD = \" + pId);\n return comentarios;\n }",
"List<Curso> obtenerCursos();",
"public ArrayList<Project> allProjects() {\n ArrayList<Project> projects = new ArrayList<>();\n for (Role role : this.roles) {\n if (role instanceof Member) {\n projects.add(((Member) role).getProject());\n } else if (role instanceof Leader) {\n projects.add(((Member) role).getProject());\n }\n }\n return projects;\n }",
"public synchronized void loadCollaborators() {\n Path collaboratorsPath = this.uri.getPath().resolve(\"collaborators.txt\");\n try {\n this.collaborators = Files.readAllLines(collaboratorsPath, StandardCharsets.UTF_8).stream()\n .map(c -> State.getInstance().getUserOrNull(c))\n .collect(Collectors.toSet());\n System.out.println(this.uri + \" can be accessed by \" + this.collaborators);\n for (User collaborator : collaborators) {\n collaborator.queueInvite(new Invite(this, collaborator));\n }\n } catch (NoSuchFileException e) {\n try {\n Files.createFile(collaboratorsPath);\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public List<FacConsecutivo> getListaConsecutivos() {\r\n return listaConsecutivos;\r\n }",
"public void getAllCursosAvanzado() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT id_curso, nombre_curso, familia.nombre_familia as familia, id_profesor FROM curso \"\n + \"INNER JOIN familia ON curso.id_familia = familia.id_familia;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n \n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n String familia = rs.getString(\"familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n \n System.out.format(\"%d,%s,%s,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"@Override\n\tpublic List<Comprobante> findAll() throws Exception {\n\t\treturn comproRepository.findAll();\n\t}",
"public Comentarios getCom() {\r\n\t\treturn com;\r\n\t}",
"public void getProject(){\n\t\n\t String getList[] = clientFacade.GetProjects().split(\"\\n\");\n\t DefaultComboBoxModel addPro = new DefaultComboBoxModel();\n\t\tfor(int i=1; i<getList.length; i+=2) \n\t\t\t addPro.addElement(getList[i]);\n\t\t\t \n\t\tcPro.setModel(addPro);\t\n\t}",
"public List<Carona> getTodasAsCaronas() {\r\n\t\tList<Carona> retorno = new LinkedList<Carona>();\r\n\r\n\t\tfor (Usuario usuario : listaDeUsuarios) {\r\n\t\t\tfor (Carona caronaTemp : usuario.getCaronas()) {\r\n\t\t\t\tretorno.add(caronaTemp);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}",
"public HashSet<Proyecto> getProyectosSolicitandoFinanciacion(){\r\n\t\t\r\n\t\tif(!this.modoAdmin) return null;\r\n\t\tHashSet<Proyecto> listado = new HashSet<Proyecto>();\r\n\t\tfor(Proyecto p: this.proyectos) {\r\n\t\t\tif(p.getEstadoProyecto() == EstadoProyecto.PENDIENTEFINANCIACION) {\r\n\t\t\t\tlistado.add(p);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return (HashSet<Proyecto>) Collections.unmodifiableSet(listado);\r\n\t\t//posteriormente hay que modificarlos, controlar la llamada a la fucnion\r\n\t\treturn listado;\r\n\t}",
"private void cargarProvincias() {\n ArrayList<Provincia> provincias = new ArrayList<>();\n try {\n provincias = new Provincia().listarProvincias();\n if (!provincias.isEmpty()) {\n for (int i = 0; i < provincias.size(); i++) {\n ProvinciasjComboBox.addItem(provincias.get(i).getNombreProvincia());\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al cargar las provincias\");\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }",
"@Generated\n public List<Comentario> getComentario() {\n if (comentario == null) {\n __throwIfDetached();\n ComentarioDao targetDao = daoSession.getComentarioDao();\n List<Comentario> comentarioNew = targetDao._queryUsuarios_Comentario(id);\n synchronized (this) {\n if(comentario == null) {\n comentario = comentarioNew;\n }\n }\n }\n return comentario;\n }",
"public ArrayList<Project> getClients() {\n try {\n ArrayList<Project> clients = new ArrayList<Project>();\n String selectClients = \"SELECT NAME, CLIENT_ID FROM CLIENTS\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectClients);\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n String client = rs.getString(\"NAME\");\n String clientId = rs.getString(\"CLIENT_ID\");\n Project p = new Project(client, clientId);\n clients.add(p);\n }\n rs.close();\n ps.close();\n return clients;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }",
"@Override\r\n\tpublic Collection<ProyectoDTO> getProyecto(ProyectoDTO proyectoFilter) {\n\t\treturn null;\r\n\t}",
"public void buscarDocentes() {\r\n try {\r\n List<DocenteProyecto> docenteProyectos = docenteProyectoService.buscar(new DocenteProyecto(\r\n sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE, null));\r\n if (docenteProyectos.isEmpty()) {\r\n return;\r\n }\r\n for (DocenteProyecto docenteProyecto : docenteProyectos) {\r\n DocenteProyectoDTO docenteProyectoDTO = new DocenteProyectoDTO(docenteProyecto, null,\r\n docenteCarreraService.buscarPorId(new DocenteCarrera(docenteProyecto.getDocenteCarreraId())));\r\n docenteProyectoDTO.setPersona(personaService.buscarPorId(new Persona(docenteProyectoDTO.getDocenteCarrera().getDocenteId().getId())));\r\n sessionProyecto.getDocentesProyectoDTO().add(docenteProyectoDTO);\r\n }\r\n sessionProyecto.setFilterDocentesProyectoDTO(sessionProyecto.getDocentesProyectoDTO());\r\n } catch (Exception e) {\r\n }\r\n }",
"public int getNUMCOPIAS() {\n return numcopias;\n }",
"public void contarEfectosPorGrupo()\n\t{\n\t\ttry\n\t\t{\n\t\t\tString strEstado = JOptionPane.showInputDialog( this, \"Introduzca el grupo\" );\n\t\t\tJOptionPane.showMessageDialog(this,\t\"La cantidad de efectos encontrados del grupo \"+strEstado+\" es \"+mundo.contarEfectosPorGrupo(strEstado), \"Contar efectos por grupo\",JOptionPane.INFORMATION_MESSAGE);\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(this, e.getMessage(), \"Contar efectos por grupo\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\n\t}",
"public AgregarClientes(Directorio directorio) {\n initComponents();\n this.directorio=directorio;\n \n \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 mostrarSocios()\n\t{\n\t\t//titulo libro, autor\n\t\tIterator<Socio> it=socios.iterator();\n\t\t\n\t\tSystem.out.println(\"***********SOCIOS***********\");\n\t\tSystem.out.printf(\"\\n%-40s%-40s\", \"NOMBRE\" , \"APELLIDO\");\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tSocio socio=(Socio)it.next();\n\t\t\tSystem.out.printf(\"\\n%-40s%-40s\\n\",socio.getNombre(),socio.getApellidos());\n\t\t}\n\t}",
"private ArrayList<String> getConectorQue(String infoDaPilha){\n\t\tArrayList<String> listaDeConectores = new ArrayList<String>();\n\t\t\n\t\tlistaDeConectores.add(\"que\");\n\t\t\n\t\treturn listaDeConectores;\n\t}",
"public List<RjEstadoConservacion> getAllRjEstadoConservacion()throws Exception{\n\t\tList<RjEstadoConservacion> lista=new LinkedList<RjEstadoConservacion>();\n\t\ttry{\n\t\t\tStringBuffer SQL=new StringBuffer(\"SELECT conservacion_id,descripcion FROM \").append(Constante.schemadb).append(\".rj_estado_conservacion order by descripcion asc\");\n\t\t\t\n\t\t\tPreparedStatement pst=connect().prepareStatement(SQL.toString());\n\t\t\tResultSet rs=pst.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tRjEstadoConservacion obj=new RjEstadoConservacion(); \n\t\t\t\tobj.setConservacionId(rs.getInt(\"conservacion_id\"));\n\t\t\t\tobj.setDescripcion(rs.getString(\"descripcion\"));\n\t\t\t\tlista.add(obj);\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tthrow(e);\n\t\t}\n\t\treturn lista;\n\t}",
"@Override\r\n\tpublic List<Famille> listCompetences() {\n\t\t\r\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n \t\tsession.beginTransaction();\r\n \t\t//on crée une requête\r\n \t\tQuery req=session.createQuery(\"select C from FamilleComp C\");\r\n \t\tList<Famille> famillecomp=req.list();\r\n session.getTransaction().commit();\r\n \t\treturn famillecomp;\r\n\t\t\r\n\t}",
"@Override\n\tpublic void cargarClienteSinCobrador() {\n\t\tpopup.showPopup();\n\t\tif(UIHomeSesion.usuario!=null){\n\t\tlista = new ArrayList<ClienteProxy>();\n\t\tFACTORY.initialize(EVENTBUS);\n\t\tContextGestionCobranza context = FACTORY.contextGestionCobranza();\n\t\tRequest<List<ClienteProxy>> request = context.listarClienteSinCobrador(UIHomeSesion.usuario.getIdUsuario()).with(\"beanUsuario\");\n\t\trequest.fire(new Receiver<List<ClienteProxy>>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<ClienteProxy> response) {\n\t\t\t\tlista.addAll(response);\t\t\t\t\n\t\t\t\tgrid.setData(lista);\t\t\t\t\n\t\t\t\tgrid.getSelectionModel().clear();\n\t\t\t\tpopup.hidePopup();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n public void onFailure(ServerFailure error) {\n popup.hidePopup();\n //Window.alert(error.getMessage());\n Notification not=new Notification(Notification.WARNING,error.getMessage());\n not.showPopup();\n }\n\t\t\t\n\t\t});\n\t\t}\n\t}",
"public Iterable<AristaDirigida> ciclo() {\n return ciclo;\n }",
"private String directores(Proyecto proyecto) {\r\n String resultado = \"\";\r\n Item estadoRenunciado = itemService.buscarPorCatalogoCodigo(CatalogoEnum.ESTADODIRECTOR.getTipo(), EstadoDirectorEnum.RENUNCIADO.getTipo());\r\n if (proyecto.getDirectorProyectoList() == null) {\r\n return \"\";\r\n }\r\n int contador = 0;\r\n for (DirectorProyecto directorProyecto : proyecto.getDirectorProyectoList()) {\r\n if (estadoRenunciado.getId().equals(directorProyecto.getEstadoDirectorId())) {\r\n continue;\r\n }\r\n DocenteCarrera docenteCarrera = docenteCarreraService.buscarPorId(new DocenteCarrera(directorProyecto.getDirectorId().getId()));\r\n Persona persona = personaService.buscarPorId(new Persona(docenteCarrera.getDocenteId().getId()));\r\n if (contador == 0) {\r\n resultado = (persona.getApellidos() + \" \" + persona.getNombres());\r\n } else {\r\n resultado = (resultado + \", \" + persona.getApellidos() + \" \" + persona.getNombres());\r\n }\r\n contador++;\r\n }\r\n return resultado;\r\n }",
"public String getUsuariosConectados() throws RemoteException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor(Object objeto : bbdd.getUsuariosConectados()){\n\t\t\tsb.append((String) objeto + \"\\n\");\n\t\t}\n\t\treturn sb.toString();\n\t\t\n\t}",
"@Override\r\n\tpublic List<ComunidadBean> getComunidadList() {\n\t\tList<ComunidadBean> result=new ArrayList<ComunidadBean>();\r\n\t\t\r\n\t\tList<JugComunidad> list= comunidadRepository.getComunidadList();\r\n\t\tfor (JugComunidad entiry : list) \r\n \t\tresult.add(new ComunidadBean(entiry.getId(), entiry.getCodigo(), entiry.getDescripcion()));\t\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"@SkipValidation\n\tpublic String agregarColaborador() {\n\t\talumnoProyectoBs.registrarAlumnoProyecto(idColaboradorSel, idProyecto);\n\t\tSesionController.put(\"action-messages\", \"Se agregó el colaborador exitosamente.\");\n\t\taddActionMessage(\"Se agregó el colaborador exitosamente.\");\n\t\treturn \"success\";\n\t}",
"public List<Cliente> getListCliente(){//METODO QUE RETORNA LSITA DE CLIENTES DO BANCO\r\n\t\treturn dao.procurarCliente(atributoPesquisaCli, filtroPesquisaCli);\r\n\t}",
"private void controladorPerfil(Controlador controlador){\n this.contUserDisplayCollective = controlador.getUserDisplayCollective();\n perfil.setControlCollective((ListSelectionListener)contUserDisplayCollective);\n inicioUser.setControlCollective((ListSelectionListener)contUserDisplayCollective);\n\n this.contUserDisplayProject = controlador.getUserDisplayProject();\n perfil.setControlProject((ListSelectionListener)contUserDisplayProject);\n inicioUser.setControlProject((ListSelectionListener)contUserDisplayProject);\n inicioAdmin.setControlProject((ListSelectionListener)contUserDisplayProject);\n \n }",
"private void controladorNuevoColectivo(Controlador controlador){\n this.contNuevoColectivo = controlador.getNuevoColectivo();\n nuevoColectivo.setControlCreateCollective(contNuevoColectivo);\n }",
"@Transactional(readOnly = true)\n public List<ProjectDTO> getProjectsAssignedToUser(String login) {\n User userByLogin = userRepository.findOneWithRolesByLogin(login).get();\n List<Project> projectsOfUser = new ArrayList<>();\n for (Role role : userByLogin.getRoles()) {\n // get all projects for admin\n if (AuthoritiesConstants.SYS_ADMIN.equals(role.getAuthority().getName())) {\n return projectMapper.projectsToProjectDTOs(projectRepository.findAll());\n }\n // get unique project from roles\n if (!projectsOfUser.contains(role.getProject())) {\n projectsOfUser.add(role.getProject());\n }\n }\n return projectMapper.projectsToProjectDTOs(projectsOfUser);\n }",
"public Collection<CompaniaDTO> findObtenerListaCompanias() throws ERPException{\r\n\t\treturn this.companiaGestor.obtenerListaCompanias();\r\n\t}",
"public void setListaDeJogosComprados(List<Jogo> listaDeJogosComprados) {\r\n\t\tthis.listaDeJogosComprados = listaDeJogosComprados;\r\n\t}",
"private ProcesoDTO registrarProcesoCoactivo() {\n RegistraProcesoDTO registra = new RegistraProcesoDTO();\n registra.setObservacion(EnumTipoProceso.COACTIVO.name());\n registra.setTipoProceso(EnumTipoProceso.COACTIVO);\n registra.setEstado(EnumEstadoProceso.ECUADOR_COACTIVO_RADICACION);\n registra.setConsecutivo(EnumConsecutivo.NUMERO_COACTIVO_ECUADOR);\n return iRFachadaProceso.crearProceso(registra);\n }",
"public List<Project> getAllProjects();",
"private void grabarProyectoCarrerasOferta() {\r\n try {\r\n if (!sessionProyecto.getEstadoActual().getCodigo().equalsIgnoreCase(EstadoProyectoEnum.INICIO.getTipo())) {\r\n return;\r\n }\r\n for (ProyectoCarreraOferta proyectoCarreraOferta : sessionProyecto.getCarrerasSeleccionadasTransfer()) {\r\n Carrera c = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n List<ProyectoCarreraOferta> proyectoCarreraOfertas = proyectoCarreraOfertaService.buscar(\r\n new ProyectoCarreraOferta(sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE));\r\n \r\n Long pcoId = devuelveProyectoCarreraId(proyectoCarreraOfertas, proyectoCarreraOferta);\r\n proyectoCarreraOferta = proyectoCarreraOfertaService.buscarPorId(new ProyectoCarreraOferta(pcoId));\r\n if (proyectoCarreraOferta == null) {\r\n proyectoCarreraOferta = new ProyectoCarreraOferta(sessionProyecto.getProyectoSeleccionado(), c.getId(), sessionProyecto.getOfertaAcademicaSeleccionada().getId(),\r\n Boolean.TRUE);\r\n if (contieneCarrera(proyectoCarreraOfertas, proyectoCarreraOferta) == false) {\r\n proyectoCarreraOfertaService.guardar(proyectoCarreraOferta);\r\n this.grabarIndividuoPCO(proyectoCarreraOferta);\r\n logDao.create(logDao.crearLog(\"ProyectoCarreraOferta\", proyectoCarreraOferta.getId() + \"\", \"CREAR\", \"Carrera=\"\r\n + proyectoCarreraOferta.getCarreraId() + \"|Oferta=\" + proyectoCarreraOferta.getOfertaAcademicaId() + \"|Proyecto= \"\r\n + proyectoCarreraOferta.getProyectoId().getId(), sessionUsuario.getUsuario()));\r\n }\r\n }\r\n proyectoCarreraOferta.setEsActivo(true);\r\n proyectoCarreraOfertaService.actualizar(proyectoCarreraOferta);\r\n logDao.create(logDao.crearLog(\"ProyectoCarreraOferta\", proyectoCarreraOferta.getId() + \"\", \"EDITAR\", \"Carrera=\"\r\n + proyectoCarreraOferta.getCarreraId() + \"|Oferta=\" + proyectoCarreraOferta.getOfertaAcademicaId()\r\n + \"|Proyecto= \" + proyectoCarreraOferta.getProyectoId().getId(), sessionUsuario.getUsuario()));\r\n }\r\n } catch (Exception e) {\r\n LOG.info(e.getMessage());\r\n }\r\n }",
"@Override\n public Collection<Curso> getAll() {\n Collection<Curso> retValue = new ArrayList();\n\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT c.idcurso, c.idprofesor, p.nombre as nombreprofesor,p.apellido as apellido, c.nombrecurso, c.claveprofesor,\\n\" +\n\" c.clavealumno from curso c, persona p\\n\" +\n\"where c.idprofesor = p.id\");\n \n\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n String nombre=\"\\\"\"+rs.getString(\"nombreprofesor\")+\" \"+rs.getString(\"apellido\")+\"\\\"\";\n retValue.add(new Curso(rs.getInt(\"idcurso\"), rs.getString(\"nombrecurso\"), rs.getInt(\"idprofesor\"), nombre,rs.getString(\"claveprofesor\"), rs.getString(\"clavealumno\")));\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n }",
"public void popoulaRepositorioUsuarios(){\n Usuario usuario1 = new Usuario();\n usuario1.setUsername(\"EliSilva\");\n usuario1.setEmail(\"[email protected]\");\n usuario1.setSenha(\"123\");\n usuario1.setNome(\"Elineide Silva\");\n usuario1.setCPF(\"12345678\");\n\n\n\n Usuario usuario2 = new Usuario();\n usuario2.setUsername(\"gustavo\");\n usuario2.setEmail(\"[email protected]\");\n usuario2.setSenha(\"12345\");\n usuario2.setNome(\"Gustavo\");\n usuario2.setCPF(\"666\");\n\n Usuario usuario3 = new Usuario();\n usuario1.setUsername(\"peixe\");\n usuario1.setEmail(\"[email protected]\");\n usuario1.setSenha(\"1111\");\n usuario1.setNome(\"quem dera ser um peixe\");\n usuario1.setCPF(\"1111\");\n\n Usuario usuario4 = new Usuario();\n usuario1.setUsername(\"segundo\");\n usuario1.setEmail(\"[email protected]\");\n usuario1.setSenha(\"123\");\n usuario1.setNome(\"Elineide Silva\");\n usuario1.setCPF(\"12345678\");\n\n inserir(usuario1);\n inserir(usuario2);\n inserir(usuario3);\n inserir(usuario4);\n }",
"List<Oficios> buscarActivas();",
"public List<User> collaborators(String owner, String repo) {\n return apiClient.deserializeAsList(apiClient.get(String.format(\"/repos/%s/%s/collaborators\", owner, repo)), User.class);\n }",
"private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }",
"public void caducarProyectosAntiguos() {\r\n\t\t\r\n\t\tDate hoy = new Date();\r\n\t\tDate fecha;\r\n\t\tlong days;\r\n\t\tfor(Proyecto p: proyectos) {\r\n\t\t\tfecha = p.getFechaUltimoApoyo();\r\n\t\t\tdays = ChronoUnit.DAYS.between(hoy.toInstant(),fecha.toInstant());\r\n\t\t\tif(days > 30) {\r\n\t\t\t\tp.caducarProyecto();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tprivate List<PromocionConcursoAgr> traerPromocionConcursoAgrAsignados() {\r\n\t\tList<PromocionConcursoAgr> lista = new ArrayList<PromocionConcursoAgr>();\r\n\t\tLong id = puestoAgr.getIdConcursoPuestoAgr();\r\n\t\tif (puestoAgr != null && puestoAgr.getIdConcursoPuestoAgr() != null) {\r\n\t\t\tString cadena = \"select distinct(puesto_det.*) \"\r\n\t\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t\t+ \"join seleccion.concurso_puesto_agr puesto_agr \"\r\n\t\t\t\t\t+ \"on puesto_agr.id_concurso_puesto_agr=puesto_det.id_concurso_puesto_agr \"\r\n\t\t\t\t\t+ \"join seleccion.promocion_salarial cargo \"\r\n\t\t\t\t\t+ \"on cargo.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t\t+ \"where puesto_det.nro_orden = 3 \"\r\n\t\t\t\t\t//+ \" and cargo.permanente is true\"\r\n\t\t\t\t\t;\r\n\r\n\t\t\tcadena = cadena + \" and puesto_agr.id_concurso_puesto_agr = \"\r\n\t\t\t\t\t+ puestoAgr.getIdConcursoPuestoAgr();\r\n\r\n\t\t\tlista = em.createNativeQuery(cadena, PromocionConcursoAgr.class)\r\n\t\t\t\t\t.getResultList();\r\n\t\t\tPromocionSalarialAgrupados = new ArrayList<ConcursoPuestoAgr>();\r\n\t\t\tfor (PromocionConcursoAgr o : lista) {\r\n\t\t\t\tPromocionSalarialAgrupados.add(o.getConcursoPuestoAgr());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn lista;\r\n\t}",
"private void dibujarCasillas() {\r\n for (int x = 0; x < 6; x++) {\r\n for (int y = 0; y < 6; y++) {\r\n panelTablero[x][y] = new CoordPanel();\r\n panelTablero[x][y].addMouseListener(this);\r\n panelTablero[x][y].setCoordenadas(x, y);\r\n pnlMain.add(panelTablero[x][y]);\r\n }\r\n }\r\n }",
"private static ArrayList<Compra> listComprasDoCliente(int idCliente) throws Exception {//Inicio mostraCompras\r\n ArrayList<Compra> lista = arqCompra.toList();\r\n lista.removeIf(c -> c.idCliente != idCliente);\r\n return lista;\r\n }",
"private void colocaComponentes() {\r\n\t\tJLabel lblId = new JLabel(\"Id\");\r\n\t\tlblId.setBounds(10, 11, 46, 14);\r\n\t\tadd(lblId);\r\n\t\t\r\n\t\tJLabel lblApellido = new JLabel(\"1er Apellido\");\r\n\t\tlblApellido.setBounds(168, 11, 131, 14);\r\n\t\tadd(lblApellido);\r\n\t\t\r\n\t\ttextId = new JTextField();\r\n\t\ttextId.setBounds(10, 36, 86, 20);\r\n\t\tadd(textId);\r\n\t\ttextId.setColumns(10);\r\n\t\t\r\n\t\ttextApellido = new JTextField();\r\n\t\ttextApellido.setBounds(168, 36, 118, 20);\r\n\t\tadd(textApellido);\r\n\t\ttextApellido.setColumns(10);\r\n\t\t\r\n\t\tbtnComprobar = new JButton(\"Comprobar\");\r\n\t\tbtnComprobar.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tconsultaDatos();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnComprobar.setBounds(10, 83, 362, 23);\r\n\t\tadd(btnComprobar);\r\n\t\t\r\n\t\ttextMensaje = new JTextField();\r\n\t\ttextMensaje.setEditable(false);\r\n\t\ttextMensaje.setBounds(10, 117, 362, 20);\r\n\t\tadd(textMensaje);\r\n\t\ttextMensaje.setColumns(10);\r\n\t\t\r\n\t\tbtnAtras = new JButton(\"Atras\");\r\n\t\tbtnAtras.setBounds(10, 254, 89, 23);\r\n\t\tadd(btnAtras);\r\n\t\tbtnAtras.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tcambiaPanelAnterior();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public ArrayList<CompraRelatorio> getComprasRelatorios(Usuario user){\r\n CriarConexao();\r\n ArrayList<CompraRelatorio> compras = new ArrayList<CompraRelatorio>();\r\n uDao = new UsuarioDao();\r\n \r\n try {\r\n resultado = consulta.executeQuery(\"SELECT * FROM comprarelatorio WHERE usuario_id = \"+user.getId());\r\n \r\n while(resultado.next()){\r\n compras.add(new CompraRelatorio(\r\n resultado.getInt(\"id\"), \r\n resultado.getDouble(\"valorCompra\"), \r\n resultado.getInt(\"parcelas\"), \r\n resultado.getInt(\"quantidade\"), \r\n resultado.getDate(\"dataCompraRelatorio\"), \r\n uDao.select(user.getId()))\r\n );\r\n }\r\n \r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(UsuarioDao.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n fecharConexao();\r\n }\r\n \r\n return compras;\r\n }",
"public Casilla[][] darCasillas(){\r\n\t\treturn casillas;\r\n\t}",
"public void consultarListaDeContatos() {\n\t\tfor (int i = 0; i < listaDeContatos.size(); i++) {\n\t\t\tSystem.out.printf(\"%d %s \\n\", i, listaDeContatos.get(i));\n\t\t}\n\t}",
"public CatalogoJogos() {\r\n\t\tthis.listaDeJogosComprados = new ArrayList<Jogo>();\r\n\t}",
"public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }",
"public List<Comentario> listaComentarioPorCodigo(Long codigo);",
"public static ArrayList<Course> getAllCorsiMateria() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.GET_ALL_COURSES;\n\t\t\tReceiveContent rp1 = sendReceive(rp);\n\t\t\tArrayList<Course> lista = (ArrayList<Course>) rp1.parameters[0];\n\t\t\tfor (Course m : lista) {\n\t\t\t\n\t\t\t}\n\t\t\treturn lista;\n\t\t} catch (Exception e) {\n\t\t\tLogger.WriteError(e, \"ClientConnection\", \"GET_ALL_COURSES\");\n\t\t}\n\t\treturn new ArrayList<Course>();\n\t}",
"public ArrayList getJuegosCasino() {\n\n String metodo = \"getJuegosCasino\";\n ArrayList lista = new ArrayList();\n Session session = null;\n Transaction tx = null;\n\n try {\n session = HibernateUtil.currentSession();\n tx = session.beginTransaction();\n\n lista = (ArrayList) session.createQuery(\"from Juegos\").list();\n\n session.flush();\n tx.commit();\n\n log.info(\"DAOJuegos: \" + metodo + \": Se obtienen \" + lista.size() + \" juegos\");\n\n } catch (org.hibernate.HibernateException he) {\n tx.rollback();\n log.error(\"DAOJuegos: \" + metodo + \": Error de Hibernate: \" + he.getMessage());\n } catch (SQLException sqle) {\n tx.rollback();\n log.error(\"DAOJuegos: \" + metodo + \": Error SQLException: \" + sqle.getMessage());\n } catch (Exception e) {\n tx.rollback();\n log.error(\"DAOJuegos: \" + metodo + \": Error Exception: \" + e.getMessage());\n } finally {\n // Liberamos sesión\n HibernateUtil.closeSession();\n log.info(\"DAOJuegos: \" + metodo + \": Sesion liberada. Finished\");\n }\n\n return lista;\n }",
"@Override\n public List<Caja> buscarMovimientos(){\n List<Caja> listaCaja= cajaRepository.findAll();\n\n return listaCaja;\n\n }",
"public Set<AdapterProcedimento> getProcedimentosCirurgicos() {\n\t\tSet<AdapterProcedimento> procedimentos = new HashSet<AdapterProcedimento>();\n\t\t\n\t\tfor(AdapterProcedimento adapter: getProcedimentos()){\n\t\t\tif(!adapter.getHonorarios().isEmpty()){\n\t\t\t\tprocedimentos.add(adapter);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn procedimentos;\n\t}",
"List<CopilotProject> getCopilotProjects(long copilotProfileId) throws CopilotDAOException;",
"public static String [] getModelosCaballerosProvicional() {\n\n\t\tSession session = SessionHibernate.getInstance().openSession();\n\t\tsession.beginTransaction();\n\t\t\n\t\tString str = \"FROM ModeloCaballero\";\n\t\tQuery query = session.createQuery(str);\n\t\tint i=0;\n\n\t\tString [] list =new String [query.list().size()];\n\t\t\n\t\tfor (Object obj : query.list()) {\n\t\t\tModeloCaballero ma = (ModeloCaballero) obj;\n\t\t\tlist[i++]=ma.getNombreModelo();\n\t\t\n\t\t\tSystem.err.println(ma.getId() + \"; \" + ma.getNombreModelo());\n\t\t}\n\t\tsession.getTransaction().commit();\n\t\tsession.close();\n\t\t\n\t\treturn list;\n\t}",
"public Casilla getCasillas()\r\n\t{\r\n\t\treturn casillas;\r\n\t}",
"private void mostrarCoches() {\n int i = 0;\n for (Coche unCoche : coches) {\n System.out.println((i + 1) + \"º \" + coches.get(i));\n ++i;\n }\n }",
"public List<Laboratorio> getLaboratorios() {\n if(this.intentoLab){\n this.lab=f.consultarLaboratorios();\n this.intentoLab=false;\n }\n return this.lab; \n }",
"public DefaultTableModel pedidosCocinero(){\r\n List<Pedido> lista =pedidos.listadosPedidosCocinero(GestionUsuarios.getInstance().getPersona());\r\n return Convertidor.pedidoToTableModel(lista); \r\n }",
"@Override\n\tpublic Iterable<Profesores> listaProfesores() {\n\t\treturn profesoresRepositorio.findAll();\n\t}",
"private void grabarIndividuoPCO(final ProyectoCarreraOferta proyectoCarreraOferta) {\r\n /**\r\n * PERIODO ACADEMICO ONTOLOGÍA\r\n */\r\n OfertaAcademica ofertaAcademica = ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId());\r\n PeriodoAcademico periodoAcademico = ofertaAcademica.getPeriodoAcademicoId();\r\n PeriodoAcademicoOntDTO periodoAcademicoOntDTO = new PeriodoAcademicoOntDTO(periodoAcademico.getId(), \"S/N\",\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaInicio(), \"yyyy-MM-dd\"),\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaFin(), \"yyyy-MM-dd\"));\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().write(periodoAcademicoOntDTO);\r\n /**\r\n * OFERTA ACADEMICA ONTOLOGÍA\r\n */\r\n OfertaAcademicaOntDTO ofertaAcademicaOntDTO = new OfertaAcademicaOntDTO(ofertaAcademica.getId(), ofertaAcademica.getNombre(),\r\n cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaInicio(),\r\n \"yyyy-MM-dd\"), cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaFin(), \"yyyy-MM-dd\"),\r\n periodoAcademicoOntDTO);\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().write(ofertaAcademicaOntDTO);\r\n\r\n /**\r\n * NIVEL ACADEMICO ONTOLOGIA\r\n */\r\n Carrera carrera = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n Nivel nivel = carrera.getNivelId();\r\n NivelAcademicoOntDTO nivelAcademicoOntDTO = new NivelAcademicoOntDTO(nivel.getId(), nivel.getNombre(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"nivel_academico\"));\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().write(nivelAcademicoOntDTO);\r\n /**\r\n * AREA ACADEMICA ONTOLOGIA\r\n */\r\n AreaAcademicaOntDTO areaAcademicaOntDTO = new AreaAcademicaOntDTO(carrera.getAreaId().getId(), \"UNIVERSIDAD NACIONAL DE LOJA\",\r\n carrera.getAreaId().getNombre(), carrera.getAreaId().getSigla(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"area_academica\"));\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().write(areaAcademicaOntDTO);\r\n /**\r\n * CARRERA ONTOLOGÍA\r\n */\r\n CarreraOntDTO carreraOntDTO = new CarreraOntDTO(carrera.getId(), carrera.getNombre(), carrera.getSigla(), nivelAcademicoOntDTO,\r\n areaAcademicaOntDTO);\r\n cabeceraController.getOntologyService().getCarreraOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getCarreraOntService().write(carreraOntDTO);\r\n /**\r\n * PROYECTO CARRERA OFERTA ONTOLOGY\r\n */\r\n \r\n ProyectoCarreraOfertaOntDTO proyectoCarreraOfertaOntDTO = new ProyectoCarreraOfertaOntDTO(proyectoCarreraOferta.getId(),\r\n ofertaAcademicaOntDTO, sessionProyecto.getProyectoOntDTO(), carreraOntDTO);\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().write(proyectoCarreraOfertaOntDTO);\r\n }",
"private void getCambiosCasas(){\n mCambiosCasas = estudioAdapter.getListaCambiosCasasSinEnviar();\n //ca.close();\n }",
"private void cargaComentarios() {\n\t\ttry{\n\t\t\t String Sjson= Utils.doHttpConnection(\"http://codigo.labplc.mx/~mikesaurio/taxi.php?act=pasajero&type=getcomentario&placa=\"+placa);\n\t\t JSONObject json= (JSONObject) new JSONTokener(Sjson).nextValue();\n\t\t JSONObject json2 = json.getJSONObject(\"message\");\n\t\t JSONObject jsonResponse = new JSONObject(json2.toString());\n\t\t JSONArray cast2 = jsonResponse.getJSONArray(\"calificacion\");\n\t\t\t ArrayList<ComentarioBean> arrayComenario= new ArrayList<ComentarioBean>();\n\t\t\t for (int i=0; i<cast2.length(); i++) {\n\t\t\t \tJSONObject oneObject = cast2.getJSONObject(i);\n\t\t\t\t\t\t try {\n\t\t\t\t\t\t\t ComentarioBean\t comentarioBean = new ComentarioBean();\n\t\t\t\t\t\t\t comentarioBean.setComentario((String) oneObject.getString(\"comentario\"));\n\t\t\t\t\t\t\t Float calif =Float.parseFloat((String) oneObject.getString(\"calificacion\"));\n\t\t\t\t\t\t\t comentarioBean.setCalificacion(calif);\n\t\t\t\t\t\t\t comentarioBean.setId_facebook((String) oneObject.getString(\"id_face\"));\n\t\t\t\t\t\t\t comentarioBean.setFecha_comentario((String) oneObject.getString(\"hora_fin\"));\n\t\t\t\t\t\t\t arrayComenario.add(comentarioBean);\n\t\t\t\t\t\t\t sumaCalificacion+=calif;\n\t\t\t\t\t\t } catch (JSONException e) { \n\t\t\t\t\t\t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t\t\t\t }\n\t\t\t }\n\t\t\t autoBean.setArrayComentarioBean(arrayComenario);\n\t\t\t if(cast2.length()>0){\n\t\t\t \t float califParcial = (sumaCalificacion/cast2.length());\n\t\t\t \t PUNTOS_USUARIO =usuarioCalifica(califParcial); //(int) (califParcial * 20 /5);\n\t\t\t \t autoBean.setCalificacion_usuarios(califParcial);\n\t\t\t }else{\n\t\t\t \t autoBean.setCalificacion_usuarios(0);\n\t\t\t }\n\t\t\t}catch(JSONException e){\n\t\t\t\tDatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t}\n\t}",
"public agregarProyectos() {\n initComponents();\n }",
"public static Consola getConsola()\n\t{\n\t\tif( ConsolaTeclado.consola == null )\n\t\t\tConsolaTeclado.consola = new ConsolaTeclado();\n\t\t\n\t\treturn ConsolaTeclado.consola;\n\t}",
"private void generaProcesoCoactivo(List<ObligacionCoactivoDTO> obligaciones, ConfiguracionCoactivoDTO configuracion)\n throws CirculemosNegocioException {\n\n if (obligaciones != null && !obligaciones.isEmpty() && configuracion != null) {\n\n // Crea proceso coactivo\n ProcesoDTO procesoDTO = registrarProcesoCoactivo();\n\n // Crea Participantes\n PersonaDTO persona = iRFachadaAdminNegocio\n .consultarPersona(obligaciones.get(0).getCoactivo().getPersona().getId());\n registrarParticipante(persona, procesoDTO);\n\n // Se crea el coactivo\n Coactivo coactivo = registrarCoactivo(obligaciones, procesoDTO, configuracion);\n\n // Se crean las obligaciones\n registrarObligaciones(obligaciones, coactivo, procesoDTO);\n\n // Actualizacion de estado a mandamiento de pago\n TrazabilidadProcesoDTO trazabilidadMandamiento = iRFachadaProceso\n .actualizarEstadoProceso(procesoDTO.getId(), EnumEstadoProceso.ECUADOR_COACTIVO_MANDAMIENTO, false);\n try {\n em.flush();\n\n boolean financiacionIncumplida = false;\n for (ObligacionCoactivoDTO obligacionCoactivoDTO : obligaciones) {\n financiacionIncumplida = validarProcesoFianciacionIncumplido(\n obligacionCoactivoDTO.getNumeroObligacion());\n if (financiacionIncumplida) {\n financiacionIncumplida = true;\n break;\n }\n }\n\n if (financiacionIncumplida) {\n // TODO genera auto de pago especial\n } else {\n // Genera documento apertura\n if (validarDireccionPersona(persona)) {\n registrarDocumentoCoactivo(EnumTipoDocumentoGenerado.AUTO_PAGO, trazabilidadMandamiento,\n coactivo, EnumTipoDocumentoProceso.COACTIVO_AUTO_PAGO, null);\n } else {\n registrarDocumentoCoactivo(EnumTipoDocumentoGenerado.AUTO_PAGO_SIN_DIRECCION,\n trazabilidadMandamiento, coactivo,\n EnumTipoDocumentoProceso.COACTIVO_AUTO_PAGO_SIN_DIRECCION, null);\n }\n }\n\n // Genera documento posesion\n registrarDocumentoCoactivo(EnumTipoDocumentoGenerado.ACTA_DE_POSESION, trazabilidadMandamiento,\n coactivo, EnumTipoDocumentoProceso.COACTIVO_ACTA_DE_POSESION, null);\n\n } catch (CirculemosAlertaException e) {\n logger.error(\"Error en generación de documentos de mandamiento de pago\", e);\n throw new CirculemosNegocioException(ErrorCoactivo.GenerarCoactivo.COAC_002001);\n }\n\n // Verifica si se debe generar los documentos con el siguiente parametro : 225 Generar documentos de notificacion\n generarNotificacion(procesoDTO, coactivo);\n\n // Generacion de oficio de solicitud de bienes\n generarSolicitudBien(configuracion, procesoDTO, coactivo);\n\n // Valida si debe registrar el coactivo en axis\n registrarCoactivoAxis(coactivo, persona);\n\n } else {\n throw new CirculemosNegocioException(ErrorCoactivo.GenerarCoactivo.COAC_002002);\n }\n }",
"@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Curso.findAll\", null);\n }"
] | [
"0.6487301",
"0.63942444",
"0.63503397",
"0.63151366",
"0.6211992",
"0.61434114",
"0.6106891",
"0.6099248",
"0.60510784",
"0.6043433",
"0.5960598",
"0.5892973",
"0.58901215",
"0.58877516",
"0.5822162",
"0.5819312",
"0.58063054",
"0.58061314",
"0.5782552",
"0.5778288",
"0.5758512",
"0.57392967",
"0.5734374",
"0.57340163",
"0.573269",
"0.5725269",
"0.5724865",
"0.5724632",
"0.5717534",
"0.5689441",
"0.5682026",
"0.5667152",
"0.5666197",
"0.5657126",
"0.5649896",
"0.56467247",
"0.56372386",
"0.56339455",
"0.56326854",
"0.56215346",
"0.562004",
"0.56159633",
"0.56112015",
"0.5601261",
"0.55908424",
"0.55800074",
"0.5579047",
"0.557463",
"0.5565732",
"0.55652523",
"0.5564793",
"0.5561446",
"0.55525935",
"0.5549742",
"0.55454624",
"0.5543149",
"0.5540228",
"0.5537703",
"0.5536577",
"0.55341315",
"0.5529846",
"0.55290836",
"0.5528846",
"0.5526564",
"0.55250317",
"0.5511579",
"0.55019164",
"0.5495558",
"0.54930854",
"0.54897106",
"0.54790586",
"0.5477923",
"0.5476621",
"0.54702836",
"0.546998",
"0.5462995",
"0.5458437",
"0.54549146",
"0.5451561",
"0.5446022",
"0.54431474",
"0.5442903",
"0.54307234",
"0.54306614",
"0.5428628",
"0.5420937",
"0.5414682",
"0.54089296",
"0.5406764",
"0.5403246",
"0.5399604",
"0.53988606",
"0.5395333",
"0.53875494",
"0.5379448",
"0.5379332",
"0.537445",
"0.53693765",
"0.5366903",
"0.5365815"
] | 0.7131787 | 0 |
Cambia la lista de colaboradores | public void setColaboradores(ArrayList<String> colaboradores) {
this.colaboradores = colaboradores;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<String> getColaboradores() {\n return colaboradores;\n }",
"private void pickListCarreras(Proyecto proyecto) {\r\n sessionProyecto.getCarrerasProyecto().clear();\r\n sessionProyecto.getFilterCarrerasProyecto().clear();\r\n List<Carrera> carrerasProyecto = new ArrayList<>();\r\n List<Carrera> usuarioCarreras = new ArrayList<>();\r\n try {\r\n List<ProyectoCarreraOferta> lips = proyectoCarreraOfertaService.buscar(new ProyectoCarreraOferta(proyecto, null, null, Boolean.TRUE));\r\n if (lips != null) {\r\n for (ProyectoCarreraOferta pco : lips) {\r\n Carrera c = carreraService.find(pco.getCarreraId());\r\n if (!carrerasProyecto.contains(c)) {\r\n carrerasProyecto.add(c);\r\n }\r\n }\r\n }\r\n for (Carrera carrera : sessionProyecto.getCarreras()) {\r\n if (!usuarioCarreras.contains(carrera)) {\r\n usuarioCarreras.add(carrera);\r\n }\r\n }\r\n sessionProyecto.setCarrerasDualList(new DualListModel<>(carreraService.diferenciaProyectoCarrera(\r\n usuarioCarreras, carrerasProyecto), carrerasProyecto));\r\n sessionProyecto.setCarrerasProyecto(carrerasProyecto);\r\n sessionProyecto.setFilterCarrerasProyecto(sessionProyecto.getCarrerasProyecto());\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n }",
"public void listadoCarreras() {\r\n try {\r\n this.sessionProyecto.getCarreras().clear();\r\n this.sessionProyecto.getFilterCarreras().clear();\r\n this.sessionProyecto.getCarreras().addAll(sessionUsuarioCarrera.getCarreras());\r\n this.sessionProyecto.setFilterCarreras(this.sessionProyecto.getCarreras());\r\n } catch (Exception e) {\r\n }\r\n }",
"private static void mostrarListaDeComandos() {\n System.out.println(\"Lista de comandos:\");\n for (int i = 0; i < comandos.length; i++){\n System.out.println(comandos[i]);\n }\n }",
"public void listOfCourses() {//admin cagirisa bulunna kurslarin hepsi\n if (Courses.size() != 0) {\n System.out.printf(\"%s kullanicisinin dersleri\\n\", this.getUsername());\n for (int i = 0; i < this.Courses.size(); ++i) {\n System.out.printf(\"%d-%s\\n\", i, Courses.get(i));\n }\n } else {\n System.out.printf(\"%s kullanicinin dersi yok\\n\", this.getUsername());\n }\n }",
"public void setListaDeJogosComprados(List<Jogo> listaDeJogosComprados) {\r\n\t\tthis.listaDeJogosComprados = listaDeJogosComprados;\r\n\t}",
"public List<Jogo> getListaDeJogosComprados() {\r\n\t\treturn listaDeJogosComprados;\r\n\t}",
"@Override\r\n\tpublic List<Famille> listCompetences() {\n\t\t\r\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n \t\tsession.beginTransaction();\r\n \t\t//on crée une requête\r\n \t\tQuery req=session.createQuery(\"select C from FamilleComp C\");\r\n \t\tList<Famille> famillecomp=req.list();\r\n session.getTransaction().commit();\r\n \t\treturn famillecomp;\r\n\t\t\r\n\t}",
"@Override\n\tpublic List<CiclosCarreras> listar() {\n\t\treturn repoCiclos.findAll();\n\t}",
"List<Curso> obtenerCursos();",
"private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }",
"private static ArrayList<Compra> listComprasDoCliente(int idCliente) throws Exception {//Inicio mostraCompras\r\n ArrayList<Compra> lista = arqCompra.toList();\r\n lista.removeIf(c -> c.idCliente != idCliente);\r\n return lista;\r\n }",
"private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }",
"public List<Companhia> getCompanhiasDoJogador() {\r\n return companhiasDoJogador;\r\n }",
"@Override\n\tpublic List<Ciclo> listarCiclos() {\n\t\treturn repository.findAll();\n\t}",
"public void consultarListaDeContatos() {\n\t\tfor (int i = 0; i < listaDeContatos.size(); i++) {\n\t\t\tSystem.out.printf(\"%d %s \\n\", i, listaDeContatos.get(i));\n\t\t}\n\t}",
"Object getCclist();",
"@Override\r\n\tpublic List<ComunidadBean> getComunidadList() {\n\t\tList<ComunidadBean> result=new ArrayList<ComunidadBean>();\r\n\t\t\r\n\t\tList<JugComunidad> list= comunidadRepository.getComunidadList();\r\n\t\tfor (JugComunidad entiry : list) \r\n \t\tresult.add(new ComunidadBean(entiry.getId(), entiry.getCodigo(), entiry.getDescripcion()));\t\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"public List<Carona> getCaronas() {\r\n\t\tList<Carona> retorno = new LinkedList<Carona>();\r\n\r\n\t\tfor (Usuario UsuarioTemp : listaDeUsuarios) {\r\n\t\t\tretorno.addAll(UsuarioTemp.getCaronas());\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}",
"@Override\n\tpublic List<Cozinha> listar() { /* Cria uma Lista para buscar elementos da tabela Cozinha no banco */\n\t\treturn manager.createQuery(\"from Cozinha\", Cozinha.class) /*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * Esta criando uma consulta com todo os elementos\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * que tem dentro de Cozinha\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t */\n\t\t\t\t.getResultList(); /* Está me retornando os Resultados da Lista Cozinha */\n\t}",
"public List<Cliente> getListCliente(){//METODO QUE RETORNA LSITA DE CLIENTES DO BANCO\r\n\t\treturn dao.procurarCliente(atributoPesquisaCli, filtroPesquisaCli);\r\n\t}",
"public static ArrayList<Course> ottieniCorsi() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.GET_COURSES;\n\t\t\tReceiveContent resP = sendReceive(rp);\n\t\t\tArrayList<Course> lista = (ArrayList<Course>) resP.parameters[0];\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Errore nell'ottenimento dei corsi\");\n\t\t}\n\t\treturn new ArrayList<Course>();\n\t}",
"public List<Compte> getComptesClient(int numeroClient);",
"public List<Carona> getTodasAsCaronas() {\r\n\t\tList<Carona> retorno = new LinkedList<Carona>();\r\n\r\n\t\tfor (Usuario usuario : listaDeUsuarios) {\r\n\t\t\tfor (Carona caronaTemp : usuario.getCaronas()) {\r\n\t\t\t\tretorno.add(caronaTemp);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}",
"void listarDadosNaTelaColaborador(ArrayList<Colaborador> lista,DefaultTableModel model ) {\n model.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[9];\n Colaborador aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = \"\"+aux.getMatricula();\n linha[2] = aux.getNome();\n linha[3] = \"\"+aux.getNumeroOAB();\n linha[4] = \"\"+aux.getCpf();\n linha[5] = aux.getEmail();\n linha[6] = \"\"+aux.getTelefone();\n linha[7] = aux.getTipo().toString();\n linha[8] = aux.getStatus().toString();\n model.addRow(linha);\n }\n }",
"private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }",
"private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }",
"public List<User> collaborators(String owner, String repo) {\n return apiClient.deserializeAsList(apiClient.get(String.format(\"/repos/%s/%s/collaborators\", owner, repo)), User.class);\n }",
"public List<Comentario> listaComentarioPorCodigo(Long codigo);",
"public synchronized void loadCollaborators() {\n Path collaboratorsPath = this.uri.getPath().resolve(\"collaborators.txt\");\n try {\n this.collaborators = Files.readAllLines(collaboratorsPath, StandardCharsets.UTF_8).stream()\n .map(c -> State.getInstance().getUserOrNull(c))\n .collect(Collectors.toSet());\n System.out.println(this.uri + \" can be accessed by \" + this.collaborators);\n for (User collaborator : collaborators) {\n collaborator.queueInvite(new Invite(this, collaborator));\n }\n } catch (NoSuchFileException e) {\n try {\n Files.createFile(collaboratorsPath);\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public List<FacConsecutivo> getListaConsecutivos() {\r\n return listaConsecutivos;\r\n }",
"List<Oficios> buscarActivas();",
"public List<Perfil> listaPerfilContacto(Perfil perfil) {\n\t\tList<Perfil> lista = perfilDAOImp.listaPerfilContacto(perfil);\n\t\treturn lista;\n\t}",
"public List<Cliente> mostrarClientes()\n\t{\n\t\tCliente p;\n\t\tif (! clientes.isEmpty())\n\t\t{\n\t\t\t\n\t\t\tSet<String> ll = clientes.keySet();\n\t\t\tList<String> li = new ArrayList<String>(ll);\n\t\t\tCollections.sort(li);\n\t\t\tListIterator<String> it = li.listIterator();\n\t\t\tList<Cliente> cc = new ArrayList<Cliente>();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tp = clientes.get(it.next());\n\t\t\t\tcc.add(p);\n\t\t\t\t\n\t\t\t}\n\t\t\t//Collections.sort(cc, new CompararCedulasClientes());\n\t\t\treturn cc;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"public void obtenerLista(){\n listaInformacion = new ArrayList<>();\n for (int i = 0; i < listaPersonales.size(); i++){\n listaInformacion.add(listaPersonales.get(i).getId() + \" - \" + listaPersonales.get(i).getNombre());\n }\n }",
"public void mostrarContactos() {\n\t\tfor (int i = 0; i < this.listaContactos.size(); i++) {\n\t\t\tSystem.out.println(this.listaContactos.get(i).mostrarDatos());\n\t\t}\n\t}",
"public Collection<CompaniaDTO> findObtenerListaCompanias() throws ERPException{\r\n\t\treturn this.companiaGestor.obtenerListaCompanias();\r\n\t}",
"@Override\n public void initializeListOfCompaniesWithoutParticipants() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"initializeListOfCompaniesWithoutParticipants\");\n }\n\n EntityManager em = EntityManagerService.provideEntityManager();\n companiesWithoutParticipants = new ArrayList<Institution>();\n List<ConnectathonParticipant> foundParticipantsPerCompany;\n TestingSession ts = TestingSession.getSelectedTestingSession();\n List<Institution> companiesParticipating = TestingSession.getListOfInstitutionsParticipatingInSession(ts);\n\n for (Institution inst : companiesParticipating) {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution\");\n query.setParameter(IN_TESTING_SESSION, ts);\n query.setParameter(IN_INSTITUTION, inst);\n foundParticipantsPerCompany = query.getResultList();\n\n if (foundParticipantsPerCompany.size() == 0) {\n companiesWithoutParticipants.add(inst);\n }\n }\n }",
"public static List<Company> createCompanies() {\r\n\t\tList<Company> companies = new ArrayList<Company>();\r\n\t\tcompanies.add(createCompany(1, \"Pepcus\", \"IT\", \"PEP\", new Date(), \"IT comp at Indore\", \"This is search help1\"));\r\n\t\tcompanies.add(createCompany(2, \"Google\", \"IT\", \"PEP\", new Date(), \"IT comp at Indore\", \"This is search help2\"));\r\n\t\tcompanies.add(createCompany(3, \"Facebook\", \"IT\", \"PEP\", new Date(), \"IT comp at Indore\", \"This is search help3\"));\r\n\t\tcompanies.add(createCompany(4, \"Suzuki\", \"IT\", \"PEP\", new Date(), \"IT comp at Indore\", \"This is search help4\"));\r\n\t\tcompanies.add(createCompany(5, \"General Motors\", \"IT\", \"PEP\", new Date(), \"IT comp at Indore\", \"This is search help5\"));\r\n\t\tcompanies.add(createCompany(6, \"L & T\", \"IT\", \"PEP\", new Date(), \"IT comp at Indore\", \"This is search help6\"));\r\n\t\tcompanies.add(createCompany(7, \"General Electric\", \"IT\", \"PEP\", new Date(), \"IT comp at Indore\", \"This is search help7\"));\r\n\t\tcompanies.add(createCompany(8, \"Oracle\", \"IT\", \"PEP\", new Date(), \"IT comp at Indore\", \"This is search help8\"));\r\n\t\tcompanies.add(createCompany(9, \"Microsoft\", \"IT\", \"PEP\", new Date(), \"IT comp at Indore\", \"This is search help9\"));\r\n\t\tcompanies.add(createCompany(10, \"Thinkhr\", \"IT\", \"PEP\", new Date(), \"IT comp at Indore\", \"This is search help10\"));\r\n\t\treturn companies;\r\n\r\n\t}",
"private void cargaComonentes() {\n\t\trepoInstituciones = new InstitucionesRepository(session);\n\t\trepoInstitucion_usuario = new Institucion_UsuariosRepository(session);\n\t\tList upgdsList = null;\n\t\tif(mainApp.getUsuarioApp().getPer_Usu_Id().equalsIgnoreCase(\"Alcaldia\")){\n\t\t\tupgdsList = repoInstituciones.listByMunicipio(mainApp.getUsuarioApp().getMun_Usu_Id());\n\t\t\tInstituciones instiL=new Instituciones();\n\t\t\tIterator iter = upgdsList.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tinstiL=(Instituciones) iter.next();\n\t\t\t\tinstitucionesList.add(instiL);\n\t\t\t}\n\t\t}else{\n\t\t\tInstitucion_Usuarios institucion_usuario = new Institucion_Usuarios();\n\t\t\tupgdsList = repoInstitucion_usuario.getListIpsByUsuario(mainApp.getUsuarioApp().getUsu_Id());\n\t\t\tIterator iter = upgdsList.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tinstitucion_usuario = (Institucion_Usuarios) iter.next();\n\t\t\t\tinstitucionesList.add(repoInstituciones.findById(institucion_usuario.getIps_Ipsu_Id()));\n\t\t\t}\n\t\t}\n\t\t\n\t\tinstitucionesBox.setItems(institucionesList);\n\t\tinstitucionesBox.setValue(mainApp.getInstitucionApp());\n\n\t\tinstitucionesBox.valueProperty().addListener(new ChangeListener<Instituciones>() {\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends Instituciones> observable, Instituciones oldValue,\n\t\t\t\t\tInstituciones newValue) {\n\t\t\t\tmainApp.setInstitucionApp(newValue);\n\t\t\t}\n\t\t});\n\t}",
"public Collection getListaCandidatos(int idEleicao){\n return this.eleicaoDB.getListaCandidatos(idEleicao);\n }",
"public List<CuentaContableDimensionContable> getListaCuentaContables()\r\n/* 329: */ {\r\n/* 330:391 */ List<CuentaContableDimensionContable> lista = new ArrayList();\r\n/* 331:392 */ for (CuentaContableDimensionContable cuentaContableDimensionContable : getDimensionContable().getListaCuentaContableDimensionContable()) {\r\n/* 332:393 */ if (!cuentaContableDimensionContable.isEliminado()) {\r\n/* 333:394 */ lista.add(cuentaContableDimensionContable);\r\n/* 334: */ }\r\n/* 335: */ }\r\n/* 336:396 */ return lista;\r\n/* 337: */ }",
"public ListaCliente() {\n\t\tClienteRepositorio repositorio = FabricaPersistencia.fabricarCliente();\n\t\tList<Cliente> clientes = null;\n\t\ttry {\n\t\t\tclientes = repositorio.getClientes();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tclientes = new ArrayList<Cliente>();\n\t\t}\n\t\tObject[][] grid = new Object[clientes.size()][3];\n\t\tfor (int ct = 0; ct < clientes.size(); ct++) {\n\t\t\tgrid[ct] = new Object[] {clientes.get(ct).getNome(),\n\t\t\t\t\tclientes.get(ct).getEmail()};\n\t\t}\n\t\tJTable table= new JTable(grid, new String[] {\"NOME\", \"EMAIL\"});\n\t\tJScrollPane scroll = new JScrollPane(table);\n\t\tgetContentPane().add(scroll, BorderLayout.CENTER);\n\t\tsetTitle(\"Clientes Cadastrados\");\n\t\tsetSize(600,400);\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\n\t\tsetLocationRelativeTo(null);\n\t}",
"public Collection<Proyecto> leerProyectosCollection() {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tProyecto[] proyecto = plantilla.getForObject(\"http://localhost:5000/proyectos\", Proyecto[].class);\n\t\t\tList<Proyecto> listaProyectos = Arrays.asList(proyecto);\n\t\t\treturn listaProyectos;\n\t\t}",
"private void listViewPendentes(List<Compra> listAll) {\n\t\t\n\t}",
"public Collection<OrdenCompra> traerTodasLasOrdenesDeCompra() {\n Collection<OrdenCompra> resultado = null;\n try {\n controlOC = new ControlOrdenCompra();\n bitacora.info(\"Registro OrdenCompra Iniciado correctamente\");\n resultado = controlOC.traerTodasLasOrdenesDeCompra();\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro OrdenCompra por \" + ex.getMessage());\n }\n return resultado;\n }",
"public static List<CoordinadorDTO> tolistCoordinador(List<CoordinadorEntity> coordinadorEntitys){\n \n List<CoordinadorDTO> listaObjectoCoordinador = new ArrayList<>();\n for (int i = 0; i <coordinadorEntitys.size(); i++) {\n listaObjectoCoordinador.add(new CoordinadorDTO(coordinadorEntitys.get(i)));\n }\n \n return listaObjectoCoordinador;\n }",
"@Override\n\tpublic ArrayList<TransferCompra> listaCompra() {\n\t\t\n\t\t//Creamos la Transaccion\n\t\tTransactionManager.getInstance().nuevaTransaccion();\n\t\tTransactionManager.getInstance().getTransaccion().start();\n\t\tArrayList<TransferCompra> lista = FactoriaDAO.getInstance().createDAOCompra().list();\n\t\t\n\t\t//Hacemos Commit\n\t\tTransactionManager.getInstance().getTransaccion().commit();\n\t\t\n\t\t//Finalmnete cerramos la Transaccion\n\t\tTransactionManager.getInstance().eliminaTransaccion();\n\t\treturn lista;\n\t}",
"public void listarCarros() {\n System.err.println(\"Carros: \\n\");\n if (carrosCadastrados.isEmpty()) {\n System.err.println(\"Nao existem carros cadastrados\");\n } else {\n System.err.println(Arrays.toString(carrosCadastrados.toArray()));\n }\n }",
"public List<StudentCOOP> getStudentCOOP() {\n List<StudentCOOP> studentco = new ArrayList<StudentCOOP>();\n openConnection();\n try {\n getAllStudent = conn.prepareStatement(\"select * from APP.STUDENTCOOP\");\n rs = getAllStudent.executeQuery();\n while (rs.next()) {\n studentco.add(\n new StudentCOOP(rs.getString(\"ZID\"), rs.getString(\"FIRSTNAME\"), rs.getString(\"LASTNAME\"),\n rs.getString(\"GENDER\"), rs.getString(\"ADDRESS\"), rs.getInt(\"CONTACT\"), rs.getString(\"EMAIL\"),\n rs.getString(\"WORKEMAIL\"), rs.getString(\"NOTES\"), rs.getString(\"SUBJECT\"), \n rs.getInt(\"SEMESTERCOMPLETED\"), rs.getDouble(\"MARK\"), rs.getDouble(\"WAM\"))\n );\n }\n rs.close();\n getAllStudent.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n closeConnection();\n return studentco;\n }",
"public static void main(String[] args) throws Exception {\n\t\tLista<Contato> vetor = new Lista<Contato>(20);\n\t\tLinkedList<Contato> listaEncadeada = new LinkedList<Contato>();\n\n\t\tContato c1 = new Contato(\"c1\", \"111-1111\", \"[email protected]\");\n\t\tContato c2 = new Contato(\"c2\", \"222-2222\", \"[email protected]\");\n\t\tContato c3 = new Contato(\"c3\", \"333-3333\", \"[email protected]\");\n\t\tContato c4 = new Contato(\"c4\", \"444-2344\", \"[email protected]\");\n\t\tContato c5 = new Contato(\"c5\", \"555-5585\", \"[email protected]\");\n\t\tContato c6 = new Contato(\"c6\", \"111-1911\", \"[email protected]\");\n\t\tContato c7 = new Contato(\"c7\", \"222-2322\", \"[email protected]\");\n\t\tContato c8 = new Contato(\"c8\", \"333-3333\", \"[email protected]\");\n\t\tContato c9 = new Contato(\"c9\", \"454-4644\", \"[email protected]\");\n\t\tContato c10 = new Contato(\"c10\", \"515-5235\", \"[email protected]\");\n\t\tContato c11 = new Contato(\"c11\", \"131-1411\", \"[email protected]\");\n\t\tContato c12 = new Contato(\"c12\", \"252-2672\", \"[email protected]\");\n\t\tContato c13 = new Contato(\"c13\", \"313-3433\", \"[email protected]\");\n\t\tContato c14 = new Contato(\"c14\", \"433-4334\", \"[email protected]\");\n\t\tContato c15 = new Contato(\"c15\", \"535-5355\", \"[email protected]\");\n\t\tContato c16 = new Contato(\"c16\", \"161-1516\", \"[email protected]\");\n\t\tContato c17 = new Contato(\"c17\", \"272-2272\", \"[email protected]\");\n\t\tContato c18 = new Contato(\"c18\", \"383-3993\", \"[email protected]\");\n\t\tContato c19 = new Contato(\"c19\", \"141-4949\", \"[email protected]\");\n\t\tContato c20 = new Contato(\"c20\", \"565-5565\", \"[email protected]\");\n\t\tContato c21 = new Contato(\"c21\", \"616-1611\", \"[email protected]\");\n\t\tContato c22 = new Contato(\"c22\", \"212-2121\", \"[email protected]\");\n\t\tContato c23 = new Contato(\"c23\", \"131-1331\", \"[email protected]\");\n\t\tContato c24 = new Contato(\"c24\", \"424-4444\", \"[email protected]\");\n\t\tContato c25 = new Contato(\"c25\", \"565-5555\", \"[email protected]\");\n\t\tContato c26 = new Contato(\"c26\", \"111-1611\", \"[email protected]\");\n\t\tContato c27 = new Contato(\"c27\", \"282-1252\", \"[email protected]\");\n\t\tContato c28 = new Contato(\"c28\", \"323-3433\", \"[email protected]\");\n\t\tContato c29 = new Contato(\"c29\", \"544-4464\", \"[email protected]\");\n\t\tContato c30 = new Contato(\"c30\", \"155-5455\", \"[email protected]\");\n\n\t\ttry {\n\t\t\t// ex5\n\t\t\tvetor.adiciona(c1);\n\t\t\tvetor.adiciona(c2);\n\t\t\tvetor.adiciona(c3);\n\t\t\tvetor.adiciona(c4);\n\t\t\tvetor.adiciona(c5);\n\t\t\tvetor.adiciona(c6);\n\t\t\tvetor.adiciona(c7);\n\t\t\tvetor.adiciona(c8);\n\t\t\tvetor.adiciona(c9);\n\t\t\tvetor.adiciona(c10);\n\t\t\tvetor.adiciona(c11);\n\t\t\tvetor.adiciona(c12);\n\t\t\tvetor.adiciona(c13);\n\t\t\tvetor.adiciona(c14);\n\t\t\tvetor.adiciona(c15);\n\t\t\tvetor.adiciona(c16);\n\t\t\tvetor.adiciona(c17);\n\t\t\tvetor.adiciona(c18);\n\t\t\tvetor.adiciona(c19);\n\t\t\tvetor.adiciona(c20);\n\t\t\tvetor.adiciona(c21);\n\t\t\tvetor.adiciona(c22);\n\t\t\tvetor.adiciona(c23);\n\t\t\tvetor.adiciona(c24);\n\t\t\tvetor.adiciona(c25);\n\t\t\tvetor.adiciona(c26);\n\t\t\tvetor.adiciona(c27);\n\t\t\tvetor.adiciona(c28);\n\t\t\tvetor.adiciona(c29);\n\t\t\tvetor.adiciona(c30);\n\t\t\t// ex3\n\t\t\tvetor.removerT(\"111-1111\");\n\t\t\t//ex4-vetor.RemoverTudo();\n\t\t\t\n\t\t\tSystem.out.println(vetor);\n\t\t\t// ex1\n\t\t\tSystem.out.println(\"Confirmar se o elemento na lista existe:\" + vetor.contem(c2));\n\t\t\t// ex2\n\t\t\tSystem.out.println(\"Retornar a posicao do elemento, se retornar -1 que dizer que o elemento não existe:\"\n\t\t\t\t\t+ vetor.indicio(c2));\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// ex6\n\t\tlistaEncadeada.add(c1);\n\t\tlistaEncadeada.add(c2);\n\t\tlistaEncadeada.add(c3);\n\t\tlistaEncadeada.add(c4);\n\t\tlistaEncadeada.add(c5);\n\t\tlistaEncadeada.add(c6);\n\t\tlistaEncadeada.add(c7);\n\t\tlistaEncadeada.add(c8);\n\t\tlistaEncadeada.add(c9);\n\t\tlistaEncadeada.add(c10);\n\t\tlistaEncadeada.add(c11);\n\t\tlistaEncadeada.add(c12);\n\t\tlistaEncadeada.add(c13);\n\t\tlistaEncadeada.add(c14);\n\t\tlistaEncadeada.add(c15);\n\t\tlistaEncadeada.add(c16);\n\t\tlistaEncadeada.add(c17);\n\t\tlistaEncadeada.add(c18);\n\t\tlistaEncadeada.add(c19);\n\t\tlistaEncadeada.add(c20);\n\t\tlistaEncadeada.add(c21);\n\t\tlistaEncadeada.add(c22);\n\t\tlistaEncadeada.add(c23);\n\t\tlistaEncadeada.add(c24);\n\t\tlistaEncadeada.add(c25);\n\t\tlistaEncadeada.add(c26);\n\t\tlistaEncadeada.add(c27);\n\t\tlistaEncadeada.add(c28);\n\t\tlistaEncadeada.add(c29);\n\t\tlistaEncadeada.add(c30);\n\n\t\tSystem.out.println(listaEncadeada);\n\n\t}",
"@Override\n\tpublic List<CursoAsignatura> listar() {\n\t\treturn null;\n\t}",
"public ArrayList<DataCliente> listarClientes();",
"public TelaListaCliente(ListadePessoas list) {\n initComponents();\n cli = new ArrayList<>();\n \n for(Cliente c: list.getClientes()){\n cli.add(c);\n }\n \n DefaultTableModel dtm = (DefaultTableModel) jclient.getModel();\n for(Cliente c: cli){ \n Object[] dados = {c.getNome(),c.getCpf(),c.getEndereco(),c.getTelefone()};\n dtm.addRow(dados);\n }\n }",
"@Override\n\tpublic void cargarClienteSinCobrador() {\n\t\tpopup.showPopup();\n\t\tif(UIHomeSesion.usuario!=null){\n\t\tlista = new ArrayList<ClienteProxy>();\n\t\tFACTORY.initialize(EVENTBUS);\n\t\tContextGestionCobranza context = FACTORY.contextGestionCobranza();\n\t\tRequest<List<ClienteProxy>> request = context.listarClienteSinCobrador(UIHomeSesion.usuario.getIdUsuario()).with(\"beanUsuario\");\n\t\trequest.fire(new Receiver<List<ClienteProxy>>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<ClienteProxy> response) {\n\t\t\t\tlista.addAll(response);\t\t\t\t\n\t\t\t\tgrid.setData(lista);\t\t\t\t\n\t\t\t\tgrid.getSelectionModel().clear();\n\t\t\t\tpopup.hidePopup();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n public void onFailure(ServerFailure error) {\n popup.hidePopup();\n //Window.alert(error.getMessage());\n Notification not=new Notification(Notification.WARNING,error.getMessage());\n not.showPopup();\n }\n\t\t\t\n\t\t});\n\t\t}\n\t}",
"private void listaClient() {\n\t\t\r\n\t\tthis.listaClient.add(cliente);\r\n\t}",
"private void list() throws JSONException, InterruptedException {\r\n\t /**Database Manager Object used to access mlab.com*/\r\n db.setDataBaseDestination(cDatabase, null, true);\r\n db.accessDatabase();\r\n MongoCollection<Document> col = db.getEntireDatabaseResults();\r\n \r\n // iterator to go through clubs in database\r\n Iterable<Document> iter;\r\n iter = col.find();\r\n \r\n // ArrayList of clubs names \r\n ArrayList<String> clubs = new ArrayList<>();\r\n \r\n // add names to list\r\n for (Document doc : iter) {\r\n JSONObject profile = new JSONObject(doc);\r\n clubs.add(profile.get(cName).toString());\r\n }\r\n \r\n Collections.sort(clubs);\r\n \r\n for (String name : clubs)\r\n \t logger.log(Level.INFO, name);\r\n \r\n displayOpen();\r\n }",
"@Override\n\tpublic List<Componentes> Listar() throws Exception {\n\t\treturn null;\n\t}",
"public ArrayList<ComentarioComp> listaComentarioNoRespondido() {\n ArrayList<ComentarioComp> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select co.nombre, c.nombreUsuario, c.descripcion, c.fecha, c.valoracion\\n\" +\n\"from Comentarios c join Comercios co on c.id_comercio = co.id_comercio\\n\" +\n\"where id_comentario not in (select id_comentario from Respuestas r )\");\n\n while (rs.next()) {\n String nombreC = rs.getString(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n String fecha = rs.getString(4);\n int valoracion = rs.getInt(5);\n\n ComentarioComp c = new ComentarioComp(nombreC, nombre, descripcion, fecha, valoracion);\n\n lista.add(c);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }",
"@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Curso.findAll\", null);\n }",
"@Override\n\tpublic List<Proyecto> listarProyectos() {\n\t\treturn proyectoRepo.findAll();\n\t}",
"List<String> getAuthorsList() {\r\n\t\tList<String> authorList = new ArrayList<String>() ;\r\n\t\t\r\n\t\t// Populate the list of authors\r\n\t\tfor(Collaborator c: collaborators) {\r\n\t\t\tauthorList.add(c.getAuthorName()) ;\r\n\t\t}\r\n\t\treturn authorList ;\r\n\t}",
"public static ArrayList<Persona> obtenerUsuariosCiudad(DatosDTO datos) throws SQLException {\n\n\t\tConnection conexion = Conexion.getConexion();\n ArrayList<Persona> listaPersonas = new ArrayList<>();\n st = conexion.createStatement();\n String query = \"SELECT * FROM personas Where id_ciudad=\" + datos.getNombreCiudad();\n ResultSet rs = st.executeQuery(query);\n\n\n while (rs.next()) {\n int id = rs.getInt(1); \n int id_ciudad = rs.getInt(2); \n String nombre = rs.getString(3); \n String tipo = rs.getString(4); \n boolean infectado = rs.getBoolean(5); \n\n Persona persona = new Persona(id, id_ciudad, nombre, tipo, infectado);\n listaPersonas.add(persona);\n\n }\n rs.close();\n return listaPersonas;\n \n }",
"public LinkedList<clsCarro> listarCarros(){\n return modeloCarro.listarCarros();\n }",
"public List<ParCuentasGenerales> listaCuentasGeneralesPorAsignar() {\n return parParametricasService.listaCuentasGenerales();\n }",
"public ArrayList<CandidatoBean> listarCandidatos() {\r\n\r\n Query query = em.createNamedQuery(\"Candidato.findAll\");\r\n ArrayList<CandidatoBean> listCandidatos = new ArrayList<>();\r\n\r\n for (Candidato candidato : (List<Candidato>) query.getResultList()) {\r\n listCandidatos.add(modelMapper.map(candidato, CandidatoBean.class));\r\n }\r\n em.close();\r\n em = null;\r\n return listCandidatos;\r\n }",
"public List<Laboratorio> getLaboratorios() {\n if(this.intentoLab){\n this.lab=f.consultarLaboratorios();\n this.intentoLab=false;\n }\n return this.lab; \n }",
"@Override\n\tpublic ArrayList<ClienteFisico> listar(String complemento)\n\t\t\tthrows SQLException {\n\t\treturn null;\n\t}",
"public List<Propriedade> getListaDePropriedadesComMonopolio(){\r\n List<Propriedade> proComMonopolio = new ArrayList<>();\r\n for(Propriedade pro: this.propriedadesDoJogador){\r\n for(String cor: this.monopolioNoGrupoDeCor){\r\n if(pro.getCor().equals(cor)){\r\n proComMonopolio.add(pro);\r\n break;\r\n }\r\n }\r\n }\r\n \r\n return proComMonopolio;\r\n }",
"public ArrayList< UsuarioVO> listaDePersonas() {\r\n\t ArrayList< UsuarioVO> miUsuario = new ArrayList< UsuarioVO>();\r\n\t Conexion conex= new Conexion();\r\n\t \r\n\t try {\r\n\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM usuarios\");\r\n\t ResultSet res = consulta.executeQuery();\r\n\t while(res.next()){\r\n\t\t UsuarioVO persona= new UsuarioVO();\r\n\t persona.setCedula_usuario(Integer.parseInt(res.getString(\"cedula_usuario\")));\r\n\t persona.setEmail_usuario(res.getString(\"email_usuario\"));\r\n\t persona.setNombre_usuario(res.getString(\"nombre_usuario\"));\r\n\t persona.setPassword(res.getString(\"password\"));\r\n\t persona.setUsuario(res.getString(\"usuario\"));\r\n\t \r\n\t \r\n\t miUsuario.add(persona);\r\n\t }\r\n\t res.close();\r\n\t consulta.close();\r\n\t conex.desconectar();\r\n\t \r\n\t } catch (Exception e) {\r\n\t JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\r\n\t }\r\n\t return miUsuario;\r\n\t }",
"public static List<Comentario> listar()\n {\n Session sessionRecheio;\n sessionRecheio = HibernateUtil.getSession();\n Transaction tr = sessionRecheio.beginTransaction();\n String hql = \"from Comentario u\";\n List<Comentario> lista = (List)sessionRecheio.createQuery(hql).list();\n tr.commit();\n return lista;\n }",
"public void getAllCursos() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT * FROM curso;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n int familia = rs.getInt(\"id_familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n System.out.format(\"%d,%s,%d,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"Collection getCommunities();",
"public void getAllCursosAvanzado() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT id_curso, nombre_curso, familia.nombre_familia as familia, id_profesor FROM curso \"\n + \"INNER JOIN familia ON curso.id_familia = familia.id_familia;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n \n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n String familia = rs.getString(\"familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n \n System.out.format(\"%d,%s,%s,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"public void buscarComprobantesEntreFechas(){\n listaComprobantes = this.getEjbFacadeComprobantes().buscarEntreFechasConEstadoSinRendicionExterna(desde,hasta);\n \n System.out.println(\"listaComprobantes cantidad >> \" + listaComprobantes.size());\n }",
"List<ParqueaderoEntidad> listar();",
"public void verificarDatosConsola(Cliente cliente, List<Cuenta> listaCuentas) {\n\n int codigoCliente = cliente.getCodigo();\n\n System.out.println(\"Codigo: \"+cliente.getCodigo());\n System.out.println(\"Nombre: \"+cliente.getNombre());\n System.out.println(\"DPI: \"+cliente.getDPI());\n System.out.println(\"Direccion: \"+cliente.getDireccion());\n System.out.println(\"Sexo: \"+cliente.getSexo());\n System.out.println(\"Password: \"+cliente.getPassword());\n System.out.println(\"Tipo de Usuario: \"+ 3);\n\n System.out.println(\"Nacimiento: \"+cliente.getNacimiento());\n System.out.println(\"ArchivoDPI: \"+cliente.getDPIEscaneado());\n System.out.println(\"Estado: \"+cliente.isEstado());\n \n \n for (Cuenta cuenta : listaCuentas) {\n System.out.println(\"CUENTAS DEL CLIENTE\");\n System.out.println(\"Numero de Cuenta: \"+cuenta.getNoCuenta());\n System.out.println(\"Fecha de Creacion: \"+cuenta.getFechaCreacion());\n System.out.println(\"Saldo: \"+cuenta.getSaldo());\n System.out.println(\"Codigo del Dueño: \"+codigoCliente);\n \n }\n \n\n\n }",
"public ArrayList getJuegosCasino() {\n\n String metodo = \"getJuegosCasino\";\n ArrayList lista = new ArrayList();\n Session session = null;\n Transaction tx = null;\n\n try {\n session = HibernateUtil.currentSession();\n tx = session.beginTransaction();\n\n lista = (ArrayList) session.createQuery(\"from Juegos\").list();\n\n session.flush();\n tx.commit();\n\n log.info(\"DAOJuegos: \" + metodo + \": Se obtienen \" + lista.size() + \" juegos\");\n\n } catch (org.hibernate.HibernateException he) {\n tx.rollback();\n log.error(\"DAOJuegos: \" + metodo + \": Error de Hibernate: \" + he.getMessage());\n } catch (SQLException sqle) {\n tx.rollback();\n log.error(\"DAOJuegos: \" + metodo + \": Error SQLException: \" + sqle.getMessage());\n } catch (Exception e) {\n tx.rollback();\n log.error(\"DAOJuegos: \" + metodo + \": Error Exception: \" + e.getMessage());\n } finally {\n // Liberamos sesión\n HibernateUtil.closeSession();\n log.info(\"DAOJuegos: \" + metodo + \": Sesion liberada. Finished\");\n }\n\n return lista;\n }",
"public ArrayList<String> Info_Disc_Pel_Compras_usu(String genero, String usuario) {\r\n ArrayList<String> Lista_nombre = Info_Disco_Pel_Rep1(genero);\r\n ArrayList<String> Lista_datos_compras = new ArrayList();\r\n String line;\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/Compra_Peliculas.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco_compra = line.split(\";\");\r\n for (int s = 0; s < Lista_nombre.size(); s++) {\r\n if (Lista_nombre.get(s).equals(info_disco_compra[3]) & info_disco_compra[0].equals(usuario)) {\r\n Lista_datos_compras.add(info_disco_compra[3]);\r\n Lista_datos_compras.add(info_disco_compra[5]);\r\n }\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_compras;\r\n }",
"private void getCodigosCasas(){\n mCodigosCasas = estudioAdapter.getListaCodigosCasasSinEnviar();\n //ca.close();\n }",
"List<Persona> obtenerTodasLasPersona();",
"private ArrayList<String> getConectorQue(String infoDaPilha){\n\t\tArrayList<String> listaDeConectores = new ArrayList<String>();\n\t\t\n\t\tlistaDeConectores.add(\"que\");\n\t\t\n\t\treturn listaDeConectores;\n\t}",
"public static ArrayList<Course> getAllCorsiMateria() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.GET_ALL_COURSES;\n\t\t\tReceiveContent rp1 = sendReceive(rp);\n\t\t\tArrayList<Course> lista = (ArrayList<Course>) rp1.parameters[0];\n\t\t\tfor (Course m : lista) {\n\t\t\t\n\t\t\t}\n\t\t\treturn lista;\n\t\t} catch (Exception e) {\n\t\t\tLogger.WriteError(e, \"ClientConnection\", \"GET_ALL_COURSES\");\n\t\t}\n\t\treturn new ArrayList<Course>();\n\t}",
"public JList getJListCamaras() {\r\n\t\t\r\n\t\tcamaras = xmlParser.getCamaras(fileXmlCamaras);\r\n\t//\tString data[] = new String[camaras.size()];\r\n\t\tIterator iterator = camaras.iterator();\r\n\t\tString cam = null;\r\n\t\tString user = null;\r\n\t\tString domain = null;\r\n\t\tint sipCon = 0;\r\n\t\tDefaultListModel model = new DefaultListModel();\r\n\t\tListItem li = null;\r\n\t\t\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tcam = (String)iterator.next();\r\n\t\t\tuser = cam.substring(0, cam.indexOf('@'));\r\n\t\t\tdomain = cam.substring(cam.indexOf('@') + 1);\r\n\t\t \r\n\t\t\ttry {\r\n\t\t\t\t sipCon = getSipManager().createMessageSipConexion(user,domain);\r\n\t\t\t} catch (ExcGeneric e) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tgetSipManager().sendMessageRequest(sipCon);\r\n\t\t\t\tli = new ListItem(Color.white, cam);\r\n\t\t\t\tli.setIcon(new ImageIcon(getClass().getResource(\"img\" + File.separator + \"connected.gif\")));\r\n \r\n\t\t \t\t\t\r\n\t\t\t} catch (ExcGeneric e) {\r\n\t\t\t\tli = new ListItem(Color.LIGHT_GRAY, cam);\r\n\t\t\t\tli.setIcon(new ImageIcon(getClass().getResource(\"img\" + File.separator + \"delete.gif\")));\r\n\t\t }\r\n\t\t\tmodel.addElement(li);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (jListCamaras == null) {\r\n\t\t\tjListCamaras = new JList(model);\r\n\t\t\tjListCamaras.setCellRenderer(new MyCellRenderer());\r\n\t\t\tjListCamaras.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));\r\n\t\t\tjListCamaras.addMouseListener(this);\r\n\t\t\r\n\t\t}else{\r\n\t\t\tjListCamaras.clearSelection();\r\n\t\t jListCamaras.setModel(model);\r\n\t\t\tjListCamaras.setEnabled(true);\r\n\t\t\tjListCamaras.repaint();\r\n\t\t}\r\n\t\treturn jListCamaras;\r\n\t}",
"public ArrayList<Cliente> listaDeClientes() {\n\t\t\t ArrayList<Cliente> misClientes = new ArrayList<Cliente>();\n\t\t\t Conexion conex= new Conexion();\n\t\t\t \n\t\t\t try {\n\t\t\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM clientes\");\n\t\t\t ResultSet res = consulta.executeQuery();\n\t\t\t while(res.next()){\n\t\t\t \n\t\t\t int cedula_cliente = Integer.parseInt(res.getString(\"cedula_cliente\"));\n\t\t\t String nombre= res.getString(\"nombre_cliente\");\n\t\t\t String direccion = res.getString(\"direccion_cliente\");\n\t\t\t String email = res.getString(\"email_cliente\");\n\t\t\t String telefono = res.getString(\"telefono_cliente\");\n\t\t\t Cliente persona= new Cliente(cedula_cliente, nombre, direccion, email, telefono);\n\t\t\t misClientes.add(persona);\n\t\t\t }\n\t\t\t res.close();\n\t\t\t consulta.close();\n\t\t\t conex.desconectar();\n\t\t\t \n\t\t\t } catch (Exception e) {\n\t\t\t //JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\n\t\t\t\t System.out.println(\"No se pudo consultar la persona\\n\"+e);\t\n\t\t\t }\n\t\t\t return misClientes; \n\t\t\t }",
"public List<Persona> todasLasPersonas(){\n\n Iterable<Persona> ite=repo.findAll();\n Iterator<Persona> it=ite.iterator();\n List<Persona> actualList = new ArrayList<Persona>();\n while (it.hasNext()) {\n actualList.add(it.next());\n }\n\n return actualList;\n }",
"public void llenadoDeCombos() {\n PerfilDAO asignaciondao = new PerfilDAO();\n List<Perfil> asignacion = asignaciondao.listar();\n cbox_perfiles.addItem(\"\");\n for (int i = 0; i < asignacion.size(); i++) {\n cbox_perfiles.addItem(Integer.toString(asignacion.get(i).getPk_id_perfil()));\n }\n \n }",
"public void setList() \n\t\t{\n\t\t\tVector<Course> items = client.ProfessorCourseList(prof.getID());\n\t\t\tmodel.removeAllElements();\n\t\t\tif(items == null)return;\n\t\t\tString s;\n\t\t\tfor(int i = 0; i < items.size(); i++)\n\t\t\t{\n\t\t\t\ts = items.get(i).getName();\n\t\t\t\tmodel.addElement(items.get(i));\n\t\t\t}\n\t\t}",
"public List<Cliente> consultarClientes();",
"public void listar(){\n if (!esVacia()) {\n // Crea una copia de la lista.\n NodoEmpleado aux = inicio;\n // Posicion de los elementos de la lista.\n int i = 0;\n System.out.print(\"-> \");\n // Recorre la lista hasta llegar nuevamente al incio de la lista.\n do{\n // Imprime en pantalla el valor del nodo.\n System.out.print(i + \".[ \" + aux.getEmpleado() + \" ]\" + \" -> \");\n // Avanza al siguiente nodo.\n aux = aux.getSiguiente();\n // Incrementa el contador de la posi�n.\n i++;\n }while(aux != inicio);\n }\n }",
"public ArrayList<Cliente> listarClientes(){\n ArrayList<Cliente> ls = new ArrayList<Cliente>();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, idioma, categoria FROM clientes\";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n //para marca un punto de referencia en la transacción para hacer un ROLLBACK parcial.\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n Cliente cl = new Cliente();\n cl.setCodigo(rs.getInt(\"codigo\"));\n cl.setNit(rs.getString(\"nit\"));\n cl.setRazonSocial(rs.getString(\"razonsocial\"));\n cl.setCategoria(rs.getString(\"categoria\"));\n cl.setEmail(rs.getString(\"email\"));\n Calendar cal = new GregorianCalendar();\n cal.setTime(rs.getDate(\"fecharegistro\")); \n cl.setFechaRegistro(cal.getTime());\n cl.setIdioma(rs.getString(\"idioma\"));\n cl.setPais(rs.getString(\"pais\"));\n\t\t\tls.add(cl);\n\t\t}\n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n } \n return ls;\n\t}",
"public ListaColores() {\n initComponents();\n buscaColor();\n\n }",
"public ArrayList<DTOcantComentarioxComercio> listaOrdenadaxComentario() {\n ArrayList<DTOcantComentarioxComercio> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select co.nombre, count (Comentarios.id_comercio) comentarios\\n\"\n + \"from Comentarios join Comercios co on co.id_comercio = Comentarios.id_comercio\\n\"\n + \"group by co.nombre\\n\"\n + \"order by comentarios\");\n\n while (rs.next()) {\n String nombreO = rs.getString(1);\n int cant = rs.getInt(2);\n\n DTOcantComentarioxComercio oc = new DTOcantComentarioxComercio(nombreO, cant);\n\n lista.add(oc);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }",
"@Override\n\tpublic List<Comprobante> findAll() throws Exception {\n\t\treturn comproRepository.findAll();\n\t}",
"public ListaDuplamenteEncadeada(){\r\n\t\t\r\n\t}",
"public void listarIgrejaComboBox() {\n\n IgrejasDAO dao = new IgrejasDAO();\n List<Igrejas> lista = dao.listarIgrejas();\n cbIgrejas.removeAllItems();\n\n for (Igrejas c : lista) {\n cbIgrejas.addItem(c);\n }\n }",
"public ArrayList<CompraRelatorio> getComprasRelatorios(Usuario user){\r\n CriarConexao();\r\n ArrayList<CompraRelatorio> compras = new ArrayList<CompraRelatorio>();\r\n uDao = new UsuarioDao();\r\n \r\n try {\r\n resultado = consulta.executeQuery(\"SELECT * FROM comprarelatorio WHERE usuario_id = \"+user.getId());\r\n \r\n while(resultado.next()){\r\n compras.add(new CompraRelatorio(\r\n resultado.getInt(\"id\"), \r\n resultado.getDouble(\"valorCompra\"), \r\n resultado.getInt(\"parcelas\"), \r\n resultado.getInt(\"quantidade\"), \r\n resultado.getDate(\"dataCompraRelatorio\"), \r\n uDao.select(user.getId()))\r\n );\r\n }\r\n \r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(UsuarioDao.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n fecharConexao();\r\n }\r\n \r\n return compras;\r\n }",
"public ManejoListaDistribucion() {\n initComponents();\n var dataUser = Data.getData();\n var user = dataUser.getUser();\n var strError = \"\";\n var objManejoArchivo = new ManejoArchivo();\n \n var listaMostrar = new DefaultListModel();\n File Archivo = new File(\"C:/MEIA/lista.txt\");\n var lista = objManejoArchivo.LecturaCompleta(Archivo, strError);\n for (int i = 0; i < lista.size(); i++) {\n var splitAux = lista.get(i).split(Pattern.quote(\"|\"));\n if(splitAux[1].equals(user) && splitAux[5].equals(\"1\")){\n listaMostrar.addElement(splitAux[0] + \"-\" + splitAux[2]);\n }\n }\n\n Archivo = new File(\"C:/MEIA/bitacora_lista.txt\");\n lista = objManejoArchivo.LecturaCompleta(Archivo, strError);\n for (int i = 0; i < lista.size(); i++) {\n var splitAux = lista.get(i).split(Pattern.quote(\"|\"));\n if(splitAux[1].equals(user) && splitAux[5].equals(\"1\")){\n listaMostrar.addElement(splitAux[0] + \"-\" + splitAux[2]);\n }\n }\n lListas.setModel(listaMostrar);\n listaMostrar = new DefaultListModel();\n Archivo = new File(\"C:/MEIA/contactos.txt\");\n lista = objManejoArchivo.LecturaCompleta(Archivo, strError);\n for (int i = 0; i < lista.size(); i++) {\n var splitAux = lista.get(i).split(Pattern.quote(\"|\"));\n if(splitAux[0].equals(user) && splitAux[4].equals(\"1\")){\n listaMostrar.addElement(splitAux[1]);\n }\n }\n\n Archivo = new File(\"C:/MEIA/bitacora_contactos.txt\");\n lista = objManejoArchivo.LecturaCompleta(Archivo, strError);\n for (int i = 0; i < lista.size(); i++) {\n var splitAux = lista.get(i).split(Pattern.quote(\"|\"));\n if(splitAux[0].equals(user) && splitAux[4].equals(\"1\")){\n listaMostrar.addElement(splitAux[1]);\n }\n }\n lContactoTotal.setModel(listaMostrar);\n }",
"public synchronized void addUsuarioListaConectados(Usuario usuario) {\n listaUsuarios.add(usuario);\n borrarUsuarioCorrectoListaProvisional(usuario);\n for (int i = 0; i < listaUsuarios.size(); i++) {\n enviarMensajeCliente(i, MensajeProtocolo.nuevoUsuarioConectado(usuario.getLogin()),tipoPublicar);\n enviarMensajeCliente(i,MensajeProtocolo.listarUsuarios(listaToArrayString()),tipoListar);\n }\n }",
"@Override\n\tpublic List<AposentadoriaCompulsoria> listaDeObjetos() {\n\t\treturn null;\n\t}"
] | [
"0.75113034",
"0.67158574",
"0.657786",
"0.6516236",
"0.6493444",
"0.64459896",
"0.6404744",
"0.63246775",
"0.6313615",
"0.62819564",
"0.62417525",
"0.62247366",
"0.62129813",
"0.6193251",
"0.6192533",
"0.6184684",
"0.6183665",
"0.617595",
"0.6173912",
"0.616013",
"0.6150797",
"0.60912883",
"0.60880166",
"0.60878026",
"0.6080369",
"0.6077275",
"0.607689",
"0.6076384",
"0.6065749",
"0.6058234",
"0.60410136",
"0.6011924",
"0.60083896",
"0.60009634",
"0.5993482",
"0.59930533",
"0.599191",
"0.5991886",
"0.5991509",
"0.59870887",
"0.59667957",
"0.59552836",
"0.5954597",
"0.59525543",
"0.59474",
"0.59441245",
"0.5937318",
"0.5922282",
"0.5912326",
"0.59021467",
"0.5888807",
"0.58873767",
"0.58841866",
"0.58824605",
"0.58689857",
"0.58637375",
"0.58618796",
"0.58607",
"0.58541405",
"0.5853192",
"0.5848967",
"0.5843899",
"0.583784",
"0.58343655",
"0.58331823",
"0.5817309",
"0.5799647",
"0.5799364",
"0.5792708",
"0.5788654",
"0.5779271",
"0.57738763",
"0.57730484",
"0.5770417",
"0.5767711",
"0.57606876",
"0.57606614",
"0.5760411",
"0.5759011",
"0.5751063",
"0.574694",
"0.57467955",
"0.5736818",
"0.5731049",
"0.5730629",
"0.57261115",
"0.5712841",
"0.57118803",
"0.5706448",
"0.57027566",
"0.56966627",
"0.5693557",
"0.5690409",
"0.5682686",
"0.5682228",
"0.56816804",
"0.5677951",
"0.5677553",
"0.5676584",
"0.56676996"
] | 0.7227993 | 1 |
Obtiene las tareas del proyecto | public ArrayList<Tarea> getTareas() {
return tareas;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mostrarTareas(){\n System.out.println(\"Tareas existentes:\");\n System.out.println(tareas);\n }",
"@Override\n\tpublic String getTareas() {\n\t\treturn \"TAREA COMERCIAL 3: VENDE MUCHO TODOS LOS DÍAS\";\n\t}",
"public void teclas() {\r\n\t\tif (app.key == '1') {\r\n\t\t\ttipoCom = 1;\r\n\t\t\tcaso1.clear();\r\n\t\t\tcaso2.clear();\r\n\t\t\tcaso3.clear();\r\n\t\t\tcaso4.clear();\r\n\t\t\tcaso1.addAll(persona);\r\n\t\t}\r\n\t\tif (app.key == '2') {\r\n\t\t\ttipoCom = 2;\r\n\t\t\tcaso1.clear();\r\n\t\t\tcaso2.clear();\r\n\t\t\tcaso3.clear();\r\n\t\t\tcaso4.clear();\r\n\t\t\tcaso2.addAll(persona);\r\n\t\t}\r\n\t\tif (app.key == '3') {\r\n\t\t\ttipoCom = 3;\r\n\t\t\tcaso1.clear();\r\n\t\t\tcaso2.clear();\r\n\t\t\tcaso3.clear();\r\n\t\t\tcaso4.clear();\r\n\t\t\tcaso3.addAll(persona);\r\n\t\t}\r\n\t\tif (app.key == '4') {\r\n\t\t\ttipoCom = 4;\r\n\t\t\tcaso1.clear();\r\n\t\t\tcaso2.clear();\r\n\t\t\tcaso3.clear();\r\n\t\t\tcaso4.clear();\r\n\t\t\tcaso4.addAll(persona);\r\n\t\t}\r\n\t}",
"public void cargarTablas(){\n ControladorEmpleados empleados= new ControladorEmpleados();\n ControladorProyectos proyectos= new ControladorProyectos();\n ControladorCasos casos= new ControladorCasos();\n actualizarListadoObservable(empleados.consultarEmpleadosAdminProyectos(ESTADO_ASIGNADO, TIPO_3),casos.consultarCasos(devolverUser()),casos.consultarTiposCaso());\n }",
"public CtrlEditGrupos() {\n edEsc = EditEscenario.getInstance();\n try {\n cd = CtrlDomain.getInstance();\n } catch (Exception e) {\n System.out.println(\"ERROR EN LA CARGA DEL CONTROLADOR DE DOMINIO\");\n }\n planEstudiosFinal = edEsc.getPlanEstudiosFinal();\n asignaturasFinal = edEsc.getAsignaturasFinal();\n restriccionesFinal = edEsc.getRestriccionesFinal();\n }",
"public void limpiarCampos() {\n\t\ttema = new Tema();\n\t\ttemaSeleccionado = new Tema();\n\t\tmultimedia = new Multimedia();\n\t}",
"protected void inicializar(){\n kr = new CreadorHojas(wp);\n jPanel1.add(wp,0); // inserta el workspace en el panel principal\n wp.insertarHoja(\"Hoja 1\");\n //wp.insertarHoja(\"Hoja 2\");\n //wp.insertarHoja(\"Hoja 3\");\n }",
"private void capturarControles() {\n \t\n \ttxtNombre = (TextView)findViewById(R.id.txtNombre);\n \timagenDestacada = (ImageView)findViewById(R.id.imagenDestacada);\n\t\ttxtDescripcion = (TextView)findViewById(R.id.txtDescripcion);\n\t\tlblTitulo = (TextView)findViewById(R.id.lblTitulo);\n\t\tbtnVolver = (Button)findViewById(R.id.btnVolver);\n\t\tbtnHome = (Button)findViewById(R.id.btnHome);\n\t\tpanelCargando = (RelativeLayout)findViewById(R.id.panelCargando);\n\t}",
"public void cargarOfertas() {\r\n\t\tcoi.clearOfertas();\r\n\t\tController c = gui.getController();\r\n\t\tList<Integer> ofertas = c.ofertanteGetMisOfertas();\r\n\t\tfor (Integer id : ofertas) {\r\n\t\t\tString estado = c.ofertaGetEstado(id);\r\n\t\t\tif (estado.equals(GuiConstants.ESTADO_ACEPTADA) || estado.equals(GuiConstants.ESTADO_CONTRATADA)\r\n\t\t\t\t\t|| estado.equals(GuiConstants.ESTADO_RESERVADA)) {\r\n\t\t\t\tPanelOferta oferta = new PanelOferta(gui, id);\r\n\t\t\t\tcoi.addActiva(oferta);\r\n\t\t\t} else if (estado.equals(GuiConstants.ESTADO_PENDIENTE) || estado.equals(GuiConstants.ESTADO_PENDIENTE)) {\r\n\t\t\t\tPanelOferta oferta = new PanelOfertaEditable(gui, id);\r\n\t\t\t\tcoi.addPendiente(oferta);\r\n\t\t\t} else if (estado.equals(GuiConstants.ESTADO_RETIRADA)) {\r\n\t\t\t\tPanelOferta oferta = new PanelOferta(gui, id);\r\n\t\t\t\tcoi.addRechazada(oferta);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcoi.repaint();\r\n\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tscrollPane.getHorizontalScrollBar().setValue(0);\r\n\t\t\t\tscrollPane.getVerticalScrollBar().setValue(0);\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"private void cargarAutorizaciones() {\r\n\t\tif (parametros_empresa != null) {\r\n\t\t\tif (parametros_empresa.getTrabaja_autorizacion()) {\r\n\t\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\t\tadmision_seleccionada);\r\n\r\n\t\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\t\tIRutas_historia.PAGINA_AUTORIZACIONES,\r\n\t\t\t\t\t\t\"AUTORIZACIONES\", parametros);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setTareas(ArrayList<Tarea> tareas) {\n this.tareas = tareas;\n }",
"public void inicializa_controles() {\n bloquea_campos();\n bloquea_botones();\n carga_fecha();\n ocultar_labeles();\n }",
"public void configurarIdioma() {\n botonAceptar.setText(resources.getString(\"aceptar\"));\n labelErrorRegistro.setText(resources.getString(\"LabelErrorRegistro\"));\n labelNoSePuedeRegistrar.setText(resources.getString(\"noSePuedeRegistrar\"));\n labelCamposVacios.setText(resources.getString(\"hayCamposVacios\"));\n }",
"private static void inicializarComponentes() {\n\t\tgaraje = new Garaje();\r\n\t\tgarajeController=new GarajeController();\r\n\t\tgarajeController.iniciarPlazas();\r\n\t\t\r\n\t\tmenuInicio = new StringBuilder();\r\n\t\tmenuInicio.append(\"¡Bienvenido al garaje!\\n\");\r\n\t\tmenuInicio.append(\"****************************************\\n\");\r\n\t\tmenuInicio.append(\"9: Guardar Plazas\\n\");\r\n\t\tmenuInicio.append(\"0: Listar Plazas\\n\");\r\n\t\tmenuInicio.append(\"1: Listar Plazas Coche\\n\");\r\n\t\tmenuInicio.append(\"2: Listar Plazas Moto\\n\");\r\n\t\tmenuInicio.append(\"3: Reservar Plaza\\n\");\r\n\t\tmenuInicio.append(\"4: Listar Plazas Libres\\n\");\r\n\t\tmenuInicio.append(\"5: Listar Clientes\\n\");\r\n\t\tmenuInicio.append(\"6: Listar Vehículos\\n\");\r\n//\t\tmenuInicio.append(\"7:\\n\");\r\n//\t\tmenuInicio.append(\"8:\\n\");\r\n\t}",
"private void limpiarDatos() {\n\t\t\n\t}",
"public List<Area> listarAreas(){\r\n return cVista.listarAreas();\r\n }",
"public Tequisquiapan()\n {\n nivel = new Counter(\"Barrio Tequisquiapan: \");\n \n nivel.setValue(5);\n hombre.escenario=5;\n\n casa5.creaCasa(4);\n addObject(casa5, 2, 3);\n \n arbol2.creaArbol(2);\n addObject(arbol2, 20, 3);\n arbol3.creaArbol(3);\n addObject(arbol3, 20, 16); \n \n addObject(letrero5, 15, 8);\n\n addObject(hombre, 11, 1);\n \n arbol4.creaArbol(4);\n addObject(arbol4, 20, 20);\n arbol5.creaArbol(5);\n addObject(arbol5, 3, 17);\n \n fuente2.creaAfuera(6);\n addObject(fuente2, 11, 19);\n \n lampara1.creaAfuera(2);\n addObject(lampara1, 8, 14);\n lampara2.creaAfuera(1);\n addObject(lampara2, 8, 7);\n \n addObject(nivel, 5, 0);\n addObject(atras, 20, 2); \n }",
"private void listadoTipos() {\r\n sessionProyecto.getTipos().clear();\r\n sessionProyecto.setTipos(itemService.buscarPorCatalogo(CatalogoEnum.TIPOPROYECTO.getTipo()));\r\n }",
"public void acutualizarInfo(){\n String pibId = String.valueOf(comentario.getId());\n labelId.setText(\"#\" + pibId);\n\n String autor = comentario.getAutor().toString();\n labelAutor.setText(autor);\n\n String fecha = comentario.getFechaCreacion().toString();\n labelFecha.setText(fecha);\n \n String contenido = comentario.getContenido();\n textAreaContenido.setText(contenido);\n \n String likes = ((Integer)comentario.totalLikes()).toString();\n labelLikes.setText(likes);\n \n Collection<Comentario> comments = socialNetwork.searchSubComentarios(comentario);\n panelSubComentarios.loadItems(comments, 15);\n \n if(comentario.isSubcomentario()){\n jButton4.setEnabled(true);\n }\n else{\n jButton4.setEnabled(false);\n }\n }",
"public void iniciarComponentes(){\n\n crearPanel();\n colocarBotones();\n \n }",
"public void cargarModelo() {\n\t}",
"public VistaGraficaQytetet() {\n ArrayList <String> nombres = obtenerNombreJugadores();\n modelo = Qytetet.getInstance();\n controlador = ControladorQytetet.getInstance(nombres);\n initComponents();\n creaMenuOperacion();\n creaMenuCasilla();\n update();\n }",
"public AreaClientes() {\n initComponents();\n cargarTabla();\n editarCliente(false);\n \n }",
"public Controlador() {\n\t\t// m\n\t\tdatosPrueba1 = new ListaEnlazada();\n\t\t// m\n\t\tdatosPrueba2 = new ListaEnlazada();\n\t\t// add\n\t\tdatosPrueba3 = new ListaEnlazada();\n\t\tdatosPrueba4 = new ListaEnlazada();\n\t\tprueba1 = new Estadisticas(datosPrueba1);\n\t\tprueba2 = new Estadisticas(datosPrueba2);\n\t\tprueba3 = new Estadisticas(datosPrueba3);\n\t\tprueba4 = new Estadisticas(datosPrueba4);\n\t\t// finAdd\n\t}",
"private void iniciar() {\r\n\t\t/*Se instancian las clases*/\r\n\t\tmiVentanaPrincipal=new VentanaPrincipal();\r\n\t\tmiVentanaRegistro=new VentanaRegistro();\r\n\t\tmiVentanaBuscar= new VentanaBuscar();\r\n\t\tmiLogica=new Logica();\r\n\t\tmiCoordinador= new Coordinador();\r\n\t\t\r\n\t\t/*Se establecen las relaciones entre clases*/\r\n\t\tmiVentanaPrincipal.setCoordinador(miCoordinador);\r\n\t\tmiVentanaRegistro.setCoordinador(miCoordinador);\r\n\t\tmiVentanaBuscar.setCoordinador(miCoordinador);\r\n\t\tmiLogica.setCoordinador(miCoordinador);\r\n\t\t\r\n\t\t/*Se establecen relaciones con la clase coordinador*/\r\n\t\tmiCoordinador.setMiVentanaPrincipal(miVentanaPrincipal);\r\n\t\tmiCoordinador.setMiVentanaRegistro(miVentanaRegistro);\r\n\t\tmiCoordinador.setMiVentanaBuscar(miVentanaBuscar);\r\n\t\tmiCoordinador.setMiLogica(miLogica);\r\n\t\t\t\t\r\n\t\tmiVentanaPrincipal.setVisible(true);\r\n\t}",
"private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela PressaoArterial\\n\");\n\t\tpressaoArterial = new PressaoArterial();\n\t\tlistaPressaoArterial = pressaoArterialService.buscarTodos();\n\n\t}",
"public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}",
"private static void pruebas() {\n\t\tResultadosDaoImpl resultadosDao = new ResultadosDaoImpl();\r\n\t\tPartidosDaoImpl partidosDao = new PartidosDaoImpl();\r\n\t\tEquiposDaoImpl equiposDao = new EquiposDaoImpl();\r\n\t\tJornadasDaoImpl jornadasDao = new JornadasDaoImpl();\r\n\t\tEstadisticasDaoImpl estadisticasDao = new EstadisticasDaoImpl();\r\n\t\t\r\n//\t\tLong goles = resultadosDao.getGolesTotalesCasa();\r\n\t\t\r\n\t\tEquipos equipoC = equiposDao.getEquipoById(7);\r\n\t\tEquipos equipoF = equiposDao.getEquipoById(6);\r\n\t\tJornadas jornada = jornadasDao.nextJornada();\r\n//\t\t\r\n//\t\tpartidosDao.getPartidosCasa(equipo,jornada);\r\n\t\t\r\n//\t\tLong goles = resultadosDao.getGolesFavorCasa(equipo);\r\n\t\t\r\n//\t\tLong goles = resultadosDao.getGolesContraFuera(equipo);\r\n//\t\tdouble phiVM = staticsC.getValorMercado() / (estadisticasDao.getValorMercadoMedio());\r\n\t\t\r\n\t\tEstadisticas staticsC = estadisticasDao.getStatics(equipoC);\r\n\t\tEstadisticas staticsF = estadisticasDao.getStatics(equipoF);\r\n\t\t\r\n\t\tDouble phiF = PlayMethods.analizeStaticsFuera(staticsF,staticsC,jornada);\r\n\t\tDouble phiC = PlayMethods.analizeStaticsCasa(staticsC,staticsF,jornada);\r\n\t\t\r\n\t\t\r\n\t}",
"public void iniciarPartida() {\n\t\tJuego juegoActual = controladorJuego.getJuego();\n\t\t// Recuperamos Tablero de juego para obtener las dimensiones\n\t\tTablero tableroActual = juegoActual.getTablero();\n\n\t\t// Creamos el layout para introducir la matriz con las casillas\n\t\tthis.setLayout(new BorderLayout());\n\t\tpaneltablero = new JPanel(new GridLayout(tableroActual.getNumFilas(), tableroActual.getNumCols()));\n\t\tthis.add(paneltablero);\n\n\t\t// Creamos la matriz de JButton que nos permetira interacctuar\n\t\ttablero = new JButton[tableroActual.getNumFilas()][tableroActual.getNumCols()];\n\t\tfor (int x = 0; x < tableroActual.getNumFilas(); x++) {\n\t\t\tfor (int y = 0; y < tableroActual.getNumCols(); y++) {\n\t\t\t\ttablero[x][y] = new JButton();\n\t\t\t\ttablero[x][y].setName(\"Casilla\");\n\t\t\t\ttablero[x][y].setPreferredSize(new Dimension(32, 32));\n\t\t\t\ttablero[x][y].addMouseListener((MouseListener) this.getControladorJuego());\n\t\t\t\tpaneltablero.add(tablero[x][y]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tbarraMenu();\n\n\t\tventana.setContentPane(this);\n\t\tventana.setResizable(false);\n\t\tventana.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tventana.pack();\n\t\tventana.setVisible(true);\n\t}",
"private void iniciar() {\r\n\t\tprincipal = new Principal();\r\n\t\tgestionCientificos=new GestionCientificos();\r\n\t\tgestionProyectos=new GestionProyectos();\r\n\t\tgestionAsignado= new GestionAsignado();\r\n\t\tcontroller= new Controller();\r\n\t\tcientificoServ = new CientificoServ();\r\n\t\tproyectoServ = new ProyectoServ();\r\n\t\tasignadoA_Serv = new AsignadoA_Serv();\r\n\t\t\r\n\t\t/*Se establecen las relaciones entre clases*/\r\n\t\tprincipal.setControlador(controller);\r\n\t\tgestionCientificos.setControlador(controller);\r\n\t\tgestionProyectos.setControlador(controller);\r\n\t\tgestionAsignado.setControlador(controller);\r\n\t\tcientificoServ.setControlador(controller);\r\n\t\tproyectoServ.setControlador(controller);\r\n\t\t\r\n\t\t/*Se establecen relaciones con la clase coordinador*/\r\n\t\tcontroller.setPrincipal(principal);\r\n\t\tcontroller.setGestionCientificos(gestionCientificos);\r\n\t\tcontroller.setGestionProyectos(gestionProyectos);\r\n\t\tcontroller.setGestionAsignado(gestionAsignado);\r\n\t\tcontroller.setCientificoService(cientificoServ);\r\n\t\tcontroller.setProyectoService(proyectoServ);\r\n\t\tcontroller.setAsignadoService(asignadoA_Serv);\r\n\t\t\t\t\r\n\t\tprincipal.setVisible(true);\r\n\t}",
"public Ventana(){\r\n\t\t\r\n\t\tsuper.setTitle(\"Operaciones\");\r\n\t\tsuper.setSize(320, 480);\r\n\t\tsuper.setDefaultCloseOperation(EXIT_ON_CLOSE); //para el botón de cerrar\r\n\t\tcargarControles();\r\n\t}",
"public void Ordenamiento() {\n\n\t}",
"public void mostrarNumeroTareasPendientes(){\n System.out.println(tareas.size());\n }",
"private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela Paciente\\n\");\n\t\tpaciente = new Paciente();\n\t\tlistaPaciente = pacienteService.buscarTodos();\n\t\t\n\t}",
"public controladorCategorias() {\r\n }",
"public GestionTemas() {\n initComponents();\n inicializarComponente();\n cargarTemas();\n }",
"public TelaPernas() {\n initComponents();\n lblTipo.setVisible(false);\n lblCobra.setVisible(false);\n lblSaci.setVisible(false);\n lblBipede.setVisible(false);\n lblMiniBoi.setVisible(false);\n lblFormiga.setVisible(false);\n lblMiranha.setVisible(false);\n lblEt.setVisible(false);\n \n }",
"private void colocaComponentes() {\r\n\t\tJLabel lblId = new JLabel(\"Id\");\r\n\t\tlblId.setBounds(10, 11, 46, 14);\r\n\t\tadd(lblId);\r\n\t\t\r\n\t\tJLabel lblApellido = new JLabel(\"1er Apellido\");\r\n\t\tlblApellido.setBounds(168, 11, 131, 14);\r\n\t\tadd(lblApellido);\r\n\t\t\r\n\t\ttextId = new JTextField();\r\n\t\ttextId.setBounds(10, 36, 86, 20);\r\n\t\tadd(textId);\r\n\t\ttextId.setColumns(10);\r\n\t\t\r\n\t\ttextApellido = new JTextField();\r\n\t\ttextApellido.setBounds(168, 36, 118, 20);\r\n\t\tadd(textApellido);\r\n\t\ttextApellido.setColumns(10);\r\n\t\t\r\n\t\tbtnComprobar = new JButton(\"Comprobar\");\r\n\t\tbtnComprobar.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tconsultaDatos();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnComprobar.setBounds(10, 83, 362, 23);\r\n\t\tadd(btnComprobar);\r\n\t\t\r\n\t\ttextMensaje = new JTextField();\r\n\t\ttextMensaje.setEditable(false);\r\n\t\ttextMensaje.setBounds(10, 117, 362, 20);\r\n\t\tadd(textMensaje);\r\n\t\ttextMensaje.setColumns(10);\r\n\t\t\r\n\t\tbtnAtras = new JButton(\"Atras\");\r\n\t\tbtnAtras.setBounds(10, 254, 89, 23);\r\n\t\tadd(btnAtras);\r\n\t\tbtnAtras.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tcambiaPanelAnterior();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public TelaCidadaoDescarte() {\n initComponents();\n }",
"@Override\n\tpublic void iniciarLabores() {\n\t\t\n\t}",
"@Override\n\tpublic void iniciarLabores() {\n\t\t\n\t}",
"public PnAlunos() {\n initComponents();\n listarAlunos();\n }",
"private void dibujarCasillas() {\r\n for (int x = 0; x < 6; x++) {\r\n for (int y = 0; y < 6; y++) {\r\n panelTablero[x][y] = new CoordPanel();\r\n panelTablero[x][y].addMouseListener(this);\r\n panelTablero[x][y].setCoordenadas(x, y);\r\n pnlMain.add(panelTablero[x][y]);\r\n }\r\n }\r\n }",
"public Tarea(String descripcionTarea)\n {\n //Añade la descripción de la tarea\n descripcion = descripcionTarea;\n tareaCompletada = false;\n //Por defecto, las tareas tienen prioridad 0\n prioridad = 0;\n //Las nuevas tareas no tienen fecha de vencimiento\n fechaVencimiento = null;\n }",
"public TelaCadasroProjeto() {\n initComponents();\n }",
"private void cargarControles() {\r\n\t\tc.setLayout(null); //acomodar los objetos como yo quiera\r\n\t\tlbN1.setBounds(10, 10, 280, 30);\r\n\t\tc.add(lbN1); //se asigna al contenedor\r\n\t\t\r\n\t\ttxtN1.setBounds(10, 40, 280,30);\r\n\t\tc.add(txtN1);\r\n\t\t\r\n\t\tlbN2.setBounds(10,80,300,30);\r\n\t\tc.add(lbN2);\r\n\t\ttxtN2.setBounds(10,110, 280,30);\r\n\t\tc.add(txtN2);\r\n\t\t\r\n\t\tbtnCalcular.setBounds(10, 150, 280, 30);\r\n\t\tc.add(btnCalcular);\r\n\t\t\r\n\t\tlbResultado.setBounds(120,180, 280, 30);\r\n\t\tc.add(lbResultado);\r\n\t\t\r\n\t\t//evento en el botón\r\n\t\tbtnCalcular.addActionListener(this);\r\n\t\t\t\r\n\t}",
"public TrazAqui(){\n this.utilizadores = new TreeMap<>();\n this.encomendas = new TreeMap<>();\n this.utilizador = null;\n }",
"public Todoist()\n {\n tareas = new ArrayList<String>();\n }",
"public Todoist()\n {\n tareas = new ArrayList<String>();\n }",
"public TareasEvento() {\n initComponents();\n setTitle (\"Tareas\");\n mostrardatos(jTextField1.getText());\n \n }",
"private void cargaComonentes() {\n\t\trepoInstituciones = new InstitucionesRepository(session);\n\t\trepoInstitucion_usuario = new Institucion_UsuariosRepository(session);\n\t\tList upgdsList = null;\n\t\tif(mainApp.getUsuarioApp().getPer_Usu_Id().equalsIgnoreCase(\"Alcaldia\")){\n\t\t\tupgdsList = repoInstituciones.listByMunicipio(mainApp.getUsuarioApp().getMun_Usu_Id());\n\t\t\tInstituciones instiL=new Instituciones();\n\t\t\tIterator iter = upgdsList.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tinstiL=(Instituciones) iter.next();\n\t\t\t\tinstitucionesList.add(instiL);\n\t\t\t}\n\t\t}else{\n\t\t\tInstitucion_Usuarios institucion_usuario = new Institucion_Usuarios();\n\t\t\tupgdsList = repoInstitucion_usuario.getListIpsByUsuario(mainApp.getUsuarioApp().getUsu_Id());\n\t\t\tIterator iter = upgdsList.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tinstitucion_usuario = (Institucion_Usuarios) iter.next();\n\t\t\t\tinstitucionesList.add(repoInstituciones.findById(institucion_usuario.getIps_Ipsu_Id()));\n\t\t\t}\n\t\t}\n\t\t\n\t\tinstitucionesBox.setItems(institucionesList);\n\t\tinstitucionesBox.setValue(mainApp.getInstitucionApp());\n\n\t\tinstitucionesBox.valueProperty().addListener(new ChangeListener<Instituciones>() {\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends Instituciones> observable, Instituciones oldValue,\n\t\t\t\t\tInstituciones newValue) {\n\t\t\t\tmainApp.setInstitucionApp(newValue);\n\t\t\t}\n\t\t});\n\t}",
"public List<Listas_de_las_Solicitudes> Mostrar_las_peticiones_que_han_llegado_al_Usuario_Administrador(int cedula) {\n\t\t//paso3: Obtener el listado de peticiones realizadas por el usuario\n\t\tEntityManagerFactory entitymanagerfactory = Persistence.createEntityManagerFactory(\"LeyTransparencia\");\n\t\tEntityManager entitymanager = entitymanagerfactory.createEntityManager();\n\t\tentitymanager.getEntityManagerFactory().getCache().evictAll();\n\t\tQuery consulta4=entitymanager.createQuery(\"SELECT g FROM Gestionador g WHERE g.cedulaGestionador =\"+cedula);\n\t\tGestionador Gestionador=(Gestionador) consulta4.getSingleResult();\n\t\t//paso4: Obtener por peticion la id, fecha y el estado\n\t\tList<Peticion> peticion=Gestionador.getEmpresa().getPeticions();\n\t\tList<Listas_de_las_Solicitudes> peticion2 = new ArrayList();\n\t\t//paso5: buscar el area de cada peticion\n\t\tfor(int i=0;i<peticion.size();i++){\n\t\t\tString almcena=\"\";\n\t\t\tString sarea=\"no posee\";\n\t\t\tBufferedReader in;\n\t\t\ttry{\n\t\t\t\tin = new BufferedReader(new InputStreamReader(new FileInputStream(\"C:/area/area\"+String.valueOf(peticion.get(i).getIdPeticion())+\".txt\"), \"utf-8\"));\n\t\t\t\ttry {\n\t\t\t\t\twhile((sarea=in.readLine())!=null){\n\t\t\t\t\t\tint s=0;\n\t\t\t\t\t\talmcena=sarea;\n\t\t\t\t\t}\n\t\t\t\t\tin.close();\n\t\t\t\t\tSystem.out.println(almcena);\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\t\n\t\t\t\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\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}\n\t\t\t\n\t\t\t//paso6: Mostrar un listado de peticiones observando el id, la fecha de realizacion de la peticion, hora de realizacion de la peticion, y el estado actual de la peticion\n\t\t\tListas_de_las_Solicitudes agregar=new Listas_de_las_Solicitudes();\n\t\t\tagregar.setId(String.valueOf(peticion.get(i).getIdPeticion()));\n\t\t\tagregar.setFechaPeticion(peticion.get(i).getFechaPeticion());\n\t\t\tagregar.setNombreestado(peticion.get(i).getEstado().getTipoEstado());\n\t\t\tagregar.setArea(almcena);\n\t\t\tpeticion2.add(agregar);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"el usuario existe\");\n\t\treturn peticion2;\n\t\t//aun no se\n\t}",
"public void addTarea(String nombreTarea){\n tareas.add(nombreTarea);\n }",
"public void addTarea(String nombreTarea){\n tareas.add(nombreTarea);\n }",
"private void setearOpcionesMenuProcesos()\r\n\t{\r\n\t\tArrayList<FormularioVO> lstFormsMenuProceso = new ArrayList<FormularioVO>();\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t/*Buscamos los Formulairos correspondientes a este TAB*/\r\n\t\tfor (FormularioVO formularioVO : this.permisos.getLstPermisos().values()) {\r\n\t\t\t\r\n\t\t\tif(formularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_PROCESOS) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_RESUMEN_PROCESO))\r\n\t\t\t{\r\n\t\t\t\tlstFormsMenuProceso.add(formularioVO);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t/*Si hay formularios para el tab*/\r\n\t\tif(lstFormsMenuProceso.size()> 0)\r\n\t\t{\r\n\r\n\t\t\tthis.layoutMenu = new VerticalLayout();\r\n\t\t\t//this.tabMantenimientos.setMargin(true);\r\n\t\t\t\r\n\t\t\tthis.lbProcesos.setVisible(true);\r\n\t\t\tthis.layoutMenu.addComponent(this.lbProcesos);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor (FormularioVO formularioVO : lstFormsMenuProceso) {\r\n\t\t\t\t\r\n\t\t\t\tswitch(formularioVO.getCodigo())\r\n\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_PROCESOS:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_PROCESOS, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarProcesos();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.procesos);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_RESUMEN_PROCESO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_RESUMEN_PROCESO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarResumenProceso();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.resumenProc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\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\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.menuItems.addComponent(this.layoutMenu);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public EstructuraOrganicaController(){\r\n\t\tloadDefault();\r\n\t}",
"public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}",
"public PanelAdministrarMarcas() {\n initComponents();\n cargarTabla();\n }",
"private void loadToolBar() {\r\n //si existe la configuracion de la TOOLBAR asociada al usuario\r\n if(toolsConfig != null){\r\n //Si el id de pantalla es la correcta y se encuentra activo 1 el TOOLBAR\r\n if(Datos.getIdScreen()==toolsConfig[0] && toolsConfig[1]==1){ \r\n for (int i = 0; i < tools.length; i++){ //Recorre el arreglo de botones\r\n if(toolsConfig[i+2] == 1){ //Si esta disponible 1 \r\n enableToolBar(tools, i); //habilita el boton\r\n }else{ \r\n disableToolBar(tools,i); //deshabilita el boton\r\n } \r\n }\r\n }\r\n }\r\n else{\r\n for (int i = 0; i < tools.length; i++){ //Recorre el arreglo de botones\r\n disableToolBar(tools,i); //deshabilita el boton\r\n }\r\n }\r\n }",
"@Override\r\n\tpublic void cargarSubMenuPersona() {\n\t\t\r\n\t}",
"public PanelInformesYEstadisticas() {\r\n\t\tinitComponents();\r\n\t\t//Util.personaSinResultados(lbSinResultados, true);\r\n\t}",
"public void initControles(){\n\n }",
"public CadastrarMarcasModelos() {\n initComponents();\n }",
"public void almacenar( Proyecto proyecto) {\n\n }",
"private void controladorPerfil(Controlador controlador){\n this.contUserDisplayCollective = controlador.getUserDisplayCollective();\n perfil.setControlCollective((ListSelectionListener)contUserDisplayCollective);\n inicioUser.setControlCollective((ListSelectionListener)contUserDisplayCollective);\n\n this.contUserDisplayProject = controlador.getUserDisplayProject();\n perfil.setControlProject((ListSelectionListener)contUserDisplayProject);\n inicioUser.setControlProject((ListSelectionListener)contUserDisplayProject);\n inicioAdmin.setControlProject((ListSelectionListener)contUserDisplayProject);\n \n }",
"public void inizializza() {\n Navigatore nav;\n Portale portale;\n\n super.inizializza();\n\n try { // prova ad eseguire il codice\n\n Modulo modulo = getModuloRisultati();\n modulo.inizializza();\n// Campo campo = modulo.getCampoChiave();\n// campo.setVisibileVistaDefault(false);\n// campo.setPresenteScheda(false);\n// Vista vista = modulo.getVistaDefault();\n// vista.getElement\n// Campo campo = vista.getCampo(modulo.getCampoChiave());\n\n\n\n /* aggiunge il Portale Navigatore al pannello placeholder */\n nav = this.getNavigatore();\n portale = nav.getPortaleNavigatore();\n this.getPanNavigatore().add(portale);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"private void cargarNotasAclaratorias() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\tparametros.put(\"tipo\", INotas.NOTAS_ACLARATORIAS);\r\n\t\ttabboxContendor\r\n\t\t\t\t.abrirPaginaTabDemanda(false, \"/pages/nota_aclaratoria.zul\",\r\n\t\t\t\t\t\t\"NOTAS ACLARATORIAS\", parametros);\r\n\t}",
"public PantallaPrincipal() {\n gestor= new Gestor();\n initComponents();\n inicializarTablaCarreras();\n inicializarTablaCorredorTotales();\n inicializarTablaCorredor();\n mostrarCarreras();\n mostrarCorredoresTotales();\n \n \n }",
"private void inicializarTablero() {\n for (int i = 0; i < casillas.length; i++) {\n for (int j = 0; j < casillas[i].length; j++) {\n casillas[i][j] = new Casilla();\n }\n }\n }",
"private void setearOpcionesMenuCobros()\r\n\t{\r\n\t\tArrayList<FormularioVO> lstFormsMenuCobros = new ArrayList<FormularioVO>();\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t/*Buscamos los Formulairos correspondientes a este TAB*/\r\n\t\tfor (FormularioVO formularioVO : this.permisos.getLstPermisos().values()) {\r\n\t\t\t\r\n\t\t\tif(\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_INGRESO_COBRO) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_INGRESO_COBRO_OTRO) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_INGRESO_EGRESO) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_GASTOS) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_DEPOSITO) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_CONCILIACION) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_INGRESO_EGRESO_OTRO))\r\n\t\t\t\t\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tlstFormsMenuCobros.add(formularioVO);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t/*Si hay formularios para el tab*/\r\n\t\tif(lstFormsMenuCobros.size()> 0)\r\n\t\t{\r\n\r\n\t\t\tthis.layoutMenu = new VerticalLayout();\r\n\t\t\t//this.tabMantenimientos.setMargin(true);\r\n\t\t\t\r\n\t\t\tthis.lbCobros.setVisible(true);\r\n\t\t\tthis.layoutMenu.addComponent(this.lbCobros);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor (FormularioVO formularioVO : lstFormsMenuCobros) {\r\n\t\t\t\t\r\n\t\t\t\tswitch(formularioVO.getCodigo())\r\n\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_INGRESO_COBRO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_INGRESO_COBRO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarIngresoCobro();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.ingCobro);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_INGRESO_COBRO_OTRO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_INGRESO_COBRO_OTRO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarOtroCobro();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.otroCobro);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_INGRESO_EGRESO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_INGRESO_EGRESO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarIngresoEgreso();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.ingEgreso);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_INGRESO_EGRESO_OTRO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_INGRESO_EGRESO_OTRO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarOtroEgreso();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.otroEgreso);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\r\n\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_GASTOS:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_GASTOS, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarGastos();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.gastos);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\r\n\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_DEPOSITO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_DEPOSITO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarDeposito();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.deposito);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_CONCILIACION:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_CONCILIACION, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarConciliacion();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.conciliacion);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\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\tthis.menuItems.addComponent(this.layoutMenu);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public void iniciarTabuleiro(JogoTrilha tabuleiro){\n String corInicial = \"vazia\";\n \n for(int i = 0; i < nomeCasa.size(); i++){\n casas.put(nomeCasa.get(i), new Casa(nomeCasa.get(i)));\n casas.get(nomeCasa.get(i)).setCor(corInicial);\n } \n }",
"@Override\n public List<Area> getAllAreas() {\n return new ArrayList<>(areas.values());\n }",
"public VPacientes() {\n initComponents();\n inicializar();\n }",
"private void sceltapannelli(String utilizzatore){\n\n if(utilizzatore.equals(\"Registrazione\")){\n\n sez_managerview.setSezA(new Sez_AView().getIntermedio0());\n sez_managerview.setSezB(new Sez_BView().getIntermedio0());\n sez_managerview.setSezC(new Sez_CView().getIntermedio0());\n\n }\n\n }",
"private void setUpOverview() {\n mapInstance = GameData.getInstance();\n //get reference locally for the database\n db = mapInstance.getDatabase();\n\n //retrieve the current player and the current area\n currentPlayer = mapInstance.getPlayer();\n\n }",
"private final void inicializarListas() {\r\n\t\t//Cargo la Lista de orden menos uno\r\n\t\tIterator<Character> it = Constantes.LISTA_CHARSET_LATIN.iterator();\r\n\t\tCharacter letra;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tletra = it.next();\r\n\t\t\tthis.contextoOrdenMenosUno.crearCharEnContexto(letra);\r\n\t\t}\r\n\t\t\r\n\t\tthis.contextoOrdenMenosUno.crearCharEnContexto(Constantes.EOF);\r\n\t\t\r\n\t\tthis.contextoOrdenMenosUno.actualizarProbabilidades();\r\n\t\t\r\n\t\t//Cargo las listas de ordenes desde 0 al orden definido en la configuración\r\n\t\tOrden ordenContexto;\r\n\t\tfor (int i = 0; i <= this.orden; i++) {\r\n\t\t\tordenContexto = new Orden();\r\n\t\t\tthis.listaOrdenes.add(ordenContexto);\r\n\t\t}\r\n\t}",
"public TelaProduto() {\n initComponents();\n \n carregaProdutos();\n }",
"private void setupEscenario2( )\n {\n String todasMarcadas, casillasSinMarca;\n String[] marcadas, noMarcadas;\n int casilla;\n // Prepara el tablero\n triqui = new Triqui( );\n\n // Primer jugador\n\n marcaJugador1 = \"X\";\n todasMarcadas = \"1,2,3,4\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador1 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador1 );\n casillasJugador1.add( new Integer( casilla ) );\n }\n\n // Segundo jugador\n\n marcaJugador2 = \"O\";\n todasMarcadas = \"5,6,7,8\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador2 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador2 );\n casillasJugador2.add( new Integer( casilla ) );\n }\n\n // Casillas sin marcar\n\n casillasSinMarca = \"9\";\n noMarcadas = casillasSinMarca.split( \",\" );\n casillasSinMarcar = new ArrayList( );\n\n for( int i = 0; i < noMarcadas.length; i++ )\n {\n casilla = Integer.parseInt( noMarcadas[ i ] );\n casillasSinMarcar.add( new Integer( casilla ) );\n }\n }",
"private void prepare()\n {\n Victoria victoria = new Victoria();\n addObject(victoria,190,146);\n Salir salir = new Salir();\n addObject(salir,200,533);\n Volver volver = new Volver();\n addObject(volver,198,401);\n }",
"private void mueveObjetos()\n {\n // Mueve las naves Ufo\n for (Ufo ufo : ufos) {\n ufo.moverUfo();\n }\n \n // Cambia el movimiento de los Ufos\n if (cambiaUfos) {\n for (Ufo ufo : ufos) {\n ufo.cambiaMoverUfo();\n }\n cambiaUfos = false;\n }\n\n // Mueve los disparos y los elimina los disparos de la nave Guardian\n if (disparoGuardian.getVisible()) {\n disparoGuardian.moverArriba();\n if (disparoGuardian.getPosicionY() <= 0) {\n disparoGuardian.setVisible(false);\n }\n }\n\n // Dispara, mueve y elimina los disparos de las naves Ufo\n disparaUfo();\n if (disparoUfo.getVisible()) {\n disparoUfo.moverAbajo();\n if (disparoUfo.getPosicionY() >= altoVentana) {\n disparoUfo.setVisible(false);\n }\n }\n\n // Mueve la nave Guardian hacia la izquierda\n if (moverIzquierda) {\n guardian.moverIzquierda();\n }\n // Mueve la nave Guardian hacia la derecha\n if (moverDerecha) {\n guardian.moverDerecha();\n }\n // Hace que la nave Guardian dispare\n if (disparar) {\n disparaGuardian();\n }\n }",
"public agendaVentana() {\n initComponents();\n setIconImage(new ImageIcon(this.getClass().getResource(\"/IMG/maqui.png\")).getImage());\n citasDAO = new CitasDAO();\n clienteDAO = new ClienteDAO();\n loadmodel();\n loadClientesCombo();\n loadClientesComboA();\n jTabbedPane1.setEnabledAt(2, false);\n\n }",
"public TelaCadastrarUsuarios() {\n initComponents();\n carregarTabela();\n carregarComboBoxFuncionarios();\n carregarImagens();\n }",
"void inicializaComponentes(){\r\n\t\t\r\n\t\t//Botão com status\r\n\t\ttgbGeral = (ToggleButton) findViewById(R.id.tgbGeral);\r\n\t\ttgbGeral.setOnClickListener(this);\r\n\t\ttgbMovimento = (ToggleButton) findViewById(R.id.tgbMovimento);\r\n\t\ttgbMovimento.setOnClickListener(this);\r\n\t\ttgbfogo = (ToggleButton) findViewById(R.id.tgbFogo);\r\n\t\ttgbfogo.setOnClickListener(this);\r\n\r\n\t\t//botão\r\n\t\tbtnTemperatura = (Button) findViewById(R.id.btnTemperatura);\r\n\t\tbtnTemperatura.setOnClickListener(this);\r\n\t\t\r\n\t\t//label\r\n\t\ttxtLegenda = (TextView) findViewById(R.id.txtSensorLegenda);\r\n\t}",
"private void setupEscenario3( )\n {\n String todasMarcadas, casillasSinMarca;\n String[] marcadas, noMarcadas;\n int casilla;\n // Prepara el tablero\n triqui = new Triqui( );\n\n // Primer jugador\n\n marcaJugador1 = \"X\";\n todasMarcadas = \"1,3,7,9\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador1 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador1 );\n casillasJugador1.add( new Integer( casilla ) );\n }\n\n // Segundo jugador\n\n marcaJugador2 = \"O\";\n todasMarcadas = \"2,4,6,8\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador2 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador2 );\n casillasJugador2.add( new Integer( casilla ) );\n }\n\n // Casillas sin marcar\n\n casillasSinMarca = \"5\";\n noMarcadas = casillasSinMarca.split( \",\" );\n casillasSinMarcar = new ArrayList( );\n\n for( int i = 0; i < noMarcadas.length; i++ )\n {\n casilla = Integer.parseInt( noMarcadas[ i ] );\n casillasSinMarcar.add( new Integer( casilla ) );\n }\n }",
"private void colocar(){\n setLayout(s);\n eleccion = new BarraEleccion(imagenes,textos);\n eleccion.setLayout(new GridLayout(4,4));\n eleccion.setBorder(BorderFactory.createTitledBorder(\n BorderFactory.createBevelBorder(5), \"SELECCIONA EL MAGUEY\",\n TitledBorder.CENTER, TitledBorder.TOP,new Font(\"Helvetica\",Font.BOLD,15),Color.WHITE));\n eleccion.setFondoImagen(imgFond);\n etqAlcohol = new JLabel(\"SELECCIONA EL GRADO DE ALCOHOL\");\n etqAlcohol.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\n etqAlcohol.setForeground(Color.WHITE);\n alcohol = new JComboBox<>();\n etqTipo = new JLabel(\"SELECCIONA EL TIPO DE MEZCAL\");\n etqTipo.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\n etqTipo.setForeground(Color.WHITE);\n tipo = new JComboBox<>();\n btnRegistrar = new JButton();\n btnRegistrar.setFont(new Font(\"Sylfaen\", Font.BOLD, 17));\n btnRegistrar.setText(\"Registrar\");\n btnRegistrar.setHorizontalAlignment(SwingConstants.CENTER);\n btnRegistrar.setActionCommand(\"registrar\");\n add(eleccion);\n add(etqAlcohol);\n add(alcohol);\n add(etqTipo);\n add(tipo);\n add(btnRegistrar);\n iniciarVistas();\n }",
"private void cargarTarjetaTuberculosis() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE, admision_seleccionada);\r\n\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\tIRutas_historia.PAGINA_HC_TUBERCULOSIS,\r\n\t\t\t\tIRutas_historia.LABEL_HC_TUBERCULOSIS, parametros);\r\n\t}",
"public CadastroCurso() {\n initComponents();\n configTela();\n }",
"public static void main(String[] args) {\n\t\t\n\t\tProvaCollezioni pc = new ProvaCollezioni();\n\t\t\n\t\tpc.spesa.add(\"latte\");\n\t\tpc.spesa.add(\"pane\");\n\t\tpc.spesa.add(\"biscotti\");\n\t\tpc.spesa.add(\"olio\");\n\t\tpc.spesa.add(\"biscotti\");\n\t\t\n\n\t\tSystem.out.println(pc.spesa.size());\n\t\t\n\t\tfor (String voce : pc.spesa) {\n\t\t\tpc.spesaFiltrata.add(voce);\n\t\t\tpc.spesaOrdinata.add(voce);\n\t\t}\n\n\t\tSystem.out.println(pc.spesaFiltrata.size());\n\t\tfor (String string : pc.spesaOrdinata) {\n\t\t\tSystem.out.println(string);\n\t\t}\n\t\t\n\t\tMap<String, String> regioni = new TreeMap<>();\n\t\t\n\t\tregioni.put(\"Piemonte\", \"Torino\");\n\t\tregioni.put(\"Lombardia\", \"Milano\");\n\t\tregioni.put(\"Toscana\", \"Firenze\");\n\t\tregioni.put(\"Puglia\", \"Bari\");\n\t\t\n\t\tSystem.out.println(regioni.size());\n\t\t\n\t\tSystem.out.println(regioni.get(\"Piemonte\"));\n\t\t\n\t\tSystem.out.println(regioni.keySet());\n\t\t\n\t\tSystem.out.println(regioni.values());\n\t\t\n//\t\tfor (String regione : regioni.keySet()) {\n//\t\t\tSystem.out.println(\"Il capoluogo della regione \" \n//\t\t\t\t\t\t\t+ regione \n//\t\t\t\t\t\t\t+ \" è: \" \n//\t\t\t\t\t\t\t+ regioni.get(regione));\n//\t\t}\n//\t\t\n\t\t\n\t\tfor (Entry<String, String> regione : regioni.entrySet()) {\n\t\t\tSystem.out.print(\"Il capoluogo della regione \" + regione.getKey());\n\t\t\tSystem.out.println(\" è: \" + regione.getValue());\n\t\t\tSystem.out.println(regione);\n\t\t}\n\t\t\n\t\t\n\t}",
"public void generarCuestionario() {\n setLayout(null);\n \n setTitle(\"Cuestionario de Fin de Curso\"); \n \n //Con el modelo construido debemos representar uestra pregunta\n //y mostrarala\n //Primero creamos las opciones\n \n Opcion op1 = new Opcion();\n op1.setTitulo(\"Londres\");\n op1.setCorrecta(false);\n\n Opcion op2 = new Opcion();\n op2.setTitulo(\"Roma\");\n op2.setCorrecta(false);\n\n Opcion op3 = new Opcion();\n op3.setTitulo(\"Paris\");\n op3.setCorrecta(true);\n\n Opcion op4 = new Opcion();\n op4.setTitulo(\"Oslo\");\n op4.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones = {op1, op2, op3, op4};\n Pregunta p1 = new Pregunta();\n p1.setTitulo(\"¿Cual es la capital de Francia\");\n p1.setOpciones(opciones);\n \n //Opiciones de la pregumta Numero 2\n Opcion op21 = new Opcion();\n op21.setTitulo(\"Atlantico\");\n op21.setCorrecta(false);\n\n Opcion op22 = new Opcion();\n op22.setTitulo(\"Indico\");\n op22.setCorrecta(false);\n\n Opcion op23 = new Opcion();\n op23.setTitulo(\"Artico\");\n op23.setCorrecta(false);\n\n Opcion op24 = new Opcion();\n op24.setTitulo(\"Pacifico\");\n op24.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones2 = {op21, op22, op23, op24};\n Pregunta p2 = new Pregunta();\n p2.setTitulo(\"¿Cual es el oceano más grande del mundo?\");\n p2.setOpciones(opciones2);\n \n //Opiciones de la pregumta Numero 3\n Opcion op31 = new Opcion();\n op31.setTitulo(\"Cristobal Colon\");\n op31.setCorrecta(true);\n\n Opcion op32 = new Opcion();\n op32.setTitulo(\"Cristobal Nodal\");\n op32.setCorrecta(false);\n\n Opcion op33 = new Opcion();\n op33.setTitulo(\"Cuahutemoc blanco\");\n op33.setCorrecta(false);\n\n Opcion op34 = new Opcion();\n op34.setTitulo(\"Cuahutemoc\");\n op34.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones3 = {op31, op32, op33, op34};\n Pregunta p3 = new Pregunta();\n p3.setTitulo(\"¿Quien descubrio América?\");\n p3.setOpciones(opciones3);\n \n //Opiciones de la pregumta Numero 4\n Opcion op41 = new Opcion();\n op41.setTitulo(\"Fernanflo\");\n op41.setCorrecta(false);\n\n Opcion op42 = new Opcion();\n op42.setTitulo(\"Polinesios\");\n op42.setCorrecta(false);\n\n Opcion op43 = new Opcion();\n op43.setTitulo(\"Eh vegeta\");\n op43.setCorrecta(true);\n\n Opcion op44 = new Opcion();\n op44.setTitulo(\"Willyrex\");\n op44.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones4 = {op41, op42, op43, op44};\n Pregunta p4 = new Pregunta();\n p4.setTitulo(\"¿Quien es el mejor youtuber?\");\n p4.setOpciones(opciones4);\n \n //Opiciones de la pregumta Numero 5\n Opcion op51 = new Opcion();\n op51.setTitulo(\"Amarillo patito\");\n op51.setCorrecta(false);\n\n Opcion op52 = new Opcion();\n op52.setTitulo(\"Verde Sherec\");\n op52.setCorrecta(false);\n\n Opcion op53 = new Opcion();\n op53.setTitulo(\"Rojo me faltas tú\");\n op53.setCorrecta(false);\n\n Opcion op54 = new Opcion();\n op54.setTitulo(\"Azul\");\n op54.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones5 = {op51, op52, op53, op54};\n Pregunta p5 = new Pregunta();\n p5.setTitulo(\"¿De que color es el cielo?\");\n p5.setOpciones(opciones5);\n \n //Opiciones de la pregumta Numero 6\n Opcion op61 = new Opcion();\n op61.setTitulo(\"200\");\n op61.setCorrecta(false);\n\n Opcion op62 = new Opcion();\n op62.setTitulo(\"100\");\n op62.setCorrecta(false);\n\n Opcion op63 = new Opcion();\n op63.setTitulo(\"45\");\n op63.setCorrecta(true);\n\n Opcion op64 = new Opcion();\n op64.setTitulo(\"13\");\n op64.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones6 = {op61, op62, op63, op64};\n Pregunta p6 = new Pregunta();\n p6.setTitulo(\"¿De cuantas localidades se compone una memoria de 8x5?\");\n p6.setOpciones(opciones6);\n \n //Opiciones de la pregumta Numero 7\n Opcion op71 = new Opcion();\n op71.setTitulo(\"Try - Catch\");\n op71.setCorrecta(false);\n\n Opcion op72 = new Opcion();\n op72.setTitulo(\"IF\");\n op72.setCorrecta(true);\n\n Opcion op73 = new Opcion();\n op73.setTitulo(\"Switch - Case\");\n op73.setCorrecta(false);\n\n Opcion op74 = new Opcion();\n op74.setTitulo(\"For anidado\");\n op74.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones7 = {op71, op72, op73, op74};\n Pregunta p7 = new Pregunta();\n p7.setTitulo(\"¿Que estructura condicional se recomienda usar menos en una interfaz de usuario?\");\n p7.setOpciones(opciones7);\n \n //Opiciones de la pregumta Numero 8\n Opcion op81 = new Opcion();\n op81.setTitulo(\"Access\");\n op81.setCorrecta(false);\n\n Opcion op82 = new Opcion();\n op82.setTitulo(\"Oracle\");\n op82.setCorrecta(false);\n\n Opcion op83 = new Opcion();\n op83.setTitulo(\"MySQL\");\n op83.setCorrecta(false);\n\n Opcion op84 = new Opcion();\n op84.setTitulo(\"Mongo DB\");\n op84.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones8 = {op81, op82, op83, op84};\n Pregunta p8 = new Pregunta();\n p8.setTitulo(\"¿Es una base de datos no relacional de uso moderno?\");\n p8.setOpciones(opciones8);\n \n //Opiciones de la pregumta Numero 9\n Opcion op91 = new Opcion();\n op91.setTitulo(\"GitHub\");\n op91.setCorrecta(true);\n\n Opcion op92 = new Opcion();\n op92.setTitulo(\"MIcrosoft teams\");\n op22.setCorrecta(false);\n\n Opcion op93 = new Opcion();\n op93.setTitulo(\"Zoom\");\n op93.setCorrecta(false);\n\n Opcion op94 = new Opcion();\n op94.setTitulo(\"Collaborate\");\n op94.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones9 = {op91, op92, op93, op94};\n Pregunta p9 = new Pregunta();\n p9.setTitulo(\"¿Es una plataforma para trabajo en línea?\");\n p9.setOpciones(opciones9);\n\n //Opiciones de la pregumta Numero 10\n Opcion op101 = new Opcion();\n op101.setTitulo(\"Prog. a nivel maquina\");\n op101.setCorrecta(false);\n\n Opcion op102 = new Opcion();\n op102.setTitulo(\"Prog. orientada a objetos\");\n op102.setCorrecta(true);\n\n Opcion op103 = new Opcion();\n op103.setTitulo(\"MySQL\");\n op103.setCorrecta(false);\n\n Opcion op104 = new Opcion();\n op104.setTitulo(\"C++\");\n op104.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones10 = {op101, op102, op103, op104};\n Pregunta p10 = new Pregunta();\n p10.setTitulo(\"¿Que aprendi en este curso?\");\n p10.setOpciones(opciones10);\n\n\n //Vamos a adaptar el cuestioanario a lo que ya teniamos\n Cuestionario c = new Cuestionario();\n //Creamos el list de preguntas\n\n //Se agrega a este list la unica prgunta que tenemos\n preguntas.add(p1);\n preguntas.add(p2);\n preguntas.add(p3);\n preguntas.add(p4);\n preguntas.add(p5);\n preguntas.add(p6);\n preguntas.add(p7);\n preguntas.add(p8);\n preguntas.add(p9);\n preguntas.add(p10);\n //A este list le vamos a proporcionar el valor del correspondiente\n //cuestioanrio\n c.setPreguntas(preguntas);\n//Primero ajustamos el titulo de la primer pregunta en la etiqueta de la preunta\n mostrarPregunta(preguntaActual);\n \n Salir.setVisible(false);\n siguiente.setEnabled(false);\n \n }",
"public void setControlador(Controlador controlador){\n \t\n \tcontMain = controlador;\n\n controladorInicio(controlador);\n controladorRegistro(controlador);\n controladorLogin(controlador);\n controladorAtras(controlador);\n\n controladorVistoNotif(controlador);\n\n controladorHome(controlador);\n controladorPerfil(controlador);\n controladorUser(controlador);\n controladorNuevoProyecto(controlador);\n controladorNuevoColectivo(controlador);\n controladorDisplayProject(controlador);\n controladorDisplayCollective(controlador);\n controladorInformes(controlador);\n \n controladorAdmin(controlador);\n controladorAdminConfig(controlador);\n controladorAdminUsuarios(controlador);\n controladorAdminProject(controlador);\n\n }",
"private void mostrarEstadoObjetosUsados() {\n Beneficiario beneficiario = null;\n FichaSocial fichaSocial = null;\n SolicitudBeneficio solicitudBeneficio = null;\n AspectoHabitacional aspectoHabitacional = null;\n AspectoEconomico aspectoEconomico = null;\n\n // CAMBIAR: Obtener datos del Request y asignarlos a los textField\n if (this.getRequestBean1().getObjetoABM() != null) {\n fichaSocial = (FichaSocial) this.getRequestBean1().getObjetoABM();\n aspectoHabitacional = (AspectoHabitacional) fichaSocial.getAspectoHabitacional();\n aspectoEconomico = (AspectoEconomico) fichaSocial.getAspectoEconomico();\n this.getElementoPila().getObjetos().set(0, fichaSocial);\n this.getElementoPila().getObjetos().set(1, aspectoHabitacional);\n this.getElementoPila().getObjetos().set(2, aspectoEconomico);\n }\n\n int ind = 0;\n fichaSocial = (FichaSocial) this.obtenerObjetoDelElementoPila(ind++, FichaSocial.class);\n aspectoHabitacional = (AspectoHabitacional) this.obtenerObjetoDelElementoPila(ind++, AspectoHabitacional.class);\n aspectoEconomico = (AspectoEconomico) this.obtenerObjetoDelElementoPila(ind++, AspectoEconomico.class);\n\n\n this.getTfCodigo().setText(fichaSocial.getNumero());\n this.getTfFecha().setText(Conversor.getStringDeFechaCorta(fichaSocial.getFecha()));\n ////\n //Beneficiarios:\n if (fichaSocial.getTitular() != null) {\n this.getTfTitular().setText(fichaSocial.toString());\n }\n\n this.setListaDelCommunication(new ArrayList(fichaSocial.getGrupoFamiliar()));\n this.getObjectListDataProvider().setList(new ArrayList(fichaSocial.getGrupoFamiliar()));\n\n //Aspecto habitacional:\n if (aspectoHabitacional.getNumeroPersonas() != null) {\n this.getTfNroPersonas().setText(aspectoHabitacional.getNumeroPersonas().toString());\n }\n this.getTfVivienda().setText(aspectoHabitacional.getVivienda());\n this.getTfTenencia().setText(aspectoHabitacional.getTenencia());\n this.getTfNroCamas().setText(aspectoHabitacional.getNumeroCamas());\n this.getTfNroAmbientes().setText(aspectoHabitacional.getNumeroAmbientes());\n this.getCbBanioCompleto().setValue(new Boolean(aspectoHabitacional.isBanioCompleto()));\n this.getCbBanioInterno().setValue(new Boolean(aspectoHabitacional.isBanioInterno()));\n this.getCbAgua().setValue(new Boolean(aspectoHabitacional.isAgua()));\n this.getCbLuz().setValue(new Boolean(aspectoHabitacional.isLuz()));\n this.getCbCloaca().setValue(new Boolean(aspectoHabitacional.isCloaca()));\n this.getCbGasNatural().setValue(new Boolean(aspectoHabitacional.isGasNatural()));\n\n //Aspecto Economico:\n this.getTfNroCasas().setText(aspectoEconomico.getNumeroCasas());\n this.getTfNroTerrenos().setText(aspectoEconomico.getNumeroTerrenos());\n this.getTfNroCampos().setText(aspectoEconomico.getNumeroCampos());\n this.getTfVehiculo().setText(aspectoEconomico.getVehiculo());\n this.getTfIndustria().setText(aspectoEconomico.getIndustria());\n this.getTfActividadLaboral().setText(aspectoEconomico.getActividadLaboral());\n this.getTfComercio().setText(aspectoEconomico.getComercio());\n\n //Solicitud Beneficio\n this.setListaDelCommunication2(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n this.getObjectListDataProvider2().setList(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n }",
"private void agregarComponentes() {\n JButton botonEstudiante = new JButton(\"Estudiante\");\r\n JButton botonDocente = new JButton(\"Docente\");\r\n JButton botonEquipo = new JButton(\"Equipo\");\r\n\r\n botonEstudiante.addActionListener(new OyenteListaEstudiante(this));\r\n botonDocente.addActionListener(new OyenteListaDocente(this));\r\n botonEquipo.addActionListener(new OyenteListaEquipo(this));\r\n\r\n // crea objeto Box para manejar la colocación de areaConsulta y\r\n // botonEnviar en la GUI\r\n Box boxNorte = Box.createHorizontalBox();\r\n boxNorte.add(botonDocente);\r\n boxNorte.add(botonEstudiante);\r\n boxNorte.add(botonEquipo);\r\n\r\n // crea delegado de JTable para modeloTabla\r\n tablaDatosIngresdos = new JTable();\r\n add(boxNorte, BorderLayout.NORTH);\r\n\r\n add(new JScrollPane(tablaDatosIngresdos), BorderLayout.CENTER);\r\n\r\n }",
"public void SolicitarDatos() {\n\t\t\r\n\t\tSystem.out.println(\"nombre:\");\r\n\t\tSystem.out.println(\"apellido\");\r\n\t\tSystem.out.println(\"numCedula\");\r\n\t\t\r\n\t}",
"public JanelaTipoContato() {\r\n initComponents();\r\n try {\r\n\r\n List<TipoContato> tipoContatos = (List<TipoContato>) (Object) tipoContatoDao.pesquisarTodos();\r\n adicionarListaTipoContatosTabela(tipoContatos);\r\n } catch (Exception exception) {\r\n }\r\n }",
"public void setNombreArea(String p) { this.nombreArea = p; }",
"private void crearComponentes(){\n\tjdpFondo.setSize(942,592);\n\t\n\tjtpcContenedor.setSize(230,592);\n\t\n\tjtpPanel.setTitle(\"Opciones\");\n\tjtpPanel2.setTitle(\"Volver\");\n \n jpnlPanelPrincilal.setBounds(240, 10 ,685, 540);\n \n }",
"public TaskCatagoryPageLocators() {\n }",
"public vistaAlojamientos() {\n initComponents();\n \n try {\n miConn = new Conexion(\"jdbc:mysql://localhost/turismo\", \"root\", \"\");\n ad = new alojamientoData(miConn);\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(vistaAlojamientos.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }",
"private void loadComponents() {\n\n //CARGANDO COMPONENTES\n this.nombres = findViewById(R.id.namep);\n this.precios = findViewById(R.id.precio);\n this.stocks = findViewById(R.id.stock);\n this.descripciones = findViewById(R.id.descripcion);\n this.cats = findViewById(R.id.btncategoria);\n this.estados = findViewById(R.id.editestado);\n this.image = findViewById(R.id.subim);\n\n //CARGAR BOTONES\n Button btnregistrarpro = findViewById(R.id.btnregistropro);\n btnregistrarpro.setOnClickListener(this);\n //parte de camara\n btn = (Button)findViewById(R.id.subimg);\n btn.setOnClickListener(this);\n img = findViewById(R.id.subim);\n\n ImageButton btnhome = findViewById(R.id.btnhome5);\n btnhome.setOnClickListener(this);\n }",
"private void cargarDatos()\n {\n // Pantalla carga\n showProgress(true, mView, mProgressView, getContext());\n Comando login = new LoginComando(KPantallas.PANTALLA_PERFIL);\n String email = UtilUI.getEmail(getContext());\n String password = UtilUI.getPassword(getContext());\n login.ejecutar(email,password);\n }"
] | [
"0.689724",
"0.6757442",
"0.63167995",
"0.5909211",
"0.59034157",
"0.5850165",
"0.5822957",
"0.5812472",
"0.57746005",
"0.5773516",
"0.57711136",
"0.57458764",
"0.57290536",
"0.57200366",
"0.5716181",
"0.5698409",
"0.56696546",
"0.5640471",
"0.5622915",
"0.56100976",
"0.5597891",
"0.5595283",
"0.55927336",
"0.5591049",
"0.55709875",
"0.5570638",
"0.5559749",
"0.55561763",
"0.55493826",
"0.5510116",
"0.5508773",
"0.5503013",
"0.54964894",
"0.5490766",
"0.5481196",
"0.5477783",
"0.54611325",
"0.5460299",
"0.5454322",
"0.54540336",
"0.54540336",
"0.54505134",
"0.54486126",
"0.5438635",
"0.5431059",
"0.5430994",
"0.54242903",
"0.54231757",
"0.54231757",
"0.54219794",
"0.54105437",
"0.54102546",
"0.5397346",
"0.5397346",
"0.5389123",
"0.53849447",
"0.53744495",
"0.53696823",
"0.53686255",
"0.53649724",
"0.5360815",
"0.53576404",
"0.53547233",
"0.53545773",
"0.5351124",
"0.53476226",
"0.5340345",
"0.5336166",
"0.5334636",
"0.5332193",
"0.5328036",
"0.5321816",
"0.53180325",
"0.5306794",
"0.5299895",
"0.52960783",
"0.52950543",
"0.52917564",
"0.52854556",
"0.5277555",
"0.52764875",
"0.5274631",
"0.5273945",
"0.5270703",
"0.5267149",
"0.52670956",
"0.5261525",
"0.52526796",
"0.5252602",
"0.5250261",
"0.524909",
"0.5248751",
"0.52482474",
"0.52454776",
"0.5238606",
"0.5237948",
"0.5228406",
"0.52258444",
"0.522388",
"0.5220611"
] | 0.559887 | 20 |
Cambia la lista de tareas | public void setTareas(ArrayList<Tarea> tareas) {
this.tareas = tareas;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mostrarTareas(){\n System.out.println(\"Tareas existentes:\");\n System.out.println(tareas);\n }",
"public List<Area> listarAreas(){\r\n return cVista.listarAreas();\r\n }",
"@Override\n\tpublic String getTareas() {\n\t\treturn \"TAREA COMERCIAL 3: VENDE MUCHO TODOS LOS DÍAS\";\n\t}",
"public ArrayList<Tarea> getTareas() {\n return tareas;\n }",
"public Todoist()\n {\n tareas = new ArrayList<String>();\n }",
"public Todoist()\n {\n tareas = new ArrayList<String>();\n }",
"private ArrayList<Tarea> getTareas(Date desde, Date hasta) {\n BDConsulter consulter = new BDConsulter(DATABASE_URL, DATABASE_USER, DATABASE_PASS);//genero la clase, que se conecta a la base postgresql\n consulter.connect();//establezco la conexion\n\n //Si no hay ningun integrante seleccionado, selecciono todos\n List<String> integrantesSeleccionados = jListIntegrantes.getSelectedValuesList();\n DefaultListModel<String> model = (DefaultListModel<String>) jListIntegrantes.getModel();\n List<String> integrantes = new ArrayList<String>();\n if (integrantesSeleccionados.size() == 0) {\n for (int i = 0; i < model.getSize(); i++) {\n System.out.println((model.getElementAt(i)));\n integrantes.add(model.getElementAt(i));\n }\n integrantesSeleccionados = integrantes;\n }\n\n ArrayList<Tarea> tareas = new ArrayList<>();\n for (String s : integrantesSeleccionados) {\n tareas.addAll(consulter.getTareas(desde, hasta, (String) jComboBoxProyecto.getSelectedItem(), (String) jComboBoxGrupos.getSelectedItem(), s));//obtengo las tareas creadas entre un rango de fecha dado\n }\n consulter.disconnect();//termino la conexion con la base//termino la conexion con la base\n return tareas;\n }",
"public void addTarea(String nombreTarea){\n tareas.add(nombreTarea);\n }",
"public void addTarea(String nombreTarea){\n tareas.add(nombreTarea);\n }",
"public void teclas() {\r\n\t\tif (app.key == '1') {\r\n\t\t\ttipoCom = 1;\r\n\t\t\tcaso1.clear();\r\n\t\t\tcaso2.clear();\r\n\t\t\tcaso3.clear();\r\n\t\t\tcaso4.clear();\r\n\t\t\tcaso1.addAll(persona);\r\n\t\t}\r\n\t\tif (app.key == '2') {\r\n\t\t\ttipoCom = 2;\r\n\t\t\tcaso1.clear();\r\n\t\t\tcaso2.clear();\r\n\t\t\tcaso3.clear();\r\n\t\t\tcaso4.clear();\r\n\t\t\tcaso2.addAll(persona);\r\n\t\t}\r\n\t\tif (app.key == '3') {\r\n\t\t\ttipoCom = 3;\r\n\t\t\tcaso1.clear();\r\n\t\t\tcaso2.clear();\r\n\t\t\tcaso3.clear();\r\n\t\t\tcaso4.clear();\r\n\t\t\tcaso3.addAll(persona);\r\n\t\t}\r\n\t\tif (app.key == '4') {\r\n\t\t\ttipoCom = 4;\r\n\t\t\tcaso1.clear();\r\n\t\t\tcaso2.clear();\r\n\t\t\tcaso3.clear();\r\n\t\t\tcaso4.clear();\r\n\t\t\tcaso4.addAll(persona);\r\n\t\t}\r\n\t}",
"private void listarDadosNaTelaEditora(ArrayList<Editora> lista) {\n DefaultTableModel modelEditoras = (DefaultTableModel) jTable_tabelaEditoras.getModel();\n jTable_tabelaEditoras.setRowSorter(new TableRowSorter(modelEditoras));\n //Limpando a tela\n modelEditoras.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[2];\n Editora aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = aux.getNome();\n modelEditoras.addRow(linha);\n }\n }",
"protected void cargarOfertas(List<ViajeCabecera> listaViajes){\n\n\t\tpanelOfertas.removeAll();\n\t\t\n\t\tint i = 0;\n\t\t\n\t\tfor (ViajeCabecera viaje : listaViajes) {\t\t\n\t\t\tagregarPanelOferta(viaje, i);\n\t\t\ti++;\n\t\t}\n\t\t\n\t}",
"private void listadoTipos() {\r\n sessionProyecto.getTipos().clear();\r\n sessionProyecto.setTipos(itemService.buscarPorCatalogo(CatalogoEnum.TIPOPROYECTO.getTipo()));\r\n }",
"public void cargarOfertas() {\r\n\t\tcoi.clearOfertas();\r\n\t\tController c = gui.getController();\r\n\t\tList<Integer> ofertas = c.ofertanteGetMisOfertas();\r\n\t\tfor (Integer id : ofertas) {\r\n\t\t\tString estado = c.ofertaGetEstado(id);\r\n\t\t\tif (estado.equals(GuiConstants.ESTADO_ACEPTADA) || estado.equals(GuiConstants.ESTADO_CONTRATADA)\r\n\t\t\t\t\t|| estado.equals(GuiConstants.ESTADO_RESERVADA)) {\r\n\t\t\t\tPanelOferta oferta = new PanelOferta(gui, id);\r\n\t\t\t\tcoi.addActiva(oferta);\r\n\t\t\t} else if (estado.equals(GuiConstants.ESTADO_PENDIENTE) || estado.equals(GuiConstants.ESTADO_PENDIENTE)) {\r\n\t\t\t\tPanelOferta oferta = new PanelOfertaEditable(gui, id);\r\n\t\t\t\tcoi.addPendiente(oferta);\r\n\t\t\t} else if (estado.equals(GuiConstants.ESTADO_RETIRADA)) {\r\n\t\t\t\tPanelOferta oferta = new PanelOferta(gui, id);\r\n\t\t\t\tcoi.addRechazada(oferta);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcoi.repaint();\r\n\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tscrollPane.getHorizontalScrollBar().setValue(0);\r\n\t\t\t\tscrollPane.getVerticalScrollBar().setValue(0);\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"private void cargaLista() {\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Aclaracion\", \"Aclaracion\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revision\", \"Revision\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revocatoria\", \"Revocatoria\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Subsidiaria\", \"Subsidiaria\"));\n \n }",
"private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }",
"public void Lista(){\n\t\tcabeza = null;\n\t\ttamanio = 0;\n\t}",
"private void iniciarListas() {\n listaBebidas = new ElementoMenu[7];\n listaBebidas[0] = new ElementoMenu(1, \"Coca\");\n listaBebidas[1] = new ElementoMenu(4, \"Jugo\");\n listaBebidas[2] = new ElementoMenu(6, \"Agua\");\n listaBebidas[3] = new ElementoMenu(8, \"Soda\");\n listaBebidas[4] = new ElementoMenu(9, \"Fernet\");\n listaBebidas[5] = new ElementoMenu(10, \"Vino\");\n listaBebidas[6] = new ElementoMenu(11, \"Cerveza\");\n// inicia lista de platos\n listaPlatos = new ElementoMenu[14];\n listaPlatos[0] = new ElementoMenu(1, \"Ravioles\");\n listaPlatos[1] = new ElementoMenu(2, \"Gnocchi\");\n listaPlatos[2] = new ElementoMenu(3, \"Tallarines\");\n listaPlatos[3] = new ElementoMenu(4, \"Lomo\");\n listaPlatos[4] = new ElementoMenu(5, \"Entrecot\");\n listaPlatos[5] = new ElementoMenu(6, \"Pollo\");\n listaPlatos[6] = new ElementoMenu(7, \"Pechuga\");\n listaPlatos[7] = new ElementoMenu(8, \"Pizza\");\n listaPlatos[8] = new ElementoMenu(9, \"Empanadas\");\n listaPlatos[9] = new ElementoMenu(10, \"Milanesas\");\n listaPlatos[10] = new ElementoMenu(11, \"Picada 1\");\n listaPlatos[11] = new ElementoMenu(12, \"Picada 2\");\n listaPlatos[12] = new ElementoMenu(13, \"Hamburguesa\");\n listaPlatos[13] = new ElementoMenu(14, \"Calamares\");\n// inicia lista de postres\n listaPostres = new ElementoMenu[15];\n listaPostres[0] = new ElementoMenu(1, \"Helado\");\n listaPostres[1] = new ElementoMenu(2, \"Ensalada de Frutas\");\n listaPostres[2] = new ElementoMenu(3, \"Macedonia\");\n listaPostres[3] = new ElementoMenu(4, \"Brownie\");\n listaPostres[4] = new ElementoMenu(5, \"Cheescake\");\n listaPostres[5] = new ElementoMenu(6, \"Tiramisu\");\n listaPostres[6] = new ElementoMenu(7, \"Mousse\");\n listaPostres[7] = new ElementoMenu(8, \"Fondue\");\n listaPostres[8] = new ElementoMenu(9, \"Profiterol\");\n listaPostres[9] = new ElementoMenu(10, \"Selva Negra\");\n listaPostres[10] = new ElementoMenu(11, \"Lemon Pie\");\n listaPostres[11] = new ElementoMenu(12, \"KitKat\");\n listaPostres[12] = new ElementoMenu(13, \"IceCreamSandwich\");\n listaPostres[13] = new ElementoMenu(14, \"Frozen Yougurth\");\n listaPostres[14] = new ElementoMenu(15, \"Queso y Batata\");\n }",
"private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }",
"public void mostrarNumeroTareasPendientes(){\n System.out.println(tareas.size());\n }",
"private final void inicializarListas() {\r\n\t\t//Cargo la Lista de orden menos uno\r\n\t\tIterator<Character> it = Constantes.LISTA_CHARSET_LATIN.iterator();\r\n\t\tCharacter letra;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tletra = it.next();\r\n\t\t\tthis.contextoOrdenMenosUno.crearCharEnContexto(letra);\r\n\t\t}\r\n\t\t\r\n\t\tthis.contextoOrdenMenosUno.crearCharEnContexto(Constantes.EOF);\r\n\t\t\r\n\t\tthis.contextoOrdenMenosUno.actualizarProbabilidades();\r\n\t\t\r\n\t\t//Cargo las listas de ordenes desde 0 al orden definido en la configuración\r\n\t\tOrden ordenContexto;\r\n\t\tfor (int i = 0; i <= this.orden; i++) {\r\n\t\t\tordenContexto = new Orden();\r\n\t\t\tthis.listaOrdenes.add(ordenContexto);\r\n\t\t}\r\n\t}",
"public void cargaDeDatos(List<List<Object>> Musuarios,List<List<Object>> Mtareas, List<List<Object>> Mrequisitos) {\r\n\tfor (List<Object> l: Musuarios) {\r\n\t\tam.addMiembro(new MiembroDeEquipo((int)l.get(0),(String)l.get(1)));\r\n\t}\r\n\t/**\r\n\t * Cargamos a la lista de administrador de tareas todas las tareas que se encuentran en la base de datos, \r\n\t * si no tiene miembro se le pone a null sino se le añade un miembro.\r\n\t */\r\n\tfor (List<Object> l: Mtareas) {\r\n\t\tat.addTarea(new Tarea((String)l.get(0),(int)l.get(1),(int)l.get(2),(int)l.get(3),(int)l.get(6)));\r\n\t\t//Si tiene un miembro asignado (cualquier id mayor que cero) le añade el miembro de equipo, sino null\r\n\t\tif(0 < (int)l.get(5)) {\r\n\t\t\tat.BuscarTarea((int)l.get(1)).setAsignadoA(am.BuscarMiembro((int) l.get(5)));\r\n\t\t}else {\r\n\t\t\tat.BuscarTarea((int)l.get(1)).setAsignadoA(null);\r\n\t\t}\r\n\t\t//Si tiene un requisito (cualquier id maor que cero) le añade el requisito, sino null\r\n\t\tif(0 < (int)l.get(4)) {\r\n\t\t\tat.BuscarTarea((int)l.get(1)).setRequisito(ar.BuscarRequisito((int) l.get(4)));\r\n\t\t}else {\r\n\t\t\tat.BuscarTarea((int)l.get(1)).setRequisito(null);\r\n\t\t}\r\n\t\tat.BuscarTarea((int)l.get(1)).setDescripcion((String)l.get(7));\r\n\t}\r\n\t/**\r\n\t * Cargamos la lista del administrador de requisitos con todos los requisitos que tenemos,\r\n\t * si el requisito tiene 5 atributos, será un defecto, sino será una historia de usuario\r\n\t */\r\n\tfor (List<Object> l: Mrequisitos) {\r\n\t\tHashSet<Tarea> lista = new HashSet<Tarea>();\r\n\t\t//Buscamos todas las tareas que tengan este requisito, para tener una lista de las tareas que este tiene\r\n\t\tfor(List<Object> t: Mtareas) {\r\n\t\t\t\r\n\t\t\tif((int)l.get(2)==(int)t.get(4)) {\r\n\t\t\t\tlista.add(at.BuscarTarea((int)t.get(1)));\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Creamos defecto o historiaDeUsuario, según sea el caso y lo añadimos a la lista generica de Requisitos.\r\n\t\tif(l.size()==5) {\r\n\t\t\tDefecto req = new Defecto((String)l.get(4),(String) l.get(0), (String)l.get(1),(int)l.get(2),lista);\r\n\t\t\tif((int)l.get(3)==1) {\r\n\t\t\treq.finalizar();\r\n\t\t\t}\r\n\t\t\tar.addRequisito(req);\r\n\t\t}else {\r\n\t\t\tRequisito req = new HistoriaDeUsuario((String) l.get(0), (String)l.get(1),(int)l.get(2));\r\n\t\t\tif(!lista.isEmpty()) {\r\n\t\t\t\treq.setRequisitos(lista);\r\n\t\t\t}\r\n\t\t\tif((int)l.get(3)==1) {\r\n\t\t\treq.finalizar();\r\n\t\t\t}\r\n\t\t\tar.addRequisito(req);\t\t\r\n\t\t}\r\n\t}\r\n\tfor (List<Object> l: Mtareas) {\r\n\t\t//Si tiene un requisito (cualquier id maor que cero) le añade el requisito, sino null\r\n\t\tif(0 < (int)l.get(4)) {\r\n\t\t\tat.BuscarTarea((int)l.get(1)).setRequisito(ar.BuscarRequisito((int) l.get(4)));\r\n\t\t}else {\r\n\t\t\tat.BuscarTarea((int)l.get(1)).setRequisito(null);\r\n\t\t}\r\n\t}\r\n}",
"public TelaListaOS() {\n initComponents();\n ConfigTelas ct = new ConfigTelas(this);\n ct.carregarConfig(this);\n \n this.jComboBoxOS.setVisible(false);\n }",
"private void listViewPendentes(List<Compra> listAll) {\n\t\t\n\t}",
"public ArrayList<String> mostraLlistaAtribs(){\n ArrayList<String> tauleta = new ArrayList<>();\n System.out.print(\"num atribs: \"+list.getNomLlista()+\"\\n\");\n String aux = list.getAtribs().get(0).getNom();\n for (int i=1; i<list.getAtribs().size(); i++){\n aux += \"\\t\" + list.getAtribs().get(i).getNom();\n }\n tauleta.add(aux);\n for (int j=0; j<list.getNumCasos(); j++) {\n aux = list.getAtribs().get(0).getCasos().get(j);\n for (int i = 1; i < list.getAtribs().size(); i++) {\n aux += \"\\t\" + list.getAtribs().get(i).getCasos().get(j);\n }\n tauleta.add(aux);\n }\n return tauleta;\n }",
"public String navigateAlunoTurmaList() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"AlunoTurma_items\", this.getSelected().getAlunoTurmaList());\n }\n return \"/pages/prime/alunoTurma/index\";\n }",
"@NonNull\n private List<ClickableArea> getClickableAreas() {\n\n List<ClickableArea> clickableAreas = new ArrayList<>();\n\n\n //X semakin besar jumlah angkanya KEKANAN ,\n // Y semakin besar jumlah angkanya KEBAWAH , W semakin besar angkanya semakin LEBAR\n // , H semakin besar angknay semakin PANJANG\n clickableAreas.add(new ClickableArea(100, 320, 200, 200, new State(\"R.ALAT LINEN\")));\n clickableAreas.add(new ClickableArea(450, 200, 200, 250, new State(\"DAPUR SUSU\")));\n clickableAreas.add(new ClickableArea(820, 200, 200, 250, new State(\"R.OBAT\")));\n clickableAreas.add(new ClickableArea(1300, 120, 200, 250, new State(\"NURSE STATION\")));\n clickableAreas.add(new ClickableArea(1700, 120, 200, 250, new State(\"SH\")));\n clickableAreas.add(new ClickableArea(950, 500, 150, 200, new State(\"PERINOTOLOGI\")));\n clickableAreas.add(new ClickableArea(380, 850, 200, 350, new State(\"BBRT NDN INFEKSIUS\")));\n clickableAreas.add(new ClickableArea(820, 750, 150, 150, new State(\"LAV\")));\n clickableAreas.add(new ClickableArea(980, 750, 150, 150, new State(\"LAV 2\")));\n clickableAreas.add(new ClickableArea(900, 1000, 100, 100, new State(\"BBRT INFEKSIUS\")));\n clickableAreas.add(new ClickableArea(1500, 1200, 100, 100, new State(\"BBRT DIARE\")));\n\n\n\n return clickableAreas;\n }",
"public List<String> guiaContableByTipoNominaTerceros(String idTipoNomina) {\n String guiaContableByTipoNominaTerceros = super.getQueryDefinition(\"guiaContableByTipoNominaTerceros\");\n \n Map<String, Object> mapValues = new HashMap<String, Object>();\n mapValues.put(\"idTipoNomina\", idTipoNomina);\n \n SqlParameterSource namedParameters = new MapSqlParameterSource(mapValues);\n DataSource ds = super.getJdbcTemplate().getDataSource();\n NamedParameterJdbcTemplate namedTemplate = new NamedParameterJdbcTemplate(ds);\n \n super.getJdbcTemplate().setFetchSize(100);\n \n return namedTemplate.query(guiaContableByTipoNominaTerceros, namedParameters, new GuiaContableAux());\n }",
"public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}",
"public void listaTemas() {\n\t\ttemas = temaEJB.listarTemas();\n\t}",
"public void cargarTablas(){\n ControladorEmpleados empleados= new ControladorEmpleados();\n ControladorProyectos proyectos= new ControladorProyectos();\n ControladorCasos casos= new ControladorCasos();\n actualizarListadoObservable(empleados.consultarEmpleadosAdminProyectos(ESTADO_ASIGNADO, TIPO_3),casos.consultarCasos(devolverUser()),casos.consultarTiposCaso());\n }",
"private void mostradados() {\r\n\t\tint in = 0;\r\n\r\n\t\tfor (Estado e : Estado.values()) {\r\n\t\t\tif (in == 0) {\r\n\t\t\t\tcmbx_estado.addItem(\"\");\r\n\t\t\t\tin = 1;\r\n\t\t\t}\r\n\t\t\tcmbx_estado.addItem(e.getNome());\r\n\t\t}\r\n\r\n\t\tfor (int x = 0; x < listacliente.size(); x++) {\r\n\t\t\tin = 0;\r\n\t\t\tif (x == 0) {\r\n\t\t\t\tcmbx_cidade.addItem(\"\");\r\n\t\t\t}\r\n\r\n\t\t\tfor (int y = 0; y < cmbx_cidade.getItemCount(); y++) {\r\n\t\t\t\tif (listacliente.get(x).getCidade().equals(cmbx_cidade.getItemAt(y).toString()))\r\n\t\t\t\t\tin++;\r\n\t\t\t\tif (in > 1)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (in < 1)\r\n\t\t\t\tcmbx_cidade.addItem(listacliente.get(x).getCidade());\r\n\t\t}\r\n\t}",
"public void MostrarListas (){\n Nodo recorrer=inicio; // esto sirve para que el elemento de la lista vaya recorriendo conforme se inserta un elemento\r\n System.out.println(); // esto nos sirve para dar espacio a la codificacion de la lista al imprimir \r\n while (recorrer!=null){ // esta secuencia iterativa nos sirve para repetir las opciones del menu\r\n System.out.print(\"[\" + recorrer.dato +\"]--->\");\r\n recorrer=recorrer.siguiente;\r\n }\r\n }",
"public List<Tripulante> obtenerTripulantes();",
"public List<Fortaleza> listarFortalezas(){\r\n return cVista.listarFortalezas();\r\n }",
"public List<Temas> ListarTemas(){\n try{\r\n Statement smtm = _cn.createStatement();\r\n \r\n List<Temas> temas = new ArrayList<>();\r\n \r\n ResultSet result = smtm.executeQuery(\"SELECT * FROM tema ORDER BY Id;\");\r\n \r\n while(result.next()){\r\n Temas tema = new Temas();\r\n tema.setId(result.getInt(\"Id\"));\r\n tema.setNombre(result.getString(\"Nombre\"));\r\n tema.setURL_Imagen(result.getString(\"URL_Imagen\"));\r\n \r\n temas.add(tema);\r\n }\r\n \r\n return temas;\r\n \r\n }\r\n catch(Exception e){\r\n return null;\r\n }\r\n }",
"List<TipoHuella> listarTipoHuellas();",
"List<Area> list();",
"public Tarea(String descripcionTarea)\n {\n //Añade la descripción de la tarea\n descripcion = descripcionTarea;\n tareaCompletada = false;\n //Por defecto, las tareas tienen prioridad 0\n prioridad = 0;\n //Las nuevas tareas no tienen fecha de vencimiento\n fechaVencimiento = null;\n }",
"@Override\n public List<Area> getAllAreas() {\n return new ArrayList<>(areas.values());\n }",
"public List getTrabajadores();",
"public void mostrarTareasNumeradas(){\n int numeroPosicion = 1;\n for (String tarea : tareas){\n System.out.println(numeroPosicion + \". \" + tarea);\n numeroPosicion = numeroPosicion + 1;\n }\n }",
"public ListaEtiquetas() {\n this.listaEtiquetas = new ArrayList<>();\n }",
"private void cargarTarjetaTuberculosis() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE, admision_seleccionada);\r\n\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\tIRutas_historia.PAGINA_HC_TUBERCULOSIS,\r\n\t\t\t\tIRutas_historia.LABEL_HC_TUBERCULOSIS, parametros);\r\n\t}",
"private void rutasToTabla(){\n //Cargamos base de datos.\n ManejadorBD db = new ManejadorBD(getApplicationContext());\n //Obtenemos todas las rutas de la base de datos\n ArrayList<Ruta> rutas = db.obtenerRutas();\n\n ListView lista = (ListView) findViewById(R.id.ListView_listado);\n //Cada ruta estará almacenada en una listview que mostrará la información de la misma.\n lista.setAdapter(new com.asimov.sportroutes.General.ListAdapter(this, R.layout.info_ruta, rutas) {\n @Override\n public void onEntrada(Object entrada, View view) {\n if (entrada != null) {\n //Mostramos el nombre\n TextView nombre = (TextView) view.findViewById(R.id.textNombre);\n if (nombre != null)\n nombre.setText(((Ruta) entrada).getNombre());\n //Mostramos el mejor tiempo.\n TextView mejor = (TextView) view.findViewById(R.id.textMejor);\n if (mejor != null)\n mejor.setText(((Ruta) entrada).getTiempoMejorHumano());\n //Mostramos el ultimo tiempo.\n TextView ultimo = (TextView) view.findViewById(R.id.textUltimo);\n if (ultimo != null)\n ultimo.setText(((Ruta) entrada).getTiempoUltimoHumano());\n final TextView ciudad = (TextView) view.findViewById(R.id.textViewCiudad);\n final ImageView img = (ImageView) view.findViewById(R.id.imageViewClima);\n final TextView temp = (TextView) view.findViewById(R.id.textViewTemperatura);\n if (!mostrarTiempo){\n img.setVisibility(View.INVISIBLE);\n }\n if(!mostrarTemperatura){\n temp.setVisibility(View.INVISIBLE);\n }\n\n //lo mismo para el clima\n LatLng coordenada = ((Ruta) entrada).getCoordenadas().get(0);\n class ClimaAsincrono extends AsyncTask<String, Void, Clima> {\n\n @Override\n protected Clima doInBackground(String... params) {\n Clima clima = new Clima();\n String data = ((new ClimaClienteHttp()).getClima(params[0], params[1]));\n\n try {\n clima = jsonClimaParser.getWeather(data);\n\n clima.iconDrawable = ((new ClimaClienteHttp()).getImagen(clima.currentCondition.getIcon()));\n Log.d(\"LOGD\", clima.currentCondition.getIcon() );\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return clima;\n\n }\n\n @Override\n protected void onPostExecute(Clima clima) {\n super.onPostExecute(clima);\n img.setImageDrawable(clima.iconDrawable);\n temp.setText(String.valueOf(clima.temperature.getTemp() + \" ºC\"));\n String textAux =clima.localizacion.getCiudad() + \", \" + clima.localizacion.getPais();\n ciudad.setText(textAux);\n }\n }\n ClimaAsincrono peticion = new ClimaAsincrono();\n peticion.execute(String.valueOf(coordenada.latitude),\n String.valueOf(coordenada.longitude));\n }\n }\n });\n //Indicamos lo que le pasa al elemento al ser clicado\n lista.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Ruta rPulsada = (Ruta) parent.getItemAtPosition(position);\n Intent intent = new Intent(getApplicationContext(),VerRutaActivity.class);\n intent.putExtra(\"ruta\", rPulsada);\n startActivity(intent);\n }\n });\n }",
"@Override\n\tpublic ArrayList<Lista> listaListeElettorali() {\n\t\t\t\n\t\t\t\n\t\t\tDB db = getDB();\n\t\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\t\t\tArrayList<Lista> liste = new ArrayList<Lista>();\n\t\t\tSet<Integer> keys = map.keySet();\n\t\t\tfor (int key : keys) {\n\t\t\t\tliste.add(map.get(key));\n\t\t\t}\n\t\n\t\t\treturn liste;\n\t\t\t\n\t\t}",
"@GET\n\t@Path(\"/tipos\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic ArrayList<TipoAutoDTO> listarTipos(){\n\t\tSystem.out.println(\"ini: listarTipos()\");\n\t\t\n\t\tTipoAutoService tipoService = new TipoAutoService();\n\t\tArrayList<TipoAutoDTO> lista = tipoService.ListadoTipoAuto();\n\t\t\n\t\tif (lista == null) {\n\t\t\tSystem.out.println(\"Listado Vacío\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Consulta Exitosa\");\n\t\t}\n\n\t\tSystem.out.println(\"fin: listarTipos()\");\n\t\t\n\t\treturn lista;\n\t}",
"public void agregarPlanetasAAtaque(java.util.List<Ataque> listaAtaques, java.util.List<Planetas> listaPlanetas){\n Planetas planetas;\n for (int i = 0; i < listaAtaques.size(); i++) {\n Ataque ataque = listaAtaques.get(i);\n for (int j = 0; j < listaPlanetas.size(); j++) {\n planetas = listaPlanetas.get(j);\n if (ataque.getPlanetaDestino().getNombre().equalsIgnoreCase(planetas.getNombre())) {\n ataque.setPlanetaDestino(planetas);\n } else if (ataque.getPlanetaOrigen().getNombre().equalsIgnoreCase(planetas.getNombre())) {\n ataque.setPlanetaOrigen(planetas);\n }\n } \n }\n }",
"public void setLista(List<Rectangulo> lista) {\n this.lista = lista;\n }",
"public void llenarOpciones(ArrayList<String> mezcales,ArrayList<String> porcentajes,ArrayList<String> tipos){\n for (String p : porcentajes) {\n alcohol.addItem(p + \"%\");\n }\n for (String t : tipos) {\n tipo.addItem(t);\n }\n String nombreMezcales[] = new String[mezcales.size()];\n for (int i = 0; i < mezcales.size(); i++) {\n nombreMezcales[i] = mezcales.get(i);\n }\n eleccion.setTextos(nombreMezcales);\n revalidate();\n }",
"public void listaFuncionarios() {\n this.telaFuncionario.mensagemListaFuncionarios();\n for (Funcionario funcionarioCadastrado : funcionarioDAO.getList()) { //funcionariosDAO list - coloca tudo em um arrayzao e depois manda pra tela\n int matricula = funcionarioCadastrado.getMatricula();\n String nome = funcionarioCadastrado.getNome();\n String dataNascimento = funcionarioCadastrado.getDataNascimento();\n int telefone = funcionarioCadastrado.getTelefone();\n int salario = funcionarioCadastrado.getSalario();\n Cargo cargo = funcionarioCadastrado.getCargo();\n this.telaFuncionario.exibeFuncionario(matricula, nome, dataNascimento, telefone, salario, cargo);\n }\n exibeMenuFuncionario();\n }",
"public void inicializarListaMascotas()\n {\n //creamos un arreglo de objetos y le cargamos datos\n mascotas = new ArrayList<>();\n mascotas.add(new Mascota(R.drawable.elefante,\"Elefantin\",0));\n mascotas.add(new Mascota(R.drawable.conejo,\"Conejo\",0));\n mascotas.add(new Mascota(R.drawable.tortuga,\"Tortuga\",0));\n mascotas.add(new Mascota(R.drawable.caballo,\"Caballo\",0));\n mascotas.add(new Mascota(R.drawable.rana,\"Rana\",0));\n }",
"private void carregarAlunosTurma() {\n AcessoFirebase.getFirebase().addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n getUidUsuariosTurma(dataSnapshot);\n montandoArrayListUsuarios(dataSnapshot);\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }",
"public TareasEvento() {\n initComponents();\n setTitle (\"Tareas\");\n mostrardatos(jTextField1.getText());\n \n }",
"@Override\r\n\tpublic List<Turista> conMasPuntos() {\n\t\treturn (List<Turista>) turistaDAO.conMasPuntos();\r\n\t}",
"public List<Tripulante> buscarTodosTripulantes();",
"public void listar() {\n\t\t\n\t}",
"public List<Listas_de_las_Solicitudes> Mostrar_las_peticiones_que_han_llegado_al_Usuario_Administrador(int cedula) {\n\t\t//paso3: Obtener el listado de peticiones realizadas por el usuario\n\t\tEntityManagerFactory entitymanagerfactory = Persistence.createEntityManagerFactory(\"LeyTransparencia\");\n\t\tEntityManager entitymanager = entitymanagerfactory.createEntityManager();\n\t\tentitymanager.getEntityManagerFactory().getCache().evictAll();\n\t\tQuery consulta4=entitymanager.createQuery(\"SELECT g FROM Gestionador g WHERE g.cedulaGestionador =\"+cedula);\n\t\tGestionador Gestionador=(Gestionador) consulta4.getSingleResult();\n\t\t//paso4: Obtener por peticion la id, fecha y el estado\n\t\tList<Peticion> peticion=Gestionador.getEmpresa().getPeticions();\n\t\tList<Listas_de_las_Solicitudes> peticion2 = new ArrayList();\n\t\t//paso5: buscar el area de cada peticion\n\t\tfor(int i=0;i<peticion.size();i++){\n\t\t\tString almcena=\"\";\n\t\t\tString sarea=\"no posee\";\n\t\t\tBufferedReader in;\n\t\t\ttry{\n\t\t\t\tin = new BufferedReader(new InputStreamReader(new FileInputStream(\"C:/area/area\"+String.valueOf(peticion.get(i).getIdPeticion())+\".txt\"), \"utf-8\"));\n\t\t\t\ttry {\n\t\t\t\t\twhile((sarea=in.readLine())!=null){\n\t\t\t\t\t\tint s=0;\n\t\t\t\t\t\talmcena=sarea;\n\t\t\t\t\t}\n\t\t\t\t\tin.close();\n\t\t\t\t\tSystem.out.println(almcena);\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\t\n\t\t\t\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\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}\n\t\t\t\n\t\t\t//paso6: Mostrar un listado de peticiones observando el id, la fecha de realizacion de la peticion, hora de realizacion de la peticion, y el estado actual de la peticion\n\t\t\tListas_de_las_Solicitudes agregar=new Listas_de_las_Solicitudes();\n\t\t\tagregar.setId(String.valueOf(peticion.get(i).getIdPeticion()));\n\t\t\tagregar.setFechaPeticion(peticion.get(i).getFechaPeticion());\n\t\t\tagregar.setNombreestado(peticion.get(i).getEstado().getTipoEstado());\n\t\t\tagregar.setArea(almcena);\n\t\t\tpeticion2.add(agregar);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"el usuario existe\");\n\t\treturn peticion2;\n\t\t//aun no se\n\t}",
"public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}",
"public void populateListaObjetos() {\n listaObjetos.clear();\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n String tipo = null;\n if (selectedTipo.equals(\"submenu\")) {\n tipo = \"menu\";\n } else if (selectedTipo.equals(\"accion\")) {\n tipo = \"submenu\";\n }\n\n Criteria cObjetos = session.createCriteria(Tblobjeto.class);\n cObjetos.add(Restrictions.eq(\"tipoObjeto\", tipo));\n Iterator iteObjetos = cObjetos.list().iterator();\n while (iteObjetos.hasNext()) {\n Tblobjeto o = (Tblobjeto) iteObjetos.next();\n listaObjetos.add(new SelectItem(new Short(o.getIdObjeto()).toString(), o.getNombreObjeto(), \"\"));\n }\n } catch (HibernateException e) {\n //logger.throwing(getClass().getName(), \"populateListaObjetos\", e);\n } finally {\n session.close();\n }\n }",
"public void crearAtracciones(){\n \n //Añado atracciones tipo A\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new A();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo B\n for (int i = 0; i < 6 ; i++){\n Atraccion atraccion = new B();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo C\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new C();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo D\n for (int i = 0; i < 3 ; i++){\n Atraccion atraccion = new D();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo E\n for (int i = 0; i < 7 ; i++){\n Atraccion atraccion = new E();\n atracciones.add(atraccion);\n }\n \n }",
"public ArrayList<Equipamento> todos() {\n return new ArrayList<>(lista.values());\n }",
"public void consultarListaDeContatos() {\n\t\tfor (int i = 0; i < listaDeContatos.size(); i++) {\n\t\t\tSystem.out.printf(\"%d %s \\n\", i, listaDeContatos.get(i));\n\t\t}\n\t}",
"public void tacoArray() {\n\n\n ArrayList<String> tacos = new ArrayList<>();\n tacos.add(\"blah\");\n tacos.add(\"blah2\");\n tacos.add(\"blah3\");\n tacos.add(\"blah4\");\n tacos.add(\"blah5\");\n }",
"public JanelaTipoContato() {\r\n initComponents();\r\n try {\r\n\r\n List<TipoContato> tipoContatos = (List<TipoContato>) (Object) tipoContatoDao.pesquisarTodos();\r\n adicionarListaTipoContatosTabela(tipoContatos);\r\n } catch (Exception exception) {\r\n }\r\n }",
"private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela PressaoArterial\\n\");\n\t\tpressaoArterial = new PressaoArterial();\n\t\tlistaPressaoArterial = pressaoArterialService.buscarTodos();\n\n\t}",
"public void Listar() {\n try {\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n this.listaApelaciones.clear();\n setListaApelaciones(apelacionesDao.cargaApelaciones());\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void cargarAutorizaciones() {\r\n\t\tif (parametros_empresa != null) {\r\n\t\t\tif (parametros_empresa.getTrabaja_autorizacion()) {\r\n\t\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\t\tadmision_seleccionada);\r\n\r\n\t\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\t\tIRutas_historia.PAGINA_AUTORIZACIONES,\r\n\t\t\t\t\t\t\"AUTORIZACIONES\", parametros);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@WebMethod(operationName = \"BuscarTareas\")\n public ArrayList<Tarea> BuscarTareas(@WebParam(name = \"idPro\") int idPro) throws SQLException {\n Acciones a = new Acciones();\n \n return a.buscarTarea(idPro);\n }",
"public void listar() {\r\n Collections.sort(coleccion);\r\n for (int i = 0; i < coleccion.size(); i++) {\r\n String resumen = (coleccion.get(i).toString());\r\n JOptionPane.showMessageDialog(null, resumen);\r\n }\r\n }",
"private void criaListaOrdenada(List<Tipo> listaOrdenada, List<AgrupamentoTipoBean> valoresMap) {\n\t\tfor (AgrupamentoTipoBean agrupamentoTipoBean : valoresMap) {\n\t\t\tlistaOrdenada.add(agrupamentoTipoBean.getTipoEvento());\n\t\t}\n\t}",
"private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }",
"public void listarAlunosNaDisciplina(){\r\n for(int i = 0;i<alunos.size();i++){\r\n System.out.println(alunos.get(i).getNome());\r\n }\r\n }",
"public static List<Object> czytaniePogody(){\r\n Object[] elementyPogody = new Object[3];\r\n elementyPogody[0]=0;\r\n elementyPogody[1]=0;\r\n elementyPogody[2]=null;\r\n String line;\r\n OdczytZPliku plik = new OdczytZPliku();\r\n InputStream zawartosc = plik.pobierzZPliku(\"bazapogod.txt\");\r\n try (InputStreamReader odczyt = new InputStreamReader(zawartosc, StandardCharsets.UTF_8);\r\n BufferedReader czytaj = new BufferedReader(odczyt)) {\r\n String numerWStringu = String.valueOf(elementyPogody[0] = (int) (Math.random() * 4));\r\n while ((line = czytaj.readLine()) != null){\r\n if (line.equals(numerWStringu)){\r\n elementyPogody[1] = Integer.parseInt(czytaj.readLine());\r\n elementyPogody[2] = czytaj.readLine();\r\n System.out.println(\"\\nPogoda na dzis: \" + elementyPogody[2]);\r\n break;\r\n }\r\n else {\r\n for (int i = 0; i < 2; i++) {\r\n line = czytaj.readLine();\r\n }\r\n }\r\n }\r\n } catch (Exception ignored) {\r\n }\r\n return List.of(elementyPogody);\r\n }",
"private static void listaProdutosCadastrados() throws Exception {\r\n String nomeCategoria;\r\n ArrayList<Produto> lista = arqProdutos.toList();\r\n if (!lista.isEmpty()) {\r\n System.out.println(\"\\t** Lista dos produtos cadastrados **\\n\");\r\n }\r\n for (Produto p : lista) {\r\n if (p != null && p.getID() != -1) {\r\n nomeCategoria = getNomeCategoria(p.idCategoria - 1);\r\n System.out.println(\r\n \"Id: \" + p.getID()\r\n + \"\\nNome: \" + p.nomeProduto\r\n + \"\\nDescricao: \" + p.descricao\r\n + \"\\nPreco: \" + tf.format(p.preco)\r\n + \"\\nMarca: \" + p.marca\r\n + \"\\nOrigem: \" + p.origem\r\n );\r\n if (nomeCategoria != null) {\r\n System.out.println(\"Categoria: \" + nomeCategoria);\r\n } else {\r\n System.out.println(\"Categoria: \" + p.idCategoria);\r\n }\r\n System.out.println();\r\n Thread.sleep(500);\r\n }\r\n }\r\n }",
"public void listarDadosNaTelaAreaDeConhecimento(ArrayList<AreaDeConhecimento> lista, DefaultTableModel model) {\n model.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[3];\n AreaDeConhecimento aux = lista.get(pos);\n linha[0] = \"\" + aux.getId();\n linha[1]=aux.getClassificacaoDecimalDireito();\n linha[2] = aux.getDescricao();\n model.addRow(linha);\n }\n }",
"public int getNumeroTareasPendientes(){\n return tareas.size();\n }",
"public void setPacchetti(List<Pacchetto> pacchetti);",
"private void cargarTablaConPaquetes() {\n tcId.setCellValueFactory(\n new PropertyValueFactory<Paquete, String>(\"codigo\"));\n tcdescripcion.setCellValueFactory(\n new PropertyValueFactory<Paquete, String>(\"descripcion\"));\n tcDestino.setCellValueFactory(\n new PropertyValueFactory<Paquete, String>(\"destino\"));\n tcEntregado.setCellValueFactory(\n new PropertyValueFactory<Paquete, Boolean>(\"entregado\"));\n\n tbPaqueteria.setItems(data);\n tbPaqueteria.getSelectionModel().selectFirst();\n\n //TODO futura implementacion\n //setDobleClickFila();\n }",
"public void iniciarTabuleiro(JogoTrilha tabuleiro){\n String corInicial = \"vazia\";\n \n for(int i = 0; i < nomeCasa.size(); i++){\n casas.put(nomeCasa.get(i), new Casa(nomeCasa.get(i)));\n casas.get(nomeCasa.get(i)).setCor(corInicial);\n } \n }",
"public VistaAllLotes() {\n initComponents();\n controlFinca = new ControlFincas();\n controlLote = new ControLotes();\n ListamodeloLotes = new ArrayList<>();\n EncabezadoTblLotes = new String[]{\n \"No\",\"Bloque\", \"Número\", \"Área Total\", \"Fuente Hidrica\", \"Modificar\", \"Eliminar\"\n };\n lblId_Bloque.setVisible(false);\n modeloLotes = new ModeloLotes();\n idFinca = \"\";\n AreaBloque = \"\";\n fila = -1;\n CargarListaFincas();\n CargarListaFuentesHidricas();\n LimpiarFomulario();\n InicializarTblLotes();\n }",
"public List<Tipousr> findAllTipos(){\n\t\t List<Tipousr> listado;\n\t\t Query q;\n\t\t em.getTransaction().begin();\n\t\t q=em.createQuery(\"SELECT u FROM Tipousr u ORDER BY u.idTipousr\");\n\t\t listado= q.getResultList();\n\t\t em.getTransaction().commit();\n\t\t return listado;\n\t\t \n\t\t}",
"@Override\r\n\tpublic List<Tramite_presentan_info_impacto> lista() {\n\t\treturn tramite.lista();\r\n\t}",
"public ListaPracownikow() {\n generujPracownikow();\n //dodajPracownika();\n }",
"public void listadoCarreras() {\r\n try {\r\n this.sessionProyecto.getCarreras().clear();\r\n this.sessionProyecto.getFilterCarreras().clear();\r\n this.sessionProyecto.getCarreras().addAll(sessionUsuarioCarrera.getCarreras());\r\n this.sessionProyecto.setFilterCarreras(this.sessionProyecto.getCarreras());\r\n } catch (Exception e) {\r\n }\r\n }",
"public ArrayList<String> mostraRegles(){\n ArrayList<String> tauleta = new ArrayList<>();\n String aux = reg.getAssignacions().get(0).getAntecedents().getRangs().get(0).getNom();\n for (int i=1; i<list.getAtribs().size(); i++){\n aux += \"\\t\" + list.getAtribs().get(i).getNom();\n }\n tauleta.add(aux);\n for (int j=0; j<list.getNumCasos(); j++) {\n aux = list.getAtribs().get(0).getCasos().get(j);\n for (int i = 1; i < list.getAtribs().size(); i++) {\n aux += \"\\t\" + list.getAtribs().get(i).getCasos().get(j);\n }\n tauleta.add(aux);\n }\n return tauleta;\n }",
"public void mostrarDados() {\n txtId.setText(\"\" + lista.get(indice).getId());\n txtNome.setText(lista.get(indice).getNome());\n txtEmail.setText(lista.get(indice).getEmail());\n txtSenha.setText(lista.get(indice).getSenha());\n preencheTabela();\n }",
"protected void caricaListaContoTesoreria() throws WebServiceInvocationFailureException {\n\t\tList<ContoTesoreria> listaInSessione = sessionHandler.getParametro(BilSessionParameter.LISTA_CONTO_TESORERIA);\n\t\tif(listaInSessione == null) {\n\t\t\tLeggiContiTesoreria request = model.creaRequestLeggiContiTesoreria();\n\t\t\tlogServiceRequest(request);\n\t\t\tLeggiContiTesoreriaResponse response = preDocumentoSpesaService.leggiContiTesoreria(request);\n\t\t\tlogServiceResponse(response);\n\t\t\t\n\t\t\t// Controllo gli errori\n\t\t\tif(response.hasErrori()) {\n\t\t\t\t//si sono verificati degli errori: esco.\n\t\t\t\taddErrori(response);\n\t\t\t\tthrow new WebServiceInvocationFailureException(\"caricaListaContoTesoreria\");\n\t\t\t}\n\t\t\t\n\t\t\tlistaInSessione = response.getContiTesoreria();\n\t\t\tsessionHandler.setParametro(BilSessionParameter.LISTA_CONTO_TESORERIA, listaInSessione);\n\t\t}\n\t\t\n\t\tmodel.setListaContoTesoreria(listaInSessione);\n\t}",
"public List<Talla> obtenTallas() throws Exception {\r\n IntAdmInventario inv = new FacAdmInventario();\r\n\r\n return inv.obtenListaTallas();\r\n }",
"public void obrniListu() {\n if (prvi != null && prvi.veza != null) {\n Element preth = null;\n Element tek = prvi;\n \n while (tek != null) {\n Element sled = tek.veza;\n \n tek.veza = preth;\n preth = tek;\n tek = sled;\n }\n prvi = preth;\n }\n }",
"private void setearOpcionesMenuCobros()\r\n\t{\r\n\t\tArrayList<FormularioVO> lstFormsMenuCobros = new ArrayList<FormularioVO>();\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t/*Buscamos los Formulairos correspondientes a este TAB*/\r\n\t\tfor (FormularioVO formularioVO : this.permisos.getLstPermisos().values()) {\r\n\t\t\t\r\n\t\t\tif(\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_INGRESO_COBRO) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_INGRESO_COBRO_OTRO) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_INGRESO_EGRESO) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_GASTOS) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_DEPOSITO) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_CONCILIACION) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_INGRESO_EGRESO_OTRO))\r\n\t\t\t\t\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tlstFormsMenuCobros.add(formularioVO);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t/*Si hay formularios para el tab*/\r\n\t\tif(lstFormsMenuCobros.size()> 0)\r\n\t\t{\r\n\r\n\t\t\tthis.layoutMenu = new VerticalLayout();\r\n\t\t\t//this.tabMantenimientos.setMargin(true);\r\n\t\t\t\r\n\t\t\tthis.lbCobros.setVisible(true);\r\n\t\t\tthis.layoutMenu.addComponent(this.lbCobros);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor (FormularioVO formularioVO : lstFormsMenuCobros) {\r\n\t\t\t\t\r\n\t\t\t\tswitch(formularioVO.getCodigo())\r\n\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_INGRESO_COBRO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_INGRESO_COBRO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarIngresoCobro();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.ingCobro);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_INGRESO_COBRO_OTRO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_INGRESO_COBRO_OTRO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarOtroCobro();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.otroCobro);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_INGRESO_EGRESO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_INGRESO_EGRESO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarIngresoEgreso();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.ingEgreso);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_INGRESO_EGRESO_OTRO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_INGRESO_EGRESO_OTRO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarOtroEgreso();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.otroEgreso);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\r\n\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_GASTOS:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_GASTOS, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarGastos();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.gastos);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\r\n\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_DEPOSITO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_DEPOSITO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarDeposito();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.deposito);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_CONCILIACION:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_CONCILIACION, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarConciliacion();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.conciliacion);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\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\tthis.menuItems.addComponent(this.layoutMenu);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"private void initializeTecnico() {\r\n\t\t\r\n\t\tcontroleAtividade = new ControleAtividade();\r\n\t\t\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 640, 480);\r\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\t\r\n\t\tframe.setTitle(\"Avaliar atividade pendente\");\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tGroupLayout groupLayout = new GroupLayout(frame.getContentPane());\r\n\t\tgroupLayout.setHorizontalGroup(\r\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addComponent(panel, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 624, Short.MAX_VALUE)\r\n\t\t);\r\n\t\tgroupLayout.setVerticalGroup(\r\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addComponent(panel, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 442, Short.MAX_VALUE)\r\n\t\t);\r\n\t\t\r\n\t\t//TODO Popular a lista dinamicamente;\r\n\t\t\r\n\t\tlist = new JList();\r\n\t\t\r\n\t\tList<Atividade> atividadesPendentes = controleAtividade.recuperarAtividades(Status.PENDENTE);\t\t\r\n\t\tatividadesPendentesArray = new Atividade[atividadesPendentes.size()];\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < atividadesPendentesArray.length; i++)\r\n\t\t\tatividadesPendentesArray[i] = (Atividade) atividadesPendentes.get(i);\r\n\r\n\t\t\r\n\t\tlist.setListData(atividadesPendentesArray);\r\n\t\t\r\n\t\tlist.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\t//TODO Seria interessante passar o controle como parametro, afim de usa-lo no listener dos botoes;\r\n\t\t\t\tif(atividadesPendentesArray.length > 0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tAtividade atividade = (Atividade) list.getSelectedValue();\r\n\t\t\t\t\t\r\n\t\t\t\t\tjanelaDeDecisao = new ViewDecisaoAtividadesPendentes(atividade);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJLabel lblAtividadesPendendentes = new JLabel(\"Atividades pendentes:\");\r\n\t\t\r\n\t\tbtnFechar = new JButton(\"Fechar\");\r\n\t\t\r\n\t\tbtnFechar.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\t//TODO Seria interessante passar o controle como parametro, afim de usa-lo no listener dos botoes;\r\n\t\t\t\tframe.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tGroupLayout gl_panel = new GroupLayout(panel);\r\n\t\tgl_panel.setHorizontalGroup(\r\n\t\t\tgl_panel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addComponent(list, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 604, Short.MAX_VALUE)\r\n\t\t\t\t\t\t.addComponent(lblAtividadesPendendentes)\r\n\t\t\t\t\t\t.addComponent(btnFechar, Alignment.TRAILING))\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tgl_panel.setVerticalGroup(\r\n\t\t\tgl_panel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel.createSequentialGroup()\r\n\t\t\t\t\t.addGap(23)\r\n\t\t\t\t\t.addComponent(lblAtividadesPendendentes)\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 26, Short.MAX_VALUE)\r\n\t\t\t\t\t.addComponent(list, GroupLayout.PREFERRED_SIZE, 338, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addComponent(btnFechar)\r\n\t\t\t\t\t.addGap(7))\r\n\t\t);\r\n\t\tpanel.setLayout(gl_panel);\r\n\t\tframe.getContentPane().setLayout(groupLayout);\r\n\t}",
"private void cargarNotasAclaratorias() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\tparametros.put(\"tipo\", INotas.NOTAS_ACLARATORIAS);\r\n\t\ttabboxContendor\r\n\t\t\t\t.abrirPaginaTabDemanda(false, \"/pages/nota_aclaratoria.zul\",\r\n\t\t\t\t\t\t\"NOTAS ACLARATORIAS\", parametros);\r\n\t}",
"public TrazAqui(){\n this.utilizadores = new TreeMap<>();\n this.encomendas = new TreeMap<>();\n this.utilizador = null;\n }",
"private void setSpnAlunosTurma(){\n ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, listaNomesUsuarios);\n spnAlunosTurma.setAdapter(arrayAdapter);\n spnAlunosTurma.setSelection(0);\n }",
"public void listar(){\r\n // Verifica si la lista contiene elementoa.\r\n if (!esVacia()) {\r\n // Crea una copia de la lista.\r\n Nodo aux = inicio;\r\n // Posicion de los elementos de la lista.\r\n int i = 0;\r\n // Recorre la lista hasta el final.\r\n while(aux != null){\r\n // Imprime en pantalla el valor del nodo.\r\n System.out.print(i + \".[ \" + aux.getValor() + \" ]\" + \" -> \");\r\n // Avanza al siguiente nodo.\r\n aux = aux.getSiguiente();\r\n // Incrementa el contador de la posión.\r\n i++;\r\n }\r\n }\r\n }",
"protected abstract List<OpcionMenu> inicializarOpcionesMenu();",
"private void listadoEstados() {\r\n sessionProyecto.getEstados().clear();\r\n sessionProyecto.setEstados(itemService.buscarPorCatalogo(CatalogoEnum.ESTADOPROYECTO.getTipo()));\r\n }",
"void setPosiblesTipos(String[] tipos);",
"private void crearElementos() {\n\n\t\tRotonda rotonda1 = new Rotonda(new Posicion(400, 120), \"5 de octubre\");\n\t\tthis.getListaPuntos().add(rotonda1);\n\n\t\tCiudad esquel = new Ciudad(new Posicion(90, 180), \"Esquel\");\n\t\tthis.getListaPuntos().add(esquel);\n\n\t\tCiudad trelew = new Ciudad(new Posicion(450, 200), \"Trelew\");\n\t\tthis.getListaPuntos().add(trelew);\n\n\t\tCiudad comodoro = new Ciudad(new Posicion(550, 400), \"Comodoro\");\n\t\tthis.getListaPuntos().add(comodoro);\n\n\t\tCiudad rioMayo = new Ciudad(new Posicion(350, 430), \"Rio Mayo\");\n\t\tthis.getListaPuntos().add(rioMayo);\n\n\t\t// --------------------------------------------------------\n\n\t\tRutaDeRipio rutaRipio = new RutaDeRipio(230, 230, rotonda1, esquel);\n\t\tthis.getListaRuta().add(rutaRipio);\n\n\t\tRutaPavimentada rutaPavimentada1 = new RutaPavimentada(380, 100, trelew, comodoro);\n\t\tthis.getListaRuta().add(rutaPavimentada1);\n\n\t\tRutaPavimentada rutaPavimentada2 = new RutaPavimentada(800, 120, esquel, comodoro);\n\t\tthis.getListaRuta().add(rutaPavimentada2);\n\n\t\tRutaDeRipio rutaripio3 = new RutaDeRipio(380, 100, trelew, comodoro);\n\t\tthis.getListaRuta().add(rutaripio3);\n\n\t\tRutaEnConstruccion rutaConst1 = new RutaEnConstruccion(180, 70, rioMayo, comodoro);\n\t\tthis.getListaRuta().add(rutaConst1);\n\n\t\tRutaPavimentada rutaPavimentada3 = new RutaPavimentada(600, 110, rioMayo, esquel);\n\t\tthis.getListaRuta().add(rutaPavimentada3);\n\t}"
] | [
"0.750336",
"0.6916344",
"0.6885585",
"0.6780947",
"0.67487776",
"0.67487776",
"0.6707711",
"0.6549792",
"0.6549792",
"0.64306206",
"0.639542",
"0.6340102",
"0.6236714",
"0.621827",
"0.62087375",
"0.61904514",
"0.6148703",
"0.6106191",
"0.6105349",
"0.6093442",
"0.6074739",
"0.6068929",
"0.60499185",
"0.60255986",
"0.60163313",
"0.59898096",
"0.5942912",
"0.5932418",
"0.59290135",
"0.59273005",
"0.5915911",
"0.5907727",
"0.5905017",
"0.5878396",
"0.58761233",
"0.58710444",
"0.5869576",
"0.5865808",
"0.5853562",
"0.5844508",
"0.5835881",
"0.58168983",
"0.5815943",
"0.581192",
"0.580269",
"0.5801825",
"0.579792",
"0.5793698",
"0.578562",
"0.57855284",
"0.5776539",
"0.5771627",
"0.5766102",
"0.5734542",
"0.5730423",
"0.5724804",
"0.5718804",
"0.57136816",
"0.5711791",
"0.5706614",
"0.57052314",
"0.56988114",
"0.5685195",
"0.5681325",
"0.5676873",
"0.56759477",
"0.5656307",
"0.5653527",
"0.56467605",
"0.5646592",
"0.5643947",
"0.56363106",
"0.56323004",
"0.5628147",
"0.56219476",
"0.5620692",
"0.5613303",
"0.5613168",
"0.56094784",
"0.5607571",
"0.5607294",
"0.55914766",
"0.55825055",
"0.5575374",
"0.5571708",
"0.5563923",
"0.55587685",
"0.55428964",
"0.55411637",
"0.55254185",
"0.55072963",
"0.55063957",
"0.55016375",
"0.54865575",
"0.5478488",
"0.54783887",
"0.547001",
"0.54660344",
"0.54600817",
"0.54595184"
] | 0.7416705 | 1 |
elenco di tutte le lezioni | public List<BitOrarioOraLezione> get() {
List<BitOrarioOraLezione> ris = new ArrayList<>();
for (ArrayList<BitOrarioOraLezione>[] riga : orario) {
if (riga != null)
for (ArrayList<BitOrarioOraLezione> v : riga) {
if (v != null)
for (BitOrarioOraLezione bitOrarioOraLezione : v) {
if (bitOrarioOraLezione != null)
ris.add(bitOrarioOraLezione);
}
}
}
return ris;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void notificaAlgiocatore(int azione, Giocatore g) {\n\r\n }",
"public void MieiOrdini()\r\n {\r\n getOrdini();\r\n\r\n }",
"public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}",
"public void regolaOrdineInMenu(int codRiga) {\n\n /** variabili e costanti locali di lavoro */\n Modulo moduloPiatto = null;\n Modulo moduloRighe = null;\n\n Campo campoOrdineRiga = null;\n\n int codPiatto = 0;\n int codiceMenu = 0;\n int codiceCategoria = 0;\n\n Filtro filtro = null;\n\n int ordineMassimo = 0;\n Integer nuovoOrdine = null;\n int valoreOrdine = 0;\n Integer valoreNuovo = null;\n\n Object valore = null;\n int[] chiavi = null;\n int chiave = 0;\n\n try { // prova ad eseguire il codice\n\n /* regolazione variabili di lavoro */\n moduloRighe = this.getModulo();\n moduloPiatto = this.getModuloPiatto();\n campoOrdineRiga = this.getModulo().getCampoOrdine();\n\n /* recupera il codice del piatto dalla riga */\n valore = moduloRighe.query().valoreCampo(RMP.CAMPO_PIATTO, codRiga);\n codPiatto = Libreria.objToInt(valore);\n\n /* recupera il codice del menu dalla riga */\n valore = moduloRighe.query().valoreCampo(RMP.CAMPO_MENU, codRiga);\n codiceMenu = Libreria.objToInt(valore);\n\n /* recupera il codice categoria dal piatto */\n valore = moduloPiatto.query().valoreCampo(Piatto.CAMPO_CATEGORIA, codPiatto);\n codiceCategoria = Libreria.objToInt(valore);\n\n /* crea un filtro per ottenere tutte le righe comandabili di\n * questa categoria esistenti nel menu */\n filtro = this.filtroRigheCategoriaComandabili(codiceMenu, codiceCategoria);\n\n /* aggiunge un filtro per escludere la riga corrente */\n filtro.add(this.filtroEscludiRiga(codRiga));\n\n /* determina il massimo numero d'ordine tra le righe selezionate dal filtro */\n ordineMassimo = this.getModulo().query().valoreMassimo(campoOrdineRiga, filtro);\n\n /* determina il nuovo numero d'ordine da assegnare alla riga */\n if (ordineMassimo != 0) {\n nuovoOrdine = new Integer(ordineMassimo + 1);\n } else {\n nuovoOrdine = new Integer(1);\n } /* fine del blocco if-else */\n\n /* apre un \"buco\" nella categoria spostando verso il basso di una\n * posizione tutte le righe di questa categoria che hanno un numero\n * d'ordine uguale o superiore al numero d'ordine della nuova riga\n * (sono le righe non comandabili) */\n\n /* crea un filtro per selezionare le righe non comandabili della categoria */\n filtro = filtroRigheCategoriaNonComandabili(codiceMenu, codiceCategoria);\n\n /* aggiunge un filtro per escludere la riga corrente */\n filtro.add(this.filtroEscludiRiga(codRiga));\n\n /* recupera le chiavi dei record selezionati dal filtro */\n chiavi = this.getModulo().query().valoriChiave(filtro);\n\n /* spazzola le chiavi */\n for (int k = 0; k < chiavi.length; k++) {\n chiave = chiavi[k];\n valore = this.getModulo().query().valoreCampo(campoOrdineRiga, chiave);\n valoreOrdine = Libreria.objToInt(valore);\n valoreNuovo = new Integer(valoreOrdine + 1);\n this.getModulo().query().registraRecordValore(chiave, campoOrdineRiga, valoreNuovo);\n } // fine del ciclo for\n\n /* assegna il nuovo ordine alla riga mettendola nel buco */\n this.getModulo().query().registraRecordValore(codRiga, campoOrdineRiga, nuovoOrdine);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }",
"private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}",
"public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"private void remplirUtiliseData() {\n\t}",
"private void aggiornamento()\n {\n\t gestoreTasti.aggiornamento();\n\t \n\t /*Se lo stato di gioco esiste eseguiamo il suo aggiornamento.*/\n if(Stato.getStato() != null)\n {\n \t Stato.getStato().aggiornamento();\n }\n }",
"@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}",
"public static void viaggia(List<Trasporto> lista,Taxi[] taxi,HandlerCoR h) throws SQLException\r\n {\n Persona app = (Persona) lista.get(0);\r\n /* ARGOMENTI handleRequest\r\n 1° Oggetto Request\r\n 2° Array Taxi per permettere la selezione e la modifica della disponibilità\r\n */\r\n h.handleRequest(new RequestCoR(app.getPosPartenza(),app.getPosArrivo(),taxi),taxi); \r\n SceltaPercorso tempo = new SceltaPercorso();\r\n SceltaPercorso spazio = new SceltaPercorso();\r\n tempo.setPercorsoStrategy(new timeStrategy());\r\n spazio.setPercorsoStrategy(new lenghtStrategy());\r\n for(int i=0;i<5;i++)\r\n if(!taxi[i].getLibero())\r\n {\r\n if(Scelta.equals(\"veloce\"))\r\n {\r\n JOptionPane.showMessageDialog(null,\"Hai Scelto il Percorso più Veloce...\");\r\n Connessione conn;\r\n conn = Connessione.getConnessione();\r\n String query = \"Delete from CRONOCORSE where PASSEGGERO = ? \";\r\n try (PreparedStatement ps = conn.connect.prepareStatement(query)) {\r\n ps.setString(1, app.getNome());\r\n ps.executeUpdate();\r\n ps.close();\r\n JOptionPane.showMessageDialog(null,\"Cliente in viaggio...\\n\"+app.getNome()+\" è arrivato a destinazione!\\nPrezzo Corsa: \"+taxi[i].getPrezzoTotale()+\"€\");\r\n \r\n \r\n }catch(SQLException e){JOptionPane.showMessageDialog(null,e);}\r\n tempo.Prenota(taxi[i]); \r\n app.setPosPartenza();\r\n taxi[i].setPosizione(app.getPosArrivo());\r\n taxi[i].setStato(true);\r\n taxi[i].clear();\r\n lista.set(0,app);\r\n i=5;\r\n \r\n } else\r\n \r\n {\r\n JOptionPane.showMessageDialog(null,\"Hai Scelto il Percorso più Breve...\");\r\n Connessione conn;\r\n conn = Connessione.getConnessione();\r\n String query = \"Delete from CRONOCORSE where PASSEGGERO = ? \";\r\n try (PreparedStatement ps = conn.connect.prepareStatement(query)) {\r\n ps.setString(1, app.getNome());\r\n ps.executeUpdate();\r\n ps.close();\r\n JOptionPane.showMessageDialog(null,\"Cliente in viaggio...\\n\"+app.getNome()+\" è arrivato a destinazione!\\nPrezzo Corsa: \"+taxi[i].getPrezzoTotale()+\"€\");\r\n \r\n \r\n }catch(SQLException e){JOptionPane.showMessageDialog(null,e);}\r\n spazio.Prenota(taxi[i]); \r\n app.setPosPartenza();\r\n taxi[i].setPosizione(app.getPosArrivo());\r\n taxi[i].setStato(true);\r\n taxi[i].clear();\r\n lista.set(0,app);\r\n i=5;\r\n \r\n \r\n }\r\n }\r\n \r\n }",
"@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }",
"public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }",
"@Override\n\tvoid geraDados() {\n\n\t}",
"private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n Dati dati;\n\n try { // prova ad eseguire il codice\n\n this.setMessaggio(\"Analisi in corso\");\n this.setBreakAbilitato(true);\n\n /* recupera e registra i dati delle RMP da elaborare */\n dati = getDatiRMP();\n this.setDati(dati);\n\n /* regola il fondo scala dell'operazione */\n this.setMax(dati.getRowCount());\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"public void verEstado(){\n for(int i = 0;i <NUMERO_AMARRES;i++) {\n System.out.println(\"Amarre nº\" + i);\n if(alquileres.get(i) == null) {\n System.out.println(\"Libre\");\n }\n else{\n System.out.println(\"ocupado\");\n System.out.println(alquileres.get(i));\n } \n }\n }",
"public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }",
"@Test\r\n\tpublic void testFineTurno() {\r\n\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\tthis.giocatori.add(new Giocatore());\r\n\t\t\tfor (int j = 0; j < 4; j++) {\r\n\t\t\t\tthis.giocatori.get(i).getFamigliare(j).setPosizionato(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.giocatoreDiTurno = this.giocatori.get(1);\r\n\t\tassertTrue(this.giocatoreDelTurnoSuccessivo(giocatoreDiTurno) == null);\r\n\t}",
"@Override\n public void interagit() {\n super.interagit();\n ArrayList<EtreVivant> cibles = this.ciblesPotentiellesAdjacentes(this.getPosition(),this.nombreVoisins);\n cibles.stream().filter((vivants) -> (vivants.getEtat().equals(EtatEtreVivant.MALADE))).forEach((vivants) -> {\n this.soigne(vivants);\n });\n }",
"public void mostrarTareasEnPosicionImpar(){}",
"public void mostrarlistafininicio(){\n if(!estaVacia()){\n String datos = \"<=>\";\n NodoBus auxiliar = fin;\n while(auxiliar!=null){\n datos = datos + \"(\" + auxiliar.dato +\")->\";\n auxiliar = auxiliar.ant;\n JOptionPane.showMessageDialog(null, datos, \"Mostrando lista de fin a inicio\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n }",
"public void recibeOrden() {\r\n\t\tSystem.out.println(\"Ordene mi General\");\r\n\t}",
"private void limpiarDatos() {\n\t\t\n\t}",
"private void llenarListado1() {\r\n\t\tString sql1 = Sentencia1()\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tdet.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor det.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\t\tString sql2 = Sentencia2()\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarLista(sql1, sql2);\r\n\t}",
"public void operacao();",
"public void accionAtaques(int i) throws SQLException{\r\n if(turno ==0){\r\n if(pokemon_activo1.getCongelado() == false || pokemon_activo1.getDormido() == false){\r\n if(pokemon_activo1.getConfuso() == true && (int)(Math.random()*100) > 50){\r\n// inflingirDaño(pokemon_activo1.getMovimientos()[i], pokemon_activo1, pokemon_activo1);\r\n// System.out.println(\"El pokemon se ha hecho daño a si mismo!\");\r\n// try {\r\n// creg.guardarRegistroSimulacion(\"El pokemon se ha hecho daño a si mismo\");\r\n// } catch (IOException ex) {\r\n// Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n// }\r\n }\r\n else{\r\n inflingirDaño(pokemon_activo1.getMovimientos()[i], pokemon_activo2, pokemon_activo1);\r\n if(pokemon_activo2.getVida_restante() <= 0){\r\n pokemon_activo2.setVida_restante(0);\r\n pokemon_activo2.setDebilitado(true);\r\n JOptionPane.showMessageDialog(this.vc, \"El Pokemon: \"+ pokemon_activo2.getPseudonimo()+\" se ha Debilitado\", \"Debilitado\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"El Pokemon: \"+ pokemon_activo2.getPseudonimo()+\" se ha Debilitado\");\r\n try {\r\n creg.guardarRegistroSimulacion(\"El Pokemon: \"+ pokemon_activo2.getPseudonimo()+\" se ha Debilitado\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if(condicionVictoria(getEquipo1(), getEquipo2()) == true){\r\n JOptionPane.showMessageDialog(this.vc, \"El Ganador de este Combate es:\"+ entrenador1.getNombre(), \"Ganador\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"El Ganador de este Combate es:\"+ entrenador1.getNombre());\r\n try {\r\n creg.guardarRegistroSimulacion(\"El Ganador de este Combate es:\"+ entrenador1.getNombre());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n vc.dispose();\r\n vpc.dispose();\r\n combate.setGanador(entrenador1);\r\n combate.setPerdedor(entrenador2);\r\n termino = true;\r\n if(esLider == true){\r\n cmed.ganoCombate();\r\n }\r\n }\r\n else if(getEquipo2()[0].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[0]; \r\n }\r\n else if(getEquipo2()[1].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[1]; \r\n }\r\n else if(getEquipo2()[2].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[2]; \r\n }\r\n else if(getEquipo2()[3].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[3]; \r\n }\r\n else if(getEquipo2()[4].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[4]; \r\n }\r\n else if(getEquipo2()[5].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[5]; \r\n }\r\n vc.setjL_nombrepokemon2(pokemon_activo2.getPseudonimo());\r\n vc.setjL_especie2(pokemon_activo2.getNombre_especie());\r\n vc.setjL_Nivel2(pokemon_activo2.getNivel());\r\n \r\n }\r\n va.setVisible(false);\r\n vc.setjL_Turno_actual(entrenador2.getNombre());\r\n vc.setjL_vida_actual1(pokemon_activo1.getVida_restante(), pokemon_activo1.getVida());\r\n vc.setjL_vida_actual2(pokemon_activo2.getVida_restante(), pokemon_activo2.getVida());\r\n if(tipo_simulacion == 1){\r\n JOptionPane.showMessageDialog(this.vc, \"Turno\"+\" \"+entrenador2.getNombre(), \"Tu Turno\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"Turno\"+\" \"+entrenador2.getNombre());\r\n try {\r\n creg.guardarRegistroSimulacion(\"Turno\"+\" \"+entrenador2.getNombre());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n vc.turnoJugador2();\r\n this.turno = 1;\r\n }\r\n else if(tipo_simulacion == 2){\r\n if(termino==false){\r\n turnoSistema();\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n System.out.println(\"El pokemon no puede atacar\");\r\n try {\r\n creg.guardarRegistroSimulacion(\"El pokemon no puede atacar\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if((int)(Math.random()*3) == 1){ //1/3 de probabilidad de desactivar el efecto\r\n pokemon_activo1.setCongelado(false);\r\n pokemon_activo1.setDormido(false);\r\n }\r\n }\r\n \r\n }\r\n else if(turno ==1){\r\n if(pokemon_activo2.getCongelado() == false || pokemon_activo2.getDormido() == false){\r\n if(pokemon_activo2.getConfuso() == true && (int)(Math.random()*100) > 50){\r\n// inflingirDaño(pokemon_activo2.getMovimientos()[i], pokemon_activo2, pokemon_activo2);\r\n// System.out.println(\"El pokemon se ha hecho daño a si mismo!\");\r\n// try {\r\n// creg.guardarRegistroSimulacion(\"El pokemon se ha hecho daño a si mismo!\");\r\n// } catch (IOException ex) {\r\n// Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n// }\r\n }\r\n else{\r\n inflingirDaño(pokemon_activo2.getMovimientos()[i], pokemon_activo1, pokemon_activo2);\r\n if(pokemon_activo1.getVida_restante() <= 0){\r\n pokemon_activo1.setVida_restante(0);\r\n pokemon_activo1.setDebilitado(true);\r\n JOptionPane.showMessageDialog(this.vc, \"El Pokemon: \"+ pokemon_activo1.getPseudonimo()+\" se ha Debilitado\", \"Debilitado\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"El Pokemon: \"+ pokemon_activo1.getPseudonimo()+\" se ha Debilitado\");\r\n try {\r\n creg.guardarRegistroSimulacion(\"El Pokemon: \"+ pokemon_activo1.getPseudonimo()+\" se ha Debilitado\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if(condicionVictoria(getEquipo1(), getEquipo2()) == true){\r\n JOptionPane.showMessageDialog(this.vc, \"El Ganador de este Combate es:\"+ entrenador2.getNombre(), \"Ganador\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"El Ganador de este Combate es:\"+ entrenador2.getNombre());\r\n try {\r\n creg.guardarRegistroSimulacion(\"El Ganador de este Combate es:\"+ entrenador2.getNombre());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n vc.dispose();\r\n vpc.dispose();\r\n combate.setGanador(entrenador2);\r\n combate.setPerdedor(entrenador1);\r\n }\r\n else if(getEquipo1()[0].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[0]; \r\n }\r\n else if(getEquipo1()[1].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[1]; \r\n }\r\n else if(getEquipo1()[2].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[2]; \r\n }\r\n else if(getEquipo1()[3].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[3]; \r\n }\r\n else if(getEquipo1()[4].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[4]; \r\n }\r\n else if(getEquipo1()[5].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[5]; \r\n }\r\n vc.setjL_nombrepokemon1(pokemon_activo1.getPseudonimo());\r\n vc.setjL_especie1(pokemon_activo1.getNombre_especie());\r\n vc.setjL_Nivel1(pokemon_activo1.getNivel());\r\n }\r\n va.setVisible(false);\r\n vc.setjL_Turno_actual(entrenador1.getNombre());\r\n vc.setjL_vida_actual1(pokemon_activo1.getVida_restante(), pokemon_activo1.getVida());\r\n vc.setjL_vida_actual2(pokemon_activo2.getVida_restante(), pokemon_activo2.getVida());\r\n JOptionPane.showMessageDialog(this.vc, \"Turno\"+\" \"+entrenador1.getNombre(), \"Tu Turno\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"Turno\"+\" \"+entrenador1.getNombre());\r\n try {\r\n creg.guardarRegistroSimulacion(\"Turno\"+\" \"+entrenador1.getNombre());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n vc.turnoJugador1();\r\n this.turno = 0;\r\n }\r\n }\r\n else {\r\n System.out.println(\"El pokemon no puede atacar\");\r\n try {\r\n creg.guardarRegistroSimulacion(\"El pokemon no puede atacar\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if((int)(Math.random()*3) == 1){ //1/3 de probabilidad de desactivar el efecto\r\n pokemon_activo2.setCongelado(false);\r\n pokemon_activo2.setDormido(false);\r\n }\r\n }\r\n }\r\n setLabelEstados(1);\r\n setLabelEstados(0); \r\n \r\n }",
"private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }",
"public void mostrarFatura() {\n\n int i;\n System.err.println(\"Fatura do contrato:\\n\");\n\n if (hospedesCadastrados.isEmpty()) {//caso nao existam hospedes\n System.err.println(\"Nao existe hospedes cadastrados\\n\");\n\n } else {\n System.err.println(\"Digite o cpf do hospede:\\n\");\n\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {//roda os hospedes cadastrados\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//pega o hospede pelo cpf\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//caso a situacao do contrato ainda estaja ativa\n\n System.err.println(\"Nome do hospede:\" + hospedesCadastrados.get(i).getNome());\n System.err.println(\"CPF:\" + hospedesCadastrados.get(i).getCpf() + \"\\n\");\n System.err.println(\"Servicos pedidos:\\nCarros:\");\n if (!(hospedesCadastrados.get(i).getContrato().getCarrosCadastrados() == null)) {\n System.err.println(hospedesCadastrados.get(i).getContrato().getCarrosCadastrados().toString());\n System.err.println(\"Total do serviço de aluguel de carros R$:\" + hospedesCadastrados.get(i).getContrato().getContaFinalCarros() + \"\\n\");//;\n } else {\n System.err.println(\"\\nO hospede nao possui carros cadastrados!\\n\");\n }\n System.err.println(\"Quartos:\");\n if (!(hospedesCadastrados.get(i).getContrato().getQuartosCadastrados() == null)) {\n System.err.println(hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().toString());\n System.err.println(\"Total do servico de quartos R$:\" + hospedesCadastrados.get(i).getContrato().getContaFinalQuartos() + \"\\n\");//;\n } else {\n System.err.println(\"\\nO hospede nao possui Quartos cadastrados!\\n\");\n }\n System.err.println(\"Restaurante:\");\n System.err.println(\"Total do servico de restaurante R$: \" + hospedesCadastrados.get(i).getContrato().getValorRestaurante() + \"\\n\");\n System.err.println(\"Total de horas de BabySitter contratatas:\" + hospedesCadastrados.get(i).getContrato().getHorasBaby() / 45 + \"\\n\"\n + \"Total do servico de BabySitter R$:\" + hospedesCadastrados.get(i).getContrato().getHorasBaby() + \"\\n\");\n System.err.println(\"Total Fatura final: R$\" + hospedesCadastrados.get(i).getContrato().getContaFinal());\n //para limpar as disponibilidades dos servicos\n //carros, quarto, contrato e hospede\n //é necessario remover o hospede?\n// \n\n } else {//caso o contrato esteja fechado\n System.err.println(\"O hospede encontra-se com o contrato fechado!\");\n }\n }\n\n }\n }\n }",
"public void calculEtatSuccesseur() { \r\n\t\tboolean haut = false,\r\n\t\t\t\tbas = false,\r\n\t\t\t\tgauche = false,\r\n\t\t\t\tdroite = false,\r\n\t\t\t\thautGauche = false,\r\n\t\t\t\tbasGauche = false,\r\n\t\t\t\thautDroit = false,\r\n\t\t\t\tbasDroit = false;\r\n\t\t\r\n\t\tString blanc = \" B \";\r\n\t\tString noir = \" N \";\r\n\t\tfor(Point p : this.jetonAdverse()) {\r\n\t\t\tString [][]plateau;\r\n\t\t\tplateau= copieEtat();\r\n\t\t\tint x = (int) p.getX();\r\n\t\t\tint y = (int) p.getY();\r\n\t\t\tif(this.joueurActuel.getCouleur() == \"noir\") { //dans le cas ou le joueur pose un pion noir\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) { //on regarde uniquement le centre du plateaau \r\n\t\t\t\t\t//on reinitialise x,y et plateau a chaque étape\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tdroite = getDroite(x,y,blanc);\r\n\t\t\t\t\thaut = getHaut(x, y, blanc);\r\n\t\t\t\t\tbas = getBas(x, y, blanc);\r\n\t\t\t\t\tgauche = getGauche(x, y, blanc);\r\n\t\t\t\t\thautDroit = getDiagHautdroite(x, y, blanc);\r\n\t\t\t\t\thautGauche = getDiagHautGauche(x, y, blanc);\r\n\t\t\t\t\tbasDroit = getDiagBasDroite(x, y, blanc);\r\n\t\t\t\t\tbasGauche = getDiagBasGauche(x, y, blanc);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y-1]==noir) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(droite) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//1\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==noir) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(bas) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==noir) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(gauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(haut) {\r\n\t\t\t\t\t\t\t//System.out.println(\"regarde en dessous\");\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==noir) {\r\n\t\t\t\t\t\tif(hautGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(basGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit : OK!\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(hautDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==noir) {\r\n\t\t\t\t\t\tif(basDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t//System.out.println(\"ajouté!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {//si le joueur actuel a les pions blanc\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x][y-1]==blanc) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(getDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}//1.1\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==blanc) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getBas(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2.2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==blanc) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getGauche(x, y, noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3.3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == blanc) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getHaut(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4.4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5.5\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//6.6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautdroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7.7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8.8\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }",
"public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}",
"@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }",
"@Override\n\tpublic void doit() {\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint i = saisie_entier();\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint j = saisie_entier();\n\t\t// tous deux strictements positifs ou strictement négatifs? \n\t\t// vrai => produit positif\n\t\t// faux => produit negatif ou nul\n\t\tboolean Truth = TrueIfSameTruthValue(i,j,this.estposit);\n if (Truth){afficher_texte(UtilitaireChainesCommunes.resultat_positif);}\n else{ \n \t// l un des deux est soit de signe différent soit nul.\n \t// on vire le cas \"est de signe différent\" (on aurait pu faire l autre)\n \tboolean Truth2 = ((i < 0 && j > 0) || (i > 0 && j < 0));\n \tif (Truth2){afficher_texte(UtilitaireChainesCommunes.resultat_negatif);}\n \telse {afficher_texte(UtilitaireChainesCommunes.nombre_nul);}\n }\n\n\t}",
"public void selecao () {}",
"public void mostrarlistainicifin(){\n if(!estaVacia()){\n String datos = \"<=>\";\n NodoBus auxiliar = inicio;\n while(auxiliar!=null){\n datos = datos + \"(\" + auxiliar.dato +\")<=>\";\n auxiliar = auxiliar.sig;\n JOptionPane.showMessageDialog(null, datos, \"Mostrando lista de inicio a fin\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n }",
"@Override\n public void alRechazarOperacion() {\n }",
"public void Ordenamiento() {\n\n\t}",
"@Override\r\n\tpublic void exibir() {\n\t\t\r\n\t\tSystem.out.println(\"Condicoes atuais: \" + temp + \"°C e \" + umid + \"% de umidade \" \r\n\t\t\t\t+ pressao + \" pressao\");\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic boolean cadastrar(Loja loja) {\n\t\treturn false;\r\n\t}",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"private static void Relatorio() throws Exception \r\n {//Inicio menuRelatorio\r\n byte opcao;\r\n boolean fecharMenu = false;\r\n int idCliente, idProduto, quant;\r\n Produto p = null;\r\n Cliente c = null;\r\n do{\r\n System.out.println(\r\n \"\\n\\t*** MENU RELATORIO ***\\n\" +\r\n \"0 - Mostrar os N produtos mais Vendidos\\n\" +\r\n \"1 - Mostrar os N melhores clientes\\n\" +\r\n \"2 - Mostrar os produtos comprados por um cliente\\n\" +\r\n \"3 - Mostrar Clientes que compraram um produto\\n\" +\r\n \"4 - Sair\"\r\n );\r\n System.out.print(\"Digite sua opcao: \");\r\n opcao = read.nextByte();\r\n switch(opcao){\r\n case 0:\r\n ArrayList<Produto> listP = arqProdutos.toList();\r\n if(listP.isEmpty()) System.out.println(\"\\nNão tem produtos em nosso sistema ainda!\");\r\n else{\r\n System.out.print(\"Digite a quantidade de produtos que deseja saber: \");\r\n quant = read.nextInt();\r\n System.out.println();\r\n //Ordena a lista de forma decrescente:\r\n listP.sort((p1,p2) -> - Integer.compare(p1.getQuantVendidos(), p2.getQuantVendidos()));\r\n for(Produto n: listP){\r\n System.out.println(\"Produto de ID: \" + n.getID() + \" Nome: \" + n.nomeProduto + \"\\tQuantidade vendida: \" + n.getQuantVendidos());\r\n quant--;\r\n if(quant == 0) break;\r\n }\r\n }\r\n break;\r\n case 1:\r\n ArrayList<Cliente> listC = arqClientes.toList();\r\n if(listC.isEmpty()) System.out.println(\"Não ha clientes para mostrar!\");\r\n else{\r\n System.out.print(\"Digite a quantidade de Clientes: \");\r\n quant = read.nextInt();\r\n System.out.println();\r\n //Ordena a lista de forma decrescente:\r\n listC.sort((c1,c2) -> - Float.compare(c1.getTotalGasto(), c2.getTotalGasto()));\r\n for(Cliente n: listC){\r\n System.out.println(\"Cliente de ID: \" + n.getID() + \" Nome: \" + n.nomeCliente + \"\\tGasto total: \" + tf.format(n.getTotalGasto()));\r\n quant--;\r\n if(quant == 0) break; \r\n }\r\n }\r\n break;\r\n case 2:\r\n System.out.print(\"Digite o id do cliente: \");\r\n idCliente = read.nextInt();\r\n c = arqClientes.pesquisar(idCliente - 1);\r\n if (c != null){\r\n int[] idsProdutos = indice_Cliente_Produto.lista(idCliente);\r\n System.out.println(\"\\nO cliente \" + c.nomeCliente + \" de ID \" + c.getID() + \" comprou: \");\r\n for(int i = 0; i < idsProdutos.length; i++){\r\n p = arqProdutos.pesquisar(idsProdutos[i] - 1);\r\n System.out.println(\r\n \"\\n\\tProduto \" + i + \" -> \" + \r\n \" ID: \" + p.getID() + \r\n \" Nome: \" + p.nomeProduto + \r\n \" Marca: \" + p.marca\r\n );\r\n }\r\n }\r\n else {\r\n System.out.println(\"\\nID Invalido!\");\r\n Thread.sleep(1000);\r\n }\r\n break;\r\n case 3:\r\n System.out.print(\"Digite o id do Produto a consultar: \");\r\n idProduto = read.nextInt();\r\n p = arqProdutos.pesquisar(idProduto - 1);\r\n if(p != null){\r\n int[] idsClientes = indice_Produto_Cliente.lista(idProduto);\r\n System.out.println(\"\\nO produto '\" + p.nomeProduto + \"' de ID \" + p.getID() + \" foi comprado por: \");\r\n for(int i = 0; i < idsClientes.length; i++){\r\n c = arqClientes.pesquisar(idsClientes[i] - 1);\r\n System.out.println();\r\n System.out.println(c);\r\n }\r\n }\r\n else{\r\n System.out.println(\"\\nProduto Inexistende!\");\r\n Thread.sleep(1000);\r\n }\r\n break;\r\n case 4:\r\n fecharMenu = true;\r\n break; \r\n default:\r\n System.out.println(\"Opcao invalida!\\n\");\r\n Thread.sleep(1000);\r\n break;\r\n }\r\n }while(!fecharMenu); \r\n }",
"public void OnibusCheio(Connection con, List<Bilhetes> temporaria) {\n\t\t\n\t\t\n\t\t//Verifica se o onibus ja possui 15 pessoas (maximo de assento no meu onibus)\n\t\t\n\t\t\t\ttry {\n\t\t\t\t\tstmt=con.prepareStatement(\"select count(destino) from bilhetes where destino = ? and Hembarque = ? group by destino\" );\n\t\t\t\t\n\t\t\t\tstmt.setString(1, temporaria.get(0).getDestino());\n\t\t\t\tstmt.setString(2, temporaria.get(0).getHora_embarque());\n\t\t\t\t\n\t\t\t\tstmt.execute();\n\t\t\t\trs=stmt.getResultSet();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tNumero_DE_Passageiro = rs.getInt(1);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ERRO: ONIBUS LOTADO, Numero de passageiros :\"+ Numero_DE_Passageiro);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"private void actualizarEnConsola() {\n\t\tfor(int i=0; i<elementos.size();i++){\n\t\t\tElemento e = elementos.get(i);\n\t\t\tSystem.out.println(e.getClass().getName()+\"- Posicion: , X: \"+e.getPosicion().getX()+\", Y: \"+ e.getPosicion().getY());\n\t\t}\n\t\t\n\t}",
"public void selecteazaComanda()\n {\n for(String[] comanda : date) {\n if (comanda[0].compareTo(\"insert client\") == 0)\n clientBll.insert(idClient++, comanda[1], comanda[2]);\n else if (comanda[0].compareTo(\"insert product\") == 0)\n {\n Product p = productBll.findProductByName(comanda[1]);\n if(p!=null)//daca produsul exista deja\n productBll.prelucreaza(p.getId(), comanda[1], Float.parseFloat(comanda[2]), Float.parseFloat(comanda[3]));\n else\n productBll.prelucreaza(idProduct++, comanda[1], Float.parseFloat(comanda[2]), Float.parseFloat(comanda[3]));\n\n }\n else if (comanda[0].contains(\"delete client\"))\n clientBll.sterge(comanda[1]);\n else if (comanda[0].contains(\"delete product\"))\n productBll.sterge(comanda[1]);\n else if (comanda[0].compareTo(\"order\")==0)\n order(comanda);\n else if (comanda[0].contains(\"report\"))\n report(comanda[0]);\n }\n }",
"public void riconnetti() {\n\t\tconnesso = true;\n\t}",
"private void limpa() {\n\t\t// limpa Alfabeto\n\t\tsimbolos.limpar();\n\t\t// limpa conjunto de estados\n\t\testados.limpar();\n\t\t// limpa Funcao Programa\n\t\tfuncaoPrograma.limpar();\n\t\t// Limpa estados finais\n\t\testadosFinais.limpar();\n\t}",
"public void Lista(){\n\t\tcabeza = null;\n\t\ttamanio = 0;\n\t}",
"public void majAffichageConnectes() {\n effacerConnectes(); // on efface ce qui est deja ecrit dans la zone reservees a la liste des\n // connectes\n\n choixMessage.removeAllItems(); // Suppression de tous les items de la comboBox\n choixMessage.addItem(\"Tout le monde\");\n choixMessage.setSelectedIndex(0); // Par defaut => envoi a tout le monde\n\n // Parcours de la liste des personnes connectees\n for (Map.Entry<String, Color> entry : couleurs.entrySet()) {\n String nom = entry.getKey(); // recuperation du nom\n Color rgb = new Color(chercherCouleur(nom)); // recuperation de la couleur correspondante\n\n // Mise a jour de la combobox\n if(!fenetre.getClient().getNom().equals(nom)){\n choixMessage.addItem(nom);\n }\n\n // Mise a jour de l'affichage dans le panneau \"Connectes\"\n StyledDocument doc = connectes.getStyledDocument();\n StyleContext style = StyleContext.getDefaultStyleContext();\n // Modification de la couleur\n AttributeSet aset = style.addAttribute(style.getEmptySet(), StyleConstants.Foreground, rgb);\n // Mettre en gras\n aset = style.addAttributes(aset, style.addAttribute(style.getEmptySet(), StyleConstants.Bold, true));\n\n // ajout de la personne dans la liste avec la couleur correspondante\n try {\n doc.insertString(doc.getLength(), nom+\"\\n\", aset);\n } catch (BadLocationException e) {\n e.printStackTrace();\n }\n }\n\n System.out.println(\"maj de l'affichage de la liste des connectes\");\n }",
"private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }",
"private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}",
"public void cambioLigas(){\n\t\ttry{\n\t\t\tmodelo.updatePartidosEmaitzak(ligasel.getSelectionModel().getSelectedItem().getIdLiga());\n\t\t}catch(ManteniException e){\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public void llenarInformacion(){\n llenarDetalles();\n llenarLogros();\n }",
"private void actualizarOrdenes(Character letra) {\r\n\t\tint ordenContexto = this.contextoActual.length();\r\n\t\tString contextoString = this.contextoActual.substring(0, ordenContexto);\r\n\t\tlogger.debug(\"Nuevo contexto: \" + contextoString);\r\n\t\tContexto contexto;\r\n\t\tboolean finalizarActualizacion = false;\r\n\t\t\r\n\t\twhile (ordenContexto > -1 && !finalizarActualizacion) {\r\n\t\t\tcontexto = this.listaOrdenes.get(ordenContexto).getContexto(contextoString);\r\n\t\t\tif (contexto.getArrayCharProb().isEmpty()) {\r\n\t\t\t\t//Agrego el Escape para el contexto vacio\r\n\t\t\t\tcontexto.crearCharEnContexto(Constantes.ESC);\r\n\t\t\t\t//Agrego la letra al contexto ya que se que no exite por estar vacio el contexto\r\n\t\t\t\tcontexto.crearCharEnContexto(letra);\r\n\t\t\t} else {\r\n\t\t\t\t//Busco la letra, si no esta la agrego y aumento ESC. Si esta Aumento la letra.\r\n\t\t\t\tif (contexto.existeChar(letra)) {\r\n\t\t\t\t\t//La encontro entonces actualizamos la letra\r\n\t\t\t\t\tcontexto.actualizarContexto(letra);\r\n\t\t\t\t\tfinalizarActualizacion = true;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//Como la letra no esta, la creo y actualizo el ESC\r\n\t\t\t\t\tcontexto.actualizarContexto(Constantes.ESC);\r\n\t\t\t\t\tcontexto.crearCharEnContexto(letra);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Preparo para el siguiente contexto\r\n\t\t\tif (ordenContexto > 0){\r\n\t\t\t\tordenContexto--;\r\n\t\t\t\tcontextoString = this.contextoActual.substring(this.contextoActual.length() - ordenContexto, this.contextoActual.length());\r\n\t\t\t\tlogger.debug(\"Nuevo contexto: \" + contextoString);\r\n\t\t\t} else {\r\n\t\t\t\tordenContexto--;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void xuLyThemPhieuThanhToan(){\n //Ngat chuoi\n String strTongTien = txtTongTien.getText().trim();\n String[] tongTien = strTongTien.split(\"\\\\s\");\n String strTienPhaiTra = txtTienPhaiTra.getText().trim();\n String[] tienPhaiTra = strTienPhaiTra.split(\"\\\\s\");\n\n //xu ly them vao data base\n PhieuThanhToanSevice phieuThanhToanSevice = new PhieuThanhToanSevice();\n int x = phieuThanhToanSevice.themPhieuThanhToan(txtMaPTT.getText().trim(),\n cbbMaPDK.getSelectedItem().toString(),\n Integer.valueOf(txtSoThang.getText().trim()),\n txtNgayTT.getText().trim(), Float.valueOf(tongTien[0]), Float.valueOf(tienPhaiTra[0]));\n\n if (x > 0) {\n JOptionPane.showMessageDialog(null, \"Thanh toán thành công\");\n } else {\n JOptionPane.showMessageDialog(null, \"Thanh toán thất bại\");\n return;\n }\n\n }",
"public void faiLavoro(){\n System.out.println(\"Scrivere 1 per Consegna lunga\\nSeleziona 2 per Consegna corta\\nSeleziona 3 per Consegna normale\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n soldiTam += 500;\n puntiVita -= 40;\n puntiFame -= 40;\n puntiFelicita -= 40;\n }\n case 2 -> {\n soldiTam += 300;\n puntiVita -= 20;\n puntiFame -= 20;\n puntiFelicita -= 20;\n }\n case 3 -> {\n soldiTam += 100;\n puntiVita -= 10;\n puntiFame -= 10;\n puntiFelicita -= 10;\n }\n }\n checkStato();\n }",
"public void vincula(){\n for (Nodo n : exps)\n n.vincula();\n }",
"public void getSconti() {\r\n\t\tsconti = ac.getScontiDisponibili();\r\n\t\t//la tabella sara' non nulla quando sara' caricato il file VisualizzaLog.fxml\r\n\t\tif(tabellaSconti!= null) {\r\n\t\t\tvaloreScontiCol.setCellValueFactory(new PropertyValueFactory<Sconto, Integer>(\"valore\"));\r\n\t puntiRichiestiCol.setCellValueFactory(new PropertyValueFactory<Sconto, String>(\"puntiRichiesti\"));\r\n\t spesaMinimaCol.setCellValueFactory(new PropertyValueFactory<Sconto, String>(\"spesaMinima\"));\r\n\t \r\n\t Collections.sort(sconti);\r\n\t tabellaSconti.getItems().setAll(sconti);\r\n\t \r\n\t tabellaSconti.setOnMouseClicked(e -> {\r\n\t \tif(aggiungi.isDisabled() && elimina.isDisabled()) \r\n\t \t\ttotale.setText(\"\" + ac.applicaSconto(tabellaSconti.getSelectionModel().getSelectedItem()));\r\n\t });\r\n\t }\r\n\t}",
"public void reabrirContrato() {\n int i;\n if (hospedesCadastrados.isEmpty()) {\n System.err.println(\"Nao existe hospedes cadastrados\\n\");\n } else {\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//hospede\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//verifica se o contrato já estpa aberto\n System.err.println(\"O contrado desse hospede já encontra-se aberto\");\n\n } else {//caso o contrato encontre-se fechado\n hospedesCadastrados.get(i).getContrato().setSituacao(true);\n System.err.println(\"Contrato reaberto, agora voce pode reusufruir de nossos servicos!\");\n }\n }\n }\n }\n }",
"@Override\r\n\t/**\r\n\t * Actionne l'effet de la carte.\r\n\t * \r\n\t * @param listejoueur\r\n\t * \t\t\tLa liste des joueurs de la partie.\r\n\t * @param cible\r\n\t * \t\t\tLa joueur contre qui l'effet sera joué.\r\n\t * @param table\r\n\t * \t\t\tCollection de cartes situées au centre de la table de jeu.\r\n\t * @param carte\r\n\t * \t\t\tLa carte qui joue l'effet.\r\n\t * @param j\r\n\t * \t\t\tLe joueur qui joue la carte.\r\n\t * @param collection\r\n\t * \t\t\tLe deck de cartes.\r\n\t * @param tourjoueur\r\n\t * \t\t\tLa liste des joueurs selon l'ordre de jeu.\r\n\t */\r\n\tpublic void utiliserEffet(ArrayList<Joueur> listejoueur, int cible, ArrayList<Carte> table, Carte carte,\r\n\t\t\tint j, ArrayList<Carte> collection,ArrayList<Joueur> tourjoueur) {\n\t\tcont = Controller.getInstance();\r\n\t\tint id = carte.getIdentifiantCarte();\r\n\t\tif (id ==9 || id ==10 || id==22 || id==23){\r\n\t\t\tif (tourjoueur.get(j) == listejoueur.get(0)){\r\n\t\t\t\tSystem.out.println(\"Choisissez le Divinité qui sera forcer de sacrifier un croyant\");\r\n\t\t\t\t\r\n\t\t\t\tcont.setChoisirCible(true);\r\n\t\t\t\t\r\n\t\t\t\twhile(cont.getChoixCible()==-1){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(200);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" à sacrifier un Croyant\");\r\n\t\t\t\t\r\n\t\t\t\tif (listejoueur.get(cont.getChoixCible()).getNombreCroyantTotal()>0){\r\n\t\t\t\t\tfor(int i=0;i<listejoueur.get(cont.getChoixCible()).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor (int k=0;k<listejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true); // On rend possible l'utilisation de la carte\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).setDoitSacrifierCroyant(true);\r\n\t\t\t\ttourjoueur.get(j).forcerAction(cont.getChoixCible(),listejoueur.get(cont.getChoixCible()).isDoitSacrifierCroyant(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" n'a aucun croyant a sacrifier \");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t max = 0;\r\n\t\t\t\t\tjoueurCible =-1;;\r\n\t\t\t\tfor (int i=0; i<listejoueur.size();i++){\r\n\t\t\t\t\r\n\t\t\t\t\tif (listejoueur.get(i).getGuidePossede().size() > max){\r\n\t\t\t\t\tmax = listejoueur.get(i).getGuidePossede().size();\r\n\t\t\t\t\tjoueurCible = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(joueurCible).getNom() + \" à sacrifier un Croyant\");\r\n\t\t\tif (listejoueur.get(joueurCible).getNombreCroyantTotal()>0){\r\n\t\t\t\t\r\n\t\t\t\t\tfor(int i=0;i<listejoueur.get(joueurCible).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor (int k=0;k<listejoueur.get(joueurCible).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(joueurCible).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true); // On rend possible l'utilisation de la carte\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tlistejoueur.get(joueurCible).setDoitSacrifierCroyant(true);\r\n\t\t\ttourjoueur.get(j).forcerAction(joueurCible,listejoueur.get(joueurCible).isDoitSacrifierCroyant(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun croyant à sacrifier\");\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ( id==11){\r\n\t\t\tif (tourjoueur.get(j) == listejoueur.get(0)){\r\n\t\t\t\tSystem.out.println(\"Choisissez le Divinité qui sera forcer de sacrifier un guide\");\r\n\t\t\t\twhile(cont.getChoixCible()==-1){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(200);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" à sacrifier un Guide\");\r\n\t\t\t\t\r\n\t\t\t\tif(listejoueur.get(cont.getChoixCible()).getGuidePossede().size()>0){\r\n\t\t\t\t\tfor (int i=0;i<listejoueur.get(cont.getChoixCible()).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor(int k=0;k<listejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).setDoitSacrifierGuide(true);\r\n\t\t\t\t\ttourjoueur.get(j).forcerAction(cont.getChoixCible(),listejoueur.get(cont.getChoixCible()).isDoitSacrifierGuide(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun guide à sacrifier\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t max = 0;\r\n\t\t\t\t\tjoueurCible =-1;;\r\n\t\t\t\tfor (int i=0; i<listejoueur.size();i++){\r\n\t\t\t\t\r\n\t\t\t\t\tif (listejoueur.get(i).getGuidePossede().size() > max){\r\n\t\t\t\t\tmax = listejoueur.get(i).getGuidePossede().size();\r\n\t\t\t\t\tjoueurCible = i;\r\n\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(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(joueurCible).getNom() + \" à sacrifier un Guide\");\r\n\t\t\t\tif (listejoueur.get(joueurCible).getGuidePossede().size()>0){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tfor(int i=0;i<listejoueur.get(joueurCible).getGuidePossede().size();i++){\r\n\t\t\t\t\t\t\tlistejoueur.get(joueurCible).getGuidePossede().get(i).setSelectionnee(true); // On rend possible l'utilisation de la carte\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tlistejoueur.get(joueurCible).setDoitSacrifierGuide(true);\r\n\t\t\t\ttourjoueur.get(j).forcerAction(joueurCible,listejoueur.get(joueurCible).isDoitSacrifierGuide(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun guide à sacrifier\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t}",
"public void Get() { ob = ti.Get(currentrowi, \"persoana\"); ID = ti.ID; CNP = ob[0]; Nume = ob[1]; Prenume = ob[2]; }",
"public void MostrarListas (){\n Nodo recorrer=inicio; // esto sirve para que el elemento de la lista vaya recorriendo conforme se inserta un elemento\r\n System.out.println(); // esto nos sirve para dar espacio a la codificacion de la lista al imprimir \r\n while (recorrer!=null){ // esta secuencia iterativa nos sirve para repetir las opciones del menu\r\n System.out.print(\"[\" + recorrer.dato +\"]--->\");\r\n recorrer=recorrer.siguiente;\r\n }\r\n }",
"private void mostradados() {\r\n\t\tint in = 0;\r\n\r\n\t\tfor (Estado e : Estado.values()) {\r\n\t\t\tif (in == 0) {\r\n\t\t\t\tcmbx_estado.addItem(\"\");\r\n\t\t\t\tin = 1;\r\n\t\t\t}\r\n\t\t\tcmbx_estado.addItem(e.getNome());\r\n\t\t}\r\n\r\n\t\tfor (int x = 0; x < listacliente.size(); x++) {\r\n\t\t\tin = 0;\r\n\t\t\tif (x == 0) {\r\n\t\t\t\tcmbx_cidade.addItem(\"\");\r\n\t\t\t}\r\n\r\n\t\t\tfor (int y = 0; y < cmbx_cidade.getItemCount(); y++) {\r\n\t\t\t\tif (listacliente.get(x).getCidade().equals(cmbx_cidade.getItemAt(y).toString()))\r\n\t\t\t\t\tin++;\r\n\t\t\t\tif (in > 1)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (in < 1)\r\n\t\t\t\tcmbx_cidade.addItem(listacliente.get(x).getCidade());\r\n\t\t}\r\n\t}",
"private void aumentarPuntos() {\r\n this.puntos++;\r\n this.form.AumentarPuntos(this.puntos);\r\n }",
"private void napuniCbPozoriste() {\n\t\t\r\n\t\tfor (Pozoriste p:Kontroler.getInstanca().vratiPozorista())\r\n\t\t\t\r\n\t\t\tcbPozoriste.addItem(p.getImePozorista());\r\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"private void suono(int idGioc) {\n\t\tpartita.effettoCasella(idGioc);\n\t}",
"@Override\n\t@BreadCrumb(\"%{model.titolo}\")\n\tpublic String execute() throws Exception {\n \t\n \t//eseguo la ricerca:\n \texecuteRicercaAccertamentoPerOrdinativo();\n\n\t\t//carica le labels:\n\t\tcaricaLabelsInserisci(2, model.getGestioneOrdinativoStep1Model().getOrdinativo().getUid() == 0);\n\t\t\n\t\t//controllo filo arianna:\n\t\tif(model.getGestioneOrdinativoStep1Model().getCapitolo()!=null){\n\t\t\tif(model.getGestioneOrdinativoStep1Model().getCapitolo().getAnno()==null){\n\t\t\t\t// significa che sono andato in inserimento -> consulta -> click su filo di arianna quote\n\t\t\t\treturn \"erroreFiloArianna\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t//setto il tipo di oggeto trattato:\n\t\tteSupport.setOggettoAbilitaTE(OggettoDaPopolareEnum.ORDINATIVO_INCASSO.toString());\n\t\t\n\t\t//abilita o meno il bottone salva:\n\t\tattivaBottoneSalva();\n\t\t\n\t\t// effettua la somma delle righe delle quote\n\t\tif(model.isSonoInAggiornamentoIncasso()){\n\t\t\tsommatoriaQuoteSubOrdIncassoPerAggiorna();\n\t\t}else{\n\t\t\tsommatoriaQuoteSubOrdIncasso();\n\t\t}\n\t\t\n\t\tif (caricaListeBil(WebAppConstants.CAP_EG)) {\n\t\t\treturn INPUT;\n\t\t}\n\t\n\t\t//Constanti.ORDINATIVO_TIPO_PAGAMENTO\n\t\t// Jira - 1357 in caso di errore di caricamento dei dati\n\t\t// dei classificatori non viene segnalato alcun errore\n\t\t// ma carica la pagina, al massimo non verranno visualizzate le combo relative\n\t\t\n\t\tcaricaListeFin(TIPO_ACCERTAMENTO_A );\n\t\t\n\t\t//ricontrolliamo il siope che sia coerente:\n\t\tcodiceSiopeChangedInternal(teSupport.getSiopeSpesaCod());\n\t\t//\n\t\t\t\n\t\t// imposto la descrizione della quota ocn quella dell'accertamento \n\t\tString descrizioneQuota = \"\";\n\t\tif(model.getGestioneOrdinativoStep2Model().getListaAccertamento()!=null && !model.getGestioneOrdinativoStep2Model().getListaAccertamento().isEmpty() &&\n\t\t\t\tmodel.getGestioneOrdinativoStep2Model().getListaAccertamento().size()==1){\n\t\t\tdescrizioneQuota = model.getGestioneOrdinativoStep2Model().getListaAccertamento().get(0).getDescrizione();\n\t\t\tmodel.getGestioneOrdinativoStep2Model().setDescrizioneQuota(descrizioneQuota);\n\t\t\t\n\t\t}\n\t\t\n\t\treturn SUCCESS;\n\t}",
"@Override\n\tpublic void chocoContraPared() {}",
"protected void caricaListaContoTesoreria() throws WebServiceInvocationFailureException {\n\t\tList<ContoTesoreria> listaInSessione = sessionHandler.getParametro(BilSessionParameter.LISTA_CONTO_TESORERIA);\n\t\tif(listaInSessione == null) {\n\t\t\tLeggiContiTesoreria request = model.creaRequestLeggiContiTesoreria();\n\t\t\tlogServiceRequest(request);\n\t\t\tLeggiContiTesoreriaResponse response = preDocumentoSpesaService.leggiContiTesoreria(request);\n\t\t\tlogServiceResponse(response);\n\t\t\t\n\t\t\t// Controllo gli errori\n\t\t\tif(response.hasErrori()) {\n\t\t\t\t//si sono verificati degli errori: esco.\n\t\t\t\taddErrori(response);\n\t\t\t\tthrow new WebServiceInvocationFailureException(\"caricaListaContoTesoreria\");\n\t\t\t}\n\t\t\t\n\t\t\tlistaInSessione = response.getContiTesoreria();\n\t\t\tsessionHandler.setParametro(BilSessionParameter.LISTA_CONTO_TESORERIA, listaInSessione);\n\t\t}\n\t\t\n\t\tmodel.setListaContoTesoreria(listaInSessione);\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public void cargaDatosInicialesSoloParaAdicionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n //Obtien Ajuste Fin\n //Activa formulario para automatico modifica \n if (selectedEntidad.getNivel() >= 3) {\n numeroEspaciadorAdicionar = 260;\n }\n\n if (selectedEntidad.getNivel() == 3) {\n swParAutomatico = false;\n numeroEspaciadorAdicionar = 230;\n }\n if (selectedEntidad.getNivel() == 2) {\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciadorAdicionar = 200;\n }\n if (selectedEntidad.getNivel() == 1) {\n swParAutomatico = true;\n numeroEspaciadorAdicionar = 130;\n cntParametroAutomaticoDeNivel2 = cntParametroAutomaticoService.obtieneObjetoDeParametroAutomatico(selectedEntidad);\n }\n\n mascaraNuevoOpcion = \"N\";\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n mascaraNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"N\");\n mascaraSubNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"S\");\n longitudNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"N\");\n longitudSubNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"S\");\n }",
"public void rodar(){\n\t\tmeuConjuntoDePneus.rodar();\r\n\t}",
"public void ingresarUbigeo() {\n\t\t\tlog.info(\"ingresarUbigeo :D a --- \" + idUbigeo1);\r\n\t\t\tubigeoDefecto = \"otro ubigeo\";\r\n\t\t\tIterator it = comboManager.getUbigeoDeparItems().entrySet().iterator();\r\n\t\t\tIterator it2 = comboManager.getUbigeoProvinItems().entrySet().iterator();\r\n\t\t\tIterator it3 = comboManager.getUbigeoDistriItems().entrySet().iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry e = (Map.Entry) it.next();\r\n\t\t\tSystem.out.println(\"key \" + e.getKey() + \" value \" + e.getValue());\r\n\t\tif (e.getValue().toString().equals(idDepartamento)) {\r\n\t\t\tubigeoDefecto = (String) e.getKey();\r\n\t\t\tlog.info(\"ubigeo depa \" + ubigeoDefecto);\r\n\t\tbreak;\r\n\t\t\t}\r\n\t\t\t}\r\n\t\twhile (it2.hasNext()) {\r\n\t\t\tMap.Entry e = (Map.Entry) it2.next();\r\n\t\t\tSystem.out.println(\"key \" + e.getKey() + \" value \" + e.getValue());\r\n\t\tif (e.getValue().toString().equals(idProvincia)) {\r\n\t\t\tubigeoDefecto += \"-\" + (String) e.getKey();\r\n\t\t\tlog.info(\"ubigeo prov \" + ubigeoDefecto);\r\n\t\tbreak;\r\n\t\t\t}\r\n\t\t\t}\r\n\t\twhile (it3.hasNext()) {\r\n\t\t\tMap.Entry e = (Map.Entry) it3.next();\r\n\t\t\tSystem.out.println(\"key \" + e.getKey() + \" value \" + e.getValue());\r\n\t\tif (e.getValue().toString().equals(idUbigeo1)) {\r\n\t\t\tubigeoDefecto += \"-\" + (String) e.getKey();\r\n\t\t\tlog.info(\"ubigeo distrito \" + ubigeoDefecto);\r\n\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tlog.info(\"ubigeo ------> :D \" + ubigeoDefecto);\r\n\t}",
"private static void menuno(int menuno2) {\n\t\t\r\n\t}",
"public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }",
"public void gerarReceitaLiquidaIndiretaDeEsgoto() \n\t\t\tthrows ErroRepositorioException;",
"public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}",
"public void operation() {\n\t\tSystem.out.println(\"se obtuvo\" + nombre );\n\t}",
"private static void menuCliente(int idCliente) throws Exception {//Inicio menuCliente \r\n byte opcao;\r\n int idCompra;\r\n ArrayList<Compra> minhasCompras = null;\r\n ArrayList<ItemComprado> meusItensComprados = null;\r\n ArrayList<Produto> listProdutos = null;\r\n boolean encerrarPrograma = false;\r\n do {\r\n try {\r\n System.out.println(\r\n \"\\n\\t*** MENU CLIENTE ***\\n\"\r\n + \"0 - Nova compra\\n\"\r\n + \"1 - Minhas compras\\n\"\r\n + \"2 - Alterar meus dados\\n\"\r\n + \"3 - Excluir conta\\n\"\r\n + \"4 - Sair\"\r\n );\r\n System.out.print(\"Digite sua opcao: \");\r\n opcao = read.nextByte();\r\n switch (opcao) {\r\n case 0:\r\n idCompra = arqCompra.inserir(new Compra(idCliente, new Date()));\r\n compraProdutos(idCliente, idCompra);\r\n break;\r\n case 1:\r\n listProdutos = arqProdutos.toList();\r\n minhasCompras = listComprasDoCliente(idCliente);\r\n for (Compra c : minhasCompras) {\r\n System.out.println(\"\\n*** Compra de ID: \" + c.getID() + \" Data: \" + dt.format(c.dataCompra));\r\n meusItensComprados = listarOsItensComprados(c.getID());\r\n for (ItemComprado ic : meusItensComprados) {\r\n for (Produto p : listProdutos) {\r\n if (p.getID() == ic.idProduto) {\r\n System.out.println(\r\n \"\\n\\tProduto: \" + p.nomeProduto\r\n + \"\\n\\tMarca: \" + p.marca\r\n + \"\\n\\tPreço: \" + tf.format(ic.precoUnitario)\r\n + \"\\n\\tQuant: \" + ic.qtdProduto\r\n );\r\n }\r\n }\r\n }\r\n }\r\n break;\r\n case 2:\r\n uptadeDados(idCliente);\r\n break;\r\n case 3:\r\n System.out.println(\"\\nConfirmar opção? \\n0 - Sim\\n1 - Nao\");\r\n System.out.println(\"Digite a opcao desejada: \");\r\n switch (read.nextInt()) {\r\n case 0:\r\n if (arqClientes.remover(idCliente - 1)) {\r\n System.out.println(\"Remoção feita com sucesso!\");\r\n }\r\n break;\r\n case 1:\r\n System.out.println(\"\\nObrigado por continuar!\");\r\n break;\r\n default:\r\n System.out.println(\"\\nOpcao invalida!\");\r\n Thread.sleep(1000);\r\n break;\r\n }\r\n encerrarPrograma = true;\r\n break;\r\n case 4:\r\n encerrarPrograma = true;\r\n break;\r\n default:\r\n System.out.println(\"Opcao invalida!\\n\");\r\n Thread.sleep(1000);\r\n break;\r\n }\r\n } catch (InputMismatchException inputMismatchException) {\r\n System.out.println(\"\\nErro !\\nTente novamente!\");\r\n Thread.sleep(1000);\r\n read.next();//Limpar buffer do Scanner\r\n }\r\n } while (!encerrarPrograma);\r\n }",
"public boolean jeu() {\n int k;\n\n String compJoueur = \"\";\n String compOrdi = \"\";\n String reponse;\n\n boolean victoireJoueur = false;\n boolean victoireOrdi = false;\n String mystJoueur = challenger.nbMystere(); /**nb que le joueur doit trouver*/\n String mystOrdi = defenseur.nbMystere(); /**nb que l'ordinateur doit trouver*/\n String propOrdi = defenseur.proposition(); /**ordinateur genere un code aleatoire en premiere proposition*/\n log.info(\"Proposition ordinateur : \" + propOrdi); /**afficher proposition ordinateur*/\n String propJoueur = \"\";\n String goodResult = MethodesRepetitives.bonResultat();\n\n\n for (k = 1; !victoireJoueur && !victoireOrdi && k <= nbEssais; k++) { /**si ni le joueur ou l'ordinateur n'ont gagne et si le nombre d'essais n'est pas atteind, relancer*/\n\n compOrdi = MethodesRepetitives.compare(mystOrdi, propOrdi); /**lancer la methode de comparaison du niveau defenseur*/\n log.info(\"Reponse Ordinateur :\" + compOrdi); /**afficher la comparaison*/\n propJoueur = challenger.proposition(); /**demander une saisie au joueur selon le mode challenger*/\n compJoueur = MethodesRepetitives.compare(mystJoueur, propJoueur); /**comparer selon le mode challenger*/\n log.info(\"Reponse Joueur :\" + compJoueur); /**afficher la comparaison*/\n\n if (compOrdi.equals(goodResult)) { /**si l'ordinateur a gagne, changement de la valeur victoireOrdi*/\n victoireOrdi = true;\n }else if(compJoueur.equals(goodResult)) {/**si le joueur a gagne changement de la valeur victoireJoeur*/\n victoireJoueur = true;\n } else if (k < nbEssais) { /**sinon redemander un code a l'ordinateur selon les symboles de comparaison*/\n propOrdi = defenseur.ajuste(propOrdi, compOrdi);\n log.info(\"Proposition Ordinateur :\" + propOrdi);\n }\n }\n\n if (victoireOrdi || !victoireJoueur)/**si l'ordinateur ou le joueur perdent alors perdu sinon gagne*/\n victoireJoueur = false;\n else\n victoireJoueur = true;\n\n return victoireJoueur;\n\n\n }",
"private void casoFor(ArrayList codigoFuente) {\n try {\n\n String texto = \"\", linea = \"\";\n String var[] = null;\n\n byte parenDerecho = 0;\n for (int i = 0; i < codigoFuente.size(); i++) {\n linea = codigoFuente.get(i).toString();\n for (int j = 0; j < linea.length(); j++) {\n if (linea.charAt(j) == ')') {\n parenDerecho++;\n\n if (j < linea.length() - 1) {\n if (linea.charAt(j + 1) == '{') {\n var = contenidoFor(texto);\n\n if (var[0].equals(\"0\")) {\n ta_output.setText(\"Línea \" + (i + 1) + \":\" + var[1]);\n break;\n } else {\n if (codigoFuente.get(codigoFuente.size() - 1).toString().charAt(codigoFuente.get(codigoFuente.size() - 1).toString().length() - 1) == '}') {\n ta_output.setText(\"Compilado Correctamente\");\n break;\n } else {\n ta_output.setText(\"Línea \" + (codigoFuente.size() - 1) + \": Sintáctico: falta llave derecha\");\n break;\n }\n }\n } else {\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: falta llave izquierda\");\n break;\n }\n } else {//Evalua si la llave izquierda esta en la siguiente linea\n if (i < codigoFuente.size() - 1) {\n linea = codigoFuente.get(i + 1).toString();\n if (linea.charAt(0) == '{') {\n var = contenidoFor(texto);\n\n if (var[0].equals(\"0\")) {\n ta_output.setText(\"Línea \" + (i + 1) + \":\" + var[1]);\n break;\n } else {\n if (codigoFuente.get(codigoFuente.size() - 1).toString().charAt(codigoFuente.get(codigoFuente.size() - 1).toString().length() - 1) == '}') {\n ta_output.setText(\"Compilado Correctamente\");\n break;\n } else {\n ta_output.setText(\"Línea \" + (codigoFuente.size()) + \": Sintáctico: falta llave derecha\");\n break;\n }\n }\n } else {\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: falta llave izquierda\");\n break;\n }\n } else {\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: falta llave izquierda\");\n break;\n }\n }\n }\n texto += linea.charAt(j);\n if (texto.equals(\"for\")) {\n if (linea.length() > 5) {\n if (linea.charAt(j + 1) == '(') {\n texto = \"\";\n } else {\n if (linea.charAt(j + 2) == '(') {\n ta_output.setText(\"Línea \" + (i + 1) + \": Lexico: Caracter sobrante en sentencia for.\");\n parenDerecho++;\n break;\n } else {\n parenDerecho++;\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: mala construcción de la sentencia.\");\n break;\n }\n }\n } else {\n parenDerecho++;\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: mala construcción de la sentencia.\");\n break;\n }\n }\n }\n }\n if (parenDerecho == 0) {\n ta_output.setText(\"Sintáctico: falta paréntesis Derecho\");\n }\n\n } catch (Exception e) {\n System.out.println(\"Error en caso for \" + e.getClass());\n }\n }",
"public void controlla_bersaglio() {\n\n if ((x[0] == bersaglio_x) && (y[0] == bersaglio_y)) {\n punti++;\n posiziona_bersaglio();\n }\n }",
"private void verficarChoques() {\n\t\t\n\t\tfor(int i=0; i<JuegoListener.elementos.size();i++){\n\t\t\t\n\t\t\tElemento e1 = JuegoListener.elementos.get(i);\n\t\t\t\n\t\t\t//guaramos las coordenadas para verificar si choco contra el tablero\n\t\t\tint coord1 = e1.getPosicion().getX();\n\t\t\tint coord2 = e1.getPosicion().getY();\n\t\t\t//Creamos el rectangulo\n\t\t\tRectangle r1 = new Rectangle(e1.getPosicion().getX(),\n\t\t\t\t\t\t\t\t\t\te1.getPosicion().getY(),\n\t\t\t\t\t\t\t\t\t\te1.getTamanio().getAncho(),\n\t\t\t\t\t\t\t\t\t\te1.getTamanio().getAlto());\n\t\t\t\n\t\t\tfor(int j=i+1; j<JuegoListener.elementos.size(); j++){\n\t\t\t\t\n\t\t\t\t//Creamos el rectangulo\n\t\t\t\tElemento e2 = JuegoListener.elementos.get(j);\n\t\t\t\tRectangle r2 = new Rectangle(e2.getPosicion().getX(),\n\t\t\t\t\t\te2.getPosicion().getY(),\n\t\t\t\t\t\te2.getTamanio().getAncho(),\n\t\t\t\t\t\te2.getTamanio().getAlto());\n\t\t\t\tif(r1.intersects(r2)){\n\t\t\t\t\te1.chocarContra(e2);\n\t\t\t\t\te1.chocarContra(e1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// estaContenidoDentro, hace referencia si no se paso del tope del tablero\n\t\t\t// esta contenidoposito, se fija si las posiciones son positivas \n\t\t\tboolean estaContenidoDentro = ( (coord1 >= this.config.getAnchoTablero()) || (coord2 >= this.config.getAltoTablero()) ); \n\t\t\tboolean estaContenidoPositivo= (coord1<= 0) || (coord2 <= 0 ); \n\t\t\tif(estaContenidoPositivo || estaContenidoDentro){\n\t\t\t\te1.chocarContraPared();\n\t\t\t}\t\t\t\n\t\t}\n\n\n\t}",
"@Override\n\tpublic void pausaParaComer() {\n\n\t}",
"public abstract String dohvatiKontakt();",
"private void mostrarEmenta (){\n }",
"public void mostrarlistainciofin(){\n if(!estavacia()){\n String datos=\"<=>\";\n nododoble auxiliar=inicio;\n while(auxiliar!=null){\n datos=datos+\"[\"+auxiliar.dato+\"]<=>\";\n auxiliar=auxiliar.siguiente;\n }\n JOptionPane.showMessageDialog(null,datos,\n \"Mostraando lista de incio a fin\",JOptionPane.INFORMATION_MESSAGE);\n } }",
"Reserva Obtener();",
"@Override\r\n\tpublic void horario() {\n\t\t\r\n\t}",
"@Override\n public void paso0() {\n n = graph.getNodeIndices().indexOf(actual);\n nodo = graph.getNodes().get(n);\n nodo.setEstado(Node.State.CURRENT);\n nodo.pintarNodo(g);\n // comprueba si es objetivo\n if (nodo.getEsObjetivo()) {\n // establece el objetivo encontrado\n miObjetivo = nodo.toString();\n // termina con exito\n Step = 4;\n } else {\n // se prepara para explorar los sucesores\n m = nodo.maxSucesores();\n j = 0;\n // siguiente paso\n Step = 1;\n }\n }",
"public void esperarRecogidaIngrediente(){\n enter();\n if ( ingredienteact != -1 )\n estanquero.await();\n leave();\n }",
"@Test\n\tpublic void testGehituErabiltzaile() {\n\t\tErabiltzaileLista.getErabiltzaileLista().erreseteatuErabiltzaileLista();\t\t\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Martin\", \"123456\",\"123456\");\n\t\tassertEquals(1, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Mikel\", \"123456\",\"123456\");\n\t\tassertEquals(2,ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Martin\", \"123456\",\"123456\");\n\t\tassertEquals(2, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t}",
"private void cargarFichaLepra_control() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\r\n\t\tficha_inicio_lepraService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean ficha_inicio = ficha_inicio_lepraService\r\n\t\t\t\t.existe_paciente_lepra(parameters);\r\n\t\t// log.info(\"ficha_inicio>>>>\" + ficha_inicio);\r\n\r\n\t\tif (ficha_inicio) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}",
"public static void llenarSoriana(){\r\n Producto naranja1 = new Producto (\"naranja\", \"el huertito\", 25, 0);\r\n Nodo<Producto> nTemp1 = new Nodo(naranja1);\r\n listaSoriana.agregarNodo(nTemp1);\r\n \r\n Producto naranja2 = new Producto (\"naranja\", \"el ranchito\", 34, 0);\r\n Nodo<Producto> nTemp2 = new Nodo (naranja2);\r\n listaSoriana.agregarNodo(nTemp2);\r\n \r\n Producto manzana3 = new Producto (\"manzana\", \"el rancho de don chuy\", 24, 0);\r\n Nodo<Producto> nTemp3 = new Nodo (manzana3);\r\n listaSoriana.agregarNodo(nTemp3);\r\n \r\n Producto manzana4 = new Producto (\"manzana\", \"la costeña\", 15, 0);\r\n Nodo<Producto> nTemp4 = new Nodo(manzana4);\r\n listaSoriana.agregarNodo(nTemp4);\r\n \r\n Producto platano5 = new Producto (\"platano\", \"el Huertito\", 26, 0);\r\n Nodo<Producto> nTemp5 = new Nodo (platano5);\r\n listaSoriana.agregarNodo(nTemp5);\r\n \r\n Producto platano6 = new Producto (\"platano\", \"granjita dorada\", 36, 0);\r\n Nodo<Producto> nTemp6 = new Nodo (platano6);\r\n listaSoriana.agregarNodo (nTemp6);\r\n \r\n Producto pera7 = new Producto (\"pera\", \"el rancho de don chuy\", 38, 0);\r\n Nodo<Producto> nTemp7 = new Nodo (pera7);\r\n listaSoriana.agregarNodo(nTemp7);\r\n \r\n Producto pera8 = new Producto (\"pera\", \"la costeña\", 8,0);\r\n Nodo<Producto> nTemp8 = new Nodo (pera8);\r\n listaSoriana.agregarNodo(nTemp8);\r\n \r\n Producto durazno9 = new Producto (\"durazno\", \"el huertito\", 12.50, 0);\r\n Nodo<Producto> nTemp9 = new Nodo (durazno9);\r\n listaSoriana.agregarNodo(nTemp9);\r\n \r\n Producto fresa10 = new Producto (\"fresa\", \"el rancho de don chuy\", 35.99,0);\r\n Nodo<Producto> nTemp10 = new Nodo (fresa10);\r\n listaSoriana.agregarNodo(nTemp10);\r\n \r\n Producto fresa11 = new Producto (\"fresa\", \"grajita dorada\", 29.99,0);\r\n Nodo<Producto> nTemp11 = new Nodo (fresa11);\r\n listaSoriana.agregarNodo(nTemp11);\r\n \r\n Producto melon12 = new Producto (\"melon\", \"la costeña\", 18.50, 0);\r\n Nodo<Producto> nTemp12 = new Nodo (melon12);\r\n listaSoriana.agregarNodo(nTemp12);\r\n \r\n Producto melon13 = new Producto (\"melon\", \"el huertito\", 8.50, 0);\r\n Nodo<Producto> nTemp13 = new Nodo (melon13);\r\n listaSoriana.agregarNodo(nTemp13);\r\n \r\n Producto elote14 = new Producto (\"elote\", \"el ranchito\", 6, 0);\r\n Nodo<Producto> nTemp14 = new Nodo (elote14);\r\n listaSoriana.agregarNodo(nTemp14);\r\n \r\n Producto elote15 = new Producto (\"elote\", \"moctezuma\", 12, 0);\r\n Nodo<Producto> nTemp15 = new Nodo (elote15);\r\n listaSoriana.agregarNodo(nTemp15);\r\n \r\n Producto aguacate16 = new Producto (\"aguacate\", \"la costeña\", 35, 0);\r\n Nodo<Producto> nTemp16 = new Nodo (aguacate16);\r\n listaSoriana.agregarNodo(nTemp16);\r\n \r\n Producto cebolla17 = new Producto (\"cebolla\", \"granjita dorada\", 8.99, 0);\r\n Nodo<Producto> nTemp17 = new Nodo (cebolla17);\r\n listaSoriana.agregarNodo(nTemp17);\r\n \r\n Producto tomate18 = new Producto (\"tomate\", \"el costeñito feliz\", 10.50, 0);\r\n Nodo<Producto> nTemp18 = new Nodo (tomate18);\r\n listaSoriana.agregarNodo(nTemp18);\r\n \r\n Producto tomate19 = new Producto (\"tomate\", \"el ranchito\", 8.99, 0);\r\n Nodo<Producto> nTemp19 = new Nodo (tomate19);\r\n listaSoriana.agregarNodo(nTemp19);\r\n \r\n Producto limon20 = new Producto (\"limon\", \"la costeña\", 3.50, 0);\r\n Nodo<Producto> nTemp20 = new Nodo (limon20);\r\n listaSoriana.agregarNodo(nTemp20);\r\n \r\n Producto limon21 = new Producto (\"limon\", \"el ranchito\", 10.99, 0);\r\n Nodo<Producto> nTemp21 = new Nodo (limon21);\r\n listaSoriana.agregarNodo(nTemp21);\r\n \r\n Producto papas22 = new Producto (\"papas\", \"la costeña\", 11, 0);\r\n Nodo<Producto> nTemp22 = new Nodo(papas22);\r\n listaSoriana.agregarNodo(nTemp22);\r\n \r\n Producto papas23 = new Producto (\"papas\", \"granjita dorada\", 4.99, 0);\r\n Nodo<Producto> nTemp23 = new Nodo(papas23);\r\n listaSoriana.agregarNodo(nTemp23);\r\n \r\n Producto chile24 = new Producto (\"chile\", \"el rancho de don chuy\", 2.99, 0);\r\n Nodo<Producto> nTemp24 = new Nodo (chile24);\r\n listaSoriana.agregarNodo(nTemp24);\r\n \r\n Producto chile25 = new Producto (\"chile\",\"la costeña\", 12, 0);\r\n Nodo<Producto> nTemp25 = new Nodo (chile25);\r\n listaSoriana.agregarNodo(nTemp25);\r\n \r\n Producto jamon26 = new Producto (\"jamon\",\"fud\", 25, 1);\r\n Nodo<Producto> nTemp26 = new Nodo(jamon26);\r\n listaSoriana.agregarNodo(nTemp26);\r\n \r\n Producto jamon27 = new Producto(\"jamon\", \"kir\", 13.99, 1);\r\n Nodo<Producto> nTemp27 = new Nodo(jamon27);\r\n listaSoriana.agregarNodo(nTemp27);\r\n \r\n Producto peperoni28 = new Producto (\"peperoni28\", \"fud\", 32, 1);\r\n Nodo<Producto> nTemp28 = new Nodo (peperoni28);\r\n listaSoriana.agregarNodo(nTemp28);\r\n \r\n Producto salchicha29 = new Producto (\"salchicha\", \" san rafael\", 23.99, 1);\r\n Nodo<Producto> nTemp29 = new Nodo (salchicha29);\r\n listaSoriana.agregarNodo(nTemp29); \r\n \r\n Producto huevos30 = new Producto (\"huevos\", \"san rafael\", 30.99, 1);\r\n Nodo<Producto> nTemp30 = new Nodo (huevos30);\r\n listaSoriana.agregarNodo(nTemp30);\r\n \r\n Producto chuletas31 = new Producto (\"chuletas\", \"la res dorada\", 55, 1);\r\n Nodo<Producto> nTemp31 = new Nodo (chuletas31);\r\n listaSoriana.agregarNodo(nTemp31);\r\n \r\n Producto carnemolida32 = new Producto (\"carne molida\", \"san rafael\", 34, 1);\r\n Nodo<Producto> nTemp32 = new Nodo (carnemolida32);\r\n listaSoriana.agregarNodo(nTemp32);\r\n \r\n Producto carnemolida33 = new Producto (\"carne molida\", \"la res dorada\", 32.99, 1);\r\n Nodo<Producto> nTemp33 = new Nodo (carnemolida33);\r\n listaSoriana.agregarNodo(nTemp33);\r\n \r\n Producto pollo34 = new Producto (\"pollo\", \"pollito feliz\", 38, 1);\r\n Nodo<Producto> nTemp34 = new Nodo (pollo34);\r\n listaSoriana.agregarNodo(nTemp34);\r\n \r\n Producto pescado35 = new Producto (\"pescado\", \"pescadito\", 32.99, 1);\r\n Nodo<Producto> nTemp35 = new Nodo (pescado35);\r\n listaSoriana.agregarNodo(nTemp35);\r\n \r\n Producto quesolaurel36 = new Producto (\"queso\", \"laurel\", 23.50, 1);\r\n Nodo<Producto> nTemp36 = new Nodo (quesolaurel36);\r\n listaSoriana.agregarNodo(nTemp36);\r\n \r\n Producto leche37 = new Producto (\"leche\", \"nutrileche\", 12.99, 1);\r\n Nodo<Producto> nTemp37 = new Nodo (leche37);\r\n listaSoriana.agregarNodo(nTemp37);\r\n \r\n Producto lechedeslactosada38 = new Producto (\"leche deslactosada\", \"lala\", 17.50, 1);\r\n Nodo<Producto> nTemp38 = new Nodo (lechedeslactosada38);\r\n listaSoriana.agregarNodo(nTemp38);\r\n \r\n Producto panblanco39 = new Producto (\"pan blanco\", \"bombo\", 23.99, 2);\r\n Nodo<Producto> nTemp39 = new Nodo (panblanco39);\r\n listaSoriana.agregarNodo(nTemp39);\r\n \r\n Producto atun40 = new Producto (\"atun\", \"la aleta feliz\", 12, 2);\r\n Nodo<Producto> nTemp40 = new Nodo (atun40);\r\n listaSoriana.agregarNodo(nTemp40);\r\n \r\n Producto atun41 = new Producto (\"atun\", \"el barco\", 10.99, 2);\r\n Nodo<Producto> nTemp41 = new Nodo (atun41);\r\n listaSoriana.agregarNodo(nTemp41);\r\n \r\n Producto arroz42 = new Producto (\"arroz\", \"mi marca\", 12.50, 2);\r\n Nodo<Producto> nTemp42 = new Nodo (arroz42);\r\n listaSoriana.agregarNodo(nTemp42);\r\n \r\n Producto arroz43 = new Producto (\"arroz\", \"soriana\", 9.99, 2);\r\n Nodo<Producto> nTemp43 = new Nodo (arroz43);\r\n listaSoriana.agregarNodo(nTemp43);\r\n \r\n Producto frijol44 = new Producto (\"frijol\", \"mi marca\", 10.99, 2);\r\n Nodo<Producto> nTemp44 = new Nodo (frijol44);\r\n listaSoriana.agregarNodo(nTemp44);\r\n \r\n Producto frijol45 = new Producto (\"frijol\", \"soriana\", 15.99, 2);\r\n Nodo<Producto> nTemp45 = new Nodo (frijol45);\r\n listaSoriana.agregarNodo(nTemp45);\r\n \r\n Producto azucar46 = new Producto (\"azucar\", \"mi marca\", 12.50, 2);\r\n Nodo<Producto> nTemp46 = new Nodo (azucar46);\r\n listaSoriana.agregarNodo(nTemp46);\r\n \r\n Producto azucar47 = new Producto (\"azucar\", \"zulka\", 15.99, 2);\r\n Nodo<Producto> nTemp47 = new Nodo (azucar47);\r\n listaSoriana.agregarNodo(nTemp47);\r\n \r\n Producto servilletas48 = new Producto (\"servilletas\", \"esponjosas\",10.50, 2);\r\n Nodo<Producto> nTemp48 = new Nodo (servilletas48);\r\n listaSoriana.agregarNodo(nTemp48);\r\n \r\n Producto sal49 = new Producto (\"sal\", \"mar azul\", 3.99, 2);\r\n Nodo<Producto> nTemp49 = new Nodo (sal49);\r\n listaSoriana.agregarNodo(nTemp49);\r\n \r\n Producto aceitedecocina50 = new Producto (\"aceite de cocina\", \"123\", 15.99, 2);\r\n Nodo<Producto> nTemp50 = new Nodo (aceitedecocina50);\r\n listaSoriana.agregarNodo(nTemp50);\r\n \r\n Producto caffe51 = new Producto (\"caffe\", \"nescafe\", 23, 2);\r\n Nodo<Producto> nTemp51 = new Nodo (caffe51);\r\n listaSoriana.agregarNodo(nTemp51);\r\n \r\n Producto puredetomate52 = new Producto (\"pure de tomate\", \" la costeña\", 12.99, 2);\r\n Nodo<Producto> nTemp52 = new Nodo (puredetomate52);\r\n listaSoriana.agregarNodo(nTemp52);\r\n \r\n Producto lentejas53 = new Producto (\"lentejas\", \"la granjita\", 8.99, 2);\r\n Nodo<Producto> nTemp53 = new Nodo (lentejas53);\r\n listaSoriana.agregarNodo(nTemp53);\r\n \r\n Producto zuko54 = new Producto (\"zuko\", \"zuko\", 2.99, 2);\r\n Nodo<Producto> nTemp54 = new Nodo (zuko54);\r\n listaSoriana.agregarNodo(nTemp54);\r\n \r\n Producto champu55 = new Producto (\"champu\", \"loreal\", 32, 3);\r\n Nodo<Producto> nTemp55 = new Nodo (champu55);\r\n listaSoriana.agregarNodo(nTemp55);\r\n \r\n Producto champu56 = new Producto (\"champu\", \"el risueño\", 29.99, 3);\r\n Nodo<Producto> nTemp56 = new Nodo (champu56);\r\n listaSoriana.agregarNodo(nTemp56);\r\n \r\n Producto desodorante57 = new Producto (\"desodorante\", \"nivea\", 23.50, 3);\r\n Nodo<Producto> nTemp57 = new Nodo (desodorante57);\r\n listaSoriana.agregarNodo(nTemp57);\r\n \r\n Producto pastadedientes58 = new Producto(\"pasta de dientes\", \"colgate\", 17.50, 3);\r\n Nodo<Producto> nTemp58 = new Nodo (pastadedientes58);\r\n listaSoriana.agregarNodo(nTemp58);\r\n \r\n Producto pastadedientes59 = new Producto (\"pasta de dientes\", \"el diente blanco\", 29, 3);\r\n Nodo<Producto> nTemp59 = new Nodo (pastadedientes59);\r\n listaSoriana.agregarNodo(nTemp59);\r\n \r\n Producto rastrillos60 = new Producto (\"rastrillos\", \"el filosito\", 33.99, 3);\r\n Nodo<Producto> nTemp60 = new Nodo (rastrillos60);\r\n listaSoriana.agregarNodo(nTemp60);\r\n \r\n Producto rastrillos61 = new Producto (\"rastrillos\", \"barba de oro\", 23.99, 3);\r\n Nodo<Producto> nTemp61 = new Nodo (rastrillos61);\r\n listaSoriana.agregarNodo(nTemp61);\r\n \r\n Producto hilodental62 = new Producto (\"hilo dental\", \"el diente blanco\", 32.99, 3);\r\n Nodo<Producto> nTemp62 = new Nodo (hilodental62);\r\n listaSoriana.agregarNodo(nTemp62);\r\n \r\n Producto cepillodedientes63 = new Producto (\"cepillo de dientes\", \"OBBM\", 17.99, 3);\r\n Nodo<Producto> nTemp63 = new Nodo (cepillodedientes63);\r\n listaSoriana.agregarNodo(nTemp63);\r\n \r\n Producto cloro64 = new Producto (\"cloro\", \"cloralex\", 23.50, 3);\r\n Nodo<Producto> nTemp64 = new Nodo (cloro64);\r\n listaSoriana.agregarNodo(nTemp64);\r\n \r\n Producto acondicionador65 = new Producto (\"acondicionador\", \"sedal\", 28.99, 3);\r\n Nodo<Producto> nTemp65 = new Nodo (acondicionador65);\r\n listaSoriana.agregarNodo(nTemp65);\r\n \r\n Producto acondicionador66 = new Producto (\"acondicionador\", \"pantene\", 23.99, 3);\r\n Nodo<Producto> nTemp66 = new Nodo (acondicionador66);\r\n listaSoriana.agregarNodo(nTemp66);\r\n \r\n Producto pinol67 = new Producto(\"pinol\", \"mi piso limpio\", 15, 3);\r\n Nodo<Producto> nTemp67 = new Nodo (pinol67);\r\n listaSoriana.agregarNodo(nTemp67);\r\n \r\n Producto pinol68 = new Producto (\"pinol\", \"eficaz\", 18.99, 3);\r\n Nodo<Producto> nTemp68 = new Nodo (pinol68);\r\n listaSoriana.agregarNodo(nTemp68);\r\n \r\n Producto tortillas69 = new Producto (\"tortillas\", \"maizena\", 8.99, 2);\r\n Nodo<Producto> nTemp69 = new Nodo (tortillas69);\r\n listaSoriana.agregarNodo(nTemp69);\r\n \r\n Producto cremaparacuerpo70 = new Producto (\"crema para cuerpo\", \"dove\", 13.50, 3);\r\n Nodo<Producto> nTemp70 = new Nodo (cremaparacuerpo70);\r\n listaSoriana.agregarNodo(nTemp70);\r\n \r\n Producto maizoro71 = new Producto (\"maizoro\", \"special k\", 35.99, 2);\r\n Nodo<Producto> nTemp71 = new Nodo (maizoro71);\r\n listaSoriana.agregarNodo(nTemp71);\r\n \r\n Producto maizoro72 = new Producto (\"maizoro\",\"azucaradas\", 43, 2);\r\n Nodo<Producto> nTemp72 = new Nodo (maizoro72);\r\n listaSoriana.agregarNodo(nTemp72);\r\n \r\n Producto zanahoria73 = new Producto (\"zanahoria\", \"el huertito\", 12.99, 0);\r\n Nodo<Producto> nTemp73 = new Nodo (zanahoria73);\r\n listaSoriana.agregarNodo(nTemp73);\r\n \r\n Producto maizoro74 = new Producto (\"maizoro\", \"cherrios\", 45, 2);\r\n Nodo<Producto> nTemp74 = new Nodo (maizoro74);\r\n listaSoriana.agregarNodo(nTemp74);\r\n \r\n Producto mayonesa75 = new Producto (\"mayonesa\", \"helmans\", 23, 2);\r\n Nodo<Producto> nTemp75 = new Nodo (mayonesa75);\r\n listaSoriana.agregarNodo(nTemp75);\r\n }",
"private void listar() throws Exception{\n int resId=1;\n List<PlatoDia> lista = this.servicioRestaurante.listarMenuDia(resId);\n this.modelListEspecial.clear();\n lista.forEach(lse -> {\n this.modelListEspecial.addElement(\"ID: \" + lse.getId() \n + \" NOMBRE: \" + lse.getNombre()\n + \" DESCRIPCION: \" + lse.getDescripcion()\n + \" PRECIO: \" + lse.getPrecio()\n + \" ENTRADA: \"+lse.getEntrada() \n + \" PRINCIPIO: \"+lse.getPrincipio()\n + \" CARNE: \"+lse.getCarne()\n + \" BEBIDA: \"+lse.getBebida()\n + \" DIA: \"+lse.getDiaSemana());\n });\n }",
"public void nuevoJuego() {\n fallos = 0;\n finDePartida = false;\n\n for (TextView b : botonesLetras) {\n b.setTextColor(Color.BLACK);\n b.setOnClickListener(clickListenerLetras);\n b.setPaintFlags(b.getPaintFlags() & (~ Paint.STRIKE_THRU_TEXT_FLAG));\n }\n ImageView img_ahorcado = (ImageView) findViewById(es.makingapps.ahorcado.R.id.img_ahorcado);\n img_ahorcado.setImageResource(R.drawable.ahorcado_0);\n\n BaseDatos bd = new BaseDatos(this);\n palabraActual = bd.queryPalabraAleatoria(nivelSeleccionado, esAcumulativo);\n\n palabraEspaniol.setText(palabraActual.getEspaniol());\n\n progreso = \"\";\n boolean parentesis = false;\n for(int i = 0; i<palabraActual.getIngles().length(); i++) {\n if(parentesis){\n progreso += palabraActual.getIngles().charAt(i);\n }\n else {\n// if (palabraActual.getIngles().charAt(i) == ' ')\n// progreso += ' ';\n// else if (palabraActual.getIngles().charAt(i) == '-')\n// progreso += '-';\n// else if (palabraActual.getIngles().charAt(i) == '/')\n// progreso += '/';\n// else if (palabraActual.getIngles().charAt(i) == '(') {\n// progreso += '(';\n// parentesis = true;\n// }\n// else if (palabraActual.getIngles().charAt(i) == ')') {\n// progreso += ')';\n// parentesis = false;\n// }\n// else\n// progreso += '_';\n if(Character.isLowerCase(palabraActual.getIngles().charAt(i)))\n progreso += '_';\n else if (palabraActual.getIngles().charAt(i) == '(') {\n progreso += '(';\n parentesis = true;\n }\n else if (palabraActual.getIngles().charAt(i) == ')') {\n progreso += ')';\n parentesis = false;\n }\n else\n progreso += palabraActual.getIngles().charAt(i);\n }\n }\n\n palabraIngles.setText( progreso );\n }",
"@Override\n public int contarHojas(){\n return (super.contarHojas());\n }",
"public void asetaTeksti(){\n }",
"private void afficheSuiv(){\n\t\ttry{ // Essayer ceci\n\t\t\tif(numCourant <= rep.taille()){\n\t\t\t\tnumCourant ++;\n\t\t\t\tPersonne e = rep.recherchePersonne(numCourant); // Rechercher la personne en fonction du numCourant\n\t\t\t\tafficherPersonne(e);\n\t\t\t}else{\n\t\t\t\tafficherMessageErreur();\n\t\t\t}\n\t\t}catch(Exception e){ // Permet de voir s'il y a cette exception\n\t\t\tafficherMessageErreur();\n\t\t\tnumCourant --;\n\t\t}\n\t}",
"public void generarCuestionario() {\n \n try{\n ValidarOpcionSeleccionada.validar (radios);\n }catch (OpcionNoSeleccionadaException e) {\n etiquetaRespuesta.setText(\"Debes selecionar una opcion\");\n}\n \n\n //Con el modelo construido debemos representar nuestra pregunta\n //y mostrarala\n //Primero creamos las opciones\n Opcion op1 = new Opcion();\n op1.setTitulo(\"Inglaterra\");\n op1.setCorrecta(false);\n\n Opcion op2 = new Opcion();\n op2.setTitulo(\"México\");\n op2.setCorrecta(false);\n\n Opcion op3 = new Opcion();\n op3.setTitulo(\"Italia\");\n op3.setCorrecta(false);\n\n Opcion op4 = new Opcion();\n op4.setTitulo(\"Francia\");\n op4.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones = {op1, op2, op3, op4};\n Pregunta p1 = new Pregunta();\n p1.setTitulo(\"¿Que país tiene más Premios Nobel de Literatura?\");\n p1.setOpciones(opciones);\n\n \n //opciones de la pregunta 2\n Opcion op21 = new Opcion();\n op21.setTitulo(\"Ares\");\n op21.setCorrecta(false);\n\n Opcion op22 = new Opcion();\n op22.setTitulo(\"Prometeo\");\n op22.setCorrecta(false);\n\n Opcion op23 = new Opcion();\n op23.setTitulo(\"Poseidón\");\n op23.setCorrecta(true);\n\n Opcion op24 = new Opcion();\n op24.setTitulo(\"Hefesto\");\n op24.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones2 = {op21, op22, op23, op24};\n Pregunta p2 = new Pregunta();\n p2.setTitulo(\"¿Quién es el padre del cíclope Polifemo según la mitología griega?\");\n p2.setOpciones(opciones2);\n \n //opciones de la pregunta 3\n Opcion op31 = new Opcion();\n op31.setTitulo(\"J.K Rowling\");\n op31.setCorrecta(false);\n\n Opcion op32 = new Opcion();\n op32.setTitulo(\"Emily Bronte\");\n op32.setCorrecta(false);\n\n Opcion op33 = new Opcion();\n op33.setTitulo(\"Stephen King\");\n op33.setCorrecta(false);\n\n Opcion op34 = new Opcion();\n op34.setTitulo(\"Jane Austen\");\n op34.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones3 = {op31, op32, op33, op34};\n Pregunta p3 = new Pregunta();\n p3.setTitulo(\"¿Quien escribio el libro Orgullo y Prejuicio?\");\n p3.setOpciones(opciones3);\n \n //Opciones pregunta 4\n Opcion op41 = new Opcion();\n op41.setTitulo(\"El Cáliz de Fuego\");\n op41.setCorrecta(true);\n\n Opcion op42 = new Opcion();\n op42.setTitulo(\"Festin de Cuervos\");\n op42.setCorrecta(false);\n\n Opcion op43 = new Opcion();\n op43.setTitulo(\"El prisionero de Azkaban\");\n op43.setCorrecta(false);\n\n Opcion op44 = new Opcion();\n op44.setTitulo(\"Principe Mecánico\");\n op44.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones4 = {op41, op42, op43, op44};\n Pregunta p4 = new Pregunta();\n p4.setTitulo(\"¿Como se llama el cuarto libro de Harry Potter?\");\n p4.setOpciones(opciones4);\n \n //Opciones pregunta 5\n Opcion op51 = new Opcion();\n op51.setTitulo(\"Dunkirk\");\n op51.setCorrecta(false);\n\n Opcion op52 = new Opcion();\n op52.setTitulo(\"Los Miserables\");\n op52.setCorrecta(true);\n\n Opcion op53 = new Opcion();\n op53.setTitulo(\"Interestelar\");\n op53.setCorrecta(false);\n\n Opcion op54 = new Opcion();\n op54.setTitulo(\"Batman: El caballero de la noche\");\n op54.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones5= {op51, op52, op53, op54};\n Pregunta p5 = new Pregunta();\n p5.setTitulo(\"¿Que película NO dirigio Chistopher Nolan?\");\n p5.setOpciones(opciones5);\n \n //Opciones pregunta 6\n Opcion op61 = new Opcion();\n op61.setTitulo(\"Joe Greene\");\n op61.setCorrecta(false);\n\n Opcion op62 = new Opcion();\n op62.setTitulo(\"Tom Brady\");\n op62.setCorrecta(false);\n\n Opcion op63 = new Opcion();\n op63.setTitulo(\"Joe Montana\");\n op63.setCorrecta(false);\n\n Opcion op64 = new Opcion();\n op64.setTitulo(\"Peyton Manning\");\n op64.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones6 = {op61, op62, op63, op64};\n Pregunta p6 = new Pregunta();\n p6.setTitulo(\"¿Que jugador ha ganado más MVP en la NFL?\");\n p6.setOpciones(opciones6);\n \n //Opciones pregunta 7\n Opcion op71 = new Opcion();\n op71.setTitulo(\"Bayern Munich\");\n op71.setCorrecta(false);\n\n Opcion op72 = new Opcion();\n op72.setTitulo(\"Real Madrid\");\n op72.setCorrecta(true);\n\n Opcion op73 = new Opcion();\n op73.setTitulo(\"Barcelona\");\n op73.setCorrecta(false);\n\n Opcion op74 = new Opcion();\n op74.setTitulo(\"Manchester United\");\n op74.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones7 = {op71, op72, op73, op74};\n Pregunta p7 = new Pregunta();\n p7.setTitulo(\"¿Que equipo ha ganado más Champions League en la hsitoria?\");\n p7.setOpciones(opciones7);\n \n \n //Opciones pregunta 8\n \n Opcion op81 = new Opcion();\n op81.setTitulo(\"Tratado de Versalles\");\n op81.setCorrecta(true);\n\n Opcion op82 = new Opcion();\n op82.setTitulo(\"Tratado de Granada\");\n op82.setCorrecta(false);\n\n Opcion op83 = new Opcion();\n op83.setTitulo(\"Tratado de Lyon\");\n op83.setCorrecta(false);\n\n Opcion op84 = new Opcion();\n op84.setTitulo(\"Tratado de Londres\");\n op84.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones8 = {op81, op82, op83, op84};\n Pregunta p8 = new Pregunta();\n p8.setTitulo(\"¿Como se llamo el tratado con el que se le dio fin a la PGM?\");\n p8.setOpciones(opciones8);\n \n //opciones pregunta 9 \n \n Opcion op91 = new Opcion();\n op91.setTitulo(\"Hermanos Lumiere\");\n op91.setCorrecta(false);\n\n Opcion op92 = new Opcion();\n op92.setTitulo(\"Steven Spielberg\");\n op92.setCorrecta(false);\n\n Opcion op93 = new Opcion();\n op93.setTitulo(\"Thomas Harper\");\n op93.setCorrecta(false);\n\n Opcion op94 = new Opcion();\n op94.setTitulo(\"George Mellies\");\n op94.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones9 = {op91, op92, op93, op94};\n Pregunta p9 = new Pregunta();\n p9.setTitulo(\"¿A quien se le considera como el mago del cine?\");\n p9.setOpciones(opciones9);\n \n //Opciones pregunta 10\n Opcion op101 = new Opcion();\n op101.setTitulo(\"Miguel Ángel\");\n op101.setCorrecta(false);\n\n Opcion op102 = new Opcion();\n op102.setTitulo(\"Rafael Sanzio\");\n op102.setCorrecta(false);\n\n Opcion op103 = new Opcion();\n op103.setTitulo(\"Leonardo Da Vinci\");\n op103.setCorrecta(true);\n\n Opcion op104 = new Opcion();\n op104.setTitulo(\"Bernini\");\n op104.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones10 = {op101, op102, op103, op104};\n Pregunta p10 = new Pregunta();\n p10.setTitulo(\"¿Que artífice NO participo en la construcción de la Basílica de San Pedro?\");\n p10.setOpciones(opciones10);\n \n \n \n //Pregunta p11 =new Pregunta();\n System.out.println(\"Fin de Cuestionario \");\n \n \n \n //Vamos a adaptar el cuestioanario a lo que ya teniamos\n Cuestionario c = new Cuestionario();\n //Creamos el list de preguntas\n \n \n \n //Se agrega a este list las preguntas que tenemos\n preguntas.add(p1);\n preguntas.add(p2);\n preguntas.add(p3);\n preguntas.add(p4);\n preguntas.add(p5);\n preguntas.add(p6);\n preguntas.add(p7);\n preguntas.add(p8);\n preguntas.add(p9);\n preguntas.add(p10);\n // preguntas.add(p11);\n //A este list le vamos a proporcionar el valor del correspondiente\n //cuestioanrio\n \n c.setPreguntas(preguntas);\n //Ajustamos el titulo de la primera pregunta\n mostrarPregunta (preguntaActual); \n//Primero ajustamos el titulo de la primer pregunta en la etiqueta de la pregunta\ntry{\n int opcion= Integer.parseInt (etiquetaRespuesta.getText());\n ValidarNumeroPreguntas.validar (opcion);\n }catch (NumberFormatException e) {\n \n}\n \n }",
"private void aggiornaContiFiglioRicorsivamente(Conto contoPadre) {\n\t\tString methodName = \"aggiornaContiFiglioRicorsivamente\";\n\t\tcontoPadre.setDataInizioValiditaFiltro(this.conto.getDataInizioValidita());\n\t\t\n\t\tListaPaginata<Conto> contiFiglio = contoDad.ricercaSinteticaContoFigli(contoPadre, new ParametriPaginazione(0,Integer.MAX_VALUE));\n\t\tfor (Conto contoFiglio : contiFiglio) {\n\t\t\t\n\t\t\t//TODO aggiungere qui tutti i parametri da ribaltare sui conti figli.\n\t\t\tcontoFiglio.setAttivo(contoPadre.getAttivo()); //in analisi c'è solo questo parametro!\n\t\t\t\n\t\t\tif(isContoDiLivelloDiLegge()) {\n\t\t\t\tlog.debug(methodName, \"Conto di livello di legge: aggiorno tutti i campi del figlio \" + contoFiglio.getCodice());\n\t\t\t\t\n\t\t\t\t//TODO controllare eventuali altri parametri da ribaltare ai conti figlio.\n\t\t\t\tcontoFiglio.setElementoPianoDeiConti(contoPadre.getElementoPianoDeiConti());\n\t\t\t\tcontoFiglio.setCategoriaCespiti(contoPadre.getCategoriaCespiti());\n\t\t\t\tcontoFiglio.setTipoConto(contoPadre.getTipoConto());\n\t\t\t\tcontoFiglio.setTipoLegame(contoPadre.getTipoLegame());\n\t\t\t\tcontoFiglio.setContoAPartite(contoPadre.getContoAPartite());\n\t\t\t\tcontoFiglio.setContoDiLegge(contoPadre.getContoDiLegge());\n\t\t\t\tcontoFiglio.setCodiceBilancio(contoPadre.getCodiceBilancio());\n\t\t\t\tcontoFiglio.setContoCollegato(contoPadre.getContoCollegato());\n\t\t\t} else {\n\t\t\t\tlog.debug(methodName, \"Conto NON di livello di legge: aggiorno solo il flag Attivo del figlio \" + contoFiglio.getCodice());\n\t\t\t}\n\t\t\t\n\t\t\tcontoDad.aggiornaConto(contoFiglio);\n\t\t\tlog.debug(methodName, \"Aggiornato conto figlio: \"+ contoFiglio.getCodice());\n\t\t\taggiornaContiFiglioRicorsivamente(contoFiglio);\n\t\t}\n\t}"
] | [
"0.65587926",
"0.6408415",
"0.629802",
"0.6286415",
"0.6230289",
"0.6139863",
"0.6139003",
"0.6135145",
"0.6133864",
"0.60953265",
"0.60832936",
"0.6080962",
"0.60799664",
"0.6076239",
"0.60607654",
"0.6050719",
"0.603783",
"0.603732",
"0.6034153",
"0.60322994",
"0.6025394",
"0.6016436",
"0.6008129",
"0.6007447",
"0.5998147",
"0.59929574",
"0.5991342",
"0.5991098",
"0.59802276",
"0.5972424",
"0.59723526",
"0.59656125",
"0.5964491",
"0.5958494",
"0.59437156",
"0.5929156",
"0.5925383",
"0.59243",
"0.59201086",
"0.5902367",
"0.5890683",
"0.58879036",
"0.58854836",
"0.58783793",
"0.5875045",
"0.58631575",
"0.5862627",
"0.58596766",
"0.58529913",
"0.5848693",
"0.58479285",
"0.5845013",
"0.5821571",
"0.58211887",
"0.58188164",
"0.5811653",
"0.58115613",
"0.5804874",
"0.58034015",
"0.5800785",
"0.580031",
"0.57969093",
"0.57965225",
"0.579413",
"0.5791231",
"0.5784316",
"0.57816046",
"0.57815146",
"0.5774085",
"0.57716054",
"0.57703876",
"0.5767128",
"0.5765719",
"0.5765275",
"0.57617843",
"0.5757984",
"0.57567",
"0.5755084",
"0.57526726",
"0.5752606",
"0.57482916",
"0.5744556",
"0.5743549",
"0.5743146",
"0.5742036",
"0.5737729",
"0.5732907",
"0.572199",
"0.5719902",
"0.5719682",
"0.57186",
"0.571654",
"0.57164145",
"0.57152826",
"0.5715269",
"0.5712144",
"0.5696563",
"0.5696119",
"0.5694335",
"0.56902826",
"0.5689067"
] | 0.0 | -1 |
TODO Autogenerated method stub | public void generateNewTasks(List<CaptureTask> tasks) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | public void updateTaskStatus(CaptureTask task, String status, String description) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | public boolean checkTaskExist(CaptureTask task) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | public List<CaptureTask> loadTaskToTaskPool(int poolSize) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | public List<TaskGenerateTrigger> loadTaskTriggers() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void 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 |
Initializes the internal state of this node. | public AbstractNode() {
this.incomingEdges = new ArrayList<E>();
this.outgoingEdges = new ArrayList<E>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings(\"unchecked\")\n\t\tvoid init() {\n\t\t\tsetNodes(offHeapService.newArray(JudyIntermediateNode[].class, NODE_SIZE, true));\n\t\t}",
"public void initialize()\n {\n if (!this.seedInitialized)\n {\n throw new IllegalStateException(\"Seed \" + this.maxHeight + \" not initialized\");\n }\n\n this.heightOfNodes = new Vector();\n this.tailLength = 0;\n this.firstNode = null;\n this.firstNodeHeight = -1;\n this.isInitialized = true;\n System.arraycopy(this.seedNext, 0, this.seedActive, 0, messDigestTree\n .getDigestSize());\n }",
"public void init() {\n\t\tfor (Node node : nodes)\n\t\t\tnode.init();\n\t}",
"public Node()\r\n {\r\n initialize(null);\r\n lbl = id;\r\n }",
"protected void initialize() {\n\t\tthis.position = Point3D.ZERO;\n\t\t// reset subclasses properties if any\n\t\treset();\n\t}",
"public final void initialize() {\n initialize(0);\n }",
"public void initialize() {\n grow(0);\n }",
"@Override\n public void initialize() {\n time = 0;\n //noinspection ConstantConditions\n this.runningTasks.addAll(getInitialNode().getTasks());\n for (Node node : nodes) {\n node.initialize();\n }\n }",
"public Node()\n {\n \n name = new String();\n type = new String(\"internal\"); //Initial Node type set to internal\n length = new Double(0); //Set initial branch length to zero\n children = new ArrayList<Node>();\n level = 0;\n treesize = new Double(0);\n depth = 0;\n newicklength = 0;\n startycoord = -1;\n startxcoord = -1;\n endxcoord = -1;\n endycoord = -1;\n standardy = -1;\n selected = false;\n xmultiplier = 0;\n ymultiplier = 0;\n }",
"@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }",
"@Override public void init()\n\t\t{\n\t\t}",
"public void init() {\n \n }",
"public Node()\n\t{\n\t\toriginalValue = sumValue = 0;\n\t\tparent = -1;\n\t}",
"public void initialize()\n {\n }",
"public void init() {\n\t\t}",
"protected void initialize() {\n\t\tright = left = throttle = turn = forward = 0;\n\t}",
"public Node() {\n }",
"public void initialize() {\n // empty for now\n }",
"private Node() {\n\n }",
"private void init() {\n\t\thead = -1;\n\t\tnumElements = 0;\n\t}",
"private void init() {\n if (root == null) {\n root = buildRoot();\n }\n }",
"protected void init() {\n super.init();\n uriExpr = null;\n uri = null;\n nameExpr = null;\n name = null;\n qname = null;\n attrExpr = null;\n attr = null;\n emptyExpr = null;\n empty = false;\n }",
"private Node() {\n // Start empty.\n element = null;\n }",
"@Override\n\t\tpublic void init() {\n\t\t}",
"private void initialize()\n\t{\n\t\tfor(int i = 0 ; i < SOM.length; i++)\n\t\t{\n\t\t\tfor(int j=0; j < SOM[0].length; j++)\n\t\t\t{ \n\t\t\t\tSOM[i][j] = new Node(INPUT_DIMENSION,i,j);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSOM_HORIZONTAL_LENGTH = SOM[0].length;\n\t\tSOM_VERTICAL_LENGTH = SOM.length;\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"public Node() {\r\n\t\tthis.input = null;\r\n\t\tthis.inputWeights = null;\r\n\t}",
"public Node() {\r\n\t}",
"public Node() {\r\n\t}",
"protected NodeProperties() {\r\n }",
"public Node()\n\t{\n\t\ttitle = \" \";\n\t\tavail = 0;\n\t\trented = 0;\n\t\tleft = null;\n\t\tright = null;\n\t\t\n\t}",
"public Node() \r\n\t{\r\n\t\tincludedNode = new ArrayList<Node>();\r\n\t\tin = false; \r\n\t\tout = false;\r\n\t}",
"protected void initialize() {\n\t\televator.zeroEncoder();\n\t}",
"private void init() {\n myNodeDetails = new NodeDetails();\n try {\n //port will store value of port used for connection\n //eg: port = 5554*2 = 11108\n String port = String.valueOf(Integer.parseInt(getMyNodeId()) * 2);\n //nodeIdHash will store hash of nodeId =>\n // eg: nodeIdHash = hashgen(5554)\n String nodeIdHash = genHash(getMyNodeId());\n myNodeDetails.setPort(port);\n myNodeDetails.setNodeIdHash(nodeIdHash);\n myNodeDetails.setPredecessorPort(port);\n myNodeDetails.setSuccessorPort(port);\n myNodeDetails.setSuccessorNodeIdHash(nodeIdHash);\n myNodeDetails.setPredecessorNodeIdHash(nodeIdHash);\n myNodeDetails.setFirstNode(true);\n\n if (getMyNodeId().equalsIgnoreCase(masterPort)) {\n chordNodeList = new ArrayList<NodeDetails>();\n chordNodeList.add(myNodeDetails);\n }\n\n } catch (Exception e) {\n Log.e(TAG,\"**************************Exception in init()**********************\");\n e.printStackTrace();\n }\n }",
"public void init() {\r\n\r\n\t}",
"public Node() {\n this.nodeMap = new HashMap<>();\n }",
"public void initialize() {\r\n\t\tsetValue(initialValue);\r\n\t}",
"public AbstractConfigNode() {\n state = new NodeState();\n state.setState(ENodeState.Loading);\n }",
"void initialise() {\n this.sleep = false;\n this.owner = this;\n renewNeighbourClusters();\n recalLocalModularity();\n }",
"protected void initialize() {\n \t\n }",
"public Node() {\n name = null;\n missionDescription = null;\n roles = null;\n stateValueBindings = null;\n nodeRuntime = null;\n isNetworkSingleton = false;\n }",
"public void init() {\r\n\t\t// to override\r\n\t}",
"public void initialize(){\n\t\t//TODO: put initialization code here\n\t\tsuper.initialize();\n\t\t\n\t}",
"public void init() {\n\t\t\n\t}",
"public Node(State state) {\r\n\t\t\tthis.state=state;\r\n\t\t}",
"public void initialize() {\r\n }",
"public Node()\r\n\t{\r\n\t\tnext = null;\r\n\t\tinfo = 0;\r\n\t}",
"public void initialize(Node currentNode) {\n\t\tthis.currentNode = currentNode;\n\t}",
"public void init() { }",
"public void init() { }",
"public Node(){\n\n\t\t}",
"public Node() {\n\t}",
"@Override\n public void initState() {\n \n\t//TODO: Complete Method\n\n }",
"protected void init() {\n init(null);\n }",
"private void init() {\n }",
"private void init() {\n this.listaObjetos = new ArrayList();\n this.root = null;\n this.objeto = new Tblobjeto();\n this.pagina = new Tblpagina();\n this.selectedObj = null;\n this.menus = null;\n this.subMenus = null;\n this.acciones = null;\n this.nodes = new ArrayList<TreeNode>();\n this.selectedObjeto = null;\n this.selectedTipo = null;\n this.renderPaginaForm = null;\n this.renderGrupoForm = null;\n this.selectedGrupo = null;\n this.populateTreeTable();\n }",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"public Node()\n {\n\t this.data = 0;\n\t this.prev = null;\n\t this.next = null;\n }",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void initialize() {\n\t\troot = new Group();\n\t\tgetProperties();\n\t\tsetScene();\n\t\tsetStage();\n\t\tsetGUIComponents();\n\t}",
"public BoxNode() {\n initProperties();\n }",
"private void initialize() {\r\n\r\n\t\tserverNode = new TreeParent(\"Servers\", \"Servers\", \"AA\", this);\r\n\t\tserverNode.setImageKey(\"System.gif\");\r\n\r\n\t\tnewServerNode = new TreeParent(\"NewServerWizard\", \"New Server\", \"AA\", this);\r\n\t\tnewServerNode.setImageKey(\"ApplicationFilter.gif\");\r\n\t\tnewServerNode.setExpandable(false);\r\n\t\tserverNode.addChild(newServerNode);\r\n\t\tnewServerNode.addChild(new TreeObject(\"Dummy\"));\r\n\t\r\n\t\tloadServers(serverNode);\r\n\r\n\t\tpreferenceNode = new TreeParent(\"Systems\", \"Preferences\", \"BB\", this);\r\n\t\tpreferenceNode.setImageKey(\"preference_page.gif\");\r\n\t\tpreferenceNode.addChild(new TreeObject(\"Dummy\"));\r\n\r\n\t\tinvisibleRoot = new TreeParent(\"\", \"InvisibleRoot\", \"AA\", this);\r\n\t\tinvisibleRoot.addChild(serverNode);\r\n\t\tinvisibleRoot.addChild(preferenceNode);\r\n\r\n\t}",
"public NodeInfo() {\n }",
"Node() {\r\n this.k = null;\r\n this.v = null;\r\n this.c = null;\r\n kcount = 0;\r\n }",
"public void init() {\n\t\n\t}",
"public void init() {\n\t}",
"public void init() {\n\t}",
"public void init() {\n\t}",
"@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}",
"private void initialize() {\r\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\r\n\t\tgridBagConstraints.anchor = GridBagConstraints.NORTHWEST;\r\n\t\tgridBagConstraints.weightx = 1.0D;\r\n\t\tgridBagConstraints.weighty = 1.0D;\r\n\t\tgridBagConstraints.fill = GridBagConstraints.BOTH;\r\n\t\tthis.setLayout(new GridBagLayout());\r\n\t\tthis.setBorder(BorderFactory.createLineBorder(Color.gray, 1));\r\n\t\tthis.add(getJTree(), gridBagConstraints);\r\n\t}",
"public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }",
"private BinaryTree() {\n root = new Node(0);\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 Node() {\n neighbors = new ArrayList<>();\n sizeOfSubtree = 0;\n containedPaths = new long[k];\n startingPaths = new long[k];\n }",
"private HashNode() {\r\n key = null;\r\n value = null;\r\n }",
"@Override\r\n\tpublic void init() {}",
"public Node() {\n\t\tnumberOfAttacks = Integer.MAX_VALUE;\n\t\tstate = new State(); // Generate a random state.\n\t\t// Calculate its number of attacks.\n\t\tnumberOfAttacks = state.calculatenumberOfAttacks();\n\t}",
"protected void initialize() {\r\n x = 0;\r\n y = 0;\r\n driveTrain.reInit();\r\n }",
"public void initialize() {\n // TODO\n }",
"public void initialize(Hashtable args) {\r\n addPort(east = new SamplePort2(this));\r\n addPort(west = new SamplePort2(this));\r\n addPort(north = new SamplePort(this));\r\n addPort(south = new SamplePort(this));\r\n System.err.println(\"inicializado nodo SampleNode ;)\");\r\n _number = _NextNumber++;\r\n }",
"protected AST_Node() {\r\n\t}",
"public Node()\r\n\t{\r\n\t\tnext = null;\r\n\t\tprev = null;\r\n\t\telem = 0;\r\n\t}",
"public Node()\n {\n this.name=\"/\";\n this.type=0;\n this.stage=0;\n children=new ArrayList<Node>();\n }",
"public void init(){\n \n }",
"private void init() {\r\n head = new DLList.Node<T>(null);\r\n head.setNext(tail);\r\n tail = new DLList.Node<T>(null);\r\n tail.setPrevious(head);\r\n size = 0;\r\n }",
"private void initialize() {\n }",
"public void initialize() {\n }",
"public void initialize() {\n\t}",
"public void initialize() {\n\t}"
] | [
"0.7093444",
"0.70781446",
"0.70336854",
"0.6990012",
"0.6981321",
"0.6970405",
"0.6962037",
"0.6927524",
"0.6919839",
"0.6913459",
"0.6912163",
"0.6888094",
"0.6843523",
"0.68418",
"0.6839284",
"0.6821222",
"0.67316556",
"0.6730979",
"0.6722575",
"0.67024004",
"0.6695692",
"0.66941017",
"0.668623",
"0.66710675",
"0.66574377",
"0.6647404",
"0.6646636",
"0.66457725",
"0.66405815",
"0.66405815",
"0.6635993",
"0.6628498",
"0.66224045",
"0.66222054",
"0.6620689",
"0.6603363",
"0.6601177",
"0.6593664",
"0.6588764",
"0.6587619",
"0.65801674",
"0.6579941",
"0.655512",
"0.65482485",
"0.6546406",
"0.65430385",
"0.65407836",
"0.6540739",
"0.6534909",
"0.6530695",
"0.6530695",
"0.65303457",
"0.65267473",
"0.6519027",
"0.6514456",
"0.6514216",
"0.6512682",
"0.65125096",
"0.65125096",
"0.65125096",
"0.65125096",
"0.65074277",
"0.6507301",
"0.6507301",
"0.6507301",
"0.6506672",
"0.6506672",
"0.6506672",
"0.6506672",
"0.65040535",
"0.6501544",
"0.65014094",
"0.64834476",
"0.6482402",
"0.64808875",
"0.6479593",
"0.6479593",
"0.6479593",
"0.64783645",
"0.64688206",
"0.64676344",
"0.6462243",
"0.6461072",
"0.6461072",
"0.6461072",
"0.6447193",
"0.6439002",
"0.64238364",
"0.6419472",
"0.64181215",
"0.6417816",
"0.6412951",
"0.6406714",
"0.6406099",
"0.64052236",
"0.6398418",
"0.63890105",
"0.6384483",
"0.63844293",
"0.63767296",
"0.63767296"
] | 0.0 | -1 |
Add the edge to the graph. If the edge's start node is null, the edge will be added to the root node. Implicit edges are added to the graph as necessary. | @Override
public boolean addChild(N endNode)
throws GraphLogicException {
E edge = buildDirectEdge(getThis(), endNode);
return addDirectEdge(edge);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addEdge(Edge edge){\n \n synchronized(vertexes){\n Long start = edge.getStart();\n Vertex sVertex = vertexes.get(start);\n if(sVertex != null){\n sVertex.addEdge(edge, true);\n }\n// if undirected graph then adds edge to the finish vertex too \n if(!edge.isDirected()){\n Long finish = edge.getFinish();\n Vertex fVertex = vertexes.get(finish);\n if(fVertex != null){\n fVertex.addEdge(edge, false);\n }\n }\n }\n \n }",
"void add(Edge edge);",
"public void addEdge( Edge edge ) {\r\n if ( edge == null ) return;\r\n edges.addElement(edge);\r\n }",
"public void addEdge(E e){\n\t\tedges.add(e);\n\t}",
"public void addEdge(int start, int end);",
"void addEdge(Edge e) {\n if (e.getTail().equals(this)) {\n outEdges.put(e.getHead(), e);\n\n return;\n } else if (e.getHead().equals(this)) {\n indegree++;\n inEdges.put(e.getTail(), e);\n\n return;\n }\n\n throw new RuntimeException(\"Cannot add edge that is unrelated to current node.\");\n }",
"public void addEdge(Edge e){\n\t\tedges.put(e.hashCode(), e);\n\t\te.getHead().addConnection(e);\n\t\te.getTail().addConnection(e);\n\t}",
"public void addEdge(Edge e){\n\t\tadjacentEdges.add(e);\n\t}",
"public void add(DefaultEdge edge) {\n edges.add(edge);\n groupObject.add(edge);\n }",
"public void addEdge(Edge e){\n edgeList.add(e);\n }",
"public void addEdge(Edge e)\r\n\t{\n\t\tint v = e.either(), w = e.other(v);\r\n\t\tadj[v].add(e);\r\n\t\tadj[w].add(e);\r\n\t}",
"public void addEdge(int start, int end, double weight);",
"public void addEdge(edge_type edge) {\n //first make sure the from and to nodes exist within the graph\n assert (edge.getFrom() < nextNodeIndex) && (edge.getTo() < nextNodeIndex) :\n \"<SparseGraph::AddEdge>: invalid node index\";\n\n //make sure both nodes are active before adding the edge\n if ((nodeVector.get(edge.getTo()).getIndex() != invalid_node_index)\n && (nodeVector.get(edge.getFrom()).getIndex() != invalid_node_index)) {\n //add the edge, first making sure it is unique\n if (isEdgeNew(edge.getFrom(), edge.getTo())) {\n edgeListVector.get(edge.getFrom()).add(edge);\n }\n\n //if the graph is undirected we must add another connection in the opposite\n //direction\n if (!isDirectedGraph) {\n //check to make sure the edge is unique before adding\n if (isEdgeNew(edge.getTo(), edge.getFrom())) {\n GraphEdge reversedEdge = new GraphEdge(edge.getTo(),edge.getFrom(),edge.getCost());\n edgeListVector.get(edge.getTo()).add(reversedEdge);\n }\n }\n }\n }",
"void addEdge(JNode edge) {\n List<JNode> newEdges = this.getEdges();\n newEdges.add(edge);\n this.setEdges(newEdges);\n }",
"public void addEdge(Node from, Node to);",
"void addEdge(Edge e) {\n\t\t\tif(!_edges.containsKey(e.makeKey())) {\n\t\t\t\t_edges.put(e.makeKey(),e);\n\t\t\t\te._one.addNeighborEdge(e);\n\t\t\t\te._two.addNeighborEdge(e);\n\t\t\t}\n\t\t}",
"public void addEdge(Edge e) {\n incident.add(e);\n }",
"@Override\n\tpublic boolean addEdge(ET edge)\n\t{\n\t\tif (edge == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (edgeList.contains(edge))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tList<N> graphNodes = edge.getAdjacentNodes();\n\t\tfor (N node : graphNodes)\n\t\t{\n\t\t\taddNode(node);\n\t\t\tnodeEdgeMap.get(node).add(edge);\n\t\t}\n\t\tedgeList.add(edge);\n\t\tgcs.fireGraphEdgeChangeEvent(edge, EdgeChangeEvent.EDGE_ADDED);\n\t\treturn true;\n\t}",
"protected void addEdge(IEdge edge) {\n\n if (edge != null) {\n\n this.ids.add(edge.getID());\n this.edgeMap.put(edge.getID(), edge);\n }\n }",
"void addEdge(Edge e) {\n edges.add(e);\n addVerticle(e.v1);\n addVerticle(e.v2);\n }",
"public void addEdge(DrawView edge){\n drawnEdges.add(edge);\n }",
"public void addEdge(Edge e) {\n int v = e.either();\n int w = e.other(v);\n adj[v].add(e);\n adj[w].add(e);\n E++;\n }",
"public void addEdge(Edge edge) {\n\t\tthis.edges.add(edge);\n\t\tnrOfEdges++;\n\t}",
"boolean addEdge(E edge);",
"protected void addEdge(CyEdge edge) {\n\tLayoutEdge newEdge = new LayoutEdge(edge);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }",
"public Edge<V> addEdge(V source, V target);",
"public void addEdge(N startNode, N endNode, E label)\r\n/* 43: */ {\r\n/* 44: 89 */ assert (checkRep());\r\n/* 45: 90 */ if (!contains(startNode)) {\r\n/* 46: 90 */ addNode(startNode);\r\n/* 47: */ }\r\n/* 48: 91 */ if (!contains(endNode)) {\r\n/* 49: 91 */ addNode(endNode);\r\n/* 50: */ }\r\n/* 51: 92 */ ((Map)this.map.get(startNode)).put(endNode, label);\r\n/* 52: 93 */ ((Map)this.map.get(endNode)).put(startNode, label);\r\n/* 53: */ }",
"public void addEdge(FlowEdge e){\n int v = e.getFrom();\n int w = e.getTo();\n adj[v].add(e); //add forward edge\n adj[w].add(e); //add backward edge\n }",
"public void addEdge(DirectedEdge e) \n {\n int v = e.from();\n adj[v].add(e);\n E++;\n }",
"public void addEdge(DirectedEdge edge){\r\n\t\tmEdgeList.offer(edge);\r\n\t\t\r\n\t\tint src=edge.from();\r\n\t\tint dest = edge.to();\r\n\t\t\r\n\t\tmVisitStatus.put(src,false);\r\n\t\tmVisitStatus.put(dest,false);\r\n\t\t\r\n\t\tmVertexList.add(src);\r\n\t\tmVertexList.add(dest);\r\n\t\t\r\n\t\t/* Forward Edge */\r\n\t\tList<DirectedEdge> edgeList = adjList.get(src);\r\n\t\tif(edgeList==null)\r\n\t\t\tedgeList = new ArrayList<DirectedEdge>();\r\n\t\t\r\n\t\tedgeList.add(edge);\r\n\t\tadjList.put(src, edgeList);\r\n\t}",
"public boolean addEdge(Edge edge) {\r\n\t\treturn true;\r\n\t}",
"public void addEdge(Edge e) {\r\n int v = e.from();\r\n int w = e.to();\r\n validateVertex(v);\r\n validateVertex(w);\r\n adj[v].add(e);\r\n indegree[w]++;\r\n E++;\r\n }",
"public void insert(Edge edge){\n edges[edge.getSource()].add(edge);\n if (isDirected()){\n edges[edge.getDest()].add(new Edge(edge.getDest(), edge.getSource(),edge.getWeight()));\n }\n }",
"public boolean addEdge(T beg, T end);",
"public void insert(Edge edge) {\r\n edges[edge.getSource()].add(edge);\r\n if (!isDirected()) {\r\n edges[edge.getDest()].add(new Edge(edge.getDest(),\r\n edge.getSource(),\r\n edge.getWeight()));\r\n }\r\n }",
"public E addEdge(V tail, V head);",
"public boolean addEdge(T begin, T end, int weight);",
"public void addEdge(DocTokenInf newEdge) {\n\t\tlist[newEdge.end].put(newEdge);\n\t}",
"protected boolean addEdge(Edge<N, E> edge)\n throws GraphLogicException {\n return edge.attach();\n }",
"public void addEdge( EdgeIntf edge ) throws Exception {\r\n DirectedEdge dEdge = ( DirectedEdge ) edge;\r\n Vertex fromVertex = dEdge.getSource();\r\n Vertex toVertex = dEdge.getSink();\r\n\r\n if( !isPath( toVertex, fromVertex ))\r\n super.addEdge( dEdge );\r\n else\r\n throw new CycleException();\r\n }",
"private void addEdge(int start, int end) {\n adjMatrix[start][end] = 1;\n // for undirected graph\n adjMatrix[end][start] = 1;\n }",
"public Builder addEdge(uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge value) {\n if (edgeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureEdgeIsMutable();\n edge_.add(value);\n onChanged();\n } else {\n edgeBuilder_.addMessage(value);\n }\n return this;\n }",
"public void addEdge(Vertex start, Vertex finish) {\n\t\t// add vertices start and/or finish if not in graph\n\t\tif(!vertices.containsKey(start)) this.addVertex(start);\n\t\tif(!vertices.containsKey(finish)) this.addVertex(finish);\n\t\t\n\t\tEdge e = new Edge(start, finish, parent);\n\t\tedges.add(e);\n\t\t// add to set of edges in Vertex start\n\t\tstart.addEdge(e);\n\t\t// and to finish, since this graph is undirected\n\t\tfinish.addEdge(e);\n\t}",
"public abstract void addEdge(Point p, Direction dir);",
"public void addEdge(Vertex other) {\n edges.add(other);\n other.edges.add(this);\n }",
"protected void addEdge(CyEdge edge, LayoutNode v1, LayoutNode v2) {\n\tLayoutEdge newEdge = new LayoutEdge(edge, v1, v2);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }",
"void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;",
"void addEdge(int x, int y);",
"@Override\n public void addEdge(E pEdge, TimeFrame tf) {\n \n // If The Edge ID is not initialized yet, initalialize it\n if (pEdge.getId() < 0) {\n int id = edgeIdGen.getNextAvailableID();\n pEdge.setId(id);\n mapAllEdges.add(id, pEdge);\n //System.out.println(\"\\t\\t\\t\\t\\t\\t====***************** DynamicGraph.addEdge() edge (id, mapAllEdges.size) = \" + id + \", \" + mapAllEdges.size());\n }\n // Adding to the adjacent list\n if (!darrGlobalAdjList.get(pEdge.getSource().getId()).get(tf).contains(pEdge)) {\n darrGlobalAdjList.get(pEdge.getSource().getId()).get(tf).add(pEdge);\n //System.out.println(\"\\t\\t\\t\\t\\t\\t====***************** DynamicGraph.addEdge() ading to darrGlobalAdjList \");\n if(!pEdge.isDirected() &&\n !darrGlobalAdjList.get(pEdge.getDestination().getId()).get(tf).contains(pEdge)) {\n darrGlobalAdjList.get(pEdge.getDestination().getId()).get(tf).add(pEdge);\n }\n }\n \n hmpGraphsAtTimeframes.get(tf).addEdge(pEdge);\n \n }",
"public void addEdge(Edge edgeToAdd){\n for(int i = 0; i<edges.size(); i++){\n Edge edge = edges.get(i);\n if(edge.end() == edgeToAdd.end()){\n edge.setWeight(edgeToAdd.weight()); // Change weight and return if edge is present\n return;\n }\n }\n this.edges.add(edgeToAdd); // Add edge normally\n }",
"public IEdge addEdge(String from, String to, Double cost);",
"void addEdge(int source, int destination, int weight);",
"public void addEdge(Integer id, UNode n1, UNode n2, String edge)\r\n {\r\n UEdge e = new UEdge(id, n1, n2, edge);\r\n n1.addOutEdge(e);\r\n n2.addInEdge(e);\r\n uEdges.put (id, e);\r\n }",
"public void addEdge(final Instruction beginInstruction, final Instruction endInstruction) {\n if (beginInstruction == null || endInstruction == null) {\n return;\n }\n if (!beginInstruction.allSucc().contains(endInstruction)) {\n beginInstruction.allSucc().add(endInstruction);\n }\n\n if (!endInstruction.allPred().contains(beginInstruction)) {\n endInstruction.allPred().add(beginInstruction);\n }\n }",
"public abstract boolean addEdge(Node node1, Node node2, int weight);",
"public Node(Edge edge) {\n this.edge = edge;\n }",
"public void addEdge(StubEdge e) {\n }",
"void addNeighborEdge(Edge e) {\n\t\t\t_neighborEdges.put(e,false);\n\t\t}",
"@Override\n\tpublic void addEdge(Location src, Location dest, Path edge) {\n\t\tint i = locations.indexOf(src);\n\t\tpaths.get(locations.indexOf(src)).add(edge);\n\t}",
"public void addEdge(String inLabel, double inDistance, String inMode,\n int inTime, int inPeakTime, DSAGraphNode<E> inNode)\n {\n links.insertLast(inNode);\n DSAGraphEdge<E> edge = new DSAGraphEdge<E>(inLabel, inDistance, inMode,\n inTime, inPeakTime, this,\n inNode);\n edgeList.insertLast(edge);\n }",
"private void addEdge(int from, int to, Edge e) {\n _edges.get(from).set(to, e);\n _edgeMap.put(e, new int [] {from, to});\n }",
"public void addFigEdge(final FigEdge figEdge, final String sourcePortFigId,\n final String destPortFigId, final String sourceFigNodeId,\n final String destFigNodeId) {\n figEdges.add(new EdgeData(figEdge, sourcePortFigId, destPortFigId,\n sourceFigNodeId, destFigNodeId));\n }",
"public void addEdge(int v1, int v2) {\r\n addEdge(v1, v2, null);\r\n }",
"public void addIncomingEdge(Edge e) {\n\t\tincomingEdges.add(e);\n\t\tconnectedNodes.add(e.getStart());\n\t\taddIncomingWeight(e.getWeight());\n\t}",
"public void addVirtualEdge(E e){\n\t\tedges.add(e);\n\t\tvirtualEdges.add(e);\n\t}",
"public void addEdge(){\n Node[] newAdjacent = new Node[adjacent.length + 1];\n for (int i = 0; i < adjacent.length; i++) {\n newAdjacent[i] = adjacent[i];\n }\n adjacent = newAdjacent;\n }",
"public void addEdge(int v1, int v2) {\n addEdge(v1, v2, null);\n }",
"public void addEdge(int v1, int v2) {\n addEdge(v1, v2, null);\n }",
"private Edge addEdge(Node source, Node dest, double weight)\r\n\t{\r\n\t final Edge newEdge = new Edge(edgeType, source, dest, weight);\r\n\t if (!eSet.add(newEdge))\r\n\t\tthrow new RuntimeException(\"Edge already exists!\");\r\n\t source.addEdge(newEdge);\n\t return newEdge;\r\n\t}",
"int addEdge(int tail, int head);",
"public GremlinQueryBuilder withEdge(EdgeSpec edgeSpec) {\n if (this.verticesEdgesSpecs.contains(emptyEdgeSpec)) {\n this.verticesEdgesSpecs.remove(emptyEdgeSpec);\n }\n\n this.verticesEdgesSpecs.add(edgeSpec);\n return this;\n }",
"public abstract boolean putEdge(Edge incomingEdge);",
"public uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge.Builder addEdgeBuilder() {\n return getEdgeFieldBuilder().addBuilder(\n uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge.getDefaultInstance());\n }",
"public Edge addEdge(Node p_a, Node p_b) {\n\t\tEdge edge = makeEdge(p_a, p_b);\n\t\tif(edges.add(edge)) {\n\t\t\t\n\t\t\t// The weight is only updated if the edge was not in the graph\n\t\t\tweights.put(edge.hashCode(), DEFAULT_WEIGHT);\n\t\t}\n\t\treturn edge;\n\t}",
"public Edge addEdge(EdgeType et, Node source, Node dest, double weight)\r\n {\r\n\tfinal String edgeTypeName = et.getName();\r\n Edge existingEdge = getEdge(edgeTypeName, source, dest);\r\n if (existingEdge == null)\r\n {\r\n existingEdge = ethMap.get(edgeTypeName).addEdge(source, dest, weight);\r\n edges = null;\r\n }\r\n else\r\n existingEdge.addWeight(weight);\n return existingEdge;\r\n }",
"public void addEdge(int source, int destination, int roadCost)\n\t\t{\n\t\t\tEdge edge = new Edge(source, destination, roadCost);\n\t\t\tallEdges.add(edge);\n\t\t}",
"public void addDirectedEdge(String startVertex, String endVertex, int cost)\r\n\t{\r\n\t\tif(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex does not exist in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.adjacencyMap.get(startVertex).put(endVertex, cost);\r\n\t}",
"public boolean addEdge(Edge e) {\n return g.addNode(e.getSrc())&&g.addNode(e.getDst())&&g.addEdge(e.getSrc(),e.getDst());\n }",
"public static GraphEdge createGraphEdgeForEdge() {\n GraphEdge graphEdge = new GraphEdge();\n\n for (int i = 0; i < 2; i++) {\n GraphNode childNode = new GraphNode();\n childNode.setPosition(AccuracyTestHelper.createPoint(20 * i, 10));\n childNode.setSize(AccuracyTestHelper.createDimension(40, 12));\n graphEdge.addContained(childNode);\n }\n graphEdge.addWaypoint(AccuracyTestHelper.createDiagramInterchangePoint(100, 100));\n graphEdge.addWaypoint(AccuracyTestHelper.createDiagramInterchangePoint(250, 200));\n\n // create a Relationship\n Relationship relationship = new IncludeImpl();\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(relationship);\n\n graphEdge.setSemanticModel(semanticModel);\n\n return graphEdge;\n }",
"public void addEdge(Character sourceId, Character destinationId) {\n Node sourceNode = getNode(sourceId);\n Node destinationNode = getNode(destinationId);\n sourceNode.adjacent.add(destinationNode);\n }",
"public void addEdge(Node source, Node destination, int weight) {\n nodes.add(source);\n nodes.add(destination);\n checkEdgeExistance(source, destination, weight);\n\n if (!directed && source != destination) {\n checkEdgeExistance(destination, source, weight);\n }\n }",
"@Override\n public void addEdge(V source, V destination, double weight)\n {\n super.addEdge(source, destination, weight);\n super.addEdge(destination, source, weight);\n }",
"public static Multigraph smartAddEdge(Multigraph graph, Edge edge, boolean stopIfMissing) {\n\n if (!graph.containsVertex(edge.getSource())) {\n if(stopIfMissing){\n throw new IllegalStateException(\"Missing source node for edge \"+ edge);\n }\n graph.addVertex(edge.getSource());\n }\n if (!graph.containsVertex(edge.getDestination())) {\n if(stopIfMissing){\n throw new IllegalStateException(\"Missing destination node for edge \"+ edge);\n }\n graph.addVertex(edge.getDestination());\n }\n //That a good mapping edge, add to the related query\n graph.addEdge(edge.getSource(), edge.getDestination(), edge.getLabel());\n return graph;\n }",
"public void Add( TopoDS_Edge aFirst, TopoDS_Edge aSecond) {\n OCCwrapJavaJNI.ShapeFix_EdgeConnect_Add__SWIG_0(swigCPtr, this, TopoDS_Edge.getCPtr(aFirst), aFirst, TopoDS_Edge.getCPtr(aSecond), aSecond);\n }",
"void addEdge(int x,int y) {\n adj[x].add(y);\n }",
"public void addEOGEdge(Node prev, Node next) {\n prev.getNextEOG().add(next);\n next.getPrevEOG().add(prev);\n }",
"public void testAddEdgeEdge( ) {\n init( );\n\n try {\n m_g1.addEdge( m_eLoop ); // loops not allowed\n assertFalse( );\n }\n catch( IllegalArgumentException e ) {\n assertTrue( );\n }\n\n try {\n m_g3.addEdge( null );\n assertFalse( ); // NPE\n }\n catch( NullPointerException e ) {\n assertTrue( );\n }\n\n Edge e = m_eFactory.createEdge( m_v2, m_v1 );\n\n try {\n m_g1.addEdge( e ); // no such vertex in graph\n assertFalse( );\n }\n catch( IllegalArgumentException ile ) {\n assertTrue( );\n }\n\n assertEquals( false, m_g2.addEdge( e ) );\n assertEquals( false, m_g3.addEdge( e ) );\n assertEquals( true, m_g4.addEdge( e ) );\n }",
"@Override\n public void add(E e) throws NullPointerException\n {\n if(e == null)\n {\n throw new NullPointerException();\n }\n new Node(e, left, right);\n idx += 1;\n previous();\n canRemove = false;\n }",
"public boolean addEdge(String id1, String id2)\n\t{\n\t\treturn addEdge(id1, id2, null);\n\t}",
"public void addEdge(int v1, int v2) {\n\t\tedges[v1][v2] = 1;\n\t\tedges[v2][v1] = 1;\n\t\tsize++;\n\t}",
"@Test\n\tpublic void addEdgeTest() {\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(C);\n\t\tvertices.add(D);\n\t\tedge_0.addVertices(vertices);\n\t\tassertTrue(graph.addEdge(edge_0));\n\t\tassertFalse(graph.addEdge(edge_0));\n\t}",
"public void addEdge( VKeyT fromKey, VKeyT toKey, EDataT data )\n throws NoSuchVertexException;",
"private Shape createEdge() {\n\t\tEdge edge = (Edge)shapeFactory.getShape(ShapeFactory.EDGE);\n\t\tEdgeLabel edgeLabel = (EdgeLabel) shapeFactory.getShape(ShapeFactory.EDGE_LABEL);\n\t\tedgeLabel.setEdge(edge);\n\t\tedge.setEdgeLabel(edgeLabel);\n\t\tshapes.add(edgeLabel);\n\t\tadd(edgeLabel);\n\t\treturn edge;\n\t}",
"public void addEdge (E vertex1, E vertex2, int edgeWeight) throws IllegalArgumentException\n {\n if(vertex1 == vertex2)\n return;\n \n int index1 = this.indexOf (vertex1);\n if (index1 < 0)\n throw new IllegalArgumentException (vertex1 + \" was not found!\");\n \n int index2 = this.indexOf (vertex2);\n if (index2 < 0)\n throw new IllegalArgumentException (vertex2 + \" was not found!\");\n\n\n if (this.hasEdge (vertex1, vertex2))\n {\n this.removeNode (index1, index2);\n this.removeNode (index2, index1);\n }\n \n Node node = new Node(index2, edgeWeight);\n this.addNode(node, index1);\n node = new Node(index1, edgeWeight);\n this.addNode(node, index2);\n }",
"public void setEdge(int start, int target){\n\t\tthis.graph.elementAt(start).insert(target);\n\t}",
"public static de.hpi.msd.salsa.serde.avro.Edge.Builder newBuilder(de.hpi.msd.salsa.serde.avro.Edge other) {\n return new de.hpi.msd.salsa.serde.avro.Edge.Builder(other);\n }",
"public void addEdge(int source, int target, Cost w) {\n\t\tedges[source][target] = w;\n\t}",
"private void addEdge(int node1, int node2, int cost, int bandwidth) throws IllegalArgumentException {\n // We can't add edges between non-existent nodes\n int nodeCount = mGraph.getNodeCount();\n if (node1 >= nodeCount || node2 >= nodeCount) {\n throw new IllegalArgumentException();\n }\n\n // Add forward edge\n int edgeCount = mGraph.getEdgeCount() / 2;\n\n Edge forward = mGraph.addEdge(String.valueOf(edgeCount + \"f\"), node1, node2, true);\n forward.addAttribute(\"ui.label\", String.valueOf(edgeCount));\n forward.addAttribute(\"edge.cluster\", String.valueOf(edgeCount));\n forward.addAttribute(\"cost\", cost);\n\n // Add backward edge\n Edge backward = mGraph.addEdge(String.valueOf(edgeCount + \"b\"), node2, node1, true);\n backward.addAttribute(\"edge.cluster\", String.valueOf(edgeCount));\n backward.addAttribute(\"cost\", cost);\n\n // Add edge to the SimpleEdge list\n mEdgeList.add(new SimpleEdge(node1, node2, cost, bandwidth));\n }",
"public void addEdges(Edge value)\r\n\t{\r\n\t\tedges.add(value);\r\n\t}",
"public void addEdge(String n1, String n2) {\n if (!this.graph.containsKey(n1)) {\n addNode(n1);\n }\n if (!this.graph.containsKey(n2)) {\n addNode(n2);\n }\n Edgeq edge = new Edgeq(n1, n2);\n this.graph.get(n1).add(edge);\n\n edge = new Edgeq(n2, n1);\n this.graph.get(n2).add(edge);\n }"
] | [
"0.7300775",
"0.70624024",
"0.704581",
"0.70309883",
"0.70135033",
"0.6871898",
"0.68527013",
"0.6827213",
"0.67816633",
"0.6781016",
"0.6766694",
"0.67261344",
"0.6650085",
"0.6633465",
"0.6609735",
"0.6603203",
"0.65866506",
"0.65824777",
"0.65478784",
"0.65339905",
"0.65319616",
"0.64732134",
"0.6471548",
"0.6450391",
"0.64339024",
"0.6412631",
"0.63810474",
"0.63671774",
"0.6351986",
"0.63504976",
"0.6329987",
"0.6282639",
"0.6277546",
"0.6254951",
"0.62403446",
"0.62170196",
"0.6208325",
"0.6181951",
"0.617693",
"0.616666",
"0.61143446",
"0.60722256",
"0.6067971",
"0.60521936",
"0.6042345",
"0.6020409",
"0.5973918",
"0.5969422",
"0.59693205",
"0.5960591",
"0.59256244",
"0.5925058",
"0.58816177",
"0.5855438",
"0.5840879",
"0.5828476",
"0.581838",
"0.58075607",
"0.57983786",
"0.57632834",
"0.5756712",
"0.5708864",
"0.5703764",
"0.56975317",
"0.56919765",
"0.56888765",
"0.5681737",
"0.5681737",
"0.5667282",
"0.56550336",
"0.5646726",
"0.5621035",
"0.5616508",
"0.55486405",
"0.5539316",
"0.5529231",
"0.5507764",
"0.54967886",
"0.54814315",
"0.54382277",
"0.54336095",
"0.5427847",
"0.53944635",
"0.53912365",
"0.53907996",
"0.538878",
"0.5385721",
"0.5384714",
"0.5382649",
"0.53814924",
"0.53638625",
"0.5363564",
"0.53566486",
"0.53517985",
"0.53475267",
"0.53373736",
"0.53361744",
"0.5329182",
"0.5323595",
"0.5300499"
] | 0.5393512 | 83 |
Add the direct edge to the graph. The edge is added to the start and end nodes' collection of incoming/outgoing edges. | protected boolean addEdge(Edge<N, E> edge)
throws GraphLogicException {
return edge.attach();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addEdge(DirectedEdge edge){\r\n\t\tmEdgeList.offer(edge);\r\n\t\t\r\n\t\tint src=edge.from();\r\n\t\tint dest = edge.to();\r\n\t\t\r\n\t\tmVisitStatus.put(src,false);\r\n\t\tmVisitStatus.put(dest,false);\r\n\t\t\r\n\t\tmVertexList.add(src);\r\n\t\tmVertexList.add(dest);\r\n\t\t\r\n\t\t/* Forward Edge */\r\n\t\tList<DirectedEdge> edgeList = adjList.get(src);\r\n\t\tif(edgeList==null)\r\n\t\t\tedgeList = new ArrayList<DirectedEdge>();\r\n\t\t\r\n\t\tedgeList.add(edge);\r\n\t\tadjList.put(src, edgeList);\r\n\t}",
"public void addEdge(int start, int end);",
"public void addEdge(Edge edge){\n \n synchronized(vertexes){\n Long start = edge.getStart();\n Vertex sVertex = vertexes.get(start);\n if(sVertex != null){\n sVertex.addEdge(edge, true);\n }\n// if undirected graph then adds edge to the finish vertex too \n if(!edge.isDirected()){\n Long finish = edge.getFinish();\n Vertex fVertex = vertexes.get(finish);\n if(fVertex != null){\n fVertex.addEdge(edge, false);\n }\n }\n }\n \n }",
"public void addEdge( EdgeIntf edge ) throws Exception {\r\n DirectedEdge dEdge = ( DirectedEdge ) edge;\r\n Vertex fromVertex = dEdge.getSource();\r\n Vertex toVertex = dEdge.getSink();\r\n\r\n if( !isPath( toVertex, fromVertex ))\r\n super.addEdge( dEdge );\r\n else\r\n throw new CycleException();\r\n }",
"public void addEdge(edge_type edge) {\n //first make sure the from and to nodes exist within the graph\n assert (edge.getFrom() < nextNodeIndex) && (edge.getTo() < nextNodeIndex) :\n \"<SparseGraph::AddEdge>: invalid node index\";\n\n //make sure both nodes are active before adding the edge\n if ((nodeVector.get(edge.getTo()).getIndex() != invalid_node_index)\n && (nodeVector.get(edge.getFrom()).getIndex() != invalid_node_index)) {\n //add the edge, first making sure it is unique\n if (isEdgeNew(edge.getFrom(), edge.getTo())) {\n edgeListVector.get(edge.getFrom()).add(edge);\n }\n\n //if the graph is undirected we must add another connection in the opposite\n //direction\n if (!isDirectedGraph) {\n //check to make sure the edge is unique before adding\n if (isEdgeNew(edge.getTo(), edge.getFrom())) {\n GraphEdge reversedEdge = new GraphEdge(edge.getTo(),edge.getFrom(),edge.getCost());\n edgeListVector.get(edge.getTo()).add(reversedEdge);\n }\n }\n }\n }",
"public void addEdge(Edge e){\n\t\tadjacentEdges.add(e);\n\t}",
"public void addEdge(DirectedEdge e) \n {\n int v = e.from();\n adj[v].add(e);\n E++;\n }",
"public void addEdge(int start, int end, double weight);",
"public void addEdge(FlowEdge e){\n int v = e.getFrom();\n int w = e.getTo();\n adj[v].add(e); //add forward edge\n adj[w].add(e); //add backward edge\n }",
"public void addEdge(E e){\n\t\tedges.add(e);\n\t}",
"public void addEdge(Node from, Node to);",
"public void addEdge(Edge e){\n edgeList.add(e);\n }",
"void addEdge(Edge e) {\n if (e.getTail().equals(this)) {\n outEdges.put(e.getHead(), e);\n\n return;\n } else if (e.getHead().equals(this)) {\n indegree++;\n inEdges.put(e.getTail(), e);\n\n return;\n }\n\n throw new RuntimeException(\"Cannot add edge that is unrelated to current node.\");\n }",
"public void addDirectedEdge(String startVertex, String endVertex, int cost)\r\n\t{\r\n\t\tif(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex does not exist in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.adjacencyMap.get(startVertex).put(endVertex, cost);\r\n\t}",
"public void addEdge(Edge e) {\n incident.add(e);\n }",
"public abstract void addEdge(Point p, Direction dir);",
"void add(Edge edge);",
"private void addEdge(int start, int end) {\n adjMatrix[start][end] = 1;\n // for undirected graph\n adjMatrix[end][start] = 1;\n }",
"public void addEdge(Character sourceId, Character destinationId) {\n Node sourceNode = getNode(sourceId);\n Node destinationNode = getNode(destinationId);\n sourceNode.adjacent.add(destinationNode);\n }",
"public void addEdge(Edge e){\n\t\tedges.put(e.hashCode(), e);\n\t\te.getHead().addConnection(e);\n\t\te.getTail().addConnection(e);\n\t}",
"public void insert(Edge edge) {\r\n edges[edge.getSource()].add(edge);\r\n if (!isDirected()) {\r\n edges[edge.getDest()].add(new Edge(edge.getDest(),\r\n edge.getSource(),\r\n edge.getWeight()));\r\n }\r\n }",
"public void addEdge(int source, int destination) {\n adjacencyList.get(source).add(destination);\n adjMat[source][destination] = 1;\n //if graph is undirected graph, add u to v's adjacency list\n if (!isDirected) {\n adjacencyList.get(destination).add(source);\n adjMat[destination][source] = 1;\n }\n }",
"void addEdge(int source, int destination, int weight);",
"public Edge<V> addEdge(V source, V target);",
"public void insert(Edge edge){\n edges[edge.getSource()].add(edge);\n if (isDirected()){\n edges[edge.getDest()].add(new Edge(edge.getDest(), edge.getSource(),edge.getWeight()));\n }\n }",
"void addEdge(Edge e) {\n edges.add(e);\n addVerticle(e.v1);\n addVerticle(e.v2);\n }",
"@Override\n\tpublic void addEdge(Location src, Location dest, Path edge) {\n\t\tint i = locations.indexOf(src);\n\t\tpaths.get(locations.indexOf(src)).add(edge);\n\t}",
"public void addEdge(T source, T destination, boolean biDirectional) {\n\n if(!map.containsKey(source)) addVertex(source);\n if(!map.containsKey(destination)) addVertex(destination);\n\n map.get(source).add(destination);\n if(biDirectional) map.get(destination).add(source);\n }",
"public void addEdge(final Instruction beginInstruction, final Instruction endInstruction) {\n if (beginInstruction == null || endInstruction == null) {\n return;\n }\n if (!beginInstruction.allSucc().contains(endInstruction)) {\n beginInstruction.allSucc().add(endInstruction);\n }\n\n if (!endInstruction.allPred().contains(beginInstruction)) {\n endInstruction.allPred().add(beginInstruction);\n }\n }",
"public void addEdge(){\n Node[] newAdjacent = new Node[adjacent.length + 1];\n for (int i = 0; i < adjacent.length; i++) {\n newAdjacent[i] = adjacent[i];\n }\n adjacent = newAdjacent;\n }",
"public void addEdge(Edge e)\r\n\t{\n\t\tint v = e.either(), w = e.other(v);\r\n\t\tadj[v].add(e);\r\n\t\tadj[w].add(e);\r\n\t}",
"void addDirectedEdge(final Node first, final Node second)\n {\n if ( first == second )\n {\n return;\n }\n else if (first.connectedNodes.contains(second))\n return;\n else\n first.connectedNodes.add(second);\n }",
"void addEdge(Edge e) {\n\t\t\tif(!_edges.containsKey(e.makeKey())) {\n\t\t\t\t_edges.put(e.makeKey(),e);\n\t\t\t\te._one.addNeighborEdge(e);\n\t\t\t\te._two.addNeighborEdge(e);\n\t\t\t}\n\t\t}",
"void addNeighborEdge(Edge e) {\n\t\t\t_neighborEdges.put(e,false);\n\t\t}",
"private void addEdgeWithInst(NasmInst source, NasmInst destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n Node from = inst2Node.get(source);\n Node to = inst2Node.get(destination);\n if (from == null || to == null)\n throw new FgException(\"ERROR: No nodes matching with given Source or destination \");\n graph.addEdge(from, to);\n }",
"public void addEdge(N startNode, N endNode, E label)\r\n/* 43: */ {\r\n/* 44: 89 */ assert (checkRep());\r\n/* 45: 90 */ if (!contains(startNode)) {\r\n/* 46: 90 */ addNode(startNode);\r\n/* 47: */ }\r\n/* 48: 91 */ if (!contains(endNode)) {\r\n/* 49: 91 */ addNode(endNode);\r\n/* 50: */ }\r\n/* 51: 92 */ ((Map)this.map.get(startNode)).put(endNode, label);\r\n/* 52: 93 */ ((Map)this.map.get(endNode)).put(startNode, label);\r\n/* 53: */ }",
"public void addEdge(DrawView edge){\n drawnEdges.add(edge);\n }",
"public void addIncomingEdge(Edge e) {\n\t\tincomingEdges.add(e);\n\t\tconnectedNodes.add(e.getStart());\n\t\taddIncomingWeight(e.getWeight());\n\t}",
"public boolean addEdge(T beg, T end);",
"public void addEdge(Edge e) {\n int v = e.either();\n int w = e.other(v);\n adj[v].add(e);\n adj[w].add(e);\n E++;\n }",
"public void addVirtualEdge(E e){\n\t\tedges.add(e);\n\t\tvirtualEdges.add(e);\n\t}",
"public void addEdge(Edge e) {\r\n int v = e.from();\r\n int w = e.to();\r\n validateVertex(v);\r\n validateVertex(w);\r\n adj[v].add(e);\r\n indegree[w]++;\r\n E++;\r\n }",
"public void addEdge(Node source, Node destination, int weight) {\n nodes.add(source);\n nodes.add(destination);\n checkEdgeExistance(source, destination, weight);\n\n if (!directed && source != destination) {\n checkEdgeExistance(destination, source, weight);\n }\n }",
"public void addEdge(int source, int destination, int roadCost)\n\t\t{\n\t\t\tEdge edge = new Edge(source, destination, roadCost);\n\t\t\tallEdges.add(edge);\n\t\t}",
"public void addFigEdge(final FigEdge figEdge, final String sourcePortFigId,\n final String destPortFigId, final String sourceFigNodeId,\n final String destFigNodeId) {\n figEdges.add(new EdgeData(figEdge, sourcePortFigId, destPortFigId,\n sourceFigNodeId, destFigNodeId));\n }",
"protected void addEdge(int src, int dest) {\n\t\tthis.adjListArray[src].add(dest);\n\t}",
"void addEdge(String origin, String destination, double weight){\n\t\tadjlist.get(origin).addEdge(adjlist.get(destination), weight);\n\t\tedges++;\n\t}",
"public void addEdge( Edge edge ) {\r\n if ( edge == null ) return;\r\n edges.addElement(edge);\r\n }",
"public void Add( TopoDS_Edge aFirst, TopoDS_Edge aSecond) {\n OCCwrapJavaJNI.ShapeFix_EdgeConnect_Add__SWIG_0(swigCPtr, this, TopoDS_Edge.getCPtr(aFirst), aFirst, TopoDS_Edge.getCPtr(aSecond), aSecond);\n }",
"protected void addEdge(IEdge edge) {\n\n if (edge != null) {\n\n this.ids.add(edge.getID());\n this.edgeMap.put(edge.getID(), edge);\n }\n }",
"void addEdge(int x, int y);",
"public IEdge addEdge(String from, String to, Double cost);",
"@Override\n\tpublic boolean addEdge(ET edge)\n\t{\n\t\tif (edge == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (edgeList.contains(edge))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tList<N> graphNodes = edge.getAdjacentNodes();\n\t\tfor (N node : graphNodes)\n\t\t{\n\t\t\taddNode(node);\n\t\t\tnodeEdgeMap.get(node).add(edge);\n\t\t}\n\t\tedgeList.add(edge);\n\t\tgcs.fireGraphEdgeChangeEvent(edge, EdgeChangeEvent.EDGE_ADDED);\n\t\treturn true;\n\t}",
"private void addEdge(int node1, int node2, int cost, int bandwidth) throws IllegalArgumentException {\n // We can't add edges between non-existent nodes\n int nodeCount = mGraph.getNodeCount();\n if (node1 >= nodeCount || node2 >= nodeCount) {\n throw new IllegalArgumentException();\n }\n\n // Add forward edge\n int edgeCount = mGraph.getEdgeCount() / 2;\n\n Edge forward = mGraph.addEdge(String.valueOf(edgeCount + \"f\"), node1, node2, true);\n forward.addAttribute(\"ui.label\", String.valueOf(edgeCount));\n forward.addAttribute(\"edge.cluster\", String.valueOf(edgeCount));\n forward.addAttribute(\"cost\", cost);\n\n // Add backward edge\n Edge backward = mGraph.addEdge(String.valueOf(edgeCount + \"b\"), node2, node1, true);\n backward.addAttribute(\"edge.cluster\", String.valueOf(edgeCount));\n backward.addAttribute(\"cost\", cost);\n\n // Add edge to the SimpleEdge list\n mEdgeList.add(new SimpleEdge(node1, node2, cost, bandwidth));\n }",
"@Override\n public boolean addChild(N endNode)\n throws GraphLogicException {\n E edge = buildDirectEdge(getThis(), endNode);\n return addDirectEdge(edge);\n }",
"private Edge addEdge(Node source, Node dest, double weight)\r\n\t{\r\n\t final Edge newEdge = new Edge(edgeType, source, dest, weight);\r\n\t if (!eSet.add(newEdge))\r\n\t\tthrow new RuntimeException(\"Edge already exists!\");\r\n\t source.addEdge(newEdge);\n\t return newEdge;\r\n\t}",
"public boolean addEdge(T begin, T end, int weight);",
"void addEdge(int from, int to) {\n\t\tadjList.get(from).add(to);\n\t}",
"@Override\n public void addEdge(V source, V destination, double weight)\n {\n super.addEdge(source, destination, weight);\n super.addEdge(destination, source, weight);\n }",
"public void addEdge(Edge edge) {\n\t\tthis.edges.add(edge);\n\t\tnrOfEdges++;\n\t}",
"private void addEdge(int from, int to, Edge e) {\n _edges.get(from).set(to, e);\n _edgeMap.put(e, new int [] {from, to});\n }",
"public void addEdge(DocTokenInf newEdge) {\n\t\tlist[newEdge.end].put(newEdge);\n\t}",
"protected void addEdge(CyEdge edge) {\n\tLayoutEdge newEdge = new LayoutEdge(edge);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }",
"public boolean addEdge(Object src, Object dest, boolean direction)\n\t{\n\t\tif(!this.map.containsKey(src))\n\t\t\tthis.addVertex(src);\n\t\tif(!this.map.containsKey(dest))\n\t\t\tthis.addVertex(dest);\n\t\t\n\t\t// set the direction of the edge\n\t\tif(direction)\n\t\t{\n\t\t\t// only add the edge doesn't already exist\n\t\t\tif(!map.get(src).contains(dest))\n\t\t\t{\n\t\t\t\tmap.get(src).addNode(dest);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\telse\t\t\t\n\t\t{\n\t\t\tboolean edgeAdded = false;\n\t\t\t// only add the edge doesn't already exist\n\t\t\tif(!map.get(src).contains(dest))\n\t\t\t{\n\t\t\t\tmap.get(src).addNode(dest);\n\t\t\t\tedgeAdded = true;\n\t\t\t}\n\t\t\t// only add the edge doesn't already exist\n\t\t\tif(!map.get(dest).contains(dest))\n\t\t\t{\n\t\t\t\tmap.get(dest).addNode(src);\n\t\t\t\tedgeAdded = true;\n\t\t\t}\n\t\t\treturn edgeAdded;\n\t\t}\n\t}",
"public void addEdge(Vertex other) {\n edges.add(other);\n other.edges.add(this);\n }",
"@Override\n public void addEdge(E pEdge, TimeFrame tf) {\n \n // If The Edge ID is not initialized yet, initalialize it\n if (pEdge.getId() < 0) {\n int id = edgeIdGen.getNextAvailableID();\n pEdge.setId(id);\n mapAllEdges.add(id, pEdge);\n //System.out.println(\"\\t\\t\\t\\t\\t\\t====***************** DynamicGraph.addEdge() edge (id, mapAllEdges.size) = \" + id + \", \" + mapAllEdges.size());\n }\n // Adding to the adjacent list\n if (!darrGlobalAdjList.get(pEdge.getSource().getId()).get(tf).contains(pEdge)) {\n darrGlobalAdjList.get(pEdge.getSource().getId()).get(tf).add(pEdge);\n //System.out.println(\"\\t\\t\\t\\t\\t\\t====***************** DynamicGraph.addEdge() ading to darrGlobalAdjList \");\n if(!pEdge.isDirected() &&\n !darrGlobalAdjList.get(pEdge.getDestination().getId()).get(tf).contains(pEdge)) {\n darrGlobalAdjList.get(pEdge.getDestination().getId()).get(tf).add(pEdge);\n }\n }\n \n hmpGraphsAtTimeframes.get(tf).addEdge(pEdge);\n \n }",
"boolean addEdge(E edge);",
"protected void addEdge(CyEdge edge, LayoutNode v1, LayoutNode v2) {\n\tLayoutEdge newEdge = new LayoutEdge(edge, v1, v2);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }",
"public void addEdge(Graph graph, int source, int destination, double weight){\r\n\r\n Node node = new Node(destination, weight);\r\n LinkedList<Node> list = null;\r\n\r\n //Add an adjacent Node for source\r\n list = adjacencyList.get((double)source);\r\n if (list == null){\r\n list = new LinkedList<Node>();\r\n }\r\n\r\n list.addFirst(node);\r\n adjacencyList.put((double)source, list);\r\n\r\n //Add adjacent node again since graph is undirected\r\n node = new Node(source, weight);\r\n\r\n list = null;\r\n\r\n list = adjacencyList.get((double)destination);\r\n\r\n if (list == null){\r\n list = new LinkedList<Node>();\r\n }\r\n\r\n list.addFirst(node);\r\n adjacencyList.put((double)destination, list);\r\n }",
"public void addEdge(Vertex start, Vertex finish) {\n\t\t// add vertices start and/or finish if not in graph\n\t\tif(!vertices.containsKey(start)) this.addVertex(start);\n\t\tif(!vertices.containsKey(finish)) this.addVertex(finish);\n\t\t\n\t\tEdge e = new Edge(start, finish, parent);\n\t\tedges.add(e);\n\t\t// add to set of edges in Vertex start\n\t\tstart.addEdge(e);\n\t\t// and to finish, since this graph is undirected\n\t\tfinish.addEdge(e);\n\t}",
"public E addEdge(V tail, V head);",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"public void addEdge(int i, int j, double d) {\r\n\t\tWeightedNode first = nodeList.get(i-1);\r\n\t\tWeightedNode second = nodeList.get(j-1);\r\n\t\tfirst.neighbor.add(second);\r\n\t\tsecond.neighbor.add(first);\r\n\t\tfirst.weightMap.put(second,d);\r\n\t\tsecond.weightMap.put(first, d);\r\n\t}",
"public EdgeIntf addEdge( Vertex fromVertex, Vertex toVertex ) throws Exception {\r\n if( !isPath( toVertex, fromVertex ))\r\n return super.addEdge( fromVertex, toVertex );\r\n else\r\n throw new CycleException();\r\n }",
"void addEdge(JNode edge) {\n List<JNode> newEdges = this.getEdges();\n newEdges.add(edge);\n this.setEdges(newEdges);\n }",
"public void addEdge(String from, String to) {\n Vertex v, w;\n if (hasEdge(from, to)) return; // no duplicate edges\n mNumEdges += 1;\n if ((v = getVertex(from)) == null)\n v = addVertex(from);\n if ((w = getVertex(to)) == null)\n w = addVertex(to);\n mAdjList.get(v).add(w);\n mAdjList.get(w).add(v); // undirected graph only\n }",
"public void add(DefaultEdge edge) {\n edges.add(edge);\n groupObject.add(edge);\n }",
"void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;",
"public void addEdge(Edge edgeToAdd){\n for(int i = 0; i<edges.size(); i++){\n Edge edge = edges.get(i);\n if(edge.end() == edgeToAdd.end()){\n edge.setWeight(edgeToAdd.weight()); // Change weight and return if edge is present\n return;\n }\n }\n this.edges.add(edgeToAdd); // Add edge normally\n }",
"public void addEdge(Node n1, Node n2, int weight, boolean twoWay) {\n\t\tthis.edges.add(new Edge(n1, n2, weight, twoWay));\n\t\tnrOfEdges++;\n\t}",
"@DisplayName(\"Add directed edge\")\n @Test\n public void testAddEdgeDirected() {\n graph.addEdge(new Edge(3, 4));\n List<Integer> l = new ArrayList<>();\n l.add(2);\n l.add(4);\n Assertions.assertArrayEquals(l.toArray(), graph.getNeighbours(3).toArray());\n }",
"public void addEdge(Integer id, UNode n1, UNode n2, String edge)\r\n {\r\n UEdge e = new UEdge(id, n1, n2, edge);\r\n n1.addOutEdge(e);\r\n n2.addInEdge(e);\r\n uEdges.put (id, e);\r\n }",
"public abstract boolean addEdge(Node node1, Node node2, int weight);",
"public void addEdge(V from, V to) {\n Set<V> edges = new HashSet<>();\n edges.add(to);\n this.addEdges(from, edges);\n }",
"public void addEdge(int v1, int v2) {\r\n\t\tadjList[v1].add(v2);\r\n\t}",
"public void addEdge(int i, int j)\n {\n adjList[i].add(j);\n adjList[j].add(i);\n numEdges++;\n }",
"void addEdge(int x,int y) {\n adj[x].add(y);\n }",
"public void addEdge(String n1, String n2) {\n if (!this.graph.containsKey(n1)) {\n addNode(n1);\n }\n if (!this.graph.containsKey(n2)) {\n addNode(n2);\n }\n Edgeq edge = new Edgeq(n1, n2);\n this.graph.get(n1).add(edge);\n\n edge = new Edgeq(n2, n1);\n this.graph.get(n2).add(edge);\n }",
"void addEdge(int one, int two, boolean redundant) {\n\t\tif (redundant == true) {\n\t\t\tadjacencyList[one].add(two);\n\t\t\tadjacencyList[two].add(one);\n\t\t}\n\t\telse if (one < two) {\n\t\t\tadjacencyList[one].add(two);\n\t\t}\n\t\telse {\n\t\t\tadjacencyList[two].add(one);\n\t\t}\n\t}",
"public Edge addEdge(Node p_a, Node p_b) {\n\t\tEdge edge = makeEdge(p_a, p_b);\n\t\tif(edges.add(edge)) {\n\t\t\t\n\t\t\t// The weight is only updated if the edge was not in the graph\n\t\t\tweights.put(edge.hashCode(), DEFAULT_WEIGHT);\n\t\t}\n\t\treturn edge;\n\t}",
"public void addEdge(int v1, int v2) {\r\n addEdge(v1, v2, null);\r\n }",
"public void addEdge(int v1, int v2) {\n\t\tedges[v1][v2] = 1;\n\t\tedges[v2][v1] = 1;\n\t\tsize++;\n\t}",
"public void addEdge(int v1, int v2) {\n addEdge(v1, v2, null);\n }",
"public void addEdge(int v1, int v2) {\n addEdge(v1, v2, null);\n }",
"public boolean addEdge(Edge edge) {\r\n\t\treturn true;\r\n\t}",
"public void addEdge(Node n1, Node n2, int weight) {\n\t\tthis.edges.add(new Edge(n1, n2, weight));\n\t\tadjacencyList.get(n1.getIdNode()).add(new NodePair(n2.getIdNode(), weight));\n\n\n\t\tnrOfEdges++;\n\t}",
"public void addEdge(Node src, Node dest, int cost){\n if(nodes.containsKey(src) && nodes.containsKey(dest)){\n Edge newEdge = new Edge(src, dest, cost);\n nodes.get(src).add(dest);\n src.addNodeEdge(newEdge);\n\n Edge otherEdge = new Edge(dest, src, cost);\n nodes.get(dest).add(src);\n dest.addNodeEdge(otherEdge);\n\n\n }\n\n }",
"void addEdge(int a, int b) {\n Edge e = new Edge(V[a], V[b]);\n V[a].Adj.add(e);\n V[b].Adj.add(e);\n }",
"@Override\r\n\tpublic void link(E src, E dst, int weight) {\r\n\t\tinsertVertex(src); //Inserts src if not currently in the graph\r\n\t\tinsertVertex(dst); //Inserts dst if not currently in the graph\r\n\t\tEdge<E> newedge1 = new Edge<>(src, dst, weight);\r\n\r\n\t\tArrayList<Edge<E>> sEdges = adjacencyLists.get(src);\r\n\t\tsEdges.remove(newedge1); //if the edge already exists remove it\r\n\t\tsEdges.add(newedge1);\r\n\t\tif(!isDirected) { //Add the additional edge if this graph is undirected\r\n\t\t\tEdge<E> newedge2 = new Edge<>(dst, src, weight);\r\n\r\n\t\t\tArrayList<Edge<E>> dEdges = adjacencyLists.get(dst);\r\n\t\t\tdEdges.remove(newedge2); //if the edge already exists remove it\r\n\t\t\tdEdges.add(newedge2); \r\n\t\t}\r\n\t}",
"public abstract boolean putEdge(Edge incomingEdge);"
] | [
"0.6920556",
"0.68763924",
"0.6802485",
"0.6752675",
"0.6738447",
"0.6713555",
"0.6647818",
"0.66070026",
"0.6594007",
"0.6591972",
"0.6587093",
"0.64964783",
"0.6444762",
"0.641235",
"0.64108723",
"0.639557",
"0.6395476",
"0.6378766",
"0.63434356",
"0.63390493",
"0.63346475",
"0.6334337",
"0.6325576",
"0.6309713",
"0.6298247",
"0.6267526",
"0.6258593",
"0.62520653",
"0.6246953",
"0.6235824",
"0.6221264",
"0.620032",
"0.6197341",
"0.6173371",
"0.61683583",
"0.6154687",
"0.61500853",
"0.61051637",
"0.6089319",
"0.6081785",
"0.6078355",
"0.607471",
"0.6068224",
"0.60385936",
"0.6026545",
"0.6015862",
"0.6000667",
"0.59978515",
"0.59937894",
"0.59918517",
"0.59892154",
"0.5988945",
"0.5986671",
"0.59802055",
"0.5968866",
"0.5940965",
"0.59401727",
"0.5934182",
"0.5931119",
"0.5928036",
"0.592417",
"0.58825004",
"0.58705103",
"0.5867787",
"0.5866234",
"0.5856181",
"0.5833118",
"0.58329916",
"0.58317554",
"0.581553",
"0.57923293",
"0.57805926",
"0.5776689",
"0.5770005",
"0.5767837",
"0.575735",
"0.57508385",
"0.5721918",
"0.57078934",
"0.5680116",
"0.5676249",
"0.56688577",
"0.564594",
"0.56394005",
"0.56273615",
"0.5621677",
"0.5614483",
"0.56133837",
"0.5610276",
"0.5583746",
"0.5580908",
"0.5580388",
"0.5569608",
"0.5569608",
"0.5565961",
"0.55557156",
"0.5552698",
"0.55280375",
"0.55213445",
"0.55095184"
] | 0.5657865 | 82 |
Remove a child node. It is possible to orphan nodes by calling this method. | @Override
public boolean removeChild(N endNode) {
Edge<N, E> edge = buildDirectEdge(getThis(), endNode);
if (!outgoingEdges.contains(edge)) {
return false;
}
Edge<N, E> actualEdge = findActual(edge, outgoingEdges);
return actualEdge.detach();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void removeChild(Node node);",
"@DISPID(2)\n\t// = 0x2. The runtime will prefer the VTID if present\n\t@VTID(8)\n\tvoid removeChild(@MarshalAs(NativeType.VARIANT) java.lang.Object node);",
"public void removeChild(WSLNode node) {children.removeElement(node);}",
"public void removeFromParent(TXSemanticTag child);",
"public void removeChild( ChildType child );",
"public void removeChild(XMLElement child) {\n this.children.removeElement(child);\n }",
"void removeChild(Object child);",
"public void removeChildren(QueryNode childNode);",
"public void removeChild(T child) {\n this.children.remove(child);\n this.invalidate();\n }",
"public void removeChild(XMLElement child)\n/* */ {\n/* 444 */ if (child == null) {\n/* 445 */ throw new IllegalArgumentException(\"child must not be null\");\n/* */ }\n/* 447 */ this.children.removeElement(child);\n/* */ }",
"public void removeNode()\n\t{\n\t\tif (parent != null)\n\t\t\tparent.removeChild(this);\n\t}",
"@Override\n public boolean removeChild(String childName)\n {\n return children.removeNodes(childName);\n }",
"public void deleteNode() {\n TreeNode pNode = this.getParentNode();\n int id = this.getSelfId();\n\n if (pNode != null) {\n pNode.deleteChildNode(id);\n }\n }",
"@Override\r\n\t\tpublic Node removeChild(Node oldChild) throws DOMException\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public void removeChild(int index)\n/* */ {\n/* 457 */ this.children.removeElementAt(index);\n/* */ }",
"public void removeFromParent();",
"public void removeChildAt(int index) {children.removeElementAt(index);}",
"public void removeThisIfItsAChild(FileNode childToBeDeleted) {\r\n List<FileNode> list = getChildren();\r\n list.remove(childToBeDeleted);\r\n childNum--;\r\n }",
"public boolean removeChild( PlanNode child ) {\n boolean result = this.children.remove(child);\n if (result) {\n child.parent = null;\n }\n return result;\n }",
"public void remove() {\n removeNode(this);\n }",
"@Override\n public boolean removeChild(ConfigurationNode child)\n {\n return children.removeNode(child);\n }",
"public void deleteChildNode(int childId) {\n List<TreeNode> cList = this.getChildList();\n int childNumber = cList.size();\n for (int i = 0; i < childNumber; i++) {\n TreeNode child = cList.get(i);\n if (child.getSelfId() == childId) {\n cList.remove(i);\n return;\n }\n }\n }",
"protected void removeChild(BusinessObject child) {\n\t\tif (children != null) {\n\t\t\tchildren.values().remove(child);\n\t\t}\n\t}",
"public void removeChild(IDirectory child) {\n children.remove(child);\n }",
"void removeChild(InetSocketAddress address) {\n Neighbor neighbor = children.remove(address);\n if (neighbor != null) {\n neighbor.detach();\n }\n }",
"public FileNode removeChildAt(int index) {\r\n childNum--;\r\n \treturn children.remove(index);\r\n }",
"public void removeChild(int index)\n {\n children.remove(index);\n }",
"private void deleteUpToChild(Node toRemove) {\n Boolean isRoot = toRemove == root;\n Node child = null;\n //find 1 child if exist\n if (toRemove.left != null) {\n child = toRemove.left;\n } else if (toRemove.right != null) {\n child = toRemove.right;\n }\n if (isRoot) { //in case toRemove is the root, set root to child (even if null);\n root = child;\n if (child != null) child.parent = null;\n } else { //if not root, set parent's relevant son to 'child' (both directions)\n if (toRemove.parent.left == toRemove) {\n toRemove.parent.left = child;\n } else toRemove.parent.right = child;\n if (child != null) {\n child.parent = toRemove.parent;\n }\n }\n }",
"private void removeChild(ReactShadowNode child, ReactShadowNode parentNode) {\n dropNativeViews(child, parentNode);\n removeShadowNode(child);\n }",
"public void removeFromParent() { if(_parent!=null) _parent.removeChild(this); }",
"public void removeChildren() {\r\n this.children.clear();\r\n childNum = 0;\r\n }",
"public boolean removeChild(TreeNode child)\r\n\t{\r\n\t\treturn m_children.removeElement(child);\r\n\t}",
"@Override\n\t\tpublic void remove(TiUIView child)\n\t\t{\n\t\t\tfinal View nativeView = getNativeView();\n\t\t\tif (nativeView != null) {\n\t\t\t\tsetNativeView(this.content);\n\t\t\t\tsuper.remove(child);\n\t\t\t\tsetNativeView(nativeView);\n\t\t\t} else {\n\t\t\t\tsuper.remove(child);\n\t\t\t}\n\t\t}",
"public BinaryNode removeNode(BinaryNode node){\n if(isLeaf(node)){//base case\n BinaryNode parent = (BinaryNode) node.getParent();\n if(parent == null){\n root = null;\n }\n else{\n parent.removeChild(node);\n }\n size--;\n return parent;\n }\n BinaryNode lower = descendant(node);\n promote(lower, node);\n return removeNode(lower);\n }",
"private Node removeElement() {\n if (this.leftChild != null) {\n if (this.rightChild != null) {\n Node current = this.rightChild;\n\n while (current.leftChild != null) {\n current = current.leftChild;\n }\n\n //swap\n E value = this.value;\n this.value = current.value;\n current.value = value;\n\n this.rightChild = this.rightChild.removeElement(current.value);\n return this.balance();\n } else {\n return this.leftChild;\n }\n } else {\n return this.rightChild;\n }\n }",
"@Override\n\tpublic void removechild(EndpointEntity entity) {\n\t\t\n\t}",
"public boolean removeNode(Node n);",
"@Override\n public void removeChildren()\n {\n children.clear();\n }",
"@Override\n\tpublic TreeNode remove() {\n\t\treturn null;\n\t}",
"protected final boolean removeChild(final INode child) {\r\n Preconditions.checkNotNull(children);\r\n final int i = searchChildren(child.getLocalNameBytes());\r\n if (i < 0) {\r\n return false;\r\n }\r\n\r\n final INode removed = children.remove(i);\r\n Preconditions.checkState(removed == child);\r\n return true;\r\n }",
"void arbitraryRemove(Nodefh node){\n\t\n\t\tif(node.Parent.Child == node){\n\t\t\tif(node.Right != null && node.Right != node){\n\t\t\t\tnode.Parent.Child = node.Right;\n\t\t\t\tif(node.Left!=null && node.Left != node){\n\t\t\t\t\tnode.Left.Right = node.Right;\n\t\t\t\t\tnode.Right.Left = node.Left;\n\t\t\t\t\tnode.Parent = null;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tnode.Right.Left = node.Right;\n\t\t\t\t\tnode.Parent = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnode.Parent.Child = null;\n\t\t\t\tnode.Parent = null;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(node.Left != null && node.Left != node){\n\t\t\t\tnode.Left.Right = node.Right;\n\t\t\t\tnode.Right.Left = node.Left;\n\t\t\t}\n\t\t\tnode.Parent = null;\n\n\t\t}\n\t\tif(node.Child!=null){\n\t\t\tNodefh temp = node.Child;\n\t\t\tif(node.Child.Right!=null){\n\t\t\t\ttemp = node.Child.Right;\n\t\t\t}\n\t\t\tfhInsert(node.Child);\n\t\t\twhile(temp!=node.Child.Right){\n\t\t\t\tfhInsert(temp);\n\t\t\t\ttemp = temp.Right;\n\t\t\t}\n\n\t\t}\n\n\t}",
"private Node removeElement(Object value) {\n if (value.equals(this.value)) {\n return this.removeElement();\n }\n\n if (((Comparable)value).compareTo(this.value) < 0) {\n if (this.leftChild != null) {\n this.leftChild = this.leftChild.removeElement(value);\n return this.balance();\n }\n } else {\n if (this.rightChild != null) {\n this.rightChild = this.rightChild.removeElement(value);\n return this.balance();\n }\n }\n return this;\n }",
"public void onRemoveNode(Node node) {\n\t}",
"public Node disconnectChild(int childNum)\r\n\t{\r\n\t\tNode tempNode=childArray[childNum];\r\n\t\tchildArray[childNum]=null;\r\n\t\treturn tempNode;\r\n\t}",
"protected void notifyChildRemoval(FONode node) {\n //nop\n }",
"public Node getChild();",
"public void removeChild(TaskStack stack) {\n super.removeChild((TaskStackContainers) stack);\n removeStackReferenceIfNeeded(stack);\n }",
"public void removeChildFile(IFile child) {\n childFiles.remove(child);\n }",
"@Override\n\tpublic Node removeNode() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\t// BreadthFirstSearch using a queue, first in first out principle\n\t\treturn frontier.removeFirst();\n\t}",
"public void deleteNode ()\n {\n ConfigTreeNode node = _tree.getSelectedNode();\n ConfigTreeNode parent = (ConfigTreeNode)node.getParent();\n int index = parent.getIndex(node);\n ((DefaultTreeModel)_tree.getModel()).removeNodeFromParent(node);\n int ccount = parent.getChildCount();\n node = (ccount > 0) ?\n (ConfigTreeNode)parent.getChildAt(Math.min(index, ccount - 1)) : parent;\n if (node != _tree.getModel().getRoot()) {\n _tree.setSelectionPath(new TreePath(node.getPath()));\n }\n DirtyGroupManager.setDirty(group, true);\n }",
"void removeGift(Child child, Gift gift);",
"public void deleteNode(INode node) {\r\n\t\t// first delete the node from the children of its parent\r\n\t\tINode parent = node.getParent();\r\n\t\tif (parent != null) {\r\n\t\t\tparent.getChildren().remove(node);\r\n\t\t}\r\n\t\t// then remove the node from the list\r\n\t\tnodeList.remove(node);\r\n\t}",
"public E remove() {\n if (list.size() == 0) return null;\n\n E removeObject = list.get(0);\n list.set(0, list.get(list.size() - 1));\n list.remove(list.size() - 1);\n\n int currentIndex = 0;\n while(currentIndex < list.size()) {\n int leftChildIndex = 2 * currentIndex + 1;\n int rightChildIndex = 2 * currentIndex + 2;\n\n // Find the largest child\n if (leftChildIndex >= list.size()) break;\n int maxIndex = leftChildIndex;\n if (rightChildIndex < list.size()) {\n if (list.get(maxIndex).compareTo(list.get(rightChildIndex)) < 0) {\n maxIndex = rightChildIndex;\n }\n }\n\n // Swap if the current node is less than the largest child\n if (list.get(currentIndex).compareTo(list.get(maxIndex)) < 0) {\n E temp = list.get(maxIndex);\n list.set(maxIndex, list.get(currentIndex));\n list.set(currentIndex, temp);\n currentIndex = maxIndex;\n } else {\n break;\n }\n }\n\n return removeObject;\n }",
"public void cutNode ()\n {\n copyNode();\n deleteNode();\n }",
"public boolean removeChild(View root, int virtualDescendantId) {\n/* 258 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private BinaryNode<E> _deleteNode(BinaryNode<E> nodeToDelete) {\n\t\tif (nodeToDelete.isLeaf()) // node to delete has no children\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tif (!nodeToDelete.hasLeftChild()) // node to delete has no LEFT child\n\t\t{\n\t\t\treturn nodeToDelete.getRightChild();\n\t\t}\n\t\tif (!nodeToDelete.hasRightChild()) // node to delete has no RIGHT child\n\t\t{\n\t\t\treturn nodeToDelete.getLeftChild();\n\t\t}\n\t\t// must have left and right children\n\t\t// Locate the rightmost node in the left subtree of\n\t\t// the node to delete and also its parent\n\t\tBinaryNode<E> parentOfRightMost = nodeToDelete;\n\t\tBinaryNode<E> rightMost = nodeToDelete.getLeftChild();\n\n\t\twhile (rightMost.getRightChild() != null) {\n\t\t\tparentOfRightMost = rightMost;\n\t\t\trightMost = rightMost.getRightChild(); // Keep going to the right\n\t\t}\n\n\t\t// Replace the element in nodeToDelete by the element in rightMost\n\t\tnodeToDelete.setData(rightMost.getData()); // don't really delete the node, just change the data\n\n\t\t// Eliminate rightmost node\n\t\tif (parentOfRightMost.getRightChild() == rightMost)\n\t\t\tparentOfRightMost.setRightChild(rightMost.getLeftChild());\n\t\telse\n\t\t\t// Special case: nodeToDelete's leftChild has no rightChild\n\t\t\tparentOfRightMost.setLeftChild(rightMost.getLeftChild());\n\n\t\treturn nodeToDelete;\n\t}",
"public void removeElement(SvgElement element) {\n Objects.requireNonNull(element);\n if (children.contains(element)) {\n children.remove(element);\n updateChildrenAttribute();\n }\n }",
"void deleteNode(ZVNode node);",
"public void remove () { this.setAsDown(); n.remove(); }",
"@objid (\"808c0839-1dec-11e2-8cad-001ec947c8cc\")\n @Override\n public void delete() {\n // List children from the end to avoid reordering of the other GMs\n for (int i = this.children.size() - 1; i >= 0; i--) {\n GmNodeModel child = this.children.get(i);\n child.delete();\n \n // When several elements have been deleted consecutively, fix the next index\n if (i > this.children.size()) {\n i = this.children.size();\n }\n }\n \n assert (this.children.isEmpty()) : \"All children should have been deleted:\" + this.children;\n \n super.delete();\n }",
"public void delete() {\n this.root = null;\n }",
"public void delete(E e) {\n\t\tNode node = getNode(root, e);\n\t\tif (node == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tNode parentOfLast = getNode(size >> 1);\n\t\tif (parentOfLast.right != null) {\n\t\t\tnode.data = parentOfLast.right.data;\n\t\t\tparentOfLast.right = null;\n\t\t}\n\t\telse {\n\t\t\tnode.data = parentOfLast.left.data;\n\t\t\tparentOfLast.left = null;\n\t\t}\n\t\tsize--;\n\t}",
"public void removePiece() {\n\t\troot.getChildren().clear();\n\t\tthis.piece = null;\n\t\troot.getChildren().add(rectangle);\n\t}",
"public PlanNode removeFromParent() {\n PlanNode result = this.parent;\n if (this.parent != null) {\n // Remove this node from its current parent ...\n this.parent.children.remove(this);\n this.parent = null;\n }\n return result;\n }",
"@objid (\"808c0873-1dec-11e2-8cad-001ec947c8cc\")\n public final void moveChild(GmNodeModel child, int index) {\n int oldIndex = this.children.indexOf(child);\n \n if (oldIndex == -1) {\n throw new IllegalArgumentException(\"The element is not in the children list\");\n }\n \n // If child already at asked position do nothing\n if (index == oldIndex) {\n return;\n }\n \n // If child already at asked last position do nothing\n if (index == -1 && oldIndex == this.children.size() - 1) {\n return;\n }\n \n this.children.remove(child);\n \n if (index == -1) {\n // Add to the end\n this.children.add(child);\n } else if (index > oldIndex) {\n // Child moved after old position,\n // Fix the index after removal.\n this.children.add(index - 1, child);\n } else {\n // Child moved before old position\n this.children.add(index, child);\n }\n \n firePropertyChange(IGmObject.PROPERTY_CHILDREN, null, child);\n }",
"public void deleteNode(TreeNode node) {\n if (node != null) {\n /* One child situation */\n if (node.getLeft() == null) {\n transplantNode(node, node.getRight());\n } else if (node.getRight() == null) {\n transplantNode(node, node.getLeft());\n } else {\n // Node has two children, so replacement is not that simple.\n TreeNode replacement = getMinimumNodeInSubTree(node.getRight());\n if (replacement.getParent() != node) {\n transplantNode(replacement, replacement.getRight());\n replacement.setRight(node.getRight());\n replacement.getRight().setParent(replacement);\n }\n transplantNode(node, replacement);\n replacement.setLeft(node.getLeft());\n replacement.getLeft().setParent(replacement);\n }\n }\n }",
"@PortedFrom(file = \"Taxonomy.h\", name = \"removeNode\")\n public void removeNode(TaxonomyVertex node) {\n graph.remove(node);\n }",
"public static void pruneChild(final Node parentNode, final Node childNode) {\n\t\t//promote all the child node's children to be children of the parent node\n\t\twhile(childNode.hasChildNodes()) { //while the child node has children\n\t\t\tfinal Node node = childNode.getFirstChild(); //get the first child of the node\n\t\t\tchildNode.removeChild(node); //remove the child's child\n\t\t\tparentNode.insertBefore(node, childNode); //insert the child's child before its parent (the parent node's child)\n\t\t}\n\t\tparentNode.removeChild(childNode); //remove the child, now that its children have been promoted\n\t}",
"public void removeChildEdited(Consumer<SpanNode<T>> listener){\n childEditedListeners.remove(listener);\n }",
"public void removeNode(Node p_node) {\n\t\tnodes.remove(p_node);\n\t}",
"private Node caseOneChild(Node deleteThis) {\r\n\r\n Node child, parent;\r\n if (deleteThis.getLeft() != null) {\r\n child = deleteThis.getLeft();\r\n } else {\r\n child = deleteThis.getRight();\r\n }\r\n parent = deleteThis.getParent();\r\n child.setParent(parent);\r\n\r\n\r\n if (parent == null) {\r\n this.root = child; // Poistettava on juuri\r\n return deleteThis;\r\n }\r\n if (deleteThis == parent.getLeft()) {\r\n parent.setLeft(child);\r\n } else {\r\n parent.setRight(child);\r\n }\r\n return deleteThis;\r\n }",
"@Override\n\tpublic void removeChild(IComponent c) {\n\t\tcomponents.remove(c);\n\t\t\n\t}",
"public void removeNodeAfterThis() {\r\n\t\tif ( link != null ) {\r\n\t\t\tlink = link.link;\r\n\t\t} // end precondition\r\n\t}",
"public final Chapter removeAt(int index) {\n val current = children.remove(index);\n current.parent = null;\n return current;\n }",
"public void delete() {\n\t\t// pre: length>0\n\t\t// post: delete one node from the end; reduce length\n\t\tif (this.length > 0) {\n\t\t\tCLL_LinkNode temp_node = this.headNode ;\n\t\t\tfor (int i = 1; i < this.length-1; i++) {\n\t\t\t\ttemp_node = temp_node.getNext();\n\t\t\t}\n\t\t\ttemp_node.getNext().setNext(null);\n\t\t\ttemp_node.setNext(this.headNode);\n\t\t\tthis.length--;\n\t\t}\n\t}",
"public void removeChildByName(String n) {\n\t\tfor(int i=0; i<children.size(); i++)\n\t\t\tif(getChild(i).name.equals(n)) children.removeElementAt(i);\n\t}",
"public void remove()\n {\n ShapeParent parent = getShapeParent();\n \n if (parent != null)\n {\n parent.remove(this);\n }\n }",
"public void deleteNode (NodeId id) throws IOException\n\t{\n\t}",
"public RemovePackage(Object parent, Package child) {\r\n\t\tthis.parent = parent;\r\n\t\tthis.child = child;\r\n\t}",
"public String remove()\n\t{\n\t\tString result = null;\n\t\tif (pointer > 0)\n\t\t{\n\t\t\tif (pointer == 1)\n\t\t\t{\n\t\t\t\tpointer--;\n\t\t\t\tresult = data[pointer];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tString oldRoot = data[0];\n\t\t\t\tString oldLast = data[pointer - 1];\n\t\t\t\tdata[0] = oldLast;\n\t\t\t\tdata[pointer - 1] = oldRoot;\n\t\t\t\tpointer--;\n\t\t\t\tresult = data[pointer];\n\t\t\t\tint parent = 0;\n\t\t\t\t//left child\n\t\t\t\tint childLeft = parent * 2 + 1;\n\n\t\t\t\twhile (childLeft < pointer)\n\t\t\t\t{\n\t\t\t\t\t//right child\n\t\t\t\t\tint childRight = parent * 2 + 2;\n\t\t\t\t\t//assume the mininum of the two children is left child\n\t\t\t\t\tint childMin = childLeft;\n\t\t\t\t\tif (childRight < pointer)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (smallerThan(childRight, childLeft))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tchildMin = childRight;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (smallerThan(childMin, parent))\n\t\t\t\t\t{\n\t\t\t\t\t\t//downheap\n\t\t\t\t\t\tswap(childMin, parent);\n\t\t\t\t\t\tparent = childMin;\n\t\t\t\t\t\tchildLeft = parent * 2 + 1;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"protected void removeSelf() {\n if (!removed && parentNode != null && componentNode != null) {\n // remove this node from parent node\n parentNode.removeChild(componentNode);\n // Mark as removed\n removed = true;\n }\n }",
"public boolean remove() {\n if (parent == null) {\n throw new RuntimeException(ROOT_REMOVING_EXCEPTION_MESSAGE);\n }\n\n return parent.remove(value); // increments modificationCount!\n }",
"public E BSTRemove(Position<E> arg) throws InvalidPositionException {\n PNode<E> v = validate(arg);\n E old = v.element();\n \n if (v.left != null && v.left.isExternal()){\n RemoveExternal(v.left);\n }else if (v.right != null && v.right.isExternal()){\n RemoveExternal(v.right);\n }else{ // find v's\n PNode<E> w = v.right;\n while (w != null && w.isInternal()){\n w = w.left;\n }\n v.setElement( w.parent.element() );\n RemoveExternal(w);\n }\n //checkRoot();\n \n return old;\n }",
"@Test\n public void remove_BST_0_CaseRootOneChildren()\n {\n BinarySearchTree bst = new BinarySearchTree();\n No root = new No(20);\n bst.insert(null, root);\n bst.insert(root, new No(10));\n //bst.printTree();\n //System.err.println(); // Print[ERR] Devido a prioridade do buffer de impressao (out, err)\n \n assertEquals(root, bst.remove(root));\n assertEquals(new Integer(1), bst.size());\n //bst.printTree();\n }",
"public AbstractDrawableSceneObject getChild(Class<?> childType, boolean removeChild)\r\n\t{\r\n\t\tAbstractDrawableSceneObject child = null;\r\n\t\tfor (AbstractDrawableSceneObject abstractDrawableSceneObject : getChildren(true))\r\n\t\t{\r\n\t\t\tif (abstractDrawableSceneObject.getClass().equals(childType))\r\n\t\t\t{\r\n\t\t\t\tchild = abstractDrawableSceneObject;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (child != null)\r\n\t\t{\r\n\t\t\tgetChildren(true).remove(child);\r\n\t\t}\r\n\t\treturn child;\r\n\t}",
"public Object remove(int id) {\n AVLNode parent = root;\n AVLNode current = root;\n boolean isLeftChild = false;\n Object element = null;\n \n while(current.getId() != id) {\n parent = current;\n \n if(current.getId() > id) {\n isLeftChild = true;\n current = current.getLeft();\n } else {\n isLeftChild = false;\n current = current.getRight();\n }\n \n if(current == null) {\n return element;\n }\n }\n element = current.getElement();\n \n //if node to be deleted has no children\n if(current.getLeft() == null && current.getRight() == null) {\n if(current == root) {\n root = null;\n }\n \n if(isLeftChild == true) {\n parent.setLeft(null);\n } else {\n parent.setRight(null);\n }\n }\n \n //if node to be deleted has only one child\n else if(current.getRight() == null) {\n if(current == root) {\n root = current.getLeft();\n } else if(isLeftChild) {\n parent.setLeft(current.getLeft());\n } else {\n parent.setRight(current.getLeft());\n }\n } else if(current.getLeft() == null) {\n if(current == root) {\n root = current.getRight();\n } else if(isLeftChild) {\n parent.setLeft(current.getRight());\n } else {\n parent.setRight(current.getRight());\n }\n } else if(current.getLeft() != null && current.getRight() != null) { \n AVLNode successor = getSuccessor(current);\n \n if(current == root) {\n root = successor;\n } else if(isLeftChild) {\n parent.setLeft(successor);\n } else {\n parent.setRight(successor);\n }\n \n successor.setLeft(current.getLeft());\n }\n \n return element;\n }",
"@Override\n public V remove(K key, V value) {\n Node saveRemove = new Node(null,null);\n root = removeHelper(key,value,root,saveRemove);\n return saveRemove.value;\n }",
"public void removeFromPane(Node node) {\n pane.getChildren().remove(node);\n }",
"private void deleteDegreeOneChild(Node curr, AtomicReference<Node> rootRef) {\n\t\tNode child = curr.right.isNull ? curr.left : curr.right;\n replaceNode(curr, child, rootRef);\n if(curr.color == Color.BLACK) {\n if(child.color == Color.RED) {\n child.color = Color.BLACK;\n } else {\n adjustRootDeficiency(child, rootRef);\n }\n }\n\t}",
"@Override\n public void removeChild( Element e ) {\n if ( e instanceof XulMenuitem ) {\n // System.out.println( \"removing menu item: \"+((XulMenuitem)e).getLabel() );\n }\n if ( e instanceof XulMenupopup ) {\n // System.out.println( \"removing menu popup: \"+((XulMenupopup)e).getId() );\n }\n if ( e instanceof XulMenu ) {\n // System.out.println( \"removing menu: \"+((XulMenu)e).getId() );\n }\n }",
"@DeleteMapping(value = { \"\", \"/cart/{parent}/{child}\" })\n\tpublic void removeCarItem(@PathVariable(\"parent\") String parent, @PathVariable(\"child\") String child) {\n\t\tLOGGER.info(\"ShoppingCartRestController.removeCarItem() invocation started\");\n\t\ttheShoppingCartService.removeFromCart(parent, child);\n\t}",
"void handleChildRemove(MPartSashContainerElement element) {\n\t}",
"boolean removeNode(N node);",
"public Node remove() {\n Node result = peek();\n\n //new root is last leaf\n heap[1] = heap[size];\n heap[size] = null;\n size--;\n\n //reconstruct heap\n shiftDown();\n\n return result;\n }",
"public void delete(int index) {\n\t\tNode node = getNode(index+1);\n\t\tNode parentOfLast = getNode(size >> 1);\n\t\tnode.data = parentOfLast.right != null ? parentOfLast.right.data : parentOfLast.left.data;\n\t\tif (parentOfLast.right != null) {\n\t\t\tparentOfLast.right = null;\n\t\t}\n\t\telse {\n\t\t\tparentOfLast.left = null;\n\t\t}\n\t}",
"public void remove(Node node) {\n\t\tNode cloneNode = node;\n\t\tint index = indexOf(cloneNode.block);\n\t\tif (index != (-1)){\n\t\t\tgetNode(index - 1).next = cloneNode.next;\n\t\t\tgetNode(index + 1).previous = cloneNode.previous;\n\t\t\tsize--;\n\t\t\t\n\t\t}\n\t}",
"public Node removeFromChain();",
"public void remove(Glyph glyph) throws OperationNotSupportedException, IndexOutOfBoundsException {\n throw new OperationNotSupportedException(\"This Glyph cannot have children\");\n }",
"public final void removeFirst() {\n this.size--;\n setFirst((Node) ((Node) get()).get());\n }",
"public void removeChild(DisplayChildWindowContainer child) {\n if (this.mRemovingDisplay) {\n super.removeChild((DisplayContent) child);\n return;\n }\n throw new UnsupportedOperationException(\"See DisplayChildWindowContainer\");\n }"
] | [
"0.79944634",
"0.7757457",
"0.77471435",
"0.7508952",
"0.7427379",
"0.7423813",
"0.72773165",
"0.72382015",
"0.72133446",
"0.7137615",
"0.6946627",
"0.69409037",
"0.68729144",
"0.6872656",
"0.675216",
"0.66558135",
"0.66514564",
"0.66207224",
"0.6588436",
"0.6567391",
"0.65327466",
"0.64942914",
"0.64731187",
"0.6448801",
"0.64347416",
"0.64119095",
"0.63575727",
"0.63544726",
"0.6318981",
"0.6306703",
"0.6249196",
"0.6213061",
"0.6205493",
"0.6170889",
"0.6088029",
"0.6048714",
"0.60139",
"0.59869313",
"0.5977882",
"0.5964145",
"0.5920237",
"0.59036136",
"0.5880517",
"0.58716995",
"0.58694685",
"0.584181",
"0.5836599",
"0.5833738",
"0.5827689",
"0.5815687",
"0.57812077",
"0.572594",
"0.5717715",
"0.57147247",
"0.57027686",
"0.5699509",
"0.567912",
"0.56764084",
"0.56753486",
"0.563434",
"0.5626149",
"0.5619431",
"0.5603704",
"0.5595565",
"0.55815566",
"0.5565729",
"0.5548828",
"0.5548217",
"0.55451155",
"0.5537688",
"0.5537413",
"0.5511708",
"0.5511402",
"0.55078584",
"0.55073833",
"0.5504254",
"0.54890335",
"0.5485447",
"0.5480187",
"0.5477319",
"0.5462057",
"0.54499024",
"0.5433817",
"0.54224557",
"0.541993",
"0.54139626",
"0.5411496",
"0.54065704",
"0.5402494",
"0.5402015",
"0.5396338",
"0.5389076",
"0.5388934",
"0.5388116",
"0.53877723",
"0.53875506",
"0.53873634",
"0.5370034",
"0.53689593",
"0.53576845"
] | 0.60468674 | 36 |
Find the element in the list which matches the object | private <T> T findActual(T matchingObject, List<? extends T> list) {
T actual = null;
for (T check : list) {
if (check.equals(matchingObject)) {
actual = check;
}
}
return actual;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T find(T element);",
"public T search(K key) {\n\t\tfor (T item : list) {\n\t\t\tif (item.matches(key)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"protected boolean findObject(Object obj){\n \n }",
"public Node searchElement(Object el) {\n\t\n\t\tfor (Node elemento : this.set) {\n\t\t\tif(elemento.getElemento().equals(el)) {\n\t\t\t\treturn elemento;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n public E find(E obj) {\n if (isEmpty())\n return null;\n else {\n Node<E> currentNode = head;\n while (true) {\n if (currentNode.data.compareTo(obj) == 0) {\n return currentNode.data;\n } else if (currentNode.next == null)\n return null;\n else\n currentNode = currentNode.next;\n }\n }\n }",
"Road findByName(String toFind, ArrayList<Road> list)\n\t{\n\t\tRoad tmp;\n\t\tIterator<Road> it = list.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\ttmp = it.next();\n\t\t\tif(tmp.getName().equals(toFind))\n\t\t\t{\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"Object find(String name);",
"public int indexOf(Object elem);",
"public T find (T target);",
"public static Medicine search(ArrayList<Medicine> list, int idInput){\n for (Medicine medicine : list) {\n if(idInput == medicine.getMedicineId()){\n // if true return medicine obj\n return medicine ; \n }\n }\n return null;\n }",
"@Override\n\tpublic T find(T targetElement) {\n\t\tif(contains(targetElement))\n\t\t return targetElement;\n\t\telse \n\t\t\treturn null;\n\t\t\n\t}",
"@Override\n\tpublic T retrieveItem(T obj) {\n\t\tif(cache.contains(obj)) {\n\t\t\tfor (T objInSet : cache) {\n\t\t\t\tif (objInSet.equals(obj)) {\n\t\t\t\t\treturn objInSet;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public int indexOfObject(Object obj);",
"public boolean findElement(int element) {\r\n\tfor(int i = 0 ;i <myList.size();i++) {\r\n\t\tif(element == myList.get(i))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}",
"private static NodeRecord findInList(ArrayList<NodeRecord> list, int nodeId) {\n\t\tfor(NodeRecord node : list){\r\n\t\t\tif (node.getNode() == nodeId)\r\n\t\t\t\treturn node;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Object getObject()\n {\n if (currentObject == null)\n \t return null;\n else\n return AL.indexOf(currentObject);\n }",
"public int indexOf(Object elem, int index);",
"public static Object find(ArrayList<Course> list, String name) {\r\n\t\tfor (Course course : list) {\r\n\t\t\tif (course.courseName == name) {\r\n\t\t\t\treturn \"Index: \" + list.indexOf(course);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"int search(E item);",
"public Person find(String name) {\n\t\tfor (Person person : listOfPeople) {\n\t\t\tif(person.getName().contains(name)) {\n\t\t\t\treturn person;\n\t\t\t}\n\t\t}\n\t\treturn null; // only reached if person with name not found by search.\n\t}",
"public synchronized int search(Object arg)\n {\n int result = -1;\n for (int i=0; i<dataList.size(); i++)\n {\n Object testItem = dataList.get(i);\n if (arg.equals(testItem))\n {\n // calculate the 1-based index of the last item\n // in the List (the top item on the stack)\n result = i + 1;\n break;\n }\n }\n return result;\n }",
"@Override\r\n public int locate(Copiable value) {\r\n for (int i = 0; i < count; i++) {\r\n if (list[i].equals(value)) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }",
"public NodeD find(Object data){\n if (this.isEmpty()){\n return null;\n }else{\n if (this.head.getObject()==data){\n return this.head;\n }else{\n NodeD tmp = this.head.getNext();\n\n while(tmp!=null){\n if (tmp.getObject()==data){\n return tmp;\n }\n tmp = tmp.getNext();\n }\n return null;\n }\n }\n }",
"public E find(E item){\n\t\tE found = find(item, root);\n\t\treturn found;\n\t}",
"public abstract ArrayList<T> findFromReference(int id);",
"public int indexOf(Object o);",
"public int find(Object o) {\n int currentIndex = 0;\n int index = -1;\n ListNode current = start;\n while(current != null) {\n if (o.equals(current.data)) {\n index = currentIndex;\n break;\n }\n currentIndex++;\n current = current.next;\n }\n return index;\n }",
"@Override\r\n public Object findElement(Object key) {\r\n\r\n // Search for node possibly containing key\r\n TFNode node = search(root(), key);\r\n \r\n // Note the index of where the key should be\r\n int index = FFGTE(node, key);\r\n\r\n // If the index is greater than the number of items in the node, the key is not in the node\r\n if (index < node.getNumItems()) {\r\n // Look for key in node\r\n if (treeComp.isEqual(node.getItem(index).key(), key)) {\r\n return node.getItem(index);\r\n }\r\n }\r\n\r\n // The search hit a leaf without finding the key\r\n return null;\r\n }",
"@Override\r\n\tpublic T find(T element) {\n\t\treturn null;\r\n\t}",
"int indexOf(Object value);",
"int indexOf(Object value);",
"public boolean contains(E obj){\n\t\tif (obj == null)\n\t\t\tthrow new IllegalArgumentException(\"The given item is null.\");\n\t\tfor(E val : this) {\n\t\t\tif(val.equals(obj))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean search(T element);",
"public boolean containsElement(int i, T obj);",
"public int indexOf(Object obj) {\n\t\t\n\t\t// If the list is empty\n\t\tif(head == null) {\n\t\t\tSystem.out.println(\"This list is empty so it does not contain the object in question.\");\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\t// Used to go thru the list\n\t\tLinkedListNode<T> temp = head.getNext();\n\t\t\n\t\t// Look at each node\n\t\tint index = 0;\n\t\twhile(temp.getNext() != null) {\n\t\t\t\n\t\t\t// Check to see if the node's data is the same as the object\n\t\t\tif(temp.getData().equals(obj)) {\n\t\t\t\t\n\t\t\t\t// If it is, return the index we're at\n\t\t\t\treturn index;\n\t\t\t}\n\t\t\t\n\t\t\ttemp = temp.getNext();\n\t\t\tindex++; // Increment the variable that keeps track of the index we're at \n\t\t}\n\t\t\n\t\t// It wasn't found, so return -1\n\t\treturn -1;\n\t}",
"public LinkedListItr find( Object x )\n {\n ListNode itr = header.next;\n\n while( itr != null && !itr.element.equals( x ) )\n itr = itr.next;\n\n return new LinkedListItr( itr );\n }",
"public Item searchID(String ID) {\n Item foundItem = null;\n for (Item item : this) {\n if (item.getItemId().equals(ID)) {\n foundItem = item;\n break;\n }\n }\n return foundItem;\n }",
"public <T extends NameClass> T getObject(T[] elementList, String name) {\r\n for (T singleElement : elementList) {\r\n if (singleElement.getName().equalsIgnoreCase(name)) {\r\n return singleElement;\r\n }\r\n }\r\n return null;\r\n }",
"private void search(Object value)\r\n\t\t{\n\r\n\t\t}",
"public List<T> findByKey(String key, Object object, int start, int max);",
"private HabitType findHabitType(List<HabitType> habitList, String title) {\n Iterator<HabitType> iterator = habitList.iterator();\n while (iterator.hasNext()) {\n HabitType habit = iterator.next();\n if (habit.getTitle().equals(title)) {\n return habit;\n }\n }\n return null;\n }",
"public Entry find(Object key) {\r\n Entry entry_with_key = new Entry();\r\n entry_with_key.key = key; \r\n int comp_hash = compFunction(entry_with_key.key.hashCode());\r\n if (hash_table[comp_hash] == null) {\r\n return null;\r\n } else {\r\n DList searching = hash_table[comp_hash];\r\n for(Object entry: searching){\r\n if(((Entry) entry).key().equals(key)){\r\n return (Entry) entry;\r\n }\r\n }\r\n return null;\r\n \r\n }\r\n\r\n\r\n }",
"@Override\n\tpublic int indexOf(T obj) {\n\t\tint n = 0;\n\t\tListNode current = head;\n\t\t\n\t\twhile (current != null) {\n\t\t\tif (current.datum == obj) {\n\t\t\t\treturn n;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcurrent = current.next;\n\t\t\t\tn++;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"public IHashable find(IHashable o)\n\t{\n\t\treturn table[findePosition(o)];\n\t}",
"public Entry find(Object key) {\n int i = compFunction(key.hashCode());\n SList chain = buckets[i];\n try {\n for (SListNode n = (SListNode) chain.front(); n.isValidNode(); n = (SListNode) n.next()) {\n Entry e = (Entry) n.item();\n if (e.key.equals(key)) {\n return e;\n }\n }\n } catch(InvalidNodeException e) {\n System.out.println(e);\n }\n return null;\n }",
"public boolean contains(Object elem);",
"public T getMatch(T data){\r\n\t\tif (data == null)\r\n\t\t\tthrow new IllegalArgumentException(\"data cannot be null\"); \r\n\t\tif (isEmpty())\r\n\t\t\treturn null;\r\n\t\tArrayNode<T> temp = beginMarker.next;\r\n\t\t\r\n\t\t//same as contains (below), except returns pointer, not boolean\r\n\t\twhile (temp != endMarker){\r\n\t\t\tif (temp.getLast().compareTo(data) < 0){\r\n\t\t\t\ttemp = temp.next;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tfor (int i=0; i< temp.getArraySize();i++){\r\n\t\t\t\t\tif (temp.get(i).equals(data))\r\n\t\t\t\t\t\treturn temp.get(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private Song findSong(String title){\n for (Song checkedSong : this.songArrayList){\n if (checkedSong.getTitle().equals(title)){\n return checkedSong;\n }\n }\n return null;\n }",
"public boolean contains(E obj)\n {\n Node m = head;\n while( m.getNext() != null)\n {\n m = m.getNext();\n if(m.getValue().equals(obj))\n {\n return true; \n }\n }\n return false;\n }",
"public Joueur find(String id)\n\t{\n\t\tfor(Joueur j : ListJoueur)\n\t\t{\n\t\t\tif(id.equals(j.getClefId()))\n\t\t\t\treturn j;\n\t\t}\n\t\treturn null;\n\t}",
"protected Position<Item<E>> findPosition(E e) {\n // In Java 10, the var keyword allows local variable type inference\n // If you are using older version of Java, modify this code\n // var walk = list.first();\n Position<Item<E>> walk = list.first();\n while (walk != null && !e.equals(value(walk)))\n walk = list.after(walk);\n return walk;\n }",
"public boolean contains ( Object o ){\n\n \tboolean doesContain = false;\n\n \tfor(int i = 0; i < list.size(); i++){\n\n if(list.get(i).equals(o)){\n doesContain = true;\n }\n\n }\n\n \treturn doesContain;\n\n }",
"public Movie findMovie(String name){\n\n Movie find = null ;\n\n for (Movie movie :movies) {\n\n if(movie.getTitle().equals(name)){\n\n find = movie;\n\n }\n\n }\n\n return find;\n\n }",
"private CAUEntry findElementWithTID(CAUList ulist, int tid){\n\t\tList<CAUEntry> list = ulist.CAUEntries;\n\t\t\n\t\t// perform a binary search to check if the subset appears in level k-1.\n int first = 0;\n int last = list.size() - 1;\n \n // the binary search\n while( first <= last )\n {\n \tint middle = ( first + last ) >>> 1; // divide by 2\n\n if(list.get(middle).tid < tid){\n \tfirst = middle + 1; // the itemset compared is larger than the subset according to the lexical order\n }\n else if(list.get(middle).tid > tid){\n \tlast = middle - 1; // the itemset compared is smaller than the subset is smaller according to the lexical order\n }\n else{\n \treturn list.get(middle);\n }\n }\n\t\treturn null;\n\t}",
"private Node<Pair<K, V>> findItem(K key) {\n Node<Pair<K, V>> result = null;\n\n int hash1 = hash1(key);\n\n if (table[hash1] != null) {\n Node<Pair<K, V>> node = search(table[hash1].list, key);\n\n if (node != null) {\n result = node;\n }\n }\n\n int hash2 = hash2(key);\n\n if (table[hash2] != null && result == null) {\n Node<Pair<K, V>> node = search(table[hash2].list, key);\n\n if (node != null) {\n result = node;\n }\n }\n\n return result;\n }",
"public Entry find(Object key) {\n int hashCode = key.hashCode();\n int index = compFunction(hashCode);\n\n if(defTable[index].isEmpty()) {\n return null;\n }\n\n Entry entry = new Entry();\n ListNode current = defTable[index].front();\n\n try{\n while(true) {\n if(((Entry) current.item()).key().equals(key)) {\n entry.key = key;\n entry.value = ((Entry) current.item()).value();\n return entry;\n }\n if(current==defTable[index].back()) {\n break;\n }\n current = current.next();\n }\n } catch(Exception err) {\n System.out.println(err);\n }\n return null;\n }",
"@Override\n public Optional<Utilizador> search(String username, List<Utilizador> list) {\n for (Utilizador u : list) {\n if (u.getUsername().equals(username)) {\n return Optional.of(u);\n }\n }\n return Optional.empty();\n }",
"public boolean findPerson(Person person){\n for(Person p : personList){\n if(p.equals(person)){return true;}\n }\n return false;\n }",
"private Node<Pair<K, V>> search(\n BiDirectionalNullTerminatedTailedLinkedList<Pair<K, V>> list,\n K key) {\n\n for (Node<Pair<K, V>> i = list.getHead().getNext(); i != list.getTail();\n i = i.getNext()) {\n if (i.getData().key.equals(key)) {\n return i;\n }\n }\n\n return null;\n }",
"static Item search(long sum) {\n int i = hash(sum);\n while (st[i] != null) {\n if (st[i].sum == sum) return st[i];\n i++;\n if (i >= st.length) i -= st.length;\n }\n return null;\n }",
"public int indexOf(Object obj)\r\n {\r\n int index = 0;\r\n for (E element : this)\r\n {\r\n if (Utilities.nullSafeEquals(element, obj))\r\n {\r\n return index;\r\n }\r\n ++index;\r\n }\r\n return BAD_POSITION;\r\n }",
"public DataItem find(int key){\n\t\tint hashVal = hashFunc(key);\n\t\tint stepSize = hashFunc2(key);\n\t\twhile(hashArray[hashVal] != null){\n\t\t\tif(hashArray[hashVal].getKey() == key){\n\t\t\t\tDataItem temp = hashArray[hashVal]; //find the item\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t\thashVal += stepSize;\n\t\t\thashVal %= arraySize;\n\t\t}\n\t\treturn null;\n\t}",
"priorizedListObject find( int id ) throws DAOException;",
"@Override\n public int find(T t) {\n for(int i = 0; i < arrayList.length; i++) {\n if(t.equals(arrayList[i])) {\n return i;\n }\n }\n return -1;\n }",
"public E find(K key){\n\t\tE output= null;\n\t\t\n\t\tint i = 0;\n\t\twhile (i<keys.length && output == null){\n\t\t\tif(keys[i] != null && keys[i].equals(key))\n\t\t\t\toutput = elem[i];\n\t\t\ti = i + 1;\n\t\t}\n\t\treturn output;\n\t}",
"public Student find(int id) {\n\n\t\tfor (int i = 0; i < studentList.size(); i++) {\n\t\t\tif (studentList.get(i).getId() == id) {\n\t\t\t\treturn studentList.get(i);\n\n\t\t\t}\n\n\t\t}\n\t\treturn null;\n\n\t}",
"public static Object findElement(List<Object> elements, QName elementName) {\n\t\tif (elements == null) {\n\t\t\treturn null;\n\t\t}\n\t\tfor (Object element : elements) {\n\t\t\tif (elementName.equals(getElementQName(element))) {\n\t\t\t\treturn element;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public int indexOf(GeometricalObject object);",
"public int indexOf(Object o) {\n int index = -1;\n for(int i = 0; i < size; i++) {\n if(list[i].equals(o)) {\n index = i; break;\n }\n }\n return index;\n }",
"default E find(String key, Object value) {\n\t\tSearchCritera searchCritera = new SearchCritera(key, value);\n\t\treturn find(() -> searchCritera);\n\t}",
"public int indexOf(WModelObject object)\n\t{\n\t\treturn m_elements.indexOf(object);\n\t}",
"public static <T extends Searchable> T lookup(final String nameOrIndex, final List<T> items) {\n final String name = nameOrIndex;\n int index = -1;\n try {\n index = Integer.parseInt(nameOrIndex) - 1;\n } catch (final NumberFormatException e) {\n Entity.LOGGER.log(Level.FINE, e.getMessage(), e);\n }\n if (index >= 0 && index < items.size()) {\n return items.get(index);\n }\n\n return items.stream().filter(i -> i.getNameLookup().equals(name)).findFirst().orElse(null);\n }",
"public ArrayList<String> store_present_element(ArrayList<String> oblist){\n\t\tArrayList<String> obj_list = new ArrayList<String>();\n\t\tint result = 0;\n\t\tint obj_index = 1;\n\t\tfor(int i=0; i<oblist.size(); i++){\n\t\t\tString xpathobj = oblist.get(i);\n\t\t\tList<WebElement> list = returnWebelements(xpathobj);\n\t\t\tif(list.size()>0){\n\t\t\t\tresult = 1;\n\t\t\t\tSystem.out.println(xpathobj+\" element is present!! \"+obj_index);\n\t\t\t\tobj_list.add(xpathobj);\n\t\t\t}\n\t\t\tobj_index++;\n\t\t}\n\t\tif(result!=1){\n\t\t\tprintlist(oblist);\n\t\t\tthrow new ObjectNotFoundException(\"none of the element is found from above pattern..\");\n\t\t}\n\t\tcheck_multiple_pattern(obj_list);\n\t\treturn obj_list;\n\t}",
"public AnyType find(AnyType x) {\n\t\treturn elementAt(find(x, root));\n\t}",
"int indexOf(GeometricalObject object);",
"public static DictItem find(List<DictItem> dictionary,\n String groupId,\n String artifactId,\n String version) {\n DictItem match=null;\n for(DictItem item:dictionary) {\n if(item.groupId.equals(groupId)&&\n item.artifactId.equals(artifactId)) {\n // If there is a version matching this version, pick that\n if(version.equals(item.version))\n match=item;\n else if(item.version.equals(\"*\")) {\n if(match!=null&&match.version.equals(\"*\"))\n throw new RuntimeException(\"Duplicate:\"+match);\n if(match==null)\n match=item;\n }\n }\n }\n return match;\n }",
"public String findItem(String searchItem) {\n\n int position = groceryList.indexOf(searchItem);\n if(position >=0) {\n return groceryList.get(position);\n }\n\n return null;\n }",
"SyncRecord findObject(String name, int type) throws NotFoundException\r\n\t{\r\n\t\tfor (int i=0; i<syncTable.size(); i++)\r\n\t\t{\r\n\t\t\tSyncRecord myrec = (SyncRecord)syncTable.elementAt(i);\r\n\t\t\tif ((myrec.name).equals(name) && (myrec.type)==type)\r\n\t\t\t\treturn myrec;\r\n\t\t}\r\n\t\tthrow new NotFoundException();\r\n\t}",
"@Override\n\tpublic Place find(Place obj) {\n\t\treturn null;\n\t}",
"boolean\tcontains(Object o);",
"private ResourceLocation findMatchingEntry(String publicId) {\n return getElements().stream()\n .filter(e -> e.getPublicId().equals(publicId)).findFirst()\n .orElse(null);\n }",
"@Override\n\tpublic Book findBook(Book book) throws RemoteException {\n\t\tPredicate<Book> predicate = x-> x.getIsbn().equals(book.getIsbn());\n\t\treturn bookList.stream().filter(predicate).findFirst().get();\n\t\t\n\t}",
"public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public ListWord findAList(String name) {\n for (ListWord list: list) {\n if (list.getName().equals(name)) {\n return list;\n }\n }\n return null;\n }",
"public static void Search(ArrayList<Integer> list, int val)\n{\n // Your code here\n int result = -1;\n for(int i=0; i<list.size(); i++)\n {\n if(list.get(i) == val)\n {\n result = i;\n break;\n }\n }\n System.out.print(result + \" \");\n \n}",
"private int findIndexOfGivenObject(Object o) {\n\n for(int i = 0; i < size(); i++) {\n if(content[i].equals(o)) {\n return i;\n }\n }\n\n return -1;\n }",
"void search( RealLocalizable reference );",
"public int findEntry(@NullableDecl Object obj, int i, int[] iArr, int[] iArr2, Object[] objArr) {\n int i2 = iArr[bucket(i)];\n while (i2 != -1) {\n if (Objects.equal(objArr[i2], obj)) {\n return i2;\n }\n i2 = iArr2[i2];\n }\n return -1;\n }",
"public abstract boolean contains(Object item);",
"public Student searchStudent(String id) {\n\t\tfor (String key : list.keySet()) {\n\t\t\tif(id.equals(key))\n\t\t\t\treturn list.get(key);\n\t\t}\n\t\treturn null;\n\t}",
"public List<Object> findById(Object obj) throws Exception {\n\t\treturn null;\r\n\t}",
"@Test\r\n\tvoid testSearch() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\ttest.add(9);\r\n\t\tint output = test.search(10);\r\n\t\tassertEquals(1, output);\r\n\t}",
"@Override\n\tpublic int indexOf(Object value) {\n\t\tListNode<L> current=this.first;\n\t\tfor(int i=0;i<this.size;i++) {\n\t\t\tif(current.storage==value) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t\tcurrent=current.next;\n\t\t}\n\t\treturn -1;\n\t\n\t}",
"private static Person findPersonById(int id) {\n Person personReturn = null;\n\n for (Person person : persons) {\n if (id == person.getId()) {\n personReturn = person;\n }\n }\n\n return personReturn;\n }",
"public T getObject(T object) {\r\n\t\t\r\n\t\tif(cache.contains(object) == false) //if not in the cache\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Element not found.\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tcache.get(cache.indexOf(object));\r\n\t\t\treturn object;\r\n\t\t\t\r\n\t\t}\r\n\t\t \r\n\t}",
"Association find(Object target) {\n\t Association cur = list;\r\n\t while ((cur.next != null) && (cur.next.domain != target)) {\r\n\t\t\tcur = cur.next;\r\n\t\t}\r\n\t return cur;\r\n\t }",
"private int find(ElementType element){\n for(int i=0;i<size;i++){\n if(elements[i].equals(element)){\n return i;\n }\n }\n return -1;\n }"
] | [
"0.7085546",
"0.6608644",
"0.6586285",
"0.6538266",
"0.6535665",
"0.6490216",
"0.6451819",
"0.64273834",
"0.6426622",
"0.63121176",
"0.6279506",
"0.62414855",
"0.62237304",
"0.6203668",
"0.6188878",
"0.617948",
"0.6177311",
"0.6155603",
"0.6147445",
"0.6098712",
"0.6097334",
"0.6041867",
"0.601503",
"0.6013866",
"0.6003656",
"0.5988871",
"0.5970246",
"0.5957829",
"0.59456223",
"0.5944122",
"0.5944122",
"0.5924544",
"0.59112066",
"0.59110266",
"0.59002864",
"0.5899499",
"0.58830357",
"0.587653",
"0.5875042",
"0.58637685",
"0.5846259",
"0.58273333",
"0.5823296",
"0.5818756",
"0.58164555",
"0.58055615",
"0.5802461",
"0.5792512",
"0.57868737",
"0.578431",
"0.5776106",
"0.576393",
"0.5754083",
"0.57538766",
"0.5734946",
"0.5731683",
"0.5730843",
"0.57217836",
"0.57209134",
"0.5718247",
"0.5707253",
"0.56995463",
"0.5697996",
"0.5696687",
"0.5690563",
"0.5687894",
"0.56837296",
"0.5677492",
"0.5676568",
"0.56761014",
"0.56676716",
"0.5661526",
"0.5661422",
"0.56568336",
"0.56496555",
"0.56391066",
"0.5634986",
"0.56334823",
"0.5633255",
"0.562112",
"0.5605212",
"0.5600676",
"0.5600224",
"0.5600224",
"0.5600224",
"0.5600068",
"0.55977",
"0.5590042",
"0.5579571",
"0.55788714",
"0.5563521",
"0.5563191",
"0.5561433",
"0.55416256",
"0.55360675",
"0.5532116",
"0.5525713",
"0.55252665",
"0.5518639",
"0.5517466"
] | 0.72799873 | 0 |
For existing user profile: | public static void login(String userName, String password, String ip, LoginDoctor window) {
ConnectionManager connectServer = null;
try {
// Calls ConnectionManager, which connects to the server:
connectServer = new ConnectionManager(ip);
try {
// It tries logging in:
UserProfile up = connectServer.login(userName, password);
if(up == null) {
// If ConnectionManager returns a null value it means the server did not find the credentials.
window.incorrectPassword();
} else {
// If ConnectionManager returns a User Profile it means the server DID find the credentials.
// We then first close the login window:
window.dispose();
// Then we ask server for reports to show the reports window:
showReports(connectServer);
}
} catch (Exception e) {
// If the server found the some of the credentials but the password was wrong it displays this.
/*Side note, I thing this ought to be changed later on, this could be a security threat...*/
window.invalidUsername();
e.printStackTrace();
}
} catch (Exception e1) {
//if the server failed to answer back, display an error message.
window.failedConnection();
System.out.println("Could not connect to the server.");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public UserProfile createUserProfile(String username, UserProfile newProfile);",
"public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender), birthdate);\n }else{\n PersonalDataController.getInstance().create(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender));\n }\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(32), null);\n }\n GBMessage.putMessage(GBEnvironment.getInstance().getError(33), null);\n }",
"private void createProfile(ParseUser parseUser){\n final Profile profile = new Profile();\n\n profile.setShortBio(\"\");\n profile.setLongBio(\"\");\n profile.setUser(parseUser);\n\n //default image taken from existing default user\n ParseQuery<ParseObject> query = ParseQuery.getQuery(\"Profile\");\n query.getInBackground(\"wa6q24VD5V\", new GetCallback<ParseObject>() {\n public void done(ParseObject searchProfile, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Couldn't retrieve default image\");\n e.printStackTrace();\n return;\n }\n else {\n defaultImage = searchProfile.getParseFile(\"profileImage\");\n\n if (defaultImage != null)\n profile.setProfileImage(defaultImage);\n else\n Log.d(TAG, \"Default image is null\");\n }\n }\n });\n\n profile.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 profile\");\n }\n });\n }",
"public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}",
"@Override\n\tpublic void createUserProfile(User user) throws Exception {\n\n\t}",
"public void editTheirProfile() {\n\t\t\n\t}",
"@Override\n\t\tpublic void onUserProfileUpdate(User arg0) {\n\t\t\t\n\t\t}",
"TasteProfile.UserProfile getUserProfile (String user_id);",
"public static boolean upDateProfile(String userName ,String password,String firstName,String address\r\n\t\t\t, String phone , String lastName , String email) {\n User user = new User(userName,password,firstName,lastName,email,phone,address,0);\r\n if(DatabaseMethods.update_user(user)){\r\n return true;\r\n }\r\n else{\r\n setProfile();\r\n \r\n return false;\r\n }\r\n\t\t\r\n\t}",
"public UserProfile getUserProfile(String username);",
"public void setUserProfile(UserProfile userProfile) {this.userProfile = userProfile;}",
"public void saveProfileCreateData() {\r\n\r\n }",
"public long registerUserProfile(User user);",
"@Test\r\n public void testUpdateUserProfileOfCreatedUser() throws Exception {\r\n UserVO user = new UserVO();\r\n user.setAlias(UUID.randomUUID().toString());\r\n user.setFirstName(UUID.randomUUID().toString());\r\n user.setLastName(UUID.randomUUID().toString());\r\n user.setEmail(UUID.randomUUID().toString() + \"@\" + UUID.randomUUID().toString());\r\n user.setLanguage(Locale.ENGLISH);\r\n user.setRoles(new UserRole[] { UserRole.ROLE_KENMEI_USER });\r\n user.setPassword(UUID.randomUUID().toString());\r\n User dbUser = ServiceLocator.instance().getService(UserManagement.class)\r\n .createUser(user, false, false);\r\n UserProfileVO userProfile = new UserProfileVO();\r\n ServiceLocator.instance().getService(UserProfileManagement.class)\r\n .updateUserProfile(dbUser.getId(), userProfile);\r\n }",
"boolean hasProfile();",
"@Override\n\tpublic void updateUserProfileInfo(String name) throws Exception {\n\n\t}",
"private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }",
"@Override\n public void checkProfileUserData() {\n mProfilePresenter.checkProfileUserData();\n }",
"public boolean createUser(UserProfile userProfile) {\n\t\tmongoTemplate.insert(userProfile, \"UserProfile_Details\");\n\t\treturn true;\n\t}",
"@Override\n\tpublic void onUserProfileUpdate(User updatedUser) {\n\n\t}",
"public void addUser(Profile profile) throws JSONException {\n\t\tofy().save().entity(profile).now();\n\t}",
"public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}",
"@Override\n public void onChanged(@Nullable final Profile profile) {\n userProfile = profile;\n }",
"protected void mapUserProfile2SSOUser() {\r\n\t\tssoUser.setProfileId((String)userProfile.get(AuthenticationConsts.KEY_PROFILE_ID));\r\n\t\tssoUser.setUserName((String)userProfile.get(AuthenticationConsts.KEY_USER_NAME));\r\n\t\tssoUser.setEmail((String)userProfile.get(AuthenticationConsts.KEY_EMAIL));\r\n\t\tssoUser.setFirstName((String)userProfile.get(AuthenticationConsts.KEY_FIRST_NAME));\r\n\t\tssoUser.setLastName((String)userProfile.get(AuthenticationConsts.KEY_LAST_NAME));\r\n\t\tssoUser.setCountry((String)userProfile.get(AuthenticationConsts.KEY_COUNTRY));\r\n\t\tssoUser.setLanguage((String)userProfile.get(AuthenticationConsts.KEY_LANGUAGE));\r\n\t\tssoUser.setTimeZone((String)userProfile.get(AuthenticationConsts.KEY_TIMEZONE));\r\n\t\tssoUser.setLastChangeDate((Date)userProfile.get(AuthenticationConsts.KEY_LAST_CHANGE_DATE));\r\n\t\tssoUser.setLastLoginDate((Date)userProfile.get(AuthenticationConsts.KEY_LAST_LOGIN_DATE));\r\n\t\t// Set current site, it will be used to update user's primary site\r\n\t\tssoUser.setCurrentSite(AuthenticatorHelper.getPrimarySiteUID(request));\r\n\t}",
"private void callUpdateProfile() {\n String userStr = CustomSharedPreferences.getPreferences(Constants.PREF_USER_LOGGED_OBJECT, \"\");\n Gson gson = new Gson();\n User user = gson.fromJson(userStr, User.class);\n LogUtil.d(\"QuyNT3\", \"Stored profile:\" + userStr +\"|\" + (user != null));\n //mNameEdt.setText(user.getName());\n String id = user.getId();\n String oldPassword = mOldPassEdt.getText().toString();\n String newPassword = mNewPassEdt.getText().toString();\n String confirmPassword = mConfirmPassEdt.getText().toString();\n String fullName = mNameEdt.getText().toString();\n String profileImage = user.getProfile_image();\n UpdateUserProfileRequest request = new UpdateUserProfileRequest(id, fullName, profileImage,\n oldPassword, newPassword, confirmPassword);\n request.setListener(callBackEvent);\n new Thread(request).start();\n }",
"@Override\n\tpublic long createProfile(Profile profile) {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void updateUserProfile(User user) throws Exception {\n\n\t}",
"@Override\r\n public int addProfile(Profile newProfile) {\r\n return profileDAO.addProfile(newProfile);\r\n }",
"private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }",
"@Override\n\tpublic Profile getProfile(Users user) {\n\t\treturn null;\n\t}",
"@Override\n public boolean onProfileChanged(View view, IProfile profile, boolean current) {\n Intent intent = null;\n if (profile instanceof IDrawerItem && ((IDrawerItem) profile).getIdentifier() == IDENTIFIER_HEADER_ADD_ACCOUNT) {\n intent = new Intent(MainActivity.this, AddAccountActivity.class);\n //TODO: Save profile\n //TODO: Create profile drawer item from saved profile and show it in UI\n /*\n IProfile profileNew = new ProfileDrawerItem()\n .withNameShown(true)\n .withName(\"New Profile\")\n .withEmail(\"[email protected]\")\n .withIcon(getResources().getDrawable(R.drawable.profile_new));\n\n if (accountHeader.getProfiles() != null) {\n //we know that there are 2 setting elements. set the new profile above them\n accountHeader.addProfile(profileNew, accountHeader.getProfiles().size() - 2);\n } else {\n accountHeader.addProfiles(profileNew);\n }\n */\n } else if (profile instanceof IDrawerItem && ((IDrawerItem) profile).getIdentifier() == IDENTIFIER_HEADER_MANAGE_ACCOUNT) {\n intent = new Intent(MainActivity.this, ManageAccountActivity.class);\n //TODO: update the UI\n }else if(profile instanceof IDrawerItem && ((IDrawerItem) profile).getIdentifier() == IDENTIFIER_USER) {\n Toast.makeText(sApplicationContext, \"The User\", Toast.LENGTH_SHORT).show();\n SharedPreferences sp = sApplicationContext.getSharedPreferences(PREF_NAME, MODE_PRIVATE);\n String currentUserUUIDString = sp.getString(PREF_CURRENT_USER_UUID, null);\n if(((UserProfile)profile).getId().toString().equalsIgnoreCase(currentUserUUIDString)){\n Toast.makeText(sApplicationContext, \"SAME User\", Toast.LENGTH_SHORT).show();\n //TODO:\n }else{\n Toast.makeText(sApplicationContext, \"Different User\", Toast.LENGTH_SHORT).show();\n //TODO:\n SharedPreferences.Editor spe = sp.edit();\n spe.putString(PREF_CURRENT_USER_UUID, ((UserProfile)profile).getId().toString());\n spe.commit();\n\n UpdateContentUI();\n }\n }\n\n if(intent != null){\n MainActivity.this.startActivity(intent);\n }\n\n //false if you have not consumed the event And it should close the drawer\n return false;\n }",
"@Override\n public void onSuccess(Uri uri) {\n UserProfileChangeRequest profileUpdate = new UserProfileChangeRequest.Builder().setDisplayName(lname).setPhotoUri(uri).build();\n currentUser.updateProfile(profileUpdate).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n //user info updated succssfully\n saveInformation();\n showMessage(\"Register Complete\");\n updateUI();\n }\n }\n });\n }",
"public void createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }",
"@Override\n\tpublic boolean updateProfile(String name, String address, String dob, String gender, String phone, String email,\n\t\t\t String status, int id) {\n\t\treturn false;\n\t}",
"@Override\n public void onSuccess(Uri uri) {\n\n\n UserProfileChangeRequest profleUpdate = new UserProfileChangeRequest.Builder()\n .setDisplayName(name)\n .setPhotoUri(uri)\n .build();\n\n\n currentUser.updateProfile(profleUpdate)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n // user info updated successfully\n showMessage(\"Register Complete\");\n updateUI();\n }\n\n }\n });\n\n }",
"@Override\n public void onSuccess(Uri uri) {\n\n\n UserProfileChangeRequest profleUpdate = new UserProfileChangeRequest.Builder()\n .setDisplayName(name)\n .setPhotoUri(uri)\n .build();\n\n\n currentUser.updateProfile(profleUpdate)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n // user info updated successfully\n showMessage(\"Register Complete\");\n updateUI();\n }\n\n }\n });\n\n }",
"@Override\n\tpublic boolean updateProfile(long profileId, Profile profile) {\n\t\treturn false;\n\t}",
"private boolean checkIfProfileExists() {\n String profileCreatedKey = context.getString(R.string.app_name_key) + context.getString(R.string.created_profile_key);\n String profileCreated = sharedPref.getString(profileCreatedKey, \"false\");\n return Boolean.valueOf(profileCreated);\n }",
"public UserProfile getUserProfile() {return userProfile;}",
"@Test\n public void testGeneratedProfileFields() {\n Profile p = getProfile(BASIC_PROFILE_PATH);\n assertNotNull(\"Profile uniqueId was null\", p.getUniqueId());\n assertNotNull(\"Profile display name was null\", p.getDisplayName());\n }",
"public void saveProfileEditData() {\r\n\r\n }",
"@Override\n\tpublic void updateProfile(UsersDto dto) {\n\t\tsession.update(\"users.updateProfile\", dto);\n\t}",
"private User retrievePersonalProfileData() {\n if (checkIfProfileExists()) {\n return SharedPrefsUtils.convertSharedPrefsToUserModel(context);\n } else {\n return null;\n }\n }",
"@Override\n\tpublic void saveUserProfile(UserProfile userProfile, boolean isOption,\n\t\t\tboolean isBan) throws Exception {\n\n\t}",
"private void addProfile(ProfileInfo profileInfo)\r\n\t{\r\n\t\taddProfile(profileInfo.getProfileName(), \r\n\t\t\t\tprofileInfo.getUsername(), \r\n\t\t\t\tprofileInfo.getServer(),\r\n\t\t\t\tprofileInfo.getPort());\r\n\t}",
"@Override\n public void loadProfileUserData() {\n mProfilePresenter.loadProfileUserData();\n }",
"public static void cloneProfile(Profile profile)\n throws IOException\n {\n String newName = \n (String) JOptionPane.showInputDialog(MainFrame.getInstance(),\n \"Enter new profile name\");\n if (newName == null)\n return;\n newName = newName.trim();\n if (newName.length() == 0)\n return;\n\n // Does a profile with this name already exist?\n if (ProfileManager.getInstance().getProfile(newName) != null)\n {\n JOptionPane.showMessageDialog(MainFrame.getInstance(),\n \"A profile with that name already exists.\", \"Error\",\n JOptionPane.ERROR_MESSAGE);\n return;\n }\n \n Profile newProfile = new Profile(newName, profile.getAddress(),\n profile.getPort(), profile.getUserName(), profile.getPassword(),\n profile.getParameters());\n try\n {\n ProfileManager.getInstance().updateProfile(newProfile);\n TreePanel.getInstance().addProfile(newProfile);\n }\n catch (SQLException e)\n {\n // This should never happen.\n }\n }",
"Map<String, Object> getUserProfile();",
"@Override\r\n\t@Transactional(readOnly = false)\r\n\tpublic boolean updateUserProfile(UserProfileRemote profile) {\n\t\tUserProfile domain = retrieve(profile.getId());\r\n\t\tdomain = _userProfileConverter.convertRemoteToDomain(domain, profile);\r\n\t\tsaveOrUpdate(domain);\r\n\t\treturn true;\r\n\t}",
"private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }",
"private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }",
"@PutMapping(\"/user/update/\") \n\tpublic userprofiles updateUserprofiles(@RequestParam String oldUsername, @RequestParam String oldPassword, @RequestParam String firstname, @RequestParam String lastname, @RequestParam String username, @RequestParam String password, @RequestParam String pic) {\n\t\treturn this.updateUser(oldUsername, oldPassword, firstname, lastname, username, password, pic);\n\t}",
"private void addProfile(String inputName) {\n \tif (! inputName.equals(\"\")) {\n\t\t\t///Creates a new profile and adds it to the database if the inputName is not found in the database\n \t\tif (database.containsProfile(inputName)) {\n \t\t\tlookUp(inputName);\n \t\t\tcanvas.showMessage(\"Profile with name \" + inputName + \" already exist.\");\n \t\t\treturn;\n \t\t}\n\t\t\tprofile = new FacePamphletProfile (inputName);\n\t\t\tdatabase.addProfile(profile);\n\t\t\tcurrentProfile = database.getProfile(inputName);\n \t\tcanvas.displayProfile(currentProfile);\n\t\t\tcanvas.showMessage(\"New profile created.\");\n\t\t\t\n \t}\n\t\t\n\t}",
"@java.lang.Override\n public boolean hasProfile() {\n return profile_ != null;\n }",
"H getProfile();",
"public boolean updateProfile(ApplicationUser applicationUser){\n boolean isUpdated = false;\n applicationUser = mongoDbConnector.updateProfile(applicationUser);\n if(applicationUser != null)\n isUpdated = true;\n return isUpdated;\n }",
"public String createUserIfNotExist(String email) throws UserNotFoundException {\n List<Profile> users= profileDao.findAll();\n for (Profile profile:users\n ) {\n if(profile.getEmail().equals(email))\n return profile.getUserId();\n }\n Profile tempProfile=new Profile();\n tempProfile.setEmail(email);\n return profileDao.save(tempProfile).getUserId();\n\n }",
"@Override\n\tpublic void showProfile() {\n\t\t\n\t}",
"protected Map<String, Object> getUserProfile() {\r\n\t\tTimeRecorder timeRecorder = RequestContext.getThreadInstance()\r\n\t\t\t\t\t\t\t\t\t\t\t\t .getTimeRecorder();\r\n\t\tString profileId = (String)userProfile.get(AuthenticationConsts.KEY_PROFILE_ID);\r\n\r\n\t\tSite site = Utils.getEffectiveSite(request);\r\n\t\tString siteDNSName = (site == null ? null : site.getDNSName());\r\n\r\n\t\tIUserProfileRetriever retriever = UserProfileRetrieverFactory.createUserProfileImpl(AuthenticationConsts.USER_PROFILE_RETRIEVER, siteDNSName);\r\n\t\ttry {\r\n\t\t\ttimeRecorder.recordStart(Operation.PROFILE_CALL);\r\n\t\t\tMap<String, Object> userProfile = retriever.getUserProfile(profileId,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t request);\r\n\t\t\ttimeRecorder.recordEnd(Operation.PROFILE_CALL);\r\n\t\t\treturn userProfile;\r\n\t\t} catch (UserProfileException ex) {\r\n\t\t\ttimeRecorder.recordError(Operation.PROFILE_CALL, ex);\r\n\t\t\tRequestContext.getThreadInstance()\r\n\t\t\t\t\t\t .getDiagnosticContext()\r\n\t\t\t\t\t\t .setError(ErrorCode.PROFILE001, ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}",
"private void profileUpdate(){\n File out = new File ( Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\"\n + Setting.APP_FOLDER + \"/\" + \"profile\");\n if (!out.exists()){\n try {\n ColdStart.createProfile();\n } catch (ParseException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n else{\n HandlerThread ht = new HandlerThread(\"UpdateProfile\", android.os.Process.THREAD_PRIORITY_BACKGROUND);\n ht.start();\n Handler h = new Handler(ht.getLooper());\n h.post(new Runnable() {\n @Override\n public void run() {\n ColdStart.updateProfile();\n }\n });\n\n }\n }",
"private void addProfile(String profileName, String username, String server, int port)\r\n\t{\r\n\t\tps.setValue(count + PROFILE, profileName + \",\" + username + \",\" + server + \",\" + port);\r\n\t}",
"private static Profile getProfileFromUser(User user) {\n // First fetch the user's Profile from the datastore.\n Profile profile = ofy().load().key(\n Key.create(Profile.class, user.getUserId())).now();\n if (profile == null) {\n // Create a new Profile if it doesn't exist.\n // Use default displayName and teeShirtSize\n String email = user.getEmail();\n\n profile = new Profile(user.getUserId(),\n extractDefaultDisplayNameFromEmail(email), email, null, null, null, null);\n }\n return profile;\n }",
"private void populateProfile() {\n mPassword_input_layout.getEditText().setText(mSharedPreferences.getPassWord());\n mEmail_input_layout.getEditText().setText(mSharedPreferences.getEmail());\n mEdit_name_layout.getEditText().setText(mSharedPreferences.getName());\n ((RadioButton) mRadioGender.getChildAt(mSharedPreferences.getGender())).setChecked(true);\n mPhone_input_layout.getEditText().setText(mSharedPreferences.getPhone());\n mMajor_input_layout.getEditText().setText(mSharedPreferences.getMajor());\n mClass_input_layout.getEditText().setText(mSharedPreferences.getYearGroup());\n\n // Load profile photo from internal storage\n try {\n FileInputStream fis = openFileInput(getString(R.string.profile_photo_file_name));\n Bitmap bmap = BitmapFactory.decodeStream(fis);\n mImageView.setImageBitmap(bmap);\n fis.close();\n } catch (IOException e) {\n // Default profile\n }\n }",
"Profile getProfile( String profileId );",
"@Override\n public void copyTo(UserProfile userProfile) {\n userProfile.setId(getId());\n userProfile.setCity(getCity());\n userProfile.setZipcode(getZipcode());\n userProfile.setCountry(getCountry());\n userProfile.setTitle(getTitle());\n userProfile.setName(getName());\n userProfile.setFirstName(getFirstName());\n userProfile.setLastName(getLastName());\n userProfile.setUsername(getUsername());\n userProfile.setGender(getGender());\n userProfile.setPoints(getPoints());\n userProfile.setNotifyReportDue(isNotifyReportDue());\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tprotected User syncVAPUser() throws UniquePropertyValueConflictException,\r\n\t\t\t\t\t\t\t\tEntityPersistenceException {\r\n\t\t// append all external user profile retrieved from UPS/Persona\r\n\t\tuserProfile.putAll(getUserProfile());\r\n\r\n\t\tmapUserProfile2SSOUser();\r\n\t\tSet groups = getUserGroups();\r\n\t\tgroups.addAll(getLocaleGroups());\r\n\t\tssoUser.setGroups(groups);\r\n\r\n\t\t// Retrieve user from Vignette.\r\n\t\tUser vapUser = AuthenticatorHelper.retrieveUserByProperty(AuthenticationConsts.PROPERTY_PROFILE_ID,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ssoUser.getProfileId());\r\n\r\n\t\t// If user has not been created in Vignette, then create this user\r\n\t\tif (vapUser == null) {\r\n\t\t\t// If employee number doesn't exist at the beginning, email will\r\n\t\t\t// be instead of profile id, so later, when employee number is\r\n\t\t\t// assigned,\r\n\t\t\t// the previous email based user should be removed from vignette.\r\n\t\t\tUser emailUser = AuthenticatorHelper.retrieveUserByProperty(AuthenticationConsts.PROPERTY_PROFILE_ID,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tssoUser.getEmail());\r\n\t\t\tif (emailUser != null) {\r\n\t\t\t\temailUser.delete();\r\n\t\t\t}\r\n\r\n\t\t\t// For CR #961, if the incoming user has the different profile id but same user name as an existing\r\n\t\t\t// account in Vignette database, delete the existing account and create a new one.\r\n\t\t\tUser sameIdUser = AuthenticatorHelper.retrieveUserByProperty(AuthenticationConsts.PROPERTY_USER_NAME_ID,\r\n\t\t\t\t\tssoUser.getUserName());\r\n\t\t\tif (sameIdUser != null && isAllowedForDelete(sameIdUser)) {\r\n\t\t\t\tLOG.info(\"Found an existing user in Vignette DB with same user name but different profile id, now re-creating this user\"\r\n\t\t\t\t\t\t+ ssoUser.getUserName());\r\n\t\t\t\tsameIdUser.delete();\r\n\t\t\t} else {\r\n\t\t\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\t\t\tLOG.debug(\"Not found this user in Vignette DB, now creating this user\"\r\n\t\t\t\t\t\t\t+ ssoUser.getUserName());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvapUser = createVAPUser();\r\n\t\t} else { // Try to update user info if needed\r\n\t\t\t// For CR #961, if the incoming user has the different profile id but same user name as an existing\r\n\t\t\t// account in Vignette database, delete the existing account and then perform the update.\r\n\t\t\tUser sameIdUser = AuthenticatorHelper.retrieveUserByProperty(AuthenticationConsts.PROPERTY_USER_NAME_ID,\r\n\t\t\t\t\tssoUser.getUserName());\r\n\t\t\tif (sameIdUser != null) {\r\n\t\t\t\tString sameIdUserProfileId = (String) sameIdUser.getProperty(AuthenticationConsts.PROPERTY_PROFILE_ID);\r\n\t\t\t\tif (!sameIdUserProfileId.equals(ssoUser.getProfileId()) && isAllowedForDelete(sameIdUser)) {\r\n\t\t\t\t\tLOG.info(\"Found an existing user in Vignette DB with same user name but different profile id, now deleting this user\"\r\n\t\t\t\t\t\t\t+ ssoUser.getUserName());\r\n\t\t\t\t\tsameIdUser.delete();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvapUser = updateVAPUser(vapUser);\r\n\t\t}\r\n\t\treturn vapUser;\r\n\t}",
"@ModelAttribute(\"role_user\")\n public UserProfile initializeUserProfile() {\n return userProfileService.findByType(UserProfileType.USER.getUserProfileType());\n }",
"public static void createNewUserPreference(Context context) {\r\n\t\tString newUserId = generateNewUserId();\r\n\t\tString userConfigKey = getUserConfigFileNameKey(newUserId);\r\n\t\tString userDbKey = getUserDatabaseFileNameKey(newUserId);\r\n\t\tString userConfigFileName = getUserConfigFileName(context, newUserId);\r\n\t\tString userDbFileName = getUserDatabaseFileName(context, newUserId);\r\n\r\n\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\tif (prefs != null) {\r\n\t\t\tEditor editor = prefs.edit();\r\n\t\t\tif (editor != null) {\r\n\t\t\t\teditor.putString(\"user-\" + newUserId, newUserId);\r\n\t\t\t\teditor.putString(userConfigKey, userConfigFileName);\r\n\t\t\t\teditor.putString(userDbKey, userDbFileName);\r\n\t\t\t}\r\n\r\n\t\t\teditor.commit();\r\n\t\t}\r\n\t}",
"public boolean updateProfile(int Id,T deliEntry);",
"@objid (\"6680b948-597e-4df9-b9a2-de8dc499acb3\")\n void setOwnerProfile(Profile value);",
"@Override\n public int saveUserProfile(UserProfile up) throws DAOException{\n\n try{\n Session session = HibernateConnectionUtil.getSession();\n Transaction tx = session.beginTransaction();\n if (up.getID() == -1) session.save(up);\n else session.saveOrUpdate(up);\n tx.commit();\n session.evict(up);\n session.close();\n return up.getID();\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n }",
"@Override\n\tpublic UserProfileResponse updateProfile(User user) {\n\t\t// datasource is used to connect with database\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\tUserProfileResponse gcmres = new UserProfileResponse();\n\t\tlogger.info(\"IN updateProfile METHOD \");\n\t\t// check if user exists in database with user_id\n\t\tString sql = \"select count(1) from user where user_id = ? \";\n\t\tint result = jdbcTemplate.queryForObject(sql, new Object[] { user.getUserid() }, Integer.class);\n\t\t// if user exists, return userId\n\t\tlogger.info(\"Query Count : \" + result);\n\t\tif (result > 0) {\n\t\t\tString update_gcm_query = \"Update user set emailid = ?, mobileno = ?, username = ?, uuid = ?, appversion = ?, gcmregistartionkey = ? where user_id = ?\";\n\t\t\tint rowcount = jdbcTemplate.update(update_gcm_query, user.getEmailid(), user.getMobileno(),\n\t\t\t\t\tuser.getUsername(), user.getUuid(), user.getAppversion(), user.getGcmregistartionkey(),\n\t\t\t\t\tuser.getUserid());\n\t\t\tlogger.info(\"updateProfile Update Row Count : \" + rowcount);\n\t\t\tif (rowcount > 0) {\n\t\t\t\tgcmres.setStatus(true);\n\t\t\t\tgcmres.setMessage(\"User Profile IS Updated Successfully For User Id:\" + user.getUserid());\n\t\t\t\tlogger.info(\"User Profile IS Updated Successfully\");\n\t\t\t} else {\n\t\t\t\tgcmres.setStatus(false);\n\t\t\t\tgcmres.setMessage(\"User Profile Is Not Updated Successfully For User Id:\" + user.getUserid());\n\t\t\t\tlogger.info(\"User Profile Is Not Updated Successfully For User Id:\" + user.getUserid());\n\t\t\t}\n\n\t\t} else {\n\t\t\tgcmres.setStatus(false);\n\t\t\tgcmres.setMessage(\"User Profile Is Not Updated Successfully For User Id:\" + user.getUserid());\n\t\t\tlogger.info(\"User Profile Is Not Updated Successfully For User Id:\" + user.getUserid());\n\t\t}\n\n\t\treturn gcmres;\n\n\t}",
"private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String id = currentPerson.getId();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Id: \"+id+\", Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n signInTask = new AsyncTask(mBaseActivity);\n signInTask.execute(id, email, personName);\n// SharedPreferences preferences = mBaseActivity.getSharedPreferences(\"com.yathams.loginsystem\", MODE_PRIVATE);\n// preferences.edit().putString(\"email\", email).putString(\"userName\", personName).commit();\n\n } else {\n Toast.makeText(getApplicationContext(),\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@RequestMapping(value = \"/profile/{id}\", method = RequestMethod.POST)\n\tpublic String createOrUpdateProfile(@PathVariable(value = \"id\") String id,\n\t\t\t@PathParam(value = \"firstname\") String firstname,\n\t\t\t@PathParam(value = \"lastname\") String lastname,\n\t\t\t@PathParam(value = \"email\") String email,\n\t\t\t@PathParam(value = \"address\") String address,\n\t\t\t@PathParam(value = \"organization\") String organization,\n\t\t\t@PathParam(value = \"aboutmyself\") String aboutmyself, Model model) {\n\t\ttry {\n\t\t\tProfile profile = profileDao.findById(id);\n\t\t\tif (profile == null) {\n\t\t\t\tprofile = new Profile();\n\t\t\t\tprofile.setId(id);\n\t\t\t}\n\t\t\tprofile.setFirstname(firstname);\n\t\t\tprofile.setLastname(lastname);\n\t\t\tprofile.setEmail(email);\n\t\t\tprofile.setAddress(address);\n\t\t\tprofile.setOrganization(organization);\n\t\t\tprofile.setAboutMyself(aboutmyself);\n\t\t\tmodel.addAttribute(\"profile\", profile);\n\t\t\tthis.profileDao.save(profile);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"redirect:/profile/{id}?brief=false\";\n\t}",
"ProfileStatusReader getProfileUpdate( String profileId );",
"private void getUserProfile() {\n mFirstname.setText(\"FirstName: \"+userPreferences.getAgentFirstName());\n mLastname.setText(\"LastName: \"+userPreferences.getAgentLastName());\n\n\n Log.i(\"username\",userPreferences.getAgentUsername());\n if(userPreferences.getAgentUsername()==null){\n mUsernameTxt.setText(\"\");\n }else if(userPreferences.getAgentUsername().equals(\"null\")){\n mUsernameTxt.setText(\"\");\n }else{\n mUsernameTxt.setText(userPreferences.getAgentUsername());\n }\n\n mEmail.setText(\"Email: \"+userPreferences.getAgentEmail());\n mPhoneNum.setText(\"Phone No: \"+userPreferences.getAgentPhoneNUM());\n\n\n /* mPinProfileTxt.setText(\"Pin: \"+userPreferences.getPin());\n mBank.setText(\"Bank Name: \"+userPreferences.getBank());\n mAccountName.setText(\"Acct Name: \"+userPreferences.getAccountName());\n mAccountNumber.setText(\"Acct No: \"+userPreferences.getAccountNumber());*/\n\n mProgressBarProfile.setVisibility(View.VISIBLE);\n if(personal_img_url==null) {\n Glide.with(this).load(userPreferences.getAgentProfileImg()).apply(new RequestOptions().fitCenter().circleCrop()).into(mProfilePhoto);\n }else{\n Glide.with(this).load(personal_img_url).apply(new RequestOptions().fitCenter().circleCrop()).into(mProfilePhoto);\n\n }\n mProgressBarProfile.setVisibility(View.GONE);\n }",
"@Override\r\n public void updateProfile(Profile newProfile, Profile oldProfile) {\r\n profileDAO.updateProfile(oldProfile, newProfile);\r\n }",
"String getProfile();",
"private void gotoUserProfile() {\n Intent launchUserProfile = new Intent(this, Profile.class);\n startActivity(launchUserProfile);\n }",
"private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi.getCurrentPerson(mGoogleApiClient);\n String personId = currentPerson.getId();\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n\n String personBirthday = currentPerson.getBirthday();\n int personGender = currentPerson.getGender();\n String personNickname = currentPerson.getNickname();\n\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.i(TAG, \"Id: \" + personId + \", Name: \" + personName + \", plusProfile: \" + personGooglePlusProfile + \", email: \" + email + \", Image: \" + personPhotoUrl + \", Birthday: \" + personBirthday + \", Gender: \" + personGender + \", Nickname: \" + personNickname);\n\n // by default the profile url gives\n // 50x50 px\n // image only\n // we can replace the value with\n // whatever\n // dimension we want by\n // replacing sz=X\n personPhotoUrl = personPhotoUrl.substring(0, personPhotoUrl.length() - 2) + PROFILE_PIC_SIZE;\n\n Log.e(TAG, \"PhotoUrl : \" + personPhotoUrl);\n\n Log.i(TAG, \"Finally Set UserData\");\n Log.i(TAG, \"account : \" + email + \", Social_Id : \" + personId);\n\n StringBuffer sb = new StringBuffer();\n sb.append(\"Id : \").append(personId).append(\"\\n\");\n sb.append(\"Name : \").append(personName).append(\"\\n\");\n sb.append(\"plusProfile : \").append(personGooglePlusProfile).append(\"\\n\");\n sb.append(\"Email : \").append(email).append(\"\\n\");\n sb.append(\"PhotoUrl : \").append(personPhotoUrl).append(\"\\n\");\n sb.append(\"Birthday : \").append(personBirthday).append(\"\\n\");\n sb.append(\"Gender : \").append(personGender).append(\"\\n\");\n sb.append(\"Nickname : \").append(personNickname).append(\"\\n\");\n\n tv_info.setText(sb.toString());\n\n signOutFromGplus();\n\n /** set Google User Data **/\n RegisterData.name = personName;\n RegisterData.email = email;\n RegisterData.password = \"\";\n RegisterData.source = \"google\";\n RegisterData.image = personPhotoUrl;\n\n new UserLoginAsyncTask().execute();\n } else {\n Toast.makeText(mContext, \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@POST\n @Path(\"/create\")\n @Consumes(MediaType.APPLICATION_JSON)\n public Response createUser(ProfileJson json) throws ProfileDaoException {\n Profile profile = json.asProfile();\n profile.setPassword(BCrypt.hashpw(profile.getPassword(), BCrypt.gensalt()));\n //add checking if profile doesn't exit\n api.saveProfile(profile, datastore);\n return Response\n .created(null)\n .build();\n }",
"public User editProfile(String firstName, String lastName, String username, String password, char type, char status)\n {\n return this.userCtrl.editProfile(username, password, firstName, lastName, type, status);\n }",
"private void onProfileRefresh(Profile profile) {\n if (profile == null)\n throw new IllegalStateException(\"A profile cannot be null on successful profile refresh\");\n\n boolean ownProfile = userId.equals(Login.getUserId());\n\n profile.setUserId(userId);\n if (ownProfile)\n Login.setProfile(profile);\n\n profileImage.setImageBitmap(profile.getProfileImage());\n profile.setProfileImage(null); // save memory\n nameView.setText(profile.getName());\n String address = profile.getCity() + \", \" + profile.getState();\n addressView.setText(address);\n favouriteActivityView.setText(profile.getFavouriteSport());\n\n setupBioTextView(profile);\n\n onFriendsSync(profile);\n }",
"void setUserProfile(Map<String, Object> profile);",
"public void updateCurrentTrempitUser() {\n\n // create the trempituser object\n TrempitUser currentUser = new TrempitUser();\n currentUser.setFullName(Profile.getCurrentProfile().getName());\n currentUser.setId(Long.valueOf(Profile.getCurrentProfile().getId()));\n\n // update the global variable so all activities can access the user\n globalState.setCurrentUser(currentUser);\n\n // insert the user to the server\n insertTrempitUserToServer(currentUser);\n\n Toast.makeText(this, \"logged in to facebook:\" + globalState.getCurrentUser().getFullName(), Toast.LENGTH_LONG).show();\n }",
"@Override\n\tpublic UserProfile updateUserProfileSetting(UserProfile userProfile)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}",
"public abstract String updateProfile(String sessionId, String sUserBean)\n\t\t\tthrows UserException, PermissionException, SessionException,\n\t\t\tParameterException, InfrastructureException,\n\t\t\tProfileValidationException, ProviderException;",
"@Override\n\tpublic void saveUserSettingProfile(UserProfile userProfile)\n\t\t\tthrows Exception {\n\n\t}",
"private static void insertProfile(Connection connection, String username, long id, boolean isRegistered)\n throws SQLException, ProfileKeyManagerPersistenceException {\n PreparedStatement statement =\n connection.prepareStatement(\"INSERT INTO all_user (username, user_id, registered_flag, \"\n + \"create_date, modify_date, create_user, modify_user) \"\n + \"VALUES (?, ?, ?, CURRENT, CURRENT, USER, USER)\");\n\n try {\n int idx = 1;\n statement.setString(idx++, username);\n statement.setLong(idx++, id);\n statement.setString(idx++, (isRegistered ? \"Y\" : \"N\"));\n\n if (statement.executeUpdate() < 1) {\n throw new ProfileKeyManagerPersistenceException(\"failed to insert user\");\n }\n } finally {\n closeStatement(statement);\n }\n }",
"@RequestMapping(\"/su/profile\")\n\tpublic ModelAndView suprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.addObject(\"suinfo\", suinfoDAO.findSuinfoByPrimaryKey(yourtaskuser.getUserid()));\n\t\tmav.setViewName(\"profile/userprofile.jsp\");\n\t\treturn mav;\n\t}",
"public void getProfile() {\n\n String mKey = getString(R.string.preference_name);\n SharedPreferences mPrefs = getSharedPreferences(mKey, MODE_PRIVATE);\n\n // Load the user email\n\n /*userEmail = getString(R.string.preference_key_profile_email);\n userPassword = getString(R.string.preference_key_profile_password);*/\n\n // Load the user email\n\n mKey = getString(R.string.preference_key_profile_email);\n userEmail = mPrefs.getString(mKey, \"\");\n\n // Load the user password\n\n mKey = getString(R.string.preference_key_profile_password);\n userPassword = mPrefs.getString(mKey, \"\");\n\n\n //userEmail = getString(R.string.register_email);\n //userPassword = getString(R.string.register_password);\n\n }",
"@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }",
"public void editProfile(String username, String fname, String lname, String email, String phoneno, String newpw) throws SQLException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\"); \n\t callStmt = con.prepareCall(\" {call team5.customer_updateProfile_Proc(?,?,?,?,?,?,?,?,?)}\");\n\t callStmt.setString(1,phoneno);\n\t callStmt.setString(2,email);\n\t callStmt.setString(3,fname);\n\t callStmt.setString(4,lname);\n\t callStmt.setString(5,\"Y\");\n\t callStmt.setString(6,\"Y\");\n\t callStmt.setString(7,username);\n\t callStmt.setString(8,newpw);\n\t callStmt.setInt(9,this.id);\n\t callStmt.execute();\n\t \n\t callStmt.close();\n\t }",
"public Boolean getProfile()\n {\n return profile;\n }",
"public static void createActiveUserRelatedPreferencesIfNeeds(Context context) {\r\n\t\tif (hasActiveUserId(context) == false) {\r\n\t\t\tString newUserId = generateNewUserId();\r\n\t\t\tString userConfigKey = getUserConfigFileNameKey(newUserId);\r\n\t\t\tString userDbKey = getUserDatabaseFileNameKey(newUserId);\r\n\t\t\tString userConfigFileName = getUserConfigFileName(context,\r\n\t\t\t\t\tnewUserId);\r\n\t\t\tString userDbFileName = DatabaseHelper.databaseName; // Use old db\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// file\r\n\r\n\t\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\t\tif (prefs != null) {\r\n\t\t\t\tEditor editor = prefs.edit();\r\n\t\t\t\tif (editor != null) {\r\n\t\t\t\t\teditor.putString(\"user-\" + newUserId, newUserId);\r\n\t\t\t\t\teditor.putString(userConfigKey, userConfigFileName);\r\n\t\t\t\t\teditor.putString(userDbKey, userDbFileName);\r\n\t\t\t\t\teditor.putString(PreferenceKeys.ActiveUserId, newUserId);\r\n\t\t\t\t}\r\n\r\n\t\t\t\teditor.commit();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public com.eviware.soapui.config.OAuth1ProfileConfig addNewOAuth1Profile()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.eviware.soapui.config.OAuth1ProfileConfig target = null;\n target = (com.eviware.soapui.config.OAuth1ProfileConfig)get_store().add_element_user(OAUTH1PROFILE$0);\n return target;\n }\n }",
"@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(LoginActivity.this,\n getResources().getString\n (R.string.login_wrong_combination_error)\n ,Toast.LENGTH_LONG).show();\n }\n\n else {\n // else check if a profile exists for the user, if not create one\n\n // get current user\n final FirebaseUser user = mFirebaseAuth.getCurrentUser();\n\n // Attach a listener to read the data\n databaseReference.child(user.getUid())\n .addListenerForSingleValueEvent(\n new ValueEventListener() {\n\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n User userInfo = dataSnapshot.getValue(User.class);\n\n // null make a new one\n if (userInfo == null)\n {\n userInfo = new User();\n\n // update database using user id\n databaseReference.child\n (user.getUid()).setValue(userInfo);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(LoginActivity.this,\n getResources().getString(R.string.db_error_text)\n + databaseError.getCode(),\n Toast.LENGTH_LONG).show();\n }\n });\n }\n }",
"public User getProf(String name) { return userDAO.getProfile(name); }",
"private void createGuestProfile() {\n saveData();\n signupDelegate.enableNextButton(Boolean.FALSE);\n SwingUtil.setCursor(this, java.awt.Cursor.WAIT_CURSOR);\n errorMessageJLabel.setText(getString(\"SigningUp\"));\n errorMessageJLabel.paintImmediately(0, 0, errorMessageJLabel.getWidth(),\n errorMessageJLabel.getHeight());\n try {\n getSignupHelper().createGuestProfile();\n } catch (final OfflineException ox) {\n logger.logError(ox, \"An offline error has occured.\");\n addInputError(getSharedString(\"ErrorOffline\"));\n } catch (final ReservationExpiredException rex) {\n logger.logWarning(rex, \"The username/e-mail reservation has expired.\");\n addInputError(getString(\"ErrorReservationExpired\"));\n } catch (final Throwable t) {\n logger.logFatal(t, \"An unexpected error has occured.\");\n addInputError(getSharedString(\"ErrorUnexpected\"));\n } finally {\n errorMessageJLabel.setText(\" \");\n }\n }",
"public void setProfile(Profile profile) {\n _profile = profile;\n }",
"public static void setProfile(Profile profile) {\n Login.profile = profile;\n Login.profile.setUserId(getUserId());\n }"
] | [
"0.72231776",
"0.70737636",
"0.70231605",
"0.6846502",
"0.68260354",
"0.6811891",
"0.6767163",
"0.67651266",
"0.6752338",
"0.6740364",
"0.6684093",
"0.66837704",
"0.6613709",
"0.6603142",
"0.65974087",
"0.6588782",
"0.6568502",
"0.6556082",
"0.65445155",
"0.6530236",
"0.6509741",
"0.6502071",
"0.64874125",
"0.64841145",
"0.64770925",
"0.6427633",
"0.64269674",
"0.6421581",
"0.64203185",
"0.6412629",
"0.6386068",
"0.6384409",
"0.6376099",
"0.63670814",
"0.63626444",
"0.63626444",
"0.6354282",
"0.63496935",
"0.6346009",
"0.63244426",
"0.62851566",
"0.6272826",
"0.62643266",
"0.62630814",
"0.62589675",
"0.62541085",
"0.6237306",
"0.623057",
"0.6227735",
"0.62181103",
"0.6205456",
"0.61797476",
"0.6178135",
"0.6146413",
"0.61448956",
"0.6142755",
"0.6129658",
"0.61216676",
"0.6102873",
"0.6081187",
"0.6066206",
"0.6060729",
"0.6046093",
"0.60451084",
"0.6035733",
"0.60152584",
"0.6010686",
"0.6008101",
"0.6006739",
"0.600487",
"0.6002094",
"0.5986153",
"0.59833765",
"0.59756595",
"0.5960618",
"0.5959183",
"0.5957381",
"0.5956318",
"0.5955512",
"0.59546477",
"0.5942697",
"0.59398484",
"0.5939616",
"0.59289134",
"0.5912614",
"0.59093654",
"0.5894471",
"0.5894153",
"0.5885279",
"0.58821386",
"0.58813727",
"0.5880001",
"0.58744216",
"0.5874031",
"0.58740234",
"0.58711094",
"0.5868705",
"0.58645254",
"0.5863367",
"0.585435",
"0.58533674"
] | 0.0 | -1 |
For nonexisting user profile: | public static void createProfile(String userName, String password, String ip, LoginDoctor window) {
ConnectionManager connectServer = null;
try {
connectServer = new ConnectionManager(ip);
try {
// This method tries creating the credentials, if the server doesn't allow this it will throw an exception.
// If everything goes fine it will open a window to type name and surname to create new profile.
// Then the same login window will be opened to type name and password to enter the profile.
connectServer.createProfile(userName, password);
new UserConfiguration(connectServer);
//window.profileCreated();
window.dispose();
} catch(Exception e1) {
// If the server response is not valid, the login window will display an error message saying it didn't like what it saw.
window.profileNotValid();
}
} catch (Exception e) {
/*same thing as before, if the server doesn't answer back tell the user the connection failed or something.*/
window.failedConnection();
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasProfile();",
"@Override\n\tpublic Profile getProfile(Users user) {\n\t\treturn null;\n\t}",
"@java.lang.Override\n public boolean hasProfile() {\n return profile_ != null;\n }",
"@Override\n public void checkProfileUserData() {\n mProfilePresenter.checkProfileUserData();\n }",
"@Test\n public void testGeneratedProfileFields() {\n Profile p = getProfile(BASIC_PROFILE_PATH);\n assertNotNull(\"Profile uniqueId was null\", p.getUniqueId());\n assertNotNull(\"Profile display name was null\", p.getDisplayName());\n }",
"private boolean checkIfProfileExists() {\n String profileCreatedKey = context.getString(R.string.app_name_key) + context.getString(R.string.created_profile_key);\n String profileCreated = sharedPref.getString(profileCreatedKey, \"false\");\n return Boolean.valueOf(profileCreated);\n }",
"@Override\n\tpublic UserProfile getUserSettingProfile(String userName) throws Exception {\n\t\treturn null;\n\t}",
"public UserProfile getUserProfile(String username);",
"private void createProfile(ParseUser parseUser){\n final Profile profile = new Profile();\n\n profile.setShortBio(\"\");\n profile.setLongBio(\"\");\n profile.setUser(parseUser);\n\n //default image taken from existing default user\n ParseQuery<ParseObject> query = ParseQuery.getQuery(\"Profile\");\n query.getInBackground(\"wa6q24VD5V\", new GetCallback<ParseObject>() {\n public void done(ParseObject searchProfile, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Couldn't retrieve default image\");\n e.printStackTrace();\n return;\n }\n else {\n defaultImage = searchProfile.getParseFile(\"profileImage\");\n\n if (defaultImage != null)\n profile.setProfileImage(defaultImage);\n else\n Log.d(TAG, \"Default image is null\");\n }\n }\n });\n\n profile.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 profile\");\n }\n });\n }",
"private void onProfileRefreshFail() {\n loadingBar.hideBoth();\n Toast.makeText(this, \"Failed to load profile\", Toast.LENGTH_SHORT)\n .show();\n\n swipeRefreshLayout.setRefreshing(false);\n ProfileCache.setUserCached(userId, false);\n }",
"@Override\n\tpublic UserProfile getQuickProfile(String userName) throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic UserProfile getDefaultUserProfile(String userName, String ip)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}",
"public String createUserIfNotExist(String email) throws UserNotFoundException {\n List<Profile> users= profileDao.findAll();\n for (Profile profile:users\n ) {\n if(profile.getEmail().equals(email))\n return profile.getUserId();\n }\n Profile tempProfile=new Profile();\n tempProfile.setEmail(email);\n return profileDao.save(tempProfile).getUserId();\n\n }",
"private void checkForUser(){\n if(mUserId != -1){\n return;\n }\n\n if(mPreferences == null) {\n getPrefs();\n }\n\n mUserId = mPreferences.getInt(USER_ID_KEY, -1);\n\n if(mUserId != -1){\n return;\n }\n\n //do we have any users at all?\n List<User> users = mUserDAO.getAllUsers();\n if(users.size() <= 0 ){\n User defaultUser = new User(\"din_djarin\",\"baby_yoda_ftw\");\n mUserDAO.insert(defaultUser);\n }\n }",
"@java.lang.Override\n public boolean hasProfilePictureUrl() {\n return profilePictureUrl_ != null;\n }",
"TasteProfile.UserProfile getUserProfile (String user_id);",
"public void checkForTempUsername() {\r\n\t\t// get my profile, and check for a default username\r\n\t\tUserProfile userProfile = authenticationController.getCurrentUserProfile();\r\n\t\tif (userProfile != null && DisplayUtils.isTemporaryUsername(userProfile.getUserName())) {\r\n\t\t\tgotoChangeUsernamePlace();\r\n\t\t} else {\r\n\t\t\tgoToLastPlace();\r\n\t\t}\r\n\t}",
"private User retrievePersonalProfileData() {\n if (checkIfProfileExists()) {\n return SharedPrefsUtils.convertSharedPrefsToUserModel(context);\n } else {\n return null;\n }\n }",
"String getProfile();",
"H getProfile();",
"@Override\n\tpublic void createUserProfile(User user) throws Exception {\n\n\t}",
"private void deleteProfileIfExists() throws Exception {\n String[] args = new String[] { \"-validateAndUpdateRegistry\" };\n executeCommand(serverInstallDir, \"manageprofiles\", args, serverInstallDir, \"\");\n args = new String[] { \"-listProfiles\" };\n String output = executeCommand(serverInstallDir, \"manageprofiles\", args, serverInstallDir, \"\");\n if (output.indexOf(instanceName) >= 0) {\n args = new String[] { \"-delete\", \"-profileName\", instanceName };\n executeCommand(serverInstallDir, \"manageprofiles\", args, serverInstallDir, \"Trying to clean up existing profile\");\n }\n }",
"protected Map<String, Object> getUserProfile() {\r\n\t\tTimeRecorder timeRecorder = RequestContext.getThreadInstance()\r\n\t\t\t\t\t\t\t\t\t\t\t\t .getTimeRecorder();\r\n\t\tString profileId = (String)userProfile.get(AuthenticationConsts.KEY_PROFILE_ID);\r\n\r\n\t\tSite site = Utils.getEffectiveSite(request);\r\n\t\tString siteDNSName = (site == null ? null : site.getDNSName());\r\n\r\n\t\tIUserProfileRetriever retriever = UserProfileRetrieverFactory.createUserProfileImpl(AuthenticationConsts.USER_PROFILE_RETRIEVER, siteDNSName);\r\n\t\ttry {\r\n\t\t\ttimeRecorder.recordStart(Operation.PROFILE_CALL);\r\n\t\t\tMap<String, Object> userProfile = retriever.getUserProfile(profileId,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t request);\r\n\t\t\ttimeRecorder.recordEnd(Operation.PROFILE_CALL);\r\n\t\t\treturn userProfile;\r\n\t\t} catch (UserProfileException ex) {\r\n\t\t\ttimeRecorder.recordError(Operation.PROFILE_CALL, ex);\r\n\t\t\tRequestContext.getThreadInstance()\r\n\t\t\t\t\t\t .getDiagnosticContext()\r\n\t\t\t\t\t\t .setError(ErrorCode.PROFILE001, ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}",
"Map<String, Object> getUserProfile();",
"@Override\n\tpublic long createProfile(Profile profile) {\n\t\treturn 0;\n\t}",
"boolean hasPublicProfile();",
"public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}",
"public boolean hasProfile() {\n return profileBuilder_ != null || profile_ != null;\n }",
"@Override\n\t\tpublic void onUserProfileUpdate(User arg0) {\n\t\t\t\n\t\t}",
"public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender), birthdate);\n }else{\n PersonalDataController.getInstance().create(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender));\n }\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(32), null);\n }\n GBMessage.putMessage(GBEnvironment.getInstance().getError(33), null);\n }",
"@Override\n public void loadProfileUserData() {\n mProfilePresenter.loadProfileUserData();\n }",
"@Override\n\tpublic JCRPageList getPageListUserProfile() throws Exception {\n\t\treturn null;\n\t}",
"HumanProfile getUserProfile();",
"@Override\n\tpublic Profile getProfile(long profileId) {\n\t\treturn null;\n\t}",
"public void setUserProfile(UserProfile userProfile) {this.userProfile = userProfile;}",
"public UserProfile createUserProfile(String username, UserProfile newProfile);",
"public UserProfile getUserProfile() {return userProfile;}",
"@Override\n\tpublic void updateUserProfileInfo(String name) throws Exception {\n\n\t}",
"public String getProfile();",
"private void loadUserInformation() {\n FirebaseUser user = mAuth.getCurrentUser();\n\n if (user != null) {\n if (user.getPhotoUrl() != null) {\n Glide.with(this).load(user.getPhotoUrl().toString()).into(profilePic);\n }\n if (user.getDisplayName() != null) {\n name.setText(user.getDisplayName());\n }\n\n }\n\n }",
"private void isUserExist() {\n\n if (firebaseAuth.getCurrentUser() != null) {\n\n final String user_id = firebaseAuth.getCurrentUser().getUid();\n users_database_reference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n if (dataSnapshot.hasChild(user_id)) {\n // sign in the user and go to main activity\n // Intent intent = new Intent(StartActivity.this, MainActivity.class);\n // intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(intent);\n } else {\n // go to profile page\n Intent intent = new Intent(MainActivity.this, Profile.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }",
"public static void cloneProfile(Profile profile)\n throws IOException\n {\n String newName = \n (String) JOptionPane.showInputDialog(MainFrame.getInstance(),\n \"Enter new profile name\");\n if (newName == null)\n return;\n newName = newName.trim();\n if (newName.length() == 0)\n return;\n\n // Does a profile with this name already exist?\n if (ProfileManager.getInstance().getProfile(newName) != null)\n {\n JOptionPane.showMessageDialog(MainFrame.getInstance(),\n \"A profile with that name already exists.\", \"Error\",\n JOptionPane.ERROR_MESSAGE);\n return;\n }\n \n Profile newProfile = new Profile(newName, profile.getAddress(),\n profile.getPort(), profile.getUserName(), profile.getPassword(),\n profile.getParameters());\n try\n {\n ProfileManager.getInstance().updateProfile(newProfile);\n TreePanel.getInstance().addProfile(newProfile);\n }\n catch (SQLException e)\n {\n // This should never happen.\n }\n }",
"@Override\r\n\tpublic Boolean userExist(String username) {\n\t\treturn null;\r\n\t}",
"public boolean hasProfilePictureUrl() {\n return profilePictureUrlBuilder_ != null || profilePictureUrl_ != null;\n }",
"public void editTheirProfile() {\n\t\t\n\t}",
"@Override\n\tpublic UserProfile getUserInformations(UserProfile userProfile)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}",
"public static boolean upDateProfile(String userName ,String password,String firstName,String address\r\n\t\t\t, String phone , String lastName , String email) {\n User user = new User(userName,password,firstName,lastName,email,phone,address,0);\r\n if(DatabaseMethods.update_user(user)){\r\n return true;\r\n }\r\n else{\r\n setProfile();\r\n \r\n return false;\r\n }\r\n\t\t\r\n\t}",
"private void getUserProfile() {\n mFirstname.setText(\"FirstName: \"+userPreferences.getAgentFirstName());\n mLastname.setText(\"LastName: \"+userPreferences.getAgentLastName());\n\n\n Log.i(\"username\",userPreferences.getAgentUsername());\n if(userPreferences.getAgentUsername()==null){\n mUsernameTxt.setText(\"\");\n }else if(userPreferences.getAgentUsername().equals(\"null\")){\n mUsernameTxt.setText(\"\");\n }else{\n mUsernameTxt.setText(userPreferences.getAgentUsername());\n }\n\n mEmail.setText(\"Email: \"+userPreferences.getAgentEmail());\n mPhoneNum.setText(\"Phone No: \"+userPreferences.getAgentPhoneNUM());\n\n\n /* mPinProfileTxt.setText(\"Pin: \"+userPreferences.getPin());\n mBank.setText(\"Bank Name: \"+userPreferences.getBank());\n mAccountName.setText(\"Acct Name: \"+userPreferences.getAccountName());\n mAccountNumber.setText(\"Acct No: \"+userPreferences.getAccountNumber());*/\n\n mProgressBarProfile.setVisibility(View.VISIBLE);\n if(personal_img_url==null) {\n Glide.with(this).load(userPreferences.getAgentProfileImg()).apply(new RequestOptions().fitCenter().circleCrop()).into(mProfilePhoto);\n }else{\n Glide.with(this).load(personal_img_url).apply(new RequestOptions().fitCenter().circleCrop()).into(mProfilePhoto);\n\n }\n mProgressBarProfile.setVisibility(View.GONE);\n }",
"private void composeProfile() {\n if(NetworkUtils.isConnectedToNetwork((ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE)) == false) {\n Toast.makeText(this.getApplicationContext(), \"Please check your network connection!\", Toast.LENGTH_LONG).show();\n return;\n }\n Intent i = new Intent(this, ProfileActivity.class);\n i.putExtra(\"screen_name\", (String) null);\n startActivity(i);\n }",
"@Override\n\tpublic void showProfile() {\n\t\t\n\t}",
"private static Profile getProfileFromUser(User user) {\n // First fetch the user's Profile from the datastore.\n Profile profile = ofy().load().key(\n Key.create(Profile.class, user.getUserId())).now();\n if (profile == null) {\n // Create a new Profile if it doesn't exist.\n // Use default displayName and teeShirtSize\n String email = user.getEmail();\n\n profile = new Profile(user.getUserId(),\n extractDefaultDisplayNameFromEmail(email), email, null, null, null, null);\n }\n return profile;\n }",
"private void getUserProfileImage() {\n if (!StringEmptyUtil.isEmptyString(sharedPrefManager.getImageUrl())) {\n Glide.with(Objects.requireNonNull(getApplicationContext())).load(sharedPrefManager.getImageUrl()).into(profile_image);\n } else {\n Glide.with(Objects.requireNonNull(getApplicationContext())).load(R.drawable.user_image).into(profile_image);\n\n }\n }",
"public void getProfile() {\n\n String mKey = getString(R.string.preference_name);\n SharedPreferences mPrefs = getSharedPreferences(mKey, MODE_PRIVATE);\n\n // Load the user email\n\n /*userEmail = getString(R.string.preference_key_profile_email);\n userPassword = getString(R.string.preference_key_profile_password);*/\n\n // Load the user email\n\n mKey = getString(R.string.preference_key_profile_email);\n userEmail = mPrefs.getString(mKey, \"\");\n\n // Load the user password\n\n mKey = getString(R.string.preference_key_profile_password);\n userPassword = mPrefs.getString(mKey, \"\");\n\n\n //userEmail = getString(R.string.register_email);\n //userPassword = getString(R.string.register_password);\n\n }",
"private void createGuestProfile() {\n saveData();\n signupDelegate.enableNextButton(Boolean.FALSE);\n SwingUtil.setCursor(this, java.awt.Cursor.WAIT_CURSOR);\n errorMessageJLabel.setText(getString(\"SigningUp\"));\n errorMessageJLabel.paintImmediately(0, 0, errorMessageJLabel.getWidth(),\n errorMessageJLabel.getHeight());\n try {\n getSignupHelper().createGuestProfile();\n } catch (final OfflineException ox) {\n logger.logError(ox, \"An offline error has occured.\");\n addInputError(getSharedString(\"ErrorOffline\"));\n } catch (final ReservationExpiredException rex) {\n logger.logWarning(rex, \"The username/e-mail reservation has expired.\");\n addInputError(getString(\"ErrorReservationExpired\"));\n } catch (final Throwable t) {\n logger.logFatal(t, \"An unexpected error has occured.\");\n addInputError(getSharedString(\"ErrorUnexpected\"));\n } finally {\n errorMessageJLabel.setText(\" \");\n }\n }",
"private void checkUser() {\n\t\tlog.info(\"___________checkUser\");\n\t\tList<User> adminUser = userRepository.getByAuthority(AuthorityType.ROLE_ADMIN.toString());\n\t\tif (adminUser == null || adminUser.isEmpty()) {\n\t\t\tgenerateDefaultAdmin();\n\t\t}\n\t}",
"public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}",
"UserDTO getProfile(final int userId) throws DataUnreachableException;",
"@Override\n public boolean checkExists(int userID) throws DAOException{\n\n try{\n Session session = HibernateConnectionUtil.getSession();\n UserProfile up = (UserProfile)session.get(UserProfile.class, userID);\n session.close();\n return up != null;\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Profiles)) {\n return false;\n }\n Profiles other = (Profiles) object;\n if ((this.userId == null && other.userId != null) || (this.userId != null && !this.userId.equals(other.userId))) {\n return false;\n }\n return true;\n }",
"@Override\n\tpublic UserProfile getUserProfileManagement(String userName)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic UserProfile updateUserProfileSetting(UserProfile userProfile)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}",
"@Then(\"^User should see home page with profile link$\")\n\tpublic void user_should_see_home_page_with_profile_link() throws Throwable {\n\t\twait.WaitForElement(profilepage.getywalletlink(), 60);\n\t\tprofilepage.verifyloginsuccess();\n\t\tThread.sleep(100);\n\t}",
"public User getProf(String name) { return userDAO.getProfile(name); }",
"public void loadUserProfile(AccessToken accessToken) {\n GraphRequest request = GraphRequest.newMeRequest(accessToken, new GraphRequest.GraphJSONObjectCallback() {\n public void onCompleted(JSONObject object, GraphResponse response) {\n try {\n String first_name = object.getString(\"first_name\");\n String last_name = object.getString(\"last_name\");\n String email = object.getString(\"email\");\n String str = \"https://graph.facebook.com/\" + object.getString(\"id\") + \"/picture?type=normal\";\n Intent intent = new Intent(LoginOptionActivity.this, HomeActivity.class);\n intent.putExtra(\"name\", first_name + \" \" + last_name + \"\\n\" + email);\n intent.addFlags(268468224);\n LoginOptionActivity.this.startActivity(intent);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n });\n Bundle parameters = new Bundle();\n parameters.putString(GraphRequest.FIELDS_PARAM, \"first_name,last_name,email,id\");\n request.setParameters(parameters);\n request.executeAsync();\n }",
"public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}",
"@Test\r\n public void lookProfileByNull() {\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n\r\n // A not connected user looked at member profile\r\n member.lookedBy(null);\r\n \r\n // Still no activity for member\r\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n }",
"private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String id = currentPerson.getId();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Id: \"+id+\", Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n signInTask = new AsyncTask(mBaseActivity);\n signInTask.execute(id, email, personName);\n// SharedPreferences preferences = mBaseActivity.getSharedPreferences(\"com.yathams.loginsystem\", MODE_PRIVATE);\n// preferences.edit().putString(\"email\", email).putString(\"userName\", personName).commit();\n\n } else {\n Toast.makeText(getApplicationContext(),\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onChanged(@Nullable final Profile profile) {\n userProfile = profile;\n }",
"@Test\n public void illegalProfile() {\n Properties props = new Properties();\n props.setProperty(DeploymentDescriptorConfiguration.MODULE_NAME, \"com.alipay.dal\");\n\n props.setProperty(DeploymentDescriptorConfiguration.MODULE_PROFILE, \"!\");\n assertThatThrownBy(() -> sofaModuleProfileChecker.acceptModule(SampleDeploymentDescriptor.create(props)))\n .isInstanceOf(IllegalArgumentException.class).hasMessageContaining(\"01-13001\");\n\n props.setProperty(DeploymentDescriptorConfiguration.MODULE_PROFILE, \"!!\");\n assertThatThrownBy(() -> sofaModuleProfileChecker.acceptModule(SampleDeploymentDescriptor.create(props)))\n .isInstanceOf(IllegalArgumentException.class).hasMessageContaining(\"01-13002\");\n }",
"java.lang.String getProfileURL();",
"private void setProfilePic() {\n ParseFile image = (ParseFile) user.get(User.KEY_PROFILE_PIC);\n\n if (image != null)\n Glide.with(getContext()).load(image.getUrl()).circleCrop().into(mProfilePicImageView);\n else\n Glide.with(getContext()).load(R.drawable.no_profile_pic)\n .circleCrop().into(mProfilePicImageView);\n }",
"@Override\n public boolean onProfileChanged(View view, IProfile profile, boolean current) {\n Intent intent = null;\n if (profile instanceof IDrawerItem && ((IDrawerItem) profile).getIdentifier() == IDENTIFIER_HEADER_ADD_ACCOUNT) {\n intent = new Intent(MainActivity.this, AddAccountActivity.class);\n //TODO: Save profile\n //TODO: Create profile drawer item from saved profile and show it in UI\n /*\n IProfile profileNew = new ProfileDrawerItem()\n .withNameShown(true)\n .withName(\"New Profile\")\n .withEmail(\"[email protected]\")\n .withIcon(getResources().getDrawable(R.drawable.profile_new));\n\n if (accountHeader.getProfiles() != null) {\n //we know that there are 2 setting elements. set the new profile above them\n accountHeader.addProfile(profileNew, accountHeader.getProfiles().size() - 2);\n } else {\n accountHeader.addProfiles(profileNew);\n }\n */\n } else if (profile instanceof IDrawerItem && ((IDrawerItem) profile).getIdentifier() == IDENTIFIER_HEADER_MANAGE_ACCOUNT) {\n intent = new Intent(MainActivity.this, ManageAccountActivity.class);\n //TODO: update the UI\n }else if(profile instanceof IDrawerItem && ((IDrawerItem) profile).getIdentifier() == IDENTIFIER_USER) {\n Toast.makeText(sApplicationContext, \"The User\", Toast.LENGTH_SHORT).show();\n SharedPreferences sp = sApplicationContext.getSharedPreferences(PREF_NAME, MODE_PRIVATE);\n String currentUserUUIDString = sp.getString(PREF_CURRENT_USER_UUID, null);\n if(((UserProfile)profile).getId().toString().equalsIgnoreCase(currentUserUUIDString)){\n Toast.makeText(sApplicationContext, \"SAME User\", Toast.LENGTH_SHORT).show();\n //TODO:\n }else{\n Toast.makeText(sApplicationContext, \"Different User\", Toast.LENGTH_SHORT).show();\n //TODO:\n SharedPreferences.Editor spe = sp.edit();\n spe.putString(PREF_CURRENT_USER_UUID, ((UserProfile)profile).getId().toString());\n spe.commit();\n\n UpdateContentUI();\n }\n }\n\n if(intent != null){\n MainActivity.this.startActivity(intent);\n }\n\n //false if you have not consumed the event And it should close the drawer\n return false;\n }",
"public long registerUserProfile(User user);",
"private void callUpdateProfile() {\n String userStr = CustomSharedPreferences.getPreferences(Constants.PREF_USER_LOGGED_OBJECT, \"\");\n Gson gson = new Gson();\n User user = gson.fromJson(userStr, User.class);\n LogUtil.d(\"QuyNT3\", \"Stored profile:\" + userStr +\"|\" + (user != null));\n //mNameEdt.setText(user.getName());\n String id = user.getId();\n String oldPassword = mOldPassEdt.getText().toString();\n String newPassword = mNewPassEdt.getText().toString();\n String confirmPassword = mConfirmPassEdt.getText().toString();\n String fullName = mNameEdt.getText().toString();\n String profileImage = user.getProfile_image();\n UpdateUserProfileRequest request = new UpdateUserProfileRequest(id, fullName, profileImage,\n oldPassword, newPassword, confirmPassword);\n request.setListener(callBackEvent);\n new Thread(request).start();\n }",
"@Override\n\tpublic boolean isUserExist(StudentForm student) {\n\t\treturn false;\n\t}",
"public Boolean getProfile()\n {\n return profile;\n }",
"@Override\n\tpublic boolean updateProfile(long profileId, Profile profile) {\n\t\treturn false;\n\t}",
"public UserProfile() {}",
"private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi.getCurrentPerson(mGoogleApiClient);\n String personId = currentPerson.getId();\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n\n String personBirthday = currentPerson.getBirthday();\n int personGender = currentPerson.getGender();\n String personNickname = currentPerson.getNickname();\n\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.i(TAG, \"Id: \" + personId + \", Name: \" + personName + \", plusProfile: \" + personGooglePlusProfile + \", email: \" + email + \", Image: \" + personPhotoUrl + \", Birthday: \" + personBirthday + \", Gender: \" + personGender + \", Nickname: \" + personNickname);\n\n // by default the profile url gives\n // 50x50 px\n // image only\n // we can replace the value with\n // whatever\n // dimension we want by\n // replacing sz=X\n personPhotoUrl = personPhotoUrl.substring(0, personPhotoUrl.length() - 2) + PROFILE_PIC_SIZE;\n\n Log.e(TAG, \"PhotoUrl : \" + personPhotoUrl);\n\n Log.i(TAG, \"Finally Set UserData\");\n Log.i(TAG, \"account : \" + email + \", Social_Id : \" + personId);\n\n StringBuffer sb = new StringBuffer();\n sb.append(\"Id : \").append(personId).append(\"\\n\");\n sb.append(\"Name : \").append(personName).append(\"\\n\");\n sb.append(\"plusProfile : \").append(personGooglePlusProfile).append(\"\\n\");\n sb.append(\"Email : \").append(email).append(\"\\n\");\n sb.append(\"PhotoUrl : \").append(personPhotoUrl).append(\"\\n\");\n sb.append(\"Birthday : \").append(personBirthday).append(\"\\n\");\n sb.append(\"Gender : \").append(personGender).append(\"\\n\");\n sb.append(\"Nickname : \").append(personNickname).append(\"\\n\");\n\n tv_info.setText(sb.toString());\n\n signOutFromGplus();\n\n /** set Google User Data **/\n RegisterData.name = personName;\n RegisterData.email = email;\n RegisterData.password = \"\";\n RegisterData.source = \"google\";\n RegisterData.image = personPhotoUrl;\n\n new UserLoginAsyncTask().execute();\n } else {\n Toast.makeText(mContext, \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"No user with id \" + this.id + \" could be found in our system\";\n\t}",
"@Test\r\n public void lookProfileByOwner() {\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n\r\n // Our member looked at his own profile\r\n member.lookedBy(member);\r\n \r\n // Still no activity for member\r\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n }",
"@objid (\"6680b948-597e-4df9-b9a2-de8dc499acb3\")\n void setOwnerProfile(Profile value);",
"private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n\n Toast.makeText(context, personName + \"\\n\" + email, Toast.LENGTH_SHORT).show();\n\n /*txtName.setText(personName);\n txtEmail.setText(email);*/\n\n // by default the profile url gives 50x50 px image only\n // we can replace the value with whatever dimension we want by\n // replacing sz=X\n /*personPhotoUrl = personPhotoUrl.substring(0,\n personPhotoUrl.length() - 2)\n + PROFILE_PIC_SIZE;\n\n new LoadProfileImage(imgProfilePic).execute(personPhotoUrl);*/\n\n } else {\n Toast.makeText(context,\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}",
"@When(\"^When user navigates to profile page$\")\n\tpublic void when_user_navigates_to_profile_page() throws Throwable {\n\t\twait.WaitForElement(reviewConfirmationPageObjects.getmuserlink(), 60);\n\t\treviewConfirmationPageObjects.clickonprofile();\n\t}",
"private int userAlreadyPresent() {\n System.out.printf(\"%s%n%s%n%s%n%s%n\", Notifications.getMessage(\"ERR_USER_ALREADY_PRESENT\"), Notifications.getMessage(\"SEPARATOR\"), Notifications.getMessage(\"PROMPT_PRESENT_USER_MULTIPLE_CHOICE\"), Notifications.getMessage(\"SEPARATOR\"));\n\n switch(insertInteger(1, 3)) {\n case 1:\n System.out.printf(\"%s %s%n\", Notifications.getMessage(\"MSG_EXIT_WITHOUT_SAVING\"), Notifications.getMessage(\"MSG_MOVE_TO_LOGIN\"));\n return -1;\n case 2:\n System.out.println(Notifications.getMessage(\"PROMPT_MODIFY_FIELDS\"));\n return 1;\n default:\n return 0;\n }\n }",
"@Override\n public String getProfilePhoto(String userId) throws Exception {\n return null;\n }",
"public void removeProfile(){\n Database db = Database.getInstance(context);\n db.getWritableDatabase().delete(PROFILE_TABLE, null, null);\n }",
"@Override\n @SuppressWarnings(\"unchecked\")\n public boolean checkExists(String username) throws DAOException{\n \n try{\n Session session = HibernateConnectionUtil.getSession();\n \n Criteria crit = session.createCriteria(UserProfile.class);\n crit.add(Restrictions.eq(\"username\", username));\n List<UserProfile> userList = crit.list();\n session.close();\n return !userList.isEmpty();\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n\n }",
"private String getActiveProfile() {\r\n String[] profiles = env.getActiveProfiles();\r\n String activeProfile = \"add\";\r\n if (profiles != null && profiles.length > 0) {\r\n activeProfile = profiles[0];\r\n }\r\n System.out.println(\"===== The active profile is \" + activeProfile + \" =====\");\r\n return(activeProfile);\r\n }",
"private void addProfile(String inputName) {\n \tif (! inputName.equals(\"\")) {\n\t\t\t///Creates a new profile and adds it to the database if the inputName is not found in the database\n \t\tif (database.containsProfile(inputName)) {\n \t\t\tlookUp(inputName);\n \t\t\tcanvas.showMessage(\"Profile with name \" + inputName + \" already exist.\");\n \t\t\treturn;\n \t\t}\n\t\t\tprofile = new FacePamphletProfile (inputName);\n\t\t\tdatabase.addProfile(profile);\n\t\t\tcurrentProfile = database.getProfile(inputName);\n \t\tcanvas.displayProfile(currentProfile);\n\t\t\tcanvas.showMessage(\"New profile created.\");\n\t\t\t\n \t}\n\t\t\n\t}",
"@java.lang.Override\n public boolean hasPublicProfile() {\n return publicProfile_ != null;\n }",
"public boolean createUser(UserProfile userProfile) {\n\t\tmongoTemplate.insert(userProfile, \"UserProfile_Details\");\n\t\treturn true;\n\t}",
"private void addProfile(ProfileInfo profileInfo)\r\n\t{\r\n\t\taddProfile(profileInfo.getProfileName(), \r\n\t\t\t\tprofileInfo.getUsername(), \r\n\t\t\t\tprofileInfo.getServer(),\r\n\t\t\t\tprofileInfo.getPort());\r\n\t}",
"@Override\n\tpublic void onUserProfileUpdate(User updatedUser) {\n\n\t}",
"Profile getProfile( String profileId );",
"private void onProfileRefresh(Profile profile) {\n if (profile == null)\n throw new IllegalStateException(\"A profile cannot be null on successful profile refresh\");\n\n boolean ownProfile = userId.equals(Login.getUserId());\n\n profile.setUserId(userId);\n if (ownProfile)\n Login.setProfile(profile);\n\n profileImage.setImageBitmap(profile.getProfileImage());\n profile.setProfileImage(null); // save memory\n nameView.setText(profile.getName());\n String address = profile.getCity() + \", \" + profile.getState();\n addressView.setText(address);\n favouriteActivityView.setText(profile.getFavouriteSport());\n\n setupBioTextView(profile);\n\n onFriendsSync(profile);\n }",
"public String getProfile() {\n return profile;\n }",
"public Profile getProfile(String name)\n\t{\n\t\tif(profiles.containsKey(name))\n\t\t{\n\t\t\tSystem.err.println(\"No profile named \"+name);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\treturn profiles.get(name);\n\t}",
"public void startProfiles() {\n int currentUserId = getCurrentUserId();\n if (ActivityManagerDebugConfig.DEBUG_MU) {\n Slog.i(\"ActivityManager\", \"startProfilesLocked\");\n }\n List<UserInfo> profiles = this.mInjector.getUserManager().getProfiles(currentUserId, false);\n List<UserInfo> profilesToStart = new ArrayList<>(profiles.size());\n for (UserInfo user : profiles) {\n if ((user.flags & 16) == 16 && user.id != currentUserId && !user.isQuietModeEnabled()) {\n profilesToStart.add(user);\n } else if (user.id != currentUserId && user.isClonedProfile()) {\n Slog.i(\"ActivityManager\", \"startProfilesLocked clone profile: \" + user);\n profilesToStart.add(user);\n }\n }\n int profilesToStartSize = profilesToStart.size();\n int i = 0;\n while (i < profilesToStartSize) {\n startUser(profilesToStart.get(i).id, false);\n i++;\n }\n if (i < profilesToStartSize) {\n Slog.w(\"ActivityManager\", \"More profiles than MAX_RUNNING_USERS\");\n }\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tprotected User syncVAPUser() throws UniquePropertyValueConflictException,\r\n\t\t\t\t\t\t\t\tEntityPersistenceException {\r\n\t\t// append all external user profile retrieved from UPS/Persona\r\n\t\tuserProfile.putAll(getUserProfile());\r\n\r\n\t\tmapUserProfile2SSOUser();\r\n\t\tSet groups = getUserGroups();\r\n\t\tgroups.addAll(getLocaleGroups());\r\n\t\tssoUser.setGroups(groups);\r\n\r\n\t\t// Retrieve user from Vignette.\r\n\t\tUser vapUser = AuthenticatorHelper.retrieveUserByProperty(AuthenticationConsts.PROPERTY_PROFILE_ID,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ssoUser.getProfileId());\r\n\r\n\t\t// If user has not been created in Vignette, then create this user\r\n\t\tif (vapUser == null) {\r\n\t\t\t// If employee number doesn't exist at the beginning, email will\r\n\t\t\t// be instead of profile id, so later, when employee number is\r\n\t\t\t// assigned,\r\n\t\t\t// the previous email based user should be removed from vignette.\r\n\t\t\tUser emailUser = AuthenticatorHelper.retrieveUserByProperty(AuthenticationConsts.PROPERTY_PROFILE_ID,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tssoUser.getEmail());\r\n\t\t\tif (emailUser != null) {\r\n\t\t\t\temailUser.delete();\r\n\t\t\t}\r\n\r\n\t\t\t// For CR #961, if the incoming user has the different profile id but same user name as an existing\r\n\t\t\t// account in Vignette database, delete the existing account and create a new one.\r\n\t\t\tUser sameIdUser = AuthenticatorHelper.retrieveUserByProperty(AuthenticationConsts.PROPERTY_USER_NAME_ID,\r\n\t\t\t\t\tssoUser.getUserName());\r\n\t\t\tif (sameIdUser != null && isAllowedForDelete(sameIdUser)) {\r\n\t\t\t\tLOG.info(\"Found an existing user in Vignette DB with same user name but different profile id, now re-creating this user\"\r\n\t\t\t\t\t\t+ ssoUser.getUserName());\r\n\t\t\t\tsameIdUser.delete();\r\n\t\t\t} else {\r\n\t\t\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\t\t\tLOG.debug(\"Not found this user in Vignette DB, now creating this user\"\r\n\t\t\t\t\t\t\t+ ssoUser.getUserName());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvapUser = createVAPUser();\r\n\t\t} else { // Try to update user info if needed\r\n\t\t\t// For CR #961, if the incoming user has the different profile id but same user name as an existing\r\n\t\t\t// account in Vignette database, delete the existing account and then perform the update.\r\n\t\t\tUser sameIdUser = AuthenticatorHelper.retrieveUserByProperty(AuthenticationConsts.PROPERTY_USER_NAME_ID,\r\n\t\t\t\t\tssoUser.getUserName());\r\n\t\t\tif (sameIdUser != null) {\r\n\t\t\t\tString sameIdUserProfileId = (String) sameIdUser.getProperty(AuthenticationConsts.PROPERTY_PROFILE_ID);\r\n\t\t\t\tif (!sameIdUserProfileId.equals(ssoUser.getProfileId()) && isAllowedForDelete(sameIdUser)) {\r\n\t\t\t\t\tLOG.info(\"Found an existing user in Vignette DB with same user name but different profile id, now deleting this user\"\r\n\t\t\t\t\t\t\t+ ssoUser.getUserName());\r\n\t\t\t\t\tsameIdUser.delete();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvapUser = updateVAPUser(vapUser);\r\n\t\t}\r\n\t\treturn vapUser;\r\n\t}"
] | [
"0.6673545",
"0.6621149",
"0.6585631",
"0.65516645",
"0.6507282",
"0.6497781",
"0.6481532",
"0.64391667",
"0.64025056",
"0.6297949",
"0.62939525",
"0.62709254",
"0.6249673",
"0.62488693",
"0.6248055",
"0.61866003",
"0.6157738",
"0.6127064",
"0.6103655",
"0.60874367",
"0.6086099",
"0.6056682",
"0.60215056",
"0.60160744",
"0.6013556",
"0.5959616",
"0.5944738",
"0.59432185",
"0.59275246",
"0.5926196",
"0.591977",
"0.59160966",
"0.5911844",
"0.59048086",
"0.5894399",
"0.5890223",
"0.5887872",
"0.5879336",
"0.585389",
"0.5847715",
"0.5838082",
"0.58318925",
"0.58306056",
"0.5822147",
"0.5814641",
"0.58145314",
"0.5811124",
"0.5808145",
"0.58064824",
"0.5803451",
"0.57913965",
"0.5787116",
"0.57776165",
"0.57706165",
"0.5770589",
"0.57672614",
"0.57669723",
"0.57614774",
"0.574206",
"0.574019",
"0.5739447",
"0.57360715",
"0.5731238",
"0.57220995",
"0.5720055",
"0.56998855",
"0.56901336",
"0.5685758",
"0.5685276",
"0.56836647",
"0.56805444",
"0.5679086",
"0.56763417",
"0.56704086",
"0.5668784",
"0.56613123",
"0.5660471",
"0.5654375",
"0.56531537",
"0.5650941",
"0.5646115",
"0.5644897",
"0.5640951",
"0.56373507",
"0.56368405",
"0.5636047",
"0.5623671",
"0.562092",
"0.5617693",
"0.56111515",
"0.5606298",
"0.5595906",
"0.55945075",
"0.5586537",
"0.558241",
"0.55810875",
"0.55809647",
"0.55752414",
"0.55690336",
"0.55682546",
"0.556543"
] | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_home, container, false);
unbinder = ButterKnife.bind(this, view);
mDetector = new ConnectionDetector(getActivity());
cvHomeWork.setOnClickListener(this);
cvBehaviour.setOnClickListener(this);
/* SliderImageAdapter imageAdapter = new SliderImageAdapter(getActivity());
viewPager.setAdapter(imageAdapter);
dot1.setViewPager(viewPager);*/
check_attendance.setOnClickListener(this);
vcAttendance.setOnClickListener(this);
cvUpcoming.setOnClickListener(this);
vCResult.setOnClickListener(this);
/*//For First Slider Timmer
TimerTask timerTask1 = new TimerTask() {
@Override
public void run() {
viewPager.post(new Runnable() {
@Override
public void run() {
viewPager.setCurrentItem((viewPager.getCurrentItem() + 1) % 4);
}
});
}
};
timer1 = new Timer();
timer1.schedule(timerTask1, 3400, 3400);*/
CallService();
checkLocationService();
CallTeacherbyIdService();
CallExamName();
CallbannerService();
currentTime = Calendar.getInstance().getTime();
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy", Locale.getDefault());
SimpleDateFormat time = new SimpleDateFormat("HH:MM", Locale.getDefault());
String currentDateandTime = sdf.format(new Date());
currenttime = time.format(new Time(currentTime.getTime()));
System.out.println("currentTime::::::" + currentTime);
todaysdate.setText(currentDateandTime);
System.out.println("formateddate::::::" + currentDateandTime);
System.out.println("formatedtime::::::" + currenttime);
return view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}",
"@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }",
"protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}",
"@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }"
] | [
"0.6740084",
"0.6724855",
"0.6721061",
"0.669875",
"0.6690866",
"0.6688299",
"0.66871583",
"0.6685089",
"0.6676965",
"0.66749275",
"0.6666751",
"0.66662604",
"0.6664662",
"0.6660371",
"0.6653889",
"0.66494936",
"0.6642919",
"0.6638222",
"0.66376024",
"0.6634041",
"0.6625364",
"0.662052",
"0.66171074",
"0.6608666",
"0.6597055",
"0.6593528",
"0.65857065",
"0.6584925",
"0.6574016",
"0.6572048",
"0.6569487",
"0.65692663",
"0.6568774",
"0.65681714",
"0.6564867",
"0.6553995",
"0.65534616",
"0.6543987",
"0.65423656",
"0.6541335",
"0.6538488",
"0.6537051",
"0.6536358",
"0.6535173",
"0.6532997",
"0.65328467",
"0.65313554",
"0.6528864",
"0.65278983",
"0.65261745",
"0.6524924",
"0.6524231",
"0.652326",
"0.65229994",
"0.6518273",
"0.651362",
"0.65127337",
"0.65126544",
"0.65125155",
"0.65110034",
"0.6510715",
"0.65097964",
"0.65091705",
"0.6508564",
"0.65082407",
"0.65027887",
"0.65019786",
"0.65013415",
"0.6501044",
"0.6497672",
"0.6494031",
"0.64925015",
"0.6490162",
"0.6488267",
"0.64877325",
"0.6487593",
"0.6487242",
"0.64867294",
"0.6486641",
"0.64842254",
"0.64839804",
"0.6482437",
"0.64820856",
"0.64819664",
"0.6480692",
"0.64795756",
"0.64770675",
"0.6476404",
"0.64762866",
"0.6475034",
"0.6473981",
"0.6471452",
"0.6471227",
"0.64707255",
"0.6469712",
"0.6467403",
"0.6466458",
"0.64627796",
"0.6462479",
"0.6461928",
"0.6461686"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 1) {
if (resultCode == Activity.RESULT_OK) {
Uri selectedFileURI = data.getData();
File file = new File(selectedFileURI.getPath().toString());
Log.d("", "File :::::::: " + file.getName());
//CallUploadResults();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO: Return the communication channel to the service. | @Override
public IBinder onBind(Intent intent) {
throw new UnsupportedOperationException("Not yet implemented");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Channel channel() {\n return channel;\n }",
"public IChannel getChannel() {\n\t\treturn message.getChannel();\n\t}",
"SocketChannel getChannel();",
"EzyChannel getChannel();",
"public Channel getChannel()\n {\n return channel;\n }",
"java.lang.String getChannel();",
"protected Channel getChannel()\n {\n return mChannel;\n }",
"@Override\n public int getChannel()\n {\n return channel;\n }",
"public SocketChannel getChannel() {\n return channel;\n }",
"public Channel getChannel()\n\t{\n\t\treturn channel;\n\t}",
"public Channel getChannel() {\n return channel;\n }",
"private ManagedChannel getManagedChannel() {\n return ManagedChannelBuilder.forAddress(\"localhost\", mGrpcPortNum)\n .usePlaintext()\n .build();\n }",
"public Channel getChannel() {\r\n\t\treturn channel;\r\n\t}",
"public int GetChannel();",
"public ChannelManager getChannelManager() {\n return channelMgr;\n }",
"public String getChannel() {\r\n return channel;\r\n }",
"public String getChannel() {\n return channel;\n }",
"public Channel getChannel() throws ConnectException\n {\n return getChannel(null);\n }",
"public Object getCommunicationChannel()\r\n\t\t\tthrows PersistenceMechanismException {\n\t\treturn null;\r\n\t}",
"public Channel channel()\r\n/* 36: */ {\r\n/* 37: 68 */ return this.channel;\r\n/* 38: */ }",
"public String getChannel() {\r\n\t\treturn this.channel;\r\n\t}",
"private SocketChannel getChannel(){\n if ( key == null ) {\n return getSocket().getChannel();\n } else {\n return (SocketChannel)key.channel();\n }\n }",
"public String getChannel() {\n\t\treturn channel;\n\t}",
"public String getChannel() {\n\t\treturn channel;\n\t}",
"public int getChannel() {\n return channel;\n }",
"public interface Channel\r\n{\r\n /**\r\n * Get a duplex connection for this channel. This method must be called for each request-response message exchange.\r\n * @param msgProps message specific properties\r\n * @param xmlOptions XML formatting options\r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n DuplexConnection getDuplex(MessageProperties msgProps, XmlOptions xmlOptions) throws IOException, \r\n WsConfigurationException;\r\n \r\n /**\r\n * Get a send-only connection for this channel. This method must be called for each message to be sent without a\r\n * response.\r\n * @param msgProps message specific properties\r\n * @param xmlOptions XML formatting options\r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n OutConnection getOutbound(MessageProperties msgProps, XmlOptions xmlOptions) throws IOException, \r\n WsConfigurationException;\r\n \r\n /**\r\n * Get a receive-only connection for this channel. This method must be called for each message to be received, and\r\n * will wait for a message to be available before returning.\r\n * \r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n InConnection getInbound() throws IOException, WsConfigurationException;\r\n \r\n /**\r\n * Close the channel. Implementations should disconnect and free any resources allocated to the channel.\r\n * @throws IOException on I/O error\r\n */\r\n void close() throws IOException;\r\n}",
"public int getChannel() {\r\n\t\treturn channel;\r\n\t}",
"public Byte getChannel() {\n return channel;\n }",
"public SocketChannel getChannel() { return null; }",
"public ChannelFuture getChannelFuture() {\n return channelFuture;\n }",
"public interface ChannelsService {\n\n /**\n * Gets the Facebook data-ref to create send to messenger button.\n *\n * @param callback Callback with the result.\n */\n void createFbOptInState(@Nullable Callback<ComapiResult<String>> callback);\n }",
"private static ManagedChannel getManagedChannel(int port) {\n return ManagedChannelBuilder.forAddress(\"localhost\", port)\n .usePlaintext(true)\n .build();\n }",
"protected SocketChannel getSocket() {\n\t\treturn channel;\n\t}",
"public interface MessagingService {\n\n /**\n * Checks whether message receivers are registered for this channel.\n * \n * @param ccid the channel id\n * @return <code>true</code> if there are message receivers on this channel,\n * <code>false</code> if not.\n */\n boolean hasMessageReceiver(String ccid);\n\n /**\n * Passes the message to the registered message receiver.\n * \n * @param ccid the channel to pass the message on\n * @param serializedMessage the message to send (serialized SMRF message)\n */\n void passMessageToReceiver(String ccid, byte[] serializedMessage);\n\n /**\n * Check whether the messaging component is responsible to send messages on\n * this channel.<br>\n * \n * In scenarios with only one messaging component, this will always return\n * <code>true</code>. In scenarios in which channels are assigned to several\n * messaging components, only the component that the channel was assigned\n * to, returns <code>true</code>.\n * \n * @param ccid\n * the channel ID or cluster controller ID, respectively.\n * @return <code>true</code> if the messaging component is responsible for\n * forwarding messages on this channel, <code>false</code>\n * otherwise.\n */\n boolean isAssignedForChannel(String ccid);\n\n /**\n * Check whether the messaging component was responsible before but the\n * channel has been assigned to a new messaging component in the mean time.\n * \n * @param ccid the channel id\n * @return <code>true</code> if the messaging component was responsible\n * before but isn't any more, <code>false</code> if it either never\n * was responsible or still is responsible.\n */\n boolean hasChannelAssignmentMoved(String ccid);\n}",
"org.apache.drill.exec.proto.UserBitShared.RpcChannel getChannel();",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\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 channel_ = s;\n return s;\n }\n }",
"public final int getChannel() {\n return device.getChannel();\n }",
"public String getChannelName()\r\n\t{\r\n\t\treturn this.sChannelName;\r\n\t}",
"public ChannelLogger getChannelLogger() {\n return this.channelLogger;\n }",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\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 channel_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\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 channel_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public NotificationsChannel getChannel(String channelId) throws Exception;",
"java.lang.String getChannelName();",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\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 if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public TextChannel getSupportChannel() { return supportChannel; }",
"public ChannelLocator getChannelLocator();",
"com.google.protobuf.ByteString\n getChannelBytes();",
"private SmartCardChannel getChannel() throws UsbDeviceException, NotAvailableUSBDeviceException{\n\t\tif(this.channel != null){\n\t\t\treturn this.channel;\n\t\t}\n\t\tif(getUsbInterface() != null){\n\t\t\tif (!getUsbDeviceConnection().claimInterface(getUsbInterface(), true)) {\n\t\t\t\tthrow new NotAvailableUSBDeviceException(\"Imposible acceder al interfaz del dispositivo USB\"); //$NON-NLS-1$\n\t\t\t}\n\t\t\tthis.channel = new SmartCardChannel(getUsbDeviceConnection(), getUsbInterface());\n\t\t\treturn this.channel;\n\t\t}\n\t\tthrow new UsbDeviceException(\"usbInterface cannot be NULL\"); //$NON-NLS-1$\n\t}",
"public String getChannel() {\n if(this.isRFC2812())\n return this.getNumericArg(1);\n else\n return this.getNumericArg(0);\n }",
"@PreAuthorize(\"hasRole('superman')\")\n\tpublic abstract Channel getChannel(String name);",
"public interface Channels {\n \n public void createChannel();\n\n}",
"public int getChannelId( ) {\r\n return channelId;\r\n }",
"public String getChannelId()\n {\n return channelId;\n }",
"public Channel method_4090() {\n return null;\n }",
"public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\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 channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Override\n\tpublic int getChannel() {\n\t\treturn super.getDeviceID();\n\t}",
"public interface ChannelServiceI {\r\n Channel createChannel(Channel channel);\r\n\r\n int updateChannelUser(int id);\r\n\r\n int minusChannelUser(int id);\r\n\r\n List<Channel> getChannelPage(Channel channel);\r\n\r\n int count();\r\n\r\n Channel getChannel(String channelToken);\r\n\r\n List<Channel> getUserChannel(Channel channel);\r\n\r\n int deleteUser(Integer id);\r\n\r\n List<Channel> getUserChannelTotal(Channel channel);\r\n\r\n int updateChannel(Channel channel);\r\n}",
"protected Channel connect() {\n\t\t\tif (channel == null) {\n\t\t\t\tinit();\n\t\t\t}\n\t\t\tSystem.out.println(\"channel === \"+channel);\n\t\t\tif (channel.isDone() && channel.isSuccess())\n\t\t\t\treturn channel.channel();\n\t\t\telse\n\t\t\t\tthrow new RuntimeException(\"Not able to establish connection to server\");\n\t\t}",
"public abstract ManagedChannelBuilder<?> delegate();",
"public io.grpc.channelz.v1.Channel getChannel(int index) {\n if (channelBuilder_ == null) {\n return channel_.get(index);\n } else {\n return channelBuilder_.getMessage(index);\n }\n }",
"public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"java.lang.String getChannelToken();",
"java.lang.String getChannelToken();",
"public String getChannelId()\r\n\t{\r\n\t\treturn this.sChannelId;\r\n\t}",
"String getServerConnectionChannelName();",
"public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\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 channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Bean\n\tpublic DirectChannel requestChooserOutputChannel() {\n\t\treturn MessageChannels.direct().get();\n\t}",
"public ManagedChannelBuilder<?> delegate() {\n return this.delegateBuilder;\n }",
"@Override\n public ScheduledExecutorService getSchedExecService() {\n return channelExecutor;\n }",
"@objid (\"1bb2731c-131f-497d-9749-1f4f1e705acb\")\n Link getChannel();",
"private ManagedChannel emulatedPubSubChannel() {\n if (!useEmulator) {\n throw new RuntimeException(\"You shouldn't be calling this when using the real \"\n + \"(non-emulator) implementation\");\n }\n String hostport = System.getenv(\"PUBSUB_EMULATOR_HOST\");\n return ManagedChannelBuilder.forTarget(hostport).usePlaintext().build();\n }",
"public String getChannelId() {\n return channelId;\n }",
"public Channel method_4112() {\n return null;\n }",
"public Channel method_4121() {\n return null;\n }",
"public SodiumChannel getSodiumChannel() {\n\t\t\treturn sodiumChannel;\n\t\t}",
"public interface ChannelManager {\n int createChannel(String channel, long ttlInSeconds);\n int publishToChannel(String channel, String msg);\n}",
"public interface ChannelConnection {\n public Channel getChannel();\n public Connector getConnector();\n}",
"public io.grpc.channelz.v1.Channel getChannel(int index) {\n return channel_.get(index);\n }",
"public ChannelType getChannelType() {\n return type;\n }",
"@Override\n\tprotected void channelRead0(ChannelHandlerContext ctx, WsClientMessage msg) throws Exception {\n\t}",
"public interface ChatPlayerService extends PlayerService, Chatter\n{\n /**\n * Sets the player's ChatTarget focus.\n * \n * @param focus The new ChatTarget to focus\n */\n void setFocus( ChatTarget focus );\n \n /**\n * Gets the player's current focus.\n * \n * @return The channel the player has focused\n */\n ChatTarget getFocus();\n \n /**\n * Gets the player's BaseComponent name.\n * \n * @return The player's BaseComponent name.\n */\n BaseComponent getComponentName();\n \n /**\n * Gets the ChatManagerImpl.\n * \n * @return The ChatManagerImpl instance\n */\n ChatManager getChatManager();\n \n /**\n * Gets the PrivateMessageTarget from the last inbound PM.\n * \n * @return The PrivateMessageTarget from the last PM received\n */\n PrivateMessageTarget getLastInboundWhisperTarget();\n \n /**\n * Sets the most recent inbound PM's PrivateMessageTarget.\n * \n * @param lastInboundWhisperTarget The new target.\n * @return This ChatPlayerService object.\n */\n ChatPlayerService setLastInboundWhisperTarget( PrivateMessageTarget lastInboundWhisperTarget );\n \n /**\n * Gets a formatted message to show all of the channels the\n * player is currently in.\n * \n * @return A formatted message showing the channels the player is in.\n */\n BaseComponent[] getChannelsJoinedMessage();\n}",
"public String getSubChannel() {\r\n\t\treturn this.subChannel;\r\n\t}",
"public String getChannelId() {\n\t\treturn channelId;\n\t}",
"public ReadableByteChannel getByteChannel() throws IOException {\n InputStream source = getInputStream();\n \n if(source != null) {\n return Channels.newChannel(source);\n }\n return null;\n }",
"public DmaChannel getChannelAt(int i);",
"public interface MessageInputChannel extends\r\n Channel<MessageInput, MessageInputChannelAPI>, OneDimensional, MessageCallback {\r\n\r\n}",
"public int getChannelType( ) {\r\n return 1;\r\n }",
"public interface IRemoteMessageService {\n\n void unsubscribeToMessage(UnSubscribeToMessage cmd);\n\n /**\n * Sets a message element to a specified value\n */\n void setElementValue(SetElementValue cmd);\n\n void zeroizeElement(ZeroizeElement cmd);\n\n /**\n * Notifies service to send message updates to the specified ip address\n */\n SubscriptionDetails subscribeToMessage(SubscribeToMessage cmd);\n\n Set<? extends DataType> getAvailablePhysicalTypes();\n\n boolean startRecording(RecordCommand cmd);\n\n InetSocketAddress getRecorderSocketAddress();\n\n InetSocketAddress getMsgUpdateSocketAddress();\n\n void stopRecording();\n\n void terminateService();\n\n void reset();\n\n void setupRecorder(IMessageEntryFactory factory);\n\n public Map<String, Throwable> getCancelledSubscriptions();\n}",
"@Test\n\tpublic void testChannel() {\n\t\tString requestXml =\n\t\t\t\t\"<FahrenheitToCelsius xmlns=\\\"http://www.w3schools.com/webservices/\\\">\" +\n\t\t\t\t\" <Fahrenheit>55</Fahrenheit>\" +\n\t\t\t\t\"</FahrenheitToCelsius>\";\n\n\t\t// Create the Message object\n\t\tMessage<String> message = MessageBuilder.withPayload(requestXml).build();\n\n\t\t// Send the Message to the handler's input channel\n\t\t//MessageChannel channel = channelResolver.resolveChannelName(\"fahrenheitChannel\");\n\t\tchannel.send(message);\n\t}",
"public Message getMessageWizardChannel() {\n\t\tMessage temp = null;\n\t\t\n\t\ttry {\n\t\t\t//se ia mesajul din buffer\n\t\t\ttemp = bufferWizardChannel.take();\t\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn temp;\n\t\t\n\t}",
"public MessageChannel getGameChannel() {\r\n\t\treturn gameChannel;\r\n\t}",
"public Message getMessageWizardChannel() {\n\t\tMessage msg1=null;\n\t\ttry{\n\t\t\tmsg1=chann1.take();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn msg1;\n\t}",
"void start(Channel channel, Object msg);",
"@Override\n\tpublic String getChannelId()\n\t{\n\t\treturn null;\n\t}",
"public String getChannelCode() {\n return channelCode;\n }",
"byte[] getChannelCommand() throws IOException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n baos.write(rgbCommand(r, g, b));\n baos.write(wwcwCommand(ww, cw));\n return baos.toByteArray();\n }",
"java.lang.String getChannelId();",
"protected Channel createChannel() throws IOException, TimeoutException, NoSuchAlgorithmException {\n LOGGER.debug(\"Creating channel\");\n Channel channel = connectionProducer.getConnection(config).createChannel();\n LOGGER.debug(\"Created channel\");\n return channel;\n }",
"public org.apache.axis.types.UnsignedInt getChannel() {\n return channel;\n }",
"public interface SendService {\n\n public void sendMessage(RemotingCommand remotingCommand, long timeout);\n}"
] | [
"0.7437254",
"0.73157257",
"0.7183302",
"0.7135984",
"0.7129005",
"0.71285546",
"0.7090409",
"0.7070889",
"0.7067624",
"0.7038997",
"0.6988283",
"0.6917885",
"0.68884337",
"0.67946744",
"0.67914945",
"0.67852235",
"0.677885",
"0.674656",
"0.67354923",
"0.6681876",
"0.66714543",
"0.6667951",
"0.6658963",
"0.6658963",
"0.6637923",
"0.65924364",
"0.6589948",
"0.65803987",
"0.65801334",
"0.656291",
"0.6394705",
"0.6370899",
"0.6364142",
"0.6360486",
"0.63541204",
"0.63400555",
"0.6295168",
"0.62838054",
"0.6278035",
"0.6249136",
"0.62438136",
"0.62114525",
"0.6202571",
"0.6174055",
"0.6163322",
"0.61605746",
"0.6151532",
"0.614542",
"0.6134949",
"0.61321455",
"0.60943747",
"0.6087775",
"0.60815173",
"0.60634476",
"0.6059933",
"0.60573",
"0.6053354",
"0.6047734",
"0.60389555",
"0.6030655",
"0.6022905",
"0.60092485",
"0.6005142",
"0.6005142",
"0.60051006",
"0.60014427",
"0.6001328",
"0.5996678",
"0.59943444",
"0.59914345",
"0.59837997",
"0.5970838",
"0.59568334",
"0.5928881",
"0.5895364",
"0.58861846",
"0.58624125",
"0.5857131",
"0.58528924",
"0.581504",
"0.581163",
"0.58108175",
"0.58004445",
"0.57914156",
"0.57894915",
"0.578917",
"0.5776858",
"0.57738584",
"0.576785",
"0.57609695",
"0.5759547",
"0.5758005",
"0.57573795",
"0.5743325",
"0.5738268",
"0.5733163",
"0.57316715",
"0.5726644",
"0.5715349",
"0.57023185",
"0.5701523"
] | 0.0 | -1 |
Create a new matrix with dimensions of rows x cols with full of 0's. | public Matrix(int rows, int cols) {
this.rows = rows;
this.cols = cols;
data = new double[rows][cols];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int[][] makeMatrixZero(int[][] inputMatrix) {\n\t\tint[][] outputMat = zeroInit();\n\n\t\tfor (int i = 0; i < INDEX; i++) {\n\t\t\tfor (int j = 0; j < INDEX; j++) {\n\t\t\t\tif(outputMat[i][j] !=0)\n\t\t\t\t\toutputMat[i][j] = inputMatrix[i][j];\n\t\t\t\t\n\t\t\t\tif (inputMatrix[i][j] == 0) {\n\t\t\t\t\tfor (int k = 0; k < INDEX; k++) {\n\t\t\t\t\t\toutputMat[i][k] = 0;\n\t\t\t\t\t\toutputMat[k][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t} \n\n\t\t\t}\n\t\t}\n\n\t\treturn outputMat;\n\t}",
"public static Matrix makeZero(int rows, int columns) {\n\t\treturn new Matrix(rows, columns);\n\t}",
"public static void makeRowsCols0(int [][]input) {\n\t\tint previ=-1,prevj=-1;\n\t\tfor(int i=0;i<input.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<input[0].length;j++)\n\t\t\t{\n\t\t\t\tif(input[i][j]==0)\n\t\t\t\t{\t\n\t\t\t\t\tif(i!=previ&&j!=prevj)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int k=0;k<input.length;k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinput[k][j]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(int k=0;k<input[0].length;k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinput[i][k]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprevi=i;\n\t\t\t\t\t\tprevj=j;\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}",
"private String[][] createEmptyMatrix(int rows, int columns) {\r\n\t\tString[][] outputMatrix = new String[rows][columns];\r\n\t\tfor (int i = 0; i < rows; i++) {\r\n\t\t\tfor (int j = 0; j < columns; j++) {\r\n\t\t\t\toutputMatrix[i][j] = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn outputMatrix;\r\n\t}",
"void makeZero(){\n nnz = 0;\n for(int i=0; i<this.matrixSize; i++){\n this.rows[i] = new List();\n }\n }",
"public int[][] createEmptyGrid() {\n int[][] emptyGrid = new int[9][9];\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n emptyGrid[row][col] = 0;\n }\n }\n return emptyGrid;\n }",
"public Matrix(){\r\n\t\t\r\n\t\t//dim = dimension; for now, only 3-dim. matrices are being handled\r\n\t\tmat = new int[dim][dim];\r\n\t\t\r\n\t\tfor(int rowi = 0; rowi < dim; rowi++ )\r\n\t\t\tfor (int coli = 0; coli < dim; coli++)\r\n\t\t\t\tmat[rowi][coli]=0;\r\n\t}",
"public void nullifyMatrix(int[][] mat) {\r\n //extra space\r\n boolean rows[] = new boolean[mat[0].length];\r\n boolean columns[] = new boolean[mat.length];\r\n \r\n for (int i=0;i<mat.length ;i++ ) {\r\n for (int j=0; j<mat[0].length;j++ ) {\r\n if(mat[i][j] == 0) {\r\n rows[i] = true;\r\n columns[j] = true;\r\n }\r\n } \r\n }\r\n \r\n //Nullify rows\r\n for(int i=0; i<rows.length; i++) {\r\n if(rows[i])\r\n helperNullifyRow(mat, i);\r\n }\r\n //Nullify columns\r\n for(int i=0; i<columns.length; i++) {\r\n if(columns[i])\r\n helperNullifyColumn(mat,i);\r\n }\r\n printMat(mat);\r\n }",
"public int[][] zeroMatrix(int[][] matrix){\n\tboolean[][] zeros = new boolean[matrix.length][matrix[0].length];\n\tfor (int i = 0; i < matrix.length; i++){\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (matrix[i][j] == 0) zeros[i][j] = true;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < matrix.length; i++) {\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (zeros[i][j]){\n\t\t\t\tfor (int k = 0; k < matrix.length; k++){\n\t\t\t\t\tmatrix[k][j] = 0;\n\t\t\t\t}\n\t\t\t\tfor (int k = 0; k < matrix[0].length; k++){\n\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn matrix;\n}",
"public static Matrix Zero(int n) {\n return new Matrix(get2DListOfSize(n));\n }",
"Matrix(int rows, int columns) {\n try {\n if (rows < 1 || columns < 1) {\n throw zeroSize;\n }\n this.rows = rows;\n this.columns = columns;\n matrix = new int[rows][columns];\n\n for (int rw = 0; rw < rows; rw++) {\n for (int col = 0; col < columns; col++) {\n matrix[rw][col] = (int) Math.floor(Math.random() * 100);\n }\n }\n }\n catch (Throwable zeroSize) {\n zeroSize.printStackTrace();\n }\n\n }",
"public void setToZero() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n data[i][j] = 0;\n }\n }\n }",
"public void nullifyMatrixEfficient(int[][] mat) {\r\n boolean hasRow=false, hasCol=false;\r\n //checking first row and colmun about having any zero so later we can nullify it\r\n for (int i=0;i<mat[0].length;i++ ) {\r\n if(mat[0][i] == 0) {\r\n hasRow = true;\r\n break;\r\n }\r\n }\r\n for (int i=0;i<mat.length;i++ ) {\r\n if(mat[i][0] == 0) {\r\n hasCol = true;\r\n break;\r\n }\r\n }\r\n //checking zeros existance and marking their coresponding first row and col to zero\r\n for (int i=0;i<mat.length ;i++ ) {\r\n for (int j=0; j<mat[0].length;j++ ) {\r\n if(mat[i][j] == 0) {\r\n mat[0][j] = 0;\r\n mat[i][0] = 0;\r\n }\r\n }\r\n }\r\n //nullify all columns with first element is zero\r\n for(int i=0; i<mat[0].length; i++) {\r\n if(mat[0][i] == 0)\r\n helperNullifyColumn(mat, i);\r\n }\r\n \r\n //nullify all rows with first element is zero\r\n for(int i=0; i<mat.length; i++) {\r\n if(mat[i][0] == 0)\r\n helperNullifyRow(mat, i);\r\n }\r\n printMat(mat);\r\n }",
"private SparseMatrix<Float64> makeCR0(int numberOfRows) {\n\t\tList<SparseVector<Float64>> matrix =\n\t\t\tnew ArrayList<SparseVector<Float64>>();\n\t\tfor (int i = 0; i < numberOfRows; i++) {\n\t\t\tmatrix.add(SparseVector.valueOf(numberOfRows, Float64.ZERO, i,\n\t\t\t\tFloat64.ONE));\n\t\t}\n\t\treturn SparseMatrix.valueOf(new AllSame<Float64>(numberOfRows,\n\t\t\tFloat64.ONE), Float64.ZERO);\n\t}",
"public static void zeroMatrix(int[][] matrix) {\n printMatrix(matrix);\n\n boolean [] rowZero = new boolean[matrix.length];\n boolean [] colZero = new boolean[matrix[0].length];\n\n for (int row = 0; row < matrix.length; row++) {\n for (int col = 0; col < matrix[0].length; col++) {\n if (matrix[row][col] == 0) {\n rowZero[row] = true;\n colZero[col] = true;\n }\n }\n }\n\n for (int r = 0; r < rowZero.length; r++) {\n if (rowZero[r]) {\n for (int i = 0; i < colZero.length; i++) {\n matrix[r][i] = 0;\n }\n }\n }\n\n for (int c = 0; c < colZero.length; c++) {\n if (colZero[c]) {\n for (int i = 0; i < rowZero.length; i++) {\n matrix[i][c] = 0;\n }\n }\n }\n\n printMatrix(matrix);\n }",
"public void SetMatrixToZeros() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 0;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 0;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 0;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 0;\t\n \n }",
"public void setMatrixZeroes(int[][] M) {\n int m = M.length;\n int n = M[0].length;\n\n boolean firstRowContainsZero = false;\n boolean firstColContainsZero = false;\n\n for(int j=0; j<n; j++) {\n if(M[0][j] == 0) {\n firstRowContainsZero = true;\n break;\n }\n }\n\n for(int i=0; i<m; i++) {\n if(M[i][0] == 0) {\n firstColContainsZero = true;\n break;\n }\n }\n\n for(int i=1; i<m; i++) {\n for(int j=1; j<n; j++) {\n if(M[i][j] == 0) {\n M[0][j] = 0;\n M[i][0] = 0;\n }\n }\n }\n\n for(int i=1; i<m; i++) {\n if(M[i][0] == 0) {\n for(int j=1; j<n; j++)\n M[i][j] = 0;\n }\n }\n\n for(int j=1; j<n; j++) {\n if(M[0][j] == 0) {\n for(int i=1; i<m; i++)\n M[i][j] = 0;\n }\n }\n\n if(firstRowContainsZero) {\n for(int j=0; j<n; j++)\n M[0][j] = 0;\n }\n\n if(firstColContainsZero) {\n for(int i=0; i<m; i++)\n M[i][0] = 0;\n }\n }",
"public void setZeroes2(int[][] matrix) {\n boolean row00 = false;\n boolean col00 = false;\n\n int row = 0, col = 0;\n int rows = matrix.length;\n int cols = matrix[0].length;\n while (col < cols && !row00) {\n row00 = matrix[0][col++] == 0;\n }\n while (row < rows && !col00) {\n col00 = matrix[row++][0] == 0;\n }\n\n for (row = 1; row < rows; ++row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n matrix[row][0] = 0;\n matrix[0][col] = 0;\n }\n }\n }\n for (row = 1; row < rows; ++row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[0][col] == 0 || matrix[row][0] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (row00) {\n for (col = 0; col < cols; ++col) {\n matrix[0][col] = 0;\n }\n }\n if (col00) {\n for (row = 0; row < rows; ++row) {\n matrix[row][0] = 0;\n }\n }\n }",
"private static int[][] identifyMatrixWithZeros(int[][] matrix){\n\t\tboolean[] rowCheck = new boolean[matrix.length];\n\t\tboolean[] colCheck = new boolean[matrix[0].length];\n\n\t\tfor(int i=0;i<matrix.length ;i++) {\n\t\t\tfor(int j=0;j<matrix[0].length;j++) {\n\t\t\t\tif(matrix[i][j] == 0) {\n\t\t\t\t\trowCheck[i] = true;\n\t\t\t\t\tcolCheck[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int row=0;row<rowCheck.length;row++) {\n\t\t\tif(rowCheck[row])\n\t\t\t\tnullifyRows(matrix, row);\n\t\t}\n\t\t\n\t\tfor(int col=0;col<colCheck.length;col++) {\n\t\t\tif(colCheck[col])\n\t\t\t\tnullifyColumns(matrix, col);\n\t\t}\n\t\treturn matrix;\n\t}",
"static void setFirstColumnToZero(int[][] matrix,int numberOfRows){\n for(int i=0;i<numberOfRows;i++){\n matrix[i][0]=0;\n }\n }",
"public Matrix() {\n matrix = new double[DEFAULT_SIZE][DEFAULT_SIZE];\n }",
"protected ArrayList<double[]> newMatrix(int _rows, int _cols) {\n ArrayList<double[]> matrix = new ArrayList<double[]>();\n for (int i=0; i<_rows; i++) {\n matrix.add(new double[_cols]);\n }\n return matrix;\n }",
"public static void zeroMatrix(int[][] matrix) {\n ArrayList<ArrayList<Integer>> list = new ArrayList<>(); // creates array of array of integers to store coordinates\n for (int i = 0; i < matrix.length; i++) { // go through each point in matrix\n for (int j = 0; j < matrix[0].length; j++) {\n if (matrix[i][j] == 0) { // if the point in the matrix contains 0...\n ArrayList<Integer> subList = new ArrayList<>(); // create ArrayList to store point values\n subList.add(i); // add y\n subList.add(j); // add x\n list.add(subList); // add these points to the array containing points\n }\n }\n }\n fill(list, matrix); // helper method to fill in the matrix\n }",
"private static void setFirstRowToZero(int[][] matrix,int numberOfColumns){\n for(int i=0;i<numberOfColumns;i++){\n matrix[0][i]=0;\n }\n }",
"public void setZeroes2(int[][] matrix) {\n\t\tif (matrix == null || matrix.length == 0 ||\n matrix[0] == null || matrix[0].length == 0)\n return;\n\n int r = matrix.length, c = matrix[0].length;\n boolean[] rows = new boolean[r], cols = new boolean[c];\n for (int i = 0; i < r; i++) {\n for (int j = 0; j < c; j++) {\n if (matrix[i][j] == 0) {\n rows[i] = true;\n cols[j] = true;\n }\n }\n }\n\n for (int i = 0; i < r; i++) {\n for (int j = 0; j < c; j++) {\n if (rows[i] || cols[j])\n matrix[i][j] = 0;\n }\n }\n }",
"public Matrix() {\n\tmatrix = new Object[DEFAULT_SIZE][DEFAULT_SIZE];\n }",
"public static int[][] initializeMatrix(int version) {\n\t\t\n\t\tfinal int SIZE = QRCodeInfos.getMatrixSize(version);\n\t\tint[][] matrix = new int[SIZE][SIZE];\n\t\t\n\t\tfor (int i = 0; i < SIZE; ++i) {\n\t\t\tArrays.fill(matrix[i], 0);\n\t\t}\n\t\t\n\t\treturn matrix;\n\t}",
"public void makeIdentity() {\n if (rows == cols) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n if (i == j) {\n matrix.get(i)[j] = 1;\n }\n else {\n matrix.get(i)[j] = 0;\n }\n }\n }\n }\n else {\n throw new NonSquareMatrixException();\n }\n }",
"public Board() {\n\t\tfor(int i = 0; i < board.length; i++){\n\t\t\tfor(int j = 0; j < board[i].length; j++){\n\t\t\t\tboard[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}",
"public void setZeroes(int[][] matrix) {\n if (matrix == null || matrix.length == 0) {\n return;\n }\n int[] m = new int[matrix.length];\n int[] n = new int[matrix[0].length];\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[0].length; j++) {\n if (matrix[i][j] == 0) {\n m[i]++;\n n[j]++;\n }\n }\n }\n for (int i = 0; i < m.length; i++) {\n if (m[i] > 0) {\n Arrays.fill(matrix[i], 0);\n }\n }\n for (int j = 0; j < n.length; j++) {\n if (n[j] > 0) {\n for (int k = 0; k < matrix.length; k++) {\n matrix[k][j] = 0;\n }\n }\n }\n }",
"public void setZeroes1(int[][] matrix) {\n boolean col00 = false;\n\n int row, col;\n int rows = matrix.length;\n int cols = matrix[0].length;\n for (row = 0; row < rows; ++row) {\n for (col = 0; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n if (col != 0) {\n matrix[0][col] = 0;\n matrix[row][0] = 0;\n } else {\n col00 = true;\n }\n }\n }\n }\n for (row = rows - 1; row >= 0; --row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][0] == 0 || matrix[0][col] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (col00) {\n for (row = rows - 1; row >= 0; --row) {\n matrix[row][0] = 0;\n }\n }\n }",
"public void zeroMatrix(int[][] matrix, int m, int n){\n \t boolean row0=false;\n \t boolean co0=false;\n \t for(int i=0;i<n;i++){//Check if the 1st row has a zero\n \t\t if(matrix[0][i]==0){\n \t\t\t row0=true;\n \t\t\t break;\n \t\t }\n \t }\n \t for(int i=0;i<m;i++){//Check if the 1st column has a zero \n \t\t if(matrix[i][0]==0){\n \t\t\t co0=true;\n \t\t\t break;\n \t\t }\n \t }\n\n \t for(int i=1;i<m;i++){// Using 1st row and 1st column to record which row and which column has zero\n \t\tfor(int j=1;j<n;j++){\n \t\t\tif(matrix[i][j]==0){\n \t\t\t\tmatrix[0][j]=0;\n \t\t\t\tmatrix[i][0]=0;\n \t\t\t}\n \t\t}\n \t}\n \t for(int i = 1; i < matrix.length; i++) {//Set the matrix zero\n \t for(int j = 1; j < matrix[0].length; j++) {\n \t if(matrix[i][0] == 0 || matrix[0][j] == 0) {\n \t matrix[i][j] = 0;\n \t }\n \t }\n \t }\n \tif(row0){//Set the 1st row zero\n \t\tfor(int i = 0; i < n; i++) {\n matrix[0][i] = 0;\n }\n \t}\n \tif(co0){//Set the 1st column zero\n \t\tfor(int i = 0; i < m; i++) {\n matrix[i][0] = 0;\n }\n \t}\n }",
"private double[][] emptyW() {\n double[][] temp = new double[inputLayerSize][numNodeFeatures];\n for (int i = 0; i < inputLayerSize; i++) {\n temp[i] = new double[numNodeFeatures];\n }\n return temp;\n }",
"public void setZeroes(int[][] matrix) {\n\t\t\tint m = matrix.length;\n\t\t\tint n = matrix[0].length;\n\t\t\t\n\t\t\tboolean fc = false, fr = false; // first row, first column as markers\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (matrix[i][j] == 0) {\n\t\t\t\t\t\tif (i == 0) fr = true;\n\t\t\t\t\t\tif (j == 0) fc = true;\n\t\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 1; i < m; i++) {\n\t\t\t\tfor (int j = 1; j < n; j++) {\n\t\t\t\t\tif (matrix[0][j] == 0 || matrix[i][0] == 0) {\n\t\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fr) {\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fc) {\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void setZeroes(int[][] matrix) {\n int MOD = -1000000;\n //no of rows\n int m = matrix.length;\n //no of columns\n int n = matrix[0].length;\n //Iterate over the matrix\n for (int i = 0; i<m; i++)\n {\n for (int j = 0; j<n; j++)\n {\n //check if element is 0\n if(matrix[i][j] == 0)\n {\n \n //for all the values in that row i which contains the 0 element \n for (int k = 0; k < n ; k++)\n {\n //Check for non zero elements in that row \n if(matrix[i][k] !=0)\n {\n //Assign dummy value to it\n matrix[i][k] = MOD;\n }\n }\n //all the values in that column j which contains the 0 element\n for (int k=0; k< m; k++)\n { \n //Check for non zero elements in that column\n if(matrix[k][j]!=0)\n {\n //Assign dummy value to it\n matrix[k][j] = MOD;\n } \n }\n }\n }\n }\n //Iterate again for final output matrix\n for (int i = 0; i< m ; i++)\n {\n for (int j = 0; j< n; j++ )\n {\n //Check if the value of element is MOD\n if (matrix[i][j] == MOD)\n {\n //if so Change to 0\n matrix[i][j] = 0;\n }\n }\n }\n \n }",
"public void clear() {\n rows = cols = 0;\n matrix.clear();\n }",
"public void setZeroes_ok(int[][] matrix) {\n\t\tif (matrix == null || matrix.length == 0)\n\t\t\treturn;\n\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\n\t\tif (m == 1) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (matrix[0][j] == 0) {\n\t\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\t\tmatrix[0][k] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (n == 1) {\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tif (matrix[i][0] == 0) {\n\t\t\t\t\tfor (int k = 0; k < m; k++) {\n\t\t\t\t\t\tmatrix[k][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint idx = 0;\n\t\tboolean[][] visit = new boolean[m][n];\n\t\twhile (idx <= m * n - 1) {\n\t\t\tint i = idx / n;\n\t\t\tint j = idx % n;\n\t\t\tif (i < m && j < n && matrix[i][j] == 0 && visit[i][j] == false) {\n\t\t\t\t// set whole row to 0\n\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\tif (matrix[i][k] != 0) {\n\t\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t\t\tvisit[i][k] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set whole col to 0\n\t\t\t\tfor (int l = 0; l < m; l++) {\n\t\t\t\t\tif (matrix[l][j] != 0) {\n\t\t\t\t\t\tmatrix[l][j] = 0;\n\t\t\t\t\t\tvisit[l][j] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tidx++;\n\t\t}\n\t}",
"private void setEmpty() {\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++)\n\t\t\t\tboard[r][c] = new Cell(false, false,\n\t\t\t\t\t\tfalse, false); // totally clear.\n\t}",
"public int[][] createBoard(int size){\r\n\t\tint[][] newBoard = new int[size+1][size+1];\r\n\t\tfor (int i = 0; i < newBoard.length; i++){\r\n\t\t\tfor (int j = 0; j < newBoard[i].length; j++) {\r\n\t\t\t\tif (i == 0) {\r\n\t\t\t\t\tnewBoard[i][j] = j;\r\n\t\t\t\t} else if (j == 0) {\r\n\t\t\t\t\tnewBoard[i][j] = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}newBoard[0][0] = 0;\r\n\treturn newBoard;\r\n\t}",
"public void reset() {\n for (int i = 0; i < this.numRows; i++) {\n this.rows[i] = new int[0];\n }\n for (int k = 0; k < this.numCols; k++) {\n this.cols[k] = new IntOpenHashSet();\n }\n }",
"public int[][] initMatrix(int n)\n {\n\t// create an empty 2d array and return it! Simple stuff here.\n\t int[][] retMatrix = new int[n][n];\n\t return retMatrix;\n }",
"public static int[][] getZeroArray(int rowNum, int colNum) {\r\n\t\tint[][] retA = new int[rowNum][colNum];\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tretA[i][j] = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn retA;\r\n\t}",
"public void zero() {\n fill(0);\n }",
"public Token zero() {\n\t\ttry {\n\t\t\treturn new LongMatrixToken(new long[_rowCount * _columnCount],\n\t\t\t\t\t_rowCount, _columnCount, DO_NOT_COPY);\n\t\t} catch (IllegalActionException illegalAction) {\n\t\t\t// should not happen\n\t\t\tthrow new InternalErrorException(\"LongMatrixToken.zero: \"\n\t\t\t\t\t+ \"Cannot create zero matrix.\");\n\t\t}\n\t}",
"void markRowAndColumnZero(int[][] matrix) {\n HashSet<Integer> rows = new HashSet<Integer>();\n HashSet<Integer> columns = new HashSet<Integer>();\n for(int i=0; i< matrix.length;i++) {\n for(int j =0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) {\n rows.add(i);\n columns.add(j);\n }\n }\n }\n Iterator<Integer> rowsIterator = rows.iterator();\n while(rowsIterator.hasNext()) {\n int rowToBeSetToZero = rowsIterator.next();\n for(int i=0;i< matrix[0].length;i++) {\n matrix[rowToBeSetToZero][0] = 0;\n }\n }\n\n Iterator<Integer> columnsIterator = columns.iterator();\n while(columnsIterator.hasNext()) {\n int columnToBeSetToZero = columnsIterator.next();\n for(int i=0;i< matrix[0].length;i++) {\n matrix[i][columnToBeSetToZero] = 0;\n }\n }\n\n return;\n\n\n }",
"public static void setZeroes(int[][] matrix) {\n boolean[] row = new boolean[matrix.length];\n boolean[] col = new boolean[matrix[0].length];\n\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[0].length; j++) {\n if (matrix[i][j] == 0) {\n row[i] = true;\n col[j] = true;\n }\n }\n }\n\n // Loop through each row and col arrays to see where zeroes are to be set in matrix\n for (int i = 0; i < row.length; i++) {\n if (row[i]) {\n setRowsToZeroes(matrix, i);\n }\n }\n\n for (int j = 0; j < col.length; j++) {\n if (col[j]) {\n setColsToZeroes(matrix, j);\n }\n }\n }",
"Matrix(){\n matrixVar = new double[1][1];\n rows = 1;\n columns = 1;\n }",
"public static int[][] generateMatrix() {\n int rowsCount = RANDOM.nextInt( MAX_ROWS_COUNT ) + 1;\n int[][] result = new int[rowsCount][];\n for (int i = 0; i < rowsCount; i++) {\n result[i] = new int[RANDOM.nextInt( MAX_COLUMNS_COUNT ) + 1];\n fillArray( result[i] );\n }\n return result;\n }",
"Matrix()\n {\n x = new Vector();\n y = new Vector();\n z = new Vector();\n }",
"public static Mat2 initIdentity(int size) {\n\t\tdouble[][] data = new double[size][size];\n\t\tfor(int i=0; i<size; i++) {\n\t\t\tfor(int j=0; j<size; j++) {\n\t\t\t\tdata[i][j] = 0;\n\t\t\t\tif(i==j) data[i][j] = 1;\n\t\t\t}\n\t\t}\n\t\treturn new Mat2(data);\n\t}",
"public void initializeGrid() {\n for (int i = minRow; i <= maxRow; i++) {\n for (int j = minCol; j <= maxCol; j++) {\n grid[i][j] = 0;\n }\n }\n }",
"public void clearA(){\n for (int i = 0; i < I+1; i++){\n for (int j = 0; j < I+1; j++){\n a[i][j][I] = 0.0;\n }\n }\n\t }",
"public static int[][] init() {\n int[][] arr={\n {0,1,0,1,0,0,0},\n {0,0,1,0,0,1,0},\n {1,0,0,1,0,1,0},\n {0,0,1,0,0,1,0},\n {0,0,1,1,0,1,0},\n {1,0,0,0,0,0,0}\n };\n return arr;\n }",
"static void update(int[][] matrix){\n\t\tboolean rowFlag = false;\n\t\tboolean colFlag = false;\n\t\tint n = matrix.length;\n int m = matrix[0].length;\n for(int i=0;i<n;i++){\n for(int j=0;j<m;j++){\n if(i==0 && matrix[i][j]==0){\n rowFlag =true;\n }\n if(j==0 && matrix[i][j]==0){\n colFlag = true;\n }\n if(matrix[i][j]==0){\n matrix[0][j] = 0;\n matrix[i][0] = 0;\n }\n }\n }\n for(int i=1;i<n;i++){\n for(int j=1;j<m;j++){\n if(matrix[i][0]==0||matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n if(rowFlag){\n for(int i=0;i<m;i++){\n matrix[0][i] =0 ;\n }\n }\n if(colFlag){\n for(int j=0;j<n;j++){\n matrix[j][0] = 0;\n }\n }\n\n\t}",
"private static void createEmptyBoard()\n {\n for (int index = 1; index < board.length; index++)\n {\n board[index] = ' ';\n }\n }",
"public static Matrix identityMatrix(int nrow){\r\n \tMatrix u = new Matrix(nrow, nrow);\r\n \tfor(int i=0; i<nrow; i++){\r\n \t\tu.matrix[i][i]=1.0;\r\n \t}\r\n \treturn u;\r\n \t}",
"public Matrix(int nrOfRows, int nrOfCols) {\n this.nrOfRows = nrOfRows;\n this.nrOfCols = nrOfCols;\n inner = new BigInteger[nrOfRows][nrOfCols];\n }",
"public static void generateMatrix() {\r\n Random random = new Random();\r\n for (int i = 0; i < dim; i++)\r\n {\r\n for (int j = 0; j < dim; j++)\r\n {\r\n if (i != j)\r\n \r\n adjacencyMatrix[i][j] = I; \r\n }\r\n }\r\n for (int i = 0; i < dim * dim * fill; i++)\r\n {\r\n adjacencyMatrix[random.nextInt(dim)][random.nextInt(dim)] =\r\n random.nextInt(maxDistance + 1);\r\n }\r\n \r\n\r\n\r\n \r\n //print(adjacencyMatrix);\r\n \r\n \r\n //This makes the main matrix d[][] ready\r\n for (int i = 0; i < dim; i++) {\r\n for (int j = 0; j < dim; j++)\r\n {\r\n d[i][j] = adjacencyMatrix[i][j];\r\n if (i == j)\r\n {\r\n d[i][j] = 0;\r\n }\r\n }\r\n }\r\n }",
"public DenseMatrix( int rows , int columns )\n\t{\n\t\tsuper( rows , columns );\n\n\t\tmatrixData\t\t= new double[ rows ][ columns ];\n\t}",
"public void clear() {\n\t\tfor(int i=0;i<height;i++) {\n\t\t\tfor(int j=0;j<width;j++) {\n\t\t\t\tgrid[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}",
"public static void setRowsToZeroes(int[][] matrix, int row) {\n for (int j = 0; j < matrix[0].length; j++) {\n matrix[row][j] = 0;\n }\n }",
"public void createPointersNoBackingArray() {\n int matrixByteSize = rows * cols * Sizeof.DOUBLE;\n\n deviceMPtr = new CUdeviceptr();\n cuMemAlloc(deviceMPtr, matrixByteSize);\n\n matrixPointer = Pointer.to(deviceMPtr);\n rowPointer = Pointer.to(new int[]{rows});\n columnPointer = Pointer.to(new int[]{cols});\n sizePointer = Pointer.to(new int[]{rows * cols});\n }",
"public void makeEmpty() {\r\n for (int i = 0; i < tableSize; i++) {\r\n table[i] = new DList<Entry<K, V>>();\r\n }\r\n }",
"void makeBoard(int[] values) {\n int c = 0;\n for (int i = 0; i < SIZE; i++) {\n for (int j = 0; j < SIZE; j++) {\n if (values[c] == 0) {\n blankRow = i;\n blankCol = j;\n }\n board[i][j] = values[c++];\n }\n }\n this.rank = setRank();\n }",
"Matrix(double[][] input) {\n matrixVar = input;\n columns = matrixVar[0].length;\n rows = matrixVar.length;\n }",
"private static void changeFirstRowAndColumn(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++) {\n if(matrix[i][j]==0){\n matrix[i][0]=0;\n matrix[0][j]=0;\n }\n }\n }\n }",
"public static void generatetripletmatrix() {\n\t\tresultMatrix = new int[3][numNonZero];\n\n\t // Generating result matrix\n\t int k = 0;\n\t for (int ro = 0; ro < row; ro++) {\n\t for (int column = 0; column < 6; column++) {\n\t if (matrix[ro][column] != 0)\n\t {\n\t resultMatrix[0][k] = ro;\n\t resultMatrix[1][k] = column;\n\t resultMatrix[2][k] = matrix[ro][column];\n\t k++;\n\t }\n\t }\n\t }\n\t \n\t}",
"private void initializeGrid()\n {\n \t\n // initialize grid as a 2D ARRAY OF THE APPROPRIATE DIMENSIONS\n \tgrid = new int [NUM_ROWS][NUM_COLS];\n\n\n //INITIALIZE ALL ELEMENTS OF grid TO THE VALUE EMPTY\n \tfor(int row = 0; row < NUM_ROWS; row++){\n \t\tfor(int col = 0; col < NUM_COLS; col++){\n \t\t\tgrid[row][col] = EMPTY;\n \t\t}\n \t}\n }",
"private void initializeGraphAsEmpty() {\n int max = getNumNodes();\n\n parentMatrix = new int[getNumNodes()][max];\n childMatrix = new int[getNumNodes()][max];\n\n for (int i = 0; i < getNumNodes(); i++) {\n parentMatrix[i][0] = 1; //set first node\n childMatrix[i][0] = 1;\n }\n\n for (int i = 0; i < getNumNodes(); i++) {\n for (int j = 1; j < max; j++) {\n parentMatrix[i][j] = -5; //set first node\n childMatrix[i][j] = -5;\n }\n }\n }",
"private static void cleanArray() {\n\t\tfor(int i = 0 ; i < n ;i++){\r\n\t\t\tcolTemp[i] = 0;\r\n\t\t\trowTemp[i] = 0;\r\n\t\t}\r\n\t}",
"public Matrix33() {\r\n // empty\r\n }",
"public SudokuSolver() {\n matrix = new int[DIM][DIM];\n\n IntStream.range(0, DIM * DIM)\n .forEach(\n n -> {\n int i = n / DIM;\n int j = n % DIM;\n matrix[i][j] = 0;\n });\n }",
"public Matrix asMatrix() {\n Matrix result;\n try {\n result = new Matrix(COMPONENTS, 1);\n asMatrix(result);\n } catch (final WrongSizeException ignore) {\n // never happens\n result = null;\n }\n return result;\n }",
"public void resetBoard() {\n\t\t\n\t\tfor(int row = 0; row < board.length; row++) {\n\t\t\tfor(int col = 0; col < board[row].length; col++) {\n\t\t\t\t\n\t\t\t\tboard[row][col] = 0;\n\t\t\t}\n\t\t}\n\t}",
"public SparseBinaryMatrix(int numRows, int numCols) {\n this.numRows = numRows;\n this.numCols = numCols;\n this.rows = new int[this.numRows][];\n for (int i = 0; i < this.numRows; i++) {\n this.rows[i] = new int[0]; //Util.EMPTY_INT_ARRAY;\n }\n this.cols = new IntSet[this.numCols];\n }",
"private static boolean isZeroMatrix(@NonNull RealMatrix a) {\n for (int i = 0; i < a.getRowDimension(); i++) {\n for (int j = 0; j < a.getRowDimension(); j++) {\n if (a.getEntry(i, j) != 0) {\n return false;\n }\n }\n }\n return true;\n }",
"public static void clearBoard() {\n for (int row = 0; row < SIZE_ROW; row++) {\n for (int col = 0; col < SIZE_COL; col++) {\n board[row][col] = 0;\n }\n }\n }",
"public static Vector4 zero()\n {\n return new Vector4(0,0,0,0);\n }",
"private static void zero(int[] x)\n {\n for (int i = 0; i != x.length; i++)\n {\n x[i] = 0;\n }\n }",
"public static JTensor newWithSize1d(long size0) {\n return new JTensor(\n TH.THTensor_(newWithSize1d)(size0)\n );\n }",
"public static int[][] generateMatrix(int rows, int columns) {\n\tint[][] result = new int[rows][columns];\n\tfor (int i = 0; i < rows; i++) {\n\tfor (int j = 0; j < columns; j++) {\n\tresult[i][j] = (int) (Math.random() * 100) + 1;\n\t}\n\t}\n\treturn result;\n\t}",
"public Mat2(int rows, int cols) {\n\t\tdata = new double[rows][cols];\n\t\tfor(int i=0; i<rows; i++) {\n\t\t\tfor(int j=0; j<cols; j++) {\n\t\t\t\tdata[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\tthis.rows = rows; this.cols = cols;\n\t}",
"private int[][] listEmptyCells() {\n int nbEmpty = 0;\n int[][] emptyCells;\n int k = 0;\n\n for (int i = 0; i < sb.size; i++) {\n for (int j = 0; j < sb.size; j++) {\n if (sb.get(i, j) == 0)\n nbEmpty++;\n }\n }\n emptyCells = new int[nbEmpty][2];\n\n for (int i = 0; i < sb.size; i++) {\n for (int j = 0; j < sb.size; j++) {\n if (sb.get(i, j) == 0) {\n emptyCells[k][0] = i;\n emptyCells[k][1] = j;\n k++;\n }\n }\n }\n return emptyCells;\n }",
"public Matrix(int x, int y) {\n\t\tnrow=x;\n\t\tncol=y;\n\t\tmat = new int[x][y];\n\t\t\n\n\t}",
"@Test\n public void testConstructor() {\n final Matrix33d m = new Matrix33d();\n double a[] = m.getA();\n for (int i = 0; i < a.length; i++) {\n assertEquals(a[i], 0D);\n }\n }",
"static private double[][] initMatrix(double[][] c) {\n final int N = c.length;\n final double value = 1 / Math.sqrt(2.0);\n\n for (int i = 1; i < N; i++) {\n for (int j = 1; j < N; j++) {\n c[i][j] = 1;\n }\n }\n\n for (int i = 0; i < N; i++) {\n c[i][0] = value;\n c[0][i] = value;\n }\n c[0][0] = 0.5;\n return c;\n }",
"public Vector4d setZero() {\n\t\tx = y = z = w =0;\n\t\treturn this;\n\t}",
"public void plantBombsInEmptyCells() {\n\t\tfor (int i = 0; i < r; i++) {\n\t\t\tfor (int j = 0; j < c; j++) {\n\t\t\t\tgrid[i][j] = ( grid[i][j] < 0 ? 0 : grid[i][j] );\n\t\t\t}\n\t\t}\n\t}",
"public int[] findZeros(int rows, int cols)\n\t{\n\t\tint r=0;\n\t\tint c;\n\t\tboolean over;\n\t\t\n\t\trows=-1;\n\t\tcols=-1;\n\t\tover=false;\n\t\twhile(!over)\n\t\t{\n\t\t\tc=0;\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\tif(cost[r][c]==0 && rowLabelMultiple[r]==0 && columnLabelMultiple[c]==0)\n\t\t\t\t{\n\t\t\t\t\trows=r;\n\t\t\t\t\tcols=c;\n\t\t\t\t\tover=true;\n\t\t\t\t}\n\t\t\t\tc+=1;\n\t\t\t\tif(c>=n || over)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tr+=1;\n\t\t\tif(r >= n)\n\t\t\t{\n\t\t\t\tover=true;\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tint[] a=new int[2];\n\t\ta[0]=rows;\n\t\ta[1]=cols;\n\t\treturn a;\n\t}",
"public void createBoard() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j <colls; j++) {\n if(i==0 || j == 0 || i == rows-1|| j == colls-1){\n board[i][j] = '*';\n } else {\n board[i][j] = ' ';\n }\n }\n }\n }",
"public double[][] getIdentityNegativeMatrix(int size) {\n\t\tdouble[][] identityMatrix = new double[size][size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tfor (int j = 0; j < size; j++) {\n\t\t\t\tif (i == j) {\n\t\t\t\t\tidentityMatrix[i][j] = -1.;\n\t\t\t\t} else {\n\t\t\t\t\tidentityMatrix[i][j] = 0.;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn identityMatrix;\n\t}",
"private static void changeSubMatrix(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++){\n if(matrix[i][0]==0 || matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n }",
"public Board() {\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n this.grid[row][col] = 0;\n }\n }\n }",
"public void reset() {\n \tboard = new char[columns][rows];\n \tfor(int i = 0; i < columns; i++) {\n \t\tfor(int j = 0; j < rows; j++) {\n \t\t\tboard[i][j] = EMPTY;\n \t\t}\n \t}\n\t}",
"static public Matrix identityMatrix(int size) {\n Matrix identity = new Matrix(size, size);\n\n for (int i = 0; i < size; i++) {\n identity.data[i][i] = 1;\n }\n\n return identity;\n }",
"public Matrix(ComplexNumber[][] rows) {\n\t\tROWS = rows;\n\t\tM = rows.length;\n\t\tN = rows[0].length;\n\t\tfor (int row = 0; row < M; row++) {\n\t\t\tif (rows[row].length != N) {\n\t\t\t\tthrow new RuntimeException(\"Non-Rectangular Matrix!\");\n\t\t\t}\n\t\t}\n\t}",
"public static Matrix getIdentityMatrix(int size) {\r\n Matrix m = new Matrix(size, size);\r\n\r\n for (int i = 0; i < size; i++) {\r\n m.setValue(i, i, 1);\r\n }\r\n\r\n return m;\r\n }",
"public static void solution1(int[][] grid) {\n int M = grid.length;\n int N = grid[0].length;\n\n // Loop through 2-d grid to figure out which rows & columns have a 0\n boolean[] rows = new boolean[M];\n boolean[] cols = new boolean[N];\n for (int row = 0; row < M; row++) {\n for (int col = 0; col < N; col++) {\n if (grid[row][col] == 0) {\n rows[row] = true;\n cols[col] = true;\n }\n }\n }\n\n // Re-loop through 2-d matrix and set whichever entries are necessary to 0\n for (int row = 0; row < M; row++) {\n for (int col = 0; col < N; col++) {\n if (rows[row] == true || cols[col] == true) {\n grid[row][col] = 0;\n }\n }\n }\n }",
"public JCudaMatrix(int rows) {\n this(rows, 1);\n }",
"private int[][] initialStateMatrix() {\n return new int[][]{{2,1,-1,3,0,-1},\n {2,-1,-1,3,-1,-1},\n {2,-1,5,4,8,-1},\n {4,-1,-1,-1,-1,-1},\n {4,-1,5,-1,8,-1},\n {7,6,-1,-1,-1,-1},\n {7,-1,-1,-1,-1,-1},\n {7,-1,-1,-1,8,-1},\n {-1,-1,-1,-1,8,-1}};\n }"
] | [
"0.7134423",
"0.712352",
"0.709705",
"0.69162047",
"0.6902726",
"0.6825206",
"0.6667735",
"0.66200906",
"0.65515745",
"0.65251625",
"0.64424837",
"0.64389473",
"0.6433977",
"0.63908184",
"0.638516",
"0.6332954",
"0.6223493",
"0.62064546",
"0.62048495",
"0.6168188",
"0.6157492",
"0.60874164",
"0.6057071",
"0.6046359",
"0.60364103",
"0.6027475",
"0.6021475",
"0.6010573",
"0.5996847",
"0.5948967",
"0.5948005",
"0.59456205",
"0.5928226",
"0.59187156",
"0.59179175",
"0.59005326",
"0.5867196",
"0.585661",
"0.58444536",
"0.5820983",
"0.582081",
"0.5810586",
"0.5798223",
"0.5792177",
"0.5772202",
"0.5769029",
"0.57635945",
"0.5713223",
"0.56691486",
"0.5667293",
"0.5660667",
"0.565868",
"0.5639477",
"0.5636798",
"0.56299525",
"0.5607832",
"0.560505",
"0.5603352",
"0.5563662",
"0.5547543",
"0.5544266",
"0.5541332",
"0.55343527",
"0.55259144",
"0.5522224",
"0.549893",
"0.5492184",
"0.5488943",
"0.548444",
"0.5481862",
"0.5479665",
"0.54654",
"0.54607743",
"0.5446777",
"0.5446219",
"0.5442988",
"0.5438126",
"0.54341525",
"0.54217285",
"0.5417639",
"0.53928745",
"0.5388695",
"0.5387957",
"0.5381394",
"0.537991",
"0.5373871",
"0.5369915",
"0.53694284",
"0.5364583",
"0.53529936",
"0.5352516",
"0.533759",
"0.5336369",
"0.53342295",
"0.5326256",
"0.53159696",
"0.5312425",
"0.52967435",
"0.5292319",
"0.5292092"
] | 0.55992514 | 58 |
Creates a new matrix with specific data. | public Matrix(double[][] data) {
rows = data.length;
cols = data[0].length;
this.data = new double[rows][cols];
for (int i = 0; i < data.length; i++) {
System.arraycopy(data[i], 0, this.data[i], 0, data[i].length);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Matrix(double[] data) {\n m = data.length;\n n = 1;\n this.data = new double[m][n];\n for (int i = 0; i < m; i++)\n {\n for (int j = 0; j < n; j++)\n {\n \tthis.data[i][j] = data[i];\n }\n }\n }",
"protected abstract T createMatrix( int numRows, int numCols, MatrixType type );",
"public Matrix(double[][] data) {\n M = data.length;\n N = data[0].length;\n this.data = new double[M][N];\n for (int i = 0; i < M; i++)\n for (int j = 0; j < N; j++)\n this.data[i][j] = data[i][j];\n }",
"public Matrix(double[][] data) {\n rowCount = data.length;\n columnCount = data[0].length;\n this.data = new double[rowCount][columnCount];\n for (int i = 0; i < rowCount; i++)\n for (int j = 0; j < columnCount; j++)\n this.data[i][j] = data[i][j];\n }",
"public Matrix( int a ) {\n\tmatrix = new Object[a][a];\n }",
"public static Matrix buildMatrixFromCommandLine (){\n\n int M = 0;\n int N = 0;\n double[][] data;\n\n M = new Double(getDoubleWithMessage(\"Enter rows number: \")).intValue();\n N = new Double(getDoubleWithMessage(\"Enter columns number: \")).intValue();\n System.out.println(\"You have matrix: \" + M + \"x\" + N);\n\n data = new double[M][N];\n\n for (int i = 0; i < M; i++){\n System.out.println(\"Row: \" + i);\n for (int j = 0; j < N; j++){\n data[i][j] = getDoubleWithMessage(\"Column: \" + j);\n }\n }\n return new Matrix(data);\n }",
"public SimpleMatrix( double data[][] ) {\n setMatrix(new DMatrixRMaj(data));\n }",
"protected ArrayList<double[]> newMatrix(int _rows, int _cols) {\n ArrayList<double[]> matrix = new ArrayList<double[]>();\n for (int i=0; i<_rows; i++) {\n matrix.add(new double[_cols]);\n }\n return matrix;\n }",
"public Matrix(int m, int n) {\n this.m = m;\n this.n = n;\n data = new double[m][n];\n }",
"public Matrix() {\n\tmatrix = new Object[DEFAULT_SIZE][DEFAULT_SIZE];\n }",
"public T createLike() {\n return createMatrix(numRows(), numCols(), getType());\n }",
"Matrix(){\n matrixVar = new double[1][1];\n rows = 1;\n columns = 1;\n }",
"public Matrix(double[][] now) {\n\t\tmatrix = now;\n\t}",
"public BinaryMatrixNew() {\n\t\t\tsuper(Matrixes.<R, C>newValidating(PredicateUtils.inBetween(0d, 1d)));\n\t\t}",
"public Matrix(int n) {\n\t\tif (n < 1) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tthis.n = n;\n\t\tthis.content = new double[n][n];\n\t\tthis.hash = hashCode();\n\t}",
"public DenseMatrix( int rows , int columns )\n\t{\n\t\tsuper( rows , columns );\n\n\t\tmatrixData\t\t= new double[ rows ][ columns ];\n\t}",
"public Matrix(int rowCount, int columnCount) {\n this.rowCount = rowCount;\n this.columnCount = columnCount;\n data = new double[rowCount][columnCount];\n }",
"public Matrix() {\n matrix = new double[DEFAULT_SIZE][DEFAULT_SIZE];\n }",
"private static Matrix makeXMat(int nDataPoints, int nTerms, Vector xV){\n Matrix matrix = new Matrix(nDataPoints, nTerms);\n for (int row = 1; row <= nDataPoints; row++){\n matrix.putValue(row,1, new BigDecimal(1.0));\n for (int col = 2; col <= nTerms; col++)\n matrix.putValue(row , col, \n matrix.getValue(row, col - 1).multiply(\n xV.getValue(row)));\n }\n return matrix;\n }",
"public Matrix(int M, int N) {\n this.M = M;\n this.N = N;\n data = new double[M][N];\n }",
"public Matrix(int rows, int cols) {\n this.rows = rows;\n this.cols = cols;\n data = new double[rows][cols];\n }",
"private TileDataOLD createData(int sx, int sy) {\n\t\tTileDataOLD td = new TileDataOLD(sx, sy);\n\t\tdata[sx][sy] = td;\n\t\treturn td;\n\t}",
"Matrix()\n {\n x = new Vector();\n y = new Vector();\n z = new Vector();\n }",
"public Matrix(double[][] A, int m, int n) {\n this.data = A;\n this.m = m;\n this.n = n;\n }",
"Matrix(double[][] input) {\n matrixVar = input;\n columns = matrixVar[0].length;\n rows = matrixVar.length;\n }",
"public Matrix(int m, int n, double s) {\n this.m = m;\n this.n = n;\n data = new double[m][n];\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n data[i][j] = s;\n }\n }\n }",
"public Matrix(int n) {\n\t\tsize = n;\n\t\tm = new int[size][size];\n\t}",
"public Matrix copy() {\n Matrix X = new Matrix(m,n);\n double[][] C = X.getArray();\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n C[i][j] = data[i][j];\n }\n }\n return X;\n }",
"public abstract Matrix matrix(double s1, double s2, double s3, double c1, double c2, double c3);",
"MatrixParameter createMatrixParameter();",
"public MatrixEntry(int row, int col, int data) {\n this.col = col;\n this.row = row;\n this.data = data;\n }",
"protected SimpleMatrix() {}",
"Rows createRows();",
"public Matrix(int[][] array)\n {\n matrix = array;\n }",
"public Matrix(int x, int y) {\n\t\tnrow=x;\n\t\tncol=y;\n\t\tmat = new int[x][y];\n\t\t\n\n\t}",
"public Matrix(int[][] array){\n this.matriz = array;\n }",
"protected abstract D createData();",
"Matrix(int r,int c)\n {\n this.r=r;\n this.c=c;\n arr=new int[r][c];\n }",
"public Matrix33() {\r\n // empty\r\n }",
"FromTable createFromTable();",
"Row createRow();",
"DataTable createDataTable();",
"@Deprecated // Turned out this wasn't a good idea\n public static <T> T[][] bulkCreation(int height, int width, MatrixConstructor<T> matrixConstructor, Supplier<T> constructor){\n T[][] matrix = matrixConstructor.apply(height, width);\n initialize(matrix, constructor);\n\n return matrix;\n }",
"Matrix copy() {\n Matrix newMatrix = new Matrix(matrixSize);\n for (int i = 0; i < matrixSize; i++) {\n if (!rows[i].isEmpty()) {\n rows[i].moveFront();\n while (rows[i].index() != -1) {\n Entry entry = (Entry)rows[i].get();\n newMatrix.changeEntry(i + 1, entry.column, entry.value);\n rows[i].moveNext();\n }\n }\n }\n return newMatrix;\n }",
"public NumericTable(final double[][] data) {\r\n setData(data);\r\n }",
"SimpleMatrix createMatrixFromDatabaseEntities(List<Entity> entities, Set<String> uniqueItems) {\n itemIndexMapping = new ArrayList<String>(uniqueItems);\n userIDIndexMapping = new HashMap<>();\n Collections.sort(itemIndexMapping);\n double[][] userItemData = new double[entities.size()][uniqueItems.size()];\n for (int i = 0; i < entities.size(); i++) {\n addEntity(userItemData, entities.get(i), i);\n }\n return new SimpleMatrix(userItemData);\n }",
"void createMatrix(String path, String delimiter) throws\n RepositoryException;",
"public Mat2(double[][] data) {\n\t\tthis.data = data;\n\t\trows = data.length; cols = (rows==0)? 0 : data[0].length;\n\t}",
"@Test\n public void testMatrixCreation() throws Exception {\n\n testUtilities_3.createAndTestMatrix(false);\n\n }",
"public MonteurDetailModel(Object[][] data) {\n\t\tsetAfsprakenHeader(new String[] { \"Start Tijd\", \"Eind Tijd\",\n\t\t\t\t\"Bezigheid\", \"ReparatieID\", \"Monteur\" });\n\t\tsetAutoHeader(new String[] { \"Auto nummer\", \"Kenteken\", \"BouwJaar\",\n\t\t\t\t\"Merk\", \"Model\" });\n\n\t\tgeplandeAfspraken = data;\n\t\tautos = data;\n\n\t\tvoorNaam = \"Voornaam\";\n\t\tachterNaam = \"Achternaam\";\n\t\tadres = \"Straatnaam etc\";\n\t\twoonplaats = \"Kutgat\";\n\t\tpostcode = \"Vage nummers\";\n\n\t\tuurLoon = 20.00;\n\t\tpersoonID = 1337;\n\t}",
"public Matrix(){\r\n\t\t\r\n\t\t//dim = dimension; for now, only 3-dim. matrices are being handled\r\n\t\tmat = new int[dim][dim];\r\n\t\t\r\n\t\tfor(int rowi = 0; rowi < dim; rowi++ )\r\n\t\t\tfor (int coli = 0; coli < dim; coli++)\r\n\t\t\t\tmat[rowi][coli]=0;\r\n\t}",
"public int[][] initMatrix(int n)\n {\n\t// create an empty 2d array and return it! Simple stuff here.\n\t int[][] retMatrix = new int[n][n];\n\t return retMatrix;\n }",
"DataModel createDataModel();",
"public TransformationMatrix() {\n\t\ta11 = 1; a12 = 0; a13 = 0; a14 = 0;\n\t\ta21 = 0; a22 = 1; a23 = 0; a24 = 0;\n\t\ta31 = 0; a32 = 0; a33 = 1; a34 = 0;\n\t}",
"public Matrice(int nr, int nc){\n\t\tthis.nr=nr;\n\t\tthis.nc=nc;\n\t\tmat = new int[nr][nc];\n\t}",
"Matrix(int rows, int columns) {\n try {\n if (rows < 1 || columns < 1) {\n throw zeroSize;\n }\n this.rows = rows;\n this.columns = columns;\n matrix = new int[rows][columns];\n\n for (int rw = 0; rw < rows; rw++) {\n for (int col = 0; col < columns; col++) {\n matrix[rw][col] = (int) Math.floor(Math.random() * 100);\n }\n }\n }\n catch (Throwable zeroSize) {\n zeroSize.printStackTrace();\n }\n\n }",
"public DoubleMatrixDataset() {\r\n }",
"public OpenGLMatrix createMatrix(float x, float y, float z, float u, float v, float w) {\n return OpenGLMatrix.translation(x, y, z).\n multiplied(Orientation.getRotationMatrix(\n AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES, u, v, w));\n }",
"private Matrix getFeatureMatrix(int sensor_id){\n\t\t\n\t\tdouble[][] matrix_shell = new double[this.M + this.number_of_sensors][1];\n\t\t\n\t\tfor(int i=0; i<this.M; i++){\n\t\t\t\n\t\t\tdouble temp_value = past_sensor_readings[sensor_id][i];\n\t\t\t\n\t\t\tmatrix_shell[i][0] = temp_value;\n\n\t\t}\n\t\t\n\t\tfor(int i=0; i<sensor_id; i++){\n\t\t\t\n\t\t\tdouble temp_value = current_sensor_readings[i];\n\t\t\t\n\t\t\tmatrix_shell[i+this.M][0] = temp_value;\n\t\t}\n\t\t\n\t\treturn new Matrix(matrix_shell);\n\t}",
"public Matrix(double vals[], int m) throws JPARSECException {\n this.m = m;\n n = (m != 0 ? vals.length/m : 0);\n if (m*n != vals.length) {\n throw new JPARSECException(\"Array length must be a multiple of m.\");\n }\n data = new double[m][n];\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n data[i][j] = vals[i+j*m];\n }\n }\n }",
"public Matrix(double[][] array) {\n this.matrix = array;\n }",
"public MxNDArray create(Pointer handle, SparseFormat fmt) {\n return new MxNDArray(this, handle, fmt);\n }",
"void reshape(int newRows,int newCols) {\n if (rows * cols != newRows * newCols)\n throw new IllegalArgumentException(String.format(\"%d x %d matrix can't be reshaped to %d x %d\", rows, cols, newRows, newCols));\n this.cols = newCols;\n this.rows = newRows;\n double[][] tmp = this.asArray();\n int k = 0;\n for (int i = 0; i < cols; i++) {\n for (int j = 0; j < rows; j++) {\n this.data[k] = tmp[j][i];\n k++;\n }\n }\n }",
"public ChartTableModel(int rows) {\n this.data = new Object[rows][7];\n }",
"public Matrix(int nrow, int ncol){\r\n\t\tthis.nrow = nrow;\r\n\t\tthis.ncol = ncol;\r\n\t \tthis.matrix = new double[nrow][ncol];\r\n\t\tthis.index = new int[nrow];\r\n for(int i=0;i<nrow;i++)this.index[i]=i;\r\n }",
"public static Matrix Identity(int n) {\n List<List<Double>> backingArray = get2DListOfSize(n);\n for(int i = 0; i < n; i++)\n backingArray.get(i).set(i, 1d);\n return new Matrix(backingArray);\n }",
"public Matrix(double[][] A) throws JPARSECException {\n m = A.length;\n n = A[0].length;\n for (int i = 0; i < m; i++) {\n if (A[i].length != n) {\n throw new JPARSECException(\"All rows must have the same length.\");\n }\n }\n this.data = A;\n }",
"private SparseMatrix<Float64> makeCR0(int numberOfRows) {\n\t\tList<SparseVector<Float64>> matrix =\n\t\t\tnew ArrayList<SparseVector<Float64>>();\n\t\tfor (int i = 0; i < numberOfRows; i++) {\n\t\t\tmatrix.add(SparseVector.valueOf(numberOfRows, Float64.ZERO, i,\n\t\t\t\tFloat64.ONE));\n\t\t}\n\t\treturn SparseMatrix.valueOf(new AllSame<Float64>(numberOfRows,\n\t\t\tFloat64.ONE), Float64.ZERO);\n\t}",
"public Matrix copy() {\n\t\tComplexNumber[][] rows = new ComplexNumber[M][];\n\t\tfor (int row = 0; row < M; row++) {\n\t\t\trows[row] = new ComplexNumber[N];\n\t\t\tfor (int col = 0; col < N; col++) {\n\t\t\t\trows[row][col] = ROWS[row][col];\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(rows);\n\t}",
"public void createDataTable() {\r\n Log.d(TAG, \"creating table\");\r\n String queryStr = \"\";\r\n String[] colNames = {Constants.COLUMN_NAME_ACC_X, Constants.COLUMN_NAME_ACC_Y, Constants.COLUMN_NAME_ACC_Z};\r\n queryStr += \"create table if not exists \" + Constants.TABLE_NAME;\r\n queryStr += \" ( id INTEGER PRIMARY KEY AUTOINCREMENT, \";\r\n for (int i = 1; i <= 50; i++) {\r\n for (int j = 0; j < 3; j++)\r\n queryStr += colNames[j] + \"_\" + i + \" real, \";\r\n }\r\n queryStr += Constants.COLUMN_NAME_ACTIVITY + \" text );\";\r\n execute(queryStr);\r\n Log.d(TAG, \"created table\");\r\n try {\r\n ContentValues values = new ContentValues();\r\n values.put(\"id\", 0);\r\n insertRowInTable(Constants.TABLE_NAME, values);\r\n Log.d(TAG,\"created hist table\");\r\n }catch (Exception e){\r\n Log.d(TAG,Constants.TABLE_NAME + \" table already exists\");\r\n }\r\n }",
"public static Matrix identity(int N) {\n Matrix I = new Matrix(N, N);\n for (int i = 0; i < N; i++)\n I.data[i][i] = 1;\n return I;\n }",
"public static Matrix identity(int N) {\n Matrix I = new Matrix(N, N);\n for (int i = 0; i < N; i++)\n I.data[i][i] = 1;\n return I;\n }",
"public abstract DataType<T> newInstance();",
"private DefaultTableModel createModel() {\n List list = getDefaultInitialData();//obtenemos toda la lista a mostrar\n Vector data = new Vector();//vector tabla\n if (list != null) {\n for (Object o : list) {\n Vector columnas = new Vector();//columnas para llenar la tabla\n //lenar el vector columna\n Object object = null;\n for (Object x : title) {\n try {\n object = o.getClass().getMethod(\"get\" + convertir(x.toString()), new Class[]{}).invoke(o);\n columnas.add(object);\n } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {\n Logger.getLogger(JCAbstractXTable.class.getName()).log(Level.SEVERE, null, e);\n }\n }\n data.add(columnas);\n }\n }\n return new DefaultTableModel(data, nameColumn());\n }",
"public Matriz(Complejo[][] numeros){\n\t\tthis.numeros = numeros;\n\t}",
"public Matriz( int lin, int col )\n {\n if(lin <= 0 || col <= 0 )\n {\n IO.println(\"ERRO: Quantidade invalida. \" );\n } //end\n else\n {\n table = new Object[lin][col];\n } //end se\n }",
"public Matrix(int nrow, int ncol, double constant){\r\n\t\tthis.nrow = nrow;\r\n\t\tthis.ncol = ncol;\r\n\t\tthis.matrix = new double[nrow][ncol];\r\n \tfor(int i=0;i<nrow;i++){\r\n \t\tfor(int j=0;j<ncol;j++)this.matrix[i][j]=constant;\r\n\t\t}\r\n\t\tthis.index = new int[nrow];\r\n for(int i=0;i<nrow;i++)this.index[i]=i;\r\n \t}",
"private static HashMap<String, GLSLMatrixType> createMatrixTypes() {\n HashMap<String, GLSLMatrixType> matrixTypes = new HashMap<String, GLSLMatrixType>();\n for (int x = 2; x <= 4; x++) {\n for (int y = 2; y <= 4; y++) {\n GLSLMatrixType matrixType = new GLSLMatrixType(x, y);\n matrixTypes.put(matrixType.getTypename(), matrixType);\n if (y == x) {\n matrixTypes.put(\"mat\" + x, matrixType);\n }\n }\n }\n\n return matrixTypes;\n }",
"public Matrix asMatrix() {\n Matrix result;\n try {\n result = new Matrix(COMPONENTS, 1);\n asMatrix(result);\n } catch (final WrongSizeException ignore) {\n // never happens\n result = null;\n }\n return result;\n }",
"public static void createsparse() {\n\t\tmatrix=new int[row][col];\n\t\tString sparseRow=\"\";\n\t\t\n\t\ttry{\n\t Scanner reader = new Scanner(file);\n\t int counter=0;\n\t while(reader.hasNextLine()){\n\t sparseRow=reader.nextLine();\n\t String[] seperatedRow = sparseRow.split(\"\\t\");\n\t for(int i=0;i<seperatedRow.length;i++) {\n\t \t matrix[counter][i]=Integer.parseInt(seperatedRow[i]);\n\t }\n\t counter++;\n\t }\n\t reader.close();\n\t }catch (FileNotFoundException e) {\n\t \t e.printStackTrace();\n\t }\n\t}",
"public hu.blackbelt.epsilon.runtime.model.test1.data.DataModel build() {\n final hu.blackbelt.epsilon.runtime.model.test1.data.DataModel _newInstance = hu.blackbelt.epsilon.runtime.model.test1.data.DataFactory.eINSTANCE.createDataModel();\n if (m_featureNameSet) {\n _newInstance.setName(m_name);\n }\n if (m_featureEntitySet) {\n _newInstance.getEntity().addAll(m_entity);\n } else {\n if (!m_featureEntityBuilder.isEmpty()) {\n for (hu.blackbelt.epsilon.runtime.model.test1.data.util.builder.IDataBuilder<? extends hu.blackbelt.epsilon.runtime.model.test1.data.Entity> builder : m_featureEntityBuilder) {\n _newInstance.getEntity().add(builder.build());\n }\n }\n }\n return _newInstance;\n }",
"public Matrix(int nrOfRows, int nrOfCols) {\n this.nrOfRows = nrOfRows;\n this.nrOfCols = nrOfCols;\n inner = new BigInteger[nrOfRows][nrOfCols];\n }",
"private static double[][] createTrainingMatrix(List<double[]> trainingSourceList) {\t\t\n\t\tdouble[][] trainingMatrix = new double[TRAINING_VALUE_COUNT][trainingSourceList.size()];\n\n\t\tfor(int sourceNr=0; sourceNr<trainingSourceList.size();sourceNr++) {\n\t\t\tdouble[] source = trainingSourceList.get(sourceNr);\n\t\t\tfor(int rowNr=0;rowNr<TRAINING_VALUE_COUNT;rowNr++) {\n\t\t\t\ttrainingMatrix[rowNr][sourceNr] = source[rowNr];\n\t\t\t}\n\t\t}\t\t\n\n\t\treturn trainingMatrix;\n\t}",
"private int[][] createMatrix(List<Integer> vertices, Set<Edge> edges) {\n int[][] matrix = new int[vertices.size()][vertices.size()];\n\n for (Edge e : edges) {\n int u = e.getU();\n int v = e.getV();\n matrix[u][v] = e.getWeight();\n if (!e.isDirected()) {\n matrix[v][u] = e.getWeight();\n }\n }\n return matrix;\n }",
"public Matrix3D(double[] d1) {\n super(3,3);\n int k = -1;\n for (int i=0 ; i<3 ; i++) { // loop over rows\n for (int j=0 ; j<3 ; j++) { // loop over columns\n k++;\n set(i,j,d1[k]); // d[i][j] = d1[k];\n }\n }\n }",
"public TransformationMatrix(double x, double y, double z) {\n\t\tthis(1, 0, 0, x, \n\t\t 0, 1, 0, y, \n\t\t 0, 0, 1, z);\n\t}",
"public Instances generateValuesMatrix(List<HashMap<Integer,AttributeInfo>> datasetAttributeValues) throws Exception {\n ArrayList<Attribute> attributes = generateAttributes(datasetAttributeValues.get(0));\n\n\n Instances finalSet = new Instances(\"trainingSet\", attributes, 0);\n for (HashMap<Integer,AttributeInfo> attValues : datasetAttributeValues) {\n double[] row = new double[datasetAttributeValues.get(0).size()];\n for (int key : attValues.keySet()) {\n AttributeInfo att = attValues.get(key);\n if (att.getAttributeType() == Column.columnType.Numeric) {\n try {\n Object ob = attValues.get(key).getValue();\n if(ob instanceof Integer) {\n row[key] = ((Integer) attValues.get(key).getValue());\n }\n else {\n row[key] = ((Double) attValues.get(key).getValue());\n }\n }\n catch (Exception ex) {\n int x=5;\n }\n }\n else {\n row[key] = (Integer) attValues.get(key).getValue();\n }\n }\n DenseInstance di = new DenseInstance(1.0, row);\n finalSet.add(di);\n }\n return finalSet;\n }",
"public Matrix(int rows, int columns) {\n\t\tthis.rows = rows;\n\t\tthis.columns = columns;\n\t\tthis.matrix = new double[rows][columns];\n\t}",
"Matrix mul(double w){\n Matrix matrix_to_return = new Matrix(this.rows, this.cols);\n for(int i=0; i<this.rows * this.cols; i++){\n matrix_to_return.data[i] = this.data[i] * w;\n }\n return matrix_to_return;\n }",
"public Matrix(double[][] array) {\n this.array = array; // note: danger!\n }",
"public static Matrix constructWithCopy(double[][] A) throws JPARSECException {\n int m = A.length;\n int n = A[0].length;\n Matrix X = new Matrix(m,n);\n double[][] C = X.getArray();\n for (int i = 0; i < m; i++) {\n if (A[i].length != n) {\n throw new JPARSECException\n (\"All rows must have the same length.\");\n }\n for (int j = 0; j < n; j++) {\n C[i][j] = A[i][j];\n }\n }\n return X;\n }",
"public Matriz(int fila, int columna) {\n\t\tmatriz = new int[fila][columna];\n\t}",
"public Matrix3x3rc (long[] in_array) throws WrongLength{ //throws error of type WrongLength if input array length is not 9\n\t\tif (in_array.length != 9){\n\t\t\tthrow new WrongLength (9, in_array.length, \"in_array\");\n\t\t}\n\t\telse{ //changes global record if length of input array == 9\n\t\t\t//since every 3 elements of the input array correspond to a row of the matrix, every 3 elements are stored in\n\t\t\t//a column register, then the column registers are stored in a row register\n\t\t\tcolRow3 a1 = new colRow3(in_array[0], in_array[1], in_array[2]); //stores 1st row\n\t\t\tcolRow3 b1 = new colRow3(in_array[3], in_array[4], in_array[5]); //stores 2nd row\n\t\t\tcolRow3 c1 = new colRow3(in_array[6], in_array[7], in_array[8]); //stores 3rd row\n\t\t\tthis.mat = new Row3(a1, b1, c1); //stores all 3 record in global record\n\t\t}\n\t}",
"public TransformationMatrix(double a11, double a12, double a13, double a14,\n\t\t\t\t\t\t\t\tdouble a21, double a22, double a23, double a24,\n\t\t\t\t\t\t\t\tdouble a31, double a32, double a33, double a34) {\n\t\tthis.a11 = a11; this.a12 = a12; this.a13 = a13; this.a14 = a14;\n\t\tthis.a21 = a21; this.a22 = a22; this.a23 = a23; this.a24 = a24;\n\t\tthis.a31 = a31; this.a32 = a32; this.a33 = a33; this.a34 = a34;\n\t}",
"public Map(){\n this.matrix = new int[10][10];\n }",
"public static OrglRoot makeData(PrimDataArray values, Arrangement arrangement) {\n\treturn ActualOrglRoot.make((Loaf.make(values, arrangement)), arrangement.region());\n/*\nudanax-top.st:9861:OrglRoot class methodsFor: 'creation'!\n{OrglRoot} makeData: values {PrimDataArray} with: arrangement {Arrangement}\n\t\"Make an Orgl from a bunch of Data. The data is \n\tguaranteed to be of a reasonable size.\"\n\t^ActualOrglRoot \n\t\tmake: (Loaf make: values with: arrangement)\n\t\twith: arrangement region!\n*/\n}",
"public void createModel(final JTable jTableData, final Object[][] data,\r\n\t\t\tfinal String[] columns) {\r\n\t\t/*\r\n\t\t * First we create the main model We overide the AbstractTableModel\r\n\t\t * necessary methods\r\n\t\t */\r\n\t\tAbstractTableModel modelo = new AbstractTableModel() {\r\n\t\t\tpublic String getColumnName(int col) {\r\n\t\t\t\treturn columns[col].toString();\r\n\t\t\t}\r\n\r\n\t\t\tpublic Class getColumnClass(int col) {\r\n\t\t\t\tif (getRowCount() < 1)\r\n\t\t\t\t\treturn null;\r\n\t\t\t\treturn data[0][col].getClass();\r\n\t\t\t}\r\n\r\n\t\t\tpublic int getRowCount() {\r\n\t\t\t\treturn data.length;\r\n\t\t\t}\r\n\r\n\t\t\tpublic int getColumnCount() {\r\n\t\t\t\treturn columns.length;\r\n\t\t\t}\r\n\r\n\t\t\tpublic Object getValueAt(int row, int col) {\r\n\t\t\t\treturn data[row][col];\r\n\t\t\t}\r\n\r\n\t\t\tpublic boolean isCellEditable(int row, int col) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tpublic void setValueAt(Object value, int row, int col) {\r\n\t\t\t\tdata[row][col] = value;\r\n\t\t\t\tfireTableCellUpdated(row, col);\r\n\t\t\t}\r\n\t\t};\r\n\t\t/* We apply the model to the main jTable */\r\n\t\tjTableData.setModel(modelo);\r\n\t\t/*\r\n\t\t * We create a cell Renderer to display the data of the multivalue\r\n\t\t * fields\r\n\t\t */\r\n\t\tTableCellRenderer jTableCellRenderer = new TableCellRenderer() {\r\n\t\t\t/* Magic Happens */\r\n\t\t\tpublic Component getTableCellRendererComponent(JTable table,\r\n\t\t\t\t\tObject value, boolean isSelected, boolean hasFocus,\r\n\t\t\t\t\tint row, int column) {\r\n\t\t\t\t/*\r\n\t\t\t\t * If what we're displaying isn't an array of values we return\r\n\t\t\t\t * the normal renderer\r\n\t\t\t\t */\r\n\t\t\t\tif (!value.getClass().isArray()) {\r\n\t\t\t\t\treturn table.getDefaultRenderer(value.getClass())\r\n\t\t\t\t\t\t\t.getTableCellRendererComponent(table, value,\r\n\t\t\t\t\t\t\t\t\tisSelected, hasFocus, row, column);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfinal Object[] passed = (Object[]) value;\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * We create the table that will hold the multivaluefields\r\n\t\t\t\t\t * and that will be embedded in the main table\r\n\t\t\t\t\t */\r\n\t\t\t\t\tJTable embedded = new JTable(new AbstractTableModel() {\r\n\t\t\t\t\t\tpublic int getColumnCount() {\r\n\t\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tpublic int getRowCount() {\r\n\t\t\t\t\t\t\treturn passed.length;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tpublic Object getValueAt(int rowIndex, int columnIndex) {\r\n\t\t\t\t\t\t\treturn passed[rowIndex];\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tpublic boolean isCellEditable(int row, int col) {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif (isSelected) {\r\n\t\t\t\t\t\tembedded.setBackground(jTableData\r\n\t\t\t\t\t\t\t\t.getSelectionBackground());\r\n\t\t\t\t\t\tembedded.setForeground(jTableData\r\n\t\t\t\t\t\t\t\t.getSelectionForeground());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (hasFocus) {\r\n\t\t\t\t\t\tembedded.setRowSelectionInterval(0, 1);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * If this is what you plan to enable mouseClick detection,\r\n\t\t\t\t\t * in your table, IT WONT WORK. Have a look at\r\n\t\t\t\t\t * TableCellEditor.\r\n\t\t\t\t\t */\r\n\t\t\t\t\tembedded.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent evt) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"PEPE\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tif (Character.isDigit(((String) passed[0]).charAt(1))) {\r\n\t\t\t\t\t\tsetPreferredSize(embedded.getPreferredSize());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t//faire ca\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (getPreferredSize().height != table.getRowHeight(row)) {\r\n\t\t\t\t\t\ttable.setRowHeight(row, getPreferredSize().height);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/**/\r\n\r\n\t\t\t\t\treturn embedded;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\t/* Finally we apply the new cellRenderer to the whole table */\r\n\t\tTableColumnModel tcm = jTableData.getColumnModel();\r\n\t\tfor (int it = 0; it < tcm.getColumnCount(); it++) {\r\n\t\t\ttcm.getColumn(it).setCellRenderer(jTableCellRenderer);\r\n\t\t\t// tcm.getColumn(it).setCellEditor(jTableCellEditor);\r\n\t\t}\r\n\t\t/*\r\n\t\t * Note: if we need to edit the values inside the embedded jtable we\r\n\t\t * will need to create a TableCellEditor too.\r\n\t\t */\r\n\r\n\t}",
"public Matrix(double[][] twoD){\r\n\t\tthis.nrow = twoD.length;\r\n\t\tthis.ncol = twoD[0].length;\r\n\t\tfor(int i=0; i<nrow; i++){\r\n\t\t if(twoD[i].length!=ncol)throw new IllegalArgumentException(\"All rows must have the same length\");\r\n\t\t}\r\n\t\tthis.matrix = twoD;\r\n\t\tthis.index = new int[nrow];\r\n for(int i=0;i<nrow;i++)this.index[i]=i;\r\n \t}",
"public Matrice(int dim){\n\t\tnr=dim;\n\t\tnc=nr;\n\t\tmat = new int[nr][nc];\n\t}",
"protected GamaMatrix(final IScope scope, final List objects, final ILocation preferredSize, final IType contentsType) {\r\n\t\tif ( preferredSize != null ) {\r\n\t\t\tnumRows = (int) preferredSize.getY();\r\n\t\t\tnumCols = (int) preferredSize.getX();\r\n\t\t} else if ( objects == null || objects.isEmpty() ) {\r\n\t\t\tnumRows = 1;\r\n\t\t\tnumCols = 1;\r\n\t\t} else if ( GamaMatrix.isFlat(objects) ) {\r\n\t\t\tnumRows = 1;\r\n\t\t\tnumCols = objects.size();\r\n\t\t} else {\r\n\t\t\tnumCols = objects.size();\r\n\t\t\tnumRows = ((List) objects.get(0)).size();\r\n\t\t}\r\n\t\tthis.type = Types.MATRIX.of(contentsType);\r\n\t}"
] | [
"0.6347886",
"0.6304376",
"0.6251528",
"0.6208592",
"0.6147106",
"0.5980633",
"0.5955021",
"0.5941114",
"0.5929649",
"0.59202695",
"0.589624",
"0.58726233",
"0.58483964",
"0.5772704",
"0.576565",
"0.57233167",
"0.5718121",
"0.5672478",
"0.5668678",
"0.56561154",
"0.563627",
"0.5635518",
"0.5612856",
"0.5575316",
"0.55707467",
"0.55537087",
"0.55536056",
"0.55466855",
"0.55397594",
"0.55271554",
"0.55219454",
"0.5508257",
"0.54375064",
"0.53787696",
"0.5376478",
"0.53653854",
"0.5356278",
"0.5342951",
"0.53292614",
"0.5294447",
"0.5279466",
"0.52753735",
"0.52661884",
"0.5264207",
"0.5258343",
"0.5256941",
"0.5256573",
"0.522642",
"0.5198858",
"0.5190249",
"0.5188024",
"0.51751",
"0.51411253",
"0.51369554",
"0.51367056",
"0.51347214",
"0.51336664",
"0.51306576",
"0.5130415",
"0.51291025",
"0.51210237",
"0.5103679",
"0.50915676",
"0.50797844",
"0.5075582",
"0.5073155",
"0.5070203",
"0.5069876",
"0.50593823",
"0.5053049",
"0.5050302",
"0.5050302",
"0.50452876",
"0.504086",
"0.50391316",
"0.5036566",
"0.5036204",
"0.5029204",
"0.5025263",
"0.50224483",
"0.5012711",
"0.501188",
"0.50086385",
"0.49973974",
"0.49954224",
"0.49948627",
"0.49891436",
"0.49824974",
"0.4979495",
"0.49786288",
"0.49783948",
"0.49782696",
"0.4975425",
"0.49737552",
"0.49732837",
"0.49697146",
"0.49632072",
"0.49557787",
"0.49507284",
"0.49504727"
] | 0.6141282 | 5 |
Sets all elements to zero of a matrix. | public void setToZero() {
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
data[i][j] = 0;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void SetMatrixToZeros() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 0;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 0;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 0;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 0;\t\n \n }",
"public static void zeroMatrix(int[][] matrix) {\n printMatrix(matrix);\n\n boolean [] rowZero = new boolean[matrix.length];\n boolean [] colZero = new boolean[matrix[0].length];\n\n for (int row = 0; row < matrix.length; row++) {\n for (int col = 0; col < matrix[0].length; col++) {\n if (matrix[row][col] == 0) {\n rowZero[row] = true;\n colZero[col] = true;\n }\n }\n }\n\n for (int r = 0; r < rowZero.length; r++) {\n if (rowZero[r]) {\n for (int i = 0; i < colZero.length; i++) {\n matrix[r][i] = 0;\n }\n }\n }\n\n for (int c = 0; c < colZero.length; c++) {\n if (colZero[c]) {\n for (int i = 0; i < rowZero.length; i++) {\n matrix[i][c] = 0;\n }\n }\n }\n\n printMatrix(matrix);\n }",
"public void setZeroes(int[][] matrix) {\n if (matrix == null || matrix.length == 0) {\n return;\n }\n int[] m = new int[matrix.length];\n int[] n = new int[matrix[0].length];\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[0].length; j++) {\n if (matrix[i][j] == 0) {\n m[i]++;\n n[j]++;\n }\n }\n }\n for (int i = 0; i < m.length; i++) {\n if (m[i] > 0) {\n Arrays.fill(matrix[i], 0);\n }\n }\n for (int j = 0; j < n.length; j++) {\n if (n[j] > 0) {\n for (int k = 0; k < matrix.length; k++) {\n matrix[k][j] = 0;\n }\n }\n }\n }",
"public void setZeroes(int[][] matrix) {\n\t\t\tint m = matrix.length;\n\t\t\tint n = matrix[0].length;\n\t\t\t\n\t\t\tboolean fc = false, fr = false; // first row, first column as markers\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (matrix[i][j] == 0) {\n\t\t\t\t\t\tif (i == 0) fr = true;\n\t\t\t\t\t\tif (j == 0) fc = true;\n\t\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 1; i < m; i++) {\n\t\t\t\tfor (int j = 1; j < n; j++) {\n\t\t\t\t\tif (matrix[0][j] == 0 || matrix[i][0] == 0) {\n\t\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fr) {\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fc) {\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public static void setZeroes(int[][] matrix) {\n boolean[] row = new boolean[matrix.length];\n boolean[] col = new boolean[matrix[0].length];\n\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[0].length; j++) {\n if (matrix[i][j] == 0) {\n row[i] = true;\n col[j] = true;\n }\n }\n }\n\n // Loop through each row and col arrays to see where zeroes are to be set in matrix\n for (int i = 0; i < row.length; i++) {\n if (row[i]) {\n setRowsToZeroes(matrix, i);\n }\n }\n\n for (int j = 0; j < col.length; j++) {\n if (col[j]) {\n setColsToZeroes(matrix, j);\n }\n }\n }",
"public void setZeroes_ok(int[][] matrix) {\n\t\tif (matrix == null || matrix.length == 0)\n\t\t\treturn;\n\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\n\t\tif (m == 1) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (matrix[0][j] == 0) {\n\t\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\t\tmatrix[0][k] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (n == 1) {\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tif (matrix[i][0] == 0) {\n\t\t\t\t\tfor (int k = 0; k < m; k++) {\n\t\t\t\t\t\tmatrix[k][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint idx = 0;\n\t\tboolean[][] visit = new boolean[m][n];\n\t\twhile (idx <= m * n - 1) {\n\t\t\tint i = idx / n;\n\t\t\tint j = idx % n;\n\t\t\tif (i < m && j < n && matrix[i][j] == 0 && visit[i][j] == false) {\n\t\t\t\t// set whole row to 0\n\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\tif (matrix[i][k] != 0) {\n\t\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t\t\tvisit[i][k] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set whole col to 0\n\t\t\t\tfor (int l = 0; l < m; l++) {\n\t\t\t\t\tif (matrix[l][j] != 0) {\n\t\t\t\t\t\tmatrix[l][j] = 0;\n\t\t\t\t\t\tvisit[l][j] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tidx++;\n\t\t}\n\t}",
"public void setMatrixZeroes(int[][] M) {\n int m = M.length;\n int n = M[0].length;\n\n boolean firstRowContainsZero = false;\n boolean firstColContainsZero = false;\n\n for(int j=0; j<n; j++) {\n if(M[0][j] == 0) {\n firstRowContainsZero = true;\n break;\n }\n }\n\n for(int i=0; i<m; i++) {\n if(M[i][0] == 0) {\n firstColContainsZero = true;\n break;\n }\n }\n\n for(int i=1; i<m; i++) {\n for(int j=1; j<n; j++) {\n if(M[i][j] == 0) {\n M[0][j] = 0;\n M[i][0] = 0;\n }\n }\n }\n\n for(int i=1; i<m; i++) {\n if(M[i][0] == 0) {\n for(int j=1; j<n; j++)\n M[i][j] = 0;\n }\n }\n\n for(int j=1; j<n; j++) {\n if(M[0][j] == 0) {\n for(int i=1; i<m; i++)\n M[i][j] = 0;\n }\n }\n\n if(firstRowContainsZero) {\n for(int j=0; j<n; j++)\n M[0][j] = 0;\n }\n\n if(firstColContainsZero) {\n for(int i=0; i<m; i++)\n M[i][0] = 0;\n }\n }",
"public void setZeroes(int[][] matrix) {\n int MOD = -1000000;\n //no of rows\n int m = matrix.length;\n //no of columns\n int n = matrix[0].length;\n //Iterate over the matrix\n for (int i = 0; i<m; i++)\n {\n for (int j = 0; j<n; j++)\n {\n //check if element is 0\n if(matrix[i][j] == 0)\n {\n \n //for all the values in that row i which contains the 0 element \n for (int k = 0; k < n ; k++)\n {\n //Check for non zero elements in that row \n if(matrix[i][k] !=0)\n {\n //Assign dummy value to it\n matrix[i][k] = MOD;\n }\n }\n //all the values in that column j which contains the 0 element\n for (int k=0; k< m; k++)\n { \n //Check for non zero elements in that column\n if(matrix[k][j]!=0)\n {\n //Assign dummy value to it\n matrix[k][j] = MOD;\n } \n }\n }\n }\n }\n //Iterate again for final output matrix\n for (int i = 0; i< m ; i++)\n {\n for (int j = 0; j< n; j++ )\n {\n //Check if the value of element is MOD\n if (matrix[i][j] == MOD)\n {\n //if so Change to 0\n matrix[i][j] = 0;\n }\n }\n }\n \n }",
"public void setZeroes2(int[][] matrix) {\n\t\tif (matrix == null || matrix.length == 0 ||\n matrix[0] == null || matrix[0].length == 0)\n return;\n\n int r = matrix.length, c = matrix[0].length;\n boolean[] rows = new boolean[r], cols = new boolean[c];\n for (int i = 0; i < r; i++) {\n for (int j = 0; j < c; j++) {\n if (matrix[i][j] == 0) {\n rows[i] = true;\n cols[j] = true;\n }\n }\n }\n\n for (int i = 0; i < r; i++) {\n for (int j = 0; j < c; j++) {\n if (rows[i] || cols[j])\n matrix[i][j] = 0;\n }\n }\n }",
"public void zeroMatrix(int[][] matrix, int m, int n){\n \t boolean row0=false;\n \t boolean co0=false;\n \t for(int i=0;i<n;i++){//Check if the 1st row has a zero\n \t\t if(matrix[0][i]==0){\n \t\t\t row0=true;\n \t\t\t break;\n \t\t }\n \t }\n \t for(int i=0;i<m;i++){//Check if the 1st column has a zero \n \t\t if(matrix[i][0]==0){\n \t\t\t co0=true;\n \t\t\t break;\n \t\t }\n \t }\n\n \t for(int i=1;i<m;i++){// Using 1st row and 1st column to record which row and which column has zero\n \t\tfor(int j=1;j<n;j++){\n \t\t\tif(matrix[i][j]==0){\n \t\t\t\tmatrix[0][j]=0;\n \t\t\t\tmatrix[i][0]=0;\n \t\t\t}\n \t\t}\n \t}\n \t for(int i = 1; i < matrix.length; i++) {//Set the matrix zero\n \t for(int j = 1; j < matrix[0].length; j++) {\n \t if(matrix[i][0] == 0 || matrix[0][j] == 0) {\n \t matrix[i][j] = 0;\n \t }\n \t }\n \t }\n \tif(row0){//Set the 1st row zero\n \t\tfor(int i = 0; i < n; i++) {\n matrix[0][i] = 0;\n }\n \t}\n \tif(co0){//Set the 1st column zero\n \t\tfor(int i = 0; i < m; i++) {\n matrix[i][0] = 0;\n }\n \t}\n }",
"public void setZeroes2(int[][] matrix) {\n boolean row00 = false;\n boolean col00 = false;\n\n int row = 0, col = 0;\n int rows = matrix.length;\n int cols = matrix[0].length;\n while (col < cols && !row00) {\n row00 = matrix[0][col++] == 0;\n }\n while (row < rows && !col00) {\n col00 = matrix[row++][0] == 0;\n }\n\n for (row = 1; row < rows; ++row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n matrix[row][0] = 0;\n matrix[0][col] = 0;\n }\n }\n }\n for (row = 1; row < rows; ++row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[0][col] == 0 || matrix[row][0] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (row00) {\n for (col = 0; col < cols; ++col) {\n matrix[0][col] = 0;\n }\n }\n if (col00) {\n for (row = 0; row < rows; ++row) {\n matrix[row][0] = 0;\n }\n }\n }",
"public void clear() {\n rows = cols = 0;\n matrix.clear();\n }",
"public int[][] zeroMatrix(int[][] matrix){\n\tboolean[][] zeros = new boolean[matrix.length][matrix[0].length];\n\tfor (int i = 0; i < matrix.length; i++){\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (matrix[i][j] == 0) zeros[i][j] = true;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < matrix.length; i++) {\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (zeros[i][j]){\n\t\t\t\tfor (int k = 0; k < matrix.length; k++){\n\t\t\t\t\tmatrix[k][j] = 0;\n\t\t\t\t}\n\t\t\t\tfor (int k = 0; k < matrix[0].length; k++){\n\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn matrix;\n}",
"public static void zeroMatrix(int[][] matrix) {\n ArrayList<ArrayList<Integer>> list = new ArrayList<>(); // creates array of array of integers to store coordinates\n for (int i = 0; i < matrix.length; i++) { // go through each point in matrix\n for (int j = 0; j < matrix[0].length; j++) {\n if (matrix[i][j] == 0) { // if the point in the matrix contains 0...\n ArrayList<Integer> subList = new ArrayList<>(); // create ArrayList to store point values\n subList.add(i); // add y\n subList.add(j); // add x\n list.add(subList); // add these points to the array containing points\n }\n }\n }\n fill(list, matrix); // helper method to fill in the matrix\n }",
"public void setZeroes1(int[][] matrix) {\n boolean col00 = false;\n\n int row, col;\n int rows = matrix.length;\n int cols = matrix[0].length;\n for (row = 0; row < rows; ++row) {\n for (col = 0; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n if (col != 0) {\n matrix[0][col] = 0;\n matrix[row][0] = 0;\n } else {\n col00 = true;\n }\n }\n }\n }\n for (row = rows - 1; row >= 0; --row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][0] == 0 || matrix[0][col] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (col00) {\n for (row = rows - 1; row >= 0; --row) {\n matrix[row][0] = 0;\n }\n }\n }",
"public static void setRowsToZeroes(int[][] matrix, int row) {\n for (int j = 0; j < matrix[0].length; j++) {\n matrix[row][j] = 0;\n }\n }",
"private static void setFirstRowToZero(int[][] matrix,int numberOfColumns){\n for(int i=0;i<numberOfColumns;i++){\n matrix[0][i]=0;\n }\n }",
"static void setFirstColumnToZero(int[][] matrix,int numberOfRows){\n for(int i=0;i<numberOfRows;i++){\n matrix[i][0]=0;\n }\n }",
"public void resetMMatrix() {\n Matrix.setIdentityM(mModelMatrix, 0);\n }",
"public void clearA(){\n for (int i = 0; i < I+1; i++){\n for (int j = 0; j < I+1; j++){\n a[i][j][I] = 0.0;\n }\n }\n\t }",
"void markRowAndColumnZero(int[][] matrix) {\n HashSet<Integer> rows = new HashSet<Integer>();\n HashSet<Integer> columns = new HashSet<Integer>();\n for(int i=0; i< matrix.length;i++) {\n for(int j =0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) {\n rows.add(i);\n columns.add(j);\n }\n }\n }\n Iterator<Integer> rowsIterator = rows.iterator();\n while(rowsIterator.hasNext()) {\n int rowToBeSetToZero = rowsIterator.next();\n for(int i=0;i< matrix[0].length;i++) {\n matrix[rowToBeSetToZero][0] = 0;\n }\n }\n\n Iterator<Integer> columnsIterator = columns.iterator();\n while(columnsIterator.hasNext()) {\n int columnToBeSetToZero = columnsIterator.next();\n for(int i=0;i< matrix[0].length;i++) {\n matrix[i][columnToBeSetToZero] = 0;\n }\n }\n\n return;\n\n\n }",
"static void update(int[][] matrix){\n\t\tboolean rowFlag = false;\n\t\tboolean colFlag = false;\n\t\tint n = matrix.length;\n int m = matrix[0].length;\n for(int i=0;i<n;i++){\n for(int j=0;j<m;j++){\n if(i==0 && matrix[i][j]==0){\n rowFlag =true;\n }\n if(j==0 && matrix[i][j]==0){\n colFlag = true;\n }\n if(matrix[i][j]==0){\n matrix[0][j] = 0;\n matrix[i][0] = 0;\n }\n }\n }\n for(int i=1;i<n;i++){\n for(int j=1;j<m;j++){\n if(matrix[i][0]==0||matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n if(rowFlag){\n for(int i=0;i<m;i++){\n matrix[0][i] =0 ;\n }\n }\n if(colFlag){\n for(int j=0;j<n;j++){\n matrix[j][0] = 0;\n }\n }\n\n\t}",
"public void reset() {\n for (int i = 0; i < this.numRows; i++) {\n this.rows[i] = new int[0];\n }\n for (int k = 0; k < this.numCols; k++) {\n this.cols[k] = new IntOpenHashSet();\n }\n }",
"public void nullifyMatrixEfficient(int[][] mat) {\r\n boolean hasRow=false, hasCol=false;\r\n //checking first row and colmun about having any zero so later we can nullify it\r\n for (int i=0;i<mat[0].length;i++ ) {\r\n if(mat[0][i] == 0) {\r\n hasRow = true;\r\n break;\r\n }\r\n }\r\n for (int i=0;i<mat.length;i++ ) {\r\n if(mat[i][0] == 0) {\r\n hasCol = true;\r\n break;\r\n }\r\n }\r\n //checking zeros existance and marking their coresponding first row and col to zero\r\n for (int i=0;i<mat.length ;i++ ) {\r\n for (int j=0; j<mat[0].length;j++ ) {\r\n if(mat[i][j] == 0) {\r\n mat[0][j] = 0;\r\n mat[i][0] = 0;\r\n }\r\n }\r\n }\r\n //nullify all columns with first element is zero\r\n for(int i=0; i<mat[0].length; i++) {\r\n if(mat[0][i] == 0)\r\n helperNullifyColumn(mat, i);\r\n }\r\n \r\n //nullify all rows with first element is zero\r\n for(int i=0; i<mat.length; i++) {\r\n if(mat[i][0] == 0)\r\n helperNullifyRow(mat, i);\r\n }\r\n printMat(mat);\r\n }",
"private static void zero(int[] x)\n {\n for (int i = 0; i != x.length; i++)\n {\n x[i] = 0;\n }\n }",
"public void SetMatrixToIdentity() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 1;\t\n \n }",
"public void resetBoard() {\n\t\t\n\t\tfor(int row = 0; row < board.length; row++) {\n\t\t\tfor(int col = 0; col < board[row].length; col++) {\n\t\t\t\t\n\t\t\t\tboard[row][col] = 0;\n\t\t\t}\n\t\t}\n\t}",
"public void SetMatrixToOnes() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 1;\tthis.mat_f_m[0][2] = 1;\t this.mat_f_m[0][3] = 1;\n\tthis.mat_f_m[1][0] = 1;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 1;\t this.mat_f_m[1][3] = 1;\n\tthis.mat_f_m[2][0] = 1;\t this.mat_f_m[2][1] = 1;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 1;\n\tthis.mat_f_m[3][0] = 1;\t this.mat_f_m[3][1] = 1;\tthis.mat_f_m[3][2] = 1;\t this.mat_f_m[3][3] = 1;\t\n \n }",
"void makeZero(){\n nnz = 0;\n for(int i=0; i<this.matrixSize; i++){\n this.rows[i] = new List();\n }\n }",
"public void zero() {\n fill(0);\n }",
"private void setEmpty() {\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++)\n\t\t\t\tboard[r][c] = new Cell(false, false,\n\t\t\t\t\t\tfalse, false); // totally clear.\n\t}",
"public void clear() {\r\n //This for loop assigns every value in the gameBoard array to -1\r\n //Using the Arrays.fill method and the for loop it fills in all sub arrays\r\n for (int i = 0; i < gameBoard.length; i++) {\r\n Arrays.fill(gameBoard[i], -1);\r\n }\r\n }",
"public void clear() {\n\t\tfor(int i=0;i<height;i++) {\n\t\t\tfor(int j=0;j<width;j++) {\n\t\t\t\tgrid[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}",
"public final void setZero() {\n \t\n\t\tthis.m00 = 0.0F;\n\t\tthis.m01 = 0.0F;\n\t\tthis.m02 = 0.0F;\n\t\tthis.m10 = 0.0F;\n\t\tthis.m11 = 0.0F;\n\t\tthis.m12 = 0.0F;\n\t\tthis.m20 = 0.0F;\n\t\tthis.m21 = 0.0F;\n\t\tthis.m22 = 0.0F;\n }",
"public void zero() {\r\n\t\tthis.x = 0.0f;\r\n\t\tthis.y = 0.0f;\r\n\t}",
"private static void changeSubMatrix(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++){\n if(matrix[i][0]==0 || matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n }",
"public void clear() {\n\tn = 0;\n\tArrays.fill(sums, 0.0);\n\tArrays.fill(productsSums, 0.0);\n }",
"public static int[][] makeMatrixZero(int[][] inputMatrix) {\n\t\tint[][] outputMat = zeroInit();\n\n\t\tfor (int i = 0; i < INDEX; i++) {\n\t\t\tfor (int j = 0; j < INDEX; j++) {\n\t\t\t\tif(outputMat[i][j] !=0)\n\t\t\t\t\toutputMat[i][j] = inputMatrix[i][j];\n\t\t\t\t\n\t\t\t\tif (inputMatrix[i][j] == 0) {\n\t\t\t\t\tfor (int k = 0; k < INDEX; k++) {\n\t\t\t\t\t\toutputMat[i][k] = 0;\n\t\t\t\t\t\toutputMat[k][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t} \n\n\t\t\t}\n\t\t}\n\n\t\treturn outputMat;\n\t}",
"private void resetMatrix() {\n mSuppMatrix.reset();\n setImageViewMatrix(getDrawMatrix());\n checkMatrixBounds();\n }",
"public void clear(){\r\n\t\tfor ( int x = 0; x < grid.length; x++ )\r\n\t\t\tfor ( int y = 0; y < grid[0].length; y++ )\r\n\t\t\t\tgrid[x][y] = false;\r\n\t}",
"public void reset() {\n for (int r = 0; r < size; r++) {\n for (int c = 0; c < size; c++) {\n board[r][c] = null;\n }\n }\n }",
"public void resetSudoku(){\n\t\tfor (int i = 0; i < size*size; i++){\n\t\t\tfor (int j = 0; j < size*size; j++){\n\t\t\t\tif (!fixedNumbers[i][j])\n\t\t\t\t\tnumbers[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}",
"public static void clearBoard() {\n for (int row = 0; row < SIZE_ROW; row++) {\n for (int col = 0; col < SIZE_COL; col++) {\n board[row][col] = 0;\n }\n }\n }",
"public void nullifyMatrix(int[][] mat) {\r\n //extra space\r\n boolean rows[] = new boolean[mat[0].length];\r\n boolean columns[] = new boolean[mat.length];\r\n \r\n for (int i=0;i<mat.length ;i++ ) {\r\n for (int j=0; j<mat[0].length;j++ ) {\r\n if(mat[i][j] == 0) {\r\n rows[i] = true;\r\n columns[j] = true;\r\n }\r\n } \r\n }\r\n \r\n //Nullify rows\r\n for(int i=0; i<rows.length; i++) {\r\n if(rows[i])\r\n helperNullifyRow(mat, i);\r\n }\r\n //Nullify columns\r\n for(int i=0; i<columns.length; i++) {\r\n if(columns[i])\r\n helperNullifyColumn(mat,i);\r\n }\r\n printMat(mat);\r\n }",
"private void reset() {\n\t\tfor(int i = 0; i < 5; i++) {\n\t\t\treactantAmt[i] = 0;\n\t\t\tproductAmt[i] = 0;\n\t\t\treactantMM[i] = 0;\n\t\t\tproductMM[i] = 0;\n\t\t\treactantMoles[i] = 0;\n\t\t\tproductMoles[i] = 0;\n\t\t\tfinalMolReactant[i] = 0;\n\t\t\tfinalMolProduct[i] = 0;\n\t\t\tremove();\n\t\t}\n\t}",
"public void makeIdentity() {\n if (rows == cols) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n if (i == j) {\n matrix.get(i)[j] = 1;\n }\n else {\n matrix.get(i)[j] = 0;\n }\n }\n }\n }\n else {\n throw new NonSquareMatrixException();\n }\n }",
"public void clear() {\r\n\t\t//this method clears all the arrays and initiallizes them to 0.\r\n Arrays.fill(co,0);\r\n Arrays.fill(degree,0); \r\n Arrays.fill(sinc,0); \r\n Arrays.fill(sind,0); \r\n Arrays.fill(cosc,0); \r\n Arrays.fill(cosd,0); \r\n Arrays.fill(tanc,0); \r\n Arrays.fill(tand,0);\r\n cindex = 0;\r\n sinindex = 0;\r\n cosindex = 0;\r\n tanindex = 0; \r\n\t}",
"public void setMatrix(int[] matrix) {\n this.matrix = matrix;\n this.emptyTileIndex = indexOfEmptyTile();\n if (this.emptyTileIndex == -1) throw new IllegalStateException(\"Board does not contains empty tile!\");\n }",
"protected void clearAll() {\n for (int i=0; i <= (Numbers.INTEGER_WIDTH*8-2); i++) {\n \tthis.clearBitAt(i);\n } \t\n }",
"public void clear()\n\t{\n\t\tfor (int i = 0; i < data.length; i++)\n\t\t{\n\t\t\tdata[i] = 0;\n\t\t}\n\t}",
"public void clear() {\n sumX = 0d;\n sumXX = 0d;\n sumY = 0d;\n sumYY = 0d;\n sumXY = 0d;\n n = 0;\n }",
"@Override\n\tpublic void reset() {\n\t\tfor (int i = 0; i < _board.length; i++)\n for (int j = 0; j < _board[i].length; j++)\n \t_board[i][j] = null;\n\n\t\t_columnFull = new HashSet<Integer>();\n\t\t_lastPosition = new HashMap<Integer,Integer>();\n\t}",
"public void setIdentity() {\n System.arraycopy(IDENTITY, 0, matrix, 0, 16);\n }",
"public void resetZero() {\n\t\tset((byte) (get() & ~(1 << 7)));\n\t}",
"public void reset() {\n\t\t//reset player to 0\n\t\tplayer = 0;\n\t\t\n\t\tfor(int row = size - 1; row >= 0; row --)\n\t\t\tfor(int col = 0; col < size; col ++)\n\t\t\t\tfor(int dep = 0; dep < size; dep ++)\n\t\t\t\t\t//goes through all board positions and sets to -1\n\t\t\t\t\tboard[row][col][dep] = -1;\n\t}",
"private static void changeFirstRowAndColumn(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++) {\n if(matrix[i][j]==0){\n matrix[i][0]=0;\n matrix[0][j]=0;\n }\n }\n }\n }",
"private void setZero(){\r\n\t for(int i = 0; i < nodes.size(); i++){\r\n\t Node currentNode = nodes.get(i);\r\n\t for (int j = 0; j < currentNode.getEdges().size(); j++){\r\n\t Edge currentEdge = currentNode.getEdge(j);\r\n\t currentEdge.setResidualFlow(currentEdge.getFlow());\r\n\t currentEdge.setFlow(0);\r\n }\r\n }\r\n }",
"public static void main(String[] args) {\n\t// write your code here\n int [] [] matrix = {{1,2,8,4}, {5,0,7,8}, {3,4,0,1}};\n zeroMatrix(matrix);\n }",
"public void zeroValues()\n {\n fx = 0.0f;\n fy = 0.0f;\n fz = 0.0f;\n magnitude = 0.0f;\n }",
"private void clear() {\n\t\tfor(int i = 0; i < 9; i++){\n\t\t\tfor(int k = 0; k < 9; k++){\n\t\t\t\tfield[i][k].clear();\n\t\t\t\tsudokuBoard.clear();\n\t\t\t}\n\t\t}\n\t}",
"public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}",
"@Override\r\n\tpublic void reset() {\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++)\r\n\t\t\t\tgame[i][j].Clear();\r\n\t\t}\r\n\t\tcomputerTurn();\r\n\t\tcomputerTurn();\r\n\t\tfreeCells = rows_size*columns_size - 2;\r\n\t\ttakenCells = 2;\r\n\t}",
"public void clear() {\n\t members = 0;\n\t dense[0] = -1;\n\t}",
"public void resetMoeglichkeiten(){\t\t\n\t\tfor( int iSpalten = 0; iSpalten < kacheln.length;iSpalten++){\t\t\t\n\t\t\tfor (int jReihen = 0; jReihen < kacheln[iSpalten].length;jReihen++){\n\t\t\t\tkacheln[iSpalten][jReihen].setMoeglichkeitenHierher(null);\n\t\t\t}\t\t\t\n\t\t}\n\t}",
"public void limpiarMesa() {\n for (int i = 0; i < mesa.length; i++) {\n mesa[i][1] = 0;\n }\n }",
"public void clear() {\n\n\t\tdata = null;\n\t\tnumRows = 0;\n\t\tnumCols = 0;\n\t\tsize = 0L;\n\n\t}",
"public void clearAll() {\r\n\t\tfor (EnTablero et : listaElementos) et.setTablero( null ); // Anula tablero de todos los elementos previos\r\n\t\tlistaElementos.clear();\r\n\t\tfor (int f=0; f<numFilas; f++) {\r\n\t\t\tfor (int c=0; c<numColumnas; c++) {\r\n\t\t\t\telementosTablero[f][c] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void bestApproach(int matrix[][]){\n\t\t\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\t\n\t\t//Taking two variables for storing status of first row and column\n\t\tboolean firstRow = false;\n\t\tboolean firstColumn = false;\n\t\t\n\t\t//any element except for first row and first column is zero\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(matrix[i][j] == 0){\n\t\t\t\t\tif(i == 0) firstRow == true;\n\t\t\t\t\tif(j == 0) firstColumn == true;\n\t\t\t\t\t//Making first row and first column as zero\n\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//any element except for first row and first column is zero\n\t\tfor(int i = 1;i<m;i++){\n\t\t\t\n\t\t\tfor(int j = 1;j<n;j++){\n\t\t\t\t//based on first row and first column making the entire column and row as zero\n\t\t\t\tif(matrix[0][j] == 0 || matrix[i][0] == 0){\n\t\t\t\t\t//Making first row and first column as zero\n\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Making every column value to 0 in first row\n\t\tif(firstRow){\n\t\t\t\n\t\t\tfor(int j = 0;j <n;j++){\n\t\t\t\tmatrix[0][j] = 0;\n\t\t\t}\n\t\t}\n\t\t//Making every row value to 0 in first column\n\t\tif(firstColumn){\n\t\t\t\n\t\t\tfor(int i = 0;i <m;i++){\n\t\t\t\tmatrix[i][0] = 0;\n\t\t\t}\n\t\t}\n\t}",
"void clear() {\n\t\t\tfor (int i = 0 ; i < nodes.length; i++) {\n\t\t\t\tnodes[i].clear((byte) 1);\n\t\t\t}\n\t\t\tsize = 0;\n\t\t}",
"public void clear() {\n\t\tfor (int x = 0; x < counters.length; x++) {\n\t\t\tcounters[x] = 0;\n\t\t\tArrays.fill(counters, (byte)0);\n\t\t}\n\t}",
"public Board() {\n\t\tfor(int i = 0; i < board.length; i++){\n\t\t\tfor(int j = 0; j < board[i].length; j++){\n\t\t\t\tboard[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}",
"public void clearGrid() {\n\t\tfor (int i = 0; i < this.board.length; i++) {\n\t\t\tArrays.fill(this.board[i], EMPTY);\n\t\t}\n\n\t\tsetChanged();\n\t\tnotifyObservers();\n\t}",
"public void zero();",
"public static Matrix makeZero(int rows, int columns) {\n\t\treturn new Matrix(rows, columns);\n\t}",
"public void reset() {\n \tboard = new char[columns][rows];\n \tfor(int i = 0; i < columns; i++) {\n \t\tfor(int j = 0; j < rows; j++) {\n \t\t\tboard[i][j] = EMPTY;\n \t\t}\n \t}\n\t}",
"public void clear() {\n\t\tn1 = n0 = 0L;\n\t}",
"public void clear(){\n\t\tclear(0);\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic void clear( )\r\n\t{\r\n\t\tfor (int i =0; i< this.tableSize; i++)\r\n\t\t\t{ ((LinkedArrays<T>) table[i]).clear(); }\r\n\t\tthis.size = 0; \r\n\t\t\r\n\t}",
"public static void resetBoard()\n {\n for (int i = 0; i<BOARD_HEIGHT;i++) //Recorre las filas.\n {\n for (int j = 0; j <BOARD_WIDTH;j++) //Recorre las columnas.\n {\n boardPos[i][j]=0; //Resetea la casilla actual.\n }\n }\n }",
"public static void clear (int []n) {\n\t\tfor (int i = 0; i < n.length; i++) {\n\t\t\tn[i] = 0;\n\t\t}\n\t}",
"public void resetEmpty() {\n\t /*reset the mineField with no mines*/\n mineField = blankField(this.row, this.col);\n }",
"private void resetMatrixB() {\n\t\t// find the magnitude of the largest diagonal element\n\t\tdouble maxDiag = 0;\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tdouble d = Math.abs(B.get(i,i));\n\t\t\tif( d > maxDiag )\n\t\t\t\tmaxDiag = d;\n\t\t}\n\n\t\tB.zero();\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tB.set(i,i,maxDiag);\n\t\t}\n\t}",
"public void clearGrid(){\n\t\tfor(int i = 0; i < rows; i++){//rows\n\t\t\tfor(int j = 0; j < columns; j++){//columns\n\t\t\t\ttheGrid[i][j] = false; //set to false\n\t\t\t}\n\t\t}\n\t}",
"private void resetRow(int i) {\n\t\tfor (int j = 0; j < width; j++) {\n\t\t\tmatrix[i][j] = UNKNOWN;\n\t\t\tpredictions[i][j] = UNKNOWN;\n\t\t}\n\t}",
"public void reset() {\n for (int r = 0; r < MAX_ROWS; r++) {\n for (int c = 0; c < MAX_COLUMNS; c++) {\n cells[r][c].reset();\n }\n }\n mazeGeneration.clear();\n }",
"private static int[][] identifyMatrixWithZeros(int[][] matrix){\n\t\tboolean[] rowCheck = new boolean[matrix.length];\n\t\tboolean[] colCheck = new boolean[matrix[0].length];\n\n\t\tfor(int i=0;i<matrix.length ;i++) {\n\t\t\tfor(int j=0;j<matrix[0].length;j++) {\n\t\t\t\tif(matrix[i][j] == 0) {\n\t\t\t\t\trowCheck[i] = true;\n\t\t\t\t\tcolCheck[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int row=0;row<rowCheck.length;row++) {\n\t\t\tif(rowCheck[row])\n\t\t\t\tnullifyRows(matrix, row);\n\t\t}\n\t\t\n\t\tfor(int col=0;col<colCheck.length;col++) {\n\t\t\tif(colCheck[col])\n\t\t\t\tnullifyColumns(matrix, col);\n\t\t}\n\t\treturn matrix;\n\t}",
"public void resetBoard(){\r\n for(int i = 0;i<6;i++){ //empty board \r\n for (int j = 0; j < 7; j++) {\r\n boardRep[i][j] = 0;\r\n }\r\n }\r\n \r\n for (int i = 0; i < 7; i++) { // set column heights to 0\r\n currentFilled[i] = 0;\r\n }\r\n \r\n blackToPlay = true; //black goes first for now\r\n refreshDisplay(); \r\n \r\n }",
"public void reset() {\n for (int i = 0; i < numberOfRows; i++ ) {\n for (int j =0; j < numberOfColumns; j++) {\n if (grid[i][j] == LASER) {\n this.Remove(i,j);\n }\n }\n }\n }",
"public void clear() {\n\t\tint index = 0;\r\n\t\tsize = 0;\r\n\t\twhile (index < K.length) {\r\n\t\t\tif (K[index] != null) {\r\n\t\t\t\tK[index].clear();\r\n\t\t\t\tV[index].clear();\r\n\t\t\t}\r\n\t\t\tindex++;\r\n\t\t}\r\n\t}",
"private void clearAll( )\n {\n for( Vertex v : vertexMap.values( ) )\n v.reset( );\n }",
"public static void resetAll() {\n\t\tfor (int x = 0; x < mSensors.size(); x++) {\n\t\t\tmSensors.get(x).reset();\n\t\t}\n\t}",
"public Matrix(){\r\n\t\t\r\n\t\t//dim = dimension; for now, only 3-dim. matrices are being handled\r\n\t\tmat = new int[dim][dim];\r\n\t\t\r\n\t\tfor(int rowi = 0; rowi < dim; rowi++ )\r\n\t\t\tfor (int coli = 0; coli < dim; coli++)\r\n\t\t\t\tmat[rowi][coli]=0;\r\n\t}",
"public void clear() {\n\t\tfor (int i = 0; i < table.size(); i++) {\n\t\t\ttable.get(i).clear();\n\t\t}\n\t}",
"public Vector4d setZero() {\n\t\tx = y = z = w =0;\n\t\treturn this;\n\t}",
"public void clear() {\n\t\tfor(int i=0;i<getWidth();i++) {\n\t\t\tfor(int j=0;j<getHeight();j++) {\n\t\t\t\tbImage.setRGB(i, j, 0xffffffff);\n\t\t\t}\n\t\t}\n\t}",
"public void reset(int initValue) {\n\t\tfor (int col = 0; col < this.width; col++) {\n\t\t\tfor (int row = 0; row < this.height; row++) {\n\t\t\t\tthis.bitmap[col][row] = initValue;\n\t\t\t}\n\t\t}\n\t}",
"public void clearInitialize(){\n index=0;\n for(int i =0; i < list.length;i++){\n list[i]=0;\n }\n hasFilled = false;\n\n }",
"void reset() {\n for (int i = 0; i < array.length; i++) {\n array[i] = -1;\n }\n }",
"public void set(float[] matrix) {\n System.arraycopy(matrix, 0, this.matrix, 0, 16);\n }",
"public void reset() {\r\n\t\tready = false;\r\n\t\twitnessed_max_price = 0.0;\r\n\t\t\r\n\t\tfor (int i = 0; i<no_goods; i++)\r\n\t\t\tfor (int j = 0; j<no_bins; j++)\r\n\t\t\t\tmarg_prob[i][j] = 0.0;\r\n\t\t\r\n\t\tmarg_sum = 0;\r\n\t\t\r\n\t\tfor (HashMap<IntegerArray, double[]> p : this.prob)\r\n\t\t\tp.clear();\r\n\r\n\t\tfor (HashMap<IntegerArray, Integer> s : this.sum)\r\n\t\t\ts.clear();\r\n\t\t\r\n\t\tlog.clear();\r\n\t}"
] | [
"0.8063911",
"0.78692466",
"0.7853004",
"0.766914",
"0.7474707",
"0.74678636",
"0.74405724",
"0.74220294",
"0.7363731",
"0.736103",
"0.73406786",
"0.72858477",
"0.72736174",
"0.7180898",
"0.716319",
"0.7150285",
"0.70953465",
"0.70542467",
"0.701759",
"0.7014395",
"0.68451786",
"0.6831946",
"0.67343146",
"0.6724672",
"0.67234516",
"0.66904956",
"0.66887605",
"0.6671962",
"0.66315264",
"0.6626787",
"0.66164684",
"0.6606449",
"0.65837",
"0.6569089",
"0.6568614",
"0.65600115",
"0.6545163",
"0.65029246",
"0.6466238",
"0.64644",
"0.64577115",
"0.64341956",
"0.6423828",
"0.64181405",
"0.6389569",
"0.6344609",
"0.6337513",
"0.63215554",
"0.6297113",
"0.62859505",
"0.6282238",
"0.62700844",
"0.6240081",
"0.6239397",
"0.62256867",
"0.62221855",
"0.6221795",
"0.62209344",
"0.6189241",
"0.61498153",
"0.61415577",
"0.61339325",
"0.61177707",
"0.6074844",
"0.60685235",
"0.60631907",
"0.6061525",
"0.6059866",
"0.6058969",
"0.60181326",
"0.6011665",
"0.6010659",
"0.6001091",
"0.5982097",
"0.5975263",
"0.59727824",
"0.59623057",
"0.5960539",
"0.5956768",
"0.59551555",
"0.59519863",
"0.5929919",
"0.5918756",
"0.59093857",
"0.59075034",
"0.5903407",
"0.5895707",
"0.58902943",
"0.5889967",
"0.5883412",
"0.5876091",
"0.58526665",
"0.58383036",
"0.58378017",
"0.58254164",
"0.58241624",
"0.5823047",
"0.5808625",
"0.58065337",
"0.58047414"
] | 0.79592466 | 1 |
Returns the element at the specified position in the matrix. | public double get(int row, int col) {
if (row >= 0 && row < this.rows && col >= 0 && col < this.cols)
return data[row][col];
else
throw new ArrayIndexOutOfBoundsException();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getElement(int rowIndex, int colIndex){\r\n\t\t\r\n\t\tint res = 0;\r\n\t\tres = mat[rowIndex][colIndex];\r\n\t\treturn res;\r\n\t\r\n\t}",
"public E getElement(int position){\r\n\t\t// Position is larger than the current size.\r\n\t\tif(checkPosition(position)){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn getDoubleNodeAt(position).element;\r\n\t}",
"public final float getElement(int row, int column) {\n\tif (row == 0)\n\t if (column == 0)\n\t\treturn m00;\n\t else if (column == 1)\n\t\treturn m01;\n\t else if (column == 2)\n\t\treturn m02;\n\t else\n\t\tthrow new ArrayIndexOutOfBoundsException(\"column must be 0 to 2 and is \" + column);\n\telse if (row == 1)\n\t if (column == 0)\n\t\treturn m10;\n\t else if (column == 1)\n\t\treturn m11;\n\t else if (column == 2)\n\t\treturn m12;\n\t else\n\t\tthrow new ArrayIndexOutOfBoundsException(\"column must be 0 to 2 and is \" + column);\n\n\telse if (row == 2)\n\t if (column == 0)\n\t\treturn m20;\n\t else if (column == 1)\n\t\treturn m21;\n\t else if (column == 2)\n\t\treturn m22;\n\t else\n\t\tthrow new ArrayIndexOutOfBoundsException(\"column must be 0 to 2 and is \" + column);\n\telse\n\t\tthrow new ArrayIndexOutOfBoundsException(\"row must be 0 to 2 and is \" + row);\n }",
"public double retrieveElement(int i, int j) {\n\t\t// Keep function invariant true\n\t\tassertInd(i,j);\n\n\t\t// Start and end of row i\n\t\tint start = rowPtr.get(i);\n\t\tint end = rowPtr.get(i+1);\n\n\t\t// If find column j, return\n\t\tfor (int k=start; k<end; k++) {\n\t\t\tif(j == colInd.get(k)) \n\t\t\t\treturn value.get(k);\n\t\t}\n\t\treturn 0;\n\t}",
"public double getElement(int i, int j){\r\n \treturn this.matrix[i][j];\r\n \t}",
"Element getElement(Position pos);",
"public int get(int x, int y){\n return matriz[x][y];\n }",
"public int get(int i, int j) {\n\t\treturn matrix[i][j];\n\t}",
"public int elementAt(int position) {\n\tif (position >= 0 && position < length() ) {\n\t if (position == 0) return datum;\n\t else return next.elementAt(position - 1);\n\t}\n\telse throw new RuntimeException(\"precondition violated\");\n }",
"Object getArrayElement(int index);",
"Object getArrayElement(int index);",
"private int getElement(int row, int col) {\n if (!this.isValid(row, col))\n throw new IndexOutOfBoundsException(\"row or col is out of side length!\");\n\n // in our system, index is calculated from 0 but row and col is calculated from 1\n return this.side * (row - 1) + col - 1;\n }",
"public int getValue(int row, int column);",
"public int getElement(final int columnIndex, final int rowIndex)\n throws MatrixException {\n if (checkRange(columnIndex, rowIndex)) {\n return values[columnIndex][rowIndex];\n } else {\n throw new MatrixException(\"Выход за пределы массива.\");\n }\n\n }",
"public T get(int pos);",
"private Object get( int r, int c ) {\n\treturn matrix[r][c];\n }",
"public long getElementAt(int row, int column) {\n\t\treturn _value[(row * _columnCount) + column];\n\t}",
"double get(int row,int col);",
"public double get(int row, int col) {\n return matrix.get(row)[col];\n }",
"T get(int position);",
"Object getElementAt(int index);",
"public Move getGridElement (int row, int column)\n {\n return mGrid[row][column];\n }",
"public Object objectAt(Position position){\n return mapElement.get(position);\n }",
"public int getElement(int i, int j){\n\t\treturn numbers[i][j];\n\t}",
"E get( int index );",
"public int getElement(int index) {\r\n\t\t//Defensive\r\n\t\tif (index < 0) {\r\n\t\t\tthrow new IllegalArgumentException(\"Index less than zero\");\r\n\t\t}\r\n\t\tif (index >= getLength()) {\r\n\t\t\tthrow new IllegalArgumentException(\"Index out of upper bound\");\r\n\t\t}\r\n\t\tif (getLength() <= 0) {\r\n\t\t\tthrow new IllegalArgumentException(\"The array does not yet exist\");\r\n\t\t}\r\n\t\t\r\n\t\treturn getNodeAt(index).value;\r\n\t}",
"public double getElementPointer(int i, int j){\r\n \treturn this.matrix[i][j];\r\n \t}",
"public double get( int row, int col ) {\n return ops.get(mat, row, col);\n }",
"public BigInteger get(int row, int column) {\n return inner[row][column];\n }",
"public E getFromMatrix(int i, int j) {\r\n\t\treturn getFromArray(i, j);\r\n\t}",
"Piece getPieceAt(int col, int row);",
"public E get(int index);",
"public T get(int row) {\n\t\tint index = binarysearch(array,currentnnz,row);\n\t\t\n\t\tif (index < 0 || array.at(index).row != row )\n\t\t\treturn null;\n\t\telse\n\t\t\treturn array.at(index).thing;\n\t}",
"public int getValue(int row, int col) {\n return this.matrix[row][col];\n }",
"public Object elementAt(int index);",
"public int getValue(int row, int col) {\n if (row < 0 || col < 0) {\n System.out.println(\"Error: Value does not exist\");\n } else {\n return matrix[row][col];\n }\n return -1;\n }",
"public E getElement(int index) {\t//O(1)\r\n\t\t//checks if the index is valid\r\n\t\tif (index>=0 && index<size)\r\n\t\t\treturn (E) list[index];\t//returns element at particular index\r\n\t\treturn null;\r\n\t}",
"public Cell getCell(int row, int column) {\n return cells[row][column];\n }",
"public Thing at ( int row, int col ) {\n\t\treturn field_[row][col];\n\t}",
"public abstract T getCell(int row, int column);",
"public Cell getCell(int row, int col) {\n return board[row][col];\n }",
"public E atIndex(int index) {\n\t\tif(index < numElements) {\n\t\t\treturn elements[index];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public double get(int row, int column) {\n\t\tif (row >= this.rows || row < 0 || column >= this.columns || column < 0) {\n\t\t\tthrow new IllegalArgumentException(\"Values out of range, requested \" + row + \",\" + column\n\t\t\t\t\t+ \", but matrix is only \" + this.rows + \"x\" + this.columns);\n\t\t}\n\t\treturn matrix[row][column];\n\t}",
"@Override\n public double getQuick(int row, int column) {\n return base.getQuick(rowPivot[row], columnPivot[column]);\n }",
"public E get(int index) {\n return this.elements[index];\n }",
"@Override\n\tpublic E get(int idx) {\n\t\tE element = null;\n\t\tif (idx < 0 || idx >= size)\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\telement = list[idx];\n\t\treturn element;\n\t}",
"public int get(int index);",
"private Tile getTileAt(int row, int col) {\n return getTiles()[row][col];\n }",
"public Object getObject(int pos) {\n return elements.get(pos);\n }",
"public E get(int i) {\n\n\t if (i < 0 && i > num_elements)\n\t return null;\n\t \n\t return(elements[i]);\n\t }",
"public String elementAtPos(int pos) {\r\n return wordBoard[this.rowPos(pos)][this.colPos(pos)];\r\n }",
"public long getElem(int index) {\r\n return a[index];\r\n }",
"public IAtom getAtom(int position) {\n if (atoms == null) return null;\n else return atoms[position];\n }",
"public int returnPieceAt(int row, int col) {\n\t\treturn arr[row][col];\n\t}",
"public abstract E get(int index);",
"private E getElement(int index) {\n if (index >= contents.size()) {\n return null;\n } else {\n return contents.get(index);\n }\n }",
"public int getElement(int index){\n if(index <0 || index >= array.length){\n throw new RuntimeException(\"Array index out of bound\");\n }\n return array[index];\n }",
"Object get(int index);",
"Object get(int index);",
"int get(int idx);",
"public T at(final int position) {\n return Query.at(iterable, position);\n }",
"final Piece get(int col, int row) {\r\n return board[col][row];\r\n }",
"@Override\n\tpublic T get(MatrixCoordinate coordIn) {\n\t\tMatrixValidator.throwIfNotOnMatrix(this, coordIn);\n\t\treturn this.valueMap.getOrDefault(coordIn, this.defaultValue);\n\t}",
"T get(int index);",
"T get(int index);",
"T get(int index);",
"T get(int index);",
"T get(int index);",
"public int get_cell(int row,int col)\n{\n\treturn cell[row][col] ;\t\n}",
"public Cell getCell(int row, int col) {\n\t\treturn board[row][col];\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic T get( int row, int column ) {\n\t\tString S = C + \": get(): \";\n\t\tcheckBounds( row, column, S );\n\t\treturn (T)data[row * numCols + column];\n\t}",
"public DomainElement elementForIndex(int index);",
"public T get(int index);",
"public T get(int index);",
"public T get(int index);",
"public abstract Element getElement(Point2D point) throws PositionEX;",
"private E element() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n return (E) queue[startPos];\n }",
"public Object get(int index);",
"public Object get(int index);",
"public Cell get(int row, int col) {\n\t\treturn myGrid.get(row, col);\n\t}",
"public BoardTile getTile(int column, int row) {\r\n return tiles[column][row];\r\n }",
"public int getElementAtIndex(int index){\r\n return mArray[index];\r\n }",
"public Object get(int index) {\r\n return entry(index).element;\r\n }",
"public <T> Object my_get_element(int index) throws myException{\r\n\t\tif (index < 0){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tmyNode current = null;\r\n\t\t\r\n\t\tif (Lnode != null) {\r\n\t\t\tcurrent = Lnode.getLeft();\r\n\t\t\tfor (int i = 0; i < index; i++) {\r\n\t\t\t\tif (current.getLeft() == null)\r\n\t\t\t\t\treturn null;\r\n \r\n\t\t\t\tcurrent = current.getLeft();\r\n\t\t\t}\r\n\t\t\treturn current.getInfo();\r\n\t\t}else{\r\n\t\t\tcurrent = Rnode.getRight();for (int i = 0; i < index; i++) {\r\n\t\t\t\tif (current.getRight() == null)\r\n\t\t\t\t\treturn null;\r\n \r\n\t\t\t\tcurrent = current.getRight();\r\n\t\t\t}\r\n\t\t\treturn current.getInfo();\r\n\t\t}\r\n\t\t\r\n \r\n\t}",
"public int getIndex(int position);",
"String getValue(String column, int row);",
"@Override\n public T get(int position) {\n if (!validate(position)) {\n throw new ArrayIndexOutOfBoundsException(\"Bad position!\");\n }\n return (T) this.values[position];\n }",
"public synchronized E get(int index) {\n return this.array.get(index);\n }",
"@Nullable\n TObj get(int row, int column) {\n SparseArrayCompat<TObj> array = mData.get(row);\n return array == null ? null : array.get(column);\n }",
"public E get(int idx) {\n assert idx >= 0;\n \n if(v == array[idx]){\n\t\tv = array[idx];\n\t}\n\t\n\tif(array[idx] == null){\n\t\tv = null;\n\t}\n\treturn v;\n }",
"public double get(int rowIndex, int columnIndex) throws MatrixOutOfBoundException {\n if (checkRange(rowIndex, columnIndex)) {\n return matrix[rowIndex][columnIndex];\n } else {\n throw new MatrixOutOfBoundException(\"Index is out of Bounds\");\n }\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic T get(int pos){\n\t\tif(pos >= 0 && pos < currentsize ){\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\n\t\treturn (T) data[pos];\n\t}",
"public double getCell(int row, int col) {\n int di = row - col;\n\n if (di == 0) {\n return B[row];\n } else if (di == -1) {\n return C[row];\n } else if (di == 1) {\n return A[row];\n } else return 0;\n }",
"public E get(int index) {\n\t\tif (index < 0 || index >= size) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\treturn elements[index];\n\t}",
"public Object getCell(int col, int row) {\n Vector data = ((DefaultTableModel) getModel()).getDataVector();\n return ((Vector) data.get(row)).get(col);\n }",
"public double get(int row, int col){\n \treturn array[row-1][col-1];\n }",
"public int getElement(Pair<Integer, Integer> cell){\n\t\treturn numbers[cell.getFirst()][cell.getSecond()];\n\t}",
"E get(int i) throws IndexOutOfBoundsException;",
"public int find(int element){\n while(grid[element] != element)\n element = grid[element];\n return element;\n }",
"public abstract Object get(int pos) throws IndexOutOfBoundsException;",
"@Override\n\tpublic E get(int index) {\n\t\treturn node(index).elementE;\n\t}"
] | [
"0.69007474",
"0.6882422",
"0.6689974",
"0.66533077",
"0.65636325",
"0.6529619",
"0.64492357",
"0.64250803",
"0.63995415",
"0.63959616",
"0.63959616",
"0.63343084",
"0.63214236",
"0.63213706",
"0.6299983",
"0.6288979",
"0.6276872",
"0.626791",
"0.6264467",
"0.6264091",
"0.62506264",
"0.6216141",
"0.62149435",
"0.61880624",
"0.61866605",
"0.61818093",
"0.6157741",
"0.6151135",
"0.61502665",
"0.6140014",
"0.61383027",
"0.61217135",
"0.6112303",
"0.6096292",
"0.60947865",
"0.6088964",
"0.6083323",
"0.6063634",
"0.60562557",
"0.6054988",
"0.6041316",
"0.6034793",
"0.6029583",
"0.59878445",
"0.59823114",
"0.59770155",
"0.59766614",
"0.5966334",
"0.59537363",
"0.5952623",
"0.5942706",
"0.5925669",
"0.5924645",
"0.5913056",
"0.59075594",
"0.5903781",
"0.5897821",
"0.5881618",
"0.5881618",
"0.58728063",
"0.5870075",
"0.5868053",
"0.58559304",
"0.5845063",
"0.5845063",
"0.5845063",
"0.5845063",
"0.5845063",
"0.5843307",
"0.5841673",
"0.58396363",
"0.5831509",
"0.5830311",
"0.5830311",
"0.5830311",
"0.58045405",
"0.5800774",
"0.57884854",
"0.57884854",
"0.57792956",
"0.5775917",
"0.5761294",
"0.5759682",
"0.5758903",
"0.57538575",
"0.5749378",
"0.5748038",
"0.57366925",
"0.57291055",
"0.57240313",
"0.5723817",
"0.57237136",
"0.57229257",
"0.57097745",
"0.5708978",
"0.56910443",
"0.56850106",
"0.5677673",
"0.5665685",
"0.566233",
"0.5660805"
] | 0.0 | -1 |
Sets the element at the specified position in the matrix. | public void set(int row, int col, double data) {
if (row >= 0 && row < this.rows && col >= 0 && col < this.cols)
this.data[row][col] = data;
else
throw new ArrayIndexOutOfBoundsException();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void set(int x, int y, int elem){\n matriz[x][y] = elem;\n }",
"public void setElement(int element, int rowIndex, int colIndex){\r\n\t\r\n\t\tmat[rowIndex][colIndex]=element;\r\n\t\r\n\t}",
"public void setElement(int i, int j, double aa){\r\n \tthis.matrix[i][j]=aa;\r\n \t}",
"public E set(int index, E element);",
"void set(int index, Object element);",
"public void setValueAt(Object val, int row, int col) {\r\n }",
"public void set (Object element)\n {\n if(!isAfterNext){\n throw new IllegalStateException(); \n }\n position.data = element;\n \n \n }",
"void setElement(int row, String field, Object value);",
"public void setValue(int row, int col, int value) {\n this.matrix[row][col] = value;\n }",
"public void set(int pos);",
"public final void setElement(int row, int column, float value) {\n\t\t\n \tif(row == 0) {\n \t\t\n\t\t if(column == 0) {\n\t\t\t\n\t\t \tm00 = value;\n\t\t \t\n\t\t } else if(column == 1) {\n\t\t\t\n\t\t \tm01 = value;\n\t\t \t\n\t\t } else if(column == 2) {\n\t\t\t\n\t\t \tm02 = value;\n\t\t \t\n\t\t } else {\n\t\t\t\n\t\t \tthrow new ArrayIndexOutOfBoundsException(\"column must be 0 to 2 and is \" + column);\n\t\t }\n\t\t \n\t\t} else if(row == 1) {\n\t\t\t\n\t\t if(column == 0) {\n\t\t\t\n\t\t \tm10 = value;\n\t\t \t\n\t\t } else if(column == 1) {\n\t\t\t\n\t\t \tm11 = value;\n\t\t \t\n\t\t } else if(column == 2) {\n\t\t \t\n\t\t \tm12 = value;\n\t\t \n\t\t } else {\n\t\t\t\n\t\t \tthrow new ArrayIndexOutOfBoundsException(\"column must be 0 to 2 and is \" + column);\n\t\t }\n\t\t \n\t\t} else if(row == 2) {\n\t\t\t\n\t\t if(column == 0) {\n\t\t\t\n\t\t \tthis.m20 = value;\n\t\t \t\n\t\t } else if(column == 1) {\n\t\t\t\n\t\t \tthis.m21 = value;\n\t\t \t\n\t\t } else if(column == 2) {\n\t\t\t\n\t\t \tthis.m22 = value;\n\t\t \t\n\t\t }else {\n\t\t\t\n\t\t \tthrow new ArrayIndexOutOfBoundsException(\"column must be 0 to 2 and is \" + column);\n\t\t }\n\t\t \n\t\t} else {\n\t\t\t\n\t\t\tthrow new ArrayIndexOutOfBoundsException(\"row must be 0 to 2 and is \" + row);\n\t\t}\n }",
"private void setInArray(int i, int j, E element) {\r\n\t\tmElements.set(j*mRowCount+i, element);\r\n\t}",
"private static void replaceElement(int[][] matrix, int row, int column, int newElement) {\n\t\t\n\t\tmatrix[row][column] = newElement;\n\t}",
"public void PositionSet(int position);",
"void setArrayElement(int index, Object value);",
"void setArrayElement(int index, Object value);",
"public @Override E set(int index, E element) {\n \tNode n = getNode(index);\n \tE result = n.data;\n \tn.data = element;\n \treturn result;\n }",
"public void setValueAt(Object aValue, int row, int column)\n {\n\n }",
"public void set( int row, int column, T obj ) throws ArrayIndexOutOfBoundsException {\n\n\t\tString S = C + \": set(): \";\n\t\tcheckBounds( row, column, S );\n\t\tdata[row * numCols + column] = obj;\n\n\t}",
"public static native void SetAt(long lpjFbxArrayVector2, int pIndex, long pElement);",
"public void setElement(final int columnIndex, final int rowIndex,\n final int value) throws MatrixException {\n if (checkRange(columnIndex, rowIndex)) {\n values[columnIndex][rowIndex] = value;\n } else {\n throw new MatrixException(\"Выход за пределы массива.\");\n }\n }",
"public void setObject(Object element, int row, int column) {\n\t\tcolumns[column].setRow(element, subset[row]);\n\t}",
"public void setAtom(IAtom atom, int position) {\n atoms[position] = atom;\n notifyChanged();\n }",
"public void setValue(int row, int col, double value) throws IndexOutOfBoundsException {\r\n matrix[row][col] = value;\r\n }",
"public void setValueAt(Object value, int row, int column){\n dataEntries[row][column] = value;\n }",
"public void set( int row, int column, double value )\n\t{\n\t\tmatrixData[ row - 1 ][ column - 1 ]\t= value;\n\t}",
"public void set( int row, int col, double value ) {\n ops.set(mat, row, col, value);\n }",
"@Override\n public boolean set(int index, T element) {\n array[index] = element;\n return true;\n }",
"@Override\n public void setValueAt(Object value, int row, int column) { data[row][column] = value; }",
"@Override\n\tpublic E set(int index, E element) {\n\t\tNode<E> node = node(index);\n\t\tE old = node.elementE;\n\t\tnode.elementE = element;\n\t\treturn old;\n\t}",
"public void setElement(MatrixElement pNewElement) {\r\n\t\tmElement = pNewElement;\r\n\t}",
"@Override\n\tpublic E set(int idx, E element) {\n\t\tif (element == null) throw new NullPointerException();\n\t\tif (idx < 0 || idx >= size()) throw new IndexOutOfBoundsException();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (element.equals(list[i]))\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tE output = null;\n\t\toutput = list[idx];\n\t\tlist[idx] = element;\n\t\treturn output;\n\t}",
"public void setPosition(int position);",
"@Override\n public void setValueAt( Object aValue, Object node, int column )\n {\n }",
"public void setElement(int i, int j, int n){\n\t\tnumbers[i][j] = n;\n\t}",
"public void setPosition(int row, int column){\t\t\n\t\tposition[0] = row;\n\t\tposition[1] = column;\t\t\n\t}",
"public int set(int index, int element);",
"public void setAt(int iterator, T element) {\n data[iterator] = element;\n }",
"@Override\n public void setQuick(int row, int column, double value) {\n base.setQuick(rowPivot[row], columnPivot[column], value);\n }",
"public abstract E set(int index, E e);",
"public abstract void setCell(int row, int column, T item);",
"public void setElementAt(Object obj, int index);",
"public synchronized void setElementAt(WModelObject object, int index)\n\t{\n\t\tm_elements.setElementAt(object, index);\n\t}",
"void set(int idx, int val);",
"void setNumber(int row, int col, int num){\n board[row][col].setNumber(num);\n }",
"private Object set( int r, int c, Object newVal ) {\n\tObject oldVal = matrix[r][c];\n\tmatrix[r][c] = newVal;\n\treturn oldVal;\n }",
"public void setElem(int index, long value) {\r\n a[index] = value;\r\n }",
"@Override\n public T set(final int index, final T element) {\n this.checkIndex(index);\n final T prevElment = get(index);\n this.data[index] = element;\n return prevElment;\n }",
"public String changeElementAtPos(int pos, String element) {\r\n String temp = wordBoard[this.rowPos(pos)][this.colPos(pos)];\r\n wordBoard[this.rowPos(pos)][this.colPos(pos)] = element;\r\n return temp;\r\n }",
"public void setPos(int pos);",
"public void setPos(int pos);",
"T set(int index, T element);",
"public void set(int idx, E value) {\n assert idx >= 0;\n \n checkgrow(idx);\n \n\tarray[idx] = value;\n\t\n }",
"public abstract void setPosition(Position position);",
"void setPosition(Position position);",
"void setPosition(Position position);",
"@Override\n\tpublic void setNodeMatrix(int nodeIndex, int matrixIndex, double[] matrix) {\n// \tSystem.out.println(\"old:\"+Arrays.toString(\n// \tArrayUtils.subarray(matrices[0][nodeIndex], matrixIndex * matrixSize, matrixIndex * matrixSize + matrixSize)\n// \t));\n// \tSystem.out.println(\"new:\"+Arrays.toString(matrix));\n System.arraycopy(matrix, 0, matrices[currentMatricesIndices[nodeIndex]][nodeIndex],\n matrixIndex * matrixSize, matrixSize);\n }",
"@Override\n public void setValueAt(Object aValue, int aRow, int aColumn) {\n model.setValueAt(aValue, aRow, aColumn); \n }",
"public void setCell(int row, int col, String val) {\n board[row][col] = val;\n }",
"private void setElement(int index, E element) {\n// if (getElement(index) != null) {\n// setContents.remove(getElement(index));\n// }\n while (index >= contents.size()) {\n contents.add(null);\n }\n contents.set(index, element);\n// contents.put(index, element);\n backwards.put(element, index);\n\n// if (element != null) {\n// setContents.add(getElement(index));\n// }\n }",
"public void setPosition(int row, int col) {\n this.row = row;\n this.col = col;\n }",
"private void setTile(int row, int col, int value) {\n //first make sure the parameters are reasonable values\n if (row < 0 || row > 2 || col < 0 || col > 2) {\n throw new IllegalArgumentException(\"Passed bad index values to setTile()\");\n }\n tiles[row][col] = value;\n }",
"public void set(int index, Object value) {\n verifyModifiable();\n\n try {\n elements.set(index, value);\n } catch (IndexOutOfBoundsException exception) {\n if (elements.size() != 0)\n throw new RuntimeException(\"failed to set a value beyond the end of the tuple elements array, size: \" + size() + \" , index: \" + index);\n else\n throw new RuntimeException(\"failed to set a value, tuple may not be initialized with values, is zero length\");\n }\n }",
"public void setX (int index, int x) { coords[index][0] = x; }",
"public void set(int row, int col, double value){\n \tarray[row-1][col-1] = value;\n }",
"void setNumber (int col, int row, int number) {\n\t\tboardArray[col][row] = number;\n\t}",
"public void setPosition(Integer position);",
"@Override\r\n\tpublic void setCell(Integer x, Integer y, Integer value) {\n\t\tgame[x][y] = value;\r\n\t}",
"public void set(int rowIndex, int columnIndex, int value) { target.set(index.get(rowIndex), columnIndex, value); }",
"public void set(int row, int col)\n\t{\n\t\tthis.row = row;\n\t\tthis.col = col;\n\t}",
"public void setElement(T newvalue);",
"public void setElement(E e){\r\n\t\trotulo = e;\r\n\t}",
"public void set(long index);",
"@Override\n public int set(int index, int element) {\n checkIndex(index);\n int result = getEntry(index).value;\n getEntry(index).value = element;\n return result;\n }",
"public void sett(int pos, T x);",
"void setColumn(Column newColumn, int pos) { columns[pos] = newColumn; }",
"public Object set(int index, Object element) {\r\n Entry e = entry(index);\r\n Object oldVal = e.element;\r\n e.element = element;\r\n return oldVal;\r\n }",
"@Override\n public E set(int index, E elem) {\n\t E first = _store[index];\n\t _store[index] =elem;\n\t return first;\n }",
"@Override\n public T set(int index, T element) {\n if (indexCheck(index)) {\n T previousValue = (T) data[index];\n data[index] = element;\n return previousValue;\n }\n return null;\n }",
"public void setVal(int row, int col, int val) {\n\t\tif(row < 0 || row >= dimension || col < 0 || col >= dimension || val < 0 || val > dimension)\n\t\t\tthrow new IllegalArgumentException(\"Parameters out of bounds\");\n\t\tpuzzle[row][col] = val;\n\t}",
"public void setCell(int row, int col, double value) {\n int di = row - col;\n\n if (di == 0) {\n B[row] = value;\n } else if (di == -1) {\n C[row] = value;\n } else if (di == 1) {\n A[row] = value;\n } else {\n throw new IllegalArgumentException(\"Only the main, super, and sub diagonals can be set.\");\n }\n }",
"public abstract Piece setLocation(int row, int column);",
"public void set(int i, Mat33 value) {\n opensimSimbodyJNI.VectorMat33_set(swigCPtr, this, i, Mat33.getCPtr(value), value);\n }",
"public void setCellInBoard(int row, int column, char type) {\n this.myMatrix[row][column] = type;\n }",
"@TimeComplexity(\"O(1)\")\n\tpublic E setElement(E eT)\n\t{\n\t\t//TCJ: the cost does not vary with input size so it is constant\n\t\tE temp = element;\n\t\telement = eT;\n\t\treturn temp;\n\t}",
"public void setMatrix(int[] matrix) {\n this.matrix = matrix;\n this.emptyTileIndex = indexOfEmptyTile();\n if (this.emptyTileIndex == -1) throw new IllegalStateException(\"Board does not contains empty tile!\");\n }",
"public void setPosition(Position pos);",
"void setPosition(Point point);",
"public void setBoard(int row, int col, int value) {\n this.board[row][col] = value;\n }",
"void set(int[] pos, Tuple tuple) {\n verifyModifiable();\n\n if (pos.length != tuple.size())\n throw new RuntimeException(\"given tuple not same size as position array, tuple: \" + tuple.print());\n\n int count = 0;\n for (int i : pos)\n elements.set(i, tuple.elements.get(count++));\n }",
"public void setCell(Object value, int col, int row) {\n ((DefaultTableModel) getModel()).setValueAt(value, row, col);\n }",
"public E set(int index, E element) {\n\t\tif(index < 0 || index > size) {\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\t} else if(index == size) {\r\n\t\t\tadd(element);\r\n\t\t\treturn element;\r\n\t\t}\r\n\t\tE e = getNode(index).getData();\r\n\t\tgetNode(index).setData(element);\r\n\t\treturn e;\r\n\t}",
"public void set(int x, int y, double value) {\n\t\tmatrix.get(y).get(x).setValue(value);\n\t}",
"protected abstract double setCell(\r\n int row,\r\n int col,\r\n double valueToSet);",
"void setIdx(int i);",
"public void setValueAt(Object value, int row, int column)\n\t{\n\t\tgetModel().setDataAt(value, row, convertColumnIndexToModel(column));\n\t}",
"public void setPositionMatrix(Position[][] positionMatrix)\n {\n PositionMatrix = positionMatrix;\n this.entry = positionMatrix[entry.getRowIndex()][entry.getColumnIndex()];\n this.exit = positionMatrix[exit.getRowIndex()][exit.getColumnIndex()];\n }",
"@Override\n public void setValueAt(Object value, int row, int column) {\n this.data[row][column] = value;\n fireTableDataChanged();\n }",
"void setPosition(Position p);",
"public void setValueAt(Object aValue, int row, int col)\n\t{\n\t\t// invalid row\n\t\tif (row < 0 || row >= m_data.rows.size())\n\t\t\tthrow new IllegalArgumentException(\"Row invalid\");\n\t\tif (col < 0 || col >= m_data.cols.size())\n\t\t\tthrow new IllegalArgumentException(\"Column invalid\");\n\t\tif (!isCellEditable(row, col)){\n\t\t\tthrow new IllegalArgumentException(\"Cell is read only\");\n\t\t\t\n\t\t}\n\t\t\t//\n\t\tArrayList<Object> myRow = m_data.rows.get(row);\n\t\t// invalid row\n\t\tif (myRow == null)\n\t\t\tthrow new java.lang.IllegalArgumentException(\"Row not initialized\");\n\t\t// not enough columns - add nulls\n\t\tif (col >= myRow.size())\n\t\t\twhile (myRow.size() < m_data.cols.size())\n\t\t\t\tmyRow.add(null);\n\t\t// setValue\n\t\tmyRow.set(col, aValue);\n\t}",
"public E set(int index, E element) {\n if(index < 0 || index >= size())\n throw new IndexOutOfBoundsException();\n E currentElement = get(index);\n list[index] = element;\n return currentElement;\n }"
] | [
"0.7601293",
"0.7473482",
"0.7124912",
"0.68975174",
"0.67917955",
"0.67705405",
"0.67129606",
"0.67058665",
"0.6682491",
"0.66764814",
"0.66549385",
"0.66296065",
"0.6617128",
"0.66092956",
"0.6588154",
"0.6588154",
"0.65709877",
"0.65699846",
"0.6545002",
"0.6521801",
"0.64742136",
"0.6444782",
"0.63929236",
"0.638659",
"0.63852197",
"0.63673854",
"0.63509744",
"0.6329515",
"0.63266075",
"0.6320604",
"0.6317461",
"0.6304715",
"0.62924147",
"0.62909913",
"0.62685627",
"0.6260286",
"0.62542397",
"0.6251084",
"0.6247705",
"0.62401456",
"0.6233185",
"0.6189656",
"0.61830515",
"0.6181735",
"0.61788476",
"0.6176032",
"0.6165382",
"0.61592984",
"0.6146215",
"0.6142101",
"0.6142101",
"0.61367214",
"0.61211145",
"0.61063975",
"0.61029863",
"0.61029863",
"0.6097072",
"0.60923594",
"0.60900545",
"0.60845554",
"0.6068923",
"0.60678136",
"0.6062943",
"0.6062027",
"0.60495466",
"0.6037197",
"0.60344255",
"0.6031984",
"0.60312194",
"0.6022099",
"0.6014831",
"0.60127366",
"0.6011056",
"0.60034484",
"0.6000974",
"0.5996276",
"0.5981383",
"0.5976846",
"0.59688145",
"0.5965366",
"0.5964467",
"0.5963179",
"0.5958237",
"0.5954938",
"0.59492415",
"0.5944708",
"0.5942207",
"0.5938731",
"0.59336025",
"0.59319144",
"0.5921533",
"0.59117705",
"0.5896948",
"0.589281",
"0.5883556",
"0.5882477",
"0.5874017",
"0.58696616",
"0.58552855",
"0.5846327",
"0.5846082"
] | 0.0 | -1 |
Returns the identity matrix with the given size. | static public Matrix identityMatrix(int size) {
Matrix identity = new Matrix(size, size);
for (int i = 0; i < size; i++) {
identity.data[i][i] = 1;
}
return identity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Matrix getIdentityMatrix(int size) {\r\n Matrix m = new Matrix(size, size);\r\n\r\n for (int i = 0; i < size; i++) {\r\n m.setValue(i, i, 1);\r\n }\r\n\r\n return m;\r\n }",
"public double[][] getIdentityMatrix(int size) {\n\t\tdouble[][] identityMatrix = new double[size][size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tfor (int j = 0; j < size; j++) {\n\t\t\t\tif (i == j) {\n\t\t\t\t\tidentityMatrix[i][j] = 1.;\n\t\t\t\t} else {\n\t\t\t\t\tidentityMatrix[i][j] = 0.;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn identityMatrix;\n\t}",
"public double[][] getIdentityNegativeMatrix(int size) {\n\t\tdouble[][] identityMatrix = new double[size][size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tfor (int j = 0; j < size; j++) {\n\t\t\t\tif (i == j) {\n\t\t\t\t\tidentityMatrix[i][j] = -1.;\n\t\t\t\t} else {\n\t\t\t\t\tidentityMatrix[i][j] = 0.;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn identityMatrix;\n\t}",
"public static Mat2 initIdentity(int size) {\n\t\tdouble[][] data = new double[size][size];\n\t\tfor(int i=0; i<size; i++) {\n\t\t\tfor(int j=0; j<size; j++) {\n\t\t\t\tdata[i][j] = 0;\n\t\t\t\tif(i==j) data[i][j] = 1;\n\t\t\t}\n\t\t}\n\t\treturn new Mat2(data);\n\t}",
"public double[][] getVectorWithOnes(int size) {\n\t\tdouble[][] identityMatrix = new double[size][1];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tidentityMatrix[i][0] = 1;\n\t\t}\n\t\treturn identityMatrix;\n\t}",
"public double[][] getHilbertMatrix(int size) {\n\t\tdouble[][] identityMatrix = new double[size][size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tfor (int j = 0; j < size; j++) {\n\t\t\t\tdouble value = (i + 1) + (j + 1) - 1;\n\t\t\t\tidentityMatrix[i][j] = 1 / value;\n\t\t\t}\n\t\t}\n\t\treturn identityMatrix;\n\t}",
"public static Matrix Identity(int n) {\n List<List<Double>> backingArray = get2DListOfSize(n);\n for(int i = 0; i < n; i++)\n backingArray.get(i).set(i, 1d);\n return new Matrix(backingArray);\n }",
"public static SimpleMatrix identity( int width ) {\n return identity(width, DMatrixRMaj.class);\n }",
"public IdentityMap(int size) {\n maxSize = size;\n searchKey = new CacheKey(new Vector(1), null, null);\n }",
"public static Matrix identity(int N) {\n Matrix I = new Matrix(N, N);\n for (int i = 0; i < N; i++)\n I.data[i][i] = 1;\n return I;\n }",
"public static Matrix identity(int N) {\n Matrix I = new Matrix(N, N);\n for (int i = 0; i < N; i++)\n I.data[i][i] = 1;\n return I;\n }",
"public static short[][] constructIdentityMtx(int dimension) {\n \n short[][] rep = new short[dimension][dimension];\n\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n if (i == j) {\n rep[i][j] = 1;\n } else {\n rep[i][j] = 0;\n }\n }\n }\n return rep;\n }",
"public static Matrix identityMatrix(int nrow){\r\n \tMatrix u = new Matrix(nrow, nrow);\r\n \tfor(int i=0; i<nrow; i++){\r\n \t\tu.matrix[i][i]=1.0;\r\n \t}\r\n \treturn u;\r\n \t}",
"public static Matrix identity(int n) {\n\t\tComplexNumber[][] rows = new ComplexNumber[n][];\n\t\tfor (int row = 0; row < n; row++) {\n\t\t\trows[row] = new ComplexNumber[n];\n\t\t\tfor (int col = 0; col < n; col++) {\n\t\t\t\tint term = (row == col) ? 1 : 0;\n\t\t\t\trows[row][col] = new ComplexNumber(term);\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(rows);\n\t}",
"public void makeIdentity() {\n if (rows == cols) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n if (i == j) {\n matrix.get(i)[j] = 1;\n }\n else {\n matrix.get(i)[j] = 0;\n }\n }\n }\n }\n else {\n throw new NonSquareMatrixException();\n }\n }",
"public int[][] createBoard(int size){\r\n\t\tint[][] newBoard = new int[size+1][size+1];\r\n\t\tfor (int i = 0; i < newBoard.length; i++){\r\n\t\t\tfor (int j = 0; j < newBoard[i].length; j++) {\r\n\t\t\t\tif (i == 0) {\r\n\t\t\t\t\tnewBoard[i][j] = j;\r\n\t\t\t\t} else if (j == 0) {\r\n\t\t\t\t\tnewBoard[i][j] = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}newBoard[0][0] = 0;\r\n\treturn newBoard;\r\n\t}",
"public Map<Integer, Integer> generateMap(int size){\n Map<Integer, Integer> data = new HashMap<>();\n for (int i = 0; i < size; i++){\n data.put(i, i);\n }\n return data;\n }",
"public void setIdentity() {\n System.arraycopy(IDENTITY, 0, matrix, 0, 16);\n }",
"@Test\n public void testIdentity() {\n final double junk[] = new double[Matrix33d.LENGTH];\n for (int i = 0; i < Matrix33d.LENGTH; i++) {\n junk[i] = 1089.1451D;\n }\n final Matrix33d m = new Matrix33d();\n m.setA(junk);\n\n m.identity();\n final double a[] = m.getA();\n for (int i = 0; i < a.length; i++) {\n if (i == 0 || i == 4 || i == 8) {\n assertEquals(a[i], 1D);\n } else {\n assertEquals(a[i], 0D);\n }\n }\n }",
"public Matrix(int n) {\n\t\tsize = n;\n\t\tm = new int[size][size];\n\t}",
"private int[][] initialStateMatrix() {\n return new int[][]{{2,1,-1,3,0,-1},\n {2,-1,-1,3,-1,-1},\n {2,-1,5,4,8,-1},\n {4,-1,-1,-1,-1,-1},\n {4,-1,5,-1,8,-1},\n {7,6,-1,-1,-1,-1},\n {7,-1,-1,-1,-1,-1},\n {7,-1,-1,-1,8,-1},\n {-1,-1,-1,-1,8,-1}};\n }",
"public Set<Integer> generateSet(int size){\n Set<Integer> data = new HashSet<>();\n for (int i = 0; i < size; i++){\n data.add(i);\n }\n return data;\n }",
"private void generateMatrix(int n) throws InvalidSizeException{\n\t\tif(n%2 == 0 || n == 0 || n < 0) {\n\t\t\tthrow new InvalidSizeException(n);\n\t\t}else {\n\t\t\tmatrix = new int[n][n];\n\t\t\tsize = n;\n\t\t}\n\t}",
"public static IntArrayList zero(int size) {\n IntArrayList result = new IntArrayList(size);\n result.elementsCount = size;\n return result;\n }",
"public int[] initializingArray(int size) {\n\t\tint [] array = createArrays(size);\n\t\tfor(int i = 0;i < array.length; i++) {\n\t\t\tarray[i] = rand.nextInt(10);\n\t\t}\n\t\treturn array;\n\t}",
"public Graph(int size) {\n\t\tmatrix = new int[size][size];\n\t\tthis.size = size;\n\n\t\tfor(int i = 0; i < size; i++) {\n\t\t\tfor(int j = 0; j < size; j++) {\n\t\t\t\tmatrix[i][j] = 0;\n\t\t\t}\n\t\t}\n\n\t\t// make space for the values (and ignore the cast warning)\n\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tType[] values = (Type[]) new Object[size];\n\t\tthis.values = values;\n\t}",
"public void identity(){\n for (int j = 0; j<4; j++){\n \tfor (int i = 0; i<4; i++){\n \t\tif (i == j)\n \t\t\tarray[i][j] = 1;\n \t\telse\n \t\t\tarray[i][j] = 0;\n \t }\n \t }\n\t}",
"public IntMap(int size){\r\n hashMask=size-1;\r\n indexMask=(size<<1)-1;\r\n data=new int[size<<1];\r\n }",
"public HashTable(int size) {\n\t\tallocateArray(size);\n\t\tclear();\n\t}",
"public static JTensor newWithSize1d(long size0) {\n return new JTensor(\n TH.THTensor_(newWithSize1d)(size0)\n );\n }",
"public static IndexedTensor zeros(int[] size, String... indices) {\n return new IndexedTensor(Tensor.zeros(size), indices);\n }",
"public static int[][] generateMatrix() {\n int rowsCount = RANDOM.nextInt( MAX_ROWS_COUNT ) + 1;\n int[][] result = new int[rowsCount][];\n for (int i = 0; i < rowsCount; i++) {\n result[i] = new int[RANDOM.nextInt( MAX_COLUMNS_COUNT ) + 1];\n fillArray( result[i] );\n }\n return result;\n }",
"public static Matrix Zero(int n) {\n return new Matrix(get2DListOfSize(n));\n }",
"public void initialize(int size);",
"public void makeArray(int size) {\n\t\t\n\t}",
"public Matrix4f SetMatrixToIdentityAndGet() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t\n\tthis :\n\t The self matrix set to identity\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 1;\t\n\t\n\treturn this;\n \n }",
"public static WorldMatrix getIdentity (double componentWidth, double componentHeight) {\n return new WorldMatrix (0, 0, componentWidth, componentHeight, \n componentWidth, componentHeight);\n }",
"public static IntArrayList iota(int size) {\n return range(0, size);\n }",
"private Board(int size)\n {\n array = new char[size][size];\n \n for (int i = 0; i < size; i++)\n for (int j = 0; j < size; j++)\n array[i][j] = EMPTY;\n }",
"public void initIdentity() \r\n\t{\r\n\t\tm[0][0] = 1.0f; m[0][1] = 0.0f; m[0][2] = 0.0f; m[0][3] = 0.0f;\r\n\t\tm[1][0] = 0.0f; m[1][1] = 1.0f; m[1][2] = 0.0f; m[1][3] = 0.0f;\r\n\t\tm[2][0] = 0.0f; m[2][1] = 0.0f; m[2][2] = 1.0f; m[2][3] = 0.0f;\r\n\t\tm[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f;\r\n\t}",
"public Board(int size) {\n initialize(size, null);\n }",
"private ArrayIntList buildList(int size) {\n\t\tArrayIntList list = new ArrayIntList();\n\t\tfor (int i=1;i<=size;i++)\n\t\t\tlist.add(i);\n\t\treturn list; \n\t}",
"public List<Integer> generateList(int size){\n List<Integer> data = new ArrayList<>();\n for (int i = 0; i < size; i++){\n data.add(i);\n }\n return data;\n }",
"@Test\n public void whenCreateTableWithSize4ThenTableSize4x4Elements() {\n int[][] table = Matrix.multiple(4);\n int[][] expect = {\n {1, 2, 3, 4},\n {2, 4, 6, 8},\n {3, 6, 9, 12},\n {4, 8, 12, 16}};\n assertArrayEquals(expect, table);\n\n }",
"public static Integer[] prepareRandomIntegerArray(int size) {\n\t\tInteger[] array = new Integer[size];\n\t\tfor (int j = 0; j < size; j++) {\n\t\t\tarray[j] = (int) ((Math.random() * 1000000));\n\t\t}\n\t\treturn array;\n\t}",
"private static Vector emptyVector (int size)\n\t{\n\t\tVector v = new Vector ();\n\t\tfor (int i=0; i <= size; i++)\n\t\t{\n\t\t\tv.add (i, \"\");\n\t\t}\n\t\treturn v;\n\n\t}",
"static int[][] unite4arrays(Map<Integer, int[][]> map, int size) {\n int sqrt = (int) Math.sqrt( map.keySet().size());\n int[][] result = new int[size * sqrt][size * sqrt];\n for (int i = 0; i < map.keySet().size(); i++) {\n\n for (int x = 0; x < size; x++) {\n for (int y = 0; y < size; y++) {\n result[x + size * (i % sqrt)][y + size * (i / sqrt)] = map.get(i)[x][y];\n }\n }\n\n }\n return result;\n }",
"@Override\n public Matrix viewPart(int[] offset, int[] size) {\n return new MatrixView(this, offset, size);\n }",
"private static Integer[][] createRandomStart(Integer dimension) {\n Integer[][] startmatrix = new Integer[dimension][dimension];\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n startmatrix[i][j] = (int)(Math.random() * 2);\n }\n }\n return startmatrix;\n }",
"public Sudoku(int size){\n\t\tthis.size = size;\n\t\tnumbers = new int[size*size][size*size];\n\t\tfixedNumbers = new boolean[size*size][size*size];\n\t\t// create sudoku which is yet to be initialized and set them unfixed\n\t\t// (all numbers are zero)\n\t\tfor (int i = 0; i < size*size; i++){\n\t\t\tfor (int j = 0; j < size*size; j++){\n\t\t\t\tnumbers[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}",
"public static int[][] generate(int dimension){\n int[][] matrix = new int[dimension][dimension];\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n matrix[i][j] = r.nextInt(10);\n }\n }\n return matrix;\n }",
"public Mat2(int size) {\n\t\tthis(size, size);\n\t}",
"public Graph(int size){\n this.size=size;\n Matrix=new boolean[size][size];\n color=new int[size];\n }",
"int getSize(){\n return this.matrixSize;\n }",
"public RealMatrix eye(int dim) {\n\t\tRealMatrix m = new BlockRealMatrix(dim, dim);\n\t\tfor(int i = 0; i < dim; i++) {\n\t\t\tm.setEntry(i, i, 1);\n\t\t}\n\t\treturn m;\n\t}",
"public void SetMatrixToIdentity() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 1;\t\n \n }",
"private int size() {\n\treturn matrix.length; //# of rows\n }",
"public SparseSet(int size) {\n\n\t sparse = new int[size];\n\t dense = new int[size];\n\t members = 0;\n\t \n\t // Added so value 0 can be added first.\n\t // TODO, test if that is still necessary after fixing a rare bug with addition.\n\t dense[0] = -1;\n\t}",
"public int size() {\n return _matrix.length;\n }",
"Matrix(int rows, int columns) {\n try {\n if (rows < 1 || columns < 1) {\n throw zeroSize;\n }\n this.rows = rows;\n this.columns = columns;\n matrix = new int[rows][columns];\n\n for (int rw = 0; rw < rows; rw++) {\n for (int col = 0; col < columns; col++) {\n matrix[rw][col] = (int) Math.floor(Math.random() * 100);\n }\n }\n }\n catch (Throwable zeroSize) {\n zeroSize.printStackTrace();\n }\n\n }",
"public static void generateMatrix() {\r\n Random random = new Random();\r\n for (int i = 0; i < dim; i++)\r\n {\r\n for (int j = 0; j < dim; j++)\r\n {\r\n if (i != j)\r\n \r\n adjacencyMatrix[i][j] = I; \r\n }\r\n }\r\n for (int i = 0; i < dim * dim * fill; i++)\r\n {\r\n adjacencyMatrix[random.nextInt(dim)][random.nextInt(dim)] =\r\n random.nextInt(maxDistance + 1);\r\n }\r\n \r\n\r\n\r\n \r\n //print(adjacencyMatrix);\r\n \r\n \r\n //This makes the main matrix d[][] ready\r\n for (int i = 0; i < dim; i++) {\r\n for (int j = 0; j < dim; j++)\r\n {\r\n d[i][j] = adjacencyMatrix[i][j];\r\n if (i == j)\r\n {\r\n d[i][j] = 0;\r\n }\r\n }\r\n }\r\n }",
"public static BigFraction[][] identity(int n) {\n BigFraction[][] I = new BigFraction[n][n];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n I[i][j] = new BigFraction(0);\n I[i][i] = new BigFraction(1);\n }\n }\n return I;\n }",
"private int randomIndex(int size) {\n\t\treturn (int) (Math.random() * size);\n\t}",
"public UnaryTableSequence(String name, int size) {\r\n super(name, size, false, true);\r\n }",
"MatrixElement(int edgesQuantity) {\r\n\t\tthis.edgesQuantity = edgesQuantity;\r\n\t}",
"BigONotation(int size) {\n\t\tarraySize = size;\n\t\ttheArray = new int[size];\n\t}",
"public void createNew(int size);",
"private static int[][] defGenesOrder(int size) {\r\n int[][] order = new int[1][size];\r\n for (int i=0; i<order[0].length; i++) {\r\n order[0][i] = i;\r\n }\r\n return order;\r\n }",
"int[][] multiple(int size) {\n\t\t size++; // наверняка пользователь захочет получить таблицу до того номера ВКЛЮЧИТЕЛЬНО, который укажет во входных параметрах\n\t\t int[][] mult = new int[size][size]; \n\t\t for (int i = 0; i < size; i++) {\n\t\t\t for (int j = 0; j < size; j++) {\n\t\t\t\t mult[i][j] = i * j;\n\t\t\t }\n\t\t }\n\t\t return mult;\n\t }",
"public int size() {\n return matrix.length;\n }",
"public static List<Integer> prepareRandomIntegeArrayList(int size) {\n\t\tList<Integer> arrayList = new ArrayList<>(size);\n\t\tfor (int j = 0; j < size; j++) {\n\t\t\tarrayList.add(j, (int) ((Math.random() * 1000000)));\n\t\t}\n\t\treturn arrayList;\n\t}",
"public Matrix( int a ) {\n\tmatrix = new Object[a][a];\n }",
"public Matrix(int nrOfRows, int nrOfCols) {\n this.nrOfRows = nrOfRows;\n this.nrOfCols = nrOfCols;\n inner = new BigInteger[nrOfRows][nrOfCols];\n }",
"public MySet(int size) {\n table = (HashNode<E>[]) new HashNode[size];\n }",
"public Matrix(int rowSize, int columnSize) {\n if (rowSize < 1 || columnSize < 1) {\n matrix = new double[DEFAULT_SIZE][DEFAULT_SIZE];\n } else {\n matrix = new double[rowSize][columnSize];\n }\n }",
"public int[][] copy_board(int[][] board, int size) {\n\t\tint[][] copy = new int[size*size][size*size];\n\t\tfor (int i=0; i<size*size; i++) {\n\t\t\tfor (int j=0; j<size*size; j++) {\n\t\t\t\tcopy[i][j] = board[i][j];\n\t\t\t}\n\t\t}\n\t\treturn copy;\n\t}",
"@Override\n\t\tpublic LoginDto[] newArray(int size) {\n\t\t\treturn new LoginDto[size];\n\t\t}",
"public static Matrix generateBigDiagonal(int size, boolean oppositedirection, double... ds) throws Exception {\n\t\tdouble[][] a = new double[size][size];\n\t\tint numparams = ds.length;\n\t\t\n\t\tif(!oppositedirection) {\n\t\t\tswitch(numparams) {\n\t\t\t\tcase 1: for(int i = 0; i<size; i++){\n\t\t\t \t\t\tfor(int j =0; j<size; j++){\n\t\t\t \t\t\t\tif(j == i) a[i][j] = ds[0];\n\t\t\t \t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 3: for(int i = 0; i<size; i++){\n\t\t\t \t\t\tfor(int j =0; j<size; j++){\n\t\t\t \t\t\t\tif(j == i-1) a[i][j] = ds[0];\n\t\t\t \t\t\t\tif(j == i) a[i][j] = ds[1];\n\t\t\t \t\t\t\tif(j == i+1) a[i][j] = ds[2];\n\t\t\t \t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 5: for(int i = 0; i<size; i++){\n\t \t\t\t\t\tfor(int j =0; j<size; j++){\n\t \t\t\t\t\t\tif(j == i-2) a[i][j] = ds[0];\n\t \t\t\t\t\t\tif(j == i-1) a[i][j] = ds[1];\n\t \t\t\t\t\t\tif(j == i) a[i][j] = ds[2];\n\t \t\t\t\t\t\tif(j == i+1) a[i][j] = ds[3];\n\t \t\t\t\t\t\tif(j == i+2) a[i][j] = ds[4];\n\t \t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault: throw new Exception(\"Invalid number of parameters\");\n\t\t\t}\n\t\t} else {\n\t\t\tswitch(numparams) {\n\t\t\tcase 1: for(int i = 0; i<size; i++){\n\t\t \t\t\tfor(int j =0; j<size; j++){\n\t\t \t\t\t\tif(j+i == size-1) a[i][j] = ds[0];\n\t\t \t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 3: for(int i = 0; i<size; i++){\n\t\t \t\t\tfor(int j =0; j<size; j++){\n\t\t \t\t\t\tif(j+i == size-2) a[i][j] = ds[0];\n\t\t \t\t\t\tif(j+i == size-1) a[i][j] = ds[1];\n\t\t \t\t\t\tif(j+i == size) a[i][j] = ds[2];\n\t\t \t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 5: for(int i = 0; i<size; i++){\n \t\t\t\t\tfor(int j =0; j<size; j++){\n \t\t\t\t\t\tif(j+i == size-3) a[i][j] = ds[0];\n \t\t\t\t\t\tif(j+i == size-2) a[i][j] = ds[1];\n \t\t\t\t\t\tif(j+i == size-1) a[i][j] = ds[2];\n \t\t\t\t\t\tif(j+i == size) a[i][j] = ds[3];\n \t\t\t\t\t\tif(j+i == size+1) a[i][j] = ds[4];\n \t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault: throw new Exception(\"Invalid number of parameters\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tMatrix A = new Matrix(a);\n\t\n\t\treturn A;\n\t}",
"public Table_old(int _size) {\r\n size = _size;\r\n table = new int[size][size];\r\n temp_table = new int[size][size]; \r\n }",
"public int[][] initMatrix(int n)\n {\n\t// create an empty 2d array and return it! Simple stuff here.\n\t int[][] retMatrix = new int[n][n];\n\t return retMatrix;\n }",
"public Matrice(int dim){\n\t\tnr=dim;\n\t\tnc=nr;\n\t\tmat = new int[nr][nc];\n\t}",
"private SparseMatrix<Float64> makeCR0(int numberOfRows) {\n\t\tList<SparseVector<Float64>> matrix =\n\t\t\tnew ArrayList<SparseVector<Float64>>();\n\t\tfor (int i = 0; i < numberOfRows; i++) {\n\t\t\tmatrix.add(SparseVector.valueOf(numberOfRows, Float64.ZERO, i,\n\t\t\t\tFloat64.ONE));\n\t\t}\n\t\treturn SparseMatrix.valueOf(new AllSame<Float64>(numberOfRows,\n\t\t\tFloat64.ONE), Float64.ZERO);\n\t}",
"public static ToIntFunction<IntTuple> colexicographicalIndexer(\r\n IntTuple size)\r\n {\r\n Objects.requireNonNull(size, \"The size is null\");\r\n IntTuple sizeProducts =\r\n IntTupleFunctions.exclusiveScan(\r\n size, 1, (a, b) -> a * b, null);\r\n return indices -> IntTuples.dot(indices, sizeProducts); \r\n }",
"public SimpleArray(int size)\n\t{\n\t\tarray = new int[size];\n\t}",
"public Matrix() {\n\tmatrix = new Object[DEFAULT_SIZE][DEFAULT_SIZE];\n }",
"public static int[][] changeMatrix(int[][] matrix,MatrixSize matrixSize){\n boolean firstRowContainsZero=doesFirstRowContainZero(matrix,matrixSize);\n boolean firstColumnContainsZero=doesFirstColumnContainZero(matrix,matrixSize);\n changeFirstRowAndColumn(matrix,matrixSize);\n changeSubMatrix(matrix,matrixSize);\n if(firstRowContainsZero)\n setFirstRowToZero(matrix,matrixSize.numberOfColumns);\n if(firstColumnContainsZero)\n setFirstColumnToZero(matrix,matrixSize.numberOfRows);\n return matrix;\n }",
"public DijkstraArrays(int size) {\n\t\tthis.setSize(size);\n\t}",
"@Override\n public Element[] newArray(int size) {\n return new Element[size];\n }",
"Identity identity();",
"Identity identity();",
"private int[] createArrays(int size) {//creating method, using variable \"SIZE\"\n\t\tint [] array = new int[size];\n\t\treturn array;\n\t}",
"public HashedVector(int size) {\n\t\tthis.elements = new HashMap<>(size);\n\t}",
"public void initialize(int size) {\n setMaxSize(size);\n }",
"public Table(int size) {\n\t\tsuper(size);\n\t}",
"public boolean ident() {\n clear();\n for (int i = 0; i < 4; i++) {\n double[] toAdd = new double[4];\n for (int j = 0; j < 4; j++) {\n if (j == i) {\n toAdd[j] = 1;\n } else {\n toAdd[j] = 0;\n }\n }\n mat.add(toAdd);\n }\n maxCols = mat.size();\n return true;\n }",
"public Hylle(int size) {\n a = (T[]) new Object[size];\n this.size = size;\n }",
"public IntegerList(int size)\n {\n list = new int[size];\n }",
"private static StructureElement createCenteredSquare(int size) {\r\n\t\treturn new StructureElement(createSquareMask(size), size / 2, size / 2);\r\n\t}",
"int[][][] generateChecker(int size);",
"public IntList(int size){\n\t\tprime = new ArrayList<Integer>(size);\n\t}"
] | [
"0.84862787",
"0.82532036",
"0.7332451",
"0.72034174",
"0.6814291",
"0.6713667",
"0.66818416",
"0.6358805",
"0.63018394",
"0.62713903",
"0.62713903",
"0.6145656",
"0.6026441",
"0.5971254",
"0.58761287",
"0.5548647",
"0.5537484",
"0.54998916",
"0.54388595",
"0.53751963",
"0.53071094",
"0.5301491",
"0.52824455",
"0.52811813",
"0.5263251",
"0.5227428",
"0.52273685",
"0.5214779",
"0.5173599",
"0.51510495",
"0.5139394",
"0.5122551",
"0.5095986",
"0.50830173",
"0.5056833",
"0.50520587",
"0.50452626",
"0.5045089",
"0.5019186",
"0.500999",
"0.50030905",
"0.50015604",
"0.50002366",
"0.49932355",
"0.49914286",
"0.49794683",
"0.4978766",
"0.49778247",
"0.4977325",
"0.4945219",
"0.49446777",
"0.49356315",
"0.4934397",
"0.49332204",
"0.4930171",
"0.49298778",
"0.4929805",
"0.49209747",
"0.49127138",
"0.48961085",
"0.48939338",
"0.48919657",
"0.489154",
"0.48833713",
"0.48830065",
"0.48791122",
"0.4861989",
"0.48605773",
"0.48604825",
"0.48465478",
"0.48461407",
"0.48382005",
"0.48354322",
"0.48332134",
"0.48244393",
"0.48117304",
"0.480351",
"0.4798847",
"0.4789729",
"0.47717682",
"0.47710487",
"0.47684857",
"0.47648096",
"0.47390017",
"0.47383827",
"0.47345966",
"0.47335774",
"0.47329158",
"0.4728431",
"0.4728431",
"0.47278124",
"0.47197083",
"0.47157282",
"0.47157153",
"0.47119406",
"0.470363",
"0.47028428",
"0.47021806",
"0.46967122",
"0.46781558"
] | 0.875585 | 0 |
Returns the sum of two matrices with the same dimensions | public Matrix add(Matrix other) {
if (this.cols != other.cols || this.rows != other.rows)
throw new RuntimeException("Illegal matrix dimensions");
Matrix result = new Matrix(this.rows, this.cols);
for (int i = 0; i < this.rows; i++) {
for (int j = 0; j < this.cols; j++) {
result.data[i][j] = this.data[i][j] + other.data[i][j];
}
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int[][] matrixSum(int[][] a, int[][]b) {\n\t\tint row = a.length;\n\t\tint col = a[0].length;\n\t\t// creat a matrix array to store sum of a and b\n\t\tint[][] sum = new int[row][col];\n\t\t\n\t\t// Add elements at the same position in a matrix array\n\t\tfor (int r = 0; r < row; r++) {\n\t\t\tfor (int c = 0; c < col; c++) {\n\t\t\t\tsum[r][c] = a[r][c] + b[r][c]; \n\t\t\t}\n\t\t}\n\t\t\n\t\treturn sum;\n\t}",
"private static void sum(int[][] first, int[][] second) {\r\n\t\tint row = first.length;\r\n\t\tint column = first[0].length;\r\n\t\tint[][] sum = new int[row][column];\r\n\r\n\t\tfor (int r = 0; r < row; r++) {\r\n\t\t\tfor (int c = 0; c < column; c++) {\r\n\t\t\t\tsum[r] = first[r] + second[r];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"\\nSum of Matrices:\\n\");\r\n\t\tprint2dArray(sum);\r\n\t}",
"public static Matrix add(Matrix first, Matrix second) {\n\n Matrix result = new Matrix(first.getRows(), first.getClumns());\n\n for (int row = 0; row < first.getRows(); row++) {\n for (int col = 0; col < first.getClumns(); col++) {\n result.matrix[row][col] = first.matrix[row][col] + second.matrix[row][col];\n }\n }\n\n return result;\n }",
"public Matrix addMatrices(Matrix mat1, Matrix mat2){\r\n\t\t\r\n\t\tMatrix resultMat = new Matrix();\r\n\t\t\r\n\t\tfor(int rowi = 0; rowi < dim; rowi++ )\r\n\t\t\tfor (int coli = 0; coli < dim; coli++)\r\n\t\t\tresultMat.setElement(mat1.getElement(rowi, coli) + mat2.getElement(rowi, coli), rowi, coli);\r\n\t\treturn resultMat;\r\n\t}",
"public int[][] sumOfMatrices(int row, int col, int array1[][], int array2[][]) {\n int[][] sum = new int[row][col];\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < col; j++) {\n sum[i][j] = array1[i][j] + array2[i][j];\n }\n }\n return sum;\n }",
"public static double[][] sum(double[][] t1,double[][] t2)\n\t{\n\t\t// Vérifie si t1 & t2 sont régulier\n\t\tif (!regular(t1) || !regular(t2))\n\t\t\treturn null;\n\t\t// Vérifie si t1 & t2 sont de même longeur\n\t\tif (t1.length!=t2.length)\n\t\t\treturn null;\n\t\tif (t1[0].length!=t2[0].length)\n\t\t\treturn null;\n\t\tint nLin=t1.length; int nRow=t1[0].length;\n\t\t\n\t\tdouble[][] somme=new double[nLin][nRow];\n\t\t\n\t\tfor (int i=0;i<nLin;i++)\n\t\t\tfor (int j=0;j<nRow;j++)\n\t\t\t\tsomme[i][j]=t1[i][j]+t2[i][j];\n\t\treturn somme;\n\t}",
"public static void add(int[][] matrix1, int[][] matrix2) {\n\tfor(int x=0;x<matrix1.length; x++) {\r\n\t\tfor(int y=0;y<matrix2.length;y++) {\r\n\t\t\tSystem.out.print(matrix1[x][y] +matrix2[x][y] + \" \");\r\n\t\t\t}\r\n\t\tSystem.out.println();\r\n\t\t}\t\r\n\t}",
"public static Matrix plus(Matrix amat, Matrix bmat){\r\n \tif((amat.nrow!=bmat.nrow)||(amat.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=amat.nrow;\r\n \tint nc=amat.ncol;\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=amat.matrix[i][j] + bmat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"@Override\n\tpublic IMatrix add(IMatrix other) {\n\t\tif (this.getColsCount() != other.getColsCount()\n\t\t\t\t|| this.getRowsCount() != other.getRowsCount()) {\n\t\t\tthrow new IncompatibleOperandException(\n\t\t\t\t\t\"For operation 'add' matrixes should be compatible!\");\n\t\t}\n\t\tint m = this.getRowsCount();\n\t\tint n = this.getColsCount();\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tthis.set(i, j, this.get(i, j) + other.get(i, j));\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}",
"public static SquareMatrix add(SquareMatrix m1, SquareMatrix m2) throws Exception{\n SquareMatrix result;\n \n if (m1.size() == m2.size()) {\n result = new SquareMatrix(m1.size());\n for (int row=0; row<m1.size(); row++) {\n for(int col=0; col<m1.size(); col++) {\n double value = m1.get(row, col) + m2.get(row, col);\n result.set(row, col, value);\n }\n }\n } else {\n throw new Exception(\"Le due matrici devo avere la stessa dimensione\");\n }\n return result;\n }",
"public Matrix plus(Matrix B) {\n Matrix A = this;\n if (B.rowCount != A.rowCount || B.columnCount != A.columnCount) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(rowCount, columnCount);\n for (int i = 0; i < rowCount; i++)\n for (int j = 0; j < columnCount; j++)\n C.data[i][j] = A.data[i][j] + B.data[i][j];\n return C;\n }",
"public Matrix plus(Matrix B) {\n Matrix A = this;\n if (B.M != A.M || B.N != A.N) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(M, N);\n for (int i = 0; i < M; i++)\n for (int j = 0; j < N; j++)\n C.data[i][j] = A.data[i][j] + B.data[i][j];\n return C;\n }",
"public static int[][] add(int[][] a, int[][] b) {\n\t\tint[][] C = new int[4][4];\n\t\t \n for (int q = 0; q < C.length; q++) {\n for (int w = 0; w < C[q].length; w++) {\n C[q][w] = a[q][w] + b[q][w];\n }\n }\n \n for (int q = 0; q < b.length; q++ ){\n for(int w = 0; w < C[q].length;w++){\n }\n }\n \n return C;\n \n \n }",
"public void plusEquals(Matrix bmat){\r\n \tif((this.nrow!=bmat.nrow)||(this.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=bmat.nrow;\r\n \tint nc=bmat.ncol;\r\n\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tthis.matrix[i][j] += bmat.matrix[i][j];\r\n\t \t}\r\n \t}\r\n \t}",
"public Matrix plus(Matrix bmat){\r\n \tif((this.nrow!=bmat.nrow)||(this.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=bmat.nrow;\r\n \tint nc=bmat.ncol;\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=this.matrix[i][j] + bmat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"public Matrix plus(Matrix B) throws JPARSECException {\n checkMatrixDimensions(B);\n Matrix X = new Matrix(m,n);\n double[][] C = X.getArray();\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n C[i][j] = data[i][j] + B.data[i][j];\n }\n }\n return X;\n }",
"@Override\n\tpublic IMatrix nAdd(IMatrix other) {\n\t\treturn this.copy().add(other);\n\t}",
"public Matrix plus(double[][] bmat){\r\n \t int nr=bmat.length;\r\n \tint nc=bmat[0].length;\r\n \tif((this.nrow!=nr)||(this.ncol!=nc)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=this.matrix[i][j] + bmat[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"public int[][] sum(int[][] A, int[][] B, int x1, int y1, int x2, int y2, int n)\n {\n\t // create return matrix\n\t int[][] matrix = initMatrix(n);\n\t \n\t // populate the return matrix by adding together the elements of the two given arrays.\n\t for (int i = 0; i<n; i++) {\n\t\t for (int j = 0; j<n; j++) {\n\t\t\t matrix[i][j] = A[x1+i][y1+j] + B[x2+i][y2+j];\n\t\t }\n\t }\n\t \n\t // return the matrix\n\t return matrix;\n }",
"Matrix sumRows(){\n Matrix matrix_to_return = new Matrix(1, this.cols);\n double[][] tmp = this.asArray();\n int k=0;\n for(int i=0; i<this.cols; i++){\n for(int j=0; j<this.rows; j++) {\n matrix_to_return.data[k] += tmp[j][i];\n }\n k++;\n }\n return matrix_to_return;\n }",
"public Matrix plusEquals(Matrix B) throws JPARSECException {\n checkMatrixDimensions(B);\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n data[i][j] = data[i][j] + B.data[i][j];\n }\n }\n return this;\n }",
"Matrix(Matrix first, Matrix second) {\n if (first.getColumns() == second.getRows()) {\n this.rows = first.getRows();\n this.columns = second.getColumns();\n matrix = new int[first.getRows()][second.getColumns()];\n for (int col = 0; col < this.getColumns(); col++) {\n int sum;\n int commonality = first.getColumns(); // number to handle summation loop\n for (int rw = 0; rw < this.getRows(); rw++) {\n sum = 0;\n // summation loop\n for (int x = 0; x < commonality; x++) {\n sum += first.getValue(rw, x) * second.getValue(x, col);\n }\n matrix[rw][col] = sum;\n }\n\n }\n } else {\n System.out.println(\"Matrices cannot be multiplied\");\n }\n }",
"public Matrix add(Matrix m2)\n\t{\n\t\tMatrix result = new Matrix(new double[matrix.length][matrix.length]); \n\t\tfor (int i = 0; i < matrix.length; i++)\n\t\t{\n\t\t\tfor (int j = 0; j < matrix.length; j++)\n\t\t\t{\n\t\t\t\tresult.matrix[i][j] = matrix[i][j] + m2.matrix[i][j];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public void add(SquareMatrix other) throws Exception{\n if (this.size() == other.size()) {\n for (int row=0; row<this.size(); row++) {\n for(int col=0; col<this.size(); col++) {\n double value = this.get(row, col) + other.get(row, col);\n this.set(row, col, value);\n }\n }\n } else {\n throw new Exception(\"Le due matrici devo avere la stessa dimensione\");\n }\n }",
"int[ ][ ] findSum(int a[][],int b[][])\n {\n int temp[][]=new int[r][c];\n for(int i=0;i<r;i++)\n for(int j=0;i<j;i++)\n temp[i][j]=a[i][j]+b[i][j];\n\n return temp;\n }",
"public static int sum2( int [][] m )\n {\n\t int sum = 0;\t\t\t\t\t\t\t//initialize variable to hold/track sum so far\n\t\n\t for (int i = 0; i < m.length; i++) { \t//loop through the arrays\n\n\t\t sum += sumRow1(i, m);\t\t\t\t//procure the sum of each row, and add it to the sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t//return the sum\n }",
"public static int[][] add(int[][] x,int[][] y){\n int[][] result = new int[x.length][x.length];\n for (int i = 0; i < x.length; i++) {\n for (int j = 0; j < x.length; j++) {\n result[i][j] = x[i][j] + y[i][j];\n }\n }\n return result;\n }",
"public static void main(String[] args) {\n int[][] arrayFirst = {\n {1, 2, 3},\n {1, 2, 3},\n {1, 2, 3},\n };\n int[][] arraySecond = {\n {2, 2, 2},\n {3, 3, 3},\n {4, 4, 4}\n };\n int[][] arraySum = new int[arrayFirst.length][arrayFirst[0].length];\n System.out.println(\"Итоговая матрица:\");\n for (int i = 0; i < arrayFirst.length; i++) {\n for (int k = 0; k < arrayFirst[i].length; k++) {\n arraySum[i][k] = arrayFirst[i][k] + arraySecond[i][k];\n System.out.print(arraySum[i][k] + \" \");\n }\n System.out.println();\n }\n }",
"public void Sumatoria()\n {\n for (int i = 0; i < vector1.length; i++) {\n sumatoria[i]=vector1[i]+vector2[i];\n }\n }",
"public static double [] combineArray(double []num1, double []num2){\n\t\t\n\t\t double []sum=new double[num1.length + num2.length];\n\n\t\t for (int i=0; i<num1.length; i++){\n\t\t sum[i]+=num1[i];\n\t\t }\n\t\t for (int i=0; i<num2.length; i++){\n\t\t \tsum[i+num1.length]+=num2[i];\n\t\t }\n\t\t\treturn sum;\n\t}",
"public void addOtherMatrix(Matrix other) {\n if (other.rows != rows || other.columns != columns) {\n return;\n }\n matrixVar = matrixVar + other.matrixVar;\n }",
"public static int[] sumTwoArrays(int[] a, int[] b) {\n\t\tif (a.length > b.length) {\n\t\t\treturn sumTwoArraysInt(a, b);\n\t\t} else {\n\t\t\treturn sumTwoArraysInt(b, a);\n\t\t}\n\t}",
"static void Adding(int[][] array, int[][] second_array) {\n System.out.println(\"\\t\\t\\t<<=======================================================>>\");\n System.out.println(\"\\t\\t\\t\\tHere's Your Addition of Mutli_Dimentional Matrix::\");\n for (int i = 0; i < array.length; i++) {\n for (int j = 0; j < second_array.length; j++) {\n System.out.print(array[i][j] + second_array[i][j] + \" \");\n }\n System.out.println();\n }\n }",
"public interface MatrixSummator {\n /**\n * Sums matrices\n * @param mtx1 first matrix\n * @param mtx2 second matrix\n * @throws ServiceException if matrices have different sizes\n */\n Matrix sum(Matrix mtx1, Matrix mtx2) throws ServiceException;\n}",
"public Matrix add(Matrix matrix) {\n if (check(matrix)) {\n Matrix sum = new Matrix(this.getWidth(), this.getHeight());\n for (int i = 0; i < this.getHeight(); i++) {\n for (int j = 0; j < this.getWidth(); j++) {\n sum.setEntry(j, i, this.getEntry(j, i) + matrix.getEntry(j, i));\n }\n }\n return sum;\n } else {\n return null;\n }\n }",
"public T plus( T B ) {\n convertType.specify(this, B);\n T A = convertType.convert(this);\n B = convertType.convert(B);\n\n T ret = A.createMatrix(mat.getNumRows(), mat.getNumCols(), A.getType());\n\n A.ops.plus(A.mat, B.mat, ret.mat);\n\n return ret;\n }",
"public static Seq plus(Jumble j1, Jumble j2){\n int new_size = (j1.count < j2.count) ? j1.count : j2.count;\n int new_arr[] = new int[new_size];\n for(int i = 0; i < new_size; i++) {\n new_arr[i] = j1.values[i] + j2.values[i]; //add each corresponding element\n }\n return new Jumble(new_arr); // the Jumble constructor does copy \n }",
"public static int sumAll(int n1,int n2) {\n int sum=0;\n for(int i=0;i<12;sum+=weights[n1][n2][i],i++);\n return sum;\n }",
"protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}",
"Matrix add(Matrix m){\n if(m.cols != this.cols || m.rows != this.rows) throw new RuntimeException(String.format(\"Wrong dimensions\"));\n Matrix matrix_to_return = new Matrix(m.rows, m.cols);\n for(int i=0; i<m.rows * m.cols; i++){\n matrix_to_return.data[i] = this.data[i] + m.data[i];\n }\n return matrix_to_return;\n }",
"public static Matrix sum(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c,m);\n for (int col = 1; col <= cols_c; col++) {\n double sumCol = 0D;\n for (int row = 1; row <= rows_c; row++) {\n sumCol += m.get(row, col);\n }\n d.set(1, col, sumCol);\n }\n }\n return d;\n }",
"public static double[][] multiplyMatrices(double[][] firstMatrix, double[][] secondMatrix, int r1, int c1, int c2) {\r\n\t double[][] product = new double[r1][c2];\r\n\t for(int i = 0; i < r1; i++) {\r\n\t for (int j = 0; j < c2; j++) {\r\n\t for (int k = 0; k < c1; k++) {\r\n\t product[i][j] += firstMatrix[i][k] * secondMatrix[k][j];\r\n\t }\r\n\t }\r\n\t }\r\n\r\n\t return product;\r\n\t }",
"public Integer addStuffTogether(ArrayList<Integer> original1, ArrayList<Integer> original2) {\n Integer sum = 0;\n for (Integer i : original1) {\n sum += i;\n }\n for (Integer i : original2) {\n sum += i;\n }\n return sum;\n }",
"public static Expression[] sum(Expression[] exp1, Expression[] exp2) {\n Expression[] expSum = null;\n List<Expression> sumList = new ArrayList<Expression>();\n boolean matchFound = false;\n for (int i = 0; i < exp1.length; i++) {//O(n)\n matchFound = false; //assume the entry of exp1 will not find match in exp2\n for (int j = 0; j < exp2.length; j++) {//O(n)\n //we compare with MAX_VALUE because we void the entry if a match was found in previous iterations\n if (exp2[j].coeff != Double.MAX_VALUE && exp1[i].exp == exp2[j].exp) {// a match\n Expression exp = new Expression();\n exp.coeff = exp1[i].coeff + exp2[j].coeff;\n exp.exp = exp1[i].exp;\n sumList.add(exp);\n //make the exp2 void by changing its coeff to MAX_VALUE, we will use the non-zero exp2s later if they are left\n exp2[j].coeff = Double.MAX_VALUE;\n matchFound = true; // a match was encountered\n }\n }\n if (!matchFound) {//if the entry of exp1 has not matching exp in exp2, then simply get the term into sumList\n sumList.add(exp1[i]); //this guarantees that every item fromm exp1 will be in the sumList\n }\n\n }\n //now if there are any non-zero coeffs in the exp2, then they have no match with exp1, we need to add them to sum\n //O(n)\n for (Expression exp : exp2) {\n if (exp.coeff != Double.MAX_VALUE) {\n sumList.add(exp);\n }\n }\n //if we want to return the array instead, we need to convert the arrayList to array\n expSum = sumList.toArray(new Expression[sumList.size()]);\n return expSum;\n }",
"public static short[][] reducedSum(short[][] a, short[][] b, short n) {\n \n int rowDimension = a.length;\n if (rowDimension != b.length || rowDimension == 0)\n return null;\n int columnDimension = a[0].length;\n if (columnDimension != b[0].length || columnDimension==0) \n return null;\n\n short[][] sum = new short[rowDimension][columnDimension];\n\n for (int i = 0; i < rowDimension; i++) {\n for (int j = 0; j < columnDimension; j++) {\n sum[i][j] = Arithmetic.reducedSum(a[i][j], b[i][j], n);\n }\n }\n return sum;\n }",
"public static BigDecimal[][] multiplyMatrices(BigDecimal[][] m1, BigDecimal[][] m2){\n\t\t\n\t\tint size = m1.length;\n\t\t\n\t\tBigDecimal[][] next = new BigDecimal[size][size];\n\t\tfor(int i = 0; i < size; i++){\n\t\t\tfor(int j = 0; j < size; j++){\n\t\t\t\tBigDecimal current = new BigDecimal(0);\n\t\t\t\tfor(int k = 0; k < size; k++)\n\t\t\t\t\tcurrent = current.add(m1[i][k].multiply(m2[k][j]));\n\n\t\t\t\tnext[i][j] = current;\n\t\t\t}\n\t\t}\n\t\treturn next;\n\t}",
"public static int sum2( int [][] m )\n {\n int sum = 0; //initialize sum\n int v = 0; //initialize a row counter\n for (int[] i : m) { //for each array in m, make an array called i\n\t sum += sumRow( v, m); //add the sumRow of the row counter and\n\t //original array to the stated sum\n\t v++; //add 1 to the counter\n }\n return sum; //return sum, an int\n }",
"public static void multiply(int[][] matrix1, int[][] matrix2) {\n\t\t int matrix1row = matrix1.length;\r\n\t\t int matrix1column = matrix1[0].length;//same as rows in B\r\n\t\t int matrix2column = matrix2[0].length;\r\n\t\t int[][] matrix3 = new int[matrix1row][matrix2column];\r\n\t\t for (int i = 0; i < matrix1row; i++) {//outer loop refers to row position\r\n\t\t for (int j = 0; j < matrix2column; j++) {//refers to column position\r\n\t\t for (int k = 0; k < matrix1column; k++) {\r\n\t\t \t //adds the products of row*column elements until the row/column is complete\r\n\t\t \t //updates to next row/column\r\n\t\t matrix3[i][j] = matrix3[i][j] + matrix1[i][k] * matrix2[k][j];\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t print(matrix3);\r\n\t\t }",
"public T sum(T first, T second);",
"public Matrix multiply(Matrix other) {\n if (this.cols != other.rows)\n throw new RuntimeException(\"Illegal matrix dimensions\");\n\n Matrix result = new Matrix(this.rows, other.cols); //Matrix full of zeros\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < other.cols; j++) {\n for (int k = 0; k < this.cols; k++) {\n result.data[i][j] += (this.data[i][k] * other.data[k][j]);\n }\n }\n }\n\n return result;\n }",
"public static ArrayList<Float> mathematicalAdd(ArrayList<Float> firstWave, ArrayList<Float> secondWave) {\r\n ArrayList<Float> newWave = new ArrayList<>();\r\n int size = getSize(firstWave,secondWave);\r\n for (int i = 0; i < size; i++) {\r\n newWave.add(i, firstWave.get(i) + secondWave.get(i));\r\n }\r\n return newWave;\r\n }",
"public static void add(int[] n1, int[] n2, int[] sum) {\n\t\tint b = n1.length-1;\n\t\tint carry = 0;\n\t\twhile (b >= 0) {\n\t\t\tint s = n1[b] + n2[b] + carry;\n\t\t\tsum[b+1] = s % 10;\n\t\t\tif (s > 9) { carry = 1; } else { carry = 0; }\n\t\t\tb--;\n\t\t}\n\t\t\n\t\tsum[0] = carry;\n\t}",
"public void concat(Matrix matrix) {\n\t\t\n\t}",
"@Override\n\tpublic IMatrix nMultiply(IMatrix other) {\n\n\t\tif (this.getColsCount() != other.getRowsCount()) {\n\t\t\tthrow new IncompatibleOperandException(\n\t\t\t\t\t\"For matrix multiplication first matrix must have same number of columns as number of rows of the other matrix!\");\n\t\t}\n\t\tint m = this.getRowsCount();\n\t\tint n = other.getColsCount();\n\t\tint innerDimension = this.getColsCount();\n\t\tdouble[][] p = new double[m][n];\n\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdouble sum = 0;\n\t\t\t\tfor (int k = 0; k < innerDimension; k++) {\n\t\t\t\t\tsum += this.get(i, k) * other.get(k, j);\n\t\t\t\t}\n\t\t\t\tp[i][j] = sum;\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(m, n, p, true);\n\t}",
"public static int dotProduct(int[] arr1, int[] arr2)\n {\n int sum = 0;\n if(arr1.length == arr2.length)\n {\n for(int i = 0; i < 3; i++)\n {\n int p = (arr1[i] * arr2[i]);\n sum += p;\n \n }\n return sum;\n }\n else\n {\n System.out.println(\"The arrays arent the same length\");\n return -1;\n }\n }",
"public double elementSum() {\n return ops.elementSum(mat);\n }",
"Matrix add(double w){\n Matrix matrix_to_return = new Matrix(this.rows, this.cols);\n for(int i=0; i<this.rows * this.cols; i++){\n matrix_to_return.data[i] = w + this.data[i];\n }\n return matrix_to_return;\n }",
"public static JTensor addmm(JType b, JTensor t, JType a, JTensor mat1, JTensor mat2) {\n JTensor r = new JTensor();\n TH.THTensor_(addmm)(r, b, t, a, mat1, mat2);\n return r;\n }",
"private int[] add(int[] a, int[] b)\n {\n int tI = a.length - 1;\n int vI = b.length - 1;\n long m = 0;\n\n while (vI >= 0)\n {\n m += (((long)a[tI]) & IMASK) + (((long)b[vI--]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n while (tI >= 0 && m != 0)\n {\n m += (((long)a[tI]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n return a;\n }",
"private int[] add(int[] a, int[] b)\n {\n int tI = a.length - 1;\n int vI = b.length - 1;\n long m = 0;\n\n while (vI >= 0)\n {\n m += (((long)a[tI]) & IMASK) + (((long)b[vI--]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n while (tI >= 0 && m != 0)\n {\n m += (((long)a[tI]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n return a;\n }",
"public long multiplyMatrix(final Matrix matrixA, final Matrix matrixB, final Matrix res);",
"private static long[] sums(Mat m,boolean byRow) {\r\n\t\tint rows = m.rows();\r\n\t\tint cols = m.cols();\r\n\t\tbyte[] data = new byte[rows*cols];\r\n\t\tlong[] retSums = null;\r\n\t\t\r\n\t\tint status = m.get(0, 0,data);\r\n\t\t\r\n\t\tlong total = 0;\r\n\t\tfor (int k=0;k<data.length;k++) {\r\n\t\t\ttotal += Byte.toUnsignedInt(data[k]);\r\n\t\t}\r\n\t\tif (byRow) {\r\n\t\t\tretSums = new long[cols];\r\n\t\t\tfor (int col=0;col<cols;col++) {\r\n\t\t\t\tretSums[col] = 0;\r\n\t\t\t\tfor (int row=0;row<rows;row++) {\r\n\t\t\t\t\tint k = row*cols+col;\r\n\t\t\t\t\tretSums[col] += Byte.toUnsignedInt(data[k]);\r\n\t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tretSums = new long[rows];\r\n \t\t\tfor (int row=0;row<rows;row++) {\r\n \t\t\t\tretSums[row] = 0;\r\n \t\t\t\tfor (int col=0;col<cols;col++) {\r\n \t\t\t\t\tint k = row*cols+col;\r\n \t\t\t\t\tretSums[row] += Byte.toUnsignedInt(data[k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t\r\n\t\tint total1 = 0;\r\n\t\tfor (int k=0; k < retSums.length; k++) {\r\n\t\t\ttotal1 += retSums[k];\r\n\t\t}\r\n\t\r\n\t\treturn retSums;\r\n\t}",
"public static JTensor baddbmm(JType b, JTensor t, JType a, JTensor bmat1, JTensor bmat2) {\n JTensor r = new JTensor();\n TH.THTensor_(baddbmm)(r, b, t, a, bmat1, bmat2);\n return r;\n }",
"public static Matrix multiply(Matrix mat1, Matrix mat2) throws Exception {\n double[][] temp = new double[mat1.rows][mat2.cols];\n try {\n if(mat1.cols == mat2.rows){\n for(int col = 0; col < mat2.cols; col++) {\n for (int row = 0; row < mat1.rows; row++) {\n for (int rowin = 0; rowin < mat2.rows; rowin++) {\n for (int colin = 0; colin < mat1.cols; colin++) {\n temp[row][col] += mat1.arr[row][colin] * mat2.arr[rowin][col];\n }\n }\n }\n }\n }\n\n }catch (Exception e){\n e.printStackTrace();\n throw new Exception(\"Matrices are the wrong size: \" +\n mat1 +\n \" and \" +\n mat2 +\n \" and temp \" +\n Arrays.toString(temp));\n }\n return new Matrix(mat1.rows, mat2.cols, temp);\n }",
"private int getSumD2(int[][] a) {\n int sum = 0;\n\n int jd1 = 0;\n int jd2 = a.length - 1;\n while (jd1 < a.length) {\n sum += a[jd1][jd2];\n jd2--;\n jd1++;\n }\n return sum;\n }",
"public Matrix add(Matrix b, BigInteger modulo) {\n Matrix a = this;\n if (a.getColumns() != b.getColumns() ||\n a.getRows() != b.getRows()) {\n throw new MalformedMatrixException(\"Matrix with dimensions \" + nrOfRows + \"x\" + nrOfCols +\n \" cannot be added to matrix with dimensions \" + b.nrOfRows + \"x\" + b.nrOfCols);\n }\n\n IntStream outerStream = IntStream.range(0, a.getRows());\n if (concurrent) {\n outerStream = outerStream.parallel();\n }\n\n BigInteger[][] res = outerStream\n .mapToObj(i -> rowAddition(a.getRow(i), b.getRow(i), modulo))\n .toArray(BigInteger[][]::new);\n\n return new Matrix(res);\n }",
"public static void multiplyMatrixes( double[][] m1, double[][] m2, double[][] result) {\n result[0][0] = m1[0][0]*m2[0][0] + m1[0][1]*m2[1][0] + m1[0][2]*m2[2][0];\n result[0][1] = m1[0][0]*m2[0][1] + m1[0][1]*m2[1][1] + m1[0][2]*m2[2][1];\n result[0][2] = m1[0][0]*m2[0][2] + m1[0][1]*m2[1][2] + m1[0][2]*m2[2][2];\n\n result[1][0] = m1[1][0]*m2[0][0] + m1[1][1]*m2[1][0] + m1[1][2]*m2[2][0];\n result[1][1] = m1[1][0]*m2[0][1] + m1[1][1]*m2[1][1] + m1[1][2]*m2[2][1];\n result[1][2] = m1[1][0]*m2[0][2] + m1[1][1]*m2[1][2] + m1[1][2]*m2[2][2];\n\n result[2][0] = m1[2][0]*m2[0][0] + m1[2][1]*m2[1][0] + +m1[2][2]*m2[2][0];\n result[2][1] = m1[2][0]*m2[0][1] + m1[2][1]*m2[1][1] + +m1[2][2]*m2[2][1];\n result[2][2] = m1[2][0]*m2[0][2] + m1[2][1]*m2[1][2] + +m1[2][2]*m2[2][2];\n }",
"public static int[][] matrixMultiply(int[][] matA, int[][] matB)\n {\n if(isRect(matA)== false || isRect(matB)== false || matA[0].length != matB.length)\n {\n System.out.println(\"You cant not multiply these matrices\");\n int[][] matC = {{}};\n return matC;\n }\n else\n {\n int[][] matC = new int[matA.length][matB[0].length];\n for(int i = 0; i < matA.length; i++)\n for(int j = 0; j < matB[0].length; j++)\n for(int k = 0; k < matA[0].length; k++)\n {\n matC[i][j] += matA[i][k] * matB[k][j];\n }\n return matC;\n }\n }",
"public void timesEquals(Matrix bmat){\r\n \tif(this.ncol!=bmat.nrow)throw new IllegalArgumentException(\"Nonconformable matrices\");\r\n\r\n \tdouble sum = 0.0D;\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<bmat.ncol; j++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int k=0; k<this.ncol; k++){\r\n \t\t\tsum += (this.matrix[i][k]*bmat.matrix[k][j]);\r\n \t\t}\r\n \t\tthis.matrix[i][j] = sum;\r\n \t\t}\r\n \t}\r\n \t}",
"public static void sumArray(int[] list1, int[] list2) {\n\t\t\n\t\tint[] res;\n\t\t\n\t\tif(list1.length > list2.length) {\n\t\t\tres = new int[list1.length];\n\t\t} else {\n\t\t\tres = new int[list2.length];\n\t\t}\n\t\t\n\t\tint i = list1.length -1;\n\t\tint j = list2.length -1;\n\t\tint k = res.length -1;\n\t\tint carry = 0;\n\t\t\n\t\twhile(k>=0) {\n\t\t\tint sum = carry;\n\t\t\t\n\t\t\tif(i>=0) {\n\t\t\t\tsum = sum + list1[i];\n\t\t\t}\n\t\t\t\n\t\t\tif(j>=0) {\n\t\t\t\tsum = sum + list2[j];\n\t\t\t}\n\t\t\t\n\t\t\tcarry = sum/10;\n\t\t\tsum = sum%10;\n\t\t\tres[k]=sum;\n\t\t\ti--;\n\t\t\tj--;\n\t\t\tk--;\n\t\t}\n\t\t\n\t\tif(carry>0) {\n\t\t\tSystem.out.print(carry);\n\t\t}\n\t\t\n\t\tfor(int val : res) {\n\t\t\tSystem.out.print(val);\n\t\t}\n\t}",
"public Matrix4f add(Matrix4f other) {\n Matrix4f result = new Matrix4f();\n\n result.m00 = this.m00 + other.m00;\n result.m10 = this.m10 + other.m10;\n result.m20 = this.m20 + other.m20;\n result.m30 = this.m30 + other.m30;\n\n result.m01 = this.m01 + other.m01;\n result.m11 = this.m11 + other.m11;\n result.m21 = this.m21 + other.m21;\n result.m31 = this.m31 + other.m31;\n\n result.m02 = this.m02 + other.m02;\n result.m12 = this.m12 + other.m12;\n result.m22 = this.m22 + other.m22;\n result.m32 = this.m32 + other.m32;\n\n result.m03 = this.m03 + other.m03;\n result.m13 = this.m13 + other.m13;\n result.m23 = this.m23 + other.m23;\n result.m33 = this.m33 + other.m33;\n\n return result;\n }",
"public Matrix times(Matrix B) {\n Matrix A = this;\n if (A.columnCount != B.rowCount) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(A.rowCount, B.columnCount);\n for (int i = 0; i < C.rowCount; i++)\n for (int j = 0; j < C.columnCount; j++)\n for (int k = 0; k < A.columnCount; k++)\n C.data[i][j] += (A.data[i][k] * B.data[k][j]);\n return C;\n }",
"public double sumXs() {\n double $ = 0;\n for (int ¢ = 0; ¢ < xVals.size(); ++¢)\n $ += unbox(cantBeNull(xVals.get(¢)));\n return $;\n }\n\n // calculate the sum of all the y values\n public double sumYs() {\n double $ = 0;\n for (int ¢ = 0; ¢ < yVals.size(); ++¢)\n $ += unbox(cantBeNull(yVals.get(¢)));\n return $;\n }",
"public static JTensor addbmm(JType b, JTensor mat, JType a, JTensor bmat1, JTensor bmat2) {\n JTensor r = new JTensor();\n TH.THTensor_(addbmm)(r, b, mat, a, bmat1, bmat2);\n return r;\n }",
"private RealMatrix scalarMultiplication(RealMatrix matrix1, RealMatrix matrix2) {\n\t\tdouble a = matrix1.getEntry(0, 0);\n\t\tdouble b = matrix1.getEntry(1, 0);\n\t\tdouble c = matrix1.getEntry(2, 0);\n\t\tdouble d = matrix1.getEntry(3, 0);\n\t\t\n\t\tdouble[][] result = new double[matrix2.getRowDimension()][matrix2.getColumnDimension()];\n\t\t\n\t\tfor (int i=0; i < matrix2.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < matrix2.getColumnDimension(); j++) {\n\t\t\t\tif (i == 0) result[i][j] = a * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 1) result[i][j] = b * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 2) result[i][j] = c * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 3) result[i][j] = d * matrix2.getEntry(i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn MatrixUtils.createRealMatrix(result);\n\t}",
"public Matrix calculate();",
"public OVecR2 suma(OVecR2 b){\n //TODO: implementar\n return new OVecR2();\n }",
"public static double[] vectorAddition(double[] a, double[] b) {\r\n\t\tdouble[] retval = new double[a.length];\r\n\t\tfor(int i = 0; i < a.length; i += 1) {\r\n\t\t\tretval[i] = a[i] + b[i];\r\n\t\t}\r\n\t\treturn retval;\r\n\t}",
"private static BigInteger[][] multiply (BigInteger a[][], BigInteger b[][])\n {\n BigInteger x = (a[0][0].multiply(b[0][0])).add(a[0][1].multiply(b[1][0]));\n BigInteger y = (a[0][0].multiply(b[0][1])).add(a[0][1].multiply(b[1][1]));\n BigInteger z = (a[1][0].multiply(b[0][0])).add(a[1][1].multiply(b[1][0]));\n BigInteger w = (a[1][0].multiply(b[0][1])).add(a[1][1].multiply(b[1][1]));\n \n return new BigInteger[][]{{x, y},{z, w}};\n }",
"public static double[][] multiply(double[][] a, double[][] b) {\n int m1 = a.length;\n int n1 = a[0].length;\n int m2 = b.length;\n int n2 = b[0].length;\n if (n1 != m2) throw new RuntimeException(\"Illegal matrix dimensions.\");\n double[][] c = new double[m1][n2];\n for (int i = 0; i < m1; i++)\n for (int j = 0; j < n2; j++)\n for (int k = 0; k < n1; k++)\n c[i][j] += a[i][k] * b[k][j];\n return c;\n }",
"private static int[][] sparseMatrixMultiplyBruteForce (int[][] A, int[][] B) {\n int[][] result = new int[A.length][B[0].length];\n\n for(int i = 0; i < result.length; i++) {\n for(int j = 0; j < result[0].length; j++) {\n int sum = 0;\n for(int k = 0; k < A[0].length; k++) {\n sum += A[i][k] * B[k][j];\n }\n result[i][j] = sum;\n }\n }\n return result;\n }",
"public static <T extends Vector> T Add(T a, T b,T result){\n if(Match(a,b)) {\n for (int i = 0; i < result.axis.length; i++) {\n result.axis[i] = a.axis[i] + b.axis[i];\n }\n return result;\n }\n return result;\n }",
"public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t\t\t\t//add each value to the sum variable\n\t\t }\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t\t//return said sum variable\n }",
"public double Sumar(double operador_1, double operador_2){\n return SumaC(operador_1, operador_2);\n }",
"public CountMin merge(final CountMin other) {\n if (this.rows != other.rows || this.columns != other.columns) {\n throw new IllegalArgumentException(\n \"Trying to merge two CountMin data structures of different sizes.\");\n }\n for (int i = 0; i < rows * columns; i++) {\n this.counts[i] += other.counts[i];\n }\n this.update_sum += other.update_sum;\n return this;\n }",
"public Matrix times(Matrix B) {\n Matrix A = this;\n if (A.n != B.m) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(A.m, B.n);\n for (int i = 0; i < C.m; i++)\n for (int j = 0; j < C.n; j++)\n for (int k = 0; k < A.n; k++)\n C.data[i][j] += (A.data[i][k] * B.data[k][j]);\n return C;\n }",
"public static BigFraction[] vectorAddition(BigFraction[] a, BigFraction[] b) {\n a = a.clone();\n b = b.clone();\n if (a.length != b.length) throw new RuntimeException(\"Illegal vector dimensions.\");\n for (int i = 0; i < a.length; i++) {\n a[i] = a[i].add(b[i]);\n }\n return a;\n }",
"public int getTotalRecaudado()\n {\n return maquina1.getTotal() + maquina2.getTotal();\n }",
"public final void add(Matrix3f m1, Matrix3f m2) {\n\t// note this is alias safe.\n\tset(\n\t m1.m00 + m2.m00,\n\t m1.m01 + m2.m01,\n\t m1.m02 + m2.m02,\n\t m1.m10 + m2.m10,\n\t m1.m11 + m2.m11,\n\t m1.m12 + m2.m12,\n\t m1.m20 + m2.m20,\n\t m1.m21 + m2.m21,\n\t m1.m22 + m2.m22\n\t );\n }",
"public static void testMulRecStrassen() {\n\n try {\n\n Matrix m1 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m2 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m3 = Matrix.strassen(m1, m2);\n\n System.out.println(m3);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"public static BigFraction[][] add(BigFraction[][] A, BigFraction[][] B) {\n int m = A.length;\n int n = A[0].length;\n BigFraction[][] C = new BigFraction[m][n];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n C[i][j] = A[i][j].add(B[i][j]);\n return C;\n }",
"public static double getTotal(int[][] numbers) {\n int totalValue = 0;\n for (int i = 0; i < numbers.length; i++) {\n for (int j = 0; j < numbers[i].length; j++) {\n totalValue = totalValue + numbers[i][j];\n }\n }\n return totalValue;\n }",
"public static Matrix multiply(Matrix first, Matrix second) {\n \n Matrix result = new Matrix(first.getRows(), first.getClumns());\n \n for (int row = 0; row < first.getRows(); row++) {\n for (int col = 0; col < first.getClumns(); col++) {\n result.matrix[row][col] = first.matrix[row][col] * second.matrix[row][col];\n }\n }\n \n return result;\n }",
"public static void twoSum(Node x, Node y) {\n int lenX = x.getlength();\n int lenY = y.getlength();\n int lenLong = Math.max(lenX, lenY);\n Node result = new Node();\n int carryOn = 0;\n\n for (int i = 0; i < lenLong; i++) {\n int curposX = lenX - i - 1;\n int curposY = lenY - i - 1;\n int digitX = 0;\n int digitY = 0;\n if (curposX < 0) {\n digitX = 0;\n } else {\n digitX = x.get(curposX);\n }\n if (curposY < 0) {\n digitY = 0;\n } else {\n digitY = y.get(curposY);\n }\n // System.out.printf(\"x: %d y: %d \\n\", digitX, digitY);\n result = result.add(digitX + digitY, 0);\n\n }\n // result.printList();\n result = twoSumRegulate(result);\n System.out.println(\"the two sum result is:\");\n result.printList();\n }",
"public Matrix times(Matrix B) {\n Matrix A = this;\n if (A.N != B.M) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(A.M, B.N);\n for (int i = 0; i < C.M; i++)\n for (int j = 0; j < C.N; j++)\n for (int k = 0; k < A.N; k++)\n C.data[i][j] += (A.data[i][k] * B.data[k][j]);\n return C;\n }",
"public static void testMulRec() {\n\n try {\n\n Matrix m1 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m2 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m3 = Matrix.multiplyRec(m1, m2, 0);\n\n System.out.println(m3);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"public int sum(int a, int b) {\n\t\treturn a + b;\n\t}",
"public static int sum1( int[][] a )\n {\n int sum = 0; //initialize sum\n for (int[] i : a) { //for each array a, turn into an array called i\n\t for (int j : i) { //and then for each value in i...\n\t sum += j; //add the value of it to the sum\n\t }\n }\n return sum; //return the sum, an int\n }",
"public void add(ConfusionMatrix other){\n\t\t\n\t\t//the confusion matrix must be of same dimesions\n\t\tif(other.size() != this.size()){\n\t\t\tthrow new IllegalArgumentException(\"cannot add confusino matrix's together. The other confusion matrix is of different dimensions\");\n\t\t}\n\t\t\n\t\t//make sure the labels match\n\t\tfor(int i = 0; i < this.size(); i++){\n\t\t\tLabel lable = this.labels.get(i);\n\t\t\tLabel otherLabel = other.labels.get(i);\n\t\t\t\n\t\t\tif(!lable.equals(otherLabel)){\n\t\t\t\tthrow new IllegalArgumentException(\"cannot add confusino matrix's together. The other confusion matrix has different labels\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t//iterate the labels and add the cells\n\t\tfor(Label row : this.labels){\n\t\t\tfor(Label col : this.labels){\n\t\t\t\tint rowIx = resolveIndex(row);\n\t\t\t\tint colIx = resolveIndex(col);\n\n\t\t\t\tInteger cell = matrix.get(rowIx).get(colIx);\n\t\t\t\tInteger otherCell = other.matrix.get(rowIx).get(colIx);\n\t\t\t\t\n\t\t\t\tInteger newValue = cell+otherCell;\n\t\t\t\tmatrix.get(rowIx).set(colIx, newValue);\n\t\t\t}\t\n\t\t}//end iterate labels\n\t\t\t\n\t}",
"public static int[] combine(int[] a, int[] b){\n if(a.length == 0 && b.length == 0)\n return new int[0];\n else if(a.length == 0)\n return b;\n else if(b.length == 0)\n return a;\n else {\n int[] combinedArray = new int[a.length + b.length];\n System.arraycopy(a, 0, combinedArray, 0, a.length);\n System.arraycopy(b, 0, combinedArray, a.length, b.length);\n\n return combinedArray;\n }\n }"
] | [
"0.76893264",
"0.7474962",
"0.7052025",
"0.6966269",
"0.69391114",
"0.67690134",
"0.67588073",
"0.6758658",
"0.6746596",
"0.6622397",
"0.66063195",
"0.6541282",
"0.64695626",
"0.64066035",
"0.6379907",
"0.63752806",
"0.6358052",
"0.6348387",
"0.634774",
"0.63001597",
"0.62865126",
"0.6280053",
"0.6244127",
"0.6222736",
"0.6067334",
"0.6012422",
"0.5956655",
"0.592759",
"0.5880387",
"0.5861422",
"0.58538675",
"0.5832303",
"0.58117914",
"0.5806496",
"0.57964253",
"0.5766853",
"0.5764891",
"0.57637376",
"0.57336193",
"0.5707104",
"0.56747496",
"0.5671094",
"0.56384754",
"0.5583498",
"0.5579721",
"0.55766207",
"0.5551354",
"0.5536433",
"0.5535574",
"0.5534626",
"0.5529637",
"0.5529208",
"0.5526357",
"0.5491617",
"0.54661167",
"0.54611623",
"0.54452413",
"0.5442784",
"0.5431779",
"0.5431779",
"0.5415738",
"0.5411457",
"0.53901786",
"0.53697044",
"0.53651154",
"0.5364897",
"0.5355018",
"0.53531665",
"0.5319297",
"0.53144205",
"0.5310081",
"0.52949804",
"0.5292721",
"0.5282712",
"0.52804464",
"0.5272389",
"0.5263782",
"0.5248821",
"0.5233634",
"0.52272487",
"0.5223357",
"0.5222541",
"0.5197429",
"0.5196722",
"0.5194386",
"0.5184132",
"0.5172964",
"0.51595575",
"0.51456946",
"0.514453",
"0.51394373",
"0.51299435",
"0.51255083",
"0.5123134",
"0.5119051",
"0.51156616",
"0.5108311",
"0.51069343",
"0.5104881",
"0.51036084"
] | 0.658084 | 11 |
Multiply the matrix with a scalar value. | public Matrix multiply(double scalar) {
Matrix result = new Matrix(this.rows, this.cols);
for (int i = 0; i < this.rows; i++) {
for (int j = 0; j < this.cols; j++) {
result.data[i][j] = this.data[i][j] * scalar;
}
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void scalarMultiply(double s) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n matrix.get(i)[j] *= s;\n }\n }\n }",
"public void mul_(JType value) {\n TH.THTensor_(mul)(this, this, value);\n }",
"@Override\n\tpublic void\n\tscalarMult( double value )\n\t{\n\t\tdata[0] *= value;\n\t\tdata[1] *= value;\n\t\tdata[2] *= value;\n\t}",
"Matrix scalarMult(double x){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n itRow.moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(i, c.column, (x*c.value));\n itRow.moveNext();\n }\n }\n\n return newM;\n }",
"public void multiplyScalar(double scalar) {\n if(scalar==1.0) {\n return;\n }\n for (T value : getFirstDimension()) {\n for (T secondValue : getMatches(value)) {\n double d = get(value, secondValue) * scalar;\n set(value, secondValue, d);\n }\n }\n }",
"public final void mul(float scalar) {\n\tm00 *= scalar; m01 *= scalar; m02 *= scalar;\n\tm10 *= scalar; m11 *= scalar; m12 *= scalar;\n\tm20 *= scalar; m21 *= scalar; m22 *= scalar;\n }",
"public void multiply(double skalar) {\r\n for (int i = 0; i < matrix.length; i++) {\r\n for (int j = 0; j < matrix[0].length; j++) {\r\n matrix[i][j] *= skalar;\r\n }\r\n }\r\n }",
"@Override\n\tpublic IVector scalarMultiply(double number){\n\t\tfor(int i=this.getDimension()-1; i>=0; i--){\n\t\t\tthis.set(i, this.get(i)*number);\n\t\t}\n\t\treturn this;\n\t}",
"public JTensor mul(JType value) {\n JTensor r = new JTensor();\n TH.THTensor_(mul)(r, this, value);\n return r;\n }",
"private Vector<Double> multiplyRow(Vector<Double> row, double scalar) {\n row.replaceAll(n -> round(scalar * n, 8));\n return row;\n }",
"@Override\n\tpublic IVector nScalarMultiply(double number){\n\t\treturn this.copy().scalarMultiply(number);\n\t}",
"public final void mul(float scalar, Matrix3f m1) {\n\t set(m1);\n\t mul(scalar);\n }",
"public final void mul() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue * topMostValue);\n\t\t}\n\t}",
"public void multiply(double val) {\n for (int i = 0; i < numRows; i++) {\n for (int j = 0; j < numCols; j++) {\n data[i][j] = data[i][j] * val;\n }\n }\n }",
"public Vector<T> multiply(T aScalar);",
"public Matrix times(double constant){\r\n \tMatrix cmat = new Matrix(this.nrow, this.ncol);\r\n \tdouble [][] carray = cmat.getArrayReference();\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tcarray[i][j] = this.matrix[i][j]*constant;\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}",
"private RealMatrix scalarMultiplication(RealMatrix matrix1, RealMatrix matrix2) {\n\t\tdouble a = matrix1.getEntry(0, 0);\n\t\tdouble b = matrix1.getEntry(1, 0);\n\t\tdouble c = matrix1.getEntry(2, 0);\n\t\tdouble d = matrix1.getEntry(3, 0);\n\t\t\n\t\tdouble[][] result = new double[matrix2.getRowDimension()][matrix2.getColumnDimension()];\n\t\t\n\t\tfor (int i=0; i < matrix2.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < matrix2.getColumnDimension(); j++) {\n\t\t\t\tif (i == 0) result[i][j] = a * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 1) result[i][j] = b * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 2) result[i][j] = c * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 3) result[i][j] = d * matrix2.getEntry(i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn MatrixUtils.createRealMatrix(result);\n\t}",
"Matrix mul(Matrix m){\n if(m.cols != this.cols || m.rows != this.rows) throw new RuntimeException(String.format(\"Wrong dimensions\"));\n Matrix matrix_to_return = new Matrix(m.rows, m.cols);\n for(int i=0; i<m.rows * m.cols; i++){\n matrix_to_return.data[i] = this.data[i] * m.data[i];\n }\n return matrix_to_return;\n }",
"public Matrix multiply(int i) {\n\t\treturn multiply(new Fraction(i));\n\t}",
"public Matrix getValue();",
"public void multiply() {\n\t\t\n\t}",
"void multiply(double value);",
"public Vector2D scalarMult(double scalar)\n {\n return new Vector2D(scalar * this.x, scalar * this.y);\n }",
"public void matrixMultiply(Matrix m) {\n if (cols == m.getRows()) {\n ArrayList<double[]> result = newMatrix(rows, m.getCols());\n for (int i=0; i<rows; i++) {\n for (int k=0; k<m.getCols(); k++) {\n double sum = 0;\n for (int j=0; j<cols; j++) {\n sum += matrix.get(i)[j] * m.get(j, k);\n }\n result.get(i)[k] = sum;\n }\n }\n setMatrix(result, rows, m.getCols()); // Rows is that of original matrix, Columns is that of the multiplying matrix\n }\n else {\n throw new MatrixMultiplicationDimensionException();\n }\n }",
"public Scalar mul(Scalar s) {\n\t\treturn new RealScalar(getValue() * ((RealScalar)s).getValue());\n\t}",
"public DVec multiply(DVec arg0) {\n\t\tDVec vec = new DVec(arg0.rowCount());\n\t\tfor (int i = 0; i < rowCount(); i++)\n\t\t\tfor (int j = 0; j < columnCount(); j++)\n\t\t\t\tvec.set(i, get(i, j) * arg0.get(i));\n\t\treturn vec;\n\t}",
"void mul(double val) {\r\n\t\tresult = result * val;\r\n\t}",
"public Matrix scale(Double scalar) {\n\t\treturn null;\r\n\t}",
"private void multiply(float... values) {\n buffer(() -> {\n try (Pooled<Matrix4F> mat = Matrix4F.of(values)) {\n kernel.get().multiply(mat.get());\n }\n trans.set(kernel.get().asArray());\n });\n }",
"public void multiply(int value) {\r\n\t\ttotal *= value;\r\n\t\thistory += \" * \" + value;\r\n\t}",
"Matrix mul(double w){\n Matrix matrix_to_return = new Matrix(this.rows, this.cols);\n for(int i=0; i<this.rows * this.cols; i++){\n matrix_to_return.data[i] = this.data[i] * w;\n }\n return matrix_to_return;\n }",
"public void multiply(Object mulValue) {\n\t\tvalue = operate(\n\t\t\t\ttransform(value),\n\t\t\t\ttransform(mulValue),\n\t\t\t\t(v1, v2) -> v1 * v2,\n\t\t\t\t(v1, v2) -> v1 * v2\n\t\t);\n\t}",
"public static Matrix times(Matrix amat, double constant){\r\n \tMatrix cmat = new Matrix(amat.nrow, amat.ncol);\r\n \tdouble [][] carray = cmat.getArrayReference();\r\n\r\n \t \tfor(int i=0; i<amat.nrow; i++){\r\n \t\tfor(int j=0; j<amat.ncol; j++){\r\n \t\tcarray[i][j] = amat.matrix[i][j]*constant;\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"private void mul() {\n\n\t}",
"@Override\r\n\tpublic void mul(int x, int y) {\n\t\t\r\n\t}",
"public Matrix mult(Matrix MatrixB) {\n\t\tDouble[][] newValue = new Double[row][MatrixB.col()];\r\n\t\tVector[] MatBcol = MatrixB.getCol();\r\n\t\t\r\n\r\n\t\tfor (int x = 0; x < row; x++) {\r\n\t\t\tfor (int y = 0; y < MatrixB.col(); y++) {\r\n\t\t\t\tVector rowVecI = rowVec[x];\r\n\t\t\t\tVector colVecI = MatBcol[y];\r\n\t\t\t\tnewValue[x][y] = rowVecI.DotP(colVecI);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Matrix(newValue);\r\n\t}",
"public abstract Vector4fc mul(IMatrix4f mat);",
"public static void multipleScalar(double[] array, double value)\r\n\t{\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tarray[i] = array[i] * value;\r\n\t}",
"public Matrix multiply(ComplexNumber cn) {\n\t\tMatrix a = copy();\n\t\tfor (int row = 0; row < a.M; row++) {\n\t\t\tfor (int col = 0; col < a.N; col++) {\n\t\t\t\ta.ROWS[row][col] = a.ROWS[row][col].multiply(cn);\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}",
"public abstract Vector4fc mul(IMatrix4x3f mat);",
"public Vector2f mul(float scalar) {\n return mul(new Vector2f(scalar, scalar));\n }",
"public void multiply(Object mulValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, mulValue) {\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}",
"public void multiply (int value) {\r\n\t\ttotal = total * value;\r\n\t\thistory = history + \" * \" + value;\r\n\t}",
"public Matrix multiply(Fraction f) {\n\t\treturn multiply(new ComplexNumber(f));\n\t}",
"public void multiply(MyDouble val) {\n this.setValue(this.getValue() * val.getValue());\n }",
"public void timesEquals(double constant){\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tthis.matrix[i][j] *= constant;\r\n \t\t}\r\n \t}\r\n \t}",
"public void multiply (int value) {\n\t\ttotal = total * value;\n\n\t\thistory = history + \" * \" + value;\n\t\t\n\t}",
"public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }",
"public Matrix multiply(Matrix b) {\n MultMatrix multCommand = new MultMatrix();\n Matrix result = multCommand.multiply(this, b);\n\n return result;\n }",
"public static Matrix product(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c, m);\n for (int col = 1; col <= cols_c; col++) {\n double prodCol = 1D;\n for (int row = 1; row <= rows_c; row++) {\n prodCol = prodCol * m.get(row, col);\n }\n d.set(1, col, prodCol);\n }\n }\n return d;\n }",
"@Test\n\tpublic void testMultiply() {\n\t\tdouble epsilon = 0.0000000001;\n\n\t\tdouble[][] values2 = {{1.1, 1.2, 1.3}, {2.1, 2.2, 2.3}};\n\t\tMatrix m2 = new Matrix(values2);\n\n\t\tdouble[][] expectedValues = {{3.73, 3.96, 4.19}, {9.67, 10.24, 10.81}, {-2.07, -2.24, -2.41}};\n\t\tMatrix expected = new Matrix(expectedValues);\n\n\t\tMatrix product = m1.multiply(m2);\n\n\t\tassertEquals(3, product.getRowCount(), \"Product have unexpected number of rows.\");\n\t\tassertEquals(3, product.getColCount(), \"Product have unexpected number of columns.\");\n\n\t\tfor (int i = 0; i < product.getRowCount(); i++) {\n\t\t\tfor (int j = 0; j < product.getColCount(); j++) {\n\t\t\t\tassertTrue(Math.abs(product.get(i, j) - expected.get(i, j)) < epsilon,\n\t\t\t\t\t\"Unexpected value on row \" + i + \" column \" + j + \".\");\n\t\t\t}\n\t\t}\n\t}",
"public static void multiply(Double[] vector, Double multiplier) {\r\n // ...\r\n for (int i = 0; i < vector.length; i++){\r\n vector[i] = vector[i] * multiplier;\r\n }\r\n }",
"public Matrix multiply(Matrix other) {\n if (this.cols != other.rows)\n throw new RuntimeException(\"Illegal matrix dimensions\");\n\n Matrix result = new Matrix(this.rows, other.cols); //Matrix full of zeros\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < other.cols; j++) {\n for (int k = 0; k < this.cols; k++) {\n result.data[i][j] += (this.data[i][k] * other.data[k][j]);\n }\n }\n }\n\n return result;\n }",
"public void mul() {\n //TODO: Fill in this method, then remove the RuntimeException\n throw new RuntimeException(\"RatPolyStack->mul() unimplemented!\\n\");\n }",
"public void sampleMethod()\n {\n int a = 6;\n System.out.println(a *= a);\n \n }",
"public long multiplyMatrix(final Matrix matrixA, final Matrix matrixB, final Matrix res);",
"private static void directProd(DMatrixRMaj a, DMatrixRMaj b, DMatrixRMaj c) {\n for (int i=0; i<5; ++i) {\n for (int j=0; j<5; ++j) {\n c.unsafe_set(i, j, a.unsafe_get(i, 0)*b.unsafe_get(j, 0));\n }\n }\n }",
"public void testMultiply() {\r\n System.out.println(\"Multiply\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E100, -1.1E100}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E100, 1.1E100}, \r\n {9., -6.25, 0., 0., 1., -4., 10.2, 12.95, 1.21E200, -1.21E200}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Multiply(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }",
"public Scalar evaluate(Scalar scalar) {\n\t\tScalar ans=scalar;\n\t\tans=ans.pow(this.exponent);\n\t\treturn this.coefficient.mul(ans);\n\t}",
"public Matrix multiply(BigInteger c, BigInteger modulo) {\n Stream<BigInteger[]> stream = Arrays.stream(inner);\n if (concurrent) {\n stream = stream.parallel();\n }\n\n BigInteger[][] res = stream.map(r -> rowMultiplyConstant(r, c, modulo)).toArray(BigInteger[][]::new);\n\n return new Matrix(res);\n }",
"public final void mul(Matrix3f m1) {\n\tmul(this, m1);\n }",
"public Mat2 mult(double s) {\n\t\tdouble[][] newData = new double[rows][cols];\n\t\tfor(int i=0; i<rows; i++) {\n\t\t\tfor(int j=0; j<cols; j++) {\n\t\t\t\tnewData[i][j] = data[i][j] * s;\n\t\t\t}\n\t\t}\n\t\treturn new Mat2(newData);\n\t}",
"public void set( int row, int col, double value ) {\n ops.set(mat, row, col, value);\n }",
"public final native Vec4 multiply(Vec4 vec) /*-{\n return $wnd.mat4.multiplyVec4(this, vec, $wnd.vec4.create());\n }-*/;",
"public static short[][] scalarMultiply(short a, short[][] b, short n) {\n short[][] product = new short[b.length][b[0].length];\n for (int i = 0; i < b.length; i++) {\n for (int j = 0; j < b[0].length; j++) {\n product[i][j] = Arithmetic.reducedProduct(a, b[i][j], n);\n }\n } \n return product;\n }",
"public T mult( T B ) {\n convertType.specify(this, B);\n\n // Look to see if there is a special function for handling this case\n if (this.mat.getType() != B.getType()) {\n Method m = findAlternative(\"mult\", mat, B.mat, convertType.commonType.getClassType());\n if (m != null) {\n T ret = wrapMatrix(convertType.commonType.create(1, 1));\n invoke(m, this.mat, B.mat, ret.mat);\n return ret;\n }\n }\n\n // Otherwise convert into a common matrix type if necessary\n T A = convertType.convert(this);\n B = convertType.convert(B);\n\n T ret = A.createMatrix(mat.getNumRows(), B.getMatrix().getNumCols(), A.getType());\n\n A.ops.mult(A.mat, B.mat, ret.mat);\n\n return ret;\n }",
"@Override\n public InterpreterValue mul(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() * ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() * ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '*' is not defined for type double and \" + v.getName());\n\n }",
"public void multiply(double multiplier) {\n x *= multiplier;\n y *= multiplier;\n }",
"public abstract <M extends AbstractMatrix> M elementwiseProduct(M b);",
"public Vector3 mul(final Matrix4 matrix) {\r\n\t\tfinal float l_mat[] = matrix.val;\r\n\t\treturn this.set(x * l_mat[Matrix4.M00] + y * l_mat[Matrix4.M01] + z * l_mat[Matrix4.M02] + l_mat[Matrix4.M03],\r\n\t\t\t\tx * l_mat[Matrix4.M10] + y * l_mat[Matrix4.M11] + z * l_mat[Matrix4.M12] + l_mat[Matrix4.M13],\r\n\t\t\t\tx * l_mat[Matrix4.M20] + y * l_mat[Matrix4.M21] + z * l_mat[Matrix4.M22] + l_mat[Matrix4.M23]);\r\n\t}",
"@Override\n\tpublic IMatrix nMultiply(IMatrix other) {\n\n\t\tif (this.getColsCount() != other.getRowsCount()) {\n\t\t\tthrow new IncompatibleOperandException(\n\t\t\t\t\t\"For matrix multiplication first matrix must have same number of columns as number of rows of the other matrix!\");\n\t\t}\n\t\tint m = this.getRowsCount();\n\t\tint n = other.getColsCount();\n\t\tint innerDimension = this.getColsCount();\n\t\tdouble[][] p = new double[m][n];\n\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdouble sum = 0;\n\t\t\t\tfor (int k = 0; k < innerDimension; k++) {\n\t\t\t\t\tsum += this.get(i, k) * other.get(k, j);\n\t\t\t\t}\n\t\t\t\tp[i][j] = sum;\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(m, n, p, true);\n\t}",
"public T mul(T first, T second);",
"public double scalarProductNS(ThreeVector v1) {\r\n\t\treturn scalarProduct(v1, this);\r\n\t}",
"public Vector3 mult(float scalar){\r\n\t\tthis.x *= scalar;\r\n\t\tthis.y *= scalar;\r\n\t\tthis.z *= scalar;\r\n\t\treturn this;\r\n\t}",
"public double[] mult(double[] vector) {\n\t\tif(this.cols != vector.length) return null;\n\t\tdouble[] result = new double[this.rows];\n\t\tfor(int i=0; i<this.rows; i++) {\n\t\t\tfor(int j=0; j<this.cols; j++) {\n\t\t\t\tresult[i] += data[i][j] * vector[j];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public static Matrix multiply(Matrix first, Matrix second) {\n \n Matrix result = new Matrix(first.getRows(), first.getClumns());\n \n for (int row = 0; row < first.getRows(); row++) {\n for (int col = 0; col < first.getClumns(); col++) {\n result.matrix[row][col] = first.matrix[row][col] * second.matrix[row][col];\n }\n }\n \n return result;\n }",
"Matrix mult(Matrix M){\n if(this.getSize() != M.getSize()){\n throw new RuntimeException(\"Matrix\");\n\n } \n int newMatrixSize = this.getSize();\n Matrix newM = M.transpose();\n Matrix resultMatrix = new Matrix(newMatrixSize);\n double resultMatrix_Entry = 0;\n for(int i = 1; i <= newMatrixSize; i++){\n for(int j = 1; j<= newMatrixSize; j++){\n List itRow_A = this.rows[i - 1];\n List itRow_B = newM.rows[j-1];\n itRow_A.moveFront();\n itRow_B.moveFront();\n while((itRow_A.index() != -1) && (itRow_B.index() != -1)){\n Entry c_A = (Entry)itRow_A.get();\n Entry c_B = (Entry) itRow_B.get();\n if(c_A.column == c_B.column){\n resultMatrix_Entry += (c_A.value)*(c_B.value);\n itRow_A.moveNext();\n itRow_B.moveNext();\n\n } else if(c_A.column > c_B.column){\n itRow_B.moveNext();\n\n }else{\n itRow_A.moveNext();\n }\n\n }\n resultMatrix.changeEntry(i, j, resultMatrix_Entry);\n resultMatrix_Entry = 0;\n }\n }\n return resultMatrix;\n\n }",
"public final void mMUL() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.MUL;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:5: ( 'mul' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:708:7: 'mul'\n\t\t\t{\n\t\t\t\tthis.match(\"mul\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}",
"private static native double mul(int n);",
"public void multiplyXBy(double amount) {\n x *= amount;\n }",
"public void multiply(double amount) {\n x *= amount;\n y *= amount;\n }",
"double scalarMultiplyVectors(double[] first, double[] second) throws InterruptedException;",
"public Matrix rowMultiply(int row, Fraction weight) {\n\t\treturn rowMultiply(row, new ComplexNumber(weight));\n\t}",
"public static int mul(int value1, int value2){\r\n return value1 * value2;\r\n }",
"public int mul(int i, int j) {\n\t\treturn i*j;\r\n\t}",
"public Matrix rowMultiply(int row, int weight) {\n\t\treturn rowMultiply(row, new ComplexNumber(new Fraction(weight)));\n\t}",
"public Matrix times(double s) {\n Matrix X = new Matrix(m,n);\n double[][] C = X.getArray();\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n C[i][j] = s*data[i][j];\n }\n }\n return X;\n }",
"public int mul(int i,int j){\n\t\treturn i*j;\n\t}",
"public static double[] multiply(double[] x, double[][] a) {\n int m = a.length;\n int n = a[0].length;\n if (x.length != m) throw new RuntimeException(\"Illegal matrix dimensions.\");\n double[] y = new double[n];\n for (int j = 0; j < n; j++)\n for (int i = 0; i < m; i++)\n y[j] += a[i][j] * x[i];\n return y;\n }",
"public static double[] multiply(double[] x, double[][] a) {\n int m = a.length;\n int n = a[0].length;\n if (x.length != m) throw new RuntimeException(\"Illegal matrix dimensions.\");\n double[] y = new double[n];\n for (int j = 0; j < n; j++)\n for (int i = 0; i < m; i++)\n y[j] += a[i][j] * x[i];\n return y;\n }",
"public long product() {\n\t\tlong result = 1;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult *= theElements[i];\n\t\t}\n\t\treturn result;\n\t}",
"public static void testMulRec() {\n\n try {\n\n Matrix m1 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m2 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m3 = Matrix.multiplyRec(m1, m2, 0);\n\n System.out.println(m3);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"public Matrix times(Matrix B) throws JPARSECException {\n if (B.m != n) {\n throw new JPARSECException(\"Matrix inner dimensions must agree.\");\n }\n Matrix X = new Matrix(m,B.n);\n double[][] C = X.getArray();\n double[] Bcolj = new double[n];\n for (int j = 0; j < B.n; j++) {\n for (int k = 0; k < n; k++) {\n Bcolj[k] = B.data[k][j];\n }\n for (int i = 0; i < m; i++) {\n double[] Arowi = data[i];\n double s = 0;\n for (int k = 0; k < n; k++) {\n s += Arowi[k]*Bcolj[k];\n }\n C[i][j] = s;\n }\n }\n return X;\n }",
"@Override\n\tpublic void visit(MultiplyNode 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\n\t\t/**\n\t\t * evaluam cei doi fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger i, j;\n\t\t/**\n\t\t * salvam si inmultim valorile rezulate in urma evaluarii celor 2 fii si\n\t\t * setam valoarea corespunzatoare in nodul curent\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\tInteger n = i * j;\n\n\t\tnode.setName(n.toString());\n\t}",
"@Override\n public void run() {\n result.prod(indexes.getI(),indexes.getJ(),matrix1,matrix2);\n }",
"public double multiply(Coordinate other) {\n return _coord * other._coord;\n }",
"public long[][] smultiply(int i){\n\t\tint sl = this.mat.length; //jumps to method sideLength to obtain the side length n of the matrix A\n\t\t//the global record contains an array of columns, where each column is an array of row elements. i.e.\n\t\t//the record contains the transpose of matrix A, where every row in the record is a column in A\n\t\t//a temporary 2D array tempMatA, and is made equal to the transpose of A\n\t\tlong[][] tempMatA = transpose(this.mat);\n\t\tlong[][] tempMat2 = new long[sl][sl]; //creates a temporary 2D matrix of the same size as tempMatA\n\t\tlong[][] outMat = new long[sl][sl];\n\t\t\n\t\tif (i > 1){\n\t\t\t//see for loop explanation in class \"Matrix3x3flat\"+\n\t\t\tfor (int j = 1; j < i; j ++){ //loops until j == input variable i.\n\t\t\t\t//j == 1 because matrix multiplication will occur on the first loop, so if i == 2, tempMat2 == A^3, not A^2\n\t\t\t\tfor (int a = 0; a < 3; a++){ //loops until a == side length of A\n\t\t\t\t\tfor (int b = 0; b < 3; b++){ //loops until b == side length of A\n\t\t\t\t\t\tfor (int c = 0; c < 3; c++){ //loops until c == side length of A\n\t\t\t\t\t\t\ttempMat2[a][b] = tempMat2[a][b] + (tempMatA[a][c] * tempMatA[c][b]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//returns tempMat2 as output matrix\n\t\t\toutMat = copy(tempMat2, outMat);\n\t\t}\n\t\t//returns A as output matrix, since A^1 = A\n\t\telse if (i == 1){\n\t\t\toutMat = copy(tempMatA, outMat);\n\t\t}\n\t\t//returns a 3x3 matrix filled with ones if i == 0\n\t\t//A^0 = 1\n\t\telse if (i == 0){\n\t\t\tfor (int m = 0; m < 3; m++){\n\t\t\t\tfor (int n = 0; n < 3; n++){\n\t\t\t\t\tif (m == n){\n\t\t\t\t\t\toutMat[m][n] = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\toutMat[m][n] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//return matrix must be re-transposed to return a the proper format of 2D array for the global array\n\t\toutMat = transpose(outMat);\n\t\treturn outMat;\n\t}",
"protected MatrixToken _multiplyElement(Token rightArgument)\n\t\t\tthrows IllegalActionException {\n\t\tlong scalar;\n\t\tif (rightArgument instanceof LongMatrixToken) {\n\t\t\tif (((LongMatrixToken) rightArgument).getRowCount() != 1\n\t\t\t\t\t|| ((LongMatrixToken) rightArgument).getColumnCount() != 1) {\n\t\t\t\t// Throw an exception.\n\t\t\t\treturn super._moduloElement(rightArgument);\n\t\t\t}\n\t\t\tscalar = ((LongMatrixToken) rightArgument).getElementAt(0, 0);\n\t\t} else {\n\t\t\tscalar = ((LongToken) rightArgument).longValue();\n\t\t}\n\t\tlong[] result = LongArrayMath.multiply(_value, scalar);\n\t\treturn new LongMatrixToken(result, _rowCount, _columnCount, DO_NOT_COPY);\n\t}",
"public static double[] multiply(double[][] a, double[] x) {\n int m = a.length;\n int n = a[0].length;\n if (x.length != n) throw new RuntimeException(\"Illegal matrix dimensions.\");\n double[] y = new double[m];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n y[i] += a[i][j] * x[j];\n return y;\n }"
] | [
"0.7526341",
"0.73600805",
"0.72612655",
"0.71598125",
"0.6990671",
"0.69852483",
"0.6957425",
"0.6882545",
"0.6799235",
"0.669986",
"0.6673632",
"0.6661163",
"0.6655632",
"0.6632887",
"0.6616911",
"0.65413594",
"0.6512652",
"0.64587766",
"0.6339396",
"0.6339309",
"0.63000935",
"0.6142313",
"0.6137979",
"0.61301976",
"0.61252254",
"0.6098347",
"0.6070026",
"0.6066527",
"0.604515",
"0.6039332",
"0.60223114",
"0.6001278",
"0.59999394",
"0.59936255",
"0.5987134",
"0.59796506",
"0.59739184",
"0.59629774",
"0.5952769",
"0.5902444",
"0.58763045",
"0.58606184",
"0.58262384",
"0.5793918",
"0.5787092",
"0.5761477",
"0.5746503",
"0.5744269",
"0.5730441",
"0.57161653",
"0.56912065",
"0.5686508",
"0.56584364",
"0.5649088",
"0.5646846",
"0.56444186",
"0.5643317",
"0.56404823",
"0.5634334",
"0.5634114",
"0.5628392",
"0.5618626",
"0.5616185",
"0.55881965",
"0.5578433",
"0.5568672",
"0.55643445",
"0.5540681",
"0.5533858",
"0.5533298",
"0.5525242",
"0.5519743",
"0.5519278",
"0.5518211",
"0.5513432",
"0.550882",
"0.54902625",
"0.54820853",
"0.54817086",
"0.5473075",
"0.54718167",
"0.54668087",
"0.54634124",
"0.5453861",
"0.54340154",
"0.5428767",
"0.54223675",
"0.5411815",
"0.54031205",
"0.5386708",
"0.5386708",
"0.53847593",
"0.53822607",
"0.5381768",
"0.5379882",
"0.5375763",
"0.53704304",
"0.5368659",
"0.5368368",
"0.5363594"
] | 0.7606786 | 0 |
Multiply the matrix with another matrix. | public Matrix multiply(Matrix other) {
if (this.cols != other.rows)
throw new RuntimeException("Illegal matrix dimensions");
Matrix result = new Matrix(this.rows, other.cols); //Matrix full of zeros
for (int i = 0; i < this.rows; i++) {
for (int j = 0; j < other.cols; j++) {
for (int k = 0; k < this.cols; k++) {
result.data[i][j] += (this.data[i][k] * other.data[k][j]);
}
}
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Matrix multiply(Matrix first, Matrix second) {\n \n Matrix result = new Matrix(first.getRows(), first.getClumns());\n \n for (int row = 0; row < first.getRows(); row++) {\n for (int col = 0; col < first.getClumns(); col++) {\n result.matrix[row][col] = first.matrix[row][col] * second.matrix[row][col];\n }\n }\n \n return result;\n }",
"public static void multiply(int[][] matrix1, int[][] matrix2) {\n\t\t int matrix1row = matrix1.length;\r\n\t\t int matrix1column = matrix1[0].length;//same as rows in B\r\n\t\t int matrix2column = matrix2[0].length;\r\n\t\t int[][] matrix3 = new int[matrix1row][matrix2column];\r\n\t\t for (int i = 0; i < matrix1row; i++) {//outer loop refers to row position\r\n\t\t for (int j = 0; j < matrix2column; j++) {//refers to column position\r\n\t\t for (int k = 0; k < matrix1column; k++) {\r\n\t\t \t //adds the products of row*column elements until the row/column is complete\r\n\t\t \t //updates to next row/column\r\n\t\t matrix3[i][j] = matrix3[i][j] + matrix1[i][k] * matrix2[k][j];\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t print(matrix3);\r\n\t\t }",
"public void matrixMultiply(Matrix m) {\n if (cols == m.getRows()) {\n ArrayList<double[]> result = newMatrix(rows, m.getCols());\n for (int i=0; i<rows; i++) {\n for (int k=0; k<m.getCols(); k++) {\n double sum = 0;\n for (int j=0; j<cols; j++) {\n sum += matrix.get(i)[j] * m.get(j, k);\n }\n result.get(i)[k] = sum;\n }\n }\n setMatrix(result, rows, m.getCols()); // Rows is that of original matrix, Columns is that of the multiplying matrix\n }\n else {\n throw new MatrixMultiplicationDimensionException();\n }\n }",
"@Override\n\tpublic IMatrix nMultiply(IMatrix other) {\n\n\t\tif (this.getColsCount() != other.getRowsCount()) {\n\t\t\tthrow new IncompatibleOperandException(\n\t\t\t\t\t\"For matrix multiplication first matrix must have same number of columns as number of rows of the other matrix!\");\n\t\t}\n\t\tint m = this.getRowsCount();\n\t\tint n = other.getColsCount();\n\t\tint innerDimension = this.getColsCount();\n\t\tdouble[][] p = new double[m][n];\n\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdouble sum = 0;\n\t\t\t\tfor (int k = 0; k < innerDimension; k++) {\n\t\t\t\t\tsum += this.get(i, k) * other.get(k, j);\n\t\t\t\t}\n\t\t\t\tp[i][j] = sum;\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(m, n, p, true);\n\t}",
"public long multiplyMatrix(final Matrix matrixA, final Matrix matrixB, final Matrix res);",
"public void multiply(double skalar) {\r\n for (int i = 0; i < matrix.length; i++) {\r\n for (int j = 0; j < matrix[0].length; j++) {\r\n matrix[i][j] *= skalar;\r\n }\r\n }\r\n }",
"Matrix mul(Matrix m){\n if(m.cols != this.cols || m.rows != this.rows) throw new RuntimeException(String.format(\"Wrong dimensions\"));\n Matrix matrix_to_return = new Matrix(m.rows, m.cols);\n for(int i=0; i<m.rows * m.cols; i++){\n matrix_to_return.data[i] = this.data[i] * m.data[i];\n }\n return matrix_to_return;\n }",
"Matrix mult(Matrix M){\n if(this.getSize() != M.getSize()){\n throw new RuntimeException(\"Matrix\");\n\n } \n int newMatrixSize = this.getSize();\n Matrix newM = M.transpose();\n Matrix resultMatrix = new Matrix(newMatrixSize);\n double resultMatrix_Entry = 0;\n for(int i = 1; i <= newMatrixSize; i++){\n for(int j = 1; j<= newMatrixSize; j++){\n List itRow_A = this.rows[i - 1];\n List itRow_B = newM.rows[j-1];\n itRow_A.moveFront();\n itRow_B.moveFront();\n while((itRow_A.index() != -1) && (itRow_B.index() != -1)){\n Entry c_A = (Entry)itRow_A.get();\n Entry c_B = (Entry) itRow_B.get();\n if(c_A.column == c_B.column){\n resultMatrix_Entry += (c_A.value)*(c_B.value);\n itRow_A.moveNext();\n itRow_B.moveNext();\n\n } else if(c_A.column > c_B.column){\n itRow_B.moveNext();\n\n }else{\n itRow_A.moveNext();\n }\n\n }\n resultMatrix.changeEntry(i, j, resultMatrix_Entry);\n resultMatrix_Entry = 0;\n }\n }\n return resultMatrix;\n\n }",
"@Test\n\tpublic void testMultiply() {\n\t\tdouble epsilon = 0.0000000001;\n\n\t\tdouble[][] values2 = {{1.1, 1.2, 1.3}, {2.1, 2.2, 2.3}};\n\t\tMatrix m2 = new Matrix(values2);\n\n\t\tdouble[][] expectedValues = {{3.73, 3.96, 4.19}, {9.67, 10.24, 10.81}, {-2.07, -2.24, -2.41}};\n\t\tMatrix expected = new Matrix(expectedValues);\n\n\t\tMatrix product = m1.multiply(m2);\n\n\t\tassertEquals(3, product.getRowCount(), \"Product have unexpected number of rows.\");\n\t\tassertEquals(3, product.getColCount(), \"Product have unexpected number of columns.\");\n\n\t\tfor (int i = 0; i < product.getRowCount(); i++) {\n\t\t\tfor (int j = 0; j < product.getColCount(); j++) {\n\t\t\t\tassertTrue(Math.abs(product.get(i, j) - expected.get(i, j)) < epsilon,\n\t\t\t\t\t\"Unexpected value on row \" + i + \" column \" + j + \".\");\n\t\t\t}\n\t\t}\n\t}",
"public Matrix multiply(Matrix m2)\n\t{\n\t\tMatrix result = new Matrix(new double[matrix.length][matrix[0].length]);\n\t\tfor(int i = 0; i < matrix.length; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < matrix.length; j++)\n\t\t\t{\n\t\t\t\tfor (int k = 0; k < matrix.length; k++)\n\t\t\t\t{\n\t\t\t\t\tresult.matrix[i][j] = result.matrix[i][j] + matrix[i][k] * m2.matrix[k][j];\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\treturn result;\n\t}",
"public Matrix mult(Matrix MatrixB) {\n\t\tDouble[][] newValue = new Double[row][MatrixB.col()];\r\n\t\tVector[] MatBcol = MatrixB.getCol();\r\n\t\t\r\n\r\n\t\tfor (int x = 0; x < row; x++) {\r\n\t\t\tfor (int y = 0; y < MatrixB.col(); y++) {\r\n\t\t\t\tVector rowVecI = rowVec[x];\r\n\t\t\t\tVector colVecI = MatBcol[y];\r\n\t\t\t\tnewValue[x][y] = rowVecI.DotP(colVecI);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Matrix(newValue);\r\n\t}",
"public static Matrix multiply(Matrix mat1, Matrix mat2) throws Exception {\n double[][] temp = new double[mat1.rows][mat2.cols];\n try {\n if(mat1.cols == mat2.rows){\n for(int col = 0; col < mat2.cols; col++) {\n for (int row = 0; row < mat1.rows; row++) {\n for (int rowin = 0; rowin < mat2.rows; rowin++) {\n for (int colin = 0; colin < mat1.cols; colin++) {\n temp[row][col] += mat1.arr[row][colin] * mat2.arr[rowin][col];\n }\n }\n }\n }\n }\n\n }catch (Exception e){\n e.printStackTrace();\n throw new Exception(\"Matrices are the wrong size: \" +\n mat1 +\n \" and \" +\n mat2 +\n \" and temp \" +\n Arrays.toString(temp));\n }\n return new Matrix(mat1.rows, mat2.cols, temp);\n }",
"public static TransformMatrix multiplyMatrix(TransformMatrix a, TransformMatrix b) {\n\t\treturn new TransformMatrix(\n\t\t\t\ta.a * b.a,\n\t\t\t\ta.b * b.b,\n\t\t\t\ta.a * b.c + a.c,\n\t\t\t\ta.b * b.d + a.d\n\t\t\t\t);\n\t}",
"public Matrix times(Matrix B) {\n Matrix A = this;\n if (A.columnCount != B.rowCount) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(A.rowCount, B.columnCount);\n for (int i = 0; i < C.rowCount; i++)\n for (int j = 0; j < C.columnCount; j++)\n for (int k = 0; k < A.columnCount; k++)\n C.data[i][j] += (A.data[i][k] * B.data[k][j]);\n return C;\n }",
"public static void testMulRec() {\n\n try {\n\n Matrix m1 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m2 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m3 = Matrix.multiplyRec(m1, m2, 0);\n\n System.out.println(m3);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"private RealMatrix scalarMultiplication(RealMatrix matrix1, RealMatrix matrix2) {\n\t\tdouble a = matrix1.getEntry(0, 0);\n\t\tdouble b = matrix1.getEntry(1, 0);\n\t\tdouble c = matrix1.getEntry(2, 0);\n\t\tdouble d = matrix1.getEntry(3, 0);\n\t\t\n\t\tdouble[][] result = new double[matrix2.getRowDimension()][matrix2.getColumnDimension()];\n\t\t\n\t\tfor (int i=0; i < matrix2.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < matrix2.getColumnDimension(); j++) {\n\t\t\t\tif (i == 0) result[i][j] = a * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 1) result[i][j] = b * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 2) result[i][j] = c * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 3) result[i][j] = d * matrix2.getEntry(i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn MatrixUtils.createRealMatrix(result);\n\t}",
"public Matrix multiply(ComplexNumber cn) {\n\t\tMatrix a = copy();\n\t\tfor (int row = 0; row < a.M; row++) {\n\t\t\tfor (int col = 0; col < a.N; col++) {\n\t\t\t\ta.ROWS[row][col] = a.ROWS[row][col].multiply(cn);\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}",
"public Matrix mult (Matrix otherMatrix) {\n Matrix resultMatrix = new Matrix(nRows, otherMatrix.nColumns);\n\n ExecutorService executor = Executors.newFixedThreadPool(16);\n\n IntStream.range(0, nRows).forEach(rowIndex -> {\n executor.execute(() -> {\n IntStream.range(0, otherMatrix.nColumns).forEach(otherMatrixColIndex -> {\n double sum = IntStream.range(0, this.nColumns)\n .mapToDouble(colIndex -> this.data[rowIndex][colIndex] * otherMatrix.data[colIndex][otherMatrixColIndex])\n .sum();\n\n resultMatrix.setValue(rowIndex, otherMatrixColIndex, sum);\n });\n });\n });\n\n executor.shutdown();\n\n try {\n if (executor.awaitTermination(60, TimeUnit.MINUTES)){\n return resultMatrix;\n } else {\n System.out.println(\"Could not finish matrix multiplication\");\n }\n } catch (InterruptedException e) {\n System.out.println(\"Could not finish matrix multiplication, thread interrupted.\");\n }\n\n return null;\n }",
"public void rightMultiply(Matrix other){\n \tdouble[][] temp = new double[4][4];\n\n //record copy of this matrix \n\tfor (int i = 0; i < 4; i++) {\n\t for (int j = 0; j < 4; j++) {\n\t\ttemp[i][j] = array[i][j];\n\t }\n\t}\n\t//user copy of matrix to left multiply while writing dot products into matrix values\n\tfor (int i = 0; i < 4; i++) {\n\t for (int j = 0; j < 4; j++) {\n\t\tarray[i][j] = 0;\n\t\tfor (int k = 0 ; k < 4 ; k++) {\n \t\t array[i][j] += other.array[i][k] * temp[k][j];\n\t\t}\n\t }\n\t}\n }",
"public static int[][] matrixMultiply(int[][] matA, int[][] matB)\n {\n if(isRect(matA)== false || isRect(matB)== false || matA[0].length != matB.length)\n {\n System.out.println(\"You cant not multiply these matrices\");\n int[][] matC = {{}};\n return matC;\n }\n else\n {\n int[][] matC = new int[matA.length][matB[0].length];\n for(int i = 0; i < matA.length; i++)\n for(int j = 0; j < matB[0].length; j++)\n for(int k = 0; k < matA[0].length; k++)\n {\n matC[i][j] += matA[i][k] * matB[k][j];\n }\n return matC;\n }\n }",
"public Matrix multiplyOtherMatrixToFront(Matrix other) {\n Matrix output = Matrix(rows, other.columns);\n for (int a = 0; a < rows; a++)\n {\n for (int b = 0; b < other.columns; b++)\n {\n for (int k = 0; k < columns; k++)\n {\n output[a][b] = output[a][b] + output[a][k] * other.output[k][b];\n }\n }\n }\n return output;\n }",
"static public double[][] MatrixMult( double [][] A , double [][] B) {\n\t// A [NxK] * B[KxZ] = M[NxZ]\n\tif ( A.length == 0 || B.length == 0 || A[0].length != B.length ) {\n\t System.out.println( \"Matrix Mult Error, Invalid Input Matricies\" );\n\t return new double[1][1];\n\t}\n\tint Rows = A.length , Cols = B[0].length;\n\tdouble [][] M = new double[Rows][Cols];\n\tfor( int i = 0; i < Rows ; i++ ) {\n\t for( int j = 0; j < Cols ; j++ ) {\n\t\tM[i][j] = multRowByCol( A , B , i , j );\n\t }\n\t}\n\treturn M;\n }",
"public Matrix times(Matrix B) {\n Matrix A = this;\n if (A.n != B.m) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(A.m, B.n);\n for (int i = 0; i < C.m; i++)\n for (int j = 0; j < C.n; j++)\n for (int k = 0; k < A.n; k++)\n C.data[i][j] += (A.data[i][k] * B.data[k][j]);\n return C;\n }",
"public Matrix multiply(Matrix b) {\n MultMatrix multCommand = new MultMatrix();\n Matrix result = multCommand.multiply(this, b);\n\n return result;\n }",
"Matrix(Matrix first, Matrix second) {\n if (first.getColumns() == second.getRows()) {\n this.rows = first.getRows();\n this.columns = second.getColumns();\n matrix = new int[first.getRows()][second.getColumns()];\n for (int col = 0; col < this.getColumns(); col++) {\n int sum;\n int commonality = first.getColumns(); // number to handle summation loop\n for (int rw = 0; rw < this.getRows(); rw++) {\n sum = 0;\n // summation loop\n for (int x = 0; x < commonality; x++) {\n sum += first.getValue(rw, x) * second.getValue(x, col);\n }\n matrix[rw][col] = sum;\n }\n\n }\n } else {\n System.out.println(\"Matrices cannot be multiplied\");\n }\n }",
"public Matrix times(Matrix B) {\n Matrix A = this;\n if (A.N != B.M) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(A.M, B.N);\n for (int i = 0; i < C.M; i++)\n for (int j = 0; j < C.N; j++)\n for (int k = 0; k < A.N; k++)\n C.data[i][j] += (A.data[i][k] * B.data[k][j]);\n return C;\n }",
"public static void multiplyMatrixes( double[][] m1, double[][] m2, double[][] result) {\n result[0][0] = m1[0][0]*m2[0][0] + m1[0][1]*m2[1][0] + m1[0][2]*m2[2][0];\n result[0][1] = m1[0][0]*m2[0][1] + m1[0][1]*m2[1][1] + m1[0][2]*m2[2][1];\n result[0][2] = m1[0][0]*m2[0][2] + m1[0][1]*m2[1][2] + m1[0][2]*m2[2][2];\n\n result[1][0] = m1[1][0]*m2[0][0] + m1[1][1]*m2[1][0] + m1[1][2]*m2[2][0];\n result[1][1] = m1[1][0]*m2[0][1] + m1[1][1]*m2[1][1] + m1[1][2]*m2[2][1];\n result[1][2] = m1[1][0]*m2[0][2] + m1[1][1]*m2[1][2] + m1[1][2]*m2[2][2];\n\n result[2][0] = m1[2][0]*m2[0][0] + m1[2][1]*m2[1][0] + +m1[2][2]*m2[2][0];\n result[2][1] = m1[2][0]*m2[0][1] + m1[2][1]*m2[1][1] + +m1[2][2]*m2[2][1];\n result[2][2] = m1[2][0]*m2[0][2] + m1[2][1]*m2[1][2] + +m1[2][2]*m2[2][2];\n }",
"public static BigDecimal[][] multiplyMatrices(BigDecimal[][] m1, BigDecimal[][] m2){\n\t\t\n\t\tint size = m1.length;\n\t\t\n\t\tBigDecimal[][] next = new BigDecimal[size][size];\n\t\tfor(int i = 0; i < size; i++){\n\t\t\tfor(int j = 0; j < size; j++){\n\t\t\t\tBigDecimal current = new BigDecimal(0);\n\t\t\t\tfor(int k = 0; k < size; k++)\n\t\t\t\t\tcurrent = current.add(m1[i][k].multiply(m2[k][j]));\n\n\t\t\t\tnext[i][j] = current;\n\t\t\t}\n\t\t}\n\t\treturn next;\n\t}",
"public Matrix times(Matrix B) throws JPARSECException {\n if (B.m != n) {\n throw new JPARSECException(\"Matrix inner dimensions must agree.\");\n }\n Matrix X = new Matrix(m,B.n);\n double[][] C = X.getArray();\n double[] Bcolj = new double[n];\n for (int j = 0; j < B.n; j++) {\n for (int k = 0; k < n; k++) {\n Bcolj[k] = B.data[k][j];\n }\n for (int i = 0; i < m; i++) {\n double[] Arowi = data[i];\n double s = 0;\n for (int k = 0; k < n; k++) {\n s += Arowi[k]*Bcolj[k];\n }\n C[i][j] = s;\n }\n }\n return X;\n }",
"public void multiplyOtherMatrixToEnd(Matrix other){\n Matrix output = Matrix(other.rows, columns);\n for (int a = 0; a < other.rows; a++)\n {\n for (int b = 0; b < columns; b++)\n {\n for (int k = 0; k < other.columns; k++)\n {\n output[a][b] = output[a][b] + output[a][k] * other.output[k][b];\n }\n }\n }\n return output;\n }",
"public static double[][] multiplyMatrices(double[][] firstMatrix, double[][] secondMatrix, int r1, int c1, int c2) {\r\n\t double[][] product = new double[r1][c2];\r\n\t for(int i = 0; i < r1; i++) {\r\n\t for (int j = 0; j < c2; j++) {\r\n\t for (int k = 0; k < c1; k++) {\r\n\t product[i][j] += firstMatrix[i][k] * secondMatrix[k][j];\r\n\t }\r\n\t }\r\n\t }\r\n\r\n\t return product;\r\n\t }",
"private static void multiplyArray(double [][] matrixA, double [][] matrixB, double [][] matrixC) {\n\t\t\n\t\tmatrixC[0][0] = ((matrixA[0][0] * matrixB[0][0]) + (matrixA[0][1] * matrixB[1][0]));\n\t\tmatrixC[0][1] = ((matrixA[0][0] * matrixB[0][1]) + (matrixA[0][1] * matrixB[1][1]));\n\t\tmatrixC[1][0] = ((matrixA[1][0] * matrixB[0][0]) + (matrixA[1][1] * matrixB[1][0]));\n\t\tmatrixC[1][1] = ((matrixA[1][0] * matrixB[0][1]) + (matrixA[1][1] * matrixB[1][1]));\n\t}",
"public void multiply() {\n\t\t\n\t}",
"public T mult( T B ) {\n convertType.specify(this, B);\n\n // Look to see if there is a special function for handling this case\n if (this.mat.getType() != B.getType()) {\n Method m = findAlternative(\"mult\", mat, B.mat, convertType.commonType.getClassType());\n if (m != null) {\n T ret = wrapMatrix(convertType.commonType.create(1, 1));\n invoke(m, this.mat, B.mat, ret.mat);\n return ret;\n }\n }\n\n // Otherwise convert into a common matrix type if necessary\n T A = convertType.convert(this);\n B = convertType.convert(B);\n\n T ret = A.createMatrix(mat.getNumRows(), B.getMatrix().getNumCols(), A.getType());\n\n A.ops.mult(A.mat, B.mat, ret.mat);\n\n return ret;\n }",
"@SuppressWarnings(\"UnnecessaryLocalVariable\")//Readability\n public Matrix multiply(Matrix b, BigInteger modulo) {\n if (nrOfCols != b.nrOfRows) {\n throw new MalformedMatrixException(\"Matrix with dimensions \" + nrOfRows + \"x\" + nrOfCols +\n \" cannot be multiplied with matrix with dimensions \" + b.nrOfRows + \"x\" + b.nrOfCols);\n }\n Matrix a = this;\n\n int m = a.nrOfRows;\n int p = b.nrOfCols;\n\n final BigInteger[][] result = new BigInteger[m][p];\n\n //Compute the resulting row, using a parallel stream to properly utilize multi-core CPU\n IntStream range = IntStream.range(0, m);\n if (concurrent) {\n range = range.parallel();\n }\n range.forEach(computeRowMultiplication(result, a, b, modulo));\n\n return new Matrix(result);\n }",
"Matrix scalarMult(double x){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n itRow.moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(i, c.column, (x*c.value));\n itRow.moveNext();\n }\n }\n\n return newM;\n }",
"private static void multiply(float[] a, float[] b, float[] destination) {\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\tfor(int k = 0; k < 4; k++){\r\n\t\t\t\t\tset(destination, i, j, get(destination, i, j) + get(a, i, k) * get(b, k, j));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void leftMultiply(Matrix other){\n \t double[][] temp = new double[4][4];\n //record copy of this matrix \n\tfor (int i = 0; i < 4; i++) {\n\t for (int j = 0; j < 4; j++) {\n\t\ttemp[i][j] = array[i][j];\n\t }\n\t}\n\t//user copy of matrix to left multiply while writing dot products into matrix values\n\tfor (int i = 0; i < 4; i++) {\n\t for (int j = 0; j < 4; j++) {\n\t\tarray[i][j] = 0;\n\t\tfor (int k = 0 ; k < 4 ; k++) {\n\t\t array[i][j] += temp[i][k] * other.array[k][j];\n\t\t}\n\t }\n\t}\n }",
"public Matrix multiply(int i) {\n\t\treturn multiply(new Fraction(i));\n\t}",
"Matrix mul(double w){\n Matrix matrix_to_return = new Matrix(this.rows, this.cols);\n for(int i=0; i<this.rows * this.cols; i++){\n matrix_to_return.data[i] = this.data[i] * w;\n }\n return matrix_to_return;\n }",
"public Matrix multiply(double scalar) {\n Matrix result = new Matrix(this.rows, this.cols);\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < this.cols; j++) {\n result.data[i][j] = this.data[i][j] * scalar;\n }\n }\n\n return result;\n }",
"public double multiply(Coordinate other) {\n return _coord * other._coord;\n }",
"public void mult(Mat2 m, Mat2 dest) {\n\t\tfor(int i=0; i<rows; i++) {\n\t\t\tfor(int j=0; j<m.cols; j++) {\n\t\t\t\tdouble total = 0.0f;\n\t\t\t\tfor(int c=0; c<cols; c++) {\n\t\t\t\t\ttotal += data[i][c] * m.data[c][j];\n\t\t\t\t}\n\t\t\t\tdest.set(i, j, total);\n\t\t\t}\n\t\t}\n\t}",
"public final void mul(Matrix3f m1) {\n\tmul(this, m1);\n }",
"public void MatrixChainMultiply(int[] p) {\n n = p.length - 1;\t// how many matrices are in the chain\n m = new int[n + 1][n + 1];\t// overallocate m, so that we don't use index 0\n s = new int[n + 1][n + 1];\t// same for s\n matrixChainOrder(p);\t// run the dynamic-programming algorithm\n }",
"public static double[][] multiply(double[][] a, double[][] b) {\n int m1 = a.length;\n int n1 = a[0].length;\n int m2 = b.length;\n int n2 = b[0].length;\n if (n1 != m2) throw new RuntimeException(\"Illegal matrix dimensions.\");\n double[][] c = new double[m1][n2];\n for (int i = 0; i < m1; i++)\n for (int j = 0; j < n2; j++)\n for (int k = 0; k < n1; k++)\n c[i][j] += a[i][k] * b[k][j];\n return c;\n }",
"@Override\r\n\tpublic void mul(int x, int y) {\n\t\t\r\n\t}",
"public static int[][] multiply(int[][] x,int[][] y){\n int[][] result = new int[x.length][x.length];\n int[] tempRow = new int[x.length];\n int[] tempCol = new int[x.length];\n for (int i = 0; i < x.length; i++) {\n for (int j = 0; j < x.length; j++) {\n //make 2 array then multiple respective number and add them up\n for (int k = 0; k < x.length; k++) {\n tempRow[k] = x[i][k];\n }\n for (int k = 0; k < x.length; k++) {\n tempCol[k] = y[k][j];\n }\n for (int k = 0; k < x.length; k++) {\n result[i][j] += tempRow[k]*tempCol[k];\n }\n }\n }\n return result;\n }",
"public Matrix times(Matrix bmat){\r\n \tif(this.ncol!=bmat.nrow)throw new IllegalArgumentException(\"Nonconformable matrices\");\r\n\r\n \tMatrix cmat = new Matrix(this.nrow, bmat.ncol);\r\n \tdouble [][] carray = cmat.getArrayReference();\r\n \tdouble sum = 0.0D;\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<bmat.ncol; j++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int k=0; k<this.ncol; k++){\r\n \t\t\tsum += this.matrix[i][k]*bmat.matrix[k][j];\r\n \t\t}\r\n \t\tcarray[i][j]=sum;\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"public interface IMatrixMultiplicator {\n\n\t/**\n\t * Multiplies two matrixes and returns the result in a new matrix \n\t * \n\t * @param matrixA first matrix\n\t * @param matrixB second matrix \n\t * @return result of the multiplication\n\t */\n\tpublic long multiplyMatrix(final Matrix matrixA, final Matrix matrixB, final Matrix res);\n\t \n\t\n}",
"public static @NotNull Matrix mult(@NotNull Matrix matrA, @NotNull Matrix matrB) {\n final int compatibleValue = matrA.getColumnCount();\n if (compatibleValue != matrB.getRowCount()) {\n throw new IllegalArgumentException(\n \"Error @ MatrixMultiplication.mult() :: incompatible matrix matrA.columns != matrB.rows\");\n }\n\n final int rowCount = matrA.getRowCount();\n final int colCount = matrB.getColumnCount();\n final Matrix.Builder result = new Matrix.Builder(rowCount, colCount);\n for (int i = 0; i < rowCount; i++) {\n for (int j = 0; j < colCount; j++) {\n int val = 0;\n for (int k = 0; k < compatibleValue; k++) {\n val += matrA.get(i, k) * matrB.get(k, j);\n }\n result.set(i, j, val);\n }\n }\n\n return result.build();\n }",
"public Mat2 mult(Mat2 m) {\n\t\tdouble[][] newData = new double[rows][m.cols];\n\t\t//if(rows != m.cols) throw new IllegalArgumentException(\"cannot multiply a \" + rows + \" by \" + cols + \n\t\t\t//\t\" matrix and a \" + m.rows + \" by \" + m.cols + \" matrix\");\n\t\tfor(int i=0; i<rows; i++) {\n\t\t\tfor(int j=0; j<m.cols; j++) {\n\t\t\t\tdouble total = 0.0;\n\t\t\t\tfor(int c=0; c<cols; c++) {\n\t\t\t\t\ttotal += data[i][c] * m.data[c][j];\n\t\t\t\t}\n\t\t\t\tnewData[i][j] = total;\n\t\t\t}\n\t\t}\n\t\treturn new Mat2(newData);\n\t}",
"public Matrix multiply(BigInteger c, BigInteger modulo) {\n Stream<BigInteger[]> stream = Arrays.stream(inner);\n if (concurrent) {\n stream = stream.parallel();\n }\n\n BigInteger[][] res = stream.map(r -> rowMultiplyConstant(r, c, modulo)).toArray(BigInteger[][]::new);\n\n return new Matrix(res);\n }",
"public Matriz punto(Matriz B) {\n\t\tMatriz A = this;\n\t\tif (A.getColumnas() != B.getFilas()) { throw new RuntimeException(\"Dimensiones no compatibles.\"); }\n\t\t\n\t\tMatriz C = new Matriz(A.getFilas(), B.getColumnas());\n\t\tfor (int i = 0 ; i < C.getFilas() ; i++) {\n\t\t\tfor (int j = 0 ; j < C.getColumnas() ; j++) {\n\t\t\t\tfor (int k = 0 ; k < A.getColumnas() ; k++) {\n\t\t\t\t\tC.setValor(i, j, C.getValor(i, j) + (A.getValor(i, k) * B.getValor(k, j)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn C;\n\t}",
"private static void directProd(DMatrixRMaj a, DMatrixRMaj b, DMatrixRMaj c) {\n for (int i=0; i<5; ++i) {\n for (int j=0; j<5; ++j) {\n c.unsafe_set(i, j, a.unsafe_get(i, 0)*b.unsafe_get(j, 0));\n }\n }\n }",
"public final void mul() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue * topMostValue);\n\t\t}\n\t}",
"public void testMultiply() {\r\n System.out.println(\"Multiply\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E100, -1.1E100}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E100, 1.1E100}, \r\n {9., -6.25, 0., 0., 1., -4., 10.2, 12.95, 1.21E200, -1.21E200}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Multiply(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }",
"public void mul_(JType value) {\n TH.THTensor_(mul)(this, this, value);\n }",
"public static Matrix3D times(Matrix3D A, Matrix3D B) {\n Matrix3D C = new Matrix3D();\n for (int i=0 ; i<=2 ; i++) { // loop over each row of A\n for (int j=0 ; j<=2 ; j++) { // loop over each column of B\n // Calculate the dot product of the ith row of A with the jth column of B:\n double v = 0;\n for (int k=0 ; k<=2 ; k++) { // loop over each item in the row/column\n v += A.d[i][k] * B.d[k][j];\n }\n C.set(i,j,v);\n }\n }\n return C;\n }",
"public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }",
"private void mul() {\n\n\t}",
"public static double[][] multiplyMatrixes( double[][] m1, double[][] m2 ) {\n double[][] result = new double[3][3];\n multiplyMatrixes( m1, m2, result );\n return result;\n }",
"public void multiply(double val) {\n for (int i = 0; i < numRows; i++) {\n for (int j = 0; j < numCols; j++) {\n data[i][j] = data[i][j] * val;\n }\n }\n }",
"public abstract Vector4fc mul(IMatrix4f mat);",
"public void postMultiply(Transform transform) {\n matrix = mulMM(matrix, transform.matrix);\n }",
"public Matrix times(double[][] bmat){\r\n \t int nr=bmat.length;\r\n \tint nc=bmat[0].length;\r\n\r\n \tif(this.ncol!=nr)throw new IllegalArgumentException(\"Nonconformable matrices\");\r\n\r\n \tMatrix cmat = new Matrix(this.nrow, nc);\r\n \tdouble [][] carray = cmat.getArrayReference();\r\n \tdouble sum = 0.0D;\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int k=0; k<this.ncol; k++){\r\n \t\t\tsum += this.matrix[i][k]*bmat[k][j];\r\n \t\t}\r\n \t\tcarray[i][j]=sum;\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"public void multiply(double multiplier) {\n x *= multiplier;\n y *= multiplier;\n }",
"public void multL(TransformationMatrix m) {\n\t\tdouble b11, b12, b13, b14, b21, b22, b23, b24, b31, b32, b33, b34;\n\t\tb11 = m.a11*a11 + m.a12*a21 + m.a13*a31;\n\t\tb12 = m.a11*a12 + m.a12*a22 + m.a13*a32;\n\t\tb13 = m.a11*a13 + m.a12*a23 + m.a13*a33;\n\t\tb14 = m.a11*a14 + m.a12*a24 + m.a13*a34 + m.a14;\n\t\tb21 = m.a21*a11 + m.a22*a21 + m.a23*a31;\n\t\tb22 = m.a21*a12 + m.a22*a22 + m.a23*a32;\n\t\tb23 = m.a21*a13 + m.a22*a23 + m.a23*a33;\n\t\tb24 = m.a21*a14 + m.a22*a24 + m.a23*a34 + m.a24;\n\n\t\tb31 = m.a31*a11 + m.a32*a21 + m.a33*a31;\n\t\tb32 = m.a31*a12 + m.a32*a22 + m.a33*a32;\n\t\tb33 = m.a31*a13 + m.a32*a23 + m.a33*a33;\n\t\tb34 = m.a31*a14 + m.a32*a24 + m.a33*a34 + m.a34;\n\n\t\ta11 = b11; a12 = b12; a13 = b13; a14 = b14;\n\t\ta21 = b21; a22 = b22; a23 = b23; a24 = b24;\n\t\ta31 = b31; a32 = b32; a33 = b33; a34 = b34;\n\t}",
"private static double[] matrixMultiply(double[][] bezier, double[] matrixVars) {\r\n\t\tdouble[] result = {0,0,0,0};\r\n\t\tfor (int i = 0; i < bezier.length; i++) {\r\n\t\t\tfor (int j=0; j < matrixVars.length; j++) {\r\n\t\t\t\tresult[i] += bezier[i][j]*matrixVars[j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n }",
"public void scalarMultiply(double s) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n matrix.get(i)[j] *= s;\n }\n }\n }",
"public static Matrix product(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c, m);\n for (int col = 1; col <= cols_c; col++) {\n double prodCol = 1D;\n for (int row = 1; row <= rows_c; row++) {\n prodCol = prodCol * m.get(row, col);\n }\n d.set(1, col, prodCol);\n }\n }\n return d;\n }",
"private static void multMatVect(double[] v, double[][] A, double m1,\n double[][] B, double m2) {\n double[] vv = new double[3];\n for(int i = 0; i < 3; i++)\n vv[i] = v[i];\n ArithmeticMod.matVecModM(A, vv, vv, m1);\n for(int i = 0; i < 3; i++)\n v[i] = vv[i];\n\n for(int i = 0; i < 3; i++)\n vv[i] = v[i + 3];\n ArithmeticMod.matVecModM(B, vv, vv, m2);\n for(int i = 0; i < 3; i++)\n v[i + 3] = vv[i];\n }",
"public static double[][] matrixMultiplier(double[][] A, double[][] B) {\n\n if (A[0].length != B.length) {\n System.out.println(\"ERROR MATRIX DIMENSIONS INCORRECT! A: \" + Integer.toString(A[0].length) + \" B: \" + Integer.toString(B.length) + \"\\nSHUTTING DOWN PROGRAM\");\n System.exit(0);\n }\n\n double[][] C = new double[A.length][B[0].length];\n for (int i = 0; i < A.length; i++) {\n for (int j = 0; j < B[0].length; j++) {\n C[i][j] = 0;\n }\n }\n\n for (int i = 0; i < A.length; i++) {\n for (int j = 0; j < B[0].length; j++) {\n for (int k = 0; k < A[0].length; k++) {\n C[i][j] += A[i][k] * B[k][j];\n }\n }\n }\n return C;\n }",
"public long[][] smultiply(int i){\n\t\tint sl = this.mat.length; //jumps to method sideLength to obtain the side length n of the matrix A\n\t\t//the global record contains an array of columns, where each column is an array of row elements. i.e.\n\t\t//the record contains the transpose of matrix A, where every row in the record is a column in A\n\t\t//a temporary 2D array tempMatA, and is made equal to the transpose of A\n\t\tlong[][] tempMatA = transpose(this.mat);\n\t\tlong[][] tempMat2 = new long[sl][sl]; //creates a temporary 2D matrix of the same size as tempMatA\n\t\tlong[][] outMat = new long[sl][sl];\n\t\t\n\t\tif (i > 1){\n\t\t\t//see for loop explanation in class \"Matrix3x3flat\"+\n\t\t\tfor (int j = 1; j < i; j ++){ //loops until j == input variable i.\n\t\t\t\t//j == 1 because matrix multiplication will occur on the first loop, so if i == 2, tempMat2 == A^3, not A^2\n\t\t\t\tfor (int a = 0; a < 3; a++){ //loops until a == side length of A\n\t\t\t\t\tfor (int b = 0; b < 3; b++){ //loops until b == side length of A\n\t\t\t\t\t\tfor (int c = 0; c < 3; c++){ //loops until c == side length of A\n\t\t\t\t\t\t\ttempMat2[a][b] = tempMat2[a][b] + (tempMatA[a][c] * tempMatA[c][b]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//returns tempMat2 as output matrix\n\t\t\toutMat = copy(tempMat2, outMat);\n\t\t}\n\t\t//returns A as output matrix, since A^1 = A\n\t\telse if (i == 1){\n\t\t\toutMat = copy(tempMatA, outMat);\n\t\t}\n\t\t//returns a 3x3 matrix filled with ones if i == 0\n\t\t//A^0 = 1\n\t\telse if (i == 0){\n\t\t\tfor (int m = 0; m < 3; m++){\n\t\t\t\tfor (int n = 0; n < 3; n++){\n\t\t\t\t\tif (m == n){\n\t\t\t\t\t\toutMat[m][n] = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\toutMat[m][n] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//return matrix must be re-transposed to return a the proper format of 2D array for the global array\n\t\toutMat = transpose(outMat);\n\t\treturn outMat;\n\t}",
"public Matrix times(double constant){\r\n \tMatrix cmat = new Matrix(this.nrow, this.ncol);\r\n \tdouble [][] carray = cmat.getArrayReference();\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tcarray[i][j] = this.matrix[i][j]*constant;\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"public Matrix multiplyTransposeM(Matrix m) {\n\t\tMatrix newMatrix = new Matrix(nbRows, m.getNbRows());\n\t\tmultiplyTransposeB(this, m, newMatrix);\n\n\t\treturn newMatrix;\n\t}",
"public abstract <M extends AbstractMatrix> M elementwiseProduct(M b);",
"public void multR(TransformationMatrix m) {\n\t\tdouble b11, b12, b13, b14, b21, b22, b23, b24, b31, b32, b33, b34;\n\t\tb11 = a11*m.a11 + a12*m.a21 + a13*m.a31;\n\t\tb12 = a11*m.a12 + a12*m.a22 + a13*m.a32;\n\t\tb13 = a11*m.a13 + a12*m.a23 + a13*m.a33;\n\t\tb14 = a11*m.a14 + a12*m.a24 + a13*m.a34 + a14;\n\t\tb21 = a21*m.a11 + a22*m.a21 + a23*m.a31;\n\t\tb22 = a21*m.a12 + a22*m.a22 + a23*m.a32;\n\t\tb23 = a21*m.a13 + a22*m.a23 + a23*m.a33;\n\t\tb24 = a21*m.a14 + a22*m.a24 + a23*m.a34 + a24;\n\n\t\tb31 = a31*m.a11 + a32*m.a21 + a33*m.a31;\n\t\tb32 = a31*m.a12 + a32*m.a22 + a33*m.a32;\n\t\tb33 = a31*m.a13 + a32*m.a23 + a33*m.a33;\n\t\tb34 = a31*m.a14 + a32*m.a24 + a33*m.a34 + a34;\n\n\t\ta11 = b11; a12 = b12; a13 = b13; a14 = b14;\n\t\ta21 = b21; a22 = b22; a23 = b23; a24 = b24;\n\t\ta31 = b31; a32 = b32; a33 = b33; a34 = b34;\n\t}",
"public abstract Vector4fc mul(IMatrix4x3f mat);",
"private static int[][] sparseMatrixMultiplyBruteForce (int[][] A, int[][] B) {\n int[][] result = new int[A.length][B[0].length];\n\n for(int i = 0; i < result.length; i++) {\n for(int j = 0; j < result[0].length; j++) {\n int sum = 0;\n for(int k = 0; k < A[0].length; k++) {\n sum += A[i][k] * B[k][j];\n }\n result[i][j] = sum;\n }\n }\n return result;\n }",
"public synchronized void matrixMultiplication(cl_mem matrixA, cl_mem matrixB, cl_mem matrixC, \r\n int widthA, int heightA, int widthB) {\r\n confirmActiveState();\r\n \r\n clSetKernelArg(kernelMatrixMultiplication, 1, Sizeof.cl_mem, Pointer.to(matrixB));\r\n clSetKernelArg(kernelMatrixMultiplication, 0, Sizeof.cl_mem, Pointer.to(matrixA));\r\n clSetKernelArg(kernelMatrixMultiplication, 2, Sizeof.cl_mem, Pointer.to(matrixC));\r\n clSetKernelArg(kernelMatrixMultiplication, 3, Sizeof.cl_int, Pointer.to(new int[] {widthA}));\r\n clSetKernelArg(kernelMatrixMultiplication, 4, Sizeof.cl_int, Pointer.to(new int[] {widthB}));\r\n\r\n long globalThreads[] = new long[] {widthB, heightA};\r\n clEnqueueNDRangeKernel(commandQueue, kernelMatrixMultiplication, \r\n 2, null, globalThreads, null, 0, null, null);\r\n }",
"public int mul(int i,int j){\n\t\treturn i*j;\n\t}",
"@Override\n\tpublic double multiply(double a, double b) {\n\t\treturn (a*b);\n\t}",
"public static <T extends Vector> T Multiply(T a, T b,T result){\n if(Match(a,b)) {\n for (int i = 0; i < result.axis.length; i++) {\n result.axis[i] = a.axis[i] * b.axis[i];\n }\n return result;\n }\n return result;\n }",
"public int mul(int i, int j) {\n\t\treturn i*j;\r\n\t}",
"public static void mult(TransformationMatrix l, TransformationMatrix r, TransformationMatrix m) {\n\t\tm.a11 = l.a11*r.a11 + l.a12*r.a21 + l.a13*r.a31;\n\t\tm.a12 = l.a11*r.a12 + l.a12*r.a22 + l.a13*r.a32;\n\t\tm.a13 = l.a11*r.a13 + l.a12*r.a23 + l.a13*r.a33;\n\t\tm.a14 = l.a11*r.a14 + l.a12*r.a24 + l.a13*r.a34 + l.a14;\n\t\tm.a21 = l.a21*r.a11 + l.a22*r.a21 + l.a23*r.a31;\n\t\tm.a22 = l.a21*r.a12 + l.a22*r.a22 + l.a23*r.a32;\n\t\tm.a23 = l.a21*r.a13 + l.a22*r.a23 + l.a23*r.a33;\n\t\tm.a24 = l.a21*r.a14 + l.a22*r.a24 + l.a23*r.a34 + l.a24;\n\t\tm.a31 = l.a31*r.a11 + l.a32*r.a21 + l.a33*r.a31;\n\t\tm.a32 = l.a31*r.a12 + l.a32*r.a22 + l.a33*r.a32;\n\t\tm.a33 = l.a31*r.a13 + l.a32*r.a23 + l.a33*r.a33;\n\t\tm.a34 = l.a31*r.a14 + l.a32*r.a24 + l.a33*r.a34 + l.a34;\n\t}",
"public static double[][] multiplicacaoMatriz(double[][] a, double[][] b) {\n\t\t// linha por coluna\n\n\t\tif (a == null || b == null)\n\t\t\tthrow new NullPointerException(\"Argumentos nulos\");\n\n\t\tif (a[0].length != b.length)\n\t\t\tthrow new IllegalArgumentException(\"Numero de linhas de \\\"A\\\" � diferente de colunas de \\\"B\\\"\");\n\n\t\tfinal double[][] resultado = new double[a.length][b[0].length];\n\n\t\tfor (int x = 0; x < resultado.length; x++)\n\t\t\tfor (int y = 0; y < resultado[0].length; y++) {\n\n\t\t\t\tdouble acomulador = 0;\n\t\t\t\tfor (int i = 0; i < a[0].length; i++)\n\t\t\t\t\tacomulador += a[x][i] * b[i][y];\n\n\t\t\t\tresultado[x][y] = acomulador;\n\t\t\t}\n\n\t\treturn resultado;\n\t}",
"public static double[] multiply(double[] x, double[][] a) {\n int m = a.length;\n int n = a[0].length;\n if (x.length != m) throw new RuntimeException(\"Illegal matrix dimensions.\");\n double[] y = new double[n];\n for (int j = 0; j < n; j++)\n for (int i = 0; i < m; i++)\n y[j] += a[i][j] * x[i];\n return y;\n }",
"public static double[] multiply(double[] x, double[][] a) {\n int m = a.length;\n int n = a[0].length;\n if (x.length != m) throw new RuntimeException(\"Illegal matrix dimensions.\");\n double[] y = new double[n];\n for (int j = 0; j < n; j++)\n for (int i = 0; i < m; i++)\n y[j] += a[i][j] * x[i];\n return y;\n }",
"@Override\n public void run() {\n result.prod(indexes.getI(),indexes.getJ(),matrix1,matrix2);\n }",
"public void multiply(double amount) {\n x *= amount;\n y *= amount;\n }",
"public static Matrix times(Matrix amat, double constant){\r\n \tMatrix cmat = new Matrix(amat.nrow, amat.ncol);\r\n \tdouble [][] carray = cmat.getArrayReference();\r\n\r\n \t \tfor(int i=0; i<amat.nrow; i++){\r\n \t\tfor(int j=0; j<amat.ncol; j++){\r\n \t\tcarray[i][j] = amat.matrix[i][j]*constant;\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"Matrix dot(Matrix m){\n if(this.cols != m.rows) throw new RuntimeException(String.format(\"Wrong dimensions\"));\n double[][] tmp_this = this.asArray();\n double[][] tmp_m = m.asArray();\n Matrix matrix_to_return = new Matrix(this.rows, m.cols);\n for(int i=0; i<matrix_to_return.rows; i++){\n for(int j=0; j<matrix_to_return.cols; j++){\n for(int k=0; k<matrix_to_return.rows; k++)\n matrix_to_return.data[i*this.cols + j] += tmp_this[i][k] * tmp_m[k][j];\n }\n }\n return matrix_to_return;\n }",
"@Override\n\tpublic double multiply(double in1, double in2) {\n\t\treturn 0;\n\t}",
"public void multiply(CubieCube multiplier) {\n multiplyTheCorners(multiplier);\n multiplyTheEdges(multiplier);\n }",
"public static BigFraction[][] multiply(BigFraction[][] A, BigFraction[][] B) {\n int mA = A.length;\n int nA = A[0].length;\n int mB = B.length;\n int nB = B[0].length;\n if (nA != mB) throw new RuntimeException(\"Illegal matrix dimensions.\");\n BigFraction[][] C = new BigFraction[mA][nB];\n for (int i = 0; i < mA; i++)\n for (int j = 0; j < nB; j++)\n for (int k = 0; k < nA; k++)\n C[i][j] = (A[i][k].multiply(B[k][j]));\n return C;\n }",
"@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}",
"public Row3 smultiply(int i){\n\t\tRow3 tempRec = this.mat; //creates a temporary duplicate of the global record\n\t\tlong[][] tempMatA = new long[3][3]; //creates the matrix A as a 2D array\n\t\ttempMatA[0][0] = tempRec.r1.col1;\n\t\ttempMatA[0][1] = tempRec.r1.col2;\n\t\ttempMatA[0][2] = tempRec.r1.col3;\n\t\ttempMatA[1][0] = tempRec.r2.col1;\n\t\ttempMatA[1][1] = tempRec.r2.col2;\n\t\ttempMatA[1][2] = tempRec.r2.col3;\n\t\ttempMatA[2][0] = tempRec.r3.col1;\n\t\ttempMatA[2][1] = tempRec.r3.col2;\n\t\ttempMatA[2][2] = tempRec.r3.col3;\n\t\t\n\t\tlong[][] tempMat2 = new long[3][3]; //creates a 2D array of the same size as A\n\t\tlong[][] outMat = new long[3][3];\n\t\t\n\t\tif (i > 1){\n\t\t\t//see for loop explanation in class \"Matrix3x3flat\"\n\t\t\tfor (int j = 1; j < i; j ++){ //loops until j == input variable i.\n\t\t\t\t//j == 1 because matrix multiplication will occur on the first loop, so if i == 2, tempMat2 == A^3, not A^2\n\t\t\t\tfor (int a = 0; a < 3; a++){ //loops until a == side length of A\n\t\t\t\t\tfor (int b = 0; b < 3; b++){ //loops until b == side length of A\n\t\t\t\t\t\tfor (int c = 0; c < 3; c++){ //loops until c == side length of A\n\t\t\t\t\t\t\ttempMat2[a][b] = tempMat2[a][b] + (tempMatA[a][c] * tempMatA[c][b]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//returns tempMat2 as output matrix\n\t\t\toutMat = copy(tempMat2, outMat);\n\t\t}\n\t\t//returns A as output matrix, since A^1 = A\n\t\telse if (i == 1){\n\t\t\toutMat = copy(tempMatA, outMat);\n\t\t}\n\t\t//returns a 3x3 matrix filled with ones if i == 0\n\t\t//A^0 = 1\n\t\telse if (i == 0){\n\t\t\tfor (int m = 0; m < 3; m++){\n\t\t\t\tfor (int n = 0; n < 3; n++){\n\t\t\t\t\tif (m == n){\n\t\t\t\t\t\toutMat[m][n] = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\toutMat[m][n] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//after matrix multiplication is performed, the respective elements of the 2D array tempMatA are stored in\n\t\t//the temporary register tempRec2, which is then returned\n\t\tcolRow3 a1 = new colRow3(outMat[0][0], outMat[0][1], outMat[0][2]);\n\t\tcolRow3 b1 = new colRow3(outMat[1][0], outMat[1][1], outMat[1][2]);\n\t\tcolRow3 c1 = new colRow3(outMat[2][0], outMat[2][1], outMat[2][2]);\n\t\tRow3 tempRec2 = new Row3(a1, b1, c1);\n\t\treturn tempRec2;\n\t}",
"public static double[] multiply(double[][] a, double[] x) {\n int m = a.length;\n int n = a[0].length;\n if (x.length != n) throw new RuntimeException(\"Illegal matrix dimensions.\");\n double[] y = new double[m];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n y[i] += a[i][j] * x[j];\n return y;\n }",
"public T mul(T first, T second);"
] | [
"0.75245523",
"0.74029905",
"0.73504215",
"0.73383635",
"0.7309981",
"0.7275593",
"0.7248127",
"0.71716106",
"0.7094114",
"0.7002515",
"0.69525623",
"0.69252914",
"0.69228077",
"0.69038385",
"0.68988514",
"0.68710214",
"0.6853693",
"0.6828195",
"0.68062025",
"0.6786808",
"0.67842305",
"0.67798865",
"0.6761589",
"0.67600036",
"0.6753105",
"0.6746068",
"0.6722169",
"0.6686348",
"0.66567284",
"0.6653876",
"0.6647036",
"0.6633602",
"0.6622302",
"0.66088164",
"0.66016984",
"0.65866446",
"0.6533452",
"0.6526232",
"0.6511184",
"0.65053517",
"0.6500523",
"0.6494879",
"0.6425033",
"0.6386499",
"0.6385045",
"0.6377765",
"0.63437456",
"0.6339975",
"0.63279206",
"0.63234216",
"0.6313278",
"0.63073593",
"0.6307106",
"0.6296802",
"0.6292516",
"0.62883437",
"0.62841165",
"0.62819093",
"0.6231449",
"0.6227035",
"0.6216562",
"0.62018824",
"0.6194741",
"0.619088",
"0.61832595",
"0.6175954",
"0.6167587",
"0.61625123",
"0.6153133",
"0.6150157",
"0.61374015",
"0.6112885",
"0.6105748",
"0.60991275",
"0.6096699",
"0.606258",
"0.60498804",
"0.6042065",
"0.60397077",
"0.60379064",
"0.60347754",
"0.60297006",
"0.60269254",
"0.60239375",
"0.6011088",
"0.6010175",
"0.60094315",
"0.6003367",
"0.6003367",
"0.5999823",
"0.5982675",
"0.5973754",
"0.5952272",
"0.5951874",
"0.59459835",
"0.59445775",
"0.59302413",
"0.59291154",
"0.59283966",
"0.59197533"
] | 0.76319253 | 0 |
Returns the transpose of the matrix. | public Matrix transpose() {
Matrix transposed = new Matrix(this.cols, this.rows);
for (int i = 0; i < transposed.rows; i++) {
for (int j = 0; j < transposed.cols; j++) {
transposed.data[i][j] = this.data[j][i];
}
}
return transposed;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Matrix transpose(){\r\n \tMatrix tmat = new Matrix(this.ncol, this.nrow);\r\n \tdouble[][] tarray = tmat.getArrayReference();\r\n \tfor(int i=0; i<this.ncol; i++){\r\n \t\tfor(int j=0; j<this.nrow; j++){\r\n \t\ttarray[i][j]=this.matrix[j][i];\r\n \t\t}\r\n \t}\r\n \treturn tmat;\r\n \t}",
"Matrix<T> getTransposed();",
"public Matrix getTranspose() {\r\n double[][] jadi = new double[matrix[0].length][matrix.length];\r\n for (int i = 0; i < jadi.length; i++) {\r\n for (int j = 0; j < jadi[0].length; j++) {\r\n jadi[i][j] = matrix[j][i];\r\n }\r\n }\r\n return new Matrix(jadi);\r\n }",
"public Matrix transpose() {\n Matrix result = new Matrix(cols, rows);\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n result.matrix.get(j)[i] = matrix.get(i)[j];\n }\n }\n return result;\n }",
"public T transpose() {\n T ret = createMatrix(mat.getNumCols(), mat.getNumRows(), mat.getType());\n\n ops.transpose(mat, ret.mat);\n\n return ret;\n }",
"public Matrix transpose() {\n Matrix A = new Matrix(N, M);\n for (int i = 0; i < M; i++)\n for (int j = 0; j < N; j++)\n A.data[j][i] = this.data[i][j];\n return A;\n }",
"public Matrix transpose() {\n Matrix A = new Matrix(columnCount, rowCount);\n for (int i = 0; i < rowCount; i++)\n for (int j = 0; j < columnCount; j++)\n A.data[j][i] = this.data[i][j];\n return A;\n }",
"public Matrix transpose() {\n\t\tMatrix a = copy();\n\t\tComplexNumber[][] values = new ComplexNumber[a.N][];\n\t\tfor (int col = 0; col < a.N; col++) {\n\t\t\tvalues[col] = new ComplexNumber[a.M];\n\t\t\tfor (int row = 0; row < a.M; row++) {\n\t\t\t\tvalues[col][row] = a.ROWS[row][col]; \t\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(values);\n\t}",
"public static Matrix transpose(Matrix amat){\r\n \tMatrix tmat = new Matrix(amat.ncol, amat.nrow);\r\n \tdouble[][] tarray = tmat.getArrayReference();\r\n \tfor(int i=0; i<amat.ncol; i++){\r\n \t\tfor(int j=0; j<amat.nrow; j++){\r\n \t\ttarray[i][j]=amat.matrix[j][i];\r\n \t\t}\r\n \t}\r\n \treturn tmat;\r\n \t}",
"public final static float[][] transpose(float[][] matrix) {\n\t\tint n = matrix[0].length;\n\t\t\n\t\tfloat[][] trans = new float[n][];\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttrans[i] = getColumnVector(matrix, i);\n\t\t}\n\t\t\n\t\treturn trans;\n\t}",
"Matrix transpose(){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n // if(!itRow[i].isEmpty()){\n itRow.moveFront();\n // itRow[i].moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(c.column, i, c.value);\n itRow.moveNext();\n }\n }\n return newM;\n }",
"public double[][] transpose(double[][] matrix){\n\t\tMatrix A = new Matrix(matrix).transpose();\n\t\treturn A.getArray();\n\t}",
"public static double[][] transposeMatrix(double[][] matrix){\n int nRows = matrix.length;\n int nColumns = matrix[0].length;\n for(int i=1; i<nRows; i++)if(matrix[i].length!=nColumns)throw new IllegalArgumentException(\"All rows must be the same length\");\n double[][] transpose = new double[nColumns][nRows];\n for(int i=0; i<nRows; i++){\n for(int j=0; j<nColumns; j++){\n transpose[j][i] = matrix[i][j];\n }\n }\n return transpose;\n }",
"public Matrix xMatrixTranspose(){\n if(!this.pcaDone)this.pca();\n double denom = this.nItems;\n if(!super.nFactorOption)denom -= 1.0;\n Matrix mat = dataMinusMeansTranspose.times(1.0/Math.sqrt(denom));\n return mat;\n }",
"public final void transpose() {\n\tfloat tmp = m01;\n\tm01 = m10;\n\tm10 = tmp;\n\n\ttmp = m02;\n\tm02 = m20;\n\tm20 = tmp;\n\n\ttmp = m12;\n\tm12 = m21;\n\tm21 = tmp;\n\n }",
"public org.apache.spark.mllib.linalg.distributed.BlockMatrix transpose () { throw new RuntimeException(); }",
"private static int[][] transpose(int[][] array) {\n if (array.length == 0 || array[0].length == 0)\n return array;\n int[][] transposed = new int[array[0].length][];\n for (int row = 0; row < array[0].length; row++)\n transposed[row] = new int[array.length];\n for (int row = 0; row < array[0].length; row++)\n for (int col = 0; col < array.length; col++)\n transposed[row][col] = array[col][row];\n return transposed;\n }",
"private void transpose() {\n Utils.transpose(this._board);\n }",
"Nda<V> transpose( int dim1, int dim2 );",
"DataFrame<C,R> transpose();",
"private static ArrayList<ArrayList<Integer>> transposeMatrix(ArrayList<ArrayList<Integer>> matrix){\r\n\t\tint numRows = matrix.size();\r\n\t\tint numCols = matrix.get(0).size();\r\n\t\tArrayList<ArrayList<Integer>> newMat = new ArrayList<ArrayList<Integer>>();\r\n\t\t//Put this in second for-loop to not have to loop twice?\r\n\t\tfor(int i = 0; i < numCols; i++) newMat.add(new ArrayList<Integer>());\r\n\t\tfor(int i = 0; i < numRows; i++){\r\n\t\t\tfor (int j = 0; j < numCols; j++){\r\n\t\t\t\tnewMat.get(j).add(matrix.get(i).get(j));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn newMat;\r\n\t}",
"private int[][] transpose(int [][] inputarray){\n int x = inputarray.length;\n int y = inputarray[x - 1].length;\n int [][] transposedarray = new int[y][x];\n for(int i = 0; i < x; ++i){\n for(int j = 0; j < y; ++j){\n transposedarray[j][i] = inputarray[i][j];\n }\n }\n return transposedarray;\n }",
"private Matriks Transpose(){\r\n\t\tMatriks Mhasil = new Matriks(KolEff,BrsEff);\r\n\t\tfor(int i=0;i<BrsEff;i++){\r\n\t\t\tfor(int j=0;j<KolEff;j++){\r\n\t\t\t\tMhasil.Elmt[j][i] = this.Elmt[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Mhasil;\r\n\t}",
"public void transpose() {\n // Follow this plan: \n // (1) Create a new ImageArray ia, using currentIM's row-major order array\n // and rows and columns, but swap the roles of its numbers\n // of rows and columns.\n // (2) Store the transpose of the currentIm array in ia, using currentIm's\n // 2-parameter getPixel function and ia's 3-parameter setPixel\n // function.\n // (3) assign ia to currentIm.\n int rows= currentIm.getRows();\n int cols= currentIm.getCols();\n ImageArray ia= new ImageArray(currentIm.getRmoArray(), cols, rows);\n \n //Copy each element ImageArray[r,c] to ia[c,r]\n // invariant: rows 0..r-1 have been copied to ia[.., 0..r-1]\n for (int r= 0; r != rows; r= r+1)\n // invariant: elements [r..0..c-1] have been copied to ia[0..c-1, r]\n for (int c= 0; c != cols; c= c+1) {\n ia.setPixel(c, r, currentIm.getPixel(r,c));\n }\n \n currentIm= ia;\n }",
"@Override\n\tpublic Mat GetTranslateMatrix()\n\t{\n\t\treturn mT;\n\t}",
"public static short[][] transpose(short[][] a) {\n if (a.length==0)\n return null;\n if (a[0].length==0)\n return null;\n short[][] transpose = new short[a[0].length][a.length];\n for (int i = 0; i < a[0].length; i++) {\n for (int j = 0; j < a.length; j++) {\n transpose[i][j] = a[j][i];\n }\n }\n return transpose;\n }",
"public static int[][] transposeMatrix(int[][] A){\n //takes 2 D and returns 2D\n int newWidth=A.length;\n int newHeight=A[0].length;\n //get two dimensions for new matrix\n int[][] transposeA=new int[newHeight][newWidth];\n //switch dimensions\n //use for loop to reassign values\n for(int i=0; i<newHeight; i++){\n for(int k=0; k<newWidth; k++){\n //imbedded for loop for individual values\n transposeA[i][k]=A[k][i];\n System.out.print(transposeA[i][k]+\" \");\n \n }\n System.out.println();\n }\n return transposeA;\n \n }",
"public final void transpose(Matrix3f m1) {\n\t// alias-safe\n\tset(m1);\n\ttranspose();\n }",
"public static int[][] transpose (int[][] c) {\n\t\t \n\n\t\t int width =c.length;\n\t\t int height = c[0].length;\n\n\t\t int[][] array_new = new int[height][width];\n\n\t\t for (int x = 0; x < width; x++) {\n\t\t for (int y = 0; y < height; y++) {\n\t\t array_new[y][x] = c[x][y];\n\t\t }\n\t\t }\n\t\t return array_new;\n\t\t}",
"public void phitransposeMatrix()\n {\n double [][] martixtranspose;\n martixtranspose = new double[1][x + 1];\n int i = 0;\n while (i <= x) {\n martixtranspose[0][i] = Math.pow(arraylistofprices.size(), i);\n\n i++;\n }\n phiT = new Matrix(martixtranspose);\n }",
"public Matrix multiplyTransposeSelf(Matrix m) {\n\t\tMatrix newMatrix = new Matrix(nbColumns, m.getNbColumns());\n\t\tmultiplyTransposeA(this, m, newMatrix);\n\n\t\treturn newMatrix;\n\t}",
"private static int[][] rotateMartix(int[][] matrix) {\n for(int i=0;i<matrix.length;i++) {\n for(int j=i;j< matrix.length;j++) {\n int tmp=matrix[i][j];\n matrix[i][j]=matrix[j][i];\n matrix[j][i]=tmp;\n }\n }\n //swap columns\n for(int i=0;i<matrix.length;i++){\n int low = 0;\n int high = matrix.length-1;\n\n while(low < high)\n {\n int temp = matrix[i][low];\n matrix[i][low] = matrix[i][high];\n matrix[i][high] = temp;\n\n low++;\n high--;\n }\n }\n return matrix;\n }",
"public Matrix multiplyTransposeM(Matrix m) {\n\t\tMatrix newMatrix = new Matrix(nbRows, m.getNbRows());\n\t\tmultiplyTransposeB(this, m, newMatrix);\n\n\t\treturn newMatrix;\n\t}",
"public static BigFraction[][] transpose(BigFraction[][] A) {\n int m = A.length;\n int n = A[0].length;\n BigFraction[][] C = new BigFraction[n][m];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n C[j][i] = A[i][j];\n return C;\n }",
"public RetTransp getRetTransp() {\n return retTransp;\n }",
"public double[][] transpose(double[][] X, int nrow, int ncol) {\n\t\tdouble[][] Y = new double[ncol][nrow];\n\t\tfor (int i = 0; i < nrow; i++)\n\t\t\tfor (int j = 0; j < ncol; j++)\n\t\t\t\tY[j][i] = X[i][j];\n\t\treturn Y;\n\t}",
"private void constructTransitionTransposeMatrix() {\r\n\t\tfor(int i=0; i<getNodeCnt(); i++) {\r\n\t\t\tArrayList<NodeTransition> transitionList = new ArrayList<NodeTransition>();\r\n\t\t\tmTransitionTranspose.add( transitionList );\r\n\t\t}\r\n\t\tfor(Node node: mNodes) {\r\n\t\t\tint fromId = node.getId();\r\n\t\t\tint outDegree = node.getOutDegree();\r\n\t\t\t\r\n\t\t\tSet<Integer> outEdges = getOutEdges(fromId);\r\n\t\t\tfor(Integer edgeId: outEdges) {\r\n\t\t\t\tint toId = getEdge(edgeId).getToId();\r\n\t\t\t\tdouble pTransition = (double) getEdge(edgeId).getWeight() / (double) outDegree;\r\n\t\t\t\t\r\n\t\t\t\tArrayList<NodeTransition> transitionList = mTransitionTranspose.get(toId);\r\n\t\t\t\ttransitionList.add( new NodeTransition(fromId, pTransition) );\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"Matrix InverseT()\n {\n Matrix ad = new Matrix( y.cross(z), z.cross(x), x.cross(y) );\n float inv_det = 1.0f / ( x.dot( ad.x ) );\n ad.timesEqual( inv_det );\n return ad;\n }",
"@Override\n\tpublic IMatrix nTranspose(boolean liveView) {\n\t\tif (liveView) {\n\t\t\treturn new MatrixTransposeView(this);\n\t\t} else {\n\t\t\treturn new MatrixTransposeView(this.copy());\n\t\t}\n\t}",
"public List<Integer>[] getTranspose(List<Integer>[] graph)\n {\n int V = graph.length;\n List<Integer>[] g = new List[V];\n for (int i = 0; i < V; i++)\n g[i] = new ArrayList<Integer>();\n for (int v = 0; v < V; v++)\n for (int i = 0; i < graph[v].size(); i++)\n g[graph[v].get(i)].add(v);\n return g;\n }",
"public static int[][] transposeMultMatrix(int initialValue,int rows,int columns)\n {\n int[][] ori = new int[rows][columns];\n int[][] orit = new int[columns][rows];\n int[][] res = new int[rows][rows];\n int i,j;\n for(i=0; i<rows; i++) {\n for(j=0; j<columns; j++) {\n ori[i][j] = initialValue;\n orit[j][i] = initialValue;\n initialValue++;\n }\n }\n int xi,yj;\n for(i=0; i<rows; i++) {\n for(j=0; j<rows; j++) {\n for(xi=0,yj=0; xi<columns&&yj<columns; xi++,yj++) {\n res[i][j] += ori[i][xi]*orit[yj][j];\n }\n }\n }\n return res;\n }",
"private void transpose() {\n\n // Make a copy of current orientation of rgb and energy arrays.\n int[][] rgbCopy = new int[width][height];\n for (int col = 0; col < width; col++) {\n rgbCopy[col] = rgb[col].clone();\n }\n double[][] energyCopy = new double[width][height];\n for (int col = 0; col < width; col++) {\n energyCopy[col] = energy[col].clone();\n }\n\n // Swap axes.\n int temp = width;\n width = height;\n height = temp;\n\n // Re-init arrays with swapped dimensions.\n rgb = new int[width][height];\n energy = new double[width][height];\n\n // Swap individual pixels in rgb and energy arrays.\n for (int col = 0; col < width; col++) {\n for (int row = 0; row < height; row++) {\n rgb[col][row] = rgbCopy[row][col];\n energy[col][row] = energyCopy[row][col];\n }\n }\n }",
"public Matrix solveTranspose(Matrix B) throws JPARSECException {\n return transpose().solve(B.transpose());\n }",
"public String getTable() {\n StringBuilder table = new StringBuilder();\n\n table.append(\" \");\n for (int i = 0; i < matrix.length; i++) {\n table.append(\" \");\n table.append(i + 1);\n }\n table.append(\"\\n\");\n\n for (int i = 0; i < matrix.length; i++) {\n table.append(i + 1);\n table.append(\" \");\n\n for (int j = 0; j < matrix.length; j++) {\n table.append(matrix[i][j] ? 1 : 0);\n table.append(\" \");\n }\n table.append(\"\\n\");\n }\n table.append(\"\\n\");\n\n return table.toString();\n }",
"public DirectedGraph getTranspose() {\n\t\tDirectedGraph newGraph = new DirectedGraph(V);\n\t\tfor (int v = 0; v < V; v++) {\n\t\t\t// Recur for all the vertices adjacent to this vertex\n\t\t\tIterator<Integer> i = this.getAdjacents(v).iterator();\n\t\t\twhile (i.hasNext())\n\t\t\t\tnewGraph.adj[i.next()].add(v);\n\n\t\t}\n\t\treturn newGraph;\n\t}",
"private static int[][] transpose4(int[][] grid) {\r\n int[][] transposed = new int[4][4];\r\n for (int i = 0; i < 4; i++) {\r\n for (int j = 0; j < 4; j++) {\r\n transposed[j][i] = grid[i][j];\r\n }\r\n }\r\n return transposed;\r\n }",
"public Matrix4 getTransformMatrix() {\n return transformMatrix;\n }",
"public static SquareMatrix traspose(SquareMatrix matrix) {\n for (int row = 0; row < matrix.numberOfRows(); row++) {\n for (int col = row; col < matrix.numberOfCols(); col++) {\n double value = matrix.get(row, col);\n matrix.set(row, col, matrix.get(col, row));\n matrix.set(col, row, value);\n }\n }\n return matrix;\n }",
"public double[][] convert_img_mat()\n\t{\n\t\tif(orderflag)\n\t\t{\n\t\t\tputpixel_1();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//rotate the image and get the pixels as usual form\t\n \t\tputpixel_2();\n\t\t}\n\treturn matrix;\n\t}",
"public Transform getTransformation() {\n Transform t = Transform.newTranslation(position);\n t = t.compose(Transform.newScale(scale));\n t = t.compose(Transform.newXRotation(rotation.x));\n t = t.compose(Transform.newYRotation(rotation.y));\n t = t.compose(Transform.newZRotation(rotation.z));\n return t;\n }",
"public Matrix getTransform()\n {\n return transform;\n }",
"public JamMatrix invert() {\n RealMatrix apacheUT = decomposition.getUT();\n RealMatrix apacheV = decomposition.getV();\n RealMatrix apacheDinv = getApacheDinv();\n\n return JamMatrix.wrap(apacheV.multiply(apacheDinv.multiply(apacheUT)).getData());\n }",
"public Matrix getMatrix() {\n Matrix matrix2 = new Matrix();\n matrix2.set(this.matrix);\n return matrix2;\n }",
"public BufferedImage transpose(BufferedImage img) {\n if (img == null) {\n return null;\n }\n BufferedImage sink = new BufferedImage(img.getHeight(), img.getWidth(), img.getType());\n for (int i = 0; i < img.getHeight(); i++) {\n for (int j = 0; j < img.getWidth(); j++) {\n Color color = new Color(img.getRGB(j, i));\n sink.setRGB(i, j, color.getRGB());\n }\n }\n return sink;\n }",
"protected Matrix symmetrize(Matrix lower) {\r\n Matrix upper = lower;\r\n for(int i = 0; i < upper.getRowCount(); i++) {\r\n int index = i;\r\n upper.getAndSet(i, r -> {\r\n for(int j = index + 1; j < r.length; j++) {\r\n r[j] = lower.get(j, index);\r\n }\r\n });\r\n }\r\n return upper;\r\n }",
"public Transform getRotationTransformation() {\n Transform t = Transform.newXRotation(rotation.x);\n t = t.compose(Transform.newYRotation(rotation.y));\n t = t.compose(Transform.newZRotation(rotation.z));\n return t;\n }",
"public Matrix inverse() {\n\t\tMatrix a = copy();\n\t\tif (a.M != a.N) {\n\t\t\tthrow new RuntimeException(\"This matrix is not square!\");\n\t\t}\n\t\tMatrix i = identity(a.N);\n\t\tMatrix ai = a.augment(i);\n\t\tai = ai.specialrref();\n\t\tMatrix[] split = ai.split(a.N);\n\t\tif (split[0].equals(i)) {\n\t\t\treturn split[1];\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"This matrix is not invertible!\");\n\t\t}\n\t}",
"public static Transform transpose(float a, float c, float tx, float b, float d, float ty) {\n\t\treturn new Transform(a, b, c, d, tx, ty);\n\t}",
"public void rotate(int[][] matrix) {\n int m = matrix.length;\n int n = matrix[0].length;\n if (m != n) {\n return;\n }\n int[][] result = new int[n][n];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n result[i][j] = matrix[n - j - 1][i];\n }\n }\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n matrix[i][j] = result[i][j];\n }\n }\n }",
"public static long[][] rotate(long[][] matrix){\n int n = matrix[0].length;\n\n // We are going from the outside to the inside of the matrix\n for(int layer=0; layer<n/2; layer++){\n\n // The boundaries of the current layer\n int first = layer;\n int last = n - (layer + 1);\n\n // Swap each edge of the layer to the next edge\n for(int j=layer; j<last; j++){\n\n // The offset for the current pixel \n int offset = j - first;\n\n // Save the values of the pixels that will be swapped\n long pixelTop = matrix[first][j];\n long pixelRight = matrix[j][last];\n long pixelBottom = matrix[last][last-offset];\n long pixelLeft = matrix[last-offset][first];\n\n // Swap Top to Right\n matrix[j][last] = pixelTop;\n\n // Swap Right to Bottom\n matrix[last][last-offset] = pixelRight;\n\n // Swap Bottom to Left\n matrix[last-offset][first] = pixelBottom;\n\n // Swap Left to Top\n matrix[first][j] = pixelLeft;\n }\n }\n\n return matrix;\n }",
"public Matrix getMatrix() {\n\t\treturn matrix;\n\t}",
"public E[][] getMatrix() {\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tE[][] matrix = (E[][]) new Object[mColumnCount][mRowCount];\r\n\t\tfor(int i=0; i<mColumnCount; i++)\r\n\t\t\tfor(int j=0; j<mRowCount; j++)\r\n\t\t\t\tmatrix[i][j] = getFromArray(i, j);\r\n\t\treturn matrix;\r\n\t}",
"Matrix timesT( Matrix b )\n {\n return new Matrix( b.timesV(x), b.timesV(y), b.timesV(z) );\n }",
"public int[][] getMatrix(){\n\t\treturn matrix;\n\t}",
"public static Matrix tan(Matrix matrix)\n {\n double[][] M = matrix.getArray();\n int row = matrix.getRowDimension(), col = matrix.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double[][] C = X.getArray();\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n C[i][j] = Math.tan(M[i][j]);\n }\n }\n return X;\n }",
"private static void rotate(int[][] matrix) {\n int rows = matrix.length;\n int cols = matrix[0].length;\n\n for (int[] ints : matrix) {\n reverse(ints, 0, cols - 1);\n }\n\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols - i; j++) {\n swapMatrix(matrix, i, j, cols - 1 - j, rows - 1 - i);\n }\n }\n }",
"private static void rotate(int[][] matrix) {\r\n\t\tfor (int i = 0; i < matrix.length; i++) {\r\n\t\t\tfor (int j = i; j < matrix[0].length; j++) {\r\n\t\t\t\tint temp = 0;\r\n\t\t\t\ttemp = matrix[i][j];\r\n\t\t\t\tmatrix[i][j] = matrix[j][i];//转置,第i行变成第i列\r\n\t\t\t\tmatrix[j][i] = temp;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int i = 0; i < matrix.length; i++) {\r\n\t\t\tfor (int j = 0; j < matrix.length / 2; j++) {\r\n\t\t\t\tint temp = 0;\r\n\t\t\t\ttemp = matrix[i][j];\r\n\t\t\t\tmatrix[i][j] = matrix[i][matrix.length - 1 - j];\r\n\t\t\t\tmatrix[i][matrix.length - 1 - j] = temp;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public static Matrix genTransFunction(Matrix m) {\n\t\tdouble[][] out = new double[m.getNumRows()][m.getNumCols()];\n\t\tfor(int i = 0; i < m.getNumRows(); i++) {\n\t\t\tfor(int j = 0; j < m.getNumCols(); j++) {\n\t\t\t\tif(j == 0) \n\t\t\t\t\tout[i][j] = sumRow(m.getRow(i), i);\n\t\t\t\telse if(j <= i)\n\t\t\t\t\tout[i][j] = m.get(i, i - j);\n\t\t\t\telse\n\t\t\t\t\tout[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(out);\n\t\t\n\t}",
"public AffineTransform getTlm(\n )\n {return tlm;}",
"public NNMatrix transposedMultB(NNMatrix B) {\n NNMatrix C = new NNMatrix(numCols(), B.numCols());\n CommonOps_DDRM.multTransA(((DMatrixRMaj) getMatrix()), (DMatrixRMaj) B.getMatrix(), (DMatrixRMaj) C.getMatrix());\n return C;\n }",
"@Override\n public float[] getRotationMatrix(){\n float[] baseCorrection = Maths.buildRotationMatrix(new float[]{0, 1, 0, 0});\n\n float[] rotationX = {(float) Math.toDegrees(theta), 1, 0, 0};\n float[] rotationY = {(float) -Math.toDegrees(phi), 0, 1, 0};\n\n float[] rotationMatrix = new float[16];\n float[] coreMotionMatrix = Maths.buildRotationMatrix(rotationY, rotationX);\n Matrix.multiplyMM(rotationMatrix, 0, baseCorrection, 0, coreMotionMatrix, 0);\n\n return rotationMatrix;\n }",
"public static Transform inverse(Transform t) {\n\t\tfloat inv_det = 1.0f / (t.a * t.d - t.c * t.b);\n\t\treturn transpose(t.d * inv_det, -t.c * inv_det, (t.c * t.ty - t.tx * t.d) * inv_det, -t.b * inv_det,\n\t\t\t\t\t\t t.a * inv_det, (t.tx * t.b - t.a * t.ty) * inv_det);\n\t}",
"static void rotate(int[][] matrix) {\n int n = matrix.length;\n for (int i = 0; i < (n + 1) / 2; i++) {\n for (int j = 0; j < n / 2; j++) {\n int temp = matrix[n - 1 - j][i];\n matrix[n - 1 - j][i] = matrix[n - 1 - i][n - j - 1];\n matrix[n - 1 - i][n - j - 1] = matrix[j][n - 1 - i];\n matrix[j][n - 1 - i] = matrix[i][j];\n matrix[i][j] = temp;\n }\n }\n }",
"public static <T> String matrixToString(T[][] m) {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i=0; i<m.length; i++) {\n\t\t\tfor (int j=0; j<m[i].length; j++) {\n\t\t\t\tsb.append(m[i][j]);\n\t\t\t\tif (j<m[i].length-1)\n\t\t\t\t\tsb.append(\"\\t\");\n\t\t\t}\n\t\t\tif (i<m.length-1)\n\t\t\t\tsb.append(\"\\n\");\n\t\t}\n\n\t\treturn sb.toString();\n\t}",
"public void rotate(int[][] matrix) {\n if (matrix == null || matrix.length == 0) return;\n int n = matrix.length-1;\n for (int i = 0; i <= n / 2; i++) {\n for (int j = i; j < n; j++) {\n int temp = matrix[i][j];\n matrix[i][j] = matrix[n - j][i];\n matrix[n - j][i] = matrix[n - i][n - j];\n matrix[n - i][n - j] = matrix[j][n - i];\n matrix[j][n - i] = temp;\n }\n }\n }",
"public int[][] turfu() {\r\n\t\tint[][] tab = new int[matrice[0].length][matrice.length]; \r\n\t\tint n =0; \r\n\t\tfor(int i=0; i<tab.length; i++) {\r\n\t\t\tfor(int j=0; j< tab[0].length; j++) {\r\n\t\t\t\ttab[i][j] = matrice[j][n]; \r\n\t\t\t}\r\n\t\t\tn++;\r\n\t\t}\r\n\t\treturn tab; \r\n\t}",
"public double[][][] getMatrix() {\n return matrix;\n }",
"public static void transpose(int[][] myArr2D)\n {\n if(isRect(myArr2D)== false)\n {\n System.out.println(\"The array is not a rectangle\");\n }\n else\n {\n for( int row = 0; row < myArr2D.length; row++)\n { \n for( int col = row; col < myArr2D.length; col++)\n { \n int z = myArr2D[row][col];\n myArr2D[row][col] = myArr2D[col][row];\n myArr2D[col][row] = z;\n }\n }\n }\n }",
"public Matrix asMatrix() {\n Matrix result;\n try {\n result = new Matrix(COMPONENTS, 1);\n asMatrix(result);\n } catch (final WrongSizeException ignore) {\n // never happens\n result = null;\n }\n return result;\n }",
"public String transposeChords() {\n\n\t\t//Tools from parent class\n\t\tArrayList<Integer> transposedChords = new ArrayList<>();\n\t\tChordList chords = new ChordList();\n\t\tString[] chordList = chords.getNotes();\n\t\tint[] scaleMajor = chords.getMajor();\n\t\tint[] scaleMinor = chords.getMinor();\n\n\t\t//custom ASCII table conversion\n\t\tint[] fixedNotes = new int[m_notes.length()];\n\t\tString[] userNotes = m_notes.split(\" \");\n\n\t\tfor(int i = 0; i < m_notes.length(); i++) {\n\t\t\tfixedNotes[i] = chords.noteIndex(userNotes[i]);\n\t\t}\n\n\t\t//Cycle each note in notes passed in by user\n\t\tint cycle = 0;\n\n\t\tfor(int note = 0; note < fixedNotes.length; note++) {\n\n\t\t\tif(cycle >= scaleMajor.length)\n\t\t\t\tcycle = 0;\n\n\t\t\t//Check for type of scale\n\t\t\t//If the scaletype is major\n\t\t\tif(m_scaleType.equals(\"major\")) {\n\n\t\t\t\ttransposedChords.add(fixedNotes[note] + scaleMajor[cycle] - OFFSET);\n\n\t\t\t} else if(m_scaleType.equals(\"minor\")) {\n\n\t\t\t}\n\n\t\t\tcycle++;\n\t\t}\n\n\t\treturn \"Transposed chords in \" + m_scale + \" \" + m_scaleType + \": \" + transposedChords;\n\t}",
"public static Matrix getUpperMatrix(Matrix A) {\n\t\tint size = A.getColumnDimension();\n\t\t\n\t\tdouble[][] u = new double[size][size];\n\t\t\n\t\tfor(int i = 0; i<size; i++){\n\t\t\tfor(int j=0; j < size; j++){\n\t\t\t\tif(j>i) u[i][j] = A.get(i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\tMatrix U = new Matrix(u);\n\t\t\n\t\treturn U;\n\t}",
"public <InnerType extends Matrix> InnerType getMatrix() {\n return (InnerType)mat;\n }",
"private Matrix33d getMatrix() {\n final Matrix33d m = new Matrix33d();\n m.setMatrixColumn(new Vector3d(V1), 0);\n m.setMatrixColumn(new Vector3d(V2), 1);\n m.setMatrixColumn(new Vector3d(V3), 2);\n return m;\n }",
"public ArrayList<ArrayList<T>> getMatrix() {\n\t\treturn matrix;\n\t}",
"public Matrix rotate90Degree() {\n\t\tMatrix rotatedMatrix = new Matrix(this.getHeight(), this.getWidth());\n\t\tfor(int i = 0; i < this.getWidth(); i++) {\n\t\t\tfor(int j = 0; j < this.getHeight(); j++) {\n\t\t\t\trotatedMatrix.setElement(j, (this.getWidth() -1) - i, data[i][j]);\n\t\t\t}\n\t\t}\n\t\tthis.show();\n\t\trotatedMatrix.show();\n\t\treturn rotatedMatrix;\n\t}",
"public int[][] getTransitionMatrix() {\n\t\treturn null;\n\t}",
"public static Transform rigidInverse(Transform t) {\n\t\treturn transpose(t.d, -t.c, (t.c * t.ty - t.tx * t.d), -t.b, t.a, (t.tx * t.b - t.a * t.ty));\n\t}",
"public void rotate(int[][] matrix) {\n int temp, len = matrix.length;\n\n int left = 0, top = 0, right = len-1, bottom = len-1;\n\n while(left < right) {\n for(int i = left; i < right; i++) {\n temp = matrix[top][i];\n matrix[top][i] = matrix[len-1-i][left];\n matrix[len-1-i][left] = matrix[bottom][len-1-i];\n matrix[bottom][len-1-i] = matrix[i][right];\n matrix[i][right] = temp;\n }\n left++;\n right--;\n top++;\n bottom--;\n }\n }",
"public TransformationMatrix() {\n\t\ta11 = 1; a12 = 0; a13 = 0; a14 = 0;\n\t\ta21 = 0; a22 = 1; a23 = 0; a24 = 0;\n\t\ta31 = 0; a32 = 0; a33 = 1; a34 = 0;\n\t}",
"public void rotateMatrix(int[][] matrix) {\n\n int length = matrix[0].length;\n // Rotate each layer of the NxN matrix starting with the outermost one first\n for(int layer = 0;layer < length/2; layer ++) {\n\n for(int i = layer; i < length - 1 - layer;i++) {\n int topLeft = matrix[layer][i];\n\n // topLeft = bottomLeft\n matrix[layer][i] = matrix[length - 1 - layer - i][layer];\n\n // bottomLeft = bottomRight\n matrix[length - 1 - layer - i][layer] = matrix[length - 1 - layer][length - 1 - layer - i];\n\n //bottomRight = topRight\n matrix[length - 1 - layer][length - 1 - layer - i] = matrix[i][length - 1 - layer];\n\n //topRight = topLeft\n matrix[i][length - 1 - layer] = topLeft;\n }\n }\n }",
"public AffineTransform getTm(\n )\n {return tm;}",
"DMatrix3C getRotation();",
"public void rotate(int[][] matrix) {\n if(matrix.length <= 0) {\n return;\n }\n \n int N= matrix.length;\n \n for(int i = 0 ; i < N/2; i++) {\n for(int j = i ; j < N-i-1; j ++) {\n int temp = matrix[i][j];\n matrix[i][j] = matrix[N-1-j][i];\n matrix[N-1-j][i] = matrix[N-1-i][N-1-j];\n matrix[N-1-i][N-1-j] = matrix[j][N-1-i];\n matrix[j][N-1-i] = temp;\n }\n \n }\n }",
"public int[][] getMat() {\n // Note: java has no return read-only so we won't return matrix;\n // b\\c that would expose internal representation. Instead we will\n // copy each row into a new matrix, and return that.\n return Helper.cloneMatrix(matrix);\n }",
"public BufferedImage transpose(String src) {\n return this.transpose(ImportExportImage.importImage(src));\n }",
"@Test\n public void testCreateTranspose1(){\n double[][] a = new double[1][1];\n a[0][0] = Math.random();\n double[][] newA = HarderArrayProblems.createTranspose(a);\n checkTranspose(a, newA);\n }",
"public Matrix getCurrentRotation() throws ManipulatorException;",
"public Estados[][] getMatrix() {\n return matrix;\n }",
"public Matrix getCovarianceMatrix() {\n Matrix m = new Matrix(dimensions, dimensions);\n for (int i = 0; i < dimensions; i++) {\n for (int j = i; j < dimensions; j++) {\n m.set(i, j, getCovariance(i, j));\n if (i != j) {\n m.set(j, i, m.get(i, j)); // This is a symmetric matrix\n }\n }\n }\n\n return m;\n }",
"public static int[][] rotateMatrix270(int[][] matrix) {\n int[][] rotatedMatrix = new int[matrix[0].length][matrix.length];\n for (int i = 0; i < rotatedMatrix.length; i++) {\n for (int j = 0; j < rotatedMatrix[i].length; j++) {\n rotatedMatrix[i][j] = matrix[j][rotatedMatrix.length - 1 - i];\n }\n }\n return rotatedMatrix;\n }"
] | [
"0.83443767",
"0.8224811",
"0.8142469",
"0.79847455",
"0.789271",
"0.7891543",
"0.76862025",
"0.7616344",
"0.7497786",
"0.71647465",
"0.69743866",
"0.695002",
"0.6909547",
"0.68821466",
"0.67412454",
"0.6704758",
"0.65638435",
"0.6534199",
"0.64627266",
"0.64562976",
"0.64329445",
"0.6302867",
"0.60759854",
"0.60734427",
"0.5993239",
"0.59861994",
"0.5899273",
"0.5883582",
"0.58772576",
"0.5809817",
"0.5791275",
"0.5780137",
"0.5755144",
"0.5715606",
"0.56168437",
"0.5604754",
"0.5579565",
"0.5529883",
"0.54909027",
"0.5427375",
"0.53824395",
"0.53644586",
"0.5357766",
"0.5313628",
"0.53013265",
"0.52872336",
"0.5276897",
"0.5264135",
"0.5263971",
"0.5250707",
"0.5250186",
"0.52332765",
"0.52272016",
"0.52163506",
"0.51578104",
"0.51450014",
"0.5121821",
"0.5107613",
"0.5094331",
"0.5090646",
"0.5073604",
"0.5071335",
"0.5060437",
"0.5050969",
"0.504516",
"0.5044809",
"0.50361997",
"0.5030339",
"0.50280935",
"0.500485",
"0.50000226",
"0.4990911",
"0.4977529",
"0.4973227",
"0.49681783",
"0.4962653",
"0.49503282",
"0.49445906",
"0.49271563",
"0.49231926",
"0.4917394",
"0.49136636",
"0.49135083",
"0.48888496",
"0.48830384",
"0.48801473",
"0.4869322",
"0.4867629",
"0.4858416",
"0.48560798",
"0.48495147",
"0.48482934",
"0.48415548",
"0.48406333",
"0.48361695",
"0.4833273",
"0.48261738",
"0.48080313",
"0.48056248",
"0.47686538"
] | 0.7687111 | 6 |
Fills the matrix with random double values between the parameters. | public void randomize(double lowerBound, double upperBound) {
if (lowerBound > upperBound)
return;
Random random = new Random();
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
data[i][j] = random.nextDouble() * (upperBound - lowerBound) + lowerBound;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void initMatrixRandom(DoubleMatrix m){\n\t\tfor(int i = 0; i < m.rows; i++)\n\t\t\tfor(int j = 0; j < m.columns; j++)\n\t\t\t\tm.put(i, j, randomValue());\n\t}",
"private void populateRandom(double[][] matrix, double min, double max) {\n\t\tdouble range = max - min;\n\t\tfor (int i = 0; i < matrix.length; i++) {\n\t\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\t\tmatrix[i][j] = (range * Math.random()) + min;\n\t\t\t}\n\t\t}\n\t}",
"private void initMatrix() {\n\t\ttry {\n\t\t\tRandom random = new Random();\n\t\t\tfor (int row=0; row<_numRows; ++row) {\n\t\t\t\tfor (int column=0; column<_numColumns; ++column) {\n\t\t\t\t\t// generate alive cells, with CHANCE_OF_ALIVE chance\n\t\t\t\t\tboolean value = (random.nextInt(100) < CHANCE_OF_ALIVE);\n\t\t\t\t\t_matrix.setCellValue(row, column, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// This is not supposed to happend because we use only legal row and column numbers\n\t\t}\n\t}",
"public void fill( double val ) {\n try {\n ops.fill(mat, val);\n } catch (ConvertToDenseException e) {\n convertToDense();\n fill(val);\n }\n }",
"public void randomize(final Double[][] d) {\n\t\tfor (int r = 0; r < d.length; r++) {\n\t\t\tfor (int c = 0; c < d[0].length; c++) {\n\t\t\t\td[r][c] = randomize(d[r][c]);\n\t\t\t}\n\t\t}\n\n\t}",
"static void fillWithRandomColors() {\n\n for ( int row = 0; row < ROWS; row++ ) {\n for ( int column = 0; column < COLUMNS; column++ ) {\n changeToRandomColor( row, column );\n }\n }\n }",
"private static DenseMatrix generateRandomMatrix (int rows, int cols, int m_seed){\n\n Random random_value = new Random(m_seed);\n DenseMatrix randomMX = new DenseMatrix(rows, cols);\n for (int i=0; i<rows; i++){\n for (int j=0; j<cols;j++){\n randomMX.set(i,j, random_value.nextDouble());\n }\n }\n return randomMX;\n }",
"public static void generateMatrix() {\r\n Random random = new Random();\r\n for (int i = 0; i < dim; i++)\r\n {\r\n for (int j = 0; j < dim; j++)\r\n {\r\n if (i != j)\r\n \r\n adjacencyMatrix[i][j] = I; \r\n }\r\n }\r\n for (int i = 0; i < dim * dim * fill; i++)\r\n {\r\n adjacencyMatrix[random.nextInt(dim)][random.nextInt(dim)] =\r\n random.nextInt(maxDistance + 1);\r\n }\r\n \r\n\r\n\r\n \r\n //print(adjacencyMatrix);\r\n \r\n \r\n //This makes the main matrix d[][] ready\r\n for (int i = 0; i < dim; i++) {\r\n for (int j = 0; j < dim; j++)\r\n {\r\n d[i][j] = adjacencyMatrix[i][j];\r\n if (i == j)\r\n {\r\n d[i][j] = 0;\r\n }\r\n }\r\n }\r\n }",
"public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}",
"public void randomize(final double[][] d) {\n\t\tfor (int r = 0; r < d.length; r++) {\n\t\t\tfor (int c = 0; c < d[0].length; c++) {\n\t\t\t\td[r][c] = randomize(d[r][c]);\n\t\t\t}\n\t\t}\n\n\t}",
"public abstract void initiateRandomCells(double probabilityForEachCell);",
"private void setWeightsUniformly(RandomDataImpl rnd, double eInit) {\n\t\tfor (int i = 0; i < weights.length; i++) {\t\t\n\t\t\tweights[i] = rnd.nextUniform(-eInit, eInit);\n\t\t}\n\t}",
"public void randomize(final Matrix m) {\n\t\tfinal double[][] d = m.getData();\n\t\tfor (int r = 0; r < m.getRows(); r++) {\n\t\t\tfor (int c = 0; c < m.getCols(); c++) {\n\t\t\t\td[r][c] = randomize(d[r][c]);\n\t\t\t}\n\t\t}\n\t}",
"public void randomize(final Double[] d) {\n\t\tfor (int i = 0; i < d.length; i++) {\n\t\t\td[i] = randomize(d[i]);\n\t\t}\n\t}",
"public void randomize(final double[] d) {\n\t\tfor (int i = 0; i < d.length; i++) {\n\t\t\td[i] = randomize(d[i]);\n\t\t}\n\n\t}",
"public static void fillTheForest() {\n int x = (int)(Math.random() * SIZE);\n int y = (int)(Math.random() * SIZE);\n for (int i = 0; i < SIZE; i++) {\n for (int j = 0; j < SIZE; j++) {\n if (i == x && j == y){\n forest[i][j] = 1;\n } else {\n forest[i][j] = 0;\n }\n }\n }\n }",
"private void generateRealizations() {\n\t\t// lastTime + 1 rows because the first hosts the initial value\n\t\trealizations = new double[lastTime + 1][numberOfSimulations];\n\t\tgenerateUpsAndDowns();// will be called only once\n\t\t// a first for loop the fill the first row\n\t\tfor (int simulationIndex = 0; simulationIndex < numberOfSimulations; simulationIndex++) {\n\t\t\trealizations[0][simulationIndex] = initialValue;\n\t\t}\n\t\t// double for loop for the realizations. We start from time 1\n\t\tfor (int timeIndex = 1; timeIndex <= lastTime; timeIndex++) {\n\t\t\tfor (int simulationIndex = 0; simulationIndex < numberOfSimulations; simulationIndex++) {\n\t\t\t\trealizations[timeIndex][simulationIndex] = realizations[timeIndex - 1][simulationIndex]\n\t\t\t\t\t\t* upsAndDowns[timeIndex - 1][simulationIndex];\n\t\t\t\t// S(i+1)=S(i)M(I)\n\t\t\t}\n\t\t}\n\t}",
"public void fillMatrix(int row, int col, double value){\n arr[row][col] = value;\n }",
"private static double[][] populateXMatrix(ArrayList<Double> _xValues)\n {\n // convert from Double to double\n xInputValues = new double[_xValues.size()];\n Iterator<Double> iterator = _xValues.iterator();\n int i = 0;\n while(iterator.hasNext())\n {\n xInputValues[i] = iterator.next().doubleValue();\n i++;\n }\n\n // double[][] to use to construct Matrix Object\n double[][] XArray = new double[d+1][d+1];\n for(int c = 0; c < XArray.length; c++)\n {\n for(int r = c; r < XArray[c].length; r++) // Using r = c doubles efficiency\n {\n XArray[r][c] = XArray[c][r] = SumX(2*d-r-c, xInputValues);\n }\n }\n return XArray;\n }",
"public double Generate(double[] par);",
"public void randomize() {\n\t\tx = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t\ty = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t}",
"@Override\n\tpublic void\n\tfill( double value )\n\t{\n\t\tdata[0] = data[1] = data[2] = value;\n\t}",
"public static void main (String[] args) {\n double[][] matrix = new double[25][25];\n for (int i = 0; i < matrix.length; i++) { //Vertical matrix (y-akse)\n for (int j = 0; j < matrix[i].length; j++) { //Horizontal matrix (x-akse)\n // Math.random gives at random number between 0 and 1\n // (int)(Math.random() * ((upperbound - lowerbound) + 1) + lowerbound); \n // Generate a random numbers between 50 and 100 \n matrix[i][j] = (int)(Math.random() * ((100 - 50) + 1) + 50);\n }\n } \n min(matrix);\n \n }",
"public double[] newstater (){\r\n double[] styles = new double[Config.numberOfSeeds];\r\n for(int iii=0; iii < Config.numberOfSeeds; iii++)\r\n {\r\n Random randomr = new Random();\r\n styles[iii] = 0 + (5 - 0) * randomr.nextDouble();\r\n// RandGenerator.randDouble(0, 5);\r\n }\r\n return styles;\r\n }",
"private void init() {\r\n\t\tx = (float) (Math.random() * 2 - 1);\r\n\t\ty = (float) (Math.random() * 2 - 1);\r\n\t\tz[0] = (float) (Math.random() * 3f);\r\n\t\tz[1] = z[0];\r\n\t}",
"static void initValues()\n\t // Initializes the values array with random integers from 0 to 99.\n\t {\n\t Random rand = new Random();\n\t for (int index = 0; index < SIZE; index++)\n\t values[index] = Math.abs(rand.nextInt(100001));\n\t for (int i = 0; i < RANDSAMP; i++)\n\t \tvalues2[i] = values[Math.abs(rand.nextInt(SIZE+1))]; \n\t }",
"void fillMatrixFromQuaternion(DoubleBuffer matrix, double m_x, double m_y, double m_z, double m_w)\n\t{\t\t\n\t\t// First row\n\t\tmatrix.put(1.0 - 2.0 * ( m_y * m_y + m_z * m_z ));\n\t\tmatrix.put(2.0 * (m_x * m_y + m_z * m_w));\n\t\tmatrix.put(2.0 * (m_x * m_z - m_y * m_w));\n\t\tmatrix.put(0.0);\n\t\t\n\t\t// Second row\n\t\tmatrix.put(2.0 * ( m_x * m_y - m_z * m_w ));\n\t\tmatrix.put(1.0 - 2.0 * ( m_x * m_x + m_z * m_z ));\n\t\tmatrix.put(2.0 * (m_z * m_y + m_x * m_w ));\n\t\tmatrix.put(0.0);\n\n\t\t// Third row\n\t\tmatrix.put(2.0 * ( m_x * m_z + m_y * m_w ));\n\t\tmatrix.put(2.0 * ( m_y * m_z - m_x * m_w ));\n\t\tmatrix.put(1.0 - 2.0 * ( m_x * m_x + m_y * m_y ));\n\t\tmatrix.put(0.0);\n\n\t\t// Fourth row\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(1.0);\n\t\t\n\t\tmatrix.flip();\n\t}",
"public Double generateRow() {\n return leftLimit + new Random().nextDouble() * (this.rightLimit - this.leftLimit);\r\n }",
"private static double[] randomDoubles(int elements) {\n double[] array = new double[elements];\n for (int i = 0; i < array.length; i++) {\n double chance = Math.random();\n if (chance < 0.25) \n array[i] = Math.random() * (1000);\t\n else if (chance <= 0.50)\n array[i] = Math.random() * (1001);\t\n else if (chance <= 0.75)\n array[i] = Math.random() * (1002);\n else\n array[i] = Math.random() * (1003);\t\n }\n return array;\n }",
"public static Matrix random(int m, int n) {\n Matrix A = new Matrix(m,n);\n double[][] X = A.getArray();\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n X[i][j] = Math.random();\n }\n }\n return A;\n }",
"public static int[][] randomMatrix(int Height, int Width){\n //height and width are inputs in main\n //name matrix that will be returned\n int[][] A=new int[Height][Width]; //A with dimensions of input\n \n //for loops to assign values\n for(int i=0; i<Height; i++){\n //another for loop for member arrays\n for(int k=0; k<Width; k++){\n //random ints\n int val=(int)(Math.random()*11);\n //this makes val between 0 and 10\n int sign=(int)(Math.random()*2);\n //use if to make it positive or negative\n if(sign==1){\n //nothing happens and val stays the same\n }\n else{\n val*=-1;\n //makes it a fifty fifty chance to be negative\n }\n A[i][k]=val;\n //assigns that place\n \n }//end of inner for loop\n \n }//end of outer loop\n\n return A;\n }",
"public void genRand(int n) {\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < n; j++) {\n\t\t\t\tm[i][j] = rand.nextInt(10);\n\t\t\t}\n\t\t}\n\t}",
"public static SimpleMatrix random_DDRM( int numRows, int numCols, double minValue, double maxValue, Random rand ) {\n SimpleMatrix ret = new SimpleMatrix(numRows, numCols);\n RandomMatrices_DDRM.fillUniform((DMatrixRMaj)ret.mat, minValue, maxValue, rand);\n return ret;\n }",
"public void fillBoard() {\n List<Integer> fifteen = ArrayUtils.intArrayToList(SOLVED_BOARD);\n Collections.shuffle(fifteen, this.random);\n this.emptyTileIndex = fifteen.indexOf(0);\n this.matrix = fifteen.stream().mapToInt(i -> i).toArray();\n }",
"private void initializeStateWithRandomValues(Assignment x, List<RandomVariable> Z){\n for (RandomVariable Zi: Z){\n Object randomValue = Zi.getDomain().get(new Random().nextInt(Zi.getDomain().size()));\n x.set(Zi, randomValue);\n\n }\n }",
"public void setRandomValues(float avg, float distr) {\n\t\tfor(int i = 0; i < size; i++)\n\t\t\tvector[i] = avg+MathUtils.randomTriangular()*distr;\n\t}",
"public void fill() \n\t{\n\t\tfilled++; //increment load factor\n\t\tloadFactor = ((double)filled / (double)length);\n\t\tif (loadFactor > minLoadFactor) { //if load factor surpass a predetermined threshold\n\t\t\tdoubleTable(); //double the table\n\t\t}\t\n\t}",
"static private double[][] initMatrix(double[][] c) {\n final int N = c.length;\n final double value = 1 / Math.sqrt(2.0);\n\n for (int i = 1; i < N; i++) {\n for (int j = 1; j < N; j++) {\n c[i][j] = 1;\n }\n }\n\n for (int i = 0; i < N; i++) {\n c[i][0] = value;\n c[0][i] = value;\n }\n c[0][0] = 0.5;\n return c;\n }",
"public void fillVector(){\n int n = min.length;\n for (int i = 0; i < n; i++) {\n this.x[i] = min.x[i] + (max.x[i] - min.x[i])*rn.uniformDeviate();\n }\n }",
"public void randomize(List<CellIndex> cellIndices) {\r\n Random rand = new Random();\r\n int range = getUpperBound() - getLowerBound();\r\n for (CellIndex cellIndex : cellIndices) {\r\n int row = cellIndex.row;\r\n int col = cellIndex.col;\r\n double value = (rand.nextDouble() * range) + getLowerBound();\r\n setLogicalValue(row, col, value, false);\r\n }\r\n fireTableDataChanged();\r\n }",
"private void fill() {\n\t\tseries1.clear();\n\t\tint m = 50;\n\t\tdouble tmpX, tmpZ;\n\n\t\tfor (double x=-m; x <= +m; x++) {\n\t\t\ttmpX = MathUtils.sqr(x/30);\n\t\t\tfor (double z=-m; z <= +m; z++) {\n\t\t\t\ttmpZ = MathUtils.sqr(z/30);\n\t\t\t\ttmpZ = Math.sqrt(tmpX+tmpZ);\n\t\t\t\tseries1.add(x, 4*Math.cos(3*tmpZ)*Math.exp(-0.5*tmpZ), z);\n\t\t\t}\n\t\t}\n\t }",
"public void randomize(final float[][] f) {\n for (int r = 0; r < f.length; r++) {\n for (int c = 0; c < f[0].length; c++) {\n f[r][c] = randomize();\n }\n }\n }",
"private void fillRandomEmptyCell(int value, PredatorPreyCell cell, Grid<Integer> grid) {\n\t\tRandom r = new Random();\n\t\tPredatorPreyCell randCell = getEmptyCells(grid).get(r.nextInt(getEmptyCells(grid).size()));\n\t\tswap(cell, randCell);\n\t}",
"private void prepare(Maze maze) {\n\t\tList<Coordinate> unlockedCells = new ArrayList<>();\n\t\tfor (int a=0; a<data.length; a++) \n\t\t\tfor (int b=0; b<data[0].length; b++) \n\t\t\t\tif (data[a][b]) maze.buildWall(a, b); else unlockedCells.add(new Coordinate(a, b));\n\t\tif (!unlockedCells.isEmpty()) {\n\t\t\tRandom r = new Random();\n\t\t\tSupplier<Coordinate> randomCoordinate = () -> unlockedCells.get(r.nextInt(unlockedCells.size()));\n\t\t\tmaze.setStart( randomCoordinate.get() );\n\t\t\tmaze.setGoal( randomCoordinate.get() );\n\t\t}\n\t}",
"public void setNewWeights(boolean clearWeights) {\n Random randomEngine = new Random();\n if (clearWeights) {\n for (int i = 0; i <= inputs; ++i) {\n weights[i] = 0.0;\n exWeights[i] = 0.0;\n changes[i] = 0.0;\n }\n }\n else {\n for (int i = 0; i <= inputs; ++i) {\n weights[i] = randomEngine.nextDouble() - 0.5;\n exWeights[i] = 0.0;\n changes[i] = 0.0;\n }\n }\n }",
"Matrix(){\n matrixVar = new double[1][1];\n rows = 1;\n columns = 1;\n }",
"public static void step(int[][] grid) {\n\n int[][] temp = new int[grid.length][grid[0].length];\n copy2DArray(grid, temp);\n\n ArrayList<int[]> emptyCells = getEmptyCellCoords(grid);\n ArrayList<int[]> dissatisfiedCells = getDissatisfiedCellCoords(grid);\n\n for (int i = 0; i < dissatisfiedCells.size(); i++) {\n if (emptyCells.isEmpty()) break;\n\n int[] cellLoc = dissatisfiedCells.get(i);\n int randIndex = (int)(Math.random() * (emptyCells.size() - 1));\n int[] emptyLoc = emptyCells.get(randIndex);\n\n temp[emptyLoc[0]][emptyLoc[1]] = grid[cellLoc[0]][cellLoc[1]];\n emptyCells.remove(randIndex);\n emptyCells.add(randIndex, cellLoc);\n\n temp[cellLoc[0]][cellLoc[1]] = 0;\n }\n\n copy2DArray(temp, grid);\n }",
"public static void initTwoD(int[][] array) {\n System.out.println(\"Entering random numbers in matrix of \" + array.length + \" rows and \" + array[0].length + \" columns: \");\n for (int row = 0; row < array.length; row++) {\n for (int column = 0; column < array[0].length; column++) {\n array[row][column] = (int) (Math.random() * 100);\n }\n }\n\n }",
"public static void shuffle(double[] a) {\r\n int N = a.length;\r\n for (int i = 0; i < N; i++) {\r\n int r = i + uniform(N-i); // between i and N-1\r\n double temp = a[i];\r\n a[i] = a[r];\r\n a[r] = temp;\r\n }\r\n }",
"private void makeInitial(){\r\n for (int row = 0; row < 9; row++)\r\n System.arraycopy(solution[row], 0, initial[row], 0, 9);\r\n List<Position> fields = new ArrayList<Position>();\r\n for (int row = 0; row < 9; row++)\r\n for (int col = 0; col < 9; col++)\r\n fields.add(new Position(row, col));\r\n Collections.shuffle(fields);\r\n for (int index = 0; index < 40; index ++)\r\n initial[fields.get(index).row][fields.get(index).col] = 0;\r\n }",
"public static int[][] generateMatrix() {\n int rowsCount = RANDOM.nextInt( MAX_ROWS_COUNT ) + 1;\n int[][] result = new int[rowsCount][];\n for (int i = 0; i < rowsCount; i++) {\n result[i] = new int[RANDOM.nextInt( MAX_COLUMNS_COUNT ) + 1];\n fillArray( result[i] );\n }\n return result;\n }",
"public void generateMatrix() {\n\n flow = new int[MATRIX_TAM][MATRIX_TAM];\n loc = new int[MATRIX_TAM][MATRIX_TAM];\n\n for (int i = 0; i < MATRIX_TAM; i++) {\n for (int j = 0; j < MATRIX_TAM; j++) {\n\n //fill the distances matrix\n if (i != j) {\n loc[i][j] = rn.nextInt(MAX_DISTANCE - MIN_DISTANCE + 1) + MIN_DISTANCE;\n } else {\n loc[i][j] = 0;\n }\n\n //fill the flow matrix\n if (i != j) {\n flow[i][j] = rn.nextInt(MAX_FLOW - MIN_FLOW + 1) + MIN_FLOW;\n } else {\n flow[i][j] = 0;\n }\n\n }\n }\n\n }",
"public void agregarVidaLogica(){\n int numvida = tam * tam;\n numvida*=0.05;\n System.out.println(numvida);\n for(int i=0;i<numvida;i++){\n int x= (int)(Math.random()*tam);\n int y= (int)(Math.random()*tam);\n if(matriz[y][x]!=2 && matriz[y][x]!=1){\n matriz[y][x]=4;\n }\n }\n }",
"public abstract void initCell(\r\n int row,\r\n int col,\r\n double valueToInitialise);",
"public void setSeed(ArrayList<Cell> newSeed) {\n\t\n\t\t for (int y=0;y<MAX_Y;y++) {\n\t\t\tfor (int x=0;x<MAX_X;x++) {\n\t\t\t\tseed[x][y] = new Cell(x,y,false);\t\t \n\t\t\t}//end for x\n\t\t }//end for y\n\t\t \n\t\t for (int k=0; k<newSeed.size();k++) {\n\t\t\t int x1 = Math.abs(newSeed.get(k).getX()) % MAX_X;\n\t\t\t int y1 = Math.abs(newSeed.get(k).getY()) % MAX_Y;\n\t\t\t \n\t\t\t seed[x1][y1] = newSeed.get(k);\n\t\t }//end for k\n\t\t repaint(); //repaint's the grid with new generation\n\t\t updateUI();\n\t }",
"public static void shuffle( double[] a ) {\n int N = a.length;\n \n for ( int i = 0; i < N; i++ ) {\n int r = i + uniform( N - i ); // between i and N-1\n double temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }",
"private void fillAll() {\n this.fill_M0();\n this.fill_W();\n this.fill_C();\n }",
"public double simulate(){\n\t\tdouble r = Math.sqrt(-2 * Math.log(Math.random()));\n\t\tdouble theta = 2 * Math.PI * Math.random();\n\t\treturn Math.exp(location + scale * r * Math.cos(theta));\n\t}",
"public Matrix() {\n matrix = new double[DEFAULT_SIZE][DEFAULT_SIZE];\n }",
"public void step()\n {\n\t int rows = grid.length-1;\n\t int cols = grid[0].length-1;\n\t int direction = (int) (Math.random()*3);\n\t direction--;\n\t int row = (int) (Math.random()*rows);\n\t //System.out.println(row);\n\t int col = (int) (Math.random()*cols);\n\t //System.out.println(col);\n\t if(grid[row][col] == SAND && (grid[row+1][col] == EMPTY || grid[row+1][col] == WATER)) {\n\t\t grid[row+1][col] = SAND;\n\t\t grid[row][col] = EMPTY;\n\t }\n\t if(grid[row][col] == WATER && grid[row+1][col] == EMPTY) {\n\t\t if(col != 0) {\n\t\t\t grid[row+1][col+direction] = WATER;\n\t\t\t grid[row][col] = EMPTY;\n\t\t }\n\t\t else {\n\t\t\t grid[row+1][col] = WATER;\n\t\t\t grid[row][col] = EMPTY;\n\t\t }\n\t }\n }",
"public void permutate(double[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }",
"public static double doubleSample() {\n return random_.nextDouble();\n }",
"protected void initializeUniformWeight() {\n\n if(CrashProperties.fitnessFunctions.length == 2){\n for (int n = 0; n < populationSize; n++) {\n double a = 1.0 * n / (populationSize - 1);\n lambda[n][0] = a;\n lambda[n][1] = 1 - (a);\n }\n }else {\n for (int n = 0; n < populationSize; n++) {\n double a = 1.0 * n / (populationSize - 1);\n lambda[n][0] = a;\n lambda[n][1] = (1 - (a))/2;\n lambda[n][2] = (1 - (a))/2;\n }\n }\n\n }",
"public void setCoords() \r\n {\r\n \tthis.coordX = rand.nextInt(10);\r\n \tthis.coordY = rand.nextInt(10);\r\n }",
"public static void main(String[] args) {\n \tRandom m = new Random();\r\nint [][] dArray = new int[3][3];\r\n // 2. use two for loops to set all the elements in the 2D array to\r\n // a different integer\r\n // BE SURE TO USE THE ARRAY'S length VARIABLE\r\n for (int i = 0; i < dArray.length; i++) {\r\n \tfor (int j = 0; j < dArray[i].length; j++) {\r\n\t\t\t\tdArray[i][j] = m.nextInt(9)+1;\r\n\t\t\t}\r\n\t\t}\r\n // 3. print the third element from the second 1D array (2DArray[1][2])\r\nSystem.out.println(dArray[1][2]);\r\n // 4. set the third element from the second 1D array to a different\r\n // value\r\ndArray[1][2] = 10;\r\n // 5. print the element again and verify the value has changed\r\nSystem.out.println(dArray[1][2]);\r\n }",
"protected abstract void setValues(double[] values);",
"public static double[] randDouble(int col, double min, double max) {\n\t rvDouble = new double[col];\n\t for (int i = 0; i < col ; i++) {\n\t\t double randNum = min + (Math.random() * ((max - min) + 1));\n\t\t double roundedRandNum = (double) Math.round(randNum * 100) / 100;\n\t\t rvDouble[i] = roundedRandNum ;\n\t\t }\n\t //for (double lng : RV_array) {System.out.println(lng);} // for\n\t return rvDouble;\n\t }",
"public void populate(int xinitial, int yinitial, int xfinal, int yfinal) {\n \r\n if (yinitial > yfinal) { //if the initial point is lower than the final point\r\n int temp = yinitial; //swap the y values\r\n yinitial = yfinal;\r\n yfinal = temp;\r\n }\r\n if (xinitial > xfinal) { //if the initial point is to the right of the final point\r\n int temp = xinitial; //swap the x values\r\n xinitial = xfinal;\r\n xfinal = temp;\r\n }\r\n for (int i = xinitial; i < xfinal; i++) { //go through the area (where the initial point is top left and final point is bottom right) \r\n for (int j = yinitial; j < yfinal; j++) {\r\n int random = r.nextInt(100);\r\n if (random<85){ //make 85% of the grid populated by setting values to true\r\n grid[i][j] = true;\r\n }\r\n }\r\n }\r\n }",
"private void populate ()\n\t{\n\t\t//create a random object\n\t\tRandom rand = new Random(); \n\t\t//for loop for row\n\t\tfor (int row =0; row < currentVersion.length; row++)\n\t\t{\t//for loop for column\n\t\t\tfor(int column = 0; column < currentVersion[row].length; column++)\n\t\t\t{\n\t\t\t\t//assign byte values from [0 to state-1] into array\n\t\t\t\tcurrentVersion[row][column] = (byte) rand.nextInt((this.state-1));\n\t\t\t}\n\t\t}\n\t}",
"static void fillArray(int[] array) {\n\t\tint i = 0;\r\n\t\tint number = 1;\r\n\t\twhile (i < array.length) {\r\n\t\t\tif ((int) Math.floor(Math.random() * Integer.MAX_VALUE) % 2 == 0) {\r\n\t\t\t\tnumber = number + (int) Math.floor(Math.random() * 5);\r\n\t\t\t\tarray[i] = number;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tnumber++;\r\n\t\t\t\tarray[i] = number;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}",
"public static double random() {\r\n return uniform();\r\n }",
"public double getRandom(){\n\t\treturn random.nextDouble();\n\t}",
"private double[] generateRandomCoordinates() {\n return generateRandomCoordinates(CoordinateDomain.GEOGRAPHIC, 0.05f);\n }",
"public int[] fillDatabase()\n {\n int [] db = new int [20];\n \n \n for (int i = 0; i < db.length; i++)\n {\n db[i] = new java.util.Random().nextInt(25);\n }\n return db;\n }",
"public void fillWith ( float value)\n {\n for (int i = 0; i < getDimX(); i++) {\n for (int y = 0; y < getDimY(); y++) {\n m_grid[i][y] = value;\n }\n }\n }",
"private double randn(){\r\n\t\t//* http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html\r\n\t\t//RandomNumber rnd = new RandomNumber(System.currentTimeMillis());\r\n\t\t//return rnd.normal();\r\n\t\treturn rnd.nextGaussian();\r\n\t\t//return 0;\r\n\t}",
"private void fillMas() { //the method created\r\n\r\n for (int i = 0; i < mas.length; i++) {\r\n mas[i] = (int) (Math.random() * 100); //massive filled with random numbers\r\n System.out.print(mas[i] + \" \"); //massive elements printed\r\n }\r\n System.out.print(\"- this is unsorted massive\");\r\n }",
"Seed(){\r\n seedCells = new ArrayList<>();\r\n edgeCells = new ArrayList<>();\r\n }",
"private static Integer[][] createRandomStart(Integer dimension) {\n Integer[][] startmatrix = new Integer[dimension][dimension];\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n startmatrix[i][j] = (int)(Math.random() * 2);\n }\n }\n return startmatrix;\n }",
"public void init( int pointDimension, long randomSeed );",
"@Test\n\tpublic void testCreateRowForceNormalDuplicate() {\n\t\tSystem.out.println(\"testCreateRowForceNormalDuplicate\");\n\t\tArrayList<String> rows = new ArrayList<>();\n\t\tArrayList<String> cols = new ArrayList<>();\n\n\t\trows.add(\"row1\");\n\t\trows.add(\"row2\");\n\t\trows.add(\"row3\");\n\t\trows.add(\"row4\");\n\n\t\tcols.add(\"col1\");\n\t\tcols.add(\"col2\");\n\t\tcols.add(\"col3\");\n\t\tcols.add(\"col4\");\n\t\tcols.add(\"col5\");\n\n\t\tDoubleMatrixDataset dataset = new DoubleMatrixDataset(rows, cols);\n\n\t\tdataset.setElementQuick(0, 0, 1);\n\t\tdataset.setElementQuick(0, 1, 2);\n\t\tdataset.setElementQuick(0, 2, 3);\n\t\tdataset.setElementQuick(0, 3, 4);\n\t\tdataset.setElementQuick(0, 4, 5);\n\n\t\tDoubleMatrixDataset datasetForNormal = dataset.createRowForceNormalDuplicate();\n\n//\t\tSystem.out.println(datasetForNormal.getElementQuick(0, 0));\n//\t\tSystem.out.println(datasetForNormal.getElementQuick(0, 1));\n//\t\tSystem.out.println(datasetForNormal.getElementQuick(0, 2));\n//\t\tSystem.out.println(datasetForNormal.getElementQuick(0, 3));\n//\t\tSystem.out.println(datasetForNormal.getElementQuick(0, 4));\n//\t\t\n\t\tassertEquals(datasetForNormal.getElementQuick(0, 0), 0.9736890569622489, 0.000001);\n\t\tassertEquals(datasetForNormal.getElementQuick(0, 4), 5.0263109430377515, 0.000001);\n\n\t}",
"void randomize(int i, int j) {\r\n\t\tfor (int k = 0; k < (j - i + 1); k++) {\r\n\t\t\trndSwapTwo(i, j);\r\n\t\t}\r\n\t\tthis.distance = distance();\r\n\t}",
"@Override\r\n\tpublic void initialize() {\n\t\tRandom randomGenerator = new Random();\r\n\t\tthis.size = Helper.getRandomInRange(1, 9, randomGenerator);\r\n\t\tif (this.size % 2 == 0)\r\n\t\t\tthis.size--;\r\n\t}",
"public void setRandomSpawn(final Random random)\r\n {\r\n final List<Double> rows = new ArrayList<>();\r\n \r\n final double column;\r\n \r\n //get a random true/false result\r\n if (random.nextBoolean())\r\n {\r\n //here we will do west\r\n column = 0.5;\r\n }\r\n else\r\n {\r\n //here we will do east\r\n column = COLUMNS - 0.5;\r\n }\r\n \r\n for (double row=0; row < ROWS; row++)\r\n {\r\n //if platform exists add this as a possibility\r\n if (getObject(Type.Platform, (int)column, row) != null)\r\n rows.add(row);\r\n }\r\n \r\n super.setCol(column);\r\n \r\n final int index = random.nextInt(rows.size());\r\n super.setRow(rows.get(index) + 0.5);\r\n }",
"protected void rebuildRateMatrix(double[][] rate, double[] parameters)\t{\n // Q matrix\n rate[0][1] = 0.610810; rate[0][2] = 0.569079;\n rate[0][3] = 0.821500; rate[0][4] = 1.141050;\n rate[0][5] = 1.011980; rate[0][6] = 1.756410;\n rate[0][7] = 1.572160; rate[0][8] = 0.354813;\n rate[0][9] = 0.219023; rate[0][10] = 0.443935;\n rate[0][11] = 1.005440; rate[0][12] = 0.989475;\n rate[0][13] = 0.233492; rate[0][14] = 1.594890;\n rate[0][15] = 3.733380; rate[0][16] = 2.349220;\n rate[0][17] = 0.125227; rate[0][18] = 0.268987;\n rate[0][19] = 2.221870;\n\n rate[1][2] = 0.711690; rate[1][3] = 0.165074;\n rate[1][4] = 0.585809; rate[1][5] = 3.360330;\n rate[1][6] = 0.488649; rate[1][7] = 0.650469;\n rate[1][8] = 2.362040; rate[1][9] = 0.206722;\n rate[1][10] = 0.551450; rate[1][11] = 5.925170;\n rate[1][12] = 0.758446; rate[1][13] = 0.116821;\n rate[1][14] = 0.753467; rate[1][15] = 1.357640;\n rate[1][16] = 0.613776; rate[1][17] = 1.294610;\n rate[1][18] = 0.423612; rate[1][19] = 0.280336;\n\n rate[2][3] = 6.013660; rate[2][4] = 0.296524;\n rate[2][5] = 1.716740; rate[2][6] = 1.056790;\n rate[2][7] = 1.253910; rate[2][8] = 4.378930;\n rate[2][9] = 0.615636; rate[2][10] = 0.147156;\n rate[2][11] = 3.334390; rate[2][12] = 0.224747;\n rate[2][13] = 0.110793; rate[2][14] = 0.217538;\n rate[2][15] = 4.394450; rate[2][16] = 2.257930;\n rate[2][17] = 0.078463; rate[2][18] = 1.208560;\n rate[2][19] = 0.221176;\n\n rate[3][4] = 0.033379; rate[3][5] = 0.691268;\n rate[3][6] = 6.833400; rate[3][7] = 0.961142;\n rate[3][8] = 1.032910; rate[3][9] = 0.043523;\n rate[3][10] = 0.093930; rate[3][11] = 0.533362;\n rate[3][12] = 0.116813; rate[3][13] = 0.052004;\n rate[3][14] = 0.472601; rate[3][15] = 1.192810;\n rate[3][16] = 0.417372; rate[3][17] = 0.146348;\n rate[3][18] = 0.363243; rate[3][19] = 0.169417;\n\n rate[4][5] = 0.109261; rate[4][6] = 0.023920;\n rate[4][7] = 0.341086; rate[4][8] = 0.275403;\n rate[4][9] = 0.189890; rate[4][10] = 0.428414;\n rate[4][11] = 0.083649; rate[4][12] = 0.437393;\n rate[4][13] = 0.441300; rate[4][14] = 0.122303;\n rate[4][15] = 1.560590; rate[4][16] = 0.570186;\n rate[4][17] = 0.795736; rate[4][18] = 0.604634;\n rate[4][19] = 1.114570;\n\n rate[5][6] = 6.048790; rate[5][7] = 0.366510;\n rate[5][8] = 4.749460; rate[5][9] = 0.131046;\n rate[5][10] = 0.964886; rate[5][11] = 4.308310;\n rate[5][12] = 1.705070; rate[5][13] = 0.110744;\n rate[5][14] = 1.036370; rate[5][15] = 1.141210;\n rate[5][16] = 0.954144; rate[5][17] = 0.243615;\n rate[5][18] = 0.252457; rate[5][19] = 0.333890;\n\n rate[6][7] = 0.630832; rate[6][8] = 0.635025;\n rate[6][9] = 0.141320; rate[6][10] = 0.172579;\n rate[6][11] = 2.867580; rate[6][12] = 0.353912;\n rate[6][13] = 0.092310; rate[6][14] = 0.755791;\n rate[6][15] = 0.782467; rate[6][16] = 0.914814;\n rate[6][17] = 0.172682; rate[6][18] = 0.217549;\n rate[6][19] = 0.655045;\n\n rate[7][8] = 0.276379; rate[7][9] = 0.034151;\n rate[7][10] = 0.068651; rate[7][11] = 0.415992;\n rate[7][12] = 0.194220; rate[7][13] = 0.055288;\n rate[7][14] = 0.273149; rate[7][15] = 1.486700;\n rate[7][16] = 0.251477; rate[7][17] = 0.374321;\n rate[7][18] = 0.114187; rate[7][19] = 0.209108;\n\n rate[8][9] = 0.152215; rate[8][10] = 0.555096;\n rate[8][11] = 0.992083; rate[8][12] = 0.450867;\n rate[8][13] = 0.756080; rate[8][14] = 0.771387;\n rate[8][15] = 0.822459; rate[8][16] = 0.525511;\n rate[8][17] = 0.289998; rate[8][18] = 4.290350;\n rate[8][19] = 0.131869;\n\n rate[9][10] = 3.517820; rate[9][11] = 0.360574;\n rate[9][12] = 4.714220; rate[9][13] = 1.177640;\n rate[9][14] = 0.111502; rate[9][15] = 0.353443;\n rate[9][16] = 1.615050; rate[9][17] = 0.234326;\n rate[9][18] = 0.468951; rate[9][19] = 8.659740;\n\n rate[10][11] = 0.287583; rate[10][12] = 5.375250;\n rate[10][13] = 2.348200; rate[10][14] = 0.462018;\n rate[10][15] = 0.382421; rate[10][16] = 0.364222;\n rate[10][17] = 0.740259; rate[10][18] = 0.443205;\n rate[10][19] = 1.997370;\n\n rate[11][12] = 1.032220; rate[11][13] = 0.098843;\n rate[11][14] = 0.619503; rate[11][15] = 1.073780;\n rate[11][16] = 1.537920; rate[11][17] = 0.152232;\n rate[11][18] = 0.147411; rate[11][19] = 0.342012;\n\n rate[12][13] = 1.320870; rate[12][14] = 0.194864;\n rate[12][15] = 0.556353; rate[12][16] = 1.681970;\n rate[12][17] = 0.570369; rate[12][18] = 0.473810;\n rate[12][19] = 2.282020;\n\n rate[13][14] = 0.179896; rate[13][15] = 0.606814;\n rate[13][16] = 0.191467; rate[13][17] = 1.699780;\n rate[13][18] = 7.154480; rate[13][19] = 0.725096;\n\n rate[14][15] = 1.786490; rate[14][16] = 0.885349;\n rate[14][17] = 0.156619; rate[14][18] = 0.239607;\n rate[14][19] = 0.351250;\n\n rate[15][16] = 4.847130; rate[15][17] = 0.578784;\n rate[15][18] = 0.872519; rate[15][19] = 0.258861;\n\n rate[16][17] = 0.126678; rate[16][18] = 0.325490;\n rate[16][19] = 1.547670;\n\n rate[17][18] = 2.763540; rate[17][19] = 0.409817;\n\n rate[18][19] = 0.347826;\n }",
"public static MatrixStore<Double> newRandom(final double... eigenvalues) {\n\n int dim = eigenvalues.length;\n\n Primitive64Store seed = Primitive64Store.FACTORY.makeFilled(dim, dim, Uniform.standard());\n QR<Double> qr = QR.R064.make(seed);\n qr.decompose(seed);\n\n MatrixStore<Double> mtrxQ = qr.getQ();\n\n DiagonalStore<Double, ArrayR064> mtrxD = Primitive64Store.FACTORY.makeDiagonal(ArrayR064.wrap(eigenvalues)).get();\n\n return mtrxQ.multiply(mtrxD).multiply(mtrxQ.conjugate());\n }",
"private void buildMatrix() {\n\n int totalnumber=this.patents.size()*this.patents.size();\n\n\n\n int currentnumber=0;\n\n\n for(int i=0;i<this.patents.size();i++) {\n ArrayList<Double> temp_a=new ArrayList<>();\n for (int j=0;j<this.patents.size();j++) {\n if (i==j) temp_a.add(0.0); else if (i<j)\n {\n double temp = distance.distance(this.patents.get(i), this.patents.get(j));\n temp = (new BigDecimal(temp).setScale(2, RoundingMode.UP)).doubleValue();\n temp_a.add(temp);\n\n\n // simMatrix.get(i).set(j, temp);\n // simMatrix.get(j).set(i, temp);\n } else {\n temp_a.add(simMatrix.get(j).get(i));\n }\n currentnumber++;\n System.out.print(\"\\r\"+ProgressBar.barString((int)((currentnumber*100/totalnumber)))+\" \"+currentnumber);\n\n }\n simMatrix.add(temp_a);\n }\n System.out.println();\n\n }",
"private double getRandom() {\n return 2*Math.random() - 1;\n }",
"public void randomInit() {\n Plain plain = new Plain(width + 2);\n grid = new Living[width + 2][width + 2];\n for (int i = 1; i < grid.length - 1; i++) {\n for (int j = 1; j < grid[i].length - 1; j++) {\n int randomNum = (int) (Math.random() * 5);\n switch (randomNum) {\n case 0:\n grid[i][j] = new Badger(plain, i, j, 0);\n break;\n case 1:\n grid[i][j] = new Empty(plain, i, j);\n break;\n case 2:\n grid[i][j] = new Fox(plain, i, j, 0);\n break;\n case 3:\n grid[i][j] = new Grass(plain, i, j);\n break;\n case 4:\n grid[i][j] = new Rabbit(plain, i, j, 0);\n break;\n }\n }\n }\n }",
"public void rollRandom() {\n\t\tthis.strength = randomWithRange();\r\n\t\tthis.wisdom = randomWithRange();\r\n\t\tthis.dexterity = randomWithRange();\r\n\t\tthis.constitution = randomWithRange();\r\n\t\tthis.intelligence = randomWithRange();\r\n\t\tthis.charisma = randomWithRange();\r\n\t}",
"public static void fill(int[] array,int start,int ende){\n\tfor (int c=0; c<array.length; c++){\r\n\t\tRandom rand = new Random(); \r\n\t\tarray[c] = rand.nextInt(ende+1-start) + start;\r\n\t}\r\n\tSystem.out.print(\"\\n\");\r\n}",
"static void fillArray(int[] ar)\n\t{\n\t Random r= new Random();\n\t for(int i = 0; i< ar.length; i++)\n\t {\n\t\t ar[i]= r.nextInt(100);\n\t }\n\t}",
"public void set(double[] ad);",
"private void reset() {\n // Init-values\n for (int i = 0; i < cells.length; i++) {\n cells[i] = 0;\n }\n\n // Random colors\n for (int i = 0; i < colors.length; i++) {\n colors[i] = Color.color(Math.random(), Math.random(), Math.random());\n }\n\n // mid = 1.\n cells[cells.length / 2] = 1;\n\n // Clearing canvas\n gc.clearRect(0, 0, canvasWidth, canvasHeight);\n }",
"public void sample()\n\t{\n\t\tint nd = interval.numDimensions();\n\n\t\t// the order in which mpicbg expects\n\t\tp = new double[ nd ][ (int) N ];\n\t\tq = new double[ nd ][ (int) N ];\n\n\t\tdouble[] src = new double[ nd ];\n\t\tdouble[] tgt = new double[ nd ];\n\n\t\tint i = 0;\n\t\tIntervalIterator it = new IntervalIterator( interval );\n\t\twhile ( it.hasNext() )\n\t\t{\n\t\t\tit.fwd();\n\t\t\tit.localize( src );\n\t\t\txfm.apply( src, tgt );\n\n\t\t\tfor ( int d = 0; d < nd; d++ )\n\t\t\t{\n\t\t\t\tp[ d ][ i ] = src[ d ];\n\t\t\t\tq[ d ][ i ] = tgt[ d ];\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}",
"static void fill(int[] array)\n\t{\n\t\tRandom r = new Random();\n\t\tfor(int i = 0; i < array.length; i++)\n\t\t{\n\t\t\tarray[i] = r.nextInt(100);\n\t\t}\n\t}",
"public void resetAll() {\n Random random = new Random();\r\n for (int layer = 0; layer < neurons.length; layer++) {\r\n for (int index = 0; index < neurons[layer].length; index++) {\r\n neurons[layer][index] = new Neuron(random.nextDouble());\r\n }\r\n }\r\n for (int layer = 0; layer < connections.length; layer++) {\r\n for (int startIndex = 0; startIndex < connections[layer].length; startIndex++) {\r\n for (int endIndex = 0; endIndex < connections[layer][startIndex].length; endIndex++) {\r\n connections[layer][startIndex][endIndex] = new Connection(random.nextDouble()*10-5, random.nextDouble()*10-5);\r\n }\r\n }\r\n }\r\n }",
"public static Matrix random(int M, int N) {\n Matrix A = new Matrix(M, N);\n for (int i = 0; i < M; i++)\n for (int j = 0; j < N; j++)\n A.data[i][j] = Math.random();\n return A;\n }",
"public static Matrix random(int M, int N) {\n Matrix A = new Matrix(M, N);\n for (int i = 0; i < M; i++)\n for (int j = 0; j < N; j++)\n A.data[i][j] = Math.random();\n return A;\n }",
"public void fill(Array a){\n\t\tint max1 = 2;\n\t\tint min1 = 1;\n\t\tRandom rand1 = new Random();\n\t\tint random1 = rand1.nextInt((max1 - min1) + 1) + min1;\n\t\tif(random1 == 2){\n\t\t\treverse();\n\t\t}\n\t\tint max2 = 3; \n\t\tint min2 = 1; \n\t\tRandom rand2 = new Random();\n\t\tint random2 = rand2.nextInt((max2 - min2) + 2) + min2;\n\t\t//random2 = 1; //TEST\n\t\tif(random2 == 1){ //horizontal\n\t\t\tplaceHorizontal(a);\n\t\t}\n\t\telse if(random2 == 2){ //vertical\n\t\t\tplaceVertical(a);\n\t\t}\n\t\telse if(random2 == 3){ //diagonal 1 \\\n\t\t\tplaceDiagonal1(a);\n\t\t}\n\t\telse if(random2 == 4){ //diagonal 2 /\n\t\t\tplaceDiagonal2(a);\n\t\t}\n\t}",
"public void randomlySetAllQR() {\n\t\tfor (int q = -3; q <=3; q++) {\r\n\t\t\tfor (int r = -3; r <=3; r++) {\r\n\t\t\t\tsetHexFromQR(q,r, new HexModel(HexModel.TileType.DesertTile));\r\n\t\t\t}\r\n\t\t}\r\n\t}"
] | [
"0.6928312",
"0.6433045",
"0.60043293",
"0.5893233",
"0.5843752",
"0.5727187",
"0.5726332",
"0.5667555",
"0.5667073",
"0.5660425",
"0.56191295",
"0.5610032",
"0.5607446",
"0.55839306",
"0.55028975",
"0.55000323",
"0.54641366",
"0.53997505",
"0.5393095",
"0.53762573",
"0.5375422",
"0.5350379",
"0.530165",
"0.52767134",
"0.5250602",
"0.5249823",
"0.5201802",
"0.5194808",
"0.51909983",
"0.51791227",
"0.51789063",
"0.51637256",
"0.5163607",
"0.51550084",
"0.5154137",
"0.51535714",
"0.5149575",
"0.5146292",
"0.51404136",
"0.5132373",
"0.51109743",
"0.5101134",
"0.50882834",
"0.5085487",
"0.5078382",
"0.5071705",
"0.50582856",
"0.505608",
"0.50559896",
"0.5033492",
"0.5026836",
"0.5010765",
"0.5009468",
"0.50094134",
"0.5003191",
"0.4999349",
"0.4996614",
"0.4992305",
"0.49772614",
"0.49733922",
"0.49670878",
"0.49655092",
"0.49582237",
"0.49579054",
"0.49552172",
"0.4946558",
"0.49460912",
"0.49453792",
"0.49402174",
"0.4939977",
"0.49390063",
"0.49362624",
"0.49358445",
"0.4926427",
"0.49244374",
"0.49195835",
"0.49187377",
"0.4913779",
"0.49132684",
"0.49106032",
"0.49090317",
"0.4904567",
"0.4892319",
"0.48900262",
"0.4887028",
"0.4879483",
"0.48739886",
"0.48717013",
"0.4870519",
"0.4869063",
"0.4868617",
"0.48675576",
"0.4865728",
"0.48653373",
"0.48641846",
"0.48612714",
"0.4858308",
"0.485557",
"0.485557",
"0.48549956",
"0.48423797"
] | 0.0 | -1 |
Prints the matrix to the standard output. | public void print() {
for (int i = 0; i < this.rows; i++) {
for (int j = 0; j < this.cols; j++) {
System.out.format("%.4f", data[i][j]);
if (j != this.cols - 1)
System.out.print(" ");
}
System.out.println("");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void print() {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[i].length; j++) {\n System.out.print(matrix[i][j] + \" \");\n }\n System.out.println();\n }\n }",
"public void print() {\n mat.print();\n }",
"public void PrintMatrix() {\n\t\t\n\t\tfloat[][] C = this.TermContextMatrix_PPMI;\n\t\t\n\t\tSystem.out.println(\"\\nMatrix:\");\n\t\tfor(int i = 0; i < C.length; i++) {\n\t\t\tfor(int j = 0; j < C[i].length; j++) {\n\t\t\t\tif(j >= C[i].length - 1) {\n\t\t\t\t\tSystem.out.printf(\" %.1f%n\", C[i][j]);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.printf(\" %.1f \", C[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"End of matrix.\");\n\t\t\n\t}",
"public static void printMatrix()\n {\n for(int i = 0; i < n; i++)\n {\n System.out.println();\n for(int j = 0; j < n; j++)\n {\n System.out.print(connectMatrix[i][j] + \" \");\n }\n }\n }",
"public void print() {\n\t\tfor(int i = 0; i < size; i++) {\n\t\t\tfor(int j = 0; j < size; j++) {\n\t\t\t\tSystem.out.print(m[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\t\n\t}",
"private void print(Matrix mat) {\n\t\tfor(int i=0;i<mat.numRows();i++){\n\t\t\tfor(int j=0;j<mat.numColumns();j++){\n\t\t\t\tSystem.out.print(mat.value(i, j)+\" \");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t}",
"public static void printMatrix(Matrix m) {\n double[][]matrix = m.getData();\n for(int row = 0; row < matrix.length; row++) {\n for(int column = 0; column < matrix[row].length; column++)\n System.out.print(matrix[row][column] + \" \");\n System.out.println(\"\");\n }\n }",
"public void print(){\n\t\tfor (int i = 0; i < numRows; i++) {\n\t\t\tfor (int j = 0; j < numCols; j++) {\n\t\t\t\tSystem.out.print(table[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"void printMatrix(int[][] matrix){\n\t\tfor(int i = 0; i < matrix.length; i++){\n\t\t\tfor(int j = 0; j < matrix[i].length; j++){\n\t\t\t\tSystem.out.print(matrix[i][j] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}",
"public void printMatrix(){\n for (int row = 0; row < matrix.length; row++){\n for (int count = 0; count < matrix[row].length; count++){\n System.out.print(\"----\");\n }\n System.out.println();\n System.out.print('|');\n for (int column = 0; column < matrix[row].length; column++){\n if (matrix[row][column] == SHIP)\n System.out.print('X' + \" | \");\n else if (matrix[row][column] == HIT)\n System.out.print('+' + \" | \");\n else if (matrix[row][column] == MISS)\n System.out.print('*' + \" | \");\n else\n System.out.print(\" \" + \" | \");\n }\n System.out.println();\n }\n }",
"public static void printMatrix(ArrayList<ArrayList<Integer>> matrix){\r\n\t\tfor (int i = 0; i < matrix.size(); i++){\r\n\t\t\tchar index = (char) ('A' + i);\r\n\t\t\tSystem.out.print(index);\r\n\t\t\tSystem.out.print(\":\\t \"); \r\n\t\t\tfor (int j = 0; j < matrix.get(i).size(); j++){\r\n\t\t\t\tSystem.out.print(matrix.get(i).get(j));\r\n\t\t\t\tif (j != matrix.get(i).size() - 1) System.out.print(\"\\t|\");\r\n\t\t\t\telse System.out.println();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void printMatrix(int[][] m) {\n for (int i = 0; i < m.length; ++i) {\n for (int j = 0; j < m[i].length; ++j) {\n System.out.print(\" \" + m[i][j]);\n }\n System.out.println();\n }\n }",
"public static void printMatrix(BigDecimal[][] m){\n\t\tfor(int i = 0; i < m.length; i++){\n\t\t\tfor(int j = 0; j < m[0].length; j++)\n\t\t\t\tSystem.out.print(m[i][j]+\"\\t\");\n\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void printMatriz( )\n {\n //definir dados\n int lin;\n int col;\n int i;\n int j;\n\n //verificar se matriz e' valida\n if( table == null )\n {\n IO.println(\"ERRO: Matriz invalida. \" );\n } //end\n else\n {\n //obter dimensoes da matriz\n lin = lines();\n col = columns();\n IO.println(\"Matriz com \"+lin+\"x\"+col+\" posicoes.\");\n //pecorrer e mostrar posicoes da matriz\n for(i = 0; i < lin; i++)\n {\n for(j = 0; j < col; j++)\n {\n IO.print(\"\\t\"+table[ i ][ j ]);\n } //end repetir\n IO.println( );\n } //end repetir\n } //end se\n }",
"public static void printMatrix(int[][] matrix){\r\n\t\tfor (int i = matrix.length-1; i >= 0; i = i-1){\r\n\t\t\tfor (int j = 0; j < matrix.length; j = j+1){\r\n\t\t\t\tSystem.out.format(\"%4d\", matrix[i][j]);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"private static void printMatrix(int[][] matrix) {\n\t\t\n\t\tSystem.out.println(\"\\n\\t[\\n\");\n\t\tArrays.asList(matrix).stream().forEach(intArray -> {\n\t\t\t\n\t\t\tSystem.out.print(\"\\t\\t\" + Arrays.toString(intArray));\n\t\t\tif(!intArray.equals(matrix[matrix.length-1])){\n\t\t\t\tSystem.out.println(\",\");\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tSystem.out.println(\"\\n\\n\\t]\");\n\t}",
"public void display(){\n for(int i=0;i<N;i++){\n for(int j=0;j<N;j++)\n System.out.print(adj_matrix[i][j]+\" \");\n System.out.println();\n }\n }",
"public static void printMatrix(double[][] matrix) {\r\n\r\n if (matrix == null) {\r\n return;\r\n }\r\n\r\n for (int row = 0; row < matrix.length; row++) {\r\n\r\n System.out.print(\"(\");\r\n\r\n for (int column = 0; column < matrix[row].length; column++) {\r\n\r\n if (column != 0) {\r\n System.out.print(\",\");\r\n }\r\n System.out.print(matrix[row][column]);\r\n }\r\n\r\n System.out.println(\")\");\r\n }\r\n }",
"public void printLayout() {\n\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n System.out.print(matrix[i][j] + \" \");\n\n }\n System.out.println(\"\");\n }\n }",
"public static void printMatrix(double[][] matrix) {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[0].length; j++) {\n System.out.print(matrix[i][j] + \" \");\n }\n System.out.println();\n }\n }",
"public static void display(int[][] matrix){\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix.length; j++) {\n System.out.print(matrix[i][j] + \" \");\n }\n System.out.println(\"\");\n }\n }",
"public void print() {\r\n\r\n\t\tfor (int row=0; row<10; row++) \r\n\t\t{\r\n\t\t\tfor (int col=0; col<10; col++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"\\t\"+nums[row][col]); //separated by tabs\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public static void printMatrix(Object[][] M) {\r\n\r\n\t\t// Calculation of the length of each column\r\n\t\tint[] maxLength = new int[M[0].length];\r\n\t\tfor (int j = 0; j < M[0].length; j++) {\r\n\t\t\tmaxLength[j] = M[0][j].toString().length();\r\n\t\t\tfor (int i = 1; i < M.length; i++)\r\n\t\t\t\tmaxLength[j] = Math.max(M[i][j].toString().length(), maxLength[j]);\r\n\t\t\tmaxLength[j] += 3;\r\n\t\t}\r\n\t\t\r\n\t\t// Display\r\n\t\tString line, word;\r\n\t\tfor (int i = 0; i < M.length; i++) {\r\n\t\t\tline = \"\";\r\n\t\t\tfor (int j = 0; j < M[i].length; j++) {\r\n\t\t\t\tword = M[i][j].toString();\r\n\t\t\t\twhile (word.length() < maxLength[j])\r\n\t\t\t\t\tword += \" \";\r\n\t\t\t\tline += word;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(line);\r\n\t\t}\r\n\t}",
"public void displayMatrix(){\r\n\t\t\r\n\t\tfor (int i = 0; i < head.getOrder(); i++) {\r\n\t\t\tElementNode e = head.gethead();\r\n\t\t\tif( i > 0){\r\n\t\t\t\tfor (int j = 0; j <= i-1; j++) {\r\n\t\t\t\t\te = e.getNextRow();\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\tfor (int j = 0; j < head.getOrder(); j++) {\r\n\t\t\t\tSystem.out.print( e.getData() + \" \");\r\n\t\t\t\te = e.getNextColumn();\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"\\n\");\r\n\t\t}\r\n\t}",
"static void printMatrix(int[][] inp){\n\n for(int i=0;i<inp.length;i++){\n for(int j=0;j<inp[0].length;j++){\n System.out.print(inp[i][j]+\" \");\n }\n System.out.println(\"\");\n }\n }",
"public void print() {\n int rows = this.getNumRows();\n int cols = this.getNumColumns();\n\n for (int r = 0; r < rows; r++) {\n\n for (int c = 0; c < cols; c++) {\n System.out.print(this.getString(r, c) + \", \");\n }\n\n System.out.println(\" \");\n }\n }",
"default void print() {\r\n\t\tGenerator.getInstance().getLogger().debug(\"Operation matrix:\\r\");\r\n\t\tString ans = \" operation \";\r\n\t\tfor (double i = 0; i < this.getOperationMap().keySet().size(); i++) {\r\n\t\t\tfinal Element element1 = this.get(i);\r\n\t\t\tans += element1 + \" \";\r\n\t\t}\r\n\t\tLogManager.getLogger(FiniteSemiGroup.class).debug(ans);\r\n\t\tfor (double i = 0; i < this.getOperationMap().keySet().size(); i++) {\r\n\t\t\tfinal Element element1 = this.get(i);\r\n\t\t\tans = element1 + \" \";\r\n\t\t\tfor (double j = 0; j < this.getOperationMap().keySet().size(); j++) {\r\n\t\t\t\tfinal Element element2 = this.get(j);\r\n\t\t\t\tans += \" \" + this.getOperationMap().get(element1).get(element2) + \" \";\r\n\t\t\t}\r\n\t\t\tLogManager.getLogger(FiniteSemiGroup.class).debug(ans);\r\n\t\t}\r\n\t}",
"public void printAdjacencyMatrix();",
"private static void printMatrix(char[][] board) {\n\t\tint row = board.length;\n\t\tint col = board[0].length;\n\t\tfor(int i=0; i<row; i++){\n\t\t\t\n\t\t\tfor(int j=0; j<col; j++){\n\t\t\t\t\n\t\t\t\tSystem.out.print(\" \" + board[i][j]+\"\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}",
"public void print() {\n\t\tfor (int i = 0; i < TABLE_SIZE; i++) {\n\t\t\tSystem.out.print(\"|\");\n\t\t\tif (array[i] != null) {\n\t\t\t\tSystem.out.print(array[i].value);\n\t\t\t} else {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.print(\"|\\n\");\n\t}",
"public void print() {\n\t\t\n\t\tfor (int j = 0; j < height(); j++) {\n\t\t\tfor (int i = 0; i < width(); i++) {\n\t\t\t\tSystem.out.printf(\"%3d \", valueAt(i, j));\n\t\t\t}\n\t\t\tSystem.out.printf(\"\\n\");\n\t\t}\n\t\tSystem.out.printf(\"\\n\");\t\n\t}",
"public static void display(long[][] matrix){\n for(int i=0; i<matrix.length; i++){\n for(int j=0; j<matrix[0].length; j++){\n System.out.print(matrix[i][j] + \" \");\n }\n System.out.println();\n }\n }",
"public void print() {\n for (int i = 0; i < headers.length; i++) {\n System.out.printf(headers[i] + \", \"); // Print column headers.\n }\n System.out.printf(\"\\n\");\n for (int i = 0; i < (data.length - 1); i++) {\n for (int j = 0; j < data[i].length; j++) {\n System.out.printf(data[i][j] + \" \"); // Print value at i,j.\n }\n System.out.printf(\"\\n\");\n }\n }",
"public <T> void printMatrix(T matrix[][])\n {\n int longestString = 0;\n \n for (T[] m : matrix)\n {\n for (T j : m)\n {\n if (j.toString().length() > longestString)\n {\n longestString = j.toString().length();\n }\n }\n }\n String matrixLength = \"\";\n matrixLength += matrix.length;\n \n if (longestString < matrixLength.length())\n {\n longestString = matrix.length;\n }\n \n // limit the length of a string to 4 characters\n longestString = (longestString > 4) ? 4 : longestString;\n \n String format = \"%-\" + (longestString + 1) + \".\" + longestString + \"s\";\n \n System.out.printf(format, \" \");\n for (int i = 0; i < matrix.length; i++)\n {\n System.out.printf(format, i);\n }\n System.out.println(\"\");\n\n int k = 0;\n\n for (T j[] : matrix)\n {\n System.out.printf(format, k++);\n\n for (T i : j)\n {\n String s = \"\";\n s += (i == null) ? \"-\" : i;\n System.out.printf(format, s);\n }\n System.out.println(\"\");\n }\n System.out.println(\"\");\n }",
"public static void printSM(short[][] matrix){\r\n\t\tfor(int y =0;y<matrix.length;y++){\r\n\t\t\tfor(int x =0; x < matrix[0].length; x++){\r\n\t\t\t\tSystem.out.print(matrix[y][x]+\" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public static void printMatrix(Object[][] matrix) {\n for (Object[] row : matrix) {\n for (Object cell : row) {\n System.out.print(cell + \" \");\n }\n System.out.println();\n }\n }",
"static void printMat(Integer mat[][], int n)\n\t{\n\t\tfor (int i = 0; i < n; i++)\n\t\t{\n\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\tSystem.out.print(mat[i][j] + \" \");\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public static void printMatrix(ArrayList<List<String>> matrix){\r\n\t\tfor (int i = 0; i < matrix.size(); i++) {\r\n\t\t\tfor (int j = 0; j < matrix.get(i).size(); j++) {\r\n\t\t\t\tSystem.out.print(matrix.get(i).get(j)+\", \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public String toString() {\n\tString retStr = \"\";\n\tfor (int r = 0; r < this.size(); r++){\n\t for (int c = 0; c < this.size(); c++){\n\t\tretStr += matrix[r][c] + \"\\t\";\n\t }\n\t retStr += \"\\n\";\n\t}\n\treturn retStr;\n }",
"public void printRealMatrix(RealMatrix matrix) {\r\n for(int i = 0; i < matrix.getRowDimension(); i++) {\r\n for(int j = 0; j < matrix.getColumnDimension(); j++) {\r\n System.out.print(matrix.getEntry(i, j) + \" \");\r\n }\r\n System.out.println();\r\n }\r\n System.out.println();\r\n }",
"public static void displayMatrix(char[][] M, int size){\n for (int i = 0 ; i < size ; i++){\n for (int j=0 ; j< size ; j++){\n System.out.print(M[i][j]);\n }\n System.out.println ();\n }\n }",
"public void printMaze()\r\n\t{\r\n\t\tfor(int i = 0;i<maze.length;i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\tfor(int j = 0;j<maze[0].length;j++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tfor(int k = 0;k<maze[0][0].length;k++)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(maze[i][j][k]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"\");\r\n\t}",
"public void show() {\n for (int i = 0; i < rowCount; i++) {\n for (int j = 0; j < columnCount; j++)\n System.out.printf(\"%9.4f \", data[i][j]);\n System.out.println();\n }\n }",
"private void print_solution() {\n System.out.print(\"\\n\");\n for (int i = 0; i < rowsCount; i++) {\n for (int j = 0; j < colsCount; j++) {\n System.out.print(cells[i][j].getValue());\n }\n System.out.print(\"\\n\");\n }\n }",
"public void outputKattisMatrix(double[][] matrix) {\n\n int numRows = matrix.length; \n int numCols = matrix[0].length;\n System.out.print(numRows + \" \" + numCols);\n for(int i = 0; i < numRows; i++) {\n for(int j = 0; j < numCols; j++) {\n System.out.print(\" \" + matrix[i][j]);\n }\n }\n System.out.println();\n }",
"static void showMatrix()\n {\n String sGameField = \"Game field: \\n\";\n for (String [] row : sField) \n {\n for (String val : row) \n {\n sGameField += \" \" + val;\n }\n sGameField += \"\\n\";\n }\n System.out.println(sGameField);\n }",
"public static void printMatrix(int[][] array, boolean format) {\n if (format) {\n \n }\n }",
"private void display_Topo_Matrix(int[][] matrix) \n\t{\n\t\tSystem.out.println(\"\\nReview Topology Matrix:\");\n\t\tfor(int row=0; row<matrix.length; row++)\n\t\t{\n\t\t\tfor(int col=0; col<matrix[row].length; col++)\n\t\t\t{\n\t\t\t\tSystem.out.print(matrix[row][col] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"@Override\n public String toString() {\n StringBuilder builder = new StringBuilder();\n for (double[] b : matrix) {\n builder.append(\"\\n\");\n for (double c : b) {\n builder.append(c).append(\" \");\n }\n }\n return builder.toString();\n }",
"public static void printMatrix(boolean debug) {\n \tprintHeader ();\n \tchar c = 'A';\n for (int row = 0; row < matrix.length; row++) {\n \tSystem.out.print(c + \" \");\n \tc++;\n for (int col = 0; col < matrix[0].length; col++) {\n if (matrix[row][col] == SHIP_SYMBOL) {\n if (debug) {\n System.out.print(matrix[row][col] + \" \");\n } else {\n System.out.print(Character.toString(EMPTY_SYMBOL) + \" \");\n }\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(matrix[row][col] + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t}",
"public static void print2D(char mat[][]) {\n System.out.println(\"printing matrix\");\n for (int i = 0; i < mat.length; i++) {\n for (int j = 0; j < mat[i].length; j++) {\n System.out.print(mat[i][j] + \" \");\n }\n System.out.println(\"\");\n }\n\n }",
"public void print() {\n\t\tcounter++;\n\t\tSystem.out.print(counter + \" \");\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int j = 0; j < size; j++) {\n\t\t\t\tSystem.out.print(squares[j][i].getValue());\n\t\t }\n\t\t System.out.print(\"//\");\n\t\t}\n\t\tSystem.out.println();\n }",
"public void print () \r\n\t{\r\n\t\tfor (int index = 0; index < count; index++)\r\n\t\t{\r\n\t\t\tif (index % 5 == 0) // print 5 columns\r\n\t\t\t\tSystem.out.println();\r\n\r\n\t\t\tSystem.out.print(array[index] + \"\\t\");\t// print next element\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}",
"public void printMatrix(int n, int[][] A)\n {\n\t // go through by line, then by element, and print the output.\n\t for (int i = 0; i<n; i++) {\n\t\t for (int j = 0; j<n; j++) {\n\t\t\t System.out.print(A[i][j] + \" \");\n\t\t }\n\t\t // end the line at each new space. \n\t\t System.out.println(\" \");\n\t }\n }",
"public void print_maze () {\n \n System.out.println();\n\n for (int row=0; row < grid.length; row++) {\n for (int column=0; column < grid[row].length; column++)\n System.out.print (grid[row][column]);\n System.out.println();\n }\n\n System.out.println();\n \n }",
"public void print() {\n System.out.println();\n for (int level = 0; level < 4; level++) {\n System.out.print(\" Z = \" + level + \" \");\n }\n System.out.println();\n for (int row = 3; row >= 0; row--) {\n for (int level = 0; level < 4; level++) {\n for (int column = 0; column < 4; column++) {\n System.out.print(get(column, row, level));\n System.out.print(\" \");\n }\n System.out.print(\" \");\n }\n System.out.println();\n }\n System.out.println();\n }",
"public static void main(String[] args) {\n int[][] matrix = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}};\n printMatrix(matrix);\n }",
"public <J> void printMatrix(String title, J matrix[][])\n {\n System.out.println(title + \"\\n----\");\n printMatrix(matrix);\n }",
"public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", matrix[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }",
"public void outDisTable()\n\t{\n\t\tfor(int i = 0; i < sqNum; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < sqNum; j++)\n\t\t\t{\n\t\t\t\tSystem.out.printf(\"%-18s\", \"[\" + i + \",\" + j + \"]:\" + String.format(\" %.8f\", dm[i][j]));\n\t\t\t}\n\t\t\tSystem.out.print(\"\\r\\n\");\n\t\t}\n\t}",
"public void print()\n {\n StringBuffer buffer = new StringBuffer();\n for (int i = 0; i < memorySize; i++)\n {\n buffer.append(mainMemory[i]);\n }\n System.out.println(buffer.toString());\n }",
"public void display() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(a[i] + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void print() {\r\n System.out.print(\"[id: <\" + this.id + \"> \");\r\n if (this.dimension > 0) {\r\n System.out.print(this.data[0]);\r\n }\r\n for (int i = 1; i < this.dimension * 2; i++) {\r\n System.out.print(\" \" + this.data[i]);\r\n }\r\n System.out.println(\"]\");\r\n }",
"public void print(){\n for(int i=0; i<maze.length;i+=1) {\n for (int j = 0; j < maze[0].length; j += 1){\n if(i == start.getRowIndex() && j == start.getColumnIndex())\n System.out.print('S');\n else if(i == goal.getRowIndex() && j == goal.getColumnIndex())\n System.out.print('E');\n else if(maze[i][j]==1)\n System.out.print(\"█\");\n else if(maze[i][j]==0)\n System.out.print(\" \");\n\n\n }\n System.out.println();\n }\n }",
"public void print(){\n\t\t\n\t\tfor(int i=0;i<maxindex;i++)\n\t\t{\n\t\t\tif(data[i] != 0)\n\t\t\t{\n\t\t\t\tSystem.out.print(data[i]+\"x\"+i+\" \");\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public String toString() {\n\t\tString s = n + \" x \" + n + \" Matrix:\\n\";\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\ts += content[i][j] + \"\\t\\t\";\n\t\t\t}\n\t\t\ts += \"\\n\\n\";\n\t\t}\n\t\treturn s;\n\t}",
"public static void printMatrix(int[][] matrix, int NUMBER_OF_ROWS, int NUMBER_OF_COLUMNS) {\n\t\t// console for print matrix\n\t\tSystem.out.println(\"Printing the matrix: Iteration Number: \" + iterationCount++);\n\t\t// outer loop to run through rows\n\t\tfor (int rowCounter = 0; rowCounter < NUMBER_OF_ROWS; rowCounter++) {\n\t\t\t// inner loop to iterate through the columns\n\t\t\tfor (int columnCounter = 0; columnCounter < NUMBER_OF_COLUMNS; columnCounter++) {\n\t\t\t\t/**\n\t\t\t\t * Check the current cell value If the cell value is 1, then print a live cell\n\t\t\t\t * In all other cases, console an \"underline\" (underscore) Underscore/Blank\n\t\t\t\t * underline depicts a blank entry or a dead cell\n\t\t\t\t */\n\t\t\t\t// for Alive Cell\n\t\t\t\tif (matrix[rowCounter][columnCounter] == 1) {\n\t\t\t\t\t// Print for live cell\n\t\t\t\t\tSystem.out.print(\"* \");\n\t\t\t\t}\n\t\t\t\t// for Dead cell\n\t\t\t\telse {\n\t\t\t\t\t// print for dead cell\n\t\t\t\t\tSystem.out.print(\"_ \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// go to the nextMatrixCycle line\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t// Before performing the nextMatrixCycle iteration, break line\n\t\tSystem.out.println(\"\");\n\t}",
"@Test\n public void testPrintMatrix() {\n System.out.println(\"printMatrix\");\n Matrix matrix = null;\n utilsHill.printMatrix(matrix);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public static void printBoard() {\n System.out.println(\"\\t-------------\");\n for (int row = 0; row < SIZE_ROW; row++) {\n System.out.print(\"\\t| \");\n for (int col = 0; col < SIZE_COL; col++) {\n System.out.print(board[row][col] + \" | \");\n }\n System.out.println(\"\\n\\t-------------\");\n }\n }",
"public void print() {\r\n this.table.printTable();\r\n }",
"public void print()\n {\n System.out.println(\"------------------------------------------------------------------\");\n System.out.println(this.letters);\n System.out.println();\n for(int row=0; row<8; row++)\n {\n System.out.print((row)+\"\t\");\n for(int col=0; col<8; col++)\n {\n switch (gameboard[row][col])\n {\n case B:\n System.out.print(\"B \");\n break;\n case W:\n System.out.print(\"W \");\n break;\n case EMPTY:\n System.out.print(\"- \");\n break;\n default:\n break;\n }\n if(col < 7)\n {\n System.out.print('\\t');\n }\n\n }\n System.out.println();\n }\n System.out.println(\"------------------------------------------------------------------\");\n }",
"public void print() {\n \tfor (int i=0; i < this.table.height; i++) {\n \t\tfor (int j=0; j < this.table.width; j++) {\n \t\t\tString tmp = \"e\";\n \t\t\tif(this.table.field[i][j].head != null) {\n \t\t\t\ttmp = \"\";\n \t\t\t\tswitch (this.table.field[i][j].head.direction) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\ttmp+=\"^\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\ttmp+=\">\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\ttmp+=\"V\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\ttmp+=\"<\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n \t\t\t}\n \t\t\telse if(this.table.field[i][j].obj != null) {\n \t\t\t\ttmp = this.table.field[i][j].obj.name;\n \t\t\t}\n \t\t\tSystem.out.print(\" \" + tmp);\n \t\t}\n \t\t\tSystem.out.println(\"\");\n \t}\n }",
"public void display() { \r\n\t\tfor (int i=0; i<3; i++){ \r\n\t\t\tSystem.out.print(\"|\"); \r\n\t\t\tfor (int j=0; j<3; j++){ \r\n\t\t\t\tSystem.out.print(board[i][j] + \"|\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(); \r\n\t\t}\r\n\t\tSystem.out.println(); \r\n\t}",
"public void printEdges(){\n System.out.print(\" |\");\n for(int i=0;i<size;i++)\n System.out.print(\" \"+i+\" \");\n System.out.print(\"\\n\");\n for(int i=0;i<size+1;i++)\n System.out.print(\"-------\");\n System.out.print(\"\\n\");\n for(int i=0;i<size;i++){\n System.out.print(\" \"+i+\" |\");\n for(int j=0;j<size;j++){\n System.out.print(\" \"+Matrix[i][j]+\" \");\n }\n System.out.print(\"\\n\");\n }\n }",
"public static void main(String[] args) {\n\t\tint[][] m = Method.initRandomMatrix(5, 5, 20);\r\n\t\tMethod.print(m);\r\n\t\tSystem.out.println(\"Вариант отображения согласно заданию:\");\r\n\t\tfor (int i = 0; i < m.length; i++) {\r\n\t\t\tif (i % 2 == 0) {\r\n\t\t\t\tfor (int j = m[i].length - 1; j >= 0; j--) {\r\n\t\t\t\t\tSystem.out.print(m[i][j] + \"\\t\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (int j = 0; j < m[i].length; j++) {\r\n\t\t\t\t\tSystem.out.print(m[i][j] + \"\\t\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}",
"private void print(){\n\t\tfor(int i = 0; i < maxNum; i++){\n\t\t\tSystem.out.print(m[i] + \" \");\n\t\t\t\n\t\t\tif((i + 1) % order == 0){\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void printBoard() {\n\t\tfor (int i = 0; i<3; i++) {\n\t\t\tSystem.out.println();\n\t\t\tfor (int j = 0; j<3; j++) {\n\t\t\t\tif (j == 0) {\n\t\t\t\t\tSystem.out.print(\"| \");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(board[i][j] + \" | \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}",
"void printGrid() {\n\t\tSystem.out.println();\n\t\tfor (int row = 0; row < moleGrid.length; row++) {\n\t\t\tfor (int col = 0; col < moleGrid[row].length; col++) {\n\t\t\t\tSystem.out.print(moleGrid[row][col] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void print(final PrintStream output) {\r\n // TODO your job\r\n // print row by row\r\n PrintStream rowPrinter = new PrintStream(output);\r\n for ( char[] x : mazeData){\r\n rowPrinter.println(x);\r\n }\r\n }",
"public void printBoard() {\n\t\tfor (int colIndex = 0; colIndex < 4; colIndex++){\n\t\t\tfor (int rowIndex = 0; rowIndex < 4; rowIndex++){\n\t\t\t\tSystem.out.print(this.myBoard[colIndex][rowIndex] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void print(){\n for (int i = 0; i < rows; i++)\n {\n for (int j = 0; j < cols; j++)\n {\n if (start.getCol()==j&&start.getRow()==i)\n System.out.print('S');\n else if (end.getCol()==j&&end.getRow()==i)\n System.out.print('E');\n else if (maze[i][j]==1)\n System.out.print('\\u2588');\n else if (maze[i][j]==0)\n System.out.print('\\u2591');\n if (j!=cols-1){\n System.out.print(\" \");\n }\n }\n System.out.println();\n }\n //System.out.println(\"-------\");\n }",
"public void printSOM()\n\t{\n\t\tfor(int i = 0 ; i < SOM.length; i++)\n\t\t{\n\t\t\tfor(int j=0; j < SOM[0].length; j++)\n\t\t\t{\t\t\t\t\n\t\t\t\t//System.out.println(i + \" \" + j);\n\t\t\t\tSystem.out.println(\"X =\" + SOM[i][j].getX() + \" Y =\" + SOM[i][j].getY() + \" ACTIVATION VALUE =\" + SOM[i][j].getACTIVATION_VALUE());\n\t\t\t\t//System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//System.out.println(\"===============================\");\n\t}",
"public void print_board(){\n\t\tfor(int i = 0; i < size*size; i++){\n\t\t\tif(i%this.size == 0) System.out.println(); //just for divider\n\t\t\tfor(int j = 0; j < size*size; j++){\n\t\t\t\tif(j%this.size == 0) System.out.print(\" \"); //just for divider\n\t\t\t\tSystem.out.print(board[i][j]+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public String toString() {\n StringBuilder output = new StringBuilder();\n output.append(\"{\\n\");\n for (int i=0; i<rows; i++) {\n output.append(Arrays.toString(matrix.get(i)) + \",\\n\");\n }\n output.append(\"}\\n\");\n return output.toString();\n }",
"void matice(){\n\t\tfor(int i = 0;i<matice.length;i++){\n\t\t\tfor(int j =0; j< matice[i].length;j++){\n\t\t\t\tSystem.out.print(matice[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void print() {\r\n\t\tfor (int i = front; i <= rear; i++) {\r\n\t\t\tSystem.out.print(arr[i].getData() + \"\\t\");\r\n\t\t}\r\n\t}",
"public void print() {\n\t\t\tfor (int i = 0; i < nowLength; i++) {\n\t\t\t\tSystem.out.print(ray[i] + \" \");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}",
"public String toString() {\n String s = \"\";\n for(int i = 1; i <= rows; i++){\n for(int j = 1; j <= cols; j++){ \n s = s + String.format(\"%2d\",m[i][j]) + \" \";\n }\n s += \"\\n\";\n }\n return s;\n }",
"public void Print()\n\t{\n\t\tSystem.out.print(\"\\n_____GRID______\");\n\t\n\t\tfor(int x = 0; x < 9; x++)\n\t\t{\n\t\t\t\tif(x%3 == 0)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\tif(grid[x] !=0)\n\t\t\t\t{\n\t\t\t\t\tif(grid[x] == -1)\n\t\t\t\t\t\tSystem.out.print(\"|_\"+ \"O\" + \"_|\");\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.print(\"|_\"+ \"X\" + \"_|\");\n\t\t\t\t}\n\t\t\t\telse // blank square\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"|_\"+ \" \" + \"_|\");\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}",
"public String toString(){\r\n\t\tString ret = \"MatrixArray:\\n\";\r\n\t\tfor (int i = 0; i < this.MA.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.MA[i].length; j++){\r\n\t\t\t\tif (j > 0) {\r\n\t\t\t\t\tret += \", \";\r\n\t\t }\r\n\t\t ret += String.valueOf(this.MA[i][j]);\r\n\t\t\t}\r\n\t\t\tret += \"\\n\";\r\n\t\t}\r\n\t\treturn ret;\r\n\t}",
"public void printTable() {\n System.out.print(\"\\033[H\\033[2J\"); // Clear the text in console\n System.out.println(getCell(0, 0) + \"|\" + getCell(0, 1) + \"|\" + getCell(0, 2));\n System.out.println(\"-+-+-\");\n System.out.println(getCell(1, 0) + \"|\" + getCell(1, 1) + \"|\" + getCell(1, 2));\n System.out.println(\"-+-+-\");\n System.out.println(getCell(2, 0) + \"|\" + getCell(2, 1) + \"|\" + getCell(2, 2));\n }",
"public static void printBoard() {\n\t\tint i = 0;\n\t\tint j = 0;\n\n\t\t// Row Counter\n\t\tfor (i = 0; i < numPeople; i++) {\n\n\t\t\t// Column Counter\n\t\t\tfor (j = 0; j < numPeople; j++) {\n\t\t\t\tSystem.out.print(board[i][j] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\n\t\t}\n\n\t}",
"public void printdial(int[][] matrix) {\n\t\tif (matrix == null || matrix.length == 0 || matrix[0].length == 0) {\n\t\t\treturn;\n\t\t}\n\t\tint row = matrix.length;\n\t\tint col = matrix[0].length;\n\n\t\t//print up left big trangle\n\t\tfor (int i = 0; i < row; i++) {\n\t\t\tint j = 0, m = i;\n\t\t\twhile (m >= 0 && m < row && j >= 0 && j < col) {\n\t\t\t\tSystem.out.print(matrix[m][j]);\n\t\t\t\tm--;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\n\t\t//print bottom right small trangle\n\t\tfor (int j = 1; j < col; j++) {\n\t\t\tint i = row - 1, m = j;\n\t\t\twhile (i >= 0 && i < row && m >= 0 && m < col) {\n\t\t\t\tSystem.out.print(matrix[i][m]);\n\t\t\t\ti--;\n\t\t\t\tm++;\n\t\t\t}\n\t\t}\n\t}",
"public void print() {\n\t\tSystem.out.println(toString());\n\t}",
"private static void printOutput (int[][] results)\n {\n for (int i=0; i<=results[0].length-1; i++)\n {\n System.out.println(results[0][i] +\",\"+ results[1][i]);\n }\n System.out.println();\n }",
"public String toString(){\n StringBuffer returnString = new StringBuffer();\n for(int i = 0; i < this.matrixSize; i++){\n if(rows[i].length() != 0){\n returnString.append((i+1) + \":\" + rows[i]+ \"\\n\");\n }\n }\n return returnString.toString();\n }",
"void print() {\n\n\t\t// Print \"Sym Table\"\n\t\tSystem.out.print(\"\\nSym Table\\n\");\n\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tHashMap<String, Sym> M = list.get(i);\n\t\t\t// Print each HashMap in list\n\t\t\tSystem.out.print(String.format(M.toString() + \"\\n\"));\n\t\t}\n\n\t\t// Print New Line\n\t\tSystem.out.println();\n\t}",
"private void printBoard() {\r\n for (int i = 0; i < board.length; i++) {\r\n for (int j = 0; j < board[i].length; j++) {\r\n System.out.print(board[j][i] + \" \");\r\n }\r\n System.out.println();\r\n }\r\n }",
"public static void printDP(){\r\n for (int i = 0; i < sequence.length(); i++) {\r\n for (int j = 0; j < sequence.length(); j++) {\r\n System.out.print(DPMatrix[i][j] + \" \");\r\n }\r\n System.out.println(\"\");\r\n }\r\n }",
"public void printMatriz(){\n for(int i = 0; i < 9; i++){\n for (int j = 0; j < 9; j++){\n if(matriz[i][j] != 0){\n //trata os espacamntos\n if((j+1)%3 == 0)\n System.out.printf(matriz[i][j] + \" \");\n else\n System.out.printf(matriz[i][j] + \" \");\n }else{\n if((j+1)%3 == 0)\n System.out.printf(\" \");\n else\n System.out.printf(\" \");\n }\n }\n if((i+1)%3 == 0){\n System.out.println(\"\\n\");\n }\n else\n System.out.println();\n\n }\n }"
] | [
"0.83410364",
"0.8042441",
"0.7913314",
"0.77229625",
"0.76754236",
"0.74702585",
"0.7449707",
"0.74223095",
"0.74167585",
"0.7340234",
"0.7337859",
"0.7300969",
"0.7292521",
"0.72644377",
"0.7251171",
"0.7247735",
"0.72152245",
"0.72067255",
"0.7146578",
"0.7142476",
"0.71335936",
"0.7119931",
"0.710964",
"0.7098076",
"0.70933795",
"0.7010445",
"0.7008603",
"0.69944876",
"0.69877416",
"0.69657665",
"0.6949904",
"0.6925969",
"0.69185776",
"0.6909366",
"0.6898667",
"0.6894852",
"0.68904215",
"0.68769175",
"0.68336105",
"0.6803844",
"0.68036973",
"0.67893726",
"0.67817336",
"0.6764369",
"0.67315716",
"0.6705462",
"0.6702996",
"0.6702403",
"0.66959804",
"0.66868794",
"0.66863537",
"0.6670199",
"0.66488445",
"0.66229",
"0.661072",
"0.66029114",
"0.6592771",
"0.6587393",
"0.6544936",
"0.65324485",
"0.65109044",
"0.65087914",
"0.6486011",
"0.647793",
"0.6476649",
"0.6472145",
"0.6465237",
"0.64593804",
"0.6432238",
"0.6428797",
"0.6428783",
"0.64085734",
"0.6405672",
"0.63995796",
"0.63989234",
"0.63970643",
"0.63933146",
"0.6388854",
"0.638464",
"0.6359942",
"0.63564456",
"0.6344231",
"0.63321745",
"0.63311553",
"0.6318572",
"0.63180745",
"0.63022083",
"0.6291917",
"0.62841487",
"0.6280654",
"0.6278178",
"0.62770367",
"0.62769145",
"0.6273883",
"0.62722987",
"0.62709814",
"0.62700516",
"0.6267837",
"0.625586",
"0.62449557"
] | 0.7229448 | 16 |
Creates a one dimensional array from the matrix. | public double[] toOneDimensionalArray() {
double[] result = new double[rows * cols];
for (int i = 0; i < rows; i++) {
System.arraycopy(this.data[i], 0, result, i * cols, cols);
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double[][] toIntArray() {\r\n return matrix;\r\n }",
"Matrix(){\n matrixVar = new double[1][1];\n rows = 1;\n columns = 1;\n }",
"public E[][] getMatrix() {\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tE[][] matrix = (E[][]) new Object[mColumnCount][mRowCount];\r\n\t\tfor(int i=0; i<mColumnCount; i++)\r\n\t\t\tfor(int j=0; j<mRowCount; j++)\r\n\t\t\t\tmatrix[i][j] = getFromArray(i, j);\r\n\t\treturn matrix;\r\n\t}",
"public Object[][] toJava2D() {\n\n\t\tObject[][] d = new Object[numRows][numCols];\n\t\tfor ( int j = 0; j < numRows; j++ ) {\n\t\t\tfor ( int i = 0; i < numCols; i++ ) {\n\t\t\t\td[i][j] = get(i, j);\n\t\t\t}\n\t\t}\n\t\treturn d;\n\t}",
"double[][] asArray(){\n double[][] array_to_return = new double[this.rows][this.cols];\n for(int i=0; i<this.rows; i++){\n for(int j=0; j<this.cols; j++) array_to_return[i][j] = this.data[i*this.cols + j];\n }\n\n return array_to_return;\n }",
"public Object[][] get2DArray();",
"@Override\n\tpublic double[][] toArray() {\n\t\tint m = this.getRowsCount();\n\t\tint n = this.getColsCount();\n\t\tdouble[][] arr = new double[m][n];\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tarr[i][j] = this.get(i, j);\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}",
"public Matrix( int a ) {\n\tmatrix = new Object[a][a];\n }",
"private double[][] convertArrayToMatrix(ArrayList<String> data, int row, int column) {\n int ct = 0;\n double[][] mat = new double[row][column];\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < column; j++) {\n mat[i][j] = Double.parseDouble(data.get(ct));\n ct++;\n }\n }\n /*for (String s : data) {\n mat[i][j] = Double.parseDouble(s);\n i++;\n if (i == row) {\n i = 0;\n j++;\n }\n if (i == row && j == column) {\n break;\n }\n }*/\n return mat;\n }",
"private Sign[] flattenBoard(){\r\n Sign[] flatBoard = new Sign[10]; // an array to save the board as one dimensional array\r\n int count = 1; //counter to help the transition from matrix to array\r\n\r\n /* transfer the matrix to array */\r\n for (int i=0;i<3;i++)\r\n for (int j=0;j<3;j++)\r\n flatBoard[count++] = board[i][j];\r\n\r\n return flatBoard;\r\n }",
"Matrix(double[][] input) {\n matrixVar = input;\n columns = matrixVar[0].length;\n rows = matrixVar.length;\n }",
"public Matrix(int[][] array)\n {\n matrix = array;\n }",
"public Matrix() {\n\tmatrix = new Object[DEFAULT_SIZE][DEFAULT_SIZE];\n }",
"private int[] convertToOneDimensionMatrix(int[][] twoDimensionMatrix, int varNum)\r\n\t{\r\n\t // twoDimensionMatrix: the two dimension matrix that you want to convert\r\n\t\t// varNum: the size (equals to the row or the column length) of the two dimension matrix \r\n\t\t\r\n\t\t// length: the total number of units of the two dimension matrix that you want to convert:\r\n\t\tint length = varNum * varNum;\r\n\t\t\r\n\t\t// tempArrayList: store the result in the format of ArrayList, then convert it to int[]:\r\n\t\tArrayList <Integer> tempArrayList = new ArrayList<Integer>();\r\n\t\t\r\n\t\t// result (one dimensional)\r\n\t\tint[] result = new int[length];\r\n\t\t\r\n\t\tfor(int m = 0; m < varNum; m++)\r\n\t\t{\r\n\t\t\tfor(int n = 0; n < varNum; n++)\r\n\t\t\t{\r\n\t\t\t\ttempArrayList.add(twoDimensionMatrix[m][n]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// convert the tempArrayList to int[]:\r\n\t\tfor (int i = 0; i < tempArrayList.size(); i++)\r\n\t\t{\r\n\t\t\tresult[i] = tempArrayList.get(i);\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t\t\r\n\t}",
"public static int[][] init() {\n int[][] arr={\n {0,1,0,1,0,0,0},\n {0,0,1,0,0,1,0},\n {1,0,0,1,0,1,0},\n {0,0,1,0,0,1,0},\n {0,0,1,1,0,1,0},\n {1,0,0,0,0,0,0}\n };\n return arr;\n }",
"Matrix(int r,int c)\n {\n this.r=r;\n this.c=c;\n arr=new int[r][c];\n }",
"public double[][] getArrayCopy(){\r\n \tdouble[][] c = new double[this.nrow][this.ncol];\r\n\t\tfor(int i=0; i<nrow; i++){\r\n\t\t \tfor(int j=0; j<ncol; j++){\r\n\t\t \tc[i][j]=this.matrix[i][j];\r\n\t\t \t}\r\n\t\t }\r\n \treturn c;\r\n \t}",
"public Matrix(int[][] array){\n this.matriz = array;\n }",
"protected abstract NDArray[] onMatrix(NDArray matrix);",
"static double[] getArrayb(double[][] matrix) {\n double[][] res1 = transMatrix(matrix);\n double[] b = new double[res1[res1.length - 1].length];\n for (int i = 0; i < b.length; i++) {\n b[i] = res1[res1.length - 1][i];\n }\n // we get b that is array of right parts\n return b;\n }",
"protected ArrayList<double[]> newMatrix(int _rows, int _cols) {\n ArrayList<double[]> matrix = new ArrayList<double[]>();\n for (int i=0; i<_rows; i++) {\n matrix.add(new double[_cols]);\n }\n return matrix;\n }",
"double[][] makeCopy(double[][] M, int row, int column) {\n\t\tdouble _M[][] = new double[row][column];\n\t\tfor (int i = 0; i < row; i++)\n\t\t\tfor (int j = 0; j < column; j++)\n\t\t\t\t_M[i][j] = M[i][j];\n\t\treturn _M;\n\t}",
"private int[][] convertToTwnDimensionMatrix(int[] oneDimensionMatrix, int varNum)\r\n\t{\r\n\t\t// oneDimensionMatrix: the one dimension matrix that you want to convert:\r\n\t\t// matrixSize: the size (equals to the row or the column length) of the two dimension matrix of the result\r\n\t\tint[][] result = new int[varNum][varNum];\r\n\t\t\r\n\t\tfor (int m = 0; m < varNum; m++)\r\n\t\t{\r\n\t\t\tfor (int n = 0; n < varNum; n++)\r\n\t\t\t{\r\n\t\t\t\tresult[m][n] = oneDimensionMatrix[m*varNum + n];\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t return result;\r\n\t}",
"Array createArray();",
"public Matrix(double[][] matrix) {\r\n this.matrix = matrix;\r\n }",
"public static double[][] array1Dto2D(int[] matrixVal) {\n int size = (int) Math.sqrt(matrixVal.length);\n double[][] values = new double[size][size];\n int i, j, k;\n for (i = 0, k = 0; i < size; ++i) {\n for (j = 0; j < size; ++j) {\n values[i][j] = matrixVal[k];\n k++;\n }\n }\n return values;\n }",
"public int[][] create2DimArray(int row, int col) {\n\t\treturn new int[row][col];\n\t}",
"public static double[][] array1Dto2D(Integer[] matrixVal) {\n int size = (int) Math.sqrt(matrixVal.length);\n double[][] values = new double[size][size];\n int i, j, k;\n for (i = 0, k = 0; i < size; ++i) {\n for (j = 0; j < size; ++j) {\n values[i][j] = matrixVal[k];\n k++;\n }\n }\n return values;\n }",
"public double[][][] getMatrix() {\n return matrix;\n }",
"public Matrix asMatrix() {\n Matrix result;\n try {\n result = new Matrix(COMPONENTS, 1);\n asMatrix(result);\n } catch (final WrongSizeException ignore) {\n // never happens\n result = null;\n }\n return result;\n }",
"public int[][] initMatrix(int n)\n {\n\t// create an empty 2d array and return it! Simple stuff here.\n\t int[][] retMatrix = new int[n][n];\n\t return retMatrix;\n }",
"public static int[][] generateMatrix() {\n int rowsCount = RANDOM.nextInt( MAX_ROWS_COUNT ) + 1;\n int[][] result = new int[rowsCount][];\n for (int i = 0; i < rowsCount; i++) {\n result[i] = new int[RANDOM.nextInt( MAX_COLUMNS_COUNT ) + 1];\n fillArray( result[i] );\n }\n return result;\n }",
"public double[][] transpose(double[][] matrix){\n\t\tMatrix A = new Matrix(matrix).transpose();\n\t\treturn A.getArray();\n\t}",
"private static double[][] clone(double[][] matrix)\n {\n int length = matrix.length;\n double[][] clone;\n\n clone = new double[length][];\n for (int i = 0; i < length; i++)\n clone[i] = matrix[i].clone();\n return clone;\n }",
"public BigInteger[] asVector() {\n if (nrOfRows != 1 && nrOfCols != 1) {\n throw new MalformedMatrixException(\"Matrix is not a vector\");\n }\n\n if (nrOfRows == 1) {\n return inner[0];\n }\n\n BigInteger[] res = new BigInteger[nrOfRows];\n\n for (int row = 0; row < nrOfRows; row++) {\n res[row] = inner[row][0];\n }\n\n return res;\n }",
"int[][]getMatrix()throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n //StringTokenizer is useful to accept each row as a single string and then\n // divide it into token. Each token represents an array element.\n StringTokenizer st;\n for(int i=0;i<r;i++)\n {\n String s=br.readLine();\n st=new StringTokenizer(s,\" \");\n for(int j=0;j<c;j++)\n arr[i][j]=Integer.parseInt(st.nextToken());\n }\n return arr;\n }",
"public Estados[][] getMatrix() {\n return matrix;\n }",
"public int[] create1DArrayFrom2D(int[][] array2D) {\r\n\t\t//printArray2D(array2D);\r\n\t\tint[] array1D = new int[array2D.length * array2D[0].length];\r\n\t\tfor (int i = 0; i < array2D.length; i++) {\r\n\t\t\tfor (int j = 0; j < array2D[i].length; j++) {\r\n\t\t\t\t//System.out.println(\"i: \"+i+\" j: \"+j+\" length: \"+array2D[0].length);\r\n\t\t\t\tarray1D[i * array2D[0].length + j] = array2D[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//printArray1D(array1D);\r\n\t\treturn array1D;\r\n\t}",
"public MatrixArray(int[][] MA){\r\n\t\tthis.MA = MA;\r\n\t\tthis.N = MA.length;\r\n\t}",
"public int[][] toMatrix() \n {\n \tint[][] matrix = new int[2][7];\n \tfor (int i = 0; i < 14; ++i)\n \t\tmatrix[i/7][i%7] = state[i];\n \treturn matrix;\n }",
"public double[][] getArrayCopy() {\n double[][] C = new double[m][n];\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n C[i][j] = data[i][j];\n }\n }\n return C;\n }",
"public int[][] getMatrix(){\n\t\treturn matrix;\n\t}",
"public int[] boardConvertto1d() {\n for (int i = 0; i < 9; i++) {\n int row = i / 3;\n int col = i % 3;\n board[i] = board2d[row][col];\n }\n return board;\n }",
"public static int[][] intArray1Dto2D(int[] matrixVal) {\n int size = (int) Math.sqrt(matrixVal.length);\n int[][] values = new int[size][size];\n int i, j, k;\n for (i = 0, k = 0; i < size; ++i) {\n for (j = 0; j < size; ++j) {\n values[i][j] = matrixVal[k];\n k++;\n }\n }\n return values;\n }",
"public static int[][] generateMatrix(int rows, int columns) {\n\tint[][] result = new int[rows][columns];\n\tfor (int i = 0; i < rows; i++) {\n\tfor (int j = 0; j < columns; j++) {\n\tresult[i][j] = (int) (Math.random() * 100) + 1;\n\t}\n\t}\n\treturn result;\n\t}",
"public static boolean[][] cloneArray(boolean[][] matrix) {\n int length = matrix.length;\n boolean[][] target = new boolean[length][matrix[0].length];\n for (int i = 0; i < length; i++) {\n System.arraycopy(matrix[i], 0, target[i], 0, matrix[i].length);\n }\n return target;\n }",
"public int[][] generateMatrix(int n) {\n int[][] matrix = new int[n][n];\r\n generateMatrix(matrix, 0, 1);\r\n return matrix;\r\n }",
"public static int[][] makeReflexive(int[][] m)\n {\n return new int[m.length][m[0].length];\n }",
"Matrix<T> getTransposed();",
"public Matrix() {\n matrix = new double[DEFAULT_SIZE][DEFAULT_SIZE];\n }",
"public Matrix getTranspose() {\r\n double[][] jadi = new double[matrix[0].length][matrix.length];\r\n for (int i = 0; i < jadi.length; i++) {\r\n for (int j = 0; j < jadi[0].length; j++) {\r\n jadi[i][j] = matrix[j][i];\r\n }\r\n }\r\n return new Matrix(jadi);\r\n }",
"Matrix(BigInteger[][] matrix) {\n this.nrOfRows = matrix.length;\n this.nrOfCols = matrix[0].length;\n this.inner = matrix;\n }",
"BigDecimal[][] toTriangular();",
"public Matrix(double[][] array) {\n this.matrix = array;\n }",
"public int[][] getAdjacencyMatrix();",
"@Override\n public Object getNDArray() {\n NDArray<?>[] arr = new NDArray[2];\n arr[0] = new NDArray<>(getMagGrid().getFloats(), getMagGrid().getYdim(),\n getMagGrid().getXdim());\n arr[1] = new NDArray<>(getDirGrid().getFloats(), getDirGrid().getYdim(),\n getDirGrid().getXdim());\n return arr;\n }",
"public void buildLinkedListMatrixfromArray(int[][] array){\r\n\t\tElementNode temp = null;\r\n\t\tElementNode prevRow = null;\r\n\t\tfor (int i = 0; i < this.head.getOrder(); i++) {\r\n\t\t\tprevRow = head.gethead();\r\n\t\t\tif( i > 1){\r\n\t\t\t\tfor (int j = 0; j < i-1; j++) {\r\n\t\t\t\t\tprevRow = prevRow.getNextRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int j = 0; j <this.head.getOrder(); j++) {\r\n\t\t\t\tElementNode e = new ElementNode(array[i][j], null, null);\r\n\t\t\t\tif ( i==0 && j==0 ){\r\n\t\t\t\t\tthis.head.sethead(e);\r\n\t\t\t\t\tprevRow = head.gethead();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif (temp != null){\r\n\t\t\t\t\t\ttemp.setNextColumn(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(i > 0){\r\n\t\t\t\t\t\tprevRow.setNextRow(e);\r\n\t\t\t\t\t\tprevRow = prevRow.getNextColumn();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttemp = e;\r\n\t\t\t}\r\n\t\t\ttemp = null;\r\n\t\t}\r\n\t}",
"E[] toArray();",
"private String[][] createEmptyMatrix(int rows, int columns) {\r\n\t\tString[][] outputMatrix = new String[rows][columns];\r\n\t\tfor (int i = 0; i < rows; i++) {\r\n\t\t\tfor (int j = 0; j < columns; j++) {\r\n\t\t\t\toutputMatrix[i][j] = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn outputMatrix;\r\n\t}",
"public void constructArray(){\n\t\tfor (int col = 0; col < cols; col++){\n\t\t\tfor (int row = 0; row < rows; row++){\n\t\t\t\tmap[col][row] = new Pixel();\n\t\t\t}\n\t\t}\n\t}",
"private static double [][][] convertToArray1(BufferedImage image) {\n int width = image.getWidth();\n int height = image.getHeight();\n\n double [][][] result = new double [width][height][4];\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n int p = image.getRGB(x, y);\n int a = (p >> 24) & 0xff;\n int r = (p >> 16) & 0xff;\n int g = (p >> 8) & 0xff;\n int b = p & 0xff;\n\n result[x][y][0] = a;\n result[x][y][1] = r;\n result[x][y][2] = g;\n result[x][y][3] = b;\n }\n }\n return result;\n }",
"public static int[][] getZeroArray(int rowNum, int colNum) {\r\n\t\tint[][] retA = new int[rowNum][colNum];\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tretA[i][j] = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn retA;\r\n\t}",
"private int[][] deepCopy(int[][] matrix){\n int [][] myInt = new int[matrix.length][];\n for(int i = 0; i < matrix.length; i++)\n myInt[i] = matrix[i].clone();\n return myInt;\n }",
"Matrix(int rows, int columns) {\n try {\n if (rows < 1 || columns < 1) {\n throw zeroSize;\n }\n this.rows = rows;\n this.columns = columns;\n matrix = new int[rows][columns];\n\n for (int rw = 0; rw < rows; rw++) {\n for (int col = 0; col < columns; col++) {\n matrix[rw][col] = (int) Math.floor(Math.random() * 100);\n }\n }\n }\n catch (Throwable zeroSize) {\n zeroSize.printStackTrace();\n }\n\n }",
"public static int[][] makeTransitive(int[][] m)\n {\n return new int[m.length][m[0].length];\n }",
"public Matrix(){\r\n\t\t\r\n\t\t//dim = dimension; for now, only 3-dim. matrices are being handled\r\n\t\tmat = new int[dim][dim];\r\n\t\t\r\n\t\tfor(int rowi = 0; rowi < dim; rowi++ )\r\n\t\t\tfor (int coli = 0; coli < dim; coli++)\r\n\t\t\t\tmat[rowi][coli]=0;\r\n\t}",
"double[][] asDouble();",
"public DynamicArray(){\n\t \n\t array = (E[]) new Object[dim];\n }",
"Object[] toArray();",
"Object[] toArray();",
"Object[] toArray();",
"public static Matrix identityMatrix(int nrow){\r\n \tMatrix u = new Matrix(nrow, nrow);\r\n \tfor(int i=0; i<nrow; i++){\r\n \t\tu.matrix[i][i]=1.0;\r\n \t}\r\n \treturn u;\r\n \t}",
"public static int[][] makeSymmetric(int[][] m)\n { \n return new int[m.length][m[0].length];\n }",
"public static double[][] readMatrix(InputStream file) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(file));\n ArrayList<double[]> rows = new ArrayList<>();\n\n try {\n while (reader.ready()) {\n String line = reader.readLine();\n String[] splitted = line.split(\" \");\n double[] parsed = new double[splitted.length];\n for (int j = 0; j < splitted.length; j += 1) {\n parsed[j] = Double.parseDouble(splitted[j]);\n }\n rows.add(parsed);\n }\n } catch(IOException e) {\n e.printStackTrace();\n }\n\n int numRows = rows.size();\n int numCols = rows.get(0).length;\n double[][] matrix = new double[numRows][numCols];\n\n for (int currRow = 0; currRow < rows.size(); currRow += 1) {\n matrix[currRow] = rows.get(currRow);\n }\n\n return matrix;\n }",
"default Object[] toArray() {\n return toArray(new Object[0]);\n }",
"public static double[][] transposeMatrix(double[][] matrix){\n int nRows = matrix.length;\n int nColumns = matrix[0].length;\n for(int i=1; i<nRows; i++)if(matrix[i].length!=nColumns)throw new IllegalArgumentException(\"All rows must be the same length\");\n double[][] transpose = new double[nColumns][nRows];\n for(int i=0; i<nRows; i++){\n for(int j=0; j<nColumns; j++){\n transpose[j][i] = matrix[i][j];\n }\n }\n return transpose;\n }",
"private static Integer[][] createRandomStart(Integer dimension) {\n Integer[][] startmatrix = new Integer[dimension][dimension];\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n startmatrix[i][j] = (int)(Math.random() * 2);\n }\n }\n return startmatrix;\n }",
"public int[][] arrayToMatriz(int vec[]) {\r\n\t\tint matriz[][] = new int[3][3];\r\n\t\tint cont = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < matriz.length; i++) {\r\n\t\t\tfor (int j = 0; j < matriz.length; j++) {\r\n\t\t\t\tmatriz[i][j] = vec[cont];\r\n\t\t\t\tcont++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn matriz;\r\n\t}",
"public int[][] getMat() {\n // Note: java has no return read-only so we won't return matrix;\n // b\\c that would expose internal representation. Instead we will\n // copy each row into a new matrix, and return that.\n return Helper.cloneMatrix(matrix);\n }",
"private static INDArray imageToNDArray(BufferedImage image) {\n float[][][][] data = new float[1][1][image.getWidth()][image.getHeight()];\n\n // Loop through each pixel of the image\n for (int x = 0; x < image.getWidth(); x++) {\n for (int y = 0; y < image.getHeight(); y++) {\n\n // Get color components (r, g, b)\n Color color = new Color(image.getRGB(x, y));\n int red = color.getRed();\n int green = color.getGreen();\n int blue = color.getBlue();\n\n // Calculate grey scale value and normalise\n float grey = (float) (red + green + blue) / 3;\n float normalised = 1 - grey / 255.0f;\n\n // Save value into array\n data[0][0][y][x] = normalised;\n }\n }\n\n // Convert java array to NDArray\n return Nd4j.create(data);\n }",
"public Matrice(int dim){\n\t\tnr=dim;\n\t\tnc=nr;\n\t\tmat = new int[nr][nc];\n\t}",
"public int[][] generateMatrix(int n) {\n\t\tint[][] res = new int[n][n];\r\n\t\tint x = 0;\r\n\t\tint num = 1;\r\n\t\twhile (n > 1) {\r\n\t\t\tfor (int i = x; i < x + n - 1; i++)\r\n\t\t\t\tres[x][i] = num++;\r\n\t\t\tfor (int i = x; i < x + n - 1; i++)\r\n\t\t\t\tres[i][x + n - 1] = num++;\r\n\t\t\tfor (int i = x + n - 1; i > x; i--)\r\n\t\t\t\tres[x + n - 1][i] = num++;\r\n\t\t\tfor (int i = x + n - 1; i > x; i--)\r\n\t\t\t\tres[i][x] = num++;\r\n\t\t\tn -= 2;\r\n\t\t\tx++;\r\n\t\t}\r\n\t\tif (n == 1)\r\n\t\t\tres[x][x] = num;\r\n\t\treturn res;\r\n\t}",
"private static int[][][] convertToArray(BufferedImage image) {\n int width = image.getWidth();\n int height = image.getHeight();\n\n int[][][] result = new int[width][height][4];\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n int p = image.getRGB(x, y);\n int a = (p >> 24) & 0xff;\n int r = (p >> 16) & 0xff;\n int g = (p >> 8) & 0xff;\n int b = p & 0xff;\n\n result[x][y][0] = a;\n result[x][y][1] = r;\n result[x][y][2] = g;\n result[x][y][3] = b;\n }\n }\n return result;\n }",
"public Weet[] toArray(Date date) {\n c = 0;\n\n Weet[] dwArray = new Weet[size];\n Weet[] chArray = new Weet[c]; \n\n toArray(root, height, dwArray, date);\n chArray = dwArray.clone();\n return chArray;\n }",
"public int[][] generateMatrix(int n) {\n // input checking\n if (n < 0) {\n return null;\n }\n\n // start fill in the matrix (consider what happen when n == 0)\n // test case: input == 0; expect [];\n int[][] matrix = new int[n][n];\n int lo = 0, hi = matrix.length - 1;\n int num = 1;\n while (lo <= hi) {\n // pay attention to when lo == hi\n if (lo == hi) {\n matrix[lo][lo] = num;\n break;\n }\n // otherwise, fill this layer\n for (int i = lo; i < hi; i++) { // attention i < hi not i <= hi\n matrix[lo][i] = num++;\n }\n for (int i = lo; i < hi; i++) {\n matrix[i][hi] = num++;\n }\n for (int i = hi; i > lo; i--) {\n matrix[hi][i] = num++;\n }\n for (int i = hi; i > lo; i--) {\n matrix[i][lo] = num++;\n }\n lo++;\n hi--;\n }\n return matrix;\n }",
"public static Number[][] array2Object(int[][] array) {\n Number[][] ret = new Number[array.length][];\n for (int i = 0; i < array.length; i++) {\n ret[i] = ArrayUtils.toObject(array[i]);\n }\n return ret;\n }",
"public static Matrix constructWithCopy(double[][] A) throws JPARSECException {\n int m = A.length;\n int n = A[0].length;\n Matrix X = new Matrix(m,n);\n double[][] C = X.getArray();\n for (int i = 0; i < m; i++) {\n if (A[i].length != n) {\n throw new JPARSECException\n (\"All rows must have the same length.\");\n }\n for (int j = 0; j < n; j++) {\n C[i][j] = A[i][j];\n }\n }\n return X;\n }",
"public static int[][] generate(int dimension){\n int[][] matrix = new int[dimension][dimension];\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n matrix[i][j] = r.nextInt(10);\n }\n }\n return matrix;\n }",
"public ArrayList<double[]> getMatrix() {\n return matrix;\n }",
"public Matriz(int fila, int columna) {\n\t\tmatriz = new int[fila][columna];\n\t}",
"public MazeRoom[][] generate() {\n\t\tgenerate(theGrid[0][0]);\n\t\treturn theGrid;\n\t}",
"public static Object createArray(TypeList type) {\n\t\tList<Integer> listDimensions = type.getDimensions();\n\t\tint[] dimensions = new int[listDimensions.size()];\n\t\tfor (int i = 0; i < dimensions.length; i++) {\n\t\t\tdimensions[i] = listDimensions.get(i);\n\t\t}\n\n\t\tType eltType = type.getInnermostType();\n\t\treturn createArray(eltType, dimensions);\n\t}",
"public Matrix copy() {\n Matrix X = new Matrix(m,n);\n double[][] C = X.getArray();\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n C[i][j] = data[i][j];\n }\n }\n return X;\n }",
"public static Matrix oneDimensionalArrayToVector(double[] array, boolean columnVector) {\n double data[][] = new double[1][array.length]; //Create a two-dimensional array\n data[0] = array;\n Matrix result = new Matrix(data); //Now this is a row vector\n if (columnVector)\n return result.transpose(); //If we need column vector we transpose it.\n else\n return result;\n\n }",
"public double[] toArray() \r\n\t{ \r\n\t\treturn Arrays.copyOf(storico, storico.length) ; \r\n\t}",
"public Object[] toArray() {\n\n return toArray(new Object[size()]);\n }",
"public final static float[][] transpose(float[][] matrix) {\n\t\tint n = matrix[0].length;\n\t\t\n\t\tfloat[][] trans = new float[n][];\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttrans[i] = getColumnVector(matrix, i);\n\t\t}\n\t\t\n\t\treturn trans;\n\t}",
"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 static Matrix arrayToMatrix(double[] array, int rows, int cols) {\n Matrix result = new Matrix(rows, cols);\n for (int i = 0; i < rows; i++) {\n System.arraycopy(array, i * cols, result.data[i], 0, cols);\n }\n\n return result;\n }",
"public double[][] getIdentityMatrix(int size) {\n\t\tdouble[][] identityMatrix = new double[size][size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tfor (int j = 0; j < size; j++) {\n\t\t\t\tif (i == j) {\n\t\t\t\t\tidentityMatrix[i][j] = 1.;\n\t\t\t\t} else {\n\t\t\t\t\tidentityMatrix[i][j] = 0.;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn identityMatrix;\n\t}"
] | [
"0.659315",
"0.64245695",
"0.63833463",
"0.6352314",
"0.63327366",
"0.6263773",
"0.6178593",
"0.6011055",
"0.5999065",
"0.5907879",
"0.59073985",
"0.58883554",
"0.5886955",
"0.5880521",
"0.58269155",
"0.5822845",
"0.58182424",
"0.5814935",
"0.58094066",
"0.580378",
"0.5787372",
"0.5775934",
"0.5757441",
"0.5743498",
"0.5727719",
"0.5717752",
"0.57078475",
"0.56972355",
"0.5686491",
"0.5633794",
"0.56018186",
"0.55872035",
"0.5585986",
"0.55693763",
"0.55586255",
"0.55492735",
"0.55423105",
"0.55332744",
"0.5529504",
"0.55075336",
"0.5506506",
"0.5504584",
"0.54985404",
"0.54848033",
"0.5474395",
"0.5469025",
"0.5464889",
"0.54646194",
"0.5451877",
"0.54438746",
"0.5442884",
"0.5429782",
"0.5426755",
"0.54166263",
"0.54090184",
"0.5398919",
"0.53833866",
"0.53833747",
"0.53712636",
"0.53563213",
"0.5338721",
"0.5336907",
"0.53278065",
"0.5326907",
"0.53022474",
"0.5291916",
"0.52884763",
"0.5286946",
"0.5270621",
"0.5270621",
"0.5270621",
"0.5270559",
"0.5270195",
"0.5261399",
"0.5260556",
"0.52578557",
"0.52513593",
"0.524061",
"0.5238962",
"0.5238653",
"0.52368224",
"0.52278066",
"0.5223371",
"0.52133924",
"0.5212806",
"0.51991117",
"0.51982933",
"0.51969564",
"0.5196502",
"0.5190057",
"0.51780266",
"0.5175561",
"0.51748633",
"0.5173237",
"0.5171611",
"0.51704067",
"0.51539",
"0.5144737",
"0.5141166",
"0.51397055"
] | 0.66416335 | 0 |
Creates a matrix with the given rows and columns from a one dimensional array. | public static Matrix arrayToMatrix(double[] array, int rows, int cols) {
Matrix result = new Matrix(rows, cols);
for (int i = 0; i < rows; i++) {
System.arraycopy(array, i * cols, result.data[i], 0, cols);
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Matrix(int[][] array){\n this.matriz = array;\n }",
"public Matrix(int[][] array)\n {\n matrix = array;\n }",
"public void buildLinkedListMatrixfromArray(int[][] array){\r\n\t\tElementNode temp = null;\r\n\t\tElementNode prevRow = null;\r\n\t\tfor (int i = 0; i < this.head.getOrder(); i++) {\r\n\t\t\tprevRow = head.gethead();\r\n\t\t\tif( i > 1){\r\n\t\t\t\tfor (int j = 0; j < i-1; j++) {\r\n\t\t\t\t\tprevRow = prevRow.getNextRow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int j = 0; j <this.head.getOrder(); j++) {\r\n\t\t\t\tElementNode e = new ElementNode(array[i][j], null, null);\r\n\t\t\t\tif ( i==0 && j==0 ){\r\n\t\t\t\t\tthis.head.sethead(e);\r\n\t\t\t\t\tprevRow = head.gethead();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif (temp != null){\r\n\t\t\t\t\t\ttemp.setNextColumn(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(i > 0){\r\n\t\t\t\t\t\tprevRow.setNextRow(e);\r\n\t\t\t\t\t\tprevRow = prevRow.getNextColumn();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttemp = e;\r\n\t\t\t}\r\n\t\t\ttemp = null;\r\n\t\t}\r\n\t}",
"public Matrix( int a ) {\n\tmatrix = new Object[a][a];\n }",
"public Matrix(double[][] array) {\n this.array = array; // note: danger!\n }",
"Matrix(double[][] input) {\n matrixVar = input;\n columns = matrixVar[0].length;\n rows = matrixVar.length;\n }",
"public static Matrix rows(double[] rs) {\n\t\tint rows = rs.length;\n\t\tint columns = 1;\n\t\tMatrix m = new Matrix(rows, columns);\n\t\tfor (int r = 0; r < rows; r++) {\n\t\t\tm.matrix[r][0] = rs[r];\n\t\t}\n\t\treturn m;\n\t}",
"Matrix(int r,int c)\n {\n this.r=r;\n this.c=c;\n arr=new int[r][c];\n }",
"public Matrix(double[][] array) {\n this.matrix = array;\n }",
"Matrix(int rows, int columns) {\n try {\n if (rows < 1 || columns < 1) {\n throw zeroSize;\n }\n this.rows = rows;\n this.columns = columns;\n matrix = new int[rows][columns];\n\n for (int rw = 0; rw < rows; rw++) {\n for (int col = 0; col < columns; col++) {\n matrix[rw][col] = (int) Math.floor(Math.random() * 100);\n }\n }\n }\n catch (Throwable zeroSize) {\n zeroSize.printStackTrace();\n }\n\n }",
"public int[][] initMatrix(int n)\n {\n\t// create an empty 2d array and return it! Simple stuff here.\n\t int[][] retMatrix = new int[n][n];\n\t return retMatrix;\n }",
"protected ArrayList<double[]> newMatrix(int _rows, int _cols) {\n ArrayList<double[]> matrix = new ArrayList<double[]>();\n for (int i=0; i<_rows; i++) {\n matrix.add(new double[_cols]);\n }\n return matrix;\n }",
"public Matrix(int nrOfRows, int nrOfCols) {\n this.nrOfRows = nrOfRows;\n this.nrOfCols = nrOfCols;\n inner = new BigInteger[nrOfRows][nrOfCols];\n }",
"protected abstract T createMatrix( int numRows, int numCols, MatrixType type );",
"public static Matrix buildMatrixFromCommandLine (){\n\n int M = 0;\n int N = 0;\n double[][] data;\n\n M = new Double(getDoubleWithMessage(\"Enter rows number: \")).intValue();\n N = new Double(getDoubleWithMessage(\"Enter columns number: \")).intValue();\n System.out.println(\"You have matrix: \" + M + \"x\" + N);\n\n data = new double[M][N];\n\n for (int i = 0; i < M; i++){\n System.out.println(\"Row: \" + i);\n for (int j = 0; j < N; j++){\n data[i][j] = getDoubleWithMessage(\"Column: \" + j);\n }\n }\n return new Matrix(data);\n }",
"public DenseMatrix( int rows , int columns )\n\t{\n\t\tsuper( rows , columns );\n\n\t\tmatrixData\t\t= new double[ rows ][ columns ];\n\t}",
"public static Matrix identityMatrix(int nrow){\r\n \tMatrix u = new Matrix(nrow, nrow);\r\n \tfor(int i=0; i<nrow; i++){\r\n \t\tu.matrix[i][i]=1.0;\r\n \t}\r\n \treturn u;\r\n \t}",
"Matrix(){\n matrixVar = new double[1][1];\n rows = 1;\n columns = 1;\n }",
"public Matrix(int rows, int cols) {\n this.rows = rows;\n this.cols = cols;\n data = new double[rows][cols];\n }",
"public static int[][] generateMatrix() {\n int rowsCount = RANDOM.nextInt( MAX_ROWS_COUNT ) + 1;\n int[][] result = new int[rowsCount][];\n for (int i = 0; i < rowsCount; i++) {\n result[i] = new int[RANDOM.nextInt( MAX_COLUMNS_COUNT ) + 1];\n fillArray( result[i] );\n }\n return result;\n }",
"public Matrix(int[][] rows) {\n\t\tComplexNumber[][] complexRows = new ComplexNumber[rows.length][];\n\t\tfor (int row = 0; row < rows.length; row++) {\n\t\t\tcomplexRows[row] = new ComplexNumber[rows[row].length];\n\t\t\tfor (int col = 0; col < rows[row].length; col++) {\n\t\t\t\tFraction real = new Fraction(rows[row][col]);\n\t\t\t\tFraction imaginary = new Fraction(0);\n\t\t\t\tcomplexRows[row][col] = new ComplexNumber(real, imaginary);\n\t\t\t}\n\t\t}\n\t\tROWS = complexRows;\n\t\tM = complexRows.length;\n\t\tN = complexRows[0].length;\n\t\tfor (int row = 0; row < M; row++) {\n\t\t\tif (complexRows[row].length != N) {\n\t\t\t\tthrow new RuntimeException(\"Non-Rectangular Matrix!\");\n\t\t\t}\n\t\t}\n\t}",
"public Matrix(ComplexNumber[][] rows) {\n\t\tROWS = rows;\n\t\tM = rows.length;\n\t\tN = rows[0].length;\n\t\tfor (int row = 0; row < M; row++) {\n\t\t\tif (rows[row].length != N) {\n\t\t\t\tthrow new RuntimeException(\"Non-Rectangular Matrix!\");\n\t\t\t}\n\t\t}\n\t}",
"static int[][] getColumns(int[] array){\n int[][] rezultArray = new int[n][n];\n int index = 0;\n for (int i = 0; i < n; i++){\n for (int j = i; j < n * n; j += n){\n rezultArray[i][index++] = array[j];\n }\n index = 0;\n }\n return rezultArray;\n }",
"public Matrix(int rows, int columns) {\n\t\tthis.rows = rows;\n\t\tthis.columns = columns;\n\t\tthis.matrix = new double[rows][columns];\n\t}",
"public Matrix(double[] data) {\n m = data.length;\n n = 1;\n this.data = new double[m][n];\n for (int i = 0; i < m; i++)\n {\n for (int j = 0; j < n; j++)\n {\n \tthis.data[i][j] = data[i];\n }\n }\n }",
"public JCudaMatrix(int rows) {\n this(rows, 1);\n }",
"public int[][] generateMatrix(int n) {\n int[][] matrix = new int[n][n];\r\n generateMatrix(matrix, 0, 1);\r\n return matrix;\r\n }",
"public Matrix(int rowCount, int columnCount) {\n this.rowCount = rowCount;\n this.columnCount = columnCount;\n data = new double[rowCount][columnCount];\n }",
"public static int[][] generateMatrix(int rows, int columns) {\n\tint[][] result = new int[rows][columns];\n\tfor (int i = 0; i < rows; i++) {\n\tfor (int j = 0; j < columns; j++) {\n\tresult[i][j] = (int) (Math.random() * 100) + 1;\n\t}\n\t}\n\treturn result;\n\t}",
"public MatrixArray(int[][] MA){\r\n\t\tthis.MA = MA;\r\n\t\tthis.N = MA.length;\r\n\t}",
"public Matrix(int n) {\n\t\tsize = n;\n\t\tm = new int[size][size];\n\t}",
"public Matrix(double[][] A, int m, int n) {\n this.data = A;\n this.m = m;\n this.n = n;\n }",
"public static void initTwoD(int[][] array) {\n System.out.println(\"Entering random numbers in matrix of \" + array.length + \" rows and \" + array[0].length + \" columns: \");\n for (int row = 0; row < array.length; row++) {\n for (int column = 0; column < array[0].length; column++) {\n array[row][column] = (int) (Math.random() * 100);\n }\n }\n\n }",
"public static Matrix constructWithCopy(double[][] A) throws JPARSECException {\n int m = A.length;\n int n = A[0].length;\n Matrix X = new Matrix(m,n);\n double[][] C = X.getArray();\n for (int i = 0; i < m; i++) {\n if (A[i].length != n) {\n throw new JPARSECException\n (\"All rows must have the same length.\");\n }\n for (int j = 0; j < n; j++) {\n C[i][j] = A[i][j];\n }\n }\n return X;\n }",
"public int[][] matrixCID(String[] array){\n\t\tint[][] matrix = new int[array.length-1][5];\n\t\tfor(int i = 1; i < array.length; i++){\n\t\t\tString[] words = toWord(array[i]);\t\n\t\t\tmatrix[i-1][0] = Integer.valueOf(words[0]); //CID\n\t\t\tmatrix[i-1][1] = Integer.valueOf(words[2]); //POP\n\t\t\tmatrix[i-1][2] = 0; //default length\n\t\t\tmatrix[i-1][3] = 0; //default chunk size\n\t\t\tmatrix[i-1][4] = 0; //default chunk pieces\n\t\t}\n\t\treturn matrix;\n\t}",
"public Matrix(double[][] A) throws JPARSECException {\n m = A.length;\n n = A[0].length;\n for (int i = 0; i < m; i++) {\n if (A[i].length != n) {\n throw new JPARSECException(\"All rows must have the same length.\");\n }\n }\n this.data = A;\n }",
"private String[][] createEmptyMatrix(int rows, int columns) {\r\n\t\tString[][] outputMatrix = new String[rows][columns];\r\n\t\tfor (int i = 0; i < rows; i++) {\r\n\t\t\tfor (int j = 0; j < columns; j++) {\r\n\t\t\t\toutputMatrix[i][j] = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn outputMatrix;\r\n\t}",
"private Board(int[][] array)\n\t{\n\t\tcols = 0;\n\t\trows = array.length;\n\t\tif (rows > 0)\n\t\t\tcols = array[0].length;\n\t\t\n\t\tpieces = new int[rows][cols];\n\t\tif (pieces.length > 0)\n\t\t{\n\t\t\tfor (int i = 0; i < pieces.length; i++)\n\t\t\t\tfor (int j = 0; j < pieces[0].length; j++)\n\t\t\t\t\tpieces[i][j] = array[i][j];\n\t\t}\n\t}",
"public Matrix(int nrow, int ncol){\r\n\t\tthis.nrow = nrow;\r\n\t\tthis.ncol = ncol;\r\n\t \tthis.matrix = new double[nrow][ncol];\r\n\t\tthis.index = new int[nrow];\r\n for(int i=0;i<nrow;i++)this.index[i]=i;\r\n }",
"public Matriz(int fila, int columna) {\n\t\tmatriz = new int[fila][columna];\n\t}",
"public Matrice(int dim){\n\t\tnr=dim;\n\t\tnc=nr;\n\t\tmat = new int[nr][nc];\n\t}",
"public static int[][] fillColumnMajor(int[] vals, int rows, int cols)\n {\n int[][] mat = new int[rows][cols];\n \n int vIndex = 0;\n for(int c = 0; c < mat[0].length; c++)\n {\n for(int r = 0; r < mat.length; r++)\n {\n mat[r][c] = vals[vIndex];\n vIndex++;\n }\n }\n \n return mat;\n }",
"public static void SumRowsColumns(int[][] array) {\n\n }",
"public Matrix(double[][] data) {\n rowCount = data.length;\n columnCount = data[0].length;\n this.data = new double[rowCount][columnCount];\n for (int i = 0; i < rowCount; i++)\n for (int j = 0; j < columnCount; j++)\n this.data[i][j] = data[i][j];\n }",
"public static int[][] readTwoDimensionalArray(int rows, int cols) {\n\n\t\tint[][] temp = new int[rows][cols];\n\n\t\tfor (int row = 0; row < temp.length; row++) { // length of a 2-D array = no. of rows in the 2-d array\n\t\t\tfor (int col = 0; col < temp[row].length; col++) { // number of columns \n\t\t\t\tSystem.out.print(\"Enter the element at row \" + row + \" and at col \" + col + \" : \");\n\t\t\t\ttemp[row][col] = UserIO.readInt();\n\t\t\t}\n\t\t}\n\n\t\treturn temp;\n\t}",
"public static Matrix Identity(int n) {\n List<List<Double>> backingArray = get2DListOfSize(n);\n for(int i = 0; i < n; i++)\n backingArray.get(i).set(i, 1d);\n return new Matrix(backingArray);\n }",
"public Matrix(Fraction[][] rows) {\n\t\tComplexNumber[][] complexRows = new ComplexNumber[rows.length][];\n\t\tfor (int row = 0; row < rows.length; row++) {\n\t\t\tcomplexRows[row] = new ComplexNumber[rows[row].length];\n\t\t\tfor (int col = 0; col < rows[row].length; col++) {\n\t\t\t\tcomplexRows[row][col] = new ComplexNumber(rows[row][col]);\n\t\t\t}\n\t\t}\n\t\tROWS = complexRows;\n\t\tM = complexRows.length;\n\t\tN = complexRows[0].length;\n\t\tfor (int row = 0; row < M; row++) {\n\t\t\tif (complexRows[row].length != N) {\n\t\t\t\tthrow new RuntimeException(\"Non-Rectangular Matrix!\");\n\t\t\t}\n\t\t}\n\t}",
"private static int[][] transpose(int[][] array) {\n if (array.length == 0 || array[0].length == 0)\n return array;\n int[][] transposed = new int[array[0].length][];\n for (int row = 0; row < array[0].length; row++)\n transposed[row] = new int[array.length];\n for (int row = 0; row < array[0].length; row++)\n for (int col = 0; col < array.length; col++)\n transposed[row][col] = array[col][row];\n return transposed;\n }",
"public int[][] generateMatrix(int n) {\n\t\tint[][] res = new int[n][n];\r\n\t\tint x = 0;\r\n\t\tint num = 1;\r\n\t\twhile (n > 1) {\r\n\t\t\tfor (int i = x; i < x + n - 1; i++)\r\n\t\t\t\tres[x][i] = num++;\r\n\t\t\tfor (int i = x; i < x + n - 1; i++)\r\n\t\t\t\tres[i][x + n - 1] = num++;\r\n\t\t\tfor (int i = x + n - 1; i > x; i--)\r\n\t\t\t\tres[x + n - 1][i] = num++;\r\n\t\t\tfor (int i = x + n - 1; i > x; i--)\r\n\t\t\t\tres[i][x] = num++;\r\n\t\t\tn -= 2;\r\n\t\t\tx++;\r\n\t\t}\r\n\t\tif (n == 1)\r\n\t\t\tres[x][x] = num;\r\n\t\treturn res;\r\n\t}",
"public Matrix(double[][] data) {\n rows = data.length;\n cols = data[0].length;\n this.data = new double[rows][cols];\n for (int i = 0; i < data.length; i++) {\n System.arraycopy(data[i], 0, this.data[i], 0, data[i].length);\n }\n }",
"private double[][] convertArrayToMatrix(ArrayList<String> data, int row, int column) {\n int ct = 0;\n double[][] mat = new double[row][column];\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < column; j++) {\n mat[i][j] = Double.parseDouble(data.get(ct));\n ct++;\n }\n }\n /*for (String s : data) {\n mat[i][j] = Double.parseDouble(s);\n i++;\n if (i == row) {\n i = 0;\n j++;\n }\n if (i == row && j == column) {\n break;\n }\n }*/\n return mat;\n }",
"public Matrix(double[][] data) {\n M = data.length;\n N = data[0].length;\n this.data = new double[M][N];\n for (int i = 0; i < M; i++)\n for (int j = 0; j < N; j++)\n this.data[i][j] = data[i][j];\n }",
"public int[][] create2DimArray(int row, int col) {\n\t\treturn new int[row][col];\n\t}",
"public int[][] arrayToMatriz(int vec[]) {\r\n\t\tint matriz[][] = new int[3][3];\r\n\t\tint cont = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < matriz.length; i++) {\r\n\t\t\tfor (int j = 0; j < matriz.length; j++) {\r\n\t\t\t\tmatriz[i][j] = vec[cont];\r\n\t\t\t\tcont++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn matriz;\r\n\t}",
"public Matrix(double[][] twoD){\r\n\t\tthis.nrow = twoD.length;\r\n\t\tthis.ncol = twoD[0].length;\r\n\t\tfor(int i=0; i<nrow; i++){\r\n\t\t if(twoD[i].length!=ncol)throw new IllegalArgumentException(\"All rows must have the same length\");\r\n\t\t}\r\n\t\tthis.matrix = twoD;\r\n\t\tthis.index = new int[nrow];\r\n for(int i=0;i<nrow;i++)this.index[i]=i;\r\n \t}",
"public void constructArray(){\n\t\tfor (int col = 0; col < cols; col++){\n\t\t\tfor (int row = 0; row < rows; row++){\n\t\t\t\tmap[col][row] = new Pixel();\n\t\t\t}\n\t\t}\n\t}",
"public void setTwoDarray(double[][] aarray){\r\n\t\tif(this.nrow != aarray.length)throw new IllegalArgumentException(\"row length of this Matrix differs from that of the 2D array argument\");\r\n\t\tif(this.ncol != aarray[0].length)throw new IllegalArgumentException(\"column length of this Matrix differs from that of the 2D array argument\");\r\n\t\tfor(int i=0; i<nrow; i++){\r\n\t\t \tif(aarray[i].length!=ncol)throw new IllegalArgumentException(\"All rows must have the same length\");\r\n \t\t\tfor(int j=0; j<ncol; j++){\r\n \t\t \t\tthis.matrix[i][j]=aarray[i][j];\r\n \t\t\t}\r\n\t\t}\r\n\t}",
"public int[][] generateMatrix(int n) {\n // input checking\n if (n < 0) {\n return null;\n }\n\n // start fill in the matrix (consider what happen when n == 0)\n // test case: input == 0; expect [];\n int[][] matrix = new int[n][n];\n int lo = 0, hi = matrix.length - 1;\n int num = 1;\n while (lo <= hi) {\n // pay attention to when lo == hi\n if (lo == hi) {\n matrix[lo][lo] = num;\n break;\n }\n // otherwise, fill this layer\n for (int i = lo; i < hi; i++) { // attention i < hi not i <= hi\n matrix[lo][i] = num++;\n }\n for (int i = lo; i < hi; i++) {\n matrix[i][hi] = num++;\n }\n for (int i = hi; i > lo; i--) {\n matrix[hi][i] = num++;\n }\n for (int i = hi; i > lo; i--) {\n matrix[i][lo] = num++;\n }\n lo++;\n hi--;\n }\n return matrix;\n }",
"public static Matrix oneDimensionalArrayToVector(double[] array, boolean columnVector) {\n double data[][] = new double[1][array.length]; //Create a two-dimensional array\n data[0] = array;\n Matrix result = new Matrix(data); //Now this is a row vector\n if (columnVector)\n return result.transpose(); //If we need column vector we transpose it.\n else\n return result;\n\n }",
"Actor[][] toMatrix(Actor[] distArray, int nLocations, Actor[][] world) {\n int length = (int) Math.sqrt(nLocations);\n world = new Actor[length][length];\n\n int n = 0;\n for (int i = 0; i < length; i++) {\n for (int j = 0; j < length; j++) {\n world[i][j] = distArray[n];\n n++;\n }\n }\n return world;\n }",
"public static Matrix identity(int n) {\n\t\tComplexNumber[][] rows = new ComplexNumber[n][];\n\t\tfor (int row = 0; row < n; row++) {\n\t\t\trows[row] = new ComplexNumber[n];\n\t\t\tfor (int col = 0; col < n; col++) {\n\t\t\t\tint term = (row == col) ? 1 : 0;\n\t\t\t\trows[row][col] = new ComplexNumber(term);\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(rows);\n\t}",
"public Matrix() {\n\tmatrix = new Object[DEFAULT_SIZE][DEFAULT_SIZE];\n }",
"public Matrix(int m, int n) {\n this.m = m;\n this.n = n;\n data = new double[m][n];\n }",
"public Matrix(int x, int y) {\n\t\tnrow=x;\n\t\tncol=y;\n\t\tmat = new int[x][y];\n\t\t\n\n\t}",
"public TicTacToeBoard() {board = new int[rows][columns];}",
"public Matrix(){\r\n\t\t\r\n\t\t//dim = dimension; for now, only 3-dim. matrices are being handled\r\n\t\tmat = new int[dim][dim];\r\n\t\t\r\n\t\tfor(int rowi = 0; rowi < dim; rowi++ )\r\n\t\t\tfor (int coli = 0; coli < dim; coli++)\r\n\t\t\t\tmat[rowi][coli]=0;\r\n\t}",
"public static int[][] intArray1Dto2D(int[] matrixVal) {\n int size = (int) Math.sqrt(matrixVal.length);\n int[][] values = new int[size][size];\n int i, j, k;\n for (i = 0, k = 0; i < size; ++i) {\n for (j = 0; j < size; ++j) {\n values[i][j] = matrixVal[k];\n k++;\n }\n }\n return values;\n }",
"public Matrix(int n) {\n\t\tif (n < 1) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tthis.n = n;\n\t\tthis.content = new double[n][n];\n\t\tthis.hash = hashCode();\n\t}",
"public int[][] generateMatrix(int n) {\n\t\tint[][] res = {};\n\t\tif (n <= 0) {\n\t\t\treturn res;\n\t\t}\n\t\tres = new int[n][n];\n\t\tint x = 0;\n\t\tint y = 0;\n\t\tint count = 1;\n\n\t\twhile (n > 0) {\n\t\t\tif (n == 1) {\n\t\t\t\tres[x][y] = count;\n\t\t\t}\n\t\t\t// move right\n\t\t\tfor (int i = 0; i < n - 1; ++i) {\n\t\t\t\tres[x][y++] = count++;\n\t\t\t}\n\t\t\t// move down\n\t\t\tfor (int i = 0; i < n - 1; ++i) {\n\t\t\t\tres[x++][y] = count++;\n\t\t\t}\n\t\t\t// move left\n\t\t\tfor (int i = 0; i < n - 1; ++i) {\n\t\t\t\tres[x][y--] = count++;\n\t\t\t}\n\t\t\t// move up\n\t\t\tfor (int i = 0; i < n - 1; ++i) {\n\t\t\t\tres[x--][y] = count++;\n\t\t\t}\n\t\t\tx = x + 1;\n\t\t\ty = y + 1;\n\t\t\tn = n - 2;\n\t\t}\n\t\treturn res;\n\t}",
"public Matrix(double vals[], int m) throws JPARSECException {\n this.m = m;\n n = (m != 0 ? vals.length/m : 0);\n if (m*n != vals.length) {\n throw new JPARSECException(\"Array length must be a multiple of m.\");\n }\n data = new double[m][n];\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n data[i][j] = vals[i+j*m];\n }\n }\n }",
"public static int[][] init2DArray(int count){\r\n return new int[count][count];\r\n }",
"public int[][] generateMatrix(int n) {\n\t\tif (n <= 0) {\n\t\t\treturn new int[0][0];\n\t\t}\n\n\t\tint[][] res = new int[n][n];\n\t\tint num = 1;\n\t\tint r1 = 0, c1 = 0, r2 = n-1, c2 = n-1;\n\t\twhile (r1 <= r2 && c1 <= c2) {\n\t\t\tfor (int c = c1; c <= c2; c++) {\n\t\t\t\tres[r1][c] = num++;\n\t\t\t}\n\n\t\t\tfor (int r = r1 + 1; r <= r2; r++) {\n\t\t\t\tres[r][c2] = num++;\n\t\t\t}\n\n\t\t\tif (r1 < r2) {\n\t\t\t\tfor (int c = c2 - 1; c > c1; c--) {\n\t\t\t\t\tres[r2][c] = num++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (c1 < c2) {\n\t\t\t\tfor (int r = r2; r > r1; r--) {\n\t\t\t\t\tres[r][c1] = num++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tr1++;\n\t\t\tc1++;\n\t\t\tr2--;\n\t\t\tc2--;\n\t\t}\n\n\t\treturn res;\n\t}",
"public static double[][] array1Dto2D(int[] matrixVal) {\n int size = (int) Math.sqrt(matrixVal.length);\n double[][] values = new double[size][size];\n int i, j, k;\n for (i = 0, k = 0; i < size; ++i) {\n for (j = 0; j < size; ++j) {\n values[i][j] = matrixVal[k];\n k++;\n }\n }\n return values;\n }",
"public static double[][] array1Dto2D(Integer[] matrixVal) {\n int size = (int) Math.sqrt(matrixVal.length);\n double[][] values = new double[size][size];\n int i, j, k;\n for (i = 0, k = 0; i < size; ++i) {\n for (j = 0; j < size; ++j) {\n values[i][j] = matrixVal[k];\n k++;\n }\n }\n return values;\n }",
"public Matrice(int nr, int nc){\n\t\tthis.nr=nr;\n\t\tthis.nc=nc;\n\t\tmat = new int[nr][nc];\n\t}",
"int[][]getMatrix()throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n //StringTokenizer is useful to accept each row as a single string and then\n // divide it into token. Each token represents an array element.\n StringTokenizer st;\n for(int i=0;i<r;i++)\n {\n String s=br.readLine();\n st=new StringTokenizer(s,\" \");\n for(int j=0;j<c;j++)\n arr[i][j]=Integer.parseInt(st.nextToken());\n }\n return arr;\n }",
"public SudokuSolver(int[][] m) {\n // ideally we would have liked to have just done:\n // this.matrix = m; but this would allow outside class\n // to change our internal representation, safer to copy instead.\n // Note: intentionally not doing a clone of rows.\n matrix = new int[DIM][DIM];\n IntStream.range(0, DIM * DIM)\n .forEach(\n n -> {\n int i = n / DIM;\n int j = n % DIM;\n matrix[i][j] = m[i][j];\n });\n }",
"public static <T> T[][] clone2DArray(T[][] array) {\r\n\t int rows = array.length ;\r\n\r\n\t //clone the 'shallow' structure of array\r\n\t T[][] newArray = array.clone();\r\n\r\n\t //clone the 'deep' structure of array\r\n\t for(int row = 0 ; row < rows; row++){\r\n\t newArray[row] = array[row].clone();\r\n\t }\r\n\r\n\t return newArray;\r\n\t}",
"public void createGrid(int rows, int columns){\n\t\ttheGrid = new boolean[rows][columns];\n\t\tthis.rows = rows;\n\t\tthis.columns = columns;\n\t\tclearGrid();\n\t}",
"public static String[][] createBoard() {\r\n final int ROW_LENGTH = 10;\r\n final int COL_LENGTH = 10;\r\n String[][] board = new String[ROW_LENGTH][COL_LENGTH];\r\n for (int r = 0; r < board.length; r++) {\r\n for (int c = 0; c < board[0].length; c++) {\r\n board[r][c] = \" * \";\r\n }\r\n }\r\n return board;\r\n }",
"public Matrix(int rowSize, int columnSize) {\n if (rowSize < 1 || columnSize < 1) {\n matrix = new double[DEFAULT_SIZE][DEFAULT_SIZE];\n } else {\n matrix = new double[rowSize][columnSize];\n }\n }",
"public int[][] toCloneMatrix(String[] array, int length){\n\t\tint[][] matrix = new int[length][4];\n\t\tfor(int i = 0; i < length; i++){\t\t\n\t\t\tfor(int j = 0; j < 6; j++){\t\n\t\t\t\tif(j == 0){\n\t\t\t\t\tmatrix[i][j] = Integer.valueOf(toWord(array[i])[0]); //matrix[i][0] = array[i][0] CLONE ID\n\t\t\t\t}\n\t\t\t\telse if(j == 1){\n\t\t\t\t\tString temp = toWord(array[i])[1];\n\t\t\t\t\tString[] tempArray = temp.split(\"\\\\.\");\n\t\t\t\t\tmatrix[i][j] = Integer.valueOf(tempArray[0]); //matrix[i][1] = array[i][1] FILE ID\n\t\t\t\t}\n\t\t\t\telse if(j == 2){\n\t\t\t\t\tString temp = toWord(array[i])[1];\n\t\t\t\t\tString[] tempArray = temp.split(\"\\\\.\");\n\t\t\t\t\ttemp = tempArray[1]; //bg-end\n\t\t\t\t\ttempArray = temp.split(\"\\\\-\");\n\t\t\t\t\tmatrix[i][j] = Integer.valueOf(tempArray[0]); //matrix[i][2] = array[i][2] SL\n\t\t\t\t}\n\t\t\t\telse if(j == 3){\n\t\t\t\t\tString temp = toWord(array[i])[1];\n\t\t\t\t\tString[] tempArray = temp.split(\"\\\\.\");\n\t\t\t\t\ttemp = tempArray[1]; //bg-end\n\t\t\t\t\ttempArray = temp.split(\"\\\\-\");\n\t\t\t\t\tmatrix[i][j] = Integer.valueOf(tempArray[1]); //matrix[i][3] = array[i][3] EL\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn matrix;\n\t}",
"public Table2D(double[] rowVals, double[] colVals) {\n\n this.rowVals = rowVals;\n this.colVals = colVals;\n this.numRows = rowVals.length;\n this.numCols = colVals.length;\n\n data = new double[numRows][numCols];\n\n }",
"public static void createsparse() {\n\t\tmatrix=new int[row][col];\n\t\tString sparseRow=\"\";\n\t\t\n\t\ttry{\n\t Scanner reader = new Scanner(file);\n\t int counter=0;\n\t while(reader.hasNextLine()){\n\t sparseRow=reader.nextLine();\n\t String[] seperatedRow = sparseRow.split(\"\\t\");\n\t for(int i=0;i<seperatedRow.length;i++) {\n\t \t matrix[counter][i]=Integer.parseInt(seperatedRow[i]);\n\t }\n\t counter++;\n\t }\n\t reader.close();\n\t }catch (FileNotFoundException e) {\n\t \t e.printStackTrace();\n\t }\n\t}",
"public static void main(String[] args) {\n\t\tint[][] array = new int[5][6];\r\n\t\tint[] x = {1,2};array[0] = x;\r\n\t\tSystem.out.println(\"array[0][1] is \" + array[0][1]);\r\n\t\tSystem.out.println(Arrays.deepToString(array));\r\n\t\t\r\n\t\tint[][] arr = {{1,2}, {3,4}, {5,6}};\r\n\t\tfor (int i = arr.length - 1; i >= 0; i--) \r\n\t\t{for (int j = arr[i].length - 1; j >= 0; j--)\r\n\t\t\tSystem.out.print(arr[i][j] + \" \");\r\n\t\tSystem.out.println();\r\n\t\t}\r\n\t\tint[][] array1 = {{1,2}, {3,4}, {5,6}};\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < array1.length; i++)\r\n\t\t\tsum += array1[i][0];\r\n\t\tSystem.out.println(sum);\r\n\t\r\n\tint [][]matrix = new int [10] [10];\r\n\t\r\n\tfor (int row = 0; row < matrix.length; row++) {\r\n\t\tfor (int column = 0; column < matrix[row].length; column++) {\r\n\t\tmatrix[row][column] = (int)(Math.random() * 100); }}\r\n\tSystem.out.println(Arrays.deepToString(matrix));\r\n\r\n\tfor (int i = 0; i < matrix.length; i++) {\r\n\t\tfor (int j = 0; j < matrix[i].length; j++) {\r\n\t\t\tint i1 = (int)(Math.random() * matrix.length);\r\n\t\t\tint j1 = (int)(Math.random() * matrix[i].length);\r\n\t\t\tint temp = matrix[i][j];\r\n\t\t\tmatrix[i][j] = matrix[i1][j1];\r\n\t\t\tmatrix[i1][j1] = temp;\r\n\t\t}\r\n\t}System.out.println(Arrays.deepToString(matrix));\r\n\t}",
"public static int[][] createBoard() {\r\n\r\n\t\tint[][] board = new int[9][9];\r\n\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\tfor (int j = 0; j < 9; j++)\r\n\t\t\t\tboard[i][j] = scan.nextInt();\r\n\t\t}\r\n\t\treturn board;\r\n\r\n\t}",
"private int[][] convertToTwnDimensionMatrix(int[] oneDimensionMatrix, int varNum)\r\n\t{\r\n\t\t// oneDimensionMatrix: the one dimension matrix that you want to convert:\r\n\t\t// matrixSize: the size (equals to the row or the column length) of the two dimension matrix of the result\r\n\t\tint[][] result = new int[varNum][varNum];\r\n\t\t\r\n\t\tfor (int m = 0; m < varNum; m++)\r\n\t\t{\r\n\t\t\tfor (int n = 0; n < varNum; n++)\r\n\t\t\t{\r\n\t\t\t\tresult[m][n] = oneDimensionMatrix[m*varNum + n];\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t return result;\r\n\t}",
"public static void RepeatedElementsRow(int[][] array) {\n\n }",
"public int[][] generateMatrix(int n) {\n \n int[][] matrix = new int[n][n];\n \n int i = 0, j = 0, direction = 0;\n \n int right = n - 1, left = 0, top = 1, bottom = n - 1, count = 1;\n \n while (count <= n * n && i >= 0 && i < n && j >= 0 && j < n) {\n switch (direction) {\n case 0:\n if (j == right) {\n matrix[i++][j] = count;\n right--;\n direction = 1;\n } else {\n matrix[i][j++] = count;\n }\n break;\n case 1:\n if (i == bottom) {\n matrix[i][j--] = count;\n bottom--;\n direction = 2;\n } else {\n matrix[i++][j] = count;\n }\n break;\n case 2:\n if (j == left) {\n matrix[i--][j] = count;\n left++;\n direction = 3;\n } else {\n matrix[i][j--] = count;\n }\n break;\n case 3:\n if (i == top) {\n matrix[i][j++] = count;\n top++;\n direction = 0;\n } else {\n matrix[i--][j] = count;\n }\n break;\n }\n count++;\n }\n \n return matrix;\n }",
"private void generateRows() {\n\t\tfor (int i=0; i<squares.length; i++) {\n\t\t\trows[i]=new Row(squares[i]);\n\t\t}\n\t}",
"public RowOrderedArraySolution(int[][] a) {\r\n\t\tsuper(a);\r\n\t}",
"public static Matrix rows(double[][] rscs) {\n\t\tint rows = rscs.length;\n\t\tint columns = rscs[0].length;\n\t\tMatrix m = new Matrix(rows, columns);\n\t\tfor (int r = 0; r < rows; r++) {\n\t\t\tfor (int c = 0; c < columns; c++) {\n\t\t\t\tm.matrix[r][c] = rscs[r][c];\n\t\t\t}\n\t\t}\n\t\treturn m;\n\t}",
"public E[][] getMatrix() {\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tE[][] matrix = (E[][]) new Object[mColumnCount][mRowCount];\r\n\t\tfor(int i=0; i<mColumnCount; i++)\r\n\t\t\tfor(int j=0; j<mRowCount; j++)\r\n\t\t\t\tmatrix[i][j] = getFromArray(i, j);\r\n\t\treturn matrix;\r\n\t}",
"private void generateMatrix(int n) throws InvalidSizeException{\n\t\tif(n%2 == 0 || n == 0 || n < 0) {\n\t\t\tthrow new InvalidSizeException(n);\n\t\t}else {\n\t\t\tmatrix = new int[n][n];\n\t\t\tsize = n;\n\t\t}\n\t}",
"static public Matrix identityMatrix(int size) {\n Matrix identity = new Matrix(size, size);\n\n for (int i = 0; i < size; i++) {\n identity.data[i][i] = 1;\n }\n\n return identity;\n }",
"public Board(Character[][] matrix) {\n this.matrix = matrix;\n }",
"Matrix(BigInteger[][] matrix) {\n this.nrOfRows = matrix.length;\n this.nrOfCols = matrix[0].length;\n this.inner = matrix;\n }",
"public Matriz( int lin, int col )\n {\n if(lin <= 0 || col <= 0 )\n {\n IO.println(\"ERRO: Quantidade invalida. \" );\n } //end\n else\n {\n table = new Object[lin][col];\n } //end se\n }",
"public MatrixArrayCR (long[] in_array) throws WrongLength{\n\t\tif (in_array.length != 9){ //throws error if length of array != 9\n\t\t\tthrow new WrongLength (9, in_array.length, \"in_array\");\n\t\t}\n\t\telse{ //updates record with in_array if in_array.length == 9\n\t\t\tthis.mat = transpose(flatTo2D(in_array));\n\t\t}\n\t}",
"public static String[][] createArr(int row, int col){\n String constant= \"asdfghjkls\";\n array = new String[row][col];\n\t for (int ctr1 = 0; ctr1 < array.length; ctr1 ++) {\n\t for (int ctr2 = 0; ctr2 < array[ctr1].length; ctr2 ++) {\n String entry = \"\";\n int stringCount;\n int a = 0;\n //random chooses if string is 3 or 4 characters\n\t\t if (Math.random() < 0.5){\n\t\t stringCount = 3;\n\t\t }\n\t\t else {\n\t\t stringCount = 4;\n\t\t }\n\t\twhile (a < stringCount){\n //strings created from String constant\n\t\t int i = (int)(Math.random()*constant.length());\n\t\t entry += constant.substring(i,i+1);\n\t\t a+=1;\n }\n\t\tarray[ctr1][ctr2] = entry;\n }\n}\n print( array);\n return array;\n }"
] | [
"0.6776652",
"0.6613877",
"0.630344",
"0.6190729",
"0.61037695",
"0.60998374",
"0.60949415",
"0.60828745",
"0.60752636",
"0.59847313",
"0.5970794",
"0.5923806",
"0.5869903",
"0.5867584",
"0.5867511",
"0.58388925",
"0.5806722",
"0.5790753",
"0.5790388",
"0.5784207",
"0.5773391",
"0.5762616",
"0.57555723",
"0.5738465",
"0.57341087",
"0.5719874",
"0.5707034",
"0.56844544",
"0.56815237",
"0.56534755",
"0.5630523",
"0.56224626",
"0.5611709",
"0.55717814",
"0.55573225",
"0.5542563",
"0.55189407",
"0.5486473",
"0.5478732",
"0.54610914",
"0.54475635",
"0.5443012",
"0.54138637",
"0.54098684",
"0.54043883",
"0.5385722",
"0.5385609",
"0.5383612",
"0.53823984",
"0.5366661",
"0.5361889",
"0.53572583",
"0.5346986",
"0.53450143",
"0.53204596",
"0.53107834",
"0.53067666",
"0.53065825",
"0.53029144",
"0.53000265",
"0.52957904",
"0.52679765",
"0.5256607",
"0.5251318",
"0.5246199",
"0.5238782",
"0.5235939",
"0.5225027",
"0.52195793",
"0.5211361",
"0.5207587",
"0.5205033",
"0.51974654",
"0.5195883",
"0.51883674",
"0.51875275",
"0.51821",
"0.51761305",
"0.5175399",
"0.5172578",
"0.5161293",
"0.51578426",
"0.51410913",
"0.51401204",
"0.5140119",
"0.5131602",
"0.5131124",
"0.5127803",
"0.51249033",
"0.5106874",
"0.5093301",
"0.50910676",
"0.50622815",
"0.50516105",
"0.5050214",
"0.50449026",
"0.5041121",
"0.50378543",
"0.50360215",
"0.5029993"
] | 0.69140273 | 0 |
Creates a vector (a matrix with a column/row of one) from a onedimensional array. | public static Matrix oneDimensionalArrayToVector(double[] array, boolean columnVector) {
double data[][] = new double[1][array.length]; //Create a two-dimensional array
data[0] = array;
Matrix result = new Matrix(data); //Now this is a row vector
if (columnVector)
return result.transpose(); //If we need column vector we transpose it.
else
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double[][] getVectorWithOnes(int size) {\n\t\tdouble[][] identityMatrix = new double[size][1];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tidentityMatrix[i][0] = 1;\n\t\t}\n\t\treturn identityMatrix;\n\t}",
"public BigInteger[] asVector() {\n if (nrOfRows != 1 && nrOfCols != 1) {\n throw new MalformedMatrixException(\"Matrix is not a vector\");\n }\n\n if (nrOfRows == 1) {\n return inner[0];\n }\n\n BigInteger[] res = new BigInteger[nrOfRows];\n\n for (int row = 0; row < nrOfRows; row++) {\n res[row] = inner[row][0];\n }\n\n return res;\n }",
"@Override\n\tpublic IVector toVector(boolean liveView) {\n\t\tif (this.getColsCount() != 1 && this.getRowsCount() != 1) {\n\t\t\tthrow new IncompatibleOperandException(\n\t\t\t\t\t\"Matrix can be represented as vector only if number of rows or columns is 1\");\n\t\t}\n\t\treturn new VectorMatrixView(this);\n\n\t}",
"public static double[] getXVector(double[][] arr)\n\t{\n\t\tdouble[] temp = new double[arr.length];\n\n\t\tfor(int i=0; i<temp.length; i++)\n\t\t\ttemp[i] = arr[i][0];\n\n\t\treturn temp;\t\t\n\t}",
"static Matrix vectorize(Matrix input) {\n int m = input.getRowDimension();\n int n = input.getColumnDimension();\n\n Matrix result = new Matrix(m * n, 1);\n for (int p = 0; p < n; p++) {\n for (int q = 0; q < m; q++) {\n result.set(p * m + q, 0, input.get(q, p));\n }\n }\n return result;\n }",
"public static int[] vector(int x, int y) { return new int[] {x,y}; }",
"public double[] project(double [] vector) {\n\t\tMatrix vec = new Matrix(1, vector.length);\n\t\tfinal double[][] vecarr = vec.getArray();\n\t\t\n\t\tfor (int i=0; i<vector.length; i++)\n\t\t\tvecarr[0][i] = vector[i] - mean[i];\n\t\t\n\t\treturn vec.times(eigenvectors).getColumnPackedCopy();\n\t}",
"public float[] getVector() {\r\n\t\t\r\n\t\tfloat array[]=new float[12];\r\n\t\tint index=-1;\r\n\t\t\r\n\t\tfor(int i=0;i<4;i++) {\r\n\t\t\tfor(int j=0;j<3;j++) {\r\n\t\t\t\t++index;\r\n\t\t\t\tarray[index]=thecounts[i][j]; \r\n\t\t\t}\r\n\t\t}\r\n\t\treturn array;\r\n\t}",
"VectorType11 getVector();",
"public static NNMatrix matrixesToVector(final NNMatrix[] matrixes) {\n NNMatrix R, M;\n R = matrixes[0].copy();\n R.reshape(1, matrixes[0].getNumElements());\n for(int i=1; i < matrixes.length; i++) {\n // reshape the matrix as single row\n M = matrixes[i].copy();\n M.reshape(1, matrixes[i].getNumElements());\n // concatenate\n R = R.combine(0, R.getNumElements(), M);\n }\n return R;\n }",
"public static double[][] array1Dto2D(Integer[] matrixVal) {\n int size = (int) Math.sqrt(matrixVal.length);\n double[][] values = new double[size][size];\n int i, j, k;\n for (i = 0, k = 0; i < size; ++i) {\n for (j = 0; j < size; ++j) {\n values[i][j] = matrixVal[k];\n k++;\n }\n }\n return values;\n }",
"public int[][] arrayToMatriz(int vec[]) {\r\n\t\tint matriz[][] = new int[3][3];\r\n\t\tint cont = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < matriz.length; i++) {\r\n\t\t\tfor (int j = 0; j < matriz.length; j++) {\r\n\t\t\t\tmatriz[i][j] = vec[cont];\r\n\t\t\t\tcont++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn matriz;\r\n\t}",
"public static double[][] array1Dto2D(int[] matrixVal) {\n int size = (int) Math.sqrt(matrixVal.length);\n double[][] values = new double[size][size];\n int i, j, k;\n for (i = 0, k = 0; i < size; ++i) {\n for (j = 0; j < size; ++j) {\n values[i][j] = matrixVal[k];\n k++;\n }\n }\n return values;\n }",
"public Matrix getV() {\n return v.like().assign(v);\n }",
"public static int[][] intArray1Dto2D(int[] matrixVal) {\n int size = (int) Math.sqrt(matrixVal.length);\n int[][] values = new int[size][size];\n int i, j, k;\n for (i = 0, k = 0; i < size; ++i) {\n for (j = 0; j < size; ++j) {\n values[i][j] = matrixVal[k];\n k++;\n }\n }\n return values;\n }",
"public static int[] copyVector(int[] v) { return Arrays.copyOf(v, 2); }",
"public double[] getReducedVector( double[] vector, int size )\n {\n double[] result = new double[ size ];\n double pvalue = (double) vector.length / (double) size;\n\n for( int i=0; i<size; i++ )\n {\n result[ i ] = vector[ (int) ( i * pvalue ) ];\n }\n\n return result;\n }",
"public VectorN getV()\n\t{\n\t\tVectorN out = new VectorN(3);\n\t\tout.x[0] = this.rv.x[3];\n\t\tout.x[1] = this.rv.x[4];\n\t\tout.x[2] = this.rv.x[5];\n\t\treturn out;\n\t}",
"public T extractVector( boolean extractRow, int element ) {\n if (extractRow) {\n return extractMatrix(element, element + 1, 0, SimpleMatrix.END);\n } else {\n return extractMatrix(0, SimpleMatrix.END, element, element + 1);\n }\n }",
"public abstract double[] getVector(int[] location);",
"public double[] toOneDimensionalArray() {\n double[] result = new double[rows * cols];\n for (int i = 0; i < rows; i++) {\n System.arraycopy(this.data[i], 0, result, i * cols, cols);\n }\n\n return result;\n }",
"public final static float[] getColumnVector(float[][] matrix, int column) {\n\t\tfloat[] cvector = new float[matrix.length];\n\t\tfor (int i = 0; i < matrix.length; i++) {\n\t\t\tcvector[i] = matrix[i][column];\n\t\t}\n\t\t\n\t\treturn cvector;\n\t}",
"public void SetVector(int[] v){ this.vector=v;}",
"public static double[] produitVectoriel(double U[],double V[]){\r\n\t\tdouble[] produitVect;\r\n\t\tproduitVect = new double[3];\r\n\t\tproduitVect[0] = U[1]*V[2] - U[2]*V[1];\r\n\t\tproduitVect[1] = U[2]*V[0] - U[0]*V[2];\r\n\t\tproduitVect[2] = U[0]*V[1] - U[1]*V[0];\r\n\t\t//double n = norme(produitVect);\r\n\t\treturn\t produitVect;\t\r\n\t}",
"static double[] unitVector(double[] vector) {\n if (vector.length != 3)\n throw new IllegalArgumentException(\"Argument not a 3-D vector <dim=\" + vector.length + \">.\");\n double magnitude = vectorMagnitude(vector);\n\n return (new double[] {vector[0] / magnitude, vector[1] / magnitude, vector[2] / magnitude});\n }",
"public static int[][] makeReflexive(int[][] m)\n {\n return new int[m.length][m[0].length];\n }",
"public double[] vectorTo(double[] pt){\n double[] vecToLight = new double[3];\n vecToLight[0] = pos[0] - pt[0];\n vecToLight[1] = pos[1] - pt[1];\n vecToLight[2] = pos[2] - pt[2];\n return vecToLight;\n }",
"private double[] getNormalVector(Conformer conformer, int[] atom) {\n\t\tdouble[] n = new double[3];\n\t\tgetNormalVector(conformer, atom, n);\n\t\treturn n;\n\t\t}",
"public double[][] getIdentityMatrix(int size) {\n\t\tdouble[][] identityMatrix = new double[size][size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tfor (int j = 0; j < size; j++) {\n\t\t\t\tif (i == j) {\n\t\t\t\t\tidentityMatrix[i][j] = 1.;\n\t\t\t\t} else {\n\t\t\t\t\tidentityMatrix[i][j] = 0.;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn identityMatrix;\n\t}",
"private int matrixColToV1(int j) \n {\n return (j % dimSquared) / gDim + 1;\n }",
"public abstract ImmutableVector getImmutableVector();",
"private int[][] convertToTwnDimensionMatrix(int[] oneDimensionMatrix, int varNum)\r\n\t{\r\n\t\t// oneDimensionMatrix: the one dimension matrix that you want to convert:\r\n\t\t// matrixSize: the size (equals to the row or the column length) of the two dimension matrix of the result\r\n\t\tint[][] result = new int[varNum][varNum];\r\n\t\t\r\n\t\tfor (int m = 0; m < varNum; m++)\r\n\t\t{\r\n\t\t\tfor (int n = 0; n < varNum; n++)\r\n\t\t\t{\r\n\t\t\t\tresult[m][n] = oneDimensionMatrix[m*varNum + n];\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t return result;\r\n\t}",
"public double [][] reduceVectors(RealMatrix inputMatrix) {\n double [][] d1 = inputMatrix.getData();\n double [][] outputArray = new double [d1.length][4];\n for (int i = 0; i < outputArray.length; i++) {\n for (int j = 0; j < outputArray[0].length; j++) {\n outputArray[i][j] = d1[i][j];\n }\n }\n return outputArray;\n }",
"public static int[] volteaArray(int array[]){\r\n int array2[] = new int[array.length];\r\n \r\n for (int i = 0; i<array.length; i++){\r\n array2[(9-i)]=array[i];\r\n }\r\n \r\n return array2;\r\n }",
"public final static double[] getColumnVector(double[][] matrix, int column) {\n\t\tdouble[] cvector = new double[matrix.length];\n\t\tfor (int i = 0; i < matrix.length; i++) {\n\t\t\tcvector[i] = matrix[i][column];\n\t\t}\n\t\t\n\t\treturn cvector;\n\t}",
"public double[] getVectorCurrentRow() {\r\n double[] retVec = new double[this.getColumnCount()];\r\n int currRow = getCurrentRow();\r\n for (int i = 0; i < this.getColumnCount(); i++) {\r\n retVec[i] = this.getLogicalValueAt(currRow, i);\r\n }\r\n return retVec;\r\n }",
"public static void generator(){\n int vector[]= new int[5];\r\n vector[10]=20;\r\n }",
"public Matrix(int[][] array){\n this.matriz = array;\n }",
"public Vector porEscalar(double value){\n return new Vector(x*value,y*value);\n }",
"public Matrix(int[][] array)\n {\n matrix = array;\n }",
"public static DoubleVector CreateDoubleVector(int size,double value) {\n\t\tDoubleVector result = new DoubleVector();\n\t\t\n\t\tfor (int j = 0; j < size ; j++) {\n\t\t\tresult.setValue(j,value) ;\n\t\t}\n\t\treturn result ;\n\t}",
"public IDoubleArray getSolutionVector();",
"public static int[] stateless(int[] v1) {\n Validate.notNull(v1);\n int[] r = Arrays.copyOf(v1, v1.length);\n inPlace(r);\n return r;\n }",
"Array createArray();",
"public Double[][] toPresent() throws IndexOutOfBoundsException;",
"Vector getZeroVector();",
"public MAT(Vector v) {\n super(dimension(v), dimension(v));\n final int n = this.nRows();\n\n int k = 1;\n for (int i = 1; i <= n; ++i) {\n for (int j = i; j <= n; ++j) {\n double vk = v.get(k++);\n if (j != i) {\n vk /= Constant.ROOT_2;\n }\n\n set(i, j, vk);\n set(j, i, vk);\n }\n }\n }",
"public static double[] stateless(double[] v1) {\n Validate.notNull(v1);\n double[] r = Arrays.copyOf(v1, v1.length);\n inPlace(r);\n return r;\n }",
"public static Object naturalCast(Object[] array) {\r\n Class clazz = array[0].getClass();\r\n Object[] newArray = (Object[]) Array.newInstance(clazz, array.length);\r\n for (int i = 0; i < newArray.length; i++) {\r\n newArray[i] = array[i];\r\n }\r\n return newArray;\r\n }",
"public double[] Normalizar(int[] v){\n double[] result=new double[v.length];\n double s=0;\n for (int i=0;i<v.length;i++){\n s+=v[i];\n }\n for (int i=0;i<v.length;i++){\n result[i]=(double)v[i]/(double)s;\n }\n\n return result;\n }",
"Matrix(){\n matrixVar = new double[1][1];\n rows = 1;\n columns = 1;\n }",
"public static Number[][] array2Object(int[][] array) {\n Number[][] ret = new Number[array.length][];\n for (int i = 0; i < array.length; i++) {\n ret[i] = ArrayUtils.toObject(array[i]);\n }\n return ret;\n }",
"public double[] randv()\n\t{\n\t\tdouble p = a * (1.0 - e * e);\n\t\tdouble cta = Math.cos(ta);\n\t\tdouble sta = Math.sin(ta);\n\t\tdouble opecta = 1.0 + e * cta;\n\t\tdouble sqmuop = Math.sqrt(this.mu / p);\n\n\t\tVectorN xpqw = new VectorN(6);\n\t\txpqw.x[0] = p * cta / opecta;\n\t\txpqw.x[1] = p * sta / opecta;\n\t\txpqw.x[2] = 0.0;\n\t\txpqw.x[3] = -sqmuop * sta;\n\t\txpqw.x[4] = sqmuop * (e + cta);\n\t\txpqw.x[5] = 0.0;\n\n\t\tMatrix cmat = PQW2ECI();\n\n\t\tVectorN rpqw = new VectorN(xpqw.x[0], xpqw.x[1], xpqw.x[2]);\n\t\tVectorN vpqw = new VectorN(xpqw.x[3], xpqw.x[4], xpqw.x[5]);\n\n\t\tVectorN rijk = cmat.times(rpqw);\n\t\tVectorN vijk = cmat.times(vpqw);\n\n\t\tdouble[] out = new double[6];\n\n\t\tfor (int i = 0; i < 3; i++)\n\t\t{\n\t\t\tout[i] = rijk.x[i];\n\t\t\tout[i + 3] = vijk.x[i];\n\t\t}\n\n\t\treturn out;\n\t}",
"public long[][] flatTo2D (long[] in_array1d){\n\t\tint sl = (int)Math.sqrt(in_array1d.length);\n\t\tlong[][] out_array = new long[sl][sl]; //declares output 2D array\n\t\tint q = 0; //temporary variable, used in following nested for loop\n\t\tfor(int a = 0; a < sl; a++){ //loops until a == side length\n\t\t\tfor(int b = 0; a < sl ; b++){ //loops until b == side length\n\t\t\t\t//q is initially set to zero. With each iteration of the b for-loop, the value of\n\t\t\t\t//out_array[a][b] is replaced with in_array[q], and q is incremented by 1. This means\n\t\t\t\t//that, for every iteration of the a for-loop, q is incremented by sl\n\t\t\t\tout_array[a][b] = in_array1d[q]; \n\t\t\t\tq = q + 1;\n\t\t\t\t}\n\t\t\t}\n\t\treturn out_array;\n\t\t}",
"public static double[] getYVector(double[][] arr)\n\t{\n\t\tdouble[] temp = new double[arr.length];\n\n\t\tfor(int i=0; i<temp.length; i++)\n\t\t\ttemp[i] = arr[i][1];\n\n\t\treturn temp;\t\t\n\t}",
"public Box[] getBoxes1D() {\n\t\tBox[] temp = new Box[size];\n\t\tint tempCounter = 0;\n\t\tfor (int j = 0; j < length; j++) {\n\t\t for (int i = 0; i < height; i++) {\n\t\t\t\ttemp[tempCounter] = boxes[i][j];\n\t\t\t\ttempCounter++;\n\t\t }\n\t\t}\n\t\treturn temp;\n }",
"public Vector toVector(){\r\n\t\tVector v = new Vector();\r\n\r\n\t\t// ATTENTION l'ordre est très important !!\r\n\t\t// l'ordre doit être :\r\n\t\t// id, id localisation, adresse, code postal, ville, telephone\r\n\r\n\t\tv.add(id);\r\n\t\tv.add(localisation.getId());\r\n\t\tv.add(localisation.getAdresse());\r\n\t\tv.add(localisation.getCodePostal());\r\n\t\tv.add(localisation.getVille());\r\n\t\tv.add(telephone);\r\n\r\n\t\treturn v;\r\n\t}",
"@Nonnull\n public Matrix getU ()\n {\n final Matrix aNewMatrix = new Matrix (m_nCols, m_nCols);\n final double [] [] aNewArray = aNewMatrix.internalGetArray ();\n for (int nRow = 0; nRow < m_nCols; nRow++)\n {\n final double [] aSrcRow = m_aLU[nRow];\n final double [] aDstRow = aNewArray[nRow];\n for (int nCol = 0; nCol < m_nCols; nCol++)\n if (nRow <= nCol)\n aDstRow[nCol] = aSrcRow[nCol];\n else\n aDstRow[nCol] = 0.0;\n }\n return aNewMatrix;\n }",
"public static void imprimirVector(String[] array) {\n\t\tfor(String i:array)\n\t\t\tSystem.out.print(\" \"+i+\" \t\");\n\t\tSystem.out.println();\n\t}",
"public Vector(float[] axis){ this.axis = axis;}",
"public static float[] stateless(float[] v1) {\n Validate.notNull(v1);\n float[] r = Arrays.copyOf(v1, v1.length);\n inPlace(r);\n return r;\n }",
"public static double[] normalize(double[] v) {\n double[] tmp = new double[3];\n tmp[0] = v[0] / VectorMath.length(v); \n tmp[1] = v[1] / VectorMath.length(v); \n tmp[2] = v[2] / VectorMath.length(v); \n return tmp; \n }",
"public static double[] scalarproduct(double[] v, double r) {\n double[] tmp = new double[3];\n tmp[0] = v[0]*r;\n tmp[1] = v[1]*r;\n tmp[2] = v[2]*r;\n return tmp;\n }",
"public V[] tilArray(V[] a) {\n Node node = listehode;\n\n if (node.neste == null) {\n return null;\n } else {\n for (int i = 0; i < antall; i++) {\n a[i] = (V) node.neste.verdi;\n node = node.neste;\n }\n }\n return a;\n }",
"public boolean isVector() {\n return mat.getNumRows() == 1 || mat.getNumCols() == 1;\n }",
"public Vector normalized() {\n Vector t=new Vector(normalize());\n return t;\n }",
"public static Vector listToVector(List<Double> list) {\n if (list.size() == 3) {\n return new Vector(list.get(0), list.get(1), list.get(2));\n }\n return new Vector(0, 0, 0);\n }",
"public double[] mult(double[] vector) {\n\t\tif(this.cols != vector.length) return null;\n\t\tdouble[] result = new double[this.rows];\n\t\tfor(int i=0; i<this.rows; i++) {\n\t\t\tfor(int j=0; j<this.cols; j++) {\n\t\t\t\tresult[i] += data[i][j] * vector[j];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public Matrix extract(){\r\n\t\t\r\n\t\tDouble[][] newVal = new Double[col][row - 1];\r\n\t\t\r\n\t\tfor(Double[] row: AllVal){\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}",
"public static int[] volteaArrayInt(int[]array) { \n \n int[] aux = new int [array.length];\n \n for(int i = 0 ; i < array.length; i++){\n aux[array.length - i - 1] = array[i];\n }\n return aux;\n }",
"public static double[][] matrixInversion(double[][] a) {\r\n\t\t// Code for this function and the functions it calls was adapted from\r\n\t\t// http://mrbool.com/how-to-use-java-for-performing-matrix-operations/26800\r\n\t\t\r\n\t\treturn (divideBy(transpose(cofactor(a)), determinant(a)));\r\n\t}",
"public static int[][] copyArray(int[][] a) {\n\t\tint[][] returnArray = new int[a.length][a[0].length];\n\t\tfor (int row = 0; row < a.length; row++) {\n\t\t\tfor (int column = 0; column < a[row].length; column++) {\n\t\t\t\treturnArray[row][column] = a[row][column];\n\t\t\t}\n\t\t}\n\t\treturn returnArray;\n\t}",
"private double[] getRandomVector(int dimension) {\n double[] s = new double[dimension];\n Random gen = new Random();\n for (int i = 0; i < s.length; ++i) {\n s[i] = (2 * gen.nextDouble()) - 1;\n }\n return s;\n }",
"static int[][] getColumns(int[] array){\n int[][] rezultArray = new int[n][n];\n int index = 0;\n for (int i = 0; i < n; i++){\n for (int j = i; j < n * n; j += n){\n rezultArray[i][index++] = array[j];\n }\n index = 0;\n }\n return rezultArray;\n }",
"public Vector getVector()\n\t{\n\t\tVector v=new Vector();\n\t\tv.add(getDate());\n\t\tv.add(getCaloriesConsumed());\n\t\tv.add(getCaloriesBurned());\n\t\tv.add(getCaloriesDifference());\n\t\treturn v;\n\t}",
"public static Matrix arrayToMatrix(double[] array, int rows, int cols) {\n Matrix result = new Matrix(rows, cols);\n for (int i = 0; i < rows; i++) {\n System.arraycopy(array, i * cols, result.data[i], 0, cols);\n }\n\n return result;\n }",
"public static Vector<String> stringArrayToVector(String[] strArray) {\n\t\tif (strArray.length == 0 || strArray == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn new Vector<String>(Arrays.asList(strArray));\n\t}",
"private int xyTo1D(final int row, final int col) {\n return (row - 1) * size + (col - 1);\n }",
"public ImgMathVec(int x, int y) {\r\n\t\tv = new int[3];\r\n\t\tv[0] = x;\r\n\t\tv[1] = y;\r\n\t\tv[2] = 1;\r\n\t}",
"VectorArray getNeutHar();",
"public boolean isVector() {\n\t\treturn numeros.length == 1 || numeros[0].length == 1;\n\t}",
"public Vector2D toVector2D ( );",
"public Matrix( int a ) {\n\tmatrix = new Object[a][a];\n }",
"private static int[] invMultRow(int[] column)\n\t{\n\t\tint[] result = new int[column.length];\n\t\t\n\t\tfor(int row=0; row<invMultCon.length; row++)\n\t\t\tfor(int col=0; col<invMultCon[row].length; col++)\n\t\t\t\tresult[row] ^= galoisMult(invMultCon[row][col],column[col]);\n\t\t\n\t\treturn result;\n\t}",
"public static synchronized Vector<String> getStringArrayAsVector(String[] strArray) {\n\n\tVector<String> vector = new Vector<String>();\n\tfor (int i = 0; i < strArray.length; i++) {\n\n\t vector.add(strArray[i]);\n\n\t}\n\n\treturn vector;\n\n }",
"public float[] getVec() {\n return vec;\n }",
"public static Matrix rows(double[] rs) {\n\t\tint rows = rs.length;\n\t\tint columns = 1;\n\t\tMatrix m = new Matrix(rows, columns);\n\t\tfor (int r = 0; r < rows; r++) {\n\t\t\tm.matrix[r][0] = rs[r];\n\t\t}\n\t\treturn m;\n\t}",
"private MrnWoatlas5[] doGet(Vector result) {\n if (dbg) System.out.println (\"vector size = \" + result.size());\n int latitudeCol = db.getColNumber(LATITUDE);\n int longitudeCol = db.getColNumber(LONGITUDE);\n int depthCol = db.getColNumber(DEPTH);\n int temperatureMinCol = db.getColNumber(TEMPERATURE_MIN);\n int temperatureMaxCol = db.getColNumber(TEMPERATURE_MAX);\n int salinityMinCol = db.getColNumber(SALINITY_MIN);\n int salinityMaxCol = db.getColNumber(SALINITY_MAX);\n int oxygenMinCol = db.getColNumber(OXYGEN_MIN);\n int oxygenMaxCol = db.getColNumber(OXYGEN_MAX);\n int nitrateMinCol = db.getColNumber(NITRATE_MIN);\n int nitrateMaxCol = db.getColNumber(NITRATE_MAX);\n int phosphateMinCol = db.getColNumber(PHOSPHATE_MIN);\n int phosphateMaxCol = db.getColNumber(PHOSPHATE_MAX);\n int silicateMinCol = db.getColNumber(SILICATE_MIN);\n int silicateMaxCol = db.getColNumber(SILICATE_MAX);\n int chlorophyllMinCol = db.getColNumber(CHLOROPHYLL_MIN);\n int chlorophyllMaxCol = db.getColNumber(CHLOROPHYLL_MAX);\n MrnWoatlas5[] cArray = new MrnWoatlas5[result.size()];\n for (int i = 0; i < result.size(); i++) {\n Vector row = (Vector) result.elementAt(i);\n cArray[i] = new MrnWoatlas5();\n if (latitudeCol != -1)\n cArray[i].setLatitude ((String) row.elementAt(latitudeCol));\n if (longitudeCol != -1)\n cArray[i].setLongitude ((String) row.elementAt(longitudeCol));\n if (depthCol != -1)\n cArray[i].setDepth ((String) row.elementAt(depthCol));\n if (temperatureMinCol != -1)\n cArray[i].setTemperatureMin((String) row.elementAt(temperatureMinCol));\n if (temperatureMaxCol != -1)\n cArray[i].setTemperatureMax((String) row.elementAt(temperatureMaxCol));\n if (salinityMinCol != -1)\n cArray[i].setSalinityMin ((String) row.elementAt(salinityMinCol));\n if (salinityMaxCol != -1)\n cArray[i].setSalinityMax ((String) row.elementAt(salinityMaxCol));\n if (oxygenMinCol != -1)\n cArray[i].setOxygenMin ((String) row.elementAt(oxygenMinCol));\n if (oxygenMaxCol != -1)\n cArray[i].setOxygenMax ((String) row.elementAt(oxygenMaxCol));\n if (nitrateMinCol != -1)\n cArray[i].setNitrateMin ((String) row.elementAt(nitrateMinCol));\n if (nitrateMaxCol != -1)\n cArray[i].setNitrateMax ((String) row.elementAt(nitrateMaxCol));\n if (phosphateMinCol != -1)\n cArray[i].setPhosphateMin ((String) row.elementAt(phosphateMinCol));\n if (phosphateMaxCol != -1)\n cArray[i].setPhosphateMax ((String) row.elementAt(phosphateMaxCol));\n if (silicateMinCol != -1)\n cArray[i].setSilicateMin ((String) row.elementAt(silicateMinCol));\n if (silicateMaxCol != -1)\n cArray[i].setSilicateMax ((String) row.elementAt(silicateMaxCol));\n if (chlorophyllMinCol != -1)\n cArray[i].setChlorophyllMin((String) row.elementAt(chlorophyllMinCol));\n if (chlorophyllMaxCol != -1)\n cArray[i].setChlorophyllMax((String) row.elementAt(chlorophyllMaxCol));\n } // for i\n return cArray;\n }",
"public T createLike() {\n return createMatrix(numRows(), numCols(), getType());\n }",
"Matrix(double[][] input) {\n matrixVar = input;\n columns = matrixVar[0].length;\n rows = matrixVar.length;\n }",
"public static short[][] constructIdentityMtx(int dimension) {\n \n short[][] rep = new short[dimension][dimension];\n\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n if (i == j) {\n rep[i][j] = 1;\n } else {\n rep[i][j] = 0;\n }\n }\n }\n return rep;\n }",
"public Token one() {\n\t\ttry {\n\t\t\treturn new LongMatrixToken(LongMatrixMath.identity(_rowCount),\n\t\t\t\t\tDO_NOT_COPY);\n\t\t} catch (IllegalActionException illegalAction) {\n\t\t\t// should not happen\n\t\t\tthrow new InternalErrorException(\"LongMatrixToken.one: \"\n\t\t\t\t\t+ \"Cannot create identity matrix.\");\n\t\t}\n\t}",
"public static int[] volteaArrayInt(int array[]) {\n int aux[] = new int[array.length];\n int cont = aux.length;\n for (int n : array) {\n aux[--cont] = n;\n }\n return aux;\n }",
"static public Matrix identityMatrix(int size) {\n Matrix identity = new Matrix(size, size);\n\n for (int i = 0; i < size; i++) {\n identity.data[i][i] = 1;\n }\n\n return identity;\n }",
"public static Vector fromCartesian(double x, double y){\n return new Vector(x, y);\n }",
"public byte [][] getUniverse()\n\t{\n\t\t//creates a byte array that is used for returning the array\n\t\tbyte [][] currentUniverseCopy = new byte [this.height][this.width];\n\t\t//for loop for the row\n\t\tfor (int row =0; row < this.currentVersion.length; row++)\n\t\t{\t//for loop for the column\n\t\t\tfor(int column = 0; column < this.currentVersion[row].length; column++)\n\t\t\t{\n\t\t\t\t//assigning the value from currentVersion to copy array\n\t\t\t\tcurrentUniverseCopy[row][column] = this.currentVersion[row][column];\n\t\t\t}\n\t\t}\n\t\t//return a copy of the array\n\t\treturn currentUniverseCopy; \n\t}",
"public static Number[][] array2Object(double[][] array) {\n Number[][] ret = new Number[array.length][];\n for (int i = 0; i < array.length; i++) {\n ret[i] = ArrayUtils.toObject(array[i]);\n }\n return ret;\n }",
"public int[][] turfu() {\r\n\t\tint[][] tab = new int[matrice[0].length][matrice.length]; \r\n\t\tint n =0; \r\n\t\tfor(int i=0; i<tab.length; i++) {\r\n\t\t\tfor(int j=0; j< tab[0].length; j++) {\r\n\t\t\t\ttab[i][j] = matrice[j][n]; \r\n\t\t\t}\r\n\t\t\tn++;\r\n\t\t}\r\n\t\treturn tab; \r\n\t}",
"@Test\r\n\tpublic void testCMLLatticeCMLLatticeVectorArray() {\r\n\t\tCMLLattice lattice = new CMLLattice(new CMLLatticeVector[] {\r\n\t\t\t\tnew CMLLatticeVector(new double[] { 1., 2., 3. }),\r\n\t\t\t\tnew CMLLatticeVector(new double[] { 4., 5., 6. }),\r\n\t\t\t\tnew CMLLatticeVector(new double[] { 7., 8., 9. }) });\r\n\t\tCMLVector3Test.assertEquals(\"construct\", new double[] { 1., 2., 3. },\r\n\t\t\t\tlattice.getCMLVector3(0), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"construct\", new double[] { 4., 5., 6. },\r\n\t\t\t\tlattice.getCMLVector3(1), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"construct\", new double[] { 7., 8., 9. },\r\n\t\t\t\tlattice.getCMLVector3(2), EPS);\r\n\t}",
"public static int[] getValues(vtkCellArray array)\n\t{\n\t\tarray.Squeeze();\n\t\tvtkIdTypeArray data = array.GetData();\n\t\tint[] toReturn = getValues(data);\n\t\treturn toReturn;\n\t}"
] | [
"0.64434975",
"0.6167036",
"0.5945083",
"0.5779131",
"0.56204814",
"0.5534448",
"0.5528026",
"0.54804206",
"0.5469331",
"0.53944784",
"0.5345219",
"0.5335589",
"0.533493",
"0.53112644",
"0.5300958",
"0.5295079",
"0.5272776",
"0.5265747",
"0.522338",
"0.5200663",
"0.5131163",
"0.512481",
"0.5080822",
"0.50801337",
"0.50767094",
"0.5066646",
"0.5050742",
"0.5014711",
"0.49526435",
"0.49349818",
"0.49138203",
"0.49130628",
"0.49018714",
"0.48921606",
"0.489049",
"0.4887206",
"0.48784652",
"0.48730472",
"0.4860947",
"0.48231506",
"0.48161277",
"0.4813181",
"0.48107976",
"0.48008084",
"0.47934002",
"0.47815093",
"0.47797105",
"0.47659558",
"0.47627178",
"0.47486743",
"0.4740619",
"0.47372225",
"0.47193566",
"0.47189292",
"0.47187996",
"0.47112846",
"0.47103179",
"0.4708128",
"0.4706403",
"0.47030008",
"0.4694228",
"0.46929476",
"0.46897346",
"0.46797827",
"0.46765774",
"0.46765545",
"0.4673586",
"0.4673441",
"0.46690276",
"0.466005",
"0.46490362",
"0.46473864",
"0.46461645",
"0.46413904",
"0.4640244",
"0.4631",
"0.4630183",
"0.4629189",
"0.4626994",
"0.46220753",
"0.46170735",
"0.46163127",
"0.4614412",
"0.46088547",
"0.45933825",
"0.4584164",
"0.4578479",
"0.4568649",
"0.45684567",
"0.45671386",
"0.45653751",
"0.45628107",
"0.45584258",
"0.4556802",
"0.45476902",
"0.45325568",
"0.4532423",
"0.45267504",
"0.45209515",
"0.4519034"
] | 0.7222931 | 0 |
Returns the maximum value in the matrix. | public double getMaxValue() {
double max = Double.NEGATIVE_INFINITY;
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
if (data[i][j] > max)
max = data[i][j];
}
}
return max;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double max(){\r\n\t\t//variable for max val\r\n\t\tdouble max = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the maximum is less than the current index, change max to that value\r\n\t\t\tif (max < this.data[i]){\r\n\t\t\t\tmax = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the maximum val\r\n\t\treturn max;\r\n\t}",
"public static Matrix max(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c, m);\n for (int col = 1; col <= cols_c; col++) {\n double max = 0D;\n boolean firstiter = true;\n for (int row = 1; row <= rows_c; row++) {\n double tmp = m.get(row, col);\n if (!firstiter) {\n max = Math.max(tmp, max);\n } else {\n max = tmp;\n firstiter = false;\n }\n }\n d.set(1, col, max);\n }\n }\n return d;\n }",
"public int theHighest() {\r\n\t\tint highest = 0;\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\tif(game[i][j].getValue() > highest)\r\n\t\t\t\t\thighest = game[i][j].getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn highest;\r\n\t}",
"public static double getMax(double[][] matrix)\r\n\t{\r\n\t\tdouble max = Double.NEGATIVE_INFINITY;\r\n\t\tfor (int i = 0; i < matrix.length; i++) {\r\n\t\t\tfor (int j = 0; j < matrix[i].length; j++) {\r\n\t\t\t\tif (max < matrix[i][j])\r\n\t\t\t\t\tmax = matrix[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn max;\r\n\t}",
"public long max() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] > result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find max of empty array\");\n\t\t}\n\t}",
"public double max() {\n\t\tif (count() > 0) {\n\t\t\treturn _max.get();\n\t\t}\n\t\treturn 0.0;\n\t}",
"public double max() {\n double resultat = 0;\n double tmp = 0;\n System.out.println(\"type:\" + type);\n for (int i = 0; i < tab.size(); i++) {\n tmp = CalculatorArray.max(tab.get(i));\n if (tmp > resultat) {\n resultat = tmp;\n }\n }\n System.out.println(\"Max colonne:\" + resultat);\n return resultat;\n }",
"public double max() {\n/* 323 */ Preconditions.checkState((this.count != 0L));\n/* 324 */ return this.max;\n/* */ }",
"public double elementMaxAbs() {\n return ops.elementMaxAbs(mat);\n }",
"public double max()\n\n {\n double max=xyValueArray.get(0).getY();\n\n for (int i = 0; i < xyValueArray.size(); i++) {\n if (xyValueArray.get(i).getY() > max) {\n max = xyValueArray.get(i).getY();\n }\n }\n return max;\n }",
"Double getMaximumValue();",
"public double getMaximum() {\n return (max);\n }",
"E maxVal();",
"private static double maxOfColumn(double[][] matrix, int col) {\n\t\t// TODO Auto-generated method stub\n\t\tdouble max = 0; \n\t\tfor(int i=0; i<matrix.length; i++){\n\t\t\t\n\t\t\tif(matrix[i][col] > max)\n\t\t\t\tmax = matrix[i][col]; \n\t\t}\n\t\t\n\t\treturn max;\n\t}",
"public T getMax()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\telse if(size == 1)\n\t\t{\n\t\t\treturn array[0];\n\t\t}\n\t\telse if(size == 2)\n\t\t{\n\t\t\treturn array[1];\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\tif(object.compare(array[1], array[2]) < 0)\n\t\t\t{\n\t\t\t\treturn array[2];\n\t\t\t}\n\t\t\telse if(object.compare(array[1], array[2]) > 0)\n\t\t\t{\n\t\t\t\treturn array[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn array[1];\n\t\t\t}\n\n\t\t}\n\t}",
"public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }",
"public AnyType findMax() {\n\t\treturn elementAt(findMax(root));\n\t}",
"public T max();",
"public int getMax()\n {\n int max = data.get(0).getX();\n\n for(int i = 0; i < data.size(); i++)\n {\n if (data.get(i).getX() > max)\n {\n max = data.get(i).getX();\n }\n }\n\n\n return max;\n }",
"public int findMax() {\n\t\tint max = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ( (int)data.get(count) > max)\n\t\t\t\tmax = (int)data.get(count);\n\t\treturn max;\n\t}",
"public E findMax() {\r\n\t\treturn heap.get(0);\r\n\t}",
"public final double getMax() {\r\n\t\treturn this.m_max;\r\n\t}",
"double getMax();",
"double getMax();",
"private double getMax() {\n return Collections.max(values.values());\n }",
"int getMaximum();",
"public double max() {\n return max(0.0);\n }",
"public E findMax(){\n if(!isEmpty()){\n AvlNode<E> node = findMax(root);\n return (E)node.value;\n } else {\n return null;\n }\n }",
"int max() {\n\t\t// added my sort method in the beginning to sort out array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the last term in the array --> if array is sorted then the last\n\t\t// term should be max\n\t\tint x = array[array.length - 1];\n\t\treturn x;\n\t}",
"public double getMaximumValue() { return this.maximumValue; }",
"double getMax() {\n\t\t\treturn value_max;\n\t\t}",
"public E calculateMaximum() {\n return FindMaximum.calculateMaximum(x , y , z);\n }",
"public int getMax() {\n\t\treturn getMax(0.0f);\n\t}",
"public double getMaximumValue()\n {\n this.minimumValue = getMinNumber(allValues);\n this.maximumValue = getMaxNumber(allValues);\n return maximumValue;\n }",
"public int max()\n\t{\n\t\tif (arraySize > 0)\n\t\t{\n\t\t\tint maxNumber = array[0];\n\t\t\tfor (int index = 0; index < arraySize; index++) \n\t\t\t{\n\t\t\t\tif (array[index] > maxNumber)\n\t\t\t\t{\n\t\t\t\t\tmaxNumber = array[index];\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\treturn maxNumber;\n\t\t}\n\t\treturn -1;\n\t\t\n\t}",
"public Double getMaximum() {\n\t\treturn maximum;\n\t}",
"public Double getMaximumValue () {\r\n\t\treturn (maxValue);\r\n\t}",
"public double fetchMaxQValue(int row, int col)\n\t\t{\n\t\t\tdouble maxQVal = Integer.MIN_VALUE;\n\t\t\tfor(int i=0; i < ACTION_COUNT; i++)\n\t\t\t{\n\t\t\t\tmaxQVal = Math.max(maxQVal, utilities[i][row][col]);\n\t\t\t}\n\t\t\treturn maxQVal;\n\n\t\t}",
"java.math.BigDecimal getMaximum();",
"public double maximum(double[][] datasetF) {\r\n\t\tint col = 0;\r\n\t\tdouble maxF = -(Double.MIN_VALUE);\r\n\t\twhile (col != numOfDimension) {\r\n\t\t\tmaxF = -(Double.MIN_VALUE);\r\n\t\t\tfor (int i = 0; i < datasetF.length; i++) {\r\n\t\t\t\tif (datasetF[i][col] > maxF)\r\n\t\t\t\t\tmaxF = datasetF[i][col];\r\n\t\t\t}\r\n\t\t\t// System.out.println(\"Maximum = \" + maxF);\r\n\t\t\tcol++;\r\n\t\t}\r\n\t\treturn maxF;\r\n\t}",
"public int getMax(){\n return tab[rangMax()];\n }",
"public int largestSquare(int[][] matrix) {\n if (matrix == null || matrix.length == 0) return 0;\n\n int row = matrix.length;\n int col = matrix[0].length;\n int[][] M = new int[row][col];\n int globalMax = 0;\n\n //base case\n for (int index = 0; index < row; index++) {\n M[index][0] = matrix[index][0]; // M[i][0] = i\n }\n for (int index = 0; index < col; index++) {\n M[0][index] = matrix[0][index];\n }\n\n //induction rule\n for (int i = 1; i < row; i++) {\n for (int j = 1; j < col; j++) {\n M[i][j] = Math.min(M[i-1][j-1], Math.min(M[i-1][j], M[i][j-1])) + 1;\n globalMax = Math.max(globalMax, M[i][j]);\n }\n }\n return globalMax;\n }",
"public int extractMaximum() {\n \n int max = maximum();\n\n if (max == -1) {\n assert(xft.size() == 0);\n return -1;\n }\n \n remove(max);\n \n return max;\n }",
"public String maximum(){\n\t\treturn queueArray[1][1];\n\t}",
"int max();",
"protected double getMaxDouble() {\r\n boolean handleOutOfMemoryError = false;\r\n double max = Double.NEGATIVE_INFINITY;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double noDataValue = g.getNoDataValue(handleOutOfMemoryError);\r\n double value;\r\n int row;\r\n int col;\r\n for (row = 0; row < nrows; row++) {\r\n for (col = 0; col < ncols; col++) {\r\n value = getCell(row, col);\r\n if (value != noDataValue) {\r\n max = Math.max(max, value);\r\n }\r\n }\r\n }\r\n return max;\r\n }",
"public E findMax() {\n Node<E> temp = root;\n // while loop will run until there is no longer a node that has a right child.\n // temp is then assigned to the next node in the right child and will return\n // the node with the maximum value in the BST. The node that does not have a right\n // child will be the maximum value.\n while(temp.right != null){\n temp = temp.right;\n }\n return temp.getInfo();\n }",
"protected IExpressionValue max()throws TableFunctionMalformedException,\r\n\t\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException{\r\n\t\t// Debug.println(\"ANALISING MAX FUNCTION\");\r\n\t\t\r\n\t\tIExpressionValue ret1 = null;\r\n\t\tIExpressionValue ret2 = null;\r\n\t\tmatch('(');\r\n\t\tret1 = this.expression();\r\n//\t\tmatch(';');\r\n\t\tif (look != ';' && look != ',') {\r\n\t\t\texpected(\";\");\r\n\t\t}\r\n\t\tnextChar();\r\n\t\tskipWhite();\r\n\t\tret2 = this.expression();\r\n\t\tmatch(')');\r\n\t\t/*\r\n\t\t// old code: tests which ret1/ret2 to return and test consistency. ComparisionProbabilityValue replaces it.\r\n\t\tif (!Float.isNaN(ret1)) {\r\n\t\t\tif (!Float.isNaN(ret2)) {\r\n\t\t\t\tret1 = ((ret2>ret1)?ret2:ret1);\r\n\t\t\t}\r\n\t\t} else if (!Float.isNaN(ret2)) {\r\n\t\t\treturn ret2;\r\n\t\t}\r\n\t\t*/\r\n\t\treturn new ComparisionProbabilityValue(ret1,ret2,true);\r\n\t\t\r\n\t}",
"public int getMaximum() {\n return this.iMaximum;\n }",
"@Override\n public int iamax(INDArray x) {\n return NativeBlas.isamax(x.length(), x.data(), x.offset(), x.stride()[0]) - 1;\n }",
"public int getMaxRow();",
"public double getMaxValue() {\n\t\tdouble max = Double.NEGATIVE_INFINITY;\n\t\tfor (int i = 0; i < dataSheet.getDesignCount(); i++) {\n\t\t\tdouble value = dataSheet.getDesign(i).getDoubleValue(this);\n\t\t\tif (value > max)\n\t\t\t\tmax = value;\n\t\t}\n\t\treturn max;\n\t}",
"public int maxElement() {\n\t\tNode max=root;\n\t\tint out=-1;\n\t\twhile(max!=null) {\n\t\t\tout=max.data;\n\t\t\tmax=max.right;\n\t\t}\n\t\treturn out;\n\t}",
"@Override\n public Long findMAX() {\n\n StringBuffer sql = new StringBuffer(\"select max(magoithau) from goithau\");\n Query query = entityManager.createNativeQuery(sql.toString());\n return Long.parseLong(query.getSingleResult().toString()) ;\n }",
"public int getMax()\n {\n return 0;\n }",
"public K max();",
"public int findMax(){\n return nilaiMaks(this.root);\n }",
"public double getMaximumDouble() {\n/* 255 */ return this.max;\n/* */ }",
"int max(){\r\n int auxMax = array[0];\r\n for (int i=1;i<array.length;i++){\r\n if(array[i] > auxMax){\r\n auxMax = array[i];\r\n }\r\n }\r\n return auxMax;\r\n }",
"public int getMaxInSingleRow() {\n return maxInSingleRow;\n }",
"public int getMax()\n\t{\n\t\treturn max;\n\t}",
"public String max()\r\n\t {\r\n\t\t if(this.max != null)\r\n\t\t {\r\n\t\t\t return this.max.getValue(); \r\n\t\t }\r\n\t\t return null;\r\n\t }",
"public int getMaximum() {\r\n return max;\r\n }",
"public AnyType findMax() {\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new UnderflowException();\r\n\t\treturn findMax(root).element;\r\n\t}",
"public int largest(int[][] matrix) {\n // Write your solution here\n if (matrix.length == 0 || matrix[0].length == 0) {\n return 0;\n }\n int[][] M1 = new int[matrix.length][matrix[0].length];\n leftToRight(matrix, M1);\n int[][] M2 = new int[matrix.length][matrix[0].length];\n rightToLeft(matrix, M2);\n int[][] M3 = new int[matrix.length][matrix[0].length];\n bottomToUp(matrix, M3);\n int[][] M4 = new int[matrix.length][matrix[0].length];\n upToBottom(matrix, M4);\n int global_max = 0;\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[0].length; j++) {\n int arm = 0;\n int left = M1[i][j];\n int right = M2[i][j];\n arm = Math.min(left, right);\n int bottom = M3[i][j];\n arm = Math.min(arm, bottom);\n int up = M4[i][j];\n arm = Math.min(arm, up);\n if (arm > global_max) {\n global_max = arm;\n }\n }\n }\n return global_max;\n }",
"public Coord maxCell()\n {\n\t int maxX = getGrid().keySet().stream().mapToInt(Coord::getX).max().orElse(0);\n\n\t int maxY = getGrid().keySet().stream().mapToInt(Coord::getY).max().orElse(0);\n\n\t return new Coord(maxX, maxY);\n }",
"public int findHighestTemp() {\n\t\t\n\t\tint max = 0;\n\t\tint indexHigh = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tif (temps[i][0] > max) {\n\t\t\t\tmax = temps[i][0];\n\t\t\t\tindexHigh = i;\n\t\t\t}\n\t\t\n\t\treturn indexHigh;\n\t\t\n\t}",
"public abstract int getMaximumValue();",
"public int getMaximum() {\n \tcheckWidget();\n \treturn maximum;\n }",
"public String extractMax(){\n\t\tString maxValue = queueArray[1][1];\n\t\t\n\t\tremove();\n\t\tmove();\n\t\t\n\t\treturn maxValue;\n\t}",
"public long getMaximum() {\n\t\treturn this._max;\n\t}",
"int getMax();",
"public int maximum() {\n \n if (xft.size() == 0) {\n return -1;\n }\n \n Integer maxRepr = xft.maximum();\n \n assert(maxRepr != null);\n \n int index = maxRepr.intValue()/binSz;\n \n TreeMap<Integer, Integer> map = getTreeMap(index);\n \n assert(map != null);\n \n Entry<Integer, Integer> lastItem = map.lastEntry();\n \n assert(lastItem != null);\n \n return lastItem.getKey();\n }",
"public Long getMaximum() {\r\n\t\treturn maximum;\r\n\t}",
"public Point getMax () {\r\n\r\n\treturn getB();\r\n }",
"public T max() {return max(comparator);}",
"public Integer max() {\n return this.max;\n }",
"public double getMaxVal() {\n return maxVal;\n }",
"public static int retourneMaxNumber() {\n int tmp = 0;\n try {\n String requete = \"SELECT Max(eleve.id_el) AS Maxeleve FROM eleve\";\n ResultSet rs = Connector1.statement.executeQuery(requete);\n while (rs.next()) {\n tmp = rs.getInt(1);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"ERROR \\n\" + e.getMessage());\n }\n return tmp;\n }",
"public int max() {\n\t\treturn 0;\n\t}",
"public DoubleMatrix1D getDeltaMax() { return deltaMax_; }",
"public int getMaxRow() {\n return maxRow;\n }",
"public int getMax() {\n return max;\n }",
"public int getMax() {\n return max;\n }",
"public int getMax() {\n return max;\n }",
"public Float getT1B11Xfmax() {\r\n return t1B11Xfmax;\r\n }",
"@Override\n\tpublic T max() {\n\t\treturn val;\n\t}",
"public int getMax() {\n\t\treturn max;\n\t}",
"public int getMax() {\n\t\treturn max;\n\t}",
"@Override\n public int iamax(IComplexNDArray x) {\n return NativeBlas.icamax(x.length(), x.data(), x.offset(), 1) - 1;\n }",
"public static double max(double[] array) {\n\t\tif (array.length==0) return Double.NEGATIVE_INFINITY;\n\t\tdouble re = array[0];\n\t\tfor (int i=1; i<array.length; i++)\n\t\t\tre = Math.max(re, array[i]);\n\t\treturn re;\n\t}",
"private int indiceColMax(String tabla[][]){\n int indice=1;\n float aux=Float.parseFloat(tabla[0][1]);\n for (int j = 1; j <= nVariables; j++) {\n if(Float.parseFloat(tabla[0][j])<0 && Float.parseFloat(tabla[0][j])<aux){\n aux=Float.parseFloat(tabla[0][j]);\n indice=j;\n }\n }\n return indice;\n }",
"public int getMax() {\n\t\treturn mMax;\n\t}",
"@Override\r\n\tpublic T maximum() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(this.root == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tBSTNode<T> node = maximum(this.root);\r\n\t\tif(node != null) {\r\n\t\t\treturn node.data;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"protected final int getMax() {\n\treturn(this.max);\n }",
"public static int getMax(float[][] storage) {\n float []arr=new float[WINDOW];\n for (int i = 0;i<WINDOW;i++){\n arr[i]=storage[i][1];\n }\n\n if(arr==null||arr.length==0){\n return 0;//如果数组为空 或者是长度为0 就返回null\n }\n int maxIndex=0;//假设第一个元素为最小值 那么下标设为0\n int[] arrnew=new int[2];//设置一个 长度为2的数组 用作记录 规定第一个元素存储最小值 第二个元素存储下标\n for(int i =0;i<arr.length-1;i++){\n if(arr[maxIndex]<arr[i+1]){\n maxIndex=i+1;\n }\n }\n arrnew[0]=(int)arr[maxIndex];\n arrnew[1]=maxIndex;\n\n return arrnew[0];\n }",
"public int getMaxColumn();",
"public byte get_max() {\n return (byte)getSIntBEElement(offsetBits_max(), 8);\n }",
"public double getMaxCoordinateValue() {\n if (this.max_x > this.max_y)\n return this.max_x;\n else\n return this.max_y;\n }",
"org.apache.xmlbeans.XmlDecimal xgetMaximum();"
] | [
"0.78540945",
"0.77121127",
"0.75292444",
"0.74625945",
"0.7347905",
"0.7253487",
"0.72139645",
"0.7211502",
"0.7208414",
"0.7202915",
"0.7103093",
"0.70918036",
"0.7081575",
"0.70794845",
"0.7071923",
"0.70118845",
"0.70087826",
"0.6991775",
"0.6991489",
"0.69811285",
"0.69648075",
"0.6962732",
"0.69594425",
"0.69594425",
"0.69552267",
"0.6953243",
"0.69470805",
"0.69395006",
"0.6935766",
"0.69256365",
"0.69125766",
"0.6906776",
"0.6901201",
"0.6898942",
"0.6892255",
"0.6889112",
"0.6883943",
"0.68719363",
"0.6867901",
"0.6866828",
"0.6827709",
"0.68166417",
"0.6805746",
"0.67994785",
"0.6789939",
"0.67801845",
"0.6773997",
"0.6747714",
"0.67459697",
"0.6737593",
"0.67142963",
"0.6705739",
"0.6704117",
"0.6698926",
"0.6689195",
"0.66866696",
"0.66688865",
"0.6653182",
"0.6648445",
"0.66469693",
"0.6646595",
"0.66423494",
"0.66388863",
"0.6628707",
"0.66270477",
"0.66194797",
"0.6614618",
"0.6601438",
"0.65902823",
"0.6584562",
"0.6570494",
"0.65702116",
"0.65689087",
"0.65681",
"0.65630263",
"0.65575176",
"0.65547705",
"0.6551565",
"0.65491736",
"0.65469474",
"0.65459865",
"0.654465",
"0.65330523",
"0.65330523",
"0.65330523",
"0.6531033",
"0.6529847",
"0.6528747",
"0.6528747",
"0.65226406",
"0.65187544",
"0.64995795",
"0.6497653",
"0.6493357",
"0.6489607",
"0.64842236",
"0.64797765",
"0.64748985",
"0.64718133",
"0.6467088"
] | 0.77937245 | 1 |
Returns the minimum value in the matrix. | public double getMinValue() {
double min = Double.POSITIVE_INFINITY;
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
if (data[i][j] < min)
min = data[i][j];
}
}
return min;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Matrix min(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols(), den = rows_c;\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c, m);\n for (int col = 1; col <= cols_c; col++) {\n double min = 0D;\n boolean firstiter = true;\n for (int row = 1; row <= rows_c; row++) {\n double tmp = m.get(row, col);\n if (!firstiter) {\n min = Math.min(tmp, min);\n } else {\n min = tmp;\n firstiter = false;\n }\n }\n d.set(1, col, min);\n }\n }\n return d;\n }",
"public double min(){\r\n\t\t//variable for min val\r\n\t\tdouble min = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the minimum is more than the current index, change min to that value\r\n\t\t\tif (min > this.data[i]){\r\n\t\t\t\tmin = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the minimum val\r\n\t\treturn min;\r\n\t}",
"public double min() {\n double resultat = Double.MAX_VALUE;\n double tmp = 0;\n for (int i = 0; i < tab.size(); i++) {\n tmp = CalculatorArray.min(tab.get(i));\n if (tmp < resultat) {\n resultat = tmp;\n }\n }\n\n System.out.println(\"Min colonne:\" + resultat);\n return resultat;\n }",
"public long min() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] < result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find min of empty array\");\n\t\t}\n\t}",
"public int getMinInSingleRow() {\n return minInSingleRow;\n }",
"int getMin() {\n\t\tif (stack.size() > 0) {\n\t\t\treturn minEle;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}",
"public double min() {\n\t\tif (count() > 0) {\n\t\t\treturn _min.get();\n\t\t}\n\t\treturn 0.0;\n\t}",
"public int minY()\n\t{\n\t\tint m = coords[0][1];\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tm = Math.min(m, coords[i][1]);\n\t\t}\n\t\t\n\t\treturn m;\n\t}",
"public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}",
"public int minX()\n\t{\n\t\tint m = coords[0][0];\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tm = Math.min (m, coords[i][0]);\n\t\t}\n\t\t\n\t\treturn m;\n\t}",
"public int getMinRow() {\n return minRow;\n }",
"public E findMin() {\n // TODO: YOUR CODE HERE\n return getElement(1);\n }",
"public int findMin() {\r\n\t\treturn this.min.value;\r\n\t}",
"public Integer getMin() { \n\t\treturn getMinElement().getValue();\n\t}",
"public int getMinRow();",
"public int getMin() {\n\t\treturn getMin(0.0f);\n\t}",
"public int minimum() {\n \n if (xft.size() == 0) {\n return -1;\n }\n \n Integer repr = xft.minimum();\n \n assert(repr != null);\n \n return repr.intValue();\n }",
"int min() {\n\t\t// added my sort method in the beginning to sort our array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the first term in the array --> first term should be min if\n\t\t// sorted\n\t\tint x = array[0];\n\t\treturn x;\n\t}",
"public Integer getMin() {\n\t\tif (this.Minimum==null)\n\t\t{\n\t\t\tcalcMinMax();\n\t\t}\n\t\treturn this.Minimum;\n\t}",
"public double getMinValue() {\n\t\tdouble min = Double.POSITIVE_INFINITY;\n\t\tfor (int i = 0; i < dataSheet.getDesignCount(); i++) {\n\t\t\tdouble value = dataSheet.getDesign(i).getDoubleValue(this);\n\t\t\tif (value < min)\n\t\t\t\tmin = value;\n\t\t}\n\t\treturn min;\n\t}",
"public double getMinimum() {\n return (min);\n }",
"public double elementMinAbs() {\n return ops.elementMinAbs(mat);\n }",
"public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }",
"public double min() {\n/* 305 */ Preconditions.checkState((this.count != 0L));\n/* 306 */ return this.min;\n/* */ }",
"protected double getMinDouble() {\r\n boolean handleOutOfMemoryError = false;\r\n double min = Double.POSITIVE_INFINITY;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double noDataValue = g.getNoDataValue(false);\r\n double value;\r\n int row;\r\n int col;\r\n for (row = 0; row < nrows; row++) {\r\n for (col = 0; col < ncols; col++) {\r\n value = getCell(\r\n row,\r\n col);\r\n if (value != noDataValue) {\r\n min = Math.min(\r\n min,\r\n value);\r\n }\r\n }\r\n }\r\n return min;\r\n }",
"Coordinate getMinX();",
"public AnyType findMin() {\n\t\treturn elementAt(findMin(root));\n\t}",
"public double minimum(double[][] datasetF) {\r\n\t\tint col = 0;\r\n\t\tdouble minF = Double.MAX_VALUE;\r\n\t\twhile (col != numOfDimension) {\r\n\t\t\tminF = Double.MAX_VALUE;\r\n\t\t\tfor (int i = 0; i < datasetF.length; i++) {\r\n\t\t\t\tif (datasetF[i][col] < minF)\r\n\t\t\t\t\tminF = datasetF[i][col];\r\n\t\t\t}\r\n\t\t\t// System.out.println(\"Minimum \"+col+\" = \" + minF);\r\n\t\t\tcol++;\r\n\t\t}\r\n\t\treturn minF;\r\n\t}",
"private double getLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else\n {\n double lowest = scores[0];\n for (int i = 1; i < currentSize; i++)\n {\n if (scores[i] < lowest)\n {\n scores[i] = lowest;\n }\n }\n return lowest;\n }\n }",
"public double min() {\n return min(0.0);\n }",
"public Coord minCell()\n {\n\t int minX = getGrid().keySet().stream().mapToInt(Coord::getX).min().orElse(0);\n\n\t int minY = getGrid().keySet().stream().mapToInt(Coord::getY).min().orElse(0);\n\n\t return new Coord(minX, minY);\n }",
"public void minimum()\n\t{\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tif(rowTick[i]==8888)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(columnTick[j]==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cost[i][j]<min)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmin=cost[i][j];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public T findMin();",
"public int min()\n\t{\n\t\tif (arraySize > 0)\n\t\t{\n\t\t\tint minNumber = array[0];\n\t\t\tfor (int index = 0; index < arraySize; index++) \n\t\t\t{\n\t\t\t\tif (array[index] < minNumber)\n\t\t\t\t{\n\t\t\t\t\tminNumber = array[index];\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\treturn minNumber;\n\t\t}\n\t\tSystem.out.println(\"Syntax error, array is empty.\");\n\t\treturn -1;\n\n\t}",
"public int extractMinimum() {\n \n //O(log_2(w))\n int min = minimum();\n\n if (min == -1) {\n assert(xft.size() == 0);\n return -1;\n }\n \n remove(min);\n \n return min;\n }",
"Double getMinimumValue();",
"private double getMin() {\n return Collections.min(values.values());\n }",
"public double getMinimumX () {\n return minimumX;\n }",
"int getXMin();",
"public int getMin() {\n\t\t\treturn harr[0];\n\t\t}",
"public E returnMinElement(){\r\n if (theData.size() <= 0) return null;\r\n\r\n E min = theData.get(0).getData();\r\n\r\n for (int i = 0; i< theData.size() ; i++){\r\n if (min.compareTo(theData.get(i).getData()) > 0 ){\r\n min = theData.get(i).getData();\r\n }\r\n }\r\n return min;\r\n }",
"public final double getMin() {\r\n\t\treturn this.m_min;\r\n\t}",
"public Double getMinimum() {\n\t\treturn minimum;\n\t}",
"public Double getMinimumValue () {\r\n\t\treturn (minValue);\r\n\t}",
"public int findLowestTemp() {\n\t\t\n\t\tint min = 0;\n\t\tint indexLow = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tif (temps[i][1] < min) {\n\t\t\t\tmin = temps[i][1];\n\t\t\t\tindexLow = 0;\n\t\t\t}\n\t\t\n\t\treturn indexLow;\n\t\t\n\t}",
"public E findMin() throws NoSuchElementException {\n\t\treturn minimums.peek();\n\t}",
"E minVal();",
"public E findMin(){\n if(!isEmpty()){\n AvlNode<E> node = findMin(root);\n return (E)node.value;\n } else {\n return null;\n }\n }",
"double getMin();",
"double getMin();",
"public T min();",
"public double getMinimumValue()\n {\n this.minimumValue = getMinNumber(allValues);\n this.maximumValue = getMaxNumber(allValues);\n return minimumValue;\n }",
"public double getMinS() {\n return u[0];\n }",
"public int getMin()\n\t{\n\t\treturn min;\n\t}",
"public T getMin()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn array[0];\n\t}",
"public float getMinX(){\n return points.get(0).getX();\n }",
"public Float getT1B11Xfmin() {\r\n return t1B11Xfmin;\r\n }",
"double getMin() {\n\t\t\treturn value_min;\n\t\t}",
"public String min()\r\n\t {\r\n\t\t if(this.min != null)\r\n\t\t {\r\n\t\t\t return this.min.getValue(); \r\n\t\t }\r\n\t\t return null;\r\n\t }",
"public int getMinimum() {\r\n return min;\r\n }",
"public double minXp(){\n\t\tmin = xp[0];\n\t\tfor(int i=1;i<xp.length;i++){\n\t\t\tif(xp[i]<min){\n\t\t\t\tmin=xp[i];\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}",
"public E minimum() {\n\t\tif (heap.size() <= 0)\n\t\t\treturn null;\n\t\telse\n\t\t\treturn heap.get(0);\n\t}",
"public E minimum() {\n\t\tif (heap.size() <= 0)\n\t\t\treturn null;\n\t\telse\n\t\t\treturn heap.get(0);\n\t}",
"public Node min() {\n\t\tNode x = root;\n\t\tif (x == null) return null;\n\t\twhile (x.getLeft() != null)\n\t\t\tx = x.getLeft();\n\t\treturn x;\n\t}",
"public int getMinimum() {\n \tcheckWidget();\n \treturn minimum;\n }",
"public IntegerDt getMinElement() { \n\t\tif (myMin == null) {\n\t\t\tmyMin = new IntegerDt();\n\t\t}\n\t\treturn myMin;\n\t}",
"public Point getMin () {\r\n\r\n\treturn getA();\r\n }",
"public int getMin() {\n\t\treturn min;\n\t}",
"protected ValuePosition getMinimum() {\n\t\t// Calcule la position et la durée d'exécution de la requête la plus courte dans le tableau des requêtes\n\t\tValuePosition minimum = new ValuePosition();\n\t\tminimum.position = 0;\n\t\tfor(int pos=0; pos<requests.length; pos++) {\n\t\t\tRequest request = requests[pos];\n\t\t\tif(request == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(minimum.value == null || request.getElapsedTime() < minimum.value) {\n\t\t\t\tminimum.position = pos;\n\t\t\t\tminimum.value = request.getElapsedTime();\n\t\t\t}\n\t\t}\n\t\treturn minimum;\n\t}",
"public E findMin() {\n Node<E> temp = root;\n // while loop will run until there is no longer a node that has a left child.\n // temp is then assigned to the next node in the left child and will return\n // the node with the minimum value in the BST. The node that does not have a left\n // child will be the minimum value.\n while(temp.left != null){\n temp = temp.left;\n }\n return temp.getInfo();\n }",
"public double getMinX() {\n\treturn minX;\n }",
"public abstract int findRowMin(boolean z, int i, int[] iArr);",
"protected IExpressionValue min()throws TableFunctionMalformedException,\r\n\t\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException{\r\n\t\t// Debug.println(\"ANALISING MIN FUNCTION\");\r\n\t\t\r\n\t\tIExpressionValue ret1 = null;\r\n\t\tIExpressionValue ret2 = null;\r\n\t\tmatch('(');\r\n\t\tret1 = this.expression();\r\n//\t\tmatch(';');\r\n\t\tif (look != ';' && look != ',') {\r\n\t\t\texpected(\";\");\r\n\t\t}\r\n\t\tnextChar();\r\n\t\tskipWhite();\r\n\t\tret2 = this.expression();\r\n\t\tmatch(')');\r\n\t\t/*\r\n\t\t// old code: tests which ret1/ret2 to return and test consistency. ComparisionProbabilityValue replaces it.\r\n\t\tif (!Float.isNaN(ret1)) {\r\n\t\t\tif (!Float.isNaN(ret2)) {\r\n\t\t\t\tret1 = ((ret2<ret1)?ret2:ret1);\r\n\t\t\t}\r\n\t\t} else if (!Float.isNaN(ret2)) {\r\n\t\t\treturn ret2;\r\n\t\t}\r\n\t\t*/\r\n\t\treturn new ComparisionProbabilityValue(ret1,ret2,false);\r\n\t\t\r\n\t}",
"public static double min(double[] array) {\n\t\tif (array.length==0) return Double.POSITIVE_INFINITY;\n\t\tdouble re = array[0];\n\t\tfor (int i=1; i<array.length; i++)\n\t\t\tre = Math.min(re, array[i]);\n\t\treturn re;\n\t}",
"public int getxMin() {\n\t\treturn xMin;\n\t}",
"public double getMinimumValue() { return this.minimumValue; }",
"public int extractMinimum() {\n if (size == 0) {\n return Integer.MIN_VALUE;\n }\n if (size == 1) {\n size--;\n return arr[0];\n }\n\n MathUtil.swap(arr, 0, size - 1);\n size--;\n minHeapify(0);\n return arr[size];\n }",
"public AnyType findMin() {\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new UnderflowException();\r\n\t\treturn findMin(root).element;\r\n\t}",
"public static float min(float [] array)\r\n\t{\r\n\t\tfloat minValue = array[0];\r\n\t\tfor (int i = 1; i < array.length; i++)\r\n\t\t{\r\n\t\t\tif (array[i] < minValue)\r\n\t\t\t{\r\n\t\t\t\tminValue = array[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn minValue;\r\n\t}",
"public E extractMin() {\n\t\tif (heap.size() <= 0)\n\t\t\treturn null;\n\t\telse {\n\t\t\tE minVal = heap.get(0);\n\t\t\theap.set(0, heap.get(heap.size() - 1)); // Move last to position 0\n\t\t\theap.remove(heap.size() - 1);\n\t\t\tminHeapify(heap, 0);\n\t\t\treturn minVal;\n\t\t}\n\t}",
"public E extractMin() {\n\t\tif (heap.size() <= 0)\n\t\t\treturn null;\n\t\telse {\n\t\t\tE minVal = heap.get(0);\n\t\t\theap.set(0, heap.get(heap.size()-1)); // Move last to position 0\n\t\t\theap.remove(heap.size()-1);\n\t\t\tminHeapify(heap, 0);\n\t\t\treturn minVal;\n\t\t}\n\t}",
"public int minValue() {\n\t\treturn minValue(root);\n\t}",
"private double min(double[] vector){\n if (vector.length == 0)\n throw new IllegalStateException();\n double min = Double.MAX_VALUE;\n for(double e : vector){\n if(!Double.isNaN(e) && e < min)\n min = e;\n }\n return min;\n }",
"public static int findMin(){\n int min = array[0];\n for(int x = 1; x<array.length; x++ ){\n if(array[x]<min){\n min=array[x];\n }\n }\n return min;\n}",
"public Integer min() {\n return this.min;\n }",
"public static int findMinimum(int[] array) {\n if (array == null || array.length == 0) {\n return Integer.MIN_VALUE;\n }\n int left = 0;\n int right = array.length -1;\n int element = findPivot(array, left, right);\n return element;\n }",
"public node_data heapExtractMin(){\n\t\tdouble min = _positiveInfinity;\n\t\tnode_data v=null;\n\t\tif (!isEmpty()){\n\t\t\tv = _a[0];\n\t\t\tmin = v.getWeight();\n\t\t\t_a[0]=_a[_size-1];\n\t\t\t_size = _size-1;\n\t\t\tminHeapify(0, _size);\n\t\t}\n\t\treturn v;\n\t}",
"public double getMinX() {\n\t\treturn nx;\n\t}",
"public double getMinT() {\n return v[0];\n }",
"public PrimEdge calculateMinimum() {\n int minWage = Integer.MAX_VALUE;\n PrimEdge result = null;\n for (Map.Entry<Integer, PrimEdge> entry : dtable.entrySet()) {\n if (entry.getValue().getWage() < minWage) {\n result = entry.getValue();\n minWage = entry.getValue().getWage();\n }\n }\n return result;\n }",
"int min();",
"public int min(int[] array) {\n if (array == null || array.length == 0){\n return 0;\n }\n int min = array[0];\n for(int i = 0; i < array.length; i++){\n if (array[i] < min){\n min = array[i];\n }\n }\n return min;\n }",
"public static int findMin(int mat3d[][][]) {\n //creates int to check for minimum, valued at 100 because it's gaurenteed to be larger than any int in array\n int checker=100;\n //for loop, runs 3 times, get the pattern?\n for(int s=0; s<3; s++) {\n //holy shit, it' sthe same pattern as ^^\n for(int j=0; j<(3+2*s); j++) {\n //Have you caught on?\n for(int c=0; c<(s+j+1); c++) {\n //if statement which replaces checkder value, as the slot in array, if it's lower\n if(checker> mat3d[s][j][c]){\n checker=mat3d[s][j][c];\n }\n }\n }\n }\n //returns this int value\n return checker;\n \n \n }",
"public static double min(double[] array) { \r\n \r\n double minNum = array[0];\r\n for(int i = 0; i < array.length; i++) {\r\n if(minNum > array[i]) {\r\n minNum = array[i];\r\n }\r\n }\r\n return minNum;\r\n }",
"int min() {\n return min;\r\n }",
"@Override\n public int getMinX() {\n return this.minX;\n }",
"public Node getMin() {\n return getMin(root);\n }",
"public double obterXmin() {\n\t\treturn xmin;\n\t}",
"public K min();",
"public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}"
] | [
"0.77602583",
"0.7650631",
"0.7303007",
"0.72889477",
"0.72115487",
"0.7210371",
"0.71747905",
"0.70905256",
"0.70787966",
"0.70724815",
"0.70694387",
"0.7052039",
"0.70429724",
"0.7034406",
"0.70299315",
"0.6996349",
"0.6974482",
"0.696695",
"0.69641584",
"0.6959869",
"0.6941481",
"0.69177306",
"0.69169605",
"0.69016004",
"0.68938327",
"0.6875385",
"0.6857551",
"0.68558186",
"0.68503314",
"0.68459666",
"0.68434536",
"0.68423826",
"0.6820594",
"0.68053234",
"0.6800984",
"0.6796022",
"0.67872244",
"0.67836696",
"0.67808276",
"0.6775502",
"0.67597944",
"0.6742908",
"0.6737763",
"0.6732558",
"0.6731558",
"0.6720624",
"0.6719769",
"0.6706786",
"0.6700515",
"0.6700515",
"0.6698979",
"0.6674798",
"0.6648364",
"0.66475046",
"0.66462076",
"0.66428715",
"0.6642699",
"0.6638009",
"0.66184384",
"0.6616184",
"0.65996236",
"0.659028",
"0.659028",
"0.65839225",
"0.65801173",
"0.65769774",
"0.6575728",
"0.6574679",
"0.6574356",
"0.65697336",
"0.656853",
"0.6556633",
"0.6552622",
"0.6551622",
"0.65496874",
"0.6541288",
"0.65382934",
"0.6537332",
"0.6537119",
"0.65354604",
"0.65340453",
"0.6533458",
"0.65221226",
"0.6515708",
"0.6515281",
"0.6511815",
"0.6511431",
"0.6508985",
"0.6508636",
"0.65079653",
"0.6497732",
"0.64873534",
"0.64859354",
"0.6481531",
"0.64789677",
"0.6473785",
"0.64722985",
"0.6470174",
"0.6468575",
"0.64460754"
] | 0.79918 | 0 |
Returns the number of elements. | public int getSize() {
return rows * cols;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getNumberOfElements();",
"public int getNumOfElements() {\n return numOfElements;\n }",
"Long getNumberOfElement();",
"public abstract Integer getNumberOfElements();",
"public int getNumElements()\n {\n return numElements;\n }",
"public int getNumElements() {\n\t\treturn numElements;\n\t}",
"public int getNumElements() {\n return numElements;\n }",
"public int getNumElements() {\n return numElements;\n }",
"public static int numElements() {\n return values().length;\n }",
"public int getNrOfElements() {\n return this.nrOfElements;\n }",
"public int size() {\n return numOfElements;\n }",
"public int size() {\n\t\t// DO NOT CHANGE THIS METHOD\n\t\treturn numElements;\n\t}",
"public int size() {\n\t\treturn elements.size();\n\t}",
"public int size() {\n\n return elements.size();\n }",
"public int size() {\r\n\t\treturn elements.size();\r\n\t}",
"public int size() {\n return elements.size();\n }",
"public int size() {\r\n\t\treturn elements;\r\n\t}",
"public int size() {\n\t\treturn elements;\n\t}",
"public int size() {\n return elements;\n }",
"public int size() {\n\t\tint numElements = 0;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (list[i] != null) {\n\t\t\t\tnumElements++;\n\t\t\t}\n\t\t}\n\t\treturn numElements;\n\t}",
"public int size() {\n\t\treturn this.elements.size();\n\t}",
"public int size() {\r\n int temp = 0;\r\n for (int i = 0; i < elem.length; i++) {\r\n if (elem[i] != null) {\r\n temp++;\r\n }\r\n }\r\n return temp;\r\n }",
"public int size()\n\t{\n\t\treturn m_elements.size();\n\t}",
"public int getSize() {\n\t\treturn numElements;\n\t}",
"int getTotalElements();",
"public int getUnitCount() {\n return _elements.length;\n }",
"public int size() {\r\n assert numElements >= 0 : numElements;\r\n assert numElements <= capacity : numElements;\r\n assert numElements >= elementsByFitness.size() : numElements;\r\n return numElements;\r\n }",
"public Long getElementCount();",
"public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}",
"@Override\n\tpublic int size() {\n\t\treturn this.numberOfElements;\n\t}",
"public static int numberOfElement()\n\t{\n\t\treturn REF_INT_STRING.size();\n\t}",
"public int getNumElements() {\n return theMap.size();\n }",
"public int size() {\n //encapsulate\n int size = this.array.length;\n return size;\n }",
"public int size() {\n\t\tint result = 0;\n\t\tfor (E val: this)\n\t\t\tresult++;\n\t\treturn result;\n\t}",
"public int sizeOf();",
"public int arraySize();",
"public int size() {\n int counter = 1;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n iter = iter.next;\n counter += 1;\n }\n return counter;\n }",
"@Override\n\tpublic int size() {\n\t\tint nr = 0;\n\t\tfor (int i = 0; i < nrb; i++) {\n\t\t\t// pentru fiecare bucket numar in lista asociata acestuia numarul de\n\t\t\t// elemente pe care le detine si le insumez\n\t\t\tfor (int j = 0; j < b.get(i).getEntries().size(); j++) {\n\t\t\t\tnr++;\n\t\t\t}\n\t\t}\n\t\treturn nr;// numaru total de elemente\n\t}",
"public int getTypeWithElementsCount() {\n\t\t\treturn this.TypeWithElements.size();\n\t\t}",
"public static int size() \r\n\t{\r\n\t\treturn m_count;\r\n }",
"Integer size();",
"Integer size();",
"public int size()\r\n\t{\r\n\t\treturn count;\r\n\t}",
"public final int size() {\n int size = 0;\n final Iterator iterator = this.iterator();\n while (iterator.hasNext()) {\n size++;\n iterator.next();\n }\n return size;\n }",
"public int size() {\n\t\treturn this.elts.length;\n\t}",
"public int length() {\n return nodeList.size();\n }",
"public int size() {\n\t\treturn N;\n\t}",
"public int size() {\n\t\treturn N;\n\t}",
"public int size() {\n\t\treturn N;\n\t}",
"public int size() {\n\t\treturn N;\n\t}",
"public int size() {\n\t\treturn N;\n\t}",
"public int size() {\n // DO NOT MODIFY THIS METHOD!\n return size;\n }",
"public int length()\n {\n if(integerList == null)\n return 0;\n else\n return integerList.length;\n }",
"public int size() {\r\n return N;\r\n }",
"public int size()\n\t\t{\n\t\treturn N;\n\t\t}",
"public int size()\r\n {\r\n return nItems;\r\n }",
"public int size()\n {\n return N;\n }",
"public int size() {\n\t\treturn array.length();\n\t}",
"public int size()\r\n {\r\n return count;\r\n }",
"public int getNumElementsRemoved() {\n return elementsRemoved;\n }",
"int sizeOfBridgeElementArray();",
"public int size() {\n return N;\n }",
"public int size() {\n return N;\n }",
"public int size() {\n return N;\n }",
"public int size() {\n return N;\n }",
"public int size() {\n return N;\n }",
"public int size() {\n return N;\n }",
"public int size() {\n return N;\n }",
"public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}",
"int size() {\n\t\treturn array.length;\n\t}",
"public int size() {\r\n // TODO\r\n return 0;\r\n }",
"@Override\n\tpublic int size() {\n\t\treturn util.iterator.IteratorUtilities.size(iterator());\n\t}",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();"
] | [
"0.89427835",
"0.8689523",
"0.86338824",
"0.8625345",
"0.8595692",
"0.847794",
"0.8469816",
"0.8469816",
"0.84430426",
"0.839363",
"0.8383511",
"0.8338894",
"0.82912326",
"0.8280477",
"0.82766205",
"0.82696444",
"0.82326615",
"0.8226335",
"0.8164076",
"0.81539726",
"0.80942404",
"0.80644614",
"0.80534095",
"0.7974909",
"0.7970902",
"0.79394555",
"0.7892198",
"0.78626525",
"0.7829798",
"0.7817505",
"0.7727217",
"0.7717482",
"0.7635446",
"0.75814456",
"0.75650156",
"0.7556013",
"0.7505632",
"0.74405926",
"0.7419142",
"0.74184185",
"0.74083865",
"0.74083865",
"0.7395568",
"0.73892814",
"0.7374684",
"0.7373084",
"0.7372674",
"0.7372674",
"0.7372674",
"0.7372674",
"0.7372674",
"0.73698014",
"0.7362459",
"0.7352797",
"0.7351565",
"0.73485416",
"0.7345658",
"0.73417735",
"0.73414123",
"0.73232764",
"0.7320928",
"0.73170644",
"0.73170644",
"0.73170644",
"0.73170644",
"0.73170644",
"0.73170644",
"0.73170644",
"0.7314553",
"0.7312171",
"0.7306259",
"0.73020595",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007",
"0.7298007"
] | 0.0 | -1 |
Test of findAllCars method, of class CarsRestController. | @Test
public void testFindAllCars() {
System.out.println("findAllCars");
List<CarModel> carList = new ArrayList<CarModel>();
CarModelDTO dto = new CarModelDTO();
CarModel carResult = new CarModel();
carResult.setId(new Integer(1));
carResult.setBrand("Ford");
carResult.setFrom(new Integer(2019));
carResult.setTo(new Integer(2020));
carList.add(carResult);
dto.setCars(carList);
dto.setMessage("OK");
dto.setSuccess(true);
ResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);
when(carService.findAllCars()).thenReturn(expResult);
ReflectionTestUtils.setField(carController, "carService", carService);
ResponseEntity<CarModelDTO> result = carController.findAllCars();
assertEquals(expResult.getStatusCode(), result.getStatusCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n void getAllCarsSuccess() {\n List<Car> cars = carDao.getAll();\n assertNotNull(cars);\n assertEquals(1, cars.size());\n }",
"@Test\n public void testGetCars() {\n System.out.println(\"getCars\");\n CarController instance = new CarController();\n List<Car> expResult = null;\n List<Car> result = instance.getCars();\n for(Car car: result) {\n System.out.println(car);\n }\n assertTrue(true);\n }",
"@Test\n\tpublic void testFindCarsByBrand() {\n\t\tSystem.out.println(\"findCarsByBrand\");\n\t\tString brand = \"Ford\";\n\t\tList<CarModel> carList = new ArrayList<CarModel>();\n\t\tCarModelDTO dto = new CarModelDTO();\n\t\tCarModel carResult = new CarModel();\n\t\tcarResult.setId(new Integer(1));\n\t\tcarResult.setBrand(\"Ford\");\n\t\tcarResult.setFrom(new Integer(2019));\n\t\tcarResult.setTo(new Integer(2020));\n\t\tcarList.add(carResult);\n\t\tdto.setCars(carList);\n\t\tdto.setMessage(\"OK\");\n\t\tdto.setSuccess(true);\n\t\tResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);\n\t\twhen(carService.findCarsByBrand(brand)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<CarModelDTO> result = carController.findCarsByBrand(brand);\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"public List<Car>getAllCars(){\r\n return (List<Car>) repository.findAll();\r\n }",
"@Test\n\tpublic void testGetCarById() {\n\t\tSystem.out.println(\"getCarById\");\n\t\tint carId = 1;\n\t\tList<CarModel> carList = new ArrayList<CarModel>();\n\t\tCarModelDTO dto = new CarModelDTO();\n\t\tCarModel carResult = new CarModel();\n\t\tcarResult.setId(new Integer(1));\n\t\tcarResult.setBrand(\"Ford\");\n\t\tcarResult.setFrom(new Integer(2019));\n\t\tcarResult.setTo(new Integer(2020));\n\t\tcarList.add(carResult);\n\t\tdto.setCars(carList);\n\t\tdto.setMessage(\"OK\");\n\t\tdto.setSuccess(true);\n\t\tResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);\n\t\twhen(carService.findCarById(carId)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<CarModelDTO> result = carController.getCarById(carId);\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"@Test\n void findAll_API_TEST() throws Exception {\n\n //TEST DATA\n Pet pet_1 = new Pet();\n pet_1.setId(1);\n pet_1.setName(\"John\");\n\n Pet pet_2 = new Pet();\n pet_2.setId(2);\n pet_2.setName(\"John\");\n\n Pet pet_3 = new Pet();\n pet_3.setId(3);\n pet_3.setName(\"John\");\n\n given(petService.findAll()).willReturn(asList(pet_1, pet_2, pet_3));\n mvc.perform(get(\"/owners/*/pets\").accept(MediaType.APPLICATION_JSON))\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$[0].id\").value(1))\n .andExpect(jsonPath(\"$[1].id\").value(2))\n .andExpect(jsonPath(\"$[2].id\").value(3));\n\n }",
"@Transactional\r\n\tpublic List<Car> getAllCars() {\n\t\treturn (List<Car>)cr.findAll();\r\n\t}",
"@Test\n public void findAll() throws Exception {\n\n MvcResult result = mockMvc.perform(get(\"/v1/chamados\"))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON))\n .andReturn();\n List<ChamadoDTO> chamados = asList(objectMapper.readValue(result.getResponse().getContentAsString(), ChamadoDTO[].class));\n for (ChamadoDTO c : chamados) {\n assertNotNull(c.getIdChamado());\n assertNotNull(c.getDescChamado());\n assertNotNull(c.getDescTituloChamado());\n assertNotNull(c.getStatusChamado());\n assertNotNull(c.getStatusChamado().getCodStatusChamado());\n assertNotNull(c.getStatusChamado().getDescStatusChamado());\n assertNotNull(c.getDataHoraInclusao());\n }\n }",
"@GetMapping(\"/api/rents/findbycar/{id}\")\r\n public ResponseEntity<List<Rent>> findByCar(@PathVariable(name = \"id\") Long id){\r\n final List<Rent> rent = rentService.findByCarId(id);\r\n return rent != null\r\n ? new ResponseEntity<>(rent, HttpStatus.OK)\r\n : new ResponseEntity<>(HttpStatus.NOT_FOUND);\r\n }",
"@Test\n public void testGetCarById() {\n\n }",
"@Test\n public void findAllVehiclesTest() throws ItemNotFoundException {\n controller.findAllVehicles(null,null,null,request,principal);\n verify(vService).findAllVehicles(0,0, principal);\n\n //Test with all default values\n controller.findAllVehicles(null,null,5,request,principal);\n verify(vService).findAllVehicles(0,5, principal);\n\n //Test with all default values\n controller.findAllVehicles(\"car\",null,null,request,principal);\n verify(vService).findAllVehiclesByDisplayName(\"car\",0,0, principal);\n }",
"@Override\n\tpublic ArrayList<Carpo> getAllCars() {\n\t\treturn inList.getAll();\n\t}",
"@Test\n void getRequest_params_SuccessfullyReturnsCorrectCars() throws Exception {\n when(autosService.getAutos(anyString(),anyString())).thenReturn(new AutosList(autosList));\n\n mockMvc.perform(get(\"/api/autos?color=red&make=Honda\"))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.autos\", hasSize(5)));\n }",
"public List<Car> findCarsByBrand(String brand){\r\n return repository.findCarsByBrand(brand);\r\n }",
"List<Car> findByBrand(@NonNull String brand);",
"@Test\n public void testFindAll() {\n List<Item> items = repository.findAll();\n assertEquals(3, items.size());\n }",
"@Test\n public void testFindAll() {\n final WebTarget target = target().\n path(\"category\");\n\n Response response = target.request(MediaType.APPLICATION_JSON_TYPE).get();\n\n assertEquals(200, response.getStatus());\n List<Category> categories = response.readEntity(new GenericType<List<Category>>() {});\n assertTrue(categories.size() > 0);\n \n response = target.request(MediaType.APPLICATION_XML_TYPE).get();\n assertEquals(200, response.getStatus());\n }",
"@Test\n public void testGetAllRecipes() throws Exception {\n System.out.println(\"getAllRecipesREST\");\n given()\n .contentType(\"application/json\")\n .accept(ContentType.JSON)\n .when()\n .get(\"/recipes/all\")\n .then()\n .statusCode(200).assertThat().body(\"[0]\", equalTo(\"Slow cooker spicy chicken and bean soup\"));\n \n }",
"@GetMapping\n @RequestMapping(\"v2\")\n public String getAllCars(){\n String carName=carRepository.findCardWithinYear(\"1920\");\n return \"The car is: \"+carName;\n }",
"public abstract List<CarTO> listAll();",
"List<Corretor> findAll();",
"public ArrayList<CarDetail> gettingAllAvailableCars() throws Exception;",
"@Test\n public void findAll() {\n // SalesRep:\n List<SalesRep> salesRepList = salesRepRepository.findAll();\n assertEquals(2, salesRepList.size());\n assertEquals(\"Pepe\", salesRepList.get(0).getName());\n // Leads:\n List<Lead> leadList = leadRepository.findAll();\n assertEquals(3, leadList.size());\n assertEquals(\"María\", leadList.get(0).getName());\n // Opportunities:\n List<Opportunity> opportunityList = opportunityRepository.findAll();\n assertEquals(3, opportunityList.size());\n assertEquals(5, opportunityList.get(0).getQuantity());\n // Account:\n List<Account> accountList = accountRepository.findAll();\n assertEquals(2, accountList.size());\n assertEquals(20, accountList.get(0).getEmployeeCount());\n }",
"@Override\n @Transactional(readOnly = true)\n public List<CatCarburantDTO> findAll() {\n log.debug(\"Request to get all CatCarburants\");\n return catCarburantRepository.findAll().stream()\n .map(catCarburantMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }",
"@Repository\npublic interface CarRepository extends JpaRepository<Car, Integer> {\n\t\n\t/**\n\t * En Car pga unik namn\n\t * @param name Reg. nr.\n\t * @return En Car pga unik namn dvs. reg.nr.\n\t * @author Danijela\n\t */\n\tCar findByName(String name);\n\n\t/**\n\t * Alla bilar pga brand\n\t * @param brandName Volvo, Renault..\n\t * @return En lista av bilar pga brand\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.brandName IN :names\")\n\tList<Car> findByBrand(@Param(\"names\") Collection<String> brandName);\n\n\t/**\n\t * Alla bilar pga brand och model\n\t * @param brandName Volvo, Renault..\n\t * @param model m3, Clio ..\n\t * @return En lista av bilar far pga brand och model\n\t * @author Danijela\n\t */\n\t@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.modelName IN :models\")\n\tList<Car> findAllByBrandAndModel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"models\") Collection<String> model);\n\n\t/**\n\t * Alla bilar som ar biligare an prise som anvandare valde\n\t * @param price Prise som anvandare valde\n\t * @return En lista av bilar som ar biligare an prise som anvandare valde\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.price <= :price\")\n\tList<Car> findByBelowPrice(@Param(\"price\") Integer price);\n\n\t/**\n\t * Alla bilar som har mindre kilometer an den som anvandare valde\n\t * @param kilometer Kilometer som anvandare valde\n\t * @return En lista av bilar som har mindre kilometer an den som anvandare valde\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.kilometer <= :kilometer\")\n\tList<Car> findBelowKilometer(@Param(\"kilometer\") Integer kilometer);\n\n\t/**\n\t * Alla bilar med automatisk eller med manuell vaxel\n\t * @param automatic Automatisk vaxel\n\t * @return List av bilar med automatisk eller en lista med manuell vaxel\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.automatic IN :automatics\")\n\tList<Car> findIsAutomatic(@Param(\"automatics\") boolean automatic);\n\n\t/**\n\t * Alla bilar som man kan eller som man inte kan hyra ut\n\t * @param isRentable Man kan eller inte kan hyra ut bil\n\t * @return Lista av bilar som man kan eller en lista av bilar som man inte kan hyra ut\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.isRentable IN :isRentables\")\n\tList<Car> findAllRentable(@Param(\"isRentables\") boolean isRentable);\n\n\t/**\n\t * Alla bilar som har eller som inte har navigation\n\t * @param navigation Bil har eller inte har navigation\n\t * @return en lista av bilar som har eller en lista av bilar som inte har navigation\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.navigation IN :navigations\")\n\tList<Car> findAllWithNavigation(@Param(\"navigations\") boolean navigation);\n\n\t/**\n\t * Alla nya bilar eller alla begagnade bilar\n\t * @param nya Nya bilar eller begagnade bilar\n\t * @return En lista av nya bilar eller en lista av begagnade bilar\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.isNew IN :nya\")\n\tList<Car> findAllNewCar(@Param(\"nya\") boolean nya);\n\n\t/**\n\t * Alla bilar med samma typ av fuel\n\t * @param fuel Bensin, gas...\n\t * @return En lista av bilar med samma typ av fuel\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.fuel IN :fuels\")\n\tList<Car> findAllCarWithSameFuel(@Param(\"fuels\") String fuel);\n\t/**\n\t * Alla bilar som ar samma brand och anvander sama typ av fuel\n\t * @param brandName Volvo, Renault...\n\t * @param fuel Bensin , gas ..\n\t * @return En lista av bilar som ar samma brand och anvander sama typ av fuel\n\t * @author Danijela\n\t */\n\t@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.fuel IN :fuels\")\n\tList<Car> findAllByBrandAndFuel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"fuels\") Collection<String> fuel);\n\n\t/**\n\t * Alla bilar som ar samma brand, samma typ av model och anvander samma fuel\n\t * @param brandName Volvo, Renault ..\n\t * @param modelName m3, Clio...\n\t * @param fuel Bensin, gas..\n\t * @return En lista av bilar som ar samma brand, samma typ av model och anvander samma fuel\n\t * @author Danijela\n\t */\n\t@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.modelName IN :models AND u.fuel IN :fuels\")\n\tList<Car> findAllByBrandModelAndFuel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"models\") Collection<String> modelName, @Param(\"fuels\") Collection<String> fuel);\n\t/**\n\t * Alla bilar som ar tillverkad samma ar\n\t * @param yearProduce Ar när ar bil tillverkad\n\t * @return En lista av bilar som ar tillverkad samma ar\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.yearProduce IN :years\")\n\tList<Car> findCarsByYear(@Param(\"years\") Integer yearProduce);\n\n\t/**\n\t * Alla bilar som har samma farg\n\t * @param color Farg\n\t * @return En lista av bilar som har samma farg\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE lower (u.color) IN :colors\")\n\tList<Car> findCarsByColor(@Param(\"colors\") String color);\n\n\t/**\n\t * Alla bilar som kom till butik på samma tid\n\t * @param timeStored Tid när bilen kom till butik\n\t * @return En lista av bilar som kom till butik på samma tid\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.timeStored <= :timeStored\")\n\tList<Car> findCarByTimeStored(@Param(\"timeStored\") Date timeStored);\n\n\n\t/**\n\t * Alla bilar som ar samma typ\n\t * @param modelName typ av car, model: m3, Clio...\n\t * @return En lista av bilar som ar samma typ\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.modelName IN :modelNames\")\n\tList<Car> findCarsByModelName(@Param(\"modelNames\") String modelName);\n\n\n\n}",
"@Test\n public void testCreateCars() throws Exception {\n Car car = carService.generateACarObject();\n testCreateCars(new ElectricCar(car)); // Test to see if electric cars are saved right!\n testCreateCars(new GasCar(car)); // Test to see if gas cars are saved right!\n testCreateCars(new DieselCar(car)); // Test to see if diesel cars are saved right!\n }",
"public abstract List<CarTO> findCarByModel(String model);",
"@Test\n void shouldReturnAllPersonsValidatingJsonResponse() throws Exception {\n when(personDao.findAll()).thenReturn(Arrays.asList(testPersons()));\n\n mockMvc.perform(get(\"/api/person\")).andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.items[0].firstName\", is(\"Jan\")))\n .andExpect(jsonPath(\"$.items[0].lastName\", is(\"Janssen\")))\n .andExpect(jsonPath(\"$.items[1].firstName\", is(\"Pieter\")))\n .andExpect(jsonPath(\"$.items[1].lastName\", is(\"Pietersen\")))\n .andExpect(jsonPath(\"$.items[2].firstName\", is(\"Erik\")))\n .andExpect(jsonPath(\"$.items[2].lastName\", is(\"Eriksen\")))\n ;\n }",
"@Test\n public void testGetAllProducts() throws Exception {\n when(repository.findAll()).thenReturn(Collections.singletonList(this.product));\n\n assertEquals(Collections.singletonList(this.product), service.getAllProducts());\n }",
"List<Car> findByBrand(String brand);",
"@Test\n public void testFindAll()\n {\n final List<Invoice> invoices = invoiceRepository.findAll();\n\n Assert.assertFalse(invoices.isEmpty());\n\n for (final Invoice invoice : invoices)\n {\n Assert.assertNotNull(invoice.getDate());\n Assert.assertNotNull(invoice.getID());\n Assert.assertNotNull(invoice.getTotal());\n }\n }",
"@Test\n public void whenFindingCustomersItShouldReturnAllCustomers() {\n given(repository.findAll()).willReturn(Arrays.asList(CUSTOMER1, CUSTOMER2));\n // When looking for all customers, it should contain only CUSTOMER1 and CUSTOMER2\n assertThat(controller.findCustomers()).containsOnly(CUSTOMER1,CUSTOMER2);\n }",
"public Car findCarByName(String name){\r\n return repository.findCarByName(name);\r\n }",
"public static List<Carro> getCarros() {\n CarroDAO dao = CarrosApplication.getInstance().getCarroDAO();\n List<Carro> carros = dao.findAll();\n return carros;\n }",
"@Test\n public void testJPA3ListAll (){\n Iterable<TruckInfo> trucklist = truckRepo.findAll();\n\n\n\n\n }",
"public List<CarsEntity> displayCars() {\n List<CarsEntity> carsEntities =\n em.createQuery(\n \"select c from CarsEntity c\").getResultList();\n\n return carsEntities;\n }",
"@RequestMapping(value = \"stolen_cars\", method = RequestMethod.GET)\n public Response getStolenCars() {\n GenericEntity<List<Car>> cars = new GenericEntity<List<Car>>(policeService.getStolenCars()) {\n };\n\n if (cars != null) {\n return Response.status(OK).entity(cars).build();\n }\n return Response.status(REQUEST_TIMEOUT).entity(\"Something went wrong.\").build();\n }",
"@Test\n\tpublic void testDeleteCarById() {\n\t\tSystem.out.println(\"deleteCarById\");\n\t\tint id = 1;\n\t\tResponseEntity<String> expResult = new ResponseEntity<String>(\"OK\", HttpStatus.OK);\n\t\twhen(carService.deleteCarById(id)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<String> result = carController.deleteCarById(id);\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"@Test\n public void findAll() throws Exception {\n }",
"@Test\n\tpublic void findAll() {\n\t\tList<Farm> list = (List<Farm>) farmRepository.findAll();\n\n\t\tSystem.out.println(\"info:\"+ list);\n\t\tassert(true);\n\n\t}",
"public interface CarRepository extends CrudRepository<CarDO, Long> {\n\n List<CarDO> findByDeletedFalse();\n\n List<CarDO> findByEngineType(EngineType engineType);\n}",
"@Override\n\tpublic ArrayList<Carpo> showAllCars() {\n\t\treturn inList.showAll();\n\t}",
"@Test\n\tpublic void testGetAllResourcesByCategory() throws ResourceNotFoundException\n\t{\n\t\tLocalDate resDate = null;\n\t\t\n\t\tCategory cat = new Category();\n\t\tcat.setCatId(10);\n\t\tcat.setCatName(\"Clothing\");\n\t\t\n\t\tResource res = new Resource();\n\t\tres.setResId(10);\n\t\tres.setResDate(resDate);\n\t\tres.setCategory(cat);\n\t\tres.setResDescription(\"100% Cotton\");\n\t\tres.setResTitle(\"Shirt\");\n\t\tres.setResPrice(1000);\n\t\t\n\t\tList<Resource> resources = new ArrayList<>();\n\t\tresources.add(res);\n\t\tMockito.when(resourceRepository.findByCategory(10)).thenReturn(resources);\n\t\tList<Resource> actualResource = resourceService.getAllResourcesByCategory(10);\n\t\tassertEquals(10,actualResource.get(0).getCategory().getCatId());\n\t\t\n\t}",
"@Test\n public void testGetAllLocations() throws Exception {\n\n mockMvc.perform(get(URL_PREFIX + \"/all\"))\n .andExpect(status().isOk())\n .andExpect(content().contentType(contentType))\n .andExpect(jsonPath(\"$\", hasSize(DB_LOCATION_NUMBER)))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(DB_LOCATION_ID.intValue())))\n .andExpect(jsonPath(\"$.[*].city\").value(hasItem(DB_LOCATION_CITY)))\n .andExpect(jsonPath(\"$.[*].cityArea\").value(hasItem(DB_LOCATION_CITY_AREA)))\n .andExpect(jsonPath(\"$.[*].street\").value(hasItem(DB_LOCATION_STREET)))\n .andExpect(jsonPath(\"$.[*].streetNumber\").value(hasItem(DB_LOCATION_STREET_NUMBER)))\n .andExpect(jsonPath(\"$.[*].state\").value(hasItem(DB_LOCATION_STATE)));\n }",
"@Test\n void getAllMoviesTest() throws Exception {\n\n //Set Up\n List<Movie> movies = new ArrayList<>();\n Movie movie = new Movie();\n movies.add(movie);\n\n //Exercise\n when(movieService.getAllMovies()).thenReturn(movies);\n mockMvc.perform(get(baseUrl).accept(MediaType.APPLICATION_JSON))\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$\", hasSize(movies.size())));\n\n }",
"@GetMapping(value=\"/Count/v1\")\n\tpublic String getCountOfCars() {\n\t\tlong carsCount = carElasticRepository.count();\n\t\treturn \"Number Of Cars In Elastic Search are \" + carsCount;\n\t}",
"@Test\n public void findAllDishes() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"price\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n assertThat(result).isNotNull();\n }",
"@Test\n public void testFindAllProduct() throws Exception {\n // Mock method\n when(productRepository.findAll()).thenReturn(products);\n\n testResponseData(RequestInfo.builder()\n .request(get(PRODUCT_ENDPOINT))\n .token(memberToken)\n .httpStatus(HttpStatus.OK)\n .build());\n }",
"@Test\n public void testListCustomers() throws Exception{\n List<Customer> customers = new ArrayList<>();\n customers.add(new Customer());\n customers.add(new Customer());\n\n when(customerService.listAll()).thenReturn((List) customers);\n\n mockMvc.perform(get(\"/customers\"))\n .andExpect(status().isOk())\n .andExpect(view().name(\"customer/customers\"))\n .andExpect(model().attribute(\"customers\", hasSize(2)));\n }",
"@Test\n public void findAllTest() {\n Set<Reservation> expected = new HashSet<>();\n expected.add(reservation1);\n expected.add(reservation2);\n expected.add(reservation3);\n expected.add(reservation4);\n Mockito.when(reservationDao.findAll()).thenReturn(expected);\n Collection<Reservation> result = reservationService.findAll();\n Assert.assertEquals(result.size(), 4);\n Assert.assertTrue(result.contains(reservation1));\n Assert.assertTrue(result.contains(reservation2));\n }",
"@Test\n public void testConsultarTodos() throws Exception {\n System.out.println(\"testConsultarTodos\");\n List<ConfiguracaoTransferencia> result = instance.findAll();\n assertTrue(result != null && result.size() > 0);\n }",
"@Test\n\tpublic void testGetAllCompaniesApi() {\n\t\tCompany company = new Company(\"DataSolutions1\", \"Marthahalli1\",\n\t\t\t\t\"Bangalore\", \"India\", \"9880440671\");\n\t\tcompany = companyRepository.save(company);\n\n\t\tCompany company1 = new Company(\"DataSolutions2\", \"Marthahalli2\",\n\t\t\t\t\"Chennai\", \"India\", \"9882440671\");\n\t\tcompany1 = companyRepository.save(company1);\n\n\t\t// Invoke the API\n\t\tCompany[] apiResponse = restTemplate.getForObject(\n\t\t\t\t\"http://localhost:8888/companies/\", Company[].class);\n\n\t\tassertEquals(2, apiResponse.length);\n\n\t\t// Delete the test data created\n\t\tcompanyRepository.delete(company.getCompanyId());\n\t\tcompanyRepository.delete(company1.getCompanyId());\n\t}",
"@Test\n\t// @Disabled\n\tvoid testViewAllCustomer() {\n\t\tCustomer customer1 = new Customer(1, \"tom\", \"son\", \"951771122\", \"[email protected]\");\n\t\tCustomer customer2 = new Customer(2, \"jerry\", \"lee\", \"951998122\", \"[email protected]\");\n\t\tList<Customer> customerList = new ArrayList<>();\n\t\tcustomerList.add(customer1);\n\t\tcustomerList.add(customer2);\n\t\tMockito.when(custRep.findAll()).thenReturn(customerList);\n\t\tList<Customer> customer = custService.findAllCustomer();\n\t\tassertEquals(2, customer.size());\n\t}",
"@Before(CUSTOMER_REPOSITORY_FIND_ALL_METHOD)\n\tpublic void beforeFindAll() {\n\t\tSystem.out.println(\"CustomerRepository.findAll() will be called...\");\n\t}",
"@GetMapping(\"/covs\")\n @Timed\n public List<Cov> getAllCovs() {\n log.debug(\"REST request to get all Covs\");\n return covService.findAll();\n }",
"@Test\n public void testSearchExamples() throws Exception{\n this.mockMvc.perform(get(\"/api/example/search\").param(\"name\", \"\"))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.content\", hasSize(3)));\n \n //fetching registries with '2' on the name\n this.mockMvc.perform(get(\"/api/example/search\").param(\"name\", \"2\"))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.content\", hasSize(1)));\n }",
"@Test\n public void getAllRecipes_ReturnsList(){\n ArrayList<Recipe> allRecipes = testDatabase.getAllRecipes();\n assertNotEquals(\"getAllRecipes - Non-empty List Returned\", 0, allRecipes.size());\n }",
"@Test\n void getCartCategories() throws Exception {\n CartCategoryItem cartCategoryItem = generateCartCategoryItem();\n\n when(categoryService.getAllCartCategoryItems()).thenReturn(Arrays.asList(cartCategoryItem));\n\n MvcResult mvcResult = mockMvc.perform(get(PATH + \"/get/carts\")\n .contentType(MediaType.APPLICATION_JSON))\n .andExpect(status().is2xxSuccessful())\n .andReturn();\n\n CartCategoryItemResponse response = objectMapper.readValue(mvcResult.getResponse().getContentAsString(), CartCategoryItemResponse.class);\n\n assertNotNull(response);\n assertFalse(response.getCartCategoryItems().isEmpty());\n assertNull(response.getErrorMessage());\n verify(categoryService, times(1)).getAllCartCategoryItems();\n }",
"@Test\n void getCategories() throws Exception {\n CategoryItemResponse categoryItemResponse = generateCategoryItemResponse();\n\n when(categoryService.getAllCategories()).thenReturn(Arrays.asList(categoryItemResponse));\n\n MvcResult mvcResult = mockMvc.perform(get(PATH + \"/get\")\n .contentType(MediaType.APPLICATION_JSON))\n .andExpect(status().is2xxSuccessful())\n .andReturn();\n\n List<CategoryItemResponse> response = objectMapper.readValue(mvcResult.getResponse().getContentAsString(), List.class);\n\n assertNotNull(response);\n assertFalse(response.isEmpty());\n verify(categoryService, times(1)).getAllCategories();\n }",
"@Test\n void contextLoads() {\n\n List<BrandEntity> list=brandService.list(new QueryWrapper<BrandEntity>().eq(\"brand_id\",1));\n list.stream().forEach(item->{\n System.out.println(item);\n });\n }",
"@Test\n @Order(1)\n public void testGetAllContacts() {\n List<Contact> contacts = Arrays.asList(\n createContact(\"A Smith\"),\n createContact(\"B Smith\"),\n createContact(\"C Smith\"),\n createContact(\"D Smith\")\n );\n\n final ResponseEntity<Contact[]> response = template.getForEntity(\"/api/v1/contact\", Contact[].class);\n final List<Contact> foundContacts = Arrays.asList(response.getBody());\n\n Assertions.assertThat(foundContacts.size()).isEqualTo(contacts.size());\n\n for (int i = 0; i < contacts.size(); i++) {\n Assertions.assertThat(foundContacts.get(i).getName()).isEqualTo(contacts.get(i).getName());\n }\n }",
"@Test\n public void testFindAll_multiRecord() throws Exception {\n // Setup\n\n // Configure MovieService.findAll(...).\n final List<MovieDTO> movieDTOS = Arrays.asList(\n new MovieDTO(0, \"Kiendo\", \"justice league\", \"zack snyder\", 0.0f,\n LocalDate.of(2020, 1, 1), LocalDate.of(2020, 1, 1), \"movieCompany\",\n \"version\", \"justice league\", \"nameVN\", \"avatar\", \"image\"),\n new MovieDTO(1, \"actor\", \"content\", \"director\", 0.0f,\n LocalDate.of(2020, 1, 1), LocalDate.of(2020, 1, 1), \"movieCompany\",\n \"version\", \"nameEng\", \"nameVN\", \"avatar\", \"image\")\n );\n when(mockMovieService.findAll()).thenReturn(movieDTOS);\n\n // Run the test\n final MockHttpServletResponse response = mockMvc.perform(get(\"/api/movies\")\n .accept(MediaType.APPLICATION_JSON))\n .andReturn().getResponse();\n // Verify the results\n String jsonExpected =\n \"[{\\\"cinemaRoom\\\":null,\\\"id\\\":0,\\\"actor\\\":\\\"Kiendo\\\",\\\"content\\\":\\\"justice league\\\",\\\"director\\\":\\\"zack snyder\\\",\\\"duration\\\":0.0,\\\"fromDate\\\":\\\"2020-01-01\\\",\\\"toDate\\\":\\\"2020-01-01\\\",\\\"movieCompany\\\":\\\"movieCompany\\\",\\\"version\\\":\\\"version\\\",\\\"nameEng\\\":\\\"justice league\\\",\\\"nameVN\\\":\\\"nameVN\\\",\\\"avatar\\\":\\\"avatar\\\",\\\"image\\\":\\\"image\\\",\\\"scheduleMovies\\\":null,\\\"typeMovies\\\":null,\\\"tickets\\\":null,\\\"scheduleSeats\\\":null},{\\\"cinemaRoom\\\":null,\\\"id\\\":1,\\\"actor\\\":\\\"actor\\\",\\\"content\\\":\\\"content\\\",\\\"director\\\":\\\"director\\\",\\\"duration\\\":0.0,\\\"fromDate\\\":\\\"2020-01-01\\\",\\\"toDate\\\":\\\"2020-01-01\\\",\\\"movieCompany\\\":\\\"movieCompany\\\",\\\"version\\\":\\\"version\\\",\\\"nameEng\\\":\\\"nameEng\\\",\\\"nameVN\\\":\\\"nameVN\\\",\\\"avatar\\\":\\\"avatar\\\",\\\"image\\\":\\\"image\\\",\\\"scheduleMovies\\\":null,\\\"typeMovies\\\":null,\\\"tickets\\\":null,\\\"scheduleSeats\\\":null}]\";\n assertEquals(HttpStatus.OK.value(), response.getStatus());\n assertEquals(jsonExpected, response.getContentAsString());\n }",
"@Test\n\tpublic void getAllMovies() throws Exception {\n\t\tfinal ImmutableList<Movie> movies = ImmutableList.of(this.movie);\n\t\twhen(DAO.findAll()).thenReturn(movies);\n\n\t\tfinal Map<String, Object> paramMap = new HashMap<String, Object>();\n\t\tfinal RPCMessage req = new RPCMessage(MovieRPCServer.GET_ACTION, paramMap, null);\n\n\t\tfinal String response = this.RESOURCE.getValue(req.toString());\n\n\t\tfinal RPCMessage responseObj = RPCMessage.fromString(response);\n\t\tassertThat(responseObj).isNotNull();\n\t\tassertThat(responseObj.getObj()).isEqualTo(MovieBusterUtils.serializeMovieList(movies));\n\n\t\tverify(DAO).findAll();\n\t\tassertThat(MovieBusterUtils.movieFromStringArray(responseObj.getObj())).containsAll(movies);\n\t}",
"@Test\n public void getAllTest() {\n Mockito.when(this.repo.findAll()).thenReturn(publisherList);\n Iterable<Publisher> resultFromService = this.publisherService.findAll();\n Publisher resultFromIterator = resultFromService.iterator().next();\n assertThat(resultFromIterator.getName()).isEqualTo(\"What The What\");\n Mockito.verify(this.repo, Mockito.times(1)).findAll();\n }",
"public List<Card> findAllCards();",
"@Test\n void testFindAllByCrypto() {\n long size = service.findAll().stream().filter(Currency::getCrypto).count();\n assertEquals(size, service.findAllByCrypto().size());\n }",
"public List<Car> getCarsData() { return carsData; }",
"@Test\n public void testGetOwners() throws Exception {\n int ID_FIRST_RECORD = 1;\n this.mockMvc.perform(get(\"/owners/all\"))\n .andExpect(status().isOk())\n .andExpect(content()\n .contentType(MediaType.APPLICATION_JSON))\n // .andExpect(jsonPath(\"$\", hasSize(NRO_RECORD)))\n .andExpect(jsonPath(\"$[0].id\", is(ID_FIRST_RECORD)));\n }",
"@Test\n @Transactional\n public void getAllContactsWithInAddressBook() throws Exception {\n restAddressBookMockMvc.perform(\n get(\"/api/address-books/{id}/contacts\", \"1\").param(\"unique\", \"false\"))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[2]\").exists())\n .andExpect(jsonPath(\"$.[3]\").doesNotExist())\n ;\n }",
"@Test\n public void testGetAllMembers() {\n assertEquals(2, facade.getCarCount(), \"Expects tree rows in the database\");\n }",
"@Test\n void getAllCinemaHalls() {\n var resource = new CinemaHallResource();\n var result = (List<CinemaHallDto>) resource.getAllCinemaHalls().getEntity();\n assertNotNull(result);\n }",
"@GetMapping()\n public Iterable<Customer> getCustomers(CustomerSpec spec){\n return customerRepository.findAll(spec);\n }",
"public abstract CarTO findCarById(Long id);",
"@Test\n\tpublic void testVendorGetAll() {\n\t\tJsonResponse jr = null;\n\t\tjr = vendorCont.getAll();\n\t\tassertNotNull(jr);\n\t}",
"@GetMapping(\"/findAll\")\n public List<LabTest> findAll(){\n return labTestService.getLabTests();\n }",
"@Test\n\tpublic void getProjects() {\n\t\tList<Project> projects = new ArrayList<Project>();\n\t\tprojects.add(project);\n\t\twhen(repository.findAll()).thenReturn(projects);\n\t\tassertEquals(controller.getAllProjects(), projects);\n\t}",
"@Test\n void getRequest_noParams_SuccessfullyReturnsAllAutos() throws Exception {\n setUp();\n when(autosService.getAutos()).thenReturn(new AutosList(autosList));\n\n mockMvc.perform(get(\"/api/autos\"))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.autos\", hasSize(5)));\n }",
"@Test\n public void getAllCoffee() {\n Roaster roaster = new Roaster();\n roaster.setName(\"Roaster 1\");\n roaster.setStreet(\"123 Test Lane\");\n roaster.setCity(\"Crossvile\");\n roaster.setState(\"TN\");\n roaster.setPostal_code(\"38555\");\n roaster.setPhone(\"9312005591\");\n roaster.setEmail(\"[email protected]\");\n roaster.setNote(\"Test Note for Roaster 1\");\n roaster = roasterDao.addRoaster(roaster);\n\n // Create and add coffee1 to the database\n Coffee coffee1 = new Coffee();\n coffee1.setRoaster_id(roaster.getRoaster_id());\n coffee1.setName(\"Starbucks House Blend\");\n coffee1.setCount(10);\n coffee1.setUnit_price(new BigDecimal(\"12.50\"));\n coffee1.setDescription(\"Medium Brew Coffee\");\n coffee1.setType(\"Regular\");\n coffeeDao.addCoffee(coffee1);\n\n // Create and add coffee2 to the database\n Coffee coffee2 = new Coffee();\n coffee2.setRoaster_id(roaster.getRoaster_id());\n coffee2.setName(\"Carabou Coffee\");\n coffee2.setCount(20);\n coffee2.setUnit_price(new BigDecimal(\"11.00\"));\n coffee2.setDescription(\"Light Brew Coffee\");\n coffee2.setType(\"Special\");\n coffeeDao.addCoffee(coffee2);\n\n // Get all coffee entries from the database\n List<Coffee> coffeeList = coffeeDao.getAllCoffee();\n\n // Test that the getAllCoffee() method works correctly\n assertEquals(2, coffeeList.size());\n }",
"@Test\n void shouldReturnAllPersonsValidatingDeserializedModel() throws Exception {\n when(personDao.findAll()).thenReturn(Arrays.asList(testPersons()));\n\n MvcResult mvcResult = mockMvc.perform(get(\"/api/person\"))\n .andExpect(status().isOk())\n .andReturn();\n\n // note: we use a TypeReference to inform Jackson about the List's generic type\n SafeList<Person> persons = getObjectMapper().readValue(mvcResult.getResponse().getContentAsString(), new TypeReference<SafeList<Person>>() {});\n\n assertThat(persons.getItems()).isNotNull();\n assertThat(persons.getItems())\n .hasSize(3)\n .contains(testPersons());\n }",
"@GetMapping(\"/cargos\")\n @Timed\n public List<Cargo> getAllCargos() {\n log.debug(\"REST request to get all Cargos\");\n return cargoRepository.findAll();\n }",
"@Test\r\n public void testFindAll() throws Exception {\r\n }",
"@GetMapping(\"/api/rents\")\r\n public ResponseEntity<List<Rent>> findAll(){\r\n final List<Rent> rentList = rentService.findAll();\r\n return rentList != null && !rentList.isEmpty()\r\n ? new ResponseEntity<>(rentList, HttpStatus.OK)\r\n : new ResponseEntity<>(HttpStatus.NOT_FOUND);\r\n }",
"@Test\n public void getAllPersons() {\n List<Person> persons = personService.getAllPersons();\n\n //Assert\n assertEquals(\"Fulano\", persons.get(0).getFirstName());\n assertEquals(\"John\", persons.get(1).getFirstName());\n }",
"List<VehicleTypeDto> findAll();",
"@Test\n public void testConsultarLibros() {\n System.out.println(\"ConsultarLibros\");\n BibliotecarioController instance = new BibliotecarioController();\n\n List<Libro> expResult = new LibrosList().getLibros();\n \n List<Libro> result = instance.ConsultarLibros();\n assertEquals(expResult, result);\n\n }",
"@RequestMapping(value = \"/cophongs\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Cophong> getAllCophongs() {\n log.debug(\"REST request to get all Cophongs\");\n List<Cophong> cophongs = cophongRepository.findAll();\n return cophongs;\n }",
"List<Client> findAll();",
"@Test\r\n\tpublic void testGetAllVendors() throws Exception {\r\n\t\t// when\r\n\t\tMockHttpServletResponse response = mvc.perform(\r\n\t\t\tget(\"/vendors\")\r\n\t\t\t\t.accept(MediaType.APPLICATION_JSON))\r\n\t\t\t.andReturn().getResponse();\r\n\r\n\t\t// then\r\n\t\tassertEquals(response.getStatus(), HttpStatus.OK.value());\r\n\r\n\t\tString content = response.getContentAsString();\r\n\t\tVendor[] vendors = gson.fromJson(content, Vendor[].class);\r\n\t\tassertTrue(vendors.length == 0);\r\n\r\n\t}",
"@GetMapping(\"/listAll\")\n\tpublic ResponseEntity<?> findAll(){\n\t\treturn new ResponseEntity<>(catService.listAll(),HttpStatus.OK);\n\t}",
"public void getAll() {\n try {\n\n String sql = \"select * from project_zero.carlot where owner = 'DEALERSHIP';\";\n Statement st = ConnectionUtil.getInstance().getConnection().createStatement();\n ResultSet rs = st.executeQuery(sql);\n\n while(rs.next()) {\n Car c = new Car(rs.getInt(1), rs.getString(2), rs.getString(3),\n rs.getInt(4), rs.getString(5), rs.getString(6), rs.getInt(7));\n System.out.println(c.toString());\n\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"List<AlbumDTO> findAll();",
"@Transactional(readOnly = true)\n public List<ChocolateDTO> findAll() {\n log.debug(\"Request to get all Chocolates\");\n return chocolateRepository.findAll().stream()\n .map(chocolateMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }",
"@Test\n public void given_devEnvironmentAndEmptyListStudent_when_callEndpointFindAll_then_returnEmptyListStudentAndStatus200() throws Exception {\n\n List<Student> studentList = new ArrayList<>();\n\n when(studentRepo.findAll()).thenReturn(studentList);\n\n RequestBuilder request = MockMvcRequestBuilders\n .get(\"/students\")\n .accept(MediaType.APPLICATION_JSON);\n\n mockMvc.perform(request)\n .andExpect(status().isOk())\n .andExpect(content().json(gson.toJson(studentList)))\n .andReturn();\n }",
"@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n @GetMapping(value = \"/cake-application/cakes\", produces = MediaType.APPLICATION_JSON_VALUE)\n public List<Cake> findAll() {\n return cakeService.findAll();\n }",
"@Test\n public void given_devEnvironmentAndListStudent_when_callEndpointFindAll_then_returnListStudentAndStatus200() throws Exception {\n\n when(studentRepo.findAll()).thenReturn(STUDENT_LIST);\n\n RequestBuilder request = MockMvcRequestBuilders\n .get(\"/students\")\n .accept(MediaType.APPLICATION_JSON);\n\n mockMvc.perform(request)\n .andExpect(status().isOk())\n .andExpect(content().json(gson.toJson(STUDENT_LIST),true))\n .andReturn();\n }",
"@Test\n void testToGetAllHeroes() throws Exception {\n initHero();\n mockMvc.perform(MockMvcRequestBuilders.get(\"/api/hero\"))\n .andExpect(status().isOk())\n .andDo(print())\n .andExpect(MockMvcResultMatchers.jsonPath(\"$.*\", hasSize(1)));\n\n }",
"@Test\n\tpublic void test() {\n\t\tcar.setUpCar(model, brand, 150, 5);\n\t\tassertEquals(result, car.getBrandAndModel());\n\t}",
"@Test\n void getByPropertyLikeSuccess() {\n List<Car> carList = carDao.getByPropertyLike(\"make\",\"Je\") ;\n assertEquals(1, carList.size());\n }",
"@Override\n @Transactional(readOnly = true)\n public List<CitiesDTO> findAll() {\n log.debug(\"Request to get all Cities\");\n return citiesRepository.findAll().stream()\n .map(citiesMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }",
"@Test\n public void getAllItems_Returns200Status() throws Exception {\n mockMvc.perform(get(\"/api/v1/items\")).andExpect(status().isOk());\n }"
] | [
"0.7426945",
"0.7326562",
"0.72616076",
"0.7061906",
"0.674004",
"0.6665545",
"0.6639119",
"0.66378516",
"0.6575944",
"0.6446171",
"0.64004886",
"0.63939315",
"0.6357729",
"0.63546157",
"0.6341532",
"0.6266802",
"0.62486345",
"0.6215325",
"0.62094283",
"0.6167533",
"0.6156721",
"0.6148876",
"0.6145407",
"0.61426175",
"0.6141536",
"0.61136717",
"0.60667217",
"0.6065308",
"0.6055132",
"0.6051455",
"0.60380054",
"0.60111237",
"0.6010909",
"0.60045856",
"0.6004499",
"0.59987676",
"0.59794146",
"0.5952487",
"0.59361935",
"0.5925371",
"0.59146845",
"0.588759",
"0.5883406",
"0.58772516",
"0.5852284",
"0.58498377",
"0.58406556",
"0.58387285",
"0.58337516",
"0.5821904",
"0.58199406",
"0.58131456",
"0.57913524",
"0.57825387",
"0.57803106",
"0.5766813",
"0.5750164",
"0.57483065",
"0.5737334",
"0.57359636",
"0.5730766",
"0.57270193",
"0.5718545",
"0.5717458",
"0.57122123",
"0.5686115",
"0.5679842",
"0.5678426",
"0.5669252",
"0.566635",
"0.56475717",
"0.5646467",
"0.56395316",
"0.5631287",
"0.5630811",
"0.5620539",
"0.5617583",
"0.5616333",
"0.56156665",
"0.5609062",
"0.56055516",
"0.55984515",
"0.55973846",
"0.55968314",
"0.55937177",
"0.5590197",
"0.5588734",
"0.558562",
"0.5580166",
"0.5567605",
"0.5562336",
"0.5556717",
"0.55455095",
"0.55405366",
"0.55296385",
"0.5528083",
"0.55235624",
"0.552272",
"0.5522445",
"0.5518155"
] | 0.8487278 | 0 |
Test of getCarById method, of class CarsRestController. | @Test
public void testGetCarById() {
System.out.println("getCarById");
int carId = 1;
List<CarModel> carList = new ArrayList<CarModel>();
CarModelDTO dto = new CarModelDTO();
CarModel carResult = new CarModel();
carResult.setId(new Integer(1));
carResult.setBrand("Ford");
carResult.setFrom(new Integer(2019));
carResult.setTo(new Integer(2020));
carList.add(carResult);
dto.setCars(carList);
dto.setMessage("OK");
dto.setSuccess(true);
ResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);
when(carService.findCarById(carId)).thenReturn(expResult);
ReflectionTestUtils.setField(carController, "carService", carService);
ResponseEntity<CarModelDTO> result = carController.getCarById(carId);
assertEquals(expResult.getStatusCode(), result.getStatusCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testDeleteCarById() {\n\t\tSystem.out.println(\"deleteCarById\");\n\t\tint id = 1;\n\t\tResponseEntity<String> expResult = new ResponseEntity<String>(\"OK\", HttpStatus.OK);\n\t\twhen(carService.deleteCarById(id)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<String> result = carController.deleteCarById(id);\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"@Test\n public void testGetCarById() {\n\n }",
"public Car getCarById(Integer id){\n\n return this.carCrudInterface.getById(id);\n\n }",
"@RequestMapping(value = \"/cars/{id}\", method=RequestMethod.GET)\n\tpublic Car getCar(@PathVariable int id) {\n\t\tCar aCar = _carDao.findById(id);\n\t\t\n\t\treturn aCar;\n\t}",
"@GetMapping(\"/api/rents/findbycar/{id}\")\r\n public ResponseEntity<List<Rent>> findByCar(@PathVariable(name = \"id\") Long id){\r\n final List<Rent> rent = rentService.findByCarId(id);\r\n return rent != null\r\n ? new ResponseEntity<>(rent, HttpStatus.OK)\r\n : new ResponseEntity<>(HttpStatus.NOT_FOUND);\r\n }",
"@Test\n\tpublic void test_givenCar_whenFindCarById_thenReturnCarById() {\n\t\t// given or arrange\n\n\t\tMockito.when(mockCarRepository.findById(ID)).thenReturn(Optional.of(new Car() {\n\t\t\t{\n\t\t\t\tsetId(ID);\n\t\t\t}\n\t\t}));\n\t\t// when or act\n\t\tCarServiceModel carFount = carServiceWithMockedRepository.findCarById(ID);\n\n\t\t// then or assert\n\t\tassertEquals(ID, carFount.getId());\n\n\t}",
"public Car findCarById(int id) {\r\n return repository.findById(id).orElse(null);\r\n }",
"@Test\n public void testDeleteCarById() {\n System.out.println(\"deleteCarById\");\n int id = 17;\n CarController instance = new CarController();\n instance.deleteCarById(id);\n assertTrue(true);\n }",
"public abstract CarTO findCarById(Long id);",
"@Test\n void getByIdSuccess() {\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(2);\n\n //Create Test Car\n Car testCar = new Car(1,user,\"2016\",\"Jeep\",\"Wrangler\",\"1C4BJWFG2GL133333\");\n\n //Ignore Create/Update times\n testCar.setCreateTime(null);\n testCar.setUpdateTime(null);\n\n //Get Existing Car\n Car retrievedCar = carDao.getById(1);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(testCar,retrievedCar);\n }",
"@Transactional\r\n\tpublic Car getCarById(String id) {\n\t\tOptional<Car> c=cr.findById(id);\r\n\t\tif(!c.isPresent())\r\n\t\t{\r\n\t\t\tthrow new NotFoundRes(\"Car with ID : \"+id+\" does not exist\");\r\n\t\t}\r\n\t\treturn c.get();\r\n\t}",
"@Test\n\tpublic void testFindAllCars() {\n\t\tSystem.out.println(\"findAllCars\");\n\n\t\tList<CarModel> carList = new ArrayList<CarModel>();\n\t\tCarModelDTO dto = new CarModelDTO();\n\t\tCarModel carResult = new CarModel();\n\t\tcarResult.setId(new Integer(1));\n\t\tcarResult.setBrand(\"Ford\");\n\t\tcarResult.setFrom(new Integer(2019));\n\t\tcarResult.setTo(new Integer(2020));\n\t\tcarList.add(carResult);\n\t\tdto.setCars(carList);\n\t\tdto.setMessage(\"OK\");\n\t\tdto.setSuccess(true);\n\t\tResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);\n\t\twhen(carService.findAllCars()).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<CarModelDTO> result = carController.findAllCars();\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"@Override\n\tpublic CarInfoDto findCarById(String carId) {\n\t\t\n\t\treturn chargeCarMapper.selectCarInfoById(carId);\n\t}",
"@Test\n\tpublic void testFindCarsByBrand() {\n\t\tSystem.out.println(\"findCarsByBrand\");\n\t\tString brand = \"Ford\";\n\t\tList<CarModel> carList = new ArrayList<CarModel>();\n\t\tCarModelDTO dto = new CarModelDTO();\n\t\tCarModel carResult = new CarModel();\n\t\tcarResult.setId(new Integer(1));\n\t\tcarResult.setBrand(\"Ford\");\n\t\tcarResult.setFrom(new Integer(2019));\n\t\tcarResult.setTo(new Integer(2020));\n\t\tcarList.add(carResult);\n\t\tdto.setCars(carList);\n\t\tdto.setMessage(\"OK\");\n\t\tdto.setSuccess(true);\n\t\tResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);\n\t\twhen(carService.findCarsByBrand(brand)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<CarModelDTO> result = carController.findCarsByBrand(brand);\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"@Test\n void findByPetId_API_TEST() throws Exception {\n\n Pet pet = setupPet();\n given(petService.findByPetId(2)).willReturn(Optional.of(pet));\n mvc.perform(get(\"/owners/*/pets/2\").accept(MediaType.APPLICATION_JSON))\n .andExpect(status().isOk())\n .andExpect(content().contentType(\"application/json\"))\n .andExpect(jsonPath(\"$.id\").value(2))\n .andExpect(jsonPath(\"$.name\").value(\"Daisy\"));\n }",
"@Override\n\tpublic Car selectById(int carId) {\n\t\treturn carMapper.selectById(carId);\n\t}",
"@Test\n public void testCar() {\n System.out.println(\"drivers.getCar().getId()\\t\"+drivers.getCar().getId());\n System.out.println(\"car.getId\\t\"+car.getId());\n// Assert.assertEquals(drivers.getCar(),car);\n }",
"@Test\n void getAllCarsSuccess() {\n List<Car> cars = carDao.getAll();\n assertNotNull(cars);\n assertEquals(1, cars.size());\n }",
"@Override\n\tpublic Carpo findCar(String id) {\n\t\treturn inList.find(id);\n\t}",
"@Test\n\tpublic void testGetResourceById() throws ResourceNotFoundException\n\t{\n\t\tLocalDate resDate = null;\n\t\t\n\t\tCategory cat = new Category();\n\t\tcat.setCatId(10);\n\t\tcat.setCatName(\"Clothing\");\n\t\t\n\t\tResource res = new Resource();\n\t\tres.setResId(10);\n\t\tres.setResDate(resDate);\n\t\tres.setCategory(cat);\n\t\tres.setResDescription(\"100% Cotton\");\n\t\tres.setResTitle(\"Shirt\");\n\t\tres.setResPrice(1000);\n\t\t\n\t\tMockito.when(resourceRepository.findById(10)).thenReturn(Optional.of(res));\n\t\tResource actualResource = resourceService.getResourceById(10);\n\t\tassertEquals(10,actualResource.getResId());\n\t}",
"@Override\n\tpublic car getById(int id) {\n\t\ttry{\n\t\t\tcar so=carDataRepository.getById(id);\n\t\t\t\n\t\t\treturn so;\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t\tex.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t}",
"@Test\n public void testGetCars() {\n System.out.println(\"getCars\");\n CarController instance = new CarController();\n List<Car> expResult = null;\n List<Car> result = instance.getCars();\n for(Car car: result) {\n System.out.println(car);\n }\n assertTrue(true);\n }",
"@Test\n @OperateOnDeployment(\"server\")\n public void shouldGetResourceMatchingId() {\n given().header(\"Authorization\", \"Bearer access_token\").expect().statusCode(200).and().expect().body(\"name\",\n equalTo(\"Audiences\")).and().expect().body(\"sort\", equalTo(15)).when().get(getBaseTestUrl() + \"/1/category/get/json/1\");\n }",
"@Test\n public void validResturantById() throws Exception {\n Logger.getGlobal().info(\"Start validResturantById test\");\n ResponseEntity<Entity> restaurant = restaurantController.findById(RESTAURANT);\n\n Assert.assertEquals(HttpStatus.OK, restaurant.getStatusCode());\n Assert.assertTrue(restaurant.hasBody());\n Assert.assertNotNull(restaurant.getBody());\n Assert.assertEquals(RESTAURANT, restaurant.getBody().getId());\n Assert.assertEquals(RESTAURANT_NAME, restaurant.getBody().getName());\n Logger.getGlobal().info(\"End validResturantById test\");\n }",
"@Test\n\tpublic void getOwnerByIdTest() throws Exception {\n\t\tmockMvc.perform(get(\"/owner/4\"))\n\t\t.andExpect(status().isOk())\n\t\t.andExpect(content().contentType(contentType))\n\t\t.andExpect(jsonPath(\"$.id\", is(4)))\n\t\t.andExpect(jsonPath(\"$.firstName\", is(\"Harold\")))\n\t\t.andExpect(jsonPath(\"$.lastName\", is(\"Davis\")))\n\t\t.andExpect(jsonPath(\"$.city\", is(\"Windsor\")))\n\t\t.andExpect(jsonPath(\"$.address\", is(\"563 Friendly St.\")))\n\t\t.andExpect(jsonPath(\"$.telephone\", is(\"6085553198\")));\n\t}",
"@Test\n\tpublic void findPricingPrice() throws Exception{\n\t\tmvc.perform(get(new URI(\"/services/price?vehicleId=2\"))\n\t\t\t\t.accept(MediaType.APPLICATION_JSON_UTF8))\n\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))\n\t\t\t\t.andExpect(jsonPath(\"vehicleId\",is(2)));\n\t}",
"@Test\n public void testGetVehicleById() {\n //Arrange\n Vehicle vehicle = new Vehicle();\n Model model = new Model();\n Make make = new Make();\n \n make.setMakeName(\"Ford\");\n \n Make createdMake = makeDao.addMake(make);\n \n model.setModelName(\"Explorer\");\n model.setMake(createdMake);\n \n Model createdModel = modelDao.addModel(model);\n \n vehicle.setYear(2018);\n vehicle.setTransmission(\"Automatic\");\n vehicle.setMileage(1000);\n vehicle.setColor(\"Blue\");\n vehicle.setInterior(\"Leather\");\n vehicle.setBodyType(\"SUV\");\n vehicle.setVin(\"W9D81KQ93N8Z0KS7\");\n vehicle.setSalesPrice(new BigDecimal(\"35000.00\"));\n vehicle.setMsrp(new BigDecimal(\"40000.00\"));\n vehicle.setDescription(\"A practical vehicle\");\n vehicle.setPicURL(\"http://www.sampleurl.com/samplepic\");\n vehicle.setModel(createdModel);\n \n Vehicle createdVehicle = vehicleDao.addVehicle(vehicle);\n \n //Act\n Vehicle fetchedVehicle = vehicleDao.getVehicleById(createdVehicle.getVehicleId());\n \n //Assert\n assertEquals(fetchedVehicle.getYear(),(int) 2018);\n assertEquals(fetchedVehicle.getTransmission(), \"Automatic\");\n assertEquals(fetchedVehicle.getMileage(), (int) 1000);\n assertEquals(fetchedVehicle.getColor(), \"Blue\");\n assertEquals(fetchedVehicle.getInterior(),\"Leather\");\n assertEquals(fetchedVehicle.getBodyType(),\"SUV\");\n assertEquals(fetchedVehicle.getVin(), \"W9D81KQ93N8Z0KS7\");\n assertEquals(fetchedVehicle.getSalesPrice(), new BigDecimal(\"35000.00\"));\n assertEquals(fetchedVehicle.getMsrp(), new BigDecimal(\"40000.00\"));\n assertEquals(fetchedVehicle.getDescription(), \"A practical vehicle\");\n assertEquals(fetchedVehicle.getPicURL(), \"http://www.sampleurl.com/samplepic\");\n assertEquals(fetchedVehicle.getModel().getModelName(), \"Explorer\");\n assertEquals(fetchedVehicle.getModel().getMake().getMakeName(), \"Ford\");\n }",
"public Carport getCarportById(int id);",
"@GetMapping\n @RequestMapping(\"v2\")\n public String getAllCars(){\n String carName=carRepository.findCardWithinYear(\"1920\");\n return \"The car is: \"+carName;\n }",
"public String getCarid() {\n return carid;\n }",
"@Test\n public void findByIdTest() {\n Long id = 1L;\n reservation1.setId(id);\n Mockito.when(reservationDao.findById(id)).thenReturn(reservation1);\n Reservation result = reservationService.findById(id);\n Assert.assertEquals(reservation1, result);\n Assert.assertEquals(id, reservation1.getId());\n }",
"@Test\n public void testGetExample() throws Exception{\n this.mockMvc.perform(get(\"/api/example/{id}\", 10))\n .andDo(print())\n .andExpect(status().isNotFound());\n\n // Fetching one that exists\n this.mockMvc.perform(get(\"/api/example/{id}\", 50))\n .andDo(print())\n .andExpect(status().is2xxSuccessful())\n .andExpect(jsonPath(\"$.name\", equalTo(\"Test\")));\n }",
"@Transactional\r\n\tpublic void deleteCar(String id) {\n\t\tcr.deleteById(id);\r\n\t}",
"@GET @Path(\"/{id}\")\n @Produces({MediaType.APPLICATION_JSON})\n public void getCar(@Suspended final AsyncResponse asyncResponse, @PathParam(value = \"id\") final String id) {\n executorService.submit(() -> { asyncResponse.resume(service.getCar(id)); });\n }",
"public static Car getCarById(int id_user) {\n Car car = null;\n Car[] cars = getAll();\n\n if (cars != null){\n for (Car c : getAll()) {\n if (c.getId_user() == id_user) {\n car = c;\n }\n }\n }\n\n return car;\n }",
"@Test\n void getRequest_params_SuccessfullyReturnsCorrectCars() throws Exception {\n when(autosService.getAutos(anyString(),anyString())).thenReturn(new AutosList(autosList));\n\n mockMvc.perform(get(\"/api/autos?color=red&make=Honda\"))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.autos\", hasSize(5)));\n }",
"public Cars getCarsById(String id) {\n\t\tCarsDao carsDao = CarsDaoImpl.getInstance();\n\t\tCars cars = carsDao.getCarById(Integer.parseInt(id));\n\t\treturn cars;\n\t}",
"@RequestMapping(\"/cars/{carId}/Customer/{id}\")//لما حطيت id لازم احط تحت باث فاريبل\r\n\t public CustomerDto FindCustomer(@PathVariable String id) {\r\n\t\treturn serviceUsers.getCustomer(id);\r\n\t }",
"@Test\n\tpublic void test_get_by_id_success(){\n\t\tResponseEntity<User> response = template.getForEntity(\n\t\t\t\tREST_SERVICE_URI + \"/20\" + ACCESS_TOKEN + token, User.class);\n\t\tUser user = response.getBody();\n\t\tassertThat(user.getEmail(), is(\"[email protected]\"));\n\t\tassertThat(response.getStatusCode(), is(HttpStatus.OK));\n\t\tvalidateCORSHttpHeaders(response.getHeaders());\n\t}",
"@Test\n public void test_get_by_id_success() throws Exception {\n UserDto user = new UserDto(1L, \"Daenerys\", \"Targaryen\", \"[email protected]\");\n\n when(userService.getUserById(1L)).thenReturn(user);\n\n mockMvc.perform(get(\"/users/{id}\", 1)).andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.userId\", is(1))).andExpect(jsonPath(\"$.userFirstName\", is(\"Daenerys\")));\n\n verify(userService, times(1)).getUserById(1L);\n verifyNoMoreInteractions(userService);\n }",
"@GetMapping(\"/cargos/{id}\")\n @Timed\n public ResponseEntity<Cargo> getCargo(@PathVariable Long id) {\n log.debug(\"REST request to get Cargo : {}\", id);\n Optional<Cargo> cargo = cargoRepository.findById(id);\n return ResponseUtil.wrapOrNotFound(cargo);\n }",
"public void setCarId(java.lang.Long value) {\n this.carId = value;\n }",
"@Test\n public void getOneMovieByimdbId() throws Exception {\n Movie expected = new Movie();\n expected.setMovieId(1L);\n when(movieService.findMovieByImdbId(\"tt0241\")).thenReturn(expected);\n mockMvc.perform(get(baseUrl + \"/imdbId/tt0241\"))\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.imdbId\").value(expected.getImdbId()))\n .andExpect(jsonPath(\"$.movieId\").value(expected.getMovieId()));\n }",
"@Test\n @DisplayName(\"Deve obter um livro por id\")\n public void getByIdTest() {\n given(bookRepositoryMocked.findById(ID)).willReturn(Optional.of(bookSavedMocked));\n\n // When execute save\n Optional<Book> foundBook = bookService.findById(ID);\n\n // Then\n assertThat(foundBook.isPresent()).isTrue();\n assertThat(foundBook.get()).isEqualTo(bookSavedMocked);\n\n // And verify mocks interaction\n verify(bookRepositoryMocked, times(1)).findById(ID);\n }",
"public java.lang.Long getCarId() {\n return carId;\n }",
"@Test\n\tpublic void test_saveCar_whenCarDataIsCorect_thenReturnSavedCar() {\n\t\t// given or arrange\n\t\tCarServiceModel toBeSavedCar = getCarWithCorectData();\n\t\t// when or act\n\t\tCarServiceModel actualCar = carService.saveCar(toBeSavedCar);\n\t\tCarServiceModel expectedCar = modelMapper.map(carRepository.findById(actualCar.getId()).orElse(null), CarServiceModel.class);\n\t\t// then or assert\n\t\tassertEquals(expectedCar.getId(), actualCar.getId());\n\t\tassertEquals(expectedCar.getMake(), actualCar.getMake());\n\t\tassertEquals(expectedCar.getModel(), actualCar.getModel());\n\t\tassertEquals(expectedCar.getTravelledDistance(), actualCar.getTravelledDistance());\n\n\t}",
"@Test\n\tpublic void test_get_product_by_id_return_200() throws Exception {\n\t\tPrincipal mockPrincipal = Mockito.mock(Principal.class);\n\t\tMockito.when(mockPrincipal.getName()).thenReturn(\"1\");\n\t\tProductDTO expected = DummyData.getProductDto1();\n\t\tMockHttpServletRequestBuilder mockRequest = MockMvcRequestBuilders.request(HttpMethod.GET, \"/1\")\n\t\t\t\t.principal(mockPrincipal)\n\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON);\n\n\t\t// Setup when\n\t\twhen(productService.findProductById(1l)).thenReturn(expected);\n\t\t\n\t\t// Execute the POST request\n\t\tmockMvc.perform(mockRequest)\n\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t// Validate the response code and content type\n\t\t\t\t.andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON))\n\t\t\t\t// Validate the returned fields\n\t\t\t\t.andExpect(jsonPath(\"$.brand\", Is.is(expected.getBrand())))\n\t\t\t\t.andExpect(jsonPath(\"$.color\", Is.is(expected.getColor())))\n\t\t\t\t.andExpect(jsonPath(\"$.name\", Is.is(expected.getName()))).andReturn();\n\n\t\t// verify\n\t\tverify(productService).findProductById(ArgumentMatchers.any());\n\t}",
"@Test\n\tpublic void getOwnerById6Test() throws Exception {\n\t\tmockMvc.perform(get(\"/owner/6\"))\n\t\t.andExpect(status().isOk())\n\t\t.andExpect(content().contentType(contentType))\n\t\t.andExpect(jsonPath(\"$.id\", is(6)))\n\t\t.andExpect(jsonPath(\"$.firstName\", is(\"Jean\")))\n\t\t.andExpect(jsonPath(\"$.lastName\", is(\"Coleman\")))\n\t\t.andExpect(jsonPath(\"$.city\", is(\"Monona\")))\n\t\t.andExpect(jsonPath(\"$.address\", is(\"105 N. Lake St.\")))\n\t\t.andExpect(jsonPath(\"$.telephone\", is(\"6085552654\")));\n\t\t//.andExpect(jsonPath(\"$\"));\n\t}",
"public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }",
"public java.lang.Long getCarId() {\n return carId;\n }",
"@RequestMapping(value = \"/carDetails/{vin}\", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public @ResponseBody Car getCarDetails(@PathVariable final String vin) {\n logger.info(\"Requesting car details for VIN number: {}\", vin);\n final Car carDetails = carRentalService.getCarDetails(vin);\n logger.info(\"Returning vin-based ({}) car details: {}\", vin, carDetails);\n return carDetails;\n }",
"@GetMapping(\"/covs/{id}\")\n @Timed\n public ResponseEntity<Cov> getCov(@PathVariable Long id) {\n log.debug(\"REST request to get Cov : {}\", id);\n Optional<Cov> cov = covService.findOne(id);\n return ResponseUtil.wrapOrNotFound(cov);\n }",
"@Test\n\t@DisplayName(\"GET /api/article/1 - Found\")\n\tpublic void testGetArticleById() throws Exception {\n\t\tmockMvc.perform(get(\"api/article/{id}\", 1))\n\t\t.andExpect(status().isOk()) //checks response code\n\t\t.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) // checks response type\n\t\t.andExpect(header().string(HttpHeaders.ETAG, \"\\\"1\\\"\")) // check header tag\n\t\t.andExpect(jsonPath(\"$.id\").value(1))\n\t\t.andExpect(jsonPath(\"$.title\").value(\"Protecting your sql database\"))\n\t\t.andExpect(jsonPath(\"$.text\").value(\"Protecting your db is critical to prevent sql injection and a massive data breach\"))\n\t\t.andExpect(jsonPath(\"$.author\").value(\"Bob\"));\n\t}",
"@Test\n public void getOrderByIdTest() {\n Long orderId = 10L;\n Order response = api.getOrderById(orderId);\n Assert.assertNotNull(response);\n Assert.assertEquals(10L, response.getId().longValue());\n Assert.assertEquals(10L, response.getPetId().longValue());\n Assert.assertEquals(1, response.getQuantity().intValue());\n\n verify(exactly(1), getRequestedFor(urlEqualTo(\"/store/order/10\")));\n }",
"public Car findCarByName(String name){\r\n return repository.findCarByName(name);\r\n }",
"@Test\n public void retriveByIdTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(1);\n assertNotNull(servizio,\"Should return true if return Servizio 1\");\n }",
"@Test\n public void testFindById() {\n System.out.println(\"findById\");\n Integer id = 1;\n PrioridadRest instance = mokPrioridadRest;\n Prioridad expResult = new Prioridad(1);\n Prioridad result = instance.findById(id);\n assertEquals(expResult, result);\n \n }",
"@Test\r\n void testGetMedicineById() throws Exception{\r\n String URI= \"/medicine/get/{medicineId}\";\r\n Medicine medicine = new Medicine();\r\n\t medicine.setMedicineId(134);\r\n\t medicine.setMedicineName(\"crosin\");\r\n\t medicine.setMedicineCost(200);\r\n\r\n Mockito.when(medicineService.findMedicineById(Mockito.any())).thenReturn(medicine);\r\n MvcResult mvcResult = this.mockMvc.perform(MockMvcRequestBuilders.get(URI, 102).accept(MediaType.APPLICATION_JSON)).andReturn();\r\n MockHttpServletResponse mockHttpServletResponse = mvcResult.getResponse();\r\n String jsonOutput = mockHttpServletResponse.getContentAsString();\r\n assertNotNull(jsonOutput);\r\n }",
"@Test\n\tpublic void testGetcompanyDetailsApi() {\n\t\tCompany company = new Company(\"DataSolutions\", \"Marthahalli\",\n\t\t\t\t\"Bangalore\", \"India\", \"9880440671\");\n\t\tcompanyRepository.save(company);\n\n\t\tInteger companyId = company.getCompanyId();\n\n\t\t// Now make a call to the API to get details of the company\n\t\tCompany apiResponse = restTemplate.getForObject(\n\t\t\t\t\"http://localhost:8888/companies/\" + companyId, Company.class);\n\n\t\t// Verify that the data from the API and data saved in the DB are same\n\t\tassertNotNull(apiResponse);\n\t\tassertEquals(company.getName(), apiResponse.getName());\n\t\tassertEquals(company.getCompanyId(), apiResponse.getCompanyId());\n\t\tassertEquals(company.getAdress(), apiResponse.getAdress());\n\t\tassertEquals(company.getCountry(), apiResponse.getCountry());\n\n\t\t// Delete the Test data created\n\t\tcompanyRepository.delete(apiResponse.getCompanyId());\n\t}",
"@GetMapping(\"/find/{idcategory}\")\n\tpublic ResponseEntity<?> findById(@PathVariable int idcategory){\n\t\tCategoryVO cat = catService.findById(idcategory);\n\t\treturn checkNull(cat);\n\t}",
"@GetMapping(\"/check\")\n public void run(){\n\n\n carDAO.GetByDate(2003, 2003);\n }",
"@Test\r\n\tpublic void Test_ID() {\r\n\t\tResponse resp = given().\r\n\t\t\t\tparam(\"nasa_id\", \"PIA12235\").\r\n\t\t\t\twhen().\r\n\t\t\t\tget(endpoint);\r\n\t\t\t\tSystem.out.println(resp.getStatusCode());\r\n\t\t\t\tAssert.assertEquals(resp.getStatusCode(), 200);\r\n\t}",
"@Test\n\tpublic void readCustomerById() {\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tlong id = customer.getId();\n\t\tname = \"Mark\";\n\t\taddress = \"Auckland\";\n\t\ttelephoneNumber = \"0211616447\";\n\t\tcustomerController.create(name, address, telephoneNumber);\n\n\t\t// When\n\t\tICustomer cus = customerController.read(id);\n\n\t\t// Then\n\t\tAssert.assertEquals(customer, cus);\n\t}",
"@Test\n public void getPersonById_expectNotFound() throws Exception {\n when(service.getPersonById(5)).thenThrow(new PersonNotFoundException(5));\n //Creem calea\n mockMvc.perform(get(\"/person\" + \"/5\")\n .contentType(APPLICATION_JSON))\n .andDo(print())\n .andExpect(status().is(HttpStatus.NOT_FOUND.value()))\n .andReturn();\n verify(service,times(1)).getPersonById(5);\n verifyNoMoreInteractions(service);\n }",
"@GetMapping(value = \"/{id}\")\n @PreAuthorize(\"hasRole('ADMIN') or hasRole('USER')\")\n public ResponseEntity<RecipeDto> getRecipeById(@PathVariable(\"id\") @NotNull final int id) {\n return new ResponseEntity<>(RecipeDto.from(recipeService.getRecipeById(id)), HttpStatus.OK);\n }",
"@Test\n public void findById() {\n System.out.println(\"\\n--- Singer by id=1 ---\");\n\n Singer singer = restTemplate.getForObject(\n \"http://localhost:9082/restful-ws/singer/{id}\", Singer.class, 1);\n\n System.out.println(singer);\n }",
"@Test\n public void testDeleteVehicleById() {\n //Arrange\n Vehicle vehicle = new Vehicle();\n Model model = new Model();\n Make make = new Make();\n \n make.setMakeName(\"Ford\");\n \n Make createdMake = makeDao.addMake(make);\n \n model.setModelName(\"Explorer\");\n model.setMake(createdMake);\n \n Model createdModel = modelDao.addModel(model);\n \n vehicle.setYear(2018);\n vehicle.setTransmission(\"Automatic\");\n vehicle.setMileage(1000);\n vehicle.setColor(\"Blue\");\n vehicle.setInterior(\"Leather\");\n vehicle.setBodyType(\"SUV\");\n vehicle.setVin(\"W9D81KQ93N8Z0KS7\");\n vehicle.setSalesPrice(new BigDecimal(\"35000.00\"));\n vehicle.setMsrp(new BigDecimal(\"40000.00\"));\n vehicle.setDescription(\"A practical vehicle\");\n vehicle.setPicURL(\"http://www.sampleurl.com/samplepic\");\n vehicle.setModel(createdModel);\n\n Vehicle createdVehicle = vehicleDao.addVehicle(vehicle);\n\n //Act\n vehicleDao.deleteVehicleById(vehicle.getVehicleId());\n \n //Assert\n Vehicle fetchedVehicle = vehicleDao.getVehicleById(createdVehicle.getVehicleId());\n assertNull (fetchedVehicle);\n \n }",
"@Test\n public void testGetSingleRecipe() throws Exception {\n System.out.println(\"getSingleRecipeREST\");\n String recipe = \"slow cooker beef stew\";\n Recipe expResult = r1;\n Recipe result = get(\"/recipes/specific/\" + recipe).then()\n .assertThat()\n .statusCode(HttpStatus.OK_200.getStatusCode())\n .extract()\n .as(Recipe.class);\n assertEquals(expResult, result);\n \n }",
"@GetMapping(\"/{userId}\")\n public UserAndCar find(@PathVariable Long userId) {\n }",
"@Test\n\tpublic void testCreateXMLCarModel() {\n\t\tSystem.out.println(\"createXMLCarModel\");\n\n\t\tString xml = null;\n\n\t\tResponseEntity<String> expResult = new ResponseEntity<String>(\"Error\", HttpStatus.NOT_FOUND);\n\t\twhen(carService.createXMLCarModel(xml)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<String> result = carController.createXMLCarModel(xml);\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"@Test\n public void shouldCreateCabrioWhenSummer() {\n CarSettlement.getSeasonAndTime(\"lato\", true);\n ApplicationContext context = new AnnotationConfigApplicationContext(\"com.kodilla.spring\");\n Car car = (Car) context.getBean(\"seasonCar\");\n //When\n String whichCar = car.getCarType();\n //Then\n Assertions.assertEquals(\"Cabrio\", whichCar);\n }",
"@Test\n public void shouldCreateSUVWhenWinter() {\n CarSettlement.getSeasonAndTime(\"zima\", true);\n ApplicationContext context = new AnnotationConfigApplicationContext(\"com.kodilla.spring\");\n Car car = (Car) context.getBean(\"seasonCar\");\n //When\n String whichCar = car.getCarType();\n //Then\n Assertions.assertEquals(\"SUV\", whichCar);\n }",
"public String deleteCar(int id) {\r\n repository.deleteById(id);\r\n\r\n return \"\\nCar with id \" + id + \" deleted!\\n\";\r\n }",
"public void deleteFromCarDriverByCarId(int id) {\n\t\tTransaction transaction = null;\n\t\ttry (Session session = HibernateUtil.getSessionFactory().openSession()) {\n\t\t\ttransaction = session.beginTransaction();\n\t\t\t Query query = session.createQuery(\"from car\");\n\t\t\t List<Car> cars = query.getResultList();\n\t\t\tSystem.out.println(cars);\n//\t\t\tquery.executeUpdate();\n\t\t\ttransaction.commit();\n\t\t} catch (Exception e) {\n\t\t\tif (transaction != null) {\n\t\t\t\ttransaction.rollback();\n\t\t\t}\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@GetMapping(\"/cuentas/{id}\")\n @Timed\n public ResponseEntity<Cuenta> getCuenta(@PathVariable Long id) {\n log.debug(\"REST request to get Cuenta : {}\", id);\n Optional<Cuenta> cuenta = cuentaRepository.findById(id);\n return ResponseUtil.wrapOrNotFound(cuenta);\n }",
"public void setCarID(Integer carID) {\r\n this.carID = Objects.requireNonNull(carID);\r\n }",
"@Test\n\tpublic void findByIdTest() {\n\t\tProductPrice price = repository.findById(proudctId).get();\n\t\tlog.info(\"\"+price.getValue());\n\t\tassertThat(price.getValue()).isEqualTo(22.22);\n\t}",
"@Test\n void getByIdSuccess() {\n logger.info(\"running getByID test\");\n User retrievedUser = (User)genericDao.getById(2);\n\n assertEquals(\"BigAl\", retrievedUser.getUserName());\n assertEquals(\"Albert\", retrievedUser.getFirstName());\n assertEquals(2, retrievedUser.getId());\n assertEquals(\"Einstein\", retrievedUser.getLastName());\n assertEquals(\"11223\", retrievedUser.getZipCode());\n assertEquals(LocalDate.of(1879,3,14), retrievedUser.getBirthDate());\n\n }",
"@RequestMapping(value = \"/{id}\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<Bird> getBird(@PathVariable(value = \"id\",required = true) String id ){\n logger.trace(\"Get Bird by Id invoked, with id {}\" , id);\n Bird bird = birdService.findById(id);\n logger.trace(\"Get Bird by Id finished, with id {} \" , id);\n return ResponseEntity.status(HttpStatus.OK).body(bird);\n }",
"@Override\n\tpublic ResultMessage deleteCar(String id) {\n\t\treturn inList.delete(id);\n\t}",
"@Test\n public void findByIdTest() {\n }",
"@Test\n public void findByIdTest() {\n }",
"@RequestMapping(value = \"/search\", method = RequestMethod.POST)\n public ModelAndView searchById(@ModelAttribute(\"car\") Car car) {\n carService.getById(car.getId());\n// inMemoryCacheWithDelayQueue.add(c);\n ModelAndView modelAndView = new ModelAndView();\n modelAndView.setViewName(\"redirect:/\");\n\n// Car car = carService.getByYear(year);\n\n return modelAndView;\n }",
"@GetMapping(\"/{id}\")\n public Customer getCustomer(@PathVariable long id){\n return customerRepository.findById(id);\n }",
"@GetMapping(\"/getById/{id}\")\n public CityInfo getById(@PathVariable int id){\n return service.getById(id);\n }",
"@Test\n public void testGetId() {\n System.out.println(\"getId\");\n DTO_Ride instance = dtoRide;\n long expResult = 1L;\n long result = instance.getId();\n assertEquals(expResult, result);\n }",
"@GetMapping(\"/pets/{id}\")\n public ResponseEntity<Pet> getPet(@PathVariable Long id) {\n log.debug(\"REST request to get Pet : {}\", id);\n Optional<Pet> pet = petService.findOne(id);\n return ResponseUtil.wrapOrNotFound(pet);\n }",
"@Test\n\tpublic void givenGetItemById_whenValidId_ThenSuccess() {\n\t\tHashMap<String, Object> expected = getRecordHashMapWithId(1, 5, \"Apples\", \"Fruits\", 2.50f);\n\n\t\tHashMap<String, Object> actual = given().\n\t\t\tpathParam(\"id\", expected.get(\"id\")).\n\t\twhen().\n\t\t\tget(\"/{id}\").\n\t\tthen().\n\t\t\tstatusCode(HttpStatus.OK.value()).\n\t\t\tcontentType(ContentType.JSON).\n\t\t\textract().path(\"$\");\n\n\t\tassertThat(expected).isEqualTo(actual);\n\n\t}",
"@Test\n public void testGetCartsIdAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getCartsIdAction(\"{id}\", \"{customerId}\");\n List<Integer> expectedResults = Arrays.asList(200, 400, 403, 404);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/Cart\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 403) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 404) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }",
"@Test\n\tpublic void test() {\n\t\tcar.setUpCar(model, brand, 150, 5);\n\t\tassertEquals(result, car.getBrandAndModel());\n\t}",
"@GetMapping(\"/{id}\")\n\tpublic ResponseEntity<Contato> getById(@PathVariable long id) \n\t{\n\t\tContato contato = contatoService.getById(id);\n\n\t\tif(contato == null) \n\t\t{\n\t\t\treturn ResponseEntity.notFound().build();\n\t\t}\n\t\treturn ResponseEntity.ok(contato);\n\t}",
"@Override\n\tpublic car getByVin(String vinId) {\n\t\t\t\ttry{\n\t\t\t\t\tcar so=carDataRepository.getByVin(vinId);\n\t\t\t\t\t\n\t\t\t\t\treturn so;\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception ex)\n\t\t\t\t\t{\n\t\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t}",
"@Test\n public void overviewAccountsControllerShouldReturnOnlyCustomerId() throws Exception {\n Integer customerId = 12212;\n request = registerSession(new MockHttpServletRequest(), customerId);\n\n final ModelAndView mav = processGetRequest(request, new MockHttpServletResponse());\n Integer actualCustomerId = (Integer) getModelValue(mav, \"customerId\");\n\n assertEquals(customerId, actualCustomerId);\n }",
"@Transactional(readOnly = true)\n public Result getVehicle(int vehicleId)\n {\n TypedQuery<VehicleDetail> query = db.em().\n createQuery(\"SELECT NEW VehicleDetail(v.vehicleId, v.VIN, v.vehicleYear, v.nickname, m.makeId, m.makeName, mo.modelId, mo.modelName, s.submodelId, s.submodelName, v.tradedForVehicleId, v2.nickname, s2.submodelName, v2.vehicleYear, mo2.modelName) \" +\n \"FROM Vehicle v JOIN Model mo ON v.modelId = mo.modelId \" +\n \"LEFT JOIN Submodel s ON v.submodelId = s.submodelId \" +\n \"JOIN Make m ON m.makeId = mo.makeId \" +\n \"LEFT JOIN Vehicle v2 ON v.tradedForVehicleId = v2.vehicleId \" +\n \"LEFT JOIN Model mo2 ON v2.modelId = mo2.modelId \" +\n \"LEFT JOIN Submodel s2 ON v2.submodelId = s2.submodelId \" +\n \"LEFT JOIN Make m2 ON m2.makeId = mo2.makeId \" +\n \"WHERE v.vehicleId = :vehicleId\", VehicleDetail.class);\n query.setParameter(\"vehicleId\", vehicleId);\n VehicleDetail vehicle = query.getSingleResult();\n\n return ok(views.html.vehicle.render(vehicle));\n }",
"@GetMapping(path = \"{id}\")\n public ResponseEntity<ContractorDTO> getContractors(@PathVariable Long id) {\n logger.debug(\"Request to get a Contractor by id\");\n if(id == null || id <= 0) throw new IllegalArgumentException(\"Expects a valid id value > 0\");\n Optional<Contractor> contractor = contractorService.getByID(id);\n if(contractor != null && contractor.isPresent()) return new ResponseEntity(convertToDTO(contractor.get()) , HttpStatus.ACCEPTED);\n throw new ResourceNotFoundException(\"Unable to find any Contractor with id \" + id);\n }",
"@GetMapping(\"/vehicle-tasks/{id}\")\n @Timed\n @Secured(AuthoritiesConstants.ADMIN)\n public ResponseEntity<VehicleTask> getVehicleTask(@PathVariable Long id) {\n log.debug(\"REST request to get VehicleTask : {}\", id);\n VehicleTask vehicleTask = vehicleTaskService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(vehicleTask));\n }",
"@Test\n public void getCatalogSaleTest() {\n Integer id = null;\n // CatalogSale response = api.getCatalogSale(id);\n\n // TODO: test validations\n }",
"@GetMapping(path = \"/booking\")\n public ResponseEntity<List<Booking>> getUsersBooking(@RequestParam(value = \"idUser\", required = false) Long idUser, @RequestParam(value = \"idCar\", required = false) Long idCar)\n {\n if(idUser != null && idCar != null)\n return ResponseEntity.status(HttpStatus.OK).body(bookingRepository.findWithIdCarAndIdUser(idCar, idUser));\n else if(idUser != null)\n return ResponseEntity.status(HttpStatus.OK).body(bookingRepository.findWithIdUser(idUser));\n else if(idCar != null)\n return ResponseEntity.status(HttpStatus.OK).body(bookingRepository.findWithIdCar(idCar));\n return ResponseEntity.status(HttpStatus.EXPECTATION_FAILED).body(null);\n }",
"@Test\n void testGetByIdUser() {\n User getUser = (User) userData.crud.getById(1);\n assertEquals(\"Kevin\", getUser.getFirstName());\n logger.info(\"Got user information for ID: \" + getUser.getId());\n }",
"@Test\n\tpublic void getProductDetails() throws Exception {\n\n\t\tMockito.when(productService.getProductInfo(Mockito.anyLong())).thenReturn(mockProduct);\n\n\t\tRequestBuilder requestBuilder = MockMvcRequestBuilders.get(\"/products/\" + productID)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON);\n\n\t\tMvcResult result = mockMvc.perform(requestBuilder).andReturn();\n\n\t\tSystem.out.println(result.getResponse());\n\n\t\tJSONAssert.assertEquals(expected, result.getResponse().getContentAsString(), true);\n\t\tSystem.out.println(\"UnitTestSuccessful\");\n\t}"
] | [
"0.76890904",
"0.76176834",
"0.73222476",
"0.7280654",
"0.72470623",
"0.7153293",
"0.7146855",
"0.70640117",
"0.7019757",
"0.69412476",
"0.6915156",
"0.6867123",
"0.67194796",
"0.6701651",
"0.6562791",
"0.6459309",
"0.6388474",
"0.6388153",
"0.63655007",
"0.6348353",
"0.63271475",
"0.63027865",
"0.62983906",
"0.6292868",
"0.6273045",
"0.61684376",
"0.6154595",
"0.6142769",
"0.61326754",
"0.61051536",
"0.6077177",
"0.60469216",
"0.60311425",
"0.60178393",
"0.6000453",
"0.6000314",
"0.5972432",
"0.59627813",
"0.595343",
"0.59455156",
"0.594425",
"0.5937981",
"0.59349436",
"0.58804023",
"0.5878283",
"0.5875545",
"0.5875458",
"0.58666223",
"0.58535606",
"0.58518726",
"0.58253694",
"0.5813173",
"0.5794448",
"0.57743037",
"0.5765585",
"0.57633007",
"0.57590955",
"0.5757431",
"0.57529986",
"0.5744404",
"0.5737066",
"0.5733268",
"0.5732944",
"0.5727036",
"0.5715573",
"0.57087487",
"0.57005394",
"0.5692911",
"0.5689982",
"0.56848156",
"0.568436",
"0.56703275",
"0.56672275",
"0.5666388",
"0.5658395",
"0.565383",
"0.5648367",
"0.56422544",
"0.56404704",
"0.56387025",
"0.563729",
"0.563729",
"0.5623069",
"0.5621341",
"0.5609909",
"0.5608354",
"0.5590831",
"0.55851066",
"0.5583289",
"0.5583038",
"0.5574877",
"0.55736774",
"0.5567749",
"0.5562641",
"0.5560754",
"0.5557225",
"0.5556586",
"0.55564564",
"0.5555302",
"0.55547285"
] | 0.8434721 | 0 |
Test of createXMLCarModel method, of class CarsRestController. | @Test
public void testCreateXMLCarModel() {
System.out.println("createXMLCarModel");
String xml = null;
ResponseEntity<String> expResult = new ResponseEntity<String>("Error", HttpStatus.NOT_FOUND);
when(carService.createXMLCarModel(xml)).thenReturn(expResult);
ReflectionTestUtils.setField(carController, "carService", carService);
ResponseEntity<String> result = carController.createXMLCarModel(xml);
assertEquals(expResult.getStatusCode(), result.getStatusCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testCreateCars() throws Exception {\n Car car = carService.generateACarObject();\n testCreateCars(new ElectricCar(car)); // Test to see if electric cars are saved right!\n testCreateCars(new GasCar(car)); // Test to see if gas cars are saved right!\n testCreateCars(new DieselCar(car)); // Test to see if diesel cars are saved right!\n }",
"@Test\n\tpublic void testCreateEmptyCarModel() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf((\"coupe\".toUpperCase()));\n\t\tString _make = \"BMW\";\n\t\tString _model = \"\";\n\t\tString _color = \"invalid_color\";\n\t\tint _year = 1999;\n\n\t\t// ---------------------------------------------\n\t\t// Creating an empty model car.\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tAbstractCar _unknown = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\n\t\t\tfail(\"Successfully created an invalid car (should not work).\");\n\t\t} catch (Exception expected_) {\n\t\t}\n\n\t}",
"@Test\n\tpublic void testCreateNullCarModel() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf((\"coupe\".toUpperCase()));\n\t\tString _make = \"BMW\";\n\t\tString _model = null;\n\t\tString _color = \"invalid_color\";\n\t\tint _year = 1999;\n\n\t\t// ---------------------------------------------\n\t\t// Creating an null model car.\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tAbstractCar _unknown = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\n\t\t\tfail(\"Successfully created an invalid car (should not work).\");\n\t\t} catch (Exception expected_) {\n\t\t}\n\n\t}",
"@Test\n\tpublic void testCreateValidCoupeCar() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf(\"coupe\".toUpperCase());\n\t\tString _make = \"toyota\";\n\t\tString _model = \"trueno\";\n\t\tString _color = \"white\";\n\t\tint _year = 1986;\n\n\t\t// ---------------------------------------------\n\t\t// Creating a valid coupe.\n\n\t\ttry {\n\t\t\tAbstractCar _coupe = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\t\t\tassertTrue(_coupe instanceof Coupe);\n\t\t} catch (Exception e_) {\n\t\t\tfail(\"Failed to create a valid Coupe.\");\n\t\t}\n\t}",
"@Test\r\n void testCreate() {\r\n assertNotNull(model);\r\n }",
"@Test\n\tpublic void test() {\n\t\tcar.setUpCar(model, brand, 150, 5);\n\t\tassertEquals(result, car.getBrandAndModel());\n\t}",
"@Test\n\tpublic void testFindAllCars() {\n\t\tSystem.out.println(\"findAllCars\");\n\n\t\tList<CarModel> carList = new ArrayList<CarModel>();\n\t\tCarModelDTO dto = new CarModelDTO();\n\t\tCarModel carResult = new CarModel();\n\t\tcarResult.setId(new Integer(1));\n\t\tcarResult.setBrand(\"Ford\");\n\t\tcarResult.setFrom(new Integer(2019));\n\t\tcarResult.setTo(new Integer(2020));\n\t\tcarList.add(carResult);\n\t\tdto.setCars(carList);\n\t\tdto.setMessage(\"OK\");\n\t\tdto.setSuccess(true);\n\t\tResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);\n\t\twhen(carService.findAllCars()).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<CarModelDTO> result = carController.findAllCars();\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"@Test\n public void testGetCars() {\n System.out.println(\"getCars\");\n CarController instance = new CarController();\n List<Car> expResult = null;\n List<Car> result = instance.getCars();\n for(Car car: result) {\n System.out.println(car);\n }\n assertTrue(true);\n }",
"@Test\n\tpublic void testCreateEmptyCarMake() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf((\"coupe\".toUpperCase()));\n\t\tString _make = \"\";\n\t\tString _model = \"invalid_model\";\n\t\tString _color = \"invalid_color\";\n\t\tint _year = 1990;\n\n\t\t// ---------------------------------------------\n\t\t// Creating an empty make car.\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tAbstractCar _unknown = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\n\t\t\tfail(\"Successfully created an invalid car (should not work).\");\n\t\t} catch (Exception expected_) {\n\t\t}\n\n\t\t// ---------------------------------------------\n\t\t// Creating a null make car.\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tAbstractCar _unknown = _carFactory.buildCar(_carType, null, _model, _color, _year);\n\n\t\t\tfail(\"Successfully created an invalid car (should not work).\");\n\t\t} catch (Exception expected_) {\n\t\t}\n\t}",
"@Test\n\tpublic void testGetCarById() {\n\t\tSystem.out.println(\"getCarById\");\n\t\tint carId = 1;\n\t\tList<CarModel> carList = new ArrayList<CarModel>();\n\t\tCarModelDTO dto = new CarModelDTO();\n\t\tCarModel carResult = new CarModel();\n\t\tcarResult.setId(new Integer(1));\n\t\tcarResult.setBrand(\"Ford\");\n\t\tcarResult.setFrom(new Integer(2019));\n\t\tcarResult.setTo(new Integer(2020));\n\t\tcarList.add(carResult);\n\t\tdto.setCars(carList);\n\t\tdto.setMessage(\"OK\");\n\t\tdto.setSuccess(true);\n\t\tResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);\n\t\twhen(carService.findCarById(carId)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<CarModelDTO> result = carController.getCarById(carId);\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"@Test\n public void createCatalogSaleTest() {\n CatalogSale catalogSale = null;\n // CatalogSale response = api.createCatalogSale(catalogSale);\n\n // TODO: test validations\n }",
"@Test\r\n\tpublic void testCreateXml(){\n\t}",
"@Test\n public void testAddCar() {\n\n }",
"@Test\n public void testNewInstance(){\n car = Car.newInstance();\n assertNotNull(car);\n assertNotNull(car.getID());\n }",
"@Test\n public void testGetCarById() {\n\n }",
"@Test\n\tpublic void testFindCarsByBrand() {\n\t\tSystem.out.println(\"findCarsByBrand\");\n\t\tString brand = \"Ford\";\n\t\tList<CarModel> carList = new ArrayList<CarModel>();\n\t\tCarModelDTO dto = new CarModelDTO();\n\t\tCarModel carResult = new CarModel();\n\t\tcarResult.setId(new Integer(1));\n\t\tcarResult.setBrand(\"Ford\");\n\t\tcarResult.setFrom(new Integer(2019));\n\t\tcarResult.setTo(new Integer(2020));\n\t\tcarList.add(carResult);\n\t\tdto.setCars(carList);\n\t\tdto.setMessage(\"OK\");\n\t\tdto.setSuccess(true);\n\t\tResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);\n\t\twhen(carService.findCarsByBrand(brand)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<CarModelDTO> result = carController.findCarsByBrand(brand);\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"CsticModel createInstanceOfCsticModel();",
"@Test\n\tpublic void test_saveCar_whenCarDataIsCorect_thenReturnSavedCar() {\n\t\t// given or arrange\n\t\tCarServiceModel toBeSavedCar = getCarWithCorectData();\n\t\t// when or act\n\t\tCarServiceModel actualCar = carService.saveCar(toBeSavedCar);\n\t\tCarServiceModel expectedCar = modelMapper.map(carRepository.findById(actualCar.getId()).orElse(null), CarServiceModel.class);\n\t\t// then or assert\n\t\tassertEquals(expectedCar.getId(), actualCar.getId());\n\t\tassertEquals(expectedCar.getMake(), actualCar.getMake());\n\t\tassertEquals(expectedCar.getModel(), actualCar.getModel());\n\t\tassertEquals(expectedCar.getTravelledDistance(), actualCar.getTravelledDistance());\n\n\t}",
"@Test\n\tpublic void create() {\n\t\t// Given\n\t\tString name = \"Mark\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"0211616447\";\n\n\t\t// When\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\n\t\t// Then\n\t\tAssert.assertNotNull(customer);\n\t}",
"@Test\n\tpublic void testCreateNullCarMake() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf((\"coupe\".toUpperCase()));\n\t\tString _make = null;\n\t\tString _model = \"invalid_model\";\n\t\tString _color = \"invalid_color\";\n\t\tint _year = 1990;\n\n\t\t// ---------------------------------------------\n\t\t// Creating a null make car.\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tAbstractCar _unknown = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\n\t\t\tfail(\"Successfully created an invalid car (should not work).\");\n\t\t} catch (Exception expected_) {\n\t\t}\n\t}",
"@Test\n public void createdWithSucessAndReturn201() throws Exception {\n List<Double> quotes = new ArrayList<>();\n StockRequest stockRequest = new StockRequest(\"StockI\", quotes);\n String request = objectMapper.writeValueAsString(stockRequest);\n String response = objectMapper.writeValueAsString(stockRequest);\n URI uri = UriComponentsBuilder.fromUriString(\"/stock\").build().toUri();\n String location = UriComponentsBuilder.fromUriString(\"/stock?name=StockI\").build().toUriString();\n mockMvc.perform(MockMvcRequestBuilders.post(uri)\n .contentType(MediaType.APPLICATION_JSON)\n .content(request))\n .andExpect(MockMvcResultMatchers.status().isCreated())\n .andExpect(MockMvcResultMatchers.content().json(response))\n .andExpect(MockMvcResultMatchers.header().string(\"location\", location));\n }",
"@Test\n\tpublic void testCreateValidSuvCar() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf((\"suv\".toUpperCase()));\n\t\tString _make = \"cadillac\";\n\t\tString _model = \"escalade\";\n\t\tString _color = \"black\";\n\t\tint _year = 2018;\n\n\t\t// ---------------------------------------------\n\t\t// Creating a valid Suv.\n\t\ttry {\n\t\t\tAbstractCar _suv = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\t\t\tassertTrue(_suv instanceof Suv);\n\t\t} catch (Exception e_) {\n\t\t\tfail(\"Failed to create a valid SUV.\");\n\t\t}\n\t}",
"@Test\n void postRequest_Params_SuccessfullyPostsCar() throws Exception {\n Auto auto = autosList.get(0);\n when(autosService.addAuto(any(Auto.class))).thenReturn(auto);\n\n mockMvc.perform(post(\"/api/autos\")\n .contentType(MediaType.APPLICATION_JSON)\n .content(toJSON(auto)))\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"vin\").value(auto.getVin()));\n}",
"public Carmodel() {\n this(\"CarModel\", null);\n }",
"@Test\n public void testDeleteCarById() {\n System.out.println(\"deleteCarById\");\n int id = 17;\n CarController instance = new CarController();\n instance.deleteCarById(id);\n assertTrue(true);\n }",
"@Test\n void getAddressBook() {\n\n assertEquals(test_AddressBook, controllerTest.getModel());\n\n }",
"@Test\n public void validAdd() throws Exception {\n Logger.getGlobal().info(\"Start validAdd test\");\n RestaurantVO restaurant = new RestaurantVO();\n restaurant.setId(\"999\");\n restaurant.setName(\"Test Restaurant\");\n\n ResponseEntity<Restaurant> restaurants = restaurantController.add(restaurant);\n Assert.assertEquals(HttpStatus.CREATED, restaurants.getStatusCode());\n Logger.getGlobal().info(\"End validAdd test\");\n }",
"void create(Model model) throws Exception;",
"@Test\n void getAllCarsSuccess() {\n List<Car> cars = carDao.getAll();\n assertNotNull(cars);\n assertEquals(1, cars.size());\n }",
"@Test\n\tpublic void testCreateInvalidCarType() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tString _make = \"invalid_make\";\n\t\tString _model = \"invalid_model\";\n\t\tString _color = \"invalid_color\";\n\t\tint _year = -1;\n\n\t\t// ---------------------------------------------\n\t\t// Creating a invalid car.\n\t\ttry {\n\t\t\tCarType _carType = CarType.valueOf((\"unknown_type\".toUpperCase()));\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tAbstractCar _unknown = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\n\t\t\tfail(\"Successfully created an invalid car (should not work).\");\n\t\t} catch (Exception expected_) {\n\t\t}\n\t}",
"@Test\n public void createSchedule_whenModelIsValid_successfullyCreated() throws CreateException {\n\n SportCenter sportCenter = sportCenter = this.modelMapper\n .map(validSportCenterServiceModel1, SportCenter.class);\n SportCenter savedSportCenter = this.sportCenterRepository.saveAndFlush(sportCenter);\n SportCenterServiceModel sportCenterServiceModel = this.modelMapper\n .map(savedSportCenter, SportCenterServiceModel.class);\n ScheduleServiceModel actual = this.scheduleService\n .createSchedule(sportCenterServiceModel, \"11\", \"11\", \"2011\");\n ScheduleServiceModel expected = this.modelMapper\n .map(this.scheduleRepository.findAll().get(0), ScheduleServiceModel.class);\n\n assertEquals(expected.getId(), actual.getId());\n assertEquals(expected.getDay(), actual.getDay());\n assertEquals(expected.getMonth(), actual.getMonth());\n assertEquals(expected.getYear(), actual.getYear());\n }",
"@Test\n\tpublic void testCreateCategory() throws Exception {\n\n\t\tList<Category> categories = new ArrayList<>();\n\t\tCategory category = new Category();\n\t\tcategory.setTenantId(\"default\");\n\n\t\tAuditDetails auditDetails = new AuditDetails();\n\t\tcategory.setAuditDetails(auditDetails);\n\n\t\tCategoryResponse categoryResponse = new CategoryResponse();\n\t\tcategories.add(category);\n\n\t\tcategoryResponse.setResponseInfo(new ResponseInfo());\n\t\tcategoryResponse.setCategories(categories);\n\n\t\ttry {\n\n\t\t\twhen(categoryService.createCategoryMaster(any(CategoryRequest.class),any(String.class))).thenReturn(categoryResponse);\n\n\t\t\tmockMvc.perform(post(\"/category/v1/_create\")\n\t\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t\t.content(getFileContents(\"categoryCreateRequest.json\")))\n\t\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t\t.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n\t\t\t\t\t.andExpect(content().json(getFileContents(\"categoryCreateResponse.json\")));\n\n\t\t} catch (Exception e) {\n\n\t\t\tassertTrue(Boolean.FALSE);\n\t\t}\n\n\t\tassertTrue(Boolean.TRUE);\n\n\t}",
"public Device createObject(String brand, String model, Integer price, String photo, String date);",
"@Test\n public void shouldCreateSUVWhenWinter() {\n CarSettlement.getSeasonAndTime(\"zima\", true);\n ApplicationContext context = new AnnotationConfigApplicationContext(\"com.kodilla.spring\");\n Car car = (Car) context.getBean(\"seasonCar\");\n //When\n String whichCar = car.getCarType();\n //Then\n Assertions.assertEquals(\"SUV\", whichCar);\n }",
"@Test\n\tpublic void testCreatePassengerCar() throws TrainException {\n\t\tInteger grossWeight = 1;\n\t\tInteger numberOfSeats = 1;\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tasgn2RollingStock.RollingStock passengerCarUnderTest = \n\t\t\tnew asgn2RollingStock.PassengerCar((Integer)grossWeight, (Integer)numberOfSeats);\n\t\t\n\t}",
"@Test\n\tpublic void testCreate() throws Exception {\n\t\tMockHttpServletRequestBuilder reqBuilder = MockMvcRequestBuilders.post(\"/createJourney\");\n\t\treqBuilder.contentType(MediaType.APPLICATION_JSON);\n\t\treqBuilder.accept(MediaType.APPLICATION_JSON);\n\t\treqBuilder.content(this.mapper.writeValueAsString(journey));\n\t\t\n\t\tResultMatcher matchStatus = MockMvcResultMatchers.status().isCreated();\n\t\tResultMatcher matchContent = MockMvcResultMatchers.content().json(this.mapper.writeValueAsString(savedJourney));\t\n\t\t\t\t\n\t\tthis.mockMVC.perform(reqBuilder).andExpect(matchStatus).andExpect(matchContent);\n\t}",
"@Test\n public void whenCreateValidStudent_thenReceiveOKResponse() throws IOException {\n final HttpPost httpPost = new HttpPost(BASE_URL + \"2/students\");\n final InputStream resourceStream = this.getClass().getClassLoader()\n .getResourceAsStream(\"created_student.xml\");\n httpPost.setEntity(new InputStreamEntity(resourceStream));\n httpPost.setHeader(\"Content-Type\", \"text/xml\");\n \n //In this case the Student object does not exist in the Course \n //istance and should be succefully created\n final HttpResponse response = client.execute(httpPost);\n assertEquals(200, response.getStatusLine().getStatusCode());\n \n //We may confirm the new states of the web service resource\n final Student student = getStudent(2, 3);\n assertEquals(3, student.getId());\n assertEquals(\"Student C\", student.getName());\n }",
"@RequestMapping(method = RequestMethod.POST)\r\n\t@ResponseBody\r\n\t@Transactional\r\n\tpublic Object create(@RequestBody Model model) {\r\n\t\ttry {\r\n\t\t\tgetService().create(model);\r\n\t\t\treturn true;\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Create exception for \" + model, e);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public Car create(Car car) {\n if (car.getStation() == null) {\n throw new IllegalArgumentException(messages.get(\"carStationNotNull\"));\n }\n if (car.getStation().getId() == null || !stationService.existsById(car.getStation().getId())) {\n throw new EntityNotFoundException(messages.get(\"stationNotFound\"));\n }\n if (carRepository.existsById(car.getRegistrationNr())) {\n throw new EntityExistsException(messages.get(\"carAlreadyExists\"));\n }\n return carRepository.save(car);\n }",
"@Test\n\tpublic void testCreateFreightCar() throws TrainException {\n\t\tInteger grossWeight = 1;\n\t\tString goodsType = \"G\";\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tasgn2RollingStock.RollingStock freightCarUnderTest = \n\t\t\tnew asgn2RollingStock.FreightCar((Integer)grossWeight, (String)goodsType);\n\t\t\n\t}",
"@Test\n public void shouldCreateCabrioWhenSummer() {\n CarSettlement.getSeasonAndTime(\"lato\", true);\n ApplicationContext context = new AnnotationConfigApplicationContext(\"com.kodilla.spring\");\n Car car = (Car) context.getBean(\"seasonCar\");\n //When\n String whichCar = car.getCarType();\n //Then\n Assertions.assertEquals(\"Cabrio\", whichCar);\n }",
"@Test\n public void createBrandTest() throws ApiException {\n Brand brand = null;\n Brand response = api.createBrand(brand);\n // TODO: test validations\n }",
"private ICarModel ICarModel(Car car) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn null;\r\n\t}",
"@Test\n\tpublic void testCreateEmptyCarColor() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf((\"coupe\".toUpperCase()));\n\t\tString _make = \"BMW\";\n\t\tString _model = \"Z4\";\n\t\tString _color = \"\";\n\t\tint _year = 1990;\n\n\t\t// ---------------------------------------------\n\t\t// Creating an empty color car.\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tAbstractCar _unknown = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\n\t\t\tfail(\"Successfully created an invalid car (should not work).\");\n\t\t} catch (Exception expected_) {\n\n\t\t}\n\t}",
"@PostMapping(\"/add-car\")\n public String addCar(@ModelAttribute Car car){\n cars.add(car);\n\n return \"redirect:/car\";\n }",
"@Transactional\n\tpublic Car createCar(String name, String makeOfCar, Integer numSeats, String carType, Integer numDoors, String driveType) {\n\t\tCar car = new Car();\n\t\tcar.setName(name);\n\t\tcar.setMakeOfCar(makeOfCar);\n\t\tcar.setNumSeats(numSeats);\n\t\tcar.setCarType(carType);\n\t\tcar.setNumDoors(numDoors);\n\t\tcar.setDriveType(driveType);\n\t\tentityManager.persist(car);\n\t\treturn car;\n\t}",
"@Test\n public void testCustomerFactoryCreate() {\n CustomerController customerController = customerFactory.getCustomerController();\n customerController.addCustomer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n assertEquals(1, customerController.getCustomerList().size());\n }",
"@Test\n public void testAddRent() {\n System.out.println(\"addRent\");\n ReserveInfo reserveInfo = new ReserveInfo();\n reserveInfo.setGuestIDnumber(\"test\");\n reserveInfo.setGuestName(\"test\");\n reserveInfo.setRentType(\"test\");\n reserveInfo.setRoomType(\"test\");\n reserveInfo.setRentDays(1);\n reserveInfo.setRemark(\"test\");\n reserveInfo.setResult(true); \n BookingController instance = new BookingController();\n boolean expResult = true;\n boolean result = instance.addRent(reserveInfo);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n }",
"@Test\n public void testBookController() {\n BookController bookeController = new BookController();\n /* List<Book> result =bookeController.getAllBooks();\n if (result.size() > 0) {\n assertEquals(result.get(0).getClass(), Book.class); */\n }",
"private void createCar() throws Exception {\n\t\tString id = \"\", make, model, driverName;\n\t\tString type, refreshments;\n\t\tboolean proceed = true;\n\t\tdouble sscStandardFee = 0;\n\t\tint numPassengers = 0;\n\t\tSystem.out.print(\"Enter registration number: \");\n\t\tid = promptUserForRegNo();\n\t\t\n\t\tif (id.length() != 0) {\n\t\t\t\n\t\t\t// Get details required for creating a car.\n\t\t\tSystem.out.print(\"Enter Make: \");\n\t\t\tmake = console.nextLine();\n\t\t\t\n\t\t\tif (make.length() == 0) {\n\t\t\t\tthrow new InvalidMakeException(\"Error: Make is empty.\");\n\t\t\t}\n\n\t\t\tSystem.out.print(\"Enter Model: \");\n\t\t\tmodel = console.nextLine();\n\t\t\t\n\t\t\tif (model.length() == 0) {\n\t\t\t\tthrow new InvalidModelException(\"Error: Model is empty.\");\n\t\t\t}\n\n\t\t\tSystem.out.print(\"Enter Driver Name: \");\n\t\t\tdriverName = console.nextLine();\n\t\t\t\n\t\t\tif (driverName.length() == 0) {\n\t\t\t\tthrow new InvalidDriverNameException(\"Error: Driver Name is empty.\");\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSystem.out.print(\"Enter number of passengers: \");\n\t\t\t\tnumPassengers = promptForPassengerNumbers();\n\t\t\t}\n\t\t\t\n\t\t\tcatch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Error: Number should be an integer from 1 to 9\");\n\t\t\t\tproceed = false;\n\t\t\t}\n\t\t\t\n\t\t\t// If there is no errors, continue.\n\t\t\tif (proceed) {\n\t\t\t\tSystem.out.println(\"Enter Service Type (SD/SS): \");\n\t\t\t\t\n\t\t\t\ttype = console.nextLine().toUpperCase();\n\t\t\t\t\n\t\t\t\tif (!type.equals(\"SD\") && !type.equals(\"SS\")) {\n\t\t\t\t\tthrow new InvalidServiceTypeException(\"Error: Service Type is invalid.\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (type.equals(\"SD\")) {\n\t\t\t\t\tboolean result = application.checkIfCarExists(id);\n\t\t\n\t\t\t\t\tif (!result) {\n\t\t\t\t\t\tString carRegistrationNumber = application.createCar(id, make, model, driverName, numPassengers);\n\t\t\t\t\t\tSystem.out.println(carRegistrationNumber);\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow new InvalidRegNoException(\"Error: Already exists in the system\");\n//\t\t\t\t\t\tSystem.out.println(\"Error - Already exists in the system\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (type.equals(\"SS\")) {\n\t\t\t\t\tboolean proceed2 = true;\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSystem.out.println(\"Enter Standard Fee: \");\n\t\t\t\t\t\tsscStandardFee = Double.parseDouble(console.nextLine());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcatch (NumberFormatException e) {\n\t\t\t\t\t\tSystem.out.println(\"Error: Please input a numeric value\");\n\t\t\t\t\t\tproceed2 = false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (proceed2) {\n\t\t\t\t\t\tSystem.out.println(\"Enter List of Refreshments: \");\n\t\t\t\t\t\trefreshments = console.nextLine();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (refreshments.substring(refreshments.length() - 1).equals(\",\")) {\n\t\t\t\t\t\t\trefreshments = refreshments.substring(0, refreshments.length() - 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tboolean result = application.checkIfCarExists(id);\n\t\t\t\t\t\tboolean result2 = application.bookingFeeSilverServiceCar(sscStandardFee);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!result && result2) {\n\t\t\t\t\t\t\tString carRegistrationNumber = application.createCar(id, make, model, driverName, numPassengers, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsscStandardFee, refreshments);\n\t\t\t\t\t\t\tSystem.out.println(carRegistrationNumber);\n\t\t\t\t\t\t} \n\t\t\t\t\t\t\n\t\t\t\t\t\telse if (!result && !result2) {\n\t\t\t\t\t\t\tthrow new InvalidSSCFeeException(\"Error - Standard Fee must be $3.00 or more.\");\n\t//\t\t\t\t\t\tSystem.out.println(\"Error - Standard Fee must be $3.00 or more.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthrow new InvalidRegNoException(\"Error - Already exists in the system\");\n\t//\t\t\t\t\t\tSystem.out.println(\"Error - Already exists in the system\");\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}",
"@Test\n\tpublic void testCreateCategoryDetails() throws Exception {\n\n\t\tList<Category> categories = new ArrayList<>();\n\t\tCategory category = new Category();\n\t\tcategory.setTenantId(\"default\");\n\n\t\tAuditDetails auditDetails = new AuditDetails();\n\t\tcategory.setAuditDetails(auditDetails);\n\n\t\tCategoryDetail categoryDetail = new CategoryDetail();\n\n\t\tList<CategoryDetail> categoryDetails = new ArrayList<>();\n\t\tcategoryDetails.add(categoryDetail);\n\t\tcategory.setDetails(categoryDetails);\n\t\tcategories.add(category);\n\n\t\tCategoryResponse categoryResponse = new CategoryResponse();\n\t\tcategoryResponse.setResponseInfo(new ResponseInfo());\n\t\tcategoryResponse.setCategories(categories);\n\n\t\ttry {\n\n\t\t\twhen(categoryService.createCategoryMaster(any(CategoryRequest.class),any(String.class))).thenReturn(categoryResponse);\n\n\t\t\tmockMvc.perform(\n\t\t\t\t\tpost(\"/category/v1/_create\")\n\t\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t\t.content(getFileContents(\"categoryDetailsCreateRequest.json\")))\n\t\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t\t.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n\t\t\t\t\t.andExpect(content().json(getFileContents(\"categoryDetailsCreateResponse.json\")));\n\n\t\t} catch (Exception e) {\n\n\t\t\tassertTrue(Boolean.FALSE);\n\t\t}\n\n\t\tassertTrue(Boolean.TRUE);\n\n\t}",
"@PostMapping(value = { \"\", \"/cart\" })\n\tpublic void addCarItem(@RequestBody CarDto car) {\n\t\tLOGGER.info(\"ShoppingCartRestController.addCarItem() invocation started\");\n\t\ttheShoppingCartService.addToCart(car);\n\t}",
"@Test\n public void a_create() {\n String url = baseUrl + \"create\";\n System.out.println();\n System.out.println(\"volunteerProvince being posted: \"+volunteerProvince);\n ResponseEntity<VolunteerProvince> postResponse = testRestTemplate\n .withBasicAuth(SECURITY_USERNAME, SECURITY_PASSWORD)\n .postForEntity(url, volunteerProvince, VolunteerProvince.class);\n volunteerProvince = postResponse.getBody();\n assertNotNull(postResponse.getBody());\n assertEquals(volunteerProvince.getVolunteerNum(), postResponse.getBody().getVolunteerNum());\n System.out.println(\"Volunteer Province saved on the data structure: \"+postResponse.getBody());\n\n }",
"@Test\n\tpublic void testCreateValidSedanCar() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf(\"sedan\".toUpperCase());\n\t\tString _make = \"ford\";\n\t\tString _model = \"focus\";\n\t\tString _color = \"grey\";\n\t\tint _year = 2014;\n\n\t\t// ---------------------------------------------\n\t\t// Creating a valid sedan.\n\t\ttry {\n\t\t\tAbstractCar _sedan = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\t\t\tassertTrue(_sedan instanceof Sedan);\n\t\t} catch (Exception e_) {\n\t\t\tfail(\"Failed to create a valid Sedan.\");\n\t\t}\n\t}",
"@Before\n public void setUp() {\n model = new ImportAttributeModel();\n }",
"@Test\n public void testCriarGrupo_Model() throws Exception {\n \n mockMvc.perform(get(\"/grupo/criarGrupo\"))\n .andExpect(model().attribute(\"listaDeGrupos\", hasSize(1)))\n .andExpect(status().isOk())\n .andExpect(view().name(\"grupo/criarGrupo\"));\n }",
"@Test\n\tpublic void testCreateFutureCarYear() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf((\"coupe\".toUpperCase()));\n\t\tString _make = \"BMW\";\n\t\tString _model = \"Z4\";\n\t\tString _color = \"black\";\n\t\tint _year = 19900;\n\n\t\t// ---------------------------------------------\n\t\t// Creating a future year.\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tAbstractCar _unknown = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\t\t\tfail(\"Successfully created an invalid car (should not work).\");\n\t\t} catch (Exception expected_) {\n\n\t\t}\n\n\t}",
"@PostMapping(\"/cars/{id}\")\n// public String saveCar(@PathVariable int id, @ModelAttribute(\"updateDto\") CarUpdateDto dto, Model model) {\n public ModelAndView saveCar(@PathVariable int id, @ModelAttribute(\"updateDto\") CarUpdateDto dto, Model model) {\n\n var car = repo.getCar(id);\n\n if(car == null && id != 0) {\n throw new IllegalArgumentException(\"Item with such id not found\");\n }\n\n if(id == 0) {\n car = new Car();\n car.setId(0);\n }\n\n // make field validation\n\n car.setNumber(dto.getNumber());\n car.setVinNumber(dto.getVinNumber());\n\n var owner = repo.getOwner(dto.getOwnerId());\n car.setOwner(owner);\n\n if(id != 0) {\n repo.save(car);\n } else {\n repo.addCar(car);\n }\n\n// model.addAttribute(\"title\", car != null ? car.getNumber() : \"\");\n// model.addAttribute(\"car\", car);\n// model.addAttribute(\"id\", id);\n//\n// return \"cars_edit\";\n\n return new ModelAndView(\"redirect:/cars\");\n }",
"public Car saveCar(Car car) {\r\n return repository.save(car);\r\n }",
"@Test\r\n\tpublic void testModelMapper() {\r\n\t\tModelMapper mm = swaggerConfig.modelMapper();\r\n\t\tassertNotNull(mm);\r\n\t}",
"public Car() {\n }",
"@Test\n\tpublic void shouldTestCreateCustomerRestConfiguration() throws Exception {\n\t\tcontext.getRouteDefinitions().get(0).adviceWith(context, new AdviceWithRouteBuilder() {\n\n\t\t\t@Override\n\t\t\tpublic void configure() throws Exception {\n\n\t\t\t\tweaveById(\"createCustomerEndpointId\").replace().to(\"mock:result\").process(new Processor() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void process(Exchange exchange) throws Exception {\n\t\t\t\t\t\texchange.getIn().setBody(getCreateCustomerResponse());\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tcontext.start();\n\t\tresults.expectedMessageCount(1);\n\t\ttemplate.send(createCustomer, getExchange());\n\t\tcontext.stop();\n\n\t}",
"@Before\n\tpublic void setUp() {\n\t\tcompteTest = FactoryCompte.getCompteVide();\n\t\tcompteTest.setIdClient(3630);\n\t\tcompteTest.setBalance(89.8);\n\t\tcompteTest.setNegativeBalanceAllowed(false);\n\t\t\n\t\tinstance.createWithId(compteTest);\t\t\n\t}",
"public CarResource() {\n }",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"public Car() {\n }",
"public void crearVehiculo( clsVehiculo vehiculo ){\n if( vehiculo.obtenerTipoMedioTransporte().equals(\"Carro\") ){\n //Debo llamar el modelo de CARRO\n modeloCarro.crearCarro( (clsCarro) vehiculo );\n } else if (vehiculo.obtenerTipoMedioTransporte().equals(\"Camion\")){\n //Debo llamar el modelo de CAMIÓN\n }\n }",
"public boolean create(ModelObject obj);",
"@Test\n void insertSuccess() {\n int insertedCarId;\n\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(1);\n\n //Create Inserted Car\n Car insertedCar = new Car(user,\"2016\",\"Honda\",\"Civic\",\"19XFC1F35GE206053\");\n\n //Save Inserted Car\n insertedCarId = carDao.insert(insertedCar);\n\n //Get Saved Car\n Car retrievedCar = carDao.getById(insertedCarId);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(insertedCar,retrievedCar);\n }",
"@Test \n public void bookHotelTestWithCreditCard() throws BookHotelFault, DatatypeConfigurationException{\n try{\n BookHotelInputType input = CreateBookHotelInputType(\"booking_Hotel_2\", \"Thor-Jensen Claus\", \"50408825\", 5, 9);\n boolean result = bookHotel(input);\n assertEquals(true, result); \n } catch(BookHotelFault e){\n System.out.println(e.getMessage());\n fail();\n }\n }",
"@Test\n public void shouldCreateSedanWhenSpringOrAutumn() {\n CarSettlement.getSeasonAndTime(\"wiosna\", true);\n ApplicationContext context = new AnnotationConfigApplicationContext(\"com.kodilla.spring\");\n Car car = (Car) context.getBean(\"seasonCar\");\n //When\n String whichCar = car.getCarType();\n //Then\n Assertions.assertEquals(\"Sedan\", whichCar);\n }",
"@Test\n public void shouldNotCreateANullBook() throws JAXBException {\n Response response = target(\"/books\").request().post(Entity.entity(null, MediaType.APPLICATION_XML));\n assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusInfo().getStatusCode());\n }",
"@Test\n public void createComaPatients() {\n \n Assert.assertEquals(service.createComa().get(0).getBedNumber(), \"45\");\n }",
"public void testGetModel() {\n System.out.println(\"getModel\");\n Wizard instance = new Wizard();\n WizardModel result = instance.getModel();\n assertNotNull(result);\n }",
"@Test\n\tvoid insertDoctorTest() throws Exception {\n\t\tList<DoctorDetail> doctorDetail = new ArrayList<>();\n\t\tDoctorDetail doctorData = new DoctorDetail();\n\t\tdoctorData.setName(\"John\");\n\t\tdoctorData.setAvailability(true);\n\t\tdoctorData.setSpecialist(\"cardioc\");\n\t\tdoctorData.setCreationDate(new Date());\n\t\tdoReturn(doctorDetail).when(doctorServiceImplementation).insertDoctorService(doctorData);\n\t\tmockMvc.perform(post(\"/doctor/add\").contentType(mediaType).content(jsonConverter(doctorData)))\n\t\t\t\t.andExpect(status().isOk());\n\t}",
"@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testSaveAddressWithActionCreateNewAddress() throws Exception {\n final AddressDto currentAddress = new AddressDto();\n currentAddress.setAddress1(\"test1\");\n currentAddress.setAddress2(\"test1\");\n currentAddress.setMtCountry(this.countryRepository.getMtCountryByMtCountryId(1));\n currentAddress.setZipCode(\"12345\");\n currentAddress.setProvince(\"test1\");\n currentAddress.setCity(\"Ha Noi\");\n final ServiceResult<Address> result = this.addressService.saveAddress(currentAddress);\n Assert.assertNotNull(result.getData());\n Assert.assertTrue(result.isSuccess());\n }",
"@Test\n public void testReservationFactoryCreate() {\n ReservationController reservationController = reservationFactory.getReservationController();\n Customer customer = new Customer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n Calendar date = Calendar.getInstance();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n Table table = tableFactory.getTableController().getTable(1);\n reservationController.addReservation(date, customer, 2, table);\n assertEquals(1, reservationController.getReservationList().size());\n }",
"@Test\n\tpublic void testCreateNullCarColor() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf((\"coupe\".toUpperCase()));\n\t\tString _make = \"BMW\";\n\t\tString _model = \"Z4\";\n\t\tString _color = null;\n\t\tint _year = 1990;\n\n\t\t// ---------------------------------------------\n\t\t// Creating an empty color car.\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tAbstractCar _unknown = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\n\t\t\tfail(\"Successfully created an invalid car (should not work).\");\n\t\t} catch (Exception expected_) {\n\n\t\t}\n\t}",
"ZenModel createZenModel();",
"public GetAllCarsDTO() {\n }",
"@Test\n public void testCrearBibliotecario() {\n System.out.println(\"BibliotecaController\");\n String email = \"mail\";\n String login = \"login\";\n String password = \"pass\";\n String nif = \"nif\";\n BibliotecarioController instance = new BibliotecarioController();\n Bibliotecario result = instance.crearBibliotecario(email, login, password, nif);\n assertEquals(email, result.getEmail());\n assertEquals(login, result.getLogin());\n assertEquals(password, result.getPassword());\n assertEquals(nif , result.getNif());\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"CsticGroupModel createInstanceOfCsticGroupModel();",
"@Test\n public void previewTemplateFromModelTest() throws IdfyException, Exception {\n TemplatePreview model = new TemplatePreview.Builder().build();\n String xmlTemplate = new String(\"123\");\n api.previewTemplateFromModel(model, xmlTemplate);\n }",
"@Test\n final void testCreateDevice() {\n when(deviceDao.save(user, deviceDTO)).thenReturn(deviceDTO);\n when(request.getRemoteAddr()).thenReturn(DeviceFixture.PUBLIC_IP_ADDRESS);\n when(deviceDao.createDevice(user, createDeviceRequest, DeviceFixture.PUBLIC_IP_ADDRESS))\n .thenReturn(deviceDTO);\n when(deviceMapper.toModel(deviceDTO)).thenReturn(deviceModel);\n\n ResponseEntity<DeviceModel> response = deviceController.createDevice(createDeviceRequest);\n\n assertEquals(200, response.getStatusCodeValue());\n assertNotNull(response.getBody());\n DeviceModel device = response.getBody();\n assertEquals(deviceModel, device);\n }",
"public void testCrearDispositivo() {\n\t\tString referencia = \"A0021R\";\n\t\tString nombre = \"Motorola G primera generacion\";\n\t\tString descripcion = \"1 GB de RAM\";\n\t\tint tipo = 1;\n\t\tString foto = \"url\";\n\t\tString emailAdministrador = \"[email protected]\";\n\t\ttry {\n\t\t\tdispositivoBL.crearDispositivo(referencia, nombre, descripcion, tipo, foto, emailAdministrador);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n @WithMockUser(\"[email protected]\")\n public void testNewExpenseCategoryData () throws Exception {\n mvc.perform(post(\"/api/newExpenseCategory\")\n .contentType(MediaType.APPLICATION_JSON)\n .param(\"name\",\"Test expense category\")\n .param(\"color\", \"#111111\")\n .param(\"note\", \"Test expense category note\")\n ).andExpect(matchAll(\n status().isOk()\n ));\n\n mvc.perform(get(\"/api/getExpenseCategory\"))\n .andExpect(matchAll(\n status().isOk(),\n jsonPath(\"$.category\", hasSize(1))\n ));\n }",
"@Test\r\n\tpublic void createProductDetails() {\r\n\t\tRestAssured.baseURI = \"http://localhost:9000/products\";\r\n\t\tRequestSpecification request = RestAssured.given();\r\n\t\tJSONObject requestParams = new JSONObject();\r\n\t\trequestParams.put(\"id\", \"7\"); // Cast\r\n\t\trequestParams.put(\"name\", \"Mangao\");\r\n\t\trequest.header(\"Content-Type\", \"application/json\");\r\n\t\trequest.body(requestParams.toString());\r\n\t\tResponse response = request.post(\"\");\r\n\t\tSystem.out.println(\"POST Responce Body ----->\" + response.asString());\r\n\t\tint statusCode = response.getStatusCode();\r\n\t\tAssert.assertEquals(statusCode, 201);\r\n\r\n\t}",
"private Car extractCar(Node carNode) throws DataProviderException {\n\t\tString pageId = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.PAGE_ID);\n\n\t\tString model = StringEscapeUtils.unescapeHtml4(getXpathEvaluator().evaluateXpathString(carNode, CarXpath.MODEL));\n\t\tif (model == null || model.isEmpty()) {\n\t\t\tmodel = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.MODEL_PROMOTED);\n\t\t}\n\n\t\tString mileage = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.MILEAGE);\n\t\tif (mileage == null || mileage.isEmpty()) {\n\t\t\tmileage = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.MILEAGE_PROMOTED);\n\t\t}\n\n\t\tString year = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.YEAR);\n\t\tif (year == null || year.isEmpty()) {\n\t\t\tyear = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.YEAR_PROMOTED);\n\t\t}\n\n\t\tString price = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.PRICE);\n\t\tif (price == null || price.isEmpty()) {\n\t\t\tprice = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.PRICE_PROMOTED);\n\t\t}\n\n\t\tCar result = new Car();\n\t\tresult.setPageId(pageId);\n\t\tresult.setModel(model);\n\t\tresult.setMileage(mileage);\n\t\tresult.setYear(year);\n\t\ttry {\n\t\t\tString[] priceSplitted = price.split(\" \");\n\t\t\tresult.setPrice(priceSplitted[0]);\n\t\t\tresult.setPriceCurrency(priceSplitted[1]);\n\t\t} catch (Exception e) {\n\t\t\tresult.setPrice(price);\n\t\t}\n\t\treturn result;\n\t}",
"@Test\n\tpublic void testDeleteCarById() {\n\t\tSystem.out.println(\"deleteCarById\");\n\t\tint id = 1;\n\t\tResponseEntity<String> expResult = new ResponseEntity<String>(\"OK\", HttpStatus.OK);\n\t\twhen(carService.deleteCarById(id)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<String> result = carController.deleteCarById(id);\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"@Test\n public void testCreateProductShouldCorrect() throws Exception {\n when(productRepository.existsByName(productRequest.getName())).thenReturn(false);\n when(productRepository.save(any(Product.class))).thenReturn(product);\n\n testResponseData(RequestInfo.builder()\n .request(post(PRODUCT_ENDPOINT))\n .token(adminToken)\n .body(productRequest)\n .httpStatus(HttpStatus.OK)\n .build());\n }",
"@PostMapping(\"/postCar\")\n public ResponseEntity<Compacta> postCar(@RequestBody Compacta compacta){\n return compactaService.postCar(compacta);\n }",
"@org.junit.Before\n public void setUp() throws Exception {\n theModel = new Model();\n }",
"public Car() {\r\n super();\r\n }",
"public CarModel registerCar(final CarModel carModel) {\n Optional<Car> carOptional = carRepository.findByCarId(carModel.getCarId());\n\n if (!carOptional.isPresent()) {\n Car carSaved = carRepository.save(Car.builder()\n .driver(getDriverIfExists(carModel.getDriver()))\n .model(carModel.getModel())\n .status(carModel.getStatus())\n .carId(carModel.getCarId()).build());\n\n return CarModel.builder().carId(carSaved.getCarId()).build();\n } else {\n throw new CarAlreadyExistsException(carModel.getCarId());\n }\n }"
] | [
"0.6252448",
"0.62464905",
"0.6091103",
"0.5798638",
"0.57703316",
"0.5763128",
"0.56502175",
"0.558336",
"0.55738795",
"0.55462563",
"0.55167013",
"0.54999214",
"0.5491244",
"0.5464125",
"0.542868",
"0.5412127",
"0.5383346",
"0.5369985",
"0.53689396",
"0.5349909",
"0.5342908",
"0.53302294",
"0.5325652",
"0.5317999",
"0.5300647",
"0.52605987",
"0.52165216",
"0.5212981",
"0.5207071",
"0.52021295",
"0.5156479",
"0.5151822",
"0.51416665",
"0.5132136",
"0.5126628",
"0.5116498",
"0.5111908",
"0.50879836",
"0.5080741",
"0.50705963",
"0.5067183",
"0.50593567",
"0.50439304",
"0.5025751",
"0.5024333",
"0.5019077",
"0.5014307",
"0.5008265",
"0.50058097",
"0.5003631",
"0.49984366",
"0.4981971",
"0.496544",
"0.4904706",
"0.4901264",
"0.4897177",
"0.48831674",
"0.48819807",
"0.487879",
"0.48671892",
"0.48664856",
"0.48612058",
"0.48570827",
"0.48563194",
"0.48551",
"0.48551",
"0.48551",
"0.48551",
"0.48551",
"0.48551",
"0.48551",
"0.48537323",
"0.4853335",
"0.48496324",
"0.48468956",
"0.48467526",
"0.484094",
"0.48383933",
"0.4821453",
"0.4780888",
"0.477422",
"0.47725233",
"0.4769339",
"0.47691703",
"0.47678486",
"0.47647157",
"0.47612506",
"0.4757832",
"0.47552845",
"0.47501957",
"0.47497553",
"0.47497383",
"0.47482285",
"0.47452518",
"0.4740216",
"0.47334862",
"0.4725215",
"0.47248057",
"0.4722711",
"0.4716725"
] | 0.81757593 | 0 |
Test of findCarsByBrand method, of class CarsRestController. | @Test
public void testFindCarsByBrand() {
System.out.println("findCarsByBrand");
String brand = "Ford";
List<CarModel> carList = new ArrayList<CarModel>();
CarModelDTO dto = new CarModelDTO();
CarModel carResult = new CarModel();
carResult.setId(new Integer(1));
carResult.setBrand("Ford");
carResult.setFrom(new Integer(2019));
carResult.setTo(new Integer(2020));
carList.add(carResult);
dto.setCars(carList);
dto.setMessage("OK");
dto.setSuccess(true);
ResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);
when(carService.findCarsByBrand(brand)).thenReturn(expResult);
ReflectionTestUtils.setField(carController, "carService", carService);
ResponseEntity<CarModelDTO> result = carController.findCarsByBrand(brand);
assertEquals(expResult.getStatusCode(), result.getStatusCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Car> findCarsByBrand(String brand){\r\n return repository.findCarsByBrand(brand);\r\n }",
"List<Car> findByBrand(@NonNull String brand);",
"@Test\n\tpublic void testFindAllCars() {\n\t\tSystem.out.println(\"findAllCars\");\n\n\t\tList<CarModel> carList = new ArrayList<CarModel>();\n\t\tCarModelDTO dto = new CarModelDTO();\n\t\tCarModel carResult = new CarModel();\n\t\tcarResult.setId(new Integer(1));\n\t\tcarResult.setBrand(\"Ford\");\n\t\tcarResult.setFrom(new Integer(2019));\n\t\tcarResult.setTo(new Integer(2020));\n\t\tcarList.add(carResult);\n\t\tdto.setCars(carList);\n\t\tdto.setMessage(\"OK\");\n\t\tdto.setSuccess(true);\n\t\tResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);\n\t\twhen(carService.findAllCars()).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<CarModelDTO> result = carController.findAllCars();\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"List<Car> findByBrand(String brand);",
"List<Car> getByBrandAndModel(String brand, String model);",
"List<Car> getByBrandAndColor(String brand, String color);",
"@Test\n public void listBrandsTest() throws ApiException {\n List<BrandReq> response = api.listBrands();\n // TODO: test validations\n }",
"@GetMapping(\"/brand/{brand}\")\n public List<ProductDto> getProductsByBrand(\n @PathVariable(\"brand\") String brand\n ){\n return productService.getProductsByBrand(brand);\n }",
"@GetMapping(value = \"/api/customer/brand/{brand_id}\")\n public ResponseEntity<List<CustomerDTO>> getCustomerByBrandId(@PathVariable Long brand_id) throws NoSuchBrandException, NoSuchCustomerException, NoSuchTestdriveException {\n Set<Customer> customers= customerService.getCustomerByBrandId(brand_id);\n\n Link link = linkTo(methodOn(CustomerController.class).getAllCustomers()).withSelfRel();\n\n List<CustomerDTO> customerDTOS = new ArrayList<>();\n for (Customer entity : customers) {\n Link selfLink = new Link(link.getHref() + \"/\" + entity.getId()).withSelfRel();\n CustomerDTO dto = new CustomerDTO(entity, selfLink);\n customerDTOS.add(dto);\n }\n\n return new ResponseEntity<>(customerDTOS, HttpStatus.OK);\n }",
"public List<Product> findByBrand (ProductBrand brand);",
"@Test\n public void testGetCars() {\n System.out.println(\"getCars\");\n CarController instance = new CarController();\n List<Car> expResult = null;\n List<Car> result = instance.getCars();\n for(Car car: result) {\n System.out.println(car);\n }\n assertTrue(true);\n }",
"@Test\n\tpublic void testGetCarById() {\n\t\tSystem.out.println(\"getCarById\");\n\t\tint carId = 1;\n\t\tList<CarModel> carList = new ArrayList<CarModel>();\n\t\tCarModelDTO dto = new CarModelDTO();\n\t\tCarModel carResult = new CarModel();\n\t\tcarResult.setId(new Integer(1));\n\t\tcarResult.setBrand(\"Ford\");\n\t\tcarResult.setFrom(new Integer(2019));\n\t\tcarResult.setTo(new Integer(2020));\n\t\tcarList.add(carResult);\n\t\tdto.setCars(carList);\n\t\tdto.setMessage(\"OK\");\n\t\tdto.setSuccess(true);\n\t\tResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);\n\t\twhen(carService.findCarById(carId)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<CarModelDTO> result = carController.getCarById(carId);\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"public Product findByBrand(String brand);",
"@Test\n void getAllCarsSuccess() {\n List<Car> cars = carDao.getAll();\n assertNotNull(cars);\n assertEquals(1, cars.size());\n }",
"@Test\n void contextLoads() {\n\n List<BrandEntity> list=brandService.list(new QueryWrapper<BrandEntity>().eq(\"brand_id\",1));\n list.stream().forEach(item->{\n System.out.println(item);\n });\n }",
"@Test\n public void getBrandTest() throws ApiException {\n Integer brandId = null;\n Brand response = api.getBrand(brandId);\n // TODO: test validations\n }",
"@Test\n\tpublic void test() {\n\t\tcar.setUpCar(model, brand, 150, 5);\n\t\tassertEquals(result, car.getBrandAndModel());\n\t}",
"@Test\n public void findAllVehiclesTest() throws ItemNotFoundException {\n controller.findAllVehicles(null,null,null,request,principal);\n verify(vService).findAllVehicles(0,0, principal);\n\n //Test with all default values\n controller.findAllVehicles(null,null,5,request,principal);\n verify(vService).findAllVehicles(0,5, principal);\n\n //Test with all default values\n controller.findAllVehicles(\"car\",null,null,request,principal);\n verify(vService).findAllVehiclesByDisplayName(\"car\",0,0, principal);\n }",
"List<CatalogItem> getAllCatalogItemsByBrand(Long brand_id);",
"public abstract List<CarTO> findCarByModel(String model);",
"@Override\n\tpublic void getAllByBrandName() {\n\t\tfor (int i = 0; i < dto.length; i++) {\n\t\t\tSystem.out.println(dto[i].getBrandName());\n\t\t}\n\n\t}",
"@Test\n void getRequest_params_SuccessfullyReturnsCorrectCars() throws Exception {\n when(autosService.getAutos(anyString(),anyString())).thenReturn(new AutosList(autosList));\n\n mockMvc.perform(get(\"/api/autos?color=red&make=Honda\"))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.autos\", hasSize(5)));\n }",
"@Test\n public void testGetCarById() {\n\n }",
"public List<Car>getAllCars(){\r\n return (List<Car>) repository.findAll();\r\n }",
"@GetMapping(\"/api/rents/findbycar/{id}\")\r\n public ResponseEntity<List<Rent>> findByCar(@PathVariable(name = \"id\") Long id){\r\n final List<Rent> rent = rentService.findByCarId(id);\r\n return rent != null\r\n ? new ResponseEntity<>(rent, HttpStatus.OK)\r\n : new ResponseEntity<>(HttpStatus.NOT_FOUND);\r\n }",
"@Repository\npublic interface CarRepository extends JpaRepository<Car, Integer> {\n\t\n\t/**\n\t * En Car pga unik namn\n\t * @param name Reg. nr.\n\t * @return En Car pga unik namn dvs. reg.nr.\n\t * @author Danijela\n\t */\n\tCar findByName(String name);\n\n\t/**\n\t * Alla bilar pga brand\n\t * @param brandName Volvo, Renault..\n\t * @return En lista av bilar pga brand\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.brandName IN :names\")\n\tList<Car> findByBrand(@Param(\"names\") Collection<String> brandName);\n\n\t/**\n\t * Alla bilar pga brand och model\n\t * @param brandName Volvo, Renault..\n\t * @param model m3, Clio ..\n\t * @return En lista av bilar far pga brand och model\n\t * @author Danijela\n\t */\n\t@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.modelName IN :models\")\n\tList<Car> findAllByBrandAndModel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"models\") Collection<String> model);\n\n\t/**\n\t * Alla bilar som ar biligare an prise som anvandare valde\n\t * @param price Prise som anvandare valde\n\t * @return En lista av bilar som ar biligare an prise som anvandare valde\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.price <= :price\")\n\tList<Car> findByBelowPrice(@Param(\"price\") Integer price);\n\n\t/**\n\t * Alla bilar som har mindre kilometer an den som anvandare valde\n\t * @param kilometer Kilometer som anvandare valde\n\t * @return En lista av bilar som har mindre kilometer an den som anvandare valde\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.kilometer <= :kilometer\")\n\tList<Car> findBelowKilometer(@Param(\"kilometer\") Integer kilometer);\n\n\t/**\n\t * Alla bilar med automatisk eller med manuell vaxel\n\t * @param automatic Automatisk vaxel\n\t * @return List av bilar med automatisk eller en lista med manuell vaxel\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.automatic IN :automatics\")\n\tList<Car> findIsAutomatic(@Param(\"automatics\") boolean automatic);\n\n\t/**\n\t * Alla bilar som man kan eller som man inte kan hyra ut\n\t * @param isRentable Man kan eller inte kan hyra ut bil\n\t * @return Lista av bilar som man kan eller en lista av bilar som man inte kan hyra ut\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.isRentable IN :isRentables\")\n\tList<Car> findAllRentable(@Param(\"isRentables\") boolean isRentable);\n\n\t/**\n\t * Alla bilar som har eller som inte har navigation\n\t * @param navigation Bil har eller inte har navigation\n\t * @return en lista av bilar som har eller en lista av bilar som inte har navigation\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.navigation IN :navigations\")\n\tList<Car> findAllWithNavigation(@Param(\"navigations\") boolean navigation);\n\n\t/**\n\t * Alla nya bilar eller alla begagnade bilar\n\t * @param nya Nya bilar eller begagnade bilar\n\t * @return En lista av nya bilar eller en lista av begagnade bilar\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.isNew IN :nya\")\n\tList<Car> findAllNewCar(@Param(\"nya\") boolean nya);\n\n\t/**\n\t * Alla bilar med samma typ av fuel\n\t * @param fuel Bensin, gas...\n\t * @return En lista av bilar med samma typ av fuel\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.fuel IN :fuels\")\n\tList<Car> findAllCarWithSameFuel(@Param(\"fuels\") String fuel);\n\t/**\n\t * Alla bilar som ar samma brand och anvander sama typ av fuel\n\t * @param brandName Volvo, Renault...\n\t * @param fuel Bensin , gas ..\n\t * @return En lista av bilar som ar samma brand och anvander sama typ av fuel\n\t * @author Danijela\n\t */\n\t@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.fuel IN :fuels\")\n\tList<Car> findAllByBrandAndFuel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"fuels\") Collection<String> fuel);\n\n\t/**\n\t * Alla bilar som ar samma brand, samma typ av model och anvander samma fuel\n\t * @param brandName Volvo, Renault ..\n\t * @param modelName m3, Clio...\n\t * @param fuel Bensin, gas..\n\t * @return En lista av bilar som ar samma brand, samma typ av model och anvander samma fuel\n\t * @author Danijela\n\t */\n\t@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.modelName IN :models AND u.fuel IN :fuels\")\n\tList<Car> findAllByBrandModelAndFuel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"models\") Collection<String> modelName, @Param(\"fuels\") Collection<String> fuel);\n\t/**\n\t * Alla bilar som ar tillverkad samma ar\n\t * @param yearProduce Ar när ar bil tillverkad\n\t * @return En lista av bilar som ar tillverkad samma ar\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.yearProduce IN :years\")\n\tList<Car> findCarsByYear(@Param(\"years\") Integer yearProduce);\n\n\t/**\n\t * Alla bilar som har samma farg\n\t * @param color Farg\n\t * @return En lista av bilar som har samma farg\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE lower (u.color) IN :colors\")\n\tList<Car> findCarsByColor(@Param(\"colors\") String color);\n\n\t/**\n\t * Alla bilar som kom till butik på samma tid\n\t * @param timeStored Tid när bilen kom till butik\n\t * @return En lista av bilar som kom till butik på samma tid\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.timeStored <= :timeStored\")\n\tList<Car> findCarByTimeStored(@Param(\"timeStored\") Date timeStored);\n\n\n\t/**\n\t * Alla bilar som ar samma typ\n\t * @param modelName typ av car, model: m3, Clio...\n\t * @return En lista av bilar som ar samma typ\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.modelName IN :modelNames\")\n\tList<Car> findCarsByModelName(@Param(\"modelNames\") String modelName);\n\n\n\n}",
"@Test\n public void testFindAllProduct() throws Exception {\n // Mock method\n when(productRepository.findAll()).thenReturn(products);\n\n testResponseData(RequestInfo.builder()\n .request(get(PRODUCT_ENDPOINT))\n .token(memberToken)\n .httpStatus(HttpStatus.OK)\n .build());\n }",
"public void testGetBrand() throws Exception {\n brandDao.expects(once()).method(\"getBrand\")\r\n .will(returnValue(new Brand()));\r\n Brand brand = brandManager.getBrand(brandId);\r\n assertTrue(brand != null);\r\n brandDao.verify();\r\n }",
"@Test\n public void findAll() throws Exception {\n\n MvcResult result = mockMvc.perform(get(\"/v1/chamados\"))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON))\n .andReturn();\n List<ChamadoDTO> chamados = asList(objectMapper.readValue(result.getResponse().getContentAsString(), ChamadoDTO[].class));\n for (ChamadoDTO c : chamados) {\n assertNotNull(c.getIdChamado());\n assertNotNull(c.getDescChamado());\n assertNotNull(c.getDescTituloChamado());\n assertNotNull(c.getStatusChamado());\n assertNotNull(c.getStatusChamado().getCodStatusChamado());\n assertNotNull(c.getStatusChamado().getDescStatusChamado());\n assertNotNull(c.getDataHoraInclusao());\n }\n }",
"@Test\n void findAll_API_TEST() throws Exception {\n\n //TEST DATA\n Pet pet_1 = new Pet();\n pet_1.setId(1);\n pet_1.setName(\"John\");\n\n Pet pet_2 = new Pet();\n pet_2.setId(2);\n pet_2.setName(\"John\");\n\n Pet pet_3 = new Pet();\n pet_3.setId(3);\n pet_3.setName(\"John\");\n\n given(petService.findAll()).willReturn(asList(pet_1, pet_2, pet_3));\n mvc.perform(get(\"/owners/*/pets\").accept(MediaType.APPLICATION_JSON))\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$[0].id\").value(1))\n .andExpect(jsonPath(\"$[1].id\").value(2))\n .andExpect(jsonPath(\"$[2].id\").value(3));\n\n }",
"public ArrayList<CarDetail> gettingAllAvailableCars() throws Exception;",
"@Test\n\tpublic void testFindBrandByGuidWithMoreThanOneReturn() {\n\t\tfinal List<Brand> brands = new ArrayList<Brand>();\n\t\tBrand brand = new BrandImpl();\n\t\tbrands.add(brand);\n\t\tbrands.add(brand);\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(getMockPersistenceEngine()).retrieveByNamedQuery(with(any(String.class)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(brands));\n\t\t\t}\n\t\t});\n\t\ttry {\n\t\t\tthis.importGuidHelper.findBrandByGuidAndCatalogGuid(SOME_GUID, CATALOG_CODE);\n\t\t\tfail(EP_SERVICE_EXCEPTION_EXPECTED);\n\t\t} catch (EpServiceException e) {\n\t\t\t// succeed!\n\t\t\tassertNotNull(e);\n\t\t}\n\t}",
"@Test\n\t// @Disabled\n\tvoid testViewCustomerbyVehicleType() {\n\t\tCustomer customer1 = new Customer(1, \"tommy\", \"cruise\", \"951771122\", \"[email protected]\");\n\t\tVehicle vehicle1 = new Vehicle(101, \"TN02J0666\", \"car\", \"A/C\", \"prime\", \"goa\", \"13\", 600.0, 8000.0);\n\t\tVehicle vehicle2 = new Vehicle(102, \"TN02J0666\", \"car\", \"A/C\", \"prime\", \"goa\", \"13\", 600.0, 8000.0);\n\t\tList<Vehicle> vehicleList =new ArrayList<>();\n\t\tvehicleList.add(vehicle1);\n\t\tvehicleList.add(vehicle2);\n\t\tcustomer1.setVehicle(vehicleList);\n\t\tList<Customer> customerList = new ArrayList<>();\n\t\tcustomerList.add(customer1);\n\t\tMockito.when(custRep.findbyType(\"car\")).thenReturn(customerList);\n\t\tList<Customer> cust3 = custService.findbyType(\"car\");\n\t\tassertEquals(1, cust3.size());\n\t}",
"@GetMapping\n @RequestMapping(\"v2\")\n public String getAllCars(){\n String carName=carRepository.findCardWithinYear(\"1920\");\n return \"The car is: \"+carName;\n }",
"List<Car> getByBrandOrderByYearAsc(String brand);",
"@Test\n public void testSearchExamples() throws Exception{\n this.mockMvc.perform(get(\"/api/example/search\").param(\"name\", \"\"))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.content\", hasSize(3)));\n \n //fetching registries with '2' on the name\n this.mockMvc.perform(get(\"/api/example/search\").param(\"name\", \"2\"))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.content\", hasSize(1)));\n }",
"@ModelAttribute(\"brandList\")\r\n\tpublic List<BrandTO> getBrand(){\r\n\t\treturn searchService.getAllBrand();\r\n\t}",
"@Query(\"select c from Car c where c.brand = ?1\")\r\n\t\r\n\t// get by brand\r\n\tList<Car> getByBrand(String brand);",
"@Test\n public void getBrandAppsTest() throws ApiException {\n Integer brandId = null;\n List<BrandApp> response = api.getBrandApps(brandId);\n // TODO: test validations\n }",
"@Test\n public void whenFindingCustomersItShouldReturnAllCustomers() {\n given(repository.findAll()).willReturn(Arrays.asList(CUSTOMER1, CUSTOMER2));\n // When looking for all customers, it should contain only CUSTOMER1 and CUSTOMER2\n assertThat(controller.findCustomers()).containsOnly(CUSTOMER1,CUSTOMER2);\n }",
"@Test\n\tpublic void testFindBrandByGuidWithOneReturn() {\n\t\tfinal List<Brand> brands = new ArrayList<Brand>();\n\t\tBrand brand = new BrandImpl();\n\t\tbrands.add(brand);\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(getMockPersistenceEngine()).retrieveByNamedQuery(with(any(String.class)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(brands));\n\t\t\t}\n\t\t});\n\t\tassertSame(brand, this.importGuidHelper.findBrandByGuidAndCatalogGuid(SOME_GUID, CATALOG_CODE));\n\t}",
"@Test\n public void testGetAllUsesOfMetsDocument() throws Exception {\n System.out.println(\"getAllUsesOfMetsDocument\");\n String resourceId = \"id_0015\";\n String items[] = {\"OCR-D-GT-IMG-BIN\", \"OCR-D-GT-IMG-CROP\", \"OCR-D-GT-IMG-DESPEC\", \"OCR-D-GT-IMG-DEWARP\"};\n\n this.mockMvc.perform(get(\"/api/v1/metastore/mets/\" + resourceId + \"/use\"))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(MockMvcResultMatchers.jsonPath(\"$\", Matchers.hasSize(4)))\n .andExpect(MockMvcResultMatchers.jsonPath(\"$.[*]\", Matchers.hasItems(items)))\n .andReturn();\n }",
"@Test\n public void testListCustomers() throws Exception{\n List<Customer> customers = new ArrayList<>();\n customers.add(new Customer());\n customers.add(new Customer());\n\n when(customerService.listAll()).thenReturn((List) customers);\n\n mockMvc.perform(get(\"/customers\"))\n .andExpect(status().isOk())\n .andExpect(view().name(\"customer/customers\"))\n .andExpect(model().attribute(\"customers\", hasSize(2)));\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"@Test\n public void testGetAllRecipes() throws Exception {\n System.out.println(\"getAllRecipesREST\");\n given()\n .contentType(\"application/json\")\n .accept(ContentType.JSON)\n .when()\n .get(\"/recipes/all\")\n .then()\n .statusCode(200).assertThat().body(\"[0]\", equalTo(\"Slow cooker spicy chicken and bean soup\"));\n \n }",
"@Override\n\tpublic List<Brand> listBrand() {\n\t\treturn goodsDao.listBrand();\n\t}",
"@Test\r\n\tpublic void testGetAllVendors() throws Exception {\r\n\t\t// when\r\n\t\tMockHttpServletResponse response = mvc.perform(\r\n\t\t\tget(\"/vendors\")\r\n\t\t\t\t.accept(MediaType.APPLICATION_JSON))\r\n\t\t\t.andReturn().getResponse();\r\n\r\n\t\t// then\r\n\t\tassertEquals(response.getStatus(), HttpStatus.OK.value());\r\n\r\n\t\tString content = response.getContentAsString();\r\n\t\tVendor[] vendors = gson.fromJson(content, Vendor[].class);\r\n\t\tassertTrue(vendors.length == 0);\r\n\r\n\t}",
"List<Car> findByColor(String color);",
"@Test\n\tpublic void testVendorGetAll() {\n\t\tJsonResponse jr = null;\n\t\tjr = vendorCont.getAll();\n\t\tassertNotNull(jr);\n\t}",
"@Test\n\tpublic void searchForDriversByWillowPlate_FuncTest(){ \n\t\tList<DriverSearchVO> drivers = driverService.searchDriver(null, null, null, null, null, null, null, willowPlate, true,null, null, null);\t\n\t\tlong driversCnt = driverService.searchDriverCount(null, null, null, null, null, null, null, willowPlate, true,null);\n\t\t\n\t\t// we get back results of the same length as the list returned\n\t\tassertEquals(drivers.size(), driversCnt);\n\t\t\n\t\t// the list is greater than 0\n\t\tassertTrue(driversCnt > 0);\t\t\t\n\t}",
"@Test\n public void testGetAllProducts() throws Exception {\n when(repository.findAll()).thenReturn(Collections.singletonList(this.product));\n\n assertEquals(Collections.singletonList(this.product), service.getAllProducts());\n }",
"@Test\n void shouldReturnAllPersonsValidatingJsonResponse() throws Exception {\n when(personDao.findAll()).thenReturn(Arrays.asList(testPersons()));\n\n mockMvc.perform(get(\"/api/person\")).andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.items[0].firstName\", is(\"Jan\")))\n .andExpect(jsonPath(\"$.items[0].lastName\", is(\"Janssen\")))\n .andExpect(jsonPath(\"$.items[1].firstName\", is(\"Pieter\")))\n .andExpect(jsonPath(\"$.items[1].lastName\", is(\"Pietersen\")))\n .andExpect(jsonPath(\"$.items[2].firstName\", is(\"Erik\")))\n .andExpect(jsonPath(\"$.items[2].lastName\", is(\"Eriksen\")))\n ;\n }",
"@Test\n\tpublic void givenVendors_whenGetVendors_thenReturnJsonArray()\n\t throws Exception {\n\t \n\t Vendor vendor1 = new Vendor(\"Rackspace\",\"Produts\",\"18/09/2011\",\"10/05/2013\",25,1000.00,\"Inactive\",\"Bangalore\");\n\t Vendor vendor2 = new Vendor(\"Infoglen\",\"Services\",\"18/09/2011\",\"10/05/2013\",25,1000.00,\"Inactive\",\"Bangalore\");\n\t \n\t ArrayList<Vendor> allVendors = new ArrayList<Vendor>();\n\t allVendors.add(vendor1);\n\t allVendors.add(vendor2);\n\t \n\t when(vendorService.findAll()).thenReturn((ArrayList<Vendor>) allVendors);\n\t \n\t mvc.perform(get(\"/vendor/getAllVendors\")\n\t .contentType(MediaType.APPLICATION_JSON))\n\t .andExpect(status().isOk())\n\t .andExpect(jsonPath(\"$\", hasSize(2)))\n\t .andExpect(jsonPath(\"$[1].name\", is(vendor2.getName())));\n\t \n}",
"@Test\r\n\tpublic void findAllMaterialCategoryTest() {\r\n\t\t// Your Code Here\r\n\r\n\t}",
"@GetMapping()\n public Iterable<Customer> getCustomers(CustomerSpec spec){\n return customerRepository.findAll(spec);\n }",
"public Car findCarByName(String name){\r\n return repository.findCarByName(name);\r\n }",
"@Test\n public void bmwFilter() {\n MainPage mainPage = new MainPage(driver);\n mainPage.getBWMFilter().click();\n assertTrue(mainPage.getSelectContainer().getText().contains(filterData), \"Filter does not contains \" + filterData);\n SeleniumUtils.waitUntilElementIsReload(driver, mainPage.getCarName());\n SeleniumUtils.waitForTextToAppear(driver, filterData, mainPage.getCarName());\n List<Car> cars = mainPage.getCarItems();\n for (int i=0; i<=cars.size()-1; i++){\n Car car = cars.get(i);\n assertTrue(!car.getCarNameData().getText().isEmpty(), \"Car \" + i + \" not contains \" + filterData);\n assertTrue(car.getCarNameData().getText().contains(filterData), \"Car \" + i + \" not contains \" + filterData);\n assertTrue(car.getCarImageData().isDisplayed(), \"Car \" + i + \" image is not displayed\");\n assertTrue(car.getCarImageData().getAttribute(\"src\").contains(\".jpeg\"), \"Car \" + i + \" image is not jpeg\");\n assertTrue(!car.getStockNumberData().getText().isEmpty(), \"Car \" + i + \" stock number is empty\");\n assertTrue(!car.getMileageData().getText().isEmpty(), \"Car \" + i + \" mileage is empty\");\n assertTrue(!car.getFirstRegistrationData().getText().isEmpty(), \"Car \" + i + \" first registration is empty\");\n assertTrue(!car.getHorsePowerData().getText().isEmpty(), \"Car \" + i + \" horsepower is empty\");\n assertTrue(!car.getBodyTypeData().getText().isEmpty(), \"Car \" + i + \" body type is empty\");\n assertTrue(!car.getFuelTypeData().getText().isEmpty(), \"Car \" + i + \" fuel type is empty\");\n assertTrue(!car.getGearBoxData().getText().isEmpty(), \"Car \" + i + \" gear box is empty\");\n }\n }",
"@Test\n\tpublic void testGetAllResourcesByCategory() throws ResourceNotFoundException\n\t{\n\t\tLocalDate resDate = null;\n\t\t\n\t\tCategory cat = new Category();\n\t\tcat.setCatId(10);\n\t\tcat.setCatName(\"Clothing\");\n\t\t\n\t\tResource res = new Resource();\n\t\tres.setResId(10);\n\t\tres.setResDate(resDate);\n\t\tres.setCategory(cat);\n\t\tres.setResDescription(\"100% Cotton\");\n\t\tres.setResTitle(\"Shirt\");\n\t\tres.setResPrice(1000);\n\t\t\n\t\tList<Resource> resources = new ArrayList<>();\n\t\tresources.add(res);\n\t\tMockito.when(resourceRepository.findByCategory(10)).thenReturn(resources);\n\t\tList<Resource> actualResource = resourceService.getAllResourcesByCategory(10);\n\t\tassertEquals(10,actualResource.get(0).getCategory().getCatId());\n\t\t\n\t}",
"@Test\n void getByPropertyLikeSuccess() {\n List<Car> carList = carDao.getByPropertyLike(\"make\",\"Je\") ;\n assertEquals(1, carList.size());\n }",
"@Test\n\tpublic void testSearchCategory() throws Exception {\n\n\t\tCategorySearchResponse categoryResponse = new CategorySearchResponse();\n\t\tList<CategorySearch> categories = new ArrayList<>();\n\t\tCategorySearch category = new CategorySearch();\n\t\tcategory.setTenantId(\"default\");\n\n\t\tAuditDetails auditDetails = new AuditDetails();\n\t\tcategory.setAuditDetails(auditDetails);\n\n\t\tcategories.add(category);\n\n\t\tcategoryResponse.setResponseInfo(new ResponseInfo());\n\t\tcategoryResponse.setCategories(categories);\n\n\t\ttry {\n\n\t\t\twhen(categoryService.getCategoryMaster(any(RequestInfo.class), any(String.class), any(Integer[].class),\n\t\t\t\t\tany(String.class), any(String.class), any(String.class), any(String.class), any(String.class), any(Integer.class),\n\t\t\t\t\tany(String.class), any(String.class), any(Integer.class), any(Integer.class), any(Integer.class))).thenReturn(categoryResponse);\n\n\t\t\tmockMvc.perform(post(\"/category/v1/_search\").param(\"tenantId\", \"default\").param(\"type\", \"SUBCATEGORY\")\n\t\t\t\t\t.contentType(MediaType.APPLICATION_JSON).content(getFileContents(\"categorySearchRequest.json\")))\n\t\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t\t.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n\t\t\t\t\t.andExpect(content().json(getFileContents(\"categorySearchResponse.json\")));\n\n\t\t} catch (Exception e) {\n\t\t\tassertTrue(Boolean.FALSE);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertTrue(Boolean.TRUE);\n\n\t}",
"@Test\n public void getAllCustomer() {\n Customer customer1 = new Customer();\n customer1.setFirstName(\"Dominick\");\n customer1.setLastName(\"DeChristofaro\");\n customer1.setEmail(\"[email protected]\");\n customer1.setCompany(\"Omni\");\n customer1.setPhone(\"999-999-9999\");\n customer1 = service.saveCustomer(customer1);\n\n // Add a second Customer to the mock database (customer2)\n Customer customer2 = new Customer();\n customer2.setFirstName(\"Michael\");\n customer2.setLastName(\"Stuckey\");\n customer2.setEmail(\"[email protected]\");\n customer2.setCompany(\"NuclearFuelServices\");\n customer2.setPhone(\"222-222-2222\");\n customer2 = service.saveCustomer(customer2);\n\n // Collect all the customers into a list using the Customer API\n List<Customer> customerList = service.findAllCustomers();\n\n // Test the getAllCustomer() API method\n TestCase.assertEquals(2,customerList.size());\n TestCase.assertEquals(customer1, customerList.get(0));\n TestCase.assertEquals(customer2, customerList.get(1));\n }",
"@Test\n\t// @Disabled\n\tvoid testViewAllCustomer() {\n\t\tCustomer customer1 = new Customer(1, \"tom\", \"son\", \"951771122\", \"[email protected]\");\n\t\tCustomer customer2 = new Customer(2, \"jerry\", \"lee\", \"951998122\", \"[email protected]\");\n\t\tList<Customer> customerList = new ArrayList<>();\n\t\tcustomerList.add(customer1);\n\t\tcustomerList.add(customer2);\n\t\tMockito.when(custRep.findAll()).thenReturn(customerList);\n\t\tList<Customer> customer = custService.findAllCustomer();\n\t\tassertEquals(2, customer.size());\n\t}",
"List<CatalogItem> getAllCatalogItemsFiltered(Long brand_id, Long type_id);",
"@Test\n public void testCreateCars() throws Exception {\n Car car = carService.generateACarObject();\n testCreateCars(new ElectricCar(car)); // Test to see if electric cars are saved right!\n testCreateCars(new GasCar(car)); // Test to see if gas cars are saved right!\n testCreateCars(new DieselCar(car)); // Test to see if diesel cars are saved right!\n }",
"public interface IBrandService {\r\n\r\n List<Brand> getAllBrand();\r\n}",
"@Test\n void getCategories() throws Exception {\n CategoryItemResponse categoryItemResponse = generateCategoryItemResponse();\n\n when(categoryService.getAllCategories()).thenReturn(Arrays.asList(categoryItemResponse));\n\n MvcResult mvcResult = mockMvc.perform(get(PATH + \"/get\")\n .contentType(MediaType.APPLICATION_JSON))\n .andExpect(status().is2xxSuccessful())\n .andReturn();\n\n List<CategoryItemResponse> response = objectMapper.readValue(mvcResult.getResponse().getContentAsString(), List.class);\n\n assertNotNull(response);\n assertFalse(response.isEmpty());\n verify(categoryService, times(1)).getAllCategories();\n }",
"@Test\n\t// @Disabled\n\tvoid testViewCustomerbyVehicleLocation() {\n\n\t\tCustomer customer1 = new Customer(1, \"tommy\", \"cruise\", \"951771122\", \"[email protected]\");\n\t\tVehicle vehicle1 = new Vehicle(101, \"TN02J0666\", \"bus\", \"A/C\", \"prime\", \"chennai\", \"13\", 600.0, 8000.0);\n\t\tVehicle vehicle2 = new Vehicle(102, \"TN02J0776\", \"car\", \"nonA/C\", \"prime\", \"chennai\", \"13\", 600.0, 8000.0);\n\t\tList<Vehicle> vehicleList =new ArrayList<>();\n\t\tvehicleList.add(vehicle1);\n\t\tvehicleList.add(vehicle2);\n\t\tcustomer1.setVehicle(vehicleList);\n\t\tList<Customer> customerList = new ArrayList<>();\n\t\tcustomerList.add(customer1);\n\t\tMockito.when(custRep.findbyVehicleLocation(\"chennai\")).thenReturn(customerList);\n\t\tList<Customer> cust3 = custService.findbyVehicleLocation(\"chennai\");\n\t\tassertEquals(1, cust3.size());\n\t}",
"@Override\r\n\tpublic List<Brand> selectBrand() {\n\t\treturn gd.selectBrand();\r\n\t}",
"@Test\n public void shouldCreateCabrioWhenSummer() {\n CarSettlement.getSeasonAndTime(\"lato\", true);\n ApplicationContext context = new AnnotationConfigApplicationContext(\"com.kodilla.spring\");\n Car car = (Car) context.getBean(\"seasonCar\");\n //When\n String whichCar = car.getCarType();\n //Then\n Assertions.assertEquals(\"Cabrio\", whichCar);\n }",
"@Test\n void getCartCategories() throws Exception {\n CartCategoryItem cartCategoryItem = generateCartCategoryItem();\n\n when(categoryService.getAllCartCategoryItems()).thenReturn(Arrays.asList(cartCategoryItem));\n\n MvcResult mvcResult = mockMvc.perform(get(PATH + \"/get/carts\")\n .contentType(MediaType.APPLICATION_JSON))\n .andExpect(status().is2xxSuccessful())\n .andReturn();\n\n CartCategoryItemResponse response = objectMapper.readValue(mvcResult.getResponse().getContentAsString(), CartCategoryItemResponse.class);\n\n assertNotNull(response);\n assertFalse(response.getCartCategoryItems().isEmpty());\n assertNull(response.getErrorMessage());\n verify(categoryService, times(1)).getAllCartCategoryItems();\n }",
"@Test\n public void ShouldFindbyCategory() {\n Recipe curry = new Recipe();\n curry.setCategory(\"curry\");\n Recipe curryOne = new Recipe();\n curryOne.setCategory(\"curry\");\n Recipe breakfast = new Recipe();\n breakfast.setCategory(\"breakfast\");\n recipesRepository.save(curry);\n recipesRepository.save(curryOne);\n recipesRepository.save(breakfast);\n\n // When I check for curries\n List<Recipe> curries = recipesRepository.findByCategory(\"curry\");\n\n // Then only curries are returned\n assertThat(curries).containsExactly(curry, curryOne);\n }",
"@Test\n\tpublic void testDeleteCarById() {\n\t\tSystem.out.println(\"deleteCarById\");\n\t\tint id = 1;\n\t\tResponseEntity<String> expResult = new ResponseEntity<String>(\"OK\", HttpStatus.OK);\n\t\twhen(carService.deleteCarById(id)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<String> result = carController.deleteCarById(id);\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"@Test\n @Transactional\n public void searchTipoDeMarcacao() throws Exception {\n tipoDeMarcacaoRepository.saveAndFlush(tipoDeMarcacao);\n when(mockTipoDeMarcacaoSearchRepository.search(queryStringQuery(\"id:\" + tipoDeMarcacao.getId()), PageRequest.of(0, 20)))\n .thenReturn(new PageImpl<>(Collections.singletonList(tipoDeMarcacao), PageRequest.of(0, 1), 1));\n\n // Search the tipoDeMarcacao\n restTipoDeMarcacaoMockMvc.perform(get(\"/api/_search/tipo-de-marcacaos?query=id:\" + tipoDeMarcacao.getId()))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(tipoDeMarcacao.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].nome\").value(hasItem(DEFAULT_NOME)))\n .andExpect(jsonPath(\"$.[*].ativo\").value(hasItem(DEFAULT_ATIVO.booleanValue())));\n }",
"@Ignore\n\tpublic void searchForDriversByTALPlate_FuncTest(){ \n\t\tList<DriverSearchVO> drivers = driverService.searchDriver(null, null, null, null, null, null, null, talPlate, false, null, null, null);\t\n\t\tlong driversCnt = driverService.searchDriverCount(null, null, null, null, null, null, null, talPlate, false, null);\n\t\t\n\t\t// we get back results of the same length as the list returned\n\t\tassertEquals(drivers.size(), driversCnt);\n\t\t\n\t\t// the list is greater than 0\n\t\tassertTrue(driversCnt > 0);\t\t\t\n\t}",
"private void setCarList(){\n List<com.drife.digitaf.ORM.Database.CarModel> models = new ArrayList<>();\n\n if(nonPackageGrouping != null && nonPackageGrouping.size()>0){\n //cars = CarController.getAllAvailableCarInPackage(nonPackageGrouping.get(0).getCategoryGroupId());\n for (int i=0; i<nonPackageGrouping.size(); i++){\n List<com.drife.digitaf.ORM.Database.CarModel> carModels = CarController.getAllAvailableCarInPackage(nonPackageGrouping.get(i).getCategoryGroupId());\n for (int j=0; j<carModels.size(); j++){\n com.drife.digitaf.ORM.Database.CarModel model = carModels.get(j);\n models.add(model);\n }\n }\n }\n\n TextUtility.sortCar(models);\n\n for (int i=0; i<models.size(); i++){\n com.drife.digitaf.ORM.Database.CarModel model = models.get(i);\n String car = model.getCarName();\n if(!carModel.contains(car)){\n carModel.add(car);\n cars.add(model);\n }\n }\n\n /*for (int i=0; i<cars.size(); i++){\n com.drife.digitaf.ORM.Database.CarModel carModel = cars.get(i);\n String model = carModel.getCarName();\n this.carModel.add(model);\n }*/\n\n atModel.setAdapter(new ArrayAdapter<com.drife.digitaf.ORM.Database.CarModel>(this, android.R.layout.simple_list_item_1, this.cars));\n\n //SpinnerUtility.setSpinnerItem(getApplicationContext(), spinModel, this.carModel);\n }",
"public List findcateListBybrand(TGBrand gbrand) {\n\t\t\n\t\treturn gbrandcateDao.findcateListBybrand(gbrand);\n\t}",
"@Query(value = \"SELECT c.id, c.name FROM city c WHERE c.countryId = ?1 AND\" +\n\t\t\t\" EXISTS (SELECT * FROM scan s WHERE s.cityId = c.id AND s.brandId = ?2)\",\n\t\t\tnativeQuery = true)\n\tList<Object[]> getCitiesByCountryAndBrand(int countryId, int brandId);",
"@Test\n public void findByCustomerTest() {\n Set<Reservation> expected = new HashSet<>();\n expected.add(reservation1);\n expected.add(reservation2);\n Mockito.when(reservationDao.findByCustomerId(Mockito.anyLong())).thenReturn(expected);\n Collection<Reservation> result = reservationService.findByCustomer(10L);\n Assert.assertEquals(result.size(), 2);\n Assert.assertTrue(result.contains(reservation1));\n Assert.assertTrue(result.contains(reservation2));\n }",
"public void setBrand(String brand) {\n this.brand = brand;\n }",
"public void setBrand(String brand) {\n this.brand = brand;\n }",
"@Override\n public Page<BrandDTO> findAll(Pageable pageable) {\n log.debug(\"Request to get all Brands\");\n return brandRepository.findAll(pageable)\n .map(brandMapper::toDto);\n }",
"@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.modelName IN :models\")\n\tList<Car> findAllByBrandAndModel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"models\") Collection<String> model);",
"public interface CarRepository extends CrudRepository<CarDO, Long> {\n\n List<CarDO> findByDeletedFalse();\n\n List<CarDO> findByEngineType(EngineType engineType);\n}",
"@Override\n\tpublic ArrayList<Carpo> getAllCars() {\n\t\treturn inList.getAll();\n\t}",
"@Test\n\t\tpublic void listBeers() {\n\t\t\tCollection<Beer> allBeers = beerSvc.getAll();\n\t\t\tAssert.assertNotNull(allBeers);\n\t\t}",
"@Test\n public void testFindAll() {\n final WebTarget target = target().\n path(\"category\");\n\n Response response = target.request(MediaType.APPLICATION_JSON_TYPE).get();\n\n assertEquals(200, response.getStatus());\n List<Category> categories = response.readEntity(new GenericType<List<Category>>() {});\n assertTrue(categories.size() > 0);\n \n response = target.request(MediaType.APPLICATION_XML_TYPE).get();\n assertEquals(200, response.getStatus());\n }",
"@Test\n public void testGetAllFilesOfMetsDocument() throws Exception {\n System.out.println(\"getAllFilesOfMetsDocument\");\n String resourceId = \"id_0002\";\n\n this.mockMvc.perform(get(\"/api/v1/metastore/mets/\" + resourceId + \"/files\"))//\"/api/v1/metastore/mets/\" + resourceId + \"/files\"))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(MockMvcResultMatchers.jsonPath(\"$\", Matchers.hasSize(12)))\n .andExpect(MockMvcResultMatchers.jsonPath(\"$.[*].resourceId\", Matchers.hasItem(resourceId)))\n .andReturn();\n }",
"@Test\n\tpublic void testSearchCategoryDetails() throws Exception {\n\n\t\tCategorySearchResponse categoryResponse = new CategorySearchResponse();\n\t\tList<CategorySearch> categories = new ArrayList<>();\n\t\tCategorySearch category = new CategorySearch();\n\t\tcategory.setTenantId(\"default\");\n\t\tcategory.setParentId(Long.parseLong(\"2\"));\n\n\t\tAuditDetails auditDetails = new AuditDetails();\n\t\tcategory.setAuditDetails(auditDetails);\n\n\t\tcategories.add(category);\n\t\tCategoryDetailSearch details = new CategoryDetailSearch();\n\t\tdetails.setId(Long.valueOf(5));\n\t\tdetails.setCategoryId(Long.valueOf(10));\n\t\tdetails.setFeeType(FeeTypeEnum.fromValue(\"License\"));\n\t\tdetails.setRateType(RateTypeEnum.fromValue(\"Flat_By_Percentage\"));\n\t\tdetails.setUomId(Long.valueOf(1));\n\n\t\tList<CategoryDetailSearch> catDetails = new ArrayList<CategoryDetailSearch>();\n\t\tcatDetails.add(details);\n\t\tcategory.setDetails(catDetails);\n\t\tcategoryResponse.setResponseInfo(new ResponseInfo());\n\t\tcategoryResponse.setCategories(categories);\n\n\t\ttry {\n\n\t\t\twhen(categoryService.getCategoryMaster(any(RequestInfo.class), any(String.class), any(Integer[].class),\n\t\t\t\t\tany(String.class), any(String.class), any(String.class), any(String.class), any(String.class), any(Integer.class),\n\t\t\t\t\tany(String.class), any(String.class), any(Integer.class), any(Integer.class), any(Integer.class))).thenReturn(categoryResponse);\n\n\t\t\tmockMvc.perform(post(\"/category/v1/_search\").param(\"tenantId\", \"default\").param(\"type\", \"SUBCATEGORY\")\n\t\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t\t.content(getFileContents(\"categoryDetailsSearchRequest.json\"))).andExpect(status().isOk())\n\t\t\t\t\t.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n\t\t\t\t\t.andExpect(content().json(getFileContents(\"categoryDetailsSearchResponse.json\")));\n\n\t\t} catch (Exception e) {\n\t\t\tassertTrue(Boolean.FALSE);\n\t\t\te.printStackTrace();\n\t\t}\n\t\tassertTrue(Boolean.TRUE);\n\n\t}",
"private void defaultCustomerShouldBeFound(String filter) throws Exception {\n restCustomerMockMvc.perform(get(\"/api/customers?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(customer.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME.toString())))\n .andExpect(jsonPath(\"$.[*].address\").value(hasItem(DEFAULT_ADDRESS.toString())))\n .andExpect(jsonPath(\"$.[*].licenseid\").value(hasItem(DEFAULT_LICENSEID)));\n }",
"@Test\n public void testGetAllLocations() throws Exception {\n\n mockMvc.perform(get(URL_PREFIX + \"/all\"))\n .andExpect(status().isOk())\n .andExpect(content().contentType(contentType))\n .andExpect(jsonPath(\"$\", hasSize(DB_LOCATION_NUMBER)))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(DB_LOCATION_ID.intValue())))\n .andExpect(jsonPath(\"$.[*].city\").value(hasItem(DB_LOCATION_CITY)))\n .andExpect(jsonPath(\"$.[*].cityArea\").value(hasItem(DB_LOCATION_CITY_AREA)))\n .andExpect(jsonPath(\"$.[*].street\").value(hasItem(DB_LOCATION_STREET)))\n .andExpect(jsonPath(\"$.[*].streetNumber\").value(hasItem(DB_LOCATION_STREET_NUMBER)))\n .andExpect(jsonPath(\"$.[*].state\").value(hasItem(DB_LOCATION_STATE)));\n }",
"@Test\n\tvoid findDoctorTest() throws Exception {\n\t\tList<DoctorDetail> doctorDetail = new ArrayList<>();\n\t\tDoctorDetail doctorfind = new DoctorDetail();\n\t\tdoctorfind.setSpecialist(\"cardioc\");\n\t\tdoReturn(doctorDetail).when(doctorServiceImplementation).doctors(doctorfind.getSpecialist());\n\t\tmockMvc.perform(get(\"/doctor/find?specialist=/{specialist}\", \"cardioc\")).andExpect(status().isOk());\n\t}",
"@Test\n @OperateOnDeployment(\"server\")\n public void shouldGetResourceByQuery() {\n given().header(\"Authorization\", \"Bearer access_token\").expect().statusCode(200).and().expect().body(\"size\",\n equalTo(1)).and().expect().body(\"items.item.name\", hasItem(\"Technologies\")).and().expect().body(\"items.item.sort\",\n hasItem(20)).when().get(getBaseTestUrl() + \"/1/categories/get/json/query;catName=Technologies?expand=\" +\n \"{\\\"branches\\\":[{\\\"trunk\\\":{\\\"name\\\":\\\"categories\\\"}}]})\");\n }",
"@Test\n\tpublic void testGetAllCompaniesApi() {\n\t\tCompany company = new Company(\"DataSolutions1\", \"Marthahalli1\",\n\t\t\t\t\"Bangalore\", \"India\", \"9880440671\");\n\t\tcompany = companyRepository.save(company);\n\n\t\tCompany company1 = new Company(\"DataSolutions2\", \"Marthahalli2\",\n\t\t\t\t\"Chennai\", \"India\", \"9882440671\");\n\t\tcompany1 = companyRepository.save(company1);\n\n\t\t// Invoke the API\n\t\tCompany[] apiResponse = restTemplate.getForObject(\n\t\t\t\t\"http://localhost:8888/companies/\", Company[].class);\n\n\t\tassertEquals(2, apiResponse.length);\n\n\t\t// Delete the test data created\n\t\tcompanyRepository.delete(company.getCompanyId());\n\t\tcompanyRepository.delete(company1.getCompanyId());\n\t}",
"List<RiceCooker> getByFilter(String keySearch, String brands, Double priceFrom, Double priceTo,\n\t\t\tlong startRow, long maxRows);",
"@Test\n public void testSearchResultsLoad() throws Exception {\n mockMvc.perform(post(\"/search/results\")\n .param(\"searchType\", \"all\")\n .param(\"searchTerm\", \"asdf\"))\n .andExpect(status().isOk());\n }",
"@Test\n\tpublic void test_get_product_pagination_return_200() throws Exception {\n\t\tPrincipal mockPrincipal = Mockito.mock(Principal.class);\n\t\tMockito.when(mockPrincipal.getName()).thenReturn(\"1\");\n\t\tProductDTO expected = DummyData.getProductDto1();\n\t\tMockHttpServletRequestBuilder mockRequest = MockMvcRequestBuilders.request(HttpMethod.GET, \"/?name=Gucci&brand=gucci&color=blue&priceFrom=400&priceTo=500&sort=name,asc&page=0&size=10\")\n\t\t\t\t.principal(mockPrincipal)\n\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON);\n\n\t\t// Setup when\n\t\twhen(productService.getProductPage(ArgumentMatchers.any(), ArgumentMatchers.any())).thenReturn(Arrays.asList(expected));\n\t\t\n\t\t// Execute the POST request\n\t\tmockMvc.perform(mockRequest)\n\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t// Validate the response code and content type\n\t\t\t\t.andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON))\n\t\t\t\t// Validate the returned fields\n\t\t\t\t.andExpect(jsonPath(\"$\").isArray())\n\t\t\t\t.andExpect(jsonPath(\"$[0].brand\", Is.is(expected.getBrand())))\n\t\t\t\t.andExpect(jsonPath(\"$[0].color\", Is.is(expected.getColor())))\n\t\t\t\t.andExpect(jsonPath(\"$[0].name\", Is.is(expected.getName()))).andReturn();\n\n\t\t// verify\n\t\tverify(productService).getProductPage(ArgumentMatchers.any(), ArgumentMatchers.any());\n\t}",
"public abstract List<CarTO> listAll();",
"@Test\n public void testGetAllPageIdsOfMetsDocument() throws Exception {\n System.out.println(\"getAllPageIdsOfMetsDocument\");\n String resourceId = \"id_0017\";\n String items[] = {\"PAGE-0001\", \"PAGE-0002\"};\n\n this.mockMvc.perform(get(\"/api/v1/metastore/mets/\" + resourceId + \"/pageid\"))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(MockMvcResultMatchers.jsonPath(\"$\", Matchers.hasSize(2)))\n .andExpect(MockMvcResultMatchers.jsonPath(\"$.[*]\", Matchers.hasItems(items)))\n .andReturn();\n }",
"private static void checkMyCar(List<Car> cars, Predicate<Car> checker) {\n\n for (Car car : cars) {\n if (checker.test(car)) {\n System.out.println(\"This is a hybrid car ->\" + car.getBrand());\n }\n }\n System.out.println();\n }",
"@Transactional\r\n\tpublic List<Car> getAllCars() {\n\t\treturn (List<Car>)cr.findAll();\r\n\t}"
] | [
"0.77412146",
"0.74236584",
"0.73287714",
"0.7120413",
"0.6868943",
"0.6820155",
"0.6807156",
"0.6578178",
"0.6482954",
"0.6431188",
"0.641427",
"0.6270936",
"0.62379795",
"0.6234424",
"0.6186131",
"0.61716264",
"0.61618054",
"0.61299944",
"0.61239284",
"0.60831165",
"0.601365",
"0.5978059",
"0.5971848",
"0.5949148",
"0.5933002",
"0.58961135",
"0.58425146",
"0.5830162",
"0.58079374",
"0.5793649",
"0.57893795",
"0.57854253",
"0.5770102",
"0.5762017",
"0.5754233",
"0.57470655",
"0.5731858",
"0.57274383",
"0.571385",
"0.57130754",
"0.5687256",
"0.5685571",
"0.5681295",
"0.5679272",
"0.56537074",
"0.5642042",
"0.562252",
"0.56078655",
"0.56001216",
"0.5589094",
"0.5587954",
"0.5580398",
"0.5578408",
"0.55602705",
"0.5490761",
"0.5481041",
"0.5480748",
"0.5475448",
"0.5461342",
"0.545597",
"0.5452389",
"0.5437324",
"0.5427026",
"0.54249144",
"0.5421132",
"0.54196364",
"0.5409769",
"0.5391218",
"0.5386178",
"0.5381668",
"0.53801805",
"0.5376793",
"0.53697485",
"0.535896",
"0.53581756",
"0.5354322",
"0.5350424",
"0.5346073",
"0.5345026",
"0.5345026",
"0.53425485",
"0.5334962",
"0.5332677",
"0.5323392",
"0.53202957",
"0.53168815",
"0.53167254",
"0.53085107",
"0.5307084",
"0.53069115",
"0.5295769",
"0.52957237",
"0.5292749",
"0.52925843",
"0.528685",
"0.5286005",
"0.5282574",
"0.5279184",
"0.527193",
"0.5267246"
] | 0.84703255 | 0 |
Test of deleteCarById method, of class CarsRestController. | @Test
public void testDeleteCarById() {
System.out.println("deleteCarById");
int id = 1;
ResponseEntity<String> expResult = new ResponseEntity<String>("OK", HttpStatus.OK);
when(carService.deleteCarById(id)).thenReturn(expResult);
ReflectionTestUtils.setField(carController, "carService", carService);
ResponseEntity<String> result = carController.deleteCarById(id);
assertEquals(expResult.getStatusCode(), result.getStatusCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testDeleteCarById() {\n System.out.println(\"deleteCarById\");\n int id = 17;\n CarController instance = new CarController();\n instance.deleteCarById(id);\n assertTrue(true);\n }",
"@Transactional\r\n\tpublic void deleteCar(String id) {\n\t\tcr.deleteById(id);\r\n\t}",
"@Override\n\tpublic ResultMessage deleteCar(String id) {\n\t\treturn inList.delete(id);\n\t}",
"@Override\n\tpublic int deleteCarById(String[] carId) {\n\t\tint flag = chargeCarMapper.deleteCarById(carId);\n\t\treturn flag;\n\t}",
"@Test\n\tpublic void testGetCarById() {\n\t\tSystem.out.println(\"getCarById\");\n\t\tint carId = 1;\n\t\tList<CarModel> carList = new ArrayList<CarModel>();\n\t\tCarModelDTO dto = new CarModelDTO();\n\t\tCarModel carResult = new CarModel();\n\t\tcarResult.setId(new Integer(1));\n\t\tcarResult.setBrand(\"Ford\");\n\t\tcarResult.setFrom(new Integer(2019));\n\t\tcarResult.setTo(new Integer(2020));\n\t\tcarList.add(carResult);\n\t\tdto.setCars(carList);\n\t\tdto.setMessage(\"OK\");\n\t\tdto.setSuccess(true);\n\t\tResponseEntity<CarModelDTO> expResult = new ResponseEntity<CarModelDTO>(dto, HttpStatus.OK);\n\t\twhen(carService.findCarById(carId)).thenReturn(expResult);\n\n\t\tReflectionTestUtils.setField(carController, \"carService\", carService);\n\n\t\tResponseEntity<CarModelDTO> result = carController.getCarById(carId);\n\t\tassertEquals(expResult.getStatusCode(), result.getStatusCode());\n\t}",
"public void deleteCar(Car car) {\n DatabaseManager.deleteCar(car);\n }",
"@Test\n public void testDeleteVehicleById() {\n //Arrange\n Vehicle vehicle = new Vehicle();\n Model model = new Model();\n Make make = new Make();\n \n make.setMakeName(\"Ford\");\n \n Make createdMake = makeDao.addMake(make);\n \n model.setModelName(\"Explorer\");\n model.setMake(createdMake);\n \n Model createdModel = modelDao.addModel(model);\n \n vehicle.setYear(2018);\n vehicle.setTransmission(\"Automatic\");\n vehicle.setMileage(1000);\n vehicle.setColor(\"Blue\");\n vehicle.setInterior(\"Leather\");\n vehicle.setBodyType(\"SUV\");\n vehicle.setVin(\"W9D81KQ93N8Z0KS7\");\n vehicle.setSalesPrice(new BigDecimal(\"35000.00\"));\n vehicle.setMsrp(new BigDecimal(\"40000.00\"));\n vehicle.setDescription(\"A practical vehicle\");\n vehicle.setPicURL(\"http://www.sampleurl.com/samplepic\");\n vehicle.setModel(createdModel);\n\n Vehicle createdVehicle = vehicleDao.addVehicle(vehicle);\n\n //Act\n vehicleDao.deleteVehicleById(vehicle.getVehicleId());\n \n //Assert\n Vehicle fetchedVehicle = vehicleDao.getVehicleById(createdVehicle.getVehicleId());\n assertNull (fetchedVehicle);\n \n }",
"@Test\n public void shouldDeleteClient() throws Exception {\n mockMvc.perform(delete(\"/v1/clients/1\")\n .contentType(MediaType.APPLICATION_JSON)\n .accept(MediaType.APPLICATION_JSON))\n .andExpect(status().isOk());\n verify(clientFacade, times(1)).deletedById(any());\n }",
"public String deleteCar(int id) {\r\n repository.deleteById(id);\r\n\r\n return \"\\nCar with id \" + id + \" deleted!\\n\";\r\n }",
"@Test\n public void deleteFlightTest() throws Exception {\n mockMvc.perform(delete(\"/v1/flight/deleteFlight?flightId=1\")\n .contentType(MediaType.APPLICATION_JSON))\n .andExpect(status().is(200));\n\n }",
"public void deleteFromCarDriverByCarId(int id) {\n\t\tTransaction transaction = null;\n\t\ttry (Session session = HibernateUtil.getSessionFactory().openSession()) {\n\t\t\ttransaction = session.beginTransaction();\n\t\t\t Query query = session.createQuery(\"from car\");\n\t\t\t List<Car> cars = query.getResultList();\n\t\t\tSystem.out.println(cars);\n//\t\t\tquery.executeUpdate();\n\t\t\ttransaction.commit();\n\t\t} catch (Exception e) {\n\t\t\tif (transaction != null) {\n\t\t\t\ttransaction.rollback();\n\t\t\t}\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n void deletePet_API_TEST() throws Exception {\n mvc.perform(delete(\"/owners/1/pets/2\").accept(MediaType.APPLICATION_JSON))\n .andExpect(status().isOk());\n verify(petService, times(1)).deletePet(2, 1);\n }",
"@Test\n void shouldDeleteTask() throws Exception {\n mockMvc\n .perform(MockMvcRequestBuilders\n .delete(\"/v1/task/{id}\", 123))\n .andExpect(MockMvcResultMatchers.status().is(200));\n }",
"@Test\n void deleteById() {\n petTypeSDJpaService.deleteById(petType.getId());\n\n //Then\n verify(petTypeRepository).deleteById(petType.getId());\n }",
"@Test\n public void testGetCarById() {\n\n }",
"public void deleteCar(String carRegistrationId)throws PersistenceException {\r\n\t\ttry\r\n\t\t{\r\n\t\t\tentman.createQuery(\"DELETE FROM CarJPA b WHERE b.carRegistrationId = ?1\").setParameter(1, carRegistrationId).executeUpdate();\r\n\t\t\t\r\n\t\t}catch (PersistenceException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t} \r\n\t}",
"@Override\n\tpublic boolean deleteCar(Car car) {\n\t\treturn carInter.deleteCar(car);\n\t}",
"@Test\n public void deleteId() throws Exception {\n Role role = create(new Role(\"roleName\"));\n\n //Attempt to remove from the database with delete request\n try {\n mvc.perform(MockMvcRequestBuilders.delete(\"/auth/roles/{id}\", UUIDUtil.UUIDToNumberString(role.getUuid()))\n .header(\"Authorization\", authPair[0])\n .header(\"Function\", authPair[1])\n )\n .andExpect(status().isOk());\n } catch (Exception e) {\n remove(role.getUuid());\n throw e;\n }\n\n //Check if successfully removed from database\n try {\n //Remove from database (above get function should have thrown an error if the object was no longer in the database)\n remove(role.getUuid());\n fail(\"DELETE request did not succesfully delete the object from the database\");\n } catch (ObjectNotFoundException e) {\n //Nothing because the object is no longer present in the database which is expected\n }\n }",
"@Test\n void deleteSuccess() {\n carDao.delete(carDao.getById(1));\n assertNull(carDao.getById(1));\n\n //Delete repairs\n GenericDao<Repair> repairDao = new GenericDao(Repair.class);\n Repair repair = repairDao.getById(2);\n assertNull(carDao.getById(2));\n\n //Delete part\n GenericDao<Part> partDao = new GenericDao(Part.class);\n Role part = partDao.getById(2);\n assertNull(partDao.getById(2));\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete CatCarburant : {}\", id);\n catCarburantRepository.delete(id);\n }",
"@Override\n\tpublic boolean deleteCar(String driverID) {\n\t\treturn carInter.deleteCar(driverID);\n\t}",
"@Test\n void deleteMovieById_whenExist() throws Exception {\n // Setup\n when(movieService.deleteMovieById(ArgumentMatchers.any(Long.class))).thenReturn(true);\n\n // Exercise\n mockMvc.perform(delete(baseUrl+ \"/1\").accept(MediaType.APPLICATION_JSON))\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$\").doesNotExist());\n }",
"@Test\n public void testDeleteCartsIdAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.deleteCartsIdAction(\"{id}\", \"{customerId}\");\n List<Integer> expectedResults = Arrays.asList(200, 400, 403, 404);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/Cart\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 403) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 404) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }",
"@DeleteMapping(value = \"/delete\", produces = \"application/json\")\n void delete(@RequestParam int id);",
"@Override\n\t@Transactional\n\tpublic void deleteById(Integer id) throws Exception {\n\t\tdetalleCarritoRepository.deleteById(id);\n\t}",
"@DeleteMapping(\"/contabancarias/{id}\")\n @Timed\n public ResponseEntity<Void> deleteContabancaria(@PathVariable Long id) {\n log.debug(\"REST request to delete Contabancaria : {}\", id);\n contabancariaRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@DeleteMapping(\"/cargos/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCargo(@PathVariable Long id) {\n log.debug(\"REST request to delete Cargo : {}\", id);\n\n cargoRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@DeleteMapping(\"{id}\")\n public ResponseEntity<Long> delete(@PathVariable(\"id\") Long id) {\n logger.debug(\"Request to delete Contractor with id \" + id);\n if(id == null || id == 0) throw new IllegalArgumentException(\"Expects a valid id value > 0\");\n Optional<Contractor> contractor = contractorService.getByID(id);\n if(contractor == null || !contractor.isPresent()) throw new ResourceNotFoundException(\"In order to delete Contractor \" + id + \", existing Contractor must be available with same ID\");\n contractorService.deleteByID(id);\n return new ResponseEntity<Long>(id,new HttpHeaders(), HttpStatus.ACCEPTED);\n }",
"@Override\npublic int deleteByCartIdAndCarId(Cart cart) {\n\treturn cartDao.deleteByCartIdAndCarId(cart);\n}",
"@Test\n public void deleteTest(){\n given().pathParam(\"id\",1)\n .when().delete(\"/posts/{id}\")\n .then().statusCode(200);\n }",
"@Test(dataProvider = \"DataForDelete\")\n public void testDelete(int id) throws JsonProcessingException {\n\n JSONObject jsonResult = new JSONObject();\n jsonResult.put(\"id\", id);\n\n given()\n .header(\"Content-Type\", \"application/json\")\n .contentType(ContentType.JSON)\n .accept(ContentType.JSON)\n .body(jsonResult)\n .when()\n .delete(\"https://reqres.in/api/users/2\")\n .then()\n .statusCode(204);\n }",
"@DeleteMapping(\"/act-kodus/{id}\")\n @Timed\n public ResponseEntity<Void> deleteActKodu(@PathVariable Long id) {\n log.debug(\"REST request to delete ActKodu : {}\", id);\n actKoduRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@Test\n final void testDeleteDevice() {\n when(deviceDao.deleteDevice(user, DeviceFixture.SERIAL_NUMBER)).thenReturn(Long.valueOf(1));\n ResponseEntity<String> response = deviceController.deleteDevice(DeviceFixture.SERIAL_NUMBER);\n assertEquals(200, response.getStatusCodeValue());\n assertEquals(\"Device with serial number 1 deleted\", response.getBody());\n }",
"@PostMapping(\"/delete\")\n public ResponseEntity<ServiceResult> deleteTest(@RequestBody Integer id) {\n return new ResponseEntity<ServiceResult>(testService.deleteTest(id), HttpStatus.OK);\n }",
"@Test\n void deleteSuccess() {\n dao.delete(dao.getById(3));\n assertNull(dao.getById(3));\n }",
"@Test\n\tpublic void deleteBook() {\n\t\tRestAssured.baseURI = \"http://216.10.245.166\";\n\t\t given().log().all().queryParam(\"ID\", \"321wergt\")\n\t\t\t\t.header(\"Content-Type\", \"application/json\").when()\n\t\t\t\t.delete(\"/Library/DeleteBook.php\").then().log().all()\n\t\t\t\t.assertThat().statusCode(200);\n\n\t\n\t /*JsonPath js = new JsonPath(response); \n\t String id = js.get(\"ID\");\n\t System.out.println(id);*/\n\t \n\t }",
"@Test\n\tvoid deleteDoctorTest() throws Exception {\n\t\tList<DoctorDetail> doctorDetail = new ArrayList<>();\n\t\tDoctorDetail doctorfind = new DoctorDetail();\n\t\tdoctorfind.setId(\"1\");\n\t\tdoReturn(doctorDetail).when(doctorServiceImplementation).deleteDoctorService(doctorfind.getId());\n\t\tmockMvc.perform(get(\"/doctor/delete?id=/{id}\", 1L)).andExpect(status().isOk());\n\t}",
"@Test\n void deleteSuccess() {\n dao.delete(dao.getById(2));\n assertNull(dao.getById(2));\n }",
"@RequestMapping( value = \"/{id}\", method = RequestMethod.DELETE )\n public void delete(@PathVariable(value=\"id\") int id){\n classService.delete(id);\n }",
"@DeleteMapping(\"/api/rents/{id}\")\r\n public ResponseEntity<?> deleteRent(@PathVariable(name = \"id\") Long id) {\r\n return rentService.find(id).map(rent -> {\r\n rentService.delete(rent);\r\n return ResponseEntity.ok().build();\r\n }).orElseThrow(() -> new IllegalArgumentException());\r\n }",
"@DeleteMapping(\"/covs/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCov(@PathVariable Long id) {\n log.debug(\"REST request to delete Cov : {}\", id);\n covService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@DeleteMapping(\"/{id}\")\n @PreAuthorize(\"hasRole('ADMIN') or hasRole('USER')\")\n public ResponseEntity<String> deleteRecipeById(@PathVariable(\"id\") int id) {\n recipeService.deleteRecipe(id);\n return ResponseEntity.status(HttpStatus.OK).body(\"Recipe deleted successfully..\");\n }",
"@Test\n public void delete() {\n System.out.println(\"\\n--- delete Singer by id=2 ---\");\n\n restTemplate.delete(\"http://localhost:9082/restful-ws/singer/{id}\", 2);\n\n printAllSingers();\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Mock : {}\", id);\n mockRepository.deleteById(id);\n }",
"@Test\n\tpublic void testDeleteCompanyApi() {\n\t\tCompany company = new Company(\"DataSolutionsPvtLtd\",\n\t\t\t\t\"Marthahalli road\", \"Bangalore\", \"India\", \"9880440671\");\n\t\tcompanyRepository.save(company);\n\n\t\tInteger companyId = company.getCompanyId();\n\n\t\t// Now Invoke the API to delete the Company\n\t\trestTemplate.delete(\"http://localhost:8888/companies/delete/\"\n\t\t\t\t+ companyId);\n\n\t\t// Try to fetch from the DB directly\n\t\tCompany companyFromDb = companyRepository.findOne(companyId);\n\t\t// and assert that there is no data found\n\t\tassertNull(companyFromDb);\n\t}",
"@Test\n public void testDelete() throws Exception {\n // pretend the entity was deleted\n doNothing().when(Service).deleteCitation(any(String.class));\n\n // call delete\n ModelAndView mav = Controller.delete(\"\");\n\n // test to see that the correct view is returned\n Assert.assertEquals(\"result\", mav.getViewName());\n\n // test to see that Json is formated properly\n Map<String, Object> map = mav.getModel();\n String result = (String) map.get(\"message\");\n\n Assert.assertEquals(\"{\\\"result\\\":\\\"deleted\\\"}\", result);\n }",
"@Test\n public void testDeleteTravel() throws Exception{\n \n doNothing().when(databaseMock).deleteTravel(anyInt());\n \n mockMVC.perform(delete(\"/user/1/travel/1\")\n .header(\"Authorization\", \"1\"))\n .andExpect(status().isNoContent());\n \n verify(databaseMock, times(1)).getUser(1);\n verify(databaseMock, times(1)).deleteTravel(1);\n verifyNoMoreInteractions(databaseMock);\n }",
"@DeleteMapping(\"/cotacaos/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCotacao(@PathVariable Long id) {\n log.debug(\"REST request to delete Cotacao : {}\", id);\n cotacaoService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@Test\n public void testDeleteTravel_NumberFormatExceptionTravelId() throws Exception {\n \n mockMVC.perform(delete(\"/user/1/travel/a\")\n .header(\"Authorization\", \"1\"))\n .andExpect(status().isInternalServerError());\n \n verifyNoMoreInteractions(databaseMock);\n }",
"@DeleteMapping(\"/cuentas/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCuenta(@PathVariable Long id) {\n log.debug(\"REST request to delete Cuenta : {}\", id);\n\n cuentaRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@Test\n @WithMockUser(username = \"employee\", roles = {\"EMPLOYEE\"})\n public void deleteTransactionById() throws Exception {\n\n when(transactionService.getTransactionById(99)).thenReturn(transaction);\n this.mvc.perform(delete(\"/transactions/99\").contentType(MediaType.APPLICATION_JSON)\n .accept(MediaType.APPLICATION_JSON))\n .andExpect(status().is(200));\n }",
"@DeleteMapping(\"/delete/{idcategory}\")\n\tpublic ResponseEntity<?> deleteById(@PathVariable int idcategory){\n\t\tCategoryVO cat = catService.deleteById(idcategory);\n\t\treturn checkNull(cat);\n\t}",
"@Test\n public void testDeleteProductShouldCorrect() throws Exception {\n // Mock method\n when(productRepository.findOne(product.getId())).thenReturn(product);\n doNothing().when(productRepository).delete(product);\n\n testResponseData(RequestInfo.builder()\n .request(delete(PRODUCT_DETAIL_ENDPOINT, product.getId()))\n .token(adminToken)\n .httpStatus(HttpStatus.OK)\n .build());\n }",
"@RequestMapping(value = \"/rest/hikes/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public void delete(@PathVariable Long id) {\n log.debug(\"REST request to delete Hike : {}\", id);\n hikeRepository.delete(id);\n }",
"@Test\n public void deleteOrderTest() {\n Long orderId = 10L;\n api.deleteOrder(orderId);\n\n verify(exactly(1), deleteRequestedFor(urlEqualTo(\"/store/order/10\")));\n }",
"@Override\r\n\tpublic int deleteCar(int serial) throws DataAccessException {\n\t\treturn 0;\r\n\t}",
"@Test\r\n void testRemoveMedicineById() throws Exception{\r\n String URI = \"/medicine/delete/{medicineId}\";\r\n Medicine medicine = new Medicine(); \r\n \t medicine.setMedicineId(1345);\r\n \t\tmedicine.setMedicineName(\"Calcium\");\r\n \t\tmedicine.setMedicineCost(300);\r\n \t\t\r\n\t Mockito.when(medicineService.cancelMedicineById(1345)).thenReturn(true);\r\n\t MvcResult mvcResult = this.mockMvc.perform(MockMvcRequestBuilders.delete(URI, 1345).accept(MediaType.APPLICATION_JSON)).andReturn();\r\n\t MockHttpServletResponse mockHttpServletResponse = mvcResult.getResponse();\r\n\t String jsonOutput = mockHttpServletResponse.getContentAsString();\r\n\t assertNotNull(jsonOutput);\r\n }",
"@Test\n public void testDelete() {\n System.out.println(\"delete\");\n String guestIDnumber = \"test\";\n BookingController instance = new BookingController();\n boolean expResult = true;\n boolean result = instance.delete(guestIDnumber);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n }",
"@DeleteMapping(\"/delete/{id}\")\n public ResponseEntity delete(@PathVariable int id){\n if(id < 1){\n return new ResponseEntity(HttpStatus.BAD_REQUEST);\n }\n service.delete(id);\n return new ResponseEntity(HttpStatus.OK);\n }",
"@DeleteMapping(\"/citizens/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCitizen(@PathVariable Long id) {\n log.debug(\"REST request to delete Citizen : {}\", id);\n citizenService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"citizen\", id.toString())).build();\n }",
"void deleteVehicle(String vehicleID);",
"@Test\n public void deleteCatalogSaleTest() {\n Integer id = null;\n // Void response = api.deleteCatalogSale(id);\n\n // TODO: test validations\n }",
"@Test\n\tpublic void testDeleteResource()\n\t{\n\t\tLocalDate resDate = null;\n\t\t\n\t\tCategory cat = new Category();\n\t\tcat.setCatId(10);\n\t\tcat.setCatName(\"Clothing\");\n\t\t\n\t\tResource res = new Resource();\n\t\tres.setResId(10);\n\t\tres.setResDate(resDate);\n\t\tres.setCategory(cat);\n\t\tres.setResDescription(\"100% Cotton\");\n\t\tres.setResTitle(\"Shirt\");\n\t\tres.setResPrice(1000);\t\t\n\t\t\n\t\t\n\t\t\n\t\tMockito.when(resourceRepository.existsById(res.getResId())).thenReturn(false);\n\t assertFalse(resourceRepository.existsById(res.getResId()));\n\t}",
"@GetMapping(\"/delete/{id}\")\n public String deletegetRestaurant(@PathVariable String id) {\n restaurantServiceImpl.delete(id);\n return \"data deleted\";\n }",
"@DeleteMapping(\"/pets/{id}\")\n public ResponseEntity<Void> deletePet(@PathVariable Long id) {\n log.debug(\"REST request to delete Pet : {}\", id);\n petService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@RequestMapping(value = \"/charitys/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public void delete(@PathVariable Long id) {\n log.debug(\"REST request to delete Charity : {}\", id);\n charityRepository.delete(id);\n }",
"@RequestMapping(\"/recipe/delete/{id}\")\n public String deleteRecipe(@PathVariable String id){\n recipeService.deleteById(new Long(id));\n \n return \"redirect:/\";\n }",
"public void delete(Long id) throws EmptyResultDataAccessException;",
"@RequestMapping(value = \"/oeuvres/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteOeuvre(@PathVariable Long id) {\n log.debug(\"REST request to delete Oeuvre : {}\", id);\n oeuvreRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"oeuvre\", id.toString())).build();\n }",
"@Test\r\n\tpublic void testDeleteById() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tfor (E e : entities) {\r\n\t\t\tInteger id = supplyId(e);\r\n\t\t\tdao.deleteById(id);\r\n\t\t\tE read = dao.read(id);\r\n\t\t\tassertNull(read);\r\n\t\t}\r\n\t}",
"@Test\n public void delete() {\n auctionService.restTemplate = mockRestTemplate;\n auctionService.delete(1);\n verify(mockRestTemplate).delete(testOneUrl);\n }",
"@RequestMapping(value = \"/drivers/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> delete(@PathVariable Long id) {\n log.debug(\"REST request to delete Driver : {}\", id);\n driverRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"driver\", id.toString())).build();\n }",
"@RequestMapping(value = \"/estados/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public void delete(@PathVariable Long id) {\n log.debug(\"REST request to delete Estado : {}\", id);\n estadoRepository.delete(id);\n }",
"@RequestMapping(value = \"/fornecedors/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteFornecedor(@PathVariable Long id) {\n log.debug(\"REST request to delete Fornecedor : {}\", id);\n fornecedorService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"fornecedor\", id.toString())).build();\n }",
"@RequestMapping(value = \"/cophongs/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteCophong(@PathVariable Long id) {\n log.debug(\"REST request to delete Cophong : {}\", id);\n cophongRepository.delete(id);\n cophongSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"cophong\", id.toString())).build();\n }",
"@DeleteMapping(path = \"{id}\")\n public ResponseEntity<?> deleteById(@PathVariable Long id) {\n prescriptionService.deleteById(id);\n\n return ResponseEntity.ok().body(\"Prescription with id: \" + id + \" deleted!\");\n }",
"@DeleteMapping(\"/{id}\")\t\n\t@ApiOperation(value = \"Delete reservation\", notes = \"Service to delete a reservation\")\n\t@ApiResponses(value = {\n\t\t\t@ApiResponse(code = 200, message = \"Reservation deleted\"),\n\t\t\t@ApiResponse(code = 404, message = \"Reservation not found\"),\n\t\t\t@ApiResponse(code = 400, message = \"Bad request\")\n\t})\n\tpublic ResponseEntity<?> delete(@PathVariable(\"id\")int id){\n\t\tResponseEntity<?> response;\n\t\tReservation reservation = reservationService.get(id);\n\t\tif(reservation==null) {\n\t\t\tMap<String,String> errors = new HashMap<>();\n\t\t\terrors.put(\"Errors\", \"The reservation does not exist\");\n\t\t\tresponse = new ResponseEntity<>(errors,HttpStatus.NOT_FOUND);\n\t\t}else {\n\t\t\treservationService.delete(reservation);\n\t\t\tReservationDTO reservationDTO = new ReservationDTO(reservation);\n\t\t\tresponse = new ResponseEntity<>(reservationDTO,HttpStatus.OK);\n\t\t}\n\t\treturn response;\n\t}",
"@Test\n\t@WithMockCustomUser(username = \"daniel\")\n\tpublic void deleteRecipeAsRecipeOwner() throws Exception {\n\t\tRecipe recipe = recipeBuilder(1L);\n\n\t\twhen(recipeService.findById(1L)).thenReturn(recipe);\n\t\twhen(userService.findAll()).thenReturn(new ArrayList<>());\n\t\tdoAnswer(invocation -> null).when(recipeService).deleteById(1L);\n\n\t\tmockMvc.perform(post(\"/recipes/1/delete\"))\n\t\t\t\t.andExpect(authenticated())\n\t\t\t\t.andExpect(flash().attributeExists(\"flash\"))\n\t\t\t\t.andExpect(status().is3xxRedirection())\n\t\t\t\t.andExpect(redirectedUrl(\"/recipes\"));\n\n\t\tverify(recipeService, times(2)).findById(any(Long.class));\n\t\tverify(userService).findAll();\n\t\tverify(recipeService).deleteById(any(Long.class));\n\t}",
"@Test(dependsOnMethods = \"update\")\n public void delete()throws Exception{\n repository.delete(id);\n OwnerRegion delete = repository.findOne(id);\n Assert.assertNull(delete);\n }",
"@RequestMapping(path = \"/{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable long id) {\n service.delete(id);\n }",
"@Test\n public void deletePerson_ShouldReturnUpdatedRecordAnd_NO_CONTENT() {\n ResponseEntity<Person> response = personController.deletePerson(3L);\n\n //assert\n Mockito.verify(personService).deletePerson(3L);\n assertEquals(null, response.getBody());\n assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());\n }",
"@DeleteMapping(\"/person\")\r\n@ApiOperation( value = \"Delete Person by id\", notes = \"delete a specific person\")\r\nprivate String deletePersonByParamId(@RequestParam(required = true) int id)\r\n{\r\n Person person = personService.getPersonById(id);\r\n if(person == null){\r\n throw new PersonNotFoundException(\"PersonNotFound\");\r\n }\r\n try {\r\n personService.delete(id);\r\n return \"Sucess\";\r\n }\r\n catch(Exception e){\r\n logger.error(e.toString());\r\n return \"Error =\" + e.toString();\r\n }\r\n}",
"@Test\n void deleteSuccess() {\n genericDAO.delete(genericDAO.getByID(2));\n assertNull(genericDAO.getByID(2));\n }",
"@Test\n void delete() {\n petTypeSDJpaService.delete(petType);\n\n //Then\n verify(petTypeRepository).delete(petType);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Ordre : {}\", id); ordreRepository.deleteById(id);\n }",
"ResponseEntity deleteById(UUID id);",
"@Test\n public void whenDeletingCustomerItShouldUseTheRepository() {\n controller.deleteCustomer(CUSTOMER1_ID);\n // Verify that the repository is used to delete the customer\n verify(repository).delete(CUSTOMER1_ID);\n }",
"@DeleteMapping(\"{id}\")\n public ResponseEntity<PersonResponse> delete(@PathVariable(name = \"id\") String id) {\n personService.delete(id);\n return ResponseEntity.status(HttpStatus.NO_CONTENT).build();\n }",
"@RequestMapping(value = \"{id}\", method = RequestMethod.DELETE)\n public ResponseEntity<?> delete(@PathVariable long id) {\n repository.delete(id);\n\n return ResponseEntity.noContent().build();\n }",
"@DeleteMapping(\"/vehicle-tasks/{id}\")\n @Timed\n @Secured(AuthoritiesConstants.ADMIN)\n public ResponseEntity<Void> deleteVehicleTask(@PathVariable Long id) {\n log.debug(\"REST request to delete VehicleTask : {}\", id);\n vehicleTaskService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@Override\n\tpublic boolean deleteCar(String id) {\n\t\tfor(int i=0; i<archiveCar.size(); i++) {\n\t\t\tCarModel car = archiveCar.get(i);\n\t\t\tif(car.getId().equals(id)) {\n\t\t\t\tarchiveCar.remove(i);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@RequestMapping(\"/deleteRecipe\")\r\n\tpublic String deleteRecipe(@RequestParam Integer idrKey) {\r\n\t\tRecipe recipe = recipeDAO.findRecipeByPrimaryKey(idrKey);\r\n\t\trecipeService.deleteRecipe(recipe);\r\n\t\treturn \"forward:/indexRecipe\";\r\n\t}",
"@DeleteMapping(\"/person/{id}\")\r\n@ApiOperation( value = \"Delete Person by id\", notes = \"delete a specific person\")\r\nprivate void deletePerson(@PathVariable(\"id\") int id)\r\n{\r\n Person person = personService.getPersonById(id);\r\n if(person == null){\r\n throw new PersonNotFoundException(\"PersonNotFound\");\r\n }\r\n try {\r\n personService.delete(id);\r\n }\r\n catch(Exception e){\r\n logger.error(e.toString());\r\n }\r\n}",
"public void delete(Long id) {\n log.debug(\"Request to delete CaraterDaInternacao : {}\", id);\n caraterDaInternacaoRepository.deleteById(id);\n caraterDaInternacaoSearchRepository.deleteById(id);\n }",
"@Test\n public void n4_testDelete() throws Exception {\n mockMvc.perform(delete(API_PATH + \"/TestDataType/\" + lkUUID)\n .accept(APPLICATION_JSON))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(content()\n .json(\"{'bool':false,'text':'lk','domain1':{},'numberDouble':0,'numberLong':100, 'date':''}\", false)); // TODO need strict true\n mockMvc.perform(get(API_PATH + \"/TestDataType/lk\")\n .accept(APPLICATION_JSON))\n .andExpect(status().is4xxClientError());\n mockMvc.perform(get(API_PATH + \"/TestDataType/\" + lkUUID)\n .accept(APPLICATION_JSON))\n .andExpect(status().is4xxClientError());\n }",
"@Test\n public void testDeleteTravel_RecordNotFoundExceptionDeleteTravel() throws Exception {\n doThrow(new RecordNotFoundException()).when(databaseMock).deleteTravel(anyInt());\n \n mockMVC.perform(delete(\"/user/1/travel/1\")\n .header(\"Authorization\", \"1\"))\n .andExpect(status().isNotFound());\n \n verify(databaseMock, times(1)).getUser(anyInt());\n verify(databaseMock, times(1)).deleteTravel(anyInt());\n verifyNoMoreInteractions(databaseMock);\n }",
"@Override\n public void deleteVehicleById(Integer id){\n VehicleDetails domain = throwIfNotFound(repo.findById(id));\n \n repo.delete(domain);\n \n }",
"@Test\n public void testDeleteCartsIdPaymentAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.deleteCartsIdPaymentAction(\"{id}\", \"{customerId}\");\n List<Integer> expectedResults = Arrays.asList(200, 400, 403, 404);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/Cart\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 403) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 404) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }",
"@Override\n\tpublic boolean delete(car data)throws Exception {\n\t\ttry{\n\t\t\tcarDataRepository.delete(data);\n\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t\tthrow ex;\n\t\t\t}\n\t}",
"@Test\n void deleteSuccess() {\n genericDao.delete(genericDao.getById(3));\n assertNull(genericDao.getById(3));\n }"
] | [
"0.8160814",
"0.7579639",
"0.72477853",
"0.7242593",
"0.7007707",
"0.69447744",
"0.6932835",
"0.69255286",
"0.69206256",
"0.68777025",
"0.686745",
"0.6862945",
"0.68158597",
"0.67837954",
"0.67603457",
"0.6746573",
"0.6667435",
"0.6657292",
"0.6632049",
"0.6609304",
"0.6601297",
"0.65974",
"0.6561003",
"0.6546788",
"0.65147",
"0.6505283",
"0.6478528",
"0.6478213",
"0.6469352",
"0.6468405",
"0.6446337",
"0.64450276",
"0.64366746",
"0.6435126",
"0.6433465",
"0.6430743",
"0.64259773",
"0.64095676",
"0.6407849",
"0.6389855",
"0.6388586",
"0.6377433",
"0.6369323",
"0.63628095",
"0.63492095",
"0.63486904",
"0.6347533",
"0.63277656",
"0.6321223",
"0.6308917",
"0.6307338",
"0.6297861",
"0.62927294",
"0.62918794",
"0.62912047",
"0.62886715",
"0.6284932",
"0.6284055",
"0.6279838",
"0.6277706",
"0.6270351",
"0.62690794",
"0.62637985",
"0.6263546",
"0.62622416",
"0.62614554",
"0.62555104",
"0.6252564",
"0.6248677",
"0.62450796",
"0.6244209",
"0.6242813",
"0.6235817",
"0.6228866",
"0.6216756",
"0.62159455",
"0.6214362",
"0.62141365",
"0.62120855",
"0.6211143",
"0.62059575",
"0.6202467",
"0.62023914",
"0.62022454",
"0.6197583",
"0.61945117",
"0.619229",
"0.61918473",
"0.61854196",
"0.61738884",
"0.61703604",
"0.61601454",
"0.6159998",
"0.6159951",
"0.61564744",
"0.61548346",
"0.61468285",
"0.6142563",
"0.6137225",
"0.61334705"
] | 0.854607 | 0 |
write your code here | public static void main(String[] args) {
CashRegister cassa1 = new CashRegister();
cassa1.getPrice(3.50);
cassa1.getPrice(4.0);
cassa1.getPrice(55.75);
double total = cassa1.getTotal();
String change = cassa1.getChange(200);
System.out.println(total);
System.out.println(change);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void logic(){\r\n\r\n\t}",
"public static void generateCode()\n {\n \n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"void pramitiTechTutorials() {\n\t\n}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public void ganar() {\n // TODO implement here\n }",
"public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }",
"CD withCode();",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}",
"public void genCode(CodeFile code) {\n\t\t\n\t}",
"public void hello(){\n\t\t\r\n \t\r\n\t\t\r\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"public void baocun() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"public void furyo ()\t{\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"private void strin() {\n\n\t}",
"public void themesa()\n {\n \n \n \n \n }",
"Programming(){\n\t}",
"@Override\n\tvoid output() {\n\t\t\n\t}",
"private void yy() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"void rajib () {\n\t\t \n\t\t System.out.println(\"Rajib is IT Eng\");\n\t }",
"private void kk12() {\n\n\t}",
"public void edit() {\n\t\tSystem.out.println(\"编写java笔记\");\r\n\t}",
"public static void main(String[] args) {\n\t// write your code here\n }",
"private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}",
"@Override\r\n\t\tpublic void doDomething() {\r\n\t\t\tSystem.out.println(\"I am here\");\r\n\t\t\t\r\n\t\t}",
"protected void mo6255a() {\n }",
"public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"public void working()\n {\n \n \n }",
"@Override\n\tprotected void postRun() {\n\n\t}",
"public void perder() {\n // TODO implement here\n }",
"public void smell() {\n\t\t\n\t}",
"protected void execute() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void orgasm() {\n\t\t\n\t}",
"public void cocinar(){\n\n }",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"public void run() {\n\t\t\t\t\n\t\t\t}",
"protected void execute() {\n\n\n \n }",
"@Override\n public void execute() {\n \n \n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"protected void display() {\n\r\n\t}",
"private void sout() {\n\t\t\n\t}",
"private static void oneUserExample()\t{\n\t}",
"public void nhapdltextlh(){\n\n }",
"public void miseAJour();",
"protected void additionalProcessing() {\n\t}",
"private void sub() {\n\n\t}",
"@Override\n\tpublic void view() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void engine() {\r\n\t\t// TODO Auto-generated method stub\t\t\r\n\t}",
"@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}",
"void mo67924c();",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\r\n public void run() {\n basicEditor.createEdge(); // replaced Bibianas method with Moritz Roidl, Orthodoxos Kipouridis\r\n }",
"public void mo5382o() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"public void mo3376r() {\n }",
"public static void main(String[] args)\r\n {\n System.out.println(\"Mehedi Hasan Nirob\");\r\n //multiple line comment\r\n /*\r\n At first printing my phone number\r\n then print my address \r\n then print my university name\r\n */\r\n System.out.println(\"01736121659\\nJamalpur\\nDhaka International University\");\r\n \r\n }",
"void kiemTraThangHopLi() {\n }",
"public void skystonePos5() {\n }",
"public final void cpp() {\n }",
"public final void mo51373a() {\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"This is the main class of this project\");\r\n\t\tSystem.out.println(\"how about this\");\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"new push\");\r\n\r\n\t\t//how to update this line\r\n\t\t\r\n\t\tSystem.out.println(\"hello there\");\r\n\r\n\t\tSystem.out.println(\"zen me shuoXXXXXXXXXXXKKKKkKKKKKKXXXXXXXX\");\r\n\r\n\t\tSystem.out.println(\"eventually we succeeded!\");\r\n\t\t//wa!!!\r\n\t\t\r\n\r\n\r\n\t\t//hen shu fu !\r\n\t\t\r\n\t\t//it is a good day\r\n\t\t\r\n\t\t//testing\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"hope it works\");\r\n\t\t\r\n\r\n\t\t\r\n\r\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}"
] | [
"0.61019534",
"0.6054925",
"0.58806974",
"0.58270746",
"0.5796887",
"0.56999695",
"0.5690986",
"0.56556827",
"0.5648637",
"0.5640487",
"0.56354505",
"0.56032085",
"0.56016207",
"0.56006724",
"0.5589654",
"0.5583692",
"0.55785793",
"0.55733466",
"0.5560209",
"0.55325305",
"0.55133164",
"0.55123806",
"0.55114794",
"0.5500045",
"0.5489272",
"0.5482718",
"0.5482718",
"0.5477585",
"0.5477585",
"0.54645246",
"0.5461012",
"0.54548836",
"0.5442613",
"0.5430592",
"0.5423748",
"0.5419415",
"0.5407118",
"0.54048806",
"0.5399331",
"0.539896",
"0.5389593",
"0.5386248",
"0.5378453",
"0.53751254",
"0.5360644",
"0.5357343",
"0.5345515",
"0.53441405",
"0.5322276",
"0.5318302",
"0.53118485",
"0.53118485",
"0.53085434",
"0.530508",
"0.53038436",
"0.5301922",
"0.5296964",
"0.52920514",
"0.52903354",
"0.5289583",
"0.5287506",
"0.52869135",
"0.5286737",
"0.5286737",
"0.5286737",
"0.5286737",
"0.5286737",
"0.5286737",
"0.5286737",
"0.52859664",
"0.52849185",
"0.52817136",
"0.52791214",
"0.5278664",
"0.5278048",
"0.5276269",
"0.52728665",
"0.5265451",
"0.526483",
"0.526005",
"0.5259683",
"0.52577406",
"0.5257731",
"0.5257731",
"0.52560073",
"0.5255759",
"0.5255707",
"0.5250705",
"0.5246863",
"0.5243053",
"0.52429926",
"0.5242727",
"0.52396125",
"0.5239378",
"0.5232576",
"0.5224529",
"0.52240705",
"0.52210563",
"0.52203166",
"0.521787",
"0.52172214"
] | 0.0 | -1 |
/////////// PRIVATE // /////////// | private void initFaceTracker(boolean isFrontFacing) {
if (faceDetector != null) {
isReleased = true;
faceDetector.release();
}
faceDetector = new FaceDetector.Builder(context).setTrackingEnabled(true)
.setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)
//.setMode(gameManager.getCurrentGame() != null &&
// gameManager.getCurrentGame().getId().equals(Game.GAME_COOL_CAMS)
// ? FaceDetector.ACCURATE_MODE : FaceDetector.FAST_MODE)
.setMode(FaceDetector.ACCURATE_MODE)
.setProminentFaceOnly(isFrontFacing)
.setMinFaceSize(isFrontFacing ? 0.35f : 0.15f)
.build();
isReleased = false;
//Detector.Processor<Face> processor;
//if (isFrontFacing) {
// Tracker<Face> tracker = new TribeFaceTracker();
// processor = new LargestFaceFocusingProcessor.Builder(faceDetector, tracker).build();
//} else {
// MultiProcessor.Factory<Face> factory = face -> new TribeFaceTracker();
// processor = new MultiProcessor.Builder<>(factory).build();
//}
faceDetector.setProcessor(
new LargestFaceFocusingProcessor.Builder(faceDetector, new TribeFaceTracker()).build());
//faceDetector.setProcessor(processor);
if (!faceDetector.isOperational()) {
isFaceTrackerEnabled = false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n void init() {\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n public void init() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n public void init() {}",
"@Override\r\n\tpublic void init() {}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"private void init() {\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\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public void initialize() { \n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tpublic void anular() {\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}",
"private void getStatus() {\n\t\t\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\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 }",
"@Override\n public void initialize() {\n \n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n public int describeContents() { return 0; }",
"private void init() {\n }",
"protected void initialize() {}",
"protected void initialize() {}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void init() {\n\t\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}",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"@Override\r\n\tprotected void processInit() {\n\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"private void init() {\n\n\n\n }",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"private void initialize() {\n\t\t\n\t}",
"@Override\n public void initialize() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"protected void init() {\n // to override and use this method\n }"
] | [
"0.64398634",
"0.6362718",
"0.62863994",
"0.6280683",
"0.6280683",
"0.6280683",
"0.6280683",
"0.6280683",
"0.6280683",
"0.61699784",
"0.6155915",
"0.6129058",
"0.6122563",
"0.6115177",
"0.6106641",
"0.607787",
"0.60776246",
"0.6053965",
"0.6039313",
"0.5986301",
"0.59790903",
"0.59790903",
"0.5965658",
"0.59564847",
"0.59533596",
"0.59482247",
"0.58767843",
"0.5869876",
"0.58669335",
"0.58669335",
"0.58668727",
"0.5862235",
"0.58616257",
"0.5861511",
"0.5861511",
"0.5849187",
"0.5849187",
"0.5849187",
"0.5849187",
"0.5849187",
"0.5842351",
"0.58335936",
"0.58285785",
"0.58285785",
"0.58285785",
"0.5822887",
"0.58093566",
"0.58093566",
"0.5809304",
"0.5809027",
"0.5809027",
"0.5809027",
"0.5808898",
"0.58003277",
"0.578506",
"0.57712734",
"0.57712734",
"0.5765048",
"0.5765048",
"0.5765048",
"0.5744391",
"0.5737362",
"0.57359457",
"0.57359457",
"0.57359457",
"0.57359457",
"0.57359457",
"0.57359457",
"0.57359457",
"0.57359457",
"0.57359457",
"0.57359457",
"0.5735291",
"0.5731787",
"0.5725649",
"0.5719006",
"0.5718257",
"0.5709706",
"0.5709706",
"0.5707243",
"0.57019377",
"0.5695749",
"0.5695749",
"0.5695749",
"0.5694999",
"0.56948936",
"0.5693477",
"0.56912094",
"0.5689059",
"0.5687873",
"0.5687873",
"0.56825113",
"0.56780005",
"0.56780005",
"0.56750524",
"0.566992",
"0.56694585",
"0.5660493",
"0.5653769",
"0.56534487",
"0.564323"
] | 0.0 | -1 |
Timber.d("onUpdate : " + face); | @Override public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face) {
VisionAPIManager.this.face = face;
computeFace(face);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void updateFace(Face face) {\n mFace = face;\n postInvalidate();\n }",
"@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }",
"@Override\n\tpublic void onUpdate() {\n\t\t\n\t}",
"@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face) {\n mOverlay.add(mEyesGraphic);\n\n updatePreviousProportions(face);\n\n float leftOpenScore = face.getIsLeftEyeOpenProbability();\n if (leftOpenScore == Face.UNCOMPUTED_PROBABILITY) {\n //cannot be computed nothing is done\n } else {\n isLeftOpen = (leftOpenScore > EYE_CLOSED_THRESHOLD);\n }\n\n float rightOpenScore = face.getIsRightEyeOpenProbability();\n if (rightOpenScore == Face.UNCOMPUTED_PROBABILITY) {\n //false nothing done\n } else {\n isRightOpen = (rightOpenScore > EYE_CLOSED_THRESHOLD);\n }\n\n\n if(face.getEulerZ()>20){\n isRotateRight = true;\n if (rotated==0){\n }\n rotated++;\n //security measure only true after you've passed the prev one\n if (winked>0){\n rotated++;\n }\n\n }\n\n winkLeft = !isLeftOpen && isRightOpen;\n if (winkLeft && rotated>0){\n winked++;\n }\n\n if (face.getIsSmilingProbability()>SMILE_THRESHOLD){\n isSmile = true;\n if (winked>0 && rotated>0){\n smile++;\n }\n\n }\n /*\n Log.i(\"test\",\"Y rotation is\" +face.getEulerY());\n Log.i(\"test\",\"Z rotation is\" +face.getEulerZ());\n Log.i(\"test\",\"smilin prob is\" +face.getIsSmilingProbability());\n*/\n mEyesGraphic.updateItem(face, rotated, winked, smile);\n }",
"protected void onUpdate() {\r\n\r\n\t}",
"@Override\n public void onNewItem(int faceId, Face item)\n {\n Log.d(APP_LOG_TAG, \"face detected\");\n }",
"public int getFace(){\n return face;\n }",
"void onMeshUpdate(MeshOrganizer mesh);",
"public void updateDirectionFace();",
"void onUpdate(Message message);",
"@Override\r\n\tpublic void updateGameFinished() {\n\t\t\r\n\t}",
"public void setFaceUp(){faceUp = true;}",
"@Override\r\n public void onUpdate() {\n super.onUpdate();\r\n }",
"public void update(){\r\n }",
"public void update(){\r\n\t\t\r\n\t}",
"protected int getFace() {\n return face;\n }",
"@Override\n public void onNewItem(int id, Face face) {\n mEyesGraphic = new FaceTrackerGraphic(mOverlay);\n }",
"public void update(){\n }",
"@Override\n public void update()\n {\n\n }",
"Lab.Update update();",
"@Override\n public void update() {\n\n }",
"public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}",
"public void update() ;",
"public void update() {\n\n }",
"public void update() {\n\n }",
"private void onFaceUp() {\n\t\t\tsensorManager.unregisterListener(this);\n\t\t\tfu=true;\n\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Face UP\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t}",
"public void onSurfaceTextureUpdated(SurfaceTexture surface) {\n }",
"@Override\n\tpublic void update(Game game) {\n\t\t\n\t}",
"@Override\n\tpublic void onUpdate(float dt) {\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n public void update() {\n }",
"@Override\n public void update(float delta) {\n\n }",
"@Override\n public void onNewItem(int id, Face face) {\n //mEyesGraphic = new com.eyegalaxy.eyegalaxydemo.GooglyEyesGraphic(mOverlay);\n }",
"public void update() {\r\n\t\t\r\n\t}",
"@Override\n public void update() {\n }",
"public void onLogFPS() {\n }",
"public void update() {\n\t\t\n\t}",
"public void update() {\n }",
"public void onLivingUpdate()\n {\n super.onLivingUpdate();\n }",
"@Override\r\n\tpublic void update() {\n\r\n\t}",
"@Override\r\n\tpublic void update() {\n\r\n\t}",
"@Override\n\tpublic void update() { }",
"@Override\n\tpublic void onUpdate() {\n\t\tlistener.onUpdate();\n\t}",
"public void update() {}",
"@Override\n\tpublic void update() {\n\t}",
"@Override\n\tpublic void update() {\n\t}",
"@Override\n\tpublic void update() {\n\t}",
"@Override\n public void update() {\n \n }",
"@Override\r\n\tpublic void update() {\n\t}",
"@Override\r\n\tpublic void update() {\n\t}",
"@Override\r\n\tpublic void update() {\r\n\t}",
"@Override\n\tpublic void update(float delta) {\n\t\t\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"@Override\n public void onSurfaceTextureUpdated(SurfaceTexture surface) {\n }",
"@Override\r\n\tpublic void update() {\r\n\r\n\t}",
"public void updateCamera() {\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"public String getFace() {\r\n return face;\r\n }",
"public String getFace() {\r\n return face;\r\n }",
"public void setFace(int face) {\n\t\tthis.face = face;\n\t}",
"@Override\n\tpublic void update(float deltaTime) {\n\t}",
"boolean turnFaceUp();",
"public void setFace(String face) {\n\t\tthis.face = face;\n\t}",
"@Override\r\n\tpublic void update(float delta) {\n\t\t\r\n\t}",
"@Override\n public void onUpdate(float v) {\n }",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"void onUpdate(IMirrorable o);",
"@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void update(float deltaTime) {\n\t\t\n\t}",
"@Override\n public void onCrimeUpdated(Crime crime) {\n }",
"public void update(MazeEventInfoField e) {\r\n }",
"@Override\r\n\tpublic void Update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void Update() {\n\t\t\r\n\t}",
"public int getFaceValue ()\n {\n return faceValue;\n }",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"public void onLivingUpdate()\n {\n this.updateArmSwingProgress();\n float var1 = this.getBrightness(1.0F);\n\n if (var1 > 0.5F)\n {\n this.entityAge += 2;\n }\n\n super.onLivingUpdate();\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Face UP\", Toast.LENGTH_LONG).show();\n\t\t\t\t}",
"public void update(Avion avion)\n\t{\n\t}"
] | [
"0.70175076",
"0.68031913",
"0.6741019",
"0.64801335",
"0.64541614",
"0.64448756",
"0.64388514",
"0.6435699",
"0.64299595",
"0.6365618",
"0.6358836",
"0.6221771",
"0.6219215",
"0.6205552",
"0.6201538",
"0.62000144",
"0.61954236",
"0.61789185",
"0.6175982",
"0.61614007",
"0.61498684",
"0.6140807",
"0.6130656",
"0.6127062",
"0.6127062",
"0.6121687",
"0.6117243",
"0.60964566",
"0.6087836",
"0.60824895",
"0.60824895",
"0.60824895",
"0.60824895",
"0.60824895",
"0.60824895",
"0.60824895",
"0.60824895",
"0.60824895",
"0.60824895",
"0.6073386",
"0.60682344",
"0.6064363",
"0.60622483",
"0.6061452",
"0.6047637",
"0.6037961",
"0.6036969",
"0.6028513",
"0.60231984",
"0.60231984",
"0.6013984",
"0.60126823",
"0.6011859",
"0.6007245",
"0.6007245",
"0.6007245",
"0.600342",
"0.59785724",
"0.59785724",
"0.5974241",
"0.5969765",
"0.59682906",
"0.59682906",
"0.59682906",
"0.59682906",
"0.59667957",
"0.59521145",
"0.595053",
"0.59486157",
"0.59486157",
"0.59486157",
"0.59486157",
"0.59486157",
"0.59486157",
"0.59460175",
"0.59460175",
"0.5942804",
"0.5940752",
"0.5931637",
"0.59288543",
"0.5928048",
"0.5928048",
"0.59164226",
"0.59164226",
"0.59164226",
"0.59164226",
"0.59164226",
"0.59072536",
"0.5896324",
"0.5896324",
"0.58841455",
"0.58773243",
"0.5872166",
"0.5871869",
"0.5871869",
"0.5871408",
"0.585029",
"0.5849672",
"0.58486056",
"0.5845744"
] | 0.68323106 | 1 |
Timber.d("onMissing : " + detectionResults); | @Override public void onMissing(FaceDetector.Detections<Face> detectionResults) {
VisionAPIManager.this.face = null;
VisionAPIManager.this.rightEye = VisionAPIManager.this.leftEye = null;
onComputeFaceDone.onNext(lastFrame);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onMissing(FaceDetector.Detections<Face> detectionResults)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n Log.d(APP_LOG_TAG, \"face missing\");\n faceTrackingListener.onFaceMissing(facesFound);\n }",
"@Override\n public void onMissing(FaceDetector.Detections<Face> detectionResults) {\n /*try {\n mOverlay.remove(mEyesGraphic);\n }catch (NullPointerException e){\n e.printStackTrace();\n }*/\n }",
"@Override\n public void onMissing(FaceDetector.Detections<Face> detectionResults) {\n mOverlay.remove(mEyesGraphic);\n }",
"boolean getMissingResults();",
"public boolean getMissingResults() {\n return missingResults_;\n }",
"@Override\r\n public void onSuccess(List<ImageLabel> labels) {\n Toast.makeText(AttendanceActivity.this, \"Got results from mlkit!!!\", Toast.LENGTH_SHORT).show();\r\n for (ImageLabel label : labels) {\r\n String text = label.getText();\r\n float confidence = label.getConfidence();\r\n int index = label.getIndex();\r\n Log.d(\"confidence\",text+\" \"+confidence);\r\n }\r\n }",
"private void logHitResult() {\n if (hitResult){\n targets--;\n if (targets == 0){\n taskComplete = true;\n }\n\n hitList[hitCount] = new Point(shotList[shotCount].x, shotList[shotCount].y);\n hitCount++;\n\n } else {\n missList[missCount]= new Point(shotList[shotCount].x, shotList[shotCount].y);\n missCount++;\n }\n }",
"public boolean getMissingResults() {\n return missingResults_;\n }",
"@Override\n public void onSuccess(List<FirebaseVisionImageLabel> labels) {\n dialog.dismiss();\n\n float predictions= 0;\n String names = \"\";\n for (FirebaseVisionImageLabel label: labels) {\n String name = label.getText();\n float confidence = label.getConfidence() *100;\n if (predictions == 0){\n predictions = confidence;\n names = name;\n }else if (confidence > predictions){\n predictions = confidence;\n names = name;\n }\n\n //frameImg.setImageBitmap(image.getBitmap());\n }\n Log.d(\"result\", \"onSuccess: prediction: \"+ predictions+\" name: \"+names);\n if (predictions >40){\n\n\n int percentage = (int) predictions;\n chartView.setPercent(predictions);\n text.setText(names +\" \"+percentage+\"%\");\n Animation animation = AnimationUtils.loadAnimation(ObjectDetectionSample.this, R.anim.slide_from_bottom);\n llResults.setAnimation(animation);\n llResults.setVisibility(View.VISIBLE);\n Toast.makeText(ObjectDetectionSample.this, \"name \"+names+\" confidence\"+percentage , Toast.LENGTH_SHORT).show();\n\n }else {\n chartView.setPercent(0);\n text.setText(\"Sorry! Couldn't predict.\");\n Animation animation = AnimationUtils.loadAnimation(ObjectDetectionSample.this, R.anim.slide_from_bottom);\n llResults.setAnimation(animation);\n llResults.setVisibility(View.VISIBLE);\n }\n\n isProcessingComplete =true;\n }",
"@Override\n public void onTestSkipped(ITestResult result) {\n\n }",
"@Override\n public void onTestSkipped(ITestResult result) {\n\n }",
"public int GetNMissing();",
"@Override\r\npublic void onTestSkipped(ITestResult arg0) {\n\t\r\n}",
"@Override\npublic void onTestSkipped(ITestResult result) {\n\t\n}",
"@Override\n public void onSuccess(List<FirebaseVisionImageLabel> labels) {\n dialog.dismiss();\n float predictions= 0;\n String names = \"\";\n for (FirebaseVisionImageLabel label: labels) {\n String name = label.getText();\n float confidence = label.getConfidence() *100;\n if (predictions == 0){\n predictions = confidence;\n names = name;\n }else if (confidence > predictions){\n predictions = confidence;\n names = name;\n }\n\n //frameImg.setImageBitmap(image.getBitmap());\n }\n if (predictions >40){\n\n int percentage = (int) predictions;\n chartView.setPercent(predictions);\n text.setText(names +\" \"+percentage+\"%\");\n Animation animation = AnimationUtils.loadAnimation(ObjectDetectionSample.this, R.anim.slide_from_bottom);\n llResults.setAnimation(animation);\n llResults.setVisibility(View.VISIBLE);\n Toast.makeText(ObjectDetectionSample.this, \"name \"+names+\" confidence\"+percentage , Toast.LENGTH_SHORT).show();\n\n }else {\n chartView.setPercent(0);\n text.setText(\"Sorry! Couldn't predict.\");\n Animation animation = AnimationUtils.loadAnimation(ObjectDetectionSample.this, R.anim.slide_from_bottom);\n llResults.setAnimation(animation);\n llResults.setVisibility(View.VISIBLE);\n }\n\n\n }",
"public void onTestSkipped(ITestResult result) {\n\n\t}",
"public void onTestSkipped(ITestResult result) {\n\t\t\n\t}",
"public void onTestSkipped(ITestResult result) {\n\t\t\n\t}",
"public void onTestSkipped(ITestResult result) {\n\t\t\n\t}",
"public void onTestSkipped() {}",
"void onTestSkipped(ITestResult result);",
"public void onTestSkipped(ITestResult result) {\n\t\t\r\n\t}",
"public synchronized void ignoreSpeechRecognitionResults() {\r\n\t\t\r\n\t\t//Instead of stopping the speech recognition we are ignoring it's results\r\n\t\tignoreSpeechRecognitionResults = true;\r\n\t\t\r\n\t}",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"@Override\n\tpublic void onTestSkipped(ITestResult result) {\n\t}",
"@Override\n\tpublic void onTestSkipped(ITestResult result) {\n\n\t}",
"@Override\n\tpublic void onTestSkipped(ITestResult result) {\n\t\t\n\t}",
"@Override\n\tpublic void onTestSkipped(ITestResult result) {\n\t\t\n\t}",
"@Override\n\tpublic void onTestSkipped(ITestResult result) {\n\t\t\n\t}",
"@Override\n\tpublic void onTestSkipped(ITestResult result) {\n\t\t\n\t}",
"private void checkForMissingEpisodes(){\n\t\tcheckForMissingEpisodes(null, null);\n\t}",
"@Override\n public boolean hasErrorResults() {\n return false;\n }",
"public void onTestSkipped(ITestResult result) {\n\t\tSystem.out.println(\"*********Test onTestSkipped :\"+result.getName());\r\n\t\t\r\n\t}",
"public void onTestSkipped(ITestResult result) {\n\t\tSystem.out.println(result.getName()+\"**********Test Skipped.............This is result.getName\");\r\n\t\t\r\n\t}",
"public void onTestSkipped(ITestResult arg0) {\n\n\t}",
"@Override\r\n\tpublic void onTestSkipped(ITestResult result) {\n\t\t\r\n\t}",
"public void onTestSkipped(ITestResult arg0) {\n\t\t\n\t}",
"public void onTestSkipped(ITestResult arg0) {\n\t\t\n\t}",
"@Override\n public void onPartialResults(Bundle arg0) {\n Log.i(\"SRL\", \"onPartialResults\");\n }",
"@Test\n public void getLatestScanResults_projectWithoutScans() {\n testMissingResultsCase(\"common-client-test-02-no-scans\");\n }",
"private void checkResults() {\n\t\tif (isOver()) {\n\t\t\tfor (GameListener gameListener : gameListeners) {\n\t\t\t\tgameListener.gameOverCallback();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void onTestSkipped(ITestResult arg0) {\n\n\t}",
"int getMissingCount();",
"public void onTestSkipped(ITestResult arg0) {\n\t\t\r\n\t}",
"@Override\r\npublic void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {\n\t\r\n}",
"@Override\n public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\n }",
"@Override\n public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\n }",
"public default boolean hasDetector() {\n\t\treturn false;\n\t}",
"public void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {\n\t\n}",
"@Override\r\n\tpublic void onTestSkipped(ITestResult arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onTestSkipped(ITestResult arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onTestSkipped(ITestResult Result) {\n\t\t\r\n\t}",
"@Override\npublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\n}",
"@Override\n\tpublic void onTestSkipped(ITestResult result) {\n\t\tSystem.out.println(\"THE TEST CASE HAS BEEN SKIPPED\");\n\t}",
"@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }",
"boolean hasUnknown();",
"public void onTestSkipped(ITestResult result) {\n\t\tSystem.out.println(\"********** \tTest Skipped : \"+result.getName());\n\t\t\n\t\t\n\t}",
"@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }",
"@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }",
"public String getDetectionName() {\r\n return detectionName;\r\n }",
"@Test(timeout = 4000)\n public void test105() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(true);\n assertTrue(evaluation0.getDiscardPredictions());\n }",
"public void infect() {\n isInfected = true;\n }",
"void analysisCompleted();",
"public static void printUnknown(Network validationNetwork){\n String results=\"\";\n for (int i = 0; i < data.getUnknown().size(); i++) {\n\n ArrayList<Double> outputs = network.runNetwork(data.getUnknown().get(i));\n int output= outputs.indexOf(Collections.max(outputs))+1;\n results+= output+\", \";\n\n }\n\n System.out.println(results);\n\n\n\n }",
"public void reportNotWorking() {\n reportNotWorking(null);\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n isProcessingComplete =true;\n dialog.dismiss();\n chartView.setPercent(0);\n text.setText(\"Sorry! Couldn't predict.\");\n Animation animation = AnimationUtils.loadAnimation(ObjectDetectionSample.this, R.anim.slide_from_bottom);\n llResults.setAnimation(animation);\n llResults.setVisibility(View.VISIBLE);\n Log.d(\"result\", \"onFailure: couldn't predict\");\n }",
"@Override\n\tpublic void onTestSkipped(ITestResult arg0) {\n\t\tSystem.out.println(\"on test skipped\");\n\t\t\n\t}",
"public Map<String,Double> doDetection(){\n if(recordingFile!=null){\r\n FileManager fm = new FileManager(recordingFile);\r\n signal = fm.readFile();\r\n if(signal!=null){\r\n //for(int i=0;i<256;i++)\r\n // System.out.print(signal[i]+\", \");\r\n System.out.println(\"tamaño:: \"+signal.length);\r\n Map<String,Double> resultadoCanal= classify();\r\n System.out.println(\"resultadoCanal \"+resultadoCanal.size());\r\n return resultadoCanal;\r\n }\r\n }\r\n else{\r\n System.out.println(\"El archivo no existe\");\r\n }\r\n return null;\r\n }",
"@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }",
"public void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {\n\n }",
"@Override\n public void onFailure(Call<ArrayList<LiveTracking>> call, Throwable t) {\n Log.e(\"TAG\", t.toString());\n }",
"public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }",
"@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}",
"@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}",
"@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}",
"@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}",
"@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}",
"@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}",
"@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}",
"@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t}",
"public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\tSystem.out.println(\"*********Test onTestFailedButWithinSuccessPercentage :\"+result.getName());\r\n\t}",
"@Override\r\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(AttendanceActivity.this, \"Failed to get results from mlkit!!!\", Toast.LENGTH_SHORT).show();\r\n }",
"public void printFailure() {\n //\n }",
"@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {\n\t\tSystem.out.println(\"on failed but within success percentage\");\n\t\t\n\t}",
"@Override\n public void onDataNotAvailable() {\n Log.d(TAG, \"onDataNotAvailable: \");\n }",
"@Override\n\t\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\t\n\t\t}",
"@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }",
"public void clearMissing()\n\t\t{\n\t\t\tm_missingInformation.clear();\n\t\t}",
"double getMissChance();",
"@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\n\t}",
"@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}",
"void performDetection( List<Point2D_F64> detectedDots ) {\n\t\t// Detect new markers from their definitions\n\t\tllahOps.lookupDocuments(detectedDots, minLandmarkDoc, foundDocs);\n\n\t\t// save the observations, but ignore previously detected markers\n\t\tfor (int i = 0; i < foundDocs.size(); i++) {\n\t\t\tLlahOperations.FoundDocument foundDoc = foundDocs.get(i);\n\t\t\tif (globalId_to_track.containsKey(foundDoc.document.documentID))\n\t\t\t\tcontinue;\n\n\t\t\tTrack track = currentTracks.grow();\n\t\t\ttrack.globalDoc = foundDoc.document;\n\t\t\tif (fitHomographAndPredict(detectedDots, foundDoc, track)) {\n\t\t\t\tglobalId_to_track.put(track.globalDoc.documentID, track);\n\t\t\t\tif (verbose != null) verbose.println(\" detected doc \" + track.globalDoc.documentID);\n\t\t\t} else {\n\t\t\t\tcurrentTracks.removeTail();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {\n\t\t\n\t}",
"public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}",
"public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}",
"public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}",
"@Test\n public void getLatestScanResults_projectWithAllScansFailed() {\n testMissingResultsCase(\"common-client-test-03-all-scans-failed\");\n }"
] | [
"0.72386444",
"0.6805953",
"0.6343595",
"0.6104878",
"0.58107096",
"0.57471395",
"0.5743319",
"0.56970394",
"0.5632955",
"0.5590725",
"0.5590725",
"0.5580734",
"0.5546149",
"0.55382586",
"0.5495193",
"0.5482915",
"0.5452729",
"0.5452729",
"0.5452729",
"0.54414725",
"0.54276377",
"0.5412574",
"0.5410413",
"0.5405259",
"0.5404579",
"0.53876394",
"0.5386923",
"0.5386923",
"0.5386923",
"0.5386923",
"0.538434",
"0.5377584",
"0.5370956",
"0.5353914",
"0.53487176",
"0.532918",
"0.5327986",
"0.5327986",
"0.53136593",
"0.5290692",
"0.528858",
"0.52784836",
"0.5266961",
"0.52509856",
"0.523877",
"0.5218932",
"0.5218932",
"0.5218734",
"0.52144724",
"0.5197989",
"0.5197989",
"0.5197251",
"0.51950675",
"0.51917136",
"0.5189808",
"0.5187496",
"0.51802045",
"0.5178232",
"0.5165707",
"0.5160858",
"0.51574016",
"0.51523614",
"0.51467913",
"0.51378155",
"0.5135085",
"0.5133682",
"0.5131314",
"0.5116073",
"0.5104625",
"0.5102181",
"0.51000994",
"0.50992894",
"0.50908315",
"0.50908315",
"0.50908315",
"0.50908315",
"0.50908315",
"0.50908315",
"0.50908315",
"0.5090735",
"0.5087787",
"0.5087236",
"0.5082295",
"0.5074502",
"0.5068075",
"0.5063497",
"0.5059672",
"0.50566065",
"0.50421625",
"0.5040547",
"0.50374514",
"0.50374514",
"0.50374514",
"0.50374514",
"0.5031952",
"0.5025812",
"0.5024985",
"0.5024985",
"0.5024985",
"0.50197554"
] | 0.6304853 | 3 |
////////////// // PUBLIC // ////////////// | public void initFrameSizeChangeObs(Observable<Frame> obs) {
subscriptions.add(
obs.onBackpressureDrop().subscribe(frame -> initFaceTracker(frame.isFrontCamera())));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n protected void init() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n public void init() {\n }",
"@Override\n void init() {\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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}",
"private void init() {\n\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\n public void init() {}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void 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\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void init() {\n\n\n\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\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 nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"private void initialize() {\n\t\t\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n public void initialize() { \n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\r\n\tprotected void processInit() {\n\r\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n }",
"private void init() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"public void init() {\n\t\t\n\t}",
"private void strin() {\n\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void initialize() {\n }",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\tpublic void initialize() {\n\t\t\n\t}",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }"
] | [
"0.65991145",
"0.6520734",
"0.6444914",
"0.6434662",
"0.64181453",
"0.64023733",
"0.6326317",
"0.6283343",
"0.6276788",
"0.6276788",
"0.6276788",
"0.6276788",
"0.6276788",
"0.6276788",
"0.6267",
"0.6227881",
"0.62111485",
"0.6201008",
"0.6201008",
"0.6184009",
"0.6178804",
"0.6178804",
"0.6178804",
"0.6178804",
"0.6178804",
"0.6177793",
"0.61658543",
"0.61470634",
"0.61416775",
"0.61398524",
"0.61381006",
"0.61285716",
"0.6109833",
"0.6103484",
"0.6103484",
"0.610144",
"0.610144",
"0.610144",
"0.609812",
"0.609812",
"0.60892385",
"0.60892385",
"0.60892385",
"0.60888046",
"0.60865957",
"0.60815275",
"0.6080486",
"0.6075017",
"0.6065911",
"0.60431623",
"0.6016189",
"0.6016189",
"0.60159403",
"0.6011059",
"0.60103726",
"0.60024565",
"0.5998251",
"0.5997783",
"0.599264",
"0.599264",
"0.59894156",
"0.5988807",
"0.59642553",
"0.596359",
"0.596359",
"0.596359",
"0.59635025",
"0.59635025",
"0.5950693",
"0.59504104",
"0.59494483",
"0.5931373",
"0.59308916",
"0.5927982",
"0.5918781",
"0.589912",
"0.58985347",
"0.5893102",
"0.589071",
"0.5889472",
"0.58883303",
"0.58698523",
"0.5869679",
"0.5869679",
"0.5869679",
"0.58688015",
"0.5859252",
"0.58499676",
"0.58232355",
"0.58174086",
"0.5815498",
"0.58110636",
"0.58110636",
"0.5810898",
"0.5807611",
"0.5807611",
"0.5801569",
"0.57991135",
"0.5794982",
"0.5794982",
"0.5794982"
] | 0.0 | -1 |
/////////////// OBSERVABLES // /////////////// | public Observable<Float> onFaceWidthChange() {
return onFaceWidthChange;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Object getObservedObject();",
"void onRecvObject(Object object);",
"public Object getUpdate(IObserver obj);",
"@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}",
"public void receiveResultservicedis(\n ) {\n }",
"private void viewPendingRequests() {\n\n\t}",
"private void writeObject(ObjectOutputStream out) throws IOException {\n\tout.defaultWriteObject();\n\tservID.writeBytes(out);\n }",
"@Override\n\tpublic void conferenceroom() {\n\t\t\n\t}",
"@Override\n\tpublic void receiveRequest() {\n\n\t}",
"@Override\n\tpublic void onResourceDelivered(ResourceResponse arg0) {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}",
"public void request() {\n }",
"public abstract void observeSpecificData(Service service);",
"private RepositorioOrdemServicoHBM() {\n\n\t}",
"@Override\r\n\tpublic void notifyObservers() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void messageReceived(Object obj) {\n\t\t\r\n\t}",
"@Override\n\tpublic void OnRequest() {\n\t\t\n\t}",
"public interface Observer {\n @GET(\"/?q=simpsons+characters&format=json\")\n Observable<Model> fetchData();\n\n}",
"@Override\r\n\tprotected void processRespond() {\n\r\n\t}",
"@Override\r\n\tprotected void processRespond() {\n\r\n\t}",
"public abstract O getObserver();",
"public java.lang.String getObservacion(){\n return localObservacion;\n }",
"private void sendReceiveRes(){\n\t}",
"public interface Observed {\n\n public void addObserver(Observer o);\n\n public void removeObserver(Observer o);\n}",
"public interface OAObjectCacheListener<T extends OAObject> {\n \n /**\n * Called when there is a change to an object.\n */\n public void afterPropertyChange(T obj, String propertyName, Object oldValue, Object newValue);\n\n /** \n * called when a new object is added to OAObjectCache, during the object construction. \n */\n public void afterAdd(T obj);\n \n public void afterAdd(Hub<T> hub, T obj);\n \n public void afterRemove(Hub<T> hub, T obj);\n \n public void afterLoad(T obj);\n \n}",
"public interface DataObserver {\n }",
"public interface IServerResponseListener {\n\n\t/**\n\t * Receive requested \n\t * \n\t * @param requestId the same id number as the request* method that caused\n\t * \tthis request returned\n\t * @param data raw data, allways a List<RequestedModelType>\n\t */\n\tpublic void onServerResponse(int requestId, Object data);\n\t\n}",
"private RCProxy() {\n\t\tstate = new DefaultState();\n\t\tSTBListener.instance().addObserver(this);\n\t}",
"@Override\n\tpublic void NotifyObserver() {\n\n\t}",
"public interface CBIObservable {\n public void reload();\n}",
"@Override\n public synchronized void inspectBin(Empty request, StreamObserver<BinStatusUpdate> responseObserver) {\n responseObserver.onNext(buildNewStatus());\n responseObserver.onCompleted();\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}",
"void requestReceived( C conn ) ;",
"public ClientObserver(OutputStream outputToClient){\n try {\n this.outputToClient = new ObjectOutputStream(outputToClient);\n } catch (IOException e) {\n System.out.println(\"Could not create ObjectOutputStream in ClientObserver\");\n }\n }",
"public void subscribe( Observer< S, Info > obs );",
"void getRequests();",
"public interface EndpointBase {\n\n boolean isIdleNow();\n\n /**\n * @param connectionTimeout\n * @param methodTimeout\n */\n void setTimeouts(int connectionTimeout, int methodTimeout);\n\n /**\n * @param alwaysMainThread\n */\n void setCallbackThread(boolean alwaysMainThread);\n\n /**\n * @param flags\n */\n void setDebugFlags(int flags);\n\n int getDebugFlags();\n\n /**\n * @param delay\n */\n void setDelay(int delay);\n\n void addErrorLogger(ErrorLogger logger);\n\n void removeErrorLogger(ErrorLogger logger);\n\n void setOnRequestEventListener(OnRequestEventListener listener);\n\n\n void setPercentLoss(float percentLoss);\n\n int getThreadPriority();\n\n void setThreadPriority(int threadPriority);\n\n\n ProtocolController getProtocolController();\n\n void setUrlModifier(UrlModifier urlModifier);\n\n /**\n * No log.\n */\n int NO_DEBUG = 0;\n\n /**\n * Log time of requests.\n */\n int TIME_DEBUG = 1;\n\n /**\n * Log request content.\n */\n int REQUEST_DEBUG = 2;\n\n /**\n * Log response content.\n */\n int RESPONSE_DEBUG = 4;\n\n /**\n * Log cache behavior.\n */\n int CACHE_DEBUG = 8;\n\n /**\n * Log request code line.\n */\n int REQUEST_LINE_DEBUG = 16;\n\n /**\n * Log request and response headers.\n */\n int HEADERS_DEBUG = 32;\n\n /**\n * Log request errors\n */\n int ERROR_DEBUG = 64;\n\n /**\n * Log cancellations\n */\n int CANCEL_DEBUG = 128;\n\n /**\n * Log cancellations\n */\n int THREAD_DEBUG = 256;\n\n /**\n * Log everything.\n */\n int FULL_DEBUG = TIME_DEBUG | REQUEST_DEBUG | RESPONSE_DEBUG | CACHE_DEBUG | REQUEST_LINE_DEBUG | HEADERS_DEBUG | ERROR_DEBUG | CANCEL_DEBUG;\n\n int INTERNAL_DEBUG = FULL_DEBUG | THREAD_DEBUG;\n\n /**\n * Created by Kuba on 17/07/14.\n */\n interface UrlModifier {\n\n String createUrl(String url);\n\n }\n\n interface OnRequestEventListener {\n\n void onStart(Request request, int requestsCount);\n\n void onStop(Request request, int requestsCount);\n\n }\n}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n protected void prot() {\n }",
"ManagedEndpoint next();",
"@Override\n\tpublic void callback(Object o) {}",
"@Override\r\n protected void fetchData() {\n\r\n }",
"private void bindObject() {\n }",
"public Object getObject() ;",
"public ProxyableObject()\r\n {\r\n id = new command.GlobalObjectId();\r\n command.ObjectDB.getSingleton().store(id.getLocalObjectId(), this);\r\n \r\n //observable = new ObservabilityObject();\r\n }",
"protected void send(O operation)\n {\n }",
"public interface ServerProcessor {\n\n\t/**\n\t * Handle request,then return Object\n\t * \n\t * @param request\n\t * @return Object\n\t */\n\tObject handle(Object request);\n\t\n}",
"public void register(IObserver obj);",
"@Override\n public StreamObserver<RequestData> clientSideStreamService(StreamObserver<ResponseData> responseObserver) {\n return new StreamObserver<RequestData>() {\n private ResponseData.Builder builder = ResponseData.newBuilder();\n\n\n @Override\n public void onNext(RequestData request) {\n // TODO Auto-generated method stub\n System.out.println(\"Requestor:\" + request.getName());\n System.out.println(\"Request Message:\" + request.getMessage());\n }\n\n @Override\n public void onError(Throwable t) {\n // TODO Auto-generated method stub\n\n }\n\n @Override\n public void onCompleted() {\n // TODO Auto-generated method stub\n builder.setMessage(\"All request data received completely!\");\n responseObserver.onNext(builder.build());\n responseObserver.onCompleted();\n }\n\n };\n }",
"@Override\n public void socket() {\n }",
"@Override\n\tpublic void service(ServletRequest arg0, ServletResponse arg1)\n\t\t\tthrows ServletException, IOException\n\t{\n\t\tsuper.service(arg0, arg1);\n\t\trenewObject(arg0, arg1);\n\t\tout.print(\"do my service\");\n\t}",
"@Override\n public void eventoCargarData() {\n }",
"Consumable() {\n\t}",
"void attach (ObservateurGenerateurAsync observateur);",
"public void serialize() {\n\t\t\n\t}",
"@Override\n\tpublic void getData() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"@Override\n\tpublic void service(ServletRequest req, ServletResponse res)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}",
"public FeedBinServiceImpl(Bin bin) {\n this.bin = bin;\n this.observers = ConcurrentHashMap.newKeySet();\n }",
"public interface OSCMessageObserver {\r\n\t\r\n\t/**\r\n\t * Sets the received OSC message to the data management class to process it.\r\n\t * <p>\r\n\t * This method is automatically called when a new OSC message is received.\r\n\t * \r\n\t * @param aMessage the received OSC message\r\n\t */\r\n\tpublic void messageReceived(OscMessage aMessage);\r\n}",
"@Override\n void onValueWrite(SerializerElem e, Object o) {\n\n }",
"void assignDataReceived(Serializable dataReceived);",
"public interface ApiServer {\n//\n @GET(\"umIPmfS6c83237d9c70c7c9510c9b0f97171a308d13b611?uri=homepage\")\n Observable<HomeBean> getHome();\n @POST\n Observable<Login> getDengLu(@Url String name, @QueryMap Map<String, String> paw);\n @GET(\"product/getCatagory\")\n Observable<Sort_lift> lift();\n @GET\n Observable<Sort_right> right(@Url String s);\n @GET\n Observable<Commodity_pagingBean> xia(@Url String s);\n @GET\n Observable<detailsBean> spxq(@Url String ss);\n @GET\n Observable<AddcartBean> add(@Url String s);\n @GET\n Observable<QurryBean> qurry(@Url String s);\n @GET\n Observable<AddcartBean> delete(@Url String s);\n @GET\n Observable<AddcartBean> addDd(@Url String s);\n @GET\n Observable<OrderBean> Ddlb(@Url String s);\n\n\n\n\n\n\n}",
"public interface SendOutService {\n\n String BEAN_NAME = \"SendOutService\";\n\n /**\n * Returns all the sendInfo nodes associated with given document.\n *\n * @param document document NodeRef\n * @return list of sendInfo nodes associated with given document\n */\n List<SendInfo> getDocumentSendInfos(NodeRef document);\n\n /**\n * Update searchable send info properties according to document's sendInfo child nodes\n *\n * @param document document NodeRef\n */\n void updateSearchableSendInfo(NodeRef document);\n\n /**\n * Build searchable send info data from document's sendInfo child nodes\n *\n * @param document document NodeRef\n * @return Map with documents properties populated with document's sendInfo values\n */\n Map<QName, Serializable> buildSearchableSendInfo(NodeRef document);\n\n /**\n * Sends out document.\n * Inspects all the given recipients and based on send mode sends out the document through DVK to those who support it (based on addressbook) and through email to others.\n * Registers sendInfo child entries under document and checks if given document is a reply outgoing letter and updates originating document info if needed.\n *\n * @param document subject document for sending out\n * @param names list of recipient names\n * @param emails list of recipient email addresses\n * @param modes list of recipient send modes\n * @param idCodes TODO\n * @param fromEmail from email address\n * @param subject mail subject\n * @param content mail content text\n * @param zipIt if attachments should be zipped into single file, or sent as separate files\n * @param fileNodeRefs list of file node refs as strings to match those files which should be sent out as attachments from given document\n * @return true\n */\n boolean sendOut(NodeRef document, List<String> names, List<String> emails, List<String> modes, List<String> idCodes, List<String> encryptionIdCodes, List<X509Certificate> allCertificates, \n \t\tString fromEmail, String subject, String content, List<NodeRef> fileRefs, boolean zipIt);\n\n /** @return {@code List<Pair<recipientName, recipientRegistrationNr>> } */\n List<Pair<String, String>> forward(NodeRef document, List<String> names, List<String> emails, List<String> modes, String fromEmail, String content, List<NodeRef> fileRefs);\n\n NodeRef addSendinfo(NodeRef document, Map<QName, Serializable> props);\n\n /**\n * If updateSearchableSendInfo is false then updateSearchableSendInfo() must manually be called later\n */\n NodeRef addSendinfo(NodeRef document, Map<QName, Serializable> props, boolean updateSearchableSendInfo);\n\n List<ContentToSend> prepareContents(NodeRef document, List<NodeRef> fileRefs, boolean zipIt) throws Exception;\n \n List<ContentToSend> prepareContents(List<EmailAttachment> attachments);\n\n void addSapSendInfo(Node document, String dvkId);\n\n boolean hasDocumentSendInfos(NodeRef document);\n\n Long sendForInformation(List<String> authorityIds, Node docNode, String emailTemplate, String subject, String content);\n\n Date getEarliestSendInfoDate(NodeRef docRef);\n\n}",
"@Override\n public void feedingHerb() {\n\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"public void service() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"void requestData();",
"ResponseDTO performServerActions();",
"@Override\r\n public void flush() {\n\r\n }",
"public interface OnDataGetListener {\n void onDataGet(Object data);\n}",
"@Override\n\tpublic void getStatus() {\n\t\t\n\t}",
"OptimizeResponse() {\n\n\t}",
"@Override\n\t\t\tpublic void respuestaObj(WSInfomovilMethods metodo,\n\t\t\t\t\tWsInfomovilProcessStatus status, Object obj) {\n\t\t\t\t\n\t\t\t}",
"private void sendObject(Object obj){\r\n try {\r\n out.reset();\r\n out.writeObject(obj);\r\n out.flush();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"@Override\n\tpublic void receive() {\n\t}",
"private void sendUpdateConnectionInfo() {\n\n }",
"private synchronized void onRequest(ObjectMessage message) {\n try {\n Serializable request = message.getObject(); //serializer.requestFromString(message.getText());\n activeRequests.put(request, message);\n requestListener.receivedRequest(request);\n } catch (JMSException ex) {\n Logger.getLogger(AsynchronousReplier.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"private static interface Service {}",
"void getDataFromServer();",
"public interface IObserverPartie {\n\n\t/**\n\t * Notifie aux observers que les attributs des joueurs ont ete modifies\n\t */\n\tpublic void updateJoueurs();\n\t\n}",
"@Override\n public void get() {}",
"void getPeopleRx();",
"@Override\r\n\tprotected void doService(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tSystem.out.println(\"in child doService\");\r\n\t\t\r\n\t}",
"public interface IModel{\r\n ApiServer doRxRequest();\r\n}",
"BoundObject(){}",
"private RESTBackend()\n\t\t{\n\t\t\t\n\t\t}",
"@Override\n\tpublic void GetOut() {\n\t\t\n\t}",
"public void sendRRequests() {\n\n }",
"public interface ResourceChangeForMaketService {\n\n void send(Object o,User operator);\n}",
"public interface EOAssociationConnector{\n /**\n * Invoked when one of the receiver's subcontrollers is disposed as a transient controller. Instructs the receiver to assume responsibility for managing the subcontroller's EOAssociation, association.\n */\n abstract void takeResposibilityForConnectionOfAssociation(com.webobjects.eointerface.EOAssociation association);\n\n}",
"public Ice.AsyncResult begin_addObserver(ServiceObserverPrx observer);",
"public interface IWelfareModel {\n void getImagesData(int page,int count, DisposableObserver<WelfareBean> subscribe);\n}",
"@Override\n\tpublic void buscar() {\n\t\t\n\t}",
"public interface IOkHttpUpdate {\n\n /**\n * 显示进度\n * @param bytesRead 当前读取进度\n * @param contentLength 总进度\n * @param done 是否完成\n */\n void onUpdate(long bytesRead, long contentLength, boolean done);\n\n\n\n}",
"private void send(Object o) {\r\n try {\r\n System.out.println(\"02. -> Sending (\" + o +\") to the client.\");\r\n this.os.writeObject(o);\r\n this.os.flush();\r\n } \r\n catch (Exception e) {\r\n System.out.println(\"XX.\" + e.getStackTrace());\r\n }\r\n }",
"public Object getUpdate(Observer obj);",
"private void handleActionGetAllBiers(String param1, String param2) {\n // TODO: Handle action Foo\n Log.i(\"getallbiers\",\"Log de handleActionGetAllBiers\");\n Log.i(\"getallbiers\",\"Thread service name : \"+Thread.currentThread().getName());\n URL url = null;\n\n try {\n\n url = new URL(\"http://binouze.fabrigli.fr/bieres.json\");\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.connect();\n\n if(HttpURLConnection.HTTP_OK == conn.getResponseCode()){\n copyInputStreamToFile(conn.getInputStream(), new File(getCacheDir(),\"bieres.json\"));\n Log.d(\"getallbiers\",\"Bieres json downloaded\");\n }\n\n //lance un intent pour signaler l'update\n LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent(MainActivity.BIERS_UPDATE));\n\n }catch(MalformedURLException e){\n e.printStackTrace();\n\n\n } catch (IOException e) {\n e.printStackTrace();\n\n\n }\n\n }"
] | [
"0.6215433",
"0.6042823",
"0.6028885",
"0.59069574",
"0.58650357",
"0.5845662",
"0.5764811",
"0.5707235",
"0.5689948",
"0.5665552",
"0.5664281",
"0.56503206",
"0.5635477",
"0.5626213",
"0.5621292",
"0.5621263",
"0.56085217",
"0.55902845",
"0.5583211",
"0.55718434",
"0.55718434",
"0.5567082",
"0.55595964",
"0.5556288",
"0.5541229",
"0.5514607",
"0.5508804",
"0.5508154",
"0.55058646",
"0.5497817",
"0.54969007",
"0.54886746",
"0.54852974",
"0.5484422",
"0.548222",
"0.5470516",
"0.54606605",
"0.5460164",
"0.5455663",
"0.5436653",
"0.5434608",
"0.54297227",
"0.5416212",
"0.54072946",
"0.54070705",
"0.5402898",
"0.5399288",
"0.53988737",
"0.5389049",
"0.5387582",
"0.53812695",
"0.5376567",
"0.5374553",
"0.537399",
"0.5372966",
"0.5368409",
"0.5362832",
"0.5361945",
"0.5361668",
"0.53598857",
"0.535963",
"0.53582346",
"0.53555644",
"0.5354782",
"0.5351141",
"0.53509784",
"0.53493947",
"0.5344468",
"0.5344248",
"0.5334927",
"0.53301674",
"0.5324364",
"0.5322632",
"0.5319733",
"0.53172326",
"0.5315199",
"0.5314352",
"0.53116",
"0.5309895",
"0.5307305",
"0.5306272",
"0.5302996",
"0.53019524",
"0.5301543",
"0.5299793",
"0.52976435",
"0.5294599",
"0.52915204",
"0.5290235",
"0.5289883",
"0.5283598",
"0.52804327",
"0.5278667",
"0.5278649",
"0.52771175",
"0.52733505",
"0.5272793",
"0.52717626",
"0.5271724",
"0.52650714",
"0.526347"
] | 0.0 | -1 |
Constructor for objects of class TShirtWithLogo | public TShirtWithLogo(double x, double y, double width,
double heightOfSleeves, double sleeveHeight, double sleeveLength)
{
// construct the basic house shell
super(x,y,width,heightOfSleeves, sleeveHeight, sleeveLength);
// get the GeneralPath that we are going to append stuff to
GeneralPath gp = this.get();
Ellipse2D.Double e1 = new Ellipse2D.Double(x,
y, width, (heightOfSleeves+sleeveHeight));
Ellipse2D.Double e2 = new Ellipse2D.Double(x,
y, width/1.5, (heightOfSleeves+sleeveHeight)/1.5);
Ellipse2D.Double e3 = new Ellipse2D.Double(x,
y, width/3, (heightOfSleeves+sleeveHeight)/3);
// GeneralPath wholeShirt = this.get();
gp.append(e1, false);
gp.append(e2, false);
gp.append(e3, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Turtle(int x, int y, String image){super(x, y, \"turtle.png\");}",
"public Shot() {\n }",
"public Troop() //make a overloaded constructor \n\t{\n\t\ttroopType = \"light\"; \n\t\tname = \"Default\";\n\t\thp = 50;\n\t\tatt = 20;\n\t}",
"public WebmailLogo() {\n\n }",
"public BasicSpecies() {\r\n\r\n\t}",
"public YellowTea() {\n super();\n this.setName(\"Yellow Tea\");\n this.setPrice(3.50);\n\n this.brewFirstLiquid = new BrewHotWater();\n this.brewSecondLiquid = new BrewNoLiquid();\n this.brewThirdLiquid = new BrewNoLiquid();\n\n System.out.println(\"Brewing Yellow Tea...\");\n }",
"public Odontologo() {\n }",
"public ClassTester()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(new NonScrollingBackground(\"Stage - 0.jpg\"),300,131);\n addObject(playerMage,35,170);\n addObject(new AbilityDisplayer(playerMage),125,268);\n }",
"public CustomShirt(int itemID, String description, char colorCode, double price, int orders) {\n\n super( itemID, description, colorCode, price, orders);\n\n }",
"public Driver() {\r\n\t\tShoe shoes[] = new Shoe[10]; //Array of ten shoes\r\n\t}",
"public Stage1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 900, 1);\n \n GreenfootImage image = getBackground();\n image.setColor(Color.BLACK);\n image.fill();\n star();\n \n \n \n //TurretBase turretBase = new TurretBase();\n playerShip = new PlayerShip();\n scoreDisplay = new ScoreDisplay();\n addObject(scoreDisplay, 100, 50);\n addObject(playerShip, 100, 450);\n \n }",
"public HSIImage()\r\n {\r\n }",
"public Supercar() {\r\n\t\t\r\n\t}",
"public Sloth() {\n\t\tsuper.setSpeciesWeight(15.00);\n\t\tsuper.setSpeciesDamage(18.00);\n\t\tsuper.setSpeciesName(\"Sloth\");\n\t}",
"public Tiles() {\n basketWeave();\n med1();\n med2();\n }",
"public Turtle(ScreenBox turtle_screen, Image turtle_image) {\n\t\tscreen = turtle_screen;\n\t\timage = turtle_image;\n\t\timageList.add(image);\n\t\tinitalizeTurtle();\n\t}",
"public Soil()\n\t{\n\n\t}",
"public Tree() {\n super.springPictureName = \"tree2.png\";\n super.summerPictureName = \"tree4.png\";\n super.autumnPictureName = \"tree5.png\";\n super.winterPictureName = \"tree7.png\";\n super.eachElementCapacity = 3;\n\n }",
"public Husdjurshotell(){}",
"LogoTask()\n {\n //create instance of LogoTask()\n }",
"public Mesita()\r\n {\r\n super(\"mesa.png\"); \r\n }",
"public Cheese() {\n\n }",
"private Hero createHeroObject(){\n return new Hero(\"ImageName\",\"SpiderMan\",\"Andrew Garfield\",\"6 feet 30 inches\",\"70 kg\",\n \"Webs & Strings\",\"Fast thinker\",\"Webs & Flexible\",\n \"200 km/hour\",\"Very fast\",\"Spiderman - Super Hero saves the world\",\n \"SuperHero saves the city from all the villians\");\n }",
"public void testConstructors()\n {\n checkClass(HStaticIconTest.class);\n\n Image image = new EmptyImage();\n checkConstructor(\"HStaticIcon()\", new HStaticIcon(), 0, 0, 0, 0, null, false);\n checkConstructor(\"HStaticIcon(Image img)\", new HStaticIcon(image), 0, 0, 0, 0, image, false);\n checkConstructor(\"HStaticIcon(Image img, int x, int y, int w, int h)\", new HStaticIcon(image, 10, 20, 30, 40),\n 10, 20, 30, 40, image, true);\n }",
"public Item()\r\n {\r\n gen = new Random();\r\n color = new Color(gen.nextInt());\r\n x = 200;\r\n w = 100;\r\n h = 18;\r\n }",
"public Troco() {\n }",
"public SecondaryGenres() {\n }",
"public EspressoDrink(){\t\n\t}",
"public Tigre() {\r\n }",
"public Thumbnail() {\n this(100, 100);\n }",
"public Turtle(String name, int x, int y) {\n\tthis.name= name;\n\tLocX1 = 0;\n\tLocY1 = 0;\n\tLocX2 = 0;\n\tLocY2 = 0;\n\tangle = 0; // rotation angle \n\twriting = true; // default pen down\n\tcolor = Color.BLACK; // default color\n\theading = 90; // default facing north, 90 degrees\n\tdelta = 0;\n\tdraw = true;\n\ttry {\n bimg = ImageIO.read(new File(\"./Images/TurtleBlue.png\"));\n } catch (Exception e) {\n e.printStackTrace();\n }\n}",
"public Food() {\n\t\tsuper(\"FOOD.png\");\n\t}",
"public Triagem() {\n ImageIcon logo = new ImageIcon(\"src/Imagens/icone.png\");\n setIconImage(logo.getImage());\n initComponents();\n setLocationRelativeTo(null);\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n }",
"public Fish(String species, String desc)\n {\n super(species, desc);\n toy = \"Jesus net\";\n }",
"@Override\n\tpublic void init() {\n\t\tEffect().registerEffect(40, 40, 3, \"ExplosionSheet.png\");\n\t\tbg = new Background();\n\t\tobj = new TestObj();\n\t\tobj.init();\n\t\ttest = new Test2[50];\n\t\tfor(int x = 0; x < test.length; x++ )\n\t\t\ttest[x] = new Test2(x*30-600,30 *(float)Math.pow(-1, x), \"g.png\");\n\t\t\n\t\ttest2 = new Test2[50000];\n\t\tfor(int x = 0; x < test2.length; x++ )\n\t\t\ttest2[x] = new Test2(x*30-600,150+30 *(float)Math.pow(-1, x), \"AlienPawn.png\");\n\t\t\n\t\ttest3 = new Test2[50000];\n\t\tfor(int x = 0; x < test3.length; x++ )\n\t\t\ttest3[x] = new Test2(x*30-600,-200+30 *(float)Math.pow(-1, x), \"AlienPawn - Copy.png\");\n\t\n\t}",
"public HealthyWorld()\n { \n // Create a new wolrd with 800x400 cells and a cell size of 1x1 pixels\n super(800, 400, 1);\n healthLevel = 10;\n time = 2000;\n showHealthLevel();\n showTime();\n // Create a kid in the middle of the screen\n Kid theKid = new Kid();\n this.addObject(theKid, 400, 350);\n }",
"public BoardFactory(PacManSprites spriteStore) {Collect.Hit(\"BoardFactory.java\",\"BoardFactory(PacManSprites spriteStore)\");this.sprites = spriteStore; Collect.Hit(\"BoardFactory.java\",\"BoardFactory(PacManSprites spriteStore)\", \"689\");}",
"public PlantingHarvester(int x, int y)\n {\n super(x, y);\n }",
"public TrapTiles()\r\n {\r\n id = 604 ; \r\n }",
"public Cheese(Sandwich sandwich){\n super(sandwich);\n }",
"public Sandwich()\n\t{super();\n \n\t\t\n\t}",
"public CarrierShape()\n {\n super();\n }",
"public PthTestContentsInfo() {\n }",
"public Strawberries() {\r\n\t\tsuper(price, nutrition, name);\r\n\t}",
"public void initTiles() {\n\t\ttileList.add(new Go());\n\n\t\t// Brown properties\n\t\tProperty mediterranean = new Property(\"Mediterranean\");\n\t\tProperty balticAve = new Property(\"Baltic Avenue\");\n\n\t\t// Light blue properties\n\t\tProperty orientalAve = new Property(\"Oriental Avenue\");\n\t\tProperty vermontAve = new Property(\"Vermont Avenue\");\n\t\tProperty connecticutAve = new Property(\"Connecticut Avenue\");\n\n\t\t// Magenta properties\n\t\tProperty stCharles = new Property(\"St. Charles Place\");\n\t\tProperty statesAve = new Property(\"States Avenue\");\n\t\tProperty virginiaAve = new Property(\"Virginia Avenue\");\n\n\t\t// Orange properties\n\t\tProperty stJames = new Property(\"St. James Place\");\n\t\tProperty tennesseeAve = new Property(\"Tennessee Avenue\");\n\t\tProperty newYorkAve = new Property(\"New York Avenue\");\n\n\t\t// Red properties\n\t\tProperty kentuckyAve = new Property(\"Kentucky Avenue\");\n\t\tProperty indianaAve = new Property(\"Indiana Avenue\");\n\t\tProperty illinoisAve = new Property(\"Illinois Avenue\");\n\n\t\t// Yellow Properties\n\t\tProperty atlanticAve = new Property(\"Atlantic Avenue\");\n\t\tProperty ventnorAve = new Property(\"Ventnor Avenue\");\n\t\tProperty marvinGard = new Property(\"Marvin Gardins\");\n\n\t\t// Green Properties\n\t\tProperty pacificAve = new Property(\"Pacific Avenue\");\n\t\tProperty northCar = new Property(\"North Carolina Avenue\");\n\t\tProperty pennsylvannia = new Property(\"Pennsylvania Avenue\");\n\n\t\t// Dark blue properties\n\t\tProperty parkPlace = new Property(\"Park Place\");\n\t\tProperty boardWalk = new Property(\"Boardwalk\");\n\n\t\t// Tax tiles\n\t\tTaxTile incomeTax = new TaxTile(\"Income Tax\", 200);\n\t\tTaxTile luxuryTax = new TaxTile(\"Luxury Tax\", 100);\n\n\t\t// Utilities\n\t\tUtility electric = new Utility(\"Electric Company\");\n\t\tUtility water = new Utility(\"Water Works\");\n\n\t\t// Railroads\n\t\tRailroad reading = new Railroad(\"Reading\");\n\t\tRailroad pennRail = new Railroad(\"Pennsylvania\");\n\t\tRailroad bno = new Railroad(\"B & O\");\n\t\tRailroad shortLine = new Railroad(\"Short Line\");\n\n\t\t// Chance and community chest\n\t\tChance chance = new Chance();\n\t\tCommunity chest = new Community();\n\n\t\t// Adds the properties by color in accordance with their position on the board\n\t\t// adds color + placement of piece to a list of their respective colors\n\t\tbrown.add(1);\n\t\tbrown.add(3);\n\t\trailroads.add(5);\n\t\tlightBlue.add(6);\n\t\tlightBlue.add(8);\n\t\tlightBlue.add(9);\n\t\tmagenta.add(11);\n\t\tutilities.add(12);\n\t\tmagenta.add(13);\n\t\tmagenta.add(14);\n\t\trailroads.add(15);\n\t\torange.add(16);\n\t\torange.add(18);\n\t\torange.add(19);\n\t\tred.add(21);\n\t\tred.add(23);\n\t\tred.add(24);\n\t\trailroads.add(25);\n\t\tyellow.add(26);\n\t\tyellow.add(27);\n\t\tutilities.add(28);\n\t\tyellow.add(29);\n\t\tgreen.add(31);\n\t\tgreen.add(32);\n\t\tgreen.add(34);\n\t\trailroads.add(35);\n\t\tdarkBlue.add(37);\n\t\tdarkBlue.add(39);\n\n\t\t// tileList is the list of tiles of the board where each tile is representative of a place on the board\n\t\t// adds each tile is chronological order beginning of the board \"go\"\n\t\t//this list includes: properties, taxes, railroads, chance, community chest\n\t\t\n\t\ttileList.add(new Go());\n\n\t\ttileList.add(mediterranean);\n\t\ttileList.add(chest);\n\t\ttileList.add(balticAve);\n\t\ttileList.add(incomeTax);\n\t\ttileList.add(reading);\n\t\ttileList.add(orientalAve);\n\t\ttileList.add(chance);\t\n\t\ttileList.add(vermontAve);\n\t\ttileList.add(connecticutAve);\n\n\t\ttileList.add(new Jail());\n\t\t\t\n\t\ttileList.add(stCharles);\n\t\ttileList.add(electric);\t\t\t\n\t\ttileList.add(statesAve);\t\t\t\n\t\ttileList.add(virginiaAve);\n\t\ttileList.add(pennRail);\n\t\ttileList.add(stJames);\t\n\t\ttileList.add(chest);\n\t\ttileList.add(tennesseeAve);\t\t\t\n\t\ttileList.add(newYorkAve);\n\n\t\ttileList.add(new FreeParking());\n\t\t\t\n\t\ttileList.add(kentuckyAve);\t\t\n\t\ttileList.add(chance);\t\n\t\ttileList.add(indianaAve);\t\t\t\n\t\ttileList.add(illinoisAve);\n\t\ttileList.add(bno);\n\t\ttileList.add(atlanticAve);\t\t\t\n\t\ttileList.add(ventnorAve);\n\t\ttileList.add(water);\n\t\ttileList.add(marvinGard);\n\n\t\ttileList.add(new GoToJail());\n\t\t\t\t\t\n\t\ttileList.add(pacificAve);\t\t\t\n\t\ttileList.add(northCar);\n\t\ttileList.add(chest);\t\t\t\n\t\ttileList.add(pennsylvannia);\n\t\ttileList.add(shortLine);\n\t\ttileList.add(chance);\n\t\ttileList.add(parkPlace);\n\t\ttileList.add(luxuryTax);\n\t\ttileList.add(boardWalk);\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 }",
"public Shelf() {\r\n\t\tsuper();\r\n\t}",
"public FruitStand() {}",
"public CourseImage() {\n }",
"public Animator(Logo logo) {\r\n this.logo = logo;\r\n Timer t = new Timer(frequency, this);\r\n t.start();\r\n }",
"@Override\n\tpublic AbstractTroisFrommage createTroisFrommage() {\n\t\treturn new TroisFrommageSN();\n\t}",
"public Series () {\n super();\n this.price = RandomFill.generateNumber(5,15);\n this.listSeason = RandomFill.generateListSeason();\n }",
"public SimOI() {\n super();\n }",
"public Hazard() {\n super(\"img/hazard.png\");\n }",
"public Spider(double x, double y)\n\t{\n\t\tsuper(x, y, \"Res/indaSpider.png\", 2);\n\t\thspd = 0.4;\n\t\tvspd = 0.4;\n\t\tspeed = 0.4;\n\t\timageSpeed = 0.05;\n\t\tdamage = 1;\n\t\talarm = new Alarm(50);\n\t\tshootTimer = new Alarm(200);\n\t\trandom = new Random();\n\t\tclose = false;\n\t}",
"Mob(Enums.Species.AllSpecies specimen, Pair<Integer, Integer> coords) {\n super(specimen, coords);\n getData();\n }",
"@Test\n public void Constructor_ObjectValues_InstanceCreated() {\n\t\ttry {\n Position position = make_PositionWithIntegerPoints(xCoordinate, yCoordinate, direction);\n Surface surface = make_SurfaceWithGivenDimensions(xDimension, yDimension);\n\t\t\tRover rover = make_RoverWithObjectValues(position, surface);\n\t\t}\n\t\tcatch (AssertionError assErr) {\n\t\t\t// Test passed.\n\t\t\treturn;\n\t\t}\n }",
"public SaboWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(counter, 100, 380); //Add the scoreboard\n addObject(healthBar, 300, 370); //Add the health bar\n addObject(turret, getWidth()/2-5, getHeight()-turret.getImage().getWidth()); \n }",
"Hero()\n\t{\n\t\t\n\t\tsuper(152,500,97,124);\n\t\tlife = 3;\n\t\tdoubleFire = 0;\n\t\t\n\t}",
"public TitleIconItem(){}",
"public Spec() {\n super();\n // TODO Auto-generated constructor stub\n }",
"public Headline() {\n }",
"public Cohete() {\n\n\t}",
"public OfcLogoRecord() {\n\t\tsuper(org.openforis.collect.persistence.jooq.tables.OfcLogo.OFC_LOGO);\n\t}",
"public ShopGraphics(MainMenu program) {\r\n\t\tsuper();\r\n\t\tthis.program = program;\r\n\t\tinitializeObjects();\r\n\t}",
"public Tower (ImageView test) {\n super.setImageView(test);\n }",
"public RobotInfo() {\n }",
"public Supermarket()\n {\n }",
"public RoadSign() {\n super(0, 0, \"roadsign_speed_50.png\");\n }",
"public Car()\n {\n \tsuper();\n bodyType = null;\n noOfDoors = 0;\n noOfSeats = 0;\n }",
"public House()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(480, 352, 1); \n addObject(new GravesHouse(),110,60);\n addObject(new Kid(),300,200);\n addObject(new Sofa(),190,270);\n addObject(new Piano(),275,100);\n }",
"@Test\n\tpublic void testCtor() {\n\t\tSnacksHot nachos = new SnacksHot(\"Chips\", 3, \"100gr\", \"img/icons/box.png\");\n\t\ttry {\n\t\t\tSnacksHot k = new SnacksHot(\"Chips\", 3, \"100gr\", \"img/icons/box.png\");\n\t\t\tassertNotEquals(null, k);\n\t\t\tassertEquals(\"object should be created with valid Nachos\", nachos, k.getName());\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tfail(\"died calling ctor\");\n\t\t}\n\t}",
"Vehicle() \n {\n System.out.println(\"Constructor of the Super class called\");\n noOfTyres = 5;\n accessories = true;\n brand = \"X\";\n counter++;\n }",
"public SpecimenArray()\r\n\t{\r\n\t\tsuper();\r\n\t}",
"public Cow() {\n\t\tsuper();\n\t\tloadImages();\n\t}",
"public Logo() {\n initComponents();\n this.setTitle(this.getClass().getSimpleName()+\" ::: \"+\"E- Learning :::\");\n this.getContentPane().setBackground(ELearning.sc.getDefaultColor());\n }",
"private void createObstacole()\n {\n //Create Obstacole\n Obstacole topObstacole = new Obstacole(\"top\");\n Obstacole botObstacole = new Obstacole(\"bottom\");\n Obstacole midObstacole = new Obstacole(\"mid\");\n //amount of space between obstacole\n int ObstacoleSpacing = 150;\n \n //get object image\n GreenfootImage image = botObstacole.getImage();\n \n //random number to vary\n int numOfObstacoles = Greenfoot.getRandomNumber(40) + 15;\n \n //counter increment to 50\n ObstacoleCounter++;\n if (ObstacoleCounter == 50)\n {\n if (getObjects(Obstacole.class).size() < numOfObstacoles)\n {\n addObject(botObstacole, getWidth(), getHeight() / 2 + image.getHeight() - Greenfoot.getRandomNumber(100) - 10);\n addObject(topObstacole, getWidth(), botObstacole.getY() - image.getHeight() - ObstacoleSpacing);\n addObject(midObstacole, getWidth(), botObstacole.getY() + image.getHeight() / 3 + ObstacoleSpacing);\n }\n ObstacoleCounter = 0;\n }\n }",
"public Supermarket() {\n }",
"public Items(String image, int y, int x) {\r\n\t\tsuper(image, y, x);\r\n\t}",
"public Producto() {\r\n }",
"public Cargo(){\n super(\"Cargo\");\n intake = new WPI_TalonSRX(RobotMap.cargoIntake);\n shoot = new WPI_TalonSRX(RobotMap.cargoShoot);\n }",
"protected Image(int instance, String context) {\n\tsuper(instance, context);\n\taddObjectTable(fieldTable, null);\n }",
"public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }",
"public StoneSummon() {\n// ArrayList<BufferedImage> images = SprssssssaasssssaddddddddwiteUtils.loadImages(\"\"\n createStones();\n\n }",
"public static void main(String[] args) {\nLogo oo=new Logo();\noo.title();\n\n\t}",
"public VectorImage() {\n\t}",
"public Brand()\n {\n\t\tsuper();\n }",
"public Tmio1Sitio() {\r\n\t}",
"public Food(int x, int y) {\n\t\tsuper(\"FOOD.png\",x,y);\n\t}",
"public Picture ()\n {\n /* not needed but use it to show students the implicit call to super()\n * child constructors always call a parent constructor \n */\n super(); \n }",
"public Picture ()\n {\n /* not needed but use it to show students the implicit call to super()\n * child constructors always call a parent constructor \n */\n super(); \n }",
"public TTau() {}",
"void createLogo(String logoCode);",
"public Shiv(){\n super(\"Shiv\",25);\n }",
"public Tiempo2( int h ) { \n this( h, 0, 0 ); // invoca al constructor de Tiempo2 con tres argumentos\n }",
"public PantallaVictoria()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(400, 600, 1); \n prepare();\n }",
"public Supermarket() {\n }",
"public void initialize()\r\n {\r\n ceresImage = new Image(\"Ceres.png\");\r\n erisImage = new Image(\"Eris.png\");\r\n haumeaImage = new Image(\"Haumea.png\");\r\n makemakeImage = new Image(\"MakeMake.png\");\r\n plutoImage = new Image(\"Pluto.png\");\r\n }",
"public XONImageMaker() {\r\n\t\tthis(true, null);\r\n\t}",
"public Tarifa() {\n ;\n }"
] | [
"0.67512596",
"0.6182841",
"0.61765337",
"0.6109805",
"0.6103136",
"0.60895616",
"0.6063757",
"0.605547",
"0.6002779",
"0.5937333",
"0.592555",
"0.5895963",
"0.5878215",
"0.58534837",
"0.5810443",
"0.57625353",
"0.5756665",
"0.5752622",
"0.57448477",
"0.5737018",
"0.56850517",
"0.5682108",
"0.5669276",
"0.5647062",
"0.56262213",
"0.56106585",
"0.5599805",
"0.5597128",
"0.55890334",
"0.55636394",
"0.55607057",
"0.55583656",
"0.5550284",
"0.5549046",
"0.55447066",
"0.5543007",
"0.55339104",
"0.5533514",
"0.5525682",
"0.5521302",
"0.55181295",
"0.5510674",
"0.5508035",
"0.54955626",
"0.5493984",
"0.54917073",
"0.54876536",
"0.54847836",
"0.548477",
"0.5480778",
"0.54803973",
"0.54802835",
"0.5475428",
"0.5460575",
"0.54543656",
"0.54491997",
"0.54483706",
"0.5447163",
"0.5434132",
"0.5432113",
"0.5423123",
"0.5421757",
"0.5418521",
"0.541801",
"0.541318",
"0.54077554",
"0.54002005",
"0.539898",
"0.53956586",
"0.53937787",
"0.5392976",
"0.5392323",
"0.5388591",
"0.5388287",
"0.53857434",
"0.53850967",
"0.53829813",
"0.5378816",
"0.53757805",
"0.5372851",
"0.5364391",
"0.53620625",
"0.53610337",
"0.5358699",
"0.53448445",
"0.5339449",
"0.5336601",
"0.53255385",
"0.5321112",
"0.5320414",
"0.5320414",
"0.5313739",
"0.5312998",
"0.53077507",
"0.53074896",
"0.5305285",
"0.5305116",
"0.5303614",
"0.5300497",
"0.5294392"
] | 0.7160825 | 0 |
Tests the connection to the database | @Test
public void testGetConnection() throws SQLException
{
assertTrue(DatabaseGateway.getConnection() != null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void shouldConnectToDB()\n {\n assertTrue(DatabaseHelper.checkConnection());\n }",
"public boolean testConnection(){\n\t\tboolean connected = false;\n\t\ttry {\t\t\t\n\t\t\tmMysqlConnection = DriverManager\n\t\t\t\t.getConnection(getConnectionURI());\n\t\t\t\n\t\t\tconnected = true;\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.severe(\"!EXCEPTION: \" + e.getMessage());\n\t\t}\n\n\t\treturn connected;\n\t}",
"@Test\n public void testConstructorConnection() {\n assertEquals(connection, dao.getDatabaseConnection());\n }",
"@Test\n\tpublic void testGetDbInstance(){\n\t\tConnection c = DatabaseConnect.getInstance();\n\t\tassertTrue(c != null);\t\n\t}",
"public boolean testConnection()\r\n { \r\n try {\r\n myConn = DriverManager.getConnection(getconn + \"?user=\" + user + \"&password=\" + pass);\r\n //Connection successfully connected check sourced from Stack Overflow\r\n //Source: https://stackoverflow.com/questions/7764671/java-jdbc-connection-status\r\n if (!myConn.isClosed() || myConn != null)\r\n return true;\r\n return false;\r\n //End borrowed code\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n //Logger.getLogger(SQLConnector.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return false;\r\n }",
"@Before\r\n\tpublic void setUp() throws SQLException {\n\t\tconn = DBManager.getInstance().getConnection();\r\n\t}",
"private static void getConnectionTest() {\n\t\ttry {\r\n\t\t\tConnection conn=CartDao.getConnection();\r\n\t\t\tif(conn==null) System.out.println(\"disconnect\");\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}",
"public void testConnection() {\n\t\ttry {\n\t\t\tinit();\n\n\t\t} catch (Exception e) {\n\t\t\tif (log.isDebugEnabled())\n\t\t\t\tlog.error(\"Erro teste Conexao \", e);\n\t\t\tthrow new ConnectorException(\"Falha no teste de conexao : \"\n\t\t\t\t\t+ e.getMessage() + \". Check os detalhes da conexao.\");\n\t\t}\n\t}",
"@Test\n public void testGetConnection() {\n System.out.println(\"getConnection\");\n Connection result = instance.getConnection();\n assertTrue(result!=null);\n \n }",
"public static boolean testConn() {\r\n\t\tboolean bool = false;\r\n\t\ttry (Connection conn = DataSource.getConnection()) {\r\n\t\t\tbool = conn.isValid(0);\r\n\t\t\tif (bool == true){\r\n\t\t\t\tdbStatus = \"ONLINE\";\r\n\t\t\t}\r\n\t\t\telse dbStatus = \"OFFLINE\";\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\treturn bool;\r\n\t}",
"@Test\n public void testConnect() throws MainException {\n System.out.println(\"connect\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n Connection result = instance.connect();\n assertNotNull(result);\n boolean expResult = true;\n assertEquals(instance.isConnected(), expResult);\n }",
"public void testConnect() {\n\t\tConnection con = SQLUtilities.connect();\n\t\tResultSet set = SQLUtilities.executeSQL(\"SELECT * FROM TBL\", con);\n\t\t\n\t\ttry {\n\t\t\tset.last();\n\t\t\tint indx = set.getRow();\n\t\t\tSystem.out.println(indx);\n\t\t} catch (SQLException e) {\n\t\t\tfail();\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tSQLUtilities.disconnect(con);\n\t\tassertEquals(true,true);\n\n\t}",
"private void conntest() {\n\t\tDatabaseDao ddao = null;\r\n\t\tString url;\r\n\r\n\t\tif (dbType.getValue().toString().toUpperCase()\r\n\t\t\t\t.equals((\"oracle\").toUpperCase())) {\r\n\t\t\turl = \"jdbc:oracle:thin:@\" + logTxtIp.getText() + \":\"\r\n\t\t\t\t\t+ logTxtPort.getText() + \"/\" + logTxtSdi.getText();\r\n\t\t\tSystem.out.println(\"?\");\r\n\t\t\tddao = new OracleDaoImpl();\r\n\t\t} else {\r\n\t\t\turl = \"jdbc:mysql://\" + logTxtIp.getText() + \":\"\r\n\t\t\t\t\t+ logTxtPort.getText() + \"/\" + logTxtSdi.getText();\r\n\t\t\tddao = new MysqlDaoImpl();\r\n\t\t}\r\n\t\tSystem.out.println(url);\r\n\t\tString result = ddao.connection(url, logTxtId.getText(),\r\n\t\t\t\tlogTxtPw.getText());\r\n\t\tString resultSet;\r\n\t\tif (result.indexOf(\"오류\") != -1)\r\n\t\t\tresultSet = result.substring(result.indexOf(\"오류\"));\r\n\t\telse if (result.indexOf(\"ORA\") != -1)\r\n\t\t\tresultSet = result.substring(result.indexOf(\"ORA\"));\r\n\t\telse {\r\n\t\t\tresultSet = \"접속 테스트 성공\";\r\n\t\t}\r\n\t\tlogLblLogin.setText(resultSet);\r\n\t}",
"@Test\n public void testIsConnected() throws MainException {\n System.out.println(\"isConnected\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n boolean expResult = true;\n boolean result = instance.isConnected();\n assertEquals(expResult, result);\n instance.disconnect();\n result = instance.isConnected();\n assertEquals(false, result);\n\n }",
"public void testGetConnection() {\r\n \r\n }",
"@Test\n public void testConnectToDb() {\n System.out.println(\"connectToDb\");\n ClienteDAO instance = new ClienteDAO();\n instance.connectToDb();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Override\n public boolean verifyJobDatabase() {\n try (Connection conn = getConnection()) {\n } catch (Exception e) {\n LOG.error(\"Failed to verify connection to the Job Database. \", e);\n return false;\n }\n return true;\n }",
"@Test\n\tpublic void testGetConnection() throws SQLException {\n\t\tint count = pool.idleConnectionsCount();\n\t\tConnection connection = pool.getConnection(config.getConnectionTimeout());\n\t\tAssert.assertEquals(((ConnectionItem) connection).state().get() , ConnectionItem.STATE_IN_USE);\n\t\tAssert.assertEquals(count - 1 , pool.idleConnectionsCount());\n\t}",
"public void CheckConnection() {\n\t\tconn = SqlConnection.DbConnector();\n\t\tif (conn == null) {\n\t\t\tSystem.out.println(\"Connection Not Successful\");\n\t\t\tSystem.exit(1);\n\t\t} else {\n\t\t\tSystem.out.println(\"Connection Successful\");\n\t\t}\n\t}",
"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 }",
"@Test\n @Ignore\n public void connectToDatabaseTest() throws SQLException {\n\n DBCConnection connection = new DBCConnection(\"jdbc:mariadb://mysql2.csse.canterbury.ac.nz/seng302-2018-team600-test\", \"seng302-team600\", \"TailspinElla4435\");\n List<String> result = connection.executeSanatizedStatement(\"SELECT * FROM Users WHERE username='ABC1234'\");\n Assert.assertEquals(\"| ABC1234 | Sweeny | null | Todd | password | 1 | 2018-05-16 23:31:22.0 | 1 |\", result.get(0));\n }",
"@Test(timeout = 100)\n public void testAccessToDB() {\n System.out.println(\"Starting DB access test\");\n }",
"@Test\r\n\tpublic void testChooseConnection() throws Exception {\n\t}",
"public void testNotReady() throws Exception {\n Properties props = new Properties();\n props.setProperty(LockssRepositoryImpl.PARAM_CACHE_LOCATION, tempDirPath);\n props\n\t.setProperty(ConfigManager.PARAM_PLATFORM_DISK_SPACE_LIST, tempDirPath);\n props.setProperty(SqlDbManager.PARAM_DATASOURCE_CLASSNAME, \"java.lang.String\");\n ConfigurationUtil.setCurrentConfigFromProps(props);\n\n startService();\n assertEquals(false, sqlDbManager.isReady());\n\n Connection conn = null;\n try {\n conn = sqlDbManager.getConnection();\n } catch (SQLException sqle) {\n }\n assertNull(conn);\n\n }",
"private static void testConnection(Properties properties) throws ClassNotFoundException {\n Optional.ofNullable(properties.getProperty(\"oracle.net.tns_admin\"))\n .ifPresent(v -> System.setProperty(\"oracle.net.tns_admin\", v));\n String dbURL = Optional.ofNullable(properties.getProperty(\"url\"))\n .orElseThrow(() -> new IllegalArgumentException(\"missing url property\"));\n\n Class.forName(\"oracle.jdbc.OracleDriver\");\n\n Connection conn = null;\n Statement stmt = null;\n\n try {\n conn = establishConnection(properties, dbURL);\n\n stmt = conn.createStatement();\n\n Stopwatch stmtWatch = Stopwatch.createStarted();\n ResultSet rs = stmt.executeQuery(properties.getProperty(\"query\"));\n System.out.println(\"Executed statement took : \" + stmtWatch.stop());\n\n if (rs.next()) {\n System.out.println(rs.getString(1));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n finally {\n if (stmt != null) try { stmt.close(); } catch (Exception e) {}\n if (conn != null) try { conn.close(); } catch (Exception e) {}\n }\n }",
"public boolean connect(){\n if(isConnect)\n return true;\n\n this.isConnect = true;\n\n this.repository = sqLiteConnect(new Repository().getColumnType());\n\n if(this.repository == null){\n ItemBox.getLogger().severe(\"[Database] \\\"repository\\\" connect fail!\");\n return false;\n }\n\n\n ItemBox.getLogger().info(\"[Database] connect success\");\n return true;\n }",
"private void connectDatabase(){\n }",
"@Test\n public void testGetterSetterConnection() {\n UserDao userDao = new UserDao();\n userDao.setDatabaseConnection(connection);\n assertEquals(connection, userDao.getDatabaseConnection());\n }",
"private boolean connect() throws ClassNotFoundException, SQLException {\r\n\r\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\r\n\t\tif (dbConnection == null || dbConnection.isClosed()) {\r\n\t\t\tdbConnection = DriverManager.getConnection(Conf.getDbPath(), Conf.getDbUser(), Conf.getDbPassword());\r\n\t\t\tif (!dbConnection.isValid(10)) {\r\n\t\t\t\tConf.setDbLog(false);\r\n\t\t\t\treturn false;\r\n\t\t\t} else\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"final void checkEnsure() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tif (this.conn == null || this.conn.isClosed()) {\r\n\t\t\t\tthis.conn = this.ci.createConnection();\r\n\t\t\t\tthis.databaseType = ConnectionHolder.DT_UNKNOWN;\r\n\t\t\t\tthis.loops = this.ci.connectionMaxLoops();\r\n\t\t\t\tthis.date = System.currentTimeMillis() + this.ci.connectionTimeToLive();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (--this.loops < 0 || this.date < System.currentTimeMillis()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.conn.close();\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tthis.conn = this.ci.createConnection();\r\n\t\t\t\tthis.databaseType = ConnectionHolder.DT_UNKNOWN;\r\n\t\t\t\tthis.loops = this.ci.connectionMaxLoops();\r\n\t\t\t\tthis.date = System.currentTimeMillis() + this.ci.connectionTimeToLive();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (this.databaseType == ConnectionHolder.DT_UNKNOWN) {\r\n\t\t\t\tthis.databaseType = this.conn.getMetaData().getDatabaseProductName().toUpperCase().indexOf(\"ORACLE\") == -1\r\n\t\t\t\t\t? ConnectionHolder.DT_NORMAL\r\n\t\t\t\t\t: ConnectionHolder.DT_ORACLE;\r\n\t\t\t}\r\n\t\t\ttry (final Statement st = this.conn.createStatement()) {\r\n\t\t\t\t/** Do not use it here, may be unsupported? */\r\n\t\t\t\ttry {\r\n\t\t\t\t\tst.setQueryTimeout(10);\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tst.execute(\r\n\t\t\t\t\t\tthis.databaseType == ConnectionHolder.DT_ORACLE\r\n\t\t\t\t\t\t\t? \"SELECT 5 FROM DUAL\"\r\n\t\t\t\t\t\t\t: \"SELECT 5\");\r\n\t\t\t}\r\n\t\t} catch (final SQLException e) {\r\n\t\t\tif (this.conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.conn.close();\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.conn = this.ci.createConnection();\r\n\t\t\tthis.databaseType = ConnectionHolder.DT_UNKNOWN;\r\n\t\t\tthis.loops = this.ci.connectionMaxLoops();\r\n\t\t\tthis.date = System.currentTimeMillis() + this.ci.connectionTimeToLive();\r\n\t\t}\r\n\t}",
"public boolean connect(){\n \ttry {\n \t\tString writeConcernType = test_properties.getProperty(\"writeConcern\");\n \t\tif (\"none\".equals(writeConcernType)) {\n \t\t\twriteConcern = WriteConcern.NONE;\n \t\t} else if (\"safe\".equals(writeConcernType)) {\n \t\t\twriteConcern = WriteConcern.SAFE;\n \t\t} else if (\"normal\".equals(writeConcernType)) {\n \t\twriteConcern = WriteConcern.NORMAL;\n \t\t} else if (\"journal\".equals(writeConcernType)) {\n \t\twriteConcern = WriteConcern.JOURNAL_SAFE;\n \t\t} else if (\"fsync\".equals(writeConcernType)) {\n \t\twriteConcern = WriteConcern.FSYNC_SAFE;\n \t\t}\n \t\n \t\tm = new Mongo (server, port);\n \t\tm.setWriteConcern(writeConcern);\n \t\tmdb = m.getDB(dbName);\n \n \t \t// Try to authenticate.\n \t\tif (!(user.equals(\"\") || pass.equals(\"\")))\n \t\t\tmdb.authenticate(user, pass.toCharArray());\n \t} catch (Exception e) {\n \t\te.printStackTrace();\n\t\t\treturn false;\n \t\t}\n \treturn true;\n \t }",
"@BeforeEach\n public void setUp() throws ManagedProcessException, SQLException {\n // See https://github.com/vorburger/MariaDB4j\n DBConfigurationBuilder configBuilder = DBConfigurationBuilder.newBuilder();\n configBuilder.setPort(0); // Setting port to 0 to let configBuilder choose a free open port.\n db = DB.newEmbeddedDB(configBuilder.build());\n db.start();\n db.source(\"database.sql\");\n connection = DriverManager.getConnection(db.getConfiguration().getURL(\"test\"));\n mysqlDatabase = new MysqlDatabase(connection);\n }",
"public void testDbCommand() throws Exception{\n\t}",
"@BeforeClass\n\tpublic static void setup() throws SQLException {\n\t\tconfig = new ConnectionConfig();\n\t\tconfig.setDataSource(Mockito.mock(DataSource.class));\n\t\t//mock connection\n\t\tConnection connection = Mockito.mock(Connection.class);\n\t\tMockito.when(config.getDataSource().getConnection()).thenReturn(connection);\n\t\tMockito.when(connection.isValid((int) TimeUnit.MILLISECONDS.toSeconds(config.getValidationTimeout()))).thenReturn(true);\n\t\t//create the connection pool\n\t\tpool = new ConnectionPoolImpl(config);\n\t}",
"public boolean testDatabaseExists()\r\n {\r\n try {\r\n myStmt = myConn.createStatement();\r\n myRs = myStmt.executeQuery(\"show databases like '\" + dbname + \"'\");\r\n if (myRs.next())\r\n return true;\r\n return false;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(SQLConnector.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return false;\r\n }",
"protected void checkConnectionProvider() {\n\t\tfinal Connection connection = connectionProvider.getConnection();\n\t\ttry {\n\t\t\tfinal DatabaseMetaData databaseMetaData = connection.getMetaData();\n\t\t\tfinal String name = databaseMetaData.getDatabaseProductName();\n\t\t\tfinal String version = databaseMetaData.getDatabaseProductVersion();\n\n\t\t\tif (log.isInfoEnabled()) {\n\t\t\t\tlog.info(\"Connected to database: \" + name + \" v\" + version);\n\t\t\t}\n\t\t} catch (final SQLException sex) {\n\t\t\tlog.error(\"DB connection failed: \", sex);\n\t\t} finally {\n\t\t\tconnectionProvider.closeConnection(connection);\n\t\t}\n\t}",
"@Test\n public void testProductos() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM productos\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table productos exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'productos' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"@Test(timeout = 4000)\n public void test046() throws Throwable {\n try { \n DBUtil.connect(\"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\", (String) null, \"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\", (String) null, true);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Connecting SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE failed: \n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@Test\n\tpublic void testExistsDB() throws Exception {\n\t\tassertExists(\"The Rodin database should exist\", rodinDB);\n\t}",
"@BeforeClass\n public static void connectionBeforeClass() {\n String host = \"localhost\";\n String dbname = \"atm\";\n String username = \"root\";\n String password = \"Kinoshka12\";\n\n try (JDBConnector connector = new ConnectorMariaDb(host, dbname, username, password)) {\n BankRepository bankService = new BankRepository(connector);\n connector.getConnection();\n UserRepository repoUser = new UserRepository(connector);\n IAccountRepository repoAccount = new AccountRepository(connector);\n IBank bank = new Bank(10, \"leumi\");\n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Test\n public void testCaja() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM caja\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table caja exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'caja' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"abstract public boolean createConnection(String database);",
"public void connectToDatabase(){\n\t\ttry{\n\t\t connection = DriverManager.getConnection(dbConfig.getUrl(), dbConfig.getUser(), dbConfig.getPassword());\n\t\t System.out.println(\"Successfully connected to database.\");\n\t\t} catch (Exception e){\n\t\t\tSystem.out.println(\"An error occurred while attempting to connect to the database.\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"DBConnect() {\n \n }",
"public static void openDatabase() {\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\n\t\t\t/* change the name and password here */\n\t\t\tc = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:postgresql://localhost:5432/testdata\", \"postgres\",\n\t\t\t\t\t\" \");\n\n\t\t\tlogger.info(\"Opened database successfully\");\n\t\t\tc.setAutoCommit(false);\n\t\t\tstatus = OPEN_SUCCESS;\n\n\t\t} catch (Exception e) {\n\t\t\tstatus = OPEN_FAILED;\n\t\t\tlogger.warn(e.getClass().getName() + \": \" + e.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"@Test\n\tpublic void test() {\n\t\tString url = \"jdbc:sqlite:\" + Paths.get(\"\")+\"weatherapp.db\";\n\t\tWeatherDatabase db = new WeatherDatabase(url);\n\t\tassert(db.citiesTableFilled());\n\t\tassert(db.containsCity(\"Boston\", \"MA\"));\n\t\tassert(!db.containsCity(\"Boston\", \"RI\"));\n//\t\t\n\t}",
"private void checkDataBase() {\n final Config dbConfig = config.getConfig(\"db\");\n\n checkArgument(!isNullOrEmpty(dbConfig.getString(\"driver\")), \"db.driver is not set!\");\n checkArgument(!isNullOrEmpty(dbConfig.getString(\"url\")), \"db.url is not set!\");\n\n dbConfig.getString(\"user\");\n dbConfig.getString(\"password\");\n dbConfig.getObject(\"additional\");\n }",
"int initConnection(){\n\t\tint status = -1; //the return value. -1 if connection failed, 0 if succeeded\r\n\t\ttry {\r\n\t\t\tconn = dbSource.getConnection();\r\n\t\t\tstatus = 0;\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tSystem.out.println(\"Error: Could not connect to the tool rental database.\");\r\n\t\t}\r\n\t\treturn status;\r\n\t\t\r\n\t}",
"public boolean connect(){\n \n try{\n \n String url = \"jdbc:sqlite:database_lite/database_sge.db\";\n \n this.connection = DriverManager.getConnection(url);\n \n }catch(SQLException e){\n \n System.out.println(e.getMessage());\n return false;\n \n }\n \n System.out.println(\"Connection success\");\n \n return true;\n }",
"@Test\n public void testCorte_de_caja() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM corte_caja\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table corte_caja exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'corte_caja' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"private Database openTestDb(ReplicatedEnvironment master)\n throws DatabaseException {\n\n Environment env = master;\n DatabaseConfig config = new DatabaseConfig();\n config.setAllowCreate(true);\n config.setTransactional(true);\n config.setSortedDuplicates(true);\n Database testDb = env.openDatabase(null, TEST_DB, config);\n return testDb;\n }",
"@Override\n public void connect() {\n\n //System.out.println(\"-------Embedded Java DB Connection Testing --------\");\n\n // silently return if connection is open\n if (is_open) {\n return;\n }\n\n // check for correct classpath\n try {\n Class.forName(\"org.apache.derby.jdbc.EmbeddedDriver\");\n } catch (ClassNotFoundException e) {\n System.out.println(\"Java DB Driver not found. Add the classpath to your module.\");\n e.printStackTrace();\n return;\n }\n\n //System.out.println(\"Java DB driver registered!\");\n\n // try to connect to edu.wpi.cs3733d18.teamS.database with given name\n try {\n DriverManager.registerDriver(new EmbeddedDriver());\n connection = DriverManager.getConnection(\"jdbc:derby:\" + db_name + \";create=true\");\n\n // set auto commit to false to control what is committed\n connection.setAutoCommit(false);\n\n // create a new statement\n statement = connection.createStatement();\n\n // open the connection\n is_open = true;\n } catch (SQLException e) {\n System.out.println(\"Could not connect to edu.wpi.cs3733d18.teamS.database: \" + db_name + \"\\n\" +\n e.getMessage());\n e.printStackTrace();\n }\n\n //System.out.println(\"Java DB connection established!\");\n\n }",
"public static void test()\n\t{\n\t Environment myDbEnvironment = null;\n\t Database myDatabase = null;\n\n\t /* OPENING DB */\n\n\t // Open Database Environment or if not, create one.\n\t EnvironmentConfig envConfig = new EnvironmentConfig();\n\t envConfig.setAllowCreate(true);\n\t myDbEnvironment = new Environment(new File(\"db/\"), envConfig);\n\n\t // Open Database or if not, create one.\n\t DatabaseConfig dbConfig = new DatabaseConfig();\n\t dbConfig.setAllowCreate(true);\n\t dbConfig.setSortedDuplicates(true);\n\t myDatabase = myDbEnvironment.openDatabase(null, \"schema\", dbConfig);\n\n\t Cursor cursor = null;\n\t /* GET <K,V > FROM DB */\n\t DatabaseEntry foundKey = new DatabaseEntry();\n\t DatabaseEntry foundData = new DatabaseEntry();\n\n\t cursor = myDatabase.openCursor(null, null);\n\t cursor.getFirst(foundKey, foundData, LockMode.DEFAULT);\n\n\t do {\n\t try {\n\t String keyString = new String(foundKey.getData(), \"UTF-8\");\n\t String dataString = new String(foundData.getData(), \"UTF-8\");\n\t System.out.println(\"<\" + keyString + \", \" + dataString + \">\");\n\t } catch (UnsupportedEncodingException e) {\n\t e.printStackTrace();\n\t }\n\t } while (cursor.getNext(foundKey, foundData, LockMode.DEFAULT) == OperationStatus.SUCCESS);\n\t if (cursor != null) cursor.close();\n\t System.out.println(\"-----\");\n\t \n\t if (myDatabase != null) myDatabase.close();\n\t if (myDbEnvironment != null) myDbEnvironment.close();\n\t}",
"@Test(timeout = 4000)\n public void test086() throws Throwable {\n JDBCConnectData jDBCConnectData0 = new JDBCConnectData(\"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\", \"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\", \"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\", \"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\");\n try { \n DBUtil.connect(jDBCConnectData0, true);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Connecting SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE failed: \n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@Test\n public void test() throws SQLException {\n System.out.println(new MyDbutilsDemo().load(12));\n }",
"@Test\r\n\tpublic void testConnectionAdded() throws Exception {\n\t}",
"@Test(timeout = 4000)\n public void test083() throws Throwable {\n jdbcConnection jdbcConnection0 = new jdbcConnection((Session) null);\n DBUtil.close((Connection) jdbcConnection0);\n assertFalse(jdbcConnection0.isClosed());\n }",
"private void connectToDB() throws Exception\n\t{\n\t\tcloseConnection();\n\t\t\n\t\tcon = Env.getConnectionBradawl();\n\t}",
"protected void setUp() throws Exception {\r\n\t\tmodelDS = new ServiceModelDS(\"dbtest\",\"pizzeria_service\");\r\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\tconnection = DriverManager.getConnection(\"jdbc:mysql://localhost/dbtest\", \"root\", \"\");\r\n\t\tconnection.setAutoCommit(false);\r\n\t}",
"@Test\n\tvoid contextLoads() throws SQLException {\n\t\tSystem.out.println(dataSource.getClass());\n\n\t\t// 获得连接\n\t\t/*\n\t\t 异常:\n\t\t \tThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.\n\t\t */\n\t\tConnection connection = dataSource.getConnection();\n\n\t\tSystem.out.println(connection);\n\n\t\t// 关闭\n\t\tconnection.close();\n\t}",
"public static void main(String[] unused) throws SQLException {\n Connection connection = SQLConnector.getTestInstance().getConnection();\n\n if (null != connection && !connection.isClosed()) {\n System.out.println(\"Connection successfully established.\");\n } else {\n System.err.println(\"Establishing the connection failed!\");\n }\n\n connection.close();\n }",
"public Connection createConnection(){\n Connection conn = null;\n registerDriver();\n createURL();\n\n try {\n conn = DriverManager.getConnection(urlDB,username,password);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n System.out.println((conn != null)?\"You made it, take control your database now!\":\"Failed to make connection!\");\n\n return conn;\n}",
"public static boolean openDB(){\n boolean result = false;\n try{\n Class.forName(\"org.sqlite.JDBC\");\n conn = java.sql.DriverManager.getConnection(url);\n\n System.out.println(\"OK! SQLite DB session connected.\");\n result = true;\n }\n catch(Exception e){\n error = e.getMessage();\n System.out.println(\"Open DB Error:\" + e.getMessage());\n } \n return result;\n }",
"@Test\n public void testConnectionEchec() {\n try {\n dao.seConnecter(loginInvalide, mdpValide);\n Assert.fail(\"c'est pas normal...\");\n } catch (QualitException paramE) {\n Assert.assertEquals(\n QualitEnum.PROBLEME_IDENTIFICATION,\n paramE.getCodeErreur());\n }\n }",
"@Test(timeout = 4000)\n public void test045() throws Throwable {\n try { \n DBUtil.connect(\"user\", \"6iIP^+.$i+#tan\", (String) null, \"kw9Gj',\", true);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Connecting user failed: \n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"private static void testConnection(GraknSession session) {\n try (GraknGraph graph = session.open(GraknTxType.READ)) {\n\n // construct a match query to find people\n MatchQuery query = graph.graql().match(var(\"x\").isa(\"mirna\"));\n\n // execute the query\n List<Answer> result = query.limit(10).execute();\n\n // if there is no data throw error\n if (result.isEmpty()) {throw new RuntimeException(\"Expected data is not present in the graph.\");}\n System.out.println(\"Connection OK.\");\n }\n }",
"@Test\n public void testUsuarios() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM usuarios\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table usuarios exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'usuarios' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"@Test(timeout = 4000)\n public void test085() throws Throwable {\n JDBCConnectData jDBCConnectData0 = new JDBCConnectData((String) null, (String) null, \"-l#o]ndt$;\", \"-l#o]ndt$;\");\n // Undeclared exception!\n try { \n DBUtil.connect(jDBCConnectData0, false);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No JDBC URL specified\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@Test\r\n\tpublic void CT01ValidaConexao_com_sucesso() {\r\n\t\tassertNotNull(\"valida a conexao =>\", DAOFactory.criaConexao());\r\n\t}",
"@Test\n public void testPrueba() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM prueba\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table prueba exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toYellow(\"[WARNING]\") + \" Table 'prueba' does not exist, needed by ServerTest!!\");\n System.out.println(Colors.toBlue(\"[INFO]\") + \" Table prueba will be created.\");\n try {\n conn.createStatement().executeUpdate(\"CREATE TABLE prueba (id INT AUTO_INCREMENT PRIMARY KEY, nombre VARCHAR(255))\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table prueba created.\");\n } catch (SQLException e1) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table prueba could not be created.\");\n System.out.println(Colors.toBlue(\"[INFO]\") + \" Create it manually by running: CREATE TABLE prueba (id INT AUTO_INCREMENT PRIMARY KEY, nombre VARCHAR(255))\");\n Assert.fail(e1.getMessage());\n }\n }\n }",
"public boolean connect(){\n try{\n conn = DriverManager.getConnection(uri, user, password);\n }catch (SQLException sqle){\n DLException dle = new DLException(sqle, \"Unable to conclude this operation\");\n return false;\n }\n return true;\n }",
"public static void setUpConnection()\n\t{\n\t\ttry{\n\t\t\t//The information necessary to create a connection to the database, need to figure out what this will be\n\t\n\t\t\n\t\t\t// Register driver by finding the class that corresponds do it \n\t\t\tString driverName = \"oracle.jdbc.OracleDriver\"; \n\t\t\tClass.forName(driverName);\n\t\t\n\t\t\tconn = DriverManager.getConnection(URL, USR, PWD);\n\t\t\n\t\t\tSystem.out.println(\"Connected to C325.\");\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void connect(){\n if (connected) {\n // connection already established\n return;\n }\n // Create connection to Database\n Properties props = new Properties();\n props.setProperty(\"user\", DB_USER);\n props.setProperty(\"password\", DB_PASSWORD);\n //props.setProperty(\"ssl\", \"true\");\n //\"Connecting to database...\"\n try {\n Class.forName(\"org.postgresql.Driver\");\n String connection_string = generateURL();\n dbConnect = DriverManager.getConnection(connection_string, props);\n //\"Connection established\"\n status = \"Connection established\";\n connected = true;\n } catch (SQLException e) {\n //\"Connection failed: SQL error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n } catch (Exception e) {\n //\"Connection failed: unknown error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n }\n }",
"@Test\r\n public void testSave() throws SQLException{\r\n System.out.println(\"save\");\r\n //when(c.prepareStatement(any(String.class))).thenReturn(stmt);\r\n //mockStatic(DriverManager.class);\r\n //expect(DriverManager.getConnection(\"jdbc:mysql://10.200.64.182:3306/testdb\", \"jacplus\", \"jac567\"))\r\n // .andReturn(c);\r\n //expect(DriverManager.getConnection(null))\r\n // .andReturn(null);\r\n //replay(DriverManager.class);\r\n Title t = new Title();\r\n t.setIsbn(\"888888888888888\");\r\n t.setTitle(\"kkkkkk\");\r\n t.setAuthor(\"aaaa\");\r\n t.setType(\"E\");\r\n int expResult = 1;\r\n int result = TitleDao.save(t);\r\n assertEquals(expResult, result);\r\n }",
"public static DB getFakeConnection() {\n\t\treturn fakeConnection;\n\t}",
"@Before\n\tpublic void setUp() throws Exception {\n\t\tDatabaseProvider.setInstance(new DerbyDatabase());\n\t\tdb = DatabaseProvider.getInstance();\t\t\n\t\t\n\t}",
"final boolean checkAlive() {\r\n\t\t\r\n\t\tif (this.conn == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif (this.conn.isClosed()) {\r\n\t\t\t\tthis.conn = null;\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif (--this.loops < 0 || this.date < System.currentTimeMillis()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.conn.close();\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tthis.conn = null;\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif (this.databaseType == ConnectionHolder.DT_UNKNOWN) {\r\n\t\t\t\tthis.databaseType = this.conn.getMetaData().getDatabaseProductName().toUpperCase().indexOf(\"ORACLE\") == -1\r\n\t\t\t\t\t? ConnectionHolder.DT_NORMAL\r\n\t\t\t\t\t: ConnectionHolder.DT_ORACLE;\r\n\t\t\t}\r\n\t\t\ttry (final Statement st = this.conn.createStatement()) {\r\n\t\t\t\t/** Do not use it here, may be unsupported? */\r\n\t\t\t\ttry {\r\n\t\t\t\t\tst.setQueryTimeout(10);\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tst.execute(\r\n\t\t\t\t\t\tthis.databaseType == ConnectionHolder.DT_ORACLE\r\n\t\t\t\t\t\t\t? \"SELECT 5 FROM DUAL\"\r\n\t\t\t\t\t\t\t: \"SELECT 5\");\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} catch (final SQLException e) {\r\n\t\t\tif (this.conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.conn.close();\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tthis.conn = null;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private static void dbConnect() {\r\n\t\tif (conn == null)\r\n\t\t\ttry {\r\n\t\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost/sims?user=root&password=12345&useSSL=true\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t}",
"@Test\n public void selectStatementSuccessful() throws SQLException {\n assertNotNull(testConnection.selectStatement(con, \"SELECT * FROM Employees;\"));\n assertNull(testConnection.selectStatement(con, \"SELECT * FROM Emp;\"));\n\n //Test if RS is empty\n assertTrue(testConnection.selectStatement(con, \"SELECT * FROM Employees\").next());\n assertFalse(testConnection.selectStatement(con, \"SELECT * FROM Employees WHERE email='x'\").next());\n }",
"@Test\n public void testGetProperties() throws DatabaseException {\n DatabaseProperties instance = cveDb.getDatabaseProperties();\n Properties result = instance.getProperties();\n assertTrue(result.size() > 0);\n cveDb.close();\n }",
"private void checkDB() {\n\t\tif (couchDB_ip == null) {\n\t\t\tsetCouchDB_ip();\n\t\t}\n\n\t\tif (!databaseExist) {\n\n\t\t\tsynchronized (databaseExist) {\n\n\t\t\t\tif (!databaseExist) {\n\n\t\t\t\t\tif (couchDB_USERNAME != null\n\t\t\t\t\t\t\t&& !couchDB_USERNAME.trim().isEmpty()\n\t\t\t\t\t\t\t&& couchDB_PASSWORD != null\n\t\t\t\t\t\t\t&& !couchDB_PASSWORD.trim().isEmpty()) {\n\t\t\t\t\t\tUsernamePasswordCredentials creds = new UsernamePasswordCredentials(\n\t\t\t\t\t\t\t\tcouchDB_USERNAME, couchDB_PASSWORD);\n\t\t\t\t\t\tauthentication = BasicScheme.authenticate(creds,\n\t\t\t\t\t\t\t\t\"US-ASCII\", false).toString();\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (CouchDBUtil.checkDB(getCouchDB_ip(), couchDB_NAME,\n\t\t\t\t\t\t\t\tauthentication)) {\n\n\t\t\t\t\t\t\tdatabaseExist = true;\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tCouchDBUtil.createDb(getCouchDB_ip(), couchDB_NAME,\n\t\t\t\t\t\t\t\t\tauthentication);\n\t\t\t\t\t\t\tdatabaseExist = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t\tlogger.info(\"Impossible to access CouchDB\", e);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void connect() {\n\n DatabaseGlobalAccess.getInstance().setEmf(Persistence.createEntityManagerFactory(\"PU_dashboarddb\"));\n DatabaseGlobalAccess.getInstance().setEm(DatabaseGlobalAccess.getInstance().getEmf().createEntityManager());\n DatabaseGlobalAccess.getInstance().getDatabaseData();\n DatabaseGlobalAccess.getInstance().setDbReachable(true);\n }",
"private void initConnection() throws DatabaseAccessException {\n\t\ttry {\n\t\t\tthis.connection = DriverManager.getConnection(this.driver + \":\" + this.path);\n\n\t\t} catch (SQLException e) {\n\t\t\t// unable to create the connection; access error\n\t\t\tthrow new DatabaseAccessException(Failure.CONNECTION);\n\t\t}\n\t}",
"private void dbConn()\n {\n\ttry\t\t\n\t{\t\n\t\t\t// driver to use with named database\n\t\tString url = \"jdbc:ucanaccess://c:/AH/AthloneHospital.mdb\";\n \n\t\t\t// connection represents a session with a specific database\n\t\tcon = DriverManager.getConnection(url);\n\n\t\t\t// stmt used for executing sql statements and obtaining results\n\t\tstmt = con.createStatement();\n\n\t\trs = stmt.executeQuery(\"SELECT * FROM Login\");\n\n\t\twhile(rs.next())\t// count number of rows in table\n\t\t\tcount++;\n\t\trs.close();\n System.out.println(\"Success!!!!\");\n\t}\n\tcatch(Exception e) { System.out.println(\"Error in start up......\");}\n }",
"@Test\n public void queryTest() {\n // TODO: test query\n }",
"public static void main(String[] args) {\n boolean test1 = false;\n boolean test2 = false;\n Connection conn = null;\n String username = \"postgres\";\n String password = \"CSCI112ONLINE\"; //Update this if you used a different password\n\n /**\n * Test 1: Connecting to a database that doesn't exist\n */\n try {\n conn = DriverManager.getConnection(\"jdbc:postgresql://localhost/abcd\", username, password); //Create connection to database server\n System.out.println(\"Connected to database.\");\n }\n catch(SQLException e) {\n System.out.println(\"Error connecting to database: \" + e.getMessage());\n System.out.println(\"This is expected. We didn't make an 'abcd' database.\");\n System.out.println(\"Test 1 Passed.\");\n test1 = true;\n }\n finally {\n try {\n conn.close(); //Try to close connection\n System.out.println(\"Connection to 'abcd' closed.\");\n }\n catch(Exception e) {\n //Connection wasn't opened; Do nothing.\n System.out.println(\"Can't close connection to 'abcd'. (This is OK because the connection was never opened.)\");\n }\n }\n\n System.out.println();\n\n /**\n * Test 2: Connecting to a database that does/should exist\n */\n try {\n conn = DriverManager.getConnection(\"jdbc:postgresql://localhost/Module8\", username, password); //Create connection to database server\n System.out.println(\"Connected to 'CSCI112' database.\");\n }\n catch(SQLException e) {\n System.out.println(\"Error connecting to database: \" + e.getMessage());\n System.out.println(\"This should NOT happen. Check that Postgres is running (start pgAdmin), check spelling of database name in URL, and check username/password.\");\n }\n finally {\n try {\n conn.close(); //Try to close connection\n System.out.println(\"Connection to 'CSCI112' closed.\");\n System.out.println(\"Test 2 Passed.\");\n test2 = true;\n }\n catch(Exception e) {\n //Connection wasn't opened; Do nothing.\n System.out.println(\"Can't close connection to 'CSCI112'. (This shouldn't be printed.)\");\n }\n }\n\n /**\n * How'd it go?\n */\n if(test1 && test2) {\n System.out.println(\"\\nEverything is working correctly!\");\n }\n else {\n System.out.println(\"\\nTest was unsuccessful. Check the database server is running and that the URL and database names are correct.\");\n }\n\n }",
"@BeforeEach\n void testDataSource() throws SQLException {\n jdbcds = new JdbcDataSource();\n jdbcds.setUrl(\"jdbc:h2:mem:dbmembers;DB_CLOSE_DELAY=-1\");\n Flyway.configure().dataSource(jdbcds).load().migrate();\n }",
"@Test(timeout = 4000)\n public void test093() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.connect(\"org.hsqldb.lib.HsqlByteArrayOutputStream\", false);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No environment definition 'org.hsqldb.lib.HsqlByteArrayOutputStream.env.properties' found\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"public boolean open()\r\n {\r\n boolean result = true;\r\n if(connection == null)\r\n {\r\n try\r\n {\r\n connection = DriverManager.getConnection(\"jdbc:mysql://\" + HOST + \"/\" + DATABASE, USER, PASSWORD);\r\n result = true;\r\n } catch(SQLException exception)\r\n {\r\n LOG.log(Level.SEVERE, \"\", exception);\r\n result = false;\r\n }\r\n }\r\n return result;\r\n }",
"@Test(timeout = 4000)\n public void test084() throws Throwable {\n JDBCConnectData jDBCConnectData0 = new JDBCConnectData((String) null, \"One-row database query returned multiple rows: \", \"One-row database query returned multiple rows: \", (String) null, \"Closing statement failed\", (String) null);\n // Undeclared exception!\n try { \n DBUtil.connect(jDBCConnectData0, true);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No JDBC driver class name specified\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@Test\n public void testEsegui() throws MainException {\n System.out.println(\"esegui\");\n String SQLString = \"insert into infermieri (nome, cognome) values ('Luca', 'Massa')\";\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n boolean expResult = true;\n boolean result = instance.esegui(SQLString);\n assertEquals(expResult, result);\n }",
"@Test\n public void testValidate()throws Exception {\n System.out.println(\"validate\");\n String query = \"select * from librarian where name=? and password=?\";\n String name = \"Fahim\";\n String password = \"1234\";\n boolean expResult = false;\n //when(mockDb.getConnection()).thenReturn(mockConn);\n when(mockConn.prepareStatement(query)).thenReturn(mockPs);\n when(mockPs.executeQuery()).thenReturn(mockRs);\n when(mockRs.next()).thenReturn(true);\n boolean result = mockLibrarian.validate(name, password);\n assertEquals(result,true);\n \n }",
"@Before\n public void setUp() {\n DB.sql2o = new Sql2o(\"jdbc:postgresql://localhost:5432/hair_salon_test\", \"alexander\", \"1234\");\n }",
"public void setup() throws DatabaseTestException;",
"@Test\n public void testGetResultSet() throws MainException {\n System.out.println(\"getResultSet\");\n String queryText = \"select * from infermieri\";\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n ResultSet result = instance.getResultSet(queryText);\n assertNotNull(result);\n // TODO review the generated test code and remove the default call to fail.\n }",
"private void test() throws SQLException {\n\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 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 }",
"@Test\n public void testAddConnection() throws Exception {\n System.out.println(\"addConnection\");\n instance.addConnection(testConnection);\n assertEquals(1, instance.getStoredConnections().size());\n }",
"@Test\n\tvoid test1() throws SQLException {\n\t\tString username_1 = \"testtest1\";\n\t\tboolean actual_1 = database.isExistUser(username_1);\n\t\tboolean expected_1 = false;\n\t\tassertEquals(expected_1,actual_1);\n\t\t\n\t\tString username_2 = \"testtest4\";\n\t\tboolean actual_2 = database.isExistUser(username_2);\n\t\tboolean expected_2 = true;\n\t\tassertEquals(expected_2,actual_2);\n\t}"
] | [
"0.80064017",
"0.77850944",
"0.76057863",
"0.75795877",
"0.7509973",
"0.7448116",
"0.7444166",
"0.7395215",
"0.7286855",
"0.7265675",
"0.72326267",
"0.72286135",
"0.72200596",
"0.7191858",
"0.7044511",
"0.703881",
"0.6987245",
"0.69522613",
"0.6920817",
"0.6919696",
"0.69084764",
"0.6870649",
"0.67847437",
"0.6727555",
"0.66952735",
"0.6681351",
"0.66515654",
"0.66430277",
"0.66348",
"0.6630505",
"0.6614088",
"0.6598121",
"0.6554706",
"0.6534623",
"0.6525661",
"0.6508212",
"0.65026253",
"0.64690495",
"0.6468886",
"0.6464912",
"0.64616877",
"0.644784",
"0.6443858",
"0.6436486",
"0.64292943",
"0.64143443",
"0.6412488",
"0.64023685",
"0.6390366",
"0.6375991",
"0.6357571",
"0.63542676",
"0.6345232",
"0.6340091",
"0.6334376",
"0.6331718",
"0.6327658",
"0.6325816",
"0.631886",
"0.63114333",
"0.63094074",
"0.63072467",
"0.62947977",
"0.6283314",
"0.62735677",
"0.62707895",
"0.62691486",
"0.62605643",
"0.62515116",
"0.6248772",
"0.62487173",
"0.6247592",
"0.6247148",
"0.6245676",
"0.6221624",
"0.6215458",
"0.62090045",
"0.6206284",
"0.6204344",
"0.62023824",
"0.62015355",
"0.61804944",
"0.61804736",
"0.617965",
"0.6178053",
"0.6176324",
"0.6171414",
"0.61693466",
"0.61693156",
"0.61681056",
"0.61578226",
"0.6156323",
"0.61523074",
"0.6150925",
"0.6150719",
"0.61353856",
"0.6132877",
"0.61296237",
"0.6127881",
"0.6120337"
] | 0.77478427 | 2 |
Tests adding a nail to the database and the nail entry has an entry | @Test
public void testGetTable() throws SQLException
{
new Nail("asdf",5,5,5.0,20);
ResultSet rs = DatabaseGateway.getTable("Nail");
if(rs.next())
{
assertEquals(rs.getInt("id"),1);
assertEquals(rs.getInt("ManufacturerID"),5);
assertEquals(rs.getInt("Price"),5);
assertEquals(rs.getString("UPC"),"asdf");
assertTrue(rs.getDouble("Length") == 5.0);
assertEquals(rs.getInt("NumberInBox"), 20);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean addNail(Nail nail) {\r\n\t\treturn nails.add(nail);\r\n\t}",
"@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}",
"@Test\n public void addRecipe_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertNotEquals(\"addRecipe - Returns True\", -1, returned);\n }",
"@Test\n void insertWithTripSuccess() {\n String newUserFirst = \"Dave\";\n String newUserLast = \"Bowman\";\n String newUserEmail = \"[email protected]\";\n String newUserUname = \"dbowman1\";\n String newUserPassword = \"Supersecret2!\";\n String tripCityLoc = \"MILWWI\";\n int tripCount = 6;\n String tripRating = \"5\";\n String tripComment = \"Definitely worth a second look\";\n Date today = new Date();\n User newUser = new User(newUserFirst, newUserLast, newUserEmail, newUserUname, newUserPassword, today);\n //Usertrip newUserTrip = new Usertrip(newUser, tripCityLoc, tripCount, tripRating, tripComment, today);\n //newUser.addTrip(newUserTrip);\n //int id = dao.insert(newUser);\n //assertNotEquals(0, id);\n //User insertedUser = (User) dao.getById(id);\n //assertNotNull(insertedUser);\n //assertEquals(\"dbowman1\", insertedUser.getUserName());\n //assertEquals(1, insertedUser.getUsertrips().size());\n\n }",
"@Test\n public void shouldCreateEpiDataTravel() {\n assertThat(DatabaseHelper.getEpiDataTravelDao().queryForAll().size(), is(0));\n\n Case caze = TestEntityCreator.createCase();\n TestEntityCreator.createEpiDataTravel(caze);\n\n // Assure that the burial has been successfully created\n assertThat(DatabaseHelper.getEpiDataTravelDao().queryForAll().size(), is(1));\n }",
"@Test\n public void shouldAddValidGameHistory()\n {\n boolean added = DatabaseHelper.addGameToStats(\"test\", \"test\", -25, \"test\", false, 0, 5, 9);\n DatabaseHelper.deleteTestEntry();\n assertTrue(added);\n }",
"@Test\n public void save() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n assert repot.findOne(1) == t;\n assert repo.findOne(1) == s;\n assert repon.findOne(\"11\") == n;\n }\n catch (ValidationException e){\n assert true;\n }\n }",
"@Test\r\n\t public void addANullRouteFather(){\r\n\t\t RouteFather test = routeFatherDAO.create(new RouteFather(null, null, null, null, null));\r\n\t\t Assert.assertNull(\"it should returns null\", test);\r\n\t }",
"public void testGetBlogEntry() {\n DailyBlog dailyBlog = rootBlog.getBlogForToday();\n BlogEntry blogEntry = dailyBlog.createBlogEntry();\n dailyBlog.addEntry(blogEntry);\n String id = blogEntry.getId();\n assertNotNull(blogEntry);\n blogEntry = rootBlog.getBlogEntry(id);\n assertNotNull(blogEntry);\n assertEquals(id, blogEntry.getId());\n }",
"@Test\n\tpublic void testInsertRecipeFailure() {\n\t\tint recipeId = recipeDao.insertRecipe(recipe);\n\n\t\tassertEquals(0, recipeId);\n\n\t}",
"@Test\n public void addRecipeIngredient_ReturnsID(){\n int returned = testDatabase.addRecipeIngredient(recipeIngredient);\n assertNotEquals(\"addRecipeIngredient - Returns True\", -1, returned);\n }",
"@Test\r\n public void testInsert() {\r\n assertTrue(false);\r\n }",
"@Test\n public void testInserts() throws ConnectionException {\n //adding test ProviderEntry to database\n ProviderEntry pe = MariaDbConnectorTest.instance.findProviderEntryByName(\"test\");\n ProviderEntry ppe = MariaDbConnectorTest.instance.findProviderEntryByName(\"test\");\n assertEquals(pe, ppe); // Passes if insert succeeded\n \n \n //adding test RouteEntry to database\n RouteEntry re = new RouteEntry();\n re.setName(\"test\");\n re.setDescription(\"test\");\n MariaDbConnectorTest.instance.insert(re);\n RouteEntry rre = MariaDbConnectorTest.instance.findRouteEntryByName(\"test\");\n assertEquals(re, rre); // Passes if insert has succeeded\n \n //adding test DataEntry to database\n int traveltime = 1234569;\n DataEntry de = new DataEntry(traveltime, rre, ppe);\n MariaDbConnectorTest.instance.insert(de);\n System.out.println(ppe.getId());\n System.out.println(rre.getId());\n System.out.println(de.getTimestamp());\n DataEntry dde = MariaDbConnectorTest.instance.findDataEntryByID(ppe.getId(), rre.getId(), de.getTimestamp());\n //assertEquals(de, dde); // Passes if insert has succeeded\n \n // Removing all added testdata from database. Removing route & providers suffices\n MariaDbConnectorTest.instance.delete(ppe);\n MariaDbConnectorTest.instance.delete(rre);\n \n // Check if the provider & route objects are removed from the database\n RouteEntry rrre = MariaDbConnectorTest.instance.findRouteEntryByID(rre.getId());\n assertNull(rrre); // Passes if the test RouteEntry object does not exist anymore in the database\n \n ProviderEntry pppe = MariaDbConnectorTest.instance.findProviderEntryByID(ppe.getId());\n assertNull(pppe);\n \n \n \n \n }",
"@Test\n public void shouldCreateAnValidRoomAndPersistIt() throws Exception {\n\n\tfinal CreateRoomCommand command = new CreateRoomCommand(\n\t\tArrays.asList(validRoomOfferValues));\n\n\tfinal UrlyBirdRoomOfferService roomOfferService = new UrlyBirdRoomOfferService(\n\t\tdao, builder, isOccupancyIn48Hours, isRoomBookable);\n\n\twhen(isOccupancyIn48Hours.isSatisfiedBy((Date) any())).thenReturn(true);\n\twhen(dao.create(Arrays.asList(validRoomOfferValues))).thenReturn(\n\t\tvalidRoomOffer);\n\n\tfinal UrlyBirdRoomOffer createdRoomOffer = roomOfferService\n\t\t.createRoomOffer(command);\n\n\tverify(dao).create(Arrays.asList(validRoomOfferValues));\n\tassertThat(createdRoomOffer, is(equalTo(validRoomOffer)));\n }",
"@Test\n public void addRecipeIngredient_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeIngredient> allRecipeIngredients = testDatabase.getAllRecipeIngredients(returnedRecipe);\n RecipeIngredient retrieved = new RecipeIngredient();\n if(allRecipeIngredients != null){\n for(int i = 0; i < allRecipeIngredients.size(); i++){\n if(allRecipeIngredients.get(i).getIngredientID() == ingredientID){\n retrieved = allRecipeIngredients.get(i);\n }\n }\n }\n assertEquals(\"addRecipeIngredient - Correct Quantity\", 2.0, retrieved.getQuantity(), 0);\n assertEquals(\"addRecipeIngredient - Correct Unit\", \"cups\", retrieved.getUnit());\n assertEquals(\"addRecipeIngredient - Correct Details\", \"White Flour\", retrieved.getDetails());\n }",
"@Test\n public void shouldCreateEpiDataBurial() {\n assertThat(DatabaseHelper.getEpiDataBurialDao().queryForAll().size(), is(0));\n\n Case caze = TestEntityCreator.createCase();\n TestEntityCreator.createEpiDataBurial(caze);\n\n // Assure that the burial has been successfully created\n assertThat(DatabaseHelper.getEpiDataBurialDao().queryForAll().size(), is(1));\n }",
"@Test\r\n\t public void addAnEmptyRouteFather(){\r\n\t\t RouteFather test = routeFatherDAO.create(new RouteFather());\r\n\t\t Assert.assertNull(\"it should returns null\", test);\r\n\t }",
"@Test\n\tpublic void addRegistrationDetails() {\n\t\tRegistrationDetails registrationDetailsForHappyPath = RegistrationHelper.getRegistrationDetailsForHappyPath();\n\t\ttry {\n\t\t\tem.getTransaction().begin();\n\t\t\tRegistrationDetails addRegistrationDetails = registrationDAO\n\t\t\t\t\t.addRegistrationDetails(registrationDetailsForHappyPath);\n\t\t\tem.getTransaction().commit();\n\t\t\tassertTrue(addRegistrationDetails.getId() != 0l);\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t}",
"@Test\r\n\t public void addANonExistingRouteFather(){\r\n\t\t RouteFather test = routeFatherDAO.create(new RouteFather(\"rutatest\", \"desctest\", \"asdfas\",\"2012-02-02\", this.rafter));\r\n\t\t Assert.assertNotNull(\"it should returns not null\", test);\r\n\t\t routeFatherDAO.delete(test);\r\n\t\t \r\n\t }",
"@Test\n\tpublic void testCreateRow() throws SQLException\n\t{\n\t\tString insertStatement = \"INSERT INTO Nail (\" + \n\t\t\t\t\"id, UPC, ManufacturerID, Price,Length, NumberInBox\" +\n\t\t\t\t\") VALUES (1,'asdf',5,5,5.0,20)\";\n\t\tDatabaseGateway.createRow(insertStatement);\n\t\t\n\t\tResultSet rs = DatabaseGateway.getObjectByID(\"Nail\", 1);\n\t\tif(rs.next())\n\t\t{\n\t\t\tassertEquals(rs.getInt(\"id\"),1);\n\t\t\tassertEquals(rs.getInt(\"ManufacturerID\"),5);\n\t\t\tassertEquals(rs.getInt(\"Price\"),5);\n\t\t\tassertEquals(rs.getString(\"UPC\"),\"asdf\");\n\t\t\tassertTrue(rs.getDouble(\"Length\") == 5.0);\n\t\t\tassertEquals(rs.getInt(\"NumberInBox\"), 20);\n\t\t}\n\t}",
"@Test\n public void addIngredient_ReturnsID(){\n int returned = testDatabase.addIngredient(ingredient);\n assertNotEquals(\"addIngredients - Returns True\",-1, returned);\n }",
"@Test\n\tvoid addReportDataToDBTest() {\n\t\tparkName = \"Haifa Park\";\n\t\tboolean condition = false;\n\t\tdate = new Date(120, 4, 1);\n\t\texpected = \"1 2 3 4 5 6 1 23 2 8 9 2 3 2 4 3 2 2 1 1 1 5 32 6 12 7 23 8 12 5 32 6 12 5 2 5\";\n\n\t\tString[] str = expected.split(\" \");\n\n\t\tif (ReportsController.CheckReportExistInDB(reportType, date, parkName))\n\t\t\tassertTrue(condition);\n\n\t\tReportsController.addReportToDB(reportType, date, new ArrayList<>(Arrays.asList(str)), parkName);\n\n\t\tresult = ReportsController.getReport(date, reportType, parkName);\n\n\t\tassertEquals(expected, result);\n\n\t}",
"@Test\n public void createNeighbourWithSuccess() {\n Neighbour newNeighbour = new Neighbour(13, \"Toto\", \"https://i.pravatar.cc/150?u=a042581f4e29026704d\", \"Saint-Pierre-du-Mont ; 5km\",\n \"+33 6 00 00 00 00 \", \"Bonjour !Je souhaiterais faire de la marche nordique...\");\n //when: I add the newNeighbour to the neighbourList\n service.addNeighbour(newNeighbour);\n List<Neighbour> neighbours = service.getNeighbours();\n assertTrue(neighbours.contains(newNeighbour));\n }",
"@Test\n public void findOne() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n assert repot.findOne(1)== t;\n assert repo.findOne(1) == s;\n assert repon.findOne(\"11\") == n;\n }\n catch (ValidationException e){\n }\n }",
"@Test\n\tpublic void addTown_when_town_is_added() throws Exception {\n\t\t// GIVEN\n\t\ttown = new Town(\"varna\", 2000);\n\t\t// WHEN\n\t\tcountry.addTown(town);\n\t\t// THEN\n\t\tassertEquals(country.getCountTowns(), 1);\n\t}",
"@Test\n public void shouldCreateEpiDataGathering() {\n assertThat(DatabaseHelper.getEpiDataGatheringDao().queryForAll().size(), is(0));\n\n Case caze = TestEntityCreator.createCase();\n TestEntityCreator.createEpiDataGathering(caze);\n\n // Assure that the burial has been successfully created\n assertThat(DatabaseHelper.getEpiDataGatheringDao().queryForAll().size(), is(1));\n }",
"@Test\n public void testNewEntity_3args() throws DataBaseNotReadyException {\n // Verify that our test database is set-up as expected.\n // Access test-person , test-event and test-job.\n // Verify that such items exist in the database\n // and that the test-person has yet no allocations.\n Person p = Manager.getPersonCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", p);\n Event e = Manager.getEventCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", e);\n Job j = Manager.getJobCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", j);\n List<Allocation> allocationListBefore = p.getAllocationList();\n assertNotNull(allocationListBefore);\n assertTrue(\"Bad test data?\", allocationListBefore.isEmpty());\n\n // Here is the statement that we want to test:\n Allocation testItem = allocationCollection.newEntity(p, e, j, \"USER\");\n\n // Verify that the result is as expected.\n assertNotNull(testItem);\n assertNotNull(testItem.getAllocationId());\n assertTrue(testItem.getAllocationId() > 0);\n\n assertEquals(p, testItem.getPerson());\n assertEquals(e, testItem.getEvent());\n assertEquals(j, testItem.getJob());\n\n List<Allocation> allocationListAfter = p.getAllocationList();\n assertTrue(allocationListAfter.contains(testItem));\n }",
"@Test\n void insertSuccess() {\n Date today = new Date();\n User newUser = new User(\"Artemis\", \"Jimmers\", \"[email protected]\", \"ajimmers\", \"supersecret2\", today);\n int id = dao.insert(newUser);\n assertNotEquals(0, id);\n User insertedUser = (User) dao.getById(id);\n assertNotNull(insertedUser);\n assertEquals(\"Jimmers\", insertedUser.getLastName());\n //Could continue comparing all values, but\n //it may make sense to use .equals()\n }",
"@Test\n void insertNoteSuccess() {\n Note newNote = new Note();\n\n newNote.setProspect(\"Graham Mertz\");\n newNote.setCollege(\"University of Wisconsin - Madison\");\n newNote.setUserId(1);\n newNote.setAge(19);\n newNote.setHeightFeet(6);\n newNote.setHeightInches(3);\n newNote.setWeight(225);\n newNote.setPosition(\"QB\");\n newNote.setRating(\"7/10\");\n newNote.setReport(\"He was redshirted his freshman season, and his first full season as a starter was derailed from covid. He showed a lot of good and also some bad plays, but we'll have to wait and see how he does with a real season.\");\n\n int id = noteDao.insert(newNote);\n assertNotEquals(0, id);\n Note insertedNote = (Note) noteDao.getById(id);\n\n assertEquals(\"Graham Mertz\", insertedNote.getProspect());\n assertEquals(\"University of Wisconsin - Madison\", insertedNote.getCollege());\n assertEquals(1, insertedNote.getUserId());\n assertEquals(19, insertedNote.getAge());\n assertEquals(6, insertedNote.getHeightFeet());\n assertEquals(3, insertedNote.getHeightInches());\n assertEquals(225, insertedNote.getWeight());\n assertEquals(\"QB\", insertedNote.getPosition());\n assertEquals(\"7/10\", insertedNote.getRating());\n }",
"@Test\n public void editIngredient_ReturnsFalse(){\n Ingredient newIngredient = new Ingredient(Integer.MAX_VALUE, \"egg\");\n assertEquals(\"editIngredient - Ingredient Doesn't Exist\", false, testDatabase.editIngredient(newIngredient));\n }",
"@Test\n public void addRecipeCategory_ReturnsID(){\n int returned = testDatabase.addRecipeCategory(recipeCategory);\n assertNotEquals(\"addRecipeCategory - Returns True\", -1, returned);\n }",
"@Test\r\n\t public void addAnExistingRouteFather(){\r\n\t\tRouteFather toAdd = new RouteFather();\r\n\t\ttoAdd = routeFatherDAO.create(toAdd);\r\n\t\tAssert.assertNull(toAdd);\r\n\t\t\r\n\t }",
"@Test\n public void addRecipe_CorrectInformation(){\n int returned = testDatabase.addRecipe(testRecipe);\n Recipe retrieved = testDatabase.getRecipe(returned);\n\n // Check all recipe fields are accurate\n assertEquals(\"addRecipe - Correct Title\", recipeTitle, retrieved.getTitle());\n assertEquals(\"addRecipe - Correct Servings\", 1, retrieved.getServings(), 0);\n assertEquals(\"addRecipe - Correct prep_time\", 30, retrieved.getPrep_time(), 0);\n assertEquals(\"addRecipe - Correct total_time\", 60, retrieved.getTotal_time(), 0);\n assertEquals(\"addRecipe - Correct Favorited\", false, retrieved.getFavorited());\n assertEquals(\"addRecipe - Correct Ingredient Unit\", \"cups\", retrieved.getIngredientList().get(0).getUnit());\n assertEquals(\"addRecipe - Correct Ingredient Quantity\", 2.0, retrieved.getIngredientList().get(0).getQuantity(), 0);\n assertEquals(\"addRecipe - Correct Ingredient Details\", \"White Flour\", retrieved.getIngredientList().get(0).getDetails());\n assertEquals(\"addRecipe - Correct First Direction Number\", 1, retrieved.getDirectionsList().get(0).getDirectionNumber());\n assertEquals(\"addRecipe - Correct First Direction Text\", \"TestDirection1\", retrieved.getDirectionsList().get(0).getDirectionText());\n assertEquals(\"addRecipe - Correct Second Direction Number\", 2, retrieved.getDirectionsList().get(1).getDirectionNumber());\n assertEquals(\"addRecipe - Correct Second Direction Text\", \"TestDirection2\", retrieved.getDirectionsList().get(1).getDirectionText());\n }",
"@Test\n\tpublic void testExistsDB() throws Exception {\n\t\tassertExists(\"The Rodin database should exist\", rodinDB);\n\t}",
"@Override\n\tpublic void test00500Add_Validate_ExistingRecord() throws Exception\n\t{\n\t}",
"@Test\n public void ShouldAddRecipeToRepository() {\n Recipe receipt = new Recipe();\n receipt.setTitle(\"Salmon\");\n\n // When recipe is saved\n Recipe saveRecipe = recipesRepository.save(receipt);\n\n // Then the receipt is stored in repository\n long count = template.count(\n Query.query(Criteria.where(\"id\").is(saveRecipe.getId())),\n Recipe.class);\n assertThat(count).isEqualTo(1L);\n }",
"@Test\n void insertSuccess() {\n GenericDao gameDao = new GenericDao(Game.class);\n\n Game game = (Game)gameDao.getById(1);\n\n RunCategory newCategory = new RunCategory(\"Ending E\", \"endinge\", \"<p>Reach the final ending</p>\");\n game.addCategory(newCategory);\n\n int id = dao.insert(newCategory);\n assertNotEquals(0,id);\n RunCategory insertedCategory = (RunCategory) dao.getById(id);\n\n\n assertEquals(newCategory, insertedCategory);\n }",
"@Test\n public void testInsertNew() {\n System.out.println(\"insertNew\");\n Address obj = new Address(\"tregi\",\"333\",\"Porto\");;\n boolean expResult = true;\n boolean result = instance.insertNew(obj);\n assertEquals(expResult, result);\n }",
"@Test\n public void addIngredient_DatabaseUpdates(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"addIngredient - Correct Ingredient Name\", \"Flour\", retrieved.getName());\n assertEquals(\"addIngredient - Set Ingredients ID\", returned, retrieved.getKeyID());\n }",
"@Test\n public void testAddAccount() {\n Assert.assertEquals(\"Initial size of reporter list is incorrect\", 1,\n theModel.getAccountList().size());\n try {\n theModel.addAccountInfo(new Account(1, \"[email protected]\", \"mbills2\", Credential.MANAGER));\n theModel.addAccountInfo(new Account(2, \"madie\", \"madie\", Credential.USER));\n theModel.addAccountInfo(new Account(3, \"sbills3\", \"sbills3\", Credential.ADMIN));\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(\"Should not have thrown exception here\");\n }\n Assert.assertEquals(\"Total account list size wrong after adding\", 4,\n theModel.getAccountList().size());\n }",
"@Test\n public void testAddRound() {\n Game g = new Game();\n g.setGameId(1);\n g.setGameStatus(true);\n g.setGameKey(1234);\n gameDao.addGame(g);\n \n Round round = new Round();\n round.setGuess(1234);\n round.setGuessTime(LocalDateTime.now());\n round.setGuessResult(\"e0 : p0\");\n round.setGameId(g.getGameId());\n roundDao.addRound(round);\n \n Round DaoRound=roundDao.addRound(round);\n \n \n assertEquals(round, DaoRound);\n \n \n }",
"@Test\n public void testInsertarNota() {\n System.out.println(\"insertarNota\");\n String tipoNota = \"\";\n Double nota = null;\n Alumno instance = null;\n instance.insertarNota(tipoNota, nota);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\n public void canAddBookToLibrary(){\n library.add(book);\n assertEquals(1, library.countBooks());\n }",
"@Test\n public void size() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n assert repot.size()==1;\n assert repo.size() == 1;\n assert repon.size() == 1;\n }\n catch (ValidationException e){\n }\n }",
"@Test\n public void editRecipe_ReturnsFalse(){\n Recipe invalidRecipe = new Recipe();\n assertEquals(\"editRecipe - Returns False\", false, testDatabase.editRecipe(invalidRecipe));\n }",
"@Test\n\tvoid existDataInDBTest() {\n\t\tparkName = \"Haifa Park\";\n\t\tdate = new Date(120, 2, 1);\n\t\texpected = \"1 2 3 4 5 6 1 23 2 8 9 2 3 2 4 3 2 2 1 1 1 5 32 6 12 7 23 8 12 5 32 6 12 5 23 7\";\n\t\tresult = ReportsController.getReport(date, reportType, parkName);\n\n\t\tassertEquals(expected, result);\n\n\t}",
"@Test\r\n\tpublic final void testAddRoom() {\n\t\tboolean success = roomServices.addRoom(expected2);\r\n\t\t// check if added successfully\r\n\t\tassertTrue(success);\r\n\t\t// need to copy the id from database since it autoincrements\r\n\t\tRoom actual = roomServices.getRoomByName(expected2.getName());\r\n\t\texpected2.setId(actual.getId());\r\n\t\t// check content of data\r\n\t\tassertEquals(expected2, actual);\r\n\t\t// delete room on exit\r\n\t\troomServices.deleteRoom(actual);\r\n\t}",
"@Order(9)\n\t@Test\n\tpublic void Attempt_AddUser() throws SQLException\n\t{\n\t\tUser testUser = new User(\"Test\",\"Drone\",\"TestCase\",\"NoOne\",\"CaresAboutthis\",\"[email protected]\");\n\t\tboolean Expected = true, actual = us.addUser(testUser);\n\t\tassertEquals(Expected,actual);\n\t}",
"public void testAddBlock_NoGame() throws Exception {\n try {\n dao.addBlock(1, 1);\n fail(\"EntryNotFoundException expected\");\n } catch (EntryNotFoundException e) {\n // should land here\n }\n }",
"@Test\n public void testInsert() {\n int resultInt = disciplineDao.insert(disciplineTest);\n // Je pense à le suppr si l'insert à fonctionné\n if(resultInt > 0){\n disciplineTest.setId(resultInt);\n disciplineDao.delete(disciplineTest);\n }\n assertTrue(resultInt > 0);\n }",
"@Test\n\tpublic void testInsertObj() {\n\t}",
"@Test\n public void getIngredient_ReturnsIngredient(){\n int returned = testDatabase.addIngredient(ingredient);\n assertNotEquals(\"getIngredient - Return Non-Null Ingredient\",null, testDatabase.getIngredient(returned));\n }",
"@Test\n public void testLaboonCoinExists() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\tassertNotNull(l);\n }",
"@Test\n public void editIngredient_ReturnsTrue(){\n int returned = testDatabase.getIngredient(\"egg\");\n testDatabase.deleteIngredient(returned);\n Ingredient newIngredient = new Ingredient(ingredientID, \"egg\");\n assertEquals(\"editIngredient - Returns True\", true, testDatabase.editIngredient(newIngredient));\n }",
"@Test\n public void NewDataAvailableTest() {\n String vatNumber = \"vatNumber\";\n Date birthDate = new Date(000000000);\n String fiscalCode = \"fiscalCodeTest00\";\n String password = \"password\";\n Individual individual = new Individual(fiscalCode, \"name\", \"surname\", password, birthDate, 40.5f, 10.0f);\n userController.addIndividual(individual);\n ThirdParty thirdParty = new ThirdParty(vatNumber,\"thirdParty\", password);\n userController.addThirdParty(thirdParty);\n thirdPartyService.addIndividualRequest(thirdParty, individual, true);\n IndividualData individualData = new IndividualData(new Date(00000000), 60f ,120f ,150f ,50f );\n List individualDataList= new ArrayList();\n individualDataList.add(individualData);\n individualData.setIndividual(individual);\n individualService.saveData(individualDataList);\n\n assertEquals(thirdPartyService.getNewDataNotificationList(thirdParty,individual).size(),1);\n }",
"@Test\n public void validAdd1() {\n assertEquals(i3, isl.get(2));\n\n //checks the amount of ingredient 4\n assertEquals(2.39, ((Ingredient) isl.get(3)).amountNeed, 0);\n assertEquals(1.01, ((Ingredient) isl.get(3)).amountHave, 0);\n\n //add an ingredient that is already present in the list\n //the amount should be added to the current amount 2.39 + 0.45 = 2.84\n //ignores the fact that category and unit don't match\n assertFalse(isl.add(new Ingredient(\"vANiLle\", \"niks\", 0.45, 0.69, \"none\")));\n assertEquals(2.84, ((Ingredient) isl.get(3)).amountNeed, 0.00001);\n assertEquals(1.7, ((Ingredient) isl.get(3)).amountHave, 0.00001);\n assertEquals(\"kruiden\", ((Ingredient) isl.get(3)).category);\n assertEquals(Unit.GRAMS, ((Ingredient) isl.get(3)).unit);\n\n //add a new ingredient and check if it's added correctly\n assertTrue(isl.add(new Ingredient(\"cookies\", \"yum\", 3, 4, \"none\")));\n assertEquals(\"cookies\", isl.get(5).name);\n assertEquals(\"yum\", ((Ingredient) isl.get(5)).category);\n assertEquals(3, ((Ingredient) isl.get(5)).amountNeed, 0);\n assertEquals(4, ((Ingredient) isl.get(5)).amountHave, 0);\n assertEquals(Unit.NONE, ((Ingredient) isl.get(5)).unit);\n }",
"@Test\n @Transactional\n void createInternacoesWithExistingId() throws Exception {\n internacoes.setId(1L);\n\n int databaseSizeBeforeCreate = internacoesRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restInternacoesMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(internacoes)))\n .andExpect(status().isBadRequest());\n\n // Validate the Internacoes in the database\n List<Internacoes> internacoesList = internacoesRepository.findAll();\n assertThat(internacoesList).hasSize(databaseSizeBeforeCreate);\n }",
"public void testNewEntity_Boom() throws DataBaseNotReadyException {\n // Verify that our test database is set-up as expected.\n // Access test-person , test-event and test-job.\n // Verify that such items exist in the database\n // and that the test-person has yet no allocations.\n Person p = Manager.getPersonCollection().findEntity(3);\n assertNotNull(\"Bad test data?\", p);\n Event e = Manager.getEventCollection().findEntity(4);\n assertNotNull(\"Bad test data?\", e);\n Job j1 = Manager.getJobCollection().findEntity(1);\n assertNotNull(\"Bad test data?\", j1);\n Job j2 = Manager.getJobCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", j2);\n\n Allocation testItem1 = allocationCollection.newEntity(p, e, j1, \"USER\");\n\n // Here is the statement that should throw the exception:\n System.out.println(\"### testNewEntity_Boom() Exception is expected!\");\n Allocation testItem2 = allocationCollection.newEntity(p, e, j2, \"USER\");\n\n }",
"@Test\n public void addTest(){\n \n Assert.assertTrue(p1.getName().equals(\"banana\"));\n Assert.assertTrue(c1.getEmail().equals(\"[email protected]\"));\n \n }",
"@Test\n public void invalidNullUserCreation() {\n boolean success = this.userDAO.insertNewUser(null);\n\n Assertions.assertFalse(success);\n }",
"@Test\n\tvoid existDataInDBTest2() {\n\t\tparkName = \"Tel-Aviv Park\";\n\t\tdate = new Date(120, 5, 1);\n\t\texpected = \"11 22 33 44 55 66 17 23 5 8 4 2 3 2 54 34 2 32 1 61 1 75 32 46 12 67 23 82 12 56 32 36 12 85 232 7\";\n\t\tresult = ReportsController.getReport(date, reportType, parkName);\n\n\t\tassertEquals(expected, result);\n\n\t}",
"@Test\n public void testAddUser_Nickname_Email03() {\n System.out.println(\"addUser\");\n String nickname = \"test1\";\n String email = \"[email protected]\";\n sn10.addUser(nickname, email);\n\n boolean result = sn10.getUsersList().contains(new User(nickname, email));\n assertTrue(result);\n }",
"@Test\n public void AddAccountInvalid1()\n {\n acc_db.addAccount(acc2);\n\n acc3 = new Account(2,\"Jacob&Leon3\",4000);\n\n Assert.assertEquals(false,acc_db.addAccount(acc3));\n }",
"@Test\n public void testInsertDataWSFail() {\n try {\n \tProviderDAO providerDAO = new ProviderDAOImpl();\n \tString retVal = providerDAO.insertDataWS(null);\n \t\n \tif (retVal != null) {\n \t\tAssert.assertTrue(true);\n \t} else {\n \t\tAssert.assertFalse(false);\n \t\tSystem.out.println(\"[testInsertDataWSFail] - FAIL (No data found)\");\n \t}\n\n } catch (Exception e) {\n Assert.assertFalse(false);\n }\n }",
"@Test\n public void testSave()throws Exception {\n System.out.println(\"save\");\n String query = \"insert into librarian(name,password,email,address,city,contact) values(?,?,?,?,?,?)\";\n String name = \"Raf\";\n String password = \"rrrr\";\n String email = \"[email protected]\";\n String address = \"1218/7\";\n String city = \"dacca\";\n String contact = \"016446\";\n int expResult = 0;\n \n //when(mockDb.getConnection()).thenReturn(mockConn);\n when(mockConn.prepareStatement(query)).thenReturn(mockPs);\n int result = mockLibrarian.save(name, password, email, address, city, contact);\n assertEquals(result >0, true);\n // TODO review the generated test code and remove the default call to fail.\n \n }",
"@Test\n public void addCategory_ReturnsID(){\n int returned = testDatabase.addCategory(category);\n assertNotEquals(\"addCategory - Returns True\", -1, returned);\n }",
"@Test\n public void addRecipeDirection_ReturnsID(){\n int returned = testDatabase.addRecipeDirection(recipeDirection1);\n assertNotEquals(\"addRecipeDirection - Returns True\", -1, returned);\n }",
"@Test\n public void canAddBedroomToArrayList() {\n hotel.addBedroom(bedroom1);\n assertEquals(5, hotel.checkNumberOfBedrooms());\n }",
"@Test\n\t\t@Transactional\n\t\tpublic void addBeer() {\n\t\t\taddTestUser(\"addBeer\",Role.ADMIN);\n\t\t\tBeer newBeer = new Beer();\n\t\t\tnewBeer.setName(\"Jimmy Light\");\n\t\t\tnewBeer.setBrewery(\"Jimmy Brewing\");\n\t\t\tnewBeer.setCountry(\"US\");\n\t\t\tBeer savedBeer = beerSvc.add(newBeer);\n\t\t\tAssert.assertNotNull(savedBeer);\n\t\t\tAssert.assertTrue(savedBeer.getId() > 0);\n\t\t}",
"@Test\n public void editRecipe_ReturnsTrue(){\n testDatabase.addRecipe(testRecipe);\n testRecipe.setTitle(\"TestRecipe Updated\");\n testRecipe.setServings(1.5);\n testRecipe.setPrep_time(15);\n testRecipe.setTotal_time(45);\n testRecipe.setFavorited(true);\n listOfCategories.clear();\n listOfCategories.add(recipeCategory);\n testRecipe.setCategoryList(listOfCategories);\n listOfIngredients.clear();\n recipeIngredient.setUnit(\"tbsp\");\n recipeIngredient.setQuantity(1.5);\n recipeIngredient.setDetails(\"Brown Sugar\");\n listOfIngredients.add(recipeIngredient);\n testRecipe.setIngredientList(listOfIngredients);\n listOfDirections.clear();\n listOfDirections.add(recipeDirection1);\n testRecipe.setDirectionsList(listOfDirections);\n\n assertEquals(\"editRecipe - Returns True\", true, testDatabase.editRecipe(testRecipe));\n }",
"@Test\n public void test1Insert() {\n\n System.out.println(\"Prueba de SpecialityDAO\");\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n assertEquals(dao.insert(spec), 1);\n \n }",
"@Test\n public void testAddPurityReport() {\n Assert.assertEquals(\"incorrect initial purity report list size\", 0,\n theModel.getPurityReportList().size());\n try {\n WaterPurityReport a = new WaterPurityReport(Model.getCurrentAccount(), \"Safe\",\n 400, 300, \"Today\", new Location(40, 30));\n WaterPurityReport b = new WaterPurityReport(Model.getCurrentAccount(), \"Unsafe\",\n 250, 100, \"Today\", new Location(25, 50));\n theModel.addPurityReport(a);\n theModel.addPurityReport(b);\n Assert.assertEquals(\"incorrect size of purity report list after adding\", 2,\n theModel.getPurityReportList().size());\n } catch (Exception e) {\n Assert.fail(\"Adding purity reports shouldn't have failed here\");\n e.printStackTrace();\n }\n }",
"@Test\n public void testStoreAlreadyExistsInDatabaseCheck() {\n window.textBox(\"storeNameTFld\").setText(\"store1\");\n window.textBox(\"numOfSeatsTFld\").setText(\"155\");\n window.textBox(\"storeAddressTFld\").setText(\"storeAddress1\");\n window.textBox(\"storeCityTFld\").setText(\"city\");\n window.textBox(\"storePhoneTFld\").setText(\"123123\");\n window.textBox(\"emailTFld\").setText(\"hlias.karasyahoo.gr\");\n window.textBox(\"fromOpenHoursTFld\").setText(\"18:00\");\n window.textBox(\"toOpenHoursTFld\").setText(\"23:00\"); \n window.checkBox(\"mondayCBx\").check();\n window.button(\"addStoreBtn\").click();\n window.optionPane().requireInformationMessage().requireMessage(\"Store already exists in the database!\");\n window.optionPane().okButton().click();\n window.optionPane().okButton().click();\n }",
"@Test\n public void testSave() throws Exception {\n System.out.println(\"save\");\n Item item = new Item(1L, new Category(\"name\", \"code\", \"description\"), \n new Shop(new Date(), \"12345\", \"Pepe perez\", \"Tienda\", \"Nit\", \"Natural\"), new Date(), \"name\", 20.0);\n \n \n// Item result = itemDAO.save(item);\n// Assert.assertNotNull(result);\n // TODO review the generated test code and remove the default call to fail.\n \n }",
"@Test\n\t public void testSaveCollection(){\n\t\t try{\n\t\t\t List<Users> users = new ArrayList<Users>();\n\t\t\t users.add( BaseData.getUsers());\n\t\t\t\tusers.add(BaseData.getDBUsers());\n\t\t\t \tdoAnswer(new Answer() {\n\t\t\t \t public Object answer(InvocationOnMock invocation) {\n\t\t\t \t Object[] args = invocation.getArguments();\n\t\t\t \t EntityManager mock = (EntityManager) invocation.getMock();\n\t\t\t \t return null;\n\t\t\t \t }\n\t\t\t \t }).when(entityManager).persist(users);\n\t\t\t \tuserDao.save(users);\n\t\t}catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing save:.\",se);\n\t\t }\n\t }",
"public void testSave() {\r\n\r\n\t\ttry {\r\n\t\t\tLevelOfCourt levelOfCourt = new LevelOfCourt();\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\tlevelOfCourt.setName(\"alpha\");\r\n\r\n\t\t\t\tTestDataFactory jurisdictionTestDataFactory = (TestDataFactory) BeanHelper\r\n\t\t\t\t\t\t.getBean(\"jurisdictionTestDataFactory\");\r\n\r\n\t\t\t\tlevelOfCourt\r\n\t\t\t\t\t\t.setJurisdiction((com.cc.civlit.domain.courtdivisions.Jurisdiction) jurisdictionTestDataFactory\r\n\t\t\t\t\t\t\t\t.loadOneRecord());\r\n\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\tlevelOfCourtService.save(levelOfCourt);\r\n\t\t\tassertNotNull(levelOfCourt.getId());\r\n\t\t} catch (Exception e) {\r\n\t\t\tfail(e.getMessage());\r\n\t\t}\r\n\t}",
"@Test\n public void addTest(){\n // Given\n CatHouse catHouse = new CatHouse();\n Cat tom = new Cat(\"tom\", new Date(), 1);\n\n // When\n catHouse.add(tom);\n Integer expected = 1;\n Integer actual = catHouse.getNumberOfCats();\n\n // Then\n Assert.assertEquals(expected, actual);\n }",
"@Test\n public void testAddGetAllRoundsByGameId() {\n Game testGame = new Game();\n \n testGame.setCorrectSolution(\"1234\");\n testGame.setGameOver(false);\n gameDao.addGame(testGame);\n \n Round testRound1 = new Round();\n testRound1.setGameId(testGame.getGameId());\n testRound1.setUserGuess(\"3214\");\n testRound1.setTime(LocalDateTime.now());\n testRound1.setResult(\"RESULT\");\n testRound1 = roundDao.addRound(testRound1);\n \n Round testRound2 = new Round();\n testRound2.setGameId(testGame.getGameId());\n testRound2.setUserGuess(\"4567\");\n testRound2.setTime(LocalDateTime.now());\n testRound2.setResult(\"RESULT\");\n testRound2 = roundDao.addRound(testRound2);\n \n List<Round> rounds = roundDao.getAllRoundsByGameId(testGame.getGameId());\n \n assertEquals(2, rounds.size());\n // assertNotNull(testRound1 = roundDao.getRoundById(testRound1.getRoundId()));\n //assertNotNull(testRound2 = roundDao.getRoundById(testRound2.getRoundId()));\n\n assertTrue(rounds.contains(testRound1));\n assertTrue(rounds.contains(testRound2));\n }",
"@Test\n public void z_topDown_TC01() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n }\n }",
"@Test\n void test008_addValidUsers() {\n // adding new user (check that allUsers has increased).\n\n // (Adding same user name but to different networks shouldnt throw any\n // exception.\n\n try {\n christmasBuddENetwork.addUser(\"Santa Claus\");\n christmasBuddENetwork.addUser(\"Grinch\");\n christmasBuddENetwork.addUser(\"Comet\");\n christmasBuddENetwork.addUser(\"Rudolph\");\n christmasBuddENetwork.addUser(\"Prancer\");\n christmasBuddENetwork.addUser(\"Blitzen\");\n christmasBuddENetwork.addUser(\"Donder\");\n christmasBuddENetwork.addUser(\"Vixen\");\n christmasBuddENetwork.addUser(\"Dancer\");\n christmasBuddENetwork.addUser(\"Cupid\");\n\n Set<User> allUsersChristmasSet = christmasBuddENetwork.getAllUsers();\n int numUsersChristmas = allUsersChristmasSet.size();\n if (numUsersChristmas != 10) {\n fail(\"test008_addValidUsers(): FAILED! Did NOT return 10 users for \"\n + \"the network, but instead: \" + numUsersChristmas);\n }\n\n\n } catch (Exception e) {\n fail(\"test008_addValidUsers(): FAILED! Threw an improper exception! :(\");\n\n }\n\n\n }",
"@Test\n public void test() {\n Minister minister = createMinister();\n Territory territory = createTerritory();\n\n TerritoryEntry territoryEntry = TerritoryEntry.generateForCongregationPool(territory);\n territoryEntry = territoryEntryRepository.save(territoryEntry);\n\n Assert.assertNotNull(territoryEntry.getId());\n Assert.assertTrue(territoryEntry.getCongregationPool());\n Assert.assertTrue(!territoryEntry.getArchived());\n Assert.assertEquals(territory.getId(), territoryEntry.getTerritoryID());\n Assert.assertNull(territoryEntry.getMinisterID());\n\n territoryEntry = TerritoryEntry.generateForMinister(territory, minister);\n territoryEntry = territoryEntryRepository.save(territoryEntry);\n\n Assert.assertNotNull(territoryEntry.getId());\n Assert.assertTrue(!territoryEntry.getCongregationPool());\n Assert.assertTrue(!territoryEntry.getArchived());\n Assert.assertEquals(territory.getId(), territoryEntry.getTerritoryID());\n Assert.assertEquals(minister.getId(), territoryEntry.getMinisterID());\n\n\n deleteMinister(minister);\n deleteTerritory(territory);\n }",
"@Test\n public void addRecipeDirection_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedDirection1 = testDatabase.addRecipeDirection(recipeDirection1);\n ArrayList<RecipeDirection> allDirections = testDatabase.getAllRecipeDirections(returnedRecipe);\n RecipeDirection retrieved = new RecipeDirection();\n if(allDirections != null){\n for(int i = 0; i < allDirections.size(); i++){\n if(allDirections.get(i).getKeyID() == returnedDirection1){\n retrieved = allDirections.get(i);\n }\n }\n }\n assertEquals(\"addRecipeDirection - Correct Number\", 1, retrieved.getDirectionNumber(), 0);\n assertEquals(\"addRecipeDirection - Correct Text\", \"TestDirection1\", retrieved.getDirectionText());\n }",
"@Test\n void insertSuccess() {\n String name = \"Testing a new event\";\n LocalDate date = LocalDate.parse(\"2020-05-23\");\n LocalTime startTime = LocalTime.parse(\"11:30\");\n LocalTime endTime = LocalTime.parse(\"13:45\");\n String notes = \"Here are some new notes for my new event.\";\n GenericDao userDao = new GenericDao(User.class);\n User user = (User)userDao.getById(1);\n\n Event newEvent = new Event(name, date, startTime, endTime, notes, user);\n int id = genericDao.insert(newEvent);\n assertNotEquals(0,id);\n Event insertedEvent = (Event)genericDao.getById(id);\n assertEquals(newEvent, insertedEvent);\n }",
"@Test\n void insertWithBatchSuccess() {\n\n User testUser = new User(\"tester\", \"password\", \"first name test\", \"last name test\", \"[email protected]\", \"53589\", LocalDate.of(1980, 6, 16));\n Batch testBatch = new Batch(\"White Spotted Dog\", \"porter\", LocalDate.of(2019, 4, 1), LocalDate.of(2019, 4, 1), LocalDate.of(2019, 4, 1), LocalDate.of(2019, 4, 1), 1.055, 1.043);\n // this way each of the entities know about one another!\n testUser.addBatch(testBatch);\n // grab the id of the newly added user, use it to verify the new user was created\n int newId = genericDao.insert(testUser);\n\n User anotherTestUser = (User) genericDao.getById(newId);\n assertEquals(testUser, anotherTestUser);\n\n }",
"@Test\n public void testAddMine() throws Exception {\n Mine.addMine(9, 9);\n assertEquals(\"success\", Mine.addMine(9, 9));\n\n }",
"@Test\n @Transactional\n void createEnseignerWithExistingId() throws Exception {\n enseigner.setId(1L);\n\n int databaseSizeBeforeCreate = enseignerRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restEnseignerMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(enseigner)))\n .andExpect(status().isBadRequest());\n\n // Validate the Enseigner in the database\n List<Enseigner> enseignerList = enseignerRepository.findAll();\n assertThat(enseignerList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n public void Tester_UI_when_find_contact_not_added() throws Exception{System.out.println(\"TODO\") ;}",
"@Test\r\n\tpublic void testAddPregnancyRecord() {\r\n\t\t\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setMultiplicity(\"2\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setWeightGain(\"12.5\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setNumHoursInLabor(\"-1\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setNumWeeksPregnant(\"39\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\t\r\n\t\toic.setYearOfConception(\"a\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setYearOfConception(\"2005\");\r\n\t\toic.setDeliveryType(\"Vaginal Delivery\");\r\n\t\tAssert.assertTrue(oic.getDeliveryType().equals(\"Vaginal Delivery\"));\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\t\t\r\n\t\t\r\n\t\toic.setYearOfConception(\"101\");\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setYearOfConception(\"2005\");\r\n\t\toic.setNumHoursInLabor(\"3\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertFalse(oic.getDisplayedPregnancies().isEmpty());\r\n\t}",
"@Test\n public void validUserCreation() {\n boolean success = this.userDAO.insertNewUser(testUser);\n\n Assertions.assertTrue(success);\n }",
"@Test\n @Transactional\n void createLessonTimetableWithExistingId() throws Exception {\n lessonTimetable.setId(1L);\n\n int databaseSizeBeforeCreate = lessonTimetableRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restLessonTimetableMockMvc\n .perform(\n post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(lessonTimetable))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the LessonTimetable in the database\n List<LessonTimetable> lessonTimetableList = lessonTimetableRepository.findAll();\n assertThat(lessonTimetableList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\r\n public void testSave() {\r\n System.out.println(\"save\");\r\n Festivity object = new Festivity();\r\n object.setStart(Calendar.getInstance().getTime());\r\n object.setEnd(Calendar.getInstance().getTime());\r\n object.setName(\"Test Fest\"+System.currentTimeMillis());\r\n object.setPlace(\"Narnia\");\r\n boolean expResult = true;\r\n boolean result = Database.save(object);\r\n assertEquals(expResult, result);\r\n }",
"public void testValidateFieldsAdd() throws Exception {\n this.mSession = new PortalSessionTestFacade(new InstanceSelectorPlusDirectActionsTemplate());\n\n this.mSession.startFlow(\"start\");\n assertNotNull(this.mSession.getCurrentPage());\n assertNotNull(this.mSession.getCurrentPage());\n\n // emtpy required field Peroon.Naam and press add button\n this.mSession.handleButtonEvent(\"add\", new RequestTemplate(\"Persoon.Naam\", \"\"));\n assertNotNull(this.mSession.getCurrentPage());\n assertEquals(\"Persoon instance must be added\", 4,\n this.mSession.getProfile().getAllInstancesForEntity(\"Persoon\", false).length);\n }",
"@Test\n\t\t\tpublic void testRoomEntry()\n\t\t\t{\n\t\t\t\t// two steps from a room two steps away\n\t\t\t\tboard.calcTargets(13, 10, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 9)));\n\t\t\t\t\n\t\t\t\t//Test entering a door when steps are greater than distance to room\n\t\t\t\tboard.calcTargets(8, 7, 8);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 6)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"@Test\n @Transactional\n void createTipoObraWithExistingId() throws Exception {\n tipoObra.setId(1L);\n\n int databaseSizeBeforeCreate = tipoObraRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restTipoObraMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(tipoObra)))\n .andExpect(status().isBadRequest());\n\n // Validate the TipoObra in the database\n List<TipoObra> tipoObraList = tipoObraRepository.findAll();\n assertThat(tipoObraList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n public void getIngredient_CorrectInformation(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"getIngredient - Correct Name\", \"Flour\", retrieved.getName());\n assertEquals(\"getIngredient - Correct ID\", returned, retrieved.getKeyID());\n }",
"public static boolean testDaoCreateUnRapportVisite(RapportVisite unRapport){\n boolean ok = true;\n try {\n daoRapportVisite.create(unRapport);\n } catch (Exception ex) {\n Logger.getLogger(TestDao.class.getName()).log(Level.SEVERE, null, ex);\n ok = false;\n }\n \n System.out.println(\"le rapport de visite créé:\");\n System.out.println(unRapport);\n \n return ok; \n }",
"@Test\n public void testInsertDataWSSuccess() {\n try {\n \tProviderDAO providerDAO = new ProviderDAOImpl();\n \tProvider provider = new Provider();\n \tPersonDAO personDAO = new PersonDAOImpl();\n \tPerson person = new Person();\n \tperson = personDAO.getPersonById(\"1\");\n \tprovider = providerDAO.getProviderByPerson(person);\n \tString retVal = providerDAO.insertDataWS(provider);\n \t\n \tif (retVal != null) {\n \t\tAssert.assertTrue(true);\n \t\tSystem.out.println(\"[testInsertDataWSSuccess] - \" + retVal);\n \t} else {\n \t\tAssert.assertTrue(false);\n \t}\n\n } catch (Exception e) {\n Assert.assertFalse(false);\n }\n }",
"@Test\n public void shouldCreateCase() {\n assertThat(DatabaseHelper.getCaseDao().queryForAll().size(), is(0));\n\n TestEntityCreator.createCase();\n\n // Assure that the case has been successfully created\n assertThat(DatabaseHelper.getCaseDao().queryForAll().size(), is(1));\n }",
"@Test\n void testSuccess_saveAndLoadStreetLines() {\n assertAddress(saveAndLoad(entity).address, \"123 W 14th St\", \"8th Fl\", \"Rm 8\");\n }",
"@Test\n public void testAddingReport() {\n Assert.assertEquals(\"Incorrect initial water report list size\", 0,\n theModel.getReportList().size());\n try {\n Account holder = new Account(1, \"bills\", \"bills\", Credential.ADMIN);\n WaterReport a = new WaterReport(holder, \"Bottled\", \"Waste\",\n \"Today\", new Location(45, 50));\n WaterReport b = new WaterReport(holder, \"Well\",\n \"Potable\", \"Today\", new Location(30, 25));\n WaterReport c = new WaterReport(holder, \"Stream\",\n \"Treatable - Muddy\", \"Today\", new Location(20, 65));\n theModel.addReport(a);\n theModel.addReport(b);\n theModel.addReport(c);\n Assert.assertEquals(\"WaterReport list size incorrect after adding\", 3,\n theModel.getReportList().size());\n } catch (Exception e) {\n Assert.fail(\"adding water reports should not have failed here\");\n e.printStackTrace();\n }\n }"
] | [
"0.6578237",
"0.63298035",
"0.6282293",
"0.60967743",
"0.6085985",
"0.60755616",
"0.60683435",
"0.6023099",
"0.60078377",
"0.59757143",
"0.5959337",
"0.5906862",
"0.59031004",
"0.5877729",
"0.5859259",
"0.584413",
"0.58286875",
"0.58137447",
"0.5812545",
"0.5812293",
"0.5810285",
"0.58054894",
"0.5800362",
"0.57859725",
"0.57855946",
"0.5762142",
"0.5760132",
"0.57540494",
"0.57439697",
"0.57315415",
"0.57268566",
"0.5713211",
"0.56924206",
"0.5689536",
"0.56830263",
"0.5680942",
"0.5680574",
"0.5670013",
"0.56684226",
"0.5662638",
"0.5648209",
"0.5620019",
"0.5605148",
"0.5594605",
"0.5585445",
"0.558444",
"0.5583733",
"0.55679834",
"0.5557577",
"0.5547144",
"0.5538964",
"0.55347997",
"0.55244344",
"0.55198294",
"0.5517828",
"0.55106044",
"0.5505094",
"0.5504451",
"0.55041945",
"0.5497474",
"0.549695",
"0.549407",
"0.5489884",
"0.54885256",
"0.5487057",
"0.5484233",
"0.547135",
"0.54646546",
"0.54580796",
"0.54494625",
"0.5448499",
"0.5445242",
"0.5442091",
"0.5441234",
"0.54355115",
"0.5424373",
"0.5420805",
"0.5416014",
"0.5413018",
"0.5410534",
"0.5409831",
"0.5406028",
"0.54051256",
"0.5404581",
"0.5402661",
"0.5401738",
"0.5396102",
"0.5378935",
"0.5375698",
"0.53730375",
"0.5370006",
"0.5366501",
"0.5362827",
"0.53626376",
"0.53536487",
"0.5352903",
"0.53527397",
"0.5352677",
"0.53518",
"0.53499764"
] | 0.5349722 | 100 |
Tests that the key table is autogenerating values | @Test
public void testGetNewTableKey() throws SQLException
{
assertEquals(1, DatabaseGateway.getNewID());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test \n\tpublic void testGetAllKeysFromKeyTable() throws SQLException\n\t{\n\t\tnew PowerTool(\"asdf\", 5, 5, \"PowerTooldescription\", true);\n\t\tArrayList<Integer> results = DatabaseGateway.getAllKeysFromKeyTable();\n\t\tassertTrue(results.contains(1));\n\t\n\t}",
"private void doAPITest(Map<Object,Object> table) {\n\t\tint size = table.size();\n\t\tObject key, value;\n\t\t\n\t\tMap<Object,Object> clone = cloneMap(table);\n\t\t\n\t\t// retrieve values using values()\n\t\tCollection<Object> values = table.values();\n\t\t\n\t\t// retrieve keys using keySet()\n\t\tSet<Object> keySet = table.keySet();\t\t\n\t\tObject[] keySetArray = keySet.toArray();\n\t\t\n\t\tint step = 1 + random.nextInt(5);\n\t\t\n\t\tfor (int i=0; i<keySetArray.length; i=i+step)\n\t\t{\n\t\t\tkey = keySetArray[i];\n\t\t\t// retrieve value\n\t\t\tvalue = table.get(key);\n\t\t\t\n\t\t\t// assert value is in the table\n\t\t\tassertTrue(table.containsValue(value));\n\t\t\t/*\n\t\t\t * assertTrue(table.contains(value)); // Removed as not supported by the Map interface, and identical to containsValue\n\t\t\t * if value is a wrapped key then check it's equal \n\t\t\t * to the key \n\t\t\t */\n\t\t\tif (value instanceof CustomValue)\n\t\t\t{\n\t\t\t\tassertEquals(key, ((CustomValue)value).key);\n\t\t\t}\n\t\t\t\n\t\t\t// count how many occurrences of this value there are\n\t\t\tint occurrences = numberOccurrences(values, value);\n\t\t\t\n\t\t\t// find the Map.Entry\n\t\t\tSet<Map.Entry<Object, Object>> entrySet = table.entrySet();\n\t\t\tIterator<Map.Entry<Object, Object>> entrySetIterator = entrySet.iterator();\n\t\t\tMap.Entry<Object,Object> entry = null;\n\t\t\tdo\n\t\t\t{\n\t\t\t\tentry = entrySetIterator.next();\n\t\t\t} while (!entry.getKey().equals(key));\n\t\t\t\n\t\t\t// remove from table in different ways\n\t\t\tswitch (i % 3)\n\t\t\t{\n\t\t\tcase 0:\n\t\t\t\ttable.remove(key);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tkeySet.remove(key);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t\n\t\t\t\tentrySet.remove(entry);\n\t\t\t}\n\t\t\t\n\t\t\t// assert key is no longer in the table\n\t\t\tassertFalse(table.containsKey(key));\n\t\t\t// assert key is no longer in the keyset\n\t\t\tassertFalse(keySet.contains(key));\n\t\t\t// assert key is no longer in the entrySet\n\t\t\tassertFalse(entrySet.contains(entry));\n\t\t\t\n\t\t\t// assert that there's one fewer of this value in the hashtable\n\t\t\tassertEquals(occurrences, numberOccurrences(values, value) + 1);\n\t\t\t\n\t\t\t// re-insert key\n\t\t\ttable.put(key, value);\n\t\t\t\n\t\t\t// assert key is in the table\n\t\t\tassertTrue(table.containsKey(key));\n\t\t\t// assert key is in the keyset\n\t\t\tassertTrue(keySet.contains(key));\n\t\t\t// assert EntrySet is same size\n\t\t\tassertEquals(size, entrySet.size());\n\t\t}\n\t\t\n\t\t// test hashtable is the same size\n\t\tassertEquals(size, table.size());\n\t\t\n\t\t// test keySet is expected size\n\t\tassertEquals(size, keySet.size());\n\t\t\n\t\t// retrieve keys using keys()\n\t\tIterator<?> keys = table.keySet().iterator();\n\t\t\n\t\t// remove a subset of elements from the table. store in a map\n\t\tint counter = table.size() / 4;\n\t\tMap<Object,Object> map = new HashMap<Object, Object>();\n\t\twhile (keys.hasNext() && counter-- >= 0)\n\t\t{\n\t\t\tkey = keys.next();\n\t\t\tvalue = table.get(key);\n\t\t\tmap.put(key, value);\n\t\t\tkeys.remove(); // removes the most recent retrieved element\n\t\t}\n\t\t// re-add the elements using putAll\n\t\ttable.putAll(map);\n\t\t\n\t\t// test equal to copy\n\t\tassertEquals(clone, table);\n\t\t\n\t\t// clear the copy\n\t\tclone.clear();\n\t\t\n\t\t// assert size of clone is zero\n\t\tassertEquals(0, clone.size());\n\t\t\n\t\t// assert size of original is the same\n\t\tassertEquals(size, table.size());\n\t}",
"@Test\n public void testKeyGeneration() {\n final int NUM_KEYS = 10;\n Set<byte[]> generatedKeys = new HashSet<>(NUM_KEYS);\n\n for (int i = 0; i < NUM_KEYS; ++i) {\n byte[] newKey = KeyGenerator.instance().generateKey();\n\n assertFalse(\"Duplicate key generated #\" + i, generatedKeys.contains(newKey));\n generatedKeys.add(newKey);\n }\n }",
"private static <T> boolean anyKeyGeneratable(\n final DynamoDBMapperTableModel<T> model,\n final T object,\n final DynamoDBMapperConfig.SaveBehavior saveBehavior\n ) {\n for (final DynamoDBMapperFieldModel<T, Object> field : model.keys()) {\n if (canGenerate(model, object, saveBehavior, field)) {\n return true;\n }\n }\n return false;\n }",
"public static boolean canRetrieveMultiRowGeneratedKeys(IntrospectedTable introspectedTable) {\n return introspectedTable.getGeneratedKey().map(GeneratedKey::isJdbcStandard)\n .orElse(false);\n }",
"@Test\n\tpublic void getIdTest() {\n\t\tAssert.assertEquals(DEFAULT_ID, getDefaultKey().getId());\n\t}",
"@Test\n public void test004_test_numKeys() {\n try {\n HashTableADT test = new HashTable<Integer, String>();\n if (test.numKeys() != 0) {\n fail(\"numKeys not correct\");\n }\n test.insert(1, \"2\");\n if (test.numKeys() != 1) {\n fail(\"numKeys not correct\");\n }\n test.insert(2, \"3\");\n if (test.numKeys() != 2) {\n fail(\"numKeys not correct\");\n }\n test.insert(3, \"4\");\n if (test.numKeys() != 3) {\n fail(\"numKeys not correct\");\n }\n test.remove(2);\n if(test.numKeys() != 2) {\n fail(\"numKeys not correct\");\n }\n } catch (Exception e) {\n fail(\"Exception shouldn't be thrown\");\n }\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n String[] stringArray0 = new String[20];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \" = \", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"PRIMARY KEY (, , , , , , , , , , , , , , , , , , , )\", string0);\n }",
"@Test(timeout = 4000)\n public void test124() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionContext\");\n String[] stringArray0 = new String[4];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"org.apache.derby.iapi.sql.execute.ExecutionContext\", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n String string0 = SQLUtil.ukSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"UNIQUE (, , , )\", string0);\n }",
"static void generateUnique(Table table, Key key, PrintWriter outData, String mcomma)\r\n {\r\n String comma = \" ( \";\r\n String keyname = key.name.toUpperCase();\r\n if (keyname.indexOf(table.name.toUpperCase()) == -1)\r\n keyname = table.name.toUpperCase()+\"_\"+keyname;\r\n outData.println(mcomma+\"CONSTRAINT \"+keyname+\" UNIQUE\");\r\n for (int i=0; i<key.fields.size(); i++, comma = \" , \")\r\n {\r\n String name = (String) key.fields.elementAt(i);\r\n outData.println(comma+name);\r\n }\r\n outData.println(\" )\");\r\n for (int i=0; i < key.options.size(); i++)\r\n {\r\n String option = (String) key.options.elementAt(i);\r\n outData.println(\" \"+option);\r\n }\r\n }",
"@Test public void keyDefinition() {\n fail( \"Not yet implemented\" );\n }",
"@Test\n public void setPrimaryKey_length_good_case_min()\n {\n // Arrange\n String key = \"0123456789012345\";\n SymmetricKey symmetricKey = new SymmetricKey();\n // Act\n symmetricKey.setPrimaryKeyFinal(key);\n // Assert\n assertEquals(key, Deencapsulation.getField(symmetricKey, \"primaryKey\"));\n }",
"@Test\n public void testGetKey()\n { \n assertThat(m_SUT.getKey(), is(\"test key\"));\n }",
"public static void validateKeys(Model model) throws MolgenisModelException\r\n\t{\r\n\t\tlogger.debug(\"validate the fields used in 'unique' constraints...\");\r\n\t\t// validate the keys\r\n\t\tfor (Entity entity : model.getEntities())\r\n\t\t{\r\n\t\t\tString entityname = entity.getName();\r\n\t\t\tint autocount = 0;\r\n\t\t\tfor (Field field : entity.getAllFields())\r\n\t\t\t{\r\n\t\t\t\tString fieldname = field.getName();\r\n\t\t\t\tif (field.isAuto() && field.getType() instanceof IntField)\r\n\t\t\t\t{\r\n\t\t\t\t\tautocount++;\r\n\r\n\t\t\t\t\tboolean iskey = false;\r\n\r\n\t\t\t\t\tfor (Unique unique : entity.getAllKeys())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor (Field keyfield : unique.getFields())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (keyfield.getName() == null) throw new MolgenisModelException(\"unique field '\"\r\n\t\t\t\t\t\t\t\t\t+ fieldname + \"' is not known in entity \" + entityname);\r\n\t\t\t\t\t\t\tif (keyfield.getName().equals(field.getName())) iskey = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (!iskey) throw new MolgenisModelException(\r\n\t\t\t\t\t\t\t\"there can be only one auto column and it must be the primary key for field '\" + entityname\r\n\t\t\t\t\t\t\t\t\t+ \".\" + fieldname + \"'\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (field.getType() instanceof EnumField)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (field.getDefaultValue() != null && !\"\".equals(field.getDefaultValue())) if (!field\r\n\t\t\t\t\t\t\t.getEnumOptions().contains(field.getDefaultValue()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthrow new MolgenisModelException(\"default value '\" + field.getDefaultValue()\r\n\t\t\t\t\t\t\t\t+ \"' is not in enum_options for field '\" + entityname + \".\" + fieldname + \"'\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (autocount > 1) throw new MolgenisModelException(\r\n\t\t\t\t\t\"there should be only one auto column and it must be the primary key for entity '\" + entityname\r\n\t\t\t\t\t\t\t+ \"'\");\r\n\r\n\t\t\t// to strict, the unique field may be non-automatic\r\n\t\t\tif (!entity.isAbstract() && autocount < 1)\r\n\t\t\t{\r\n\t\t\t\tthrow new MolgenisModelException(\r\n\t\t\t\t\t\t\"there should be one auto column for each root entity and it must be the primary key for entity '\"\r\n\t\t\t\t\t\t\t\t+ entityname + \"'\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"static void generatePrimary(Table table, Key key, PrintWriter outData, String mcomma)\r\n {\r\n String comma = \" ( \";\r\n String keyname = key.name.toUpperCase();\r\n if (keyname.indexOf(table.name.toUpperCase()) == -1)\r\n keyname = table.name.toUpperCase()+\"_\"+keyname;\r\n outData.println(mcomma+\"CONSTRAINT \"+keyname+\" PRIMARY KEY\");\r\n for (int i=0; i < key.fields.size(); i++, comma = \" , \")\r\n {\r\n String name = (String) key.fields.elementAt(i);\r\n outData.println(comma+name);\r\n }\r\n outData.println(\" )\");\r\n for (int i=0; i < key.options.size(); i++)\r\n {\r\n String option = (String) key.options.elementAt(i);\r\n outData.println(\" \"+option);\r\n }\r\n }",
"boolean isFetchKeys();",
"@Test\n public void testKeyUniqueness() throws Exception {\n UserMultiID umk = createUMK();\n UserMultiID eppnKey = new UserMultiID(umk.getEppn());\n UserMultiID eptidKey = new UserMultiID(umk.getEptid());\n UserMultiID openIdKey = new UserMultiID(umk.getOpenID());\n UserMultiID openIdConnectKey = new UserMultiID(umk.getOpenIDConnect());\n UserMultiID ruKey = new UserMultiID(umk.getRemoteUserName());\n\n String otherIDP = \"idp:other:\" + getRandomString();\n checkIDPUniqueness(eppnKey, otherIDP);\n checkIDPUniqueness(openIdConnectKey, otherIDP);\n checkIDPUniqueness(openIdKey, otherIDP);\n checkIDPUniqueness(ruKey, otherIDP);\n\n User eptidUser = newUser();\n eptidUser.setUserMultiKey(eptidKey);\n getUserStore().save(eptidUser);\n try {\n getDBSClient().getUser(eptidKey, otherIDP);\n assert false : \"Error: eptid must match idp exactly.\";\n } catch (Throwable t) {\n assert true;\n }\n\n }",
"boolean hasRandomKey();",
"@Before\r\n public void test_change(){\r\n HashTable<String,String> table = new HashTable<>(1);\r\n MySet<String> s = (MySet<String>) table.keySet();\r\n table.put(\"AA\",\"BB\");\r\n table.put(\"AA\",\"CC\");\r\n assertTrue(s.contains(\"AA\"));\r\n table.remove(\"AA\");\r\n assertFalse(s.contains(\"AA\"));\r\n }",
"@Test\n public void reuseKeys() throws Exception {\n VolatileLookUpTable.Builder<IntOption> builder = new VolatileLookUpTable.Builder<>();\n LookUpKey key = key();\n\n key.add(new IntOption(100));\n builder.add(key, new IntOption(100));\n key.reset();\n\n key.add(new IntOption(101));\n builder.add(key, new IntOption(101));\n key.reset();\n\n key.add(new IntOption(102));\n builder.add(key, new IntOption(102));\n key.reset();\n\n LookUpTable<IntOption> table = builder.build();\n assertThat(sort(table.get(key(100))), is(values(100)));\n assertThat(sort(table.get(key(101))), is(values(101)));\n assertThat(sort(table.get(key(102))), is(values(102)));\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_18()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public boolean checkInsert(int key){\n\n // Returns false if the key is present.\n for (int curr : getAllKeys()) if(curr == key) return false;\n // Returns true if the key is not found.\n return true;\n\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_26()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"\"), new DBSchema(\"\"), \"\", \"\");\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// org.databene.commons.ConfigurationError: No environment definition '.env.properties' found\n\t\t// at org.databene.jdbacl.DBUtil.getConnectData(DBUtil.java:122)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.<init>(JDBCDBImporter.java:110)\n\t\tassertNotNull(result);\n\t}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_20()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable();\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Test\n public void keySetTest()\n {\n map.putAll(getAMap());\n assertNotNull(map.keySet());\n }",
"@Test(timeout = 4000)\n public void test125() throws Throwable {\n DBCatalog dBCatalog0 = new DBCatalog();\n DBSchema dBSchema0 = new DBSchema(\"}{,65x^HxS\", dBCatalog0);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"%@gEV{P$8\", dBSchema0);\n String[] stringArray0 = new String[3];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"}{,65x^HxS\", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n String string0 = SQLUtil.ukSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"UNIQUE (, , )\", string0);\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_16()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"\", \"\", \"\", \"\", \"\", \"\"), new DBSchema(\"\", new DBCatalog(\"\")), \"0123456789\", \"0123456789\");\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importColumns(JDBCDBImporter.java:430)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importTableDetails(JDBCDBImporter.java:389)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importTable(JDBCDBImporter.java:384)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}",
"protected static void initPropertyKey() {\n String path = URL_PREFIX + SCHEMA_PKS;\n\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"name\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"age\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"city\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"lang\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"date\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"price\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"weight\\\",\\n\"\n + \"\\\"data_type\\\": \\\"DOUBLE\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_17()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\"), (DBSchema) null, (String) null, (String) null);\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getCatalog(LazyTable.java:130)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}",
"@Override\r\n\tprotected void buildUniqueKeys(final DatabaseTable table) throws SQLException {\r\n\t\tif (views.contains(table)) {\r\n\t\t\t// buildUniqueKeysOfView(table);\r\n\t\t} else {\r\n\t\t\tbuildUniqueKeysOfTable(table);\r\n\t\t}\r\n\t}",
"public boolean hasPrimaryKeyValue() {\r\n return false;\r\n }",
"public boolean hasPrimaryKeyValue() {\r\n return false;\r\n }",
"public boolean hasPrimaryKeyValue() {\r\n return false;\r\n }",
"@Test(timeout = 4000)\n public void test001() throws Throwable {\n String[] stringArray0 = new String[20];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \" = \", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n String string0 = SQLUtil.ukSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"CONSTRAINT \\\" = \\\" UNIQUE (, , , , , , , , , , , , , , , , , , , )\", string0);\n }",
"public void testGetColumnKey() {\n TaskSeriesCollection c = createCollection1();\n assertEquals(\"Task 1\", c.getColumnKey(0));\n assertEquals(\"Task 2\", c.getColumnKey(1));\n assertEquals(\"Task 3\", c.getColumnKey(2));\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_25()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable();\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Test (timeout=180000)\n public void testCoveredStartKey() throws Exception {\n TableName table =\n TableName.valueOf(\"tableCoveredStartKey\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by creating an overlap in the metadata\n HRegionInfo hriOverlap =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A2\"), Bytes.toBytes(\"B2\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriOverlap);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriOverlap);\n ServerName server = regionStates.getRegionServerOfRegion(hriOverlap);\n TEST_UTIL.assertRegionOnServer(hriOverlap, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.OVERLAP_IN_REGION_CHAIN,\n ERROR_CODE.OVERLAP_IN_REGION_CHAIN });\n assertEquals(3, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n\n // fix the problem.\n doFsck(conf, true);\n\n // verify that overlaps are fixed\n HBaseFsck hbck2 = doFsck(conf, false);\n assertErrors(hbck2, new ERROR_CODE[0]);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }",
"@Test\n public void testDAM31901001() {\n // in this case, there are different querirs used to generate the ids.\n // the database id is specified in the selectKey element\n testDAM30602001();\n }",
"boolean isPrimaryKey();",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_29()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\");\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"boolean hasKey();",
"boolean hasKey();",
"boolean hasKey();",
"boolean hasKey();",
"boolean hasKey();",
"@Test\n public void test001_IllegalNullKey() {\n try {\n HashTableADT htIntegerKey = new HashTable<Integer, String>();\n htIntegerKey.insert(null, null);\n fail(\"should not be able to insert null key\");\n } catch (IllegalNullKeyException e) {\n /* expected */ } catch (Exception e) {\n fail(\"insert null key should not throw exception \" + e.getClass().getName());\n }\n }",
"@Test\n public void setPrimaryKey_length_good_case_max()\n {\n // Arrange\n String key = \"0123456789012345678901234567890123456789012345678901234567890123\";\n SymmetricKey symmetricKey = new SymmetricKey();\n // Act\n symmetricKey.setPrimaryKeyFinal(key);\n // Assert\n assertEquals(key, Deencapsulation.getField(symmetricKey, \"primaryKey\"));\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_24()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public void testInsert3() throws Exception {\n DAS das = DAS.FACTORY.createDAS(getConnection());\n Command insert = das.createCommand(\"insert into COMPANY (NAME) values (?)\");\n insert.setParameter(1, \"AAA Rental\");\n insert.execute();\n // Integer key = (Integer) insert.getParameterValue(\"generated_key\");\n Integer key = new Integer(insert.getGeneratedKey());\n\n // Verify insert\n Command select = das.createCommand(\"Select ID, NAME from COMPANY where ID = ?\");\n select.setParameter(1, key);\n DataObject root = select.executeQuery();\n assertEquals(key, root.get(\"COMPANY[1]/ID\"));\n\n }",
"@Test\n public void test002_Insert_And_Get() {\n try {\n HashTableADT test = new HashTable<Integer, String>();\n test.insert(1, \"2\");\n test.insert(2, \"3\");\n test.insert(3, \"4\");\n if (test.get(1) != \"2\") { //checks if get returns the correct values\n fail(\"insert or get didn't work\");\n }\n if (test.get(2) != \"3\") {\n fail(\"insert or get didn't work\");\n }\n if (test.get(3) != \"4\") {\n fail(\"insert or get didn't work\");\n }\n } catch (Exception e) {\n fail(\"Exception shouldn't be thrown\");\n }\n }",
"public void testGetRowKey() {\n TaskSeriesCollection c = createCollection1();\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_23()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\"), (DBSchema) null, (String) null, (String) null);\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getCatalog(LazyTable.java:130)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}",
"@Test(timeout = 4000)\n public void test091() throws Throwable {\n String[] stringArray0 = new String[9];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"%)vq\", (DBSchema) null);\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, (String) null, true, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"PRIMARY KEY (, , , , , , , , )\", string0);\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_27()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"\"), new DBSchema(\"0123456789\", new DBCatalog(\"\", new DefaultDatabase(\"\", \"\", VersionNumber.valueOf(\"\")))), \"An��t-1.0.txt\", \"An��t-1.0.txt\");\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importColumns(JDBCDBImporter.java:430)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importTableDetails(JDBCDBImporter.java:389)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importTable(JDBCDBImporter.java:384)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}",
"public static boolean generateMultipleRowInsert(IntrospectedTable introspectedTable) {\n return introspectedTable.getGeneratedKey().map(GeneratedKey::isJdbcStandard)\n .orElse(true);\n }",
"@Test(timeout = 4000)\n public void test326() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n errorPage0.a();\n Table table0 = new Table(errorPage0, (String) null);\n assertTrue(table0._isGeneratedId());\n \n table0.id(\"faTn+C~BG'z'N~LP\");\n assertFalse(table0._isGeneratedId());\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_28()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\"), (DBSchema) null, (String) null, (String) null);\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getCatalog(LazyTable.java:130)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}",
"@Test(timeout = 4000)\n public void test002() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n defaultDBTable0.setName(\"4O)ZgZ_/TD!\");\n String string0 = SQLUtil.substituteMarkers(\"\", \"CONSTRAINT 4O)ZgZ_/TD! PRIMARY KEY (, , , , , , , , , , , , , , , , , )\", defaultDBTable0);\n assertEquals(\"\", string0);\n }",
"@Test\n\tvoid testPickupKey1() {\n\t\tdungeon.setPlayer(player);\n\t\tdungeon.setGoal(goal);\n\t\t\n\t\tKey key = new Key(1,1);\n\t\tdungeon.addEntity(key);\n\t\tdungeon.clock(\"Down\");\n\t\tdungeon.clock(\"Right\");\n\t\t\n\t\tKey pickupKey = player.getKey();\n\t\tassertEquals(pickupKey, key, \"Player cannot pick up a key : \" + pickupKey + \"\\n\");\n\t}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_10()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"\", \"\", \"\", \"\", \"\", \"\"), new DBSchema(\"\", new DBCatalog(\"\")), \"0123456789\", \"0123456789\");\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importColumns(JDBCDBImporter.java:430)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importTableDetails(JDBCDBImporter.java:389)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importTable(JDBCDBImporter.java:384)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_11()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\"), (DBSchema) null, (String) null, (String) null);\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getCatalog(LazyTable.java:130)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}",
"public void testNormalKeySet()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkKeySet(pmf,\r\n HashMap1.class,\r\n ContainerItem.class,\r\n String.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_19()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"0123456789\", new DBSchema(\"\", new DBCatalog(\"\")));\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public void testRead() throws Exception {\n DAS das = DAS.FACTORY.createDAS(getConnection());\n Command select = das.createCommand(\"Select * from COMPANY\");\n select.executeQuery();\n\n try {\n select.getGeneratedKey();\n fail(\"Should throw exception\");\n } catch (RuntimeException e) {\n assertEquals(\"This method is only valid for insert commands\", e.getMessage());\n }\n }",
"private void createTestData() {\n for (int i = startKey; i < startKey + numKeys; i++) {\n keys.add(i);\n }\n }",
"@Test (timeout=180000)\n public void testDupeStartKey() throws Exception {\n TableName table =\n TableName.valueOf(\"tableDupeStartKey\");\n try {\n setupTable(table);\n assertNoErrors(doFsck(conf, false));\n assertEquals(ROWKEYS.length, countRows());\n\n // Now let's mess it up, by adding a region with a duplicate startkey\n HRegionInfo hriDupe =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A\"), Bytes.toBytes(\"A2\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriDupe);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriDupe);\n ServerName server = regionStates.getRegionServerOfRegion(hriDupe);\n TEST_UTIL.assertRegionOnServer(hriDupe, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.DUPE_STARTKEYS,\n ERROR_CODE.DUPE_STARTKEYS});\n assertEquals(2, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows()); // seems like the \"bigger\" region won.\n\n // fix the degenerate region.\n doFsck(conf,true);\n\n // check that the degenerate region is gone and no data loss\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_21()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"\"), new DBSchema(\"\"), \"\", \"\");\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// org.databene.commons.ConfigurationError: No environment definition '.env.properties' found\n\t\t// at org.databene.jdbacl.DBUtil.getConnectData(DBUtil.java:122)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.<init>(JDBCDBImporter.java:110)\n\t\tassertNotNull(result);\n\t}",
"@PreInsert\n public void onBeforeInsert() {\n if (this.key == null) {\n this.key = UUID.randomUUID();\n }\n onBeforeUpdate();\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_22()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"\", \"\", \"\", \"\", \"\", \"\"), new DBSchema(\"\", new DBCatalog(\"\")), \"0123456789\", \"0123456789\");\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importColumns(JDBCDBImporter.java:430)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importTableDetails(JDBCDBImporter.java:389)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importTable(JDBCDBImporter.java:384)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}",
"@Test\n public void testCoh3710_keySetContainsAll()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().containsAll(\n Collections.singleton(Integer.valueOf(1))));\n validateIndex(cache);\n }\n });\n }",
"@Test\n public void testTableFactoryEmpty() {\n TableController tableController = tableFactory.getTableController();\n Map<Integer, ArrayList<Table>> tableMap = tableController.getTableMap();\n // loop through the map, check that each list is empty\n for (ArrayList<Table> list : tableMap.values()) {\n assertEquals(0, list.size());\n }\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_12()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\");\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Test\n public void test005_test_duplicate_key() {\n try {\n HashTableADT test = new HashTable<Integer, String>();\n test.insert(1, \"2\");\n test.insert(2, \"3\");\n test.insert(1, \"4\");\n } catch (DuplicateKeyException q) {\n //Expected Exception\n } catch (Exception e) {\n fail(\"Correct Exception wasn't thrown\");\n }\n }",
"@Override\r\n\tprotected void loadUniqueIndexMap(TestBooking entiy) {\n\t\t\r\n\t}",
"@Test(timeout = 4000)\n public void test099() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[0];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"*F(PV|\", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n String string0 = SQLUtil.constraintSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"CONSTRAINT *F(PV| PRIMARY KEY ()\", string0);\n }",
"@Test\n @Run(unless = {Dbms.SQLITE})\n public void testId_table(Config config) throws Exception {\n TableStrategyDao dao = new TableStrategyDaoImpl(config);\n for (int i = 0; i < 110; i++) {\n TableStrategy entity = new TableStrategy();\n dao.insert(entity);\n assertNotNull(entity.getId());\n }\n }",
"@Test(expected = Exception.class)\n public void test() throws Exception {\n\n new HashMap<>();\n MyHashTable2 mp = new MyHashTable2();\n mp.put(\"prem\",7);\n mp.put(\"radha\",72);\n mp.put(\"geeta\",74);\n mp.put(\"sunita\",76);\n mp.put(\"atul\",87);\n mp.put(\"rakesh\",37);\n mp.put(\"aklesh\",72);\n\n // try to add duplicate keys and test exception\n mp.put(\"aklesh\",72);\n\n\n assert 7 == mp.get(\"prem\");\n assert 72 == mp.get(\"aklesh\");\n assert 87 == mp.get(\"atul\");\n assert null == mp.get(\"noting\");\n\n System.out.println(mp.getKeySet());\n\n mp.prettyPrint();\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_15()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"\"), new DBSchema(\"\"), \"\", \"\");\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// org.databene.commons.ConfigurationError: No environment definition '.env.properties' found\n\t\t// at org.databene.jdbacl.DBUtil.getConnectData(DBUtil.java:122)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.<init>(JDBCDBImporter.java:110)\n\t\tassertNotNull(result);\n\t}",
"@Override\r\n\tprotected void buildPrimaryKeys(final DatabaseTable table) throws SQLException {\r\n\t\tif (views.contains(table)) {\r\n\t\t\t// buildPrimaryKeysOfView(table);\r\n\t\t} else {\r\n\t\t\tbuildPrimaryKeysOfTable(table);\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_30()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"0123456789\", new DBSchema(\"\", new DBCatalog(\"\")));\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Test(timeout = 4000)\n public void test097() throws Throwable {\n String[] stringArray0 = new String[8];\n DBSchema dBSchema0 = new DBSchema(\"B?<P%cF\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"V\", dBSchema0);\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \" on \", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"CONSTRAINT \\\" on \\\" PRIMARY KEY (, , , , , , , )\", string0);\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_6()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\"), (DBSchema) null, (String) null, (String) null);\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getCatalog(LazyTable.java:130)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}",
"@Test(timeout = 4000)\n public void test124() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(\"Illegal column type format: \");\n String[] stringArray0 = new String[9];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"66i,cw\", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n assertEquals(\"table\", defaultDBTable0.getObjectType());\n }",
"public boolean hasKeys();",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_14()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable();\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (, 0123456789, An��t-1.0.txt, )\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Override\n public boolean supportsGetGeneratedKeys() {\n return false;\n }",
"protected void initializeEmbeddableKey() {\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n String[] stringArray0 = new String[6];\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"NestedRawReadOnlyUserTransaction\");\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"getRowId(int)\", true, stringArray0);\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"CONSTRAINT getRowId(int) PRIMARY KEY (, , , , , )\", string0);\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_1()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\");\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (, 0123456789, An��t-1.0.txt, )\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"boolean hasInsertOrUpdate();",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_4()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"\", \"\", \"\", \"\", \"\", \"\"), new DBSchema(\"\", new DBCatalog(\"\")), \"0123456789\", \"0123456789\");\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importColumns(JDBCDBImporter.java:430)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importTableDetails(JDBCDBImporter.java:389)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importTable(JDBCDBImporter.java:384)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}",
"public abstract boolean insert(Key key);",
"@Override\n protected void evaluateUniqueKeys(final DatabaseMetaData _metaData,\n final String _tableName,\n final String _sqlStatement)\n throws SQLException\n {\n final String sqlStmt = new StringBuilder()\n .append(\"select c.CONSTRAINTNAME INDEX_NAME, g.DESCRIPTOR COLUMN_NAME\")\n .append(\" from SYS.SYSTABLES t, SYS.SYSCONSTRAINTS c, SYS.SYSKEYS k, SYS.SYSCONGLOMERATES g \")\n .append(\" where t.tablename='\").append(_tableName).append(\"'\")\n .append(\" AND t.TABLEID=c.TABLEID\")\n .append(\" AND c.TYPE='U'\")\n .append(\" AND c.CONSTRAINTID = k.CONSTRAINTID\")\n .append(\" AND k.CONGLOMERATEID = g.CONGLOMERATEID\")\n .toString();\n super.evaluateUniqueKeys(_metaData, _tableName, sqlStmt);\n }",
"@Before\n public void setUp() {\n hashTable = new HashTable();\n hashTable.put(\"Savon\", \"Yuliya\");\n hashTable.put(\"Blue\", \"lake\");\n hashTable.put(\"math\", \"camp\");\n }",
"@Test(timeout = 4000)\n public void test047() throws Throwable {\n String[] stringArray0 = new String[5];\n DBSchema dBSchema0 = new DBSchema(\"\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"k4#~A6 _d6{6v)5_\", dBSchema0);\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"\", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.createConstraintSpecBuilder(dBPrimaryKeyConstraint0, nameSpec0);\n StringBuilder stringBuilder1 = SQLUtil.appendConstraintName((DBConstraint) dBPrimaryKeyConstraint0, stringBuilder0, nameSpec0);\n assertEquals(\"\", stringBuilder1.toString());\n }",
"@Test\n public void testInjectOnScan_Empty_Reg() throws Exception {\n Connector conn = tester.getConnector();\n\n // create table, add table split, write data\n final String tableName = getUniqueNames(1)[0];\n SortedSet<Text> splitset = new TreeSet<>();\n splitset.add(new Text(\"f\"));\n TestUtil.createTestTable(conn, tableName, splitset);\n\n // expected data back\n Map<Key, Value> expect = new HashMap<>(HardListIterator.allEntriesToInject);\n\n // attach InjectIterator\n IteratorSetting itset = new IteratorSetting(15, InjectIterator.class);\n conn.tableOperations().attachIterator(tableName, itset, EnumSet.of(IteratorUtil.IteratorScope.scan));\n itset = new IteratorSetting(16, DebugIterator.class);\n conn.tableOperations().attachIterator(tableName, itset, EnumSet.of(IteratorUtil.IteratorScope.scan));\n\n // read back both tablets in parallel\n Scanner scan = conn.createScanner(tableName, Authorizations.EMPTY);\n// Key startKey = new Key(new Text(\"d\"), cf, cq);\n\n log.debug(\"Results of scan on table \" + tableName + ':');\n Map<Key, Value> actual = new TreeMap<>(TestUtil.COMPARE_KEY_TO_COLQ); // only compare row, colF, colQ\n for (Map.Entry<Key, Value> entry : scan) {\n Key k = entry.getKey();\n Value v = entry.getValue();\n log.debug(k + \" \" + v);\n Assert.assertFalse(\"Duplicate entry found: \" + k, actual.containsKey(k)); // passes on normal scanner\n actual.put(k, v);\n }\n Assert.assertEquals(expect, actual);\n\n // delete test data\n conn.tableOperations().delete(tableName);\n }",
"boolean isKey( ImmutableBitSet columns );",
"public void setupKeys()\n {\n KeyAreaInfo keyArea = null;\n keyArea = new KeyAreaInfo(this, Constants.UNIQUE, \"PrimaryKey\");\n keyArea.addKeyField(\"ID\", Constants.ASCENDING);\n keyArea = new KeyAreaInfo(this, Constants.SECONDARY_KEY, \"CurrencyCode\");\n keyArea.addKeyField(\"CurrencyCode\", Constants.ASCENDING);\n keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, \"Description\");\n keyArea.addKeyField(\"Description\", Constants.ASCENDING);\n }",
"@Test\n public void testCoh3710_keySetContains()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().contains(Integer.valueOf(1)));\n validateIndex(cache);\n }\n });\n }",
"@Test\n\tpublic void setIdTest() {\n\t\tProductScanImageURIKey key = getDefaultKey();\n\t\tkey.setId(OTHER_ID);\n\t\tAssert.assertEquals(OTHER_ID, key.getId());\n\t}"
] | [
"0.6604696",
"0.63507676",
"0.6282951",
"0.61653644",
"0.6048527",
"0.60123163",
"0.5986967",
"0.5969345",
"0.5966205",
"0.59212977",
"0.5906426",
"0.58886063",
"0.5843587",
"0.58415055",
"0.5798958",
"0.57909214",
"0.5781107",
"0.57805914",
"0.57603997",
"0.57465154",
"0.5742277",
"0.5737355",
"0.5729508",
"0.57278025",
"0.57210535",
"0.57134527",
"0.5704983",
"0.5704482",
"0.5703629",
"0.56970674",
"0.5682832",
"0.5682832",
"0.5682832",
"0.5666173",
"0.5651953",
"0.56492287",
"0.5640518",
"0.5638095",
"0.5632961",
"0.563153",
"0.5630761",
"0.5630761",
"0.5630761",
"0.5630761",
"0.5630761",
"0.5630462",
"0.56187934",
"0.56115633",
"0.56049883",
"0.56024176",
"0.55994666",
"0.5599336",
"0.5598942",
"0.55905914",
"0.55873233",
"0.5559178",
"0.5555634",
"0.55446607",
"0.55369425",
"0.55334496",
"0.5530376",
"0.55237544",
"0.5522549",
"0.551594",
"0.55123764",
"0.5510466",
"0.55080867",
"0.5507235",
"0.55030006",
"0.5494151",
"0.54799473",
"0.54798573",
"0.54796094",
"0.5457273",
"0.5447789",
"0.54431564",
"0.5441528",
"0.5438553",
"0.54374194",
"0.5436015",
"0.5435828",
"0.5429813",
"0.5419504",
"0.54169405",
"0.5410555",
"0.54036206",
"0.53844196",
"0.53795195",
"0.53757286",
"0.5375714",
"0.53635395",
"0.5359492",
"0.53502685",
"0.53432435",
"0.5342922",
"0.53248626",
"0.53236336",
"0.532176",
"0.5321752",
"0.5317828"
] | 0.61387783 | 4 |
Tests getting an object by it's id | @Test
public void testGetObjectByID() throws SQLException
{
InventoryItem nail = new Nail("asdf",5,5,5.0,20);
ResultSet rs = DatabaseGateway.getObjectByID("Nail", nail.id);
if(rs.next())
{
assertEquals(rs.getInt("id"),1);
assertEquals(rs.getInt("ManufacturerID"),5);
assertEquals(rs.getInt("Price"),5);
assertEquals(rs.getString("UPC"),"asdf");
assertTrue(rs.getDouble("Length") == 5.0);
assertEquals(rs.getInt("NumberInBox"), 20);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }",
"Object get(ID id) throws Exception;",
"@Test\r\n public void testGetId() {\r\n System.out.println(\"getId\");\r\n \r\n int expResult = 0;\r\n int result = instance.getId();\r\n assertEquals(expResult, result);\r\n \r\n \r\n }",
"@Test\n void getByIdSuccess() {\n logger.info(\"running getByID test\");\n User retrievedUser = (User)genericDao.getById(2);\n\n assertEquals(\"BigAl\", retrievedUser.getUserName());\n assertEquals(\"Albert\", retrievedUser.getFirstName());\n assertEquals(2, retrievedUser.getId());\n assertEquals(\"Einstein\", retrievedUser.getLastName());\n assertEquals(\"11223\", retrievedUser.getZipCode());\n assertEquals(LocalDate.of(1879,3,14), retrievedUser.getBirthDate());\n\n }",
"@Order(2)\n\t@Test\n\tpublic void Attempt_GetItemByIdSuccess()\n\t{\n\t\tint iD = 1;\n\t\tboolean owned = false;\n\t\tItem test_Item = is.getItemByID(iD, owned);\n\t\tassertTrue(test_Item != null);\n\t}",
"@Test\r\n public void testSelectById() {\r\n System.out.println(\"selectById\");\r\n int id = 1;\r\n AbonentDAL instance = new AbonentDAL();\r\n Abonent result = instance.selectById(id);\r\n assertTrue(result!=null && result.getId()==id);\r\n }",
"@Test\n void testGetByIdUser() {\n User getUser = (User) userData.crud.getById(1);\n assertEquals(\"Kevin\", getUser.getFirstName());\n logger.info(\"Got user information for ID: \" + getUser.getId());\n }",
"@Test\n\tpublic void testGetID() {\n\t}",
"public void testFindAccountById(){\n\t\tint id = 10 ;\n\t\tAccount acc = this.bean.findAccountById(id ) ;\n\t\tAssert.assertEquals(id, acc.getId()) ;\n\t}",
"@Test\n public void testGetId() {\n System.out.println(\"getId\");\n DTO_Ride instance = dtoRide;\n long expResult = 1L;\n long result = instance.getId();\n assertEquals(expResult, result);\n }",
"@Test\r\n\tpublic void testGetId() {\r\n\t\tassertEquals(1, breaku1.getId());\r\n\t\tassertEquals(2, externu1.getId());\r\n\t\tassertEquals(3, meetingu1.getId());\r\n\t\tassertEquals(4, teachu1.getId());\r\n\t}",
"@Test\n @DisplayName(\"Deve obter um livro por id\")\n public void getByIdTest() {\n given(bookRepositoryMocked.findById(ID)).willReturn(Optional.of(bookSavedMocked));\n\n // When execute save\n Optional<Book> foundBook = bookService.findById(ID);\n\n // Then\n assertThat(foundBook.isPresent()).isTrue();\n assertThat(foundBook.get()).isEqualTo(bookSavedMocked);\n\n // And verify mocks interaction\n verify(bookRepositoryMocked, times(1)).findById(ID);\n }",
"@Test\n public void testFindById() {\n System.out.println(\"findById\");\n Integer id = 1;\n PrioridadRest instance = mokPrioridadRest;\n Prioridad expResult = new Prioridad(1);\n Prioridad result = instance.findById(id);\n assertEquals(expResult, result);\n \n }",
"@Test\n public void findByIdTest() {\n Long id = 1L;\n reservation1.setId(id);\n Mockito.when(reservationDao.findById(id)).thenReturn(reservation1);\n Reservation result = reservationService.findById(id);\n Assert.assertEquals(reservation1, result);\n Assert.assertEquals(id, reservation1.getId());\n }",
"@Test\n void getByIdSuccess() {\n Event retrievedEvent = (Event)genericDao.getById(2);\n assertNotNull(retrievedEvent);\n assertEquals(\"Dentist\", retrievedEvent.getName());\n }",
"@Test\n public void testGetId() {\n System.out.println(\"getId\");\n Reserva instance = new Reserva();\n Long expResult = null;\n Long result = instance.getId();\n assertEquals(expResult, result);\n \n }",
"public New getObject(long id);",
"@Test\n\tpublic void findById() {\n\t\tICallsService iCallsService = new CallsServiceImpl(new ArrayList<>());\n\t\tiCallsService.addCallReceived(new Call(1l));\n\t\tAssert.assertTrue(1l == iCallsService.findById(1l).getId().longValue());\n\t}",
"@Test\n public void testGetId() {\n System.out.println(\"Animal.getId\");\n assertEquals(252, animal1.getId());\n assertEquals(165, animal2.getId());\n }",
"public void testGetId(){\n exp = new Experiment(\"10\");\n assertEquals(\"getId does not work\", \"10\", exp.getId());\n }",
"@Test\n void getByIdSuccess() {\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(2);\n\n //Create Test Car\n Car testCar = new Car(1,user,\"2016\",\"Jeep\",\"Wrangler\",\"1C4BJWFG2GL133333\");\n\n //Ignore Create/Update times\n testCar.setCreateTime(null);\n testCar.setUpdateTime(null);\n\n //Get Existing Car\n Car retrievedCar = carDao.getById(1);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(testCar,retrievedCar);\n }",
"@Test\n public void getUserByIdCatch() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n //test fetching of data\n assertNull(userResource.getUser(\"notdummy\"));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }",
"@Test\n public void testSelectById() {\n disciplineTest = disciplineDao.selectById(1);\n boolean result = disciplineTest.getId() == 1;\n assertTrue(result);\n }",
"@Test\n\tpublic void getIdTest() {\n\t}",
"@Test\n void getByIdSuccess() {\n User retrievedUser = (User) dao.getById(1);\n //User retrievedUser = dao.getById(1);\n assertEquals(\"Dave\", retrievedUser.getFirstName());\n assertEquals(\"Queiser\", retrievedUser.getLastName());\n }",
"@Test\n public void getOrderByIdTest() {\n Long orderId = 10L;\n Order response = api.getOrderById(orderId);\n Assert.assertNotNull(response);\n Assert.assertEquals(10L, response.getId().longValue());\n Assert.assertEquals(10L, response.getPetId().longValue());\n Assert.assertEquals(1, response.getQuantity().intValue());\n\n verify(exactly(1), getRequestedFor(urlEqualTo(\"/store/order/10\")));\n }",
"T getbyId(I id);",
"private DBObject getById(MongoDbServer entity, String id) throws Exception {\n MongoClient mongoClient = new MongoClient(entity.getAttribute(SoftwareProcess.HOSTNAME));\n try {\n DB db = mongoClient.getDB(TEST_DB);\n DBCollection testCollection = db.getCollection(TEST_COLLECTION);\n DBObject doc = testCollection.findOne(new BasicDBObject(\"_id\", new ObjectId(id)));\n return doc;\n } finally {\n mongoClient.close();\n }\n }",
"@Test\n void getNoteByIdSuccess() {\n Note retrievedNote = (Note) noteDao.getById(1);\n assertEquals(1, retrievedNote.getId());\n assertEquals(\"Amari Rodgers\", retrievedNote.getProspect());\n }",
"@Test\n void getByIdSuccess () {\n TestEntity testEntity = buildEntity();\n Api2 instance = new Api2();\n Long result = instance.save(testEntity);\n System.out.println(\"Result\" + result);\n\n if (result != null) {\n Optional<TestEntity> optionalEntity = instance.getById(TestEntity.class, result);\n\n TestEntity entity = optionalEntity.orElse(null);\n\n if (entity != null) {\n Assertions.assertEquals(result, entity.getId());\n Assertions.assertNotNull(result);\n } else {\n Assertions.fail();\n }\n } else {\n Assertions.fail();\n }\n }",
"@Test\n public void testGetId() {\n System.out.println(\"getId\");\n Member instance = member;\n \n String expResult = \"myId\";\n String result = instance.getId();\n \n assertEquals(expResult, result);\n }",
"T findById(final ID id) throws RequiredValueException, NoEntityFoundException;",
"T getById(ID id);",
"T get(ID id);",
"@Test\n public void findByWrongId() throws DAOException {\n int id = 10;\n Country actual = countryDAO.findById(id);\n Assert.assertEquals(actual, null);\n }",
"T getById(int id);",
"@Test\r\n public void testEGet_int() {\r\n System.out.println(\"get\");\r\n \r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n Usuario obj = instance.getByUserName(\"admin\");\r\n \r\n int usuarioId = obj.getId();\r\n \r\n Usuario result = instance.get(usuarioId);\r\n \r\n assertEquals(usuarioId, result.getId());\r\n }",
"@Test\n void getByID() {\n Role role = (Role) roleDAO.getByID(1);\n assertEquals(\"Nerf Herder\", role.getRoleName());\n }",
"@Test\n\tpublic void test_get_by_id_success(){\n\t\tResponseEntity<User> response = template.getForEntity(\n\t\t\t\tREST_SERVICE_URI + \"/20\" + ACCESS_TOKEN + token, User.class);\n\t\tUser user = response.getBody();\n\t\tassertThat(user.getEmail(), is(\"[email protected]\"));\n\t\tassertThat(response.getStatusCode(), is(HttpStatus.OK));\n\t\tvalidateCORSHttpHeaders(response.getHeaders());\n\t}",
"public void testResolveByID() throws Exception {\n\n String id = \"occ_pollux\";\n super.checkResolveByID(id);\n // assert that the object returned is \n // a occurrence and that it is the one expected\n assertEquals(id, tag.getOccurrence().getID());\n \n }",
"void checkNotFound(Integer id);",
"@Test\r\n\tpublic final void testGetRoomById() {\n\t\tRoom actual = roomServices.getRoomById(expected.getId());\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public Data findById(Object id);",
"@Test\n public void getUserById() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n //test fetching of data\n assertNotNull(userResource.getUser(\"dummy\"));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }",
"@org.junit.Test\r\n public void testGetReviewById2() throws Exception {\r\n System.out.println(\"getReviewById2\");\r\n Long id = null;\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n try{\r\n Review result = service.getReviewById(id);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted null id\");\r\n }",
"@Test\n void findById() {\n when(ownerRepository.findById(anyLong())).thenReturn(Optional.of(returnOwner));\n\n Owner owner = service.findById(1L);\n\n assertNotNull(owner);\n }",
"public BankThing retrieve(String id);",
"@Test\n void findOne() {\n UserEntity userEntity = new UserEntity();\n userEntity.setId(1);\n userEntity.setFirstName(\"mickey\");\n userEntity.setLastName(\"mouse\");\n UserEntity save = repository.save(userEntity);\n\n // then find\n UserEntity byId = repository.getById(1);\n\n System.out.println(\"byId.getId() = \" + byId.getId());\n\n Assert.isTrue(1 == byId.getId());\n }",
"@Test\n public void getShiftByIdCatch() {\n shiftDAO.createShift(new Shift(4,4,4,4));\n assertNull(shiftResource.getShiftById(5));\n //deleting dummy-shift\n shiftDAO.removeShift(4);\n }",
"@Test\n public void test_get_2() throws Exception {\n User user1 = createUser(1, true);\n\n User res = instance.get(user1.getId());\n\n assertNull(\"'get' should be correct.\", res);\n }",
"@Test\n public void retriveByIdTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(1);\n assertNotNull(servizio,\"Should return true if return Servizio 1\");\n }",
"T findById(ID id) ;",
"public abstract T byId(ID id);",
"@Test\n public void shouldReturnOneNoteById() {\n Note note = noteService.findOneById(1L);\n\n // Then\n assertThat(note, is(equalTo(note1)));\n }",
"T get(Integer id);",
"@Test\n\t public void testRetrieveById(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t\twhen(entityManager.find(Users.class,\"a1234567\")).thenReturn(user);\n\t\t\t\tUsers savedUser = userDao.retrieveById(\"a1234567\");\n\t\t\t\tassertNotNull(savedUser);\n\t\t\t\tassertTrue(savedUser.getFirstName().equals(\"MerchandisingUI\"));\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing retrieveById:.\",se);\n\t\t }\n\t }",
"public void testGetId_Accuracy() {\r\n int id = 1;\r\n UnitTestHelper.setPrivateField(AuditDetail.class, auditDetail, \"id\", new Integer(id));\r\n assertEquals(\"The id value should be got properly.\", id, auditDetail.getId());\r\n }",
"@Test\n void getByIdOrderSuccess() {\n Order retrievedOrder = dao.getById(2);\n assertNotNull(retrievedOrder);\n assertEquals(\"February Large Long-Sleeve\", retrievedOrder.getDescription());\n\n }",
"@Test\n\tvoid testIdNotFound() {\n\t\tOfficer officer = new Officer(\"414\",\"Harish\",\"officer\",\"Harish Keni\",\"Karnataka\");\n\t \t\t\n\t\tassertThrows(IdNotFoundException.class,()->iOfficerService.editOfficer(officer,\"414\"));\n\t\t\n\t}",
"@Test\n\tpublic void givenGetItemById_whenValidId_ThenSuccess() {\n\t\tHashMap<String, Object> expected = getRecordHashMapWithId(1, 5, \"Apples\", \"Fruits\", 2.50f);\n\n\t\tHashMap<String, Object> actual = given().\n\t\t\tpathParam(\"id\", expected.get(\"id\")).\n\t\twhen().\n\t\t\tget(\"/{id}\").\n\t\tthen().\n\t\t\tstatusCode(HttpStatus.OK.value()).\n\t\t\tcontentType(ContentType.JSON).\n\t\t\textract().path(\"$\");\n\n\t\tassertThat(expected).isEqualTo(actual);\n\n\t}",
"@Test\n void getByIdSuccess(){\n CompositionInstrument retrievedCompositionInstrument = (CompositionInstrument) genericDao.getById(3);\n assertEquals(\"Mellits\", retrievedCompositionInstrument.getComposition().getComposer().getLastName());\n\n }",
"@Test\n public void testFindProductByID_1() throws Exception {\n System.out.println(\"findProductByID_1\");\n String id = \"1\";\n Database instance = new Database();\n instance.addProduct(1, new Product(1.0, \"\", 1));\n try{\n assertEquals(instance.findProductByID(id), new Product(1.0, \"\", 1));\n }catch(AssertionError e){\n fail(\"testFindProductByID_1 failed\");\n }\n }",
"@Test\n void getByIdSuccess() {\n RunCategory retrievedCat = (RunCategory)dao.getById(1);\n assertEquals(\"A Ending, New Game\", retrievedCat.getCategoryName());\n }",
"@Test\n public void testGet() {\n System.out.println(\"get\");\n int id = 0;\n Address result = instance.get(id);\n assertTrue(result.validate());\n \n }",
"@Test\n public void testGetId_edificio() {\n System.out.println(\"getId_edificio\");\n DboEdificio instance = new DboEdificio(1, \"T-3\");\n int expResult = 1;\n int result = instance.getId_edificio();\n assertEquals(expResult, result);\n \n }",
"@Test\n\tpublic void getOwnerByIdTest() throws Exception {\n\t\tmockMvc.perform(get(\"/owner/4\"))\n\t\t.andExpect(status().isOk())\n\t\t.andExpect(content().contentType(contentType))\n\t\t.andExpect(jsonPath(\"$.id\", is(4)))\n\t\t.andExpect(jsonPath(\"$.firstName\", is(\"Harold\")))\n\t\t.andExpect(jsonPath(\"$.lastName\", is(\"Davis\")))\n\t\t.andExpect(jsonPath(\"$.city\", is(\"Windsor\")))\n\t\t.andExpect(jsonPath(\"$.address\", is(\"563 Friendly St.\")))\n\t\t.andExpect(jsonPath(\"$.telephone\", is(\"6085553198\")));\n\t}",
"@Test\n public void idTest() {\n // TODO: test id\n }",
"@Test\n public void idTest() {\n // TODO: test id\n }",
"@Test\n void getByIdFail () {\n Api2 instance = new Api2();\n Optional<TestEntity> optionalEntity = instance.getById(TestEntity.class, 1000000L);\n assertFalse(optionalEntity.isPresent());\n }",
"@Test\r\n public void getIdTest() {\r\n assertEquals(1, testTile.getId());\r\n }",
"@org.junit.Test\r\n public void testGetReviewById1() throws Exception {\r\n System.out.println(\"getReviewById1\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n review = service.insertReview(review);\r\n Review result = service.getReviewById(id);\r\n assertEquals(review, result);\r\n }",
"@Test\n void getByIdSuccess() {\n UserRoles retrievedRole = (UserRoles)genericDAO.getByID(1);\n assertEquals(\"administrator\", retrievedRole.getRoleName());\n assertEquals(1, retrievedRole.getUserRoleId());\n assertEquals(\"admin\", retrievedRole.getUserName());\n }",
"@Test\r\n public void testGetId() {\r\n System.out.println(\"getId\");\r\n Integrante instance = new Integrante();\r\n Long expResult = null;\r\n Long result = instance.getId();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"@Test\r\n public void testGetID() {\r\n user = userFactory.getUser(\"C\");\r\n assertEquals(\"121\", user.getID());\r\n }",
"@Override\n\tpublic EvaluateCustom getObjectById(Integer id) {\n\t\treturn evaluateMapper.getObjectById(id);\n\t}",
"@Test\n public void findByIdTest() {\n }",
"@Test\n public void findByIdTest() {\n }",
"public abstract Object get(String entityName, Serializable id);",
"public abstract T findOne(int id);",
"public abstract Object get(String oid) throws OIDDoesNotExistException;",
"@Test\n public void testGetRoundById() {\n Game testGame = new Game();\n \n testGame.setCorrectSolution(\"1234\");\n testGame.setGameOver(false);\n gameDao.addGame(testGame);\n \n Round testRound1 = new Round();\n testRound1.setGameId(testGame.getGameId());\n testRound1.setUserGuess(\"3214\");\n testRound1.setTime(LocalDateTime.now());\n testRound1.setResult(\"RESULT\");\n testRound1 = roundDao.addRound(testRound1);\n \n Round roundBackFromDao = roundDao.getRoundById(testRound1.getRoundId());\n \n assertEquals(testRound1, roundBackFromDao);\n }",
"String get(String id);",
"@Test\n public void test_get_by_id_success() throws Exception {\n UserDto user = new UserDto(1L, \"Daenerys\", \"Targaryen\", \"[email protected]\");\n\n when(userService.getUserById(1L)).thenReturn(user);\n\n mockMvc.perform(get(\"/users/{id}\", 1)).andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.userId\", is(1))).andExpect(jsonPath(\"$.userFirstName\", is(\"Daenerys\")));\n\n verify(userService, times(1)).getUserById(1L);\n verifyNoMoreInteractions(userService);\n }",
"E getById(long id);",
"@Override\r\n\tpublic Object findById(long id) {\n\t\treturn null;\r\n\t}",
"@Test\n public void getID() {\n\n }",
"public abstract T findByID(ID id) ;",
"T getById(Long id);",
"@Override\n\tpublic T get(ID id) {\n\t\tOptional<T> obj = getDao().findById(id);\n\t\tif (obj.isPresent()) {\n\t\t\treturn obj.get();\n\t\t}\t\t\n\t\treturn null;\n\t}",
"@Test\n void getByIdSuccess() {\n UserRoles retrievedUserRole = (UserRoles) genericDao.getById(2);\n assertEquals(\"all\", retrievedUserRole.getRoleName());\n assertEquals(\"fhensen\", retrievedUserRole.getUserName());\n\n assertNotNull(retrievedUserRole);\n }",
"@Test\n public void getId() {\n UUID id = UUID.randomUUID();\n User u = new User(id.toString(), name, mail, pass, address, gender);\n Assert.assertEquals(u.getId(), id);\n }",
"@Test\n public void testFailureWithNonexistantObjectId() throws URISyntaxException, IOException {\n testCantView(adminLogin, reqFactory.createIdApiRequest(Types.PACKAGE).execute(hc), 404);\n }",
"public T findById(int id)\n {\n Connection connection = null;\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n String query = createSelectQuery(\"id\");\n try\n {\n connection = ConnectionFactory.getConnection();\n statement = connection.prepareStatement(query);\n statement.setInt(1,id);\n resultSet = statement.executeQuery();\n\n return createObjects(resultSet).get(0);\n }catch (SQLException e)\n {\n LOGGER.log(Level.WARNING,type.getName() + \"DAO:findById\"+ e.getMessage());\n }finally {\n ConnectionFactory.close(resultSet);\n ConnectionFactory.close(statement);\n ConnectionFactory.close(connection);\n }\n return null;\n }",
"@Test\n public void testgetandsetId() {\n session.setId(22);\n // Now check if the id actually is 22.\n assertEquals(22, session.getId());\n }",
"public abstract long getId(T obj);",
"public void testFindAuthorByID() {\r\n //given\r\n System.out.println(\"findAuthorByID\");\r\n int authorID = 18;\r\n AuthorHibernateDao instance = new AuthorHibernateDao();\r\n \r\n //when\r\n Author result = instance.findAuthorByID(authorID);\r\n \r\n //then\r\n assertEquals(\"Maksim Gorky\", result.getName()); \r\n }",
"@Test\n @DisplayName(\"Deve retornar vazio ao obter um livro por Id que ele nao existe na base\")\n public void bookNotFoundByIdTest() {\n given(bookRepositoryMocked.findById(ID_NOT_FOUND)).willReturn(Optional.empty());\n\n // When execute save\n Optional<Book> foundBook = bookService.findById(ID_NOT_FOUND);\n\n // Then\n assertThat(foundBook.isPresent()).isFalse();\n\n // And verify mocks interaction\n verify(bookRepositoryMocked, times(1)).findById(ID_NOT_FOUND);\n }",
"@Test\n public void selectById() {\n }",
"E getObject(int ID) throws DatabaseObjectNotFoundException, DatabaseNotAccessibleException;",
"@Test\n\tpublic void findByIdTest() {\n\t\tProductPrice price = repository.findById(proudctId).get();\n\t\tlog.info(\"\"+price.getValue());\n\t\tassertThat(price.getValue()).isEqualTo(22.22);\n\t}"
] | [
"0.780207",
"0.7405831",
"0.7148567",
"0.70830476",
"0.7032151",
"0.70079744",
"0.6988607",
"0.6952547",
"0.6936357",
"0.6921087",
"0.69124585",
"0.6908636",
"0.6892828",
"0.6868811",
"0.685918",
"0.6854815",
"0.68418515",
"0.68070984",
"0.68069834",
"0.67959094",
"0.6792173",
"0.6773393",
"0.6747878",
"0.6742153",
"0.6730288",
"0.67239577",
"0.6721392",
"0.67162347",
"0.668797",
"0.66444564",
"0.6617525",
"0.66173095",
"0.6613679",
"0.66063446",
"0.65990084",
"0.65836304",
"0.6572929",
"0.6570033",
"0.65542614",
"0.6553888",
"0.65422875",
"0.6540534",
"0.6538197",
"0.653669",
"0.65150356",
"0.65119183",
"0.65023977",
"0.6496742",
"0.6494416",
"0.64891195",
"0.64802974",
"0.64770067",
"0.6472964",
"0.6467187",
"0.64644194",
"0.64596075",
"0.6455327",
"0.64492226",
"0.644902",
"0.6447012",
"0.6429094",
"0.64281905",
"0.64241725",
"0.641546",
"0.6415321",
"0.64105666",
"0.64039737",
"0.64039737",
"0.6399052",
"0.6390274",
"0.63826865",
"0.63796633",
"0.6375138",
"0.6366594",
"0.63631815",
"0.63553745",
"0.63553745",
"0.6351921",
"0.63434505",
"0.63427275",
"0.634233",
"0.6337686",
"0.63278955",
"0.6322094",
"0.63093525",
"0.62995076",
"0.62939113",
"0.62851703",
"0.62815684",
"0.6274799",
"0.6272506",
"0.62721306",
"0.6258914",
"0.62486166",
"0.6245528",
"0.62449265",
"0.6244756",
"0.6243401",
"0.6237122",
"0.62289953"
] | 0.68113416 | 17 |
Tests adding a row to a database table. | @Test
public void testCreateRow() throws SQLException
{
String insertStatement = "INSERT INTO Nail (" +
"id, UPC, ManufacturerID, Price,Length, NumberInBox" +
") VALUES (1,'asdf',5,5,5.0,20)";
DatabaseGateway.createRow(insertStatement);
ResultSet rs = DatabaseGateway.getObjectByID("Nail", 1);
if(rs.next())
{
assertEquals(rs.getInt("id"),1);
assertEquals(rs.getInt("ManufacturerID"),5);
assertEquals(rs.getInt("Price"),5);
assertEquals(rs.getString("UPC"),"asdf");
assertTrue(rs.getDouble("Length") == 5.0);
assertEquals(rs.getInt("NumberInBox"), 20);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testAddRowCommit() {\n\t}",
"@Test\r\n public void testInsert() {\r\n assertTrue(false);\r\n }",
"@Test\n public void addIngredient_DatabaseUpdates(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"addIngredient - Correct Ingredient Name\", \"Flour\", retrieved.getName());\n assertEquals(\"addIngredient - Set Ingredients ID\", returned, retrieved.getKeyID());\n }",
"@Test\n public void testInsert() throws SQLException {\n QueryRunner runner = new QueryRunner(dataSource);\n int result = runner.update(\"insert into sys_user(user_id, username, password, full_name) values(?, ?, ?, ?)\", 2, \"test\", \"test\", \"test\");\n Assert.assertEquals(1, result);\n }",
"@Order(9)\n\t@Test\n\tpublic void Attempt_AddUser() throws SQLException\n\t{\n\t\tUser testUser = new User(\"Test\",\"Drone\",\"TestCase\",\"NoOne\",\"CaresAboutthis\",\"[email protected]\");\n\t\tboolean Expected = true, actual = us.addUser(testUser);\n\t\tassertEquals(Expected,actual);\n\t}",
"int insert(TestEntity record);",
"@Test\n public void addRecipe_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertNotEquals(\"addRecipe - Returns True\", -1, returned);\n }",
"@Test\n\tpublic void testInsertObj() {\n\t}",
"@Test\n public void testInsert() throws Exception {\n\n }",
"@Test\n public void testAddTablet() {\n System.out.println(\"addTablet\");\n Tablet tb = new Tablet(\"T005\", \"tablet005\", 0,0);\n DBTablet instance = new DBTablet();\n boolean expResult = true;\n boolean result = instance.addTablet(tb);\n assertEquals(expResult, result);\n }",
"@Test\n public void addRecipeIngredient_ReturnsID(){\n int returned = testDatabase.addRecipeIngredient(recipeIngredient);\n assertNotEquals(\"addRecipeIngredient - Returns True\", -1, returned);\n }",
"int addRow(RowData row_data) throws IOException;",
"@Test\n public void testInsertingValidValues() throws SQLException {\n CommitStructure commit = getSampleCommit();\n MysqlDatabase mysqlDatabase = new MysqlDatabase(connection);\n assertTrue(mysqlDatabase.insertCommitToDatabase(commit));\n }",
"@Test\n public void addHighScoreTest() {\n database.createHighScoreTable(testTable);\n assertTrue(database.addHighScore(100, testTable));\n database.clearTable(testTable);\n\n }",
"@Test\n public void insertNote_returnRow() throws Exception {\n // Arrange\n Note note = new Note(TestUtil.TEST_NOTE_1);\n LiveDataTestUtil<DataStateStatus<Integer>> liveDataTestUtil = new LiveDataTestUtil<>();\n final int insertedRow = 1;\n Flowable<DataStateStatus<Integer>> returnedData = SingleToFlowable.just(DataStateStatus.success(insertedRow, INSERT_SUCCESS));\n when(localRepository.insertNote(any(Note.class))).thenReturn(returnedData);\n\n // Act\n noteViewModel.setNote(note);\n DataStateStatus<Integer> returnedValue = liveDataTestUtil.getValue(noteViewModel.insertNote());\n\n // Assert\n assertEquals(DataStateStatus.success(insertedRow, INSERT_SUCCESS), returnedValue);\n }",
"@Test\n public void testInsert() throws Exception {\n TestConnection conn = methodWatcher.getOrCreateConnection();\n conn.setAutoCommit(false);\n\n // insert good data\n PreparedStatement ps = methodWatcher.prepareStatement(\n String.format(\"insert into %s.%s (taskId, empId, startedAt, finishedAt) values (?,?,?,?)\",\n tableSchema.schemaName, TASK_TABLE_NAME));\n ps.setString(1, \"1011\");\n ps.setInt(2, 101);\n ps.setInt(3, 0600);\n ps.setInt(4, 0700);\n int rows = ps.executeUpdate();\n\n Assert.assertEquals(1, rows);\n }",
"@Test\n public void editIngredient_ReturnsTrue(){\n int returned = testDatabase.getIngredient(\"egg\");\n testDatabase.deleteIngredient(returned);\n Ingredient newIngredient = new Ingredient(ingredientID, \"egg\");\n assertEquals(\"editIngredient - Returns True\", true, testDatabase.editIngredient(newIngredient));\n }",
"@Test\n void insertSuccess() {\n Date today = new Date();\n User newUser = new User(\"Artemis\", \"Jimmers\", \"[email protected]\", \"ajimmers\", \"supersecret2\", today);\n int id = dao.insert(newUser);\n assertNotEquals(0, id);\n User insertedUser = (User) dao.getById(id);\n assertNotNull(insertedUser);\n assertEquals(\"Jimmers\", insertedUser.getLastName());\n //Could continue comparing all values, but\n //it may make sense to use .equals()\n }",
"@Test\n public void addIngredient_ReturnsID(){\n int returned = testDatabase.addIngredient(ingredient);\n assertNotEquals(\"addIngredients - Returns True\",-1, returned);\n }",
"public void testInsert() throws SQLException, ClassNotFoundException {\r\n\t\t// create an instance to be test\r\n\t\tDate d = Date.valueOf(\"2017-01-01\");\r\n\t\tService service = new Service(\"employee\", 1, \"variation\", \"note\", d, d, 1, 1);\r\n\t\tmodelDS.insert(service); // method to test\r\n\r\n\t\t// database extrapolation\r\n\t\tPreparedStatement ps = connection.prepareStatement(\"SELECT * FROM \" + TABLE_NAME + \" WHERE employee = ?\");\r\n\t\tps.setString(1, \"employee\");\r\n\t\tResultSet rs = ps.executeQuery();\r\n\t\tService expected = null;\r\n\t\twhile (rs.next()) {\r\n\t\t\texpected = new Service();\r\n\t\t\texpected.setId(rs.getInt(\"id\"));\r\n\t\t\texpected.setEmployee(rs.getString(\"employee\"));\r\n\t\t\texpected.setQuantity(rs.getInt(\"quantity\"));\r\n\t\t\texpected.setVariation(rs.getString(\"variation\"));\r\n\t\t\texpected.setNote(rs.getString(\"note\"));\r\n\t\t\texpected.setReceiptDate(rs.getDate(\"receipt_date\"));\r\n\t\t\texpected.setReturnDate(rs.getDate(\"return_date\"));\r\n\t\t\texpected.setArticleId(rs.getInt(\"article_id\"));\r\n\t\t\texpected.setCustomerId(rs.getInt(\"customer_id\"));\r\n\t\t}\r\n\r\n\t\t// compare database result with the method tested\r\n\t\tassertNotNull(expected);\r\n\t\tassertNotNull(service);\r\n\t\tassertEquals(expected, service);\r\n\r\n\t\tmodelDS.remove(expected.getId()); // return to the initial state of the\r\n\t\t\t\t\t\t\t\t\t\t\t// database before test\r\n\t}",
"@Test\n public void testInsertData() throws Exception {\n//TODO: Test goes here... \n }",
"@Test\n public void deleteIngredient_ReturnsTrue(){\n int returned = testDatabase.addIngredient(ingredient);\n assertEquals(\"deleteIngredient - Returns True\",true, testDatabase.deleteIngredient(returned));\n }",
"@Test\n void insertWithTripSuccess() {\n String newUserFirst = \"Dave\";\n String newUserLast = \"Bowman\";\n String newUserEmail = \"[email protected]\";\n String newUserUname = \"dbowman1\";\n String newUserPassword = \"Supersecret2!\";\n String tripCityLoc = \"MILWWI\";\n int tripCount = 6;\n String tripRating = \"5\";\n String tripComment = \"Definitely worth a second look\";\n Date today = new Date();\n User newUser = new User(newUserFirst, newUserLast, newUserEmail, newUserUname, newUserPassword, today);\n //Usertrip newUserTrip = new Usertrip(newUser, tripCityLoc, tripCount, tripRating, tripComment, today);\n //newUser.addTrip(newUserTrip);\n //int id = dao.insert(newUser);\n //assertNotEquals(0, id);\n //User insertedUser = (User) dao.getById(id);\n //assertNotNull(insertedUser);\n //assertEquals(\"dbowman1\", insertedUser.getUserName());\n //assertEquals(1, insertedUser.getUsertrips().size());\n\n }",
"@Test\n public void testInsertSingleRecordIntoWeatherTable() {\n ContentValues testMovieValues = TestUtilities.createTestMovieContentValues();\n\n /* Insert ContentValues into database and get a row ID back */\n long movieRowId = database.insert(\n REFLECTED_TABLE_NAME,\n null,\n testMovieValues);\n\n /* If the insert fails, database.insert returns -1 */\n int valueOfIdIfInsertFails = -1;\n String insertFailed = \"Unable to insert into the database\";\n assertNotSame(insertFailed,\n valueOfIdIfInsertFails,\n movieRowId);\n\n Cursor movieCursor = database.query(\n REFLECTED_TABLE_NAME,\n null,\n null,\n null,\n null,\n null,\n null);\n\n String emptyQueryError = \"Error: No Records returned from weather query\";\n assertTrue(emptyQueryError,\n movieCursor.moveToFirst());\n\n String expectedMovieDidntMatchActual =\n \"Expected weather values didn't match actual values.\";\n TestUtilities.validateCurrentRecord(expectedMovieDidntMatchActual,\n movieCursor,\n testMovieValues);\n\n assertFalse(\"Error: More than one record returned from weather query\",\n movieCursor.moveToNext());\n\n movieCursor.close();\n }",
"@Test\r\n public void saveUserShouldCreateNewRowInDB(){\n userDaoJDBCTemplate.delete(38);\r\n userDaoJDBCTemplate.delete(40);\r\n userDaoJDBCTemplate.deleteByName(\"admin3\");\r\n userDaoJDBCTemplate.deleteByName(\"admin4\");\r\n }",
"@Test\n public void insertOne() throws Exception {\n\n }",
"@Override\n\tpublic void test00500Add_Validate_ExistingRecord() throws Exception\n\t{\n\t}",
"@Test\n public void shouldAddValidGameHistory()\n {\n boolean added = DatabaseHelper.addGameToStats(\"test\", \"test\", -25, \"test\", false, 0, 5, 9);\n DatabaseHelper.deleteTestEntry();\n assertTrue(added);\n }",
"@Test\n public void test1Insert() {\n\n System.out.println(\"Prueba de SpecialityDAO\");\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n assertEquals(dao.insert(spec), 1);\n \n }",
"public void AddRow(String Table, String Value)\r\n {\n }",
"@Test\n public void rowExists(){\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n timeListDAO.createTimeList(new TimeList(\"dummy\", 1990, 0, 60, 0, 0));\n\n assertTrue(timeListResource.rowExists(\"dummy\",1990,0));\n\n //clean up\n timeListDAO.removeTimeList(1990,0, \"dummy\");\n userDAO.removeUser(\"dummy\");\n }",
"@Test\n public void testAdd() {\n System.out.println(\"add\");\n int cod = 0;\n int semestre = 0;\n String nombre = \"\";\n int cod_es = 0;\n cursoDAO instance = new cursoDAO();\n boolean expResult = false;\n boolean result = instance.add(cod, semestre, nombre, cod_es);\n assertEquals(expResult, result);\n \n }",
"@Test\n public void deleteRecipe_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipe - Returns True\",true, testDatabase.deleteRecipe(returned));\n\n }",
"@Test\n void insertNoteSuccess() {\n Note newNote = new Note();\n\n newNote.setProspect(\"Graham Mertz\");\n newNote.setCollege(\"University of Wisconsin - Madison\");\n newNote.setUserId(1);\n newNote.setAge(19);\n newNote.setHeightFeet(6);\n newNote.setHeightInches(3);\n newNote.setWeight(225);\n newNote.setPosition(\"QB\");\n newNote.setRating(\"7/10\");\n newNote.setReport(\"He was redshirted his freshman season, and his first full season as a starter was derailed from covid. He showed a lot of good and also some bad plays, but we'll have to wait and see how he does with a real season.\");\n\n int id = noteDao.insert(newNote);\n assertNotEquals(0, id);\n Note insertedNote = (Note) noteDao.getById(id);\n\n assertEquals(\"Graham Mertz\", insertedNote.getProspect());\n assertEquals(\"University of Wisconsin - Madison\", insertedNote.getCollege());\n assertEquals(1, insertedNote.getUserId());\n assertEquals(19, insertedNote.getAge());\n assertEquals(6, insertedNote.getHeightFeet());\n assertEquals(3, insertedNote.getHeightInches());\n assertEquals(225, insertedNote.getWeight());\n assertEquals(\"QB\", insertedNote.getPosition());\n assertEquals(\"7/10\", insertedNote.getRating());\n }",
"@Test\npublic void testInsertAStudentScore() {\n//TODO: Test goes here...\n System.out.println(StudentDao.insertAStudentScore(1007,\"7\", 5, 5, 5));\n}",
"@Test\n void insertSuccess() {\n String name = \"Testing a new event\";\n LocalDate date = LocalDate.parse(\"2020-05-23\");\n LocalTime startTime = LocalTime.parse(\"11:30\");\n LocalTime endTime = LocalTime.parse(\"13:45\");\n String notes = \"Here are some new notes for my new event.\";\n GenericDao userDao = new GenericDao(User.class);\n User user = (User)userDao.getById(1);\n\n Event newEvent = new Event(name, date, startTime, endTime, notes, user);\n int id = genericDao.insert(newEvent);\n assertNotEquals(0,id);\n Event insertedEvent = (Event)genericDao.getById(id);\n assertEquals(newEvent, insertedEvent);\n }",
"private static void testInsert() {\n\t\tSkemp skemp = new Skemp();\n\t\tskemp.setId(99);\n\t\tskemp.setName(\"王2\");\n\t\tskemp.setSex(\"男\");\n\t\tSkempDao skempDao = new SkempDaoImpl();\n\t\tskempDao.insertSkemp(skemp);\n\t}",
"public void testMatchCRUD() {\n assertFalse(dbHelper.mMatchTable.hasData());\n\n // Create\n\n // Read\n\n // Update\n\n // Delete\n dbHelper.mMatchTable.deleteAll();\n assertFalse(dbHelper.mMatchTable.hasData());\n }",
"int insert(TestActivityEntity record);",
"private boolean insert()throws Exception{\n String query = \"INSERT INTO \" + tableName + \" VALUES(?, ?, ?)\";\n PreparedStatement pstm = this.con.prepareStatement(query);\n\n pstm.setObject(1, Name.getText().trim());\n pstm.setObject(2, City.getText().trim());\n pstm.setObject(3, Phone.getText().trim());\n\n int result = pstm.executeUpdate();\n\n return (result > 0);\n }",
"@Test\n public void testInsert() {\n int resultInt = disciplineDao.insert(disciplineTest);\n // Je pense à le suppr si l'insert à fonctionné\n if(resultInt > 0){\n disciplineTest.setId(resultInt);\n disciplineDao.delete(disciplineTest);\n }\n assertTrue(resultInt > 0);\n }",
"public void addRow(String rowName);",
"int insert(Assist_table record);",
"public void test_ROWID_insert_select() {\r\n // ## Arrange ##\r\n VendorCheck vendorCheck = new VendorCheck();\r\n vendorCheck.setVendorCheckId(99999L);\r\n vendorCheck.setTypeOfRowid(\"123456789012345678\");\r\n\r\n // ## Act ##\r\n try {\r\n vendorCheckBhv.insert(vendorCheck);\r\n\r\n // ## Assert ##\r\n fail(\"Now unsupported\");\r\n } catch (SQLFailureException e) {\r\n // OK\r\n log(e.getMessage());\r\n }\r\n }",
"@Test\n public void deleteRecipeIngredient_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeIngredient - Returns True\",true, testDatabase.deleteRecipeIngredients(returned));\n }",
"public void insert() throws SQLException;",
"@Test\n\tpublic void testInsertRecipeFailure() {\n\t\tint recipeId = recipeDao.insertRecipe(recipe);\n\n\t\tassertEquals(0, recipeId);\n\n\t}",
"public void addRow(ResultSetRow row) throws SQLException {\n/* 231 */ notSupported();\n/* */ }",
"@Test\r\n\tpublic void addEmployeeTestCase1() {\n\t\tEmployee employee1 = new Employee();\r\n\t\temployee1.name = \"JosephKuruvila\";\r\n\t\temployee1.role = \"Software Developer\";\r\n\t\temployee1.employeeID = \"Jose2455\";\r\n\t\temployee1.email = \"[email protected]\";\r\n\t\temployee1.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee1.gender = \"Male\";\r\n\t\temployee1.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee1.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tboolean isAddedEmployee = EmployeeOperations.addEmployee(employee1);\r\n\t\tassertTrue(isAddedEmployee);\r\n\t}",
"@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}",
"public void testInsert() {\n\t\ttry {\n\t\t\tServerParameterTDG.create();\n\n\t\t\tServerParameterTDG.insert(\"paramName\", \"A description\", \"A value\");\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.insert(\"paramName\", \"other description\", \"other value\");\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// paramName is primary key, no duplicates\n\t\t\t\tassertTrue(true);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tServerParameterTDG.drop();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.drop();\n\t\t\t} catch (SQLException e) {\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void addRecipeIngredient_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeIngredient> allRecipeIngredients = testDatabase.getAllRecipeIngredients(returnedRecipe);\n RecipeIngredient retrieved = new RecipeIngredient();\n if(allRecipeIngredients != null){\n for(int i = 0; i < allRecipeIngredients.size(); i++){\n if(allRecipeIngredients.get(i).getIngredientID() == ingredientID){\n retrieved = allRecipeIngredients.get(i);\n }\n }\n }\n assertEquals(\"addRecipeIngredient - Correct Quantity\", 2.0, retrieved.getQuantity(), 0);\n assertEquals(\"addRecipeIngredient - Correct Unit\", \"cups\", retrieved.getUnit());\n assertEquals(\"addRecipeIngredient - Correct Details\", \"White Flour\", retrieved.getDetails());\n }",
"@Test\n @Transactional\n void createLessonTimetableWithExistingId() throws Exception {\n lessonTimetable.setId(1L);\n\n int databaseSizeBeforeCreate = lessonTimetableRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restLessonTimetableMockMvc\n .perform(\n post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(lessonTimetable))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the LessonTimetable in the database\n List<LessonTimetable> lessonTimetableList = lessonTimetableRepository.findAll();\n assertThat(lessonTimetableList).hasSize(databaseSizeBeforeCreate);\n }",
"public boolean inserRow(String Title, String Artist, String category, int sellingPrice) {\n try {\n resultSet.moveToInsertRow();\n resultSet.updateString(Main.Title, Title);\n resultSet.updateString(Main.Artist, Artist);\n resultSet.updateString(Main.category, category);\n resultSet.updateInt(Main.sellingPrice, sellingPrice);\n resultSet.insertRow();\n resultSet.moveToCurrentRow();\n fireTableDataChanged();\n return true;\n } catch (SQLException e) {\n System.out.println(\"error adding row\");\n System.out.println(e);\n return false;\n }\n\n }",
"@Test\n public void editRecipe_ReturnsTrue(){\n testDatabase.addRecipe(testRecipe);\n testRecipe.setTitle(\"TestRecipe Updated\");\n testRecipe.setServings(1.5);\n testRecipe.setPrep_time(15);\n testRecipe.setTotal_time(45);\n testRecipe.setFavorited(true);\n listOfCategories.clear();\n listOfCategories.add(recipeCategory);\n testRecipe.setCategoryList(listOfCategories);\n listOfIngredients.clear();\n recipeIngredient.setUnit(\"tbsp\");\n recipeIngredient.setQuantity(1.5);\n recipeIngredient.setDetails(\"Brown Sugar\");\n listOfIngredients.add(recipeIngredient);\n testRecipe.setIngredientList(listOfIngredients);\n listOfDirections.clear();\n listOfDirections.add(recipeDirection1);\n testRecipe.setDirectionsList(listOfDirections);\n\n assertEquals(\"editRecipe - Returns True\", true, testDatabase.editRecipe(testRecipe));\n }",
"@Test\n public void testInsertNew() {\n System.out.println(\"insertNew\");\n Address obj = new Address(\"tregi\",\"333\",\"Porto\");;\n boolean expResult = true;\n boolean result = instance.insertNew(obj);\n assertEquals(expResult, result);\n }",
"public void testInsert() throws Exception {\n\n DAS das = DAS.FACTORY.createDAS(getConnection());\n Command insert = das.createCommand(\"insert into COMPANY (NAME) values (?)\");\n insert.setParameter(1, \"AAA Rental\");\n insert.execute();\n\n // Verify insert\n // Verify\n Command select = das.createCommand(\"Select ID, NAME from COMPANY\");\n DataObject root = select.executeQuery();\n\n assertEquals(4, root.getList(\"COMPANY\").size());\n assertTrue(root.getInt(\"COMPANY[1]/ID\") > 0);\n\n }",
"@Test\r\n\t\tpublic void insertUserTestCase() {\r\n\t\t\t\r\n\t\t\tUser user = new User();\r\n\t\t\t\t\t\r\n\t\t//\tuser.setBirthDate(LocalDate.parse(\"1994-04-09\"));\r\n\t\t\tuser.setUsername(\"renu\");\r\n\t\t//\tuser.setUserId(1003);\r\n\t\t\t\r\n\t\t\tuser.setEmail(\"[email protected]\");\r\n\t\t\t\t\t\r\n\t\t\tuser.setFirstname(\"Renu\");\r\n\t\t\tuser.setSurname(\"Rawat\");\r\n\t\t//\tuser.setGender('F');\r\n\t\t\tuser.setPassword(\"renu\");\r\n\t\t\tuser.setPhone(\"9876543210\");\r\n\t\t//\tuser.setStatus(\"A\");\r\n\t\t\tuser.setIsOnline(false);\r\n\t\t\t\r\n\t\t\tuser.setRole(\"ADMIN\");\r\n\t\t//\tuser.setConfmemail(\"[email protected]\");\r\n\t\t//\tuser.setConfpassword(\"renu\");\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"user printed\");\r\n\t\t\tassertEquals(\"successfully!\", Boolean.valueOf(true), userDao.registerUser(user));\r\n\t\t\tSystem.out.println(\"After User Table\");\r\n\t\t\t\r\n\t}",
"@Test\n public void insertUserTest(){\n }",
"public int insert(Listing listing) throws SQLException;",
"public void DataRow_AcceptChanges() throws Exception {\n DataTable table = new DataTable(\"table\");\r\n DataColumn fNameColumn = new DataColumn(\"FirstName\", TClrType.getType(\"System.String\"));\r\n table.getColumns().Add(fNameColumn);\r\n DataRow row;\r\n\r\n // Create a new DataRow.\r\n row = table.NewRow();\r\n // Detached row.\r\n System.out.println(row.getRowState());\r\n\r\n table.getRows().Add(row);\r\n // New row.\r\n System.out.println(row.getRowState());\r\n\r\n table.AcceptChanges();\r\n // Unchanged row.\r\n System.out.println(row.getRowState());\r\n\r\n row.setItem(0, \"Scott\");\r\n // Modified row.\r\n System.out.println(row.getRowState());\r\n\r\n row.Delete();\r\n // Deleted row.\r\n System.out.println(row.getRowState());\r\n }",
"@Test\n public void testSubmitFood() throws Exception {\n \n //submits a food with the given parmeters and randomizes the \n //foods calories, then verifys the food was created by comparing\n //the random number with the expected random number\n System.out.println(\"Submit Food\");\n Connection conn = DriverManager.getConnection(\"jdbc:mysql://localhost/users\", \"root\", \"tech\");\n Statement stmt= (Statement) conn.createStatement();\n Random rn = new Random();\n int maximum = 300;\n int minimum = 1;\n int range = maximum - minimum + 1;\n int randomNum = rn.nextInt(range) + minimum;\n sql=\"insert into foodlog (id,userName,food,log,totalCalories) \"\n + \"VAlUES (NULL,'thuff','Apple','2016-03-09','\"+randomNum+\"')\";\n stmt.executeUpdate(sql);\n sql = \"SELECT * FROM foodlog WHERE totalCalories='\"+randomNum+\"'\";\n rs = stmt.executeQuery(sql);\n \n while(rs.next()){\n assertTrue(rs.getInt(\"totalCalories\")==(randomNum));\n assertFalse(rs.getInt(\"totalCalories\")==(0));\n }\n }",
"@Test\n\tpublic void testInsert(){\n\t\tUser u = new User();\n\t\tu.setFirst(\"ttest\");\n\t\tu.setLast(\"ttest2\");\n\t\tu.setUsername(\"testusername\");\n\t\tu.setPassword(\"password\");\n\t\t//u.getSalt();\n\t\tu.setUserWins(1);\n\t\tu.setUserLosses(3);\n\t\tu.setUserRecord(0.25);\n\t\t\n\t\twhen(udaoMock.insert(u)).thenReturn(u);\n\t\tassertEquals(u, uSerMock.insertUser(u));\n\n\t}",
"@Test\n void insertSuccess() {\n int insertedCarId;\n\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(1);\n\n //Create Inserted Car\n Car insertedCar = new Car(user,\"2016\",\"Honda\",\"Civic\",\"19XFC1F35GE206053\");\n\n //Save Inserted Car\n insertedCarId = carDao.insert(insertedCar);\n\n //Get Saved Car\n Car retrievedCar = carDao.getById(insertedCarId);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(insertedCar,retrievedCar);\n }",
"public boolean insertRow(String Title, String Artist, String category, int sellingPrice) {\n try {\n resultSet.moveToInsertRow();\n resultSet.updateString(Main.Title, Title);\n resultSet.updateString(Main.Artist, Artist);\n resultSet.updateString(Main.category, category);\n resultSet.updateInt(Main.sellingPrice, sellingPrice);\n resultSet.insertRow();\n resultSet.moveToCurrentRow();\n fireTableDataChanged();\n return true;\n } catch (SQLException e) {\n System.out.println(\"Error adding row\");\n System.out.println(e);\n return false;\n }\n\n }",
"@Test\n public void testInserirCliente() {\n \n \n System.out.println(\"inserirCliente\");\n \n Cliente novoCliente = null;\n ClienteDAO ins = new ClienteDAO();\n boolean expResult = false;\n boolean result = ins.inserirCliente(novoCliente);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"@Test\n public void testSave()throws Exception {\n System.out.println(\"save\");\n String query = \"insert into librarian(name,password,email,address,city,contact) values(?,?,?,?,?,?)\";\n String name = \"Raf\";\n String password = \"rrrr\";\n String email = \"[email protected]\";\n String address = \"1218/7\";\n String city = \"dacca\";\n String contact = \"016446\";\n int expResult = 0;\n \n //when(mockDb.getConnection()).thenReturn(mockConn);\n when(mockConn.prepareStatement(query)).thenReturn(mockPs);\n int result = mockLibrarian.save(name, password, email, address, city, contact);\n assertEquals(result >0, true);\n // TODO review the generated test code and remove the default call to fail.\n \n }",
"int insert(TABLE41 record);",
"@Test\n public void addCategory_DatabaseUpdates(){\n int returned = testDatabase.addCategory(category);\n Category retrieved = testDatabase.getCategory(returned);\n assertEquals(\"addCategory - Correct Category Name\", \"Lunch\", retrieved.getName());\n assertEquals(\"addCategory - Set Category ID\", returned, retrieved.getKeyID());\n }",
"@Test\n public void testProductos() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM productos\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table productos exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'productos' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"public void newRow();",
"int insert(Table2 record);",
"public boolean addToTable(String id, String name , String cell)\n\n {\n SQLiteDatabase database = getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(COLUMN1,id);\n values.put(COLUMN2,name);\n values.put(COLUMN3,cell);\n\n long check = database.insert(TABLE_NAME,null,values);\n if (check ==-1)\n {\n return false;\n }\n else{\n\n return true;\n }\n }",
"int insert(AdminTab record);",
"int insert(ParseTableLog record);",
"@Test\n public void testVentas() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM ventas\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table ventas exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'ventas' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"@Test\n public void insert() {\n// int insert = iUserDao.insert(u);\n// System.out.println(u);\n\n }",
"@Test\r\n\tpublic void addRelatedTable() {\r\n\t\ttestObj.addRelatedTable(1);\r\n\t\ttestObj.makeArrays();\r\n\t\tassertEquals(\"relatedTables size should be 1\", 1, testObj.getRelatedTablesArray().length);\r\n\t}",
"public void insertRow() throws SQLException\n {\n m_rs.insertRow();\n }",
"public void addRow() {\n tableModel.insertRow(this.getRowCount(), new String[]{});\n this.setModel(tableModel);\n\n }",
"@Test\n public void editRecipe_ReturnsFalse(){\n Recipe invalidRecipe = new Recipe();\n assertEquals(\"editRecipe - Returns False\", false, testDatabase.editRecipe(invalidRecipe));\n }",
"Row createRow();",
"@Test()\n public void testAddExpense() {\n\tDefaultTableModel model = new DefaultTableModel();\n\tExpense e = new Expense(\"bread\", 8, LocalDate.of(2015, 10, 22), ExpenseType.DAILY);\n\texpenseManager.setBudgetPerMonth(2500);\n\texpenseManager.addExpense(e, model);\n\tassertEquals(5, expenses.size(), 0);\n }",
"@Test\n public void testInsertUser() throws Exception {\n int insert = userDao.insertUser(\n 123,\n \"abc\",\n \"天涯\");\n System.out.println(\"insert=\" + insert);\n }",
"@Test\n void insertWithBatchSuccess() {\n\n User testUser = new User(\"tester\", \"password\", \"first name test\", \"last name test\", \"[email protected]\", \"53589\", LocalDate.of(1980, 6, 16));\n Batch testBatch = new Batch(\"White Spotted Dog\", \"porter\", LocalDate.of(2019, 4, 1), LocalDate.of(2019, 4, 1), LocalDate.of(2019, 4, 1), LocalDate.of(2019, 4, 1), 1.055, 1.043);\n // this way each of the entities know about one another!\n testUser.addBatch(testBatch);\n // grab the id of the newly added user, use it to verify the new user was created\n int newId = genericDao.insert(testUser);\n\n User anotherTestUser = (User) genericDao.getById(newId);\n assertEquals(testUser, anotherTestUser);\n\n }",
"int add(Bill bill) throws SQLException;",
"@Override\r\n public boolean addRecord(String strTable,\r\n String strKeyName, String strKeyContents)\r\n {\r\n\r\n String strSQL;\r\n boolean blnStatus;\r\n try\r\n {\r\n // check to see if the record exists\r\n dbCmdText = dbConn.createStatement();\r\n strSQL = \"SELECT * FROM \" + strTable + \" WHERE \" + strKeyName + \"='\" + strKeyContents + \"'\";\r\n status(strSQL);\r\n dbRecordset = dbCmdText.executeQuery(strSQL);\r\n if(!moreRecords())\r\n {\r\n // the record does not exist, therefore add it to the database\r\n strSQL = \"INSERT INTO \" + strTable + \" (\" + strKeyName + \") VALUES ('\" + strKeyContents + \"')\";\r\n status(strSQL);\r\n //dbCmdText.executeUpdate(strSQL);\r\n execute(strSQL);\r\n //dbRecordset.close();\r\n status(\"Record added\");\r\n blnStatus = true;\r\n }\r\n else\r\n {\r\n status(\"Record NOT added\");\r\n blnStatus = false;\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n blnStatus = false;\r\n }\r\n return blnStatus;\r\n }",
"@Test\n public void testClientJdbcInsert() throws Exception {\n try (Connection con = GridCacheDynamicLoadOnClientTest.connect(GridCacheDynamicLoadOnClientTest.clientNode);Statement stmt = con.createStatement()) {\n int cnt = stmt.executeUpdate(((\"INSERT INTO \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)) + \"(_key, name, orgId) VALUES(1000,'new_name', 10000)\"));\n Assert.assertEquals(1, cnt);\n }\n SqlFieldsQuery qry = new SqlFieldsQuery((\"SELECT * FROM \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)));\n Assert.assertEquals(((GridCacheDynamicLoadOnClientTest.CACHE_ELEMENT_COUNT) + 1), getDefaultCacheOnClient().query(qry).getAll().size());\n }",
"@Test\n public void testInserts() throws ConnectionException {\n //adding test ProviderEntry to database\n ProviderEntry pe = MariaDbConnectorTest.instance.findProviderEntryByName(\"test\");\n ProviderEntry ppe = MariaDbConnectorTest.instance.findProviderEntryByName(\"test\");\n assertEquals(pe, ppe); // Passes if insert succeeded\n \n \n //adding test RouteEntry to database\n RouteEntry re = new RouteEntry();\n re.setName(\"test\");\n re.setDescription(\"test\");\n MariaDbConnectorTest.instance.insert(re);\n RouteEntry rre = MariaDbConnectorTest.instance.findRouteEntryByName(\"test\");\n assertEquals(re, rre); // Passes if insert has succeeded\n \n //adding test DataEntry to database\n int traveltime = 1234569;\n DataEntry de = new DataEntry(traveltime, rre, ppe);\n MariaDbConnectorTest.instance.insert(de);\n System.out.println(ppe.getId());\n System.out.println(rre.getId());\n System.out.println(de.getTimestamp());\n DataEntry dde = MariaDbConnectorTest.instance.findDataEntryByID(ppe.getId(), rre.getId(), de.getTimestamp());\n //assertEquals(de, dde); // Passes if insert has succeeded\n \n // Removing all added testdata from database. Removing route & providers suffices\n MariaDbConnectorTest.instance.delete(ppe);\n MariaDbConnectorTest.instance.delete(rre);\n \n // Check if the provider & route objects are removed from the database\n RouteEntry rrre = MariaDbConnectorTest.instance.findRouteEntryByID(rre.getId());\n assertNull(rrre); // Passes if the test RouteEntry object does not exist anymore in the database\n \n ProviderEntry pppe = MariaDbConnectorTest.instance.findProviderEntryByID(ppe.getId());\n assertNull(pppe);\n \n \n \n \n }",
"@Test\n public void addRecipeCategory_ReturnsID(){\n int returned = testDatabase.addRecipeCategory(recipeCategory);\n assertNotEquals(\"addRecipeCategory - Returns True\", -1, returned);\n }",
"@Test\n public void validUserCreation() {\n boolean success = this.userDAO.insertNewUser(testUser);\n\n Assertions.assertTrue(success);\n }",
"@Test\n public void testCaja() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM caja\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table caja exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'caja' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"@Test\n public void editIngredient_ReturnsFalse(){\n Ingredient newIngredient = new Ingredient(Integer.MAX_VALUE, \"egg\");\n assertEquals(\"editIngredient - Ingredient Doesn't Exist\", false, testDatabase.editIngredient(newIngredient));\n }",
"public static void insertDemoData() throws SQLException\n {\n insertAccount(new Account(0, \"John Doe\", \"Marvin Gardens\", false));\n insertAccount(new Account(0, \"Robert Roe\", \"Louisiana Avenue\", false));\n }",
"@Test\n public void getIngredient_CorrectInformation(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"getIngredient - Correct Name\", \"Flour\", retrieved.getName());\n assertEquals(\"getIngredient - Correct ID\", returned, retrieved.getKeyID());\n }",
"@Test\n public void deleteIngredient_Deletes(){\n int returned = testDatabase.addIngredient(ingredient);\n testDatabase.deleteIngredient(returned);\n assertEquals(\"deleteIngredient - Deletes From Database\",null, testDatabase.getIngredient(returned));\n }",
"@Test\n\tpublic void testGetNewTableKey() throws SQLException\n\t{\n\t\tassertEquals(1, DatabaseGateway.getNewID());\n\t}",
"@Override\n\t\t\tpublic TestEntity addTest(TestEntity test) \n\t\t\t{\t\n\t\t\t\t\ttest = testDao.save(test);\n\t\t\t\t\treturn test;\n\t\t\t}",
"@Test\n public void testFindProductByID_1() throws Exception {\n System.out.println(\"findProductByID_1\");\n String id = \"1\";\n Database instance = new Database();\n instance.addProduct(1, new Product(1.0, \"\", 1));\n try{\n assertEquals(instance.findProductByID(id), new Product(1.0, \"\", 1));\n }catch(AssertionError e){\n fail(\"testFindProductByID_1 failed\");\n }\n }",
"@Test(enabled = false)\n public void testInsertIntoTempTable() throws Exception {\n String tableName = createTable();\n String insertTableName = createTable(false, false, true);\n\n assertTableIsRegistered(DEFAULT_DB, tableName);\n assertTableIsNotRegistered(DEFAULT_DB, insertTableName, true);\n\n String query = \"insert into \" + insertTableName + \" select id, name from \" + tableName;\n\n runCommand(query);\n\n Set<ReadEntity> inputs = getInputs(tableName, Entity.Type.TABLE);\n Set<WriteEntity> outputs = getOutputs(insertTableName, Entity.Type.TABLE);\n\n outputs.iterator().next().setWriteType(WriteEntity.WriteType.INSERT);\n\n HiveEventContext event = constructEvent(query, HiveOperation.QUERY, inputs, outputs);\n AtlasEntity hiveProcess = validateProcess(event);\n AtlasEntity hiveProcessExecution = validateProcessExecution(hiveProcess, event);\n AtlasObjectId process = toAtlasObjectId(hiveProcessExecution.getRelationshipAttribute(\n BaseHiveEvent.ATTRIBUTE_PROCESS));\n Assert.assertEquals(process.getGuid(), hiveProcess.getGuid());\n Assert.assertEquals(numberOfProcessExecutions(hiveProcess), 1);\n\n assertTableIsRegistered(DEFAULT_DB, tableName);\n assertTableIsRegistered(DEFAULT_DB, insertTableName, null, true);\n }"
] | [
"0.70438504",
"0.6909492",
"0.68326944",
"0.6744904",
"0.6677934",
"0.6674012",
"0.66697645",
"0.665208",
"0.65663654",
"0.65574116",
"0.65563685",
"0.65459514",
"0.65383166",
"0.6530194",
"0.652835",
"0.65174043",
"0.6515572",
"0.65020144",
"0.6469809",
"0.6453871",
"0.6437059",
"0.6424761",
"0.64245653",
"0.64161485",
"0.63778317",
"0.6371957",
"0.63649094",
"0.6363148",
"0.63587976",
"0.63412577",
"0.63406664",
"0.6326074",
"0.63222396",
"0.6321281",
"0.6305346",
"0.6297057",
"0.6295843",
"0.62889373",
"0.6263589",
"0.6263079",
"0.62574077",
"0.6253805",
"0.6251788",
"0.6243518",
"0.6238218",
"0.6234455",
"0.6224359",
"0.6222759",
"0.6215362",
"0.6209404",
"0.62023216",
"0.6192471",
"0.6192432",
"0.61902577",
"0.61817163",
"0.617879",
"0.617797",
"0.6177594",
"0.6162435",
"0.6158799",
"0.6158794",
"0.615858",
"0.61585677",
"0.6136813",
"0.61327076",
"0.6117698",
"0.6117441",
"0.610873",
"0.61060995",
"0.60855407",
"0.60804605",
"0.6078269",
"0.6077453",
"0.60713726",
"0.60671365",
"0.6060187",
"0.605971",
"0.605711",
"0.6056424",
"0.6056159",
"0.60508007",
"0.6046773",
"0.6037119",
"0.60361326",
"0.6035907",
"0.6034531",
"0.6032869",
"0.60282594",
"0.6022195",
"0.60209954",
"0.60135156",
"0.60104865",
"0.60101306",
"0.60082024",
"0.60029167",
"0.60021883",
"0.59910804",
"0.598647",
"0.59803724",
"0.5976975"
] | 0.7255298 | 0 |
Tests adding a row to the associated table PowerToolsTOStripNails | @Test
public void testCreateRowRelation() throws SQLException
{
new PowerTool("asdf", 5, 5, "PowerTooldescription", true);
new StripNail("UPC", 5, 5, 3.33, 9);
new PowerToolsToStripNailsMapper(1,2);
ResultSet rs = DatabaseGateway.getTable("PowerToolsTOStripNails");
if(rs.next())
{
assertEquals(rs.getInt("PowerToolid"),1);
assertEquals(rs.getInt("StripNailid"),2);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testReadRowRelationStripNail() throws SQLException\n\t{\n\t\tnew PowerTool(\"asdf\", 5, 5, \"PowerTooldescription\", true);\n\t\tnew StripNail(\"UPC\", 5, 5, 3.33, 9);\n\t\t\n\t\tnew PowerToolsToStripNailsMapper(1,2);\n\t\t\n\t\tArrayList<Integer> stripNailsRelatedToPowerTools = DatabaseGateway.readRowRelationStripNail(2);\n\t\tassertTrue(stripNailsRelatedToPowerTools.contains(1));\n\t}",
"@Test\n\tpublic void testCreateRow() throws SQLException\n\t{\n\t\tString insertStatement = \"INSERT INTO Nail (\" + \n\t\t\t\t\"id, UPC, ManufacturerID, Price,Length, NumberInBox\" +\n\t\t\t\t\") VALUES (1,'asdf',5,5,5.0,20)\";\n\t\tDatabaseGateway.createRow(insertStatement);\n\t\t\n\t\tResultSet rs = DatabaseGateway.getObjectByID(\"Nail\", 1);\n\t\tif(rs.next())\n\t\t{\n\t\t\tassertEquals(rs.getInt(\"id\"),1);\n\t\t\tassertEquals(rs.getInt(\"ManufacturerID\"),5);\n\t\t\tassertEquals(rs.getInt(\"Price\"),5);\n\t\t\tassertEquals(rs.getString(\"UPC\"),\"asdf\");\n\t\t\tassertTrue(rs.getDouble(\"Length\") == 5.0);\n\t\t\tassertEquals(rs.getInt(\"NumberInBox\"), 20);\n\t\t}\n\t}",
"@Test\n\tpublic void testReadRowRelationPowerTool() throws SQLException\n\t{\n\t\tnew PowerTool(\"asdf\", 5, 5, \"PowerTooldescription\", true);\n\t\tnew StripNail(\"UPC\", 5, 5, 3.33, 9);\n\t\t\n\t\tnew PowerToolsToStripNailsMapper(1,2);\n\t\t\n\t\tArrayList<Integer> powerToolsRelatedToStripNail = DatabaseGateway.readRowRelationPowerTool(1);\n\t\tassertTrue(powerToolsRelatedToStripNail.contains(2));\n\t}",
"private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }",
"private void testRow( QuerySet aQuerySet, String aPartDescription, int aRemoveQty,\n String aPartSerialOff, String aCondReasonOff, int aWarrentyCoverage,\n String aShedPartKey ) {\n\n Assert.assertEquals( \"part_description\", aPartDescription,\n aQuerySet.getString( \"part_description\" ) );\n Assert.assertEquals( \"removed_quantity\", aRemoveQty, aQuerySet.getInt( \"removed_quantity\" ) );\n\n Assert.assertEquals( \"part_serial_off\", aPartSerialOff,\n aQuerySet.getString( \"part_serial_off\" ) );\n Assert.assertEquals( \"cond_reason_off\", aCondReasonOff,\n aQuerySet.getString( \"cond_reason_off\" ) );\n Assert.assertEquals( \"warranty_coverage\", aWarrentyCoverage,\n aQuerySet.getInt( \"warranty_coverage\" ) );\n Assert.assertEquals( \"sched_part_key\", aShedPartKey,\n aQuerySet.getString( \"sched_part_key\" ) );\n }",
"public boolean interaction_add_table2b (TestDriver driver) {\n driver.getReport().addHeader(\"CREATTION\", 3, false);\n String where = \" ADD 2\";\n if (!Functions.simpleClick(driver,\n new String[]{\"general_b_reset\", getElements(\"general_b_reset\")}, //element to click\n \"where\")){return false;}\n if (!Functions.checkClick(driver,\n new String[]{\"general_b_add\", getElements(\"general_b_add\")}, //element to click\n recursiveXPaths.glass, //element expected to appear\n where)) {\n return false;\n }\n String list_options[] = {\"Stop Sales\", \"Contracting\" ,\"Web sending\" ,\"Activities\", \"Invoice\" ,\"Pick up time\", \"OS grouped\" ,\"Proforma\", \"Web proforma\" ,\"Bookings\", \"Front Desk\" ,\"Transfers\"};\n if (!Functions.selectTextRandom(driver,\n new String[]{\"tab2_add_sl_module\", getElements(\"tab2_add_sl_module\")},\n list_options, \"module2b\", where)){return false;}\n if(!Functions.createLov(driver,\n new String[]{\"tab2_add_lov_supplier\",getElements(\"tab2_add_lov_supplier\")}, // b_lov\n new String[]{\"tab2_add_i_supplier\", getElements(\"tab2_add_i_supplier\")}, // i_lov\n recursiveXPaths.lov_b_search, // lov b search\n recursiveXPaths.lov_e_result, // lov result\n recursiveXPaths.lov_b_ok, //lov b ok\n \"supplier2b\", //Data name\n where)){return false;}\n if(!Functions.getText(driver,new String[]{\"tab2_add_i_sup_desc\", getElements(\"tab2_add_i_sup_desc\")}, // element path\n \"sup_desc\", // key for data value (the name)\n where)){return false;}\n if (!Functions.insertInput(driver, new String[]{\"tab2_add_i_fax\", getElements(\"tab2_add_i_fax\")},\n \"fax2b\", \"00\"+String.valueOf(DataGenerator.random(111111111, 999999999)), where)) {\n return false;\n }\n if (!Functions.insertInput(driver, new String[]{\"tab2_add_i_email\", getElements(\"tab2_add_i_email\")},\n \"mail2b\", DataGenerator.getRandomAlphanumericSequence(5,false)+\"@\"+DataGenerator.getRandomAlphanumericSequence(5,false)+\".es\", where)) {\n return false;\n }\n if (!Functions.checkClickByAbsence(driver,\n new String[]{\"add_b_save2\", getElements(\"add_b_save2\")}, //e1\n recursiveXPaths.glass, //e2\n where)) return false; //where\n return true;\n }",
"@Before\n public void setUp() {\n table = new Table();\n ArrayList<Column> col = new ArrayList<Column>();\n col.add(new NumberColumn(\"numbers\"));\n\n table.add(new Record(col, new Value[] {new NumberValue(11)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n table.add(new Record(col, new Value[] {new NumberValue(22)}));\n table.add(new Record(col, new Value[] {new NumberValue(28)}));\n table.add(new Record(col, new Value[] {new NumberValue(44)}));\n table.add(new Record(col, new Value[] {new NumberValue(23)}));\n table.add(new Record(col, new Value[] {new NumberValue(46)}));\n table.add(new Record(col, new Value[] {new NumberValue(56)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NullValue()}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(34)}));\n table.add(new Record(col, new Value[] {new NumberValue(5)}));\n table.add(new Record(col, new Value[] {new NumberValue(123)}));\n table.add(new Record(col, new Value[] {new NumberValue(48)}));\n table.add(new Record(col, new Value[] {new NumberValue(50)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n }",
"public void AddRow(String Table, String Value)\r\n {\n }",
"@Test\r\n\t\t\tpublic void testEncuentraPrimeratabla() {\r\n\t\t\t\t//encontramos la tabla que se llama customers\r\n\t\t\t\tWebElement tabla= driver.findElement(By.xpath(\"//table[@id='customers']\"));\r\n\t\t\t\tSystem.out.println(tabla.getText());\t\r\n\t\t\t\tassertNotNull(tabla);\r\n\t\t\t}",
"@Test\n\tpublic void testAddRowCommit() {\n\t}",
"public void addRow(Spedizione spedizione){\n spedizioni.add(spedizione);\n fireTableChanged(new TableModelEvent(this));\n }",
"@Override\n\tpublic void test00500Add_Validate_ExistingRecord() throws Exception\n\t{\n\t}",
"public void newRow();",
"public void addCertainRow(String username, String num, String ISBN)\n {\n String insertStr;\n int tempt= (int) (Math.random()*500);\n String random=Integer.toString(tempt);\n try{\n\n insertStr=\"INSERT IGNORE INTO borrowlist (username, num, random, ISBN) VALUES(\"\n +quotate(username)+\",\"\n +quotate(num)+\",\"\n +quotate(random)+\",\"\n +quotate(ISBN)\n +\")\";\n\n stmt.executeUpdate(insertStr);\n\n } catch(Exception e){\n System.out.println(\"Error occurred in inserting data\");\n }\n return;\n }",
"@Test\r\n\tpublic void addRelatedTable() {\r\n\t\ttestObj.addRelatedTable(1);\r\n\t\ttestObj.makeArrays();\r\n\t\tassertEquals(\"relatedTables size should be 1\", 1, testObj.getRelatedTablesArray().length);\r\n\t}",
"public boolean interaction_add_table2 (TestDriver driver) {\n driver.getReport().addHeader(\"CREATTION\", 3, false);\n String where = \" ADD 2\";\n if (!Functions.checkClick(driver,\n new String[]{\"general_b_add\", getElements(\"general_b_add\")}, //element to click\n recursiveXPaths.glass, //element expected to appear\n where)) {\n return false;\n }\n Functions.break_time(driver, 4, 500);\n String list_options[] = {\"Stop Sales\", \"Contracting\" ,\"Web sending\" ,\"Activities\", \"Invoice\" ,\"Pick up time\", \"OS grouped\" ,\"Proforma\", \"Web proforma\" ,\"Bookings\", \"Front Desk\" ,\"Transfers\"};\n if (!Functions.selectTextRandom(driver,\n new String[]{\"tab2_add_sl_module\", getElements(\"tab2_add_sl_module\")},\n list_options, \"module2\", where)){return false;}\n if(!Functions.createLov(driver,\n new String[]{\"tab2_add_lov_to\",getElements(\"tab2_add_lov_to\")}, // b_lov\n new String[]{\"tab2_add_i_to\", getElements(\"tab2_add_i_to\")}, // i_lov\n recursiveXPaths.lov_b_search, // lov b search\n recursiveXPaths.lov_e_result, // lov result\n recursiveXPaths.lov_b_ok, //lov b ok\n \"to\", //Data name\n where)){return false;}\n if (!Functions.insertInput(driver, new String[]{\"tab2_add_i_fax\", getElements(\"tab2_add_i_fax\")},\n \"fax2\", \"00\"+String.valueOf(DataGenerator.random(111111111, 999999999)), where)) {\n return false;\n }\n if (!Functions.insertInput(driver, new String[]{\"tab2_add_i_email\", getElements(\"tab2_add_i_email\")},\n \"mail2\", DataGenerator.getRandomAlphanumericSequence(5,false)+\"@\"+DataGenerator.getRandomAlphanumericSequence(5,false)+\".es\", where)) {\n return false;\n }\n if (!Functions.checkClickByAbsence(driver,\n new String[]{\"add_b_save2\", getElements(\"add_b_save2\")}, //e1\n recursiveXPaths.glass, //e2\n where)) return false; //where\n return true;\n }",
"int addRow(RowData row_data) throws IOException;",
"public void test_ROWID_insert_select() {\r\n // ## Arrange ##\r\n VendorCheck vendorCheck = new VendorCheck();\r\n vendorCheck.setVendorCheckId(99999L);\r\n vendorCheck.setTypeOfRowid(\"123456789012345678\");\r\n\r\n // ## Act ##\r\n try {\r\n vendorCheckBhv.insert(vendorCheck);\r\n\r\n // ## Assert ##\r\n fail(\"Now unsupported\");\r\n } catch (SQLFailureException e) {\r\n // OK\r\n log(e.getMessage());\r\n }\r\n }",
"@Override\n public void testTruncateTable() {\n }",
"int insertSelective(Drug_OutWarehouse record);",
"int insertSelective(DashboardGoods record);",
"int insert(Drug_OutWarehouse record);",
"int insert(TRepairs record);",
"int insertSelective(NjProductTaticsRelation record);",
"int insertSelective(TRepairs record);",
"@Test\n public void dontReturnInsertRowWithoutObserver() throws Exception {\n\n // Arrange\n Note note = new Note(TestUtil.TEST_NOTE_1);\n\n // Act\n noteViewModel.setNote(note);\n\n // Assert\n verify(localRepository, never()).insertNote(any(Note.class));\n }",
"int insertSelective(UserTips record);",
"private void addEmptyRow()\n {\n TableLayout table = (TableLayout) findViewById(R.id.lossesTable);\n TableRow row = new TableRow(this);\n\n TextView emptyView1 = new TextView(this);\n ((BadBudgetApplication)this.getApplication()).initializeTableCell(emptyView1, \"\", R.drawable.emptyborder);\n TextView emptyView2 = new TextView(this);\n ((BadBudgetApplication)this.getApplication()).initializeTableCell(emptyView2, \"\", R.drawable.emptyborder);\n TextView emptyView3 = new TextView(this);\n ((BadBudgetApplication)this.getApplication()).initializeTableCell(emptyView3, \"\", R.drawable.emptyborder);\n TextView emptyView4 = new TextView(this);\n ((BadBudgetApplication)this.getApplication()).initializeTableCell(emptyView4, \"\", R.drawable.emptyborder);\n\n row.addView(emptyView1);\n row.addView(emptyView2);\n row.addView(emptyView3);\n row.addView(emptyView4);\n\n table.addView(row);\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 }",
"int insertSelective(TestModule record);",
"@Test\n void insertWithTripSuccess() {\n String newUserFirst = \"Dave\";\n String newUserLast = \"Bowman\";\n String newUserEmail = \"[email protected]\";\n String newUserUname = \"dbowman1\";\n String newUserPassword = \"Supersecret2!\";\n String tripCityLoc = \"MILWWI\";\n int tripCount = 6;\n String tripRating = \"5\";\n String tripComment = \"Definitely worth a second look\";\n Date today = new Date();\n User newUser = new User(newUserFirst, newUserLast, newUserEmail, newUserUname, newUserPassword, today);\n //Usertrip newUserTrip = new Usertrip(newUser, tripCityLoc, tripCount, tripRating, tripComment, today);\n //newUser.addTrip(newUserTrip);\n //int id = dao.insert(newUser);\n //assertNotEquals(0, id);\n //User insertedUser = (User) dao.getById(id);\n //assertNotNull(insertedUser);\n //assertEquals(\"dbowman1\", insertedUser.getUserName());\n //assertEquals(1, insertedUser.getUsertrips().size());\n\n }",
"int insertSelective(TbExpressTrace record);",
"@Test\n\tvoid addReportDataToDBTest() {\n\t\tparkName = \"Haifa Park\";\n\t\tboolean condition = false;\n\t\tdate = new Date(120, 4, 1);\n\t\texpected = \"1 2 3 4 5 6 1 23 2 8 9 2 3 2 4 3 2 2 1 1 1 5 32 6 12 7 23 8 12 5 32 6 12 5 2 5\";\n\n\t\tString[] str = expected.split(\" \");\n\n\t\tif (ReportsController.CheckReportExistInDB(reportType, date, parkName))\n\t\t\tassertTrue(condition);\n\n\t\tReportsController.addReportToDB(reportType, date, new ArrayList<>(Arrays.asList(str)), parkName);\n\n\t\tresult = ReportsController.getReport(date, reportType, parkName);\n\n\t\tassertEquals(expected, result);\n\n\t}",
"int insertSelective(CustomReport record);",
"private void addRows() {\n this.SaleList.forEach(Factura -> {\n this.modelo.addRow(new Object[]{\n Factura.getId_Factura(),\n Factura.getPersona().getNombre(),\n Factura.getFecha().getTimestamp(),\n Factura.getCorreo(),\n Factura.getGran_Total()});\n });\n }",
"Row createRow();",
"@Test\n public void testInsertarNota() {\n System.out.println(\"insertarNota\");\n String tipoNota = \"\";\n Double nota = null;\n Alumno instance = null;\n instance.insertarNota(tipoNota, nota);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\n\tpublic void testGetTable() throws SQLException\n\t{\n\t\tnew Nail(\"asdf\",5,5,5.0,20);\n\t\tResultSet rs = DatabaseGateway.getTable(\"Nail\");\n\t\tif(rs.next())\n\t\t{\n\t\t\tassertEquals(rs.getInt(\"id\"),1);\n\t\t\tassertEquals(rs.getInt(\"ManufacturerID\"),5);\n\t\t\tassertEquals(rs.getInt(\"Price\"),5);\n\t\t\tassertEquals(rs.getString(\"UPC\"),\"asdf\");\n\t\t\tassertTrue(rs.getDouble(\"Length\") == 5.0);\n\t\t\tassertEquals(rs.getInt(\"NumberInBox\"), 20);\n\t\t}\n\t}",
"void inserSingletRow(String row) {\n String[] values = row.trim().split(\"\\\\s+\");\n insertSingleRow(values);\n }",
"private void addToArticleTable(QuotationDetailsDTO detail) {\n\t\tdecimalFormat = new DecimalFormat(\"0.00\");\n\t\tTableItem[] items = tblArticle.getItems();\n\t\tint len = items.length;\n\t\tboolean isPresent = false;\n\t\tTableItem tiArticle;\n\t\tint index = 0;\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tif (detail.getArticleName().equalsIgnoreCase(items[i].getText(0))) {\n\t\t\t\tisPresent = true;\n\t\t\t\t/*if (detail.getChargedWeight() != Float.parseFloat(items[i].getText(1))) {\n\t\t\t\t\tif (quotationDTO != null) {\n\t\t\t\t\t\tQuotationDetailsDTO[] quotDetails = quotationDTO.getQuotationDetails();\n\t\t\t\t\t\tquotDetails[i].setBft(null);\n\t\t\t\t\t}\n\t\t\t\t}*/\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\tif (!isPresent) {\n\t\t\ttiArticle = new TableItem(tblArticle, SWT.NONE);\n\n\t\t\ttiArticle.setText(0, detail.getArticleName());\n\t\t\ttiArticle.setText(1, decimalFormat.format(detail.getChargedWeight()));\n\t\t\ttiArticle.setText(2, optionB[detail.getCcchargeType()]);\n\t\t\ttiArticle.setText(3, decimalFormat.format(detail.getCcchargeValue()));\n\t\t\ttiArticle.setText(4, optionB[detail.getDcchargeType()]);\n\t\t\ttiArticle.setText(5, decimalFormat.format(detail.getDcchargeValue()));\n\t\t\ttiArticle.setText(6, optionB[detail.getIechargeType()]);\n\t\t\ttiArticle.setText(7, decimalFormat.format(detail.getIechargeValue()));\n\t\t\ttiArticle.setText(8, optionB[detail.getLcchargeType()]);\n\t\t\ttiArticle.setText(9, decimalFormat.format(detail.getLcchargeValue()));\n\t\t\ttiArticle.setText(10, optionC[detail.getDdchargeType()]);\n\t\t\ttiArticle.setText(11, decimalFormat.format(detail.getMinDdchargeValue()));\n\t\t\ttiArticle.setText(12, decimalFormat.format(detail.getDdchargeArticle()));\n\t\t} else {\n\n\t\t\tTableItem item = tblArticle.getItem(index);\n\t\t\titem.setText(0, detail.getArticleName());\n\t\t\titem.setText(1, decimalFormat.format(detail.getChargedWeight()));\n\t\t\titem.setText(2, optionB[detail.getCcchargeType()]);\n\t\t\titem.setText(3, decimalFormat.format(detail.getCcchargeValue()));\n\t\t\titem.setText(4, optionB[detail.getDcchargeType()]);\n\t\t\titem.setText(5, decimalFormat.format(detail.getDcchargeValue()));\n\t\t\titem.setText(6, optionB[detail.getIechargeType()]);\n\t\t\titem.setText(7, decimalFormat.format(detail.getIechargeValue()));\n\t\t\titem.setText(8, optionB[detail.getLcchargeType()]);\n\t\t\titem.setText(9, decimalFormat.format(detail.getLcchargeValue()));\n\t\t\titem.setText(10, optionC[detail.getDdchargeType()]);\n\t\t\titem.setText(11, decimalFormat.format(detail.getMinDdchargeValue()));\n\t\t\titem.setText(12, decimalFormat.format(detail.getDdchargeArticle()));\n\t\t}\n\n\t}",
"@Test\n public void addRecipeIngredient_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeIngredient> allRecipeIngredients = testDatabase.getAllRecipeIngredients(returnedRecipe);\n RecipeIngredient retrieved = new RecipeIngredient();\n if(allRecipeIngredients != null){\n for(int i = 0; i < allRecipeIngredients.size(); i++){\n if(allRecipeIngredients.get(i).getIngredientID() == ingredientID){\n retrieved = allRecipeIngredients.get(i);\n }\n }\n }\n assertEquals(\"addRecipeIngredient - Correct Quantity\", 2.0, retrieved.getQuantity(), 0);\n assertEquals(\"addRecipeIngredient - Correct Unit\", \"cups\", retrieved.getUnit());\n assertEquals(\"addRecipeIngredient - Correct Details\", \"White Flour\", retrieved.getDetails());\n }",
"@Test\n public void testWriteRowCells() {\n XSSFWorkbook workbook = new XSSFWorkbook();\n XSSFSheet sheet = workbook.createSheet();\n XSSFRow row = sheet.createRow(0);\n List<Object> cellContents = new ArrayList<Object>();\n cellContents.add(new String(\"abc\"));\n cellContents.add(new Long(\"1\")); \n MaterialRequestHelper.writeRowCells(cellContents, row);\n assertEquals(row.getPhysicalNumberOfCells(), 2);\n assertEquals(row.getCell(0).getCellType(),XSSFCell.CELL_TYPE_STRING);\n assertEquals(row.getCell(1).getCellType(),XSSFCell.CELL_TYPE_NUMERIC);\n assertEquals(row.getCell(0).getStringCellValue(),\"abc\");\n assertEquals(row.getCell(1).getNumericCellValue(),1,0); \n }",
"@Test\n public void rowExists(){\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n timeListDAO.createTimeList(new TimeList(\"dummy\", 1990, 0, 60, 0, 0));\n\n assertTrue(timeListResource.rowExists(\"dummy\",1990,0));\n\n //clean up\n timeListDAO.removeTimeList(1990,0, \"dummy\");\n userDAO.removeUser(\"dummy\");\n }",
"@Test\n public void testB_TtableInfo() {\n int rowCount = menuTable.getColumns().size();\n assertNotNull(rowCount);\n //Click on row 0\n Node row = lookup(\".table-row-cell\").nth(0).query();\n assertNotNull(\"Row is null: table has not that row. \", row);\n clickOn(row);\n //verifyThat(nodeQuery, nodeMatcher);\n }",
"private void createStressTestRowOutgoingTable(int payloadColumns) {\n Column[] defaultColumns = getDefaultStressTestRowColumns();\n Table table = new Table(STRESS_TEST_ROW_OUTGOING, defaultColumns);\n List<Column> payloads = getPayloadColumns(payloadColumns);\n\n table.addColumns(payloads);\n engine.getDatabasePlatform().createTables(true, true, table);\n }",
"int insertSelective(NjOrderWork2 record);",
"void newRow(List<C> row) throws Exception;",
"@Test(timeout = 4000)\n public void test326() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n errorPage0.a();\n Table table0 = new Table(errorPage0, (String) null);\n assertTrue(table0._isGeneratedId());\n \n table0.id(\"faTn+C~BG'z'N~LP\");\n assertFalse(table0._isGeneratedId());\n }",
"public void testGetRowIndex() {\n TaskSeriesCollection c = createCollection1();\n }",
"int insertSelective(TestEntity record);",
"@Test(priority=9)\r\n public void tu_009()\r\n {\n \t\r\n \tWebElement e5= d.findElement(By.xpath(\"html/body/div[1]/div[3]/div[1]/div[2]/form/fieldset/ol/li[1]/input\"));\r\n \te5.sendKeys(\"maggi1\");\r\n \tWebElement e6= d.findElement(By.xpath(\"html/body/div[1]/div[3]/div[1]/div[2]/form/fieldset/ol/li[3]/input[1]\"));\r\n \te6.sendKeys(\"John Smith1\");\r\n \td.findElement(By.id(\"searchBtn\")).click();\r\n \tWebElement table =d.findElement(By.id(\"resultTable\"));\r\n \t List<WebElement> cols=table.findElements(By.tagName(\"td\"));\r\n \t for(WebElement e:cols)\r\n \t {\r\n \t\t if(e.getText().equals(\"No Records Found\"))\r\n \t\t {\r\n \t\t\t Assert.assertTrue(true);\r\n \t\t\t return;\r\n \t\t\t \r\n \t\t }\r\n \t }\r\n \t Assert.assertTrue(false);\r\n \t\t \r\n }",
"public void testAddExistingInfo() {\r\n TAG = \"testAddExistingInfo\";\r\n setUpOpTest();\r\n solo.clickOnActionBarItem(R.id.create_operation);\r\n solo.waitForActivity(OperationEditor.class);\r\n solo.enterText(3, OP_TP);\r\n for (int i = 0; i < OP_AMOUNT.length(); ++i) {\r\n solo.enterText(4, String.valueOf(OP_AMOUNT.charAt(i)));\r\n }\r\n solo.clickOnImageButton(tools.findIndexOfImageButton(R.id.edit_op_third_parties_list));\r\n solo.clickOnButton(solo.getString(R.string.create));\r\n solo.enterText(0, \"Atest\");\r\n solo.clickOnButton(solo.getString(R.string.ok));\r\n solo.waitForView(ListView.class);\r\n assertEquals(1, solo.getCurrentViews(ListView.class).get(0).getCount());\r\n solo.clickOnButton(solo.getString(R.string.create));\r\n solo.enterText(0, \"ATest\");\r\n solo.clickOnButton(solo.getString(R.string.ok));\r\n assertNotNull(solo\r\n .getText(solo.getString(fr.geobert.radis.R.string.item_exists)));\r\n }",
"private void createStressTestRowIncomingTable(int payloadColumns) {\n Column[] defaultColumns = getDefaultStressTestRowColumns();\n Table table = new Table(STRESS_TEST_ROW_INCOMING, defaultColumns);\n List<Column> payloads = getPayloadColumns(payloadColumns);\n\n table.addColumns(payloads);\n engine.getDatabasePlatform().createTables(true, true, table);\n }",
"public void DataRow_AcceptChanges() throws Exception {\n DataTable table = new DataTable(\"table\");\r\n DataColumn fNameColumn = new DataColumn(\"FirstName\", TClrType.getType(\"System.String\"));\r\n table.getColumns().Add(fNameColumn);\r\n DataRow row;\r\n\r\n // Create a new DataRow.\r\n row = table.NewRow();\r\n // Detached row.\r\n System.out.println(row.getRowState());\r\n\r\n table.getRows().Add(row);\r\n // New row.\r\n System.out.println(row.getRowState());\r\n\r\n table.AcceptChanges();\r\n // Unchanged row.\r\n System.out.println(row.getRowState());\r\n\r\n row.setItem(0, \"Scott\");\r\n // Modified row.\r\n System.out.println(row.getRowState());\r\n\r\n row.Delete();\r\n // Deleted row.\r\n System.out.println(row.getRowState());\r\n }",
"@Test\r\n public void testInsert() {\r\n assertTrue(false);\r\n }",
"int insertSelective(InspectionAgency record);",
"int insertSelective(TCpySpouse record);",
"@Test\r\n public void saveUserShouldCreateNewRowInDB(){\n userDaoJDBCTemplate.delete(38);\r\n userDaoJDBCTemplate.delete(40);\r\n userDaoJDBCTemplate.deleteByName(\"admin3\");\r\n userDaoJDBCTemplate.deleteByName(\"admin4\");\r\n }",
"@Test\n public void testCopyTileTable() throws SQLException, IOException {\n AlterTableUtils.testCopyTileTable(activity, geoPackage);\n }",
"@Test\n public void testExcluirCustom() {\n System.out.println(\"excluirCustom\");\n String cnpj = \"\";\n ClassificacaoTributariaDAO instance = new ClassificacaoTributariaDAO();\n instance.excluirCustom(cnpj);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"int insertSelective(SmsCleanBagLine record);",
"int insert(NjProductTaticsRelation record);",
"@Test\n public void addRecipe_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertNotEquals(\"addRecipe - Returns True\", -1, returned);\n }",
"private void addRow() throws CoeusException{\r\n // PDF is not mandatory\r\n// String fileName = displayPDFFileDialog();\r\n// if(fileName == null) {\r\n// //Cancelled\r\n// return ;\r\n// }\r\n \r\n BudgetSubAwardBean budgetSubAwardBean = new BudgetSubAwardBean();\r\n budgetSubAwardBean.setProposalNumber(budgetBean.getProposalNumber());\r\n budgetSubAwardBean.setVersionNumber(budgetBean.getVersionNumber());\r\n budgetSubAwardBean.setAcType(TypeConstants.INSERT_RECORD);\r\n// budgetSubAwardBean.setPdfAcType(TypeConstants.INSERT_RECORD);\r\n budgetSubAwardBean.setSubAwardStatusCode(1);\r\n // PDF is not mandatory\r\n// budgetSubAwardBean.setPdfFileName(fileName);\r\n budgetSubAwardBean.setUpdateUser(userId);\r\n //COEUSQA-4061 \r\n CoeusVector cvBudgetPeriod = new CoeusVector(); \r\n \r\n cvBudgetPeriod = getBudgetPeriodData(budgetSubAwardBean.getProposalNumber(),budgetSubAwardBean.getVersionNumber()); \r\n \r\n //COEUSQA-4061\r\n int rowIndex = 0;\r\n if(data == null || data.size() == 0) {\r\n budgetSubAwardBean.setSubAwardNumber(1);\r\n // Added for COEUSQA-2115 : Subaward budgeting for Proposal Development - Start\r\n // Sub Award Details button will be enabled only when the periods are generated or budget has one period\r\n if(isPeriodsGenerated() || cvBudgetPeriod.size() == 1){\r\n subAwardBudget.btnSubAwardDetails.setEnabled(true);\r\n }\r\n // Added for COEUSQA-2115 : Subaward budgeting for Proposal Development - End\r\n }else{\r\n rowIndex = data.size();\r\n BudgetSubAwardBean lastBean = (BudgetSubAwardBean)data.get(rowIndex - 1);\r\n budgetSubAwardBean.setSubAwardNumber(lastBean.getSubAwardNumber() + 1);\r\n }\r\n if(!subAwardBudget.isEnabled()){\r\n subAwardBudget.btnSubAwardDetails.setEnabled(true);\r\n }\r\n data.add(budgetSubAwardBean);\r\n subAwardBudgetTableModel.fireTableRowsInserted(rowIndex, rowIndex);\r\n subAwardBudget.tblSubAwardBudget.setRowSelectionInterval(rowIndex, rowIndex);\r\n \r\n }",
"@Test\n public void insertNote_returnRow() throws Exception {\n // Arrange\n Note note = new Note(TestUtil.TEST_NOTE_1);\n LiveDataTestUtil<DataStateStatus<Integer>> liveDataTestUtil = new LiveDataTestUtil<>();\n final int insertedRow = 1;\n Flowable<DataStateStatus<Integer>> returnedData = SingleToFlowable.just(DataStateStatus.success(insertedRow, INSERT_SUCCESS));\n when(localRepository.insertNote(any(Note.class))).thenReturn(returnedData);\n\n // Act\n noteViewModel.setNote(note);\n DataStateStatus<Integer> returnedValue = liveDataTestUtil.getValue(noteViewModel.insertNote());\n\n // Assert\n assertEquals(DataStateStatus.success(insertedRow, INSERT_SUCCESS), returnedValue);\n }",
"int insertSelective(Nutrition record);",
"int insertSelective(Sequipment record);",
"@DisplayName(\"Deleting an entry if noOfCopies is 0\")\n\t@Test\n\tpublic void setEntryWithNoOfCopiesTest() throws SQLException {\n\t\tfinal int previousSize = copiesDaoImpl.findAll().size();\n\t\tcopiesDaoImpl.setCopies(testBranch, testBook, 0);\n\t\tassertEquals(previousSize - 1, copiesDaoImpl.findAll().size(),\n\t\t\t\t\"setting number of copies to 0 deletes row\");\n\t}",
"int insertSelective(Shipping record);",
"int insertSelective(GoodsPo record);",
"public void testGetRowKey() {\n TaskSeriesCollection c = createCollection1();\n }",
"@Test(timeout = 4000)\n public void test124() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(\"Illegal column type format: \");\n String[] stringArray0 = new String[9];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"66i,cw\", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n assertEquals(\"table\", defaultDBTable0.getObjectType());\n }",
"private void assertIsolatedSnapshot(String source, String dest) {\n List<Row> expected = spark.sql(String.format(\"SELECT * FROM %s\", source)).collectAsList();\n\n List<SimpleRecord> extraData = Lists.newArrayList(new SimpleRecord(4, \"d\"));\n Dataset<Row> df = spark.createDataFrame(extraData, SimpleRecord.class);\n df.write().format(\"iceberg\").mode(\"append\").saveAsTable(dest);\n\n List<Row> result = spark.sql(String.format(\"SELECT * FROM %s\", source)).collectAsList();\n Assert.assertEquals(\n \"No additional rows should be added to the original table\", expected.size(), result.size());\n\n List<Row> snapshot =\n spark\n .sql(String.format(\"SELECT * FROM %s WHERE id = 4 AND data = 'd'\", dest))\n .collectAsList();\n Assert.assertEquals(\"Added row not found in snapshot\", 1, snapshot.size());\n }",
"int insert(UserTips record);",
"private\n void\n doTestHostSecurityAttachmentPointRow(HostSecurityAttachmentPointRow r,\n int expectedEntries) throws Exception {\n r.writeToStorage();\n assertEquals(expectedEntries,\n bigDeviceManager.hostSecurityInterfaceRegexMap.size());\n r.removeFromStorage();\n }",
"@Test\n public void testTableFactoryCreateNoOtherTables() {\n TableController tableController = tableFactory.getTableController();\n tableController.addTable(2);\n assertNull(tableController.getTableMap().get(1));\n assertNotNull(tableController.getTableMap().get(2));\n assertNull(tableController.getTableMap().get(3));\n }",
"int insert(DashboardGoods record);",
"@Test\n public void testCopyFeatureTable() throws SQLException, IOException {\n AlterTableUtils.testCopyFeatureTable(activity, geoPackage);\n }",
"int insertSelective(UcOrderGuestInfo record);",
"int insertSelective(PaasCustomAutomationRecord record);",
"@Test\n public void testReservationFactoryTableOccupied() {\n ReservationController reservationController = reservationFactory.getReservationController();\n Customer customer = new Customer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n Calendar date = Calendar.getInstance();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n Table table = tableFactory.getTableController().getTable(1);\n reservationController.addReservation(date, customer, 2, table);\n assertEquals(1, reservationController.getReservationList().size());\n assertEquals(1, table.getTableId());\n assertEquals(2, table.getNumSeats());\n assertEquals(TableStatus.RESERVED, table.getStatus());\n }",
"private void repopulateTableForDelete()\n {\n clearTable();\n populateTable(null);\n }",
"int insertSelective(SwmsStockOutRecordDetail record);",
"int insertSelective(Ltsprojectpo record);",
"@Test\n public void deleteRecipeIngredient_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeIngredient - Returns True\",true, testDatabase.deleteRecipeIngredients(returned));\n }",
"int insertSelective(Assist_table record);",
"public void testInsert() throws SQLException, ClassNotFoundException {\r\n\t\t// create an instance to be test\r\n\t\tDate d = Date.valueOf(\"2017-01-01\");\r\n\t\tService service = new Service(\"employee\", 1, \"variation\", \"note\", d, d, 1, 1);\r\n\t\tmodelDS.insert(service); // method to test\r\n\r\n\t\t// database extrapolation\r\n\t\tPreparedStatement ps = connection.prepareStatement(\"SELECT * FROM \" + TABLE_NAME + \" WHERE employee = ?\");\r\n\t\tps.setString(1, \"employee\");\r\n\t\tResultSet rs = ps.executeQuery();\r\n\t\tService expected = null;\r\n\t\twhile (rs.next()) {\r\n\t\t\texpected = new Service();\r\n\t\t\texpected.setId(rs.getInt(\"id\"));\r\n\t\t\texpected.setEmployee(rs.getString(\"employee\"));\r\n\t\t\texpected.setQuantity(rs.getInt(\"quantity\"));\r\n\t\t\texpected.setVariation(rs.getString(\"variation\"));\r\n\t\t\texpected.setNote(rs.getString(\"note\"));\r\n\t\t\texpected.setReceiptDate(rs.getDate(\"receipt_date\"));\r\n\t\t\texpected.setReturnDate(rs.getDate(\"return_date\"));\r\n\t\t\texpected.setArticleId(rs.getInt(\"article_id\"));\r\n\t\t\texpected.setCustomerId(rs.getInt(\"customer_id\"));\r\n\t\t}\r\n\r\n\t\t// compare database result with the method tested\r\n\t\tassertNotNull(expected);\r\n\t\tassertNotNull(service);\r\n\t\tassertEquals(expected, service);\r\n\r\n\t\tmodelDS.remove(expected.getId()); // return to the initial state of the\r\n\t\t\t\t\t\t\t\t\t\t\t// database before test\r\n\t}",
"@Test\n public void addHighScoreTest() {\n database.createHighScoreTable(testTable);\n assertTrue(database.addHighScore(100, testTable));\n database.clearTable(testTable);\n\n }",
"public void addRow() {\n tableModel.insertRow(this.getRowCount(), new String[]{});\n this.setModel(tableModel);\n\n }",
"int insert(CfgSearchRecommend record);",
"@Test\n public void addRecipe_CorrectInformation(){\n int returned = testDatabase.addRecipe(testRecipe);\n Recipe retrieved = testDatabase.getRecipe(returned);\n\n // Check all recipe fields are accurate\n assertEquals(\"addRecipe - Correct Title\", recipeTitle, retrieved.getTitle());\n assertEquals(\"addRecipe - Correct Servings\", 1, retrieved.getServings(), 0);\n assertEquals(\"addRecipe - Correct prep_time\", 30, retrieved.getPrep_time(), 0);\n assertEquals(\"addRecipe - Correct total_time\", 60, retrieved.getTotal_time(), 0);\n assertEquals(\"addRecipe - Correct Favorited\", false, retrieved.getFavorited());\n assertEquals(\"addRecipe - Correct Ingredient Unit\", \"cups\", retrieved.getIngredientList().get(0).getUnit());\n assertEquals(\"addRecipe - Correct Ingredient Quantity\", 2.0, retrieved.getIngredientList().get(0).getQuantity(), 0);\n assertEquals(\"addRecipe - Correct Ingredient Details\", \"White Flour\", retrieved.getIngredientList().get(0).getDetails());\n assertEquals(\"addRecipe - Correct First Direction Number\", 1, retrieved.getDirectionsList().get(0).getDirectionNumber());\n assertEquals(\"addRecipe - Correct First Direction Text\", \"TestDirection1\", retrieved.getDirectionsList().get(0).getDirectionText());\n assertEquals(\"addRecipe - Correct Second Direction Number\", 2, retrieved.getDirectionsList().get(1).getDirectionNumber());\n assertEquals(\"addRecipe - Correct Second Direction Text\", \"TestDirection2\", retrieved.getDirectionsList().get(1).getDirectionText());\n }",
"int insert(ToolsOutIn record);",
"public void testMatchCRUD() {\n assertFalse(dbHelper.mMatchTable.hasData());\n\n // Create\n\n // Read\n\n // Update\n\n // Delete\n dbHelper.mMatchTable.deleteAll();\n assertFalse(dbHelper.mMatchTable.hasData());\n }",
"public void addCertainRow(String username, String pin, String information, String role, String hold)\n {\n String insertStr;\n try{\n\n insertStr=\"INSERT IGNORE INTO user (username, pin, information, role, hold) VALUES(\"\n +quotate(username)+\",\"\n +quotate(pin)+\",\"\n +quotate(information)+\",\"\n +quotate(role)+\",\"\n +quotate(hold)\n +\")\";\n\n stmt.executeUpdate(insertStr);\n\n } catch(Exception e){\n System.out.println(\"Error occurred in inserting data\");\n }\n return;\n }",
"private void testRow( TaskKey aTask, String aBarcode, AircraftKey aAircraft,\n AssemblyKey aAssembly, String aAircraftName, RefSchedPriorityKey aSchedPriority,\n Date aDueDate, RefTaskPriorityKey aTaskPriority, int aTaskPriorityOrd,\n int aNextHighestEventDbId, String aClassModeCd, String aNextHighestTaskClassCd,\n Date aHighestSchedStartGdt, double aDuration, String aPartList, String aToolList,\n String aLabourList, String aWorkTypeList, String aSubtreeList ) {\n\n MxAssert.assertEquals( aTask.toString(), iDataSet.getString( \"task_pk\" ) );\n MxAssert.assertEquals( aBarcode, iDataSet.getString( \"barcode_sdesc\" ) );\n MxAssert.assertEquals( aAircraft.toString(), iDataSet.getString( \"aircraft_pk\" ) );\n MxAssert.assertEquals( aAssembly.toString(), iDataSet.getString( \"assmbl_pk\" ) );\n MxAssert.assertEquals( aAircraftName, iDataSet.getString( \"aircraft_name\" ) );\n MxAssert.assertEquals( aSchedPriority.toString(), iDataSet.getString( \"sched_priority\" ) );\n MxAssert.assertEquals( aDueDate, iDataSet.getDate( \"due_date\" ) );\n MxAssert.assertEquals( aTaskPriority.toString(), iDataSet.getString( \"task_priority\" ) );\n MxAssert.assertEquals( aTaskPriorityOrd, iDataSet.getInt( \"task_priority_ord\" ) );\n\n // Loose Task Specific values\n MxAssert.assertEquals( aNextHighestEventDbId, iDataSet.getInt( \"nh_event_db_id\" ) );\n MxAssert.assertEquals( aClassModeCd, iDataSet.getString( \"class_mode_cd\" ) );\n\n // Non Loose Task Specific values\n MxAssert.assertEquals( aNextHighestTaskClassCd, iDataSet.getString( \"nh_task_class_cd\" ) );\n MxAssert.assertEquals( aHighestSchedStartGdt, iDataSet.getDate( \"h_sched_start_gdt\" ) );\n\n MxAssert.assertEquals( aDuration, iDataSet.getDouble( \"duration\" ) );\n\n if ( aPartList != null ) {\n MxAssert.assertEquals( aPartList, iDataSet.getString( \"part_details_list\" ) );\n }\n\n if ( aToolList != null ) {\n MxAssert.assertEquals( aToolList, iDataSet.getString( \"tools_list\" ) );\n }\n\n if ( aLabourList != null ) {\n MxAssert.assertEquals( aLabourList, iDataSet.getString( \"est_labour_effort_list\" ) );\n }\n\n if ( aWorkTypeList != null ) {\n MxAssert.assertEquals( aWorkTypeList, iDataSet.getString( \"work_types_list\" ) );\n }\n\n if ( aSubtreeList != null ) {\n MxAssert.assertEquals( aSubtreeList, iDataSet.getString( \"subtree_list\" ) );\n }\n }",
"@Test\n public void testCRD() throws Exception{\n \tSubmissionFileHandleDBO handle = new SubmissionFileHandleDBO();\n \thandle.setSubmissionId(submissionId);\n \thandle.setFileHandleId(Long.parseLong(fileHandleId));\n \t\n // Create it\n SubmissionFileHandleDBO clone = dboBasicDao.createNew(handle);\n assertNotNull(clone);\n assertEquals(handle, clone);\n \n // Fetch it\n MapSqlParameterSource params = new MapSqlParameterSource();\n params.addValue(DBOConstants.PARAM_SUBFILE_SUBMISSION_ID, submissionId);\n params.addValue(DBOConstants.PARAM_SUBFILE_FILE_HANDLE_ID, fileHandleId);\n SubmissionFileHandleDBO clone2 = dboBasicDao.getObjectByPrimaryKey(SubmissionFileHandleDBO.class, params).get();\n assertNotNull(clone2);\n assertEquals(handle, clone2); \n \n // Delete it\n boolean result = dboBasicDao.deleteObjectByPrimaryKey(SubmissionFileHandleDBO.class, params);\n assertTrue(\"Failed to delete the entry created\", result); \n }",
"int insert(Sequipment record);",
"public void addRow(String rowName);",
"int insert(SmsCleanBagLine record);",
"Rows createRows();"
] | [
"0.6625489",
"0.57815427",
"0.57770216",
"0.574183",
"0.55100065",
"0.5489348",
"0.54668736",
"0.5455062",
"0.54529727",
"0.54331034",
"0.54123086",
"0.5376017",
"0.53706163",
"0.5325064",
"0.5324956",
"0.5293088",
"0.5289002",
"0.5267087",
"0.5259035",
"0.52498853",
"0.5246417",
"0.5222353",
"0.52202576",
"0.52201045",
"0.52069384",
"0.52010655",
"0.51944035",
"0.517738",
"0.5175576",
"0.5166524",
"0.5161928",
"0.51595026",
"0.51543766",
"0.5148376",
"0.51457447",
"0.5143963",
"0.5142459",
"0.5130699",
"0.51290065",
"0.51233673",
"0.5119004",
"0.51189595",
"0.5116308",
"0.511521",
"0.5109593",
"0.510846",
"0.5104775",
"0.50935155",
"0.5087973",
"0.50877225",
"0.50810766",
"0.5080066",
"0.5077931",
"0.50733376",
"0.5072083",
"0.50633454",
"0.50633174",
"0.5050239",
"0.50396866",
"0.503917",
"0.50382733",
"0.5035325",
"0.50348437",
"0.50292134",
"0.50277865",
"0.5027",
"0.50261414",
"0.50225496",
"0.5021093",
"0.50178814",
"0.501767",
"0.5015862",
"0.50158215",
"0.5015552",
"0.5012171",
"0.50057095",
"0.5005625",
"0.5005325",
"0.5003196",
"0.49999782",
"0.4998772",
"0.49967468",
"0.499149",
"0.4982657",
"0.4981454",
"0.49789646",
"0.4975606",
"0.49729472",
"0.49716794",
"0.49711996",
"0.4970288",
"0.49680123",
"0.49675474",
"0.4965203",
"0.4964763",
"0.496474",
"0.49646243",
"0.49609572",
"0.49608046",
"0.49597782"
] | 0.61467725 | 1 |
Tests reading from the associated table PowerToolsTOStripNails | @Test
public void testReadRowRelationPowerTool() throws SQLException
{
new PowerTool("asdf", 5, 5, "PowerTooldescription", true);
new StripNail("UPC", 5, 5, 3.33, 9);
new PowerToolsToStripNailsMapper(1,2);
ArrayList<Integer> powerToolsRelatedToStripNail = DatabaseGateway.readRowRelationPowerTool(1);
assertTrue(powerToolsRelatedToStripNail.contains(2));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testReadRowRelationStripNail() throws SQLException\n\t{\n\t\tnew PowerTool(\"asdf\", 5, 5, \"PowerTooldescription\", true);\n\t\tnew StripNail(\"UPC\", 5, 5, 3.33, 9);\n\t\t\n\t\tnew PowerToolsToStripNailsMapper(1,2);\n\t\t\n\t\tArrayList<Integer> stripNailsRelatedToPowerTools = DatabaseGateway.readRowRelationStripNail(2);\n\t\tassertTrue(stripNailsRelatedToPowerTools.contains(1));\n\t}",
"public void readValuesfromtableWithoutHeadings()\n\t {\n\t\t open();\n\t\t List<Map<Object, String>> tab1= withColumns(\"Last Name \" ,\"First Name\",\"Email\", \"Due\" , \"Web Site\" , \"My Test\") \n\t\t\t\t .readRowsFrom(table);\n\t\t System.out.println(tab1);\n\t }",
"public void readTableData() {\n\t\tint colCount = driver.findElements(By.xpath(\"//*[@id='industry-filter-results']/div[2]/table/tbody/tr[1]/th\"))\n\t\t\t\t.size();\n\t\tSystem.out.println(\"colCount\" + colCount);\n\t\t// Find row size\n\t\tint rowCount = driver\n\t\t\t\t.findElements(By.xpath(\"//*[@id='industry-filter-results']/div[2]/table/tbody/tr/td/parent::*\")).size();\n\t\tSystem.out.println(\"rowCount\" + rowCount);\n\t\t// Find xpath for 1st row and 1st column. Break into multiple parts such\n\t\t// that row and column no can be iterated.\n\t\tString firstPart = \"(//*[@id='industry-filter-results']/div[2]/table/tbody/tr/td[2]/parent::tr)[\";\n\t\tString secondPart = \"1\";\n\t\tString thirdPart = \"]\";\n\t\tboolean flag = false;\n\t\t// Loop through rows one by one. Start from 1st row till row count.\n\t\tfor (int i = 1; i <= rowCount; i++) {\n\t\t\t// For every row, loop through columns one by one. Start from 1st\n\t\t\t// column till column count.\n\t\t\tfor (int j = 1; j <= colCount; j++) {\n\t\t\t\tString finalPart = firstPart + i + secondPart + j + thirdPart;\n\t\t\t\tSystem.out.println(finalPart);\n\t\t\t\tString text = driver.findElement(By.xpath(finalPart)).getText();\n\t\t\t\tSystem.out.print(text + \" | \");\n\t\t\t\t//If we need to stop after a particular text is matched use if condition\n\t\t\t\tif(text.contains(\"abc\")){\n\t\t\t\t\tSystem.out.println(text);\n\t\t\t\t\tflag = true;//Set flag as true(Logic from Naveen automation labs)\n\t\t\t\t\tbreak;//This will stop iterating the columns.(https://www.youtube.com/watch?v=Rjs9qLRP9tM&list=PLFGoYjJG_fqo4oVsa6l_V-_7-tzBnlulT&index=18)\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tif(flag){\n\t\t\t\tbreak;//This will break outer loop only if flag is true. i.e. we have retrieved the text that we need. If not it will continue with next iteration.\n\t\t\t}\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test007() throws Throwable {\n String[] stringArray0 = new String[0];\n String string0 = SQLUtil.renderColumnListWithTableName(\"=\", stringArray0);\n assertEquals(\"\", string0);\n }",
"public void readTableData2() {\n\t\tint colCount = driver.findElements(By.xpath(\"//*[@id='industry-filter-results']/div[2]/table/tbody/tr[1]/th\"))\n\t\t\t\t.size();\n\t\tSystem.out.println(\"colCount\" + colCount);\n\t\t// Find row size\n\t\tint rowCount = driver\n\t\t\t\t.findElements(By.xpath(\"//*[@id='industry-filter-results']/div[2]/table/tbody/tr/td/parent::*\")).size();\n\t\tSystem.out.println(\"rowCount\" + rowCount);\n\t\t// Find xpath for 1st row and 1st column. Break into multiple parts such\n\t\t// that row and column no can be iterated.\n\t\tString firstPart = \"(//*[@id='industry-filter-results']/div[2]/table/tbody/tr/td[2]/parent::tr)[\";\n\t\tString secondPart = \"]\";\n\t\t// Loop through rows one by one. Start from 1st row till row count.\n\t\tfor (int i = 1; i <= rowCount; i++) {\n\t\t\t\tString finalPart = firstPart + i + secondPart;\n\t\t\t\tSystem.out.println(finalPart);\n\t\t\t\tString text = driver.findElement(By.xpath(finalPart)).getText();\n\t\t\t\tSystem.out.print(text + \" | \");\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"@Test\n public void reading()\n throws FileNotFoundException, IOException, CorruptedTableException\n {\n final Database database =\n new Database(new File(\"src/test/resources/\" + versionDirectory + \"/rndtrip\"), version);\n final Set<String> tableNames = database.getTableNames();\n\n assertEquals(2,\n tableNames.size());\n assertTrue(\"TABLE1 not found in 'short roundtrip' database\",\n tableNames.contains(\"TABLE1.DBF\"));\n assertTrue(\"TABLE2 not found in 'short roundtrip' database\",\n tableNames.contains(\"TABLE2.DBF\"));\n\n final Table t1 = database.getTable(\"TABLE1.DBF\");\n\n try\n {\n t1.open(IfNonExistent.ERROR);\n\n assertEquals(\"Table name incorrect\",\n \"TABLE1.DBF\",\n t1.getName());\n assertEquals(\"Last modified date incorrect\",\n Util.createDate(2009, Calendar.APRIL, 1),\n t1.getLastModifiedDate());\n\n final List<Field> fields = t1.getFields();\n\n Iterator<Field> fieldIterator = fields.iterator();\n Map<String, Field> nameFieldMap = new HashMap<String, Field>();\n\n while (fieldIterator.hasNext())\n {\n Field f = fieldIterator.next();\n nameFieldMap.put(f.getName(),\n f);\n }\n\n final Field idField = nameFieldMap.get(\"ID\");\n assertEquals(Type.NUMBER,\n idField.getType());\n assertEquals(idField.getLength(),\n 3);\n\n final Field stringField = nameFieldMap.get(\"STRFIELD\");\n assertEquals(Type.CHARACTER,\n stringField.getType());\n assertEquals(stringField.getLength(),\n 50);\n\n final Field logicField = nameFieldMap.get(\"LOGICFIELD\");\n assertEquals(Type.LOGICAL,\n logicField.getType());\n assertEquals(logicField.getLength(),\n 1);\n\n final Field dateField = nameFieldMap.get(\"DATEFIELD\");\n assertEquals(Type.DATE,\n dateField.getType());\n assertEquals(8,\n dateField.getLength());\n\n final Field floatField = nameFieldMap.get(\"FLOATFIELD\");\n assertEquals(Type.NUMBER,\n floatField.getType());\n assertEquals(10,\n floatField.getLength());\n\n final List<Record> records = UnitTestUtil.createSortedRecordList(t1.recordIterator(),\n \"ID\");\n final Record r0 = records.get(0);\n\n assertEquals(1,\n r0.getNumberValue(\"ID\"));\n assertEquals(\"String data 01\",\n r0.getStringValue(\"STRFIELD\").trim());\n assertEquals(true,\n r0.getBooleanValue(\"LOGICFIELD\"));\n assertEquals(Util.createDate(1909, Calendar.MARCH, 18),\n r0.getDateValue(\"DATEFIELD\"));\n assertEquals(1234.56,\n r0.getNumberValue(\"FLOATFIELD\"));\n\n final Record r1 = records.get(1);\n\n assertEquals(2,\n r1.getNumberValue(\"ID\"));\n assertEquals(\"String data 02\",\n r1.getStringValue(\"STRFIELD\").trim());\n\n /*\n * in Clipper 'false' value can be given as an empty field, and the method called here\n * returns then 'null' as the return value\n */\n if (version == Version.CLIPPER_5)\n {\n assertEquals(null,\n r1.getBooleanValue(\"LOGICFIELD\"));\n }\n else\n {\n assertEquals(false,\n r1.getBooleanValue(\"LOGICFIELD\"));\n }\n\n assertEquals(Util.createDate(1909, Calendar.MARCH, 20),\n r1.getDateValue(\"DATEFIELD\"));\n assertEquals(-23.45,\n r1.getNumberValue(\"FLOATFIELD\"));\n\n final Record r2 = records.get(2);\n\n assertEquals(3,\n r2.getNumberValue(\"ID\"));\n assertEquals(\"\",\n r2.getStringValue(\"STRFIELD\").trim());\n assertEquals(null,\n r2.getBooleanValue(\"LOGICFIELD\"));\n assertEquals(null,\n r2.getDateValue(\"DATEFIELD\"));\n assertEquals(null,\n r2.getNumberValue(\"FLOATFIELD\"));\n\n final Record r3 = records.get(3);\n\n assertEquals(4,\n r3.getNumberValue(\"ID\"));\n assertEquals(\"Full5678901234567890123456789012345678901234567890\",\n r3.getStringValue(\"STRFIELD\").trim());\n\n /*\n * in Clipper 'false' value can be given as an empty field, and the method called here\n * returns then 'null' as the return value\n */\n if (version == Version.CLIPPER_5)\n {\n assertEquals(null,\n r3.getBooleanValue(\"LOGICFIELD\"));\n }\n else\n {\n assertEquals(false,\n r3.getBooleanValue(\"LOGICFIELD\"));\n }\n\n assertEquals(Util.createDate(1909, Calendar.MARCH, 20),\n r3.getDateValue(\"DATEFIELD\"));\n assertEquals(-0.30,\n r3.getNumberValue(\"FLOATFIELD\"));\n }\n finally\n {\n t1.close();\n }\n\n final Table t2 = database.getTable(\"TABLE2.DBF\");\n\n try\n {\n t2.open(IfNonExistent.ERROR);\n\n final List<Field> fields = t2.getFields();\n\n Iterator<Field> fieldIterator = fields.iterator();\n Map<String, Field> nameFieldMap = new HashMap<String, Field>();\n\n while (fieldIterator.hasNext())\n {\n Field f = fieldIterator.next();\n nameFieldMap.put(f.getName(),\n f);\n }\n\n final Field idField = nameFieldMap.get(\"ID2\");\n assertEquals(Type.NUMBER,\n idField.getType());\n assertEquals(idField.getLength(),\n 4);\n\n final Field stringField = nameFieldMap.get(\"MEMOFIELD\");\n assertEquals(Type.MEMO,\n stringField.getType());\n assertEquals(10,\n stringField.getLength());\n\n final Iterator<Record> recordIterator = t2.recordIterator();\n final Record r = recordIterator.next();\n\n String declarationOfIndependence = \"\";\n\n declarationOfIndependence += \"When in the Course of human events it becomes necessary for one people \";\n declarationOfIndependence += \"to dissolve the political bands which have connected them with another and \";\n declarationOfIndependence += \"to assume among the powers of the earth, the separate and equal station to \";\n declarationOfIndependence += \"which the Laws of Nature and of Nature's God entitle them, a decent respect \";\n declarationOfIndependence += \"to the opinions of mankind requires that they should declare the causes which \";\n declarationOfIndependence += \"impel them to the separation.\";\n declarationOfIndependence += \"\\r\\n\\r\\n\";\n declarationOfIndependence += \"We hold these truths to be self-evident, that all men are created equal, \";\n declarationOfIndependence += \"that they are endowed by their Creator with certain unalienable Rights, \";\n declarationOfIndependence += \"that among these are Life, Liberty and the persuit of Happiness.\";\n\n assertEquals(1,\n r.getNumberValue(\"ID2\"));\n assertEquals(declarationOfIndependence,\n r.getStringValue(\"MEMOFIELD\"));\n }\n finally\n {\n t2.close();\n }\n }",
"@Test(timeout = 4000)\n public void test007() throws Throwable {\n String[] stringArray0 = new String[0];\n String string0 = SQLUtil.renderColumnListWithTableName(\"#ZZ)Qz:4cY5C#6v;\", stringArray0);\n assertEquals(\"\", string0);\n }",
"public void testToStringStarTableString() throws IOException {\n String s = helper.toString(table,\"votable\");\n StarTable table1 = helper.getBuilder().makeStarTableFromString(s);\n assertNotNull(table1);\n assertEquals(table1.getColumnCount(),table.getColumnCount());\n assertEquals(table1.getRowCount(),table.getRowCount());\n \n }",
"@Test\n\tpublic void testCreateRowRelation() throws SQLException\n\t{\n\t\tnew PowerTool(\"asdf\", 5, 5, \"PowerTooldescription\", true);\n\t\tnew StripNail(\"UPC\", 5, 5, 3.33, 9);\n\t\t\n\t\tnew PowerToolsToStripNailsMapper(1,2);\n\t\t\n\t\tResultSet rs = DatabaseGateway.getTable(\"PowerToolsTOStripNails\");\n\t\tif(rs.next())\n\t\t{\n\t\t\tassertEquals(rs.getInt(\"PowerToolid\"),1);\n\t\t\tassertEquals(rs.getInt(\"StripNailid\"),2);\n\t\t}\n\t}",
"@Test\n public void testPrefixTrimOnNonAddress() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n final String streamName = \"test\";\n\n CorfuRuntime rt = getNewRuntime();\n CorfuRuntime runtime = getNewRuntime();\n\n try {\n PersistentCorfuTable<String, Long> testTable = rt.getObjectsView()\n .build()\n .setTypeToken(new TypeToken<PersistentCorfuTable<String, Long>>() {})\n .setStreamName(streamName)\n .open();\n\n // Checkpoint (should return -1 as no actual data is written yet)\n MultiCheckpointWriter<PersistentCorfuTable<String, Long>> mcw = new MultiCheckpointWriter<>();\n mcw.addMap(testTable);\n Token checkpointAddress = mcw.appendCheckpoints(rt, author);\n\n // Write several entries into the log.\n for (int i = 0; i < tableSize; i++) {\n try {\n testTable.insert(String.valueOf(i), (long) i);\n } catch (TrimmedException te) {\n // shouldn't happen\n te.printStackTrace();\n throw te;\n }\n }\n\n // Prefix Trim on checkpoint snapshot address\n rt.getAddressSpaceView().prefixTrim(checkpointAddress);\n rt.getAddressSpaceView().gc();\n rt.getAddressSpaceView().invalidateServerCaches();\n rt.getAddressSpaceView().invalidateClientCache();\n\n // Rebuild stream from fresh runtime\n try {\n PersistentCorfuTable<String, Long> localTestTable = openTable(runtime, streamName);\n for (int i = 0; i < localTestTable.size(); i++) {\n assertThat(localTestTable.get(String.valueOf(i))).isEqualTo(i);\n }\n assertThat(localTestTable.size()).isEqualTo(tableSize);\n } catch (TrimmedException te) {\n // shouldn't happen\n te.printStackTrace();\n throw te;\n }\n } finally {\n rt.shutdown();\n runtime.shutdown();\n }\n }",
"@Test(timeout = 4000)\n public void test66() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String string0 = SQLUtil.normalize(\"/*n9mv+\", false);\n assertEquals(\"/* n9mv +\", string0);\n }",
"@Test(timeout = 4000)\n public void test082() throws Throwable {\n String string0 = SQLUtil.normalize(\"RUS9_R63q0--wSiH\", false);\n assertEquals(\"RUS9_R63q0 -- wSiH\", string0);\n }",
"@Test(timeout = 4000)\n public void test017() throws Throwable {\n String[] stringArray0 = new String[0];\n String string0 = SQLUtil.renderColumnListWithTableName(\"h?p1Qr0S[-noB L*gq\", stringArray0);\n assertEquals(\"\", string0);\n }",
"@Override\n public void testTruncateTable() {\n }",
"@Test(timeout = 4000)\n public void test062() throws Throwable {\n DBUtil.checkReadOnly(\"SELECT pronae,oid FROM pg_roc WHEE \", true);\n }",
"@Test\n\tpublic void testSingleItemRecordsNotLopped() \n\t{\n\t\tString id = \"oneLC999\";\n\t\tassertLCVol1NotLopped(id);\n\t\tassertNoLoppedLC(id);\n\t \n\t id = \"oneDewey999\";\n\t\tsolrFldMapTest.assertSolrFldValue(testFilePath, id, fldName, deweyVol1Shelfkey);\n\n\t id = \"oneAlphanumBox\";\n\t String callnum = \"M1522 BOX 1\";\n\t String shelfkey = CallNumUtils.getShelfKey(callnum, CallNumberType.OTHER, id).toLowerCase();\n\t\tsolrFldMapTest.assertSolrFldValue(testFilePath, id, fldName, shelfkey);\n\t}",
"public void testImportNonEmptyDB() throws Exception {\n URL testXMLFileURL = getClass().getResource(\"prox2db-testdb.xml\");\n new ImportProx2XMLApp(testXMLFileURL.getFile());\n\n // check the resulting database\n verifyObjects(new String[]{\"0\", \"1\", \"2\", \"3\", \"4\"});\n verifyLinks(new String[][]{\n {\"0\", \"1\", \"2\"},\n {\"1\", \"0\", \"3\"},\n {\"2\", \"1\", \"3\"},\n {\"3\", \"1\", \"2\"},\n {\"4\", \"3\", \"4\"}});\n verifyAttribute(\"name\", \"O\", \"VARCHAR\", new String[][]{\n {\"3\", \"Matthew Cornell\"},\n {\"2\", \"David Jensen\"},\n {\"4\", \"our place (an already existing obj)\"}});\n verifyAttribute(\"obj-type\", \"O\", \"VARCHAR\", new String[][]{\n {\"3\", \"person\"},\n {\"2\", \"person\"},\n {\"1\", \"research group\"}});\n verifyAttribute(\"office-num\", \"O\", \"INTEGER\", new String[][]{\n {\"3\", \"218\"},\n {\"2\", \"238\"}});\n verifyAttribute(\"double-test\", \"O\", \"DOUBLE\", new String[][]{\n {\"3\", \"3\"},\n {\"2\", \"2.1000000000000001\"}}); // NB: values match those in file and take into account double precision math changes in Monet version 4.3.14\n verifyAttribute(\"date-test\", \"O\", \"DATE\", new String[][]{\n {\"3\", \"2003-08-25\"},\n {\"2\", \"1962-10-22\"}});\n verifyAttribute(\"link-test\", \"L\", \"VARCHAR\", new String[][]{\n {\"3\", \"this looks like an object ref: _[xx],_but it isn_t because it_s inside a link attribute\"}});\n verifyAttribute(\"link-type\", \"L\", \"VARCHAR\", new String[][]{\n {\"2\", \"member\"},\n {\"3\", \"member\"},\n {\"4\", \"lives-at\"}});\n verifyAttribute(\"nickname\", \"O\", \"VARCHAR\", new String[][]{\n {\"1\", \"kdl\"},\n {\"2\", \"dj\"},\n {\"3\", \"me\"},\n {\"4\", \"home\"}});\n verifyAttribute(\"sa.implied\", \"L\", \"INTEGER\", new String[][]{\n {\"0\", \"1\"},\n {\"1\", \"1\"}});\n verifyAttribute(\"sa.undefined\", \"O\", \"INTEGER\", new String[][]{{}});\n\n veryifyCollection(\"test-coll\", new String[]{\"0\"},\n new String[][]{\n {\"0\", \"0\", \"#test\"},\n {\"0\", \"1\", \"kdl\"},\n {\"0\", \"2\", \"dj\"},\n {\"0\", \"3\", \"me\"},\n {\"0\", \"4\", \"home\"}},\n new String[][]{\n {\"0\", \"0\", \"0:implied:kdl->dj\"},\n {\"0\", \"1\", \"1:implied:#test->me\"},\n {\"0\", \"2\", \"2:kdl->me\"},\n {\"0\", \"3\", \"3:kdl->dj\"},\n {\"0\", \"4\", \"4:me->home\"}});\n veryifyCollection(\"qg2test\", new String[]{\"1\", \"2\", \"3\"},\n new String[][]{\n {\"1\", \"1\", \"group\"},\n {\"2\", \"1\", \"group\"},\n {\"3\", \"1\", \"group\"},\n {\"1\", \"2\", \"person\"},\n {\"2\", \"3\", \"person\"},\n {\"3\", \"2\", \"person\"}},\n new String[][]{\n {\"1\", \"0\", \"group-person\"},\n {\"2\", \"2\", \"group-person\"},\n {\"3\", \"3\", \"group-person\"}});\n }",
"public void readTableData1() {\n\t\t// Find row size\n\t\tList<WebElement> rowCount = driver.findElements(By.xpath(\"//*[@id='industry-filter-results']/div[2]/table/tbody/tr/td/parent::*\"));\n\t\tfor(WebElement data:rowCount){\n\t\t\tSystem.out.println(data.getText());\n\t\t}\n\t}",
"@Test\n\tpublic void testGetTable() throws SQLException\n\t{\n\t\tnew Nail(\"asdf\",5,5,5.0,20);\n\t\tResultSet rs = DatabaseGateway.getTable(\"Nail\");\n\t\tif(rs.next())\n\t\t{\n\t\t\tassertEquals(rs.getInt(\"id\"),1);\n\t\t\tassertEquals(rs.getInt(\"ManufacturerID\"),5);\n\t\t\tassertEquals(rs.getInt(\"Price\"),5);\n\t\t\tassertEquals(rs.getString(\"UPC\"),\"asdf\");\n\t\t\tassertTrue(rs.getDouble(\"Length\") == 5.0);\n\t\t\tassertEquals(rs.getInt(\"NumberInBox\"), 20);\n\t\t}\n\t}",
"@Test\r\n\t\t\tpublic void testEncuentraPrimeratabla() {\r\n\t\t\t\t//encontramos la tabla que se llama customers\r\n\t\t\t\tWebElement tabla= driver.findElement(By.xpath(\"//table[@id='customers']\"));\r\n\t\t\t\tSystem.out.println(tabla.getText());\t\r\n\t\t\t\tassertNotNull(tabla);\r\n\t\t\t}",
"@Test\n public void propertyTest() throws Exception {\n String unMatchedTriples = \"\";\n StmtIterator msIter = propertyMeasuringStick.listStatements();\n while (msIter.hasNext()) {\n Statement msStmt = msIter.nextStatement();\n // TODO: find a more formal way to filter out properties we don't need to test\n if (!msStmt.getPredicate().toString().equals(\"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\") &&\n !msStmt.getPredicate().toString().equals(\"http://www.w3.org/2000/01/rdf-schema#subPropertyOf\")) {\n StmtIterator poIter = propertyOutput.listStatements();\n boolean match = false;\n while (poIter.hasNext()) {\n Statement outputStmt = poIter.nextStatement();\n if (outputStmt.equals(msStmt)) {\n match = true;\n }\n }\n // If a match is not found then set this statement.\n if (!match) {\n unMatchedTriples += msStmt.getSubject() + \" \" + msStmt.getPredicate().toString() + \" \" + msStmt.getObject().toString() + \" .\\n\";\n }\n }\n }\n // Output assertion with message of results\n if (!unMatchedTriples.equals(\"\"))\n assertTrue(\"\\nThe following triples ARE in \" + propertyOutputFileName + \" but NOT in propertyMeasuringStick.n3:\\n\" + unMatchedTriples\n , false);\n else\n assertTrue(true);\n\n }",
"public static boolean testTableGet() {\r\n try {\r\n for (int i = 0; i < 6; i++) {\r\n if (!pokemonEq(table.get(testList[i].getName()), testList[i]))\r\n return false;\r\n }\r\n } catch (NoSuchElementException e) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@Test(timeout = 4000)\n public void test004() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String string0 = SQLUtil.renderValue(defaultDBTable0);\n assertNull(string0);\n }",
"@Test\n public void testGetTabella_String() throws MainException, SQLException {\n System.out.println(\"getTabella\");\n String queryText = \"select * from infermieri\";\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n ADISysTableModel result = instance.getTabella(queryText);\n assertNotNull(result);\n queryText = \"select * from infermieri where id = -1\";\n result = instance.getTabella(queryText);\n assertTrue(result.getRowCount() == 0);\n }",
"@Test\n\tpublic void testFetchMappedValuesForJunkData() {\n\t\tString input = \".#!@#^\";\n\t\tList<String> actualOutput = GeneralUtility.fetchMappedValues(input);\n\t\tAssert.assertArrayEquals(Collections.emptyList().toArray(), actualOutput.toArray());\n\t}",
"@Test(timeout = 4000)\n public void test073() throws Throwable {\n String[] stringArray0 = new String[2];\n String string0 = SQLUtil.renderColumnListWithTableName(\"gZ6m651AP_Brsf9lz{a\", stringArray0);\n assertEquals(\"gZ6m651AP_Brsf9lz{a.null, gZ6m651AP_Brsf9lz{a.null\", string0);\n }",
"@Test(timeout = 4000)\n public void test114() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"drop tablealter materkalized viewjcsh%4%|@v9 as alter materkalized on drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29\");\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n File file0 = FileUtil.canonicalFile(\"drop tablealter materkalized viewjcsh%4%|@v9 as alter materkalized on drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29\");\n MockFileOutputStream mockFileOutputStream0 = new MockFileOutputStream(file0, true);\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(mockFileOutputStream0, false);\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n assertNull(defaultDBTable0.getDoc());\n }",
"public static List<Disease> tableToList(DataTable table) throws Exception {\n List<Disease> retVal = new List<Disease>();\n Disease disease;\n for (int i = 0;i < table.Rows.Count;i++)\n {\n disease = new Disease();\n disease.DiseaseNum = PIn.Long(table.Rows[i][\"DiseaseNum\"].ToString());\n disease.PatNum = PIn.Long(table.Rows[i][\"PatNum\"].ToString());\n disease.DiseaseDefNum = PIn.Long(table.Rows[i][\"DiseaseDefNum\"].ToString());\n disease.PatNote = PIn.String(table.Rows[i][\"PatNote\"].ToString());\n disease.DateTStamp = PIn.DateT(table.Rows[i][\"DateTStamp\"].ToString());\n disease.ProbStatus = (ProblemStatus)PIn.Int(table.Rows[i][\"ProbStatus\"].ToString());\n disease.DateStart = PIn.Date(table.Rows[i][\"DateStart\"].ToString());\n disease.DateStop = PIn.Date(table.Rows[i][\"DateStop\"].ToString());\n disease.SnomedProblemType = PIn.String(table.Rows[i][\"SnomedProblemType\"].ToString());\n disease.FunctionStatus = (FunctionalStatus)PIn.Int(table.Rows[i][\"FunctionStatus\"].ToString());\n retVal.Add(disease);\n }\n return retVal;\n }",
"@Test\n public void testLoadToStagingTable() {\n\n // create a list of 8 transfer objects and set the batch size to 5\n List<BulkLoadElementTO> lTOList = populateBulkLoadElementTO( 8 );\n setBatchSize( 5 );\n\n // load the data to the staging table. All data should be written with two batch operations\n // (one for 5 rows and one for 3 rows)\n iBulkLoadDataService.loadToStagingTable( lTOList, iFileImportKey );\n\n // assert whether all 8 rows have been written to the staging table\n BulkLoadElementTableRow lBulkLoadElementRow;\n for ( int i = 0; i < 8; i++ ) {\n lBulkLoadElementRow = iBulkLoadElementDao.findByPrimaryKey(\n new BulkLoadElementKey( iFileImportKey.getDbId(), iFileImportKey.getId(), i ) );\n\n assertEquals( \"Component 1 (C0)\", C0, lBulkLoadElementRow.getC0() );\n\n }\n }",
"@Test(timeout = 4000)\n public void test076() throws Throwable {\n Csv csv0 = Csv.getInstance();\n SimpleResultSet simpleResultSet0 = new SimpleResultSet(csv0);\n Object[] objectArray0 = DBUtil.currentLine(simpleResultSet0);\n assertEquals(0, objectArray0.length);\n }",
"@Test void testInterpretTable() {\n sql(\"select * from \\\"hr\\\".\\\"emps\\\" order by \\\"empid\\\"\")\n .returnsRows(\"[100, 10, Bill, 10000.0, 1000]\",\n \"[110, 10, Theodore, 11500.0, 250]\",\n \"[150, 10, Sebastian, 7000.0, null]\",\n \"[200, 20, Eric, 8000.0, 500]\");\n }",
"@Test(timeout = 4000)\n public void test32() throws Throwable {\n PipedWriter pipedWriter0 = new PipedWriter();\n PipedReader pipedReader0 = new PipedReader(pipedWriter0);\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n String string0 = SQLUtil.renderNumber(streamTokenizer0);\n assertEquals(\"- 0\", string0);\n \n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"- 0\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = null;\n stringArray0[1] = \"- 0\";\n stringArray0[2] = \"- 0\";\n stringArray0[3] = null;\n stringArray0[4] = null;\n stringArray0[5] = \"c?O|:7x7,>^Zs\";\n stringArray0[6] = \"- 0\";\n stringArray0[7] = null;\n stringArray0[8] = null;\n String string1 = SQLUtil.renderQuery(defaultDBTable0, stringArray0, stringArray0);\n assertEquals(\"SELECT * FROM - 0 WHERE null = null AND - 0 = '- 0' AND - 0 = '- 0' AND null = null AND null = null AND c?O|:7x7,>^Zs = 'c?O|:7x7,>^Zs' AND - 0 = '- 0' AND null = null AND null = null\", string1);\n }",
"@Test\r\n \tpublic void testQualifiedValues() {\n \t\t\r\n \t\tParameters params = (Parameters) filter.getParameters();\r\n \t\tparams.detectColumnsMode = Parameters.DETECT_COLUMNS_NONE;\r\n \t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.NONE; // !!!\r\n \t\tparams.removeQualifiers = true;\r\n \t\t\r\n //\t\tparams.valuesStartLineNum = 9;\r\n //\t\tparams.sendHeaderMode = 0;\r\n \r\n \t\t\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value12\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value22.1,Value22.2, Value22.3\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value34.1\\nValue34.2\\nValue34.3\\nValue34.4,Value34.5\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value44.1\\nValue44.2\\nValue44.3\\nValue44.4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value45.1,Value45.2\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value54.1\\nValue54.2\\nValue54.3\\nValue54.4,Value55.1,Value55.2\\nValue55.3,Value55.4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value64.1\\nValue64.2\\nValue64.3\\nValue64.4,Value65.1,Value65.2\\nValue65.3,Value65.4\\n\" +\r\n \t\t\t\t\"Value65.5,Value66\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value72 aaa quoted part 1, then quoted part 2 value,Value73,Value74\\n\" +\r\n \t\t\t\t\"Value81,Value82 with unclosed quote\\nValue91,Value92\\nValueA1,ValueA2\\nValueB1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB2,ValueB3\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t\t\r\n \t\t\r\n \t\t// Unwrap lines\r\n \t\tinput = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.SPACES; // !!!\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value12\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value22.1,Value22.2, Value22.3\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value34.1 Value34.2 Value34.3 Value34.4,Value34.5\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value44.1 Value44.2 Value44.3 Value44.4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value45.1,Value45.2\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value54.1 Value54.2 Value54.3 Value54.4,Value55.1,Value55.2 Value55.3,Value55.4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value64.1 Value64.2 Value64.3 Value64.4,Value65.1,Value65.2 Value65.3,Value65.4 \" +\r\n \t\t\t\t\"Value65.5,Value66\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value72 aaa quoted part 1, then quoted part 2 value,Value73,Value74 \" +\r\n \t\t\t\t\"Value81,Value82 with unclosed quote Value91,Value92 ValueA1,ValueA2 ValueB1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB2,ValueB3\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t}",
"@Test\n public void testOverwriteHoodieProperties() throws IOException {\n URL newProps = this.getClass().getClassLoader().getResource(\"table-config.properties\");\n assertNotNull(newProps, \"New property file must exist\");\n\n CommandResult cr = shell().executeCommand(\"repair overwrite-hoodie-props --new-props-file \" + newProps.getPath());\n assertTrue(cr.isSuccess());\n\n Map<String, String> oldProps = HoodieCLI.getTableMetaClient().getTableConfig().propsMap();\n\n // after overwrite, the stored value in .hoodie is equals to which read from properties.\n Map<String, String> result = HoodieTableMetaClient.reload(HoodieCLI.getTableMetaClient()).getTableConfig().propsMap();\n Properties expectProps = new Properties();\n expectProps.load(new FileInputStream(new File(newProps.getPath())));\n\n Map<String, String> expected = expectProps.entrySet().stream()\n .collect(Collectors.toMap(e -> String.valueOf(e.getKey()), e -> String.valueOf(e.getValue())));\n assertEquals(expected, result);\n\n // check result\n List<String> allPropsStr = Arrays.asList(\"hoodie.table.name\", \"hoodie.table.type\", \"hoodie.table.version\",\n \"hoodie.archivelog.folder\", \"hoodie.timeline.layout.version\");\n String[][] rows = allPropsStr.stream().sorted().map(key -> new String[]{key,\n oldProps.getOrDefault(key, \"null\"), result.getOrDefault(key, \"null\")})\n .toArray(String[][]::new);\n String expect = HoodiePrintHelper.print(new String[] {HoodieTableHeaderFields.HEADER_HOODIE_PROPERTY,\n HoodieTableHeaderFields.HEADER_OLD_VALUE, HoodieTableHeaderFields.HEADER_NEW_VALUE}, rows);\n expect = removeNonWordAndStripSpace(expect);\n String got = removeNonWordAndStripSpace(cr.getResult().toString());\n assertEquals(expect, got);\n }",
"@Test(timeout = 4000)\n public void test080() throws Throwable {\n String string0 = SQLUtil.normalize(\"SELECT * FROM \", true);\n assertEquals(\"SELECT * FROM\", string0);\n }",
"@Test\n public void testORMUsageToretrieveTbsPatternSavedEntity() throws DataloadGeneratorException {\n List<TbsPatternSavedTEntity> tbsPatternSavedTEntities = getTbsPatternSavedTEntityList(TBS_SELF_SOLUTION);\n\n for(TbsPatternSavedTEntity tbsPatternSavedTEntity : tbsPatternSavedTEntities){\n if(\"td_admin\".equalsIgnoreCase(tbsPatternSavedTEntity.getOperator()))\n System.out.println(\"Operator : \" + tbsPatternSavedTEntity.getOperator() +\" -- Dataload Name\" +tbsPatternSavedTEntity.getSegment() + \"Intermediate File : \" + tbsPatternSavedTEntity.getIntermediateXml());\n }\n assertNotNull(tbsPatternSavedTEntities);\n }",
"@Test(timeout = 4000)\n public void test037() throws Throwable {\n DBUtil.checkReadOnly(\"SELECT pronae,oid FROM pg_roc WHEE \", false);\n }",
"public void checkNLFOJoin() {\n\n String extractedVar = \"\";\n String currQuery = \"\";\n List<Integer> sourceQueries = null;\n List<String> tmpTP = null;\n List<String> extractedVals = null;\n\n for (List<String> key : mapCTPtoQuerySrc.keySet()) {\n\n sourceQueries = mapCTPtoQuerySrc.get(key);\n\n for (int i = 0; i < sourceQueries.size(); i++) {\n\n currQuery = queries.get(sourceQueries.get(i));\n\n //Buuuuuuuuuuuuuug\n if (currQuery.contains(\"mass\")) {\n continue;\n }\n\n if (currQuery.contains(\"filter\") || currQuery.contains(\"FILTER\")) {\n\n extractedVals = myBasUtils.getFILTERvals(currQuery);\n extractedVar = myBasUtils.getFILTERvar(currQuery);\n\n if (extractedVals.size() >= 1) {\n\n if (key.get(0).equalsIgnoreCase(extractedVar) || key.get(2).equalsIgnoreCase(extractedVar)) {\n\n tmpTP = myDedUtils.getCleanTP(key);\n tmpTP.add(extractedVar);\n myBasUtils.insertToMap4(mapDTPtoAnsInverseMap, tmpTP, extractedVals);\n }\n }\n\n }\n\n }\n }\n\n }",
"@Given(\"^Users enter the details without columns$\")\n\tpublic void users_enter_the_details_without_columns(DataTable arg1) throws Throwable {\n\t \n\t\tList<List<String>> li = arg1.asLists(String.class);\n\t \n\t\tfor(List<String> l : li) {\n\t\t\tSystem.out.println(l.get(1));\n\t\t\tSystem.out.println(li.get(1));\n\t}\n\t \n\t}",
"@Test(timeout = 4000)\n public void test33() throws Throwable {\n String[] stringArray0 = new String[2];\n stringArray0[1] = \"create maDterialized\";\n String string0 = SQLUtil.renderColumnListWithTableName(\"create maDterialized\", stringArray0);\n assertEquals(\"create maDterialized.null, create maDterialized.create maDterialized\", string0);\n }",
"public void testSalesmanWithoutSales()\n {\n try {\n SalesFile t = new SalesFile(\"samples/data/in/base_3.dat\", AppConfig.fieldDelimiter);\n t.read();\n assertEquals(t.getTotalSalesman(), 3);\n assertEquals(t.getTotalCustomers(), 4);\n assertEquals(t.getMostExpensiveSaleId(), \"08\");\n assertEquals(t.getWorstSalesman(), \"Alex\");\n } catch(RecordInvalidTokenException ex) {\n assertTrue(\"This file is well formed, but something is wrong!\", false);\n } catch(FileNotFoundException e) {\n assertTrue(\"File must exist to complete the test!\", false);\n } catch(IOException e) {\n assertTrue(\"IO exception!\", false);\n }\n }",
"@Ignore(\"test in testPGNT0102002, testPGNT0101001, testPGNT0101002\")\n public void testDAM30507001() {\n }",
"public void testStripReadOnlyKeepTextImageAndTable() {\n String fileName = \"write_enable_text_table_image.docx\";\n String fileInput = inputDirectory + \"write_enable_text_table_image.docx\";\n String expectedResult = expectedDirectory + fileName;\n ZipFile zipFileSource1;\n try {\n zipFileSource1 = new ZipFile(fileInput);\n Package packSource1 = Package.open(zipFileSource1, PackageAccess.ReadWrite);\n WordDocument docxSource1 = new WordDocument(packSource1);\n docxSource1.stripReadOnlyPartOfDocument();\n File destFile = new File(outputDirectory + fileName);\n assertTrue(docxSource1.save(destFile));\n OpenXmlAssert.assertEquals(new File(outputDirectory + fileName), new File(expectedResult));\n } catch (IOException e) {\n logger.error(e);\n fail(\"cannot open:\" + fileInput);\n } catch (OpenXML4JException e) {\n logger.error(e);\n fail(\"failed\" + e.getMessage());\n }\n }",
"@org.junit.jupiter.api.Test\n void drop2ColisionesSeparados() {\n String key = \"0\";\n String value =\"David\";\n String key2 = \"11\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n hashTable.put(\"22\",\"hola\");\n\n hashTable.drop(\"0\");\n hashTable.drop(\"22\");\n\n String esperado =\"bucket[0] = [11, ferrero]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n\n }",
"private void removeRedundantGreyTable()\r\n \t{\r\n \t\tdeleteNodes(XPath.GREY_TABLE.query);\r\n \t}",
"@org.junit.jupiter.api.Test\n void drop2ColisionesJuntos() {\n String key = \"0\";\n String value =\"David\";\n String key2 = \"11\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n hashTable.put(\"22\",\"hola\");\n\n hashTable.drop(\"0\");\n hashTable.drop(\"11\");\n\n String esperado =\"bucket[0] = [22, hola]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n\n }",
"@Test(timeout = 4000)\n public void test67() throws Throwable {\n String string0 = SQLUtil.normalize(\"--\", false);\n assertEquals(\"--\", string0);\n }",
"@Test\r\n \tpublic void testQualifiedValues2() {\n \t\t\r\n \t\tParameters params = (Parameters) filter.getParameters();\r\n \t\tparams.detectColumnsMode = Parameters.DETECT_COLUMNS_NONE;\r\n \t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.NONE; // !!!\r\n \t\tparams.removeQualifiers = false;\r\n \t\t\r\n //\t\tparams.valuesStartLineNum = 9;\r\n //\t\tparams.sendHeaderMode = 0;\r\n \r\n \t\t\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value12\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value22.1,Value22.2, Value22.3\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value34.1\\nValue34.2\\nValue34.3\\nValue34.4,Value34.5\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value44.1\\nValue44.2\\nValue44.3\\nValue44.4\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value45.1,Value45.2\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value54.1\\nValue54.2\\nValue54.3\\nValue54.4,\\\"Value55.1,Value55.2\\nValue55.3,Value55.4\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n //\t\t// Line 15\r\n //\t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"Value54.2\");\r\n //\t\ttestEvent(EventType.END_GROUP, null);\r\n //\t\t\r\n //\t\t// Line 16\r\n //\t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"Value54.3\");\r\n //\t\ttestEvent(EventType.END_GROUP, null);\r\n //\t\t\r\n //\t\t// Line 17-18\r\n //\t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"Value54.4\");\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value55.1,Value55.2\\nValue55.3,Value55.4\\\"\");\r\n //\t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value64.1\\nValue64.2\\nValue64.3\\nValue64.4,\\\"Value65.1,Value65.2\\nValue65.3,Value65.4\\n\" +\r\n \t\t\t\t\"Value65.5,\\\"Value66\\\"\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value72 \\\"aaa \\\"quoted part 1\\\", then \\\"\\\"quoted part 2\\\" value\\\",Value73\\\",Value74\\n\" +\r\n \t\t\t\t\"Value81,\\\"Value82 with unclosed quote\\nValue91,Value92\\n\\\"ValueA1\\\",ValueA2\\\"\\nValueB1\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value\\\"B2,Va\\\"lueB3\\\"\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Va\\\"lueB4\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t\t\r\n \t\t\r\n \t\t// Unwrap lines\r\n \t\tinput = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.SPACES; // !!!\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value12\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value22.1,Value22.2, Value22.3\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value34.1 Value34.2 Value34.3 Value34.4,Value34.5\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value44.1 Value44.2 Value44.3 Value44.4\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value45.1,Value45.2\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value54.1 Value54.2 Value54.3 Value54.4,\\\"Value55.1,Value55.2 Value55.3,Value55.4\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value64.1 Value64.2 Value64.3 Value64.4,\\\"Value65.1,Value65.2 Value65.3,Value65.4 \" +\r\n \t\t\t\t\"Value65.5,\\\"Value66\\\"\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value72 \\\"aaa \\\"quoted part 1\\\", then \\\"\\\"quoted part 2\\\" value\\\",Value73\\\",Value74 \" +\r\n \t\t\t\t\"Value81,\\\"Value82 with unclosed quote Value91,Value92 \\\"ValueA1\\\",ValueA2\\\" ValueB1\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value\\\"B2,Va\\\"lueB3\\\"\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Va\\\"lueB4\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t\t\r\n \t\t\r\n \t}",
"@Test(timeout = 4000)\n public void test137() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[0];\n String string0 = SQLUtil.renderQuery(defaultDBTable0, stringArray0, stringArray0);\n assertEquals(\"SELECT * FROM null WHERE \", string0);\n }",
"@Test(timeout = 4000)\n public void test097() throws Throwable {\n String[] stringArray0 = new String[1];\n String string0 = SQLUtil.join((String) null, \"\", stringArray0, \"org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet\", \":\", stringArray0);\n assertEquals(\"org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet as : on .null = :.null\", string0);\n }",
"public void extractRowFromTable()\n\t{\n\t\tList<WebElement> rowvalues= filterRows(table, the(\"Email\", endsWith(\"yahoo.com\")));\n\t\tfor(WebElement e: rowvalues)\n\t\t{\n\t\t\tSystem.out.println(e.getText());\n\t\t}\n\n\t}",
"@Test(timeout = 4000)\n public void test25() throws Throwable {\n PipedReader pipedReader0 = new PipedReader();\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n streamTokenizer0.nval = 2997.043981265;\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n streamTokenizer0.whitespaceChars((-4305), 4228);\n // Undeclared exception!\n try { \n SQLUtil.join((String) null, (String) null, (String[]) null, (String) null, (String) null, (String[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(priority = 6, description = \"To verify Vendors for LPAD\")\n\tpublic void VerifyvendorsinTable() throws Exception {\n\t\tdata = new TPSEE_Syndication_Status_Page(CurrentState.getDriver());\n\t\tExcelHandler wb = new ExcelHandler(\"./data/Filter.xlsx\", \"Syndication\");\n\t\twb.deleteEmptyRows();\n\t\tString LocNum = wb.getCellValue(1, wb.seacrh_pattern(\"Location Number\", 0).get(0).intValue());\n\t\tSystem.out.println(\"The Location Number is\" + LocNum);\n\t\tVendorList = data.getLocationDetailsLPAD(LocNum);\n\t\taddEvidence(CurrentState.getDriver(), \"To Verify Vendor List\", \"yes\");\n\t}",
"@Test\n public void shouldNotJoinOnTableUpdates() {\n pushToStream(2, \"X\");\n processor.checkAndClearProcessResult(EMPTY);\n\n // push two items to the table. this should not produce any item.\n pushToTable(2, \"Y\");\n processor.checkAndClearProcessResult(EMPTY);\n\n // push all four items to the primary stream. this should produce two items.\n pushToStream(4, \"X\");\n processor.checkAndClearProcessResult(new KeyValueTimestamp<>(0, \"X0+Y0\", 0),\n new KeyValueTimestamp<>(1, \"X1+Y1\", 1));\n\n // push all items to the table. this should not produce any item\n pushToTable(4, \"YY\");\n processor.checkAndClearProcessResult(EMPTY);\n\n // push all four items to the primary stream. this should produce four items.\n pushToStream(4, \"X\");\n processor.checkAndClearProcessResult(new KeyValueTimestamp<>(0, \"X0+YY0\", 0),\n new KeyValueTimestamp<>(1, \"X1+YY1\", 1),\n new KeyValueTimestamp<>(2, \"X2+YY2\", 2),\n new KeyValueTimestamp<>(3, \"X3+YY3\", 3));\n\n // push all items to the table. this should not produce any item\n pushToTable(4, \"YYY\");\n processor.checkAndClearProcessResult(EMPTY);\n }",
"@Test(timeout = 4000)\n public void test005() throws Throwable {\n SimpleResultSet simpleResultSet0 = new SimpleResultSet();\n Object[] objectArray0 = DBUtil.parseResultRow(simpleResultSet0);\n assertEquals(0, objectArray0.length);\n }",
"@TestFactory\n Stream<DynamicTest> testStreamFactoryTableDataTest() {\n List<String[]> testData = Arrays.stream(new Object[][]{\n {\"Col 1, Row 1\", \"Col 2, Row 1\", dummyFruits.get(1).getType().toString()},\n {\"Col 1, Row 2\", \"Col 2, Row 2\", dummyFruits.get(2).getType().toString()}\n })\n .map(objects -> Arrays.stream(objects).map(Object::toString).toArray(String[]::new))\n .collect(Collectors.toList());\n\n return testData.stream()\n .map(strings -> DynamicTest.dynamicTest(testData.toString(), () -> Assertions.assertNotNull(testData)));\n }",
"@org.junit.jupiter.api.Test\n void dropColision1() {\n String key = \"0\";\n String value =\"David\";\n String key2 = \"11\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n hashTable.put(\"22\",\"hola\");\n hashTable.drop(\"0\");\n String esperado =\"bucket[0] = [11, ferrero]\\n\" + \" -> [22, hola]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n int count = 2;\n Assertions.assertEquals(count,hashTable.count());\n }",
"@Test\n public void testCopyTileTable() throws SQLException, IOException {\n AlterTableUtils.testCopyTileTable(activity, geoPackage);\n }",
"public void testOneTable() {\n\n String\tsql\t= \"SELECT AD_Table_ID, TableName FROM AD_Table WHERE IsActive='Y'\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Table|0]\", fixture.toString());\n }",
"public static boolean testPokemonTableGetAll() throws IOException {\r\n PokemonTable inst = new PokemonTable(10);\r\n for (Pokemon item : testList) {\r\n inst.put(item.getName(), item);\r\n }\r\n LinkedList<Pokemon> list = inst.getAll();\r\n if (list.size() != 6)\r\n return false;\r\n for (Pokemon item : testList) {\r\n if (!list.contains(item)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"@Test\n public void testFillInDataToTemplate() throws IOException {\n List<List<Object>> rows = new ArrayList<List<Object>>();\n\n List<String> communeStrs = Arrays.asList(\"Aclens\", \"Allaman\", \"Aubonne\", \"Apples\", \"Bière\", \"Bremblens\",\n \"Bougy-Villars\", \"Berolle\", \"Chevilly\");\n List<String> typeStrs = Arrays.asList(\"Résidence Secondaire\", \"Location\", \"Hotel\", \"Chambre\", \"Camping\",\n \"Institut\");\n\n for (int i = 0; i < 25; i++) {\n List<Object> row = new ArrayList<Object>();\n row.add(new Long(900000L + i));\n row.add(i + 1);\n row.add(communeStrs.get(i % communeStrs.size()));\n row.add(typeStrs.get(i % typeStrs.size()));\n row.add(new Long(25000L * i));\n row.add(BooleanUtils.toBoolean(i % 2));\n row.add(new Date());\n row.add(DateUtils.addDays(new Date(), i + 1));\n row.add(String.format(\"%d piéces ou moins\", i + 1));\n row.add(i + 1);\n row.add((i % 7 == 0 ? i : null));\n row.add((i % 7 == 1 ? i : null));\n row.add((i % 7 == 2 ? i : null));\n row.add((i % 7 == 3 ? i : null));\n row.add((i % 7 == 4 ? i : null));\n row.add((i % 7 == 5 ? i : null));\n row.add((i % 7 == 6 ? i : null));\n row.add(10 * i);\n row.add(200 * i);\n row.add(25 * i);\n row.add(i % 5 + 1);\n row.add(i % 6 + 1);\n row.add(BigDecimal.ZERO);\n row.add(1500 * (i + 1));\n row.add(null);\n\n rows.add(row);\n }\n\n SheetDataDto sheet1 = ExcelExportingUtil.convert2DListToSheetDto(rows, false);\n sheet1.setName(\"Data\");\n sheet1.setOverriden(true);\n // re-assign the index of the rows in the sheet to fill in the template: ignore the first two rows\n for (int i = 2; i < 2 + sheet1.getRows().size(); i++) {\n RowDataDto row = sheet1.getRows().get(i - 2);\n row.setRowNum(i);\n for (int j = 0; j < row.getCells().size(); j++) {\n CellDataDto cell = row.getCells().get(j);\n cell.setCellNum(j);\n }\n }\n\n // specify the format for col 7 and 8 (0-based)\n for (int i = 0; i < sheet1.getRows().size(); i++) {\n switch (i) {\n case 7:\n CellFormatter formatter = new CellFormatter(\"dd-MMM-yyyy\");\n formatter.setAlignment(CellStyle.ALIGN_CENTER);\n sheet1.getFormatters().add(formatter);\n break;\n\n case 8:\n CellFormatter formatter1 = new CellFormatter();\n formatter1.setWrapText(false);\n sheet1.getFormatters().add(formatter1);\n break;\n\n default:\n sheet1.getFormatters().add(null);\n break;\n }\n }\n\n InputStream input = getClass().getResourceAsStream(\"/exportData/Statistics_v0.1.xls\");\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n excelExportingService.exportToExcel(input, out, Arrays.asList(sheet1), ExcelFormatTypeEnum.XLS);\n\n FileUtils.writeByteArrayToFile(new File(\"output-template.xls\"), out.toByteArray());\n }",
"@Test(timeout = 4000)\n public void test104() throws Throwable {\n String[] stringArray0 = new String[8];\n String string0 = SQLUtil.join(\"\", (String) null, stringArray0, \"WITE\", \"verifyOldKey.dat\", stringArray0);\n assertEquals(\"WITE as verifyOldKey.dat on null.null = verifyOldKey.dat.null and null.null = verifyOldKey.dat.null and null.null = verifyOldKey.dat.null and null.null = verifyOldKey.dat.null and null.null = verifyOldKey.dat.null and null.null = verifyOldKey.dat.null and null.null = verifyOldKey.dat.null and null.null = verifyOldKey.dat.null\", string0);\n }",
"@Test public void testWithSingleHouseDataSet() throws IOException\n {\n final File inDir = tempDir.toFile();\n final File outDir = tempDir.toFile();\n // Copy HDD file.\n try(final Reader r = DDNExtractorTest.getETVEGLLHDD2016H1CSVReader())\n {\n try(final FileWriter w = new FileWriter(new File(inDir, ETVSimpleDriverNBulkInputs.INPUT_FILE_HDD)))\n { cpReaderToWriter(r, w); }\n }\n // Copy sample household data file.\n try(final Reader r = ETVParseTest.getNBulkSH2016H1CSVReader())\n {\n try(final FileWriter w = new FileWriter(new File(inDir, ETVSimpleDriverNBulkInputs.INPUT_FILE_NKWH)))\n { cpReaderToWriter(r, w); }\n }\n // Ensure no old result files hanging around...\n final File basicResultFile = new File(outDir, ETVSimpleDriverNBulkInputs.OUTPUT_STATS_FILE_BASIC);\n basicResultFile.delete(); // Make sure no output file.\n assertFalse(\"output file should not yet exist\", basicResultFile.isFile());\n final File basicFilteredResultFile = new File(outDir, ETVSimpleDriverNBulkInputs.OUTPUT_STATS_FILE_FILTERED_BASIC);\n basicFilteredResultFile.delete(); // Make sure no output file.\n assertFalse(\"output filtered file should not yet exist\", basicFilteredResultFile.isFile());\n // Do the computation...\n ETVSimpleDriverNBulkInputs.doComputation(inDir, outDir);\n // Check results.\n assertTrue(\"output file should now exist\", basicResultFile.isFile());\n assertTrue(\"output filtered file should now exist\", basicFilteredResultFile.isFile());\n final String expected =\n \"\\\"house ID\\\",\\\"slope energy/HDD\\\",\\\"baseload energy\\\",\\\"R^2\\\",\\\"n\\\",\\\"efficiency gain if computed\\\"\\n\" +\n \"\\\"5013\\\",1.5532478,1.3065631,0.62608224,156,\\n\";\n final String actualBasic = new String(Files.readAllBytes(basicResultFile.toPath()), \"ASCII7\");\n assertEquals(expected, actualBasic);\n final String actualFilteredBasic = new String(Files.readAllBytes(basicFilteredResultFile.toPath()), \"ASCII7\");\n assertEquals(expected, actualFilteredBasic);\n }",
"protected void processTableMissDrop(boolean install, int table, String description) {\n TrafficSelector.Builder selector = DefaultTrafficSelector.builder();\n\n TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder();\n treatment.drop();\n\n FlowRule rule = DefaultFlowRule.builder()\n .forDevice(deviceId)\n .withSelector(selector.build())\n .withTreatment(treatment.build())\n .withPriority(DROP_PRIORITY)\n .fromApp(appId)\n .makePermanent()\n .forTable(table).build();\n\n processFlowRule(install, rule, description);\n }",
"private boolean excludeTable(String tableName) {\n\t\tif (tableName.trim().startsWith(\"~TMP\"))\n\t\t\treturn true;\n\t\tif (tableName.contains(\"_Conflict\"))\n\t\t\treturn true;\n\t\tif (tableName.equals(\"Switchboard Items\"))\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"@Test\n public void testAudiTrailBadtOperId() {\n new AuditTrailFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissAuditTrail.Builder::setBadtOperId,\n RdaFissAuditTrail::getBadtOperId,\n RdaFissAuditTrail.Fields.badtOperId,\n 9);\n }",
"@Test(timeout = 4000)\n public void test008() throws Throwable {\n String string0 = SQLUtil.removeComments(\"!}1w/G=6\");\n assertEquals(\"!}1w/G=6\", string0);\n }",
"@org.junit.jupiter.api.Test\n void dropColision2() {\n String key = \"0\";\n String value =\"David\";\n String key2 = \"11\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n hashTable.put(\"22\",\"hola\");\n hashTable.drop(\"11\");\n String esperado =\"bucket[0] = [0, David]\\n\" + \" -> [22, hola]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n int count = 2;\n Assertions.assertEquals(count,hashTable.count());\n }",
"@org.junit.jupiter.api.Test\n void drop1elementoColisionNoExiste() {\n String key = \"0\";\n String value =\"David\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.drop(\"11\");\n String esperado = \"bucket[0] = [0, David]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n int count = 1;\n Assertions.assertEquals(count,hashTable.count());\n }",
"@Before\n public void setUp() {\n table = new Table();\n ArrayList<Column> col = new ArrayList<Column>();\n col.add(new NumberColumn(\"numbers\"));\n\n table.add(new Record(col, new Value[] {new NumberValue(11)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n table.add(new Record(col, new Value[] {new NumberValue(22)}));\n table.add(new Record(col, new Value[] {new NumberValue(28)}));\n table.add(new Record(col, new Value[] {new NumberValue(44)}));\n table.add(new Record(col, new Value[] {new NumberValue(23)}));\n table.add(new Record(col, new Value[] {new NumberValue(46)}));\n table.add(new Record(col, new Value[] {new NumberValue(56)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NullValue()}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(34)}));\n table.add(new Record(col, new Value[] {new NumberValue(5)}));\n table.add(new Record(col, new Value[] {new NumberValue(123)}));\n table.add(new Record(col, new Value[] {new NumberValue(48)}));\n table.add(new Record(col, new Value[] {new NumberValue(50)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n }",
"public static void main(String[] args) {\n List<String> truth = printTruthTable(5);\n List<String> listZer = new ArrayList<>();\n List<String> listOne = new ArrayList<>();\n for(int i=0;i<truth.size();i++){\n if(truth.get(i).charAt(0)=='1'){\n listOne.add(truth.get(i));\n }else {\n listZer.add(truth.get(i));\n }\n }\n String function = generate(32);\n shuffles(Arrays.asList(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15),listZer,listOne,function) // todo here your shuffling\n .filter(StreamExample::checkSys) // todo here should be your check for sac for every column of table\n .findFirst() // stream termination; here we retrieve the first matching element and won't calculate all stream\n .ifPresent(System.out::println);\n }",
"@Test\r\n public void testTransferMetalInfo() {\r\n System.out.println(\"transferMetalInfo - Table have records\");\r\n List<Vector> result = KnowledgeSystemBeanInterface.transferMetalInfo();\r\n assertEquals(result.size(), 15);\r\n System.out.println(\"testTransferMetalInfo ---------------------------------------------------- Done\");\r\n }",
"@Test\n public void retriveAllTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n List<Servizio> lista = manager.retriveAll();\n assertEquals(7,lista.size(),\"It should return a list of length 7\");\n }",
"@Test(timeout = 4000)\n public void test075() throws Throwable {\n SimpleResultSet simpleResultSet0 = new SimpleResultSet();\n Object[] objectArray0 = DBUtil.nextLine(simpleResultSet0);\n assertNull(objectArray0);\n }",
"@Test(timeout = 4000)\n public void test034() throws Throwable {\n String[] stringArray0 = new String[18];\n String string0 = SQLUtil.renderColumnListWithTableName(\"null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null\", stringArray0);\n // Undeclared exception!\n SQLUtil.mutatesStructure(string0);\n }",
"public static boolean dropTable(String tableName){\n try{\n String[] properties;\n switch(tableName){\n case \"Chofer\":\n properties = Chofer.properties;\n break;\n case \"Dueño\":\n properties = Dueño.properties;\n break;\n case \"Taxi\":\n properties = Taxi.properties;\n break;\n default:\n throw new IOException(\"Invalid table name\");\n }\n String header = \"\";\n for(String p : properties){\n header += p+\",\";\n }\n header = header.substring(0, header.length()-1);\n File table = new File(tableName+\"Data.csv\");\n FileWriter tableWriter = new FileWriter(table);\n tableWriter.write(header+\"\\n\");\n tableWriter.close();\n return true;\n }catch(IOException e){\n e.printStackTrace();\n return false;\n }\n }",
"@Test(timeout = 4000)\n public void test42() throws Throwable {\n String string0 = SQLUtil.normalize(\"S\\\"oRi-d%o\", false);\n assertEquals(\"S \\\"oRi-d%o\\\"\", string0);\n }",
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n String string0 = SQLUtil.normalize(\"selectfwx.wrsyj>:+f-&9\", false);\n assertEquals(\"selectfwx.wrsyj > : + f - & 9\", string0);\n \n Random.setNextRandom(818);\n Random.setNextRandom(818);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBDataType dBDataType0 = DBDataType.getInstance(818, \" NULL\");\n Integer integer0 = RawTransaction.LOCK_ESCALATE;\n DefaultDBColumn defaultDBColumn0 = new DefaultDBColumn(\"}qis;\", defaultDBTable0, dBDataType0, integer0, integer0);\n String string1 = SQLUtil.renderColumn(defaultDBColumn0);\n assertEquals(\"}qis; NULL(3,3) NULL\", string1);\n }",
"public static boolean testTableRemove(int size) {\r\n for (int i = 0; i < 6; i++) {\r\n if (table.remove(testList[i].getName()) == null)\r\n return false;\r\n if (table.size() != size - 1 - i) {\r\n return false;\r\n }\r\n try {\r\n table.get(testList[i].getName());\r\n } catch (NoSuchElementException e) {\r\n continue;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }",
"@Test\r\n\t\t\tpublic void testDosFilasDespuesDeQuinta() {\n\t\t\t\tList<WebElement> tabla= driver.findElement(By.xpath(\"//table[@id='customers']\")).findElements(By.xpath(\".//tr[position() >5]\"));\r\n\t\t\t\tSystem.out.println(tabla.size());\t\r\n\t\t\t\tassertEquals(tabla.size(),2);\r\n\t\t\t}",
"@org.junit.jupiter.api.Test\n void dropColision3() {\n String key = \"0\";\n String value =\"David\";\n String key2 = \"11\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n hashTable.put(\"22\",\"hola\");\n hashTable.drop(\"22\");\n String esperado =\"bucket[0] = [0, David]\\n\" + \" -> [11, ferrero]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n int count = 2;\n Assertions.assertEquals(count,hashTable.count());\n }",
"@Test(timeout = 4000)\n public void test71() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n TableContainer tableContainer0 = new TableContainer(\"-KwE,kZ\");\n DefaultDBTable defaultDBTable1 = new DefaultDBTable();\n DBDataType.getInstance((-1717986917), \"%~-1t&Ncqx{&'OP~@\");\n tableContainer0.getSchema();\n Integer integer0 = RawTransaction.SAVEPOINT_ROLLBACK;\n Integer integer1 = RawTransaction.LOCK_ESCALATE;\n SQLUtil.removeComments(\"/**/\");\n System.setCurrentTimeMillis(1722L);\n // Undeclared exception!\n try { \n SQLUtil.normalize((String) null, false);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.io.StringReader\", e);\n }\n }",
"@Test\n public void testTableDependencies() throws Exception {\n Table table = database.findTableByName(\"programs_with_twitter_tags\");\n assertDependentTables(table, \"programs\", \"broadcasts\", \"clusters\");\n }",
"@Test(priority = 10, description = \"To verify Status of Vendor HERE\")\n\tpublic void VerifyvendorsStatusinTableDTCVendorHERE() throws Exception {\n\t\tdata = new TPSEE_Syndication_Status_Page(CurrentState.getDriver());\n\t\tExcelHandler wb = new ExcelHandler(\"./data/Filter.xlsx\", \"Syndication\");\n\t\twb.deleteEmptyRows();\n\t\tString LocNum = wb.getCellValue(3, wb.seacrh_pattern(\"Location Number\", 0).get(0).intValue());\n\t\tSystem.out.println(\"The Location Number is :\" + LocNum);\n\t\tString Vendor = wb.getCellValue(3, wb.seacrh_pattern(\"Vendor\", 0).get(0).intValue());\n\t\tSystem.out.println(\"The Location Number is :\" + Vendor);\n\t\tdata.getLocationDetailsDTCVendors(LocNum, Vendor);\n\t\taddEvidence(CurrentState.getDriver(), \"To Verify Status of Vendors of DTC\", \"yes\");\n\t}",
"@Test(timeout = 4000)\n public void test69() throws Throwable {\n PipedReader pipedReader0 = new PipedReader();\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n streamTokenizer0.nval = (-2200.896);\n SQLUtil.renderNumber(streamTokenizer0);\n DBCatalog dBCatalog0 = new DBCatalog(\"TVsUO&^)F[AT_z+%R#\");\n assertNull(dBCatalog0.getDoc());\n }",
"@Test(timeout = 4000)\n public void test41() throws Throwable {\n String string0 = SQLUtil.normalize(\"updat,ObjWct(\", false);\n assertEquals(\"updat, ObjWct (\", string0);\n }",
"@Test(timeout = 4000)\n public void test326() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n errorPage0.a();\n Table table0 = new Table(errorPage0, (String) null);\n assertTrue(table0._isGeneratedId());\n \n table0.id(\"faTn+C~BG'z'N~LP\");\n assertFalse(table0._isGeneratedId());\n }",
"@Test\n\tpublic void test8() {\n\t\tString statement = \"delete from omar;\";\n\t\tExtractor extractor = new DeleteExtractor(statement);\n\t\tassertTrue(extractor.isValid());\n\t\tassertNull(extractor.getColumnsNames());\n\t}",
"@Test(timeout = 4000)\n public void test06() throws Throwable {\n String string0 = SQLUtil.normalize(\"T/ayt.^*^>$)r\", false);\n assertEquals(\"T / ayt.^ * ^ > $) r\", string0);\n }",
"@Test(timeout = 4000)\n public void test084() throws Throwable {\n PipedReader pipedReader0 = new PipedReader();\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n String string0 = SQLUtil.renderNumber(streamTokenizer0);\n assertEquals(\"- 0\", string0);\n }",
"@Test(timeout = 4000)\n public void test04() throws Throwable {\n String string0 = SQLUtil.normalize(\"b}v&-;$$:Hw1:\", false);\n assertEquals(\"b } v & - ; $ $ : Hw1 :\", string0);\n }",
"@Test\n\tpublic void TC630DaADL_05(){\n\t\tresult.addLog(\"ID : TC630DaADL_05 : Verify that the apps & devices table contains 'Company', 'Brand', 'Product Name', 'Type' and 'Published' columns.\");\n\t\t/*\n\t\t \t1. Navigate to DTS portal\n\t\t\t2. Log into DTS portal as a DTS user successfully\n\t\t\t3. Navigate to \"Apps & Devices\" page\n\t\t */\n\t\t// 3. Navigate to \"Apps & Devices\" page\n\t\thome.click(Xpath.LINK_APP_DEVICES);\n\t\t// VP: The TC630Da Apps & Devices List is displayed\n\t\tresult = home.existsElement(DeviceList.getListXpath());\n\t\tAssert.assertEquals(\"Pass\", result.getResult());\n\t\t/*\n\t\t * The 630Da Apps & Devices List is displayed and the apps & devices table contains \n\t\t * \"Company\", \"Brand\", \"Product Name\", \"Type\" and \"Published\" columns.\n\t\t */\n\t\tArrayList<String> list = home.getHeadColumByXpath(DeviceList.THEAD);\n\t\tAssert.assertTrue(DTSUtil.containsAll(list, DeviceList.theads));\n\t}",
"@Test\n void testVariableUNFs() throws IOException, UnfException {\n long expectedNumberOfVariables = 13L;\n long expectedNumberOfCases = 24L; // aka the number of lines in the TAB file produced by the ingest plugin\n\n String[] expectedUNFs = {\n \"UNF:6:wb7OATtNC/leh1sOP5IGDQ==\",\n \"UNF:6:0V3xQ3ea56rzKwvGt9KBCA==\",\n \"UNF:6:0V3xQ3ea56rzKwvGt9KBCA==\",\n \"UNF:6:H9inAvq5eiIHW6lpqjjKhQ==\",\n \"UNF:6:Bh0M6QvunZwW1VoTyioRCQ==\",\n \"UNF:6:o5VTaEYz+0Kudf6hQEEupQ==\",\n \"UNF:6:eJRvbDJkIeDPrfN2dYpRfA==\",\n \"UNF:6:JD1wrtM12E7evrJJ3bRFGA==\",\n \"UNF:6:xUKbK9hb5o0nL5/mYiy7Bw==\",\n \"UNF:6:Mvq3BrdzoNhjndMiVr92Ww==\",\n \"UNF:6:KkHM6Qlyv3QlUd+BKqqB3Q==\",\n \"UNF:6:EWUVuyXKSpyllsrjHnheig==\",\n \"UNF:6:ri9JsRJxM2xpWSIq17oWNw==\"\n };\n\n TabularDataIngest ingestResult;\n File file = getFile(\"csv/ingest/election_precincts.csv\");\n\n try (BufferedInputStream stream = new BufferedInputStream(new FileInputStream(file))) {\n CSVFileReader instance = createInstance();\n ingestResult = instance.read(Tuple.of(stream, file), null);\n }\n\n File generatedTabFile = ingestResult.getTabDelimitedFile();\n DataTable generatedDataTable = ingestResult.getDataTable();\n\n assertThat(generatedDataTable).isNotNull();\n assertThat(generatedDataTable.getDataVariables()).isNotNull();\n assertThat(generatedDataTable.getVarQuantity()).isEqualTo((long) generatedDataTable.getDataVariables().size());\n assertThat(generatedDataTable.getVarQuantity()).isEqualTo(expectedNumberOfVariables);\n assertThat(generatedDataTable.getCaseQuantity()).isEqualTo(expectedNumberOfCases);\n\n IngestDataProvider dataProvider = new InMemoryIngestDataProvider();\n dataProvider.initialize(generatedDataTable, generatedTabFile);\n\n for (int i = 0; i < expectedNumberOfVariables; i++) {\n String unf = null;\n\n if (generatedDataTable.getDataVariables().get(i).isIntervalContinuous()) {\n Double[] columnVector = dataProvider.getDoubleColumn(i);\n unf = UNFUtil.calculateUNF(columnVector);\n }\n if (generatedDataTable.getDataVariables().get(i).isIntervalDiscrete()\n && generatedDataTable.getDataVariables().get(i).isTypeNumeric()) {\n Long[] columnVector = dataProvider.getLongColumn(i);\n unf = UNFUtil.calculateUNF(columnVector);\n }\n if (generatedDataTable.getDataVariables().get(i).isTypeCharacter()) {\n String[] columnVector = dataProvider.getStringColumn(i);\n String[] dateFormats = null;\n\n // Special handling for Character strings that encode dates and times:\n if (\"time\".equals(generatedDataTable.getDataVariables().get(i).getFormatCategory())\n || \"date\".equals(generatedDataTable.getDataVariables().get(i).getFormatCategory())) {\n\n dateFormats = new String[(int) expectedNumberOfCases];\n for (int j = 0; j < expectedNumberOfCases; j++) {\n dateFormats[j] = generatedDataTable.getDataVariables().get(i).getFormat();\n }\n }\n unf = dateFormats == null ? UNFUtil.calculateUNF(columnVector) : UNFUtil.calculateUNF(columnVector, dateFormats);\n }\n\n assertThat(unf).isEqualTo(expectedUNFs[i]);\n }\n }",
"@Test(timeout = 4000)\n public void test061() throws Throwable {\n DBSchema dBSchema0 = new DBSchema(\"1?o)b59l\");\n List<DBTable> list0 = DBUtil.dependencyOrderedTables(dBSchema0);\n assertTrue(list0.isEmpty());\n }",
"public void testFileWithEmptyLines()\n {\n try {\n SalesFile t = new SalesFile(\"samples/data/in/base_with_empty_lines.dat\", AppConfig.fieldDelimiter);\n t.read();\n assertEquals(t.getTotalSalesman(), 2);\n assertEquals(t.getTotalCustomers(), 2);\n assertEquals(t.getMostExpensiveSaleId(), \"10\");\n assertEquals(t.getWorstSalesman(), \"Renato\");\n } catch(RecordInvalidTokenException ex) {\n assertTrue(\"This file is well formed, but something is wrong!\", false);\n } catch(FileNotFoundException e) {\n assertTrue(\"File must exist to complete the test!\", false);\n } catch(IOException e) {\n assertTrue(\"IO exception!\", false);\n }\n }",
"@Test\n void technicalStatusPerBatchTableTest() throws Exception {\n\n jCtrl.getTrainer2(); // initialize data\n\n // call technicalStatusPerBatchTable() and get returned list\n List<TechnicalStatusPerBatch> result = tspbServ.technicalStatusPerBatchTable(1);\n\n // check if returned list contains TechnicalStatusPerBatch objects\n assertTrue(result.get(0) instanceof TechnicalStatusPerBatch);\n }",
"@Test(priority = 8)\n\tpublic void showAllTrips() throws Exception {\n\t\t\n\t\tdriver = DashboardPage.ViewAllTrip(driver);\n\t\t\n\t\t//ExcelUtils.setCellData(\"PASS\", 8, 1);\n\t}",
"@Test\n public void testPartOnOff() throws Exception {\n QuerySet lQuerySet = this.execute( new TaskKey( 4650, 87424 ) );\n\n Assert.assertEquals( \"Number of retrieved rows\", 2, lQuerySet.getRowCount() );\n Assert.assertTrue( lQuerySet.next() );\n\n testRow( lQuerySet, \"321002203 (ANTI SKD NORM) \", 1, \"1000 - 321002203-UNK / 3282-10-627\",\n \"REPREQ / Unscheduled Failure\", 0, \"4650:87424:2\" );\n Assert.assertTrue( lQuerySet.next() );\n\n testRow( lQuerySet, \"321002203-01 (ADAPTING TACHOMETER) \", 1,\n \"1000 - 321002203-01-A / AH-001\", \"REPREQ / Unscheduled Failure\", 0, \"4650:87424:1\" );\n Assert.assertFalse( lQuerySet.next() );\n }",
"private void testRow( QuerySet aQuerySet, String aPartDescription, int aRemoveQty,\n String aPartSerialOff, String aCondReasonOff, int aWarrentyCoverage,\n String aShedPartKey ) {\n\n Assert.assertEquals( \"part_description\", aPartDescription,\n aQuerySet.getString( \"part_description\" ) );\n Assert.assertEquals( \"removed_quantity\", aRemoveQty, aQuerySet.getInt( \"removed_quantity\" ) );\n\n Assert.assertEquals( \"part_serial_off\", aPartSerialOff,\n aQuerySet.getString( \"part_serial_off\" ) );\n Assert.assertEquals( \"cond_reason_off\", aCondReasonOff,\n aQuerySet.getString( \"cond_reason_off\" ) );\n Assert.assertEquals( \"warranty_coverage\", aWarrentyCoverage,\n aQuerySet.getInt( \"warranty_coverage\" ) );\n Assert.assertEquals( \"sched_part_key\", aShedPartKey,\n aQuerySet.getString( \"sched_part_key\" ) );\n }",
"@Test(priority = 7, description = \"To verify Status of Vendors processed in DTC\")\n\tpublic void VerifyvendorsStatusinTableDTC() throws Exception {\n\t\tdata = new TPSEE_Syndication_Status_Page(CurrentState.getDriver());\n\t\tExcelHandler wb = new ExcelHandler(\"./data/Filter.xlsx\", \"Syndication\");\n\t\twb.deleteEmptyRows();\n\t\tString LocNum = wb.getCellValue(1, wb.seacrh_pattern(\"Location Number\", 0).get(0).intValue());\n\t\tSystem.out.println(\"The Location Number is\" + LocNum);\n\t\tdata.getLocationDetailsDTCManualApi(LocNum);\n\t\taddEvidence(CurrentState.getDriver(), \"To Verify Status of Vendors of DTC\", \"yes\");\n\t}"
] | [
"0.74036264",
"0.55420727",
"0.52053016",
"0.51350474",
"0.5122106",
"0.5057112",
"0.504284",
"0.50372976",
"0.5030378",
"0.5023594",
"0.5019671",
"0.5007644",
"0.49876803",
"0.4984397",
"0.49216363",
"0.48754683",
"0.4862358",
"0.48472846",
"0.48403448",
"0.48175436",
"0.4793857",
"0.47825953",
"0.4779826",
"0.47784072",
"0.47716495",
"0.4770837",
"0.4761934",
"0.47357088",
"0.47349867",
"0.47331038",
"0.47295278",
"0.4727176",
"0.4722713",
"0.47060844",
"0.4694097",
"0.4691036",
"0.46770906",
"0.46765617",
"0.46685582",
"0.4665075",
"0.4655989",
"0.4650899",
"0.4649321",
"0.4649104",
"0.46377635",
"0.46301085",
"0.4614978",
"0.461289",
"0.46111307",
"0.46069556",
"0.4606071",
"0.46037272",
"0.46031022",
"0.45990726",
"0.45950422",
"0.45922706",
"0.4584924",
"0.4578511",
"0.45768136",
"0.45759994",
"0.45754966",
"0.45753127",
"0.45751095",
"0.45729387",
"0.4568852",
"0.45670134",
"0.45648944",
"0.45637777",
"0.45621657",
"0.45617482",
"0.4556953",
"0.45529354",
"0.45506456",
"0.45480806",
"0.45451245",
"0.4542321",
"0.45417157",
"0.4540564",
"0.45377353",
"0.4535304",
"0.45349628",
"0.45349094",
"0.4533966",
"0.45304337",
"0.45245844",
"0.45209622",
"0.4512277",
"0.45102674",
"0.45009702",
"0.45008546",
"0.45004398",
"0.44970584",
"0.44909286",
"0.44844243",
"0.44824198",
"0.4481521",
"0.4480983",
"0.4480403",
"0.4477017",
"0.44744062"
] | 0.6046069 | 1 |
Tests reading from the PowerToolsTOStripNails | @Test
public void testReadRowRelationStripNail() throws SQLException
{
new PowerTool("asdf", 5, 5, "PowerTooldescription", true);
new StripNail("UPC", 5, 5, 3.33, 9);
new PowerToolsToStripNailsMapper(1,2);
ArrayList<Integer> stripNailsRelatedToPowerTools = DatabaseGateway.readRowRelationStripNail(2);
assertTrue(stripNailsRelatedToPowerTools.contains(1));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testReadTtbinFile_String()\n {\n System.out.println(\"TEST: readTtbinFile\");\n String fileName = \"src/test/resources/test.ttbin\";\n TomTomReader instance = TomTomReader.getInstance();\n Activity expResult = null;\n Activity result = instance.readTtbinFile(fileName);\n\n testContentsNonSmoothed(result);\n }",
"@Test\n void testParseTestcaseFrom50Specification(){\n String testcase = \"\\r\\n\" +\n \"/ISk5\\\\2MT382-1000\\r\\n\" +\n \"\\r\\n\" +\n \"1-3:0.2.8(50)\\r\\n\" +\n \"0-0:1.0.0(101209113020W)\\r\\n\" +\n \"0-0:96.1.1(4B384547303034303436333935353037)\\r\\n\" +\n \"1-0:1.8.1(123456.789*kWh)\\r\\n\" +\n \"1-0:1.8.2(123456.789*kWh)\\r\\n\" +\n \"1-0:2.8.1(123456.789*kWh)\\r\\n\" +\n \"1-0:2.8.2(123456.789*kWh)\\r\\n\" +\n \"0-0:96.14.0(0002)\\r\\n\" +\n \"1-0:1.7.0(01.193*kW)\\r\\n\" +\n \"1-0:2.7.0(00.000*kW)\\r\\n\" +\n \"0-0:96.7.21(00004)\\r\\n\" +\n \"0-0:96.7.9(00002)\\r\\n\" +\n \"1-0:99.97.0(2)(0-0:96.7.19)(101208152415W)(0000000240*s)(101208151004W)(0000000301*s)\\r\\n\" +\n \"1-0:32.32.0(00002)\\r\\n\" +\n \"1-0:52.32.0(00001)\\r\\n\" +\n \"1-0:72.32.0(00000)\\r\\n\" +\n \"1-0:32.36.0(00000)\\r\\n\" +\n \"1-0:52.36.0(00003)\\r\\n\" +\n \"1-0:72.36.0(00000)\\r\\n\" +\n \"0-0:96.13.0(303132333435363738393A3B3C3D3E3F303132333435363738393A3B3C3D3E3F30313233343536373839\" +\n \"3A3B3C3D3E3F303132333435363738393A3B3C3D3E3F303132333435363738393A3B3C3D3E3F)\\r\\n\" +\n \"1-0:32.7.0(220.1*V)\\r\\n\" +\n \"1-0:52.7.0(220.2*V)\\r\\n\" +\n \"1-0:72.7.0(220.3*V)\\r\\n\" +\n \"1-0:31.7.0(001*A)\\r\\n\" +\n \"1-0:51.7.0(002*A)\\r\\n\" +\n \"1-0:71.7.0(003*A)\\r\\n\" +\n \"1-0:21.7.0(01.111*kW)\\r\\n\" +\n \"1-0:41.7.0(02.222*kW)\\r\\n\" +\n \"1-0:61.7.0(03.333*kW)\\r\\n\" +\n \"1-0:22.7.0(04.444*kW)\\r\\n\" +\n \"1-0:42.7.0(05.555*kW)\\r\\n\" +\n \"1-0:62.7.0(06.666*kW)\\r\\n\" +\n \"0-1:24.1.0(003)\\r\\n\" +\n \"0-1:96.1.0(3232323241424344313233343536373839)\\r\\n\" +\n \"0-1:24.2.1(101209112500W)(12785.123*m3)\\r\\n\" +\n \"!EF2F\\r\\n\" +\n \"\\r\\n\";\n DSMRTelegram dsmrTelegram = ParseDsmrTelegram.parse(testcase);\n\n // CHECKSTYLE.OFF: ParenPad\n assertEquals(\"/ISk5\\\\2MT382-1000\", dsmrTelegram.getRawIdent());\n assertEquals(\"ISK\", dsmrTelegram.getEquipmentBrandTag());\n assertEquals(\"MT382-1000\", dsmrTelegram.getIdent());\n\n assertEquals(\"5.0\", dsmrTelegram.getP1Version());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:30:20+01:00\"), dsmrTelegram.getTimestamp());\n\n assertEquals(\"K8EG004046395507\", dsmrTelegram.getEquipmentId());\n assertEquals(\"0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?\", dsmrTelegram.getMessage());\n\n assertEquals( 2, dsmrTelegram.getElectricityTariffIndicator());\n assertEquals( 123456.789, dsmrTelegram.getElectricityReceivedLowTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReceivedNormalTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReturnedLowTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReturnedNormalTariff(), 0.001);\n assertEquals( 1.193, dsmrTelegram.getElectricityPowerReceived(), 0.001);\n assertEquals( 0.0, dsmrTelegram.getElectricityPowerReturned(), 0.001);\n assertEquals( 4, dsmrTelegram.getPowerFailures());\n assertEquals( 2, dsmrTelegram.getLongPowerFailures());\n\n assertEquals(2, dsmrTelegram.getPowerFailureEventLogSize());\n\n List<PowerFailureEvent> powerFailureEventLog = dsmrTelegram.getPowerFailureEventLog();\n assertEquals(2, powerFailureEventLog.size());\n assertPowerFailureEvent(powerFailureEventLog.get(0), \"2010-12-08T15:20:15+01:00\", \"2010-12-08T15:24:15+01:00\", \"PT4M\");\n assertPowerFailureEvent(powerFailureEventLog.get(1), \"2010-12-08T15:05:03+01:00\", \"2010-12-08T15:10:04+01:00\", \"PT5M1S\");\n\n assertEquals( 2, dsmrTelegram.getVoltageSagsPhaseL1());\n assertEquals( 1, dsmrTelegram.getVoltageSagsPhaseL2());\n assertEquals( 0, dsmrTelegram.getVoltageSagsPhaseL3());\n assertEquals( 0, dsmrTelegram.getVoltageSwellsPhaseL1());\n assertEquals( 3, dsmrTelegram.getVoltageSwellsPhaseL2());\n assertEquals( 0, dsmrTelegram.getVoltageSwellsPhaseL3());\n assertEquals( 220.1, dsmrTelegram.getVoltageL1(), 0.001);\n assertEquals( 220.2, dsmrTelegram.getVoltageL2(), 0.001);\n assertEquals( 220.3, dsmrTelegram.getVoltageL3(), 0.001);\n assertEquals( 1, dsmrTelegram.getCurrentL1(), 0.001);\n assertEquals( 2, dsmrTelegram.getCurrentL2(), 0.001);\n assertEquals( 3, dsmrTelegram.getCurrentL3(), 0.001);\n assertEquals( 1.111, dsmrTelegram.getPowerReceivedL1(), 0.001);\n assertEquals( 2.222, dsmrTelegram.getPowerReceivedL2(), 0.001);\n assertEquals( 3.333, dsmrTelegram.getPowerReceivedL3(), 0.001);\n assertEquals( 4.444, dsmrTelegram.getPowerReturnedL1(), 0.001);\n assertEquals( 5.555, dsmrTelegram.getPowerReturnedL2(), 0.001);\n assertEquals( 6.666, dsmrTelegram.getPowerReturnedL3(), 0.001);\n assertEquals( 1, dsmrTelegram.getMBusEvents().size());\n\n assertEquals( 3, dsmrTelegram.getMBusEvents().get(1).getDeviceType());\n assertEquals(\"2222ABCD123456789\", dsmrTelegram.getMBusEvents().get(1).getEquipmentId());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:25+01:00\"), dsmrTelegram.getMBusEvents().get(1).getTimestamp());\n assertEquals( 12785.123, dsmrTelegram.getMBusEvents().get(1).getValue(), 0.001);\n assertEquals( \"m3\", dsmrTelegram.getMBusEvents().get(1).getUnit());\n\n assertEquals(\"2222ABCD123456789\", dsmrTelegram.getGasEquipmentId());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:25+01:00\"), dsmrTelegram.getGasTimestamp());\n assertEquals(12785.123, dsmrTelegram.getGasM3(), 0.001);\n\n assertEquals(\"EF2F\", dsmrTelegram.getCrc());\n\n // The CRC of this testcase is invalid.\n // Or better: I have not been able to copy it from the documentation and\n // recreate the \"original\" record for which the provided CRC was calculated.\n // assertTrue(dsmrTelegram.isValidCRC());\n }",
"@Test(timeout = 4000)\n public void test04() throws Throwable {\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/S_[.XML\");\n FileSystemHandling.appendStringToFile(evoSuiteFile0, \"\\\",\");\n FileUtil fileUtil0 = new FileUtil();\n File file0 = fileUtil0.getSimilarItems(\"[\", \"\");\n assertEquals(2L, file0.length());\n assertNotNull(file0);\n }",
"public void testStripReadOnlyKeepOnlyOneWriteEnablePart() {\n String fileInput = inputDirectory + \"write_enable_parts_3_items.docx\";\n ZipFile zipFileSource1;\n try {\n zipFileSource1 = new ZipFile(fileInput);\n {\n Package packSource1 = Package.open(zipFileSource1, PackageAccess.ReadWrite);\n WordDocument docxSource1 = new WordDocument(packSource1);\n docxSource1.stripReadOnlyPartOfDocument(1);\n String fileName = \"write_enable_part_1.docx\";\n String expectedResult = expectedDirectory + fileName;\n File destFile = new File(outputDirectory + fileName);\n assertTrue(docxSource1.save(destFile));\n OpenXmlAssert.assertEquals(new File(outputDirectory + fileName), new File(expectedResult));\n }\n {\n Package packSource1 = Package.open(zipFileSource1, PackageAccess.ReadWrite);\n WordDocument docxSource1 = new WordDocument(packSource1);\n docxSource1.stripReadOnlyPartOfDocument(2);\n String fileName = \"write_enable_part_2.docx\";\n String expectedResult = expectedDirectory + fileName;\n File destFile = new File(outputDirectory + fileName);\n assertTrue(docxSource1.save(destFile));\n OpenXmlAssert.assertEquals(new File(outputDirectory + fileName), new File(expectedResult));\n }\n {\n Package packSource1 = Package.open(zipFileSource1, PackageAccess.ReadWrite);\n WordDocument docxSource1 = new WordDocument(packSource1);\n docxSource1.stripReadOnlyPartOfDocument(3);\n String fileName = \"write_enable_part_3.docx\";\n String expectedResult = expectedDirectory + fileName;\n File destFile = new File(outputDirectory + fileName);\n assertTrue(docxSource1.save(destFile));\n OpenXmlAssert.assertEquals(new File(outputDirectory + fileName), new File(expectedResult));\n }\n } catch (IOException e) {\n logger.error(e);\n fail(\"cannot open:\" + fileInput);\n } catch (OpenXML4JException e) {\n logger.error(e);\n fail(\"fail\" + e.getMessage());\n }\n }",
"@Test\n public void getMatchDetailsTest2(){\n try {\n RiotApiHandler userTest=RiotApiHandler.getInstance();\n Path testfile = Path.of(\"matchinfo.txt\");\n String fin = Files.readString(testfile);\n Assert.assertNotEquals(fin,userTest.getMatchDetails(\"EUN1_2775220260\",\"eun1\"));\n }\n catch (IOException exception){\n exception.printStackTrace();\n }\n }",
"@Test\n public void testReadTtbinFile_UsbFile()\n {\n System.out.println(\"TEST: readTtbinFile\");\n UsbFile file = new UsbFile(0xFFFFFFFF, ttbinFileData.length, ttbinFileData);\n TomTomReader instance = TomTomReader.getInstance();\n Activity result = instance.readTtbinFile(file);\n \n testContentsNonSmoothed(result);\n }",
"public void testSalesmanWithoutSales()\n {\n try {\n SalesFile t = new SalesFile(\"samples/data/in/base_3.dat\", AppConfig.fieldDelimiter);\n t.read();\n assertEquals(t.getTotalSalesman(), 3);\n assertEquals(t.getTotalCustomers(), 4);\n assertEquals(t.getMostExpensiveSaleId(), \"08\");\n assertEquals(t.getWorstSalesman(), \"Alex\");\n } catch(RecordInvalidTokenException ex) {\n assertTrue(\"This file is well formed, but something is wrong!\", false);\n } catch(FileNotFoundException e) {\n assertTrue(\"File must exist to complete the test!\", false);\n } catch(IOException e) {\n assertTrue(\"IO exception!\", false);\n }\n }",
"@Test\n public void testLineNoise() {\n try {\n KicIngester.ingestScpFiles(KicIngester.getScpFiles(new File(\n SCP_DATA_DIR), \"line-noise\"));\n fail(\"Expected IngestScpException\");\n } catch (IngestScpException e) {\n assertEquals(\"Errors\", 10, e.getErrorCount());\n assertEquals(\"Files\", 1, e.getFileCount());\n assertEquals(\"Encountered 10 errors in 1 file\", e.getMessage());\n } catch (Exception e) {\n fail(\"Expected IngestScpException\");\n }\n }",
"public void testStripReadOnlyWithOle() {\n String fileName = \"stripedWithOle.docx\";\n String fileInput = inputDirectory + \"diagramn_and_formula.docx\";\n String expectedResult = expectedDirectory + fileName;\n ZipFile zipFileSource1;\n try {\n zipFileSource1 = new ZipFile(fileInput);\n Package packSource1 = Package.open(zipFileSource1, PackageAccess.ReadWrite);\n WordDocument docxSource1 = new WordDocument(packSource1);\n docxSource1.stripReadOnlyPartOfDocument();\n File destFile = new File(outputDirectory + fileName);\n assertTrue(docxSource1.save(destFile));\n OpenXmlAssert.assertEquals(new File(outputDirectory + fileName), new File(expectedResult));\n } catch (IOException e) {\n logger.error(e);\n fail(\"cannot open:\" + fileInput);\n } catch (OpenXML4JException e) {\n logger.error(e);\n fail(\"fail\" + e.getMessage());\n }\n }",
"private void reloadVersion2(BufferedReader in)\n throws ReloadFault, IOException {\n String line;\n\n // look for optional checksum and then test description,\n // skipping comments\n while ((line = in.readLine()) != null) {\n if (line.equals(JTR_V2_TESTDESC)) {\n break;\n }\n //else if (line.startsWith(JTR_V2_CHECKSUM)) {\n //checksumText = line.substring(JTR_V2_CHECKSUM.length());\n //}\n else if (!line.startsWith(\"#\")) {\n throw new ReloadFault(i18n, \"rslt.badLine\", line);\n }\n }\n\n // this probably won't work with a normal Properties object\n String[] tdProps = PropertyArray.load(in);\n\n if (desc == null) {\n uniquifyStrings(tdProps);\n desc = TestDescription.load(tdProps);\n }\n tdProps = null; // dump it\n\n // XXX compare to TD\n\n // remove comment lines and look for test env props\n while ((line = in.readLine()) != null) {\n if (line.startsWith(JTR_V2_RESPROPS)) {\n break;\n } else if (line.startsWith(JTR_V2_ENVIRONMENT)) {\n env = PropertyArray.load(in);\n uniquifyStrings(env);\n } else if (!line.startsWith(\"#\")) {\n throw new ReloadFault(i18n, \"rslt.badLine\", line);\n }\n }\n\n if (env == null) {\n env = new String[]{};\n }\n\n if (line == null) {\n throw new ReloadFault(i18n, \"rslt.badFormat\");\n }\n\n String[] trProps = PropertyArray.load(in);\n\n if (props == null) {\n // restore the properties of this result\n uniquifyStrings(trProps);\n props = trProps;\n }\n\n trProps = null; // dump it\n\n // read the sections\n int sectionCount = parseSectionCount(PropertyArray.get(props, SECTIONS));\n sections = new Section[sectionCount];\n for (int i = 0; i < getSectionCount(); i++) {\n sections[i] = new Section(in);\n }\n\n // get the final test status\n while ((line = in.readLine()) != null) {\n if (line.startsWith(JTR_V2_TSTRESULT)) {\n execStatus = Status.parse(line.substring(JTR_V2_TSTRESULT.length()));\n break;\n }\n }\n\n if (execStatus == null) {\n execStatus = Status.error(\"NO STATUS RECORDED IN FILE\");\n }\n\n // checksum support removed\n checksumState = NO_CHECKSUM;\n }",
"public void testStripReadOnlyKeepTextImageAndTable() {\n String fileName = \"write_enable_text_table_image.docx\";\n String fileInput = inputDirectory + \"write_enable_text_table_image.docx\";\n String expectedResult = expectedDirectory + fileName;\n ZipFile zipFileSource1;\n try {\n zipFileSource1 = new ZipFile(fileInput);\n Package packSource1 = Package.open(zipFileSource1, PackageAccess.ReadWrite);\n WordDocument docxSource1 = new WordDocument(packSource1);\n docxSource1.stripReadOnlyPartOfDocument();\n File destFile = new File(outputDirectory + fileName);\n assertTrue(docxSource1.save(destFile));\n OpenXmlAssert.assertEquals(new File(outputDirectory + fileName), new File(expectedResult));\n } catch (IOException e) {\n logger.error(e);\n fail(\"cannot open:\" + fileInput);\n } catch (OpenXML4JException e) {\n logger.error(e);\n fail(\"failed\" + e.getMessage());\n }\n }",
"@Ignore(\"test in testPGNT0102002, testPGNT0101001, testPGNT0101002\")\n public void testDAM30507001() {\n }",
"@Test public void readStringDescriptionsNotJustSingleWord() {\n fail( \"Not yet implemented\" );\n }",
"public void testStripReadOnlyRemoveAlsoImages() {\n String fileName = \"read_only_strippedImagesRemoved.docx\";\n String fileInput = inputDirectory + \"read_only_with_image_inside.docx\";\n String expectedResult = expectedDirectory + fileName;\n ZipFile zipFileSource1;\n try {\n zipFileSource1 = new ZipFile(fileInput);\n Package packSource1 = Package.open(zipFileSource1, PackageAccess.ReadWrite);\n WordDocument docxSource1 = new WordDocument(packSource1);\n docxSource1.stripReadOnlyPartOfDocument();\n File destFile = new File(outputDirectory + fileName);\n assertTrue(docxSource1.save(destFile));\n OpenXmlAssert.assertEquals(new File(outputDirectory + fileName), new File(expectedResult));\n } catch (IOException e) {\n logger.error(e);\n fail(\"cannot open:\" + fileInput);\n } catch (OpenXML4JException e) {\n logger.error(e);\n fail(\"fail\" + e.getMessage());\n }\n }",
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize(\"GUIEditors.props\");\n discretize0.useBinNumbersTipText();\n // Undeclared exception!\n try { \n discretize0.output();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // No output instance format defined\n //\n verifyException(\"weka.filters.Filter\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test16() throws Throwable {\n JSJshop jSJshop0 = new JSJshop();\n JSJshopVars.flagExit = false;\n jSJshop0.getAddList();\n StringReader stringReader0 = new StringReader(\" 0] \");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n JSJshop jSJshop1 = new JSJshop(\"fe?i;td7q\", \"vk0kC3?x)79si>\\\"W\");\n char[] charArray0 = new char[9];\n jSJshop1.getAddList();\n charArray0[0] = 'c';\n charArray0[1] = 'u';\n charArray0[2] = 'V';\n charArray0[3] = 'u';\n charArray0[4] = 'c';\n charArray0[5] = '}';\n charArray0[8] = 'u';\n stringReader0.read(charArray0);\n jSJshop1.getAddList();\n boolean boolean0 = jSJshop1.parserFile(\"Problem file parsed successfully\");\n assertFalse(boolean0);\n }",
"public void testFileWithEmptyLines()\n {\n try {\n SalesFile t = new SalesFile(\"samples/data/in/base_with_empty_lines.dat\", AppConfig.fieldDelimiter);\n t.read();\n assertEquals(t.getTotalSalesman(), 2);\n assertEquals(t.getTotalCustomers(), 2);\n assertEquals(t.getMostExpensiveSaleId(), \"10\");\n assertEquals(t.getWorstSalesman(), \"Renato\");\n } catch(RecordInvalidTokenException ex) {\n assertTrue(\"This file is well formed, but something is wrong!\", false);\n } catch(FileNotFoundException e) {\n assertTrue(\"File must exist to complete the test!\", false);\n } catch(IOException e) {\n assertTrue(\"IO exception!\", false);\n }\n }",
"public void testInterpretingBasicExample2()\n {\n try {\n SalesFile t = new SalesFile(\"samples/data/in/base_2.dat\", AppConfig.fieldDelimiter);\n t.read();\n assertEquals(t.getTotalSalesman(), 2);\n assertEquals(t.getTotalCustomers(), 3);\n assertEquals(t.getMostExpensiveSaleId(), \"08\");\n assertEquals(t.getWorstSalesman(), \"Diego\");\n } catch(RecordInvalidTokenException ex) {\n assertTrue(\"This file is well formed, but something is wrong!\", false);\n } catch(FileNotFoundException e) {\n assertTrue(\"File must exist to complete the test!\", false);\n } catch(IOException e) {\n assertTrue(\"IO exception!\", false);\n }\n }",
"@Test(timeout = 4000)\n public void test13() throws Throwable {\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"QZkj>P.|?`(ZTS\");\n FileSystemHandling.appendStringToFile(evoSuiteFile0, \"fe?i;td7q\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n stringArray0[1] = \"\";\n stringArray0[2] = \"\";\n stringArray0[3] = \"\";\n stringArray0[4] = \"Error in readFilej) : \";\n stringArray0[5] = \"\";\n EvoSuiteFile evoSuiteFile1 = new EvoSuiteFile(\"QZkj>P.|?`(ZTS\");\n FileSystemHandling.appendLineToFile(evoSuiteFile1, \"\");\n FileSystemHandling.appendStringToFile(evoSuiteFile1, \"\");\n stringArray0[7] = \"\";\n stringArray0[8] = \"\";\n StringReader stringReader0 = new StringReader(\"\");\n char[] charArray0 = new char[2];\n charArray0[0] = 'u';\n charArray0[1] = ']';\n stringReader0.read(charArray0);\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n JSJshop jSJshop0 = null;\n try {\n jSJshop0 = new JSJshop(\"QZkj>P.|?`(ZTS\", \"Error in readFilej) : \");\n fail(\"Expecting exception: System.SystemExitException\");\n \n } catch(System.SystemExitException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.evosuite.runtime.System\", e);\n }\n }",
"@Test public void testWithSingleHouseDataSet() throws IOException\n {\n final File inDir = tempDir.toFile();\n final File outDir = tempDir.toFile();\n // Copy HDD file.\n try(final Reader r = DDNExtractorTest.getETVEGLLHDD2016H1CSVReader())\n {\n try(final FileWriter w = new FileWriter(new File(inDir, ETVSimpleDriverNBulkInputs.INPUT_FILE_HDD)))\n { cpReaderToWriter(r, w); }\n }\n // Copy sample household data file.\n try(final Reader r = ETVParseTest.getNBulkSH2016H1CSVReader())\n {\n try(final FileWriter w = new FileWriter(new File(inDir, ETVSimpleDriverNBulkInputs.INPUT_FILE_NKWH)))\n { cpReaderToWriter(r, w); }\n }\n // Ensure no old result files hanging around...\n final File basicResultFile = new File(outDir, ETVSimpleDriverNBulkInputs.OUTPUT_STATS_FILE_BASIC);\n basicResultFile.delete(); // Make sure no output file.\n assertFalse(\"output file should not yet exist\", basicResultFile.isFile());\n final File basicFilteredResultFile = new File(outDir, ETVSimpleDriverNBulkInputs.OUTPUT_STATS_FILE_FILTERED_BASIC);\n basicFilteredResultFile.delete(); // Make sure no output file.\n assertFalse(\"output filtered file should not yet exist\", basicFilteredResultFile.isFile());\n // Do the computation...\n ETVSimpleDriverNBulkInputs.doComputation(inDir, outDir);\n // Check results.\n assertTrue(\"output file should now exist\", basicResultFile.isFile());\n assertTrue(\"output filtered file should now exist\", basicFilteredResultFile.isFile());\n final String expected =\n \"\\\"house ID\\\",\\\"slope energy/HDD\\\",\\\"baseload energy\\\",\\\"R^2\\\",\\\"n\\\",\\\"efficiency gain if computed\\\"\\n\" +\n \"\\\"5013\\\",1.5532478,1.3065631,0.62608224,156,\\n\";\n final String actualBasic = new String(Files.readAllBytes(basicResultFile.toPath()), \"ASCII7\");\n assertEquals(expected, actualBasic);\n final String actualFilteredBasic = new String(Files.readAllBytes(basicFilteredResultFile.toPath()), \"ASCII7\");\n assertEquals(expected, actualFilteredBasic);\n }",
"@Test\n\t//Normal Test Case of pasteSerial\n\tpublic void pasteUseSerialTestOne() {\n\t\t\t\n\t\tString serialLines = \"Get Your Crayons\\nOne Of a Kind\\nCrazy Go\\n\";\n\t\tString []input = serialLines.split(\"\\n\");\n\t\tpasteTool = new PASTETool();\n\t\t\n\t\tString actual = pasteTool.pasteSerial(input);\n\t\tString expected = \"Get Your Crayons\\tOne Of a Kind\\tCrazy Go\";\n\t\t\n\t\tassertEquals(expected,actual);\n\t}",
"@Test(timeout = 4000)\n public void test04() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n TechnicalInformation technicalInformation0 = lovinsStemmer0.getTechnicalInformation();\n assertFalse(technicalInformation0.hasAdditional());\n }",
"public void beforeCleaner() throws NumberFormatException, IOException, ParseException{\n \t\t // PRE-CLEANING:\n \t\t\ttestOutputCleaner(true);\n \t\t\ttestOutputTimeReset(true);\n \t\t\toutputCleaner(true);\n fileCleaner(\"email.all\" );\n fileCleaner(\"email.cont\" );\n fileCleaner(\"email.subj\" );\n fileCleaner(\"failed.log\" );\t\t\n fileCleaner(\"finish.time\");\n fileCleaner(\"ini.time\" );\n fileCleaner(\"print.log\" );\n fileCleaner(\"run.log\" );\n fileCleaner(\"stack.trace\");\n fileCleaner(\"start.time\" );\n fileCleaner(\"wait.log\" );\n fileCleaner(\"xml.path\" );\n fileCleaner(\"source.html\");\n fileCleaner(\"test.num\" );\n fileCleaner(\"failed.num\" );\n fileCleaner(\"emailable-report.html\");\n fileCleaner(\"extent-test-report.html\");\n \t\t}",
"@Test(timeout = 4000)\n public void test10() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getUseBinNumbers());\n \n Discretize discretize1 = new Discretize();\n discretize0.m_UseBinNumbers = true;\n discretize0.makeBinaryTipText();\n discretize0.getCapabilities();\n String string0 = discretize0.getAttributeIndices();\n assertEquals(\"first-last\", string0);\n }",
"public void testRemoveBlankLines() {\n File testFile = new File(\"src/test/data/dataset20.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"Event type count not correct.\", 1, jvmRun.getEventTypes().size());\n Assert.assertTrue(\"Log line not recognized as \" + JdkUtil.LogEventType.PAR_NEW.toString() + \".\",\n jvmRun.getEventTypes().contains(JdkUtil.LogEventType.PAR_NEW));\n Assert.assertTrue(Analysis.WARN_PRINT_GC_APPLICATION_CONCURRENT_TIME + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_PRINT_GC_APPLICATION_CONCURRENT_TIME));\n\n }",
"@Test\n void test() throws Exception {\n File file = new File(\"test-data/diagram/test.vsdx\");\n\n try (InputStream stream = new PushbackInputStream(new FileInputStream(file), 100000)) {\n handleFile(stream, file.getPath());\n }\n\n handleExtracting(file);\n }",
"@Test\n\tpublic void testPrintDroids() {\n\t\tassertEquals(\n\t\t\t\t\"05V: UNASSIGNED\\n03V: UNASSIGNED\\n02E: UNASSIGNED\\n01C: UNASSIGNED\\n04C: UNASSIGNED\\n\",\n\t\t\t\ts1.printDroids());\n\t}",
"@Test(timeout = 4000)\n public void test36() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/CGGSK_9<#S%7P.SU/IN~Q__NULL.XML\");\n FileSystemHandling.appendStringToFile(evoSuiteFile0, \"9<#s%7P.sU/In~q\");\n EvoSuiteURL evoSuiteURL0 = new EvoSuiteURL(\"http://xml.amazon.net/onca/xml3?t=popcornmonste2-20&dev-t=DSB0XDDW1GQ3S&AsinSearch=CGgsK&type=&offerpage=null&offer=9<#s%7P.sU/In~q&f=xml\");\n NetworkHandling.createRemoteTextFile(evoSuiteURL0, \"\");\n FileInputStream fileInputStream0 = fileUtil0.fetchASINFile(\"CGgsK\", \"\", \"9<#s%7P.sU/In~q\", (String) null);\n assertEquals(16, fileInputStream0.available());\n }",
"public void afterCleaner() throws NumberFormatException, IOException{\n \t\t\t fileCleaner(\"ini.time\" );\n \t\t\t fileCleaner(\"failed.num\" );\n// \t\t\t fileCleaner(\"test.num\" );\n \t\t\t fileCleaner(\"add.num\" );\n// \t\t\t fileCleaner(\"prev.num\" );\n \t\t\t fileCleaner(\"server.info\");\n \t\t\t fileCleaner(\"email.opt\" );\n \t\t\t fileCleaner(\"email.all\" );\n \t\t\t fileCleaner(\"email.cont\" );\n \t\t\t fileCleaner(\"email.subj\" );\n \t\t\t fileCleaner(\"add.show\" );\n \t\t\t fileCleaner(\"screen-shots.zip\");\n \t\t\t fileCleaner(\"screen-shots.renameToZip\");\n \t\t}",
"@Test(timeout = 4000)\n public void test069() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n javaCharStream0.GetSuffix(416);\n assertEquals(1, javaCharStream0.getBeginColumn());\n }",
"public void testParser() {\n\n String[] accessNetworkInfo = {\n\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; [123:4::abcd]; rand=l\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; a-b.c1; rand=l\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; 127.0.0.1; rand=l\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE;\\\"\\\"\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE;\\\";\\\"\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE;\\\"ip=123.123.123.123\\\"\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; [123:4::abcd];rand=l\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; [123:4::abcd]\\n\",\n \"P-Access-Network-Info: IEEE-802.11\\n\",\n \"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE\\n\"\n\n };\n\n super.testParser(PAccessNetworkInfoParser.class,accessNetworkInfo);\n \n //test one more\n String[] accessNetworkInfo_2 = {\n \"P-Access-Network-Info: IEEE-802.11\\n\",\n \"P-Access-Network-Info: IEEE-802.11, 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE\\n\",\n \"P-Access-Network-Info: IEEE-802.11, 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE, 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDF\\n\",\n \"P-Access-Network-Info: 3GPP-E-UTRAN; utran-cell-id-3gpp=262010063F423802;network-provided,3GPP-E-UTRAN-FDD; utran-cell-id-3gpp=262010063F423802\\n\",\n \"P-Access-Network-Info: IEEE-802.11;i-wlan-node-id=74da38582ba4\\n\",\n \"P-Access-Network-Info: 3GPP-E-UTRAN-FDD;utran-cell-id-3gpp=262010063f423802\\n\",\n \"P-Access-Network-Info: 3GPP-E-UTRAN;utran-cell-id-3gpp=\\\"262010063F423802\\\";network-provided,3GPP-E-UTRAN-FDD;utran-cell-id-3gpp=262010063f423802\\n\"\n };\n super.testParser(PAccessNetworkInfoParser.class,accessNetworkInfo_2);\n String token = \"A1-.%*_+`'~\";\n String[] accessNetworkInfo_3 = {\n \"P-Access-Network-Info: IEEE-802.11; network-provided\\n\",\n \"P-Access-Network-Info: IEEE-802.11; ipv4=[2345:3456::]\\n\",\n //token\n \"P-Access-Network-Info: \"+token+\"\\n\",\n //hostname\n \"P-Access-Network-Info: IEEE-802.11;AaB123=www.example-test.example.com\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=www.example-test.example.com.\\n\",\n //IPv4address \n \"P-Access-Network-Info: IEEE-802.11;AaB123=1.1.1.1\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=0.0.0.0\\n\",\n //IPv6reference\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[::]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A::]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A::99B]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A:99B::]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A:99B::11C]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A:99B::11C:22D]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[::11C]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[11C::22D]\\n\",\n //hexpart [ \":\" IPv4address ]\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[11C::12.04.02.99]\\n\",\n //IPv6reference quoted\n \"P-Access-Network-Info: IEEE-802.11;AaB123=\\\"[11C::12.04.02.99]\\\"\\n\",\n //Multiple IP6\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A:99B::11C:22D];cc231=[11C::12.04.02.99]\\n\",\n };\n super.testParser(PAccessNetworkInfoParser.class,accessNetworkInfo_3);\n\n }",
"@Test\n public void delims() {\n }",
"@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testNESM() {\n CuteNetlibCase.doTest(\"NESM.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }",
"public static void runTests(Preferences p) throws InvalidTagFormatException, FileNotFoundException, IOException {\n \n String testCaseFile = p.getTestFile();\n String testingPath = p.getTestPath();\n String resultsFormat = p.getFormat();\n boolean ignoreSpaCap = p.getIgnoreSpaCap();\n boolean removeBlankLines= p.getRemoveBlankLines();\n boolean debug = p.getDebug();\n JTextArea statusTextArea = p.getStatusTextArea();\n ProgramSettings settings= p.getSettings();\n\n // ultimately we need to figure actual OS\n OperatingSystem opSys = new OperatingSystemWindows(); \n \n String tempProgramFileName = settings.getTempProgramFileName();\n String tempInputFileName = settings.getTempInputFileName();\n String tempOutputFileName = settings.getTempOutputFileName();\n // TODO Replace this with actual storage of name in settings\n String tempErrorFileName = settings.getTempOutputFileName();\n int lastPeriod = tempErrorFileName.lastIndexOf(\".\");\n tempErrorFileName = tempErrorFileName.substring(0, lastPeriod) + \"Error$\"\n + tempErrorFileName.substring(lastPeriod);\n String resultsFileName = settings.getResultsFileName();\n \n \n //Ty Carpenter\n //From issue #89, added a new statistic variable to see if the test passes or fails\n //NOCOMP tests don't keep track of statistics, only if the test runs, therefore a variable is need to see if that run fails\n //nocompInTests keeps track to see if there is a single nocomp test so the results prints ALL TESTS RAN\n boolean testsSuccessful = true;\n boolean nocompInTests = false;\n \n int incorrectValues = 0;\n int incorrectText = 0;\n int incorrectSpacing = 0;\n int extraBlankLines = 0;\n int missingBlankLines = 0;\n int canNotRun = 0;\n int executionErrors = 0;\n\n //Brendan Villnave lines 48-51\n //From issue #111 I added the time of testing in military format\n //also tells you the day you tested the file\n Date current = new Date();\n statusTextArea.append(\"Date and time tested: \"+ current + \"\\n\");\n statusTextArea.update(statusTextArea.getGraphics());\n testingPath = testingPath + \"/\";\n statusTextArea.append(\"Test Case File: \" + p.getTestFile() + \"\\n\");\n statusTextArea.update(statusTextArea.getGraphics());\n statusTextArea.append(\"Testing path: \" + testingPath + \"\\n\");\n statusTextArea.update(statusTextArea.getGraphics());\n\n\n List<String> tests = new LinkedList<>();\n List<String> includes = new ArrayList<>();\n //Define Lists for storing information about files tested and whether\n //testes passed or failed.\n List<String> fileNames = new ArrayList<>();\n List<Integer> testsPassed = new ArrayList<>();\n List<Integer> testsApproximate = new ArrayList<>();\n List<Integer> testsRun = new ArrayList<>();\n //new list that stores information about nocompFiles run\n List<Integer> nocompTestsRun = new ArrayList<>();\n \n //Ty Carpenter Issue #89\n //boolean variable if NOCOMP tag is present\n boolean noComp = false;\n \n try {\n PytestFileReader testFile = new PytestFileReader(testCaseFile);\n tests = testFile.getText();\n includes = testFile.getIncludedFiles();\n } catch (Exception ex) {\n statusTextArea.append(\"Can't read test file: \" + testCaseFile + \"\\n\");\n }\n \n //Ty Carpenter Issue #94\n //Finds a Run tag in tests and transforms it into a NOCOMP test tag\n \n for(int i = 0; i < tests.size(); i++)\n {\n \n String possibleRunTag = tests.get(i);\n String upperPossibleRunTag = possibleRunTag.toUpperCase();\n String keepFile = \"\";\n if(upperPossibleRunTag.length() > 10)\n {\n \n String t = upperPossibleRunTag.substring(0, 10);\n \n if(t.equals(\"<RUN CODE=\"))\n {\n \n if(upperPossibleRunTag.substring(upperPossibleRunTag.length()-1,upperPossibleRunTag.length()).equals(\">\") && upperPossibleRunTag.substring(upperPossibleRunTag.length()-2,upperPossibleRunTag.length()-1).equals(\"/\"))\n {\n \n keepFile = possibleRunTag.substring(10, possibleRunTag.length() - 2);\n String newTag = \"<test code=\" + keepFile + \"nocomp>\";\n tests.set(i, newTag);\n tests.add(i+1, \"</test>\");\n }\n }\n }\n \n }\n \n // Process any COPY tags to copy files from the test case folder to\n // the folder under test\n \n String testCasePath = testCaseFile.substring( 0, testCaseFile.lastIndexOf( \"/\"));\n //testCaseFile.substring( 0, testCaseFile.lastIndexOf( \"/\"));\n \n \n for( String line : tests )\n {\n String upper = line.toUpperCase();\n // TODO: Not sure if the test for length is necessary\n // TODO: This is very demanding for spacing, etc.\n if( upper.length() > 13 && upper.startsWith( \"<COPY FILE=\") && upper.endsWith( \"/>\" ) )\n {\n String fileName = line.substring( line.indexOf( \"\\\"\" )+1, line.lastIndexOf( \"\\\"\" ) );\n String sourceFile = testCasePath + \"/\" + fileName;\n String destFile = testingPath + fileName;\n \n if( opSys.copy( sourceFile, destFile ) )\n {\n statusTextArea.append( \"COPIED: \" + fileName + \"\\n\" );\n \n }\n else\n {\n statusTextArea.append( \"*** NOT COPIED ***: \" + fileName + \"\\n\" );\n \n // might want to do something else\n } \n }\n } \n \n FileNameMapper fileNameMapper = \n new FileNameMapper( null, true, tests, testingPath );\n \n if( 0 < fileNameMapper.unknownCount() )\n {\n fileNameMapper.setVisible( true );\n if( !fileNameMapper.okClicked() )\n {\n statusTextArea.append(\"Testing cancelled by user.\");\n return;\n }\n }\n \n List<String> results = new LinkedList<>();\n \n if (!testCaseFile.endsWith(\".pytest\")) {\n statusTextArea.append(\"No tests were run because the Test Case File was not a PYTEST file.\");\n // ?? : statusTextArea.update(statusTextArea.getGraphics()); \n return;\n }\n \n for (String str : includes) {\n if (str.endsWith(\".py\")) {\n statusTextArea.append(\"The tag to include \" + str + \" was ignored because its argument was not a .pytest file.\\n\");\n }\n }\n \n TestTagParser testParser = new TestTagParser(tests);\n RUN_TESTS:\n while (testParser.hasNext()) {\n\n // Step #1 - Read the test case from the file\n TagBlock block = testParser.next();\n String pythonFileName = parseFileArg(block.getArgs(), statusTextArea );\n String userFileName = fileNameMapper.map( pythonFileName ); \n List<String> testData = block.getData();\n //Find out if the file is currently in the List of tested files and\n //if so where.\n int positionInNameList = fileNames.indexOf(pythonFileName);\n if(positionInNameList==-1)\n {\n //Initialize a new element in the Lists for this new .py file.\n fileNames.add(pythonFileName);\n positionInNameList = fileNames.size()-1;\n testsPassed.add(0);\n testsApproximate.add(0);\n nocompTestsRun.add(0);\n testsRun.add(0);\n }\n //Ty Carpenter Issue #89\n //Wherever a statistic is counted (like canNotRun, missingBlankLines, etc>)\n // check to see if there is a NOCOMP tag is present so that statistics are NOT counted in the test results\n //Either way, if there is an error, testsSuccessful becomes false\n try {\n //testPassed start out true and is set to false if the test fails.\n if( userFileName.equals( \"(none)\") )\n {\n boolean testPassed = false;\n if(!hasNoCompArg(block.getArgs()))\n {\n canNotRun++;\n testsSuccessful = false;\n }\n else\n {\n testsSuccessful = false;\n }\n results.add(\"Skipped \" + pythonFileName + \" - NO USER FILE\" );\n results.add( \"\" );\n statusTextArea.append(\"Skipped \" + pythonFileName + \" - NO USER FILE\\n\" );\n statusTextArea.update(statusTextArea.getGraphics());\n }\n else\n {\n boolean testPassed = true;\n boolean testApproximate = true;\n \n if( userFileName.equals( pythonFileName ) )\n {\n results.add(\"Testing \" + pythonFileName + \"...\");\n }\n else\n {\n results.add(\"Testing \" + pythonFileName + \n \" >>> \" + userFileName + \"...\");\n }\n if (true) // TODO should be if (verbose)\n {\n if( userFileName.equals( pythonFileName ) )\n {\n statusTextArea.append(\"Testing \" + pythonFileName + \"...\\n\");\n }\n else\n {\n statusTextArea.append(\"Testing \" + pythonFileName + \" (\" + userFileName + \")...\\n\");\n }\n statusTextArea.update(statusTextArea.getGraphics());\n }\n\n // Step #2 - Modify the student's code\n createModifiedProgram(testingPath, userFileName, tempProgramFileName);\n\n // Step #3 - Create the file with the inputs to the program\n createProgramInputs(testingPath, testData, tempInputFileName);\n\n // Step #4 - Run the student's program\n int rc = PythonExecutor.run(testingPath, tempProgramFileName,\n tempInputFileName,\n tempOutputFileName,\n tempErrorFileName,\n statusTextArea,\n settings);\n\n if( true ) // 0 == rc )\n {\n // Step #5 - Read the results from the output file\n TextFileReader fileIn = new TextFileReader(testingPath + tempOutputFileName);\n List<String> programOutput = fileIn.getText();\n\n if( 0 != rc && !hasNoCompArg(block.getArgs()))\n {\n // programOutput.add( \"EXECUTION ERROR RC=\" + rc );\n // TextFileReader errorIn = new TextFileReader(testingPath + tempErrorFileName);\n // List<String> errorText = errorIn.getText();\n // // Add the last two lines to the program output file, if present\n // if( errorText.size() >= 2 )\n // {\n // programOutput.add( errorText.get( errorText.size() - 2 ) );\n // }\n // if( errorText.size() >= 1 )\n // {\n // programOutput.add( errorText.get( errorText.size() - 1 ) );\n // } \n\n executionErrors++;\n testPassed = false;\n testsSuccessful = false;\n }\n if(0 != rc && hasNoCompArg(block.getArgs()))\n {\n testsSuccessful = false;\n \n }\n\n TextUtilities.removeTrailingBlanks( programOutput );\n\n // Step #6 - Compare the results to the expected values\n // TODO: move these inside the comparitor ??\n testData = InputTagParser.removeInputTags(testData);\n // List<String> outputText = ValueTagParser.removeValueTags( testData );\n \n int width = TextUtilities.maximumLength( programOutput );\n\n \n if (removeBlankLines) {\n while (testData.remove(\"\")) { /*\n * Do Nothing\n */ }\n while (programOutput.remove(\"\")) { /*\n * Do Nothing\n */ }\n }\n \n if (!hasNoCompArg(block.getArgs())) {\n // TODO: Convert to use iterators\n while (0 != testData.size() && 0 != programOutput.size()) {\n String testLine = testData.get(0);\n String progLine = programOutput.get(0);\n\n if (testLine.equals(\"\") && !progLine.equals(\"\")) {\n results.add(\"! missing blank line !\");\n testData.remove(0);\n missingBlankLines++;\n testsSuccessful = false;\n testPassed = false;\n } else if (!testLine.equals(\"\") && progLine.equals(\"\")) {\n results.add(\"! extra blank line !\");\n programOutput.remove(0);\n extraBlankLines++;\n testsSuccessful = false;\n testPassed = false;\n } else {\n TextLineComparator comp =\n new TextLineComparator(testLine, progLine);\n //TODO: Count multiple errors on one line?\n boolean exact = comp.equalsExact();\n boolean approx = comp.equalsSomeWhat();\n\n if (exact) {\n results.add(\"= \" + testLine);\n } else if (approx) {\n if (ignoreSpaCap) {\n results.add(\"~ \" + testLine);\n } else {\n testPassed=false;\n incorrectText++;\n incorrectSpacing++;\n testsSuccessful = false;\n\n if (resultsFormat.equals(\"Sequential\")) {\n results.add(\"~ \" + progLine);\n results.add(\"> \" + ValueTagParser.removeValueTags(testLine));\n } else {\n results.add(\"~ \" + TextUtilities.adjustLength( progLine, width ) + \" >-SHOULD BE-> \"\n + ValueTagParser.removeValueTags(testLine));\n }\n }\n } // else if( comp.equalValues() )\n // {\n // \tresults.add( \"# \" + programOutput.get(i) );\n // results.add( \"> \" + ValueTagParser.removeValueTags(testData.get(i)) );\n // }\n else {\n incorrectText++;\n testsSuccessful = false;\n testPassed = false;\n testApproximate = false;\n if (resultsFormat.equals(\"Sequential\")) {\n results.add(\"X \" + progLine);\n results.add(\"> \" + ValueTagParser.removeValueTags(testLine));\n } else {\n results.add(\"X \" + TextUtilities.adjustLength( progLine, width ) + \" >-SHOULD BE-> \"\n + ValueTagParser.removeValueTags(testLine));\n }\n }\n testData.remove(0);\n programOutput.remove(0);\n }\n }\n while (0 != testData.size()) {\n testApproximate = false;\n testPassed = false;\n if( 0 == rc )\n {\n // Only add this if there was not a python error\n incorrectText++;\n testsSuccessful = false;\n if (resultsFormat.equals(\"Sequential\")) {\n results.add(\"X **NO*OUTPUT*LINE**\");\n results.add(\"> \" + ValueTagParser.removeValueTags(testData.get(0)));\n } else {\n results.add(\"X \" + TextUtilities.adjustLength( \"**NO*OUTPUT*LINE**\", width) + \" >-SHOULD BE-> \"\n + ValueTagParser.removeValueTags(testData.get(0)));\n }\n }\n testData.remove(0);\n }\n while (0 != programOutput.size()) {\n testApproximate = false;\n testPassed = false;\n incorrectText++;\n testsSuccessful = false;\n if (resultsFormat.equals(\"Sequential\")) {\n results.add(\"X \" + programOutput.get(0));\n results.add(\"> **NO*OUTPUT*LINE**\");\n } else {\n results.add(\"X \" + TextUtilities.adjustLength( programOutput.get(0), width )\n + \" >-SHOULD BE-> **NO*OUTPUT*LINE**\");\n }\n programOutput.remove(0);\n }\n } else {\n \n \n //Ty Carpenter Issue #89\n //Variable when NOCOMP tag is found becomes true\n // NoComp argument present\n //nocompInTests is true so now will print ALL TESTS RUN if they all pass\n nocompInTests = true;\n noComp = true;\n for (int i = 0; i < programOutput.size(); i++) {\n results.add(\" \" + programOutput.get(i));\n }\n }\n }\n else\n {\n if(!hasNoCompArg(block.getArgs()))\n {\n executionErrors++;\n testsSuccessful = false;\n }\n else\n {\n testsSuccessful = false;\n }\n testPassed = false;\n testApproximate = false;\n if (debug) {\n break RUN_TESTS;\n }\n }\n //Ty Carpenter Issue #89\n //If there is no NOCOMP tag, testPassed and testApproximate are counted\n if(noComp == false)\n {\n\n TextFileReader errorIn = new TextFileReader(testingPath + tempErrorFileName);\n List<String> errorOutput = errorIn.getText();\n for( String line : errorOutput )\n {\n line = line.replace( testingPath+tempProgramFileName, userFileName );\n results.add( \"E \" + line );\n }\n\n results.add(\"\");\n\n\n if( testPassed )\n {\n testsPassed.set(positionInNameList,\n testsPassed.get(positionInNameList)+1);\n }\n \n if( testApproximate )\n {\n testsApproximate.set(positionInNameList,\n testsApproximate.get(positionInNameList)+1);\n }\n }\n //Ty Carpenter Issue #89\n //Resets NOCOMP argument for future tests\n else\n {\n //nocompTestsRun is counted\n nocompTestsRun.set(positionInNameList,\n testsRun.get(positionInNameList)+1);\n noComp = false;\n }\n testsRun.set(positionInNameList,\n testsRun.get(positionInNameList)+1);\n\n } \n } \n catch (Exception ex) \n {\n results.add(\"Exception: \" + ex.getMessage() + \"\\n\");\n statusTextArea.append(\"Can't run test: \" + pythonFileName + ex.getMessage() + \"\\n\");\n statusTextArea.update(statusTextArea.getGraphics());\n if(!hasNoCompArg(block.getArgs()))\n {\n canNotRun++;\n testsSuccessful = false;\n }\n else\n {\n testsSuccessful = false;\n }\n if (debug) \n {\n break RUN_TESTS;\n }\n }\n }\n //Brendan Villnave\n //Edited the following lines so everything after \"Run Completed!\"\n //gets added to the $TEST$RESULTS$.txt file as well\n TextFileWriter outFile = new TextFileWriter(testingPath + resultsFileName);\n if (!debug) {\n deleteFile(testingPath + tempProgramFileName);\n deleteFile(testingPath + tempInputFileName);\n deleteFile(testingPath + tempOutputFileName);\n deleteFile(testingPath + tempErrorFileName);\n }\n statusTextArea.append(\"Run completed!\\n\\n\");\n //Ty Carpenter Issue #89\n //testsSuccessful variable is now counted in overal statistics of the tests\n \n if (incorrectValues == 0\n && incorrectText == 0\n && incorrectSpacing == 0\n && extraBlankLines == 0\n && missingBlankLines == 0\n && canNotRun == 0\n && executionErrors == 0\n && testsSuccessful == true) {\n // TODO - in debug mode, this gets printed sometimes when it shouldn't\n //Determines ALL TESTS RUN vs ALL TESTS RUN EXACTLY CORRECTLY\n if(nocompInTests==true)\n {\n statusTextArea.append(\"ALL TESTS RAN\\n\");\n results.add(\"ALL TESTS RUN EXACTLY CORRECTLY\\n\");\n }\n else\n {\n statusTextArea.append(\"ALL TESTS EXACTLY CORRECT\\n\");\n results.add(\"ALL TESTS RUN EXACTLY CORRECTLY\\n\");\n }\n } else {\n // TODO - give option to open student's code\n statusTextArea.append(\"Incorrect values ............ \" \n + incorrectValues + \"\\n\");\n results.add(\"Incorrect values ............ \" \n + incorrectValues + \"\\n\");\n statusTextArea.append(\"Lines with errors ........... \" \n + incorrectText + \"\\n\");\n results.add(\"Lines with errors ........... \" \n + incorrectText + \"\\n\");\n statusTextArea.append(\"Bad spacing/capitalization .. \" \n + incorrectSpacing + \"\\n\");\n results.add(\"Bad spacing/capitalization .. \" \n + incorrectSpacing + \"\\n\");\n statusTextArea.append(\"Extra/missing blank lines ... \"\n + (extraBlankLines + missingBlankLines) + \"\\n\");\n results.add(\"Extra/missing blank lines ... \"\n + (extraBlankLines + missingBlankLines) + \"\\n\");\n statusTextArea.append(\"Python errors ............... \" \n + (executionErrors)+\"\\n\");\n results.add(\"Python errors ............... \" \n + (executionErrors)+\"\\n\");\n statusTextArea.append(\"Can't run test .............. \" \n + canNotRun +\"\\n\");\n results.add(\"Can't run test .............. \" \n + canNotRun +\"\\n\");\n statusTextArea.append(\"Code was successful .............. \" \n + testsSuccessful +\"\\n\");\n results.add(\"Code was successful .............. \" \n + testsSuccessful +\"\\n\");\n }\n statusTextArea.append(\"\\n\");\n \n for(int i=0; i<fileNames.size(); i++)\n {\n int passes = testsPassed.get(i);\n int approximate = testsApproximate.get(i);\n int run = testsRun.get(i);\n int nocompRun = nocompTestsRun.get(i);\n \n String dots = \" ................................................\";\n statusTextArea.append( ( fileNames.get(i)+dots).substring(0,41)+\" \");\n results.add(( fileNames.get(i)+dots).substring(0,41)+\" \");\n \n \n if(run == 0 )\n \n {\n statusTextArea.append(\"NO TESTS RUN\\n\");\n results.add(\"NO TESTS RUN\\n\");\n }\n //new results output All Tests Ran (check output)\n else if(nocompRun == run)\n {\n statusTextArea.append(\"All Tests Ran (check output)\\n\");\n results.add(\"All Tests Ran (check output)\\n\");\n }\n else if(passes == run)\n {\n statusTextArea.append(\"All Tests Passed\\n\");\n results.add(\"All Tests Passed\\n\");\n }\n else{\n \n statusTextArea.append( passes + \"/\" + approximate + \"/\" + \n run + \" tests passed/approximate/run\\n\");\n results.add(passes + \"/\" + approximate + \"/\" + \n run + \" tests passed/approximate/run\\n\");\n }\n }\n\n statusTextArea.update(statusTextArea.getGraphics());\n outFile.writeLines(results);\n outFile.close();\n \n }",
"@Test\n\tpublic void testGetPageContents() throws IOException {\n\t\tClassLoader classLoader = getClass().getClassLoader();\n\t\tInputStream input = classLoader.getResourceAsStream(\"com/bobbylough/crawler/support/allV.txt\");\n\t\tBufferedInputStream bufferedInput = new BufferedInputStream(input);\n\t\tStringBuffer result = helper.getPageContents(bufferedInput);\n\t\tassertEquals(50176, result.length());\n\t\tString filteredResult = result.toString().replace(\"v\", \"\");\n\t\tassertEquals(148, filteredResult.length());\n\t\tfilteredResult = filteredResult.replace(\"\\n\", \"\");\n\t\tassertEquals(0, filteredResult.length());\n\t}",
"private String[] getNetFile() throws Exception\n {\n RandomAccessFile reader = new RandomAccessFile(\"/proc/net/dev\", \"r\");\n int lineNum = 0;\n List<String> allLines = new ArrayList<String>();\n String line = reader.readLine();\n while(line != null)\n {\n allLines.add(line);\n line = reader.readLine();\n }\n String[] withExtra = allLines.get(4).split(\"\\\\s+\"); //leaves empty string in spot 0 of area\n String[] retVal = new String[withExtra.length - 1];\n for(int i = 1; i < withExtra.length; i++)\n {\n retVal[i - 1] = withExtra[i];\n }\n return(retVal);\n //return(retArray);\n }",
"public static String m569b() {\r\n LineNumberReader lineNumberReader;\r\n Throwable th;\r\n InputStreamReader inputStreamReader = null;\r\n String str = \"0000000000000000\";\r\n InputStreamReader inputStreamReader2;\r\n try {\r\n inputStreamReader2 = new InputStreamReader(Runtime.getRuntime().exec(\"cat /proc/cpuinfo | grep Serial\").getInputStream());\r\n try {\r\n lineNumberReader = new LineNumberReader(inputStreamReader2);\r\n int i = 1;\r\n while (i < 100) {\r\n try {\r\n String readLine = lineNumberReader.readLine();\r\n if (readLine != null) {\r\n if (readLine.indexOf(\"Serial\") >= 0) {\r\n str = readLine.substring(readLine.indexOf(\":\") + 1, readLine.length()).trim();\r\n break;\r\n }\r\n i++;\r\n }\r\n } catch (Exception e) {\r\n inputStreamReader = inputStreamReader2;\r\n } catch (Throwable th2) {\r\n th = th2;\r\n }\r\n }\r\n try {\r\n lineNumberReader.close();\r\n } catch (IOException e2) {\r\n }\r\n try {\r\n inputStreamReader2.close();\r\n } catch (IOException e3) {\r\n }\r\n } catch (Exception e4) {\r\n lineNumberReader = null;\r\n inputStreamReader = inputStreamReader2;\r\n if (lineNumberReader != null) {\r\n try {\r\n lineNumberReader.close();\r\n } catch (IOException e5) {\r\n }\r\n }\r\n if (inputStreamReader != null) {\r\n try {\r\n inputStreamReader.close();\r\n } catch (IOException e6) {\r\n }\r\n }\r\n return str;\r\n } catch (Throwable th3) {\r\n th = th3;\r\n lineNumberReader = null;\r\n if (lineNumberReader != null) {\r\n try {\r\n lineNumberReader.close();\r\n } catch (IOException e7) {\r\n }\r\n }\r\n if (inputStreamReader2 != null) {\r\n try {\r\n inputStreamReader2.close();\r\n } catch (IOException e8) {\r\n }\r\n }\r\n throw th;\r\n }\r\n } catch (Exception e9) {\r\n lineNumberReader = null;\r\n if (lineNumberReader != null) {\r\n lineNumberReader.close();\r\n }\r\n if (inputStreamReader != null) {\r\n inputStreamReader.close();\r\n }\r\n return str;\r\n } catch (Throwable th4) {\r\n th = th4;\r\n lineNumberReader = null;\r\n inputStreamReader2 = null;\r\n if (lineNumberReader != null) {\r\n lineNumberReader.close();\r\n }\r\n if (inputStreamReader2 != null) {\r\n inputStreamReader2.close();\r\n }\r\n throw th;\r\n }\r\n return str;\r\n }",
"@Test(timeout = 4000)\n public void test14() throws Throwable {\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n stringArray0[1] = \"\";\n stringArray0[2] = \"\";\n stringArray0[3] = \"\";\n stringArray0[4] = \"Error in readFilej) : \";\n stringArray0[5] = \"\";\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"QZkj>P.|?`(ZTS\");\n FileSystemHandling.appendLineToFile(evoSuiteFile0, \"\");\n FileSystemHandling.appendStringToFile(evoSuiteFile0, \"\");\n stringArray0[7] = \"\";\n stringArray0[8] = \"\";\n StringReader stringReader0 = new StringReader(\"\");\n char[] charArray0 = new char[2];\n charArray0[0] = 'u';\n charArray0[1] = ']';\n stringReader0.read(charArray0);\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n JSJshop jSJshop0 = null;\n try {\n jSJshop0 = new JSJshop(\"QZkj>P.|?`(ZTS\", \"Error in readFilej) : \");\n fail(\"Expecting exception: System.SystemExitException\");\n \n } catch(System.SystemExitException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.evosuite.runtime.System\", e);\n }\n }",
"public static void main(String[] args) {\n testSplitterNullOrEmpty();\n }",
"@Test\n public void test16() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1336,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test16\");\n File file0 = new File(\"\");\n file0.toString();\n Iterator<?> iterator0 = IteratorUtils.getIterator((Object) \"\");\n assertEquals(true, iterator0.hasNext());\n assertNotNull(iterator0);\n }",
"@Test(timeout = 4000)\n public void test28() throws Throwable {\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/NULL__Z?WOZ.XML\");\n byte[] byteArray0 = new byte[9];\n FileSystemHandling.appendDataToFile(evoSuiteFile0, byteArray0);\n FileUtil fileUtil0 = new FileUtil();\n FileInputStream fileInputStream0 = fileUtil0.fetchBNFile((String) null, \"\", \"z?woZ\");\n assertEquals(9, fileInputStream0.available());\n }",
"@Test\n public void getUserAgentStringWithoutExtra()\n {\n //arrange\n ProductInfo actual = new ProductInfo();\n\n //act\n String actualUserAgentString = actual.getUserAgentString();\n\n //assert\n assertEquals(TransportUtils.USER_AGENT_STRING, actualUserAgentString);\n }",
"@Test\n @Tag(\"slow\")\n public void testSHIP04S() {\n CuteNetlibCase.doTest(\"SHIP04S.SIF\", \"1798714.7004453915\", null, NumberContext.of(7, 4));\n }",
"@Test\n public void propertyTest() throws Exception {\n String unMatchedTriples = \"\";\n StmtIterator msIter = propertyMeasuringStick.listStatements();\n while (msIter.hasNext()) {\n Statement msStmt = msIter.nextStatement();\n // TODO: find a more formal way to filter out properties we don't need to test\n if (!msStmt.getPredicate().toString().equals(\"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\") &&\n !msStmt.getPredicate().toString().equals(\"http://www.w3.org/2000/01/rdf-schema#subPropertyOf\")) {\n StmtIterator poIter = propertyOutput.listStatements();\n boolean match = false;\n while (poIter.hasNext()) {\n Statement outputStmt = poIter.nextStatement();\n if (outputStmt.equals(msStmt)) {\n match = true;\n }\n }\n // If a match is not found then set this statement.\n if (!match) {\n unMatchedTriples += msStmt.getSubject() + \" \" + msStmt.getPredicate().toString() + \" \" + msStmt.getObject().toString() + \" .\\n\";\n }\n }\n }\n // Output assertion with message of results\n if (!unMatchedTriples.equals(\"\"))\n assertTrue(\"\\nThe following triples ARE in \" + propertyOutputFileName + \" but NOT in propertyMeasuringStick.n3:\\n\" + unMatchedTriples\n , false);\n else\n assertTrue(true);\n\n }",
"private void testCases(int start, int stop) throws FileNotFoundException,\n IOException\n {\n BufferedReader br = new BufferedReader(new FileReader(\n \"testCases.txt\"));\n int n = 1;\n String handLine = null;\n while ((handLine = br.readLine()) != null)\n {\n String upCardLine = br.readLine();\n String calledColorLine = br.readLine();\n String validPlaysLine = br.readLine();\n // consume --------- delimiter\n br.readLine();\n\n if (n >= start && n <= stop)\n {\n // run n-th test\n testStrings(handLine, upCardLine, calledColorLine,\n validPlaysLine, n);\n }\n n++;\n }\n br.close();\n }",
"@Test(timeout = 4000)\n public void test058() throws Throwable {\n StringReader stringReader0 = new StringReader(\"b|}T=mM,PuM8AP|}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 0, 0);\n assertEquals((-1), javaCharStream0.bufpos);\n \n char[] charArray0 = javaCharStream0.GetSuffix(0);\n assertEquals(0, charArray0.length);\n }",
"@Test\r\n\tpublic void testSavedFile() throws FileNotFoundException {\r\n\r\n\t\tScanner in = new Scanner(new FileReader(\"FactoryScenarios/MyExample.txt\"));\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\twhile (in.hasNext()) {\r\n\t\t\tsb.append(in.next());\r\n\t\t}\r\n\t\tin.close();\r\n\t\tString outString = sb.toString();\r\n\r\n\t\tString expected = \"Cell6Button4/~disp-string:hello/~repeat-button:2/~skip-button:02/~skip:3/~pause:5/~disp-clearAll\";\r\n\r\n\t\tassertEquals(expected, outString);\r\n\r\n\t}",
"@Test\r\n public void introspectConfiguration() {\r\n HelpConfigStreamConsumer consumer = new HelpConfigStreamConsumer();\r\n consumer.consumeLine(\"iMaker 09.24.01, 10-Jun-2009.\");\r\n consumer.consumeLine(\"Finding available configuration file(s):\");\r\n consumer.consumeLine(\"/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n consumer.consumeLine(\"/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n consumer.consumeLine(\"X:/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n consumer.consumeLine(\"X:/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n consumer.consumeLine(\"\");\r\n \r\n // Verifying string output\r\n String[] expected = new String[4];\r\n expected[0] = \"/epoc32/rom/config/platform/product/image_conf_product.mk\";\r\n expected[1] = \"/epoc32/rom/config/platform/product/image_conf_product_ui.mk\";\r\n expected[2] = \"X:/epoc32/rom/config/platform/product/image_conf_product.mk\";\r\n expected[3] = \"X:/epoc32/rom/config/platform/product/image_conf_product_ui.mk\";\r\n assertArrayEquals(expected, consumer.getConfigurations().toArray(new String[4]));\r\n\r\n // Verifying the file output\r\n File[] expectedFile = new File[4];\r\n if (new File(\"/epoc32/rom/config/platform/product/image_conf_product.mk\").isAbsolute()) {\r\n // Unix like os\r\n expectedFile[0] = new File(\"/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n expectedFile[1] = new File(\"/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n expectedFile[2] = new File(new File(\".\"), \"X:/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n expectedFile[3] = new File(new File(\".\"), \"X:/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n } else {\r\n // Windows like os\r\n expectedFile[0] = new File(new File(\".\"), \"/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n expectedFile[1] = new File(new File(\".\"), \"/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n expectedFile[2] = new File(\"X:/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n expectedFile[3] = new File(\"X:/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n }\r\n assertArrayEquals(expectedFile, consumer.getConfigurations(new File(\".\")).toArray(new File[4]));\r\n }",
"public void blankremover(String args) {\r\n\r\n Scanner file;\r\n PrintWriter writer;\r\n\r\n try {\r\n\r\n file = new Scanner(new File(args));\r\n writer = new PrintWriter(\"gpstest100.txt\");\r\n\r\n while (file.hasNext()) {\r\n String line = file.nextLine();\r\n if (!line.isEmpty()) {\r\n writer.write(line);\r\n writer.write(\"\\n\");\r\n }\r\n }\r\n\r\n file.close();\r\n writer.close();\r\n\r\n } catch (FileNotFoundException ex) {\r\n //Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);\r\n \t \r\n } \r\n \r\n}",
"@Test\r\n @Ignore\r\n public void testGetPasteSite() {\r\n }",
"@Test(timeout = 4000)\n public void test32() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n File file0 = fileUtil0.getASINFile(\"\", \"v<B(aXlp#d/?cL2Q??\", \"i@\", \"g_\");\n assertNull(file0);\n }",
"@Test\n @Tag(\"slow\")\n public void testSHIP12S() {\n CuteNetlibCase.doTest(\"SHIP04L.SIF\", \"1793324.5379703548\", null, NumberContext.of(7, 4));\n }",
"@Test\n public void testNonEmptyExcerpt_skip() throws IOException {\n checkSkip(excerpt(makeDigits(), 1, 8), 1, 1, '2');\n\n // skip up to the end of the excerpt.\n checkSkip(excerpt(makeDigits(), 2, 6), 6, 6, EOF);\n\n // try to skip past the end of the excerpt.\n checkSkip(excerpt(makeDigits(), 2, 6), 7, 6, EOF);\n }",
"@Test(timeout = 4000)\n public void test13() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n fileUtil0.renameFile(\"tX )E\", \"tX )E\");\n fileUtil0.downloadCart(\"tX )E\");\n EvoSuiteURL evoSuiteURL0 = new EvoSuiteURL(\"http://xml.amazon.net/onca/xml3?t=popcornmonste2-20&dev-t=DSB0XDDW1GQ3S&BrowseNodeSearch=1;XU-2`&mode=\\\\#^uu!B1x/lh-*M,)6&type=lite&page=There is no Properties File Setting to default&offer=new&f=xml\");\n NetworkHandling.createRemoteTextFile(evoSuiteURL0, \"tX )E\");\n fileUtil0.fetchKeywordSearchFile(\"+(jC + 3`\", \"#^uu!B1x/lh-*M,)6\", \"tX )E\", \"There is no Properties File Setting to default\");\n fileUtil0.downloadKeywordSearchFile(\"tX )E\", \"tX )E\", \"+(jC + 3`\", \"#^uu!B1x/lh-*M,)6\");\n MockFile.createTempFile(\"#^uu!B1x/lh-*M,)6\", \"tX )E\", (File) null);\n fileUtil0.downloadSimilaritesFile(\"tX )E\", \"lite\", \"tX )E\");\n ArrayList<String> arrayList0 = new ArrayList<String>();\n arrayList0.iterator();\n fileUtil0.downloadAccessoriesFile(\"+(jC + 3`\", arrayList0, \"There is no Properties File Setting to default\");\n fileUtil0.renameFile(\"1;XU-2`\", \"tX )E\");\n fileUtil0.downloadBrowseNodeFile(\"+(jC + 3`\", \"R\", \"+(jC + 3`\", \"+(jC + 3`\");\n fileUtil0.downloadBlendedSearchFile(\"1;XU-2`\", \"#^uu!B1x/lh-*M,)6\");\n fileUtil0.renameFile(\"@Yly^-s.@l\", \"tX )E\");\n fileUtil0.downloadSimilaritesFile(\"@Yly^-s.@l\", \"+(jC + 3`\", \"http://xml.amazon.net/onca/xml3\");\n fileUtil0.downloadBrowseNodeFile(\"tX )E\", \"tX )E\", \"http://xml.amazon.net/onca/xml3\", \"1;XU-2`\");\n fileUtil0.downloadOneASINFile(\"#^uu!B1x/lh-*M,)6\", \"'d&Andc.-pE]$E]0\\t\", \"\", \"tX )E\", \"Jk=S(2?.}+~aac+SeU\");\n fileUtil0.downloadGenericSearchFile(\"#^uu!B1x/lh-*M,)6\", \"'d&Andc.-pE]$E]0\\t\", \"\", \"http://xml.amazon.net/onca/xml3\", \"zsWYd.xqZ4/?(dPNX\", \"R\");\n FileInputStream fileInputStream0 = fileUtil0.fetchBNFile(\"#^uu!B1x/lh-*M,)6\", \"1;XU-2`\", \"There is no Properties File Setting to default\");\n assertNull(fileInputStream0);\n }",
"@Test\n\tpublic void test() {\n\t\tString url = \"URL http://www.nuigalway.ie/c3/documents/3pentanonethermo.dat\";\n\t\t//String url = \"URL http://www.nuigalway.ie/c3/documents/DIB_mechanism.dat\";\n\t\t//String url = \"URL http://www.nuigalway.ie/c3/aramco2/DATA_FILES/AramcoMech2.0.mech\";\n\t\t//String url = \"URL http://web.eng.ucsd.edu/mae/groups/combustion/sdmech/sandiego20141004/sandiego20141004_mechCK.txt\";\n\t\t//String url = \"URL http://web.eng.ucsd.edu/mae/groups/combustion/sdmech/sandiego_nitrogen/NOx_20041209/NOXsandiego20041209.mec\";\n\t\t//String url = \"URL https://combustion.llnl.gov/content/assets/docs/combustion/h2_v1b_mech.txt\";\n\t\t//String url = \"URL http://www.nuigalway.ie/c3/documents/Methanol_2016_mech.inp\";\n\t\t//String url = \"URL http://www.nuigalway.ie/c3/documents/56.55_c3_chem.inp\";\n\t\t//String url = \"URL https://combustion.llnl.gov/content/assets/docs/combustion/i-pentanol_v46_06_release_inp.txt\";\n\t\t//String url = \"URL http://www.nuigalway.ie/c3/documents/c3oh_49.mech\";\n\t\t//String resource = \"RESOURCE info/esblurock/react/resources/mechanisms/LLNLHeptane\";\n\t\tReadToString read = new ReadToString();\n\t\ttry {\n\t\t\t//String input = read.parseFromLineSpecification(resource);\n\t\t\tString input = read.parseFromLineSpecification(url);\n\t\t\t//URLToString urlstring = new URLToString(resource);\n\t\t\t//String input = urlstring.toString();\n\t\t\tString commentChar = \"!\";\n\t\t\tChemkinString lines = new ChemkinString(input, commentChar);\n\t\t\tChemkinMechanism mechanism = new ChemkinMechanism();\n\t\t\tlines.nextToken();\n\t\t\tmechanism.parse(lines, commentChar);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//System.out.println(urlstring.toString());\n\n\t}",
"@Test\n\tpublic void testCombinedCongestionNoise() {\n\t\t\n\t\tString eventsFile = utils.getInputDirectory() + \"testCombinedCongestionNoiseEvents.xml\";\n\t\t\n\t\tScenario scenario = createScenario(3);\n\t\tCongestionAndNoiseHandler congestionAndNoiseHandler = analyseScenario(eventsFile, scenario);\n\t\t\n\t\tif (printResults) printResults(congestionAndNoiseHandler, scenario);\n\t\t\n\t\t// check congestion\n\t\t\n\t\tAssert.assertTrue(\"There should be a handled CongestionEvent!\", congestionAndNoiseHandler.getCongestionHandler().isCaughtCongestionEvent());\n\t\tAssert.assertEquals(\"The totalDelay should be 100!\", 100.0, congestionAndNoiseHandler.getCongestionHandler().getTotalDelay(), MatsimTestUtils.EPSILON);\n\t\t\n\t\tAssert.assertEquals(\"There should be a causedDelay of 100 for person 0, trip 1!\", 100.0, \n\t\t\t\tcongestionAndNoiseHandler.getCongestionHandler().getPersonId2tripNumber2causedDelay().get(Id.create(0, Person.class)).get(1), MatsimTestUtils.EPSILON);\n\t\tAssert.assertNull(\"There should not be a affectedDelay for person 0, trip 1!\", \n\t\t\t\tcongestionAndNoiseHandler.getCongestionHandler().getPersonId2tripNumber2affectedDelay().get(Id.create(0, Person.class)));\n\t\t\n\t\tAssert.assertNull(\"There should not be a causedDelay for person 1, trip 1!\", \n\t\t\t\tcongestionAndNoiseHandler.getCongestionHandler().getPersonId2tripNumber2causedDelay().get(Id.create(1, Person.class)));\n\t\tAssert.assertEquals(\"There should be a affectedDelay of 100 for person 1, trip 1!\", 100.0, \n\t\t\t\tcongestionAndNoiseHandler.getCongestionHandler().getPersonId2tripNumber2affectedDelay().get(Id.create(1, Person.class)).get(1), MatsimTestUtils.EPSILON);\n\t\t\n\t\t// check noise\n\t\t\n\t\tAssert.assertTrue(\"There should be a handled NoiseEvent!\", congestionAndNoiseHandler.getNoiseHandler().isCaughtNoiseEvent());\n\t\tAssert.assertEquals(\"The total causedNoiseCosts should be 200!\", 200.0, congestionAndNoiseHandler.getNoiseHandler().getCausedNoiseCost(), MatsimTestUtils.EPSILON);\n\t\tAssert.assertEquals(\"The total affectedNoiseCosts should be 200!\", 200.0, congestionAndNoiseHandler.getNoiseHandler().getAffectedNoiseCost(), MatsimTestUtils.EPSILON);\n\t\t\n\t\tAssert.assertEquals(\"The total causedNoiseCosts of person 0 should be 100!\", 100.0, \n\t\t\t\tcongestionAndNoiseHandler.getNoiseHandler().getPersonId2causedNoiseCost().get(Id.create(0, Person.class)), MatsimTestUtils.EPSILON);\n\t\tAssert.assertNotNull(\"There should be a causedNoiseCost for at least one trip for person 0!\", \n\t\t\t\tcongestionAndNoiseHandler.getNoiseHandler().getPersonId2tripNumber2causedNoiseCost().get(Id.create(0, Person.class)));\n\t\tAssert.assertEquals(\"The causedNoiseCosts of person 0 for trip 0 should be 100!\", 100.0, \n\t\t\t\tcongestionAndNoiseHandler.getNoiseHandler().getPersonId2tripNumber2causedNoiseCost().get(Id.create(0, Person.class)).get(1), MatsimTestUtils.EPSILON);\n\t\tAssert.assertNull(\"There should not be affectedNoiseCosts at all for person 0!\", \n\t\t\t\tcongestionAndNoiseHandler.getNoiseHandler().getPersonId2affectedNoiseCost().get(Id.create(0, Person.class)));\n\t\t\n\t\tAssert.assertEquals(\"The total causedNoiseCosts of person 1 should be 100!\", 100.0, \n\t\t\t\tcongestionAndNoiseHandler.getNoiseHandler().getPersonId2causedNoiseCost().get(Id.create(1, Person.class)), MatsimTestUtils.EPSILON);\n\t\tAssert.assertNotNull(\"There should be a causedNoiseCost for at least one trip for person 1!\", \n\t\t\t\tcongestionAndNoiseHandler.getNoiseHandler().getPersonId2tripNumber2causedNoiseCost().get(Id.create(1, Person.class)));\n\t\tAssert.assertEquals(\"The causedNoiseCosts of person 1 for trip 0 should be 100!\", 100.0, \n\t\t\t\tcongestionAndNoiseHandler.getNoiseHandler().getPersonId2tripNumber2causedNoiseCost().get(Id.create(1, Person.class)).get(1), MatsimTestUtils.EPSILON);\n\t\tAssert.assertNull(\"There should not be affectedNoiseCosts at all for person 1!\", \n\t\t\t\tcongestionAndNoiseHandler.getNoiseHandler().getPersonId2affectedNoiseCost().get(Id.create(1, Person.class)));\n\t\t\n\t\tAssert.assertNull(\"There should not be causedNoiseCosts at all for person 2!\", \n\t\t\t\tcongestionAndNoiseHandler.getNoiseHandler().getPersonId2causedNoiseCost().get(Id.create(2, Person.class)));\n\t\tAssert.assertEquals(\"The affectedNoiseCosts of person 2 should be 200!\", 200.0, \n\t\t\t\tcongestionAndNoiseHandler.getNoiseHandler().getPersonId2affectedNoiseCost().get(Id.create(2, Person.class)), MatsimTestUtils.EPSILON);\n\t\t\n\t}",
"public StringTokenizer getNIC() {\n\n String targetFile = \"/etc/path_to_inst\";\n StringTokenizer nicTokStrg = null;\n\n try {\n\n FileReader fr = new FileReader(targetFile);\n BufferedReader br = new BufferedReader(fr);\n\n String line = null;\n String nicStrg = \" \";\n\n while((line = br.readLine()) != null) {\n StringTokenizer tokStrg = new StringTokenizer(line, \"\\\"\");\n\n if(tokStrg.countTokens() == 3) {\n\n String notUsed = tokStrg.nextToken();\n String indexStrg = tokStrg.nextToken().trim();\n String nameStrg = tokStrg.nextToken().trim();\n\n if(nameStrg.equals(\"le\") || nameStrg.equals(\"hme\")) {\n nicStrg = nicStrg + \" \" + nameStrg + indexStrg;\n }\n }\n }\n\n if(nicStrg.trim().length() > 0) {\n nicTokStrg = new StringTokenizer(nicStrg);\n }\n fr.close();\n\n } catch(FileNotFoundException f) {\n //ignore\n //setLabel(targetFile + \" not found.\");\n }\n catch(IOException g) {\n //setLabel(\"Error reading \" + targetFile );\n }\n\n return nicTokStrg;\n }",
"@Test\n @Ignore(\"Zip file compare have some problem\")\n public void testOutputCompressDelimitedMode() throws Throwable {\n testCompressFile(false);\n }",
"@Test(timeout = 4000)\n public void test162() throws Throwable {\n StringReader stringReader0 = new StringReader(\"=<D!T!tLp\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 87);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n MockPrintStream mockPrintStream0 = new MockPrintStream(\"=<D!T!tLp\");\n javaParserTokenManager0.setDebugStream(mockPrintStream0);\n }",
"@Test\n\tpublic void testBytesToHexStringForSrcMode() throws Exception {\n//TODO: Test goes here... \n\t}",
"@Test(timeout = 4000)\n public void test15() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.useBinNumbersTipText();\n // Undeclared exception!\n try { \n discretize0.getOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // No output format defined.\n //\n verifyException(\"weka.filters.Filter\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test32() throws Throwable {\n String string0 = EWrapperMsgGenerator.updateNewsBulletin(11, 13, \"E{Iw-^%H:1$e/\", \"LW)W-|=b,lie*CW\");\n assertEquals(\"MsgId=11 :: MsgType=13 :: Origin=LW)W-|=b,lie*CW :: Message=E{Iw-^%H:1$e/\", string0);\n }",
"@Test\n public void test22() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1343,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test22\");\n Properties[] propertiesArray0 = new Properties[9];\n ResettableIterator<Properties> resettableIterator0 = IteratorUtils.arrayIterator(propertiesArray0);\n Iterable<Properties> iterable0 = IteratorUtils.asIterable((Iterator<? extends Properties>) resettableIterator0);\n assertNotNull(iterable0);\n }",
"@Test\n public void test34() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString(\"reducedErrorPruningTipText\");\n assertEquals(\"reducedErrorPruningTipText\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n }",
"public void testFileWithDosEol()\n {\n try {\n SalesFile t = new SalesFile(\"samples/data/in/base_dos_eol.dat\", AppConfig.fieldDelimiter);\n t.read();\n assertEquals(t.getTotalSalesman(), 2);\n assertEquals(t.getTotalCustomers(), 2);\n assertEquals(t.getMostExpensiveSaleId(), \"10\");\n assertEquals(t.getWorstSalesman(), \"Renato\");\n } catch(RecordInvalidTokenException ex) {\n assertTrue(\"This file is well formed, but something is wrong!\", false);\n } catch(FileNotFoundException e) {\n assertTrue(\"File must exist to complete the test!\", false);\n } catch(IOException e) {\n assertTrue(\"IO exception!\", false);\n }\n }",
"@Test\n\tpublic void testParseTagFile_Failure() throws IOException \n\t{\n\t\tString expected = \"aus-capitals|8\";\t\t\n\t\t\n\t\t// Act\n\t\t// need to be modified the hardcoded path with mocking\n\t\tString actual = TagFileParser.readTagFile(\"D:\\\\Learning\\\\testlocation\\\\aus-capitals.tag\");\n\t\t\n\t\t// Assert\t\t\n\t\tassertNotEquals(expected, actual);\t\n\t}",
"@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.findNumBinsTipText();\n // Undeclared exception!\n try { \n discretize0.output();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // No output instance format defined\n //\n verifyException(\"weka.filters.Filter\", e);\n }\n }",
"public static void main(String[] args) throws IOException {\n InputStream is = new FileInputStream(\"\");\n System.out.print ((char)is.read());\n is.skip(2);\n is.read();\n System.out.print((char)is.read());\n System.out.print((char)is.read());\n }",
"@Test(timeout = 4000)\n public void test29() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(73);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"{\");\n Node node0 = simpleNode0.parent;\n simpleNode0.setIdentifier(\"{\");\n StringWriter stringWriter0 = new StringWriter(73);\n simpleNode0.dump(\"{nt@W\\bYpd9U=VG\", stringWriter0);\n simpleNode0.setIdentifier(\"NameList\");\n simpleNode0.setIdentifier(\"^eRGLNy;\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n simpleNode0.setIdentifier(\"C\");\n StringReader stringReader0 = new StringReader(\"zp@:cn>UP\");\n simpleNode0.setIdentifier(\"AllocationExpression\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n simpleNode0.setIdentifier(\"NameList\");\n SimpleNode simpleNode1 = new SimpleNode(68);\n Node[] nodeArray0 = new Node[0];\n simpleNode1.children = nodeArray0;\n Node[] nodeArray1 = new Node[1];\n nodeArray1[0] = null;\n simpleNode1.children = nodeArray1;\n simpleNode1.toString(\"LT\\\"PgE')tE0cI%&Dl\");\n simpleNode0.setIdentifier(\"AllocationExpression\");\n simpleNode1.dump(\"NameList\", stringWriter0);\n simpleNode0.toString();\n simpleNode0.toString(\">=\");\n simpleNode0.dump(\"<SkoVR *\", stringWriter0);\n assertEquals(\"<Block>\\n</Block>\\n<AllocationExpression></AllocationExpression>\\n<Block>\\n <identifier>NameList</identifier>\\n <identifier>^eRGLNy;</identifier>\\n <identifier>C</identifier>\\n <identifier>AllocationExpression</identifier>\\n <identifier>NameList</identifier>\\n <identifier>AllocationExpression</identifier>\\n</Block>\\n\", stringWriter0.toString());\n }",
"@Test\n\tpublic void testReadFileIntoStringNull() throws IOException {\n\t\tsfr = ss.createFileReader(\"non-existing-type\");\n\t\tString actualString = sfr.readFileIntoString(TEST_CLASS_LOCAL);\n\t\tassertNull(actualString);\n\t}",
"@Test\n public void testCFWithoutValuePartitioning() {\n testWithoutValuePartitioning(\"test-resources/src/micro-different-loop-kinds/CF.js\");\n }",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean readNetwrodInfo() {\n\t\tboolean flag = oTest.readNetwrodInfo();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}",
"@Test(timeout = 4000)\n public void test004() throws Throwable {\n StringReader stringReader0 = new StringReader(\"b|}T=mM,PuM8AP|}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 0, 0);\n char char0 = javaCharStream0.BeginToken();\n assertEquals('b', char0);\n \n char[] charArray0 = javaCharStream0.GetSuffix(0);\n assertEquals(0, charArray0.length);\n assertEquals(0, javaCharStream0.getBeginColumn());\n assertEquals(10, javaCharStream0.getBeginLine());\n }",
"@Test\n public void testOutputDelimited() throws Throwable {\n testOutputDelimited(false);\n }",
"@Test\n\tpublic void testStandardTee() throws Exception {\n\t\tfinal String reference = \"test\";\n\t\tfinal Reader source = new StringReader(reference);\n\t\tfinal StringWriter destination1 = new StringWriter();\n\t\tfinal StringWriter destination2 = new StringWriter();\n\n\t\tfinal TeeWriter tee = new TeeWriter(destination1, destination2);\n\t\torg.apache.commons.io.IOUtils.copy(source, tee);\n\t\ttee.close();\n\n\t\tassertEquals(\"the two string are equals\", reference,\n\t\t\t\tdestination1.toString());\n\t\tassertEquals(\"the two string are equals\", reference,\n\t\t\t\tdestination2.toString());\n\t\tassertEquals(\"byte count\", reference.length(), tee.getSize());\n\t}",
"@Test\n\tpublic void testReadRowRelationPowerTool() throws SQLException\n\t{\n\t\tnew PowerTool(\"asdf\", 5, 5, \"PowerTooldescription\", true);\n\t\tnew StripNail(\"UPC\", 5, 5, 3.33, 9);\n\t\t\n\t\tnew PowerToolsToStripNailsMapper(1,2);\n\t\t\n\t\tArrayList<Integer> powerToolsRelatedToStripNail = DatabaseGateway.readRowRelationPowerTool(1);\n\t\tassertTrue(powerToolsRelatedToStripNail.contains(2));\n\t}",
"public void testPegList() throws IOException {\n PegList testList = new PegList(new File(\"data\", \"testP.fa\"));\n Sequence found = testList.get(\"fig|1538.8.peg.30\");\n assertNull(found);\n found = testList.get(\"fig|1538.8.peg.12\");\n assertThat(found.getLabel(), equalTo(\"fig|1538.8.peg.12\"));\n Sequence found7 = testList.get(\"fig|1538.8.peg.7\");\n Sequence found2 = testList.get(\"fig|1538.8.peg.2\");\n Sequence found3 = testList.get(\"fig|1538.8.peg.3\");\n Sequence found10 = testList.get(\"fig|1538.8.peg.10\");\n ArrayList<Sequence> buffer = new ArrayList<Sequence>();\n testList.findClose(found, 1, buffer);\n assertThat(buffer, contains(found2));\n testList.suppress(found2);\n testList.suppress(found3);\n testList.findClose(found, 2, buffer);\n assertThat(buffer, contains(found2, found7, found10));\n Sequence found1 = testList.get(\"fig|1538.8.peg.1\");\n Sequence found4 = testList.get(\"fig|1538.8.peg.4\");\n Sequence found5 = testList.get(\"fig|1538.8.peg.5\");\n Sequence found6 = testList.get(\"fig|1538.8.peg.6\");\n Sequence found8 = testList.get(\"fig|1538.8.peg.8\");\n Sequence found9 = testList.get(\"fig|1538.8.peg.9\");\n Sequence found11 = testList.get(\"fig|1538.8.peg.11\");\n Sequence found13 = testList.get(\"fig|1538.8.peg.13\");\n Sequence found14 = testList.get(\"fig|1538.8.peg.14\");\n Sequence found15 = testList.get(\"fig|1538.8.peg.15\");\n testList.suppress(found1);\n testList.suppress(found4);\n testList.suppress(found5);\n testList.suppress(found6);\n testList.suppress(found7);\n testList.suppress(found8);\n testList.suppress(found9);\n testList.suppress(found10);\n testList.suppress(found11);\n testList.suppress(found14);\n testList.suppress(found15);\n testList.findClose(found, 4, buffer);\n assertThat(buffer, contains(found2, found7, found10, found13));\n }",
"@Test(timeout = 4000)\n public void test07() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n fileUtil0.getASINFile(\"86c;'p`tO`dCLV8\", \"86c;'p`tO`dCLV8\", \"86c;'p`tO`dCLV8\", \"86c;'p`tO`dCLV8\");\n fileUtil0.downloadGenericSearchFile(\"86c;'p`tO`dCLV8\", \"86c;'p`tO`dCLV8\", \"\", \"\", \"86c;'p`tO`dCLV8\", \"\");\n fileUtil0.downloadCart(\"\");\n fileUtil0.fetchASINFile((String) null, \"\", \"86c;'p`tO`dCLV8\", \"/\");\n fileUtil0.fetchThirdPartySearchFile(\"7-80D\\u0004s\", \"7-80D\\u0004s\", \"\", \"w/L*\");\n fileUtil0.downloadOneASINFile(\"\", \"\", \"\", \"Nr:8N=\", \"\");\n fileUtil0.getASINFile(\"\", \"http://xml.amazon.net/onca/xml3\", \"\", \"\");\n fileUtil0.deleteFile(\"\");\n fileUtil0.downloadBrowseNodeFile(\"\", \"\", \"\", \"http://xml.amazon.net/onca/xml3\");\n FileInputStream fileInputStream0 = fileUtil0.fetchGenericSearchFile(\"w/L*\", \"Nr:8N=\", \"\", \"Nr:8N=\", \"MS[_\", \"iM_YfaKBgvQ~Mwl\");\n assertNull(fileInputStream0);\n }",
"public void ignoredTestParserUbuntu10_04_en()\n throws Exception\n {\n final Map map = checkStream( \"Linux\" );\n\n final FileAttributes o = (FileAttributes) map.get(\n \"src/main/java/org/codehaus/plexus/components/io/attributes/AttributeConstants.java\" );\n\n // -rw-r--r-- 1 1020 1030 11108 Mar 16 22:42 build.xml\n assertEquals( \"-rw-rw-r--\", new String( o.getLsModeParts() ) );\n assertEquals( 1020, o.getUserId().intValue() );\n assertEquals( 1030, o.getGroupId().intValue() );\n // Should probably test pass 2 too...\n }",
"@Test\n public void importTest1() {\n isl.exportSP();\n SharedPreferences sp = appContext.getSharedPreferences(spName, Context.MODE_PRIVATE);\n assertEquals(5, sp.getInt(\"nr\", 0));\n IngredientList isl2 = new IngredientList(sp, new TextFileReader(appContext)); //constructor automatically imports\n\n //check a random part of an ingredient present\n assertEquals(\"kruiden\", ((Ingredient) isl2.get(1)).category);\n\n //check if ingredient 5 is present correctly\n assertEquals(\"aardappelen\", isl2.get(4).name);\n assertEquals(\"geen\", ((Ingredient) isl2.get(4)).category);\n assertEquals(5, ((Ingredient) isl2.get(4)).amountNeed, 0);\n assertEquals(1, ((Ingredient) isl2.get(4)).amountHave, 0);\n assertEquals(Unit.NONE, ((Ingredient) isl2.get(4)).unit);\n\n //test text file import\n assertEquals(\"leek\", isl2.get(10).name);\n }",
"@Test(timeout = 4000)\n public void test002() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(1);\n javaCharStream0.BeginToken();\n javaCharStream0.AdjustBuffSize();\n javaCharStream0.adjustBeginLineColumn(1, 1);\n assertEquals(0, javaCharStream0.bufpos);\n }",
"@Test(timeout = 4000)\n public void test31() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n FileInputStream fileInputStream0 = fileUtil0.fetchASINFile(\"\", \"yZL[{3\", \"}*]Brf}>keea3q5#\", \"9<#s%7P.sU/In~q\");\n assertNull(fileInputStream0);\n }",
"public static void main(String args[]) {\n String str = \"Composer 2.1 ascii\\ncamera {\\n position 3.84789 3.48111 14.0946\\n viewDirection -123 -0.0143311 27\\n}\";\n\tIStrStream stream = new IStrStream(str);\n\tString input;\n\tint i;\n\tfloat f;\n\t\n\tinput = stream.getString();\n\tif (!(input.equals(\"Composer\"))) {\n\t System.err.println(\"unexpected string 1 \" + input);\n\t System.exit(1);\n\t}\n\tf = stream.getFloat();\n\tif (Math.abs(f - 2.1) > 0.1) {\n\t System.err.println(\"unexpected float 2 \" + f);\n\t System.exit(1);\n\t}\n\tinput = stream.getString();\n\tif (!(input.equals(\"ascii\"))) {\n\t System.err.println(\"unexpected string 3 \" + input);\n\t System.exit(1);\n\t}\n\twhile (!stream.eof()) {\n\t input = stream.getString();\n\t if (input.equals(\"camera\")) {\n\t\tinput = stream.getString();\t// skip over {\n\t\tinput = stream.getString();\n\t\tif (!(input.equals(\"position\"))) {\n\t\t System.err.println(\"unexpected string 4 \" + input);\n\t\t System.exit(1);\n\t\t}\n\t\tf = stream.getFloat();\n\t\tf = stream.getFloat();\n\t\tf = stream.getFloat();\n\t\tinput = stream.getString();\n\t\tif (!(input.equals(\"viewDirection\"))) {\n\t\t System.err.println(\"unexpected string 5 \" + input);\n\t\t System.exit(1);\n\t\t}\n\t\ti = stream.getInt();\n\t\tif (i != -123) {\n\t\t System.err.println(\"unexpected integer 6 \" + i);\n\t\t System.exit(1);\n\t\t}\n\t\tf = stream.getFloat();\n\t\ti = stream.getInt();\n\t\tif (i != 27) {\n\t\t System.err.println(\"unexpected integer 7 \" + i);\n\t\t System.exit(1);\n\t\t}\n\t\tinput = stream.getString();\t// skip over }\n\t } else {\n\t\tSystem.err.println(\"unexpected subcommand string 8 \" + input);\n\t\tSystem.exit(1);\n\t }\n\t}\n\tSystem.out.println(\"passed\");\n }",
"@Test\n public void testBATVBad() {\n SplitEmailAddress email = SplitEmailAddress.parse(\"[email protected]\");\n assertEquals(\"prvs=aaaaaaaaaa=me\", email.getLocal());\n assertEquals(\"example.com\", email.getDomain());\n }",
"public static void read8() {\n List<String> list = new ArrayList<>();\n\n try (Stream<String> stream = Files.lines(Paths.get(filePath))) {\n\n //1. filter line 3\n //2. convert all content to upper case\n //3. convert it into a List\n list = stream\n .filter(line -> !line.startsWith(\"line3\"))\n .map(String::toUpperCase)\n .collect(Collectors.toList());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n list.forEach(System.out::println);\n }",
"@Test\n public void testPrefixTrimOnNonAddress() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n final String streamName = \"test\";\n\n CorfuRuntime rt = getNewRuntime();\n CorfuRuntime runtime = getNewRuntime();\n\n try {\n PersistentCorfuTable<String, Long> testTable = rt.getObjectsView()\n .build()\n .setTypeToken(new TypeToken<PersistentCorfuTable<String, Long>>() {})\n .setStreamName(streamName)\n .open();\n\n // Checkpoint (should return -1 as no actual data is written yet)\n MultiCheckpointWriter<PersistentCorfuTable<String, Long>> mcw = new MultiCheckpointWriter<>();\n mcw.addMap(testTable);\n Token checkpointAddress = mcw.appendCheckpoints(rt, author);\n\n // Write several entries into the log.\n for (int i = 0; i < tableSize; i++) {\n try {\n testTable.insert(String.valueOf(i), (long) i);\n } catch (TrimmedException te) {\n // shouldn't happen\n te.printStackTrace();\n throw te;\n }\n }\n\n // Prefix Trim on checkpoint snapshot address\n rt.getAddressSpaceView().prefixTrim(checkpointAddress);\n rt.getAddressSpaceView().gc();\n rt.getAddressSpaceView().invalidateServerCaches();\n rt.getAddressSpaceView().invalidateClientCache();\n\n // Rebuild stream from fresh runtime\n try {\n PersistentCorfuTable<String, Long> localTestTable = openTable(runtime, streamName);\n for (int i = 0; i < localTestTable.size(); i++) {\n assertThat(localTestTable.get(String.valueOf(i))).isEqualTo(i);\n }\n assertThat(localTestTable.size()).isEqualTo(tableSize);\n } catch (TrimmedException te) {\n // shouldn't happen\n te.printStackTrace();\n throw te;\n }\n } finally {\n rt.shutdown();\n runtime.shutdown();\n }\n }",
"private String[] extractPure(String data) throws Exception {\n\t\tString[] result1 = this.extractBetween(data.toString(), \"<title>\", \"</title>\", true, true);\n\t\t\n\t\t// remove search title bar\n\t\tresult1[1] = this.replaceBetween(result1[1], \"<div class=\\\"lotusTitleBar2\\\">\", \"<div class=\\\"lotusMain\\\">\", \"\");\n\t\t\n\t\t// remove left column\n\t\tresult1[1] = this.replaceBetween(result1[1], \"<div class=\\\"lotusColLeft\\\"\", \"<div class=\\\"lotusContent\\\"\", \"\");\n\t\t\n\t\t// remove body\n\t\tString[] result2 = this.extractBetween(result1[1], \"<div class=\\\"lotusContent\\\" role=\\\"main\\\">\", \"</table></div></div>\", true, true);\n\t\tresult2[1] = result2[1].substring(8);\n\t\t\n\t\t// return\n\t\treturn new String[]{result1[0], result2[0], result2[1]};\n\t\t\n\t}",
"@Test\n public void testmng5175_ReadTimeOutFromSettings() throws Exception {\n File testDir = ResourceExtractor.simpleExtractResources(getClass(), \"/mng-5175\");\n\n Verifier verifier = newVerifier(testDir.getAbsolutePath());\n\n Map<String, String> filterProps = new HashMap<>();\n filterProps.put(\"@port@\", Integer.toString(port));\n\n verifier.filterFile(\"settings-template.xml\", \"settings.xml\", \"UTF-8\", filterProps);\n\n verifier.addCliArgument(\"-U\");\n verifier.addCliArgument(\"--settings\");\n verifier.addCliArgument(\"settings.xml\");\n verifier.addCliArgument(\"--fail-never\");\n verifier.addCliArgument(\"--errors\");\n verifier.addCliArgument(\"-X\");\n verifier.addCliArgument(\"validate\");\n verifier.execute();\n\n verifier.verifyTextInLog(\n \"Could not transfer artifact org.apache.maven.its.mng5175:fake-dependency:pom:1.0-SNAPSHOT\");\n verifier.verifyTextInLog(\"Read timed out\");\n }",
"@Test(timeout = 4000)\n public void test18() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/S_RYNHV)!DEYJP^3IL$.XML\");\n FileSystemHandling.createFolder(evoSuiteFile0);\n File file0 = fileUtil0.getSimilarItems(\"RYnHv)!DEyJP^3il$\", \"\");\n assertEquals(\"/S_RYNHV)!DEYJP^3IL$.XML\", file0.toString());\n assertFalse(file0.isFile());\n assertNotNull(file0);\n }",
"public static void main(String[] args) throws Exception {\n File file = new File(\"src/main/resources/2017/oversizedpancakeflipper/A-large.in\");\n try (BufferedReader br = new BufferedReader(new FileReader(file))) {\n Scanner scanner = new Scanner(br);\n int testCases = scanner.nextInt();\n for (int t = 1; t <= testCases; t++) {\n char[] pancakes = scanner.next().toCharArray();\n int k = scanner.nextInt();\n System.out.println(String.format(\"Case #%d: %s\", t, pancakeFlipper(pancakes, k)));\n }\n }\n }",
"protected int skipBogusTag(char[] input,\n int offset,\n int end,\n int[] lineNr) {\n int level = 1;\n\n while (offset < end) {\n char ch = input[offset++];\n\n switch (ch) {\n case '\\r':\n if ((offset < end) && (input[offset] == '\\n')) {\n offset++;\n }\n\n lineNr[0]++;\n break;\n case '\\n':\n lineNr[0]++;\n break;\n case '<':\n level++;\n break;\n case '>':\n level--;\n\n if (level == 0) {\n return offset;\n }\n\n break;\n default:\n }\n }\n\n throw this.unexpectedEndOfData(lineNr[0]);\n }",
"@Test\n\tpublic void testTrimmingWhiteSpaces() {\n\t\t// Setup\n\t\tString file = \" file.name \";\n\n\t\t// Exercise\n\t\tLine line = new Line(\"5\", \"5\", file);\n\n\t\t// Verify\n\t\tassertEquals(\"file.name\", line.toString());\n\t}",
"@Test(timeout = 4000)\n public void test52() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(u\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n SystemInUtil.addInputLine(\"%I\");\n streamTokenizer0.ordinaryChars((-4), (-4));\n SystemInUtil.addInputLine(\"%I\");\n streamTokenizer0.ordinaryChars((-2202), 689);\n SystemInUtil.addInputLine(\"0(u\");\n streamTokenizer0.ordinaryChar(3008);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n stringReader0.reset();\n SystemInUtil.addInputLine((String) null);\n streamTokenizer0.wordChars(1911, 689);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer1);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n streamTokenizer2.eolIsSignificant(true);\n streamTokenizer1.commentChar(3008);\n StringReader stringReader1 = new StringReader(\"0(u\");\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader1);\n stringReader1.close();\n streamTokenizer3.eolIsSignificant(true);\n SystemInUtil.addInputLine((String) null);\n System.setCurrentTimeMillis((-2));\n JSPredicateForm jSPredicateForm0 = null;\n try {\n jSPredicateForm0 = new JSPredicateForm(streamTokenizer3);\n fail(\"Expecting exception: System.SystemExitException\");\n \n } catch(System.SystemExitException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.evosuite.runtime.System\", e);\n }\n }",
"@BeforeTest\r\n\tpublic void checkTestSkip(){\r\n\t\t\t\t\r\n\t\t\t\tif(!TestUtil.isTestCaseRunnable(suite_cart_xls,this.getClass().getSimpleName())){\r\n\t\t\t\t\tAPP_LOGS.debug(\"Skipping Test Case\"+this.getClass().getSimpleName()+\" as runmode set to NO\");//logs\r\n\t\t\t\t\tthrow new SkipException(\"Skipping Test Case\"+this.getClass().getSimpleName()+\" as runmode set to NO\");//reports\r\n\t\t\t\t}\r\n\trunmodes=TestUtil.getDataSetRunmodes(suite_cart_xls, this.getClass().getSimpleName());\t\r\n\t\t\t}",
"public void nonNetworkMde(){\n System.out.println(\"Please enter file path: \");\n Scanner scanner = new Scanner(System.in);\n String filePath = scanner.nextLine();\n\n List<String> stringFromFile = fileReader.readFile(filePath);\n fileCotextProcessor.consoleText(stringFromFile);\n }",
"@Test\n public void when_SourceHasValidFormat_Then_ReturnSoftwareInformation() {\n //when\n final var actualSoftware = underTest.read(\"3C3CFFER4ET929645,FhFXVE\");\n //then\n final var expectedSoftwareFullPath = format(TEST_CASES_BASE_PATH, \"when-source-is-valid-format/expected-software.json\");\n final var expectedSoftware = fileToBean(expectedSoftwareFullPath, VehicleSoftware.class);\n assertEquals(expectedSoftware, actualSoftware);\n }",
"public void removeUnparseableExtraFieldData() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c3763808-2050-4e13-a0c1-1c775bd5e0ee\");\n if (unparseableExtra == null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"4003f30c-e5f3-4c15-b6da-adb3b7a4a1a1\");\n throw new java.util.NoSuchElementException();\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c7621793-4ba2-47c3-8bce-7c8b5c05ed8e\");\n unparseableExtra = null;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"daca2b5a-ddf7-4a9f-b64f-153927dc0b18\");\n setExtra();\n }",
"public void buildOutPutFile() throws Exception {\n\t\tFile theFile = openInputFile();\n\t\t\n\t\t// Open a random access file for reading the file from the disk\n\t\tRandomAccessFile theRAFile = new RandomAccessFile(theFile, \"r\");\t\n\t\tBufferedWriter theOutFile = null;\n\t\t// Create the file name\n\t\tString fileName = getOutPutFilePath();\n\t\t\n\t\t// Create the buffered writer\n\t\ttheOutFile = new BufferedWriter(new FileWriter(fileName));\n\t\t\n\t\tString badChars[] = {\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"0\"};\n\t\t\n\t\t\n\t\tString line = \"\";\n\t\twhile(line != null) {\t\t\t\t\t\t\t// Loop through the list\n\t\t\tline = theRAFile.readLine();\t\t\t\t// read the next line\n\t\t\tString goodLine=line;\t\t\t\t\t\t// set the good line equal to the line in the file\n\t\t\t// Loop through the line and replace all of the bad characters\n\t\t\tfor (int i=0; i < badChars.length; i++) {\n\t\t\t\t\n\t\t\t\tif (goodLine != null) {\n\t\t\t\t\t// take out the beginning line numbers\n\t\t\t\t\tgoodLine = goodLine.replace(badChars[i], \"\");\t\n\t\t\t\t\tSystem.out.println(\"goodLine\" + goodLine);\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t}\n\t\t\t// Write the good file out\n\t\t\twriteFile(goodLine, theOutFile);\t\t\t\n\t\t}\n\t\ttheRAFile.close();\t\t\t\t\t\t\t\t// close the reader \n\t\ttheOutFile.close();\t\t\t\t\t\t\t\t// close the writer\t\t\n\t}",
"@BeforeTest\r\n\t\t\tpublic void checkTestSkip()\r\n\t\t\t{\r\n\t\t\t\tif(!TestUtil.isTestCaseRunnable(suiteProductDescPageXls,this.getClass().getSimpleName()))//suites XlSX name is passed by the object from base class. and name of the TestCase.\r\n\t\t\t\t\t//Instead of passing TestCase name,using this \"this.getClass().getSimpleName()\" to get the name of the class as the name of the class is the TestCase name.\r\n\t\t\t\t{ \r\n\t\t\t\t \r\n\t\t\t\t //writing the Skip in the Xls file for the test case\r\n\t\t\t\t \r\n\t\t\t \t\r\n\t\t\t \tTestUtil.reportDataSetResult(suiteProductDescPageXls, \"Test Cases\",TestUtil.getRowNum(suiteProductDescPageXls,this.getClass().getSimpleName()),\"Skip\");\r\n\t\t\t \t\r\n\t\t\t\t\tAPP_LOGS.debug(\"skipping test ProductDescPage_TC4 ( Navigation to PDP check) as the runmode is NO\");\r\n\t\t\t\t\tthrow new SkipException(\"Skipping this testcase as the runmode is NO for this testcase : ProductDescPage_TC4 (Navigation to PDP check)\");\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t//Load the RunModes of the Test\r\n\t\t\t\trunmodes=TestUtil.getDataSetRunmodes(suiteProductDescPageXls, this.getClass().getSimpleName());\r\n\t\t\t\t\r\n\t\t\t}",
"@Test(timeout=100)\r\n\tpublic void testSkipEmptyLines() {\r\n\t\tString [] r1 = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"AAA\",\"BBB\"};\r\n\t\tString [] r3 = {\"the-end\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteline(\"\"); // empty line\r\n\t\twriteline(\"\"); // another empty line\r\n\t\twriteArrayToLine(r2);\r\n\t\twriteline(\"\");\r\n\t\twriteArrayToLine(r3);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tString [] next = csv.next();\r\n\t\tassertEquals( r1.length, next.length );\r\n\t\tassertArrayEquals( r1, next );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r3, csv.next() );\r\n\t\tassertFalse( csv.hasNext() );\r\n\t}"
] | [
"0.51836807",
"0.5137442",
"0.5114262",
"0.5083975",
"0.50775164",
"0.50770235",
"0.5006012",
"0.49816397",
"0.497856",
"0.49611995",
"0.49492547",
"0.492226",
"0.49071616",
"0.4901164",
"0.4893068",
"0.48766816",
"0.48339498",
"0.48202217",
"0.4819077",
"0.48165798",
"0.48054463",
"0.47847387",
"0.47840276",
"0.47765002",
"0.47750455",
"0.4771023",
"0.47670934",
"0.4762661",
"0.47495422",
"0.4745955",
"0.474246",
"0.47295308",
"0.47150743",
"0.47095454",
"0.47049445",
"0.47034353",
"0.46848232",
"0.46654928",
"0.466528",
"0.46652427",
"0.46650678",
"0.46642157",
"0.4653739",
"0.46520185",
"0.4647752",
"0.4642748",
"0.46395645",
"0.4639522",
"0.46352208",
"0.46313554",
"0.46267596",
"0.46158472",
"0.46104667",
"0.4606603",
"0.46061116",
"0.46055764",
"0.4604391",
"0.45957363",
"0.4593984",
"0.4593808",
"0.45916957",
"0.45883098",
"0.4586619",
"0.4585222",
"0.45734754",
"0.45728794",
"0.4571977",
"0.45691115",
"0.456181",
"0.45606947",
"0.4558713",
"0.45581776",
"0.4554715",
"0.45542586",
"0.45490465",
"0.45486018",
"0.45462874",
"0.45438638",
"0.45430464",
"0.45387292",
"0.4533517",
"0.4530357",
"0.4528258",
"0.4528207",
"0.45281225",
"0.45268413",
"0.45264974",
"0.45261347",
"0.452582",
"0.45213598",
"0.45201972",
"0.45169377",
"0.45158207",
"0.4510803",
"0.45098937",
"0.45022005",
"0.44970626",
"0.44967893",
"0.44931957",
"0.448288"
] | 0.5856108 | 0 |
Tests getting all keys in from the key table | @Test
public void testGetAllKeysFromKeyTable() throws SQLException
{
new PowerTool("asdf", 5, 5, "PowerTooldescription", true);
ArrayList<Integer> results = DatabaseGateway.getAllKeysFromKeyTable();
assertTrue(results.contains(1));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testCoh3710_keySetContainsAll()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().containsAll(\n Collections.singleton(Integer.valueOf(1))));\n validateIndex(cache);\n }\n });\n }",
"public String[] fetchAllKeys();",
"private void doAPITest(Map<Object,Object> table) {\n\t\tint size = table.size();\n\t\tObject key, value;\n\t\t\n\t\tMap<Object,Object> clone = cloneMap(table);\n\t\t\n\t\t// retrieve values using values()\n\t\tCollection<Object> values = table.values();\n\t\t\n\t\t// retrieve keys using keySet()\n\t\tSet<Object> keySet = table.keySet();\t\t\n\t\tObject[] keySetArray = keySet.toArray();\n\t\t\n\t\tint step = 1 + random.nextInt(5);\n\t\t\n\t\tfor (int i=0; i<keySetArray.length; i=i+step)\n\t\t{\n\t\t\tkey = keySetArray[i];\n\t\t\t// retrieve value\n\t\t\tvalue = table.get(key);\n\t\t\t\n\t\t\t// assert value is in the table\n\t\t\tassertTrue(table.containsValue(value));\n\t\t\t/*\n\t\t\t * assertTrue(table.contains(value)); // Removed as not supported by the Map interface, and identical to containsValue\n\t\t\t * if value is a wrapped key then check it's equal \n\t\t\t * to the key \n\t\t\t */\n\t\t\tif (value instanceof CustomValue)\n\t\t\t{\n\t\t\t\tassertEquals(key, ((CustomValue)value).key);\n\t\t\t}\n\t\t\t\n\t\t\t// count how many occurrences of this value there are\n\t\t\tint occurrences = numberOccurrences(values, value);\n\t\t\t\n\t\t\t// find the Map.Entry\n\t\t\tSet<Map.Entry<Object, Object>> entrySet = table.entrySet();\n\t\t\tIterator<Map.Entry<Object, Object>> entrySetIterator = entrySet.iterator();\n\t\t\tMap.Entry<Object,Object> entry = null;\n\t\t\tdo\n\t\t\t{\n\t\t\t\tentry = entrySetIterator.next();\n\t\t\t} while (!entry.getKey().equals(key));\n\t\t\t\n\t\t\t// remove from table in different ways\n\t\t\tswitch (i % 3)\n\t\t\t{\n\t\t\tcase 0:\n\t\t\t\ttable.remove(key);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tkeySet.remove(key);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t\n\t\t\t\tentrySet.remove(entry);\n\t\t\t}\n\t\t\t\n\t\t\t// assert key is no longer in the table\n\t\t\tassertFalse(table.containsKey(key));\n\t\t\t// assert key is no longer in the keyset\n\t\t\tassertFalse(keySet.contains(key));\n\t\t\t// assert key is no longer in the entrySet\n\t\t\tassertFalse(entrySet.contains(entry));\n\t\t\t\n\t\t\t// assert that there's one fewer of this value in the hashtable\n\t\t\tassertEquals(occurrences, numberOccurrences(values, value) + 1);\n\t\t\t\n\t\t\t// re-insert key\n\t\t\ttable.put(key, value);\n\t\t\t\n\t\t\t// assert key is in the table\n\t\t\tassertTrue(table.containsKey(key));\n\t\t\t// assert key is in the keyset\n\t\t\tassertTrue(keySet.contains(key));\n\t\t\t// assert EntrySet is same size\n\t\t\tassertEquals(size, entrySet.size());\n\t\t}\n\t\t\n\t\t// test hashtable is the same size\n\t\tassertEquals(size, table.size());\n\t\t\n\t\t// test keySet is expected size\n\t\tassertEquals(size, keySet.size());\n\t\t\n\t\t// retrieve keys using keys()\n\t\tIterator<?> keys = table.keySet().iterator();\n\t\t\n\t\t// remove a subset of elements from the table. store in a map\n\t\tint counter = table.size() / 4;\n\t\tMap<Object,Object> map = new HashMap<Object, Object>();\n\t\twhile (keys.hasNext() && counter-- >= 0)\n\t\t{\n\t\t\tkey = keys.next();\n\t\t\tvalue = table.get(key);\n\t\t\tmap.put(key, value);\n\t\t\tkeys.remove(); // removes the most recent retrieved element\n\t\t}\n\t\t// re-add the elements using putAll\n\t\ttable.putAll(map);\n\t\t\n\t\t// test equal to copy\n\t\tassertEquals(clone, table);\n\t\t\n\t\t// clear the copy\n\t\tclone.clear();\n\t\t\n\t\t// assert size of clone is zero\n\t\tassertEquals(0, clone.size());\n\t\t\n\t\t// assert size of original is the same\n\t\tassertEquals(size, table.size());\n\t}",
"public abstract List<String> getAllKeys();",
"@Test\n public void keySetTest()\n {\n map.putAll(getAMap());\n assertNotNull(map.keySet());\n }",
"public void testNormalKeySet()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkKeySet(pmf,\r\n HashMap1.class,\r\n ContainerItem.class,\r\n String.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }",
"@VisibleForTesting\n List<Object> getKeysForTest() {\n return keys;\n }",
"public Collection<TapKey> findAllKeys();",
"@Test\n public void mapKeys() {\n check(MAPKEYS);\n query(\"for $i in \" + MAPKEYS.args(\n MAPNEW.args(\" for $i in 1 to 3 return \" +\n MAPENTRY.args(\"$i\", \"$i+1\"))) + \" order by $i return $i\", \"1 2 3\");\n query(\"let $map := \" + MAPNEW.args(\" for $i in 1 to 3 return \" +\n MAPENTRY.args(\"$i\", \"$i + 1\")) +\n \"for $k in \" + MAPKEYS.args(\"$map\") + \" order by $k return \" +\n MAPGET.args(\"$map\", \"$k\"), \"2 3 4\");\n }",
"public Iterable<Key> keys();",
"public Iterable<Key> keys();",
"@Test\n public void test004_test_numKeys() {\n try {\n HashTableADT test = new HashTable<Integer, String>();\n if (test.numKeys() != 0) {\n fail(\"numKeys not correct\");\n }\n test.insert(1, \"2\");\n if (test.numKeys() != 1) {\n fail(\"numKeys not correct\");\n }\n test.insert(2, \"3\");\n if (test.numKeys() != 2) {\n fail(\"numKeys not correct\");\n }\n test.insert(3, \"4\");\n if (test.numKeys() != 3) {\n fail(\"numKeys not correct\");\n }\n test.remove(2);\n if(test.numKeys() != 2) {\n fail(\"numKeys not correct\");\n }\n } catch (Exception e) {\n fail(\"Exception shouldn't be thrown\");\n }\n }",
"@Test\n public void testCoh3710_keySetContains()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().contains(Integer.valueOf(1)));\n validateIndex(cache);\n }\n });\n }",
"boolean isFetchKeys();",
"List<QueryKey> listQueryKeys();",
"public void testGetKeysForPlayer_NoPlayer() throws Exception {\n try {\n dao.getKeysForPlayer(1, new long[0]);\n fail(\"EntryNotFoundException expected.\");\n } catch (EntryNotFoundException e) {\n // should land here\n }\n }",
"protected Object getKeyArray()\n/* */ {\n/* 91 */ return this.m_keyTable;\n/* */ }",
"@Test\n public void testKeyGeneration() {\n final int NUM_KEYS = 10;\n Set<byte[]> generatedKeys = new HashSet<>(NUM_KEYS);\n\n for (int i = 0; i < NUM_KEYS; ++i) {\n byte[] newKey = KeyGenerator.instance().generateKey();\n\n assertFalse(\"Duplicate key generated #\" + i, generatedKeys.contains(newKey));\n generatedKeys.add(newKey);\n }\n }",
"@Test\n public void testGetKey()\n { \n assertThat(m_SUT.getKey(), is(\"test key\"));\n }",
"public Collection<TapKeyColumn> findAllKeyColumns();",
"public MapAssertion<K, V> containsAllKeys(final Iterable<K> expected) {\n checkActualIsNotNull();\n checkArgumentIsNotNull(expected, \"expected\");\n List<K> expectedList = convertValue(expected, null, List.class);\n checkArgumentIsNotEmpty(expectedList.isEmpty(), \"expected\", true);\n toKeys().containsAll(expectedList);\n return this;\n }",
"public Set keySet() {\n\treturn table.keySet();\n }",
"public Iterable<K> keys();",
"public KeySet getKeys();",
"@Before\r\n public void test_change(){\r\n HashTable<String,String> table = new HashTable<>(1);\r\n MySet<String> s = (MySet<String>) table.keySet();\r\n table.put(\"AA\",\"BB\");\r\n table.put(\"AA\",\"CC\");\r\n assertTrue(s.contains(\"AA\"));\r\n table.remove(\"AA\");\r\n assertFalse(s.contains(\"AA\"));\r\n }",
"public boolean hasKeys();",
"@Test\n public void testGetKey() {\n DefaultPieDataset d = new DefaultPieDataset();\n d.setValue(\"A\", 1.0);\n d.setValue(\"B\", 2.0);\n assertEquals(\"A\", d.getKey(0));\n assertEquals(\"B\", d.getKey(1));\n\n boolean pass = false;\n try {\n d.getKey(-1);\n }\n catch (IndexOutOfBoundsException e) {\n pass = true;\n }\n assertTrue(pass);\n\n pass = false;\n try {\n d.getKey(2);\n }\n catch (IndexOutOfBoundsException e) {\n pass = true;\n }\n assertTrue(pass);\n }",
"@Test\n\tpublic void getMyKeyNames() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tks.createNewMyKeyPair(\"never\");\n\t\tks.createNewMyKeyPair(\"gonna\");\n\t\tks.createNewMyKeyPair(\"give\");\n\t\tks.createNewMyKeyPair(\"you\");\n\t\tks.createNewMyKeyPair(\"up\");\n\t\tSet<String> names = ks.getMyKeyNames();\n\t\tassertTrue(\"incorrect number of names\", names.size() == 5);\n\t\tassertTrue(\"should contain name\", names.contains(\"never\"));\n\t\tassertTrue(\"should contain name\", names.contains(\"gonna\"));\n\t\tassertTrue(\"should contain name\", names.contains(\"give\"));\n\t\tassertTrue(\"should contain name\", names.contains(\"you\"));\n\t\tassertTrue(\"should contain name\", names.contains(\"up\"));\n\t}",
"static List<Integer> getTestKeys() {\n var list = Arrays.asList(3, 8, 1, 9, 2, 4, 0, 5);\n\n return list;\n }",
"@Override\n public byte[][] getAll(byte keys[][]) throws Exception{\n byte[][] results = new byte[keys.length][];\n Table table = getNextConnection().getTable(this.dataTableName);\n ArrayList<Get> gets = new ArrayList<>(keys.length);\n for (int i = 0; i < keys.length; i++) {\n byte[] actualKey = transformKey(keys[i]);\n Get get = new Get(actualKey);\n gets.add(get);\n }\n Result[] hbaseResults = table.get(gets);\n for (int i = 0; i < hbaseResults.length; i++) {\n Result result = hbaseResults[i];\n byte[] value = result.getValue(this.columnFamily, this.columnName);\n results[i] = value;\n }\n table.close();\n return results;\n }",
"public void testGetRowKey() {\n TaskSeriesCollection c = createCollection1();\n }",
"String getRetrieveKeysQuery();",
"@Test\n public void testSearchNastyCases() {\n RpkiObjectCoder coder = new RpkiObjectCoder();\n AtomicInteger brokenCounter = new AtomicInteger(0);\n lmdb.readTx0(tx -> {\n lmdbRpkiObject.forEach(tx, (k, bb) -> {\n byte[] bytes = Bytes.toBytes(bb);\n try {\n RpkiObject rpkiObject = coder.fromBytes(bytes);\n assertEquals(rpkiObject.key(), k);\n assertArrayEquals(Sha256.hash(rpkiObject.getEncoded()), rpkiObject.getSha256());\n } catch (Exception e) {\n brokenCounter.incrementAndGet();\n e.printStackTrace();\n }\n });\n });\n assertEquals(0, brokenCounter.get());\n }",
"@Transactional\n public List<String> getAllKeys() {\n return entityManager.createQuery(\"SELECT idCode FROM ArtListing\", String.class).getResultList();\n }",
"@Test(expected = Exception.class)\n public void test() throws Exception {\n\n new HashMap<>();\n MyHashTable2 mp = new MyHashTable2();\n mp.put(\"prem\",7);\n mp.put(\"radha\",72);\n mp.put(\"geeta\",74);\n mp.put(\"sunita\",76);\n mp.put(\"atul\",87);\n mp.put(\"rakesh\",37);\n mp.put(\"aklesh\",72);\n\n // try to add duplicate keys and test exception\n mp.put(\"aklesh\",72);\n\n\n assert 7 == mp.get(\"prem\");\n assert 72 == mp.get(\"aklesh\");\n assert 87 == mp.get(\"atul\");\n assert null == mp.get(\"noting\");\n\n System.out.println(mp.getKeySet());\n\n mp.prettyPrint();\n }",
"public void testGetKeysForPlayer_NullIds() throws Exception {\n try {\n dao.getKeysForPlayer(1, null);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException e) {\n // should land here\n }\n }",
"@Override public int numRows() {\n return listOfKeys.size();\n }",
"@Override\n public boolean containsKey(Object key) {\n int index = key.hashCode() % table.length;\n if (index < 0) {\n index += table.length;\n }\n if (table[index] == null) {\n return false;\n }\n for (Entry<K,V> entry : table[index]) {\n if (entry.getKey().equals(key)) {\n return true;\n }\n }\n return false;\n }",
"public void testInverseKeySet()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkKeySet(pmf,\r\n HashMap2.class,\r\n HashMap2Item.class,\r\n String.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap2.class);\r\n clean(HashMap2Item.class);\r\n }\r\n }",
"@Override\n public Set<K> keySet() {\n Set<K> keySet = new HashSet<K>(size());\n for (LinkedList<Entry<K,V>> list : table) {\n for (Entry<K,V> entry : list) {\n if (entry != null) {\n keySet.add(entry.getKey());\n }\n }\n }\n return keySet;\n }",
"public Iterator<Key> keys() ;",
"public static void test()\n\t{\n\t Environment myDbEnvironment = null;\n\t Database myDatabase = null;\n\n\t /* OPENING DB */\n\n\t // Open Database Environment or if not, create one.\n\t EnvironmentConfig envConfig = new EnvironmentConfig();\n\t envConfig.setAllowCreate(true);\n\t myDbEnvironment = new Environment(new File(\"db/\"), envConfig);\n\n\t // Open Database or if not, create one.\n\t DatabaseConfig dbConfig = new DatabaseConfig();\n\t dbConfig.setAllowCreate(true);\n\t dbConfig.setSortedDuplicates(true);\n\t myDatabase = myDbEnvironment.openDatabase(null, \"schema\", dbConfig);\n\n\t Cursor cursor = null;\n\t /* GET <K,V > FROM DB */\n\t DatabaseEntry foundKey = new DatabaseEntry();\n\t DatabaseEntry foundData = new DatabaseEntry();\n\n\t cursor = myDatabase.openCursor(null, null);\n\t cursor.getFirst(foundKey, foundData, LockMode.DEFAULT);\n\n\t do {\n\t try {\n\t String keyString = new String(foundKey.getData(), \"UTF-8\");\n\t String dataString = new String(foundData.getData(), \"UTF-8\");\n\t System.out.println(\"<\" + keyString + \", \" + dataString + \">\");\n\t } catch (UnsupportedEncodingException e) {\n\t e.printStackTrace();\n\t }\n\t } while (cursor.getNext(foundKey, foundData, LockMode.DEFAULT) == OperationStatus.SUCCESS);\n\t if (cursor != null) cursor.close();\n\t System.out.println(\"-----\");\n\t \n\t if (myDatabase != null) myDatabase.close();\n\t if (myDbEnvironment != null) myDbEnvironment.close();\n\t}",
"public List getEntityKeys() {\n return resultKeys;\n }",
"public Set<Key<?>> keysForTest() {\n return Collections.unmodifiableSet(this.data.keySet());\n }",
"public List<NeonKey> getKeys();",
"@Override\n List<String> keys();",
"public void generateKeys(){\n\t\t//Apply permutation P10\n\t\tString keyP10 = permutation(key,TablesPermutation.P10);\n\t\tresults.put(\"P10\", keyP10);\n\t\t//Apply LS-1\n\t\tString ls1L = leftShift(keyP10.substring(0,5),1);\n\t\tString ls1R = leftShift(keyP10.substring(5,10),1);\n\t\tresults.put(\"LS1L\", ls1L);\n\t\tresults.put(\"LS1R\", ls1R);\n\t\t//Apply P8 (K1)\n\t\tk1 = permutation(ls1L+ls1R, TablesPermutation.P8);\n\t\tresults.put(\"K1\", k1);\n\t\t//Apply LS-2\n\t\tString ls2L = leftShift(ls1L,2);\n\t\tString ls2R = leftShift(ls1R,2);\n\t\tresults.put(\"LS2L\", ls2L);\n\t\tresults.put(\"LS2R\", ls2R);\n\t\t//Apply P8 (K2)\n\t\tk2 = permutation(ls2L+ls2R, TablesPermutation.P8);\n\t\tresults.put(\"K2\", k2);\n\t}",
"List<String> getKeys();",
"@Test \n\tpublic void GetAllCodeDictionaryTest(){\n\t\tlogger.info(\"--------------------start---GetAllCodeDictionaryTest--------------------------------------------------------------------------------------------------\");\n\t\tList<com.boot.entity.Dictionary> list=trustManagementService.GetAllCodeDictionary(\"zh-CN\");\n\t\tfor (Dictionary trust : list) {\n\t\t\tlogger.info(\"查找结果\" + trust.getSequenceNo()); \n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t/*for (Map<String, Object> map : list) {\n\t\t\tSet<String> set=map.keySet();\n\t\t\tfor (String string : set) {\n\t\t\t\tlogger.info(\"查找结果getItemValue-----map--set----键key:(\"+string+\") 值value:\" +map.get(string) ); \n\t\t\t\t\n\t\t\t}\n\n\t\t}\n*/\n\t\t\n\t\tlogger.info(\"--------------------end---GetAllCodeDictionaryTest--------------------------------------------------------------------------------------------------\");\n\t}",
"@Test\n public void reuseKeys() throws Exception {\n VolatileLookUpTable.Builder<IntOption> builder = new VolatileLookUpTable.Builder<>();\n LookUpKey key = key();\n\n key.add(new IntOption(100));\n builder.add(key, new IntOption(100));\n key.reset();\n\n key.add(new IntOption(101));\n builder.add(key, new IntOption(101));\n key.reset();\n\n key.add(new IntOption(102));\n builder.add(key, new IntOption(102));\n key.reset();\n\n LookUpTable<IntOption> table = builder.build();\n assertThat(sort(table.get(key(100))), is(values(100)));\n assertThat(sort(table.get(key(101))), is(values(101)));\n assertThat(sort(table.get(key(102))), is(values(102)));\n }",
"public void testGetColumnKey() {\n TaskSeriesCollection c = createCollection1();\n assertEquals(\"Task 1\", c.getColumnKey(0));\n assertEquals(\"Task 2\", c.getColumnKey(1));\n assertEquals(\"Task 3\", c.getColumnKey(2));\n }",
"boolean hasKey();",
"boolean hasKey();",
"boolean hasKey();",
"boolean hasKey();",
"boolean hasKey();",
"ApiKeys listKeys();",
"private void createTestData() {\n for (int i = startKey; i < startKey + numKeys; i++) {\n keys.add(i);\n }\n }",
"Integer[] getKeys();",
"@SafeVarargs\n public final MapAssertion<K, V> containsAllKeys(final K... expected) {\n checkActualIsNotNull();\n checkArgumentIsNotNull(expected, \"expected\");\n checkArgumentIsNotEmpty(expected.length == 0, \"expected\", true);\n toKeys().containsAll(expected);\n return this;\n }",
"public MapAssertion<K, V> containsAllKeysInOrder(final Iterable<K> expected) {\n checkActualIsNotNull();\n checkArgumentIsNotNull(expected, \"expected\");\n List<K> expectedList = convertValue(expected, null, List.class);\n checkArgumentIsNotEmpty(expectedList.isEmpty(), \"expected\", true);\n toKeys().containsAllInOrder(expectedList);\n return this;\n }",
"@Test(dependsOnMethods = \"testUpdateKey\")\n public void testListKeyVersions() {\n KeyAttributes keyAttr = KeyAttributes.create(true, null, null, null, null, null);\n KeyBundle keyBundle = api().createKey(vaultUri,\n KEY_NAME,\n keyAttr,\n null,\n null,\n 3072,\n \"RSA\",\n null);\n\n // List key versions\n List<Key> keys = api().getKeyVersions(vaultUri, KEY_NAME);\n assertNotNull(keys);\n assertTrue(keys.size() > 1);\n }",
"@Test\n public void testTableFactoryEmpty() {\n TableController tableController = tableFactory.getTableController();\n Map<Integer, ArrayList<Table>> tableMap = tableController.getTableMap();\n // loop through the map, check that each list is empty\n for (ArrayList<Table> list : tableMap.values()) {\n assertEquals(0, list.size());\n }\n }",
"@Test\n\tpublic void testGetNewTableKey() throws SQLException\n\t{\n\t\tassertEquals(1, DatabaseGateway.getNewID());\n\t}",
"public List<Map<String, Object>> query(long tableID, String key)\r\n\t{\n\t\treturn null;\r\n\t}",
"@org.junit.jupiter.api.Test\n void get() {\n HashTable hashTable = new HashTable();\n // Intentamos coger un valor inexistente\n assertNull(hashTable.get(\"0\"));\n System.out.println(hashTable);\n\n // Pedimos un elemento que no exista en la LinkedList\n assertNull(hashTable.get(\"58\"));\n System.out.println(hashTable);\n // Pedimos un elemento existente\n hashTable.put(\"1\",\"Paquito\");\n assertEquals(\"Paquito\", hashTable.get(\"1\"));\n System.out.println(hashTable);\n // Pedimos un valor que ha colisionado y existe en la LinkedList\n hashTable.put(\"34\",\"Willyrex\");\n assertEquals(\"Willyrex\", hashTable.get(\"34\"));\n System.out.println(hashTable);\n }",
"Set<String> getKeys();",
"@Test\n public void testGet() throws Exception {\n map.set(\"key-1\", \"value-1\", 10);\n \n Assert.assertEquals(map.get(\"key-1\"), \"value-1\");\n \n map.set(\"key-1\", \"value-2\", 10);\n \n Assert.assertEquals(map.get(\"key-1\"), \"value-2\");\n \n map.set(\"key-2\", \"value-1\", 10);\n \n Assert.assertEquals(map.get(\"key-2\"), \"value-1\");\n }",
"public Iterable<String> getKeys(String keyPrefix);",
"@Test\n\tpublic void checkAllAPICrncyInTable() throws ParseException\n\t{\n\t\t// Table Data\n\t\tMap<String, Object> tableMap = dashboardPage.addRowDataToMap();\n\t\t// API Data\n\t\tresponsePage = new APIResponsePageObject(driver);\n\t\tMap<String, Object> apiMap = responsePage.getRateDataFromAPI();\n\t\t\n\t\t// Map that has key - values missing in tableMap that are in apiMap\n\t\tMap missingCurrenciesInTableMap = new HashMap<>(apiMap);\n\t\tmissingCurrenciesInTableMap.keySet().removeAll(tableMap.keySet());\n\t\tmissingCurrenciesInTableMap.values().removeAll(tableMap.values());\n\t\t\n\t\tif(missingCurrenciesInTableMap.size() > 1)\n\t\t{\n\t\t\terrorMessage = \"Html table is missing \" + missingCurrenciesInTableMap.toString() + \" from API\";\n\t\t\tAssert.fail(errorMessage);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tassertSame(tableMap, apiMap);\n\t\t}\n\t}",
"@Override\n public List<K> keys() {\n List<K> keys = new AList<>();\n for(int i =0; i < capacity; i++){\n Entry n = (Entry) table[i];\n if(n != null && !n.isRemoved())\n keys.add(n.getKey());\n }\n assert keys.size() == size;\n return keys;\n }",
"public Iterator<K> keys();",
"public Iterator<K> keys();",
"public native IterableIterator<K> keys();",
"public static boolean testTableGet() {\r\n try {\r\n for (int i = 0; i < 6; i++) {\r\n if (!pokemonEq(table.get(testList[i].getName()), testList[i]))\r\n return false;\r\n }\r\n } catch (NoSuchElementException e) {\r\n return false;\r\n }\r\n return true;\r\n }",
"String[] supportedKeys();",
"public Iterable<K> keys()\n {\n return new Iterable<K>()\n {\n public Iterator<K> iterator()\n {\n return ChainedHashTable.this.keysIterator();\n } // iterator()\n }; // new Iterable<K>\n }",
"@Test\n\tpublic void testGetAccessReodersElement() {\n\t\tmap.get(\"key1\");\n\n\t\tSet<String> keySet = map.keySet();\n\t\tassertEquals(\"Calling get on an element did not move it to the bottom\", \"key1\",\n\t\t\tkeySet.iterator().next());\n\n\t\t// move 2 to the top/front\n\t\tmap.get(\"key2\");\n\t\tassertEquals(\"Calling get on an element did not move it to the bottom\", \"key2\",\n\t\t\tkeySet.iterator().next());\n\t}",
"private Set<String> getKeys() {\n return bookDB.keySet();\n }",
"public static boolean testPokemonTableGetAll() throws IOException {\r\n PokemonTable inst = new PokemonTable(10);\r\n for (Pokemon item : testList) {\r\n inst.put(item.getName(), item);\r\n }\r\n LinkedList<Pokemon> list = inst.getAll();\r\n if (list.size() != 6)\r\n return false;\r\n for (Pokemon item : testList) {\r\n if (!list.contains(item)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public List<K> keys();",
"Lista<K> keySet();",
"public SetAssertion<K> toKeys() {\n checkActualIsNotNull();\n return initializeAssertion(Raw.<K>setAssertion(), getActual().keySet(), Messages.Check.KEYS);\n }",
"@Test\n public void test002_Insert_And_Get() {\n try {\n HashTableADT test = new HashTable<Integer, String>();\n test.insert(1, \"2\");\n test.insert(2, \"3\");\n test.insert(3, \"4\");\n if (test.get(1) != \"2\") { //checks if get returns the correct values\n fail(\"insert or get didn't work\");\n }\n if (test.get(2) != \"3\") {\n fail(\"insert or get didn't work\");\n }\n if (test.get(3) != \"4\") {\n fail(\"insert or get didn't work\");\n }\n } catch (Exception e) {\n fail(\"Exception shouldn't be thrown\");\n }\n }",
"private void validateIndexForKeys(CompactRangeIndex ri) {\n assertEquals(6, ri.getIndexStorage().size());\n CloseableIterator<IndexStoreEntry> itr = null;\n try {\n itr = ri.getIndexStorage().iterator(null);\n while (itr.hasNext()) {\n IndexStoreEntry reEntry = itr.next();\n Object obj = reEntry.getDeserializedRegionKey();\n assertTrue(obj instanceof String);\n assertTrue(idSet.contains(obj));\n }\n } finally {\n if (itr != null) {\n itr.close();\n }\n }\n }",
"public Iterator<K> keys(){\n\treturn new Iterator<K>() {\n\t int iteratorbucket = 0;\n\t Iterator<MyEntry> itr = table[iteratorbucket].iterator();\n\t int nextCount = 0;\n\n\t public boolean hasNext() {\n\t // can just check nextCount and size\n\t if(nextCount>=size) {\n\t \treturn false;\n\t }\n\t return true;\n\t }\n\n\t public K next() {\n\t // if my hasNext() is false, I should throw a NoSuchElementException\n\t if(hasNext()==false) {\n\t \tthrow new NoSuchElementException();\n\t }\n\t // while itr.hasNext() is false, increment bucket and get the next iterator\n\t while(itr.hasNext()==false) {\n\t \titeratorbucket++;\n\t \titr=table[iteratorbucket].iterator();\n\t }\n\t // now increment nextCount and return the key from the item itr.next() returns\n\t \tnextCount++;\n\t \treturn itr.next().key;\n\t \n\t }\n\n\t public void remove() {\n\t // just ask itr to remove, but I need to update my size and nextCount\n\t itr.remove();\n\t size--;\n\t nextCount--;\n\t }\n\t };\n }",
"@Test (timeout=180000)\n public void testCoveredStartKey() throws Exception {\n TableName table =\n TableName.valueOf(\"tableCoveredStartKey\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by creating an overlap in the metadata\n HRegionInfo hriOverlap =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A2\"), Bytes.toBytes(\"B2\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriOverlap);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriOverlap);\n ServerName server = regionStates.getRegionServerOfRegion(hriOverlap);\n TEST_UTIL.assertRegionOnServer(hriOverlap, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.OVERLAP_IN_REGION_CHAIN,\n ERROR_CODE.OVERLAP_IN_REGION_CHAIN });\n assertEquals(3, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n\n // fix the problem.\n doFsck(conf, true);\n\n // verify that overlaps are fixed\n HBaseFsck hbck2 = doFsck(conf, false);\n assertErrors(hbck2, new ERROR_CODE[0]);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }",
"List getKeyBy(PaymentTradeExample example);",
"public List<Key> getkeyList() {\n SimpleJdbcTemplate jdbcTemplate =\n new SimpleJdbcTemplate(SessionFactoryUtils.getDataSource(getSessionFactory()));\n HashMap args = new HashMap();\n return jdbcTemplate.query(\"select a.APP_ID,a.name,a.CERTIFICATEID,a.soa_group_id,c.soa_group_name from \" + APP_KEY_TABLE + \" a , SOA_GROUP c where status='Active' and a.soa_group_id=c.soa_group_id\"\n , new ParameterizedRowMapper<Key>() {\n public Key mapRow(ResultSet rs, int rowNum) throws SQLException {\n return new Key(rs.getString(\"APP_ID\"), rs.getString(\"name\"), rs.getString(\"soa_group_id\"), rs.getString(\"soa_group_name\"), rs.getString(\"CERTIFICATEID\"));\n }\n }, args);\n }",
"@Test\r\n public void testGetAllChromInfo() throws Exception {\n assertEquals(7, queries.getAllChromInfo().size());\r\n }",
"protected Enumeration<String> handleGetKeys()\n/* */ {\n/* 1467 */ return Collections.enumeration(handleKeySet());\n/* */ }",
"@org.junit.Test\n public void contains() throws Exception {\n assertEquals(true, hashTable.contains(\"Blue\"));\n assertEquals(false, hashTable.contains(\"blue\"));\n }",
"@Test\n public void testCoh3710_getAll()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertEquals(NullImplementation.getMap(),\n getNamedCache(getCacheName0()).getAll(\n Collections.singleton(Integer.valueOf(1))));\n }\n });\n }",
"Observable<QueryKey> listQueryKeysAsync();",
"@Test\n\tpublic void getOtherKeys() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tKeyPair kp = RsaHelper.generateKeyPair();\n\t\tks.addOtherKey(\"first other one\", kp.getPublic());\n\t\tKeyPair kpp = RsaHelper.generateKeyPair();\n\t\tks.addOtherKey(\"second other one\", kpp.getPublic());\n\t\tPublicKey pk = ks.getOtherKey(\"first other one\");\n\t\tassertTrue(\"should be same key\", kp.getPublic().equals(pk));\n\t\tPublicKey ppk = ks.getOtherKey(\"second other one\");\n\t\tassertTrue(\"should be same key\", kpp.getPublic().equals(ppk));\n\t}",
"@Test public void keyDefinition() {\n fail( \"Not yet implemented\" );\n }",
"@Override \n public Set<String> keySet() {\n // definido um set onde colocar o resultado\n Set<String> r = new HashSet<>();\n try {\n // abre uma conecção\n conn = Connect.connect();\n // abrir um statment com a querie que temos de executar\n PreparedStatement stm = conn.prepareStatement(\"SELECT username FROM Administrador WHERE visivel=TRUE;\");\n // o resultado colocado em rs\n ResultSet rs = stm.executeQuery();\n while (rs.next()) // enquanto existir o next\n r.add(rs.getString(\"username\")); // adiciona o aluno\n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn);\n }\n return r;\n }",
"@ZenCodeType.Method\n @ZenCodeType.Getter(\"keys\")\n default Set<String> getKeys() {\n \n return doesNot(\"is not indexable by keys\");\n }",
"@org.junit.Test\n public void get() throws Exception {\n assertEquals(null, hashTable.get(\"savon\"));\n assertEquals(\"camp\", hashTable.get(\"math\"));\n hashTable.put(\"math\", \"club\");\n assertEquals(\"club\", hashTable.get(\"math\"));\n }",
"@Override \n public Set<String> keySet() {\n \n \n // definido um set onde colocar o resultado\n Set<String> r = new HashSet<>();\n \n try {\n \n // abre uma conecção\n conn = Connect.connect();\n \n // abrir um statment com a querie que temos de executar\n PreparedStatement stm = conn.prepareStatement(\"SELECT nomePacote FROM Pacote WHERE visivel=TRUE;\");\n \n \n // o resultado colocado em rs\n ResultSet rs = stm.executeQuery();\n \n while (rs.next()) // enquanto existir o next\n r.add(rs.getString(\"nomePacote\")); \n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn);\n }\n return r;\n }"
] | [
"0.71038824",
"0.68671364",
"0.68365943",
"0.66824853",
"0.6515481",
"0.6494404",
"0.6472961",
"0.6461073",
"0.6406495",
"0.64031506",
"0.64031506",
"0.63909465",
"0.6296999",
"0.6289011",
"0.62887675",
"0.62763095",
"0.6245929",
"0.61753726",
"0.6170055",
"0.6156463",
"0.6150022",
"0.61475194",
"0.61250263",
"0.6119802",
"0.6102232",
"0.6096496",
"0.60743374",
"0.60637707",
"0.6061674",
"0.6030944",
"0.60297126",
"0.60078824",
"0.60058355",
"0.6005789",
"0.5965774",
"0.59627694",
"0.59550136",
"0.59546304",
"0.5938645",
"0.5938576",
"0.5932581",
"0.59292746",
"0.5919751",
"0.5909961",
"0.5907712",
"0.589784",
"0.58939826",
"0.58906794",
"0.5881659",
"0.58736575",
"0.5863068",
"0.58389235",
"0.58389235",
"0.58389235",
"0.58389235",
"0.58389235",
"0.5819413",
"0.5816705",
"0.58148175",
"0.5814106",
"0.58112407",
"0.5809904",
"0.58065563",
"0.5806482",
"0.57968044",
"0.5792302",
"0.57497007",
"0.573481",
"0.5729878",
"0.5713437",
"0.5712894",
"0.5710967",
"0.5710967",
"0.5708374",
"0.57075185",
"0.5703783",
"0.57015485",
"0.5697216",
"0.56970876",
"0.56968796",
"0.56938833",
"0.5692012",
"0.5691707",
"0.5687317",
"0.56801564",
"0.5678013",
"0.5670208",
"0.5667299",
"0.5665432",
"0.56609297",
"0.56585175",
"0.564919",
"0.56464624",
"0.56463593",
"0.5635095",
"0.5632094",
"0.5631137",
"0.5623561",
"0.56191987",
"0.55992776"
] | 0.801157 | 0 |
Nav Code uses radial binary search based on location fitness scoring function | public boolean wander() {
MapLocation target = sensor.findTargetLocation();
return(nav.moveToLocation(target));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double fitness()\n/* */ {\n/* 40 */ return 1.0D / (1.0D + this.distance);\n/* */ }",
"void calculateFitness() {\n if (reachedGoal) {\n fitness = 1d / 16d + 8192d / (genome.step * genome.step);\n } else {\n double d = position.distance(Game.Setup.goal);\n fitness = 1d / (d * d);\n }\n }",
"public static void main(String[] args) {\n INeighbor neighbor = new RandomNeighbor();\n IEvaluator evaluator = new BentEvaluator();\n ISolver solver = new RandomSearch(neighbor, evaluator);\n\n BoolFunction solution = solver.run();\n System.out.println(solution);\n }",
"public double calculateFitness(DNA dna);",
"public abstract double evaluateFitness();",
"float getFitnessScore(MapLocation l) {\n\t\ttry{\n\t\t\tif(rc.canSenseLocation(l) && !rc.onTheMap(l)) {\n\t\t\t\t//System.out.println(\"dead square\");\n\t\t\t\treturn -999999.0f;\n\t\t\t}\n\t\t} catch(Exception e){e.printStackTrace();}\n\t\t\n\t\tfloat fitness = 0.0f;\n\t\t\n\t\tfor(RobotInfo ri : allRobots) {\n\t\t\tfitness -= 1f/l.distanceSquaredTo(ri.location);\n\t\t}\n\t\tif(type.equals(RobotType.GARDENER)) {\n\t\t\tfor(TreeInfo ti : allTrees) {\n\t\t\t\tif(ti.team.equals(Team.NEUTRAL)) {\n\t\t\t\t\tfitness -= 1f/l.distanceSquaredTo(ti.location);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfitness -= 10f/l.distanceSquaredTo(lastLocation);\n\t\t\n\t\treturn fitness;\n\t}",
"public abstract double getHeuristic(State state);",
"@Override\n\tpublic void search() {\n\t\tpq = new IndexMinPQ<>(graph.getNumberOfStations());\n\t\tpq.insert(startIndex, distTo[startIndex]);\n\t\twhile (!pq.isEmpty()) {\n\t\t\tint v = pq.delMin();\n\t\t\tnodesVisited.add(graph.getStation(v));\n\t\t\tnodesVisitedAmount++;\n\t\t\tfor (Integer vertex : graph.getAdjacentVertices(v)) {\t\n\t\t\t\trelax(graph.getConnection(v, vertex));\n\t\t\t}\n\t\t}\n\t\tpathWeight = distTo[endIndex];\n\t\tpathTo(endIndex);\n\t}",
"public List<Graph> search() {\n\n long start = System.currentTimeMillis();\n TetradLogger.getInstance().log(\"info\", \"Starting ION Search.\");\n logGraphs(\"\\nInitial Pags: \", this.input);\n TetradLogger.getInstance().log(\"info\", \"Transfering local information.\");\n long steps = System.currentTimeMillis();\n\n /*\n * Step 1 - Create the empty graph\n */\n List<Node> varNodes = new ArrayList<>();\n for (String varName : variables) {\n varNodes.add(new GraphNode(varName));\n }\n Graph graph = new EdgeListGraph(varNodes);\n\n /*\n * Step 2 - Transfer local information from the PAGs (adjacencies\n * and edge orientations)\n */\n // transfers edges from each graph and finds definite noncolliders\n transferLocal(graph);\n // adds edges for variables never jointly measured\n for (NodePair pair : nonIntersection(graph)) {\n graph.addEdge(new Edge(pair.getFirst(), pair.getSecond(), Endpoint.CIRCLE, Endpoint.CIRCLE));\n }\n TetradLogger.getInstance().log(\"info\", \"Steps 1-2: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n System.out.println(\"step2\");\n System.out.println(graph);\n\n /*\n * Step 3\n *\n * Branch and prune step that blocks problematic undirectedPaths, possibly d-connecting undirectedPaths\n */\n steps = System.currentTimeMillis();\n Queue<Graph> searchPags = new LinkedList<>();\n // place graph constructed in step 2 into the queue\n searchPags.offer(graph);\n // get d-separations and d-connections\n List<Set<IonIndependenceFacts>> sepAndAssoc = findSepAndAssoc(graph);\n this.separations = sepAndAssoc.get(0);\n this.associations = sepAndAssoc.get(1);\n Map<Collection<Node>, List<PossibleDConnectingPath>> paths;\n// Queue<Graph> step3PagsSet = new LinkedList<Graph>();\n HashSet<Graph> step3PagsSet = new HashSet<>();\n Set<Graph> reject = new HashSet<>();\n // if no d-separations, nothing left to search\n if (separations.isEmpty()) {\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(graph);\n step3PagsSet.add(graph);\n }\n // sets length to iterate once if search over path lengths not enabled, otherwise set to 2\n int numNodes = graph.getNumNodes();\n int pl = numNodes - 1;\n if (pathLengthSearch) {\n pl = 2;\n }\n // iterates over path length, then adjacencies\n for (int l = pl; l < numNodes; l++) {\n if (pathLengthSearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path lengths: \" + l + \" of \" + (numNodes - 1));\n }\n int seps = separations.size();\n int currentSep = 1;\n int numAdjacencies = separations.size();\n for (IonIndependenceFacts fact : separations) {\n if (adjacencySearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path nonadjacencies: \" + currentSep + \" of \" + numAdjacencies);\n }\n seps--;\n // uses two queues to keep up with which PAGs are being iterated and which have been\n // accepted to be iterated over in the next iteration of the above for loop\n searchPags.addAll(step3PagsSet);\n recGraphs.add(searchPags.size());\n step3PagsSet.clear();\n while (!searchPags.isEmpty()) {\n System.out.println(\"ION Step 3 size: \" + searchPags.size());\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n // deques first PAG from searchPags\n Graph pag = searchPags.poll();\n // Part 3.a - finds possibly d-connecting undirectedPaths between each pair of nodes\n // known to be d-separated\n List<PossibleDConnectingPath> dConnections = new ArrayList<>();\n // checks to see if looping over adjacencies\n if (adjacencySearch) {\n for (Collection<Node> conditions : fact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, fact.getX(), fact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, fact.getX(), fact.getY(), conditions));\n }\n }\n } else {\n for (IonIndependenceFacts allfact : separations) {\n for (Collection<Node> conditions : allfact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, allfact.getX(), allfact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, allfact.getX(), allfact.getY(), conditions));\n }\n }\n }\n }\n // accept PAG go to next PAG if no possibly d-connecting undirectedPaths\n if (dConnections.isEmpty()) {\n// doFinalOrientation(pag);\n// Graph p = screenForKnowledge(pag);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(pag);\n continue;\n }\n // maps conditioning sets to list of possibly d-connecting undirectedPaths\n paths = new HashMap<>();\n for (PossibleDConnectingPath path : dConnections) {\n List<PossibleDConnectingPath> p = paths.get(path.getConditions());\n if (p == null) {\n p = new LinkedList<>();\n }\n p.add(path);\n paths.put(path.getConditions(), p);\n }\n // Part 3.b - finds minimal graphical changes to block possibly d-connecting undirectedPaths\n List<Set<GraphChange>> possibleChanges = new ArrayList<>();\n for (Set<GraphChange> changes : findChanges(paths)) {\n Set<GraphChange> newChanges = new HashSet<>();\n for (GraphChange gc : changes) {\n boolean okay = true;\n for (Triple collider : gc.getColliders()) {\n\n if (pag.isUnderlineTriple(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n\n }\n if (!okay) {\n continue;\n }\n for (Triple collider : gc.getNoncolliders()) {\n if (pag.isDefCollider(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n }\n if (okay) {\n newChanges.add(gc);\n }\n }\n if (!newChanges.isEmpty()) {\n possibleChanges.add(newChanges);\n } else {\n possibleChanges.clear();\n break;\n }\n }\n float starthitset = System.currentTimeMillis();\n Collection<GraphChange> hittingSets = IonHittingSet.findHittingSet(possibleChanges);\n recHitTimes.add((System.currentTimeMillis() - starthitset) / 1000.);\n // Part 3.c - checks the newly constructed graphs from 3.b and rejects those that\n // cycles or produce independencies known not to occur from the input PAGs or\n // include undirectedPaths from definite nonancestors\n for (GraphChange gc : hittingSets) {\n boolean badhittingset = false;\n for (Edge edge : gc.getRemoves()) {\n Node node1 = edge.getNode1();\n Node node2 = edge.getNode2();\n Set<Triple> triples = new HashSet<>();\n triples.addAll(gc.getColliders());\n triples.addAll(gc.getNoncolliders());\n if (triples.size() != (gc.getColliders().size() + gc.getNoncolliders().size())) {\n badhittingset = true;\n break;\n }\n for (Triple triple : triples) {\n if (node1.equals(triple.getY())) {\n if (node2.equals(triple.getX()) ||\n node2.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n if (node2.equals(triple.getY())) {\n if (node1.equals(triple.getX()) ||\n node1.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n }\n if (badhittingset) {\n break;\n }\n for (NodePair pair : gc.getOrients()) {\n if ((node1.equals(pair.getFirst()) && node2.equals(pair.getSecond())) ||\n (node2.equals(pair.getFirst()) && node1.equals(pair.getSecond()))) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (!badhittingset) {\n for (NodePair pair : gc.getOrients()) {\n for (Triple triple : gc.getNoncolliders()) {\n if (pair.getSecond().equals(triple.getY())) {\n if (pair.getFirst().equals(triple.getX()) &&\n pag.getEndpoint(triple.getZ(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n\n }\n if (pair.getFirst().equals(triple.getZ()) &&\n pag.getEndpoint(triple.getX(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n }\n if (badhittingset) {\n continue;\n }\n Graph changed = gc.applyTo(pag);\n // if graph change has already been rejected move on to next graph\n if (reject.contains(changed)) {\n continue;\n }\n // if graph change has already been accepted move on to next graph\n if (step3PagsSet.contains(changed)) {\n continue;\n }\n // reject if null, predicts false independencies or has cycle\n if (predictsFalseIndependence(associations, changed)\n || changed.existsDirectedCycle()) {\n reject.add(changed);\n }\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(changed);\n // now add graph to queue\n\n// Graph p = screenForKnowledge(changed);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(changed);\n }\n }\n // exits loop if not looping over adjacencies\n if (!adjacencySearch) {\n break;\n }\n }\n }\n TetradLogger.getInstance().log(\"info\", \"Step 3: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n Queue<Graph> step3Pags = new LinkedList<>(step3PagsSet);\n\n /*\n * Step 4\n *\n * Finds redundant undirectedPaths and uses this information to expand the list\n * of possible graphs\n */\n steps = System.currentTimeMillis();\n Map<Edge, Boolean> necEdges;\n Set<Graph> outputPags = new HashSet<>();\n\n while (!step3Pags.isEmpty()) {\n Graph pag = step3Pags.poll();\n necEdges = new HashMap<>();\n // Step 4.a - if x and y are known to be unconditionally associated and there is\n // exactly one trek between them, mark each edge on that trek as necessary and\n // make the tiples on the trek definite noncolliders\n // initially mark each edge as not necessary\n for (Edge edge : pag.getEdges()) {\n necEdges.put(edge, false);\n }\n // look for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n List<List<Node>> treks = treks(pag, fact.x, fact.y);\n if (treks.size() == 1) {\n List<Node> trek = treks.get(0);\n List<Triple> triples = new ArrayList<>();\n for (int i = 1; i < trek.size(); i++) {\n // marks each edge in trek as necessary\n necEdges.put(pag.getEdge(trek.get(i - 1), trek.get(i)), true);\n if (i == 1) {\n continue;\n }\n // makes each triple a noncollider\n pag.addUnderlineTriple(trek.get(i - 2), trek.get(i - 1), trek.get(i));\n }\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // Part 4.b - branches by generating graphs for every combination of removing\n // redundant undirectedPaths\n boolean elimTreks;\n // checks to see if removing redundant undirectedPaths eliminates every trek between\n // two variables known to be nconditionally assoicated\n List<Graph> possRemovePags = possRemove(pag, necEdges);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n for (Graph newPag : possRemovePags) {\n elimTreks = false;\n // looks for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n if (treks(newPag, fact.x, fact.y).isEmpty()) {\n elimTreks = true;\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // add new PAG to output unless a necessary trek has been eliminated\n if (!elimTreks) {\n outputPags.add(newPag);\n }\n }\n }\n outputPags = removeMoreSpecific(outputPags);\n// outputPags = applyKnowledge(outputPags);\n\n TetradLogger.getInstance().log(\"info\", \"Step 4: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n\n /*\n * Step 5\n *\n * Generate the Markov equivalence classes for graphs and accept only\n * those that do not predict false d-separations\n */\n steps = System.currentTimeMillis();\n Set<Graph> outputSet = new HashSet<>();\n for (Graph pag : outputPags) {\n Set<Triple> unshieldedPossibleColliders = new HashSet<>();\n for (Triple triple : getPossibleTriples(pag)) {\n if (!pag.isAdjacentTo(triple.getX(), triple.getZ())) {\n unshieldedPossibleColliders.add(triple);\n }\n }\n\n PowerSet<Triple> pset = new PowerSet<>(unshieldedPossibleColliders);\n for (Set<Triple> set : pset) {\n Graph newGraph = new EdgeListGraph(pag);\n for (Triple triple : set) {\n newGraph.setEndpoint(triple.getX(), triple.getY(), Endpoint.ARROW);\n newGraph.setEndpoint(triple.getZ(), triple.getY(), Endpoint.ARROW);\n }\n doFinalOrientation(newGraph);\n }\n for (Graph outputPag : finalResult) {\n if (!predictsFalseIndependence(associations, outputPag)) {\n Set<Triple> underlineTriples = new HashSet<>(outputPag.getUnderLines());\n for (Triple triple : underlineTriples) {\n outputPag.removeUnderlineTriple(triple.getX(), triple.getY(), triple.getZ());\n }\n outputSet.add(outputPag);\n }\n }\n }\n\n// outputSet = applyKnowledge(outputSet);\n outputSet = checkPaths(outputSet);\n\n output.addAll(outputSet);\n TetradLogger.getInstance().log(\"info\", \"Step 5: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n runtime = ((System.currentTimeMillis() - start) / 1000.);\n logGraphs(\"\\nReturning output (\" + output.size() + \" Graphs):\", output);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n return output;\n }",
"public void fitnessFunction()\n\t{\n\t\t\n\t}",
"public void execFunzzySearchMapGeneByRangeFunc(){\n Map map = new HashMap();\n\n if(this.searchParam != null && this.searchParam.length()> 0 ){\n if(this.searchParam.contains(\":\")==true || this.searchParam.startsWith(\"chr\") == true){\n String chrom = \"\";\n int pstart = -1;\n int pend = -1;\n if(this.searchParam.indexOf(\":\") > -1 ){\n int idex = this.searchParam.indexOf(\":\");\n chrom = this.searchParam.substring(0,idex );\n System.out.println(\"chrom=\"+chrom);\n map.put(\"chrom\",chrom);\n if(this.searchParam.indexOf(\"-\") > -1 ){\n int idex1 = this.searchParam.indexOf(\"-\");\n pstart = Integer.parseInt(this.searchParam.substring(idex+1, idex1));\n pend = Integer.parseInt(this.searchParam.substring(idex1+1, this.searchParam.length()));\n map.put(\"startpos\",pstart);\n map.put(\"endpos\",pend);\n }else {\n pstart = Integer.parseInt(this.searchParam.substring(idex+1, this.searchParam.length()));\n map.put(\"startpos\",pstart);\n }\n\n }else if(this.searchParam.startsWith(\"chr\") == true){\n map.put(\"chrom\",this.searchParam);\n\n\n }\n }\n }\n\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"null\") ==false && this.searchSpecies.equals(\"all\") == false){\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"species\",this.searchSpecies);\n }\n\n if(this.searchTrait != null && this.searchTrait.equals(\"null\") ==false && this.searchTrait.length()>0){\n\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"searchTrait\", this.searchTrait) ;\n }\n\n if(this.pvalue != null && this.pvalue.equals(\"null\") ==false && this.pvalue.length()>0){\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"psitu\", this.psitu);\n map.put(\"pval\", this.pvalue) ;\n }\n\n\n List<MapGeneBean> tmplist = (List<MapGeneBean>) baseService.findResultList(\"cn.big.gvk.dm.MapGene.selectMapGeneCountByPosition\",map);\n if(tmplist != null && tmplist.size()>0){\n mapGeneBeanList = new ArrayList<MapGeneBean>();\n\n for(MapGeneBean tbean: tmplist){\n Map cmp = new HashMap();\n cmp.put(\"gid\",tbean.getGid());\n MapGeneBean genebean = (MapGeneBean) baseService.findObjectByObject(\"cn.big.gvk.dm.MapGene.selectMapGeneCount\",cmp);\n if(genebean != null ){\n\n Map t = new HashMap();\n t.put(\"gId\",genebean.getGid()) ;\n t.put(\"count\",\"count\");\n\n //trait count\n GwasAssociationView gwas = (GwasAssociationView) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectGwasViewByGeneInfo\",t);\n if(gwas != null){\n genebean.setTraitCount(gwas.getTraitCount());\n }\n\n //study count\n StudyBean study = (StudyBean) baseService.findObjectByObject(\"cn.big.gvk.dm.study.selectStudyByMapGeneId\",t);\n if(study != null ){\n genebean.setStudyCount(study.getStudyCount());\n }\n\n //publication count\n PublicationBean publication = (PublicationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.publication.selectPubByGeneId\",t);\n if (publication != null ){\n genebean.setPublicationCount(publication.getPublicationCount());\n }\n mapGeneBeanList.add(genebean) ;\n }\n\n }\n }\n\n StringBuffer sb = new StringBuffer() ;\n\n if(mapGeneBeanList != null && mapGeneBeanList.size()>0){\n for(MapGeneBean mapgene: mapGeneBeanList){\n sb.append(mapgene.getMapGeneId()).append(\"\\t\").append(mapgene.getMapGeneChrom()).append(\":\")\n .append(mapgene.getMapGeneStart()).append(\"-\").append(mapgene.getMapGeneEnd()).append(\"\\t\").append(mapgene.getTraitCount()).append(\"\\t\")\n .append(mapgene.getStudyCount()).append(\"\\n\");\n }\n }\n\n if(format == 1 ){ //export txt\n this.response.reset();\n this.response.setHeader(\"Content-Disposition\",\n \"attachment;filename=export.txt\");\n this.response.setContentType(\"application/ms-txt\");\n try {\n PrintWriter pr = this.response.getWriter();\n pr.print(sb.toString());\n pr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }",
"public static void main(String[] args) {\n GridMap map = null;\n try {\n map = GridMap.fromFile(\"map.txt\");\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n\n if (map == null)\n throw new RuntimeException(\"Unable to obtain discretized map.\");\n\n // Prints map\n System.out.println(\"Map to analyze:\");\n System.out.println(map);\n\n // Executes search\n int[] rowColIni = map.getStart();\n int[] rowColFim = map.getGoal();\n Block initial = new Block(rowColIni[0], rowColIni[1], BlockType.FREE);\n Block target = new Block(rowColFim[0], rowColFim[1], BlockType.FREE);\n GreedySearch search = new GreedySearch(map, initial, target);\n RobotAction[] ans = search.solve();\n\n // Shows answer\n if (ans == null) {\n System.out.println(\"No answer found for this problem.\");\n } else {\n\n Block current = initial;\n System.out.print(\"Answer: \");\n for (RobotAction a : ans) {\n System.out.print(\", \" + a);\n Block next = map.nextBlock(current, a);\n map.setRoute(next.row, next.col);\n current = next;\n }\n\n // Shows map with the route found\n System.out.println();\n System.out.println(\"Route found:\");\n System.out.println(map);\n }\n }",
"public static void main(String[] args) {\n\t\t\n\t\tArrayList<Double> results = new ArrayList<Double>();\n\t\tArrayList<Double> psoResults = new ArrayList<Double>(); \n\t\tint numTermites = 20;\n\t\tint iterations = 10;\n\t\t\n\t\tdouble pStrength = 5;\n\t\tint moves = numTermites;\n\t\tdouble pImportance = 0.01;\n\t\tdouble decayRate = 0.15;\n\t\tdouble globalStrength = 0.25;\n\t\tdouble localStrength = 0.25;\n\t\tdouble randomStrength = 0.15;\n\t\tint runs = 100;\n\t\tfor (int size = 10; size<20; size+=10) {\n\t\t\tmoves = size*2;\n\t\t\ttry\n\t\t\t{\n\t\t\t FileWriter writer = new FileWriter(\"C:\\\\Users\\\\postcn\\\\Documents\\\\size_\"+moves+\".csv\");\n\t\t \n\t\t\t writer.append(\"pImportance\");\n\t\t\t writer.append(',');\n\t\t\t writer.append(\"Result\");\n\t\t\t writer.append('\\n');\n\t\t\t \n\t\t\t for (int i=0; i<runs*5-1; i++) {\n\t\t\t\t\tdouble best = 0;\n\t\t\t\t\tpImportance += 0.01;\n\t\t\t\t\tfor(int j=0; j<runs; j++) {\n\t\t\t\t\t\tGrid g = new Grid();\n\t\t\t\t\t\tg.printGrid();\n\t\t\t\t\t\tg.setSize(size, size);\n\t\t\t\t\t\t//g.setRandomValues();\n\t\t\t\t\t\tg.setGradientValues(1);\n\t\t\t\t\t\tdouble test = randomSearch(numTermites, iterations, pStrength, moves, pImportance, g, decayRate);\n\t\t\t\t\t\tif (test > best) {\n\t\t\t\t\t\t\tbest = test;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\twriter.append(pImportance+\"\");\n\t\t\t\t\twriter.append(',');\n\t\t\t\t\twriter.append(best+\"\");\n\t\t\t\t\twriter.append(\"\\n\");\n\t\t\t\t\tSystem.out.println(\"pImportance: \"+ pImportance + \" :\"+best);\n//\t\t\t\t\tresults.add();\n//\t\t\t\t\tpsoResults.add(PSOSearch(iterations,numTermites, g,globalStrength,localStrength,randomStrength));\n\t\t\t\t}\n\t\t \n\t\t\t //generate whatever data you want\n\t\t \n\t\t\t writer.flush();\n\t\t\t writer.close();\n\t\t\t}\n\t\t\tcatch(IOException e)\n\t\t\t{\n\t\t\t e.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tdouble accuracy = 0;\n\t\tfor (Double d : results) {\n\t\t\taccuracy += d;\n\t\t}\n\t\taccuracy = accuracy / (double) results.size();\n\t\tSystem.out.println(\"Termites ran an average of \" + accuracy+\"% accuracy.\");\n\t\taccuracy = 0;\n\t\tfor (Double d : psoResults) {\n\t\t\taccuracy += d;\n\t\t}\n\t\taccuracy = accuracy / (double) results.size();\n\t\tSystem.out.println(\"PSO ran an average of \" + accuracy+\"% accuracy.\");\n\t}",
"@Override\n\t\tpublic double heuristic() {\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < k; i++) {\n\t\t\t\tsum += Math.abs(xGoals[i] - state[i]);\n\t\t\t\tsum += Math.abs(yGoals[i] - state[k + i]);\n\t\t\t}\n\t\t\treturn sum;\n\t\t}",
"public void calcularFitness() {\n double fit = 0;\r\n for (int x=0; x < this.genotipo.length;x++){\r\n if (x!=this.genotipo.length-1){\r\n fit+=distancias[this.genotipo[x]][this.genotipo[x+1]];\r\n }else{\r\n fit+=distancias[this.genotipo[x]][this.genotipo[0]];\r\n }\r\n }\r\n this.fitness = fit;\r\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 }",
"@Override\n public void evaluate(Solution solution) throws JMException {\n\n int[] tour = new int[numberOfNodes + 1];\n int firstCity = ((Permutation) solution.getDecisionVariables()[0]).vector_[0];\n int lastCity = ((Permutation) solution.getDecisionVariables()[0]).vector_[numberOfNodes - 1];\n\n double fitness1_td = 0.0;\n\n // Calculate fitness 1 - total distance\n for (int i = 0; i < numberOfNodes - 1; i++) {\n int x = ((Permutation) solution.getDecisionVariables()[0]).vector_[i];\n int y = ((Permutation) solution.getDecisionVariables()[0]).vector_[i+1];\n\n tour[i] = x;\n tour[i+1] = y;\n\n fitness1_td += calDistances(x, y);\n }\n // generate tour with same start city and end city\n tour[numberOfNodes] = tour[0];\n\n fitness1_td += calDistances(firstCity, lastCity);\n\n\n // Correctness check: does the tour start and end in the same city\n if(tour[0] != tour[tour.length - 1]) {\n System.err.println(\"ERROR: The last city must be the same as the first city\");\n System.exit(1);\n }\n\n /*for (int i = 0; i < tour.length; i++) {\n System.out.print(tour[i] + \" \");\n }*/\n //System.out.println(\"\\n\" + tour.length);\n\n // Calculate fitness 2 - objective value of a given tour\n ArrayInt z = (ArrayInt) solution.getDecisionVariables()[1];\n //System.out.println(z.getLength());\n\n double fitness2_ob;\n double wc = 0.0;\n double ft = 0.0;\n double fp = 0.0;\n\n //the following is used for a different interpretation of \"packingPlan\"\n int itemsPerCity = z.getLength() / (tour.length - 2);\n //System.out.println(itemsPerCity);\n\n for (int i = 0; i < tour.length - 1; i++) {\n\n int currentCityTEMP = tour[i];\n // what's the current city? --> but the items start at city 2 in the TTP file, so I have to take another 1 off!\n int currentCity = currentCityTEMP - 1;\n\n if (i > 0) {\n\n if (currentCity == -1) {\n // No items in city 1\n wc += 0.0;\n fp += 0.0;\n\n } else {\n\n for (int itemNumber = 0; itemNumber < itemsPerCity; itemNumber++) {\n\n int indexOfPackingPlan = (i-1) * itemsPerCity + itemNumber;\n // what is the next item's index in items-array?\n int itemIndex = currentCity + itemNumber * (numberOfNodes - 1);\n //System.out.println(\"i: \" + i);\n\n if (z.getValue(indexOfPackingPlan) == 1) {\n // pack item\n //System.out.println(itemIndex);\n int currentWC = items[itemIndex][2];\n wc += currentWC;\n\n int currentFP = items[itemIndex][1];\n fp += currentFP;\n }\n }\n\n }\n\n int h = (i+1) % (tour.length-1); //h: next tour city index\n //System.out.println(\"h: \" + h);\n long distance = calDistances(i, h);\n // compute the adjusted (effective) distance\n ft += (distance / (1 - wc * (maxSpeed - minSpeed) / capacityOfKnapsack));\n }\n }\n\n wendUsed = wc;\n wend = capacityOfKnapsack - wc;\n fitness2_ob = fp - ft * rentingRatio;\n\n solution.setObjective(0, fitness1_td);\n solution.setObjective(1, -fitness2_ob); // Convert from maximum objective value to minimum objective value\n }",
"@Override\n\t//loc1 is the start location,loc2 is the destination\n\tpublic ArrayList<MapCoordinate> bfsSearch(MapCoordinate loc1, MapCoordinate loc2, Map m) {\n\t\tSystem.out.println(\"come into bfsSearch\");\n\t\tif(m.isAgentHasAxe() && m.isAgentHasKey()){\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add to visited every loop\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0,s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move east\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){ //this is important else if(cTemp!='~'), not barely else,\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move north\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' &&s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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}\t\n\t\t\t}\n\t\t\treturn null;\n\t\t}else if(m.isAgentHasAxe()){ //only have axe\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add visited every loop\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0,s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move north\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}else if(m.isAgentHasKey()){ //only have key\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation());\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0, s.getLocation()); //add to head,in this fashion, return the right order of route\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY()); \n\t\t\t\tif(m.hasCoordinate(temp)){//state move east\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY()); //state that move west\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1); //state move north\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1); //state move south\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * \n\t\t **/\t\t\n\t\telse{ //have no key and axe\n\t\t\tSystem.out.println(\"come into the last elas clause\");\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\tVisited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\t//int i=0;\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\t//i++;\n\t\t\t\t//System.out.println(\"come into while: \"+i);\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add visited, let program won't stuck in \n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tSystem.out.println(\"return computed route\");\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0, s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\tfor(MapCoordinate mc:route){\n\t\t\t\t\t\t//System.out.println(\"print returned route in bfssearch\");\n\t\t\t\t\t\tSystem.out.print(\"mc:\"+mc.getX()+\" \"+mc.getY()+\"->\");\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\t//System.out.println(\"1 if\");\n\t\t\t\t\tif(s.getPrevState()!=null &&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if\");\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 if\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 if\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 else\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.add(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tSystem.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*'&&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}//do not do any action for not enough stones situation\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}//do not do any action for not enough stones situation\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tinit(Hx.Manhattan, CostMode.Def);\n\t\tMaze smallMaze = new Maze(\"mazes/tinySearch.txt\");\n\t\tAgent astarAg = new Agent(smallMaze);\n\t\tRecorder rd = new Recorder();\n\t\tSearch.AstarMulOptimal(astarAg, smallMaze, rd);\n\t\t//System.out.println(rd.getExpandNodes());\n\t}",
"public abstract double getFitness(Genotype genotype);",
"void ComputeFitness(){\n\t\tint i, pos;\n\t\t// individual t;\n\t\tdouble min, sum = 0, sumSize = 0, tm;\n\t\t// First Compute Raw fitness\n\t\tfor(i = 0; i < poplen; i++)\n\t\t{\n\t\t\tif(oldpop[i].evaluated==FALSE)\n\t\t\t{ tm=ComputeRF(oldpop[i]);\n\t\t\t\toldpop[i].fitness = tm;\n\t\t\t\toldpop[i].oldfitness = tm;\n\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\toldpop[i].fitness=oldpop[i].oldfitness;\n\t\t\t}\n\t\t\t\n\t\t\t//oldpop[i].DisplayIndividual();\n\t\t\t//System.out.println(oldpop[i].fitness);\n\t\t}\n\t\t//tim individual co fitness be nhat\n\t\tmin = oldpop[0].fitness;\n\t\tpos = 0;\n\t\tsum = oldpop[0].fitness;\n\t\tsumSize = oldpop[0].size;\n\t\t\n\t\tfor(i = 1; i < poplen; i++) {\n\t\t\tif(oldpop[i].fitness < min) {\n\t\t\t\tmin = oldpop[i].fitness;\n\t\t\t\tpos = i;\n\t\t\t}\n\t\t\tsum += oldpop[i].fitness;\n\t\t\tsumSize += oldpop[i].size;\n//\t\t\tpopSize[gen][i]= oldpop[i].size;\n\t\t}\n\t\t// copy the best and average\n\t\tbestcurrent[gen] = new individual();\n\t\tbestcurrent[gen].CopyIndividual(oldpop[pos], TRUE);\n\t\taverage[gen] = sum /poplen;\n\t\taverageSize[gen] = sumSize /poplen;\n\t\t// Third Compute Adjusted fitness\n\t\tAdjustFitness();\n\t\t// Finally Compute nomarlized fitness\n \t\tNormalizeFitness();\n\t}",
"public ArrayList<UUSearchNode> getSuccessors() {\n\n ArrayList<UUSearchNode> successors = new ArrayList<UUSearchNode>();//this will be returned\n ArrayList<CannibalNode> helper = new ArrayList<CannibalNode>();\n\n if (this.state[2]==1){ //if the boat is on the starting shore\n helper.add(new CannibalNode(this.state[0] - 2, this.state[1],\n this.state[2] - 1, this.depth + 1)); //subtracting <201>\n helper.add(new CannibalNode(this.state[0], this.state[1] - 2,\n this.state[2] - 1, this.depth + 1)); //subtracting <021>\n helper.add(new CannibalNode(this.state[0] - 1, this.state[1] - 1,\n this.state[2] - 1, this.depth + 1)); //subtracting <111>\n helper.add(new CannibalNode(this.state[0] - 1, this.state[1],\n this.state[2] - 1, this.depth + 1)); //subtracting <101>\n helper.add(new CannibalNode(this.state[0], this.state[1] - 1,\n this.state[2] - 1, this.depth + 1)); //subtracting <011>\n }else{ //if the boat is on the opposite shore\n helper.add(new CannibalNode(this.state[0] + 2, this.state[1],\n this.state[2] + 1, this.depth + 1)); //adding <201>\n helper.add(new CannibalNode(this.state[0], this.state[1] + 2,\n this.state[2] + 1, this.depth + 1)); //adding <021>\n helper.add(new CannibalNode(this.state[0] + 1, this.state[1] + 1,\n this.state[2] + 1, this.depth + 1)); //adding <111>\n helper.add(new CannibalNode(this.state[0] + 1, this.state[1],\n this.state[2] + 1, this.depth + 1)); //adding <101>\n helper.add(new CannibalNode(this.state[0], this.state[1] + 1,\n this.state[2] + 1, this.depth + 1)); //adding <011>\n }\n\n //now we check for feasibility and legality\n for(CannibalNode n : helper){\n if(isFeasibleState(n.state) && isLegalState(n.state)){\n successors.add(n);\n }\n }\n return successors;\n }",
"private static void BicingsimulatedAnnealingSearch(int num, int n_est, int nbicis, int nfurgo, int d1, int cas, String Cas, String H, String D, int s) {\n\n\n try {\n\n double MedT = 0;\n //double MedN = 0;\n //double MedB = 0;\n int iteraciones = 100;\n Estado Bicing = new Estado(n_est,nbicis,nfurgo,d1,s,1);\n Bicing.setList_cdesp(iteraciones);\n long StartTime = System.nanoTime();\n Problem problem = new Problem(Bicing, new sucesoresA(), new isGoal(), new Heuristic_Function());\n SimulatedAnnealingSearch search = new SimulatedAnnealingSearch(iteraciones, 1000, 125, 0.00001D);\n SearchAgent agent = new SearchAgent(problem, search);\n List L = search.getPathStates();\n Properties properties = agent.getInstrumentation();\n long EndTime = System.nanoTime();\n Estado E = (Estado) search.getGoalState();\n long time = ((EndTime - StartTime) / 1000000);\n MedT += time;\n //MedB += E.getganancia();\n // MedN += Integer.parseInt(properties.getProperty((String)properties.keySet().iterator().next()));\n // MedB /= num;\n // MedN /= num;\n // MedT /= num;\n //MedB = (Math.round(MedB*100.0)/100.0);\n Writer output;\n output = new BufferedWriter(new FileWriter(\"Estadisticas_\" + Cas + \"_D\" + D + \"_H\" + H + \"S.txt\", true));\n double [] vec = E.getearnings();\n for (int i = 0 ; i < iteraciones; ++i) {\n String S = \"\" + vec[i];\n S = S + '\\n';\n output.append(S);\n }\n output.close();\n\n /*for (int i = 0; i < E.getN_furgo(); ++i) {\n System.out.println(\"Recorrido por furgoneta \" + i + \" \" + E.getIFurgo(i).getLong_t());\n }*/\n //printEstado(E);\n //System.out.println();\n //System.out.println(E.getganancia());\n //printActions(agent.getActions());\n //printInstrumentation(agent.getInstrumentation());\n } catch (Exception var4) {\n var4.printStackTrace();\n }\n\n }",
"public void execFuzzySearchVariationFunc(){\n\n\n Map map = new HashMap();\n\n if(this.searchParam != null && this.searchParam.length()> 0 ){\n System.out.println(this.searchParam );\n if(this.searchParam.contains(\":\")==true || this.searchParam.startsWith(\"chr\") == true) {\n String chrom = \"\";\n int pstart = -1;\n int pend = -1;\n if (this.searchParam.indexOf(\":\") > -1) {\n int idex = this.searchParam.indexOf(\":\");\n chrom = this.searchParam.substring(0, idex );\n System.out.println(\"chrom=\" + chrom);\n map.put(\"chrom\", chrom);\n if (this.searchParam.indexOf(\"-\") > -1) {\n int idex1 = this.searchParam.indexOf(\"-\");\n pstart = Integer.parseInt(this.searchParam.substring(idex + 1, idex1 ));\n pend = Integer.parseInt(this.searchParam.substring(idex1 + 1, this.searchParam.length()));\n map.put(\"startpos\", pstart);\n map.put(\"endpos\", pend);\n } else {\n pstart = Integer.parseInt(this.searchParam.substring(idex + 1, this.searchParam.length()));\n map.put(\"startpos\", pstart);\n }\n\n } else if (this.searchParam.startsWith(\"chr\") == true) {\n map.put(\"chrom\", this.searchParam);\n }\n }\n\n map.put(\"searchParam\",this.searchParam);\n }\n\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"null\") ==false && this.searchSpecies.equals(\"all\") == false){\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"species\",this.searchSpecies);\n }\n\n if(this.searchTrait != null&& this.searchTrait.equals(\"null\") ==false && this.searchTrait.length()>0){\n\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"searchTrait\", this.searchTrait) ;\n }\n\n if(this.pvalue != null&& this.pvalue.equals(\"null\") ==false && this.pvalue.length()>0){\n\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"psitu\", this.psitu);\n map.put(\"pval\", this.pvalue) ;\n }\n\n\n //here, parse search param and get genotype information\n genotypeBeanList = (List<GenotypeBean>) baseService.findResultList(\"cn.big.gvk.dm.Genotype.selectGenotypeByPos\",map);\n if(genotypeBeanList != null && genotypeBeanList.size() > 0 ){\n for(GenotypeBean tbean :genotypeBeanList ){\n List genotypelist = new ArrayList();\n genotypelist.add(tbean.getGenotypeId()) ;\n\n Map t = new HashMap();\n t.put(\"genotypelist\",genotypelist);\n List<GenotypeAnnotateGeneView> annotateview = baseService.findResultList(\"cn.big.gvk.dm.Genotype.selectGenotypeByList\",t);\n if(annotateview != null && annotateview.size()>0 ){\n //here we need to filter the result\n Map filtermap = new HashMap();\n for(GenotypeAnnotateGeneView tview : annotateview){\n String fkey = tview.getMapGeneId()+\"_\"+tview.getConseqtype();\n if(filtermap.containsKey(fkey) == false){\n filtermap.put(fkey,tview);\n }\n }\n\n if(filtermap.size()>0){\n List<GenotypeAnnotateGeneView> alist = new ArrayList<GenotypeAnnotateGeneView>();\n Iterator it = filtermap.entrySet().iterator();\n while(it.hasNext()){\n Map.Entry entry = (Map.Entry) it.next();\n GenotypeAnnotateGeneView val = (GenotypeAnnotateGeneView) entry.getValue();\n alist.add(val);\n }\n\n tbean.setGenotypeAnnotateGeneView(alist);\n }\n\n\n }\n\n //find association count\n GwasAssociationBean gwas = (GwasAssociationBean) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectAssociationCountByGenotypeid\",tbean.getGenotypeId());\n if(gwas != null){\n tbean.setTraitCount(gwas.getGwasCount());\n }\n\n //find studycount\n Map cmap = new HashMap();\n cmap.put(\"genotypeId\",tbean.getGenotypeId());\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n cmap.put(\"species\",this.searchSpecies);\n }\n\n\n GwasAssociationBean tg_bean1 = (GwasAssociationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectStudyCountByGenotypeid\",cmap);\n if(tg_bean1 != null ){\n tbean.setStudyCount(tg_bean1.getGwasCount());\n }\n\n }\n\n\n\n }\n\n StringBuffer sb = new StringBuffer() ;\n\n if(genotypeBeanList != null && genotypeBeanList.size()>0){\n for(GenotypeBean genotype: genotypeBeanList){\n sb.append(genotype.getVarId()).append(\"\\t\").append(genotype.getChrom()).append(\":\")\n .append(genotype.getStartPos()).append(\"\\t\").append(genotype.getTraitCount())\n .append(\"\\t\").append(genotype.getStudyCount()).append(\"\\n\");\n }\n }\n\n if(format == 1 ){ //export txt\n this.response.reset();\n this.response.setHeader(\"Content-Disposition\",\n \"attachment;filename=export.txt\");\n this.response.setContentType(\"application/ms-txt\");\n try {\n PrintWriter pr = this.response.getWriter();\n pr.print(sb.toString());\n pr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }",
"private void runAlgorithm(){\n fitness = new ArrayList<Double>(); \n \n int iter = 0;\n \n // While temperature higher than absolute temperature\n this.temperature = getCurrentTemperature(0);\n while(this.temperature > this.p_absoluteTemperature && iter < 100000){\n //while(!stopCriterionMet()){\n // Select next state\n //for(int i=0;i<20;i++){\n int count = 0;\n boolean selected = false;\n while(!selected){\n Problem.ProblemState next = nextState();\n if(isStateSelected(next)){\n selected = true;\n this.state = next;\n }\n \n count++;\n if(count == 10) break;\n }\n //}\n \n // Sample data\n double fvalue = this.state.getFitnessValue();\n this.fitness.add(new Double(fvalue));\n \n iter = iter + 1;\n \n // Lower temperature\n this.temperature = getCurrentTemperature(iter);\n }\n \n this.n_iter = iter;\n return;\n }",
"public double[] calculatefitnessvalue(String str) {\t\n\t\tint a = Integer.parseInt(str.substring(0, 5), 2); \n\t\tint b = Integer.parseInt(str.substring(6, 11), 2);\n\t\tint c = Integer.parseInt(str.substring(12, 17), 2);\n\t\tint d = Integer.parseInt(str.substring(18, 23), 2);\n\t\tint e = Integer.parseInt(str.substring(24, 29), 2);\n\t\tint f = Integer.parseInt(str.substring(30, 35), 2);\n\t\tint g = Integer.parseInt(str.substring(36, 41), 2);\n\t\tint h = Integer.parseInt(str.substring(42, 47), 2);\n\t\tint i = Integer.parseInt(str.substring(48, 53), 2);\n\t\tint j = Integer.parseInt(str.substring(54, 59), 2);\n\n\t\tdouble x1 = a * (6.0 - 0) / (Math.pow(2, 6) - 1); //gene of x\n\t\tdouble x2 = b * (6.0 - 0) / (Math.pow(2, 6) - 1); //gene of y\n\t\tdouble x3 = c * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x4 = d * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x5 = e * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x6 = f * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x7 = g * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x8 = h * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x9 = i * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x10 = j * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\t\n\t\t//the Objective function\n\t\tdouble fitness = 3 - Math.sin(2 * x1) * Math.sin(2 * x1) \n\t\t\t\t+ Math.sin(2 * x2) * Math.sin(2 * x2)\n\t\t\t\t- Math.sin(2 * x3) * Math.sin(2 * x3)\n\t\t\t\t+ Math.sin(2 * x4) * Math.sin(2 * x4)\n\t\t\t\t- Math.sin(2 * x5) * Math.sin(2 * x5)\n\t\t\t\t+ Math.sin(2 * x6) * Math.sin(2 * x6)\n\t\t\t\t- Math.sin(2 * x7) * Math.sin(2 * x7)\n\t\t\t\t+ Math.sin(2 * x8) * Math.sin(2 * x8)\n\t\t\t\t- Math.sin(2 * x9) * Math.sin(2 * x9)\n\t\t\t\t+ Math.sin(2 * x10) * Math.sin(2 * x10);\n\t\t\n\t\tdouble[] returns = { x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, fitness };\n\t\treturn returns;\n\t}",
"public interface IRealTimeSearchAlgorithm {\n\n /**\n * This function will calculate a prefix from the start node to the goal node path\n * @param start - The start node\n * @param goal - The goal node\n * @param numOfNodesToDevelop - The number of nodes to develop in the search\n * @param agent - The agent\n * @return - A prefix from the start node to the goal node path\n */\n public List<Node> calculatePrefix(Node start, Node goal, int numOfNodesToDevelop, Agent agent);\n}",
"public void execFuzzySearchRangeFunc(){\n\n Map map = new HashMap();\n\n if(this.searchParam != null && this.searchParam.length()> 0 ){\n if(this.searchParam.contains(\":\")==true || this.searchParam.startsWith(\"chr\") == true){\n String chrom = \"\";\n int pstart = -1;\n int pend = -1;\n if(this.searchParam.indexOf(\":\") > -1 ){\n int idex = this.searchParam.indexOf(\":\");\n chrom = this.searchParam.substring(0,idex );\n System.out.println(\"chrom=\"+chrom);\n map.put(\"chrom\",chrom);\n if(this.searchParam.indexOf(\"-\") > -1 ){\n int idex1 = this.searchParam.indexOf(\"-\");\n pstart = Integer.parseInt(this.searchParam.substring(idex+1, idex1));\n pend = Integer.parseInt(this.searchParam.substring(idex1+1, this.searchParam.length()));\n map.put(\"startpos\",pstart);\n map.put(\"endpos\",pend);\n }else {\n pstart = Integer.parseInt(this.searchParam.substring(idex+1, this.searchParam.length()));\n map.put(\"startpos\",pstart);\n }\n\n }else if(this.searchParam.startsWith(\"chr\") == true){\n map.put(\"chrom\",this.searchParam);\n\n\n }\n }\n }\n\n int idenfilter = 0;\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n idenfilter =1;\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"species\",this.searchSpecies);\n }\n\n if(this.searchTrait != null&& this.searchTrait.equals(\"null\")==false && this.searchTrait.length()>0){\n idenfilter =1;\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"searchTrait\", this.searchTrait) ;\n }\n\n if(this.pvalue != null&& this.pvalue.equals(\"null\")==false && this.pvalue.length()>0){\n idenfilter =1;\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"psitu\", this.psitu);\n map.put(\"pval\", this.pvalue) ;\n }\n\n List<SearchItemBean> searchlist = (List<SearchItemBean>) baseService.findResultList(\"cn.big.gvk.dm.Search.selectRangeBySearch\",map);\n if( searchlist != null ){\n genotypeBeanList = new ArrayList<GenotypeBean>();\n mapGeneBeanList = new ArrayList<MapGeneBean>();\n for(SearchItemBean tmpbean : searchlist){\n if(tmpbean.getItemType() == 1){ //variant\n Map cmp = new HashMap();\n cmp.put(\"genotypeid\",tmpbean.getItemId());\n GenotypeBean tbean = (GenotypeBean) baseService.findObjectByObject(\"cn.big.gvk.dm.Genotype.selectGenotypeByPos\",cmp);\n if(tbean != null ){\n List genotypelist = new ArrayList();\n genotypelist.add(tbean.getGenotypeId()) ;\n\n Map t = new HashMap();\n t.put(\"genotypelist\",genotypelist);\n List<GenotypeAnnotateGeneView> annotateview = baseService.findResultList(\"cn.big.gvk.dm.Genotype.selectGenotypeByList\",t);\n if(annotateview != null && annotateview.size()>0 ){\n //here we need to filter the result\n Map filtermap = new HashMap();\n for(GenotypeAnnotateGeneView tview : annotateview){\n String fkey = tview.getMapGeneId()+\"_\"+tview.getConseqtype();\n if(filtermap.containsKey(fkey) == false){\n filtermap.put(fkey,tview);\n }\n }\n\n if(filtermap.size()>0){\n List<GenotypeAnnotateGeneView> alist = new ArrayList<GenotypeAnnotateGeneView>();\n Iterator it = filtermap.entrySet().iterator();\n while(it.hasNext()){\n Map.Entry entry = (Map.Entry) it.next();\n GenotypeAnnotateGeneView val = (GenotypeAnnotateGeneView) entry.getValue();\n alist.add(val);\n }\n\n tbean.setGenotypeAnnotateGeneView(alist);\n }\n\n\n }\n\n //find association count\n GwasAssociationBean gwas = (GwasAssociationBean) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectAssociationCountByGenotypeid\",tbean.getGenotypeId());\n if(gwas != null){\n tbean.setTraitCount(gwas.getGwasCount());\n }\n\n //find studycount\n Map cmap = new HashMap();\n cmap.put(\"genotypeId\",tbean.getGenotypeId());\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n cmap.put(\"species\",this.searchSpecies);\n }\n\n\n GwasAssociationBean tg_bean1 = (GwasAssociationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectStudyCountByGenotypeid\",cmap);\n if(tg_bean1 != null ){\n tbean.setStudyCount(tg_bean1.getGwasCount());\n }\n\n genotypeBeanList.add(tbean) ;\n }\n\n\n\n\n }else if(tmpbean.getItemType() == 2){//gene\n\n Map cmp = new HashMap();\n cmp.put(\"gid\",tmpbean.getItemId()) ;\n MapGeneBean mgb = (MapGeneBean) baseService.findObjectByObject(\"cn.big.gvk.dm.MapGene.selectMapGeneCount\",cmp);\n if(mgb != null ){\n Map t = new HashMap();\n t.put(\"gId\",mgb.getGid()) ;\n t.put(\"count\",\"count\");\n\n //trait count\n GwasAssociationView gwas = (GwasAssociationView) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectGwasViewByGeneInfo\",t);\n if(gwas != null){\n mgb.setTraitCount(gwas.getTraitCount());\n }\n\n //study count\n StudyBean study = (StudyBean) baseService.findObjectByObject(\"cn.big.gvk.dm.study.selectStudyByMapGeneId\",t);\n if(study != null ){\n mgb.setStudyCount(study.getStudyCount());\n }\n\n //publication count\n PublicationBean publication = (PublicationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.publication.selectPubByGeneId\",t);\n if (publication != null ){\n mgb.setPublicationCount(publication.getPublicationCount());\n }\n mapGeneBeanList.add(mgb) ;\n\n }\n\n\n }\n }\n }\n StringBuffer sb = new StringBuffer();\n //generate hidden html table and then use tableExport.js export\n if(genotypeBeanList != null && genotypeBeanList.size()>0){\n for(GenotypeBean genotype: genotypeBeanList){\n sb.append(genotype.getVarId()).append(\"\\t\").append(genotype.getChrom()).append(\":\")\n .append(genotype.getStartPos()).append(\"\\t\").append(genotype.getTraitCount())\n .append(\"\\t\").append(genotype.getStudyCount()).append(\"\\n\");\n }\n }\n\n if(mapGeneBeanList != null && mapGeneBeanList.size()>0){\n for(MapGeneBean mapgene: mapGeneBeanList){\n sb.append(mapgene.getMapGeneId()).append(\"\\t\").append(mapgene.getMapGeneChrom()).append(\":\")\n .append(mapgene.getMapGeneStart()).append(\"-\").append(mapgene.getMapGeneEnd()).append(\"\\t\").append(mapgene.getTraitCount()).append(\"\\t\")\n .append(mapgene.getStudyCount()).append(\"\\n\");\n }\n }\n\n\n if(format == 1 ){ //export txt\n this.response.reset();\n this.response.setHeader(\"Content-Disposition\",\n \"attachment;filename=export.txt\");\n this.response.setContentType(\"application/ms-txt\");\n try {\n PrintWriter pr = this.response.getWriter();\n pr.print(sb.toString());\n pr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }",
"protected float getFitness()\t\t\t{\treturn fitness;\t\t}",
"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 abstract void calculateAccuracy(List<S> bestPath, List<O> observation);",
"public interface ISearchable {\n\n\n AState getStartState () throws NullError;\n\n AState getGoalState () throws NullError;\n\n ArrayList<AState> getAllSuccessors (AState state) throws LowBoundInput, OutOfBoundMatrixInput, NullError;\n\n}",
"public Double2D generateLocationInNeighborhood() {\n\n double neighborhoodLength = state.taskLocLength;// * (1 + 12.0 * state.random.nextDouble(true, true));\n // generate the x and y coordinates within the bounding area of the neighborhood\n double x, y;\n x = meanLocation.getX() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n y = meanLocation.getY() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// if (state.random.nextDouble() < state.delta) {\n// // use rejection sampling to get the distribution\n// // generate those outside the epsilon area\n// do {\n// x = meanLocation.getX() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// y = meanLocation.getY() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// }while(inEpsilon(x, y));\n// }else {\n// // generate those inside the epsilon area\n// do {\n// x = meanLocation.getX() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// y = meanLocation.getY() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// }while(!inEpsilon(x, y));\n// }\n\n\n\n\n // generate them within the view\n// double x = (state.random.nextDouble(true, true) * state.getSimWidth());\n// double y = (state.random.nextDouble(true, true) * state.getSimHeight());\n return new Double2D(x, y);\n }",
"public static void main(String[] args) {\n PointNode A = new PointNode(\"A\",0,0);\r\n PointNode B = new PointNode(\"B\",20,10);\r\n PointNode C = new PointNode(\"C\",40,20);\r\n PointNode D = new PointNode(\"D\",30,30);\r\n PointNode E = new PointNode(\"E\",20,50);\r\n PointNode F = new PointNode(\"F\",-10,40);\r\n PointNode G = new PointNode(\"G\",10,20);\r\n PointNode H = new PointNode(\"H\",10,40);\r\n PointNode I = new PointNode(\"I\",30,40);\r\n PointNode K = new PointNode(\"K\",30,20);\r\n PointNode L = new PointNode(\"L\",40,40);\r\n\r\n A.connectWithPoint(B);\r\n A.connectWithPoint(G);\r\n G.connectWithPoint(F);\r\n G.connectWithPoint(H);\r\n G.connectWithPoint(D);\r\n K.connectWithPoint(L);\r\n B.connectWithPoint(C);\r\n D.connectWithPoint(I);\r\n D.connectWithPoint(E);\r\n L.connectWithPoint(E);\r\n F.connectWithPoint(E);\r\n H.connectWithPoint(E);\r\n I.connectWithPoint(E);\r\n A.connectWithPoint(K);\r\n\r\n Route route = searchWay(A, E);\r\n System.out.println(route);\r\n }",
"public void solve() {\n// BruteForceSolver bfs = new BruteForceSolver(pointList);\n// bfs.solve(); // prints the best polygon, its area, and time needed\n// System.out.println(\"-------------\");\n\n// StarshapedSolver ss = new StarshapedSolver(pointList);\n// foundPolygons = ss.solve();\n// System.out.println(\"-------------\");\n\n// RandomAddPointHeuristic ra = new RandomAddPointHeuristic(pointList);\n// foundPolygons = ra.solve(750);\n// System.out.println(\"-------------\");\n\n// GreedyAddPointHeuristic ga = new GreedyAddPointHeuristic(pointList,false);\n// foundPolygons = ga.solve(750);\n// System.out.println(\"-------------\");\n\n// long time = 4000;\n// GreedyAddPointHeuristic gaInit = new GreedyAddPointHeuristic(pointList,false);\n// Polygon2D initSolution = gaInit.solve(time*1/4).get(0);\n// System.out.println(initSolution.area);\n// System.out.println(initSolution);\n//\n// SimulatedAnnealing sa = new SimulatedAnnealing(pointList,initSolution,3);\n// foundPolygons.addAll(sa.solve(time-gaInit.timeInit,2,0.005,0.95));\n// System.out.println(sa.maxPolygon);\n// System.out.println(\"-------------\");\n\n// foundPolygons.addAll(findMultiplePolygonsStarshaped(8,0.6));\n\n }",
"public ReturnClass astar_algo(){\n long start=System.nanoTime();\n TreeStar node=new TreeStar(variables,0);\n openList.push(node);\n\n while (!openList.isEmpty())\n {\n\n TreeStar temp= openList.pollLast(); //pop the highest scoring node in openList\n refreshUsage(temp.variables); //uses the current node variables to update usageArray\n\n if((System.nanoTime()-start)/1000000000>=maxTime){\n System.out.println(\"time limit reached\");\n ReturnClass returnClass= new ReturnClass(temp.variables,temp.score,false);\n return returnClass;\n }\n\n if(temp.score==nbC){\n System.out.println(\"solution trouvée !\");\n printArray(temp.variables);\n ReturnClass returnClass= new ReturnClass(temp.variables,temp.score,true);\n return returnClass;\n }\n\n int bestVar=0;\n if(heuristic.equals(\"TD Heuristic\")){\n bestVar= chooseVTD(); //get the highest scoring unused var to use it in children\n }\n else if(heuristic.equals(\"TD-long heuristic\")){\n bestVar=chooseVTD();\n }\n else if(heuristic.equals(\"Partial-diff Heuristic\")){\n bestVar= chooseVDiff(temp.variables); //get the highest scoring unused var to use it in children\n }\n else {\n bestVar= chooseVDiff(temp.variables);\n }\n\n\n TreeStar node1= nextVar(temp.variables, 0,bestVar,temp.profondeur+1);\n TreeStar node2= nextVar(temp.variables, 1,bestVar,temp.profondeur+1);\n\n if(node1!=null){\n addToOpenList(node1);\n addToOpenList(node2);\n }\n }\n\n System.out.println(\"solution non trouvée\");\n return null;\n }",
"public void search() {\r\n\t\tfloat dist = getDistance(permutationPrev);\r\n\t\tfloat delta = 0;\r\n\t\tfloat prob = 0;\r\n\r\n\t\tboolean accept = false;\r\n\r\n\t\tRandom rand = new Random();\r\n\r\n\t\twhile ((temperature > minTemperature) || (nIter > 0)) {\r\n\t\t\tdisturbPermut(permutationPrev);\r\n\t\t\tdelta = getDistance(permutation) - dist;\r\n\r\n\t\t\tprob = (float) Math.exp(-delta / temperature);\r\n\t\t\taccept = ((delta < 0) || (delta * (prob - rand.nextFloat()) >= 0));\r\n\r\n\t\t\tif (accept) {\r\n\t\t\t\tacceptPermution(permutation);\r\n\t\t\t\tdist = delta + dist;\r\n\t\t\t}\r\n\r\n\t\t\ttemperature *= cBoltzman;\r\n\t\t\tnIter--;\r\n\r\n\t\t\ttrace.add(dist);\r\n\t\t}\r\n\t\tshortestDist = dist;\r\n\t}",
"public void rgs() {\n\t\tArrayList<int[]> front = this.unknown;\n\t\tRandom rand = new Random();\n\t\tint index = rand.nextInt(front.size());\n\t\tint loc[] = front.get(index);\n\t\tprobe(loc[0], loc[1]);\n\t\trgsCount++;\n\t\tSystem.out.println(\"RGS: probe[\" +loc[0] + \",\" + loc[1] + \"]\");\n\t\tshowMap();\n\t}",
"@Override\n\tpublic boolean startSearch() {\n\t\tString str = \"\";\n\t\t\n\t\tDimension d = view.getInit();\n\t\tif (d == null) {\n\t\t\tstr = str + \"Falta la posicion de inicio.\\n\";\n\t\t} else {\n\t\t\ty0 = (int) d.getHeight();\n\t\t\tx0 = (int) d.getWidth();\n\t\t}\n\t\t\n\t\td = view.getGoal();\n\t\tif (d == null) {\n\t\t\tstr = str + \"Falta la posicion de meta.\\n\";\n\t\t} else {\n\t\t\tyf = (int) d.getHeight();\n\t\t\txf = (int) d.getWidth();\n\t\t}\n\t\t\n\t\tif (view.isBreadth()) {\n\t\t\tstrategy = new Breadth();\n\t\t} else if (view.isDepth()) {\n\t\t\tstrategy = new Depth();\n\t\t} else if (view.isAStar()) {\n\t\t\tstrategy = new AStar();\n\t\t\tif (view.isH0()) {\n\t\t\t\theuristic = Horse.H0;\n\t\t\t} else if (view.isH1()) {\n\t\t\t\theuristic = Horse.H1;\n\t\t\t} else if (view.isH2()) {\n\t\t\t\theuristic = Horse.H2;\n\t\t\t} else\n\t\t\t\tstr = str + \"Falta por escoger el tipo de heurstica.\\n\";\n\t\t} else\n\t\t\tstr = str + \"Falta la estrategia de bsqueda.\\n\";\n\t\t\n\t\tboard = view.getBoard();\n\t\t\n\t\tif (str.equals(\"\")) {\n\t\t\trootNode = new Node(new Horse(x0,y0,xf,yf, board, heuristic));\n\t\t}\n\t\t\n\t\tif (view.isTree()) {\n\t\t\tif (str.equals(\"\"))\n\t\t\t\tsearch = new Tree(rootNode, strategy);\n\t\t} else if (view.isGraph()) {\n\t\t\tif (str.equals(\"\"))\n\t\t\t\tsearch = new Graph(rootNode, strategy);\n\t\t} else \n\t\t\tstr = str + \"Falta el algoritmo de bsqueda.\\n\";\n\t\t\n\t\tif (!str.equals(\"\")) {\n\t\t\tview.showError(str);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tgoSearch();\n\t\treturn true;\n\t}",
"public static List<Vec2i> solve(int[][] grid, Vec2i start, Vec2i goal, Heuristic h){\n if(h == null){ //if null replace with default heuristic\n h = new Heuristic() {\n @Override\n\n public double eval(Vec2i loc) {\n double dx = (loc.x - goal.x);\n double dy = (loc.y - goal.y);\n return Math.sqrt(dx*dx + dy*dy);\n }\n };\n }\n\n PriorityQueue<GridLocation> edge = new PriorityQueue<GridLocation>(10, AStarGrid::compareGridLocations);\n edge.add(new GridLocation(start,0));\n\n Map<Vec2i, Vec2i> cameFrom = new HashMap<Vec2i, Vec2i>();\n Map<Vec2i, Double> g = new HashMap<Vec2i, Double>(); //distance to node\n g.put(start,0.0);\n Map<Vec2i, Double> f = new HashMap<Vec2i, Double>(); //distance from start to goal through this node\n f.put(start,h.eval(start));\n //f = g + h\n\n while(!edge.isEmpty()){\n\n Vec2i current = edge.poll().loc;\n if(current.x == goal.x && current.y == goal.y){\n return reconstructPath(cameFrom, current);\n }\n\n LinkedList<Vec2i> neighbors = new LinkedList<Vec2i>();\n if(current.x != 0 && grid[current.x - 1][current.y] == 0)\n neighbors.add(new Vec2i(current.x - 1,current.y));\n if(current.x != grid.length-1 && grid[current.x + 1][current.y] == 0)\n neighbors.add(new Vec2i(current.x + 1,current.y));\n if(current.y != 0 && grid[current.x][current.y - 1] == 0)\n neighbors.add(new Vec2i(current.x,current.y - 1));\n if(current.y != grid[0].length-1 && grid[current.x][current.y + 1] == 0)\n neighbors.add(new Vec2i(current.x,current.y + 1));\n\n\n for(Vec2i neighbor: neighbors){\n double score = g.get(current) + 1;\n if(!g.containsKey(neighbor) || score < g.get(neighbor)){\n cameFrom.put(neighbor,current);\n g.put(neighbor, score);\n f.put(neighbor, score + h.eval(neighbor));\n if(!edge.contains(neighbor)){\n edge.add(new GridLocation(neighbor,score + h.eval(neighbor)));\n }\n }\n }\n }\n //No path was found\n return null;\n }",
"@Override\n List<NodeData> pathFind() throws NoPathException {\n System.out.println(\"Starting Scenic\");\n\n frontier.add(start);\n\n while(!frontier.isEmpty()) {\n StarNode current = frontier.getLast();\n frontier.removeLast(); // pop the priority queue\n if(current.getXCoord() == goal.getXCoord() && current.getYCoord() == goal.getYCoord()) {\n // If we are at the goal, we need to backtrack through the shortest path\n System.out.println(\"At target!\");\n finalList.add(current); // we have to add the goal to the path before we start backtracking\n while(!(current.getXCoord() == start.getXCoord() && current.getYCoord() == start.getYCoord())) {\n finalList.add(current.getPreviousNode());\n current = current.getPreviousNode();\n System.out.println(current.getNodeID());\n }\n return finalList;\n }\n else {\n // we need to get all the neighbor nodes, identify their costs, and put them into the queue\n LinkedList<StarNode> neighbors = current.getNeighbors();\n // we also need to remove the previous node from the list of neighbors because we do not want to backtrack\n neighbors.remove(current.getPreviousNode());\n\n for (StarNode newnode : neighbors) {\n int nodePlace = this.listContainsId(frontier, newnode);\n if(nodePlace > -1) {\n if (frontier.get(nodePlace).getF() > actionCost(newnode) + distanceToGo(newnode, goal)) {\n System.out.println(\"Here\");\n frontier.remove(frontier.get(nodePlace));\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n }\n else {\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n\n // This fixes the problem with infinitely looping elevators (I hope)\n if(current.getNodeType().equals(\"ELEV\") && newnode.getNodeType().equals(\"ELEV\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"ELEV\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n if(current.getNodeType().equals(\"STAI\") && newnode.getNodeType().equals(\"STAI\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"STAI\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n // this is where the node is put in the right place in the queue\n Collections.sort(frontier);\n }\n }\n }\n throw new NoPathException(start.getLongName(), goal.getLongName());\n }",
"private void search(int offset, MetricSpaceObject query, ResultCollector collector, double parentToQueryDistance) {\n buffer.position(offset);\n\n //the node should consist of a pointer to each child node then the point data, then the value data\n double nodeRadius = buffer.getDouble();\n double parentToThisDistance = buffer.getDouble();\n int left = buffer.getInt();\n int right = buffer.getInt();\n \n double searchRadius = collector.getRadius();\n\n //check if we can skip a distance calculation using the triangle inequality\n if (!optimise || Double.isNaN(parentToQueryDistance)\n || Math.abs(parentToThisDistance - parentToQueryDistance) <= nodeRadius + searchRadius)\n {\n int vantagePointId = buffer.getInt();\n double distance = query.getDistance(vantagePointId);\n\n if (distance <= searchRadius) {\n //this point is within the distance threshold to the query object, so add it to the results\n collector.add(new SearchResult(query.getObjectID(), vantagePointId, distance));\n \n //update the search radius in case the add changed it\n searchRadius = collector.getRadius();\n }\n\n if (left != 0 && distance <= nodeRadius + searchRadius) {\n //points within a distance threshold to the query object could be inside the radius,\n //so search the left subtree\n search(left, query, collector, distance);\n }\n\n if (right != 0 && distance >= nodeRadius - searchRadius) {\n //points within a distance threshold to the query object could be outside the radius,\n //so search the right subtree\n search(right, query, collector, distance);\n }\n }\n else if (right != 0) {\n search(right, query, collector, Double.NaN);\n }\n }",
"private void evaluateNode(final Node expansionCandidate) {\n\t\tif (this.extraDebug)\n\t\t\tSystem.out.print(\" { \");\n\t\tTile tile = expansionCandidate.getTile();\n\t\tNodeValue nodeValue = expansionCandidate.getValue();\n\n\t\tfloat risk = 0;\n\t\tfloat pathCost = 0;\n\t\tfloat distanceCost = 0;\n\n\t\tif (this.goal.useRisk) {\n\t\t\tif (tile.getTileType() == TileType.UNKNOWN) {\n\t\t\t\tfor (TileType type : tile.getPossibleTypes()) {\n\t\t\t\t\tif (type == TileType.WALL) {\n\t\t\t\t\t\tif (this.extraDebug)\n\t\t\t\t\t\t\tSystem.out.print(\"posWall+\" + this.searchValues.getWall());\n\t\t\t\t\t\trisk += this.searchValues.getWall();\n\t\t\t\t\t} else if (type == TileType.PIT) {\n\t\t\t\t\t\tif (this.extraDebug)\n\t\t\t\t\t\t\tSystem.out.print(\" posPit+\" + this.searchValues.getPit());\n\t\t\t\t\t\trisk += this.searchValues.getPit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (tile.getWumpusIds() != null && !tile.getWumpusIds().isEmpty()) {\n\t\t\t\tfloat wumpusRisk = 0;\n\t\t\t\tfor (int id : tile.getWumpusIds()) {\n\t\t\t\t\tSystem.out.println(\" id: \" + id + \" has distance: \" + tile.getWumpusDistance(id) + \" \");\n\t\t\t\t\tif (tile.getWumpusDistance(id) != 0) {\n\t\t\t\t\t\tif (this.extraDebug)\n\t\t\t\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t\t\t\t\" wumpi+\" + this.searchValues.getWumpusDistanceFac() / tile.getWumpusDistance(id));\n\n\t\t\t\t\t\tif (tile.getWumpusDistance(id) > wumpusRisk) {\n\t\t\t\t\t\t\twumpusRisk = tile.getWumpusDistance(id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trisk += this.searchValues.getWumpusDistanceFac() / wumpusRisk;\n\t\t\t}\n\t\t\tif (this.state.getHistoryStench(tile.getPosVector()) != 0) {\n\t\t\t\tif (this.extraDebug)\n\t\t\t\t\tSystem.out.print(\" historyWumpi+\" + this.searchValues.getWumpusDistanceFac()\n\t\t\t\t\t\t\t/ this.state.getHistoryStench(tile.getPosVector()));\n\t\t\t\trisk += this.searchValues.getWumpusDistanceFac() / this.state.getHistoryStench(tile.getPosVector()) / 2;\n\t\t\t}\n\t\t}\n\n\t\tif (this.goal.usePathCost) {\n\t\t\tpathCost = nodeValue.getPathCost() + expansionCandidate.getParentNode().getValue().getPathCost() + 1;\n\t\t}\n\n\t\tif (this.goal.useDistanceCost) {\n\t\t\tVector2 goalLoc = ((GoalLocation) this.goal).getLocation(); // TODO: Dont like this cast here\n\t\t\tdistanceCost = Math.abs(goalLoc.getX() - expansionCandidate.getTile().getPosX())\n\t\t\t\t\t+ Math.abs(goalLoc.getY() - expansionCandidate.getTile().getPosY());\n\n\t\t\tif (tile.getTileType() == TileType.UNKNOWN) {\n\t\t\t\tpathCost += this.searchValues.getUnknown();\n\t\t\t}\n\t\t}\n\n\t\tnodeValue.setRisk(risk);\n\t\tnodeValue.setPathCost(pathCost);\n\t\tnodeValue.setDistanceCost(distanceCost);\n\t\tif (this.extraDebug)\n\t\t\tSystem.out.println(\" } \");\n\t}",
"@Test\n\tpublic void testGA() {\n\t\tGenetic ga = new Genetic(100, 500, 10, SelectionType.TOURNAMENT , 0.6, 0.1);\n\t\tOptimumSolution os = ga.run();\n\t\tSystem.out.println(os.getSolution());\n\t}",
"public interface SearchSolver {\n\n /**\n * initializes the algorithm. This method has to be called before calling any other method\n * @param graph the graph of the map where the search takes place\n * @param targetStart the start position for the target (in our case the thief)\n * @param searchStart the start position for the searcher (in our case the police)\n * @param counter the counter object that counts the expanded nodes\n */\n void initialize(Graph graph, Node targetStart, Node searchStart, ExpandCounter counter);\n\n /**\n * gets the shortest path from search start to target\n * @return list of edges that describe the path\n * @throws NoPathFoundException if there is no path to the target\n */\n List<Edge> getPath() throws NoPathFoundException;\n}",
"@Override\n public SearchBasedAgentState execute(SearchBasedAgentState s) {\n EstadoDrone agState = (EstadoDrone) s;\n if(agState.getposicion()[0]==2 && (1000-agState.getenergiaUsada()>=CostoBajar)){\n \tagState.incrementarEnergiaUsada(CostoBajar);\n \tagState.irNivelMedio();\n \treturn agState;\n }\n if(agState.getposicion()[0]==0 && (1000-agState.getenergiaUsada()>=CostoSubir)){\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.incrementarEnergiaUsada(CostoSubir);\n \tagState.irNivelMedio();\n \treturn agState;\n }\n return null;\n }",
"Chromosome fittestChromosome();",
"public interface Heuristic\r\n{\r\n\r\n double calcStartToGoalCost(State currentState, State goalState);\r\n}",
"@Override\n public void onGeoQueryReady() {\n if (!isAgentFound) {\n radius++;\n getNearestAgent();\n }\n }",
"public Direction getMostValuableDirection(Location location) {\r\n\t\tint northSum = 0, southSum = 0, westSum = 0, eastSum = 0;\r\n\t\t// the neighbors are saved in an array and we know the order for each\r\n\t\t// neighbor\r\n\t\tArrayList<Location> neighbors = location.getNeighbors(location, map, 1);\r\n\t\t// so we know the north neighbors are on the 0, 1, 2 positions\r\n\t\tif(neighbors.get(0).getSite().owner != myID) {\r\n\t\t\tnorthSum += neighbors.get(0).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(1).getSite().owner != myID) {\r\n\t\t\tnorthSum += neighbors.get(1).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(2).getSite().owner != myID) {\r\n\t\t\tnorthSum += neighbors.get(2).getSite().strength;\r\n\t\t}\r\n\r\n\t\t// the east neighbors are on the 3, 4, 5 positions\r\n\t\tif(neighbors.get(3).getSite().owner != myID) {\r\n\t\t\teastSum += neighbors.get(3).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(4).getSite().owner != myID) {\r\n\t\t\teastSum += neighbors.get(4).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(5).getSite().owner != myID) {\r\n\t\t\teastSum += neighbors.get(5).getSite().strength;\r\n\t\t}\r\n\r\n\t\t// the south neighbors are on the 6, 7, 8 positions\r\n\t\tif(neighbors.get(6).getSite().owner != myID) {\r\n\t\t\tsouthSum += neighbors.get(6).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(7).getSite().owner != myID) {\r\n\t\t\tsouthSum += neighbors.get(7).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(8).getSite().owner != myID) {\r\n\t\t\tsouthSum += neighbors.get(8).getSite().strength;\r\n\t\t}\r\n\r\n\t\t// the west neighbors are on the 9, 10, 11 positions\r\n\t\tif(neighbors.get(9).getSite().owner != myID) {\r\n\t\t\twestSum += neighbors.get(9).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(10).getSite().owner != myID) {\r\n\t\t\twestSum += neighbors.get(10).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(11).getSite().owner != myID) {\r\n\t\t\twestSum += neighbors.get(11).getSite().strength;\r\n\t\t}\r\n\t\t// get maximum sum\r\n\t\tfloat max = Math.max(Math.max(northSum, southSum), Math.max(eastSum, westSum));\r\n\t\t// return the best direction\r\n\t\tif (max == northSum)\r\n\t\t\treturn Direction.NORTH;\r\n\t\telse if (max == southSum)\r\n\t\t\treturn Direction.SOUTH;\r\n\t\telse if (max == eastSum)\r\n\t\t\treturn Direction.EAST;\r\n\t\telse\r\n\t\t\treturn Direction.WEST;\r\n\t}",
"public static Vector<int []> aStar(int[] startNode,int[] endNode, mapNode[][] nodes, String method){\n\t\t\t\tfor(int i = 0; i < nodes.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfor(int j = 0; j < nodes[i].length;j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tnodes[i][j].setTotCost(999999999);//set the initial distance to INF\r\n\t\t\t\t\t\tnodes[i][j].gridPosition[0] = i;//save current node x position\r\n\t\t\t\t\t\tnodes[i][j].gridPosition[1] = j;//save current node y position\r\n\t\t\t\t\t\tnodes[i][j].setNodeVistied(false);//set all nodes are not visited yet\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\r\n\t\tVector<int []> shortestPath;\r\n\t\tVector<mapNode> closeSet;//the set of nodes already evaluated\r\n\t\tcloseSet = new Vector<mapNode>();\r\n\t\tVector<mapNode> openSet;//the set of nodes to be evaluated\r\n\t\topenSet = new Vector<mapNode>();\r\n\t\tfloat bestCost;\r\n\t\t//Add the start node into open set\r\n\t\tmapNode start = new mapNode();\r\n\t\tnodes[startNode[0]][startNode[1]].setHeuristics(0);\r\n\t\tnodes[startNode[0]][startNode[1]].setTotCost(0);\r\n\t\tstart = nodes[startNode[0]][startNode[1]];\r\n\t\topenSet.add(start);\r\n\t\t\r\n\t\twhile(openSet.size() != 0)\r\n\t\t{\r\n\t\t\t//sort openSet from lowest cost to highest\r\n\t\t\tint j;\r\n\t\t\tfor(int i = 1; i < openSet.size(); i++){\r\n\t\t\t\tj = i;\r\n\t\t\t\twhile(j > 0 && openSet.get(j-1).getTotCost() > openSet.get(j).getTotCost()){\r\n\t\t\t\t\tCollections.swap(openSet, j, j-1);\r\n\t\t\t\t\tj = j-1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//the node in openset having the lowest cost\r\n\t\t\tmapNode tempNode = new mapNode();\r\n\t\t\ttempNode = openSet.get(0);\r\n\t\t\t\r\n\t\t\t//End case if the condition have approached\r\n\t\t\tif(tempNode.gridPosition[0] == endNode[0] && tempNode.gridPosition[1] == endNode[1]){\r\n\t\t\t\tshortestPath = nodes[endNode[0]][endNode[1]].getTotPath();\r\n\t\t\t\tif(shortestPath.size() == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\tshortestPath.add(endNode);\r\n\t\t\t\t// No result was found -- only the end node\r\n\t\t\t\treturn shortestPath;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmapNode tempTopNode = new mapNode();\r\n\t\t\tmapNode tempBottomNode = new mapNode();\r\n\t\t\tmapNode tempLeftNode = new mapNode();\r\n\t\t\tmapNode tempRightNode = new mapNode();\r\n\t\t\t\r\n\t\t\t//remove current from open set\r\n\t\t\topenSet.remove(0);\r\n\t\t\t//add current to close set\r\n\t\t\tcloseSet.add(tempNode);\r\n\t\t\t\r\n\t\t\t//update Top node information from original nodes matrix\r\n\t\t\tif(tempNode.topNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempTopNode = nodes[tempNode.topNode.gridPosition[0]][tempNode.topNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempTopNode = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//update Bottom node information from original nodes matrix\r\n\t\t\tif(tempNode.bottomNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempBottomNode = nodes[tempNode.bottomNode.gridPosition[0]][tempNode.bottomNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempBottomNode = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//update Left node information from original nodes matrix\r\n\t\t\tif(tempNode.leftNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempLeftNode = nodes[tempNode.leftNode.gridPosition[0]][tempNode.leftNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempLeftNode = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//update Right node information from original nodes matrix\r\n\t\t\tif(tempNode.rightNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempRightNode = nodes[tempNode.rightNode.gridPosition[0]][tempNode.rightNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempRightNode = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Manhattan, Euclidean method\r\n\t\t\tif(method.equals(\"manhattan\")){\r\n\t\t\t\t//update neighbor nodes\r\n\t\t\t\t//update top Node\r\n\t\t\t\tif(tempTopNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost = hValue+manhattan(tempTopNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempTopNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempTopNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempTopNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+manhattan(tempTopNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempTopNode) == false && tempTopNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempTopNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempTopNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempTopNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempTopNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.topNode.gridPosition[0]][tempNode.topNode.gridPosition[1]] = tempTopNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempTopNode) == false && checkOpenSet(openSet, tempTopNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempTopNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//update bottom node\r\n\t\t\t\tif(tempBottomNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost = hValue+manhattan(tempBottomNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempBottomNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempBottomNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempBottomNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+manhattan(tempBottomNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempBottomNode) == false && tempBottomNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempBottomNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempBottomNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempBottomNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempBottomNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.bottomNode.gridPosition[0]][tempNode.bottomNode.gridPosition[1]] = tempBottomNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempBottomNode) == false && checkOpenSet(openSet, tempBottomNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempBottomNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//update Left node\r\n\t\t\t\tif(tempLeftNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost =hValue+manhattan(tempLeftNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempLeftNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempLeftNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempLeftNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+manhattan(tempLeftNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempLeftNode) == false && tempLeftNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempLeftNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempLeftNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempLeftNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempLeftNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.leftNode.gridPosition[0]][tempNode.leftNode.gridPosition[1]] = tempLeftNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempLeftNode) == false && checkOpenSet(openSet, tempLeftNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempLeftNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//update Right node\r\n\t\t\t\tif(tempRightNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost = hValue+manhattan(tempRightNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempRightNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempRightNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempRightNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+manhattan(tempRightNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempRightNode) == false && tempRightNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempRightNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempRightNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempRightNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempRightNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.rightNode.gridPosition[0]][tempNode.rightNode.gridPosition[1]] = tempRightNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempRightNode) == false && checkOpenSet(openSet, tempRightNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempRightNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Manhattan, Euclidean method\r\n\t\t\telse if(method.equals(\"euclidean\")){\r\n\t\t\t\t//update neighbor nodes\r\n\t\t\t\t//update top Node\r\n\t\t\t\tif(tempTopNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost = hValue+Euclidean(tempTopNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempTopNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempTopNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempTopNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+Euclidean(tempTopNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempTopNode) == false && tempTopNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempTopNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempTopNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempTopNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempTopNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.topNode.gridPosition[0]][tempNode.topNode.gridPosition[1]] = tempTopNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempTopNode) == false && checkOpenSet(openSet, tempTopNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempTopNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//update bottom node\r\n\t\t\t\tif(tempBottomNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost = hValue+Euclidean(tempBottomNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempBottomNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempBottomNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempBottomNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+Euclidean(tempBottomNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempBottomNode) == false && tempBottomNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempBottomNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempBottomNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempBottomNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempBottomNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.bottomNode.gridPosition[0]][tempNode.bottomNode.gridPosition[1]] = tempBottomNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempBottomNode) == false && checkOpenSet(openSet, tempBottomNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempBottomNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//update Left node\r\n\t\t\t\tif(tempLeftNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost =hValue+Euclidean(tempLeftNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempLeftNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempLeftNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempLeftNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+Euclidean(tempLeftNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempLeftNode) == false && tempLeftNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempLeftNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempLeftNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempLeftNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempLeftNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.leftNode.gridPosition[0]][tempNode.leftNode.gridPosition[1]] = tempLeftNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempLeftNode) == false && checkOpenSet(openSet, tempLeftNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempLeftNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//update Right node\r\n\t\t\t\tif(tempRightNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost = hValue+Euclidean(tempRightNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempRightNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempRightNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempRightNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+Euclidean(tempRightNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempRightNode) == false && tempRightNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempRightNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempRightNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempRightNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempRightNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.rightNode.gridPosition[0]][tempNode.rightNode.gridPosition[1]] = tempRightNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempRightNode) == false && checkOpenSet(openSet, tempRightNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempRightNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t}\r\n\t\tshortestPath = nodes[endNode[0]][endNode[1]].getTotPath();\r\n\t\tif(shortestPath.size() == 1)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tshortestPath.add(endNode);\r\n\t\t// No result was found -- only the end node\r\n\t\treturn shortestPath;\t\r\n\t}",
"@Override\n\tpublic double valuta_figli() {\n\t\treturn simple_fitness();\n\t}",
"private Point calcLocation(String tagID){\t\t\t\n\t\tDate now = new Date();\n\t\tclass referenceDist implements Comparable<referenceDist>{\n\t\t\tString referenceID;\n\t\t\tDouble inverseDistance;\n\t\t\t\n\t\t\tpublic referenceDist(String id, double distance){\n\t\t\t\tthis.referenceID = id;\n\t\t\t\tthis.inverseDistance = new Double(distance);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int compareTo(referenceDist o) {\n\t\t\t\t\n\t\t\t\treturn o.inverseDistance.compareTo(this.inverseDistance);\n\t\t\t}\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tArrayList<referenceDist> referenceList = new ArrayList<referenceDist>();\t\t\n\t\tfor (int i = 0 ; i < (referenceTags.size()); i++){\n\t\t\tString referenceID = referenceTags.get(i);\n\t\t\t//System.err.printf(\"Comparing tag %s with readings: %s\\r\\n\", tagID, tags.get(tagID).toString());\n\t\t\tint distance = tags.get(tagID).calcDiff(tags.get(referenceID));\n\t\t\t//System.err.printf(\"Reference tag %s with readings: %s\\r\\n\", referenceID, tags.get(referenceID).toString());\n\t\t\tdouble power = 0;\n\t\t\tif (distance == 0){\n\t\t\t\tpower = 10;\n\t\t\t} else {\n\t\t\t\tpower = 1.0/distance;\n\t\t\t}\n\t\t\t\n\t\t\treferenceList.add(new referenceDist(referenceID, power));\n\t\t}\n\t\t\n\t\tCollections.sort(referenceList);\n//\t\tIterator<referenceDist> iter = referenceList.iterator();\n//\t\tSystem.out.printf(\"START\\r\\n\");\n//\t\twhile(iter.hasNext()){\n//\t\t\treferenceDist dist = iter.next();\n//\t\t System.out.printf(\"'%s : %s'\", dist.referenceID, dist.inverseDistance.toString());\n//\t\t}\n//\t\tSystem.out.printf(\"\\r\\nEND\\r\\n\");\n\t\tint neighbours = Math.min(maxNeighbours, referenceList.size());\n\t\tdouble total = 0;\n\t\tdouble x = 0;\n\t\tdouble y = 0;\n\t\tdouble diff = 0;\n\t\tfor (int i = 1; i <= neighbours; i++){\n\t\t\ttotal += referenceList.get(i).inverseDistance;\n\t\t}\n\t\tfor (int i = 1; i <= neighbours; i++){\n\t\t\tPoint current = tags.get(referenceList.get(i).referenceID).getLoc();\n\t\t\tx += (referenceList.get(i).inverseDistance / total) * current.getX();\n\t\t\ty += (referenceList.get(i).inverseDistance / total) * current.getY();\n\t\t}\n\t\tif (tagID.equals(\"03BD\")){\n\t\t\tdiff = Math.sqrt(Math.pow((x-345),2) + Math.pow((y-200),2));\n\t\t} else if (tagID.equals(\"03B8\")){\n\t\t\tdiff = Math.sqrt(Math.pow((x-345),2) + Math.pow((y-300),2));\n\t\t} else if (tagID.equals(\"03D3\")){\n\t\t\tdiff = Math.sqrt(Math.pow((x-345),2) + Math.pow((y-400),2));\n\t\t}\n\t\tlog(String.valueOf(diff)+ \"\\r\\n\", tagID+ \"_4.log\");\t\t\n\t\t\t\n\n\t\tPoint location = new Point((int )x, (int)y);\n\t\tlog(String.valueOf(now.getTime()) + \"\\r\\n\", \"time.log\");\t\t\t\n\n\t//\tlog(String.valueOf(now.getTime()) + \": Tag=\"+ tagID + \" x=\" + String.valueOf(x) + \" y=\"+String.valueOf(y)+\"\\r\\n\", \"tagLocationLogfile.log\");\n\t\t\n\t\treturn location;\n\t}",
"public static void runStaticSimulation(String path) {\n HashMap<String, Integer> lowerBounds = readInFJSSBounds();\n\n Objective objective = MAKESPAN;\n// List<AbstractRule> sequencingRules = new ArrayList();\n// List<AbstractRule> routingRules = new ArrayList();\n\n //objectives.add(Objective.MAKESPAN);\n //AbstractRule sequencingRule = new FCFS(RuleType.SEQUENCING);\n AbstractRule sequencingRule = new FCFS(RuleType.SEQUENCING);\n AbstractRule routingRule = new WIQ(RuleType.ROUTING);\n System.out.println(\"Running static simulation for objective: \"+objective.getName());\n System.out.println(\"Sequencing rule: \"+sequencingRule.getName());\n System.out.println(\"Routing rule: \"+routingRule.getName());\n\n //routingRules.add(GPRule.readFromLispExpression(RuleType.ROUTING,\" (+ (max WIQ DD) (- (/ AT PT) (min SL NOR)))\"));\n\n //routingRules.add(new SBT(RuleType.ROUTING));\n //sequencingRules.add(GPRule.readFromLispExpression(RuleType.SEQUENCING,\" (+ (min (min (max (min WIQ t) (max NOR SL)) MRT) (max DD WKR)) (* (+ SL SL) (- WIQ PT)))\"));\n //sequencingRules.add(GPRule.readFromLispExpression(RuleType.SEQUENCING,\" (/ WKR rDD)\"));\n// routingRules.add(GPRule.readFromLispExpression(RuleType.ROUTING,\" (max (max NINQ PT) (max (- (/ (min t NINQ)\" +\n// \" (max AT W)) (min (max NOR FDD) (* MRT (- SL W)))) AT))\"));\n\n// sequencingRules.add(new AVPRO(RuleType.SEQUENCING));\n// sequencingRules.add(new CR(RuleType.SEQUENCING));\n// sequencingRules.add(new EDD(RuleType.SEQUENCING));\n// sequencingRules.add(new FCFS(RuleType.SEQUENCING));\n// sequencingRules.add(new FDD(RuleType.SEQUENCING));\n// sequencingRules.add(new LCFS(RuleType.SEQUENCING));\n// sequencingRules.add(new LPT(RuleType.SEQUENCING));\n// sequencingRules.add(new LWKR(RuleType.SEQUENCING));\n// sequencingRules.add(new MOPNR(RuleType.SEQUENCING));\n// sequencingRules.add(new MWKR(RuleType.SEQUENCING));\n// sequencingRules.add(new NPT(RuleType.SEQUENCING));\n// sequencingRules.add(new PW(RuleType.SEQUENCING));\n// sequencingRules.add(new SL(RuleType.SEQUENCING));\n// sequencingRules.add(new Slack(RuleType.SEQUENCING));\n// sequencingRules.add(new SPT(RuleType.SEQUENCING));\n//\n// sequencingRules.add(new ATC(RuleType.SEQUENCING));\n// sequencingRules.add(new COVERT(RuleType.SEQUENCING));\n// sequencingRules.add(new CRplusPT(RuleType.SEQUENCING));\n// sequencingRules.add(new LWKRplusPT(RuleType.SEQUENCING));\n// sequencingRules.add(new OPFSLKperPT(RuleType.SEQUENCING));\n// sequencingRules.add(new PTplusPW(RuleType.SEQUENCING));\n// sequencingRules.add(new PTplusPWplusFDD(RuleType.SEQUENCING));\n// sequencingRules.add(new SlackperOPN(RuleType.SEQUENCING));\n// sequencingRules.add(new SlackperRPTplusPT(RuleType.SEQUENCING));\n//\n// sequencingRules.add(new WATC(RuleType.SEQUENCING));\n// sequencingRules.add(new WCOVERT(RuleType.SEQUENCING));\n// sequencingRules.add(new WSPT(RuleType.SEQUENCING));\n//\n// //add work center specific rules, as other rules will always give the same values\n// routingRules.add(new LBT(RuleType.ROUTING));\n// routingRules.add(new LRT(RuleType.ROUTING));\n// routingRules.add(new NIQ(RuleType.ROUTING));\n// routingRules.add(new SBT(RuleType.ROUTING));\n// routingRules.add(new SRT(RuleType.ROUTING));\n// routingRules.add(new WIQ(RuleType.ROUTING));\n\n //get the Filenames of all static FJSS instances in the relevant directory\n List<Path> directoryNames = getDirectoryNames(new ArrayList(), Paths.get(path),\".fjs\");\n\n //List<String> instanceFileNames = getFileNames(new ArrayList(), Paths.get(path), \".fjs\");\n for (int i = 0; i < directoryNames.size(); ++i) {\n Path directoryName = directoryNames.get(i);\n List<String> instanceFileNames = getFileNames(new ArrayList(), directoryName, \".fjs\");\n int numInstances = instanceFileNames.size();\n System.out.println(numInstances +\" FJSS instances in \"+directoryName.toString());\n double[] makeSpanRatios = new double[numInstances];\n for (int j = 0; j < numInstances; ++j) {\n String instanceFileName = instanceFileNames.get(j);\n //System.out.println(\"\\nInstance \"+(i+1)+\" - Path: \"+instanceFileName);\n double objectiveVal =\n calculateFitness(instanceFileName, objective, sequencingRule, routingRule);\n String formattedFileName = formatFileName(instanceFileName);\n double lowerBound = lowerBounds.get(formattedFileName);\n double ratio = objectiveVal/lowerBound;\n makeSpanRatios[j] = ratio;\n }\n double ratioSum = 0.0;\n for (int j = 0; j < numInstances; ++j) {\n ratioSum += makeSpanRatios[j];\n }\n System.out.println(\"Mean lb/objective value is: \"+ratioSum/numInstances);\n System.out.println();\n }\n\n //want to be able to feed in a sequencing rule and a routing rule\n //and be able to find out the makespan of that pair on a given instance\n //should then store that, as well a ratio of that to the lower bound,\n //in a file, and aggregate by directory\n\n //EvaluateOutput(\"/out/rule_comparisons/\", \"RR\");\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 void searchAlgortihm(int x, int y)\n\t{\n\t\tint dx = x;\n\t\tint dy = y;\n\t\tint numMovements = 1; // variable to indicate the distance from the user\n\t\t\n\t\t//check starting position\n\t\tcheckLocation(dx,dy, x, y);\n\n\t\tint minCoords = MAX_COORDS;\n\t\tminCoords *= -1; // max negative value of the grid\n\n\t\t// while - will search through all coordinates until it finds 5 events \n\t\twhile(numMovements < (MAX_COORDS*2)+2 && (closestEvents.size() < 5))\n\t\t{\n\t\t\t//first loop - \n\t\t\tfor(int i = 1; i <= 4; i++)\n\t\t\t{\n\t\t\t\tif(i == 1){ // // moving south-west\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = j-x;\n\t\t\t\t\t\tdx *= -1; // reverse sign\n\t\t\t\t\t\tdy = (numMovements-j)+y;\n\t\t\t\t\t\tif((dx >= minCoords) && (dy <= MAX_COORDS)) // only check the coordinates if they are on the grid\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"1 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 2){ // moving south-east\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = (numMovements-j)-x;\n\t\t\t\t\t\tdx *= -1; // change sign\n\t\t\t\t\t\tdy = j-y; \n\t\t\t\t\t\tdy *= -1; // change sign\n\t\t\t\t\t\tif((dx >= minCoords) && (dy >= minCoords))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"2 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 3){ // moving north-east\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = j+x;\n\t\t\t\t\t\tdy = (numMovements-j)-y;\n\t\t\t\t\t\tdy *= -1;\n\t\t\t\t\t\tif((dx <= MAX_COORDS) && (dy >= minCoords))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"3 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 4){ // moving north-west\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = (numMovements-j)+x;\n\t\t\t\t\t\tdy = j+y;\n\t\t\t\t\t\tif((dx <= MAX_COORDS) && (dy <= MAX_COORDS))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"4 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t// increment the number of movements, from user coordinate\n\t\t\tnumMovements++;\n\n\t\t} // End of while\n\t}",
"@Override\n\tprotected double[] calculateNeighbourhoodBest(int i) {\n\t\t\t//System.out.println(\"Gbest particle from local typology!\");\n\t\t\tint indexBestParticle = i;\n\t\t\tint indexLeftNeighbour = (i > 0) ? i - 1 : swarmSize - 1;\n\t\t\tint indexRightNeighbour = (i < swarmSize - 1) ? i + 1 : 0;\t\t\n\t\t\t\t\t\n\t\t\tdouble nBestFitness = swarm.get(i).getPBestFitness();\n\t\t\tdouble leftNeighborParticlePBestFitness = swarm.get(indexLeftNeighbour).getPBestFitness();\n\t\t\tdouble rightNeighborParticlePBestFitness = swarm.get(indexRightNeighbour).getPBestFitness();\n\t\t\t\t\t\n\t\t\tif (leftNeighborParticlePBestFitness < nBestFitness) {\n\t\t\t\tindexBestParticle = indexLeftNeighbour;\n\t\t\t\tnBestFitness = leftNeighborParticlePBestFitness;\n\t\t\t}\n\t\t\tif (rightNeighborParticlePBestFitness < nBestFitness) {\n\t\t\t\tindexBestParticle = indexRightNeighbour;\n\t\t\t\tnBestFitness = rightNeighborParticlePBestFitness;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn swarm.get(indexBestParticle).getPBest();\n\t\t\t//return swarm.get(indexBestParticle);\n\t\t\t\n\t}",
"public Vector<PuzzleState> aStarSearch() {\r\n System.out.println(\"Starting A*\");\r\n long startTime = (new Date()).getTime();\r\n Vector<PuzzleState> solution = new Vector<PuzzleState>();\r\n HashSet<PuzzleState> closedList = new HashSet<PuzzleState>();\r\n PriorityQueue<PuzzleState> openList = new PriorityQueue<PuzzleState>();\r\n \r\n PuzzleState searchState = state.copy();\r\n searchState.prevState = null;\r\n searchState.depth = 0;\r\n openList.add(searchState);\r\n\r\n while (!openList.isEmpty() && !isGoal(searchState)) {\r\n searchState = openList.poll();\r\n if (!closedList.contains(searchState)) {\r\n closedList.add(searchState);\r\n Vector<PuzzleState> nextStates = possibleNextStates(searchState);\r\n for (PuzzleState s : nextStates)\r\n s.depth = searchState.depth + 1;\r\n openList.addAll(nextStates);\r\n }\r\n }\r\n \r\n // If the goal has been reached, construct the solution\r\n if (isGoal(searchState)) {\r\n for (PuzzleState s = searchState; s.prevState != null; s = s.prevState) {\r\n solution.add(s);\r\n }\r\n Collections.reverse(solution);\r\n }\r\n \r\n long endTime = (new Date()).getTime();\r\n System.out.println(\"A* search ended after \" + (endTime - startTime) + \" ms\");\r\n //for (PuzzleState s : solution)\r\n // System.out.println(s);\r\n return solution;\r\n }",
"private void searchFunction() {\n\t\t\r\n\t}",
"public ArrayList<SearchNode> search(Problem p) {\n\tfrontier = new NodeQueue();\t// The frontier is a queue of expanded SearchNodes not processed yet\n\texplored = new HashSet<SearchNode>();\t/// The explored set is a set of nodes that have been processed \n\tGridPos startState = (GridPos) p.getInitialState();\t// The start state is given\n\tfrontier.addNodeToFront(new SearchNode(startState));\t// Initialize the frontier with the start state \n\n\t\n\tpath = new ArrayList<SearchNode>();\t// Path will be empty until we find the goal\n\t\t\n\n\n\twhile(!frontier.isEmpty()){\n\n\t SearchNode s = frontier.removeFirst(); \n\t GridPos g = s.getState(); \n\n\t if ( p.isGoalState(g) ) {\n\t\tpath = s.getPathFromRoot();\t\n\t\tbreak; \n\t }\n\t \n\t explored.add(s); \t \n\t ArrayList<GridPos> childStates = p.getReachableStatesFrom(g);\n\n\t while(!childStates.isEmpty()){\n\n\t\tSearchNode child = new SearchNode(childStates.get(0), s); \n\n\t\tif(!explored.contains(child) && !frontier.contains(child)){\n\n\t\t if ( p.isGoalState(child.getState()) ) {\n\t\t\n\t\t\tpath = child.getPathFromRoot();\t\n\t\t\treturn path; \n\t\t }\n\n\t\t if(insertFront) \n\t\t\tfrontier.addNodeToFront(child); \t\t \t\t\n\t\t else\t\n\t\t\tfrontier.addNodeToBack(child); \t \n\n\n\n\t\t}\n\n\t\tchildStates.remove(0);\n\t }\t \n\t}\n\n\n\treturn path;\n\n }",
"private void applyLocationAlgorithms() {\n List<NodeState> states = new ArrayList<NodeState>();\n List<RemoteNode> nodes = new ArrayList<RemoteNode>(nodeManager.getNodes());\n AlgorithmMatchCriteria criteria;\n\n for (Algorithm la : algorithmManager.getAlgorithms()) {\n if (!la.isEnabled()) continue;\n criteria = algorithmManager.getCriteria(la);\n\n List<Node> filteredNodes = criteria.filter(nodes);\n if (filteredNodes.size() > 0) {\n states.add(la.applyTo(nodeManager.getLocalNode(), filteredNodes));\n }\n }\n for (NodeState s : states) {\n nodeManager.getLocalNode().addPending(s);\n }\n }",
"private boolean computeSearchDirection() {\n\t\t// Compute the function's gradient\n\t\tfunction.computeGradient(temp0_Nx1.data);\n\n\t\t// compute the change in gradient\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\ty.data[i] = temp0_Nx1.data[i] - g.data[i];\n\t\t\tg.data[i] = temp0_Nx1.data[i];\n\t\t}\n\n\t\t// Update the inverse Hessian matrix\n\t\tif( iterations != 0 ) {\n\t\t\tEquationsBFGS.inverseUpdate(B, s, y, temp0_Nx1, temp1_Nx1);\n\t\t}\n\n\t\t// compute the search direction\n\t\tCommonOps_DDRM.mult(-1,B,g, searchVector);\n\n\t\t// use the line search to find the next x\n\t\tif( !setupLineSearch(fx, x.data, g.data, searchVector.data) ) {\n\t\t\t// the search direction has a positive derivative, meaning the B matrix is\n\t\t\t// no longer SPD. Attempt to fix the situation by resetting the matrix\n\t\t\tresetMatrixB();\n\t\t\t// do the search again, it can't fail this time\n\t\t\tCommonOps_DDRM.mult(-1,B,g, searchVector);\n\t\t\tsetupLineSearch(fx, x.data, g.data, searchVector.data);\n\t\t} else if(Math.abs(derivAtZero) <= gtol ) {\n\t\t\tif( verbose != null ) {\n\t\t\t\tverbose.printf(\"finished select direction, gtest=%e\\n\",Math.abs(derivAtZero));\n\t\t\t}\n\n\t\t\t// the input might have been modified by the function. So copy it\n\t\t\tSystem.arraycopy(function.getCurrentState(),0,x.data,0,N);\n\t\t\treturn terminateSearch(true);\n\t\t}\n\n\t\tmode = 1;\n\t\titerations++;\n\t\treturn false;\n\t}",
"public static void GA(ArrayList<City> cities){\n int pathLength = cities.size();\n // the number of chromosomes which will be generated\n int populationSize = 100;\n // the number of chromosomes that will be generated from crossover as a percentage of the population\n double crossoverRate = 0.8;\n // the number of chromosomes that will be generated from crossover\n int crossoverSize = (int) (populationSize * crossoverRate);\n // the probability that a chromosome can have a random mutation\n double mutationRate = 0.05;\n // the number of generations\n int generations = 5000;\n\n // Initialising the distance matrix using the initialiseDistanceMatrix method\n initialiseDistanceMatrix(cities);\n\n // Generating the Initial Population\n ArrayList<Chromosome> population = generatePopulation(cities, pathLength, populationSize);\n\n // The following is done for each generation of the population\n for (int i = 0; i < generations; i++) {\n // calculating the fitness of every chromosome in the current generation\n calculateFitnessOfPopulation(population);\n // sort the population so that the chromosomes with the highest fitness are at the start of the list\n Collections.sort(population);\n // call the method which performs crossover on the population\n Set<Chromosome> children = crossoverPopulation(population, populationSize, crossoverSize);\n // carry out mutation on the children of the current population\n children.addAll( mutatePopulation(children, mutationRate) );\n\n // evolve the population\n population.addAll(children);\n ArrayList<Chromosome> currentGeneration = new ArrayList<>(population);\n ArrayList<Chromosome> nextGeneration = evolvePopulation(currentGeneration, populationSize, cities, pathLength);\n population = new ArrayList<>(nextGeneration);\n }\n\n // find the fittest chromosome\n Chromosome fittestChromosome = population.get(0);\n double maxFitness = population.get(0).fitness;\n for (Chromosome c : population) {\n if (c.fitness > maxFitness) {\n maxFitness = c.fitness;\n fittestChromosome = c;\n }\n }\n // display the path and distance of the fittest chromosome\n System.out.println(fittestChromosome.getPath());\n System.out.println(\"Total Route Distance: \" + routeDistance(fittestChromosome));\n\n //printPopulation(population);\n }",
"@Override\n public Solution solve(ISearchable domain) {\n if(domain==null)\n return null;\n Solution s2=domain.checkIfIsSmall();\n if(s2!=null){\n domain.isClear();\n return s2;\n }\n Solution sol = new Solution();\n temp.add(domain.getStartState());\n numOfNude++;\n domain.isVisit(domain.getStartState());\n ArrayList<AState> neighbors=new ArrayList<AState>();\n while(!temp.isEmpty()){\n AState curr=temp.poll();\n if(domain.isEqual(domain.getGoalState(),curr)){\n numOfNude++;\n sol =solutionPath(curr,sol);\n\n break;\n }\n neighbors=domain.getAllPossibleState(curr);\n for(int i=0;i<neighbors.size();i++){\n if(domain.isEqual(domain.getGoalState(),neighbors.get(i))){\n neighbors.get(i).pervState=curr;\n neighbors.get(i).setPrice(neighbors.get(i).getPrice()+curr.getPrice());\n numOfNude++;\n sol =solutionPath(neighbors.get(i),sol);\n break;\n }\n neighbors.get(i).pervState=curr;\n neighbors.get(i).setPrice(neighbors.get(i).getPrice()+curr.getPrice());\n temp.add(neighbors.get(i));\n numOfNude++;\n }\n }\n\n domain.isClear();\n return sol;\n }",
"public static void main(String[] args) {\n SearchTree search = new SearchTree(new Node(INITIAL_STATE), GOAL_STATE);\n long startTime = System.currentTimeMillis();\n\n search.breadthFirstSearch();\n// search.depthFirstSearch();\n// search.iterativeDeepening(10);\n\n long finishTime = System.currentTimeMillis();\n long totalTime = finishTime - startTime;\n System.out.println(\"\\n[Elapsed time: \" + totalTime + \" milliseconds]\");\n System.out.println(\"========================================================\");\n }",
"public interface SearchAlgorithm {\n\t/**\n\t * Searches the state space for a solution.\n\t * @param root\n\t * The root state to begin search from.\n\t * @param expanded_list\n\t * The expanded list in order of expansion. Filled by function.\n\t * @param goal\n\t * The goal state representation used to test if we reached the goal state.\n\t * @return\n\t * The search results containing all needed information about the search and the results.\n\t */\n\tSearchResult search(State root, List<State> expanded_list, State goal);\n}",
"public static void main(String[] args) {\n int[][] map = new int[N][N];\r\n // 1D to 2D index map\r\n CustomPair[] indToVal = new CustomPair[(N * N) + 1];\r\n // 2D to value map\r\n Map<CustomPair, Integer> gridToValue = new HashMap<>();\r\n // Direction to start\r\n Direction dir = Direction.RIGHT;\r\n int j = 1;\r\n int y = N / 2;\r\n // shift left for even n's\r\n int x = (N % 2 == 0) ? y - 1 : y;\r\n /**\r\n * We use y, x here because the grid is sort of turned around.\r\n * */\r\n while(j <= ((N * N))) {\r\n CustomPair currentIndex = new CustomPair(y, x);\r\n // if the number is not prime it is traversable\r\n if (!isPrime(j)) {\r\n map[y][x] = 1;\r\n gridToValue.put(currentIndex, j);\r\n } else {\r\n map[y][x] = -1;\r\n }\r\n // add the value to 1d to 2d index values\r\n indToVal[j] = currentIndex;\r\n switch(dir){\r\n case RIGHT:\r\n if(x <= (N - 1) && map[y - 1][x] == 0 && j > 1)\r\n dir = Direction.UP;\r\n break;\r\n case UP:\r\n if(map[y][x - 1] == 0)\r\n dir = Direction.LEFT;\r\n break;\r\n case LEFT:\r\n if(x == 0 || map[y + 1][x] == 0)\r\n dir = Direction.DOWN;\r\n break;\r\n case DOWN:\r\n if(map[y][x + 1] == 0)\r\n dir = Direction.RIGHT;\r\n break;\r\n }\r\n // update the grid index\r\n switch(dir){\r\n case RIGHT:\r\n x++;\r\n break;\r\n case UP:\r\n y--;\r\n break;\r\n case LEFT:\r\n x--;\r\n break;\r\n case DOWN:\r\n y++;\r\n break;\r\n }\r\n // update 1D index\r\n j++;\r\n }\r\n\r\n Scanner sc = new Scanner(System.in);\r\n int caseNum = 1;\r\n while (sc.hasNextInt()) {\r\n int start = sc.nextInt();\r\n int goal = sc.nextInt();\r\n // find the shortest path\r\n Queue<CustomPair> q = new LinkedList<>();\r\n // 2D grid to distance values\r\n Map<CustomPair, Integer> distMap = new HashMap<>();\r\n // start is 0\r\n distMap.put(indToVal[start], 0);\r\n q.add(indToVal[start]);\r\n while (!q.isEmpty()) {\r\n CustomPair cur = q.remove();\r\n // for each neighbour (4 potential moves)\r\n for (int i = 0; i < 4; i++) {\r\n int nx = cur.a + X_NEIG_INDEX[i];\r\n int ny = cur.b + Y_NEIG_INDEX[i];\r\n CustomPair neighP = new CustomPair(nx, ny);\r\n // if the value is not in the grid\r\n if (!gridToValue.containsKey(neighP))\r\n continue;\r\n // if the value is already visited\r\n if (distMap.containsKey(neighP))\r\n continue;\r\n distMap.put(neighP, distMap.get(cur) + 1);\r\n q.add(neighP);\r\n }\r\n }\r\n // print for Kattis reasons\r\n String msg = \"Case \" + caseNum + \": \";\r\n if (!distMap.containsKey(indToVal[goal]) ||\r\n distMap.getOrDefault(indToVal[goal], -1) == -1 && start != goal)\r\n System.out.println(msg + \" impossible\");\r\n else\r\n System.out.println(msg + \"\" + distMap.get(indToVal[goal]));\r\n caseNum++;\r\n }\r\n }",
"Boolean getSearchObjective();",
"public List<GeographicPoint> aStarSearch(GeographicPoint start, \n\t\t\t\t\t\t\t\t\t\t\t GeographicPoint goal, Consumer<GeographicPoint> nodeSearched)\n\t{\n\t\t// TODO: Implement this method in WEEK 4\n\t\t\n\t\t// Hook for visualization. See writeup.\n\t\t//nodeSearched.accept(next.getLocation());\n\t\tSet<GeographicPoint> visited = new HashSet<GeographicPoint>();\n\t\tPriorityQueue<MapNode> queue = new PriorityQueue<MapNode>(numVertices, new AStarComparator());\n\t\tHashMap<GeographicPoint, List<GeographicPoint>> path = new HashMap<GeographicPoint, List<GeographicPoint>>();\n\t\tint count = 0;\n\t\t\n\t\tif (!map.containsKey(start) || !map.containsKey(goal))\n\t\t\treturn null;\n\t\t\n\t\tfor (GeographicPoint temp : map.keySet())\n\t\t\tpath.put(temp, new ArrayList<GeographicPoint>());\n\t\t\n\t\tMapNode startNode = map.get(start);\n\t\tstartNode.setTimeToStart(0.0);\n\t\tstartNode.setPredictedTime(0.0);\n\t\tstartNode.setDistanceToStart(0.0);\n\t\tstartNode.setPredictedDistance(0.0);\n\t\tqueue.add(startNode);\n\t\t\n\t\twhile (!queue.isEmpty()) {\n\t\t\tMapNode currNode = queue.poll();\n\t\t\tnodeSearched.accept(currNode.getLocation());\n\t\t\t\n\t\t\tif (!visited.contains(currNode.getLocation())) {\n\t\t\t\tvisited.add(currNode.getLocation());\n\t\t\t\tcount++;\n\t\t\t\t\n\t\t\t\tif (currNode.getLocation().equals(goal))\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tHashMap<MapEdge, GeographicPoint> neighbours = currNode.getNeighbours();\n\t\t\t\tfor (MapEdge edge : neighbours.keySet()) {\n\t\t\t\t\tif (!visited.contains(edge.getEnd())) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tMapNode addNode = map.get(neighbours.get(edge));\n\t\t\t\t\t\tdouble tempPath = currNode.getDistanceToStart() + edge.getDistance();\n\t\t\t\t\t\tdouble tempTime = currNode.getTimeToStart() + ((edge.getDistance())/(edge.getSpeedLimit()));\n\n\t\t\t\t\t\tif (tempTime < addNode.getPredictedTime()) {\n\n\t\t\t\t\t\t\taddNode.setDistanceToStart(tempPath);\n\t\t\t\t\t\t\taddNode.setTimeToStart(tempTime);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble predict = tempPath + edge.getEnd().distance(goal);\n\n\t\t\t\t\t\t\taddNode.setPredictedDistance(predict);\n\t\t\t\t\t\t\taddNode.setPredictedTime(predict/edge.getSpeedLimit());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tqueue.add(addNode);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tList<GeographicPoint> temp = path.get(neighbours.get(edge));\n\t\t\t\t\t\t\ttemp.add(currNode.getLocation());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Astarsearch: \" + count);\n\t\treturn backTrack(path,goal);\n\t}",
"public static void main(String[] args) {\n\t\tlinearsearch oo=new linearsearch();\n\t\too.search();\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tint[] arr = { 1, 21, 32, 49, 5 };\n\t\tSystem.out.println(linearsearch(arr, 322));\n\n\t}",
"private void findBestPath(){\n\t\t// The method will try to find the best path for every starting point and will use the minimum\n\t\tfor(int start = 0; start < this.getDimension(); start++){\n\t\t\tfindBestPath(start);\t\n\t\t}\t\n\t}",
"private TargetInformation findHighGoal(Mat image) {\r\n\t\tTargetInformation ret = new TargetInformation();\r\n\t\tret.targetingPeg = false;\r\n\t\t\r\n long[] xsums = sums(image, true);\r\n long[] ysums = sums(image, false);\r\n \r\n\t List<PeakLoc> xpeaks = findPeaks(xsums, 10);\r\n\t List<PeakLoc> ypeaks = findPeaks(ysums, 10);\r\n\r\n\t if (ypeaks.size() == 2 && xpeaks.size() > 0) {\r\n\t \tret.targetFound = true;\r\n\t \tret.x = (xpeaks.get(0).getStop() - xpeaks.get(0).getStart()) / 2;\r\n\t \tret.gap = ypeaks.get(1).getStart() - ypeaks.get(0).getStop();\r\n\t \tret.width = xpeaks.get(0).getStop() - xpeaks.get(0).getStart();\r\n\t \tret.height = ypeaks.get(1).getStop() - ypeaks.get(0).getStart();\r\n\t \tret.y = (ypeaks.get(0).getStop() + ypeaks.get(1).getStart())/2;\r\n\t \t\r\n\t \tdouble pixelsPerInch = ret.gap / highGoalGapInches;\r\n\t \tif (xpeaks.get(0).isTruePeak() && xpeaks.get(1).isTruePeak())\r\n\t \t{\r\n\t \t\tpixelsPerInch = (pixelsPerInch + ret.width / highGoalWidthInches) / 2;\r\n\t \t}\r\n\t \tif (ypeaks.get(0).isTruePeak())\r\n\t \t{\r\n\t \t\tif (xpeaks.get(0).isTruePeak() && xpeaks.get(1).isTruePeak())\r\n\t \t\t{\r\n\t \t\t\tpixelsPerInch = (pixelsPerInch * 2 + ret.width / highGoalHeightInches) / 3;\r\n\t \t\t}\r\n\t \t\telse\r\n\t \t\t{\r\n\t \t\t\tpixelsPerInch = (pixelsPerInch + ret.width / highGoalHeightInches) / 2;\r\n\t \t\t}\r\n\t \t} \t\r\n\t \t\r\n\t \tret.aimX = ret.x + (cameraOffsetInches - shooterOffsetInches) * pixelsPerInch;\r\n\t \t\r\n\t \tret.correctionAngle = (double)((ret.aimX - image.cols() / 2)) / pixelsPerXDegree;\r\n\t }\r\n\t else\r\n\t {\r\n\t \tret.targetFound = false;\r\n\t }\r\n\t \r\n\t return ret;\r\n\t}",
"public void generateNeighborhood(TSPSolution s){\r\n\t\tint [] rounte = new int[problem.city_num+1];\r\n\t\tfor(int i=0;i<problem.city_num;i++) rounte[i] = s.route[i];\r\n\t\trounte[problem.city_num] = rounte[0];\r\n\t\tint [] pos = new int[problem.city_num];\r\n\t\tproblem.calculatePosition(rounte, pos);\r\n\t\tint pos1 = 0;\r\n\t\tint pos2 = 0;\r\n\t\tfor(int k=0;k<problem.city_num;k++){\r\n\t\t\tint i = k;\r\n\t\t\tpos1 = i;\r\n\t\t\tint curIndex = rounte[i];\r\n\t\t\tint nextIndex = rounte[i+1];\r\n\t\t\tArrayList<Integer> candidate = problem.candidateList.get(curIndex);\r\n\t\t\tIterator<Integer> iter = candidate.iterator();\r\n\t\t\twhile(iter.hasNext()){\r\n\t\t\t\tint next = iter.next();\r\n\t\t\t\tpos2 = pos[next];\r\n\t\t\t\tint curIndex1 = rounte[pos2];\r\n\t\t\t\tint nextIndex1 = rounte[pos2+1];\r\n\t\t\t\tif(curIndex == nextIndex1) continue;\r\n\t\t\t\tif(curIndex == curIndex1) continue;\r\n\t\t\t\tif(nextIndex == nextIndex1) continue;\r\n\t\t\t\tif(curIndex1 == nextIndex) continue;\r\n\t\t\t\tint betterTimes = 0;\r\n\t\t\t\tTSPSolution solution = new TSPSolution(problem.city_num, problem.obj_num, -1);\r\n\t\t\t\tfor(int j=0;j<problem.obj_num;j++){\r\n\t\t\t\t\tint gain = problem.disMatrix[j*problem.city_num*problem.city_num+curIndex*problem.city_num+curIndex1] +\r\n\t\t\t\t\t\t\tproblem.disMatrix[j*problem.city_num*problem.city_num+nextIndex*problem.city_num+nextIndex1] - \r\n\t\t\t\t\t\t\t(problem.disMatrix[j*problem.city_num*problem.city_num+curIndex*problem.city_num+nextIndex]+\r\n\t\t\t\t\t\t\tproblem.disMatrix[j*problem.city_num*problem.city_num+curIndex1*problem.city_num+nextIndex1]);\r\n\t\t\t\t\tif(gain<0) betterTimes++;\r\n\t\t\t\t\tsolution.object_val[j] = s.object_val[j] + gain;\r\n\t\t\t\t}\r\n\t\t\t\tif(betterTimes==0) continue;\r\n\t\t\t\tsolution.route = s.route.clone();\r\n\r\n\t\t\t\tif(problem.kdSet.add(solution)){\r\n\t\t\t\t\tproblem.converse(pos1, pos2, solution.route, 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }",
"Integer cost(PathFindingNode node, PathFindingNode neighbour);",
"public void evaluate()\r\n {\r\n\tdouble max = ff.evaluate(chromos.get(0),generation());\r\n\tdouble min = max;\r\n\tdouble sum = 0;\r\n\tint max_i = 0;\r\n\tint min_i = 0;\r\n\r\n\tdouble temp = 0;\r\n\r\n\tfor(int i = 0; i < chromos.size(); i++)\r\n\t {\r\n\t\ttemp = ff.evaluate(chromos.get(i),generation());\r\n\t\tif(temp > max)\r\n\t\t {\r\n\t\t\tmax = temp;\r\n\t\t\tmax_i = i;\r\n\t\t }\r\n\r\n\t\tif(temp < min)\r\n\t\t {\r\n\t\t\tmin = temp;\r\n\t\t\tmin_i = i;\r\n\t\t }\r\n\t\tsum += temp;\r\n\t }\r\n\r\n\tbestFitness = max;\r\n\taverageFitness = sum/chromos.size();\r\n\tworstFitness = min;\r\n\tbestChromoIndex = max_i;;\r\n\tworstChromoIndex = min_i;\r\n\tbestChromo = chromos.get(max_i);\r\n\tworstChromo = chromos.get(min_i);\r\n\t\r\n\tevaluated = true;\r\n }",
"private Stack<MapLocation> findPath(State.StateView state)\n {\n Unit.UnitView townhallUnit = state.getUnit(townhallID);\n Unit.UnitView footmanUnit = state.getUnit(footmanID);\n \n MapLocation startLoc = new MapLocation(footmanUnit.getXPosition(), footmanUnit.getYPosition(), null, 0);\n \n MapLocation goalLoc = new MapLocation(townhallUnit.getXPosition(), townhallUnit.getYPosition(), null, 0);\n \n MapLocation footmanLoc = null;\n if(enemyFootmanID != -1) {\n Unit.UnitView enemyFootmanUnit = state.getUnit(enemyFootmanID);\n footmanLoc = new MapLocation(enemyFootmanUnit.getXPosition(), enemyFootmanUnit.getYPosition(), null, 0);\n }\n \n // get resource locations\n List<Integer> resourceIDs = state.getAllResourceIds();\n Set<MapLocation> resourceLocations = new HashSet<MapLocation>();\n for(Integer resourceID : resourceIDs)\n {\n ResourceNode.ResourceView resource = state.getResourceNode(resourceID);\n \n resourceLocations.add(new MapLocation(resource.getXPosition(), resource.getYPosition(), null, 0));\n }\n \n return AstarSearch(startLoc, goalLoc, state.getXExtent(), state.getYExtent(), footmanLoc, resourceLocations);\n }",
"public static void main(String args[]) {\n int input[] = {10, 12, 20, 35, 46};\n int freq[] = {34, 8, 50, 21, 16};\n OptimalTreeSearch ots = new OptimalTreeSearch();\n System.out.println(ots.minCost(input, freq));\n System.out.println(ots.minCostRec(input, freq));\n }",
"void results() {\n Time t = new Time(System.currentTimeMillis());\n endTime = t;\n\n float t1gpslog, t2gpslog, t3gpslog, bhgpslog, mhgpslog, fhgpslog, nfgpslog,\n t1dtnlog, t2dtnlog, t3dtnlog, bhdtnlog, mhdtnlog, fhdtnlog, nfdtnlog;\n float t1logpercentage, t2logpercentage, t3logpercentage, bhlogpercentage,\n mhlogpercentage, fhlogpercentage, nflogpercentage;\n\n t1gpslog = t2gpslog = t3gpslog = bhgpslog = mhgpslog = fhgpslog = nfgpslog\n = t1dtnlog = t2dtnlog = t3dtnlog = bhdtnlog = mhdtnlog = fhdtnlog = nfdtnlog = 0;\n int xval, yval;\n\n for (int rbucklocationx = 0; rbucklocationx < MAX_X_GRID; rbucklocationx++) {\n for (int rbucklocationy = 0; rbucklocationy < MAX_Y_GRID; rbucklocationy++) {\n if (t1_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t1GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t1gpslog++;\n }\n\n if (t2_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t2GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t2gpslog++;\n }\n\n if (t3_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t3GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t3gpslog++;\n }\n if (bh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n bhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n bhgpslog++;\n }\n if (mh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n mhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n mhgpslog++;\n }\n if (fh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n fhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n fhgpslog++;\n }\n if (nf_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n nfgGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n nfgpslog++;\n }\n }\n }\n\n for (int resultloop = 0; resultloop < DATA_MAX_PACKETS; resultloop++)\n {\n if (d1_message[resultloop] != 0) {\n if ((d1_message[resultloop] >> 11) == t1_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t1DTNLog.add(new GPSLog(xval, yval));\n t1dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == t2_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t2DTNLog.add(new GPSLog(xval, yval));\n t2dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == t3_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t3DTNLog.add(new GPSLog(xval, yval));\n t3dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == bh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n bhDTNLog.add(new GPSLog(xval, yval));\n bhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == mh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n mhDTNLog.add(new GPSLog(xval, yval));\n mhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == fh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n fhDTNLog.add(new GPSLog(xval, yval));\n fhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == nf_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n nfgDTNLog.add(new GPSLog(xval, yval));\n nfdtnlog++;\n }\n }\n }\n\n if (t1gpslog != 0) {\n t1logpercentage = (t1dtnlog / t1gpslog) * 100;\n percentageLog.add(\"t1percentage is \" + t1logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T1\", t1logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T1\", t1logpercentage));\n });\n t1tp = t1logpercentage;\n }\n\n if (t2gpslog != 0) {\n t2logpercentage = (t2dtnlog / t2gpslog) * 100;\n percentageLog.add(\"t2percentage is \" + t2logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T2\", t2logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T2\", t2logpercentage));\n });\n t2tp = t2logpercentage;\n }\n\n if (t3gpslog != 0) {\n t3logpercentage = (t3dtnlog / t3gpslog) * 100;\n percentageLog.add(\"t3percentage is \" + t3logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T3\", t3logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T3\", t3logpercentage));\n });\n t3tp = t3logpercentage;\n }\n\n if (bhgpslog != 0) {\n bhlogpercentage = (bhdtnlog / bhgpslog) * 100;\n percentageLog.add(\"bhpercentage is \" + bhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"BH\", bhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"BH\", bhlogpercentage));\n });\n bhtp = bhlogpercentage;\n }\n\n if (mhgpslog != 0) {\n mhlogpercentage = (mhdtnlog / mhgpslog) * 100;\n percentageLog.add(\"mhpercentage is \" + mhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"MH\", mhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"MH\", mhlogpercentage));\n });\n mhtp = mhlogpercentage;\n }\n\n if (fhgpslog != 0) {\n fhlogpercentage = (fhdtnlog / fhgpslog) * 100;\n percentageLog.add(\"fhpercentage is \" + fhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"FH\", fhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"FH\", fhlogpercentage));\n });\n fhtp = fhlogpercentage;\n }\n\n if (nfgpslog != 0) {\n nflogpercentage = (nfdtnlog / nfgpslog) * 100;\n percentageLog.add(\"nfpercentage is \" + nflogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"NF\", nflogpercentage));\n tpslc.getData().add(new XYChart.Data(\"NF\", nflogpercentage));\n });\n nftp = nflogpercentage;\n }\n\n float gpslogSum = t1gpslog + t2gpslog + t3gpslog + bhgpslog + mhgpslog + fhgpslog + nfgpslog;\n float dtnlogSum = t1dtnlog + t2dtnlog + t3dtnlog + bhdtnlog + mhdtnlog + fhdtnlog + nfdtnlog;\n\n \n if (gpslogSum > 0)\n {\n float collectiveThroughput = ((dtnlogSum) / (gpslogSum)) * 100;\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"CT\", collectiveThroughput));\n tpslc.getData().add(new XYChart.Data(\"CT\", collectiveThroughput));\n });\n ct = collectiveThroughput;\n }\n\n //Add the Radio Contact Ratio value to the series\n \n if (dtnlogSum > 0)\n {\n rcratio = radioContactLog.size()/dtnlogSum;\n }\n else\n {\n rcratio = 0;\n }\n Platform.runLater(()-> {\n rcrSeries.setYValue(rcratio);\n });\n updateGPSLogSeries();\n updateDataCenterSeries();\n\n //Update the binding properties \n Platform.runLater(()-> {\n simStarted.set(false);\n simInProgress.set(false);\n simCompleted.set(true);\n simNotInProgress.set(true);\n simPaused.set(false);\n simNotStarted.set(true);\n });\n packetModels.clear();\n packetModels.add(new PacktTallyModel(t1gpslog));\n packetModels.add(new PacktTallyModel(t2gpslog));\n packetModels.add(new PacktTallyModel(t3gpslog));\n packetModels.add(new PacktTallyModel(bhgpslog));\n packetModels.add(new PacktTallyModel(mhgpslog));\n packetModels.add(new PacktTallyModel(fhgpslog));\n packetModels.add(new PacktTallyModel(nfgpslog));\n packetModels.add(new PacktTallyModel(gpslogSum));\n packetModels.add(new PacktTallyModel(t1dtnlog));\n packetModels.add(new PacktTallyModel(t2dtnlog));\n packetModels.add(new PacktTallyModel(t3dtnlog));\n packetModels.add(new PacktTallyModel(bhdtnlog));\n packetModels.add(new PacktTallyModel(mhdtnlog));\n packetModels.add(new PacktTallyModel(fhdtnlog));\n packetModels.add(new PacktTallyModel(nfdtnlog));\n packetModels.add(new PacktTallyModel(dtnlogSum));\n packetModels.add(new PacktTallyModel(ct));\n packetModels.add(new PacktTallyModel(radioContactLog.size()));\n packetModels.add(new PacktTallyModel(rcratio));\n \n }",
"public static void main(String[] args) {\r\n\r\n int[] nums = {1,4,2,5,34,74};\r\n int target = 2;\r\n System.out.println(linearSearch(nums,target));\r\n }",
"public TTPSolution SH2() {\n \n // get TTP data\n long[][] D = ttp.getDist();\n int[] A = ttp.getAvailability();\n double maxSpeed = ttp.getMaxSpeed();\n double minSpeed = ttp.getMinSpeed();\n long capacity = ttp.getCapacity();\n double C = (maxSpeed - minSpeed) / capacity;\n double R = ttp.getRent();\n int m = ttp.getNbCities(),\n n = ttp.getNbItems();\n TTPSolution s = new TTPSolution(m, n);\n int[] x = s.getTour(),\n z = s.getPickingPlan();\n \n /*\n * the tour\n * generated using greedy algorithm\n */\n x = linkernTour();\n z = zerosPickingPlan();\n Deb.echo(x);\n Deb.echo(z);\n \n /*\n * the picking plan\n * generated so that the TTP objective value is maximized\n */\n ttp.objective(s);\n \n // partial distance from city x_i\n long di;\n \n // partial time with item k collected from city x_i\n double tik;\n \n // item scores\n Double[] score = new Double[n];\n \n // total time with no items collected\n double t_ = s.ft;\n \n // total time with only item k collected\n double tik_;\n \n // fitness value\n double u[] = new double[n];\n \n for (int k=0; k<n; k++) {\n \n int i;\n for (i=0; i<m; i++) {\n if (A[k]==x[i]) break;\n }\n //P.echo2(\"[\"+k+\"]\"+(i+1)+\"~\");\n \n // time to start with\n tik = i==0 ? .0 : s.timeAcc[i-1];\n int iw = ttp.weightOf(k),\n ip = ttp.profitOf(k);\n \n // recalculate velocities from start\n di = 0;\n for (int r=i; r<m; r++) {\n \n int c1 = x[r]-1;\n int c2 = x[(r+1)%m]-1;\n \n di += D[c1][c2];\n tik += D[c1][c2] / (maxSpeed-iw*C);\n }\n \n score[k] = ip - R*tik;\n tik_ = t_ - di + tik;\n u[k] = R*t_ + ttp.profitOf(k) - R*tik_;\n //P.echo(k+\" : \"+u[k]);\n }\n \n Quicksort<Double> qs = new Quicksort<Double>(score);\n qs.sort();\n int[] si = qs.getIndices();\n int wc = 0;\n for (int k=0; k<n; k++) {\n int i = si[k];\n int wi = ttp.weightOf(i);\n // eliminate useless\n if (wi+wc <= capacity && u[i] > 0) {\n z[i] = A[i];\n wc += wi;\n }\n }\n \n ttp.objective(s);\n \n return s;\n }",
"public void testAStarSearch() {\n\t\ttry {\r\n\t\t\t// EightPuzzleBoard extreme = new EightPuzzleBoard(new int[]\r\n\t\t\t// {2,0,5,6,4,8,3,7,1});\r\n\t\t\t// EightPuzzleBoard extreme = new EightPuzzleBoard(new int[]\r\n\t\t\t// {0,8,7,6,5,4,3,2,1});\r\n\t\t\tEightPuzzleBoard board = new EightPuzzleBoard(new int[] { 7, 1, 8,\r\n\t\t\t\t\t0, 4, 6, 2, 3, 5 });\r\n\r\n\t\t\tProblem problem = new Problem(board,\r\n\t\t\t\t\tnew EightPuzzleSuccessorFunction(),\r\n\t\t\t\t\tnew EightPuzzleGoalTest(), new ManhattanHeuristicFunction());\r\n\t\t\tSearch search = new AStarSearch(new GraphSearch());\r\n\t\t\tSearchAgent agent = new SearchAgent(problem, search);\r\n\t\t\tassertEquals(23, agent.getActions().size());\r\n\t\t\tassertEquals(\"906\", agent.getInstrumentation().getProperty(\r\n\t\t\t\t\t\"nodesExpanded\"));\r\n\t\t\tassertEquals(\"914\", agent.getInstrumentation().getProperty(\r\n\t\t\t\t\t\"queueSize\"));\r\n\t\t\tassertEquals(\"920\", agent.getInstrumentation().getProperty(\r\n\t\t\t\t\t\"maxQueueSize\"));\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public String execFuzzySearchGWASFunc(){\n\n Map map = new HashMap();\n\n if(this.searchParam != null && this.searchParam.length()> 0 ){\n System.out.println(this.searchParam );\n map.put(\"searchParam\",this.searchParam);\n }\n\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n map.put(\"species\",this.searchSpecies);\n }\n\n\n List<GwasAssociationBean> t_gwasAssociationList =(List<GwasAssociationBean>) baseService.findResultList(\"cn.big.gvk.dm.GwasAssociation.selecTraitByFuzzySearch\",map);\n\n if(t_gwasAssociationList != null && t_gwasAssociationList.size()>0) {\n\n List traitlist = new ArrayList();\n for (GwasAssociationBean gwas : t_gwasAssociationList) {\n traitlist.add(gwas.getTraitId());\n }\n Map t = new HashMap();\n t.put(\"traitlist\",traitlist);\n this.gwasAssociationViewList = (List<GwasAssociationView>) baseService.findResultList(\"cn.big.gvk.dm.GwasAssociation.selectGwasViewInfo\",t);\n\n if(this.gwasAssociationViewList != null ){\n for(GwasAssociationView gview : gwasAssociationViewList){\n List<GenotypeAnnotateGeneView> gagvlist = (List<GenotypeAnnotateGeneView>)baseService.findResultList(\"cn.big.gvk.dm.Genotype.selectGenotypeById\",gview.getGenotypeId());\n\n List<GenotypeAnnotateGeneView> ttlist = new ArrayList<GenotypeAnnotateGeneView>();\n if(gagvlist != null ){\n Map gmap = new HashMap();\n\n for(GenotypeAnnotateGeneView gagv: gagvlist){\n String key = gagv.getMapGeneId()+\",\"+gagv.getConseqtype();\n if(gmap.get(key) == null ){\n ttlist.add(gagv);\n gmap.put(key,key);\n }\n }\n\n\n }\n\n gview.setGenotypeAnnotateViewList(ttlist);\n\n\n List<ReportGeneBean> grglist = (List<ReportGeneBean>)baseService.findResultList(\"cn.big.gvk.dm.Genotype.selectReportGeneById\",gview.getGaId());\n if(grglist != null ){\n String s = \"\";\n for(ReportGeneBean grg: grglist){\n if(grg.getReportGeneId() != null ){\n s += grg.getReportGeneId();\n }\n if(grg.getEntrezGeneSymbol() != null ){\n s+= \"( \"+grg.getEntrezGeneSymbol()+\" );\";\n }\n }\n if(s.length()>0){\n s= s.substring(0,s.length()-1);\n }\n gview.setGwasReportGene(s);\n }\n }\n }\n }\n\n\n\n return SUCCESS;\n }",
"private Route calculate(String fromStation, String toStation) {\n\t\tif (stations==null){\r\n\t\t\tSystem.out.println(\"DEBUG RUN OF DIJKSTRA.\");\r\n\t\t\tstations = new ArrayList<Station>();\r\n\t\t\tcreateDebugMap(stations);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Check if the stations exists\r\n\t\t */\r\n\t\tStation startStation = null, endStation = null;\r\n\r\n\t\t// Find starting station\r\n\t\tfor (Station thisStation : stations) {\r\n\t\t\tif (thisStation.stationName.equals(fromStation)) {\r\n\t\t\t\tSystem.out.println(\"Found startStaion in the Database\");\r\n\t\t\t\tstartStation = thisStation;\r\n\t\t\t}\r\n\t\t\tif (thisStation.stationName.equals(toStation)) {\r\n\t\t\t\tSystem.out.println(\"Found endStation in the Database\");\r\n\t\t\t\tendStation = thisStation;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Station not found. Break\r\n\t\tif (startStation == null || endStation == null) {\r\n\t\t\tSystem.out.println(\"Shit! One of the stations could not be found\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Declare the variables for the algorithm\r\n\t\t */\r\n\r\n\t\t// ArrayList for keeping track of stations we have visited.\r\n\t\tArrayList<Station> visitedStations = new ArrayList<Station>();\r\n\t\t// Array for the DijkstraStations. This type holds the current best cost and best link to it.\r\n\t\tArrayList<DijkstraStation> dijkstraStations = new ArrayList<DijkstraStation>();\r\n\r\n\t\t// The station we are examining neighbors from.\r\n\t\tDijkstraStation currentStation = new DijkstraStation(new Neighbor(startStation, 0, 0), 0, startStation);\r\n\r\n\t\t// PriorityQueue for sorting unvisited DijkstraStations.\r\n\t\tNeighBorDijktstraComparetor Dijkcomparator = new NeighBorDijktstraComparetor();\r\n\t\tPriorityQueue<DijkstraStation> unvisitedDijkstraStations;\r\n\t\tunvisitedDijkstraStations = new PriorityQueue<DijkstraStation>(100, Dijkcomparator);\r\n\r\n\t\t// Variable to keep track of the goal\r\n\t\tboolean goalFound = false; // did we find the goal yet\r\n\t\tint goalBestCost = Integer.MAX_VALUE; // did we find the goal yet\r\n\r\n\t\t// Add the start staion to the queue so that the loop will start with this staiton\r\n\t\tunvisitedDijkstraStations.add(currentStation);\r\n\t\tdijkstraStations.add(currentStation);\r\n\r\n\t\t/***************************\r\n\t\t * The Dijkstra algorithm loop.\r\n\t\t ***************************/\r\n\r\n\t\twhile (!unvisitedDijkstraStations.isEmpty()) {\r\n\t\t\t// Take the next station to examine from the queue and set the next station as the currentStation\r\n\t\t\tcurrentStation = unvisitedDijkstraStations.poll();\r\n\r\n\t\t\tSystem.out.println(\"\\n============= New loop passtrough =============\");\r\n\t\t\tSystem.out.println(\"Analysing neighbors of \" + currentStation.stationRef.stationName + \". Cost to this station is: \" + currentStation.totalCost);\r\n\r\n\t\t\t// Add visited so we dont visit again.\r\n\t\t\tvisitedStations.add(currentStation.stationRef);\r\n\r\n\t\t\t// break the algorithm if the current stations totalcost if bigger than the best cost of the goal\r\n\t\t\tif (goalBestCost < currentStation.totalCost) {\r\n\t\t\t\tSystem.out.println(\"Best route to the goal has been found. Best cost is: \" + goalBestCost\r\n\t\t\t\t\t\t+ \" (To reach current station is: \" + currentStation.totalCost + \")\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Check all neighbors from the currentStation to the neighBorQueue so we can examine them\r\n\t\t\tfor (Neighbor thisNeighbor : currentStation.stationRef.neighbors) {\r\n\r\n\t\t\t\t// Skip stations we have already visited\r\n\t\t\t\tif (!visitedStations.contains(thisNeighbor.stationRef)) {\r\n\t\t\t\t\t// If we havent seen this station before\r\n\t\t\t\t\t// Add it to the list of Dijkstrastations and to the PriorityQueue of unvisited stations\r\n\t\t\t\t\tif (getDijkstraStationByID(thisNeighbor.stationRef.stationid, dijkstraStations) == null) {\r\n\t\t\t\t\t\tDijkstraStation thisDijkstraStation = new DijkstraStation(thisNeighbor, currentStation.totalCost\r\n\t\t\t\t\t\t\t\t+ thisNeighbor.cost, currentStation.stationRef);\r\n\t\t\t\t\t\tdijkstraStations.add(thisDijkstraStation);\r\n\t\t\t\t\t\tunvisitedDijkstraStations.offer(thisDijkstraStation);\r\n\r\n\t\t\t\t\t\tif (thisNeighbor.stationRef.equals(endStation)) {\r\n\t\t\t\t\t\t\tgoalFound = true;\r\n\t\t\t\t\t\t\tgoalBestCost = (int) thisDijkstraStation.totalCost;\r\n\t\t\t\t\t\t\tSystem.out.println(\"Goal station found :) Cost to goal is: \" + goalBestCost);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSystem.out.println(\"New station seen: \" + thisDijkstraStation);\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Station has been seen before.\r\n\r\n\t\t\t\t\t\t// Get the station as a DijkstraStation from the array\r\n\t\t\t\t\t\tDijkstraStation thisDijkstraStation = getDijkstraStationByID(thisNeighbor.stationRef.stationid,\r\n\t\t\t\t\t\t\t\tdijkstraStations);\r\n\r\n\t\t\t\t\t\t// Check if the connection is better than the one we already know\r\n\t\t\t\t\t\tif (currentStation.totalCost + thisNeighbor.cost < thisDijkstraStation.totalCost) {\r\n\r\n\t\t\t\t\t\t\t// New best link found\r\n\t\t\t\t\t\t\tSystem.out.println(\"New best route found for \" + thisNeighbor.stationRef.stationName);\r\n\t\t\t\t\t\t\tSystem.out.println(\"Old cost:\" + thisDijkstraStation.totalCost + \", New cost: \"\r\n\t\t\t\t\t\t\t\t\t+ (currentStation.totalCost + thisNeighbor.cost));\r\n\r\n\t\t\t\t\t\t\t// update the cost and via station on the DijkstraStation\r\n\t\t\t\t\t\t\tthisDijkstraStation.updateBestLink((int) (currentStation.totalCost + thisNeighbor.cost),\r\n\t\t\t\t\t\t\t\t\tcurrentStation.stationRef, thisNeighbor);\r\n\r\n\t\t\t\t\t\t\t// if this is the goal station, update the totalCost\r\n\t\t\t\t\t\t\tif (thisNeighbor.stationRef.equals(endStation)) {\r\n\t\t\t\t\t\t\t\tgoalBestCost = (int) thisDijkstraStation.totalCost;\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Updated cost for the goal to : \" + goalBestCost);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}// End while\r\n\r\n\t\t// Print the World:\r\n//\t\t System.out.println();\r\n//\t\t System.out.println(\"################# Printing the world ###################\");\r\n//\t\t for (DijkstraStation thisDijkstraStation : dijkstraStations) {\r\n//\t\t System.out.println(thisDijkstraStation.toString());\r\n//\t\t DijkstraStation tempStation = thisDijkstraStation;\r\n//\t\t System.out.print(\"BackTracking route =>\");\r\n//\t\t while (!tempStation.stationRef.equals(startStation)) {\r\n//\t\t System.out.print(\" \" + tempStation.cost + \" to \" + tempStation.viaStation.stationName + \" #\");\r\n//\t\t\r\n//\t\t tempStation = getDijkstraStationByID(tempStation.viaStation.stationid, dijkstraStations);\r\n//\t\t }\r\n//\t\t System.out.print(\" End\");\r\n//\t\t System.out.print(\"\\n\\n\");\r\n//\t\t }\r\n//\r\n\t\tif (goalFound) {\r\n\t\t\tSystem.out.println(\"Generating route to goal\");\r\n\t\t\t// create a route object with all the stations.\r\n\t\t\tRoute routeToGoal = new Route(fromStation, toStation);\r\n\t\t\t// get the goalStation as a DijkstraStation Type\r\n\t\t\tDijkstraStation goalStation = getDijkstraStationByID(endStation.stationid, dijkstraStations);\r\n\r\n\t\t\trouteToGoal.cost = goalStation.totalCost;\r\n\t\t\trouteToGoal.price = (int) goalStation.totalCost;\r\n\r\n\t\t\t// Find the route to the goal\r\n\t\t\tDijkstraStation tempStation = goalStation;\r\n\r\n\t\t\twhile (!tempStation.stationRef.equals(startStation)) {\r\n\t\t\t\t// Add the station to the route table\r\n\t\t\t\tSerializableStation thisStation = new SerializableStation(tempStation.cost, tempStation.cost,\r\n\t\t\t\t\t\ttempStation.stationRef.stationName, tempStation.stationRef.stationid);\r\n\t\t\t\t\r\n\t\t\t\t//Fix region string\r\n\t\t\t\tString regionString=\"\";\r\n\t\t\t\tfor (Integer regionID : tempStation.stationRef.region) {\r\n\t\t\t\t\tregionString.concat(regionID+ \",\");\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\tthisStation.region = regionString.substring(0, regionString.length() - 1);\r\n\t\t\t\t\r\n\t\t\t\t//Add the station\r\n\t\t\t\trouteToGoal.route.add(0, thisStation);\r\n\t\t\t\t// Go to the previous station\r\n\t\t\t\ttempStation = getDijkstraStationByID(tempStation.viaStation.stationid, dijkstraStations);\r\n\t\t\t}\r\n\t\t\t// add the starting station\r\n\t\t\tSerializableStation thisStation = new SerializableStation(tempStation.stationRef.latitude, tempStation.stationRef.longitude, tempStation.stationRef.stationName,\r\n\t\t\t\t\ttempStation.stationRef.stationid);\r\n\t\t\trouteToGoal.route.add(0, thisStation);\r\n\r\n\t\t\t// print the route\r\n\t\t\t//System.out.println(\"Printing best route to the Goal:\\n\" + routeToGoal.toString());\r\n\r\n\t\t\treturn routeToGoal;\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}",
"private void calculate() {\n\t\tList<Edge> path = new ArrayList<>();\n\t\tPriorityQueue<Vert> qv = new PriorityQueue<>();\n\t\tverts[s].dist = 0;\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tif (e.w==0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist < L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t} else if (verts[t].dist == L) {\n\t\t\tok = true;\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tif (edges[i].w == 0) {\n\t\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// replace 0 with 1, adding to za list\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (edges[i].w == 0) {\n\t\t\t\tza[i] = true;\n\t\t\t\tedges[i].w = 1;\n\t\t\t} else {\n\t\t\t\tza[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// looking for shortest path from s to t with 0\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (i != s) {\n\t\t\t\tverts[i].dist = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tqv.clear();\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist > L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t}\n\t\tVert v = verts[t];\n\t\twhile (v.dist > 0) {\n\t\t\tlong minDist = MAX_DIST;\n\t\t\tVert vMin = null;\n\t\t\tEdge eMin = null;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(v.idx)];\n\t\t\t\tif (vo.dist+e.w < minDist) {\n\t\t\t\t\tvMin = vo;\n\t\t\t\t\teMin = e;\n\t\t\t\t\tminDist = vMin.dist+e.w;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tv = vMin;\t\n\t\t\tpath.add(eMin);\n\t\t}\n\t\tCollections.reverse(path);\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (za[i]) {\n\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tlong totLen=0;\n\t\tboolean wFixed = false;\n\t\tfor (Edge e : path) {\n\t\t\ttotLen += (za[e.idx] ? 1 : e.w);\n\t\t}\n\t\tfor (Edge e : path) {\n\t\t\tif (za[e.idx]) {\n\t\t\t\tif (!wFixed) {\n\t\t\t\t\te.w = L - totLen + 1;\n\t\t\t\t\twFixed = true;\n\t\t\t\t} else {\n\t\t\t\t\te.w = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tok = true;\n\t}",
"public void rla() {\r\n\t\tint iter = 0;\r\n\t\t\r\n\t\twhile (true) {\r\n\t\t\titer++;\r\n\t\t\t\r\n\t\t\tHashMap<RouteState, ActionValue<RouteAction>> V0 = new HashMap<RouteState, ActionValue<RouteAction>> (V);\r\n\r\n\t\t\tfor (RouteState state : Q.keySet()) {\r\n\t\t\t\tfor (RouteAction action : Q.get(state).keySet()) {\t\t\t\r\n\t\t\t\t\tdouble value = R.get(state).get(action) + discountedSum(state, action);\r\n\t\t\t\t\tQ.get(state).put(action, value);\r\n\t\t\t\t}\r\n\t\t\t\tRouteAction bestAction = Q.get(state).entrySet().stream().max((entry1, entry2) -> entry1.getValue() > entry2.getValue() ? 1 : -1).get().getKey();\r\n\t\t\t\tDouble bestValue = Q.get(state).get(bestAction);\r\n\t\t\t\tActionValue<RouteAction> av = new ActionValue<RouteAction>(bestAction, bestValue);\r\n\r\n\t\t\t\tV.put(state, av);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (goodEnough(V0, V)) break;\r\n\t\t}\r\n\t\tSystem.out.println(\"Number of iterations: \" + iter);\r\n\t}",
"public static void main(String[] args) {\n City city = new City(60, 200);\n TourManager.addCity(city);\n City city2 = new City(180, 200);\n TourManager.addCity(city2);\n City city3 = new City(80, 180);\n TourManager.addCity(city3);\n City city4 = new City(140, 180);\n TourManager.addCity(city4);\n City city5 = new City(20, 160);\n TourManager.addCity(city5);\n City city6 = new City(100, 160);\n TourManager.addCity(city6);\n City city7 = new City(200, 160);\n TourManager.addCity(city7);\n City city8 = new City(140, 140);\n TourManager.addCity(city8);\n City city9 = new City(40, 120);\n TourManager.addCity(city9);\n City city10 = new City(100, 120);\n TourManager.addCity(city10);\n City city11 = new City(180, 100);\n TourManager.addCity(city11);\n City city12 = new City(60, 80);\n TourManager.addCity(city12);\n City city13 = new City(120, 80);\n TourManager.addCity(city13);\n City city14 = new City(180, 60);\n TourManager.addCity(city14);\n City city15 = new City(20, 40);\n TourManager.addCity(city15);\n City city16 = new City(100, 40);\n TourManager.addCity(city16);\n City city17 = new City(200, 40);\n TourManager.addCity(city17);\n City city18 = new City(20, 20);\n TourManager.addCity(city18);\n City city19 = new City(60, 20);\n TourManager.addCity(city19);\n City city20 = new City(160, 20);\n TourManager.addCity(city20);\n\n // Initialize population\n Population pop = new Population(50, true);\n System.out.println(\"Initial distance: \" + pop.getFittest().getDistance());\n\n // Evolve population for 100 generations\n pop = GA.evolvePopulation(pop);\n for (int i = 0; i < 100; i++) {\n pop = GA.evolvePopulation(pop);\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getFittest().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getFittest());\n }",
"public int fitness() {\n\t\t//System.out.println(\"/!\\\\ WARNING: Full fitness() called!\");\n\t\tint fitness = 0;\n\t\tint fitnessCases = (int) Math.pow(2, circuit.order);\n\t\tfor (int i=0; i<fitnessCases; i++) {\n\t\t\tValuation v = new Valuation(i, circuit.order);\n\t\t\tboolean actualOutput = tree.evaluate(v);\n\t\t\tboolean correctOutput = v.correctOutput();\n\t\t\t\n\t\t\tif (actualOutput == correctOutput) fitness++;\n\t\t}\n\t\t\n\t\tthis.fitness = fitness;\n\t\tthis.fitnessCases = null;\n\t\t\n\t\treturn fitness;\n\t}",
"public List<Location> neighbors (Location pos);",
"public abstract int getPopulation(int west, int south, int east, int north);",
"public interface Heuristic {\n}",
"public static void main(String[] args) {\n\t\tAnalyse ana = new Analyse(20, 5);\r\n//\t\tArrayList<Map.Entry<Integer, Double>> current = ana.getNeighbor(\"\")\r\n//\t\tfor(int i = 0; i < ana.average.length; i++){\r\n//\t\t\tSystem.out.println(ana.average[i]);\r\n//\t\t}\r\n//\t\tfor (int i = 0; i < 5; i++) {\r\n//\t\t\tSystem.out.println(ana.heap.get(i).getValue());\r\n//\t\t}\r\n\t\tSystem.out.println(ana.similarity.size());\r\n//\t\tArrayList<Map.Entry<Integer, Double>> record = ana.getNeighbor(\"0155061224\");\r\n//\t\tSystem.out.println(ana.heap.size());\r\n//\t\tSystem.out.println(record.size());\r\n//\t\tfor(int i = 0; i < record.size(); i++){\r\n//\t\t\tSystem.out.println(record.get(i).getKey());\r\n//\t\t\tSystem.out.println(record.get(i).getValue());\r\n////\t\t\tSystem.out.println(ana.matrix[record.get(i).getKey()][ana.read.getItems().indexOf(3149)]);\r\n//\t\t}\r\n\t\tlong start = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"score\" + ana.predictionBaseline(\"100\"));\r\n\t\tlong end = System.currentTimeMillis();\r\n\t\tSystem.out.println(end - start);\r\n//\t\tSystem.out.println(ana.predictionBaseline(\"0155061224\"));\r\n\t}",
"public float AssignFitness() {\n\t\t\n\t\tfitness = 0;\n\t\tif(sample_map.size() == 0) {\n\t\t\treturn fitness;\n\t\t}\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tfitness += ptr.s.weight;\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tfitness /= sample_map.size();\n\t\treturn fitness;\n\t}",
"public interface RoutingAlgorithm {\n public void initMapInfo(int[][] map);\n public int getShortestPath(int start,int end);\n}",
"protected abstract void getAllUniformLocations();",
"public abstract List<Direction> searchForCheese(Maze maze);",
"private Point backtrack(Point p){\n\t\t// coordinates of the point\n\t\tint x = (int)p.getX();\n\t\tint y = (int)p.getY();\n\t\t// neigh hold the return value\n\t\tPoint neigh= p;\n\t\t// the lowest score\n\t\tint score=10000;\n\t\t// look at all the neighbor and compare them\n\t\tif(x>0\t && topology[x-1][y]>=0){\n\t\t\tscore = topology[x-1][y];\n\t\t\tneigh = new Point(x-1,y);\n\t\t}\n\t\tif(x<row-1 && topology[x+1][y]>=0 && score > topology[x+1][y]) {\n\t\t\tscore = topology[x+1][y];\n\t\t\tneigh = new Point(x+1,y);\n\t\t}\n\t\tif(y<col-1 && topology[x][y+1]>=0 && score > topology[x][y+1]) {\n\t\t\tscore = topology[x][y+1];\n\t\t\tneigh = new Point(x,y+1);\n\t\t}\n\t\tif(y>0 && topology[x][y-1]>=0 && score > topology[x][y-1]) {\n\t\t\tscore = topology[x][y-1];\n\t\t\tneigh = new Point(x,y-1);\n\t\t}\n\t\treturn neigh;\n\t}",
"Long[] searchSolution(int timeLimit, Graph g);",
"public A_star_search(Node start, Node end) {\r\n initial_node = start;\r\n end_node = end;\r\n cost = 0;\r\n }",
"private static void getFitness() {\n\t\tint popSize = population.size();\n\t\tChromosome thisChromo = null;\n\t\tdouble bestScore = 0;\n\t\tdouble worstScore = 0;\n\n\t\t// The worst score would be the one with the highest energy, best would be\n\t\t// lowest.\n\t\tworstScore = population.get(maximum()).conflicts();\n\n\t\t// Convert to a weighted percentage.\n\t\tbestScore = worstScore - population.get(minimum()).conflicts();\n\n\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\tthisChromo = population.get(i);\n\t\t\tthisChromo.fitness((worstScore - thisChromo.conflicts()) * 100.0 / bestScore);\n\t\t}\n\n\t\treturn;\n\t}"
] | [
"0.647985",
"0.62563694",
"0.61223453",
"0.60132277",
"0.5798564",
"0.57487947",
"0.5719538",
"0.5683842",
"0.56792384",
"0.56750965",
"0.56699264",
"0.56552863",
"0.560102",
"0.55888873",
"0.557829",
"0.55618006",
"0.555223",
"0.553309",
"0.55271083",
"0.5512802",
"0.55106467",
"0.5504022",
"0.5482591",
"0.54720503",
"0.5443363",
"0.5438394",
"0.54163337",
"0.5400139",
"0.53879327",
"0.5386349",
"0.53831816",
"0.5371058",
"0.5366208",
"0.53658116",
"0.5365811",
"0.53639555",
"0.53599954",
"0.53498316",
"0.53372025",
"0.5332755",
"0.5328759",
"0.5322176",
"0.5308355",
"0.5307495",
"0.5304118",
"0.52913135",
"0.5288876",
"0.52861476",
"0.52836496",
"0.5283151",
"0.52793485",
"0.5279336",
"0.5274164",
"0.52719283",
"0.52693874",
"0.5268347",
"0.5259826",
"0.5256106",
"0.5251848",
"0.525133",
"0.52476215",
"0.5243957",
"0.5236962",
"0.52359295",
"0.5233091",
"0.5232985",
"0.5225646",
"0.52236587",
"0.52220017",
"0.52193403",
"0.5219132",
"0.5213321",
"0.52112156",
"0.52047944",
"0.5202034",
"0.519217",
"0.5191443",
"0.5188248",
"0.5180996",
"0.5173181",
"0.5170153",
"0.5154498",
"0.5149292",
"0.5148901",
"0.5147048",
"0.51463664",
"0.51440936",
"0.51405126",
"0.5137764",
"0.5136023",
"0.5128451",
"0.5127522",
"0.5126567",
"0.5124762",
"0.5122861",
"0.51218337",
"0.51217794",
"0.5120899",
"0.5118362",
"0.5117526",
"0.5116557"
] | 0.0 | -1 |
overwrite fitness Score for each child class | float getFitnessScore(MapLocation l) {
try{
if(rc.canSenseLocation(l) && !rc.onTheMap(l)) {
//System.out.println("dead square");
return -999999.0f;
}
} catch(Exception e){e.printStackTrace();}
float fitness = 0.0f;
for(RobotInfo ri : allRobots) {
fitness -= 1f/l.distanceSquaredTo(ri.location);
}
if(type.equals(RobotType.GARDENER)) {
for(TreeInfo ti : allTrees) {
if(ti.team.equals(Team.NEUTRAL)) {
fitness -= 1f/l.distanceSquaredTo(ti.location);
}
}
}
fitness -= 10f/l.distanceSquaredTo(lastLocation);
return fitness;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setFitnessScore(double score){\n fitnessScore = score;\n }",
"protected abstract void calcScores();",
"double getFitnessScore(){\n return fitnessScore;\n }",
"public abstract float getScore();",
"protected float getFitness()\t\t\t{\treturn fitness;\t\t}",
"public void fitnessFunction()\n\t{\n\t\t\n\t}",
"public int getFitness(){\n return fitness;\n }",
"@Override\n\tpublic void inputScore() {\n\n\t}",
"@Override\n\tpublic void saveScore() {\n\n\t}",
"@Override\n\tpublic void saveScore() {\n\t\t\n\t}",
"public abstract double getAestheticFitness();",
"@Override\n public int getScore() {\n return score;\n }",
"public double fitness()\n/* */ {\n/* 40 */ return 1.0D / (1.0D + this.distance);\n/* */ }",
"public abstract double evaluateFitness();",
"public void setFitness(float fitness)\r\n\t{\r\n\t\tthis.fitness = fitness;\r\n\t}",
"protected final void calcScore()\n {\n\n m_score = SCORE_OTHER;\n\n if (null == m_targetString)\n calcTargetString();\n }",
"public float getFitness()\r\n\t{\r\n\t\treturn fitness;\r\n\t}",
"@Override\r\n\tpublic double getScore() {\n\t\treturn score;\r\n\t}",
"protected abstract List<Double> calcScores();",
"@Override\n public int getScore() {\n return totalScore;\n }",
"public void incrementFitness()\n {\n this.fitness++;\n }",
"void setFitness(double fitness) throws UnsupportedOperationException;",
"void setBestScore(double bestScore);",
"public abstract void updateFitness();",
"@Override\n\tpublic double getTotalScore() {\n\t\treturn score;\n\t}",
"@Override\r\n public boolean visit (Score score)\r\n {\r\n score.acceptChildren(this);\r\n\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\"highestTop=\" + highestTop);\r\n }\r\n\r\n score.setHighestSystemTop(highestTop);\r\n\r\n return false;\r\n }",
"public double computeScore(Params params) {\n score = localScore(params);\n if (children != null)\n for (Derivation child : children)\n score += child.computeScore(params);\n return score;\n }",
"public double getFitness(){\n return averageFitness;\n }",
"@Override\r\n\tpublic double getScore() \r\n\t{\r\n\t\treturn this._totalScore;\r\n\t}",
"public void setScore (int newScore)\n {\n this.score = newScore;\n }",
"public abstract double getFitness(Genotype genotype);",
"protected void setFitness(float fit)\t{\tfitness = fit;\t\t}",
"void calcFittest(){\n System.out.println(\"Wall hugs\");\n System.out.println(this.wallHugs);\n\n System.out.println(\"Freedom points\");\n System.out.println(this.freedomPoints);\n\n System.out.println(\"Visited points\");\n System.out.println(this.vistedPoints);\n\n this.fitnessScore = freedomPoints - wallHugs - vistedPoints;\n System.out.println(\"Individual fit score: \" + fitnessScore);\n }",
"void calculateFitness() {\n if (reachedGoal) {\n fitness = 1d / 16d + 8192d / (genome.step * genome.step);\n } else {\n double d = position.distance(Game.Setup.goal);\n fitness = 1d / (d * d);\n }\n }",
"public double getBestScore();",
"public int getScore() { return score; }",
"public int fitness() {\n\t\t//System.out.println(\"/!\\\\ WARNING: Full fitness() called!\");\n\t\tint fitness = 0;\n\t\tint fitnessCases = (int) Math.pow(2, circuit.order);\n\t\tfor (int i=0; i<fitnessCases; i++) {\n\t\t\tValuation v = new Valuation(i, circuit.order);\n\t\t\tboolean actualOutput = tree.evaluate(v);\n\t\t\tboolean correctOutput = v.correctOutput();\n\t\t\t\n\t\t\tif (actualOutput == correctOutput) fitness++;\n\t\t}\n\t\t\n\t\tthis.fitness = fitness;\n\t\tthis.fitnessCases = null;\n\t\t\n\t\treturn fitness;\n\t}",
"public int getFitness()\n {\n return this.fitness;\n }",
"public void assignMatingProportions() {\n\t\tdouble totalAverageSpeciesFitness = 0.0;\r\n\r\n\t\t// hold the proportion of offspring each species should generate\r\n\r\n\t\tfor (Species s : speciesList) {\r\n\r\n\t\t\ttotalAverageSpeciesFitness += s.getAverageAdjustedFitness();\r\n\t\t}\r\n\r\n\t\t// set map values to be a proportion of the total adjusted\r\n\t\t// fitness\r\n\t\tfor (Species s : speciesList) {\r\n\r\n\t\t\ts.assignProp(totalAverageSpeciesFitness);\r\n\t\t}\r\n\t}",
"void ComputeFitness(){\n\t\tint i, pos;\n\t\t// individual t;\n\t\tdouble min, sum = 0, sumSize = 0, tm;\n\t\t// First Compute Raw fitness\n\t\tfor(i = 0; i < poplen; i++)\n\t\t{\n\t\t\tif(oldpop[i].evaluated==FALSE)\n\t\t\t{ tm=ComputeRF(oldpop[i]);\n\t\t\t\toldpop[i].fitness = tm;\n\t\t\t\toldpop[i].oldfitness = tm;\n\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\toldpop[i].fitness=oldpop[i].oldfitness;\n\t\t\t}\n\t\t\t\n\t\t\t//oldpop[i].DisplayIndividual();\n\t\t\t//System.out.println(oldpop[i].fitness);\n\t\t}\n\t\t//tim individual co fitness be nhat\n\t\tmin = oldpop[0].fitness;\n\t\tpos = 0;\n\t\tsum = oldpop[0].fitness;\n\t\tsumSize = oldpop[0].size;\n\t\t\n\t\tfor(i = 1; i < poplen; i++) {\n\t\t\tif(oldpop[i].fitness < min) {\n\t\t\t\tmin = oldpop[i].fitness;\n\t\t\t\tpos = i;\n\t\t\t}\n\t\t\tsum += oldpop[i].fitness;\n\t\t\tsumSize += oldpop[i].size;\n//\t\t\tpopSize[gen][i]= oldpop[i].size;\n\t\t}\n\t\t// copy the best and average\n\t\tbestcurrent[gen] = new individual();\n\t\tbestcurrent[gen].CopyIndividual(oldpop[pos], TRUE);\n\t\taverage[gen] = sum /poplen;\n\t\taverageSize[gen] = sumSize /poplen;\n\t\t// Third Compute Adjusted fitness\n\t\tAdjustFitness();\n\t\t// Finally Compute nomarlized fitness\n \t\tNormalizeFitness();\n\t}",
"public void updateFitness() {\n Particle p;\n for (int i = 0; i < SWARM_SIZE; i++) {\n p = swarm.get(i);\n p.setFitnessValue(getFitnessValue(p.getVector().getPos()));\n p.setpBestFitness(getFitnessValue(p.getpBest().getPos()));\n }\n }",
"public void calcularFitness() {\n double fit = 0;\r\n for (int x=0; x < this.genotipo.length;x++){\r\n if (x!=this.genotipo.length-1){\r\n fit+=distancias[this.genotipo[x]][this.genotipo[x+1]];\r\n }else{\r\n fit+=distancias[this.genotipo[x]][this.genotipo[0]];\r\n }\r\n }\r\n this.fitness = fit;\r\n }",
"@Override\r\n\tpublic Double getPropensity_familyproins_score() {\n\t\treturn super.getPropensity_familyproins_score();\r\n\t}",
"@Override\n\tpublic void checkScore() {\n\t\t\n\t}",
"private static void getFitness() {\n\t\tint popSize = population.size();\n\t\tChromosome thisChromo = null;\n\t\tdouble bestScore = 0;\n\t\tdouble worstScore = 0;\n\n\t\t// The worst score would be the one with the highest energy, best would be\n\t\t// lowest.\n\t\tworstScore = population.get(maximum()).conflicts();\n\n\t\t// Convert to a weighted percentage.\n\t\tbestScore = worstScore - population.get(minimum()).conflicts();\n\n\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\tthisChromo = population.get(i);\n\t\t\tthisChromo.fitness((worstScore - thisChromo.conflicts()) * 100.0 / bestScore);\n\t\t}\n\n\t\treturn;\n\t}",
"public static void createScore(){\n\t}",
"public double setFitnessScore(double fitnessScore) {\n\t\tdouble previousValue = this.fitnessScore;\n\t\tthis.fitnessScore = fitnessScore;\n\t\treturn previousValue;\n\t}",
"float getScore();",
"float getScore();",
"@Override\n\tpublic void printScore() {\n\n\t}",
"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 void setScore(int score) {this.score = score;}",
"public float AssignFitness() {\n\t\t\n\t\tfitness = 0;\n\t\tif(sample_map.size() == 0) {\n\t\t\treturn fitness;\n\t\t}\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tfitness += ptr.s.weight;\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tfitness /= sample_map.size();\n\t\treturn fitness;\n\t}",
"public int getScore(){ return this.score; }",
"public int getScore() {return score;}",
"public float getScore(){return score;}",
"public int getScore(){\n \treturn 100;\n }",
"public void setScore(int score) { this.score = score; }",
"@Override\n\tpublic void loadScore() {\n\n\t}",
"public double getScore() {\r\n return score;\r\n }",
"@Test\n public void testScoreUpdate() {\n try {\n final BestEvalScore score = new BestEvalScore(\"thjtrfwaw\");\n double expected = 0;\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n final Evaluation eval = new Evaluation(2);\n eval.eval(0,1);\n eval.eval(1,1);\n\n expected = eval.accuracy();\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n eval.eval(0,1);\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n eval.eval(1,1);\n eval.eval(1,1);\n expected = eval.accuracy();\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n\n\n } catch (IOException e) {\n throw new IllegalStateException(\"Failed to create instance!\", e);\n }\n\n\n }",
"public void setFitness(int fit)\n {\n this.fitness=fit;\n }",
"@Override\r\n public double calculateBestQuality() {\r\n int numClasses = parentClassDist.size();\r\n \r\n //Sort the mean distance orderline\r\n Collections.sort(meanDistOrderLine);\r\n \r\n //Find approximate minimum orderline objects\r\n OrderLineObj min = new OrderLineObj(-1.0, 0.0);\r\n for(Double d : parentClassDist.keySet()){\r\n int unassignedObjs = parentClassDist.get(d) - orderLineClassDist.get(d);\r\n double distMin = (sums[d.intValue()] + (unassignedObjs * minDistance)) / parentClassDist.get(d);\r\n if(min.getDistance() == -1.0 || distMin < min.getDistance()){\r\n min.setDistance(distMin);\r\n min.setClassVal(d);\r\n }\r\n }\r\n \r\n //Find approximate maximum orderline objects\r\n OrderLineObj max = new OrderLineObj(-1.0, 0.0);\r\n for(Double d : parentClassDist.keySet()){\r\n int unassignedObjs = parentClassDist.get(d) - orderLineClassDist.get(d);\r\n double distMax = (sums[d.intValue()] + (unassignedObjs * maxDistance)) / parentClassDist.get(d); \r\n if(d != min.getClassVal() && (max.getDistance() == -1.0 || distMax > max.getDistance())){\r\n max.setDistance(distMax);\r\n max.setClassVal(d);\r\n }\r\n }\r\n \r\n //Adjust running sums\r\n double increment = (max.getDistance() - min.getDistance()) / (numClasses-1);\r\n int multiplyer = 1;\r\n for (OrderLineObj currentObj : meanDistOrderLine) {\r\n double thisDist;\r\n int unassignedObjs = parentClassDist.get(currentObj.getClassVal()) - orderLineClassDist.get(currentObj.getClassVal());\r\n \r\n if(currentObj.getClassVal() == min.getClassVal()){\r\n thisDist = minDistance;\r\n }else if(currentObj.getClassVal() == max.getClassVal()){\r\n thisDist = maxDistance;\r\n }else{\r\n thisDist = minDistance + (increment * multiplyer);\r\n multiplyer++; \r\n }\r\n sums[(int)currentObj.getClassVal()] += thisDist * unassignedObjs;\r\n sumOfSquares[(int)currentObj.getClassVal()] += thisDist * thisDist * unassignedObjs;\r\n sumsSquared[(int)currentObj.getClassVal()] = sums[(int)currentObj.getClassVal()] * sums[(int)currentObj.getClassVal()];\r\n }\r\n \r\n double ssTotal;\r\n double part1 = 0;\r\n double part2 = 0;\r\n\r\n for (int i = 0; i < numClasses; i++) {\r\n part1 += sumOfSquares[i];\r\n part2 += sums[i];\r\n }\r\n\r\n part2 *= part2;\r\n part2 /= numInstances;\r\n ssTotal = part1 - part2;\r\n\r\n double ssAmoung;\r\n part1 = 0;\r\n part2 = 0;\r\n for (int i = 0; i < numClasses; i++) {\r\n part1 += (double) sumsSquared[i] / parentClassDist.get((double) i);//.data[i].size();\r\n part2 += sums[i];\r\n }\r\n ssAmoung = part1 - (part2 * part2) / numInstances;\r\n double ssWithin = ssTotal - ssAmoung;\r\n\r\n int dfAmoung = numClasses - 1;\r\n int dfWithin = numInstances - numClasses;\r\n\r\n double msAmoung = ssAmoung / dfAmoung;\r\n double msWithin = ssWithin / dfWithin;\r\n\r\n double f = msAmoung / msWithin;\r\n \r\n //Reset running sums\r\n multiplyer = 1;\r\n for (OrderLineObj currentObj : meanDistOrderLine) {\r\n double thisDist;\r\n int unassignedObjs = parentClassDist.get(currentObj.getClassVal()) - orderLineClassDist.get(currentObj.getClassVal());\r\n \r\n if(currentObj.getClassVal() == min.getClassVal()){\r\n thisDist = minDistance;\r\n }else if(currentObj.getClassVal() == max.getClassVal()){\r\n thisDist = maxDistance;\r\n }else{\r\n thisDist = minDistance + (increment * multiplyer);\r\n multiplyer++; \r\n }\r\n sums[(int)currentObj.getClassVal()] -= thisDist * unassignedObjs;\r\n sumOfSquares[(int)currentObj.getClassVal()] -= thisDist * thisDist * unassignedObjs;\r\n sumsSquared[(int)currentObj.getClassVal()] = sums[(int)currentObj.getClassVal()] * sums[(int)currentObj.getClassVal()];\r\n }\r\n \r\n return Double.isNaN(f) ? 0.0 : f;\r\n }",
"Float getScore();",
"public Score getScore()\r\n { \r\n return theScore;\r\n }",
"public void updateFitness ( ) {\n\n KozaFitness f = ((KozaFitness)program.fitness);\n\n f.setStandardizedFitness(param.Parameters.STATE, this.fit);\n\n }",
"private void _setInstanceInfo() {\n int subClass, superClass;\n\n for (int i = 0; i < CLASS_NUM; i++) {\n switch (i) {\n case CS_C_UNIV:\n break;\n case CS_C_DEPT:\n break;\n case CS_C_FULLPROF:\n instances_[i].num = _getRandomFromRange(FULLPROF_MIN, FULLPROF_MAX);\n break;\n case CS_C_VISITINGPROF:\n instances_[i].num = _getRandomFromRange(VISITINGPROF_MIN, VISITINGPROF_MAX);\n break;\n case CS_C_ASSOPROF:\n instances_[i].num = _getRandomFromRange(ASSOPROF_MIN, ASSOPROF_MAX);\n break;\n case CS_C_ASSTPROF:\n instances_[i].num = _getRandomFromRange(ASSTPROF_MIN, ASSTPROF_MAX);\n break;\n case CS_C_LECTURER:\n instances_[i].num = _getRandomFromRange(LEC_MIN, LEC_MAX);\n break;\n case CS_C_UNDERSTUD:\n instances_[i].num = _getRandomFromRange(R_UNDERSTUD_FACULTY_MIN *\n instances_[CS_C_FACULTY].total,\n R_UNDERSTUD_FACULTY_MAX *\n instances_[CS_C_FACULTY].total);\n break;\n case CS_C_VISITSTUD:\n instances_[i].num = _getRandomFromRange(R_VISITSTUD_FACULTY_MIN *\n instances_[CS_C_FACULTY].total,\n R_VISITSTUD_FACULTY_MAX *\n instances_[CS_C_FACULTY].total);\n break; \n case CS_C_GRADSTUD:\n instances_[i].num = _getRandomFromRange(R_GRADSTUD_FACULTY_MIN *\n instances_[CS_C_FACULTY].total,\n R_GRADSTUD_FACULTY_MAX *\n instances_[CS_C_FACULTY].total);\n break;\n case CS_C_TA:\n instances_[i].num = _getRandomFromRange(instances_[CS_C_GRADSTUD].total /\n R_GRADSTUD_TA_MAX,\n instances_[CS_C_GRADSTUD].total /\n R_GRADSTUD_TA_MIN);\n break;\n case CS_C_RA:\n instances_[i].num = _getRandomFromRange(instances_[CS_C_GRADSTUD].total /\n R_GRADSTUD_RA_MAX,\n instances_[CS_C_GRADSTUD].total /\n R_GRADSTUD_RA_MIN);\n break;\n case CS_C_RESEARCHGROUP:\n instances_[i].num = _getRandomFromRange(RESEARCHGROUP_MIN, RESEARCHGROUP_MAX);\n break;\n default:\n instances_[i].num = CLASS_INFO[i][INDEX_NUM];\n break;\n }\n instances_[i].total = instances_[i].num;\n subClass = i;\n while ( (superClass = CLASS_INFO[subClass][INDEX_SUPER]) != CS_C_NULL) {\n instances_[superClass].total += instances_[i].num;\n subClass = superClass;\n }\n }\n }",
"public void setFitness(int newFitness) {\n fitness = newFitness;\n }",
"public void setFitness(int f){\n this.fitness = f;\n }",
"public BigDecimal getScores() {\n return scores;\n }",
"public Float getScore() {\n return score;\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}",
"@Override\r\n\tpublic Double getModel_churn_score() {\n\t\treturn super.getModel_churn_score();\r\n\t}",
"@Override\n\tpublic void readScore() {\n\t\t\n\t}",
"@Override\n\tpublic void readScore() {\n\t\t\n\t}",
"@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}",
"public abstract Score[] getScore();",
"public float getHighestFitness() {\r\n\t\treturn highestScore;\r\n\t}",
"protected FitnessAssignmentProcess() {\r\n super();\r\n }",
"public int getScore(){return score;}",
"public int getScore(){return score;}",
"public ScoreReduction (Score score)\r\n {\r\n this.score = score;\r\n\r\n for (TreeNode pn : score.getPages()) {\r\n Page page = (Page) pn;\r\n pages.put(page.getIndex(), page);\r\n }\r\n }",
"public float getScore() {\n return score;\n }",
"public void setFitness(double fit) {\n fitness = fit;\n }",
"public void scoresForGameModes() {\r\n \tCalculateScore myScore = new CalculateScore();\r\n \tthis.score = myScore.giveScore();\r\n \tif (gamemode == 1) {\r\n \t\treturn;\r\n \t}\r\n \tif (gamemode ==2 ) {\r\n \t\tthis.score = this.score - (10 * (currentGraph.getCNumber() - set.size()));\r\n \t}\r\n \tif (gamemode ==3) {\r\n \t\tthis.score = this.score - (10 * (currentGraph.getCNumber() -set.size()));\r\n \t}\r\n }",
"public int getScore()\n {\n return score; \n }",
"public abstract double getConstraintFitness();",
"public int getScore()\n {\n return score;\n }",
"public int getScore ()\r\n {\r\n\treturn score;\r\n }",
"public void newScore()\n {\n score.clear();\n }",
"public int getScore(){\n return this.score;\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}",
"public double getScore() {\r\n return mScore;\r\n }",
"protected void adjustScore() {\r\n scoreMultiplier = (int) (mineField.getDensity() * 100);\r\n maxScore = scoreMultiplier * (int) Math.pow( mineField.getFieldLength(), 2.0 );\r\n }",
"public Double getScore() {\n return this.score;\n }",
"public Double getScore() {\n return this.score;\n }",
"public void evaluate() {\r\n Statistics.evaluate(this);\r\n }",
"@Override\n\tpublic void submitScoreGPGS(float score) {\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}",
"protected abstract boolean canGenerateScore();",
"public int getScore() {\r\n return score;\r\n }"
] | [
"0.6895301",
"0.64799273",
"0.6448649",
"0.63928694",
"0.6357533",
"0.62564677",
"0.6246511",
"0.6143793",
"0.61005354",
"0.6094871",
"0.60800415",
"0.6075528",
"0.60606384",
"0.60448545",
"0.60355514",
"0.6012825",
"0.59802234",
"0.59766597",
"0.59666973",
"0.5964829",
"0.59426534",
"0.59336126",
"0.591121",
"0.5908889",
"0.5858663",
"0.5848972",
"0.5847629",
"0.5835415",
"0.5817266",
"0.58136517",
"0.58085567",
"0.5805568",
"0.5779617",
"0.57625854",
"0.57546455",
"0.575095",
"0.57404774",
"0.57395905",
"0.5731175",
"0.57202196",
"0.5718546",
"0.57176256",
"0.57123417",
"0.5711636",
"0.5709803",
"0.5697636",
"0.56967413",
"0.5694076",
"0.5694076",
"0.56895554",
"0.56882685",
"0.5681742",
"0.56803954",
"0.5669283",
"0.5666389",
"0.5664088",
"0.5662294",
"0.56615704",
"0.5652207",
"0.5646693",
"0.56442505",
"0.563868",
"0.56305426",
"0.5629247",
"0.5605286",
"0.56021297",
"0.55939716",
"0.55939025",
"0.5579034",
"0.5576083",
"0.5570458",
"0.55567527",
"0.55557525",
"0.5553558",
"0.5553558",
"0.5549327",
"0.55446357",
"0.55420446",
"0.55391353",
"0.55322",
"0.55322",
"0.55217695",
"0.55199796",
"0.55144346",
"0.551092",
"0.550459",
"0.55039835",
"0.55006135",
"0.54973793",
"0.5496213",
"0.5495963",
"0.54926485",
"0.5490566",
"0.5489229",
"0.5481833",
"0.5481833",
"0.5467755",
"0.54666674",
"0.5459512",
"0.545776",
"0.54573137"
] | 0.0 | -1 |
Authenticate user response entity. | public ResponseEntity<?> authenticateUser(LoginRequest loginRequest){
if (loginRequest.getIsTeacher() == 1){
return teacherService.authenticateTeacher(loginRequest);
}else {
return studentService.authenticateStudent(loginRequest);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"AuthenticationResponseDTO authenticateUser(String email, String password);",
"public Result authenticate() {\r\n // 1. Define class to send JSON response back\r\n class Login {\r\n public Long id;\r\n public String gamerTag;\r\n public String token;\r\n\r\n public Login() {\r\n }\r\n }\r\n\r\n // 2. Read email and password from request()\r\n JsonNode request = request().body().asJson();\r\n String gamerTag = request.get(\"gamerTag\").asText();\r\n String password = request.get(\"password\").asText();\r\n\r\n // 3. Find user with given gamerTag\r\n Login ret = new Login();\r\n User user = User.gamerTagLogin(gamerTag);\r\n if (user == null) {\r\n return unauthorized(Json.toJson(ret));\r\n }\r\n // 4. Compare password.\r\n String sha256 = User.getSha256(request.get(\"password\").asText());\r\n if (sha256.equals(user.getPassword())) {\r\n // Success\r\n String authToken = generateAuthToken();\r\n user.setToken(authToken);\r\n Ebean.update(user);\r\n ret.token = authToken;\r\n ret.gamerTag = user.getGamerTag();\r\n ret.id = user.getId();\r\n return ok(Json.toJson(ret));\r\n\r\n }\r\n // 5. Unauthorized access\r\n return unauthorized();\r\n }",
"private void authenticateAction() {\n if (requestModel.getUsername().equals(\"superuser\")\n && requestModel.getPassword().equals(\"\")) {\n Collection<Webres> webres = getAllWebres();\n proceedWhenAuthenticated(new User(null, null, null, \"superuser\", \"\", null) {\n @Override\n public Collection<Webres> getAllowedResources() {\n return webres;\n }\n @Override\n public ActionController getDefaultController() {\n return ActionController.EMPLOYEES_SERVLET;\n }\n });\n return;\n }\n \n // try to authenticate against other credentials from the database\n Optional<User> u = getUserByCredentials(requestModel.getUsername(), requestModel.getPassword()); \n if (u.isPresent()) {\n proceedWhenAuthenticated(u.get());\n return;\n }\n \n // report authentication failed\n LOG.log(Level.INFO, \"{0} Authentication failed. Login: {1}, Password: {2}\", new Object[]{httpSession.getId(), requestModel.getUsername(), requestModel.getPassword()});\n SignInViewModel viewModel = new SignInViewModel(true);\n renderSignInView(viewModel);\n }",
"@Override\n protected void processAuthenticationResponse(HttpServletRequest request, HttpServletResponse response,\n AuthenticationContext context) throws AuthenticationFailedException {\n Map<String, String> authenticatorProperties = context.getAuthenticatorProperties();\n String apiKey = authenticatorProperties.get(Token2Constants.APIKEY);\n String userToken = request.getParameter(Token2Constants.CODE);\n String id = getUserId(context);\n String json = validateToken(Token2Constants.TOKEN2_VALIDATE_ENDPOINT, apiKey, id, Token2Constants.JSON_FORMAT,\n userToken);\n Map<String, Object> userClaims;\n userClaims = JSONUtils.parseJSON(json);\n if (userClaims != null) {\n String validation = String.valueOf(userClaims.get(Token2Constants.VALIDATION));\n if (validation.equals(\"true\")) {\n context.setSubject(AuthenticatedUser\n .createLocalAuthenticatedUserFromSubjectIdentifier(\"an authorised user\"));\n } else {\n throw new AuthenticationFailedException(\"Given hardware token has been expired or is not a valid token\");\n }\n } else {\n throw new AuthenticationFailedException(\"UserClaim object is null\");\n }\n }",
"@ApiOperation(value = \"Authenticate as a user\",\n response = AuthenticatedUser.class, responseContainer = \"The authenticated user details\",\n notes = \"User must be registered\")\n\n @ApiResponses(value = {\n @ApiResponse(code=200, message = \"The corresponding authenticated user details\",\n response = AuthenticatedUser.class, responseHeaders = {\n }),\n @ApiResponse(code = 400, message = \"Bad request\"),\n @ApiResponse(code = 401, message = \"Unauthorized since you are not authorized user\"),\n @ApiResponse(code = 403, message = \"Forbidden since you are not authorized to perform such action\"),\n @ApiResponse(code = 500, message = \"Internal Server Error\")\n })\n @Validated\n /**\n * This is the login API function '/auth/login'\n * @param authenticationRequest The {@link AuthenticationRequest} contains the new user data\n * @return The {@link ResponseEntity}\n */\n @PostMapping(\"/login\")\n public ResponseEntity login(@ApiParam(value = \"Login credentials\", required = true) @RequestBody AuthenticationRequest credentials)\n {\n AuthenticatedUser authenticatedUser = this.authenticatedUserService.login(credentials);\n\n if (authenticatedUser != null)\n {\n return ResponseEntity.ok(authenticatedUser);\n }\n\n return new ResponseEntity<>(\"Invalid credentials\",HttpStatus.UNAUTHORIZED);\n }",
"@Override\n public Uni<SessionResponseTO> authenticate(YValueTO yValue) {\n Uni<AValueTO> yvalueUni = authStateRepository.getYValueForToken(yValue.getToken());\n\n return yvalueUni.onItem().ifNull().failWith(StateNotFoundException::new)\n .and().uni(\n yvalueUni.onItem().produceUni(val -> userRepository.getKeyByUserId(val.getUserId().longValue())))\n .asTuple()\n .onItem().apply(tuple -> authUtils.checkYValue(\n tuple.getItem2(),\n tuple.getItem1().getX(),\n yValue.getY(),\n tuple.getItem1().getA(),\n 39769L * 50423\n )\n )\n .onItem().ifNull().failWith(UnauthorizedException::new)\n .onItem().produceUni(none -> authStateRepository.incrementSuccessTries(yValue.getToken()))\n .onItem().apply(s -> authUtils.isAuthorized(s, yValue.getToken()))\n .onItem().produceUni(session -> yvalueUni.onItem().produceUni(\n val -> handleCreatedSession(session, yValue.getToken(), val.getUserId().longValue())));\n }",
"private void respAuth() throws Exception {\n DataOutputStream dos = new DataOutputStream(os);\n dos.writeInt(1);\n dos.writeByte(Message.MSG_RESP_AUTH);\n if (haslogin) {\n dos.writeByte(Message.SUCCESS_AUTH);\n } else {\n dos.writeByte(Message.FAILED_AUTH);\n }\n }",
"@Override\n protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain,\n Authentication authResult) throws IOException, ServletException {\n ApiUser apiUser = this.apiUsersService.getApiUserByUserName(((User) authResult.getPrincipal()).getUsername());\n String jwtToken = Jwts.builder()\n .setSubject(((User) authResult.getPrincipal()).getUsername())\n .setExpiration(new Date(System.currentTimeMillis() + EXPIRATION_TIME))\n .claim(\"authorities\", ((User) authResult.getPrincipal()).getAuthorities().toArray())\n .claim(\"firstName\", apiUser.getFirstName())\n .claim(\"lastName\", apiUser.getLastName())\n .claim(\"apiUserId\", apiUser.getId())\n .signWith(SignatureAlgorithm.HS512, SECRET.getBytes(StandardCharsets.UTF_8))\n .compact();\n try {\n response.getWriter().write(TOKEN_PREFIX + jwtToken);\n this.eventsService.createEvent(new Event(\"Logged In\", apiUser,\n new Date(System.currentTimeMillis()).getTime(), false));\n } catch (Exception e) {\n authLogger.warn(e.getMessage());\n throw (e);\n }\n response.setStatus(HttpServletResponse.SC_ACCEPTED);\n }",
"private boolean authenticate (HttpRequest request, HttpResponse response) throws UnsupportedEncodingException\n\t{\n\t\tString[] requestSplit=request.getPath().split(\"/\",3);\n\t\tif(requestSplit.length<2)\n\t\t\treturn false;\n\t\tString serviceName=requestSplit[1];\n\t\tfinal int BASIC_PREFIX_LENGTH=\"BASIC \".length();\n\t\tString userPass=\"\";\n\t\tString username=\"\";\n\t\tString password=\"\";\n\t\t\n\t\t//Check for authentication information in header\n\t\tif(request.hasHeaderField(AUTHENTICATION_FIELD)\n\t\t\t\t&&(request.getHeaderField(AUTHENTICATION_FIELD).length()>BASIC_PREFIX_LENGTH))\n\t\t{\n\t\t\tuserPass=request.getHeaderField(AUTHENTICATION_FIELD).substring(BASIC_PREFIX_LENGTH);\n\t\t\tuserPass=new String(Base64.decode(userPass), \"UTF-8\");\n\t\t\tint separatorPos=userPass.indexOf(':');\n\t\t\t//get username and password\n\t\t\tusername=userPass.substring(0,separatorPos);\n\t\t\tpassword=userPass.substring(separatorPos+1);\n\t\t\t\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tlong userId;\n\t\t\t\tAgent userAgent;\n\t\t\t\t\n\t\t\t\tif ( username.matches (\"-?[0-9].*\") ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tuserId = Long.valueOf(username);\n\t\t\t\t\t} catch ( NumberFormatException e ) {\n\t\t\t\t\t\tthrow new L2pSecurityException (\"The given user does not contain a valid agent id!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tuserId = l2pNode.getAgentIdForLogin(username);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tuserAgent = l2pNode.getAgent(userId);\n\t\t\t\t\n\t\t\t\tif ( ! (userAgent instanceof PassphraseAgent ))\n\t\t\t\t\tthrow new L2pSecurityException (\"Agent is not passphrase protected!\");\n\t\t\t\t((PassphraseAgent)userAgent).unlockPrivateKey(password);\n\t\t\t\t_currentUserId=userId;\n\t\t\t\t\n\t\t\t\tif(!_userSessions.containsKey(userId))//if user not registered\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tMediator mediator = l2pNode.getOrRegisterLocalMediator(userAgent);\n\t\t\t\t\t_userSessions.put(userId, new UserSession(mediator));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t_userSessions.get(userId).updateServiceTime(serviceName,new Date().getTime());//update last access time for service\n\t\t\t\t\n\t\t\t\tconnector.logMessage(\"Login: \"+username);\n\t\t\t\tconnector.logMessage(\"Sessions: \"+Integer.toString(_userSessions.size()));\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}catch (AgentNotKnownException e) {\n\t\t\t\tsendUnauthorizedResponse(response, null, request.getRemoteAddress() + \": login denied for user \" + username);\n\t\t\t} catch (L2pSecurityException e) {\n\t\t\t\tsendUnauthorizedResponse( response, null, request.getRemoteAddress() + \": unauth access - prob. login problems\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t\n\t\t\t\tsendInternalErrorResponse(\n\t\t\t\t\t\tresponse, \n\t\t\t\t\t\t\"The server was unable to process your request because of an internal exception!\", \n\t\t\t\t\t\t\"Exception in processing create session request: \" + e);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresponse.setStatus ( HttpResponse.STATUS_BAD_REQUEST );\n\t\t\tresponse.setContentType( \"text/plain\" );\n\t\t\tresponse.print ( \"No authentication provided!\" );\n\t\t\tconnector.logError( \"No authentication provided!\" );\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n protected void successfulAuthentication(HttpServletRequest req,\n HttpServletResponse res,\n FilterChain chain,\n Authentication auth) throws IOException {\n\n log.info(\"Authentication succeed!\");\n UserDetailsImpl user = (UserDetailsImpl) auth.getPrincipal();\n Collection authorities = user.getAuthorities();\n String token = authService.generateOrGetToken(user);\n ReimsUser.Role role = authService.getRoleByString(authorities.iterator().next().toString());\n\n // retrieve informative response for frontend needs\n res.setHeader(HEADER_STRING, token);\n UserResponse userResponse = new UserResponse();\n userResponse.setUsername(user.getUsername());\n userResponse.setId(user.getUserId());\n userResponse.setRole(role);\n\n // Creating Object of ObjectMapper define in Jackson Api\n ObjectMapper objectMapper = new ObjectMapper();\n\n String userJsonString = objectMapper.writeValueAsString(userResponse);\n\n PrintWriter out = res.getWriter();\n res.setContentType(\"application/json\");\n res.setCharacterEncoding(\"UTF-8\");\n out.print(userJsonString);\n out.flush();\n\n Session session = Session.builder().token(token).username(user.getUsername()).role(role).build();\n authService.registerOrUpdateSession(session);\n }",
"public void authenticate(LoginRequest loginRequest) {\n\n }",
"@Override\r\n\tpublic Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows AuthenticationException {\r\n\tAppUser appUser = null;\r\n\r\n\ttry {\r\n\t\tappUser = new ObjectMapper().readValue(request.getInputStream(), AppUser.class);\r\n\t} catch (IOException e) {\r\n\t\tthrow new RuntimeException(e);\r\n\t}\r\n\r\n\t\tSystem.out.println(\"user one : \"+appUser.getUsername());\r\n\t\treturn authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(appUser.getUsername(), appUser.getPassword()));\r\n\t}",
"protected synchronized String authenticated() throws JSONException {\n JSONObject principal = new JSONObject()\n .put(FIELD_USERNAME, USER)\n .put(FIELD_PASSWORD, PASSWORD);\n if (token == null){ //Avoid authentication in each call\n token =\n given()\n .basePath(\"/\")\n .contentType(ContentType.JSON)\n .body(principal.toString())\n .when()\n .post(LOGIN)\n .then()\n .statusCode(200)\n .extract()\n .header(HEADER_AUTHORIZATION);\n\n }\n return token;\n }",
"private void handleAuthenticationResponse(JsonResponse response) {\n // Check if there is an authentication token in the response\n if (response.getAuthToken() != null && response.getAuthToken().length() > 0) {\n // Get the username\n final String username = this.mUsernameInput.getText().toString();\n // Add the Account and associate the authentication token\n final Account account = new Account(username, Constants.ACCOUNT_TYPE);\n this.mAccountManager.addAccountExplicitly(account, null, null);\n this.mAccountManager.setAuthToken(account, Constants.AUTH_TOKEN_TYPE, response.getAuthToken());\n // Finish\n final Intent intent = new Intent();\n intent.putExtra(AccountManager.KEY_ACCOUNT_NAME, username);\n intent.putExtra(AccountManager.KEY_ACCOUNT_TYPE, Constants.ACCOUNT_TYPE);\n this.setAccountAuthenticatorResult(intent.getExtras());\n this.setResult(RESULT_OK);\n this.finish();\n } else {\n // There was no authentication token\n List<String> errors = new ArrayList<String>();\n errors.add(this.getString(R.string.error_missing_auth_token));\n this.setMessages(errors);\n }\n }",
"LoggedUser authenticate(@Valid AccountCredentials credentials) throws IOException;",
"private Object authenticate(Invocation invocation, HttpServletRequest request,\r\n HttpServletResponse response) throws IOException {\r\n\r\n Object[] args = invocation.getArgs();\r\n if (args.length != 2) {\r\n throw new RuntimeException(\"The authenticate call must have two arguments\");\r\n }\r\n\r\n String user = (String) args[0];\r\n String password = (String) args[1];\r\n\r\n //We can make the remote call\r\n Object result = invoke(invocation);\r\n\r\n //If the authentification failed we finish the execution\r\n if (result instanceof LoginContext) {\r\n LoginContext loginContext = (LoginContext) result;\r\n if (loginContext == null) {\r\n throw new RuntimeException(\"Login failed!!\");\r\n }\r\n \r\n HttpSession session = request.getSession(false);\r\n String sessionId = session.getId();\r\n response.addHeader(\"jsessionid\", sessionId);\r\n\r\n \r\n session.setAttribute(User.USER_KEY, loginContext.getUser());\r\n\r\n session.setAttribute(RhSessionContext.CLIENT_ID, loginContext.getClient_id());\r\n session.setAttribute(RhSessionContext.ORG_ID, loginContext.getOrg_id());\r\n session.setAttribute(RhSessionContext.DUTY_ID, loginContext.getDutyId());\r\n\r\n Map attrs = loginContext.getAttributes();\r\n Set<Map.Entry> entries = attrs.entrySet();\r\n for (Map.Entry entry : entries) {\r\n session.setAttribute((String) entry.getKey(), entry.getValue());\r\n }\r\n\r\n // 创建login session\r\n LoginSession loginSession = new LoginSession();\r\n loginSession.setLoginName(loginContext.getUser().getUsername());\r\n loginSession.setIp(request.getRemoteHost());\r\n loginSession.setLoginDate(new Date(session.getCreationTime()));\r\n loginSession.setSessionId(session.getId());\r\n loginSession.setLiving(true);\r\n\r\n //Session hibernateSession = RhinoCtx.instance().getHibernate().getSession();\r\n try {\r\n \r\n ServiceBase serviceBase = (ServiceBase) ServiceFactory.getService(ServiceBase.NAME);\r\n //ServiceBase serviceBase = (ServiceBase) RhinoCtx.getBean(\"serviceBase\");\r\n //hibernateSession.beginTransaction();\r\n serviceBase.save(loginSession);\r\n //hibernateSession.getTransaction().commit();\r\n session.setAttribute(\"loginSession\", loginSession);\r\n\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n //hibernateSession.getTransaction().rollback();\r\n } finally {\r\n //hibernateSession.close();\r\n }\r\n }\r\n return result;\r\n }",
"EmployeeMaster authenticateUser(int employeeId, String password);",
"protected void onSuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, Authentication authResult) throws IOException {\n }",
"private static Object doAuth(Request req, Response res) {\n \n HashMap<String, String> response = new HashMap<>();\n\t\t \n String email = Jsoup.parse(req.queryParams(\"email\")).text();\n\t\t String password = Jsoup.parse(req.queryParams(\"password\")).text();\n\t\t\n res.type(Path.Web.JSON_TYPE);\n \t\t\n\t\t\n\t\tif(email != null && !email.isEmpty() && password != null && !password.isEmpty() ) {\n \n authenticate = new Authenticate(password);\n\t\t\t//note that the server obj has been created during call to login()\n\t\t\tString M2 = authenticate.getM2(server);\n\t\t\t\n if(M2 != null || !M2.isEmpty()) {\n \n \n\t\t\tSession session = req.session(true);\n\t\t\tsession.maxInactiveInterval(Path.Web.SESSION_TIMEOUT);\n\t\t\tUser user = UserController.getUserByEmail(email);\n\t\t\tsession.attribute(Path.Web.ATTR_USER_NAME, user.getUsername());\n session.attribute(Path.Web.ATTR_USER_ID, user.getId().toString()); //saves the id as String\n\t\t\tsession.attribute(Path.Web.AUTH_STATUS, authenticate.authenticated);\n\t\t\tsession.attribute(Path.Web.ATTR_EMAIL, user.getEmail());\n logger.info(user.toString() + \" Has Logged In Successfully\");\n \n response.put(\"M2\", M2);\n response.put(\"code\", \"200\");\n response.put(\"status\", \"success\");\n response.put(\"target\", Path.Web.DASHBOARD);\n \n String respjson = gson.toJson(response);\n logger.info(\"Final response sent By doAuth to client = \" + respjson);\n res.status(200);\n return respjson;\n }\n\t\t\t\t\n\t\t} \n \n res.status(401);\n response.put(\"code\", \"401\");\n response.put(\"status\", \"Error! Invalid Login Credentials\");\n \n return gson.toJson(response);\n }",
"@Override\n public Authentication attemptAuthentication(\n HttpServletRequest request,\n HttpServletResponse response) throws AuthenticationException {\n\n try {\n // 1. pobieramy dane uzytkownika ktory chce sie zalogowac\n AuthenticationUser user = new ObjectMapper().readValue(request.getInputStream(), AuthenticationUser.class);\n\n // 2. dokonujemy proby logowania\n return authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(\n user.getUsername(),\n user.getPassword(),\n Collections.emptyList()\n ));\n } catch ( Exception e ) {\n throw new AppException(e.getMessage());\n }\n\n }",
"@Override\n protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response,\n FilterChain chain, Authentication authentication) throws IOException, ServletException {\n String token = tokenAuthenticationService.addAuthentication(response, authentication);\n\n User user = new User();\n user.setEmail(authentication.getName());\n user.setRoles((List<GrantedAuthority>) authentication.getAuthorities());\n response.setContentType(MediaType.APPLICATION_JSON_VALUE);\n ObjectMapper mapper = new ObjectMapper();\n mapper.writeValue(response.getWriter(),user);\n\n\n // Add the authentication to the Security context\n SecurityContextHolder.getContext().setAuthentication(authentication);\n }",
"@POST\n @Path(\"/UserAuth\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response authenticateUser(final LoginRequest loginRequest) {\n final String methodName = \"authenticateUser\";\n log.entering(CLASS_NAME, methodName);\n Status status = Response.Status.OK;\n loginRequest.setImsAction(WipsConstant.WIPS_LOGIN_ACTION);\n final PendingApprovalResponse pendingApprovalResponse =\n this.wipsLoginBF.authenticateUser(loginRequest);\n if (pendingApprovalResponse.isValidUser()) {\n final String lterm =\n createUserSessionDetailsIntoCache(loginRequest.getRacfId(),\n pendingApprovalResponse);\n pendingApprovalResponse.setLtermToken(WipsUtil.encrpyt(lterm));\n } else {\n status = Response.Status.BAD_REQUEST;\n }\n log.exiting(CLASS_NAME, methodName);\n return buildResponse(pendingApprovalResponse, status);\n }",
"int authenticateUser(IDAOSession session, String userName, String password);",
"public ResponseEntity<OAuth2AccessToken> authenticate(HttpServletRequest request, HttpServletResponse response,\n Map<String, String> params) {\n try {\n String username = params.get(\"username\");\n String password = params.get(\"password\");\n boolean rememberMe = Boolean.valueOf(params.get(\"rememberMe\"));\n OAuth2AccessToken accessToken = authorizationClient.sendPasswordGrant(username, password);\n OAuth2Cookies cookies = new OAuth2Cookies();\n cookieHelper.createCookies(request, accessToken, rememberMe, cookies);\n cookies.addCookiesTo(response);\n if (log.isDebugEnabled()) {\n log.debug(\"successfully authenticated user {}\", params.get(\"username\"));\n }\n return ResponseEntity.ok(accessToken);\n } catch (Exception ex) {\n log.error(\"failed to get OAuth2 tokens from UAA\", ex);\n throw ex;\n }\n }",
"boolean authenticate(PersonAuthenticateDTO p);",
"@Override\n public void onResponse(String response) {\n editor.putBoolean(\"credentials_validity\", true);\n editor.putInt(\"last_login_method\", Constants.USER_PASS_LOGIN);\n editor.commit();\n saveCredentials(email, password);\n onLoginFinished(false);\n }",
"private AuthenticatorFlowStatus initiateAuthRequest(HttpServletResponse response, AuthenticationContext context,\n String errorMessage)\n throws AuthenticationFailedException {\n\n // Find the authenticated user.\n AuthenticatedUser authenticatedUser = getUser(context);\n\n if (authenticatedUser == null) {\n throw new AuthenticationFailedException(\"Authentication failed!. \" +\n \"Cannot proceed further without identifying the user\");\n }\n\n String tenantDomain = authenticatedUser.getTenantDomain();\n String username = authenticatedUser.getAuthenticatedSubjectIdentifier();\n String tenantAwareUsername = MultitenantUtils.getTenantAwareUsername(username);\n\n /*\n In here we do the redirection to the termsAndConditionForm.jsp page.\n If you need to do any api calls and pass any information to the custom page you can do it here and pass\n them as query parameters or else best way is to do the api call using a javascript function within the\n custom page.\n */\n\n try {\n String loginPage = ConfigurationFacade.getInstance().getAuthenticationEndpointURL().\n replace(\"login.do\", \"termsAndConditionForm.jsp\");\n String queryParams = FrameworkUtils.getQueryStringWithFrameworkContextId(context.getQueryParams(),\n context.getCallerSessionKey(), context.getContextIdentifier());\n String retryParam = \"\";\n if (context.isRetrying()) {\n retryParam = \"&authFailure=true\" +\n \"&authFailureMsg=\" + URLEncoder.encode(errorMessage, StandardCharsets.UTF_8.name());\n }\n String fullyQualifiedUsername = UserCoreUtil.addTenantDomainToEntry(tenantAwareUsername,\n tenantDomain);\n String encodedUrl =\n (loginPage + (\"?\" + queryParams\n + \"&username=\" + URLEncoder.encode(fullyQualifiedUsername, StandardCharsets.UTF_8.name())))\n + \"&authenticators=\" + getName() + \":\" + AUTHENTICATOR_TYPE\n + retryParam;\n response.sendRedirect(encodedUrl);\n } catch (IOException e) {\n throw new AuthenticationFailedException(e.getMessage(), e);\n }\n context.setCurrentAuthenticator(getName());\n context.setRetrying(false);\n return AuthenticatorFlowStatus.INCOMPLETE;\n\n }",
"@PostMapping(\"/login\") //method handles POST requests with this path (login)\n public ResponseEntity<?> authenticateUser(@Valid @RequestBody LoginRequest loginRequest) {\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(loginRequest.getUsername(), loginRequest.getPassword()));\n\n // update the SecurityContext\n SecurityContextHolder.getContext().setAuthentication(authentication);\n\n // generate JWT token\n String jwt = jwtUtils.generateJwtToken(authentication);\n\n // get UserDetails\n UserDetailsImpl userDetails = (UserDetailsImpl) authentication.getPrincipal();\n List<String> roles = userDetails.getAuthorities().stream()\n .map(GrantedAuthority::getAuthority)\n .collect(Collectors.toList());\n\n // return response with JWT token and UserDetails\n return ResponseEntity.ok(new JwtResponse(jwt,\n userDetails.getId(),\n userDetails.getUsername(),\n userDetails.getEmail(),\n roles,\n userDetails.getCategory()\n ));\n }",
"public User doAuthentication(String account, String password);",
"public void authenticate() {\n LOGGER.info(\"Authenticating user: {}\", this.name);\n WebSession result = null;\n try {\n result =\n getContext()\n .getAuthenticationMethod()\n .authenticate(\n getContext().getSessionManagementMethod(),\n this.authenticationCredentials,\n this);\n } catch (UnsupportedAuthenticationCredentialsException e) {\n LOGGER.error(\"User does not have the expected type of credentials:\", e);\n } catch (Exception e) {\n LOGGER.error(\"An error occurred while authenticating:\", e);\n return;\n }\n // no issues appear if a simultaneous call to #queueAuthentication() is made\n synchronized (this) {\n this.getAuthenticationState().setLastSuccessfulAuthTime(System.currentTimeMillis());\n this.authenticatedSession = result;\n }\n }",
"UserPermissions authenticate (Request request);",
"AuthenticationToken authenticate(String username, CharSequence password) throws Exception;",
"public UserResponse authenticate(String token) {\n ObjectId id = new ObjectId(token);\n MongoCollection<Document> users = database.getCollection(\"users\");\n FindIterable<Document> documents = users.find(Filters.and(\n Filters.eq(UserMongo.objectId, id),\n Filters.eq(UserMongo.isActive, true),\n Filters.eq(UserMongo.isAccept, true)));\n if (documents.iterator().hasNext()) {\n Document next = documents.iterator().next();\n return convertDocumentToUserResponse(next);\n }\n return null;\n }",
"public interface LoginResponse {\n\tpublic static final String IS_VALID = \"isValid\";\n\tpublic static final String ERROR_CODE = \"errorCode\";\n\tpublic static final String ERROR_MESSAGE = \"errorMessage\";\n\n\tpublic boolean isValid();\n\tpublic String authToken();\n\tpublic int errorCode();\n\tpublic String errorMessage();\n\tpublic User user();\n}",
"User authenticate(String headerToken) throws AuthenticationException;",
"@PostMapping(Constants.URI_API_AUTH)\n\tpublic ResponseEntity<?> authenticateUser(@RequestParam(required=true) String username,\n\t\t\t\t\t\t\t\t\t\t\t @RequestParam(required=true) String password){\n\t\t\n\t\tLOG.debug(\"API Authenticate User: User '\" + username + \"'\");\n\t\t\n\t\tAuthenticationToken authToken = new AuthenticationToken(userService.authenticateUser(username, password));\n\t\t\n\t\treturn ResponseEntity.ok(authToken);\n\t}",
"@Override\n public Authentication attemptAuthentication(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)\n throws AuthenticationException, IOException, ServletException {\n AccountCredentials credentials = new ObjectMapper().readValue(httpServletRequest.getInputStream(), AccountCredentials.class);\n UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(credentials.getUsername(), credentials.getPassword());\n return getAuthenticationManager().authenticate(token);\n }",
"@Override\n\tprotected void successfulAuthentication(HttpServletRequest request,\n\t\t\tHttpServletResponse response, FilterChain chain,\n\t\t\tAuthentication auth) throws IOException, ServletException {\n\t\t\n\t\tString userName=((User)auth.getPrincipal()).getUsername();\n\t\tUserService userService =(UserService)SpringApplicationContext.getBean(\"userServiceImpl\");\n \n\t UserDto userDto = userService.getUser(userName);\n\t\tString token=Jwts.builder()\n\t\t\t\t.setSubject(userName)\n\t\t\t\t.claim(\"id\", userDto.getUserId())\n\t .claim(\"name\", userDto.getFirstName() + \" \" + userDto.getLastName())\n\t\t\t\t.setExpiration(new Date(System.currentTimeMillis()+SecurityConstants.EXPIRATION_TIME))\n\t\t\t\t.signWith(SignatureAlgorithm.HS512,SecurityConstants.TOKEN_SECRET)\n\t\t\t\t.compact();\n\t\tresponse.addHeader(SecurityConstants.HEADER_STRING, SecurityConstants.TOKEN_PREFIX+token);\n\t\tresponse.addHeader(\"user_id\",userService.getUser(userName).getUserId());\n response.getWriter().write(\"{\\\"token\\\": \\\"\" + token + \"\\\", \\\"id\\\": \\\"\"+ userDto.getUserId() + \"\\\"}\");\n System.out.println(response.getHeader(SecurityConstants.HEADER_STRING));\n\n\t}",
"@POST\n @Path(\"/users/authenticate\")\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n public Response authenticateUser(User user) {\n\n final String token = authService.authenticateUser(user.getEmail(), user.getPassword());\n final AuthServiceResult result;\n final String json;\n\n if (token == null) {\n result = AuthServiceResult.INCORRECT_INFORMATION;\n json = result.getJSON();\n } else {\n result = AuthServiceResult.OK;\n json = String.format(\"{\\\"token\\\":\\\"%s\\\"}\", token);\n }\n\n return Response\n .status(result.getStatus())\n .entity(json)\n .build();\n }",
"User authenticate(String username, String password);",
"public void onAuthenticateUserLogged(HealthUserContext userContext, LoginContext loginContext,\n\t\t\tLoginResult loginResult, IdentificationHandler idHandler, BusinessHandler bizHandler)\n\t\t\tthrows Exception {\n\t\tSecUser secUser = loginResult.getLoginContext().getLoginTarget().getSecUser();\n\t\tMultipleAccessKey key = new MultipleAccessKey();\n\t\tkey.put(UserApp.SEC_USER_PROPERTY, secUser.getId());\n\t\tkey.put(UserApp.OBJECT_TYPE_PROPERTY, Student.INTERNAL_TYPE);\n\t\tSmartList<UserApp> userApps = userContext.getDAOGroup().getUserAppDAO().findUserAppWithKey(key, EO);\n\t\tif (userApps == null || userApps.isEmpty()) {\n\t\t\tthrow new Exception(\"您的账号未关联销售人员,请联系客服处理账号异常.\");\n\t\t}\n\t\tUserApp userApp = userApps.first();\n\t\tuserApp.setSecUser(secUser);\n\t\tloginResult.getLoginContext().getLoginTarget().setUserApp(userApp);\n\t}",
"@Override\n protected void afterAuthenticating() {\n }",
"public boolean authenticateUser() {\r\n try {\r\n \r\n firstServerMessage();\r\n sendKeys();\r\n sessionKeyMsg();\r\n \r\n \r\n \r\n \treturn true;\r\n }\r\n \r\n catch(Exception ioe){\r\n System.out.println(\"Terminating session with Acct#: \" + currAcct.getNumber());\r\n //ioe.printStackTrace();\r\n return false;\r\n }\r\n \r\n }",
"@Override\n public void handle(\n AuthzTrans trans,\n HttpServletRequest req,\n HttpServletResponse resp) throws Exception {\n Result<Date> r = context.doesCredentialMatch(trans, req, resp);\n if (r.isOK()) {\n resp.setStatus(HttpStatus.OK_200);\n } else {\n // For Security, we don't give any info out on why failed, other than forbidden\n // Can't do \"401\", because that is on the call itself\n // 403 Implies you MAY NOT Ask.\n resp.setStatus(HttpStatus.NOT_ACCEPTABLE_406);\n }\n }",
"public abstract boolean authenticate(String userid, String password) throws\n YAuthenticationException;",
"protected Response login() {\n return login(\"\");\n }",
"@PreAuthorize(\"permitAll()\")\n @RequestMapping(\n value = \"/users/auth\",\n method = RequestMethod.POST\n )\n public ResponseEntity<AuthResponse> authenticate(@RequestParam(value = \"username\") String username, @RequestParam(value = \"password\") String password) {\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(username, password)\n );\n\n SecurityContextHolder.getContext().setAuthentication(authentication);\n final UserDetails userDetails = userDetailsService.loadUserByUsername(username);\n final String token = tokenUtils.generateToken(userDetails);\n\n return ResponseEntity.ok(new AuthResponse(token));\n }",
"@Test\n\tpublic void testAuthenticateUserOK() {\n\t\tgiven(userRepository.findByLogin(anyString())).willReturn(new UserBuilder(USER_RETURNED).build());\n\n\t\t// make the service call\n\t\ttry {\n\t\t\tassertThat(authService.authenticateUser(USER)).isEqualTo(USER_RETURNED);\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Error testing authenticateUser: \" + e.getMessage());\n\t\t}\t\n\t}",
"public void authenticateUser() {\n\n String username = viewUsername.getText().toString();\n String password = viewPassword.getText().toString();\n\n Timber.v(\"authenticateUser called username: \" + username);\n activity.getOnboardingViewModel().authenticateUser(username, password);\n }",
"@Override\n public JsonResponse duringAuthentication(String... params) {\n try {\n final String username = params[0];\n final String password = params[1];\n return RequestHandler.authenticate(this.getApplicationContext(), username, password);\n } catch (IOException e) {\n return null;\n }\n }",
"private Boolean authorize() {\n\n return Session.getInstance().login(user.getText(), password.getText());\n }",
"private void userIsAuthenticated() {\n this.setResult(RC_USER_LOGGED_IN, null);\n this.finish();\n }",
"RequestResult loginRequest() throws Exception;",
"@PostMapping(\"/signin\")\n public ResponseEntity<?> authenticateUser(@RequestBody LoginRequest loginRequest) {\n return userService.authenticateUser(loginRequest);\n }",
"@Override\n public void authenticate() throws IOException, BadAccessIdOrKeyException {\n try{\n HttpPost post = new HttpPost(Constants.FRGXAPI_TOKEN);\n List<NameValuePair> params = new ArrayList<>();\n params.add(new BasicNameValuePair(\"grant_type\", \"apiAccessKey\"));\n params.add(new BasicNameValuePair(\"apiAccessId\", accessId));\n params.add(new BasicNameValuePair(\"apiAccessKey\", accessKey));\n post.setEntity(new UrlEncodedFormEntity(params, \"UTF-8\"));\n\n HttpResponse response = client.execute(post);\n String a = response.getStatusLine().toString();\n\n if(a.equals(\"HTTP/1.1 400 Bad Request\")){\n throw (new BadAccessIdOrKeyException(\"Bad Access Id Or Key\"));\n }\n HttpEntity entity = response.getEntity();\n String responseString = EntityUtils.toString(response.getEntity());\n\n JsonParser jsonParser = new JsonParser();\n JsonObject jo = (JsonObject) jsonParser.parse(responseString);\n if(jo.get(\"access_token\") == null){\n throw new NullResponseException(\"The Access Token you get is null.\");\n }\n String accessToken = jo.get(\"access_token\").getAsString();\n List<Header> headers = new ArrayList<>();\n headers.add(new BasicHeader(HttpHeaders.CONTENT_TYPE, \"application/json\"));\n headers.add(new BasicHeader(\"Authorization\", \"Bearer \" + accessToken));\n\n client = HttpClients.custom().setDefaultHeaders(headers).build();\n } catch (NullResponseException e) {\n System.out.println(e.getMsg());\n }\n }",
"default String authenticate(ApplicationUser user, MockMvc mockMvc, ObjectMapper objectMapper) throws Exception {\n MvcResult mvcResult = mockMvc.perform(\n post(AUTH_BASE_URI)\n .contentType(MediaType.APPLICATION_JSON_VALUE)\n .content(\n objectMapper.writeValueAsString(new UserLoginDto(user.getEmail(), user.getPassword()))\n )\n ).andReturn();\n MockHttpServletResponse response = mvcResult.getResponse();\n return response.getContentAsString();\n }",
"@Override\n\tpublic Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows AuthenticationException, IOException, ServletException {\n\t\tString url = request.getServletPath();\n\t\tString header = request.getHeader(AUTHORIZATION);\n\t\tlogger.debug(\"[authorized] request header : \" + header + \",request url :\" + url);\n\t\tif (header != null) {\n\t\t\tfinal int space = header.indexOf(' ');\n\t\t\tif (space > 0) {\n\t\t\t\tfinal String method = header.substring(0, space);\n\t\t\t\tif (PREFIX.equalsIgnoreCase(method)) {\n\t\t\t\t\tfinal String credentials = header.substring(space + 1);\n\t\t\t\t\tAbstractAuthenticationToken userAuthenticationToken = authUserByToken(credentials);\n\t\t\t\t\tif (userAuthenticationToken == null) {\n\t\t\t\t\t\tlogger.error(\"[unauthorized] access token is empty in header ,request header : \"\n\t\t\t\t\t\t\t\t+ header + \",request url :\" + url);\n\t\t\t\t\t\tthrow new AuthTokenException(\"2.404\",\n\t\t\t\t\t\t\t\tMessageFormat.format(\"Error | {0}\", \"Bad Token\"));\n\t\t\t\t\t}\n\t\t\t\t\treturn this.getAuthenticationManager().authenticate(userAuthenticationToken);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new AnonymousAuthenticationToken(UUID.randomUUID().toString(), \"anonymousUser\",\n\t\t\t\tAuthorityUtils.createAuthorityList(\"ROLE_ANONYMOUS\"));\n\t}",
"public void authenticateUser()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tint index=loginattempt();\r\n\t}",
"@RequestMapping(value = \"/authenticate\", method = RequestMethod.POST)\r\n public ResponseEntity<User> login(@RequestBody User user) {\r\n\t\tlogger.info(\"Authenticate user:\"+ user);\r\n\t\t\r\n\t\t// logger.debug(\"users=\"+userService.findAllUsers() );\r\n\t\t\r\n\t\tUser dbUser = userService.findByUserName( user.getUsername() );\r\n\r\n\t\tif (dbUser != null) {\r\n\t\t\tlogger.debug(\"Start authenticate User with username [{}].\", user.getUsername() );\r\n\t\t\t//logger.debug(\"dbUser.getPassword() = \" + dbUser.getPassword() );\r\n\t\t\t//logger.debug(\"user.getPassword() = \" + user.getPassword() );\r\n\t\t\tif ( dbUser.getPassword() != null ) {\r\n\t\t\t\t//String encryptedPasword = bCryptPasswordEncoder.encode( user.getPassword() );\r\n\t\t\t\t//logger.debug(\"encryptedPasword = \" + encryptedPasword );\r\n\t\t\t\tif ( bCryptPasswordEncoder.matches( user.getPassword(), dbUser.getPassword())) {\t\t\t\t\r\n\t\t\t\t//if ( dbUser.getPassword().equals( encryptedPasword ) ) { // this won't work, not same\r\n\t\t\t\t\tlogger.info(\"User with username {} authenticated.\", user.getUsername() );\r\n\t\t\t\t\treturn new ResponseEntity<User>(dbUser, HttpStatus.OK);\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\tlogger.warn(\"Unable to authenticate. Username [{}] or password incorrect.\", user.getUsername() );\r\n\t\t// json client side not handled status 401 with message pass\r\n\t\treturn new ResponseEntity(new CustomErrorType(\"Unable to authenticate. Username or password incorrect.\"),\r\n\t\t\t\tHttpStatus.UNAUTHORIZED);\r\n\t\t\r\n\t\t//return new ResponseEntity(new CustomErrorType(\"Unable to authenticate. Username or password incorrect.\"),\r\n\t\t//\t\tHttpStatus.OK);\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void successfulAuthentication(HttpServletRequest req,\n\t\t\tHttpServletResponse res, FilterChain chain, Authentication auth)\n\t\t\tthrows IOException, ServletException {\n\t\tString userName = ((User) auth.getPrincipal()).getUsername();\n\n\t\tString token = Jwts\n\t\t\t\t.builder()\n\t\t\t\t.setSubject(userName)\n\t\t\t\t.setExpiration(\n\t\t\t\t\t\tnew Date(System.currentTimeMillis()\n\t\t\t\t\t\t\t\t+ SecurityConstants.EXPIRATION_TIME))\n\t\t\t\t.signWith(SignatureAlgorithm.HS512,\n\t\t\t\t\t\tSecurityConstants.getTokenSecret()).compact();\n\n\t\tUserService userService = (UserService) SpringApplicationContext\n\t\t\t\t.getBean(\"userServiceImpl\");\n\t\tUserDto userDto = userService.getUser(userName);\n\n\t\tres.addHeader(SecurityConstants.HEADER_STRING,\n\t\t\t\tSecurityConstants.TOKEN_PREFIX + token);\n\t\tres.addHeader(\"userID\", userDto.getUserId());\n\t}",
"@Override\n public Response login(User user) {\n\n Response response = new Response();\n User foundUser = userDao.login(user);\n if(foundUser != null &&\n foundUser.getUserId() != null &&\n bCryptPasswordEncoder.matches(user.getPassword(), foundUser.getPassword())) {\n UserDetails userDetails = loadUserByUsername(foundUser.getEmail());\n response.setToken(jwtUtil.generateToken(userDetails));\n response.setUsername(foundUser.getUsername());\n\n return response;\n }\n return null;\n }",
"public AuthenticationSuccessResponse getAuthenticationSuccessResponse() {\n log.trace(\"Entering & Leaving\");\n return authSuccessResponse;\n }",
"public AuthToken loginUser(){\n return null;\n }",
"@Override\n\t\t\t\t\tpublic void commence(HttpServletRequest request, HttpServletResponse response,\n\t\t\t\t\t\t\torg.springframework.security.core.AuthenticationException authException)\n\t\t\t\t\t\t\tthrows IOException, ServletException {\n\t\t\t\t\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\t\t\t\t\t\tresponse.setContentType(\"application/json\");\n\t\t\t\t\t\tresponse.getWriter()\n\t\t\t\t\t\t\t\t.println(new ObjectMapper().createObjectNode().put(\"msg\", \"请先登录!\").toString());\n\t\t\t\t\t\tresponse.getWriter().flush();\n\t\t\t\t\t\tresponse.getWriter().close();\n\t\t\t\t\t}",
"@Override\r\n protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authResult) \r\n\t throws IOException, ServletException {\r\n SecurityContext context = SecurityContextHolder.createEmptyContext();\r\n context.setAuthentication(authResult);\r\n SecurityContextHolder.setContext(context);\r\n chain.doFilter(request, response);\r\n }",
"@Override\n public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException {\n response.setContentType(\"application/json;charset=utf-8\");\n PrintWriter out = response.getWriter();\n\n Result result = new Result(null,false,\"请登录!\");\n\n out.write(JSONObject.toJSONString(result));\n out.flush();\n out.close();\n }",
"public void authenticateUser(String username, String password) {\n\n // Need to validate credentials\n // For now just authenticate the user\n\n AuthenticateUserPayload payload = new\n AuthenticateUserPayload(username, password);\n\n Timber.v(\"authenticateUser called username: \" + username);\n Observable<AuthenticateUserResponse> respObserv = ApiUtility.getApiService().authenticateUser(payload);\n respObserv.subscribeOn(Schedulers.computation())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Observer<AuthenticateUserResponse>() {\n @Override\n public void onSubscribe(@NonNull Disposable d) { }\n\n @Override\n public void onNext(@NonNull AuthenticateUserResponse authenticateUserResponse) {\n Timber.v(\"on Next() called \" + authenticateUserResponse.getMessage());\n authUserResponseObservable.onNext(authenticateUserResponse);\n }\n\n @Override\n public void onError(@NonNull Throwable e) {\n Timber.v(\"on Error() called message: \" + e.getMessage());\n Timber.v(\"on Error() called cause: \" + e.getCause());\n authUserError(e);\n }\n\n @Override\n public void onComplete() { }\n });\n }",
"@CrossOrigin(origins = AppConstants.CORS)\n\t@RequestMapping(value = {UrlConstants.API_LOGIN_AUTHENTICATE+\"org\"}, method = RequestMethod.POST)\n\tpublic @ResponseBody ResponseDTO authenticate(@RequestBody LoginDTO loginDTO, BindingResult result) {\n\t\tResponseDTO responseDTO = null;\n\t\ttry { \n\t\t\tif(result.hasErrors()){\n\t\t\t\tresponseDTO = new ResponseDTO();\n\t\t\t\tresponseDTO.setErrorCode(300);\n\t\t\t\tresponseDTO = ResponseWriter.writeResponse(responseDTO);\n\t\t\t} else {\n\t\t\t\t//responseDTO = loginService.authenticate(loginDTO);\n\t\t\t\tlogger.info(\"here\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tresponseDTO = ResponseWriter.writeResponse(e.getCause(), e);\n\t\t\tlogger.error(\"error\",e);\n\t\t} \n\t\treturn responseDTO;\n\t}",
"public JavaaccountModel authenticateUser(JavaaccountModel oJavaaccountModel)\n\t {\n\t\t try\n\t\t {\n\t\t\t//create a new session and begin the transaction\n\t\t Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n\t\t\tTransaction hibernateTransaction = hibernateSession.beginTransaction();\n\t\t\t\n\t\t\t//create the query in HQL language\n\t\t\tString strQuery = String.format(\"FROM JavaaccountModel WHERE (username = '%s' AND password = '%s')\", oJavaaccountModel.getusername() , oJavaaccountModel.getpassword());\n\t\t\tQuery hibernateQuery = hibernateSession.createQuery(strQuery);\n\t\t\t\n\t\t\toJavaaccountModel = null;\n\t\t\t\n\t\t\t//retrieve the unique result, if there is a result at all\n\t\t\toJavaaccountModel = (JavaaccountModel) hibernateQuery.uniqueResult();\n\t\t\t\n\t\t\tif(oJavaaccountModel == null)\n\t\t\t{\n\t \t\tthrow new WebApplicationException(Response.Status.UNAUTHORIZED);\n\t\t\t}\n\t\t\t\n\t\t\t//commit and terminate the session\n\t\t\thibernateTransaction.commit();\n\t\t\thibernateSession.close();\n\t\t\t\n\t\t\t//return the JavaaccountModel of the authenticated user, or null if authentication failed\n\t\t\treturn oJavaaccountModel ;\n\t\t}\n\t\tcatch (HibernateException exception)\n\t\t{\n\t\t\tSystem.out.println(exception.getCause());\n\n\t\t\tResponseBuilderImpl builder = new ResponseBuilderImpl();\n\t\t\tbuilder.status(Response.Status.BAD_REQUEST);\n\t\t\tbuilder.entity(String.format(\"%s\",exception.getCause()));\n\t\t\tResponse response = builder.build();\n\t\t\tthrow new WebApplicationException(response);\n\t\t}\n\t }",
"@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }",
"protected boolean authenticate() {\n \tif (mConfig == null) {\n \t\tmConfig = getConfig();\n \t}\n \tString keys[] = getKeys();\n \tif (keys != null) {\n\t mConfig = api.authenticateToken(keys[0], keys[1], mConfig);\n\t if (mConfig != null) {\n\t return true;\n\t }\n \t}\n \tshowToast(\"Failed user authentication for stored login tokens.\");\n \tclearKeys();\n \tsetLoggedIn(false);\n \treturn false;\n }",
"public User Authenticate(String email, String password) {\n User user = new User();\n\n TokenGenerationResult result = getAuthService().GetTokenForUser(email,password);\n\n if (result.TokenGenerationState.equals(\"0\")) {\n user.setSuccessful(false);\n user.setErrorMessage(\"User not found\");\n return user;\n }\n else if (result.TokenGenerationState.equals(\"1\"))\n {\n user.setSuccessful(false);\n user.setErrorMessage(\"invalid password\");\n return user;\n }\n\n user.setSuccessful(true);\n user.setFirstName(email);\n user.setLastName(\"email\");\n user.setUsername(email);\n user.setSessionToken(result.GeneratedToken);\n\n return user;\n }",
"public void handleAuthenticationRequest(RoutingContext context) {\n\n final HttpServerRequest request = context.request();\n\n final String basicAuthentication = request.getHeader(AUTHORIZATION_HEADER);\n\n try {\n\n final String[] auth =\n BasicAuthEncoder.decodeBasicAuthentication(basicAuthentication).split(\":\");\n\n if (auth.length < 2) {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, HTML_CONTENT_TYPE)\n .end(Json.encode(Errors.CREDENTIAL_ERROR.error()));\n\n } else {\n\n final Credential credential = new Credential(auth[0], auth[1]);\n\n authenticationService.authenticate(credential, user -> {\n\n if (null != user) {\n\n tokenService.generateToken(user, token -> {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, HTML_CONTENT_TYPE).end(token);\n\n }, err -> {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, JSON_CONTENT_TYPE)\n .end(Json.encode(Errors.INTERNAL_ERROR.error()));\n\n });\n\n } else {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, JSON_CONTENT_TYPE)\n .end(Json.encode(Errors.CREDENTIAL_ERROR.error()));\n\n }\n\n }, err -> {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, JSON_CONTENT_TYPE)\n .end(Json.encode(err.toError()));\n\n });\n\n\n }\n\n } catch (final Exception e) {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, JSON_CONTENT_TYPE)\n .end(Json.encode(Errors.INVALID_AUTHENTICATION_TOKEN.error()));\n\n\n }\n\n\n\n }",
"@Override\n public void onResponse(JSONObject response) {\n editor.putBoolean(\"credentials_validity\", true);\n editor.putInt(\"last_login_method\", Constants.FACEBOOK_LOGIN);\n editor.commit();\n onLoginFinished(false);\n }",
"@Override\n public void onPostAuthentication(JsonResponse response) {\n if (response != null) {\n if (response.isError()) {\n // Show messages\n this.setMessages(response.getMessages());\n } else {\n this.handleAuthenticationResponse(response);\n }\n }\n // Hide the progress indicator\n this.mProgressDialog.hide();\n }",
"@Override\n public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException {\n response.setStatus(HttpStatus.UNAUTHORIZED.value());\n response.setContentType(MediaType.APPLICATION_JSON_UTF8_VALUE);\n response.addHeader(AUTHENTICATE_HEADER_STRING, AUTHENTICATION_SCHEME + REALM_PREFIX + \"\\\"Access to the Sign-in api\\\"\" + \", charset=\\\"UTF-8\\\"\");\n\n try (PrintWriter out = response.getWriter()) {\n out.println(\"{\");\n if (exception instanceof BadCredentialsException) {\n out.println(\"\\t\\\"status\\\": \\\"\" + HttpStatus.UNAUTHORIZED.value() + \"\\\",\");\n out.println(\"\\t\\\"message\\\": \\\"\" + \"Invalid email address/password.\" + \"\\\"\");\n }\n out.println(\"}\");\n }\n }",
"private void authenticate(String user, String pass) {\n }",
"protected Object onLoginSuccess(HealthUserContext userContext, LoginResult loginResult) throws Exception {\n\t\tUserApp userApp = loginResult.getLoginContext().getLoginTarget().getUserApp();\n\t\treturn this.view(userContext, userApp.getObjectId());\n\t}",
"@Override\n public void commence(HttpServletRequest request,\n HttpServletResponse response,\n AuthenticationException authException) throws IOException {\n\n String requestURI = request.getRequestURI();\n if(requestURI.startsWith(\"/api\")){\n response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n response.setContentType(\"application/json;charset=utf-8\");\n PrintWriter out = response.getWriter();\n BaseResponse baseResponse = new BaseResponse();\n baseResponse.setMessage(authException.getMessage());\n baseResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n out.write(new ObjectMapper().writeValueAsString(baseResponse));\n out.flush();\n out.close();\n\n// response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.getMessage());\n }else {\n response.sendRedirect(\"/login?redirect=\"+requestURI);\n }\n }",
"@Override\n public Auth call() throws IOException {\n OkHttpClient client = new OkHttpClient();\n client.setFollowRedirects(false);\n client.setFollowSslRedirects(false);\n\n Request initRequest = new Request.Builder()\n .url(\"https://lobste.rs/login\")\n .build();\n\n Response initResponse = client.newCall(initRequest).execute();\n String initCookie = initResponse.header(\"Set-Cookie\").split(\";\")[0];\n String initBody = initResponse.body().string();\n String authenticity_token = Jsoup.parse(initBody).body().select(\"[name=authenticity_token]\").val();\n\n // Phase 2 is to authenticate given the cookie and authentication token\n RequestBody loginBody = new FormEncodingBuilder()\n .add(\"utf8\", \"\\u2713\")\n .add(\"authenticity_token\", authenticity_token)\n .add(\"email\", login)\n .add(\"password\", password)\n .add(\"commit\", \"Login\")\n .add(\"referer\", \"https://lobste.rs/\")\n .build();\n Request loginRequest = new Request.Builder()\n .url(\"https://lobste.rs/login\")\n .header(\"Cookie\", initCookie) // We must use #header instead of #addHeader\n .post(loginBody)\n .build();\n\n Response loginResponse = client.newCall(loginRequest).execute();\n String loginCookie = loginResponse.header(\"Set-Cookie\").split(\";\")[0];\n\n // Phase 3 is to grab the actual username/email from the settings page\n Request detailsRequest = new Request.Builder()\n .url(\"https://lobste.rs/settings\")\n .header(\"Cookie\", loginCookie)\n .build();\n Response detailsResponse = client.newCall(detailsRequest).execute();\n String detailsHtml = detailsResponse.body().string();\n\n Document dom = Jsoup.parse(detailsHtml);\n String username = dom.select(\"#user_username\").val();\n String email = dom.select(\"#user_email\").val();\n\n // And then we return the result of all three phases\n return new Auth(email, username, loginCookie);\n }",
"boolean authenticate(String userName, String password);",
"public AuthenticationUserVO getAuthenticateVO()\n/* */ throws LoginInterruptedException\n/* */ {\n/* 383 */ AuthenticationUserVO userVO = new AuthenticationUserVO();\n/* 384 */ Map<String, String> extMap = new HashMap();\n/* 385 */ LfwView widget = getCurrentWidget();\n/* 386 */ TextComp userIdComp = (TextComp)widget.getViewComponents().getComponent(\"userid\");\n/* 387 */ TextComp randomImageComp = (TextComp)widget.getViewComponents().getComponent(\"randimg\");\n/* */ \n/* 389 */ ICpSysinitQry cpSysinitQry = PortalServiceUtil.getCpSysinitQry();\n/* 390 */ boolean enabledRandomImage = false;\n/* */ try {\n/* 392 */ String showRanImg = cpSysinitQry.getSysinitValueByCodeAndPkorg(\"randomimg\", null);\n/* 393 */ enabledRandomImage = UFBoolean.valueOf(showRanImg).booleanValue();\n/* */ } catch (CpbBusinessException e) {\n/* 395 */ PortalLogger.error(e.getMessage(), e);\n/* */ }\n/* 397 */ String userId = null;\n/* */ \n/* 399 */ AppLifeCycleContext pctx = AppLifeCycleContext.current();\n/* 400 */ HttpSession session = LfwRuntimeEnvironment.getWebContext().getRequest().getSession();\n/* 401 */ String signdata = pctx.getParameter(\"p_signdata\");\n/* 402 */ String sn = pctx.getParameter(\"p_sn\");\n/* 403 */ String tz = pctx.getParameter(\"p_tz\");\n/* 404 */ if (userIdComp != null) {\n/* 405 */ if (enabledRandomImage) {\n/* 406 */ String rand = null;\n/* 407 */ if (session != null) {\n/* 408 */ rand = (String)session.getAttribute(\"rand\");\n/* */ }\n/* 410 */ String ricv = randomImageComp.getValue();\n/* 411 */ if (!StringUtils.equals(rand, ricv)) {\n/* 412 */ throw new LoginInterruptedException(LfwResBundle.getInstance().getStrByID(\"pserver\", \"PortalLoginHandler-000006\"));\n/* */ }\n/* */ }\n/* 415 */ userId = userIdComp.getValue();\n/* 416 */ if ((userId == null) || (userId.equals(\"\"))) {\n/* 417 */ throw new LoginInterruptedException(LfwResBundle.getInstance().getStrByID(\"pserver\", \"PortalLoginHandler-000007\"));\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 422 */ TextComp passComp = (TextComp)widget.getViewComponents().getComponent(\"password\");\n/* 423 */ String passValue = null;\n/* 424 */ if (passComp != null) {\n/* 425 */ passValue = passComp.getValue();\n/* 426 */ if (passValue == null) {\n/* 427 */ passValue = \"\";\n/* */ }\n/* */ }\n/* */ \n/* 431 */ ComboBoxComp multiLanguageCombo = (ComboBoxComp)widget.getViewComponents().getComponent(\"multiLanguageCombo\");\n/* 432 */ String language = multiLanguageCombo.getValue();\n/* */ \n/* 434 */ userVO.setUserID(userId);\n/* 435 */ userVO.setPassword(passValue);\n/* 436 */ extMap.put(\"p_language\", language);\n/* 437 */ extMap.put(\"p_maxwin\", \"N\");\n/* 438 */ extMap.put(\"p_signdata\", signdata);\n/* 439 */ extMap.put(\"p_sn\", sn);\n/* */ \n/* 441 */ extMap.put(\"p_tz\", tz);\n/* 442 */ String challlid = (String)session.getAttribute(\"challlid\");\n/* 443 */ extMap.put(\"challlid\", challlid);\n/* 444 */ userVO.setExtInfo(extMap);\n/* 445 */ return userVO;\n/* */ }",
"boolean isAuthenticate(String username, String password) throws UserDaoException;",
"private User authenticate(JSONObject data) {\r\n UserJpaController uJpa = new UserJpaController(Persistence.createEntityManagerFactory(\"MovBasePU\"));\r\n\r\n long fbId = Long.parseLong((String) data.remove(\"id\"));\r\n User user = uJpa.findByFbId(fbId);\r\n if (user != null) {\r\n return user;\r\n } else {\r\n user = new User(fbId, (String) data.remove(\"name\"), (String) data.remove(\"email\"), new Date(), \"u\");\r\n try {\r\n uJpa.create(user);\r\n } catch (Exception ex) {\r\n Logger.getLogger(LoginController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return user;\r\n }\r\n\r\n }",
"@Override\n public Authentication attemptAuthentication(HttpServletRequest req,\n HttpServletResponse res) throws AuthenticationException {\n log.info(\"Attempting authentication\");\n try {\n LoginRequest creds = new ObjectMapper()\n .readValue(req.getInputStream(), LoginRequest.class);\n\n return getAuthenticationManager().authenticate(\n new UsernamePasswordAuthenticationToken(\n creds.getUsername(),\n creds.getPassword(),\n new ArrayList<>())\n );\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"@Override\n public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)\n \t\tthrows AuthenticationException {\n \treturn super.attemptAuthentication(request, response);\n }",
"@Override\n public AuthenticatorFlowStatus process(HttpServletRequest request, HttpServletResponse response,\n AuthenticationContext context) throws AuthenticationFailedException {\n if (context.isLogoutRequest()) {\n return AuthenticatorFlowStatus.SUCCESS_COMPLETED;\n }\n\n if (StringUtils.isNotEmpty(request.getParameter(\"tcParam\"))) {\n try {\n processAuthenticationResponse(request, response, context);\n } catch (Exception e) {\n context.setRetrying(true);\n context.setCurrentAuthenticator(getName());\n return initiateAuthRequest(response, context, e.getMessage());\n }\n return AuthenticatorFlowStatus.SUCCESS_COMPLETED;\n } else {\n return initiateAuthRequest(response, context, null);\n }\n }",
"@Override\r\n\t\t\tpublic void onSuccess(Void result) {\n\t\t\t\tsynAlert.clear();\r\n\t\t\t\tauthenticationController.initializeFromExistingAccessTokenCookie(new AsyncCallback<UserProfile>() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\tsynAlert.handleException(caught);\r\n\t\t\t\t\t\tview.showLogin();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onSuccess(UserProfile result) {\r\n\t\t\t\t\t\t// Signed ToU. Check for temp username, passing record, and then forward\r\n\t\t\t\t\t\tuserAuthenticated();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}",
"@Override\r\n protected void onAuthenticationResponse(SAPeerAgent peerAgent, SAAuthenticationToken authToken, int error) {\r\n }",
"@Override\n\tpublic Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException {\n\t\tfinal String requestURI = request.getRequestURI();\n\t\tUserAuthentication userAuth = null;\n\t\tUser user = null;\n\n\t\tif (requestURI.endsWith(OPENID_ACTION)) {\n\t\t\tAuthentication oidAuth = super.attemptAuthentication(request, response);\n\n\t\t\tif (oidAuth == null) {\n\t\t\t\t// hang on... redirecting to openid provider\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\t//success!\n\t\t\t\tAuthenticatedUserDetails userDetails = (AuthenticatedUserDetails) oidAuth.getPrincipal();\n\t\t\t\tuserAuth = new UserAuthentication(userDetails);\n\t\t\t\tuser = userDetails.getUser();\n\t\t\t}\n\t\t}\n\n\t\treturn SecurityUtils.checkIfActive(userAuth, user, true);\n\t}",
"@Override\n public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account,\n String authTokenType, Bundle options) throws NetworkErrorException {\n final AccountManager am = AccountManager.get(mContext);\n\n String authToken = am.peekAuthToken(account, authTokenType);\n\n // Lets give another try to authenticate the user\n if (TextUtils.isEmpty(authToken)) {\n final String password = am.getPassword(account);\n if (password != null) {\n Intent authResult = TudokuAuthenticationServerConnector.signIn(account.name,\n password, authTokenType, mContext);\n if (authResult.getBooleanExtra(AccountManager.KEY_BOOLEAN_RESULT, false)) {\n authToken = authResult.getStringExtra(AccountManager.KEY_AUTHTOKEN);\n }\n }\n }\n\n // If we get an authToken - we return it\n if (!TextUtils.isEmpty(authToken)) {\n final Bundle result = new Bundle();\n result.putString(AccountManager.KEY_ACCOUNT_NAME, account.name);\n result.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type);\n result.putString(AccountManager.KEY_AUTHTOKEN, authToken);\n return result;\n }\n\n // If we get here, then we couldn't access the user's password - so we\n // need to re-prompt them for their credentials. We do that by creating\n // an intent to display our AuthenticatorActivity.\n final Intent intent = new Intent(mContext, AuthenticatorActivity.class);\n intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);\n intent.putExtra(AccountManager.KEY_ACCOUNT_TYPE, account.type);\n intent.putExtra(Extra.AUTH_TOKEN_TYPE, authTokenType);\n if (!account.name.equals(AuthenticatorActivity.NO_USER_STRING)) {\n intent.putExtra(AccountManager.KEY_ACCOUNT_NAME, account.name);\n } else {\n intent.putExtra(Extra.IS_CREATING_NEW_ACCOUNT, true);\n }\n\n final Bundle bundle = new Bundle();\n bundle.putParcelable(AccountManager.KEY_INTENT, intent);\n return bundle;\n }",
"@Override\n\t\t\tpublic void authenticated(AuthResponse r) {\n\t\t\t\tif (r != null && r.error() == null) {\n//\t\t\t\t\tSystem.out.println(\" auth making api call\");\n\t\t\t\t\ttrigger.setEnabled(false); // .removeFromParent(); // .setEnabled(false);//.getStyle().setProperty(\"visibility\", \"hidden\");\n\t\t\t\t\tready.authenticated(r); \n//\t\t\t\t\tready.run();\n\t\t\t\t} else {\n//\t\t\t\t\tSystem.out.println(\" auth not making api call\");\n\t\t\t\t\ttrigger.setEnabled(true);\n\t\t\t\t\ttrigger.addTriggerHandler(new Runnable() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t// handleAuthClick();\n\t\t\t\t\t\t\tGAPI.get()\n\t\t\t\t\t\t\t\t\t.auth()\n\t\t\t\t\t\t\t\t\t.authorize(AuthRequest.create().client_id(clientId).scope(scope).immediate(false),\n\t\t\t\t\t\t\t\t\t\t\thandleAuthResult);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}",
"@Override\n public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options) throws NetworkErrorException {\n Log.d(LOG_TAG, \"getAuthToken() for account: \" + account.type + \", authTokenType=\" + authTokenType);\n\n // Extract the username and password from the Account Manager, and ask\n // the server for an appropriate AuthToken.\n final AccountManager am = AccountManager.get(mContext);\n\n String authToken = am.peekAuthToken(account, authTokenType);\n\n // Lets give another try to authenticate the user\n if (TextUtils.isEmpty(authToken)) {\n final String password = am.getPassword(account);\n if (password != null) {\n // perform a new server request for an auth token with known password\n// authToken = sServerAuthenticate.userSignIn(account.name, password, authTokenType);\n authToken = \"stub_token\";\n }\n }\n\n // if we got a new authToken or have stored one\n if (!TextUtils.isEmpty(authToken)) {\n // we get have a stored auth token - return it\n final Bundle result = new Bundle();\n result.putString(AccountManager.KEY_ACCOUNT_NAME, account.name);\n result.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type);\n // diagram: get auth token from KEY_AUTHTOKEN\n result.putString(AccountManager.KEY_AUTHTOKEN, authToken);\n return result;\n }\n\n // If we get here, then we couldn't access the user's password - so we\n // need to re-prompt them for their credentials. We do that by creating\n // an intent to display our AuthenticatorActivity.\n final Intent intent = new Intent(mContext, AuthenticatorActivity.class);\n intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);\n intent.putExtra(AuthenticatorActivity.ARG_ACCOUNT_TYPE, account.type);\n intent.putExtra(AuthenticatorActivity.ARG_AUTH_TYPE, authTokenType);\n final Bundle bundle = new Bundle();\n // diagram: Response includes KEY_INTENT? => AccountManager will launch authenticator intent\n bundle.putParcelable(AccountManager.KEY_INTENT, intent);\n return bundle;\n\n }",
"@Override\n /**\n * Handles a HTTP GET request. This implements obtaining an authentication token from the server.\n */\n protected void handleGet(Request request, Response response) throws IllegalStateException {\n String username = String.valueOf(request.getAttributes().get(\"username\"));\n String password = String.valueOf(request.getAttributes().get(\"password\"));\n /* Construct MySQL Query. */\n String query = \"SELECT COUNT(id) AS `CNT`, `authToken` FROM accounts WHERE `username` = '\" + username + \"' AND \" +\n \"`password` = '\" + password + \"' LIMIT 0,1;\";\n /* Obtain the account count and existing token pair, as object array. */\n Object[] authenticationArray = dataHandler.handleAuthentication(database.ExecuteQuery(query,\n new ArrayList<String>()));\n int cnt = (int) authenticationArray[0];\n String existingToken = (String) authenticationArray[1];\n String authenticationToken = null;\n if (cnt == 1) { // There is exactly one account matching the parameterised username and password.\n if (existingToken == null) { // No token yet existed, generate one.\n authenticationToken = TokenGenerator.getInstance().generateAuthenticationToken(TOKEN_LENGTH);\n } else {\n authenticationToken = existingToken;\n }\n } else {\n this.returnStatus(response, new IllegalArgumentStatus(null));\n }\n if (!(authenticationToken == null || authenticationToken == \"\")) { // Update the database with the new token.\n Database.getInstance().ExecuteUpdate(\"UPDATE `accounts` SET `authToken` = '\" + authenticationToken +\n \"', `authTokenCreated` = CURRENT_TIMESTAMP WHERE `username` = '\" + username + \"';\",\n new ArrayList<String>());\n this.returnResponse(response, authenticationToken, new TokenSerializer());\n } else {\n this.returnStatus(response, new IllegalArgumentStatus(null));\n }\n }",
"@Override\n\tprotected void service(HttpServletRequest request, HttpServletResponse response)\n\t\tthrows ServletException, IOException {\n\t\tif ((new AuthenticatedUser(request,response)).unauthenticated())\n\t\t\treturn;\n\t\tsuper.service(request, response);\n\t}",
"@Override\n\tpublic void commence(HttpServletRequest request, HttpServletResponse response,\n\t\t\tAuthenticationException authException) throws IOException, ServletException {\n\t\tApiResponse res = new ApiResponse(HttpServletResponse.SC_UNAUTHORIZED, \"Unauthorised\");\n\t\tres.setErrors(authException.getMessage());\n\t\tres.setStatus(false);\n OutputStream out = response.getOutputStream();\n ObjectMapper mapper = new ObjectMapper();\n mapper.writeValue(out, res);\n out.flush();\n\t}",
"@Override\n\tpublic Authentication authenticate(Authentication authentication) throws AuthenticationException {\n\t\tString userId = authentication.getPrincipal().toString();\n\t\tString password = authentication.getCredentials().toString();\n\t\tUserInfo userAuth = Config.getInstance().getUserAuth();\n\t\tuserAuth.setUserEmail(userId);\n\t\tuserAuth.setUserPassword(password);\n\t\tLoginService loginService = Config.getInstance().getLoginService();\n\t\tUserInfo userInfo;\n\t\ttry{\n\t\t\tuserInfo = loginService.authenticateUser(userId,password);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new AuthenticationServiceException(\"1000\");\n\t\t}\n\t\tif (userInfo != null)\n\t\t{\n\t\t\treturn grantNormalRole(userInfo, authentication);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// No user with this banner id found.\n\t\t\tthrow new BadCredentialsException(\"1001\");\n\t\t}\n\t}",
"public abstract boolean authenticate(ServiceSecurity serviceSecurity, SecurityContext securityContext);",
"@Override\n protected void onAuthenticationResponse(SAPeerAgent peerAgent, SAAuthenticationToken authToken, int error) {\n }",
"public boolean authenticationSucceeded() {\n\t\treturn authenticated;\n\t}"
] | [
"0.69128466",
"0.6884559",
"0.67403525",
"0.6712561",
"0.6683055",
"0.6670204",
"0.6516592",
"0.64368886",
"0.63882107",
"0.6274902",
"0.6218811",
"0.6208208",
"0.6199661",
"0.61463886",
"0.6142291",
"0.6096215",
"0.60933816",
"0.6084381",
"0.60530525",
"0.60320956",
"0.60050327",
"0.5990763",
"0.59884155",
"0.5969948",
"0.59586877",
"0.5954585",
"0.5935433",
"0.59320515",
"0.593148",
"0.59248304",
"0.59038025",
"0.5889535",
"0.58880186",
"0.587114",
"0.5856264",
"0.5846011",
"0.58379954",
"0.5812223",
"0.5810791",
"0.57949877",
"0.5785959",
"0.5754113",
"0.57529235",
"0.5739535",
"0.57390046",
"0.5730925",
"0.57286024",
"0.5728095",
"0.57235676",
"0.5718412",
"0.5703111",
"0.5695583",
"0.5695209",
"0.5689677",
"0.5685813",
"0.56825584",
"0.5680904",
"0.56764174",
"0.5664084",
"0.56617004",
"0.56555754",
"0.5655495",
"0.56474406",
"0.564706",
"0.56465024",
"0.56393254",
"0.56376",
"0.5637059",
"0.56036913",
"0.5589614",
"0.5587531",
"0.5584061",
"0.5574067",
"0.55728793",
"0.5567039",
"0.55631447",
"0.5560192",
"0.5556491",
"0.55513185",
"0.5542834",
"0.5535708",
"0.5530651",
"0.55277985",
"0.5520532",
"0.5516016",
"0.5515236",
"0.5507342",
"0.55068004",
"0.549248",
"0.5489653",
"0.54874325",
"0.5486672",
"0.54809815",
"0.5472892",
"0.5471535",
"0.54649806",
"0.54632026",
"0.54599506",
"0.5458555",
"0.54558444"
] | 0.6491483 | 7 |
TODO code application logic here | public static void main(String[] args) throws Exception {
try{
voziTrku();
}catch(PokvarenMotorException exPom){
System.out.println("Pokvario se motor!!! skloni ga sa staze");
}catch(MaglaException exM){
System.out.println("Magla je! Nema trke");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"public void autoDetails() {\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 protected void execute() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\t\tpublic void rest() {\n\t\t\t\n\t\t}",
"protected void onFirstUse() {}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n protected void execute() {\n \n }",
"@Override\n public void feedingHerb() {\n\n }",
"public void designBasement() {\n\t\t\r\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 gravarBd() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public void execute() {\n \n \n }",
"@Override\n\tpublic void view() {\n\t\t\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\r\n protected void fetchData() {\n\r\n }",
"@Override\n public void onCancelled(CancelledException arg0) {\n }",
"@Override\n public void onCancelled(CancelledException arg0) {\n }",
"@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}",
"protected void aktualisieren() {\r\n\r\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\t\t\tpublic void onPreExecute() {\n\t\t\t\t\n\t\t\t}",
"@Override\n protected void execute() {\n }",
"@Override\n protected void execute() {\n }",
"@Override\n protected void execute() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"private static void oneUserExample()\t{\n\t}",
"@Override\n public void onCancelled(CancelledException arg0) {\n\n }",
"@Override\n protected void execute() {\n\n }",
"public void logic(){\r\n\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tprotected void execute() {\r\n\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\t \n\t\t\t super.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\r\n\tprotected void onPreExecute() {\n\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\t\tprotected void onPreExecute() {\n\t\t}",
"@Override\n\t\t\tprotected void onPreExecute()\n\t\t\t{\n\n\t\t\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"private RESTBackend()\n\t\t{\n\t\t\t\n\t\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"@Override\n protected void startUp() {\n }",
"protected void mo6255a() {\n }",
"protected void viewSetup() {\n\t\t// TODO Auto-generated method stub\n\n\t}",
"@Override\r\n\tprotected void processRespond() {\n\r\n\t}",
"@Override\r\n\tprotected void processRespond() {\n\r\n\t}",
"@Override\r\n\tpublic void manage() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"public void mo38117a() {\n }",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void queryData() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"@Override\n\t\t\t\t\tprotected void onPreExecute() {\n\t\t\t\t\t\tsuper.onPreExecute();\n\t\t\t\t\t}",
"@Override\n\tpublic void getStatus() {\n\t\t\n\t}",
"@Override\n protected void onPreExecute() {\n \n }",
"protected void index()\r\n\t{\n\t}",
"public void mo6081a() {\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}",
"public void mo55254a() {\n }"
] | [
"0.60802186",
"0.5912082",
"0.58425087",
"0.58339286",
"0.5810548",
"0.57580656",
"0.57396024",
"0.5721001",
"0.5705411",
"0.5666017",
"0.5657976",
"0.5613798",
"0.5611188",
"0.5611188",
"0.55960613",
"0.55933475",
"0.557677",
"0.5572332",
"0.5565667",
"0.55482084",
"0.5536573",
"0.5534607",
"0.5533934",
"0.5468669",
"0.5460392",
"0.5443554",
"0.543027",
"0.5422523",
"0.5420404",
"0.5420404",
"0.5414971",
"0.53763115",
"0.5367869",
"0.53636855",
"0.53608036",
"0.5329318",
"0.5327322",
"0.5327322",
"0.53258926",
"0.53220093",
"0.53199",
"0.5311158",
"0.53085816",
"0.5307914",
"0.52976745",
"0.52976745",
"0.52976745",
"0.5297331",
"0.52968514",
"0.5293012",
"0.5281331",
"0.5277546",
"0.5277546",
"0.52726364",
"0.52688015",
"0.5267047",
"0.5266958",
"0.5262331",
"0.5261341",
"0.52587026",
"0.52557015",
"0.5255123",
"0.524477",
"0.52443206",
"0.5236655",
"0.52359647",
"0.52248156",
"0.52246475",
"0.52233",
"0.52207166",
"0.52205276",
"0.5216701",
"0.5206895",
"0.52030635",
"0.51967937",
"0.51948136",
"0.51947194",
"0.5188396",
"0.518064",
"0.518064",
"0.5177845",
"0.5175415",
"0.5175415",
"0.5175415",
"0.5175415",
"0.5175415",
"0.5175415",
"0.5173223",
"0.5173223",
"0.5170695",
"0.5168988",
"0.51654655",
"0.51593053",
"0.5157954",
"0.5156624",
"0.5153031",
"0.5152581",
"0.51493365",
"0.5148302",
"0.51443505",
"0.51430386"
] | 0.0 | -1 |
This is a helper function from Tabula to set the rotation of model parts | public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRotations(AnimationPart part)\n {\n prev_rotateAngleX = part.prev_rotateAngleX;\n prev_rotateAngleY = part.prev_rotateAngleY;\n prev_rotateAngleZ = part.prev_rotateAngleZ;\n }",
"void setRotation (DMatrix3C R);",
"private void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z)\n {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }",
"public void setRotationAngles(float parTime, float parSwingSuppress, float par3, float parHeadAngleY, float parHeadAngleX, float par6, EntityElephant parEntity)\n {\n \t// return rotation point in case there was previous rearing animation\n \thead.setRotationPoint(headRotPointXDefault, headRotPointYDefault, headRotPointZDefault);\n body.setRotationPoint(bodyRotPointXDefault, bodyRotPointYDefault, bodyRotPointZDefault);\n legFrontRight.setRotationPoint(legFrontRightRotPointXDefault, legFrontRightRotPointYDefault, legFrontRightRotPointZDefault);\n legFrontLeft.setRotationPoint(legFrontLeftRotPointXDefault, legFrontLeftRotPointYDefault, legFrontLeftRotPointZDefault);\n childHead.setRotationPoint(childHeadRotPointXDefault, childHeadRotPointYDefault, childHeadRotPointZDefault);\n\n head.rotateAngleX = degToRad(parHeadAngleX);\n head.rotateAngleY = degToRad(parHeadAngleY);\n childHead.rotateAngleX = degToRad(parHeadAngleX);\n childHead.rotateAngleY = degToRad(parHeadAngleY);\n body.rotateAngleX = ((float)Math.PI / 2F);\n // swingSuppress goes to 0 when still so gates the movement\n legRearRight.rotateAngleX = MathHelper.cos(parTime * 0.6662F) * 1.4F * parSwingSuppress;\n legRearLeft.rotateAngleX = MathHelper.cos(parTime * 0.6662F + (float)Math.PI) * 1.4F * parSwingSuppress;\n legFrontRight.rotateAngleX = MathHelper.cos(parTime * 0.6662F + (float)Math.PI) * 1.4F * parSwingSuppress;\n legFrontLeft.rotateAngleX = MathHelper.cos(parTime * 0.6662F) * 1.4F * parSwingSuppress;\n trunk1.rotateAngleX = MathHelper.cos(degToRad(parEntity.ticksExisted*7)) * degToRad(15);\n childTrunk1.rotateAngleX = MathHelper.cos(degToRad(parEntity.ticksExisted*7)) * degToRad(15);\n trunk2.rotateAngleX = trunk1.rotateAngleX * 3;\n\n // flick ears\n ear1.rotateAngleY = (float) Math.pow(MathHelper.cos(degToRad(parEntity.ticksExisted*3)), 6) * degToRad(15);\n ear2.rotateAngleY = (float) Math.pow(MathHelper.cos(degToRad(parEntity.ticksExisted*3)), 6) * degToRad(-15);\n childEar1.rotateAngleY = (float) Math.pow(MathHelper.cos(degToRad(parEntity.ticksExisted*3)), 6) * degToRad(15);\n childEar2.rotateAngleY = (float) Math.pow(MathHelper.cos(degToRad(parEntity.ticksExisted*3)), 6) * degToRad(-15);\n\n // raise trunk if in water \n if (parEntity.isInWater())\n {\n \ttrunk1.rotateAngleX = degToRad(-150);\n \ttrunk2.rotateAngleX = degToRad(-20);\n \tchildTrunk1.rotateAngleX = degToRad(-150);\n }\n \n // perform rearing animation if appropriate\n if (parEntity.isRearing())\n {\n \tint rearingCounter = parEntity.getRearingCounter();\n// \t// DEBUG\n// \tSystem.out.println(\"ModelElephant entity is rearing with rearing counter = \"+rearingCounter);\n \t\n \t// move retain connection between body parts, hind legs stay where they were\n \thead.setRotationPoint(headRotPointXDefault, headRotPointYDefault+rearingOffsetCycle[rearingCounter][0], headRotPointZDefault+rearingOffsetCycle[rearingCounter][1]);\n body.setRotationPoint(bodyRotPointXDefault, bodyRotPointYDefault+rearingOffsetCycle[rearingCounter][2], bodyRotPointZDefault+rearingOffsetCycle[rearingCounter][3]);\n legFrontRight.setRotationPoint(legFrontRightRotPointXDefault, legFrontRightRotPointYDefault+rearingOffsetCycle[rearingCounter][4], legFrontRightRotPointZDefault+rearingOffsetCycle[rearingCounter][5]);\n legFrontLeft.setRotationPoint(legFrontLeftRotPointXDefault, legFrontLeftRotPointYDefault+rearingOffsetCycle[rearingCounter][6], legFrontLeftRotPointZDefault+rearingOffsetCycle[rearingCounter][7]);\n childHead.setRotationPoint(childHeadRotPointXDefault, childHeadRotPointYDefault+rearingOffsetCycle[rearingCounter][8], childHeadRotPointZDefault+rearingOffsetCycle[rearingCounter][9]);\n \n // rotate for rearing\n \tbody.rotateAngleX += degToRad(rearingAngleCycle[rearingCounter][0]);\n head.rotateAngleX += degToRad(rearingAngleCycle[rearingCounter][0]);\n \tchildHead.rotateAngleX += degToRad(rearingAngleCycle[rearingCounter][0]);\n \ttrunk1.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][1]);\n \ttrunk2.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][2]);\n \tchildTrunk1.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][1]);\n \tlegFrontRight.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][0]);\n \tlegFrontLeft.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][0]);\n }\n }",
"public void setRotateAngle(Cuboid modelRenderer, float x, float y, float z) {\n modelRenderer.rotationPointX = x;\n modelRenderer.rotationPointY = y;\n modelRenderer.rotationPointZ = z;\n }",
"public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity)\n {\n ModelRenderer[] var8 = this.squidTentacles;\n int var9 = var8.length;\n\n for (int var10 = 0; var10 < var9; ++var10)\n {\n ModelRenderer var11 = var8[var10];\n var11.rotateAngleX = par3;\n }\n }",
"void setRotation(int objIndex,Quaternion rot){\n look[objIndex].setRotationQuaternion(rot);\n usedRot.set(objIndex);\n }",
"public void copyRotations(AnimationPart part)\n {\n part.prev_rotateAngleX = prev_rotateAngleX;\n part.prev_rotateAngleY = prev_rotateAngleY;\n part.prev_rotateAngleZ = prev_rotateAngleZ;\n }",
"private void setRotation()\n\t{\n\t\tGL11.glPushMatrix();\n\t\tGL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);\n\t}",
"public DynamicModelPart setRotation(float[] rotation) {\n this.rotation = rotation;\n return this;\n }",
"public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6)\n {\n float f = par3 * (float)Math.PI * -0.1F;\n\n for (int i = 0; i < 4; i++)\n {\n field_78106_a[i].rotationPointY = -2F + MathHelper.cos(((float)(i * 2) + par3) * 0.25F);\n field_78106_a[i].rotationPointX = MathHelper.cos(f) * 9F;\n field_78106_a[i].rotationPointZ = MathHelper.sin(f) * 9F;\n f += ((float)Math.PI / 2F);\n }\n\n f = ((float)Math.PI / 4F) + par3 * (float)Math.PI * 0.03F;\n\n for (int j = 4; j < 8; j++)\n {\n field_78106_a[j].rotationPointY = 2.0F + MathHelper.cos(((float)(j * 2) + par3) * 0.25F);\n field_78106_a[j].rotationPointX = MathHelper.cos(f) * 7F;\n field_78106_a[j].rotationPointZ = MathHelper.sin(f) * 7F;\n f += ((float)Math.PI / 2F);\n }\n\n f = 0.4712389F + par3 * (float)Math.PI * -0.05F;\n\n for (int k = 8; k < 12; k++)\n {\n field_78106_a[k].rotationPointY = 11F + MathHelper.cos(((float)k * 1.5F + par3) * 0.5F);\n field_78106_a[k].rotationPointX = MathHelper.cos(f) * 5F;\n field_78106_a[k].rotationPointZ = MathHelper.sin(f) * 5F;\n f += ((float)Math.PI / 2F);\n }\n\n field_78105_b.rotateAngleY = par4 / (180F / (float)Math.PI);\n field_78105_b.rotateAngleX = par5 / (180F / (float)Math.PI);\n }",
"LocalMaterialData rotate();",
"public void setRotateAngle(Cuboid model, float x, float y, float z) {\n model.pitch = x;\n model.yaw = y;\n model.roll = z;\n }",
"void setRotations(Vec2 rotations);",
"public void setRotation(int degree) {\n\trotation = degree;\n}",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}",
"public void rotate() {\n // amoeba rotate\n // Here i will use my rotation_x and rotation_y\n }",
"public DynamicModelPart rotateModelPart(float[] rotation) {\n MatrixStack rotationStack = new MatrixStack();\n rotationStack.translate(rotation[0], rotation[1], rotation[2]);\n this.rotate(rotationStack);\n return this;\n }",
"public void setRotateAngle(RendererModel RendererModel, float x, float y, float z)\n\t{\n\t\tRendererModel.rotateAngleX = x;\n\t\tRendererModel.rotateAngleY = y;\n\t\tRendererModel.rotateAngleZ = z;\n\t}",
"public void rotation(){\n\n double x=Double.parseDouble(rotationx.getText());\n double y=Double.parseDouble(rotationy.getText());\n double z=Double.parseDouble(rotationz.getText());\n if (checkbox.isSelected()){\n cls_zahnrad.rotieren(x,y,z);\n return;\n }\n Triangle[] dreiecke = t1.getFlaechen();\n x=2*Math.PI/360*x;\n y=2*Math.PI/360*y;\n z=2*Math.PI/360*z;\n double[] A,B,C;\n\n double pktx=0,pkty=0,pktz=0;\n\n if (radio12.isSelected()){\n pktx = Double.parseDouble(rotationpktx.getText());\n pkty = Double.parseDouble(rotationpkty.getText());\n pktz = Double.parseDouble(rotationpktz.getText());\n }\n\n for (Triangle i :dreiecke){\n for (int j=0; j<3;j++){\n double xtemp,ytemp,ztemp;\n xtemp=i.getTriangle()[j].getPoint()[0]-pktx;\n ytemp=i.getTriangle()[j].getPoint()[1]-pkty;\n ztemp=i.getTriangle()[j].getPoint()[2]-pktz;\n i.getTriangle()[j].setPoint(xtemp,ytemp,ztemp);\n }\n }\n\n for (Triangle t1 : dreiecke){\n A=t1.getTriangle()[0].getPoint();\n B=t1.getTriangle()[1].getPoint();\n C=t1.getTriangle()[2].getPoint();\n double[][]punkte={A,B,C};\n\n for (int i=0; i<punkte.length; i++){\n double temp0,temp1,temp2;\n\n //Rotation um Parallele der X-Achse durch das Rotationszentrum\n if (x!=0){\n temp1=punkte[i][1]*Math.cos(x)-punkte[i][2]*Math.sin(x);\n temp2=punkte[i][1]*Math.sin(x)+punkte[i][2]*Math.cos(x);\n punkte[i][1]=temp1;\n punkte[i][2]=temp2;\n }\n\n //Rotation um Parallele der Y-Achse durch das Rotationszentrum\n if (y!=0){\n temp0=punkte[i][0]*Math.cos(y)+punkte[i][2]*Math.sin(y);\n temp2=-punkte[i][0]*Math.sin(y)+punkte[i][2]*Math.cos(y);\n punkte[i][0]=temp0;\n punkte[i][2]=temp2;\n }\n\n //Rotation um Parallele der Z-Achse durch das Rotationszentrum\n if (z!=0){\n temp0=punkte[i][0]*Math.cos(z)-punkte[i][1]*Math.sin(z);\n temp1=punkte[i][0]*Math.sin(z)+punkte[i][1]*Math.cos(z);\n punkte[i][0]=temp0;\n punkte[i][1]=temp1;\n }\n }\n A=punkte[0];\n B=punkte[1];\n C=punkte[2];\n t1.getTriangle()[0].setPoint(A[0],A[1],A[2]);\n t1.getTriangle()[1].setPoint(B[0],B[1],B[2]);\n t1.getTriangle()[2].setPoint(C[0],C[1],C[2]);\n }\n for (Triangle i :dreiecke){\n for (int j=0; j<3;j++){\n double xtemp,ytemp,ztemp;\n xtemp=i.getTriangle()[j].getPoint()[0]+pktx;\n ytemp=i.getTriangle()[j].getPoint()[1]+pkty;\n ztemp=i.getTriangle()[j].getPoint()[2]+pktz;\n i.getTriangle()[j].setPoint(xtemp,ytemp,ztemp);\n }\n }\n redraw();\n /*\n System.out.println(\"A \"+Arrays.toString(t1.getTetraeder()[0].getPoint()));\n System.out.println(\"B \"+Arrays.toString(t1.getTetraeder()[1].getPoint()));\n System.out.println(\"C \"+Arrays.toString(t1.getTetraeder()[2].getPoint()));\n System.out.println(\"D \"+Arrays.toString(t1.getTetraeder()[3].getPoint()));\n System.out.println(Arrays.toString(Mittelpunkt));\n */\n }",
"public void setRotation(){\n\t\t\tfb5.accStop();\n\t\t\twt.turning = true;\n\t\t\tif(state == BotMove.RIGHT_15){\n\t\t\t\tfb5.turnRightBy(6);\n\t\t\t\tangle = (angle+360-20)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.RIGHT_10){\n\t\t\t\tfb5.turnRightBy(3);\n\t\t\t\tangle = (angle+360-10)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT_5){\n\t\t\t\tfb5.turnLeftBy(2);\n\t\t\t\tangle = (angle+360+5)%360;\n\t\t\t}\n\t\t}",
"void setOffsetRotation(DMatrix3C R);",
"@Override\r\n\tpublic void setRotationAngles(float par1, float par2, float pTicksExisted,\r\n\t\t\tfloat pHeadYaw, float pHeadPitch, float par6, IModelCaps pEntityCaps) {\n\t\t\r\n\t\tbipedHead.rotateAngleY = pHeadYaw / 57.29578F;\r\n\t\tbipedHead.rotateAngleX = pHeadPitch / 57.29578F;\r\n//\t\tbipedHeadwear.rotateAngleY = bipedHead.rotateAngleY;\r\n\t\tbipedHeadwear.rotateAngleX = 0F;\r\n\t\tbipedRightArm.rotateAngleX = mh_cos(par1 * 0.6662F + 3.141593F) * 2.0F * par2 * 0.5F;\r\n\t\tbipedLeftArm.rotateAngleX = mh_cos(par1 * 0.6662F) * 2.0F * par2 * 0.5F;\r\n\t\tbipedRightArm.rotateAngleZ = 0.0F;\r\n\t\tbipedLeftArm.rotateAngleZ = 0.0F;\r\n\t\tbipedRightLeg.rotateAngleX = mh_cos(par1 * 0.6662F) * 1.4F * par2;\r\n\t\tbipedLeftLeg.rotateAngleX = mh_cos(par1 * 0.6662F + 3.141593F) * 1.4F * par2;\r\n\t\tbipedRightLeg.rotateAngleY = 0.0F;\r\n\t\tbipedLeftLeg.rotateAngleY = 0.0F;\r\n\r\n\t\tif (isRiding) {\r\n\t\t\t// 乗り物に乗っている\r\n\t\t\tbipedRightArm.rotateAngleX += -0.6283185F;\r\n\t\t\tbipedLeftArm.rotateAngleX += -0.6283185F;\r\n\t\t\tbipedRightLeg.rotateAngleX = -1.256637F;\r\n\t\t\tbipedLeftLeg.rotateAngleX = -1.256637F;\r\n\t\t\tbipedRightLeg.rotateAngleY = 0.3141593F;\r\n\t\t\tbipedLeftLeg.rotateAngleY = -0.3141593F;\r\n\t\t}\r\n\t\t// アイテム持ってるときの腕振りを抑える\r\n\t\tif (heldItem[1] != 0) {\r\n\t\t\tbipedLeftArm.rotateAngleX = bipedLeftArm.rotateAngleX * 0.5F\r\n\t\t\t\t\t- 0.3141593F * (float) heldItem[1];\r\n\t\t}\r\n\t\tif (heldItem[0] != 0) {\r\n\t\t\tbipedRightArm.rotateAngleX = bipedRightArm.rotateAngleX * 0.5F\r\n\t\t\t\t\t- 0.3141593F * (float) heldItem[0];\r\n\t\t}\r\n\t\t\r\n\t\tbipedRightArm.rotateAngleY = 0.0F;\r\n\t\tbipedLeftArm.rotateAngleY = 0.0F;\r\n\t\tfloat lonGround = onGrounds[dominantArm];\r\n\t\tif (lonGround > -9990F && !aimedBow) {\r\n\t\t\t// 腕振り\r\n\t\t\tfloat f6 = lonGround;\r\n\t\t\tbipedBody.rotateAngleY = mh_sin(mh_sqrt_float(f6) * 3.141593F * 2.0F) * 0.2F;\r\n\t\t\tSkirt.rotateAngleY = bipedBody.rotateAngleY;\r\n\t\t\tbipedRightArm.rotationPointZ = mh_sin(bipedBody.rotateAngleY) * 4F;\r\n\t\t\tbipedRightArm.rotationPointX = -mh_cos(bipedBody.rotateAngleY) * 4F + 1.0F;\r\n\t\t\tbipedLeftArm.rotationPointZ = -mh_sin(bipedBody.rotateAngleY) * 4F;\r\n\t\t\tbipedLeftArm.rotationPointX = mh_cos(bipedBody.rotateAngleY) * 4F - 1.0F;\r\n\t\t\tbipedRightArm.rotateAngleY += bipedBody.rotateAngleY;\r\n\t\t\tbipedLeftArm.rotateAngleY += bipedBody.rotateAngleY;\r\n\t\t\tbipedLeftArm.rotateAngleX += bipedBody.rotateAngleY;\r\n\t\t\tf6 = 1.0F - lonGround;\r\n\t\t\tf6 *= f6;\r\n\t\t\tf6 *= f6;\r\n\t\t\tf6 = 1.0F - f6;\r\n\t\t\tfloat f7 = mh_sin(f6 * 3.141593F);\r\n\t\t\tfloat f8 = mh_sin(lonGround * 3.141593F)\r\n\t\t\t\t\t* -(bipedHead.rotateAngleX - 0.7F) * 0.75F;\r\n\t\t\tbipedRightArm.rotateAngleX -= (double) f7 * 1.2D + (double) f8;\r\n\t\t\tbipedRightArm.rotateAngleY += bipedBody.rotateAngleY * 2.0F;\r\n\t\t\tbipedRightArm.rotateAngleZ = mh_sin(lonGround * 3.141593F) * -0.4F;\r\n\t\t}\r\n\t\tif (isSneak) {\r\n\t\t\t// しゃがみ\r\n\t\t\tbipedBody.rotateAngleX = 0.5F;\r\n\t\t\tbipedRightLeg.rotateAngleX -= 0.0F;\r\n\t\t\tbipedLeftLeg.rotateAngleX -= 0.0F;\r\n\t\t\tbipedRightArm.rotateAngleX += 0.4F;\r\n\t\t\tbipedLeftArm.rotateAngleX += 0.4F;\r\n\t\t\tbipedRightLeg.rotationPointZ = 3F;\r\n\t\t\tbipedLeftLeg.rotationPointZ = 3F;\r\n\t\t\tbipedRightLeg.rotationPointY = 6F;\r\n\t\t\tbipedLeftLeg.rotationPointY = 6F;\r\n\t\t\tbipedHead.rotationPointY = 1.0F;\r\n\t\t\tbipedHeadwear.rotationPointY = 1.0F;\r\n\t\t\tbipedHeadwear.rotateAngleX += 0.5F;\r\n\t\t\tSkirt.rotationPointY = 5.8F;\r\n\t\t\tSkirt.rotationPointZ = 2.7F;\r\n\t\t\tSkirt.rotateAngleX = 0.2F;\r\n\t\t} else {\r\n\t\t\t// 通常立ち\r\n\t\t\tbipedBody.rotateAngleX = 0.0F;\r\n\t\t\tbipedRightLeg.rotationPointZ = 0.0F;\r\n\t\t\tbipedLeftLeg.rotationPointZ = 0.0F;\r\n\t\t\tbipedRightLeg.rotationPointY = 7F;\r\n\t\t\tbipedLeftLeg.rotationPointY = 7F;\r\n\t\t\tbipedHead.rotationPointY = 0.0F;\r\n\t\t\tbipedHeadwear.rotationPointY = 0.0F;\r\n\t\t\tSkirt.rotationPointY = 7.0F;\r\n\t\t\tSkirt.rotationPointZ = 0.0F;\r\n\t\t\tSkirt.rotateAngleX = 0.0F;\r\n\t\t}\r\n\t\tif (isWait) {\r\n\t\t\t// 待機状態の特別表示\r\n\t\t\tbipedRightArm.rotateAngleX = mh_sin(pTicksExisted * 0.067F) * 0.05F - 0.7F;\r\n\t\t\tbipedRightArm.rotateAngleY = 0.0F;\r\n\t\t\tbipedRightArm.rotateAngleZ = -0.4F;\r\n\t\t\tbipedLeftArm.rotateAngleX = mh_sin(pTicksExisted * 0.067F) * 0.05F - 0.7F;\r\n\t\t\tbipedLeftArm.rotateAngleY = 0.0F;\r\n\t\t\tbipedLeftArm.rotateAngleZ = 0.4F;\r\n\t\t} else {\r\n\t\t\tif (aimedBow) {\r\n\t\t\t\t// 弓構え\r\n\t\t\t\tfloat f6 = mh_sin(lonGround * 3.141593F);\r\n\t\t\t\tfloat f7 = mh_sin((1.0F - (1.0F - lonGround)\r\n\t\t\t\t\t\t* (1.0F - lonGround)) * 3.141593F);\r\n\t\t\t\tbipedRightArm.rotateAngleZ = 0.0F;\r\n\t\t\t\tbipedLeftArm.rotateAngleZ = 0.0F;\r\n\t\t\t\tbipedRightArm.rotateAngleY = -(0.1F - f6 * 0.6F);\r\n\t\t\t\tbipedLeftArm.rotateAngleY = 0.1F - f6 * 0.6F;\r\n\t\t\t\t// bipedRightArm.rotateAngleX = -1.570796F;\r\n\t\t\t\t// bipedLeftArm.rotateAngleX = -1.570796F;\r\n\t\t\t\tbipedRightArm.rotateAngleX = -1.470796F;\r\n\t\t\t\tbipedLeftArm.rotateAngleX = -1.470796F;\r\n\t\t\t\tbipedRightArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F;\r\n\t\t\t\tbipedLeftArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F;\r\n\t\t\t\tbipedRightArm.rotateAngleZ += mh_cos(pTicksExisted * 0.09F) * 0.05F + 0.05F;\r\n\t\t\t\tbipedLeftArm.rotateAngleZ -= mh_cos(pTicksExisted * 0.09F) * 0.05F + 0.05F;\r\n\t\t\t\tbipedRightArm.rotateAngleX += mh_sin(pTicksExisted * 0.067F) * 0.05F;\r\n\t\t\t\tbipedLeftArm.rotateAngleX -= mh_sin(pTicksExisted * 0.067F) * 0.05F;\r\n\t\t\t\tbipedRightArm.rotateAngleX += bipedHead.rotateAngleX;\r\n\t\t\t\tbipedLeftArm.rotateAngleX += bipedHead.rotateAngleX;\r\n\t\t\t\tbipedRightArm.rotateAngleY += bipedHead.rotateAngleY;\r\n\t\t\t\tbipedLeftArm.rotateAngleY += bipedHead.rotateAngleY;\r\n\t\t\t} else {\r\n\t\t\t\t// 通常\r\n\t\t\t\tbipedRightArm.rotateAngleZ += 0.5F;\r\n\t\t\t\tbipedLeftArm.rotateAngleZ -= 0.5F;\r\n\t\t\t\tbipedRightArm.rotateAngleZ += mh_cos(pTicksExisted * 0.09F) * 0.05F + 0.05F;\r\n\t\t\t\tbipedLeftArm.rotateAngleZ -= mh_cos(pTicksExisted * 0.09F) * 0.05F + 0.05F;\r\n\t\t\t\tbipedRightArm.rotateAngleX += mh_sin(pTicksExisted * 0.067F) * 0.05F;\r\n\t\t\t\tbipedLeftArm.rotateAngleX -= mh_sin(pTicksExisted * 0.067F) * 0.05F;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"private void setupTransformationMatrix(ShapeRenderer renderer){\n\t\trenderer.identity();\n\t\trenderer.translate(cx, cy, 0);\n\t\trenderer.rotate(0, 0, 1, angle); \n\t\trenderer.translate(-cx, -cy, 0);\n\t}",
"@Override\n // float limbSwing(par1), float limbSwingAmount(par2), float ageInTicks(par3), float netHeadYaw(par4), float headPitch(par5), float scaleFactor(par6), Entity entityIn(par7):\n public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)\n {\n EntityFamiliar entityFamiliar = (EntityFamiliar)entityIn;\n\n if (entityFamiliar.isCharging())\n {\n if (entityFamiliar.getPrimaryHand() == EnumHandSide.RIGHT)\n {\n this.armRight.rotateAngleX = 3.7699115F;\n }\n else\n {\n this.armLeft.rotateAngleX = 3.7699115F;\n }\n }\n \n // RightArm.rotateAngleX = MathHelper.cos(par1 * 0.6662F + (float)Math.PI) * 2.0F * par2 * 0.5F;\n this.armRight.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 2.0F * limbSwingAmount * 0.5F;\n\n // LeftArm.rotateAngleX = MathHelper.cos(par1 * 0.6662F) * 2.0F * par2 * 0.5F;\n this.armLeft.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 2.0F * limbSwingAmount * 0.5F;\n \n // RightArm.rotateAngleZ = 0.0F;\n this.armRight.rotateAngleZ = 0.0F;\n \n // LeftArm.rotateAngleZ = 0.0F;\n this.armLeft.rotateAngleZ = 0.0F;\n \n // Wings (from EntityVex):\n this.wingRight.rotationPointZ = 2.0F;\n this.wingLeft.rotationPointZ = 2.0F;\n this.wingRight.rotationPointY = 1.0F;\n this.wingLeft.rotationPointY = 1.0F;\n this.wingRight.rotateAngleY = 0.47123894F + MathHelper.cos(ageInTicks * 0.8F) * (float)Math.PI * 0.05F;\n this.wingLeft.rotateAngleY = -this.wingRight.rotateAngleY;\n this.wingLeft.rotateAngleZ = -0.47123894F;\n this.wingLeft.rotateAngleX = 0.47123894F;\n this.wingRight.rotateAngleX = 0.47123894F;\n this.wingRight.rotateAngleZ = 0.47123894F;\n\n // Head.rotateAngleY = par5 (headPitch) / (180F / (float)Math.PI);\n this.head.rotateAngleX = headPitch / (180F / (float)Math.PI);\n\n // Head.rotateAngleY = par4 (netHeadYaw) / (180F / (float)Math.PI);\n this.head.rotateAngleY = netHeadYaw / (180F / (float)Math.PI);\n\n // Tentacles (using spider model):\n //float f = ((float)Math.PI / 4F);\n this.tentacleFrontLeft.rotateAngleZ = -((float)Math.PI / 4F);\n this.tentacleFrontRight.rotateAngleZ = ((float)Math.PI / 4F);\n this.tentacleFrontMid.rotateAngleZ = -0.58119464F;\n this.tentacleBackMid.rotateAngleZ = 0.58119464F;\n this.tentacleBackLeft.rotateAngleZ = -((float)Math.PI / 4F);\n this.tentacleBackRight.rotateAngleZ = ((float)Math.PI / 4F);\n //float f1 = -0.0F;\n //float f2 = 0.3926991F;\n this.tentacleFrontLeft.rotateAngleY = ((float)Math.PI / 4F);\n this.tentacleFrontRight.rotateAngleY = -((float)Math.PI / 4F);\n this.tentacleFrontMid.rotateAngleY = 0.3926991F;\n this.tentacleBackMid.rotateAngleY = -0.3926991F;\n this.tentacleBackLeft.rotateAngleY = -((float)Math.PI / 4F);\n this.tentacleBackRight.rotateAngleY = ((float)Math.PI / 4F);\n float f3 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + 0.0F) * 0.4F) * limbSwingAmount;\n float f4 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + (float)Math.PI) * 0.4F) * limbSwingAmount;\n float f5 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + ((float)Math.PI * 3F / 2F)) * 0.4F) * limbSwingAmount;\n float f6 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + 0.0F) * 0.4F) * limbSwingAmount;\n float f7 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + (float)Math.PI) * 0.4F) * limbSwingAmount;\n float f8 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + ((float)Math.PI * 3F / 2F)) * 0.4F) * limbSwingAmount;\n this.tentacleFrontLeft.rotateAngleY += f3;\n this.tentacleFrontRight.rotateAngleY += -f3;\n this.tentacleFrontMid.rotateAngleY += f4;\n this.tentacleBackMid.rotateAngleY += -f4;\n this.tentacleBackLeft.rotateAngleY += f5;\n this.tentacleBackRight.rotateAngleY += -f5;\n this.tentacleFrontLeft.rotateAngleZ += f6;\n this.tentacleFrontRight.rotateAngleZ += -f6;\n this.tentacleFrontMid.rotateAngleZ += f7;\n this.tentacleBackMid.rotateAngleZ += -f7;\n this.tentacleBackLeft.rotateAngleZ += f8;\n this.tentacleBackRight.rotateAngleZ += -f8;\n }",
"public void updateRotations() {\n try {\n switch (this.mode) {\n case Packet:\n mc.player.renderYawOffset = this.yaw;\n mc.player.rotationYawHead = this.yaw;\n break;\n case Legit:\n mc.player.rotationYaw = this.yaw;\n mc.player.rotationPitch = this.pitch;\n break;\n case None:\n break;\n }\n } catch (Exception ignored) {\n\n }\n }",
"public void setDeviceRotation(int rotation);",
"public void rotate(){\n\t\t\n\t\tfor(Vertex v : vertices){\n\n\t\t\tMatrix m = ViewSettings.getRotationMatrix4().multiply(v);\n\n\t\t\tv.setX(m.getValue(0, 0));\n\t\t\tv.setY(m.getValue(1, 0));\n\t\t\tv.setZ(m.getValue(2, 0));\n\t\t\tv.setW(m.getValue(3, 0));\n\t\t}\n\t}",
"public void setRotation(double angle)\n\t{\n\t\tdouble cos = Math.cos(angle);\n\t\tdouble sin = Math.sin(angle);\n\t\tmatrix[0].x=cos;\n\t\tmatrix[0].y=sin;\n\t\tmatrix[1].x=-sin;\n\t\tmatrix[1].y=cos;\n\t}",
"private void resetAngles() {\n \ttorso_front.rotateAngleX = 0;\n \tleg_front_left.rotateAngleX = leg_front_right.rotateAngleX = 0;\n \tleg_front_left.rotateAngleY = leg_front_right.rotateAngleY = 0;\n \tleg_front_left.rotateAngleZ = leg_front_right.rotateAngleZ = 0;\n \tleg_back_left.rotateAngleX = leg_front_left.rotateAngleX;\n \tleg_back_right.rotateAngleX = leg_front_right.rotateAngleX;\n \tleg_back_right.rotateAngleY = leg_back_left.rotateAngleY = 0;\n \tleg_back_right.rotateAngleZ = leg_back_left.rotateAngleZ = 0;\n\t\tknee_front_left.rotateAngleX = knee_front_right.rotateAngleX = 0;\n\t\tknee_back_left.rotateAngleX = knee_back_right.rotateAngleX = 0;\n\t\ttail_stub.rotateAngleX = -1.05f;\n\t\ttail_segment_1.rotateAngleX = 1.1f;\n\t\ttail_segment_2.rotateAngleX = tail_segment_3.rotateAngleX = 0;\n\t\tneck.rotateAngleX = 0.17453292519943295f;\n }",
"public void setRotation(int indexInST, float time, Quaternion rot) {\n PointInTime toAdd=findTime(time);\n toAdd.setRotation(indexInST,rot);\n }",
"public void setRotate() {\r\n\t\tint npoints = xpoints.length;\r\n\t\tdouble[] tempxpoints = new double[xpoints.length];\r\n\t\tdouble[] tempypoints = new double[xpoints.length];\r\n\t\tdouble radians = Math.toRadians(angle%360);\r\n\t\tdouble y = pivotY;\r\n\t\tdouble x = pivotX;\r\n\t\tfor(int i = 0; i<xpoints.length; i++) {\r\n\t\t\ttempxpoints[i] = (Math.cos(radians)*(xpoints[i]-x)-Math.sin(radians)*(ypoints[i]-y)+x);\r\n\t\t\ttempypoints[i] = (Math.sin(radians)*(xpoints[i]-x)+Math.cos(radians)*(ypoints[i]-y)+y);\r\n\t\t}\r\n\t\txpoints = tempxpoints;\r\n\t\typoints = tempypoints;\r\n\t\tangle = 0;\r\n\t}",
"public double getRotation();",
"public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity)\n {\n super.setRotationAngles(par1, par2, par3, par4, par5, par6, par7Entity);\n this.wolfHeadMain.rotateAngleX = par5 / (180F / (float)Math.PI);\n this.wolfHeadMain.rotateAngleY = par4 / (180F / (float)Math.PI);\n this.wolfTail.rotateAngleX = par3;\n }",
"void setOffsetWorldRotation(DMatrix3C R);",
"public void setRotation(double rotation)\r\n\t{\r\n\t\t// AutoCAD's angle of rotation is opposite to SVG so\r\n\t\t// we have to convert it.\r\n\t\t// AutoCAD's angles are in radians and turn in the opposite\r\n\t\t// direction to SVG's.\r\n\r\n\t\tRotation = svgUtility.trimDouble(-rotation % 360.0);\r\n\t}",
"DMatrix3C getRotation();",
"@Override\n public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw,\n float headPitch, float scaleFactor, Entity entityIn) {\n super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);\n copyModelAngles(this.bipedLeftLeg, this.bipedLeftLegwear);\n copyModelAngles(this.bipedRightLeg, this.bipedRightLegwear);\n copyModelAngles(this.bipedLeftArm, this.bipedLeftArmwear);\n copyModelAngles(this.bipedRightArm, this.bipedRightArmwear);\n copyModelAngles(this.bipedBody, this.bipedBodyWear);\n\n if (entityIn.isSneaking()) {\n this.bipedCape.rotationPointY = 2.0F;\n } else {\n this.bipedCape.rotationPointY = 0.0F;\n }\n\n //Siting時の処理\n if (((EntityLittleServantBase) entityIn).isSitting()) {\n this.bipedRightArm.rotateAngleX = this.bipedRightArm.rotateAngleX * 0.5F - ((float) Math.PI / 3F);\n this.bipedLeftArm.rotateAngleX = this.bipedLeftArm.rotateAngleX * 0.5F - ((float) Math.PI / 3F);\n //this.bipedRightArm.rotateAngleZ = 10;\n\n this.bipedRightArm.rotateAngleY = -0.5235988F + 0.1f;\n this.bipedLeftArm.rotateAngleY = 0.5235988F - 0.1f;\n\n } else {\n\n }\n\n //足の動きを小さく\n this.setSmallRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);\n\n }",
"void setPrevRotations(Vec2 rotations);",
"@Override\r\n\tpublic void rotate() {\n\t\t\r\n\t}",
"public IBlockState setRotation(World world, BlockPos pos, IBlockState state, EnumFacing face, boolean hasHalf, boolean topHalf);",
"void applyRotationMatrix() {\n for (int i = 0; i < coors.length; i++) {\n for (int j = 0; j < coors[i].length; j++) {\n newCoors[i][j] = coors[i][0] * R[j][0] + coors[i][1] * R[j][1] + coors[i][2] * R[j][2];\n }\n // add perspective\n float scale = map(Math.abs(newCoors[i][2]), 0, (float) (halfSize * Math.sqrt(3)), 1, 1.5f);\n if (newCoors[i][2] < 0) {\n scale = 2f - scale;\n }\n for (int j = 0; j < 2; j++) {\n newCoors[i][j] *= scale;\n }\n }\n // to R2\n // just dont use Z\n setPathAndAlpha();\n }",
"void rotation(String sensRotation);",
"public void setCameraRotateForPickUp(float[] quat) {\n float[] newquat = normalizeQuat(quat);\n float rollRad = getRollRad(newquat);\n //Need to convert radians to convert to rotation that camera is using\n //pass to augmented image renderer and convert back into quaternion\n augmentedImageRenderer.updateCameraRotateForPickUp(eulerAnglesRadToQuat(-rollRad, 0, 0));\n }",
"protected void setupRotationOrigin()\n\t{\n\t\tthis.currentRotationAxis = new Point2D.Double(getOriginX(), getOriginY());\n\t\tupdateDefaultMomentMass();\n\t\tthis.currentMomentMass = this.defaultMomentMass;\n\t\t\n\t\t//changeRotationAxisTo(new Point2D.Double(0, 0));\n\t}",
"public void setRotation(int rotation) {\r\n\t\tthis.rotation = rotation;\r\n\t}",
"@Override\n\tpublic void setRotationAngles(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch){\n\t}",
"@Override\r\n\tpublic void setRotationAngles(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks,\r\n\t\t\tfloat netHeadYaw, float headPitch) {\n\t}",
"private void updateTransform() {\n Matrix matrix = new Matrix();\n float centerX = dataBinding.viewFinder.getWidth() / 2f;\n float centerY = dataBinding.viewFinder.getHeight() / 2f;\n int rotation = dataBinding.viewFinder.getDisplay().getRotation();\n int rotationDegrees = 0;\n switch (rotation) {\n case Surface.ROTATION_0:\n rotationDegrees = 0;\n break;\n case Surface.ROTATION_90:\n rotationDegrees = 90;\n break;\n case Surface.ROTATION_180:\n rotationDegrees = 180;\n break;\n case Surface.ROTATION_270:\n rotationDegrees = 270;\n break;\n default:\n }\n matrix.postRotate(-rotationDegrees, centerX, centerY);\n }",
"public void setRotation(int newRotation) {\n\n int progressVal = newRotation + Math.round(thisNumLEDs / 2);\n\n // If the new rotation would put the rotation value out of range, then ignore it\n\n if (progressVal < 0 | thisNumLEDs < progressVal) {\n return;\n }\n\n // Update the rotation to the new value\n currentRotation = newRotation;\n\n // Update all required widgets\n sliceRotateView.setText(Integer.toString(currentRotation));\n sliceRotateSlider.setProgress(progressVal);\n\n\n // Redraw the pattern\n updatePattern();\n }",
"@Override\n\tpublic void rotate() {\n\t}",
"public void setRotationVec(Vector3f vec, int xform) {\n\t\tm_xforms[xform].m_rotate.set(vec);\n\t}",
"void rotateTurtle(int turtleIndex, double degrees);",
"public void setRotation(float rotation){\n\t\tmBearing = rotation;\n\t}",
"@Override\npublic void setAngles(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch){\n}",
"public void rotateTransform(Vector3f rot) {\r\n\t\tMatrix4f rx = new Matrix4f();\r\n\t\tMatrix4f ry = new Matrix4f();\r\n\t\tMatrix4f rz = new Matrix4f();\r\n\t\t\t\t\r\n\t\t// Convert the angles to radians\r\n\t\tfloat x = (float) Math.toRadians(rot.x);\r\n\t\tfloat y = (float) Math.toRadians(rot.y);\r\n\t\tfloat z = (float) Math.toRadians(rot.z);\r\n\r\n\t\t// Create the X-Rotation matrix\r\n\t\trx.m[0][0] = 1.0f; rx.m[0][1] = 0.0f;\t \t\t\t rx.m[0][2] = 0.0f; \t\t\t\trx.m[0][3] = 0.0f;\r\n\t rx.m[1][0] = 0.0f; rx.m[1][1] = (float) Math.cos(x); rx.m[1][2] = (float) -Math.sin(x); rx.m[1][3] = 0.0f;\r\n\t rx.m[2][0] = 0.0f; rx.m[2][1] = (float) Math.sin(x); rx.m[2][2] = (float) Math.cos(x) ; rx.m[2][3] = 0.0f;\r\n\t rx.m[3][0] = 0.0f; rx.m[3][1] = 0.0f; \t\t\t\t rx.m[3][2] = 0.0f;\t\t \t\t\trx.m[3][3] = 1.0f;\r\n\r\n\t // Create the Y-Rotation matrix\r\n\t ry.m[0][0] = (float) Math.cos(y); ry.m[0][1] = 0.0f; ry.m[0][2] = (float) -Math.sin(y); ry.m[0][3] = 0.0f;\r\n\t ry.m[1][0] = 0.0f; \t\t\t\t ry.m[1][1] = 1.0f; ry.m[1][2] = 0.0f; \t\t\t\try.m[1][3] = 0.0f;\r\n\t ry.m[2][0] = (float) Math.sin(y); ry.m[2][1] = 0.0f; ry.m[2][2] = (float) Math.cos(y) ; ry.m[2][3] = 0.0f;\r\n\t ry.m[3][0] = 0.0f; \t\t\t\t ry.m[3][1] = 0.0f; ry.m[3][2] = 0.0f; \t\t\t\try.m[3][3] = 1.0f;\r\n\r\n\t // Create the Z-Rotation matrix\r\n\t rz.m[0][0] = (float) Math.cos(z); rz.m[0][1] = (float) -Math.sin(z); rz.m[0][2] = 0.0f; rz.m[0][3] = 0.0f;\r\n\t rz.m[1][0] = (float) Math.sin(z); rz.m[1][1] = (float) Math.cos(z) ; rz.m[1][2] = 0.0f; rz.m[1][3] = 0.0f;\r\n\t rz.m[2][0] = 0.0f; \t\t\t\t rz.m[2][1] = 0.0f; \t\t\t\t rz.m[2][2] = 1.0f; rz.m[2][3] = 0.0f;\r\n\t rz.m[3][0] = 0.0f; \t\t\t\t rz.m[3][1] = 0.0f; \t\t\t\t rz.m[3][2] = 0.0f; rz.m[3][3] = 1.0f;\r\n\t\t\t\r\n\t // Multiply all the matrices together\r\n\t\tMatrix4f rzy = rz.mult(ry);\r\n\t\tMatrix4f r = rzy.mult(rx);\r\n\t\t\t \r\n\t\tm = r.m;\r\n\r\n\t}",
"public void forceSyncRotation() {\n this.rotateCtr = 14;\n }",
"public float getRotation()\n {\n return rotation;\n }",
"public void setRotation ( float yaw , float pitch ) {\n\t\t// TODO: backwards compatibility required\n\t\texecute ( handle -> handle.setRotation ( yaw , pitch ) );\n\t}",
"public void setRotationVec(Vector3f vec) {\n\t\tm_xforms[NvCameraXformType.MAIN].m_rotate.set(vec);\n\t}",
"public void zRotate() {\n\t\t\n\t}",
"public void setRotation(float newRotation)\n {\n setRotation(newRotation, Anchor.CENTER.of(this));\n }",
"@Override\n\tpublic void setOrientation(Vector3 orient) {\n\n\t}",
"void copyRotation(DMatrix3 R);",
"void orientation(double xOrientation, double yOrientation, double zOrientation);",
"@Override\r\n\tpublic void rotar() {\n\r\n\t}",
"private void rotate() {\n byte tmp = topEdge;\n topEdge = leftEdge;\n leftEdge = botEdge;\n botEdge = rightEdge;\n rightEdge = tmp;\n tmp = reversedTopEdge;\n reversedTopEdge = reversedLeftEdge;\n reversedLeftEdge = reversedBotEdge;\n reversedBotEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n tmp = ltCorner;\n ltCorner = lbCorner;\n lbCorner = rbCorner;\n rbCorner = rtCorner;\n rtCorner = tmp;\n\n }",
"public void setRotationModifer(int degrees) {\n\t\tthis.rotation = degrees;\n\t}",
"public void resetAngle() {\n\t\t//this.angle = (this.orientation % 4 + 4) * (90);\n\t\tthis.angle = this.orientation * 90*-1;\n\t\tthis.tweenAngle.setCurrentValue(this.angle);\n\t\tthis.tweenAngle.setTargetValue(this.angle);\n\t}",
"void setOrientation(int orientation) {\n }",
"public abstract void rotate();",
"public void updateOrientationAngles() {\n // Update rotation matrix, which is needed to update orientation angles.\n //mSensorManager.getRotationMatrix(mRotationMatrix, null,\n // mAccelerometerReading, mMagnetometerReading);\n\n // \"mRotationMatrix\" now has up-to-date information.\n\n mSensorManager.getOrientation(mRotationMatrix, mOrientationAngles);\n\n // \"mOrientationAngles\" now has up-to-date information.\n\n mGLView.updateScene(mOrientationAngles[0],mOrientationAngles[1],mOrientationAngles[2]);\n }",
"public void applyRotationForce(double force);",
"@Override\n\tpublic void setRotationAngles(PlayerEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch){\n\n\t}",
"public void setRotation(Array<Body> objects) {\n this.state.setRotation(this, objects);\n }",
"void rotate();",
"@Override\n\tpublic void setOrientation(Quat4d orientation) {\n\t\t\n\t}",
"public void setRotation(Quaternionf quaternion) {\n\t\trotation = quaternion;\n\t\tmodified = true;\n\t}",
"void copyOffsetRotation (DMatrix3 R);",
"@Override\n\tpublic void rotation(double rx, double ry, double rz) {\n\t\tint i;\n\t\t\n\t\tfor (i = 0; i<6; i++) {\n\t\t\tthis.plans.get(i).rotation(rx, ry, rz);\n\t\t}\n\t\t//Ca me parait un peu foireux comme methode faudra voir apres ave l'interface graphique si\n\t\t//�a marche comme �a.\n\t}",
"public void setPhysicsRotation(Quaternion rotation) {\n rBody.getCenterOfMassTransform(tempTrans);\n Converter.convert(rotation, tempTrans.basis);\n rBody.setCenterOfMassTransform(tempTrans);\n motionState.setWorldTransform(tempTrans);\n }",
"@Override\n public void setOrientation(float x, float y, float z) {\n String degreeString = getString(R.string.motion_orientation_degree);\n /*orientationX.setText(String.format(degreeString, x));\n orientationY.setText(String.format(degreeString, y));\n orientationZ.setText(String.format(degreeString, z));\n*/\n if (gdxAdapter != null) {\n gdxAdapter.setOrientation(x, y, z);\n }\n }",
"public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)\n {\n }",
"public void setRotation(float newRotation, PointF newPivot)\n {\n this.rotation = newRotation;\n this.rotationPivot = newPivot;\n \n updateTransform();\n notifyParentOfPositionChange();\n conditionallyRepaint();\n }",
"public void setRot(double rad, Vector3d axis) {\r\n transform3D.setRotation(new AxisAngle4d(axis.x, axis.y, axis.z, rad));\r\n transformGroup.setTransform(transform3D);\r\n }",
"public void setSystem_rotation(byte system_rotation) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 5, system_rotation);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 5, system_rotation);\n\t\t}\n\t}"
] | [
"0.72926825",
"0.7153771",
"0.69096076",
"0.6716232",
"0.66996807",
"0.6697504",
"0.6691873",
"0.66406965",
"0.6621071",
"0.6618826",
"0.65655965",
"0.65456283",
"0.64727277",
"0.6470881",
"0.6462611",
"0.6448111",
"0.6448111",
"0.6448111",
"0.6448111",
"0.6448111",
"0.6437831",
"0.64348274",
"0.64281094",
"0.64040095",
"0.63815004",
"0.6380736",
"0.6363562",
"0.63391757",
"0.6334774",
"0.6276885",
"0.6272932",
"0.62473553",
"0.61953586",
"0.617034",
"0.6151824",
"0.6116768",
"0.61068183",
"0.6096277",
"0.60913664",
"0.60302943",
"0.60217315",
"0.6005724",
"0.5998847",
"0.5995021",
"0.5993234",
"0.59840673",
"0.59514564",
"0.5938508",
"0.592234",
"0.5902239",
"0.58932775",
"0.586155",
"0.58504266",
"0.58265287",
"0.58243996",
"0.58195734",
"0.5816919",
"0.5815929",
"0.5812668",
"0.58085674",
"0.5808369",
"0.5803883",
"0.5795293",
"0.57885194",
"0.5779382",
"0.5775976",
"0.57682854",
"0.576683",
"0.57667655",
"0.5758299",
"0.5757601",
"0.57535547",
"0.5750997",
"0.5746365",
"0.57364625",
"0.5728159",
"0.5727374",
"0.57174605",
"0.5717227",
"0.57142806",
"0.57088166",
"0.5703255",
"0.5691379",
"0.56875014",
"0.56842345",
"0.56715256",
"0.56688184",
"0.56619954",
"0.5657854",
"0.56547576"
] | 0.6493676 | 20 |
TODO Autogenerated method stub | @Override
public void execute(DelegateExecution execution) throws Exception {
ArticleProcessDto articleProcessDto = (ArticleProcessDto) execution.getVariable("articleProcessDto");
String nextReviewer = (String) execution.getVariable("additional_reviewer");
// EditorReviewerByScienceArea rev = unityOfWork.getEditorReviewerByScienceAreaRepository().getOne(Long.parseLong(nextReviewerId));
// String nextReviewer = rev.getEditorReviewer().getUserUsername();
articleProcessDto.getReviewers().add(nextReviewer);
execution.setVariable("articleProcessDto", articleProcessDto);
execution.setVariable("newInitiator", nextReviewer);
} | {
"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 |
Set up the PSBroker. | @Before
public void setUp() throws Exception {
if (broker == null) {
broker = new PSBrokerBuilder().build();
intSub = new IntegerSubscriber();
unreadSub = new UnreadMessageSubscriber();
pIntSub = new PredicatedIntegerSubscriber();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tprotected void setup() {\n\t\tgetContentManager().registerLanguage(codec);\r\n\t\tgetContentManager().registerOntology(ontology);\r\n\t\t\r\n\t\tObject[] args = getArguments();\r\n\t\tif(args != null && args.length > 0) {\r\n\t\t\tbroker = (Broker)args[0];\r\n\t\t} else {\r\n\t\t\tbroker = new Broker(\"Broker\");\r\n\t\t}\r\n\t\t\r\n\t\tProgramGUI.getInstance().printToLog(broker.hashCode(), getLocalName(), \"created\", Color.GREEN.darker());\r\n\t\t\r\n\t\t// Register in the DF\r\n\t\tDFRegistry.register(this, BROKER_AGENT);\r\n\t\t\r\n\t\tsubscribeToRetailers();\r\n\t\tquery();\r\n\t\tpurchase();\r\n\t}",
"@BeforeMethod\n void setup() throws Exception {\n bkEnsemble = new LocalBookkeeperEnsemble(3, 0, () -> 0);\n bkEnsemble.start();\n // Start broker\n ServiceConfiguration config = new ServiceConfiguration();\n config.setLoadManagerClassName(ModularLoadManagerImpl.class.getName());\n config.setClusterName(\"use\");\n config.setWebServicePort(Optional.of(0));\n config.setMetadataStoreUrl(\"zk:127.0.0.1:\" + bkEnsemble.getZookeeperPort());\n\n config.setAdvertisedAddress(\"localhost\");\n config.setBrokerShutdownTimeoutMs(0L);\n config.setLoadBalancerOverrideBrokerNicSpeedGbps(Optional.of(1.0d));\n config.setBrokerServicePort(Optional.of(0));\n config.setBrokerServicePortTls(Optional.of(0));\n config.setWebServicePortTls(Optional.of(0));\n pulsar = new PulsarService(config);\n pulsar.start();\n }",
"private void setupBroker(String uri) {\n try {\n broker = BrokerFactory.createBroker(uri);\n\n VirtualDestinationInterceptor interceptor = new VirtualDestinationInterceptor();\n VirtualTopic virtualTopic = new VirtualTopic();\n virtualTopic.setName(\"VirtualOrders.>\");\n virtualTopic.setSelectorAware(true);\n VirtualDestination[] virtualDestinations = { virtualTopic };\n interceptor.setVirtualDestinations(virtualDestinations);\n broker.setDestinationInterceptors(new DestinationInterceptor[]{interceptor});\n\n SubQueueSelectorCacheBrokerPlugin subQueueSelectorCacheBrokerPlugin = new SubQueueSelectorCacheBrokerPlugin();\n BrokerPlugin[] updatedPlugins = {subQueueSelectorCacheBrokerPlugin};\n broker.setPlugins(updatedPlugins);\n\n broker.setUseJmx(false);\n broker.start();\n broker.waitUntilStarted();\n } catch (Exception e) {\n LOG.error(\"Failed creating broker\", e);\n }\n }",
"@Override\n protected void setUp() throws Exception {\n brokerService = new BrokerService();\n LevelDBStore adaptor = new LevelDBStore();\n brokerService.setPersistenceAdapter(adaptor);\n brokerService.deleteAllMessages();\n\n // A small max page size makes this issue occur faster.\n PolicyMap policyMap = new PolicyMap();\n PolicyEntry pe = new PolicyEntry();\n pe.setMaxPageSize(1);\n policyMap.put(new ActiveMQQueue(\">\"), pe);\n brokerService.setDestinationPolicy(policyMap);\n\n brokerService.addConnector(ACTIVEMQ_BROKER_BIND);\n brokerService.start();\n\n ACTIVEMQ_BROKER_URI = brokerService.getTransportConnectors().get(0).getPublishableConnectString();\n destination = new ActiveMQQueue(getName());\n }",
"public void init() {\n configuration.init();\n \n //Connections connections = configuration.getBroker().getConnections(\"topic\");\n Connections connections = configuration.getBrokerPool().getBroker().getConnections(\"topic\");\n \n if (connections == null) {\n handleException(\"Couldn't find the connection factor: \" + \"topic\");\n }\n \n sensorCatalog = new SensorCatalog();\n clientCatalog = new ClientCatalog();\n \n nodeCatalog = new NodeCatalog();\n \n updateManager = new UpdateManager(configuration, sensorCatalog, this);\n updateManager.init();\n \n endpointAllocator = new EndpointAllocator(configuration, nodeCatalog);\n\n registry = new JCRRegistry(this);\n registry.init();\n\n // Initialize Public-End-Point\n if(!isPublicEndPointInit) {\n \tinitPublicEndpoint();\n }\n }",
"@PostConstruct\n private void init() {\n Properties props = new Properties();\n props.put(\"oracle.user.name\", user);\n props.put(\"oracle.password\", pwd);\n props.put(\"oracle.service.name\", serviceName);\n //props.put(\"oracle.instance.name\", instanceName);\n props.put(\"oracle.net.tns_admin\", tnsAdmin); //eg: \"/user/home\" if ojdbc.properies file is in home \n props.put(\"security.protocol\", protocol);\n props.put(\"bootstrap.servers\", broker);\n //props.put(\"group.id\", group);\n props.put(\"enable.auto.commit\", \"true\");\n props.put(\"auto.commit.interval.ms\", \"10000\");\n props.put(\"linger.ms\", 1000);\n // Set how to serialize key/value pairs\n props.setProperty(\"key.serializer\", \"org.oracle.okafka.common.serialization.StringSerializer\");\n props.setProperty(\"value.serializer\", \"org.oracle.okafka.common.serialization.StringSerializer\");\n\n producer = new KafkaProducer<>(props);\n }",
"@Override\n protected void doPreSetup() throws Exception {\n broker = new EmbeddedActiveMQ();\n deleteDirectory(\"target/data\");\n port = AvailablePortFinder.getNextAvailable();\n brokerUri = \"tcp://localhost:\" + port;\n configureBroker(this.broker);\n startBroker();\n }",
"private void setupAmqpEndpoits() {\n\n // NOTE : Last Will and Testament Service endpoint is opened only if MQTT client provides will information\n // The receiver on the unique client publish address will be opened only after\n // connection is established (and CONNACK sent to the MQTT client)\n\n // setup and open AMQP endpoint for receiving on unique client control/publish addresses\n ProtonReceiver receiverControl = this.connection.createReceiver(String.format(AmqpReceiverEndpoint.CLIENT_CONTROL_ENDPOINT_TEMPLATE, this.mqttEndpoint.clientIdentifier()));\n ProtonReceiver receiverPublish = this.connection.createReceiver(String.format(AmqpReceiverEndpoint.CLIENT_PUBLISH_ENDPOINT_TEMPLATE, this.mqttEndpoint.clientIdentifier()));\n this.rcvEndpoint = new AmqpReceiverEndpoint(new AmqpReceiver(receiverControl, receiverPublish));\n\n // setup and open AMQP endpoint to Subscription Service\n ProtonSender ssSender = this.connection.createSender(AmqpSubscriptionServiceEndpoint.SUBSCRIPTION_SERVICE_ENDPOINT);\n this.ssEndpoint = new AmqpSubscriptionServiceEndpoint(ssSender);\n\n // setup and open AMQP endpoint for publishing\n ProtonSender senderPubrel = this.connection.createSender(String.format(AmqpPublishEndpoint.AMQP_CLIENT_PUBREL_ENDPOINT_TEMPLATE, this.mqttEndpoint.clientIdentifier()));\n this.pubEndpoint = new AmqpPublishEndpoint(senderPubrel);\n\n this.rcvEndpoint.openControl();\n this.ssEndpoint.open();\n this.pubEndpoint.open();\n }",
"@BeforeClass\n public static void setup() throws Exception {\n LOGGER.info(\"Setting up PIP Testing\");\n //\n // Create instance\n //\n pipEngine = new GetOperationOutcomePip();\n //\n // Load our test properties to use\n //\n Properties properties = new Properties();\n try (FileInputStream is = new FileInputStream(\"src/test/resources/test.properties\")) {\n properties.load(is);\n }\n //\n // Configure it using properties\n //\n pipEngine.configure(\"issuer\", properties);\n LOGGER.info(\"PIP configured now creating our entity manager\");\n LOGGER.info(\"properties {}\", properties);\n //\n // Connect to in-mem db\n //\n String persistenceUnit = GetOperationOutcomePip.ISSUER_NAME + \".persistenceunit\";\n LOGGER.info(\"persistenceunit {}\", persistenceUnit);\n em = Persistence.createEntityManagerFactory(properties.getProperty(persistenceUnit), properties)\n .createEntityManager();\n //\n //\n //\n LOGGER.info(\"Configured own entity manager\", em.toString());\n }",
"protected void setup() {\n\t\tSystem.out.println(\"Broker Agent \"+getAID().getName()+\" is ready.\");\r\n\t\tthis.getContentManager().registerLanguage(new SLCodec());\r\n\t\tthis.getContentManager().registerOntology(RequestOntology.getInstance());\r\n\t\t\r\n\t\tObject[] args = getArguments();\r\n\t\tif (args != null && args.length > 0) {\r\n\t\t\tprice = (String) args[0];\r\n\t\t\tvolume= (String) args[1];\r\n\t\t\t\r\n\t\t\tDFAgentDescription dfd = new DFAgentDescription();\r\n\t\t\tdfd.setName(getAID());\r\n\t\t\tServiceDescription sd = new ServiceDescription();\r\n\t\t\tsd.setType(\"energy-selling\");\r\n\t\t\tsd.setName(\"Energy-Broker\");\r\n\t\t\tdfd.addServices(sd);\r\n\t\t\ttry {\r\n\t\t\t\tDFService.register(this, dfd);\r\n\t\t\t}\r\n\t\t\tcatch (FIPAException fe) {\r\n\t\t\t\tfe.printStackTrace();\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(getAID().getName()+\" No available arguments\");\r\n\t\t\tdoDelete();\r\n\t\t}\r\n\t\taddBehaviour(new BOReply(this));\r\n\t}",
"@Override\r\n\tprotected void setup() {\n\t\tgetContentManager().registerLanguage(codec);\r\n\t\tgetContentManager().registerOntology(ontology);\r\n\t\t\r\n\t\t// Register in the DF\r\n\t\tDFRegistry.register(this, BROKER_AGENT);\r\n\t\t\r\n\t\t// Find retailers\r\n\t\tsubscribeToRetailers();\r\n\t\t\r\n\t\t// Run agent\r\n\t\tquery();\r\n\t\tpurchase();\r\n\t}",
"public setup() {\n dbConnection = \"jdbc:\"+DEFAULT_DB_TYPE+\"://\"+DEFAULT_DB_HOST+\":\"+DEFAULT_DB_PORT+\"/\"+DEFAULT_DB_PATH;\n dbType = DEFAULT_DB_TYPE;\n dbUser = DEFAULT_DB_USER;\n dbPass = DEFAULT_DB_PASSWORD;\n beginSetup();\n }",
"private void initializeProducers(ComponentContext context) {\n BrokerHost rfHost;\n Properties prop = MQUtil.getProp(context);\n if (prop == null) {\n log.error(\"RabbitMQ configuration file not found...\");\n return;\n }\n try {\n correlationId = prop.getProperty(SENDER_COR_ID);\n rfHost = new BrokerHost(MQUtil.getMqUrl(\n prop.getProperty(SERVER_PROTO),\n prop.getProperty(SERVER_UNAME),\n prop.getProperty(SERVER_PWD),\n prop.getProperty(SERVER_ADDR),\n prop.getProperty(SERVER_PORT),\n prop.getProperty(SERVER_VHOST)));\n\n manageSender = registerProducer(rfHost,\n MQUtil.rfProducerChannelConf(\n prop.getProperty(SENDER_EXCHG),\n prop.getProperty(ROUTE_KEY),\n prop.getProperty(SENDER_QUEUE)),\n msgOutQueue);\n } catch (Exception e) {\n throw new IllegalStateException(e);\n }\n manageSender.start();\n }",
"@PostConstruct\n private void init() {\n if(properties != null && properties.getOverride()) {\n LOGGER.info(\"############# Override Rabbit MQ Settings #############\");\n\n amqpAdmin.deleteExchange(DIRECT_EXCHANGE);\n amqpAdmin.declareExchange(\n new DirectExchange(DIRECT_EXCHANGE, true, false));\n\n bindingQueue(DIRECT_EXCHANGE, REGISTER_QUEUE,\n DIRECT_REGISTER_ROUTER_KEY);\n bindingQueue(DIRECT_EXCHANGE, SEND_TEMPLATE_EMAIL_QUEUE,\n SEND_TEMPLATE_EMAIL_QUEUE_ROUTER_KEY);\n bindingQueue(DIRECT_EXCHANGE, SUBJECT_REQUEST_VOTE_QUEUE,\n SUBJECT_REQUEST_VOTE_QUEUE_ROUTER_KEY);\n }\n }",
"protected void setup() throws SQLException {\n\t\ttry {\n\t\t\t// get connection factory\n\t\t\tQueueConnectionFactory factory = AQjmsFactory.getQueueConnectionFactory(getOracleDataSource());\n\n\t\t\t// create jms connection\n\t\t\tconn = factory.createQueueConnection();\n\n\t\t\t// set exception listener\n\t\t\tconn.setExceptionListener(this);\n\n\t\t\t// set event listener\n\t\t\t//((com.sun.messaging.jms.Connection) conn).setEventListener(this);\n\n\t\t\t// test if this is a HA connection\n\t\t\t//isHAConnection = ((com.sun.messaging.jms.Connection) conn).isConnectedToHABroker();\n\t\t\t//log(\"Is connected to HA broker cluster: \" + isHAConnection);\n\n\t\t\t// get destination name\n\t\t\tString destName = FailoverQSender.TEST_DEST_NAME;\n\n\t\t\t// create a transacted session\n\t\t\tsession = conn.createQueueSession(true, -1);\n\n\t\t\t// get destination\n\t\t\tqueue = session.createQueue(destName);\n\n\t\t\t// create queue receiver\n\t\t\tqreceiver = session.createReceiver(queue);\n\t\t\t// set isConnected flag to true\n\t\t\tisConnected = true;\n\t\t\t// start the JMS connection\n\t\t\tconn.start();\n\t\t\tlog(\"Ready to receive on destination: \" + destName);\n\t\t} catch (JMSException jmse) {\n\t\t\tisConnected = false;\n\t\t\tlog(jmse);\n\t\t\tclose();\n\t\t}\n\t}",
"public void setup_connections()\n {\n setup_servers();\n setup_clients();\n }",
"@BeforeClass\n public void setup()\n throws Exception {\n startZk();\n startController();\n startBroker();\n startKafka();\n }",
"public void initialize() {\r\n\r\n\t\t/** URL of the ActiveMQ broker, prepended by transport protocol **/\r\n\t\tString brokerUrl = config.getConfig().getString(\"broker_url\");\r\n\r\n\t\t/** Topic to subscribe to for receiving access to all notifications **/\r\n\t\tString topicName = config.getConfig().getString(\"topic\");\r\n\r\n\t\t/** Username for authenticating with the ActiveMQ broker **/\r\n\t\tString userName = config.getConfig().getString(\"user\");\r\n\r\n\t\t/** The password corresponding to the username **/\r\n\t\tString password = config.getConfig().getString(\"password\");\r\n\r\n\t\t// Creates a connection\r\n\t\tActiveMQSslConnectionFactory connectionFactory = new ActiveMQSslConnectionFactory(\r\n\t\t\t\tbrokerUrl);\r\n\r\n\t\t// Setting the trust manager to the connection factory\r\n\t\tconnectionFactory.setKeyAndTrustManagers(null, trustedCerts,\r\n\t\t\t\tnew SecureRandom());\r\n\t\tconnectionFactory.setWatchTopicAdvisories(false);\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (logger.isDebugEnabled()){\r\n\t\t\t\tlogger.debug(\"creating connection to \" + brokerUrl);\r\n\t\t\t}\r\n\t\t\t// Connect to the broker\r\n\t\t\tConnection connection = connectionFactory.createConnection(\r\n\t\t\t\t\tuserName, password);\r\n\r\n\t\t\t// Creating session for sending messages\r\n\t\t\tsession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);\r\n\t\t\tconnection.start();\r\n\r\n\t\t\t// Creating the topic (i.e. creating a link to the already existing\r\n\t\t\t// one on the broker)\r\n\t\t\tTopic topic = session.createTopic(topicName);\r\n\r\n\t\t\t// MessageConsumer is used for receiving (consuming) messages from\r\n\t\t\t// the topic (above given threshold)\r\n\t\t\tMessageConsumer consumer = session.createConsumer(topic);\r\n\t\t\tconsumer.setMessageListener(this);\r\n\r\n\t\t\tif (logger.isDebugEnabled()) {\r\n\t\t\t\tlogger.debug(\"Connection to Notification with Id \"\r\n\t\t\t\t\t\t+ connection.getClientID() + \" Listening for messages\");\r\n\t\t\t}\r\n\r\n\t\t} catch (JMSException e) {\r\n\t\t\tsession = null;\r\n\t\t\tlogger.error(\"[JMS Exception] \" + e.getMessage());\r\n\t\t}\r\n\t}",
"public void setup(){\n this.cluster = Cluster.builder().addContactPoint(\"127.0.0.1\").build();\n this.session = this.cluster.connect(\"demo\");\n }",
"private void beginSetup() {\n try {\n if (dbType.equals(\"mysql\")) {\n Class.forName(\"gwe.sql.gweMysqlDriver\");\n }\n else if (dbType.equals(\"postgresql\")) {\n Class.forName(\"org.postgresql.Driver\");\n }\n } catch (ClassNotFoundException cnfe) {\n System.out.println(\"setup constructor ClassNotFound: \"+cnfe);\n System.out.println(\"Could not load the mysql driver: please check your classpath\");\n System.exit(-1);\n }\n\n try {\n if (!tableExists(DEFAULT_DB_CONFIG_TABLE)) {\n createConfigTable(DEFAULT_DB_CONFIG_TABLE);\n }\n } catch (SQLException sqle) {\n System.out.println(\"setup beginSetup SQLException: \"+sqle);\n System.out.println(\"Trouble interacting with vizConfig database table\");\n System.exit(-2);\n }\n prepareFrame();\n }",
"protected void setup(){\n setupRouter();\n \n if( bluetoothEnabled ){\n setupBluetooth();\n }\n }",
"private void setup() throws Exception {\n\t}",
"@PostConstruct\n\tprivate void init() throws Exception {\n\t\tamazonSNSClient.listTopics();\n\t}",
"private void initializeProducers() {\r\n\t\tlogger.info(\"--> initializeProducers\");\r\n\t\t// actual Kafka producer used by all generic producers\r\n\t\ttry {\r\n\t\t\tsharedAvroProducer = new KafkaProducer<EDXLDistribution, IndexedRecord>(ProducerProperties.getInstance(connectModeSec));\r\n\t\t} catch (Exception cEx) {\r\n\t\t\tlogger.info(\"CISAdapter failed to create a KafkaProducer!\");\r\n\t\t\tcEx.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tlogger.info(\"Check Adpter DEV Mode\");\r\n\t\t\theartbeatProducer = new HeartbeatProducer(sharedAvroProducer, TopicConstants.HEARTBEAT_TOPIC);\t\r\n\t\t\theartbeatProducer.sendInitialHeartbeat();\r\n\t\t\taddAvroReceiver(TopicConstants.ADMIN_HEARTBEAT_TOPIC, new AdminHeartbeatConsumer(null));\r\n\t\t\tadpterMode = AdapterMode.DEV_MODE;\r\n\t\t} catch (Exception cEx) {\r\n\t\t\tlogger.info(\"CISAdapter initialized failed with non secure connection!\");\r\n\t\t\tlogger.info(\"Check Adpter SEC DEV Mode\");\r\n\t\t\tconnectModeSec = true;\r\n\t\t\tsharedAvroProducer = new KafkaProducer<EDXLDistribution, IndexedRecord>(ProducerProperties.getInstance(connectModeSec));\r\n\t\t\ttry {\r\n\t\t\t\theartbeatProducer = new HeartbeatProducer(sharedAvroProducer, TopicConstants.HEARTBEAT_TOPIC);\t\r\n\t\t\t\theartbeatProducer.sendInitialHeartbeat();\r\n\t\t\t\taddAvroReceiver(TopicConstants.ADMIN_HEARTBEAT_TOPIC, new AdminHeartbeatConsumer(null));\r\n\t\t\t\tadpterMode = AdapterMode.SEC_DEV_MODE;\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlogger.info(\"Adapter running in TRIAL Mode, wait for AdminTool heartbeat for futur initalization!\");\r\n\t\t\t\taddAvroReceiver(TopicConstants.ADMIN_HEARTBEAT_TOPIC, new AdminHeartbeatConsumer(CISAdapter.aMe));\r\n\t\t\t\tadpterMode = AdapterMode.TRIAL_MODE;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (adpterMode != AdapterMode.TRIAL_MODE) {\r\n\t\t\tinitCoreTopics();\r\n\t\t\tadapterInitDone = true;\t\r\n\t\t} \r\n\t\tlogger.info(\"initializeProducers -->\");\r\n\t}",
"private void setupMqttEndpoint() {\n\n this.mqttEndpoint\n .publishHandler(this::publishHandler)\n .publishAcknowledgeHandler(this::pubackHandler)\n .publishReleaseHandler(this::pubrelHandler)\n .publishReceivedHandler(this::pubrecHandler)\n .publishCompletionHandler(this::pubcompHandler)\n .subscribeHandler(this::subscribeHandler)\n .unsubscribeHandler(this::unsubscribeHandler)\n .disconnectHandler(this::disconnectHandler)\n .closeHandler(this::closeHandler);\n }",
"void setup( File storeDir, Consumer<GraphDatabaseService> create );",
"protected void setUp() throws Exception {\n super.setUp();\n this.XmlRpcServiceRouter = new XmlRpcServiceRouter();\n }",
"public static void init()\n {\n try\n {\n // The newInstance() call is a work around for some broken Java implementations\n Class.forName(\"com.mysql.jdbc.Driver\").newInstance();\n\n // Create a new configuration object\n BoneCPConfig config = new BoneCPConfig();\n\n // Setup the configuration\n config.setJdbcUrl(\"jdbc:mysql://cs304.c0mk5mvcjljr.us-west-2.rds.amazonaws.com/cs304\"); // jdbc url specific to your database, eg jdbc:mysql://127.0.0.1/yourdb\n config.setUsername(\"cs304\");\n config.setPassword(\"ubccs304\");\n config.setConnectionTestStatement(\"SELECT 1\");\n config.setConnectionTimeout(10, TimeUnit.SECONDS);\n config.setMinConnectionsPerPartition(5);\n config.setMaxConnectionsPerPartition(10);\n config.setPartitionCount(1);\n\n // Setup the connection pool\n _pool = new BoneCP(config);\n\n // Log\n LogManager.getLogger(DatabasePoolManager.class).info(\"Database configuration initialized\");\n }\n catch (Exception ex)\n {\n // Log\n LogManager.getLogger(DatabasePoolManager.class).fatal(\"Could not initialize Database configuration\", ex);\n }\n\n }",
"void setBrokerName(String brokerName);",
"public void initialize(JMSSettings settings) {\n super.initialize(settings);\n durableConsumers = settings.useDurableConsumers();\n }",
"protected void connect() {\n\t\treadProperties();\n\t\tif (validateProperties())\n\t\t\tjuraMqttClient = createClient();\n\t}",
"public PSO() {\r\n initialiseNetwork();\r\n initialisePSO();\r\n }",
"@Override\r\n\tprotected void setup() {\r\n System.out.println(\"Hallo! Seller-agent \"+getAID().getName()+\" is ready.\");\r\n Object[] args = getArguments();\r\n //We get the two first arguments to set the tolerance and the change rate\r\n if (args != null && args.length > 1) {\r\n\t\t// Create the catalogue\r\n\t\tcatalogue = new Hashtable();\r\n tolerance = Integer.parseInt((String)args[0]);\r\n change = Integer.parseInt((String)args[1]);\r\n \r\n System.out.println(\"My tolerance is \" + tolerance + \" and i will change with a rate of \" + change);\r\n \r\n\t\t// Create and show the GUI \r\n\t\tmyGui = new BookSellerGui(this);\r\n\t\tmyGui.showGui();\r\n\r\n\t\t// Register the book-selling service in the yellow pages\r\n\t\tDFAgentDescription dfd = new DFAgentDescription();\r\n\t\tdfd.setName(getAID());\r\n System.out.println(\"\");\r\n\t\tServiceDescription sd = new ServiceDescription();\r\n\t\tsd.setType(\"book-selling\");\r\n\t\tsd.setName(\"JADE-book-trading\");\r\n\t\tdfd.addServices(sd);\r\n\t\ttry {\r\n\t\t\tDFService.register(this, dfd);\r\n\t\t}\r\n\t\tcatch (FIPAException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\r\n\t\t// Add the behaviour serving queries from buyer agents\r\n\t\taddBehaviour(new OfferRequestsServer());\r\n\r\n\t\t// Add the behaviour serving purchase orders from buyer agents\r\n\t\taddBehaviour(new PurchaseOrdersServer());\r\n \r\n //------------------------------------------------------------------------------\r\n //MODIF : If the seller has no more book to sell, he is terminated. It is check every minute\r\n //------------------------------------------------------------------------------\r\n addBehaviour(new TickerBehaviour(this, 60000) {\r\n @Override\r\n protected void onTick() {\r\n if(catalogue.isEmpty()){\r\n myAgent.doDelete();\r\n }\r\n }\r\n });\r\n }\r\n\t}",
"@BeforeClass\n\tpublic static void setUpBeforeClass() throws Exception {\n\t\tSystem.setProperty(\"spring.kafka.bootstrap-servers\", embeddedKafka.getBrokersAsString());\n\t}",
"public void init(int yea)\n {\n try\n {\n InitialContext initialContext = new InitialContext(getProperties());\n //logger.info(\"initial context successful\");\n\n// ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup(\"/ConnectionFactory\");\n// System.out.println(\"lookup successful\");\n// Connection connection = connectionFactory.createConnection();\n//\n// Queue bridgeQueue = (Queue)initialContext.lookup(\"/queue/bridgeQueue\");\n// Queue himsQueue = (Queue)initialContext.lookup(\"/queue/himsQueue\");\n//\n// Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);\n// consumer = session.createConsumer(bridgeQueue);\n// producer = session.createProducer(himsQueue);\n\n System.out.println(\"connection successful\");\n //logger.info(\"Jms Connection factory and resources created without errors\");\n// connection.start();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n //logger.error(\"error looking up jms connection factory\", e);\n }\n }",
"@Override\r\n\tpublic void startup()\r\n\t{\n\t\tif (LOG.isDebugEnabled())\r\n\t\t{\r\n\t\t\tLOG.debug(\"starting broker by plugging configured engines\");\r\n\t\t}\r\n\t\tconfigure(broker);\r\n\t\t\r\n\t\t// register this engine for handling new (Un)PlugEvents\r\n\t\tProcessingEngine processing = broker.getEngine(ProcessingEngine.class);\r\n\t\tif (processing == null)\r\n\t\t{\r\n\t\t\tLOG.error(\"no processing engine available for registering event \"\r\n\t\t\t\t\t+ \"handlers\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tprocessing.registerEventClass(PlugEvent.class, this);\r\n\t}",
"@Override\n public void init(ConfigurationContext cfgCtx, TransportOutDescription transportOut)\n throws AxisFault {\n super.init(cfgCtx, transportOut);\n rabbitMQConnectionFactoryManager = new RabbitMQConnectionFactoryManager(transportOut);\n log.info(\"RabbitMQ AMQP Transport Sender initialized...\");\n\n }",
"@Override\r\n protected void configure() {\r\n bindRequiredName(\"LTAS_SERVICE_NAME\", \"LTAS_SERVICE_NAME\");\r\n bindRequiredName(\"RABBITMQ_HOST\", \"RABBITMQ_HOST\");\r\n bindRequiredName(\"RABBITMQ_PORT\", \"RABBITMQ_PORT\");\r\n bindRequiredName(\"RABBITMQ_USERNAME\", \"RABBITMQ_USERNAME\");\r\n bindRequiredName(\"RABBITMQ_PWD\", \"RABBITMQ_PWD\");\r\n bindRequiredName(\"RABBITMQ_VIRTUALHOST\", \"RABBITMQ_VIRTUALHOST\");\r\n\r\n bind(RabbitMQAPI.class);\r\n bind(RabbitMQService.class);\r\n\r\n }",
"@Before\n public void setUp() throws Exception {\n csConf = new CapacitySchedulerConfiguration();\n csConf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class,\n ResourceScheduler.class);\n\n // By default, set 3 queues, a/b, and a.a1\n csConf.setQueues(\"root\", new String[]{\"a\", \"b\"});\n csConf.setNonLabeledQueueWeight(\"root\", 1f);\n csConf.setNonLabeledQueueWeight(\"root.a\", 1f);\n csConf.setNonLabeledQueueWeight(\"root.b\", 1f);\n csConf.setQueues(\"root.a\", new String[]{\"a1\"});\n csConf.setNonLabeledQueueWeight(\"root.a.a1\", 1f);\n csConf.setAutoQueueCreationV2Enabled(\"root\", true);\n csConf.setAutoQueueCreationV2Enabled(\"root.a\", true);\n csConf.setAutoQueueCreationV2Enabled(\"root.e\", true);\n csConf.setAutoQueueCreationV2Enabled(PARENT_QUEUE, true);\n // Test for auto deletion when expired\n csConf.setAutoExpiredDeletionTime(1);\n }",
"public static void init(Integer tps, String db_drivername, String db_url, String db_user, String db_password, String mq_ip, Integer mq_port) {\n\t\ttry {\n\t\t\tEmployeeInputWorker.mqConsumerPool.shutdown();\n\t\t} catch (Exception ex) {\n\t\t}\n\t\ttry {\n\t\t\tEmployeeInputWorker.dbConnectionPool.shutdown();\n\t\t} catch (Exception ex) {\n\t\t}\n\t\ttry {\n\t\t\tEmployeeInputWorker.mqProducerPool.shutdown();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\ttpsController = new ThroughputController(tps);\n\t\tdbConnectionPool = new JDBCConnectionPool(db_drivername, db_url, db_user, db_password);\n\t\tmqConsumerPool = new RabbitMQConsConnectionPool(mq_ip, mq_port, EmployeeInputWorker.class.getName());\n\t\tmqProducerPool = new RabbitMQProdConnectionPool(mq_ip, mq_port, EmployeeInputWorker.class.getName());\n\n\t\t// mqConsumerPool = new ActiveMQConsConnectionPool(\"localhost\", 61616);\n\t\t// mqProducerPool = new ActiveMQProdConnectionPool(\"localhost\", 61616);\n\t\t// mqProducerPool = new IBMMQProdConnectionPool(\"localhost\", 1415, \"IIB10QMGR\",\n\t\t// \"SYSTEM.ADMIN.SVRCONN\");\n\t\t// mqConsumerPool = new IBMMQConsConnectionPool(\"localhost\", 1415, \"IIB10QMGR\",\n\t\t// \"SYSTEM.ADMIN.SVRCONN\");\n\t}",
"public void configureAndStart(ProducerType producerType) {\n kafkaProperties = new Properties();\n kafkaProperties.put(\"metadata.broker.list\", brokerList);\n kafkaProperties.put(\"serializer.class\", \"kafka.serializer.StringEncoder\");\n kafkaProperties.put(\"request.required.acks\", \"1\");\n kafkaProperties.put(\"producer.type\", producerType.getType());\n\n producerConfig = new ProducerConfig(kafkaProperties);\n\n // Start the producer\n producer = new Producer<String, String>(producerConfig);\n }",
"public void init() {\n initiateConfig();\n initiateKafkaStuffs();\n log.info(\"Kafka consumer and producer for topic [{}] started.\", topic);\n\n service.submit(() -> {\n while (true) {\n try {\n ConsumerRecords<String, byte[]> records = consumer.poll(3000);\n for (ConsumerRecord<String, byte[]> record : records) {\n log.info(\"Reveive kafka message from topic [{}] with key [{}]\", topic, record.key());\n repository.get(record.key()).offer(record.value());\n accounter.incrementAndGet();\n }\n while (accounter.get() != 0) {\n Thread.sleep(5);\n }\n consumer.commitSync();\n } catch (Exception e) {\n log.warn(\"Something wrong happened during message pulling process\", e);\n consumer.close();\n consumer = null;\n initiateConsumer();\n }\n }\n });\n }",
"@Override\n public void prepare() {\n applicationDeployer.initialize();\n this.initialize();\n }",
"protected void setup() {\r\n }",
"@PostConstruct\n public void init() {\n try {\n this.host = config.getConnectionHost();\n this.port = config.getConnectionPort();\n this.uri = config.getConnectionUri();\n } catch (final Exception e) {\n throw new IllegalStateException(\"Test failure: \" + e.getMessage(), e);\n }\n }",
"public KafkaBacksideEnvironment() {\n\t\tConfigPullParser p = new ConfigPullParser(\"kafka-props.xml\");\n\t\tproperties = p.getProperties();\n\t\tconnectors = new HashMap<String, IPluginConnector>();\n\t\t//chatApp = new SimpleChatApp(this);\n\t\t//mainChatApp = new ChatApp(this);\n\t\t//elizaApp = new ElizaApp(this);\n\t\tbootPlugins();\n\t\t//TODO other stuff?\n\t\tSystem.out.println(\"Booted\");\n\t\t//Register a shutdown hook so ^c will properly close things\n\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\t\t public void run() { shutDown(); }\n\t\t});\n\t}",
"public Broker() {\n\t\tbrokerSocket = null;\n\t\tclientSocket = null;\n\t\tresWriter = null;\n\t\tmqttReader = null;\n\t\tportNumber = 1883;\n\t}",
"public void initialize() {\n\t\tDynamoConfig config = new DynamoConfig();\n\t\tthis.setup(config);\n\t}",
"protected void configureConnectionPool() {\n JdbcPropertyAdapter adapter = getPropertyAdapter(dbType, properties);\n JdbcConnectionProvider cp = new JdbcConnectionProvider(this.translator, adapter);\n this.connectionPool = new PoolConnectionProvider(cp, this.maxConnectionPoolSize);\n this.transactionProvider = new SimpleTransactionProvider(this.connectionPool);\n }",
"@PostConstruct\n public void postConstruct() {\n Map<String, String> config = new HashMap<>();\n config.put(\"bootstrap.servers\", \"localhost:9092\");\n config.put(\"key.serializer\", \"org.apache.kafka.common.serialization.StringSerializer\");\n config.put(\"value.serializer\", \"org.apache.kafka.common.serialization.StringSerializer\");\n config.put(\"acks\", \"1\");\n producer = KafkaProducer.create(vertx, config);\n }",
"public void init() {\n\t\tXMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()\r\n//\t\t .setUsernameAndPassword(\"pwf\", \"123456\")\r\n//\t\t\t\t .setServiceName(\"bdht-2016051604\")\r\n\t\t\t\t .setServiceName(\"bdht-2016051604\")\r\n\t\t\t\t .setHost(\"bdht-2016051604\")\r\n\t\t\t\t .setSecurityMode(SecurityMode.disabled)\r\n//\t\t\t\t .setCustomSSLContext(context)\r\n\t\t\t\t \r\n//\t\t .setHost(\"bdht-2016051604\")\r\n//\t\t .setPort(5222)\r\n\t\t .build();\r\n\r\n\t\tAbstractXMPPConnection connection = new XMPPTCPConnection(config);\r\n\t\t\r\n\r\n//\t\tAbstractXMPPConnection conn = new XMPPTCPConnection(\"pwf\", \"123456\", \"BDHT-2016051604\");\r\n//\t\tAbstractXMPPConnection conn = new XMPPTCPConnection(\"pwf\", \"123456\", \"192.168.1.121\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\tconnection.connect();\r\n\t\t\t\r\n\t\t\tconnection.login(\"pwf1\", \"123456\");\r\n\t\t\t\r\n\t\t} catch (SmackException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t} catch (XMPPException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(connection.getUser());\r\n\t\t\r\n\t\tChatManager chatmanager = ChatManager.getInstanceFor(connection);\r\n\t\tChat newChat = chatmanager.createChat(\"admin\");\r\n\t\t\r\n//\t\tChat newChat = chatmanager.createChat(\"[email protected]\", new MessageListener() {\r\n//\t\t\tpublic void processMessage(Chat chat, Message message) {\r\n//\t\t\t\tSystem.out.println(\"Received message: \" + message);\r\n//\t\t\t}\r\n//\t\t});\r\n\t\t\r\n\t\ttry {\r\n\t\t\tnewChat.sendMessage(\"hello!!\");\r\n\t\t} catch (NotConnectedException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t\t\t\r\n\t\t}\r\n//\t\tconnection.get\r\n//\t\tconnection.getChatManager().createChat(\"[email protected]\",null).sendMessage(\"Hello word!\");\r\n\t\t\r\n\t\tconnection.disconnect();\r\n\t\t\r\n\t\tSystem.out.println(\"end\");\r\n\t}",
"@BeforeClass\n public static void setup() {\n // initialize the singleton of parking state\n ParkingState.getInstance();\n }",
"protected abstract void setup();",
"public LineStroker() {\n }",
"protected void setUp() throws Exception {\n\n super.setUp();\n OpenXpertya.startup(true);\n }",
"@Override\n\tprotected void setup() {\n\t\t{\n\t\t\tKeyPairGenerator kpg = null;\n\t\t\ttry {\n\t\t\t\tkpg = KeyPairGenerator.getInstance(\"RSA\");\n\t\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t\te.printStackTrace(); // There is such an algorithm\n\t\t\t}\n\t\t\tkpg.initialize(GlobalPreferences.getKeysize(), new SecureRandom());\n\t\t\tkeys = kpg.genKeyPair();\n\t\t\t\n\t\t\tMLoginInitiate loginInitiate = new MLoginInitiate(keys.getPublic());\n\t\t\tputMessage(loginInitiate);\n\t\t}\n\t\t\n\t\twhile(!loginCompleted)\n\t\t{\n\t\t\ttry {\n\t\t\t\tThread.sleep(50); // Wait a bit for response\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tputMessage(new MLoginCompleted(loginSuccess, -2, \"admin\", \"admin\", false));\n\t}",
"@BeforeClass\r\n public static void setupStatic() throws Exception {\n\tActiveMqBroker = new BrokerService();\r\n\tActiveMqBroker.setPersistent(false);\r\n\tActiveMqBroker.start();\r\n\r\n\t// Producer\r\n\tproducer = new JmsProducer(new RuntimeContext<Producer>(JMS_CONFIG_PRODUCER_KEY, Producer.class));\r\n\r\n\t// Consumer which will do the assertions\r\n\tconsumer = new JmsConsumer(new RuntimeContext<Consumer>(JMS_CONFIG_CONSUMER_KEY, Consumer.class));\r\n\tconsumer.addMessageHandler(new MessageHandler() {\r\n\r\n\t @Override\r\n\t public boolean onReceive(Message message) throws MessageException {\r\n\t\tRECEIVED_MESSAGES.put(uniqueMessageId(message.getProviderId()), message);\r\n\t\treturn true;\r\n\t }\r\n\r\n\t @Override\r\n\t public void onError(Message message, Throwable th) {\r\n\t\tth.printStackTrace();\r\n\t }\r\n\t});\r\n\r\n\tconsumer.start();\r\n }",
"public void setupConnection()\n\t{\n\t\ttry\n\t\t{\n\t\t\tdatabaseConnection = DriverManager.getConnection(connectionString);\n\t\t}\n\t\tcatch (SQLException currentException)\n\t\t{\n\t\t\tdisplaySQLErrors(currentException);\n\t\t}\n\t}",
"public void setupSaxParser(SAXParser saxParser) {\n try {\n // Setup grammar cache\n saxParser.setProperty(PROPERTIES_INTERNAL_GRAMMARPOOL, grammarPool);\n\n // Setup catalog resolver\n saxParser.setProperty(PROPERTIES_ENTITYRESOLVER, resolver);\n\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n }",
"public static void init() throws Exception {\n String host = \"localhost\";\n ConnectionFactory factory = new ConnectionFactory();\n factory.setHost(host);\n\n Connection connection = factory.newConnection();\n\n controllerChannel = connection.createChannel();\n controllerChannel.queueDeclare(\n CONTROLLER_QUEUE_NAME,\n true,\n false,\n true,\n null);\n }",
"@Before\n\tpublic void setup() {\n\n\t\tclient = ClientBuilder.newClient();\n\n\t}",
"public void setup() {\n }",
"@Override\n public void init(DsConfiguration conf, DsMetaData metaData) {\n logger.info(\"PilosaHandler initialized.\");\n this.pilosaClient = PilosaClient.withAddress(this.address, this.address);\n createSchema();\n super.init(conf, metaData);\n }",
"public void setBrokerURL(String brokerURL) {\n this.brokerURL = brokerURL;\n }",
"@Before\n public void setup() {\n endpoint = new Endpoint();\n endpoint.setKey(1);\n endpoint.setUrl(URI.create(\"http://localhost/nmr\"));\n\n // Installation, synchronized against\n installation = new Installation();\n installation.setType(InstallationType.TAPIR_INSTALLATION);\n installation.addEndpoint(endpoint);\n\n // Populated Dataset\n dataset = prepareDataset();\n\n // RegistryUpdater, using mocked web service client implementation\n updater = new RegistryUpdater(datasetService, metasyncHistoryService);\n }",
"@Override\n public void configureMessageBroker(MessageBrokerRegistry registry) {\n registry.enableSimpleBroker(TOPIC);\n }",
"@BeforeClass\n public static void setUpBeforeClass() throws Exception {\n org.apache.log4j.BasicConfigurator.configure();\n Properties properties = new Properties();\n properties.setProperty(\"hive.metastore.uris\", \"thrift://localhost:9083\");\n server = new PigServer(ExecType.LOCAL, properties);\n }",
"@Override\n public void setup ()\n {\n DomainObjectReader dor;\n\n dor = (DomainObjectReader) SpringApplicationContext.getBean(\"reader\");\n brokerRepo = (BrokerRepo) SpringApplicationContext.getBean(\"brokerRepo\");\n ttx = new ArrayList<>();\n\n dor.registerNewObjectListener(new TimeslotUpdateHandler(),\n TimeslotUpdate.class);\n dor.registerNewObjectListener(new TariffTxHandler(),\n TariffTransaction.class);\n dor.registerNewObjectListener(new CustomerInfoHandler(), CustomerInfo.class);\n\n try {\n data = new PrintWriter(new File(dataFilename));\n }\n catch (FileNotFoundException e) {\n log.error(\"Cannot open file \" + dataFilename);\n }\n\n powerTypes = preparePowerTypes();\n customerByType = new HashMap<>();\n for (PowerType type : powerTypes)\n customerByType.put(type, 0);\n }",
"public static void setUpServer() {\n\t\tList<ServerDefinition> srvToSC0CascDefs = new ArrayList<ServerDefinition>();\r\n\t\tServerDefinition srvToSC0CascDef = new ServerDefinition(TestConstants.COMMUNICATOR_TYPE_PUBLISH, TestConstants.logbackSrv, TestConstants.pubServerName1,\r\n\t\t\t\tTestConstants.PORT_PUB_SRV_TCP, TestConstants.PORT_SC0_TCP, 1, 1, TestConstants.pubServiceName1);\r\n\t\tsrvToSC0CascDefs.add(srvToSC0CascDef);\r\n\t\tSystemSuperTest.srvDefs = srvToSC0CascDefs;\r\n\t}",
"protected void setupUpnp() {\n try {\n GatewayDiscover discover = new GatewayDiscover();\n Map<InetAddress, GatewayDevice> devices = discover.discover();\n for (Map.Entry<InetAddress, GatewayDevice> entry : devices.entrySet()) {\n GatewayDevice gw = entry.getValue();\n logger.info(\"Found a gateway device: local address = {}, external address = {}\",\n gw.getLocalAddress().getHostAddress(), gw.getExternalIPAddress());\n\n gw.deletePortMapping(config.p2pListenPort(), \"TCP\");\n gw.addPortMapping(config.p2pListenPort(), config.p2pListenPort(), gw.getLocalAddress().getHostAddress(),\n \"TCP\", \"Semux P2P network\");\n }\n } catch (IOException | SAXException | ParserConfigurationException e) {\n logger.info(\"Failed to add port mapping\", e);\n }\n }",
"@Override\n \t\tprotected void setup(Context context){\n \t\t\tint port = 5701 + context.getTaskAttemptID().getId()%numInstances;\n \t\t\t//System.out.println(\"Connecting to port \" + port);\n \t\t\tClientConfig clientConfig = new ClientConfig();\n \t\t\tclientConfig.addAddress(\"127.0.0.1:\" + port);\n \t\t\tthis.client = HazelcastClient.newHazelcastClient(clientConfig);\n \t\t\tthis.map = client.getMap(\"kmer\");\n \t\t}",
"protected void setUp() throws Exception {\n TestEnvironnement.forceFakeDriver();\n testEnv = TestEnvironnement.newEnvironment();\n Dependency.setConnectionManager(testEnv.getConnectionManager());\n }",
"private static void setupKeysAndCertificates() throws Exception {\n // set up our certificates\n //\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\", \"BC\");\n\n kpg.initialize(1024, new SecureRandom());\n\n String issueDN = \"O=Punkhorn Software, C=US\";\n issueKP = kpg.generateKeyPair();\n issueCert = Utils.makeCertificate(\n issueKP, issueDN, issueKP, issueDN);\n\n //\n // certificate we sign against\n //\n String signingDN = \"CN=William J. Collins, [email protected], O=Punkhorn Software, C=US\";\n signingKP = kpg.generateKeyPair();\n signingCert = Utils.makeCertificate(\n signingKP, signingDN, issueKP, issueDN);\n\n certList = new ArrayList<>();\n\n certList.add(signingCert);\n certList.add(issueCert);\n\n decryptingKP = signingKP;\n\n }",
"@Before\n public void setup() throws Exception {\n ClassLoader loader = this.getClass().getClassLoader();\n try {\n loader.loadClass(\"org.wildfly.openssl.OpenSSLProvider\");\n hasWildfly = true;\n } catch (ClassNotFoundException e) {\n hasWildfly = false;\n }\n }",
"protected void setUp()\r\n {\r\n /* Add any necessary initialization code here (e.g., open a socket). */\r\n }",
"private void setupEventBusStatePublisher(String topic) {\n\n if (StringUtils.isBlank(topic)) {\n logger.trace(\"No topic defined for Event Bus State Publisher\");\n return;\n }\n\n try {\n logger.debug(\"Setting up Event Bus State Publisher for topic {}\", topic);\n statePublisher = new MqttMessagePublisher(brokerName + \":\" + topic + \":state:*:default\");\n mqttService.registerMessageProducer(brokerName, statePublisher);\n\n } catch (Exception e) {\n logger.error(\"Could not create event bus state publisher: {}\", e.getMessage());\n }\n\n }",
"private static void init() throws Exception \r\n\t{\r\n dynamoDB = new AmazonDynamoDBClient(new ClasspathPropertiesFileCredentialsProvider());\r\n Region usEast1 = Region.getRegion(Regions.US_EAST_1);\r\n dynamoDB.setRegion(usEast1);\r\n }",
"protected void setUp()\n {\n /* Add any necessary initialization code here (e.g., open a socket). */\n }",
"public void init() {\n cupDataChangeListener = new CupDataChangeListener(dataBroker);\n }",
"@BeforeSuite\n\tpublic void setUp() {\n\t\tlogger.info(\"IN SETUP METHOD: performing pretest configurations\");\n\t\ttry {\n\t\t\tinput = new FileInputStream(\"config.properties\");\n\t\t\tprop.load(input);\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(e);\n\t\t\t\n\t\t}\n\t\t//Set the browser from the cmd line or from config.properties file\n\t\tString browser = System.getProperty(\"browser\", prop.getProperty(\"browser\"));\n\t\tlogger.info(\"Selected browser is: \" + browser);\n\t\tgmailPg.driverSetup(browser, prop.getProperty(\"remote\"));\n\t\tgmailPg.explicitWaitSetup();\n\t\tgmailPg.loadXpathProps();\n\t}",
"public static void init() {\r\n\t\tsetPolicy(BPF.getInstance().getConfig().routes_setting()\r\n\t\t\t\t.getQueuing_policy());\r\n\t}",
"AbstractProducer(String env) {\n\t\t// set configs for kafka\n\t\tProperties props = new Properties();\n\t\tprops.put(\"bootstrap.servers\", PropertyLoader.getPropertyValue(\n\t\t\t\tPropertyFile.kafka, \"bootstrap.servers\"));\n\t\tprops.put(\"acks\",\n\t\t\t\tPropertyLoader.getPropertyValue(PropertyFile.kafka, \"acks\"));\n\t\tprops.put(\"retries\", Integer.parseInt(PropertyLoader.getPropertyValue(\n\t\t\t\tPropertyFile.kafka, \"retries\")));\n\t\tprops.put(\"batch.size\", Integer.parseInt(PropertyLoader\n\t\t\t\t.getPropertyValue(PropertyFile.kafka, \"batch.size\")));\n\t\tprops.put(\"linger.ms\", Integer.parseInt(PropertyLoader\n\t\t\t\t.getPropertyValue(PropertyFile.kafka, \"linger.ms\")));\n\t\tprops.put(\"buffer.memory\", Integer.parseInt(PropertyLoader\n\t\t\t\t.getPropertyValue(PropertyFile.kafka, \"buffer.memory\")));\n\t\tprops.put(\"key.serializer\", PropertyLoader.getPropertyValue(\n\t\t\t\tPropertyFile.kafka, \"key.serializer\"));\n\t\tprops.put(\"value.serializer\", PropertyLoader.getPropertyValue(\n\t\t\t\tPropertyFile.kafka, \"value.serializer\"));\n\n\t\t// Initialize the producer\n\t\tproducer = new KafkaProducer<String, String>(props);\n\n\t\t// Initialize the solr connector and the connector for the configuration\n\t\t// database\n\t\tsolr = new Solr();\n\t\tconfig = new MongoDBConnector(PropertyLoader.getPropertyValue(\n\t\t\t\tPropertyFile.database, \"config.name\") + \"_\" + env);\n\t}",
"public StockBrokerImpl() throws java.rmi.RemoteException {\n\t\tsuper();\n\t\tthis.priceUpdater = new PriceUpdater();\n\t\tthis.priceUpdater.start();\n\t}",
"protected void setup() {\n\t\t\t\t\tDFAgentDescription dfd = new DFAgentDescription();\n\t\t\t\t\tdfd.setName(getAID());\n\t\t\t\t\tServiceDescription sd = new ServiceDescription();\n\t\t\t\t\tsd.setType(\"wHOST\");\n\t\t\t\t\tsd.setName(\"wumpus-host-\" + Math.random());\n\t\t\t\t\tdfd.addServices(sd);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tDFService.register(this, dfd);\n\t\t\t\t\t\thostMap = new WumpusMapHost();\n\t\t\t\t\t\tSystem.out.println(\"Registered as a host in the DF Service.\");\n\t\t\t\t\t\tlogic = new WumpusLogic();\n\t\t\t\t\t\tlogic.setHostMap(hostMap.getMap());\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\tcatch (FIPAException fe) {\n\t\t\t\t\t\tfe.printStackTrace();\n\t\t\t\t\t}\n\t\t\n\t\t// Printing out a message stating that the agent is ready for service.\n\t\tSystem.out.println(\"Wumpus host \"+getAID().getName()+\" is ready.\");\n\t\t\n\t\taddBehaviour(new TickerBehaviour(this, 1000) {\n\t\t\tprotected void onTick() {\n\t\t\t\tmyAgent.addBehaviour(new HandleRequest());\n\t\t\t}\n\t\t});\n\t \t\n\t\t\n\t}",
"@Before\n\tpublic void setUp() throws Exception {\n\n\t\tnew StrictExpectations() {{\n\t\t\tnew UDDINaming(anyString);\n\n\t\t\tuddi.list(\"UpaTransporter%\");\n\t\t\tresult = _endpoints;\n\n\t\t\tnew TransporterClient(\"Broker\");\n\n\t\t\tclient.connectToTransporterByURI(anyString);\n\t\t\tclient.ping();\n\t\t\tresult = \"UpaTransporter1\";\n\t\t}};\n\n\t\tbroker = new BrokerPort();\n\t}",
"@Override\n public void configureMessageBroker(MessageBrokerRegistry registry) {\n registry.enableSimpleBroker(\"/topic/\");\n }",
"public void initializeConnection() {\n\n cluster = Cluster.builder().addContactPoint(host).build();\n session = cluster.connect(keyspaceName);\n session.execute(\"USE \".concat(keyspaceName));\n }",
"private ClientBootstrap() {\r\n init();\r\n }",
"@BeforeClass\n public static void setUp() {\n CustomRateProvider crp = new CustomRateProvider();\n CustomServiceProvider csp = new CustomServiceProvider(crp);\n Bootstrap.init(csp);\n }",
"public static void main(String[] args) throws Exception {\n NameNodeConnector nnc = null;\n ExternalSPSContext context = null;\n try {\n StringUtils.startupShutdownMessage(StoragePolicySatisfier.class, args,\n LOG);\n HdfsConfiguration spsConf = new HdfsConfiguration();\n // login with SPS keytab\n secureLogin(spsConf);\n StoragePolicySatisfier sps = new StoragePolicySatisfier(spsConf);\n nnc = getNameNodeConnector(spsConf);\n\n context = new ExternalSPSContext(sps, nnc);\n sps.init(context);\n sps.start(StoragePolicySatisfierMode.EXTERNAL);\n context.initMetrics(sps);\n if (sps != null) {\n sps.join();\n }\n } catch (Throwable e) {\n LOG.error(\"Failed to start storage policy satisfier.\", e);\n terminate(1, e);\n } finally {\n if (nnc != null) {\n nnc.close();\n }\n if (context!= null) {\n if (context.getSpsBeanMetrics() != null) {\n context.closeMetrics();\n }\n }\n }\n }",
"public void initializeConsumerProducer(int queueSize) {\n\n trainSignal = false;\n if (radioDataSet.isSelected()) {\n consumer = new DataSetConsumer(jmeVisualization);\n producer = new DataSetProducer(neuralNetAndDataSet);\n }\n if (radioWeights.isSelected()) {\n consumer = new NeuralNetworkWeightsConsumer(jmeVisualization);\n producer = new NeuralNetworkWeightsProducer(neuralNetAndDataSet);\n }\n\n /*\n Instantiate producerConsumer and start consuming(drawing)\n */\n consumerProducer = new ConsumerProducer(queueSize);\n consumerProducer.setConsumer(consumer);\n consumerProducer.setProducer(producer);\n\n consumerProducer.startConsuming();\n\n }",
"protected abstract void doInitialize() throws JMSException;",
"protected abstract void initializeBartender();",
"public SDARTS (int port, String lspName) throws Exception {\r\n System.out.println (\"Creating front end and initializing back ends\");\r\n System.out.println (\"--------------------------------------------\");\r\n init (port, lspName, new FrontEndLSP());\r\n }",
"protected void setUp() {\n\t\tif (!Message.configure(\"wordsweeper.xsd\")) {\r\n\t\t\tfail (\"unable to configure protocol\");\r\n\t\t}\r\n\t\t\r\n\t\t// prepare client and connect to server.\r\n\t\tmodel = new Model();\r\n\t\t\r\n\t\t\r\n\t\tclient = new Application (model);\r\n\t\tclient.setVisible(true);\r\n\t\t\r\n\t\t// Create mockServer to simulate server, and install 'obvious' handler\r\n\t\t// that simply dumps to the screen the responses.\r\n\t\tmockServer = new MockServerAccess(\"localhost\");\r\n\t\t\r\n\t\t// as far as the client is concerned, it gets a real object with which\r\n\t\t// to communicate.\r\n\t\tclient.setServerAccess(mockServer);\r\n\t}",
"protected void setup() {\n\n // Setup budget randomly between 1000 - 2000\n budget = rn.nextInt(1000) + 1000;\n\t\tSystem.out.println(\"Hello! Bidder \"+getAID().getName()+\" is ready with budget \" + budget);\n\n\t\t// Create and show the GUI \n\t\tmyGui = new BidderHumanGUI(this);\n\t\tmyGui.showGui();\n\n\t\t// Register as bidder to the yellow pages\n\t\tDFAgentDescription dfd = new DFAgentDescription();\n\t\tdfd.setName(getAID());\n\t\tServiceDescription sd = new ServiceDescription();\n\t\tsd.setType(\"blind-auction\");\n\t\tsd.setName(\"Blind-Auction\");\n\t\tdfd.addServices(sd);\n\t\ttry {\n\t\t\tDFService.register(this, dfd);\n\t\t}\n\t\tcatch (FIPAException fe) {\n\t\t\tfe.printStackTrace();\n\t\t}\n\n\t\t// Add the behaviour for receiving CFP from Auctioneer\n\t\taddBehaviour(new ReceiveCFPHuman(this));\n\n\t\t// Add the behaviour for receiving item --as the auction winner\n\t\taddBehaviour(new ReceiveItemAsWinnerHuman(this));\n\t}",
"protected void initialize()\n {\n logger.info(\"Initializing stack: {}\", this.getClass().getSimpleName());\n Function function = createLambdaFunction();\n createAthenaDataCatalog(function);\n }",
"public static void init() throws Exception {\n AWSCredentials credentials = new PropertiesCredentials(\n AwsConsoleApp.class.getResourceAsStream(\"AwsCredentials.properties\"));\n ec2 = new AmazonEC2Client(credentials);\n s3 = new AmazonS3Client(credentials);\n sdb = new AmazonSimpleDBClient(credentials);\n emr = new AmazonElasticMapReduceClient(credentials);\n }",
"@Before\n public void setUp() throws Exception {\n localServer = new KVServer(\"test\", \"localhost\", 2181);\n localServer.initKVServer(1234, 11, IKVServer.CacheStrategy.LFU.getValue());\n localServerThread = new Thread(localServer);\n localServerThread.start();\n\n KVClient client = new KVClient();\n localKvClient = new KVStore(client, \"localhost\", 1234);\n localKvClient.connect();\n\n // setting up ecs\n client = new KVClient();\n ecsKvClient = new KVStore(client, \"localhost\", 50000);\n ecsKvClient.connect();\n\n }",
"public BrokerAlgo() {}"
] | [
"0.661376",
"0.63120437",
"0.62013215",
"0.60957235",
"0.5972769",
"0.59616727",
"0.59560025",
"0.58834743",
"0.5830262",
"0.58210063",
"0.57783186",
"0.576672",
"0.5757057",
"0.5736789",
"0.5704975",
"0.57028013",
"0.56897825",
"0.56330615",
"0.556433",
"0.553875",
"0.5531068",
"0.55083656",
"0.5495597",
"0.5491304",
"0.54306775",
"0.5382586",
"0.53825504",
"0.53740335",
"0.53506523",
"0.53367704",
"0.5321302",
"0.5312968",
"0.5311827",
"0.52971154",
"0.5277598",
"0.5218181",
"0.52091664",
"0.52085245",
"0.5183949",
"0.51595604",
"0.5154631",
"0.5149336",
"0.51474065",
"0.51461285",
"0.5145588",
"0.5143521",
"0.51403177",
"0.5138892",
"0.51370686",
"0.5130341",
"0.5113902",
"0.5113112",
"0.51018447",
"0.5088499",
"0.50881034",
"0.5084409",
"0.5075239",
"0.50745046",
"0.50707996",
"0.5066977",
"0.5058927",
"0.5057785",
"0.50445676",
"0.5039064",
"0.50323695",
"0.503034",
"0.5025398",
"0.5012581",
"0.5010597",
"0.49863723",
"0.4985313",
"0.49772277",
"0.4967232",
"0.49419487",
"0.4937729",
"0.49371287",
"0.493509",
"0.49258998",
"0.4921497",
"0.49208373",
"0.49187142",
"0.49116832",
"0.4906874",
"0.4904396",
"0.49035588",
"0.48986912",
"0.48974404",
"0.4893527",
"0.4891584",
"0.48903286",
"0.48837617",
"0.48789564",
"0.4876289",
"0.4876098",
"0.4875986",
"0.48722526",
"0.48668963",
"0.48632044",
"0.48614755",
"0.48567665"
] | 0.6535638 | 1 |
Ensure that things can subscribe without exceptions being thrown. | @Test
public void aTestValidSubscribe() {
broker.subscribe(intSub);
broker.subscribe(unreadSub);
broker.subscribe(pIntSub);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void invokeOnSubscribe0() {\n try {\n subscriber.onSubscribe(this);\n } catch (Throwable t) {\n processor.unsubscribe(this, t);\n throwIfFatal(t);\n logger.warn(\"Subscriber.onSubscribe() should not raise an exception. subscriber: {}\",\n subscriber, t);\n }\n }",
"@Override\n\tpublic void brokenSubscription() {\n\t\t\n\t}",
"@Test(expected = SubscriberTypeMismatchException.class)\r\n\tpublic void aTestInvalidSubscribe() {\r\n\t\tbroker.subscribe(new IntegerSubscriber(), Boolean.class);\r\n\t}",
"@Override\r\n @Test(expected = UnsupportedOperationException.class)\r\n public void testPutWithFailingEventPublisher() {\n super.testPutWithFailingEventPublisher();\r\n }",
"@BackpressureSupport(BackpressureKind.PASS_THROUGH)\n @SchedulerSupport(SchedulerKind.NONE)\n public final void safeSubscribe(Subscriber<? super T> s) {\n Objects.requireNonNull(s, \"s is null\");\n if (s instanceof SafeSubscriber) {\n subscribeActual(s);\n } else {\n subscribeActual(new SafeSubscriber<T>(s));\n }\n }",
"@Test\n public void attach_implicit_subscribe_fail() throws AblyException {\n AblyRealtime ably = null;\n try {\n ClientOptions opts = createOptions(testVars.keys[1].keyStr);\n ably = new AblyRealtime(opts);\n\n /* wait until connected */\n new ConnectionWaiter(ably.connection).waitFor(ConnectionState.connected);\n assertEquals(\"Verify connected state reached\", ably.connection.state, ConnectionState.connected);\n\n /* create a channel and subscribe */\n final Channel channel = ably.channels.get(\"subscribe_fail\");\n channel.subscribe(null);\n assertEquals(\"Verify attaching state reached\", channel.state, ChannelState.attaching);\n\n ErrorInfo fail = new ChannelWaiter(channel).waitFor(ChannelState.failed);\n assertEquals(\"Verify failed state reached\", channel.state, ChannelState.failed);\n assertEquals(\"Verify reason code gives correct failure reason\", fail.statusCode, 401);\n } finally {\n if(ably != null)\n ably.close();\n }\n }",
"@Test\n public void testIAEForAddListener() {\n try {\n final Registrar<Object> testSubject = onCreateTestSubject();\n testSubject.addListener(null);\n fail(\"IAE was not thrown\");\n } catch (IllegalArgumentException e) {\n // okay\n }\n }",
"private void tryToConsumeEvent() {\n if (subscriber == null || storedEvent == null) {\n return;\n }\n sendMessageToJs(storedEvent, subscriber);\n\n }",
"public static void error() {\n Observable<String> myObservable = Observable.error(\n () -> new Exception(\"Exception from error observable\"));\n myObservable.subscribe(genericObserver1);\n }",
"@Override\r\n @Test(expected = UnsupportedOperationException.class)\r\n public void testPutWithEventPublisher() {\n super.testPutWithEventPublisher();\r\n }",
"@Test\n public void transient_publish_connection_failed() {\n AblyRealtime pubAbly = null;\n String channelName = \"transient_publish_connection_failed_\" + testParams.name;\n try {\n ClientOptions opts = createOptions(\"not:a.key\");\n pubAbly = new AblyRealtime(opts);\n new ConnectionWaiter(pubAbly.connection).waitFor(ConnectionState.failed);\n assertEquals(\"Verify failed state reached\", pubAbly.connection.state, ConnectionState.failed);\n\n final Channel pubChannel = pubAbly.channels.get(channelName);\n Helpers.CompletionWaiter completionWaiter = new Helpers.CompletionWaiter();\n try {\n pubChannel.publish(\"Lorem\", \"Ipsum!\", completionWaiter);\n fail(\"failed to raise expected exception\");\n } catch(AblyException e) {\n }\n } catch(AblyException e) {\n fail(\"unexpected exception\");\n } finally {\n if(pubAbly != null) {\n pubAbly.close();\n }\n }\n }",
"@Test\n public void shouldReturnOnErrorAndWithIOExceptionUsingObservable() {\n RateLimiterConfig rateLimiterConfig = RateLimiterConfig.custom()\n .limitRefreshPeriod(Duration.ofMillis(CYCLE_IN_MILLIS))\n .limitForPeriod(PERMISSIONS_RER_CYCLE)\n .timeoutDuration(TIMEOUT_DURATION)\n .build();\n\n // Create a RateLimiterRegistry with a custom global configuration\n RateLimiter rateLimiter = RateLimiter.of(LIMITER_NAME, rateLimiterConfig);\n\n assertThat(rateLimiter.getPermission(rateLimiter.getRateLimiterConfig().getTimeoutDuration()));\n\n Observable.fromCallable(() -> {throw new IOException(\"BAM!\");})\n .lift(RateLimiterOperator.of(rateLimiter))\n .test()\n .assertError(IOException.class)\n .assertNotComplete()\n .assertSubscribed();\n\n RateLimiter.Metrics metrics = rateLimiter.getMetrics();\n\n assertThat(metrics.getAvailablePermissions()).isEqualTo(8);\n assertThat(metrics.getNumberOfWaitingThreads()).isEqualTo(0);\n }",
"@Override\n public void subscribe(ObservableEmitter<String> subscriber) throws Exception {\n if (subscriber.isDisposed()) {\n return;\n }\n processInput(subscriber);\n\n if (!subscriber.isDisposed()) {\n subscriber.onComplete();\n }\n }",
"@Test\n void checkedExceptionFromConstructorDoesNotAttemptToStoreAggregate() {\n UnitOfWork<?> uow = CurrentUnitOfWork.get();\n uow.executeWithResult(() -> testSubject.newInstance(() -> {\n throw new Exception(\"Throwing checked exception\");\n }), RuntimeException.class::isInstance);\n\n assertFalse(uow.isActive());\n assertFalse(uow.isRolledBack());\n assertTrue(uow.getExecutionResult().isExceptionResult());\n assertEquals(\"Throwing checked exception\", uow.getExecutionResult().getExceptionResult().getMessage());\n }",
"@Override // io.reactivex.functions.Consumer\n public void accept(Throwable th) {\n }",
"@Test\n public void shouldReturnOnErrorWithRequestNotPermittedUsingObservable() {\n RateLimiterConfig rateLimiterConfig = RateLimiterConfig.custom()\n .limitRefreshPeriod(Duration.ofMillis(CYCLE_IN_MILLIS))\n .limitForPeriod(PERMISSIONS_RER_CYCLE)\n .timeoutDuration(TIMEOUT_DURATION)\n .build();\n\n // Create a RateLimiterRegistry with a custom global configuration\n RateLimiter rateLimiter = RateLimiter.of(LIMITER_NAME, rateLimiterConfig);\n\n assertThat(rateLimiter.getPermission(rateLimiter.getRateLimiterConfig().getTimeoutDuration()));\n\n Observable.fromIterable(makeEleven())\n .lift(RateLimiterOperator.of(rateLimiter))\n .test()\n .assertError(RequestNotPermitted.class)\n .assertNotComplete()\n .assertSubscribed();\n\n assertThat(!rateLimiter.getPermission(rateLimiter.getRateLimiterConfig().getTimeoutDuration()));\n\n RateLimiter.Metrics metrics = rateLimiter.getMetrics();\n\n assertThat(metrics.getAvailablePermissions()).isEqualTo(0);\n assertThat(metrics.getNumberOfWaitingThreads()).isEqualTo(0);\n }",
"void throwEvents();",
"@Test\n public void swallowExceptionsAspect() throws Exception {\n ProductDemand demand = swallowing(parseDoc().getDemands().get(0));\n\n // probably will throw IllegalStateException\n demand.fancyBusinessLogic();\n\n List<Throwable> exceptions = exceptions(demand);\n Assertions.assertThat(exceptions).isNotEmpty();\n }",
"boolean shouldAutoSubscribe();",
"@BackpressureSupport(BackpressureKind.SPECIAL)\n @SchedulerSupport(SchedulerKind.NONE)\n @Override\n public final void subscribe(Subscriber<? super T> s) {\n Objects.requireNonNull(s, \"s is null\");\n subscribeActual(s);\n }",
"public void tryTerminate() {\n if (wip.decrementAndGet() != 0) {\n return;\n }\n if (queue.isEmpty()) {\n completableSubscriber.onCompleted();\n } else {\n completableSubscriber.onError(CompletableOnSubscribeMerge.collectErrors(queue));\n }\n }",
"static void checkTopicConnection(AssertableApplicationContext ctx)\n\t\t\tthrows JMSException {\n\t\tTopicConnection con = ctx.getBean(TopicConnectionFactory.class)\n\t\t\t\t.createTopicConnection();\n\t\ttry {\n\t\t\tcon.setExceptionListener(exception -> {\n\t\t\t});\n\t\t\tassertThat(con.getExceptionListener().getClass().getName())\n\t\t\t\t\t.startsWith(\"brave.jms.TracingExceptionListener\");\n\t\t}\n\t\tfinally {\n\t\t\tcon.close();\n\t\t}\n\t}",
"@Override\n public void onSubscribe(Disposable d) {\n }",
"public static void test016()\r\n {\r\n System.out.println(\"RxJavaTest04::test016\");\r\n ExecutorService poolA = Executors.newFixedThreadPool(10, newThreadFactory(\"Sched-A-%d\"));\r\n Scheduler schedulerA = Schedulers.from(poolA);\r\n RxGroceries rxGroceries = new RxGroceries();\r\n\r\n Maybe<BigDecimal> totalPrice = Observable\r\n .fromIterable(Arrays.asList(\"bread\", \"butter\", \"milk\", \"tomato\", \"cheese\"))\r\n .subscribeOn(schedulerA)\r\n .flatMap(prod -> rxGroceries\r\n .purchase(prod, 1)\r\n .subscribeOn(schedulerA)\r\n )\r\n .reduce(BigDecimal::add);\r\n totalPrice\r\n .subscribe(\r\n x -> log(\"Got \" + x),\r\n Throwable::printStackTrace,\r\n () -> log(\"Completed\")\r\n );\r\n myWait(2000); // We have to wait before shutting down the pool,\r\n // otherwise it will throw exception \r\n // [java] io.reactivex.exceptions.UndeliverableException:\r\n // java.util.concurrent.RejectedExecutionException:\r\n // Task java.util.concurrent.FutureTask@38d8f9d0 rejected\r\n // from java.util.concurrent.ThreadPoolExecutor@6a724a6c\r\n // [Shutting down, pool size = 1, active threads = 1, queued\r\n // tasks = 0, completed tasks = 0]\r\n poolA.shutdown();\r\n }",
"private void ensureConnection() {\n Objects.requireNonNull(connection);\n }",
"@Test\n public void transient_publish_channel_failed() {\n AblyRealtime pubAbly = null;\n String channelName = \"transient_publish_channel_failed_\" + testParams.name;\n try {\n ClientOptions opts = createOptions(testVars.keys[1].keyStr);\n pubAbly = new AblyRealtime(opts);\n new ConnectionWaiter(pubAbly.connection).waitFor(ConnectionState.connected);\n assertEquals(\"Verify connected state reached\", pubAbly.connection.state, ConnectionState.connected);\n\n final Channel pubChannel = pubAbly.channels.get(channelName);\n Helpers.ChannelWaiter channelWaiter = new Helpers.ChannelWaiter(pubChannel);\n pubChannel.attach();\n channelWaiter.waitFor(ChannelState.failed);\n\n Helpers.CompletionWaiter completionWaiter = new Helpers.CompletionWaiter();\n try {\n pubChannel.publish(\"Lorem\", \"Ipsum!\", completionWaiter);\n fail(\"failed to raise expected exception\");\n } catch(AblyException e) {\n assertEquals(pubChannel.state, ChannelState.failed);\n }\n } catch(AblyException e) {\n fail(\"unexpected exception\");\n } finally {\n if(pubAbly != null) {\n pubAbly.close();\n }\n }\n }",
"@Test\n public void testMissingForumSubscribe() {\n ForumException thrown = assertThrows(ForumException.class,\n () -> forumService.subscribeTo(0, USER_ID_2));\n assertTrue(thrown.getMessage().contains(\"No such forum thread.\"));\n }",
"public interface ObservableOnSubcribe<T> {\n\n void subscribe(@NonNull ObservableEmitter<T> emitter) throws Exception;\n\n}",
"@Override protected void subscribeActual(Subscriber s) {\n source.subscribe(MaybeFuseable.get().wrap(s, contextScoper, assembled));\n }",
"@Override\r\n public void publishPropertyViolation (Publisher publisher) {\n }",
"@Test\n public void onChildrenChanged_notCalledWhenNotSubscribed() throws Exception {\n final String subscribedMediaId =\n SUBSCRIBE_ID_NOTIFY_CHILDREN_CHANGED_TO_ALL_WITH_NON_SUBSCRIBED_ID;\n final CountDownLatch latch = new CountDownLatch(1);\n\n final BrowserCallback controllerCallbackProxy = new BrowserCallback() {\n @Override\n public void onChildrenChanged(MediaBrowser browser, String parentId,\n int itemCount, LibraryParams params) {\n // Unexpected call.\n fail();\n latch.countDown();\n }\n };\n\n LibraryResult result = createBrowser(null, controllerCallbackProxy)\n .subscribe(subscribedMediaId, null)\n .get(TIMEOUT_MS, TimeUnit.MILLISECONDS);\n assertEquals(RESULT_SUCCESS, result.getResultCode());\n\n // The MediaLibrarySession in MockMediaLibraryService is supposed to call\n // notifyChildrenChanged() in its callback onSubscribe(), but with a different media ID.\n // Therefore, onChildrenChanged() should not be called.\n assertFalse(latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS));\n }",
"@Override // io.reactivex.functions.Consumer\n public void accept(Throwable th) {\n Logs.error(\"UnreadChatsCounterSyncAgent\", a2.b.a.a.a.g(\"Thread.currentThread()\", a2.b.a.a.a.I('['), ']', new StringBuilder(), \" Subscription to userId & events has encountered an error\"), th);\n }",
"@Test\n public void onChildrenChanged_notCalledWhenNotSubscribed2() throws Exception {\n final String subscribedMediaId =\n SUBSCRIBE_ID_NOTIFY_CHILDREN_CHANGED_TO_ONE_WITH_NON_SUBSCRIBED_ID;\n final CountDownLatch latch = new CountDownLatch(1);\n\n final BrowserCallback controllerCallbackProxy = new BrowserCallback() {\n @Override\n public void onChildrenChanged(MediaBrowser browser, String parentId,\n int itemCount, LibraryParams params) {\n // Unexpected call.\n fail();\n latch.countDown();\n }\n };\n\n LibraryResult result = createBrowser(null, controllerCallbackProxy)\n .subscribe(subscribedMediaId, null)\n .get(TIMEOUT_MS, TimeUnit.MILLISECONDS);\n assertEquals(RESULT_SUCCESS, result.getResultCode());\n\n // The MediaLibrarySession in MockMediaLibraryService is supposed to call\n // notifyChildrenChanged(ControllerInfo) in its callback onSubscribe(),\n // but with a different media ID.\n // Therefore, onChildrenChanged() should not be called.\n assertFalse(latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS));\n }",
"@Test\n public void publishWithBadHostShouldNotRethrowExceptions() {\n StandardChatService service = new StandardChatService(\"token\", \"room\", \"from\");\n service.setHost(\"hostvaluethatwillcausepublishtofail\");\n service.publish(\"message\");\n }",
"boolean hasSubscribe();",
"@Override\n\t\t\tpublic void onSubscribe(Disposable arg0) {\n\t\t\t\t\n\t\t\t}",
"@Ignore(\"FIXME: fix exception\")\n @Test\n public void transient_publish_connected() throws AblyException {\n AblyRealtime pubAbly = null, subAbly = null;\n String channelName = \"transient_publish_connected_\" + testParams.name;\n try {\n ClientOptions opts = createOptions(testVars.keys[0].keyStr);\n subAbly = new AblyRealtime(opts);\n\n /* wait until connected */\n new ConnectionWaiter(subAbly.connection).waitFor(ConnectionState.connected);\n assertEquals(\"Verify connected state reached\", subAbly.connection.state, ConnectionState.connected);\n\n /* create a channel and subscribe */\n final Channel subChannel = subAbly.channels.get(channelName);\n Helpers.MessageWaiter messageWaiter = new Helpers.MessageWaiter(subChannel);\n new ChannelWaiter(subChannel).waitFor(ChannelState.attached);\n\n pubAbly = new AblyRealtime(opts);\n new ConnectionWaiter(pubAbly.connection).waitFor(ConnectionState.connected);\n Helpers.CompletionWaiter completionWaiter = new Helpers.CompletionWaiter();\n final Channel pubChannel = pubAbly.channels.get(channelName);\n pubChannel.publish(\"Lorem\", \"Ipsum!\", completionWaiter);\n assertEquals(\"Verify channel remains in initialized state\", pubChannel.state, ChannelState.initialized);\n\n ErrorInfo errorInfo = completionWaiter.waitFor();\n assertEquals(\"Verify channel remains in initialized state\", pubChannel.state, ChannelState.initialized);\n\n messageWaiter.waitFor(1);\n assertEquals(\"Verify expected message received\", messageWaiter.receivedMessages.get(0).name, \"Lorem\");\n } finally {\n if(pubAbly != null) {\n pubAbly.close();\n }\n if(subAbly != null) {\n subAbly.close();\n }\n }\n }",
"public IllegalConnectionCheck() {\n listener = new LinkedHashSet<CheckListener>();\n active = true;\n }",
"protected void onDiscoveryFailed() {\n logAndShowSnackbar(\"Could not subscribe.\");\n }",
"void error(Throwable t) {\n t = Conformance.onNextThrew(t);\n try {\n try {\n subscriber.onError(t);\n } catch (Throwable e) {\n Exceptions.handleUncaught(t);\n Exceptions.handleUncaught(Conformance.onErrorThrew(e));\n }\n } finally {\n try {\n cancel();\n } catch (Throwable t3) {\n Exceptions.handleUncaught(Conformance.cancelThrew(t3));\n }\n }\n }",
"@Test\n public void fluxSubscriberNumbersError(){\n\n Flux<Integer> listaDeNumeros = Flux.range(1, 5) //pubisher publicando, quando for 4 lança exception\n .log()\n .map(integer -> {\n if(integer == 4){\n throw new IndexOutOfBoundsException(\"Index Error\");\n }\n return integer;\n });\n\n listaDeNumeros.subscribe(integer -> log.info(\"Numero {}\", integer), Throwable::printStackTrace,\n () -> log.info(\"Done\"), subscription -> subscription.request(3)); // backpressure 3, antes da exception ser lançada\n //Runnable - void run() Consumer - void accept(T t)\n\n log.info(\"-------------------------------------------------\");\n StepVerifier.create(listaDeNumeros)\n .expectNext(1, 2, 3)\n .expectError(IndexOutOfBoundsException.class)\n .verify();\n }",
"public void signalError(Throwable th) {\r\n InnerSubscription[] innerSubscriptionArr;\r\n for (InnerSubscription innerSubscription : (InnerSubscription[]) this.subscribers.getAndSet(TERMINATED)) {\r\n if (!innerSubscription.isCancelled()) {\r\n innerSubscription.downstream.onError(th);\r\n }\r\n }\r\n }",
"@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}",
"@Override\n //called when something subscribes to this observable\n public void subscribe(ObservableEmitter<Task> emitter) throws Throwable {\n if(!emitter.isDisposed()){\n emitter.onNext(task);\n emitter.onComplete();\n }\n }",
"static void checkXAConnection(AssertableApplicationContext ctx) throws JMSException {\n\t\tXAConnection con = ctx.getBean(XAConnectionFactory.class).createXAConnection();\n\t\ttry {\n\t\t\tcon.setExceptionListener(exception -> {\n\t\t\t});\n\t\t\tassertThat(con.getExceptionListener().getClass().getName())\n\t\t\t\t\t.startsWith(\"brave.jms.TracingExceptionListener\");\n\t\t}\n\t\tfinally {\n\t\t\tcon.close();\n\t\t}\n\t}",
"void subscribe();",
"@Test\n void exceptionThrown() {\n Flux<Integer> source = Flux.range(1, 50).concatWith(\n Mono.error(new IllegalArgumentException())\n );\n\n // FIXME: Verify Flux source using StepVerifier\n }",
"static void checkConnection(AssertableApplicationContext ctx) throws JMSException {\n\t\tConnection con = ctx.getBean(ConnectionFactory.class).createConnection();\n\t\ttry {\n\t\t\tcon.setExceptionListener(exception -> {\n\t\t\t});\n\t\t\tassertThat(con.getExceptionListener().getClass().getName())\n\t\t\t\t\t.startsWith(\"brave.jms.TracingExceptionListener\");\n\t\t}\n\t\tfinally {\n\t\t\tcon.close();\n\t\t}\n\t}",
"public abstract boolean isSubscribesEnabled();",
"@Override\r\n public boolean callAtLeastOnce() {\r\n this.initEsbPublisherBase();\r\n return this.esbPublisherBase.callAtLeastOnce();\r\n }",
"static final void throwIllegalMonitorStateException0X()\n {\n throw new IllegalMonitorStateException();\n }",
"@Override\n public boolean subscribe(Task data) {\n return true;\n }",
"@Ignore(\"FIXME: fix exception\")\n @Test\n public void transient_publish_connecting() throws AblyException {\n AblyRealtime pubAbly = null, subAbly = null;\n String channelName = \"transient_publish_connecting_\" + testParams.name;\n try {\n ClientOptions opts = createOptions(testVars.keys[0].keyStr);\n subAbly = new AblyRealtime(opts);\n\n /* wait until connected */\n new ConnectionWaiter(subAbly.connection).waitFor(ConnectionState.connected);\n assertEquals(\"Verify connected state reached\", subAbly.connection.state, ConnectionState.connected);\n\n /* create a channel and subscribe */\n final Channel subChannel = subAbly.channels.get(channelName);\n Helpers.ChannelWaiter channelWaiter = new Helpers.ChannelWaiter(subChannel);\n Helpers.MessageWaiter messageWaiter = new Helpers.MessageWaiter(subChannel);\n channelWaiter.waitFor(ChannelState.attached);\n\n pubAbly = new AblyRealtime(opts);\n final Channel pubChannel = pubAbly.channels.get(channelName);\n Helpers.CompletionWaiter completionWaiter = new Helpers.CompletionWaiter();\n pubChannel.publish(\"Lorem\", \"Ipsum!\", completionWaiter);\n assertEquals(\"Verify channel remains in initialized state\", pubChannel.state, ChannelState.initialized);\n\n ErrorInfo errorInfo = completionWaiter.waitFor();\n assertEquals(\"Verify channel remains in initialized state\", pubChannel.state, ChannelState.initialized);\n\n messageWaiter.waitFor(1);\n assertEquals(\"Verify expected message received\", messageWaiter.receivedMessages.get(0).name, \"Lorem\");\n } finally {\n if(pubAbly != null) {\n pubAbly.close();\n }\n if(subAbly != null) {\n subAbly.close();\n }\n }\n }",
"@Test\n public void testForumSubscribeMissingUser() {\n ForumException thrown = assertThrows(ForumException.class,\n () -> forumService.subscribeTo(FORUM_ID, 0));\n assertTrue(thrown.getMessage().contains(\"No such user.\"));\n }",
"private void checkInitialization()\n {\n if (!initialized)\n throw new SecurityException(\"ArrayQueue object is corrupt.\");\n }",
"void checkExcn() throws Exception\n { This is called from the main thread context to re-throw any saved\n // exception.\n //\n if (ex != null) {\n throw ex;\n }\n }",
"protected void m67582a(Subscriber<? super T> subscriber) {\n this.a.a(new BackpressureErrorSubscriber(subscriber));\n }",
"@Test\n public void testSearchRepositoryByQueryError() throws Exception {\n TestSubscriber testSubscriber = new TestSubscriber();\n Observable<ApiSearchRepository> searchRepositoryObservable = githubApi.getSearchRepository(\"\", null);\n searchRepositoryObservable.subscribe(testSubscriber);\n testSubscriber.awaitTerminalEvent();\n testSubscriber.assertError(HttpException.class);\n }",
"public static void needException() throws IllegalStateException {\n check(false);\n }",
"@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable p1) {\n\t\t\t\t\t}",
"@Test\n public void exceptionInRunDoesNotPreventReleasingTheMutex() throws Exception {\n long twoDays = 2L * 24 * 60 * 60 * 1000L;\n SamplerImpl si = new SamplerImpl(250L, twoDays);\n si.registerOperation(MockSamplerOperation.class);\n\n si.start();\n\n assertTrue(si.isStarted());\n\n // \"break\" the sampler, so when run() is invoked, it'll throw an exception. Setting the consumers to\n // null will cause an NPE\n\n si.setConsumers(null);\n\n log.info(si + \" has been broken ...\");\n\n // attempt to stop, the stop must not block indefinitely, if it does, the JUnit will kill the test and fail\n\n long t0 = System.currentTimeMillis();\n\n si.stop();\n\n long t1 = System.currentTimeMillis();\n\n log.info(\"the sampler stopped, it took \" + (t1 - t0) + \" ms to stop the sampler\");\n }",
"public void releaseAndFailAll(Throwable cause)\r\n/* 36: */ {\r\n/* 37:70 */ releaseAndFailAll(this.channel, cause);\r\n/* 38: */ }",
"public void errorAll(Subscriber<?> a) {\n Throwable ex = ExceptionHelper.terminate(this.error);\n this.lefts.clear();\n this.rights.clear();\n a.onError(ex);\n }",
"private void CheckSealed()\r\n {\r\n if (_sealed)\r\n { \r\n throw new InvalidOperationException(SR.Get(SRID.CannotChangeAfterSealed, \"ConditionCollection\"));\r\n } \r\n }",
"public void checkException() {\n/* 642 */ checkException(voidPromise());\n/* */ }",
"@Override\n public boolean act(Task task) throws RuntimeException {\n return this.subscribe(task);\n }",
"@Test(expected = UserMismatchException.class)\r\n public void testAdminSaveSubscriptionNotAuthorized() throws Exception {\r\n saveJoePublisher();\r\n saveSamSyndicator();\r\n DatatypeFactory fac = DatatypeFactory.newInstance();\r\n List<Subscription> subs = new ArrayList<Subscription>();\r\n Subscription s = new Subscription();\r\n\r\n s.setMaxEntities(10);\r\n s.setBrief(false);\r\n GregorianCalendar gcal = new GregorianCalendar();\r\n gcal.setTimeInMillis(System.currentTimeMillis());\r\n gcal.add(Calendar.HOUR, 1);\r\n s.setExpiresAfter(fac.newXMLGregorianCalendar(gcal));\r\n s.setSubscriptionFilter(new SubscriptionFilter());\r\n s.getSubscriptionFilter().setFindBusiness(new FindBusiness());\r\n s.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());\r\n s.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);\r\n s.getSubscriptionFilter().getFindBusiness().getName().add(new Name(UDDIConstants.WILDCARD, null));\r\n subs.add(s);\r\n Holder<List<Subscription>> items = new Holder<List<Subscription>>();\r\n items.value = subs;\r\n publisher.adminSaveSubscription(authInfoSam(), TckPublisher.getJoePublisherId(), items);\r\n deleteJoePublisher();\r\n deleteSamSyndicator();\r\n\r\n }",
"private void ensureChangesAllowed() {\n if (lifecycle.started() == false) {\n throw new IllegalStateException(\"Can't make changes to indices service, node is closed\");\n }\n }",
"@Test\n @SuppressWarnings({\"PMD.JUnitTestsShouldIncludeAssert\"})\n public void testSubscribeToRoomBadResponse() {\n // given\n final SubscribeRequest subscribeRequest = SubscribeRequest.builder()\n .user(TEST_USER + \"/\" + TEST_USER).nick(TEST_NICK).room(TEST_ROOM + \"@null\").build();\n given(clientResponseProvider.sendPostRequest(\n MultiUserChatConstants.MULTI_USER_CHAT_SUBSCRIBE_COMMAND, subscribeRequest))\n .willReturn(BAD_RESPONSE);\n\n // when\n multiUserChatService.subscribeToRoom(TEST_USER, TEST_NICK, TEST_ROOM);\n\n // then\n }",
"public void collectWithoutErrors() {\r\n\t\ttry {\r\n\t\t\t// reevaluate each time to disable or reenable at runtime\r\n\t\t\tif (isNodesMonitoringDisabled()) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcollectWithoutErrorsNow();\r\n\t\t} catch (final Throwable t) { // NOPMD\r\n\t\t\tLOG.warn(\"exception while collecting data\", t);\r\n\t\t}\r\n\t}",
"@Override\n public void subscribe(SingleEmitter<String> emitter) throws Exception {\n\n }",
"@Test\n\tpublic void exception() {\n\t\t// ReactiveValue wraps all exceptions in CompletionException.\n\t\tCompletionException ce = assertThrows(CompletionException.class, () -> p.pin(\"key\", () -> {\n\t\t\tthrow new ArithmeticException();\n\t\t}));\n\t\tassertThat(ce.getCause(), instanceOf(ArithmeticException.class));\n\t\tassertThat(p.keys(), contains(\"key\"));\n\t\t// If we try to throw another exception second time around, we will still get the first one.\n\t\tce = assertThrows(CompletionException.class, () -> p.pin(\"key\", () -> {\n\t\t\tthrow new IllegalStateException();\n\t\t}));\n\t\tassertThat(ce.getCause(), instanceOf(ArithmeticException.class));\n\t}",
"boolean ignoreExceptionsDuringInit();",
"public final void subscribe() throws InvalidSubscriptionException {\r\n WritableSession session = (WritableSession) WebsocketActionSupport.getInstance().getSession();\r\n if (sessions.contains(session)) {\r\n throw new InvalidSubscriptionException(\"Current session is already subscribed to this topic\");\r\n }\r\n beforeSubscribe(session);\r\n sessions.add(session);\r\n }",
"private void assertConnected() throws IllegalStateException\n {\n if (provider == null)\n throw new IllegalStateException(\n \"The provider must be non-null and signed on the \"\n + \"service before being able to communicate.\");\n if (!provider.isRegistered())\n throw new IllegalStateException(\n \"The provider must be signed on the service before \"\n + \"being able to communicate.\");\n }",
"@Override\n\tpublic void demoCheckedException() throws IOException {\n\n\t}",
"public static void never() {\n Observable<String> myObservable = Observable.never();\n myObservable.subscribe(genericObserver1);\n }",
"public void test_4() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\ttry {\n\t\t\ttheBSQ.add(null); // null is not an accepted value\n\t\t\tfail(\"should throw an IllegalArgumentException\");\n\t\t}\n\t\tcatch(IllegalArgumentException ex) {\n\t\t\t// OK\n\t\t}\n\t}",
"@Override // io.reactivex.rxjava3.functions.Consumer\n public void accept(Throwable th) {\n Throwable th2 = th;\n if (th2 instanceof NotAuthorizedException) {\n this.a.f = true;\n RatingPublishCheckPresenter.Router router = this.a.b;\n if (router != null) {\n router.openAuth();\n return;\n }\n return;\n }\n RatingPublishCheckPresenterImpl ratingPublishCheckPresenterImpl = this.a;\n Intrinsics.checkNotNullExpressionValue(th2, \"it\");\n RatingPublishCheckPresenterImpl.access$handleError(ratingPublishCheckPresenterImpl, th2);\n }",
"private void handleEarlySubscribeReceived()\n {\n for(Jid from : earlySubscriptions.keySet())\n {\n handleSubscribeReceived(from, earlySubscriptions.get(from));\n }\n\n earlySubscriptions.clear();\n }",
"@Test\n\tdefault void testUnalllowedWritings() {\n\t\tperformStreamTest(stream -> {\n\t\t\tassertThrows(IllegalAccessException.class, () -> stream.writeBytes(new byte[] { 42 }, 0));\n\t\t\tassertThrows(IllegalAccessException.class, () -> stream.writeBytes(new byte[] { 42, 58 }, 6));\n\t\t});\n\t}",
"private void checkConnectedDeviceThrowable()\n\t\t\tthrows IllegalStateException {\n\t\tif (this.mIsConnectedDevice) {\n\t\t\treturn;\n\t\t}\n\t\tthrow new IllegalStateException(\"not connected to a device\");\n\t}",
"@Override\n\t\tpublic void checkPreconditions() {\n\t\t}",
"void notifyUnexpected();",
"IPolicySubscriber withSubscriber();",
"@Test\n\tdefault void testUnalllowedWriting() {\n\t\tperformStreamTest(stream -> {\n\t\t\tassertThrows(IllegalAccessException.class, () -> stream.writeByte((byte) 42, 69));\n\t\t});\n\t}",
"public void a() {\n Object andSet = getAndSet(this);\n if (andSet != this) {\n try {\n this.b.accept(andSet);\n } catch (Throwable th) {\n Exceptions.throwIfFatal(th);\n RxJavaPlugins.onError(th);\n }\n }\n }",
"@Test\n public void startPollingAuthStatusAccessRequired() throws Exception {\n // Arrange\n TestSubscriber<String> subscriber = new TestSubscriber<>();\n when(mAccess.getSessionId(anyString())).thenReturn(STRING_TO_RETURN);\n when(mAccess.getEncryptedPayload(anyString(), anyString())).thenReturn(Access.KEY_AUTH_REQUIRED);\n // Act\n mSubject.startPollingAuthStatus(\"1234567890\").take(1, TimeUnit.SECONDS).toBlocking().subscribe(subscriber);\n // Assert\n subscriber.assertCompleted();\n subscriber.assertNoValues();\n subscriber.assertNoErrors();\n }",
"@Override\n\t\tpublic void onSubscribe(Disposable d) {\n\t\t\tSystem.out.println(\"subscribe\");\n\t\t}",
"protected void checkIfReady() throws Exception {\r\n checkComponents();\r\n }",
"public void checkExcn() throws Exception\n { This is called from the main thread context to re-throw any saved\n // exception.\n //\n if (ex != null) {\n throw ex;\n }\n }",
"@Test\n public void shouldEmitEvents() {\n Observable.just('A', 'B', 'C')\n .subscribeOn(scheduler)\n .subscribe(subscriber);\n\n scheduler.advanceTimeBy(100, TimeUnit.MILLISECONDS);\n subscriber.assertCompleted();\n subscriber.assertValueCount(3);\n subscriber.assertValues('A', 'B', 'C');\n\n TimeDelayer.sleepForOneSecond();\n }",
"@Test\n public void testSearchUserByQueryError() throws Exception {\n TestSubscriber testSubscriber = new TestSubscriber();\n Observable<ApiSearchUser> searchUserObservable = githubApi.getSearchUser(\"\", null);\n searchUserObservable.subscribe(testSubscriber);\n testSubscriber.awaitTerminalEvent();\n testSubscriber.assertError(HttpException.class);\n }",
"public static void test008()\r\n {\r\n System.out.println(\"RxJavaTest04::test008\");\r\n List<String> tickets = new ArrayList<String>(Arrays.asList(\"one\", \"two\", \"three\", \"four\", \"five\"));\r\n List<String> failures = Observable.fromIterable(tickets)\r\n .flatMap(ticket ->\r\n myRxSendEmail(ticket)\r\n .flatMap(response -> Observable.<String>empty())\r\n .doOnError(e -> System.out.printf(\"Failed to send %s: %s\\n\", ticket, e))\r\n .onErrorReturn(err -> ticket))\r\n .toList()\r\n .blockingGet();\r\n for (String failure : failures) {\r\n System.out.println(failure);\r\n }\r\n }",
"public void subscribeActual(Subscriber<? super T> subscriber) {\r\n PublishConnection publishConnection;\r\n while (true) {\r\n publishConnection = (PublishConnection) this.current.get();\r\n if (publishConnection != null) {\r\n break;\r\n }\r\n PublishConnection publishConnection2 = new PublishConnection(this.current, this.bufferSize);\r\n if (this.current.compareAndSet(publishConnection, publishConnection2)) {\r\n publishConnection = publishConnection2;\r\n break;\r\n }\r\n }\r\n InnerSubscription innerSubscription = new InnerSubscription(subscriber, publishConnection);\r\n subscriber.onSubscribe(innerSubscription);\r\n if (publishConnection.add(innerSubscription)) {\r\n if (innerSubscription.isCancelled()) {\r\n publishConnection.remove(innerSubscription);\r\n } else {\r\n publishConnection.drain();\r\n }\r\n return;\r\n }\r\n Throwable th = publishConnection.error;\r\n if (th != null) {\r\n subscriber.onError(th);\r\n } else {\r\n subscriber.onComplete();\r\n }\r\n }"
] | [
"0.6619227",
"0.65442914",
"0.64581317",
"0.6306263",
"0.6145788",
"0.6014031",
"0.58417976",
"0.578552",
"0.57488525",
"0.5720886",
"0.56977665",
"0.5617747",
"0.5575904",
"0.55282915",
"0.5482491",
"0.54716253",
"0.54705405",
"0.54523075",
"0.54446733",
"0.5437279",
"0.5430018",
"0.5420894",
"0.5395817",
"0.5379022",
"0.53670913",
"0.5365827",
"0.53487897",
"0.5332401",
"0.5322092",
"0.5313353",
"0.52952933",
"0.52879536",
"0.528701",
"0.52803147",
"0.5276826",
"0.5254109",
"0.52419454",
"0.5222989",
"0.52209896",
"0.5162264",
"0.5161319",
"0.51587296",
"0.5153449",
"0.5153449",
"0.5153449",
"0.5153449",
"0.5153449",
"0.5153449",
"0.5153314",
"0.5151768",
"0.514259",
"0.51362634",
"0.5134894",
"0.5131167",
"0.5123019",
"0.5115187",
"0.51149005",
"0.5109755",
"0.51097155",
"0.5107191",
"0.5102034",
"0.5096909",
"0.50785154",
"0.5076992",
"0.5065326",
"0.5032368",
"0.5002609",
"0.50012046",
"0.49936628",
"0.49866202",
"0.49839985",
"0.49786916",
"0.49740148",
"0.49734798",
"0.4969888",
"0.49691215",
"0.4964922",
"0.49567562",
"0.49536678",
"0.49516845",
"0.49498957",
"0.4947949",
"0.49477625",
"0.4945946",
"0.49444175",
"0.49382985",
"0.49362075",
"0.4934814",
"0.49298373",
"0.4927354",
"0.49231115",
"0.49160162",
"0.49155676",
"0.49011284",
"0.48972273",
"0.4888861",
"0.48736724",
"0.4868499",
"0.48657995",
"0.48639178"
] | 0.6662424 | 0 |
Ensure exceptions are thrown when types mismatch. | @Test(expected = SubscriberTypeMismatchException.class)
public void aTestInvalidSubscribe() {
broker.subscribe(new IntegerSubscriber(), Boolean.class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void validateTypes() {\r\n\t\tfor (int i = 0; i < types.length; i++) {\r\n\t\t\tString type = types[i];\r\n\t\t\tif (!TypedItem.isValidType(type))\r\n\t\t\t\tthrow new IllegalArgumentException(String.format(\"The monster type %s is invalid\", type));\r\n\t\t\tfor (int j = i + 1; j < types.length; j++) {\r\n\t\t\t\tif (type.equals(types[j])) {\r\n\t\t\t\t\tthrow new IllegalArgumentException(\"The monster cant have two similar types..\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testAnotherInvalidMatch() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(String.class);\n typeList.add(Object.class);\n typeList.add(Object.class);\n typeList.addAll(getBothParameters(ParamToListParam.class));\n typeList.add(getFirstTypeParameter(StringListSink.class));\n PipelineRegisterer.validateTypes(typeList);\n }",
"private void validator() throws Exception {\n if (getDBTable() == null) throw new Exception(\"getDBTable missing\");\n if (getColumnsString() == null) throw new Exception(\"getColumnsString missing\");\n if (getColumnsType() == null || getColumnsType().size() <= 0) throw new Exception(\"getColumnsType missing\");\n if (getDuplicateUpdateColumnString() == null) {\n if (getColumnsString().split(\",\").length != getColumnsType().size())\n throw new Exception(\"mismatch for type and columns\");\n\n } else {\n if (getColumnsString().split(\",\").length +\n getDuplicateUpdateColumnString().split(\",\").length != getColumnsType().size())\n throw new Exception(\"mismatch for type and columns\");\n }\n }",
"@Test\n void cannotInferType() {\n }",
"public void checkTypeValid(List<Object> types) {\n if(types.size() != inputs.size()) {\n throw new IllegalArgumentException(\"Not matched passed parameter count.\");\n }\n }",
"public void checkNotPolymorphicOrUnknown() {\n if (isPolymorphic())\n throw new AnalysisException(\"Unexpected polymorphic value!\");\n if (isUnknown())\n throw new AnalysisException(\"Unexpected 'unknown' value!\");\n }",
"public void testTransformWithInvalidElementType() throws Exception {\n try {\n instance.transform(\"invalid\", document, caller);\n fail(\"ClassCastException is excepted.\");\n } catch (ClassCastException cce) {\n // pass\n }\n }",
"@Test\n public void checkCharacterTypesRuleUnknownType() {\n final String[] original = { \"fooBAR\" };\n final String[] pass_types = { \"some_unknown_keyword\" };\n exception.expect(ConfigException.class);\n // TODO(dmikurube): Except \"Caused by\": exception.expectCause(instanceOf(JsonMappingException.class));\n // Needs to import org.hamcrest.Matchers... in addition to org.junit...\n checkCharacterTypesRuleInternal(original, original, pass_types, \"\");\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 }",
"protected void typeMismatch(String line) {\n\t\tthrow new RuntimeException(\"Type mismatch error: \" + line);\n\t}",
"public void testInvalidNoType() { assertInvalid(\"a\"); }",
"public void testVerifyOrderDoesntMatter(){\n _throws _tt = new _throws( );\n _tt.add( RuntimeException.class );\n _tt.add( IOException.class );\n\n _throws _ot = _throws.of( IOException.class, RuntimeException.class );\n assertEquals( _tt, _ot );\n }",
"public void validate() throws org.apache.thrift.TException {\n if (type != null) {\n type.validate();\n }\n if (returnType != null) {\n returnType.validate();\n }\n }",
"private static void checkConvertibility(JValue val, JType typ){\r\n\t\tJType argTyp = val.getType();\n\t\tif (argTyp == null) {\n\t\t\tif (!(typ == AnyType.getInstance() || typ.isObject())) {\n\t\t\t\tthrow new TypeIncompatibleException(JObjectType.getInstance(), typ);\n\t\t\t}\n\t\t} else {\n\t\t\tConvertibility conv = argTyp.getConvertibilityTo(typ);\n\t\t\tif(conv == Convertibility.UNCONVERTIBLE){\n\t\t\t\tthrow new TypeIncompatibleException(argTyp, typ);\n\t\t\t} else if (conv == Convertibility.UNSAFE && argTyp == AnyType.getInstance()){\n\t\t\t\tUntypedValue uv = (UntypedValue) val;\n\t\t\t\tcheckConvertibility(uv.getActual(), typ);\n\t\t\t}\n\t\t}\r\n\t}",
"@Test\n public void testRequireAtomString_GenericType() {\n LOGGER.info(\"requireAtomString\");\n Atom actual = null;\n final Atom expected = null;\n boolean caught = false;\n try {\n actual = requireAtomString(null);\n } catch (final ClassCastException ex) {\n caught = true;\n assertEquals(\"\", ex.getMessage());\n }\n assertTrue(caught);\n assertEquals(expected, actual);\n }",
"private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\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 }",
"void check()\n {\n checkUsedType(responseType);\n checkUsedType(requestType);\n }",
"public void testInvalidEventTypes() throws Exception {\n \n \n UnitTestData data = new UnitTestData();\n EventFeedJSON eventFeedJSON = new EventFeedJSON(data.getContest());\n \n String [] badTypeNameLists = {\n //\n \"a,b,c\", //\n \"contest,teams,bogus\", //\n \"unk,contest,teams\", //\n \"bad\", //\n \"23423499afsdfdf,34343,contest\", //\n };\n\n for (String badbadlist : badTypeNameLists) {\n try {\n eventFeedJSON.setEventTypeList(badbadlist);\n eventFeedJSON.createJSON(data.getContest(), null, null);\n fail(\"Expecting IllegalArgumentException for list '\" + badbadlist + \"'\");\n } catch (IllegalArgumentException e) {\n\n ; // Expected results, this passes the test\n }\n }\n\n \n }",
"@Test\r\n public void test_setMimeTypeRetriever_Failure1() throws Exception {\r\n try {\r\n instance.setMimeTypeRetriever(null);\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n // success\r\n }\r\n }",
"protected void typeMismatch(Object obj) {\n\t\ttypeMismatch(obj.toString());\n\t}",
"@Override\n\t\tpublic void checkPreconditions() {\n\t\t}",
"private void assertValidity() {\n if (latitudes.size() != longitudes.size()) {\n throw new IllegalStateException(\"GIS location needs equal number of lat/lon points.\");\n }\n if (!(latitudes.size() == 1 || latitudes.size() >= 3)) {\n throw new IllegalStateException(\"GIS location needs either one point or more than two.\");\n }\n }",
"private void checkDocumentSourceTypes() {\n val message = \"document_source_types is not valid!\";\n val documentSourceTypes = config.getStringList(\"document_source_types\");\n\n if (documentSourceTypes.contains(DocumentSourceType.OMDB.name())) {\n val omdbApiKey = config.getString(\"omdbApiKey\");\n checkArgument(!isNullOrEmpty(omdbApiKey), \"OMDB API KEY must be set for using OMDB as source. \\n\" +\n \"You can obtain one here: http://www.omdbapi.com/apikey.aspx\");\n }\n\n try {\n documentSourceTypes.forEach(DocumentSourceType::valueOf);\n } catch (IllegalArgumentException e) {\n throw new IllegalArgumentException(message);\n }\n }",
"@Test\n public void testRequireAtomString_GenericType_String_1() {\n LOGGER.info(\"requireAtomString with message\");\n Atom actual = null;\n final Atom expected = null;\n boolean caught = false;\n try {\n actual = requireAtomString(null, \"Message\");\n } catch (final ClassCastException ex) {\n caught = true;\n assertEquals(\"Message\", ex.getMessage());\n }\n assertTrue(caught);\n assertEquals(expected, actual);\n }",
"private void checkDeclaredExceptionsMatch() {\n\t\tfor (Map.Entry<Method, AssistedConstructor<?>> entry : factoryMethodToConstructor.entrySet()) {\n\t\t\tfor (Class<?> constructorException : entry.getValue().getDeclaredExceptions()) {\n\t\t\t\tif (!isConstructorExceptionCompatibleWithFactoryExeception(constructorException, entry.getKey()\n\t\t\t\t\t\t.getExceptionTypes())) {\n\t\t\t\t\tthrow newConfigurationException(\"Constructor %s declares an exception, but no compatible \"\n\t\t\t\t\t\t\t+ \"exception is thrown by the factory method %s\", entry.getValue(), entry.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test58() throws Throwable {\n PipedWriter pipedWriter0 = new PipedWriter();\n DBCatalog dBCatalog0 = new DBCatalog();\n DBSchema dBSchema0 = new DBSchema(\"G4^{5XtQ94G\", dBCatalog0);\n // Undeclared exception!\n try { \n SQLUtil.parseColumnTypeAndSize(\"getFloat(String)\");\n fail(\"Expecting exception: NumberFormatException\");\n \n } catch(NumberFormatException e) {\n //\n // For input string: \\\"String\\\"\n //\n verifyException(\"java.lang.NumberFormatException\", e);\n }\n }",
"static void checkArgTypes(\r\n\t\tString funcName, Argument[] args, JParameter[] params) {\r\n\t\tif(args.length != params.length){\r\n\t\t\tthrow new IllegalArgumentsException(funcName, \"Wrong number of arguments\");\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<args.length;i++){\r\n\t\t\tJValue val = args[i].getValue();\r\n\t\t\tJParameter jp = params[i];\r\n\t\t\tif(jp.isUntyped()){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tJType typ = jp.getType();\r\n\t\t\tif(RefValue.isGenericNull(val)){\r\n\t\t\t\tJTypeKind kind = typ.getKind();\r\n\t\t\t\tif (kind == JTypeKind.CLASS || kind == JTypeKind.PLATFORM){\r\n\t\t\t\t\t// If it is a generic null, replace it with a typed null to comply with function declaration.\r\n\t\t\t\t\tRefValue rv = RefValue.makeNullRefValue(\r\n\t\t\t\t\t\tval.getMemoryArea(), kind == JTypeKind.CLASS ? (ICompoundType)typ : JObjectType.getInstance());\r\n\t\t\t\t\targs[i].setValue(rv);\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\tcheckConvertibility(val, typ);\r\n\t\t}\r\n\t}",
"@Test(expected=ClassCastException.class)\n public void testWrongValueOf() {\n assertSame(Configuration.Key.isDoubleToDoubleSupported,\n Configuration.Key.valueOf(\"isDoubleToDoubleSupported\", String.class));\n }",
"@Test\n\tvoid testInvalidCustomerType() {\n\t\tCustomerTypeFactory customerTypeFactory = new CustomerTypeFactory();\n\t\tassertThrows(CustomerTypeException.class, () -> {\n\t\t\tcustomerTypeFactory.getCustomerType(\"gold\");\n\t });\n\t}",
"public void testNegativeScalar() {\n\n /*\n * fixme Boolean converters not implemented at this point value = LocaleConvertUtils.convert(\"foo\", Boolean.TYPE); ...\n *\n * value = LocaleConvertUtils.convert(\"foo\", Boolean.class); ...\n */\n\n try {\n LocaleConvertUtils.convert(\"foo\", Byte.TYPE);\n fail(\"Should have thrown conversion exception (1)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Byte.class);\n fail(\"Should have thrown conversion exception (2)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n /*\n * fixme - not implemented try { value = LocaleConvertUtils.convert(\"org.apache.commons.beanutils2.Undefined\", Class.class);\n * fail(\"Should have thrown conversion exception\"); } catch (ConversionException e) { ; // Expected result }\n */\n\n try {\n LocaleConvertUtils.convert(\"foo\", Double.TYPE);\n fail(\"Should have thrown conversion exception (3)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Double.class);\n fail(\"Should have thrown conversion exception (4)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Float.TYPE);\n fail(\"Should have thrown conversion exception (5)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Float.class);\n fail(\"Should have thrown conversion exception (6)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Integer.TYPE);\n fail(\"Should have thrown conversion exception (7)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Integer.class);\n fail(\"Should have thrown conversion exception (8)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Byte.TYPE);\n fail(\"Should have thrown conversion exception (9)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Long.class);\n fail(\"Should have thrown conversion exception (10)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Short.TYPE);\n fail(\"Should have thrown conversion exception (11)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Short.class);\n fail(\"Should have thrown conversion exception (12)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n }",
"public MirroredTypesException(List<? extends TypeMirror> paramList) {\n/* 69 */ super(\"Attempt to access Class objects for TypeMirrors \" + (paramList = new ArrayList<>(paramList))\n/* */ \n/* 71 */ .toString());\n/* 72 */ this.types = Collections.unmodifiableList(paramList);\n/* */ }",
"@Test\n public void testConvertLdapExceptions() {\n assertEquals(org.springframework.ldap.AttributeInUseException.class,\n LdapUtils.convertLdapException(new javax.naming.directory.AttributeInUseException()).getClass());\n assertEquals(org.springframework.ldap.AttributeModificationException.class,\n LdapUtils.convertLdapException(new javax.naming.directory.AttributeModificationException()).getClass());\n assertEquals(org.springframework.ldap.CannotProceedException.class,\n LdapUtils.convertLdapException(new javax.naming.CannotProceedException()).getClass());\n assertEquals(org.springframework.ldap.CommunicationException.class,\n LdapUtils.convertLdapException(new javax.naming.CommunicationException()).getClass());\n assertEquals(org.springframework.ldap.ConfigurationException.class,\n LdapUtils.convertLdapException(new javax.naming.ConfigurationException()).getClass());\n assertEquals(org.springframework.ldap.ContextNotEmptyException.class,\n LdapUtils.convertLdapException(new javax.naming.ContextNotEmptyException()).getClass());\n assertEquals(org.springframework.ldap.InsufficientResourcesException.class,\n LdapUtils.convertLdapException(new javax.naming.InsufficientResourcesException()).getClass());\n assertEquals(org.springframework.ldap.InterruptedNamingException.class,\n LdapUtils.convertLdapException(new javax.naming.InterruptedNamingException()).getClass());\n assertEquals(org.springframework.ldap.InvalidAttributeIdentifierException.class,\n LdapUtils.convertLdapException(new javax.naming.directory.InvalidAttributeIdentifierException()).getClass());\n assertEquals(org.springframework.ldap.InvalidAttributesException.class,\n LdapUtils.convertLdapException(new javax.naming.directory.InvalidAttributesException()).getClass());\n assertEquals(org.springframework.ldap.InvalidAttributeValueException.class,\n LdapUtils.convertLdapException(new javax.naming.directory.InvalidAttributeValueException()).getClass());\n assertEquals(org.springframework.ldap.InvalidNameException.class,\n LdapUtils.convertLdapException(new javax.naming.InvalidNameException()).getClass());\n assertEquals(org.springframework.ldap.InvalidSearchControlsException.class,\n LdapUtils.convertLdapException(new javax.naming.directory.InvalidSearchControlsException()).getClass());\n assertEquals(org.springframework.ldap.InvalidSearchFilterException.class,\n LdapUtils.convertLdapException(new javax.naming.directory.InvalidSearchFilterException()).getClass());\n assertEquals(org.springframework.ldap.SizeLimitExceededException.class,\n LdapUtils.convertLdapException(new javax.naming.SizeLimitExceededException()).getClass());\n assertEquals(org.springframework.ldap.TimeLimitExceededException.class,\n LdapUtils.convertLdapException(new javax.naming.TimeLimitExceededException()).getClass());\n assertEquals(org.springframework.ldap.LimitExceededException.class,\n LdapUtils.convertLdapException(new javax.naming.LimitExceededException()).getClass());\n assertEquals(org.springframework.ldap.LinkLoopException.class,\n LdapUtils.convertLdapException(new javax.naming.LinkLoopException()).getClass());\n assertEquals(org.springframework.ldap.MalformedLinkException.class,\n LdapUtils.convertLdapException(new javax.naming.MalformedLinkException()).getClass());\n assertEquals(org.springframework.ldap.LinkException.class,\n LdapUtils.convertLdapException(new javax.naming.LinkException()).getClass());\n assertEquals(org.springframework.ldap.NameAlreadyBoundException.class,\n LdapUtils.convertLdapException(new javax.naming.NameAlreadyBoundException()).getClass());\n assertEquals(org.springframework.ldap.NameNotFoundException.class,\n LdapUtils.convertLdapException(new javax.naming.NameNotFoundException()).getClass());\n assertEquals(org.springframework.ldap.NoPermissionException.class,\n LdapUtils.convertLdapException(new javax.naming.NoPermissionException()).getClass());\n assertEquals(org.springframework.ldap.AuthenticationException.class,\n LdapUtils.convertLdapException(new javax.naming.AuthenticationException()).getClass());\n assertEquals(org.springframework.ldap.AuthenticationNotSupportedException.class,\n LdapUtils.convertLdapException(new javax.naming.AuthenticationNotSupportedException()).getClass());\n assertEquals(org.springframework.ldap.NoInitialContextException.class,\n LdapUtils.convertLdapException(new javax.naming.NoInitialContextException()).getClass());\n assertEquals(org.springframework.ldap.NoSuchAttributeException.class,\n LdapUtils.convertLdapException(new javax.naming.directory.NoSuchAttributeException()).getClass());\n assertEquals(org.springframework.ldap.NotContextException.class,\n LdapUtils.convertLdapException(new javax.naming.NotContextException()).getClass());\n assertEquals(org.springframework.ldap.OperationNotSupportedException.class,\n LdapUtils.convertLdapException(new javax.naming.OperationNotSupportedException()).getClass());\n assertEquals(org.springframework.ldap.PartialResultException.class,\n LdapUtils.convertLdapException(new javax.naming.PartialResultException()).getClass());\n assertEquals(org.springframework.ldap.SchemaViolationException.class,\n LdapUtils.convertLdapException(new javax.naming.directory.SchemaViolationException()).getClass());\n assertEquals(org.springframework.ldap.ServiceUnavailableException.class,\n LdapUtils.convertLdapException(new javax.naming.ServiceUnavailableException()).getClass());\n\n // Test Exceptions that extend javax.naming packaage extensions\n assertEquals(org.springframework.ldap.AttributeInUseException.class,\n LdapUtils.convertLdapException(new MockAttributeInUseException()).getClass());\n assertEquals(org.springframework.ldap.AttributeModificationException.class,\n LdapUtils.convertLdapException(new MockAttributeModificationException()).getClass());\n assertEquals(org.springframework.ldap.CannotProceedException.class,\n LdapUtils.convertLdapException(new MockCannotProceedException()).getClass());\n assertEquals(org.springframework.ldap.CommunicationException.class,\n LdapUtils.convertLdapException(new MockCommunicationException()).getClass());\n assertEquals(org.springframework.ldap.ConfigurationException.class,\n LdapUtils.convertLdapException(new MockConfigurationException()).getClass());\n assertEquals(org.springframework.ldap.ContextNotEmptyException.class,\n LdapUtils.convertLdapException(new MockContextNotEmptyException()).getClass());\n assertEquals(org.springframework.ldap.InsufficientResourcesException.class,\n LdapUtils.convertLdapException(new MockInsufficientResourcesException()).getClass());\n assertEquals(org.springframework.ldap.InterruptedNamingException.class,\n LdapUtils.convertLdapException(new MockInterruptedNamingException()).getClass());\n assertEquals(org.springframework.ldap.InvalidAttributeIdentifierException.class,\n LdapUtils.convertLdapException(new MockInvalidAttributeIdentifierException()).getClass());\n assertEquals(org.springframework.ldap.InvalidAttributesException.class,\n LdapUtils.convertLdapException(new MockInvalidAttributesException()).getClass());\n assertEquals(org.springframework.ldap.InvalidAttributeValueException.class,\n LdapUtils.convertLdapException(new MockInvalidAttributeValueException()).getClass());\n assertEquals(org.springframework.ldap.InvalidNameException.class,\n LdapUtils.convertLdapException(new MockInvalidNameException()).getClass());\n assertEquals(org.springframework.ldap.InvalidSearchControlsException.class,\n LdapUtils.convertLdapException(new MockInvalidSearchControlsException()).getClass());\n assertEquals(org.springframework.ldap.InvalidSearchFilterException.class,\n LdapUtils.convertLdapException(new MockInvalidSearchFilterException()).getClass());\n assertEquals(org.springframework.ldap.SizeLimitExceededException.class,\n LdapUtils.convertLdapException(new MockSizeLimitExceededException()).getClass());\n assertEquals(org.springframework.ldap.TimeLimitExceededException.class,\n LdapUtils.convertLdapException(new MockTimeLimitExceededException()).getClass());\n assertEquals(org.springframework.ldap.LimitExceededException.class,\n LdapUtils.convertLdapException(new MockLimitExceededException()).getClass());\n assertEquals(org.springframework.ldap.LinkLoopException.class,\n LdapUtils.convertLdapException(new MockLinkLoopException()).getClass());\n assertEquals(org.springframework.ldap.MalformedLinkException.class,\n LdapUtils.convertLdapException(new MockMalformedLinkException()).getClass());\n assertEquals(org.springframework.ldap.LinkException.class,\n LdapUtils.convertLdapException(new MockLinkException()).getClass());\n assertEquals(org.springframework.ldap.NameAlreadyBoundException.class,\n LdapUtils.convertLdapException(new MockNameAlreadyBoundException()).getClass());\n assertEquals(org.springframework.ldap.NameNotFoundException.class,\n LdapUtils.convertLdapException(new MockNameNotFoundException()).getClass());\n assertEquals(org.springframework.ldap.NoPermissionException.class,\n LdapUtils.convertLdapException(new MockNoPermissionException()).getClass());\n assertEquals(org.springframework.ldap.AuthenticationException.class,\n LdapUtils.convertLdapException(new MockAuthenticationException()).getClass());\n assertEquals(org.springframework.ldap.AuthenticationNotSupportedException.class,\n LdapUtils.convertLdapException(new MockAuthenticationNotSupportedException()).getClass());\n assertEquals(org.springframework.ldap.NoInitialContextException.class,\n LdapUtils.convertLdapException(new MockNoInitialContextException()).getClass());\n assertEquals(org.springframework.ldap.NoSuchAttributeException.class,\n LdapUtils.convertLdapException(new MockNoSuchAttributeException()).getClass());\n assertEquals(org.springframework.ldap.NotContextException.class,\n LdapUtils.convertLdapException(new MockNotContextException()).getClass());\n assertEquals(org.springframework.ldap.OperationNotSupportedException.class,\n LdapUtils.convertLdapException(new MockOperationNotSupportedException()).getClass());\n assertEquals(org.springframework.ldap.PartialResultException.class,\n LdapUtils.convertLdapException(new MockPartialResultException()).getClass());\n assertEquals(org.springframework.ldap.SchemaViolationException.class,\n LdapUtils.convertLdapException(new MockSchemaViolationException()).getClass());\n assertEquals(org.springframework.ldap.ServiceUnavailableException.class,\n LdapUtils.convertLdapException(new MockServiceUnavailableException()).getClass());\n }",
"private void validate() throws BaseException\n {\n boolean okay = true;\n\n //TODO: check the bases in seq for validity\n // If the type is RNA, the base T is not allowed\n // If the type is DNA, the base U is not allowed\n // If a disallowed type is present, set okay to false.\n \n if (!okay)\n {\n throw new BaseException();\n }\n }",
"private void checkType(V value) {\n valueClass.cast(value);\n }",
"private void checkFormat() {\n if (y.pixelStride != 1) {\n throw new IllegalArgumentException(String.format(\n \"Pixel stride for Y plane must be 1 but got %d instead\",\n y.pixelStride\n ));\n }\n if (u.pixelStride != v.pixelStride || u.rowStride != v.rowStride) {\n throw new IllegalArgumentException(String.format(\n \"U and V planes must have the same pixel and row strides \" +\n \"but got pixel=%d row=%d for U \" +\n \"and pixel=%d and row=%d for V\",\n u.pixelStride, u.rowStride,\n v.pixelStride, v.rowStride\n ));\n }\n if (u.pixelStride != 1 && u.pixelStride != 2) {\n throw new IllegalArgumentException(\n \"Supported pixel strides for U and V planes are 1 and 2\"\n );\n }\n }",
"public void testThrowsEquality(){\n _throws _t1 = _throws.of( RuntimeException.class );\n _throws _t2 = _throws.of( \"java.lang.RuntimeException\" );\n assertTrue( Ast.typesEqual( (ReferenceType)Ast.typeRef(RuntimeException.class),\n (ReferenceType)Ast.typeRef(\"java.lang.RuntimeException\" ) ));\n\n assertTrue( Ast.typesEqual( (ReferenceType)Ast.typeRef(\"RuntimeException\"),\n (ReferenceType)Ast.typeRef(\"java.lang.RuntimeException\" ) ));\n\n //assertTrue( _t1.has((ReferenceType)Ast.typeRef(\"java.lang.RuntimeException\" )));\n assertTrue( _t1.has((ReferenceType)Ast.typeRef(\"RuntimeException\" )));\n assertEquals( _t1, _t2 );\n\n assertEquals( _t1.hashCode(), _t2.hashCode());\n }",
"void check() throws IllegalStateException {\n if (\n title == null ||\n release == null ||\n duration == 0 ||\n synopsis == null ||\n genre == null ||\n cast == null\n )\n throw new IllegalStateException(\"incomplete type\");\n }",
"@Test\n public void testCheckValidity_InvalidFields() throws Exception {\n expectCheckValidityFailure(msg -> msg.setSource(null));\n \n // null protocol\n expectCheckValidityFailure(msg -> msg.setProtocol(null));\n \n // null or empty topic\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setTopic(value));\n \n // null payload\n expectCheckValidityFailure(msg -> msg.setPayload(null));\n \n // empty payload should NOT throw an exception\n Forward forward = makeValidMessage();\n forward.setPayload(\"\");\n forward.checkValidity();\n \n // null or empty requestId\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setRequestId(value));\n \n // invalid hop count\n expectCheckValidityFailure(msg -> msg.setNumHops(-1));\n }",
"@Test\n void parseInvalidTextInStrictMode() {\n assertThrows(IllegalArgumentException.class, () -> {\n HttpMediaType.create(\"text\");\n },\n \"Cannot parse media type: text\");\n }",
"private void checkArgTypes() {\n Parameter[] methodParams = method.getParameters();\n if(methodParams.length != arguments.length + 1) {\n throw new InvalidCommandException(\"Incorrect number of arguments on command method. Commands must have 1 argument for the sender and one argument per annotated argument\");\n }\n\n Class<?> firstParamType = methodParams[0].getType();\n\n boolean isFirstArgValid = true;\n if(requiresPlayer) {\n if(firstParamType.isAssignableFrom(IPlayerData.class)) {\n usePlayerData = true; // Command methods annotated with a player requirement can also use IPlayerData as their first argument\n } else if(!firstParamType.isAssignableFrom(Player.class)) {\n isFirstArgValid = false; // Otherwise, set it to invalid if we can't assign it from a player\n }\n } else if(!firstParamType.isAssignableFrom(CommandSender.class)) { // Non player requirement annotated commands must just take a CommandSender\n isFirstArgValid = false;\n }\n\n if(!isFirstArgValid) {\n throw new InvalidCommandException(\"The first argument for a command must be a CommandSender. (or a Player/IPlayerData if annotated with a player requirement)\");\n }\n }",
"public void validate() throws org.apache.thrift.TException {\n if (version == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'version' was not present! Struct: \" + toString());\n }\n if (am_handle == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'am_handle' was not present! Struct: \" + toString());\n }\n if (user == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'user' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'gang' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n if (am_handle != null) {\n am_handle.validate();\n }\n if (reservation_id != null) {\n reservation_id.validate();\n }\n }",
"@Test(timeout = 4000)\n public void test34() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.parseColumnTypeAndSize(\" R[~rnsGR(#-\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Illegal column type format: R[~rnsGR(#-\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"OOPExpectedException expect(Class<? extends Exception> expected);",
"@Test\n public void testIsTypeOf() throws ValueDoesNotMatchTypeException {\n testTypeKindOf(AnyType.IS_TYPE_OF);\n }",
"void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }",
"@Test\n public void testSimpleValidType() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(TimestampedEvent.class);\n typeList.add(GenericRecord.class);\n typeList.add(Integer.class);\n typeList.add(Object.class);\n PipelineRegisterer.validateTypes(typeList);\n }",
"@Test(timeout = 4000)\n public void test115() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.parseColumnTypeAndSize(\", (\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Illegal column type format: , (\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@ExceptionHandler({ MethodArgumentTypeMismatchException.class })\r\n\tpublic ResponseEntity<Object> handleMethodArgumentTypeMismatch(\r\n\t MethodArgumentTypeMismatchException ex, WebRequest request) {\r\n\t String error = \r\n\t ex.getName() + \" should be of type \" + ex.getRequiredType().getName();\r\n\t \r\n\t ApiError apiError = \r\n\t new ApiError(HttpStatus.BAD_REQUEST, ex.getLocalizedMessage(), error);\r\n\t return new ResponseEntity<Object>(\r\n\t apiError, new HttpHeaders(), apiError.getStatus());\r\n\t}",
"void checkSameDataType(String datatype, String datatype1)\n {\n DefaultTableModel semanticerror = (DefaultTableModel)tblErrorSemantic.getModel();\n if(datatype.equals(datatype1))\n {\n\n }\n else if(datatype.equals(\"INT\") && datatype1.equals(\"FLOAT\"))\n {\n \n }\n else if(datatype.equals(\"FLOAT\") && datatype1.equals(\"INT\"))\n {\n \n }\n else if(datatype1 == null)\n {\n\n }\n else\n {\n semanticerror.addRow(new Object[] {tblLexeme.getModel().getValueAt(tokenPos-2, 0),\"Incompatible Types: \"+datatype1+\" Cannot be converted to \"+datatype, tblLexeme.getModel().getValueAt(tokenPos-2, 2)}); \n } \n datatype = null;\n }",
"@Test\n public void testStringFractionImplInvalidStrings() {\n assertThrows(NumberFormatException.class, () -> {\n new FractionImpl(\"9 9 0/2\");\n });\n //Input value which is not a number\n assertThrows(NumberFormatException.class, () -> {\n new FractionImpl(\"One\");\n });\n }",
"@Test(timeout = 4000)\n public void test116() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.parseColumnTypeAndSize(\" (\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Illegal column type format: (\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test\n public void testIsKindOf() throws ValueDoesNotMatchTypeException {\n testTypeKindOf(AnyType.IS_KIND_OF);\n }",
"private void checkSizes() throws Exception{\n\t\tint width = images[0].getWidth();\n\t\tint height = images[0].getHeight();\n\t\t//i = 1 because first image is referenced.\n\t\tfor (int i = 1; i < images.length; i++){\n\t\t\tif ((images[i].getWidth() != width) || (images[i].getHeight() != height)){\n\t\t\t\tthrow new Exception(\"Textures sizes are imcompatible\");\n\t\t\t}\t\t\t\t\n\t\t}\n\t}",
"@Test(expected = InvalidArgumentException.class)\r\n\tpublic void throwInvalidArgumentException() {\r\n\t\tthis.validator.doValidation(null);\r\n\t}",
"private void verifyExceptionThrown(Exception thrown, Class expected) {\n\n boolean exceptionFound = false;\n Throwable cause = thrown;\n while (cause != null) {\n if (expected.isInstance(cause)) {\n // good\n exceptionFound = true;\n break;\n }\n else {\n cause = cause.getCause();\n }\n }\n if (!exceptionFound) {\n Assert.fail(expected.getSimpleName() + \" was expected but not thrown\", thrown);\n }\n }",
"@ExceptionHandler(MethodArgumentTypeMismatchException.class)\r\n @ResponseStatus(HttpStatus.BAD_REQUEST)\r\n public JsonErrorResult argumentTypeMismatchException(MethodArgumentTypeMismatchException e) {\r\n\r\n logger.error(\" Argument Type Mismatch\", e);\r\n return new JsonErrorResult(\"[ Argument Type Mismatch ]\" + e.getMessage(), HttpStatus.BAD_REQUEST);\r\n }",
"private void checkCommon() {\n final AnnotationTypeDeclaration commonAnnoType = (AnnotationTypeDeclaration) _env.getTypeDeclaration(Common.class.getName());\n final Collection<Declaration> decls = _env.getDeclarationsAnnotatedWith(commonAnnoType);\n for (Declaration decl : decls) {\n if (decl instanceof FieldDeclaration) {\n final FieldDeclaration field = (FieldDeclaration) decl;\n final TypeMirror type = field.getType();\n if (type instanceof DeclaredType) {\n final TypeMirror collectionType = _env.getTypeUtils().getDeclaredType(_env.getTypeDeclaration(Collection.class.getName()));\n final Collection<TypeMirror> typeVars = ((DeclaredType) type).getActualTypeArguments();\n if (typeVars.size() == 1) {\n TypeMirror typeVar = typeVars.iterator().next();\n boolean assignable = _env.getTypeUtils().isAssignable(typeVar, collectionType);\n if (assignable)\n _msgr.printError(typeVar + \" is assignable to \" + collectionType);\n else\n _msgr.printError(typeVar + \" is not assignable to \" + collectionType);\n }\n }\n } else if (decl instanceof TypeDeclaration) {\n final TypeDeclaration typeDecl = (TypeDeclaration) decl;\n final Collection<TypeParameterDeclaration> typeParams = typeDecl.getFormalTypeParameters();\n for (TypeParameterDeclaration typeParam : typeParams) {\n Declaration owner = typeParam.getOwner();\n _msgr.printError(\"Type parameter '\" + typeParam + \"' belongs to \" + owner.getClass().getName() + \" \" + owner.getSimpleName());\n }\n } else if (decl instanceof MethodDeclaration) {\n final MethodDeclaration methodDecl = (MethodDeclaration) decl;\n final Collection<TypeParameterDeclaration> typeParams = methodDecl.getFormalTypeParameters();\n for (TypeParameterDeclaration typeParam : typeParams) {\n Declaration owner = typeParam.getOwner();\n _msgr.printError(\"Type parameter '\" + typeParam + \"' belongs to \" + owner.getClass().getName() + \" \" + owner.getSimpleName());\n }\n }\n }\n }",
"@Test\n public void shouldThrowIfInvalidActionInVersion() {\n\n // GIVEN\n ActionProcessor processor = new ActionProcessor(false, false);\n List<Action> actionsToProcess = asList(ADD_FILE, REMOVE_FILE, ADD_FILE);\n DeltaSourceException caughtException = null;\n\n // WHEN\n try {\n processor.processActions(prepareChangesToProcess(actionsToProcess));\n } catch (DeltaSourceException e) {\n caughtException = e;\n }\n\n // THEN\n assertThat(caughtException, notNullValue());\n assertThat(caughtException.getSnapshotVersion().orElse(null), equalTo(SNAPSHOT_VERSION));\n assertThat(caughtException.getTablePath().orElse(null), equalTo(TABLE_PATH));\n }",
"@Test\n public void badInputs() throws Exception {\n // null account metadata\n TestUtils.assertException(IllegalArgumentException.class, () -> Account.Account.fromJson(null), null);\n // account metadata in wrong format\n JSONObject badMetadata1 = new JSONObject().put(\"badKey\", \"badValue\");\n TestUtils.assertException(JSONException.class, () -> Account.Account.fromJson(badMetadata1), null);\n // required fields are missing in the metadata\n JSONObject badMetadata2 = AccountContainerTest.deepCopy(refAccountJson);\n badMetadata2.remove(ACCOUNT_ID_KEY);\n TestUtils.assertException(JSONException.class, () -> Account.Account.fromJson(badMetadata2), null);\n // unsupported account json version\n JSONObject badMetadata3 = AccountContainerTest.deepCopy(refAccountJson).put(JSON_VERSION_KEY, 2);\n TestUtils.assertException(IllegalStateException.class, () -> Account.Account.fromJson(badMetadata3), null);\n // invalid account status\n JSONObject badMetadata4 = AccountContainerTest.deepCopy(refAccountJson).put(STATUS_KEY, \"invalidAccountStatus\");\n TestUtils.assertException(IllegalArgumentException.class, () -> Account.Account.fromJson(badMetadata4), null);\n // null container metadata\n TestUtils.assertException(IllegalArgumentException.class, () -> Container.Container.fromJson(null, refAccountId), null);\n // invalid container status\n JSONObject badMetadata5 = AccountContainerTest.deepCopy(containerJsonList.get(0)).put(Container.STATUS_KEY, \"invalidContainerStatus\");\n TestUtils.assertException(IllegalArgumentException.class, () -> Container.Container.fromJson(badMetadata5, refAccountId), null);\n // required fields are missing.\n JSONObject badMetadata6 = AccountContainerTest.deepCopy(containerJsonList.get(0));\n badMetadata6.remove(CONTAINER_ID_KEY);\n TestUtils.assertException(JSONException.class, () -> Container.Container.fromJson(badMetadata6, refAccountId), null);\n // unsupported container json version\n JSONObject badMetadata7 = AccountContainerTest.deepCopy(containerJsonList.get(0)).put(Container.JSON_VERSION_KEY, ((AccountContainerTest.LATEST_CONTAINER_JSON_VERSION) + 1));\n TestUtils.assertException(IllegalStateException.class, () -> Container.Container.fromJson(badMetadata7, refAccountId), null);\n }",
"private static void verifyArgs()\r\n\t{\r\n\t\tif(goFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input GO file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(annotFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input annotation file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(goSlimFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input GOslim file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(slimAnnotFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an output file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t}",
"public static void checkType(String value) {\n if (value != null && !getValueToTypeMap().containsKey(value)) {\n throw new IllegalArgumentException(\"No matching type for \" + value);\n }\n }",
"@Test(timeout = 4000)\n public void test031() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.parseColumnTypeAndSize((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test031() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.parseColumnTypeAndSize((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"private void _badType(int type, Object value)\n {\n if (type < 0) {\n throw new IllegalStateException(String.format(\n \"Internal error: missing BeanDefinition for id %d (class %s)\",\n type, value.getClass().getName()));\n }\n throw new IllegalStateException(String.format(\n \"Unsupported type: %s (%s)\", type, value.getClass().getName()));\n }",
"@Test(timeout = 4000)\n public void test129() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.parseColumnTypeAndSize(\"(\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Illegal column type format: (\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"private void validateFields() throws InvalidConnectionDataException {\n if (driver == null) throw new InvalidConnectionDataException(\"No driver field\");\n if (address == null) throw new InvalidConnectionDataException(\"No address field\");\n if (username == null) throw new InvalidConnectionDataException(\"No username field\");\n if (password == null) throw new InvalidConnectionDataException(\"No password field\");\n }",
"private boolean validPropertyExceptions(Method paramMethod) {\n/* 492 */ Class[] arrayOfClass = paramMethod.getExceptionTypes();\n/* */ \n/* 494 */ for (byte b = 0; b < arrayOfClass.length; b++) {\n/* 495 */ Class clazz = arrayOfClass[b];\n/* */ \n/* 497 */ if (isCheckedException(clazz) && !isRemoteException(clazz)) {\n/* 498 */ return false;\n/* */ }\n/* */ } \n/* 501 */ return true;\n/* */ }",
"public abstract void validate(String value) throws DatatypeException;",
"@Test\n public void testFaultSuperTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceFaultType = new DataTypeImpl<Type>(Exception.class,\n // Exception.class);\n // List<DataType> sourceFaultTypes = new ArrayList<DataType>();\n // sourceFaultTypes.add(0, sourceFaultType);\n // Operation opSource1 = newOperationImpl(\"op1\", null, null,\n // sourceFaultTypes, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetFaultType = new\n // DataTypeImpl<Type>(TuscanyException.class, TuscanyException.class);\n // List<DataType> targetFaultTypes = new ArrayList<DataType>();\n // targetFaultTypes.add(0, targetFaultType);\n //\n // Operation opTarget = newOperationImpl(\"op1\", null, null,\n // targetFaultTypes, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public TypeCheckException(String msg) {\n super(msg);\n }",
"void checkColumnType(\n String sql,\n String expected);",
"private void checkNotUnknown() {\n if (isUnknown())\n throw new AnalysisException(\"Unexpected 'unknown' value!\");\n }",
"@Test\n public void intInvalidType() throws Exception {\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.INT, new TextNode(\"-13\"));\n assertNull(retVal);\n }",
"private void validateExceptions(Method paramMethod) throws IDLTypeException {\n/* 445 */ Class[] arrayOfClass = paramMethod.getExceptionTypes();\n/* */ \n/* 447 */ boolean bool = false;\n/* */ \n/* */ byte b;\n/* 450 */ for (b = 0; b < arrayOfClass.length; b++) {\n/* 451 */ Class clazz = arrayOfClass[b];\n/* 452 */ if (isRemoteExceptionOrSuperClass(clazz)) {\n/* 453 */ bool = true;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* 458 */ if (!bool) {\n/* 459 */ String str = \"Method '\" + paramMethod + \"' must throw at least one exception of type java.rmi.RemoteException or one of its super-classes\";\n/* */ \n/* */ \n/* 462 */ throw new IDLTypeException(str);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 469 */ for (b = 0; b < arrayOfClass.length; b++) {\n/* 470 */ Class clazz = arrayOfClass[b];\n/* */ \n/* 472 */ if (isCheckedException(clazz) && !isValue(clazz) && \n/* 473 */ !isRemoteException(clazz)) {\n/* */ \n/* 475 */ String str = \"Exception '\" + clazz + \"' on method '\" + paramMethod + \"' is not a allowed RMI/IIOP exception type\";\n/* */ \n/* 477 */ throw new IDLTypeException(str);\n/* */ } \n/* */ } \n/* */ }",
"@Test(timeout = 4000)\n public void test113() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.parseColumnTypeAndSize(\"()\");\n fail(\"Expecting exception: NumberFormatException\");\n \n } catch(NumberFormatException e) {\n //\n // For input string: \\\"\\\"\n //\n verifyException(\"java.lang.NumberFormatException\", e);\n }\n }",
"@Test\n\tpublic void testValidateInvalidWrongType() {\n\t\tRapidBean bean = createTestBean(\"Bl�mel\", \"Martin\", \"19641014\");\n\t\tPropertyCollection prop = this.createCollectionProperty(\n\t\t\t\t\"<property name=\\\"test\\\"\" + \" targettype=\\\"org.rapidbeans.test.TestBean\\\"\" + \" />\");\n\t\ttry {\n\t\t\tprop.validate(bean);\n\t\t\tAssert.fail(\"expected ValidationException\");\n\t\t} catch (ValidationException e) {\n\t\t\tAssert.assertTrue(true);\n\t\t}\n\t}",
"private void checkException(Runnable function, Class<?> expectedEx){\n try {\n function.run();\n assert false;\n }catch (Exception e){\n assert e.getClass() == expectedEx;\n }\n }",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void updateValuesSizeException() {\n\n\t\tset.updateValues(new float[] {1f, 2f});\n\t}",
"private void verifyUnchangedDerivedRelationships(String relationshipType, Object relationship, Object oldRelationship) {\n if ((oldRelationship != null && relationship == null) || (oldRelationship == null && relationship != null)) {\n error = ArtificerConflictException.derivedRelationshipCreation(relationshipType);\n }\n }",
"@Test(timeout=300000)\n public void test2() throws Throwable {\n Object[][] objectArray0 = new Object[0][6];\n ControllerLoadViewer controllerLoadViewer0 = new ControllerLoadViewer(objectArray0);\n String[][] stringArray0 = new String[2][6];\n String[] stringArray1 = new String[6];\n stringArray1[0] = \"\";\n stringArray0[0] = stringArray1;\n // Undeclared exception!\n try { \n controllerLoadViewer0.getDataTypes(stringArray0);\n fail(\"Expecting exception: NumberFormatException\");\n \n } catch(NumberFormatException e) {\n //\n // null\n //\n assertThrownBy(\"java.lang.Integer\", e);\n }\n }",
"abstract protected boolean checkType(String myType);",
"@Override\n\tpublic MyIDictionary<String, Type> typecheck(MyIDictionary<String, Type> typeEnv) throws MyException {\n\t\treturn null;\n\t}",
"private void performSanityCheckForInput(NumericChoice[] correctNumericChoices)\n throws IllegalArgumentException {\n\n if (correctNumericChoices.length != 1) {\n throw new IllegalArgumentException(\"cannot have more than 1 correct option\");\n }\n }",
"public void validate() throws org.apache.blur.thirdparty.thrift_0_9_0.TException {\n }",
"public void readFile() throws Exception, FileNotFoundException, NumberFormatException, MalformedParameterizedTypeException {\n // my user or my file might be kind of crazy! -> will check for these exceptions!\n }",
"@Test\n\tpublic void testCreateInvalidCarType() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tString _make = \"invalid_make\";\n\t\tString _model = \"invalid_model\";\n\t\tString _color = \"invalid_color\";\n\t\tint _year = -1;\n\n\t\t// ---------------------------------------------\n\t\t// Creating a invalid car.\n\t\ttry {\n\t\t\tCarType _carType = CarType.valueOf((\"unknown_type\".toUpperCase()));\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tAbstractCar _unknown = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\n\t\t\tfail(\"Successfully created an invalid car (should not work).\");\n\t\t} catch (Exception expected_) {\n\t\t}\n\t}",
"@Test\n public void floatInvalidType() throws Exception {\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.FLOAT, new TextNode(\"3.14\"));\n assertNull(retVal);\n }",
"private void validationValuesFromWeather(WeatherCalender weatherCalender, List<WeatherType> weatherTypesList) {\n\t\tLocalDate weatherDate = weatherCalender.getCalenderdate();\n\t\tString weatherTypeCd = weatherCalender.getWeather().getWeatherTypeCd();\n\t\t\n\t\tif(weatherDate.compareTo(LocalDate.now()) > 0) {\n\t\t\tthrow new LocalDateFromFutureException(weatherDate);\n\t\t}\n\t\t\n\t\tif( ! weatherTypesList.stream().anyMatch(list -> list.getWeatherTypeCd().equals(weatherTypeCd)) ) {\n\t\t\tthrow new IncorrectWeatherTypeCdException(weatherTypeCd, weatherTypesList);\n\t\t}\n\t}",
"private static void throwExceptionForRequire() {\n LOG.debug(\"Field 'require' must not be empty\");\n throw new ParametersException(\"Field 'require' must not be empty\");\n }",
"private static <T extends BaseVertex, E extends BaseEdge> void sanityCheckReferenceGraph(final BaseGraph<T,E> graph, final Haplotype refHaplotype) {\n if( graph.getReferenceSourceVertex() == null ) {\n throw new IllegalStateException(\"All reference graphs must have a reference source vertex.\");\n }\n if( graph.getReferenceSinkVertex() == null ) {\n throw new IllegalStateException(\"All reference graphs must have a reference sink vertex.\");\n }\n if( !Arrays.equals(graph.getReferenceBytes(graph.getReferenceSourceVertex(), graph.getReferenceSinkVertex(), true, true), refHaplotype.getBases()) ) {\n throw new IllegalStateException(\"Mismatch between the reference haplotype and the reference assembly graph path. for graph \" + graph +\n \" graph = \" + new String(graph.getReferenceBytes(graph.getReferenceSourceVertex(), graph.getReferenceSinkVertex(), true, true)) +\n \" haplotype = \" + new String(refHaplotype.getBases())\n );\n }\n }",
"private void validateType(Errors errors, MultiValueConstraints con, String answer) {\n validateMultiValueType(errors, con, answer);\n if (!con.getAllowOther() && !isEnumeratedValue(con, answer)) {\n rejectField(errors, \"constraints\", \"%s is not an enumerated value for this question\", answer);\n }\n }",
"private void verifyUnchangedDerivedRelationships(String relationshipType, Collection<?> relationships,\n Collection<?> oldRelationships) {\n if (relationships.size() != oldRelationships.size()) {\n error = ArtificerConflictException.derivedRelationshipCreation(relationshipType);\n }\n }",
"@Test(expected = IllegalTypeException.class)\n\tpublic void testIllegalType() throws Exception {\n\t\tnew GraphPoetFactory().parse(\"Edge=<ab,Relation,1,a,b,Yes>\");\n\t}",
"void checkType(int i, DataType.Name name) {\n DataType defined = getType(i);\n if (name != defined.getName())\n throw new InvalidTypeException(String.format(\"Column %s is of type %s\", getName(i), defined));\n }",
"@Test\n void testSemanticGrammarErrors() {\n assertThrows(IllegalArgumentException.class, () -> A_G1.withProduction(A_PROD2));\n }",
"public void testInheritance() {\n assertTrue(\"ContestEligibilityValidatorException does not subclass Exception.\",\n new ContestEligibilityValidatorException() instanceof Exception);\n }",
"@Test\n public void when_SourceHasInvalidFormat_Then_ThrowException() {\n //then\n assertThrows(IllegalArgumentException.class, () -> {\n //when\n underTest.read(\"FhFXVE,,,\");\n });\n }",
"void acceptOrThrow(T t, U u, V v) throws Throwable;",
"@Test(timeout = 4000)\n public void test114() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.parseColumnTypeAndSize(\"(, 4$, 4$, 4$, 4$, 4$, 4$, , )\");\n fail(\"Expecting exception: NumberFormatException\");\n \n } catch(NumberFormatException e) {\n //\n // For input string: \\\"\\\"\n //\n verifyException(\"java.lang.NumberFormatException\", e);\n }\n }"
] | [
"0.6869629",
"0.68195194",
"0.64038163",
"0.6396949",
"0.6367661",
"0.6261955",
"0.61294186",
"0.61042017",
"0.61027217",
"0.61004907",
"0.60842246",
"0.6065145",
"0.5966196",
"0.596067",
"0.59280705",
"0.589098",
"0.5876915",
"0.5828998",
"0.5799172",
"0.57890403",
"0.5782739",
"0.57585037",
"0.5724569",
"0.5723683",
"0.56946546",
"0.56878203",
"0.5667842",
"0.56372315",
"0.5631113",
"0.56267035",
"0.5611412",
"0.5573179",
"0.55699277",
"0.5561397",
"0.5549322",
"0.55445904",
"0.5542386",
"0.55333173",
"0.55258995",
"0.551106",
"0.5510264",
"0.5501171",
"0.54996383",
"0.54991245",
"0.5482875",
"0.5479482",
"0.5474274",
"0.5471499",
"0.54700416",
"0.545583",
"0.544419",
"0.5442908",
"0.5436082",
"0.5412739",
"0.54076904",
"0.54069835",
"0.5402509",
"0.54017955",
"0.5400802",
"0.5396501",
"0.5391933",
"0.5389673",
"0.5386769",
"0.538316",
"0.538316",
"0.5380236",
"0.53781337",
"0.5374907",
"0.53694236",
"0.5367765",
"0.53481585",
"0.53437096",
"0.5336226",
"0.5332775",
"0.53316563",
"0.5323352",
"0.53217286",
"0.53196096",
"0.53143257",
"0.5313967",
"0.5310767",
"0.53071415",
"0.5300466",
"0.52947086",
"0.5293715",
"0.5291799",
"0.52917457",
"0.5289625",
"0.52883977",
"0.52872753",
"0.52833986",
"0.5271168",
"0.5270968",
"0.5266815",
"0.52665764",
"0.5252633",
"0.5250097",
"0.52491933",
"0.5245404",
"0.5243725",
"0.52426934"
] | 0.0 | -1 |
Transform the given RootCause DO to a RootCauseDTO object. Returns an empty RootCauseDTO if the parameter is null. | RootCauseDTO toDto(RootCause rootCause) {
RootCauseDTO result = new RootCauseDTO();
result.setId(0L);
if (null != rootCause) {
result.setId(rootCause.getId());
result.setName(rootCause.getName());
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public default D toDto(E entity) {\n\t\tif (entity == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn DtoUtilService.staticDtoFromEntity(getDtoClass(), entity);\n\t\t}\n\t}",
"public GetUsuarioDTO convierteDTO(Integer id){\n Optional<Usuario> usuario = usuarioRepository.findById(id);\n return usuario.map(usuarioDTOConverter::convertToDTO).orElseThrow(()->new UsuarioNotFoundException(id));\n }",
"@Override\r\n\tpublic AbstractDto mapToDto() {\n\t\treturn null;\r\n\t}",
"private Empresa converterDtoParaEmpresa(CadastroPJDto cadastroPJDto) {\n\t\tEmpresa empresa = new Empresa();\n\t\tempresa.setCnpj(cadastroPJDto.getCnpj());\n\t\tempresa.setRazaoSocial(cadastroPJDto.getRazaoSocial());\n\n\t\treturn empresa;\n\t}",
"RunDTO toDto(Run run) {\n RunDTO result = new RunDTO();\n result.setId(0L);\n if (null != run) {\n this.fillDto(result, run);\n }\n return result;\n }",
"public Cliente fromDTO(ClienteDTO objDTO) {\t\t\r\n\t\treturn new Cliente(objDTO.getId(), objDTO.getNome(), objDTO.getEmail(), null, null);\r\n\t}",
"@Test\n public void whenMapNullUserDtoToUser_thenReturnNull() {\n\n UserDTO userDTO = null;\n User user = UserMapper.INSTANCE.dtoToEntity(userDTO);\n\n assertNull(user);\n assertNull(userDTO);\n\n }",
"D mapToDTO(E entity);",
"public AlumnoDTO fromAlumnoToAlumnoDTO(Alumno alumno) {\n\t\tAlumnoDTO dto = new AlumnoDTO();\n\t\tdto.setMensajes(alumno.getMensajes());\n\t\treturn dto;\n\t}",
"@Test\n public void whenMapNullUsertoUserDto_thenReturnNull() {\n\n User user = null;\n UserDTO userDTO = UserMapper.INSTANCE.entityToDto(user);\n\n assertNull(user);\n assertNull(userDTO);\n\n }",
"private PostDTO buildReturnDto( Post post ) {\n PostDTO postDTO = postMapper.postToPostDto( post );\n postDTO.setPostUrl( buildPostUrl( post ) );\n postDTO.getUser().setAvatarUrl( avatarService.buildAvatarUrl( post.getUser() ) );\n //if post is a child post, set the parentPostUrl\n if ( post.getParent() != null ) postDTO.setParentPostUrl( buildPostUrl( post.getParent() ));\n if ( post.getChildren() != null ) {\n for ( int i = 0; i < post.getChildren().size(); i++ ) {\n PostDTO childDTO = postDTO.getChildren().get( i );\n Post child = post.getChildren().get( i );\n childDTO.setPostUrl( buildPostUrl( post.getChildren().get( i ) ) );\n childDTO.getUser().setAvatarUrl( avatarService.buildAvatarUrl( child.getUser() ) );\n childDTO.setParentPostUrl( buildParentPostUrl( child ) );\n }\n }\n return postDTO;\n }",
"public AlumnoDTO fromAlumnoToAlumnoDTO(Alumno alumno) {\n\t\tAlumnoDTO dto = new AlumnoDTO();\n\t\tdto.setPaymentDate(alumno.getPaymentDate());\n\t\tdto.setPagos(alumno.getPagos());\n\n\t\treturn dto;\n\t}",
"public static EmployeeDTO valueOf(Employee employee){\n EmployeeDTO employeeDTO = new EmployeeDTO();\n BeanUtils.copyProperties(employee, employeeDTO);\n// employeeDto.setId( employee.getId() );\n// employeeDto.setFirstName( employee.getFirstName() );\n\n return employeeDTO;\n\n }",
"@Override\n\tpublic BaseFWDTOImpl toDTO() {\n\t\treturn null;\n\t}",
"public final EObject entryRuleDto() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleDto = null;\r\n\r\n\r\n try {\r\n // InternalNestDsl.g:305:44: (iv_ruleDto= ruleDto EOF )\r\n // InternalNestDsl.g:306:2: iv_ruleDto= ruleDto EOF\r\n {\r\n newCompositeNode(grammarAccess.getDtoRule()); \r\n pushFollow(FOLLOW_1);\r\n iv_ruleDto=ruleDto();\r\n\r\n state._fsp--;\r\n\r\n current =iv_ruleDto; \r\n match(input,EOF,FOLLOW_2); \r\n\r\n }\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 }",
"Persona PersonaDTOToPersona(PersonaDTO personaDTO);",
"public static SystemDTO entityToDTO(final System entity){\n\t\tfinal SystemDTO result = new SystemDTO();\n\t\t\n\t\tresult.setCode(entity.getCode());\n\t\tresult.setName(entity.getName());\n\t\tresult.setId(entity.getId());\n\t\t\n\t\treturn result;\n\t}",
"public TcUnidadEdoDTO() {\n }",
"@POST\r\n public DocumentoDTO crearDocumento(DocumentoDTO documento){\r\n return new DocumentoDTO(logic.crearDocumento(documento.toEntity()));\r\n }",
"private TimeEntryDto convertTimeEntryToDto(final TimeEntry timeEntry) {\n\t\tfinal TimeEntryDto timeEntryDto = new TimeEntryDto();\n\t\ttimeEntryDto.setId(Optional.of(timeEntry.getId()));\n\t\ttimeEntryDto.setDate(this.dateFormat.format(timeEntry.getDate()));\n\t\ttimeEntryDto.setType(timeEntry.getType().toString());\n\t\ttimeEntryDto.setDescription(timeEntry.getDescription());\n\t\ttimeEntryDto.setLocation(timeEntry.getLocation());\n\t\ttimeEntryDto.setEmployeeId(timeEntry.getEmployee().getId());\n\n\t\treturn timeEntryDto;\n\t}",
"private EmployeeDto toDto(Employee employee){\n\t\tEmployeeDto employeeDto = new EmployeeDto();\n\t\temployeeDto.id = employee.getId();\n\n\t\temployeeDto.name = employee.getName();\n\t\temployeeDto.email = employee.getEmail();\n\n\t\temployeeDto.jobTypeId = employee.getJobtype().getId();\n\n\t\temployeeDto.bossId = employee.getBossId();\n\n\t\temployeeDto.netPayment = employee.getNetPayment();\n\t\temployeeDto.grossPayment = employee.getGrossPayment();\n\t\temployeeDto.employerTotalCost = employee.getEmployerTotalCost();\n\t\temployeeDto.workHours = employee.getWorkHours();\n\n\t\temployeeDto.children = employee.getChildren();\n\n\t\temployeeDto.workStatus = employee.getWorkStatus().getStringValue();\n\n\t\temployeeDto.isEntrant = employee.isEntrant();\n\t\temployeeDto.isJustMarried = employee.isJustMarried();\n\t\temployeeDto.isSingleParent = employee.isSingleParent();\n\n\t\treturn employeeDto;\n\t}",
"public final UnitDTO getDTO(Player player) {\n if (player == Player.SYSTEM || this.isDetected(player)) {\n return new UnitDTO(this.getId(),\n this.details.getId(),\n this.owner.getDTO(),\n this.currentHitPoints,\n this.details.getMaxHitPoints(),\n this.currentMovementAllowance,\n this.details.getMaxMovementAllowance(),\n this.isCloaked(),\n this.getUnitType());\n }\n return null;\n }",
"public ReportDTO convertToDTO() {\n return new ReportDTO()\n .id(id)\n .email(email)\n .type(type)\n .content(content)\n .status(status)\n .reporter((reporter != null) ? reporter.convertToDTO() : null)\n .announcement(announcement.convertToDTO())\n .createdAt(createdAt);\n }",
"public static PerspectiveDTO toDTO(Perspective perspective) {\n return toDTO(perspective, false);\n }",
"public static Object convertMapEntityPathAndValueToDTO(String prefix, Map<String, Object> mapData, Class<?> dtoType) {\n if (null != mapData && null != dtoType) {\n validateThrow(dtoType, new ConfigurationInvalidException(dtoType.getName() + \": Data Transfer Object configuration is invalid\"));\n\n Object dto;\n try {\n dto = ObjectUtils.newInstance(dtoType);\n } catch (InvocationTargetException | NoSuchMethodException | InstantiationException | IllegalAccessException e) {\n throw new ConstructorInvalidException(\"Cannot found default constructor for \" + dtoType.getSimpleName(), e);\n }\n\n List<Field> fields = ObjectUtils.getFields(dtoType, true);\n for (Field field : fields) {\n try {\n Object fieldValue = convertMapEntityPathAndValueToDTO(prefix, mapData, field);\n ObjectUtils.setValueForField(dto, field.getName(), fieldValue);\n } catch (IllegalAccessException e) {\n throw new FieldInaccessibleException(\"Cannot set value for field \"\n + dto.getClass().getSimpleName() + \".\" + field.getName(), e);\n }\n }\n return dto;\n }\n return null;\n }",
"public PessoaDto toPessoaDTO(Pessoa pessoa) {\n\t\tPessoaDto pessoaDto = new PessoaDto(pessoa.getId(), pessoa.getNome(), pessoa.getEmail(),\n\t\t\t\tpessoa.getDataNascimento(), pessoa.getSituacao(), pessoa.getEnderecos(), pessoa.getPerfils());\n\t\tif (pessoa.getCaminhoImagem() != null) {\n\t\t\tString nomeImagem = getNameImage(pessoa.getCaminhoImagem());\n\t\t\tpessoaDto.setImagem(\n\t\t\t\t\tnew Imagem(nomeImagem, getTipoImage(nomeImagem), getImageBase64(pessoa.getCaminhoImagem())));\n\t\t} else\n\t\t\tpessoaDto.setImagem(new Imagem());\n\t\treturn pessoaDto;\n\n\t}",
"public Usuario fromDTO(NovoUsuarioDTO objDto){\n Usuario user = new Usuario(null, objDto.getEmail(), objDto.getNome(), passwordEncoder.encode(objDto.getSenha()));\n return user;\n }",
"public Pessoa toPessoa(PessoaDto dto) {\n\t\treturn new Pessoa(dto.getId(), dto.getNome(), dto.getEmail(), dto.getDataNascimento(), dto.getSituacao(),\n\t\t\t\tdto.getEnderecos(), dto.getPerfils());\n\n\t}",
"public GrupoUsuarioDTO() {\n }",
"public Optional<PessoaDto> encontrar(Long id) {\n\t\tOptional<Pessoa> pessoa = dao.encontrar(id);\n\t\treturn Optional.of(toPessoaDTO(pessoa.get()));\n\t}",
"PersonaDTO PersonaToPersonaDTO(Persona persona);",
"public Cause(Cause<?> parent) {\n this.parent = parent;\n this.firstCause = parent != null ? parent.firstCause : null;\n }",
"public PersonaDTO(){}",
"private CustomersDTO buildDTOToCreate(CustomersDTO customerDto) {\n if (customerDto.getBusinessMainId() < 0) {\n customerDto.setBusinessMainId(0);\n }\n if (customerDto.getBusinessSubId() < 0) {\n customerDto.setBusinessSubId(0);\n }\n if (customerDto.getEmployeeId() == null) {\n customerDto.setEmployeeId(ConstantsCustomers.LONG_VALUE_0L);\n }\n if (customerDto.getDepartmentId() == null) {\n customerDto.setDepartmentId(ConstantsCustomers.LONG_VALUE_0L);\n }\n if (customerDto.getGroupId() == null) {\n customerDto.setGroupId(ConstantsCustomers.LONG_VALUE_0L);\n }\n if (customerDto.getScenarioId() == null) {\n customerDto.setScenarioId(ConstantsCustomers.LONG_VALUE_0L);\n }\n customerDto.setCreatedUser(jwtTokenUtil.getEmployeeIdFromToken());\n customerDto.setUpdatedUser(jwtTokenUtil.getEmployeeIdFromToken());\n return customerDto;\n }",
"public static UserDTO getUserDTO(UserEntity userEntity) {\n\t\tUserDTO dto = null;\n\t\tif (userEntity != null) {\n\t\t\tdto = new UserDTO();\n\n\t\t\tdto.setUserId(userEntity.getUserId());\n\t\t\tdto.setInsertDate(userEntity.getInsertDate());\n\t\t\tdto.setUpdateDate(userEntity.getUpdateDate());\n\t\t\tdto.setName(userEntity.getUserName());\n\t\t\tdto.setEmail(userEntity.getUserEmail());\n\t\t\tdto.setPassword(userEntity.getUserPassword());\n\t\t\tdto.setIsActive(userEntity.getIsActive());\n\t\t\tdto.setLastLogin(userEntity.getLastLogin());\n\t\t}\n\t\treturn dto;\n\t}",
"public DatatypeDto instantiateDto(Datatype poso) {\n\t\tDatatypeDto dto = DatatypeDto.String;\n\t\treturn dto;\n\t}",
"public static Throwable getRootCause(Throwable ex) {\n return ExceptionUtils.getRootCause(ex);\n }",
"public static EtudiantDto toDto(Etudiant stud) {\n\t\tUserDto uDto = UserDto.toUserDto(stud.getUser());\n\t\tEtudiantDto studDto = new EtudiantDto(stud.getId(), stud.getNom(), stud.getPrenom(), stud.getEmail(), stud.getTel(), uDto);\n\t\treturn studDto;\n\t}",
"V toDto(E entity);",
"TicketDTO ticketToTicketDTO(Ticket ticket);",
"public static IncomingDeliveryDTO mapToDTO(IncomingDelivery entity) {\r\n\t\tif(entity==null)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tIncomingDeliveryDTO dto = new IncomingDeliveryDTO();\r\n\r\n\t\tdto.setIncomingDeliveryId(entity.getIncomingDeliveryId());\r\n\t\tdto.setDeliveryNr(entity.getDeliveryNr());\r\n\t\tdto.setOrganisationId(entity.getOrganisation().getOrganisationId());\r\n\t\tdto.setLastEditorId(entity.getLastEditor().getPersonId());\r\n\t\tdto.setDeliveryNr(entity.getDeliveryNr());\r\n\t\tdto.setDate(df.format(entity.getDate()));\r\n\t\tdto.setComment(entity.getComment());\r\n\t\tdto.setUpdateTimestamp(df.format(entity.getUpdateTimestamp()));\r\n\t\tdto.setBooked(entity.getBooked());\r\n\t\tdto.setBookedAll(entity.getBookedAll());\r\n\t\tdto.setArchived(entity.getArchived());\r\n\r\n\t\tSet<IncomingArticleDTO> incomingArticleDTOs = new HashSet<IncomingArticleDTO>();\r\n\t\tfor(IncomingArticle incomingArticle : entity.getIncomingArticles())\r\n\t\t{\r\n\t\t\tincomingArticleDTOs.add(IncomingArticleMapper.mapToDTO(incomingArticle));\r\n\t\t}\r\n\r\n\t\tdto.setIncomingArticleDTOs(incomingArticleDTOs);\r\n\r\n\t\treturn dto;\r\n\t}",
"StudentDTO toStudentDTO(Student student);",
"@Test\n @DisplayName(\"PersonDTOAssembler - Test create data transfer objects from Domain Object || Happy case\")\n void personDTOAssembler_CreateDTOFromDomainObjectTest() {\n String mariaEmail = \"[email protected]\";\n String mariaName = \"Maria Silva\";\n LocalDate mariaBirthDate = LocalDate.of(1973, 07, 25);\n String mariaBirthplace = \"Braga\";\n\n Email emailMaria = Email.createEmail(mariaEmail);\n Name nameMaria = Name.createName(mariaName);\n Birthdate birthateMaria = Birthdate.createBirthdate(mariaBirthDate);\n Birthplace birthplaceMaria = Birthplace.createBirthplace(mariaBirthplace);\n PersonID fatherID = null;\n PersonID motherID = null;\n\n String IS_NOT_DEFINED = \"Is Not Defined\";\n\n //PersonDTO\n String personMariaBirthdate = birthateMaria.getBirthdate().toString();\n\n //Expected\n PersonDTO personDTOExpected = new PersonDTO(mariaEmail, mariaName, personMariaBirthdate, mariaBirthplace, IS_NOT_DEFINED, IS_NOT_DEFINED);\n\n //Act\n PersonDTO personDTO = PersonDTOAssembler.createDTOFromDomainObject(emailMaria, nameMaria, birthateMaria, birthplaceMaria, fatherID, motherID);\n\n //Assert\n assertEquals(personDTOExpected, personDTO);\n }",
"public OrderDTO getOrderAsDTO(Business business, Long orderId) {\n\t\treturn transform.orderToDto( getOrder(business, orderId) );\n\t}",
"public SportDTO resolveFromObjectIdFull(String id){\n SportDTO sportDTO = null;\n try {\n SportEntity sportEntity = departmentRepository.getSportByLeagueId(id);\n sportDTO = resolverMapper.map(sportEntity, SportDTO.class);\n } catch (InvalidInputDataException e) {\n logger.error(\"Invalid ID input given: \", e);\n } catch (DataAccessException e) {\n logger.warn(\"Not data could be obtained for the given league ID \" + id, e);\n } catch (MappingException e){\n logger.fatal(\"Mapping from entity to domain failed\", e);\n }\n return sportDTO == null ? new SportDTO(): sportDTO;\n }",
"private HistoryDTO convertEntityToDTO(History history) {\n\t\tHistoryDTO historyDto = modelMapper.map(history, HistoryDTO.class);\n\t\treturn historyDto;\n\t}",
"public BlogDetailDTO (BlogEntity entity) \r\n {\r\n super(entity);\r\n if(entity.getCliente()!=null)cliente = new ClienteDTO(entity.getCliente());\r\n if(entity.getEvento()!=null)evento = new EventoDTO(entity.getEvento());\r\n \r\n }",
"public OrderDTO toDto( Order order ) {\n\t\treturn transform.orderToDto( order );\n\t}",
"public static Object convertToDataTransferObject(Object dto, String prefix, Map<String, Object> record,\n Class<?> dtoType, String[] filter) {\n if (null != record && null != dtoType) {\n if (null == dto) {\n dto = newDataTransferObjectInstance(dtoType);\n }\n List<Field> dtoFields = ObjectUtils.getFields(dtoType, true);\n for (Field dtoField : dtoFields) {\n try {\n Object value = null;\n if (hasData(record, prefix, getEntityMappingFieldPath(dtoField))) {\n value = convertToFieldOfDataTransferObject(dto, prefix, record, dtoField, filter);\n }\n ObjectUtils.setValueForField(dto, dtoField.getName(), value, true);\n } catch (IllegalAccessException e) {\n throw new FieldInaccessibleException(\"Cannot set value for field \"\n + dtoType.getSimpleName() + \".\" + dtoField.getName(), e);\n }\n }\n }\n return dto;\n }",
"public AtendimentoJuridicoDTO toDTO(AtendimentoJuridicoEntity entity){\n\t\tAtendimentoJuridicoDTO dto = new AtendimentoJuridicoDTO();\n\t\tBeanUtils.copyProperties(entity, dto); \n\t\treturn dto ;\n\t}",
"public abstract D convertToDto(T entity);",
"public static ReadingDTO mapToDTO(Reading reading) {\n if (Objects.isNull(reading)) {\n return null;\n }\n ReadingDTO dto = newReadingDTO();\n dto.setDateTime(reading.getDateTime());\n dto.setValue(reading.getValue());\n return dto;\n }",
"public static ro.teamnet.ou.domain.neo.Perspective toNeo(PerspectiveDTO perspectiveDTO) {\n if (perspectiveDTO.getOrganization() == null || perspectiveDTO.getOuTreeRoot() == null) {\n return null;\n }\n ro.teamnet.ou.domain.neo.Perspective perspective = new ro.teamnet.ou.domain.neo.Perspective();\n\n perspective.setJpaId(perspectiveDTO.getId());\n perspective.setCode(perspectiveDTO.getCode());\n perspective.setOrganization(OrganizationMapper.toNeo(perspectiveDTO.getOrganization()));\n perspective.setOrganizationalUnit(OrganizationalUnitMapper.toNeo(perspectiveDTO.getOuTreeRoot()));\n return perspective;\n }",
"public Throwable transform(Throwable throwable) {\n @SuppressWarnings(\"unchecked\")\n List<Throwable> throwableList = ExceptionUtils.getThrowableList(throwable);\n if (throwableList.size() < 1)\n return throwable;\n\n Throwable root = null;\n\n if (throwableList.size() == 1) {\n root = throwable;\n } else {\n root = ExceptionUtils.getRootCause(throwable);\n }\n\n if (root instanceof DeploymentException || root instanceof DefinitionException) {\n return root;\n }\n if (isFragmentFound(DEPLOYMENT_EXCEPTION_FRAGMENTS, root)) {\n return new DeploymentException(root);\n }\n if (isFragmentFound(DEFINITION_EXCEPTION_FRAGMENTS, root)) {\n return new DefinitionException(root);\n }\n return throwable;\n }",
"public DataTableDto convertToDto(DataTable dataTable) {\n DataTableDto dataTableDto = modelMapper.map(dataTable, DataTableDto.class);\n return dataTableDto;\n }",
"@Override\n public Optional<DuLieuBaoCaoDTO> findOne(String id) {\n log.debug(\"Request to get DuLieuBaoCao : {}\", id);\n return duLieuBaoCaoRepository.findById(id)\n .map(duLieuBaoCaoMapper::toDto);\n }",
"@Mappings({\n @Mapping(source = \"address\", target = \"addressDto\"),\n @Mapping(target = \"skills\", ignore = true)\n })\n UserDto toDTO(UserEntity userEntity);",
"public static WorkflowDTO fromGenericValue(GenericValue gv) {\n return new WorkflowDTO(\n gv.getLong(\"id\"),\n gv.getString(\"name\"),\n gv.getString(\"creator\"),\n gv.getString(\"descriptor\"),\n gv.getString(\"islocked\")\n );\n }",
"E mapToEntity(D dto);",
"public static LogEnvioCorreo toLevel0Entity(LogEnvioCorreoDTO dto, LogEnvioCorreo entidad) {\n if (null == entidad) {\n entidad = new LogEnvioCorreo();\n }\n entidad.setId(dto.getId());\n entidad.setAsuntoEmail(dto.getAsuntoEmail());\n entidad.setCuerpoEmail(dto.getCuerpoEmail());\n entidad.setAdjunto(dto.getAdjunto());\n entidad.setFechaEnvio(dto.getFechaEnvio());\n entidad.setTablaSolicitud(dto.getTablaSolicitud());\n entidad.setIdTablaSolicitud(dto.getIdTablaSolicitud());\n\n return entidad;\n }",
"public Representante toEntity(RepresentanteDTO dto) {\n return toEntity(dto, Representante.builder().build());\n }",
"@Override\r\n\tpublic TableDTO getDTO(Table entity) {\n\t\treturn null;\r\n\t}",
"public static RoomDTO mapToDTO(Room room) {\n if (Objects.isNull(room)) {\n return null;\n }\n RoomDTO roomDTO = new RoomDTO();\n\n roomDTO.setRoomId(room.getRoomId());\n roomDTO.setDescription(room.getDescription());\n roomDTO.setHouseFloor(room.getHouseFloor());\n roomDTO.setWidth(room.getDimension().getWidth());\n roomDTO.setLength(room.getDimension().getLength());\n roomDTO.setHeight(room.getDimension().getHeight());\n\n return roomDTO;\n }",
"public abstract DTO toDTO(M model);",
"public CalificacionDetailDTO(CalificacionEntity entity) {\n super(entity);\n if(entity.getHospedaje()!= null){\n this.hospedaje = new HospedajeDTO(entity.getHospedaje());\n }\n else {\n entity.setHospedaje(null);\n } \n if(entity.getEstudiante()!= null){\n this.estudiante = new EstudianteDTO(entity.getEstudiante());\n }\n else {\n entity.setEstudiante(null);\n } \n }",
"public Todo dBObject2Todo(DBObject dbObject, Todo todo) {\n\n\t\tObject title = dbObject.get(\"title\");\n\t\tif(title != null) {\n\t\t\ttodo.setTitle(title.toString());\n\t\t}\n\t\n\t\tObject body = dbObject.get(\"body\");\n\t\tif(body != null) {\n\t\t\ttodo.setBody(body.toString());\n\t\t}\n\t\n\t\tObject done = dbObject.get(\"done\");\n\t\tif(done != null) {\n\t\t\ttodo.setDone(done.toString().contains(\"true\"));\n\t\t}\n\t\tString id = dbObject.get(\"_id\").toString();\n\t\tif(id != null) {\n\t\t\ttodo.setId(id);\n\t\t}\n\t\treturn todo;\n }",
"public EventTO getEventTOById(int id) {\n\n EventTO eventTO;\n Optional<Event> optionalEvent = eventRepository.findById(id);\n if (optionalEvent.isPresent()) {\n LOGGER.info(\"Returning eventTO with id {}\", id);\n return eventTO = new EventTO(optionalEvent.get());\n }\n else {\n LOGGER.error(\"eventTO with id {} has not been found\", id);\n throw new ResourceNotFoundException(\"Event not found\");\n }\n }",
"public static DBONode translateNodeToDBONode(Node dto) {\r\n\t\tDBONode dbo = new DBONode();\r\n\t\tdbo.setName(dto.getName());\r\n\t\tdbo.setAlias(translateAlias(dto.getAlias()));\r\n\t\tdbo.setCreatedBy(dto.getCreatedByPrincipalId());\r\n\t\tdbo.setCreatedOn(dto.getCreatedOn().getTime());\r\n\t\tdbo.setCurrentRevNumber(dto.getVersionNumber());\r\n\t\tdbo.setId(translateNodeId(dto.getId()));\r\n\t\tdbo.setParentId(translateNodeId(dto.getParentId()));\r\n\t\tdbo.setType(dto.getNodeType().name());\r\n\t\tdbo.seteTag(dto.getETag());\r\n\t\treturn dbo;\r\n\t}",
"public PersonaDTO obtenerPersona(Long idPersona) throws CustomErrorException {\n\t\tPersonaDTO personaDTO = new PersonaDTO();\n\t\ttry {\n\t\t\tpersonaDTO = Converter.toDto((Persona) gPersona.getById(idPersona)); \n\t\t} catch (CustomErrorException cer) {\n\t\t\tthrow cer;\n\t\t} catch (Exception e) {\n\t\t\tthrow new CustomErrorException(CustomErrorException.ERROR_SERVICIO,this.getClass().getSimpleName(),e.getStackTrace());\n\t\t}\n\n\t\treturn personaDTO;\n\t}",
"public GrupoDTO getDto() {\n\t\treturn this.dto;\n\t}",
"public NameDTO() {\r\n this.firstName = \"\";\r\n this.lastName = \"\";\r\n }",
"public EmployeeResponse convertToDto(Employee employee) {\n return new EmployeeResponse(employee.getId(), employee.getName(), employee.getSalary().getValue());\n }",
"public DetailDTO toDTO(OrderDetailEntity orderDetailEntity) {\n\t\t\n\t\tDetailDTO detailDTO = new DetailDTO();\n\t\t\n\t\tif(orderDetailEntity.getId() != null) {\n\t\t\tdetailDTO.setId(orderDetailEntity.getId());\n\t\t}\n\t\tdetailDTO.setShoesID(orderDetailEntity.getShoesEntity().getId());\n\t\tdetailDTO.setShoesName(orderDetailEntity.getShoesName());\n\t\tdetailDTO.setPrice(orderDetailEntity.getPrice());\n\t\tdetailDTO.setQuantity(orderDetailEntity.getQuantity());\n\t\tdetailDTO.setCreatedBy(orderDetailEntity.getCreatedBy());\n\t\tdetailDTO.setCreatedDate(orderDetailEntity.getCreatedDate());\n\t\tdetailDTO.setModifiedBy(orderDetailEntity.getModifiedBy());\n\t\tdetailDTO.setModifiedDate(orderDetailEntity.getModifiedDate());\n\t\tdetailDTO.setDeleted(orderDetailEntity.getDeleted());\t\n\t\treturn detailDTO;\n\t}",
"UserDTO getOwner(String calendarId);",
"public static Phone getConvertedDTOFromDomain( Phone phoneDTO, com.mana.innovative.domain.common.Phone phoneDomain ) {\n\n if ( phoneDomain == null ) {\n String message = \"Parameter phoneDomain is required for conversion\";\n logger.error( message );\n throw new NullPointerException( message );\n }\n if ( phoneDTO == null ) {\n phoneDTO = new Phone( );\n logger.warn( \" Creating phoneDTO, received null object\" );\n }\n if ( phoneDomain.getPhoneId( ) >= ZERO ) {\n phoneDTO.setPhoneId( phoneDomain.getPhoneId( ) );\n }\n\n if ( phoneDomain.getPhoneNumber( ) != null ) {\n phoneDTO.setPhoneNumber( phoneDomain.getPhoneNumber( ) );\n }\n phoneDTO.setPhoneName( phoneDomain.getPhoneName( ) );\n phoneDTO.setPhoneModel( phoneDomain.getPhoneModel( ) );\n phoneDTO.setPhoneCarrier( phoneDomain.getPhoneCarrier( ) );\n phoneDTO.setPhoneType( phoneDomain.getPhoneType( ) );\n phoneDTO.setBoughtDate( phoneDomain.getBoughtDate( ) );\n\n\n// phone.setShopPhone();\n return phoneDTO;\n }",
"ExerciseDTO convertToExerciseDTO(Exercise exercise);",
"@Override\n public RequestReadDTO wrapDTO(Request request, Collection<DtoOption> options) throws Exception {\n RequestReadDTO dto = mapper.map(request, RequestReadDTO.class);\n\n /* Add dependency */\n /* TODO:\n if (options != null && !options.isEmpty()) {\n if (options.contains(DtoOption.FK)) {\n FkReadDTO fkDTO = fkService.getDTOById(request.getFkId());\n dto.setFk(fkDTO);\n }\n\n if (options.contains(DtoOption.FK_LIST)) {\n List<FkReadDTO> fkDTOList = fkService.getAllDTOById(request.getFkId());\n dto.setFkList(fkDTOList);\n }\n }\n */\n\n return dto;\n }",
"public TransportDTO makeDTO(ResultSet RS) {\n TransportDTO output = null;\n Connection conn = Repository.getInstance().connect();\n OrderDAO OrderDAO = new OrderDAO();\n try {\n String date = RS.getString(2);\n int weight = RS.getInt(1);\n String driverID = RS.getString(5);\n String Truckplate = RS.getString(4);\n int transportID = RS.getInt(3);\n List<OrderDTO> Orders = new ArrayList<OrderDTO>();\n boolean wasDel = RS.getString(6).equals(\"true\");\n ResultSet contractsRS = getWithInt(\"TransportsOrders\", \"TransportID\", transportID,conn);\n while (contractsRS.next()) {\n int OrderID = contractsRS.getInt(1);\n Orders.add(OrderDAO.get(OrderID));\n }\n output = new TransportDTO(date, weight, driverID, Truckplate, Orders, wasDel, transportID);\n } catch (Exception e) {\n output = null;\n }\n finally{\n Repository.getInstance().closeConnection(conn);\n }\n return output;\n }",
"public EventoDTO(EventoEntity entity) {\n if(entity != null)\n {\n this.nombreEvento = entity.getNombreEvento();\n this.tipoEvento = entity.getTipoEvento();\n this.fechaEvento = entity.getFechaEvento();\n this.ubicacionLat = entity.getUbicacionLat();\n this.ubicacionLon = entity.getUbicacionLon();\n this.privado = entity.isPrivado();\n this.capacidad = entity.getCapacidad();\n this.distanciaVivienda = entity.getDistanciaVivienda();\n this.id = entity.getId();\n }\n }",
"public static Dia toLevel0Entity(DiaDTO dto, Dia entidad) {\n if (null == entidad) {\n entidad = new Dia();\n }\n entidad.setId(dto.getId());\n entidad.setNombre(dto.getNombre());\n entidad.setSigla(dto.getSigla());\n entidad.setActivo(dto.getActivo());\n entidad.setCodigo(dto.getCodigo());\n entidad.setDescripcion(dto.getDescripcion());\n return entidad;\n }",
"public ContentTypeTO Do2To(ContentDO contentDo) throws SystemException {\r\n ContentTypeTO contentTo = new ContentTypeTO();\r\n\r\n contentTo.setHref(contentDo.getLocation());\r\n contentTo.setStorage(StorageTypeTO.valueOf(contentDo.getStorage().toString()));\r\n contentTo.setTitle(\"component content\");\r\n contentTo.setType(\"simple\");\r\n\r\n return contentTo;\r\n }",
"Ticket ticketDTOToTicket(TicketDTO ticketDTO);",
"public DTOType getDTOType() {\n return DTO_TYPE;\n }",
"private TimeEntry convertDtoToTimeEntry(final TimeEntryDto timeEntryDto, final BindingResult result)\n\t\t\tthrows ParseException {\n\t\tTimeEntry timeEntry = new TimeEntry();\n\n\t\tif (timeEntryDto.getId().isPresent()) {\n\t\t\tfinal Optional<TimeEntry> timeEntryFound = this.timeEntryService.findById(timeEntryDto.getId().get());\n\t\t\tif (timeEntryFound.isPresent()) {\n\t\t\t\ttimeEntry = timeEntryFound.get();\n\t\t\t} else {\n\t\t\t\tresult.addError(new ObjectError(\"timeEntry\", \"Time Entry not found.\"));\n\t\t\t}\n\t\t} else {\n\t\t\ttimeEntry.setEmployee(new Employee());\n\t\t\ttimeEntry.getEmployee().setId(timeEntryDto.getEmployeeId());\n\t\t}\n\n\t\ttimeEntry.setDescription(timeEntryDto.getDescription());\n\t\ttimeEntry.setLocation(timeEntryDto.getLocation());\n\t\ttimeEntry.setDate(this.dateFormat.parse(timeEntryDto.getDate()));\n\n\t\tif (EnumUtils.isValidEnum(TypeEnum.class, timeEntryDto.getType())) {\n\t\t\ttimeEntry.setType(TypeEnum.valueOf(timeEntryDto.getType()));\n\t\t} else {\n\t\t\tresult.addError(new ObjectError(\"type\", \"Invalid type.\"));\n\t\t}\n\n\t\treturn timeEntry;\n\t}",
"public ProcessDataDTO buildDto(ProcessData grpc) throws JsonParseException, JsonMappingException, IOException {\n\t\tProcessDataDTO dto = new ProcessDataDTO();\n\t\tdto.setId(\"\".equals(grpc.getId()) ? null : grpc.getId());\n\t\tdto.setDataTypeId(grpc.getDataTypeId());\n\t\tdto.setThingGroupId(grpc.getThingGroupId());\n\t\tDate createdAt = new Date(grpc.getCreatedAt().getSeconds());\n\t\tdto.setCreatedAt(createdAt);\n\t\tdto.setPayload(grpc.getPayload());\n\t\t\n\t\treturn dto;\n\t}",
"public static IssueDTO fromGenericValue(GenericValue gv) {\n return new IssueDTO(\n gv.getLong(\"id\"),\n gv.getString(\"key\"),\n gv.getLong(\"number\"),\n gv.getLong(\"project\"),\n gv.getString(\"reporter\"),\n gv.getString(\"assignee\"),\n gv.getString(\"creator\"),\n gv.getString(\"type\"),\n gv.getString(\"summary\"),\n gv.getString(\"description\"),\n gv.getString(\"environment\"),\n gv.getString(\"priority\"),\n gv.getString(\"resolution\"),\n gv.getString(\"status\"),\n gv.getTimestamp(\"created\"),\n gv.getTimestamp(\"updated\"),\n gv.getTimestamp(\"duedate\"),\n gv.getTimestamp(\"resolutiondate\"),\n gv.getLong(\"votes\"),\n gv.getLong(\"watches\"),\n gv.getLong(\"timeoriginalestimate\"),\n gv.getLong(\"timeestimate\"),\n gv.getLong(\"timespent\"),\n gv.getLong(\"workflowId\"),\n gv.getLong(\"security\"),\n gv.getLong(\"fixfor\"),\n gv.getLong(\"component\")\n );\n }",
"public CambioComplementariosDTO() { }",
"private UserDto mapFromUserToDto(User user) {\n UserDto userDto = new UserDto();\n userDto.setId(user.getId());\n userDto.setUsername(user.getUserName());\n userDto.setName(String.format(\"%s %s\", user.getFirstName(), user.getLastName()));\n userDto.setEmail(user.getEmail());\n userDto.setAvatar(user.getAvatar());\n return userDto;\n }",
"Optional<RequestOtherNiazsanjiDTO> findOne(Long id);",
"public ProductoDTO(){\r\n\t\t\r\n\t}",
"private static PlayerDto getPlayerDto(Player player) {\n return player != null ? PlayerDto.builder()._id(player.get_id()).build() : null;\n }",
"@Override\n public AlunoDTO findOne(String id) {\n log.debug(\"Request to get Aluno : {}\", id);\n Aluno aluno = alunoRepository.findOne(id);\n return alunoMapper.toDto(aluno);\n }",
"public ProdutoDTO()\n {\n super();\n }",
"@Override\n @Transactional(readOnly = true)\n public Optional<DomainValueDTO> findOne(Long id) {\n log.debug(\"Request to get DomainValue : {}\", id);\n return domainValueRepository.findById(id)\n .map(domainValueMapper::toDto);\n }",
"AccountDTO toDTO(Account account);",
"@Override\r\n\tpublic MainDTO toDTO() {\n\t\tFamiliaresDTO familiaresDTO = new FamiliaresDTO();\r\n\t\tDomicilioDTO domicilioDTO = null;\r\n\t\tfamiliaresDTO.setIdfamiliar(this.getIdFamiliar());\r\n\t\tfamiliaresDTO.setNombre(this.getNombre());\r\n\t\tfamiliaresDTO.setApellidoPaterno(this.getApellidoPaterno());\r\n\t\tfamiliaresDTO.setApellidoMaterno(this.getAppelidoMaterno());\r\n\t\tfamiliaresDTO.setDireccion(this.getDireccion());\r\n\t\tfamiliaresDTO.setIdpaciente(this.getIdpaciente());\r\n\t\tfamiliaresDTO.setDependencia(this.getDependencia());\r\n\t\tdomicilioDTO = (DomicilioDTO) this.getDomicilio().toDTO();\r\n\t\tfamiliaresDTO.setDomicilio(domicilioDTO);\r\n\t\treturn familiaresDTO;\r\n\t}",
"public ABEDto getABEDto(Object object){\n\t\t\n\t\t\t\n\t\tif(object instanceof com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.hotel.v1.Hotel)\n\t\t{\n\n\t\t\tcom.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.hotel.v1.Hotel hotelBo = (com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.hotel.v1.Hotel)object;\n\t\t\tHotel hotelDto = this.getHotel(hotelBo);\n\t\t\tif(hotelDto!=null)\n\t\t\t{\n\t\t\t\tABEDto abeDto = (ABEDto) hotelDto;\n\t\t\t\treturn abeDto;\n\t\t\t}\n\t\t}\n\t\tif(object instanceof com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.service.v1.Service)\n\t\t{\n\t\tcom.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.service.v1.Service serviceBo = (com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.service.v1.Service)object;\n\t\tService serviceDto = this.getService(serviceBo);\n\t\tif(serviceDto!=null)\n\t\t{\n\t\t\tABEDto abeDto = (ABEDto)serviceDto;\n\t\t\treturn abeDto;\n\t\t}\n\t\t}\n\t\tif(object instanceof com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.insurance.v1.Insurance)\n\t\t{\n\t\t\tcom.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.insurance.v1.Insurance insuranceBO = (com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.insurance.v1.Insurance)object;\n\t\t\tInsurance insuranceDto =this.getInsurance(insuranceBO);\n\t\t\tif(insuranceBO!=null)\n\t\t\t{\n\t\t\t\tABEDto abeDto = (ABEDto)insuranceDto;\n\t\t\t\treturn abeDto;\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static ContractorDetailsDto getContractorDetailsDto() {\n\t\treturn new ContractorDetailsDto();\n\t}",
"public CoordinadorDTO(CoordinadorEntity coordinadorEntity) {\n this.id_coodinador = coordinadorEntity.getId_coordinador();\n this.nombres = coordinadorEntity.getNombres();\n this.apellidos = coordinadorEntity.getApellidos();\n this.genero = coordinadorEntity.getGenero();\n this.email = coordinadorEntity.getEmail();\n this.tipo_documento_id = coordinadorEntity.getTipoDocumento();\n this.nro_documento = coordinadorEntity.getNro_documento();\n }",
"public abstract T convertToEntity(D dto);"
] | [
"0.53701824",
"0.5150884",
"0.5108952",
"0.50803375",
"0.5066643",
"0.5041025",
"0.5006501",
"0.49875838",
"0.4982052",
"0.49792477",
"0.4975754",
"0.49627435",
"0.49375337",
"0.48848608",
"0.48689234",
"0.48491517",
"0.4824864",
"0.4814007",
"0.48013562",
"0.47930974",
"0.4743447",
"0.47071365",
"0.47064745",
"0.46936202",
"0.46912658",
"0.46767703",
"0.46754017",
"0.46688282",
"0.46632546",
"0.4656282",
"0.4653555",
"0.46353114",
"0.46234798",
"0.46059963",
"0.4591881",
"0.45763543",
"0.4573207",
"0.45509413",
"0.45478424",
"0.45475763",
"0.45449334",
"0.45387626",
"0.4532308",
"0.4531573",
"0.45159867",
"0.44923973",
"0.4490191",
"0.44875878",
"0.44830072",
"0.44775692",
"0.44523412",
"0.444012",
"0.4424843",
"0.44155398",
"0.44130558",
"0.44109237",
"0.44065866",
"0.44062948",
"0.4404292",
"0.44029412",
"0.44013372",
"0.44008368",
"0.4398951",
"0.43913755",
"0.43888915",
"0.43868876",
"0.4386765",
"0.43848333",
"0.4375614",
"0.43728316",
"0.43593496",
"0.43318614",
"0.43270656",
"0.4327064",
"0.4326494",
"0.43189213",
"0.4317023",
"0.43123585",
"0.43109834",
"0.4310683",
"0.43100974",
"0.43010938",
"0.42929414",
"0.42913312",
"0.4278725",
"0.42765933",
"0.42756623",
"0.4274999",
"0.42721623",
"0.42625788",
"0.4262504",
"0.4261749",
"0.42602915",
"0.4254788",
"0.42493254",
"0.4249141",
"0.42486805",
"0.42371747",
"0.42368168",
"0.4235637"
] | 0.7489483 | 0 |
This method was generated by MyBatis Generator. This method corresponds to the database table t_sys_user | int deleteByPrimaryKey(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Override\n public void intsertUser(SysUser user) {\n System.out.println(\"user插入到mysql数据库中(oracle数据库):\"+user);\n }",
"public interface sysUserService {\n @DataSource(\"master\")\n sysUser selectByid(String id);\n PageInfo selectUserList(String username, String name, String status, String org_id,\n String is_admin, String orderFiled, String orderSort, int pageindex, int pagenum);\n int addUser(sysUser sysuser);\n int modifyUser(sysUser sysuser);\n int deleteUser(String id);\n int changeUserStatus(String id,String status);\n}",
"List<SysUser> selectAll();",
"SysUser selectByPrimaryKey(Long userId);",
"public List<Systemuser> getUserList() throws Exception {\n\r\n List<Systemuser> userRoleList = new ArrayList<Systemuser>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Systemuser u order by Upper(u.username) asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"SysRoleUser selectByPrimaryKey(Long id);",
"public String getJdbcUser()\n {\n return getStringValue(DataSourceDobj.FLD_JDBC_USER);\n }",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"public List getSysUserTypes(SysUserType sysUserType);",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}",
"@Override\n public java.lang.String getUserUuid()\n throws com.liferay.portal.kernel.exception.SystemException {\n return _usersCatastropheOrgs.getUserUuid();\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getDatabaseUser();",
"@Override\n\tpublic List<SysUser> getAll() throws Exception {\n\t\treturn null;\n\t}",
"public SystemUser findByUserName(String userName);",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}",
"public void setJdbcUser(String val)\n {\n setValue(DataSourceDobj.FLD_JDBC_USER, val);\n }",
"public interface SysUserService extends Service<SysUser> {\n void sysUserAdd(SysUser sysUser,String userId) throws Exception;\n void sysUserUpdate(SysUser sysUser,String userId);\n String checkSysUsername(String sysUsername);\n\n /**\n * 通过 username 查询 a_sys_user 表中是否含有 username , 若无对应的 username ,则给出相应的提示。 2018/05/19 11:07 rk\n * @param username\n * @return\n */\n String checkUsername(String username);\n\n /**\n * 实现登录功能\n * @param username\n * @param password\n * @return\n */\n SysUser sysUserLogin(String username, String password);\n\n /**\n * 根据username查询role_id 在a_user_role表中查询\n * @param username\n * @return\n */\n // String queryRoleId(String username);\n List<String> queryRoleId(String username);\n\n /**\n * 通过 username 删除用户数据\n * @param username\n */\n void deleteUserByUsername(String username);\n\n /**\n * 模糊匹配,查询 a_sys_user \n * @param username\n * @param name\n * @param user_type\n * @param org_code\n * @param is_ok\n * @return\n */\n List<SysUser> selectByFiveParameter(String username, String name, String user_type, String org_code, String is_ok);\n\n}",
"@Override\n\tpublic User viewUser(String nm) {\n\t\treturn userdao.viewUser(nm);\n\t}",
"public ResultSet Retuser() throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from login where usertype='user'\");\r\n\treturn rs;\r\n\t\r\n}",
"@Override\n\tpublic IUser creatUser() {\n\t\treturn new SqlServerUser();\n\t}",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"SystemRoleUserMapperMo selectByPrimaryKey(Integer id);",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"public UsuarioTable getUsuarioLogueado() {\n String usuario = FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();\n return getUsuarioFacade().obtenerIDPorNombre(usuario);\n }",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"public SysUserType getSysUserType(final Long id);",
"@PermitAll\n @Override\n public User getCurrentUser() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntity(User.class, params);\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\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 list;\n\t\t\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"@Override\r\n public User getUser() throws RemoteException, SQLException {\r\n return user;\r\n }",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"@Override\n\tpublic List<User> getUserList(String userType) {\n\t\tStringBuilder sb = new StringBuilder(\n\t\t\t\t\"SELECT e.`FAILED_ATTEMPTS`, e.`EXPIRES_ON`, e.`LAST_LOGIN_DATE`, e.`NAME`, e.`USERNAME`, e.`ACTIVE`, e.`OUTSIDE_ACCESS`, e.USER_ID, er.ROLE_ID, r.ROLE_NAME FROM user e LEFT JOIN user_role er ON e.USER_ID=er.USER_ID LEFT JOIN role r ON er.ROLE_ID=r.ROLE_ID WHERE 1 \");\n\t\tMap<String, Object> params = new HashMap<>();\n\t\tif (userType.equals(\"1\")) { // only active users\n\t\t\tsb.append(\" AND e.`ACTIVE`\");\n\t\t} else if (userType.equals(\"-1\")) { // only deactive users\n\t\t\tsb.append(\" AND e.`ACTIVE`=false\");\n\t\t}\n\n\t\treturn this.namedParameterJdbcTemplate.query(sb.toString(), params, new UserRowMapper());\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"public List<TbccUser> getSysAdmin() {\n\t\treturn userdao.getSysAdmin();\n\t}",
"@Override\n\tpublic List<SimpleUser> getAllSimpleUser() {\n\t\treturn dao.getAllSimpleUser();\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"public Long saveSysUserType(SysUserType sysUserType);",
"public interface SysUserService {\n\n /**\n * 新增用户\n * @param SysUser\n * @return\n */\n SysUser addSysUser(SysUser SysUser);\n\n /**\n * 根据用户名查询用户\n * @param username\n * @return\n */\n SysUser findUserByUserName(String username);\n\n /**\n * 根据用户姓名查询用户\n * @param name\n * @return\n */\n SysUser findUserByName(String name);\n\n /**\n * 根据id获取用户\n * @param userId\n * @return\n */\n SysUser findUserByUserId(Integer userId);\n\n /**\n * 根据id删除用户\n * @param userId\n */\n void delete(Integer userId);\n\n /**\n * 分页查询用户\n * @param userName 用户名\n * @param page\n * @param rows\n * @return\n */\n List<SysUser> getUsers(String userName, Integer page, Integer rows);\n\n /**\n * 根据用户名查询数量\n * @param userName\n * @return\n */\n Integer getUsersCount(String userName);\n\n /**\n * 根据用户id查询用户\n * @param userId\n * @return\n */\n SysUser getUserById(Integer userId);\n\n /**\n * 更新用户信息\n * @param user\n */\n void update(SysUser user);\n\n /**\n * 修改登录密码\n * @param userId\n * @param newPassword\n */\n void modifyPassword(int userId, String newPassword);\n\n /**\n * 根据用户id获取用户密码\n * @param userId\n * @return\n */\n String getPassword(int userId);\n}",
"@Override\r\n\tpublic Integer registerUser(User user) throws SQLException, ClassNotFoundException, IOException \r\n\t{\r\n\t\t//Declare all variables\r\n\t\t//Create Connection, PreparedStatement, and ResultSet Objects and\r\n\t\t//initialize to null. Create an OracleConnection Object with Java default Constructor.\r\n\t\tConnection conn = null;\t\t\t\r\n\t\tPreparedStatement stmt = null;\t\r\n\t\tResultSet rs = null;\t\t\t\r\n\t\tOracleConnection orcl= new OracleConnection();\t\r\n\t\t\r\n\t\t// Assign query statement (SQL) to String variable\r\n\t\tString insertString = \"insert into users (user_name, password, admin_role) values (?,?,?)\";\r\n\t\t\r\n\t\t//Assign column id value to String array for auto generated keys\r\n\t\tString[] COL = {\"user_id\"};\r\n\t\tint ID = -1;\r\n\t \r\n\t\t//Assign value to Connection Object using getConnection\r\n\t\t//method from OracleConnection Class.\r\n\t conn = orcl.getConnection(); \r\n\t\tSystem.out.println(\"DATABASE CONNECTION ESTABLISHED\");\r\n\t \r\n\t try\r\n\t\t{\r\n\t \t//Initialize Statement Object with passing of query and column id \r\n\t \t//Initialize Statement Object with column index and value to be inserted into the column\r\n\t stmt = conn.prepareStatement(insertString, COL);\r\n\t \r\n\t stmt.setString(1, user.getUserName());\r\n\t stmt.setString(2, user.getPassword());\r\n\t stmt.setString(3, user.getAdminRole());\r\n\t \r\n\t //Execute query\r\n\t stmt.executeUpdate();\r\n\t \r\n\t //Assign returned values to ResultSet Object.\r\n\t rs = stmt.getGeneratedKeys();\r\n\t if(rs != null && rs.next()) \r\n\t {\r\n\t ID = rs.getInt(1);\r\n\t user.setUserId(ID);\r\n\t System.out.println(\"The user has been registered as USER ID#: \"+ID);\r\n\t }\r\n\t }\r\n\t catch (SQLException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t//Close all database access Objects\r\n\t\t\tif (rs != null) \r\n\t\t\t{\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\tif (stmt != null) \r\n\t\t\t{\r\n\t\t\t\tstmt.close();\r\n\t\t\t}\r\n\t\t\tif (conn != null) \r\n\t\t\t{\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n\t\treturn ID;\r\n\t}",
"@Component\npublic interface SysUserRoleMapper extends Mapper<SysUserRole> {\n @Select(\"select r.* from sys_role r, sys_user u, sys_user_role u_r where r.id = u_r.ROLE_ID and u_r.USER_ID = u.ID and u_r.IS_DELETE = 0 and u.ID = #{userId}\")\n List<SysRole> findSysRolesByUserId(String userId);\n\n @Select(\"select ROLE_ID from sys_user_role where IS_DELETE=0 and user_id=#{userID}\")\n List<String> findRolesByUserId(String userId);\n\n @Select(\"select r.`NAME` from sys_role r, sys_user u, sys_user_role u_r WHERE u.ID = u_r.USER_ID AND r.ID = u_r.ROLE_ID AND u_r.IS_DELETE=0 AND u.LOGIN_NAME = #{username}\")\n List<String> getSysRolesByUsername(String username);\n\n @Delete(\"update sys_user_role set IS_DELETE=1 where user_id=#{userId}\")\n void deleteByUserId(String userId);\n}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"@Override\n public String getTypeForDisplay() {\n return \"User\";\n }",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}",
"public ResultSet Appuser(Long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from customer where user_id=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"public ResultSet SelectUser(long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select l.loginid,l.username,l.password,c.firstname,c.lastname,c.city,c.e_mail,c.phno,c.dob,c.doReg,c.pincode,c.address,cd.pancard_no,cd.bank_name,cd.branch_name,cd.bank_acc_no,cd.demat_acc_no from login l,customer c,customer_details cd\" +\r\n\t\t\t\"where l.loginid=c.loginid and c.user_id=cd.user_id and l.loginid=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"@Update({\n \"update tb_user\",\n \"set password = #{password,jdbcType=VARCHAR}\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int updateByPrimaryKey(User record);",
"public static void createMysqlUser(Eleve e) {\n Session session = HibernateUtils.getSessionFactory().openSession();\r\n String SQLRequest = \"CREATE USER '\" + e.getAbreviation() + \"'@'%' IDENTIFIED BY '\" + e.getPwd() + \"'; \";\r\n System.out.println(SQLRequest);\r\n session.beginTransaction();\r\n session.createSQLQuery(SQLRequest).executeUpdate();\r\n session.getTransaction().commit();\r\n session.close();\r\n\r\n }",
"public List<User> displayUsers() {\n\t\t\r\n\t\ttry {\r\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from com.niit.model.User\").list();\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getSystemUser()\n\t{\n\t\treturn \"postgres\";\n\t}",
"protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}",
"@Override\n\tpublic List<SysUser> getAllByPage(PageBean<SysUser> pageBean) throws Exception {\n\t\treturn null;\n\t}",
"@Insert({\n \"insert into tb_user (username, password)\",\n \"values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR})\"\n })\n int insert(User record);",
"@Override\r\n\tpublic User queryUserByUsername(String userName,String psswd) {\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"userService\");\r\n\t\t\r\n\t\treturn userMapper.selectUserByUserName(userName,psswd);\r\n\t}",
"public int addUser(HttpServletRequest request) {\n\t\tHashMap<String, Object> parameters = buildUserInsertCondition(request);\n\n\t\tSimpleJdbcInsert insert = new SimpleJdbcInsert(jt).withTableName(\"sys_user\").usingGeneratedKeyColumns(\"userId\");\n\n\t\tNumber id = insert.executeAndReturnKey(parameters);\n\n\t\tint pk = id.intValue();\n\n\t\treturn pk;\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"@Override\n\tpublic void GetServerUser() {\n\n\t}",
"@Override\r\n public UserModel queryUserModel(String userName) {\n System.out.println(\"query sys user build user model.\");\r\n return new UserModel(\"111\", \"sys\", \"123456\");\r\n }",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"public List<User> user_list() throws HibernateException \r\n\t{ \r\n\t\tList <User> Lista_usuarios = null; \r\n\t \r\n\t try \r\n\t { \r\n\t iniciaOperacion(); //IMPORTANTE la query: se pide la clase realmnete Cliente! no la tabla que se ha creado\r\n\t Lista_usuarios= sesion.createQuery(\"FROM User\").list(); //creamos consulta de la tabla clientes (en plural)!\r\n\t }finally \r\n\t { \r\n\t sesion.close(); \r\n\t } \r\n\t return Lista_usuarios; \r\n\t}",
"@Override\n\tpublic List<KeyValuePair> getUserNameList(boolean active) {\n\t\tif (active) { // only active cabs\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user WHERE user.ACTIVE ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t} else {\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t}\n\t}",
"@Override\n\tpublic SysUser getById(SysUser b) throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"List<User> getAll() throws SQLException;",
"@Update({\n \"update user_t\",\n \"set user_name = #{userName,jdbcType=VARCHAR},\",\n \"password = #{password,jdbcType=VARCHAR},\",\n \"age = #{age,jdbcType=INTEGER},\",\n \"ver = #{ver,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(User record);",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Trans(Long userid) throws Exception{\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name,cd.DEMAT_ACC_NO from customer c,CUSTOMER_DETAILS cd,login l where l.login_id=c.login_id and c.user_id=cd.user_id and l.login_id=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"Assist_table selectByPrimaryKey(Integer user);"
] | [
"0.6774368",
"0.6546757",
"0.6232606",
"0.6198149",
"0.6080078",
"0.6032495",
"0.6009085",
"0.6007126",
"0.6003564",
"0.59547377",
"0.59334403",
"0.5869383",
"0.586615",
"0.5846932",
"0.58029634",
"0.5796425",
"0.5786658",
"0.5772355",
"0.5770656",
"0.57704866",
"0.57587886",
"0.57412523",
"0.57294273",
"0.57260966",
"0.5723733",
"0.5713734",
"0.5704656",
"0.57014495",
"0.56940216",
"0.5680011",
"0.567695",
"0.56701463",
"0.56669253",
"0.56545895",
"0.5651114",
"0.56481594",
"0.56380683",
"0.5635796",
"0.56326336",
"0.5632137",
"0.56178015",
"0.56080323",
"0.5605957",
"0.5602399",
"0.5601927",
"0.5586325",
"0.5585328",
"0.55750555",
"0.55691665",
"0.5554917",
"0.55504185",
"0.5539173",
"0.55205107",
"0.5514391",
"0.5502798",
"0.5497261",
"0.5489051",
"0.5479486",
"0.54556143",
"0.54534835",
"0.54513806",
"0.5448546",
"0.5447766",
"0.54443175",
"0.54368913",
"0.54358196",
"0.54338306",
"0.5427804",
"0.54258364",
"0.54156053",
"0.5414516",
"0.5409143",
"0.54041684",
"0.54031366",
"0.53977966",
"0.53906184",
"0.539019",
"0.5388856",
"0.5383959",
"0.53824687",
"0.53780377",
"0.5377415",
"0.53701264",
"0.53692573",
"0.5364413",
"0.5364142",
"0.536212",
"0.5360647",
"0.53576076",
"0.53468394",
"0.53459394",
"0.53349805",
"0.53341633",
"0.533088",
"0.5321293",
"0.5319919",
"0.5316052",
"0.5308836",
"0.53054523",
"0.5299423",
"0.52958274"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table t_sys_user | int insert(DrpCommissionRule record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Override\n public void intsertUser(SysUser user) {\n System.out.println(\"user插入到mysql数据库中(oracle数据库):\"+user);\n }",
"public interface sysUserService {\n @DataSource(\"master\")\n sysUser selectByid(String id);\n PageInfo selectUserList(String username, String name, String status, String org_id,\n String is_admin, String orderFiled, String orderSort, int pageindex, int pagenum);\n int addUser(sysUser sysuser);\n int modifyUser(sysUser sysuser);\n int deleteUser(String id);\n int changeUserStatus(String id,String status);\n}",
"List<SysUser> selectAll();",
"SysUser selectByPrimaryKey(Long userId);",
"public List<Systemuser> getUserList() throws Exception {\n\r\n List<Systemuser> userRoleList = new ArrayList<Systemuser>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Systemuser u order by Upper(u.username) asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"SysRoleUser selectByPrimaryKey(Long id);",
"public String getJdbcUser()\n {\n return getStringValue(DataSourceDobj.FLD_JDBC_USER);\n }",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"public List getSysUserTypes(SysUserType sysUserType);",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}",
"@Override\n public java.lang.String getUserUuid()\n throws com.liferay.portal.kernel.exception.SystemException {\n return _usersCatastropheOrgs.getUserUuid();\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getDatabaseUser();",
"@Override\n\tpublic List<SysUser> getAll() throws Exception {\n\t\treturn null;\n\t}",
"public SystemUser findByUserName(String userName);",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}",
"public void setJdbcUser(String val)\n {\n setValue(DataSourceDobj.FLD_JDBC_USER, val);\n }",
"public interface SysUserService extends Service<SysUser> {\n void sysUserAdd(SysUser sysUser,String userId) throws Exception;\n void sysUserUpdate(SysUser sysUser,String userId);\n String checkSysUsername(String sysUsername);\n\n /**\n * 通过 username 查询 a_sys_user 表中是否含有 username , 若无对应的 username ,则给出相应的提示。 2018/05/19 11:07 rk\n * @param username\n * @return\n */\n String checkUsername(String username);\n\n /**\n * 实现登录功能\n * @param username\n * @param password\n * @return\n */\n SysUser sysUserLogin(String username, String password);\n\n /**\n * 根据username查询role_id 在a_user_role表中查询\n * @param username\n * @return\n */\n // String queryRoleId(String username);\n List<String> queryRoleId(String username);\n\n /**\n * 通过 username 删除用户数据\n * @param username\n */\n void deleteUserByUsername(String username);\n\n /**\n * 模糊匹配,查询 a_sys_user \n * @param username\n * @param name\n * @param user_type\n * @param org_code\n * @param is_ok\n * @return\n */\n List<SysUser> selectByFiveParameter(String username, String name, String user_type, String org_code, String is_ok);\n\n}",
"@Override\n\tpublic User viewUser(String nm) {\n\t\treturn userdao.viewUser(nm);\n\t}",
"public ResultSet Retuser() throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from login where usertype='user'\");\r\n\treturn rs;\r\n\t\r\n}",
"@Override\n\tpublic IUser creatUser() {\n\t\treturn new SqlServerUser();\n\t}",
"SystemRoleUserMapperMo selectByPrimaryKey(Integer id);",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"public UsuarioTable getUsuarioLogueado() {\n String usuario = FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();\n return getUsuarioFacade().obtenerIDPorNombre(usuario);\n }",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"public SysUserType getSysUserType(final Long id);",
"@PermitAll\n @Override\n public User getCurrentUser() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntity(User.class, params);\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\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 list;\n\t\t\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"@Override\r\n public User getUser() throws RemoteException, SQLException {\r\n return user;\r\n }",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"@Override\n\tpublic List<User> getUserList(String userType) {\n\t\tStringBuilder sb = new StringBuilder(\n\t\t\t\t\"SELECT e.`FAILED_ATTEMPTS`, e.`EXPIRES_ON`, e.`LAST_LOGIN_DATE`, e.`NAME`, e.`USERNAME`, e.`ACTIVE`, e.`OUTSIDE_ACCESS`, e.USER_ID, er.ROLE_ID, r.ROLE_NAME FROM user e LEFT JOIN user_role er ON e.USER_ID=er.USER_ID LEFT JOIN role r ON er.ROLE_ID=r.ROLE_ID WHERE 1 \");\n\t\tMap<String, Object> params = new HashMap<>();\n\t\tif (userType.equals(\"1\")) { // only active users\n\t\t\tsb.append(\" AND e.`ACTIVE`\");\n\t\t} else if (userType.equals(\"-1\")) { // only deactive users\n\t\t\tsb.append(\" AND e.`ACTIVE`=false\");\n\t\t}\n\n\t\treturn this.namedParameterJdbcTemplate.query(sb.toString(), params, new UserRowMapper());\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"public List<TbccUser> getSysAdmin() {\n\t\treturn userdao.getSysAdmin();\n\t}",
"@Override\n\tpublic List<SimpleUser> getAllSimpleUser() {\n\t\treturn dao.getAllSimpleUser();\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"public Long saveSysUserType(SysUserType sysUserType);",
"public interface SysUserService {\n\n /**\n * 新增用户\n * @param SysUser\n * @return\n */\n SysUser addSysUser(SysUser SysUser);\n\n /**\n * 根据用户名查询用户\n * @param username\n * @return\n */\n SysUser findUserByUserName(String username);\n\n /**\n * 根据用户姓名查询用户\n * @param name\n * @return\n */\n SysUser findUserByName(String name);\n\n /**\n * 根据id获取用户\n * @param userId\n * @return\n */\n SysUser findUserByUserId(Integer userId);\n\n /**\n * 根据id删除用户\n * @param userId\n */\n void delete(Integer userId);\n\n /**\n * 分页查询用户\n * @param userName 用户名\n * @param page\n * @param rows\n * @return\n */\n List<SysUser> getUsers(String userName, Integer page, Integer rows);\n\n /**\n * 根据用户名查询数量\n * @param userName\n * @return\n */\n Integer getUsersCount(String userName);\n\n /**\n * 根据用户id查询用户\n * @param userId\n * @return\n */\n SysUser getUserById(Integer userId);\n\n /**\n * 更新用户信息\n * @param user\n */\n void update(SysUser user);\n\n /**\n * 修改登录密码\n * @param userId\n * @param newPassword\n */\n void modifyPassword(int userId, String newPassword);\n\n /**\n * 根据用户id获取用户密码\n * @param userId\n * @return\n */\n String getPassword(int userId);\n}",
"@Override\r\n\tpublic Integer registerUser(User user) throws SQLException, ClassNotFoundException, IOException \r\n\t{\r\n\t\t//Declare all variables\r\n\t\t//Create Connection, PreparedStatement, and ResultSet Objects and\r\n\t\t//initialize to null. Create an OracleConnection Object with Java default Constructor.\r\n\t\tConnection conn = null;\t\t\t\r\n\t\tPreparedStatement stmt = null;\t\r\n\t\tResultSet rs = null;\t\t\t\r\n\t\tOracleConnection orcl= new OracleConnection();\t\r\n\t\t\r\n\t\t// Assign query statement (SQL) to String variable\r\n\t\tString insertString = \"insert into users (user_name, password, admin_role) values (?,?,?)\";\r\n\t\t\r\n\t\t//Assign column id value to String array for auto generated keys\r\n\t\tString[] COL = {\"user_id\"};\r\n\t\tint ID = -1;\r\n\t \r\n\t\t//Assign value to Connection Object using getConnection\r\n\t\t//method from OracleConnection Class.\r\n\t conn = orcl.getConnection(); \r\n\t\tSystem.out.println(\"DATABASE CONNECTION ESTABLISHED\");\r\n\t \r\n\t try\r\n\t\t{\r\n\t \t//Initialize Statement Object with passing of query and column id \r\n\t \t//Initialize Statement Object with column index and value to be inserted into the column\r\n\t stmt = conn.prepareStatement(insertString, COL);\r\n\t \r\n\t stmt.setString(1, user.getUserName());\r\n\t stmt.setString(2, user.getPassword());\r\n\t stmt.setString(3, user.getAdminRole());\r\n\t \r\n\t //Execute query\r\n\t stmt.executeUpdate();\r\n\t \r\n\t //Assign returned values to ResultSet Object.\r\n\t rs = stmt.getGeneratedKeys();\r\n\t if(rs != null && rs.next()) \r\n\t {\r\n\t ID = rs.getInt(1);\r\n\t user.setUserId(ID);\r\n\t System.out.println(\"The user has been registered as USER ID#: \"+ID);\r\n\t }\r\n\t }\r\n\t catch (SQLException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t//Close all database access Objects\r\n\t\t\tif (rs != null) \r\n\t\t\t{\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\tif (stmt != null) \r\n\t\t\t{\r\n\t\t\t\tstmt.close();\r\n\t\t\t}\r\n\t\t\tif (conn != null) \r\n\t\t\t{\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n\t\treturn ID;\r\n\t}",
"@Component\npublic interface SysUserRoleMapper extends Mapper<SysUserRole> {\n @Select(\"select r.* from sys_role r, sys_user u, sys_user_role u_r where r.id = u_r.ROLE_ID and u_r.USER_ID = u.ID and u_r.IS_DELETE = 0 and u.ID = #{userId}\")\n List<SysRole> findSysRolesByUserId(String userId);\n\n @Select(\"select ROLE_ID from sys_user_role where IS_DELETE=0 and user_id=#{userID}\")\n List<String> findRolesByUserId(String userId);\n\n @Select(\"select r.`NAME` from sys_role r, sys_user u, sys_user_role u_r WHERE u.ID = u_r.USER_ID AND r.ID = u_r.ROLE_ID AND u_r.IS_DELETE=0 AND u.LOGIN_NAME = #{username}\")\n List<String> getSysRolesByUsername(String username);\n\n @Delete(\"update sys_user_role set IS_DELETE=1 where user_id=#{userId}\")\n void deleteByUserId(String userId);\n}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"@Override\n public String getTypeForDisplay() {\n return \"User\";\n }",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}",
"public ResultSet Appuser(Long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from customer where user_id=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"public ResultSet SelectUser(long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select l.loginid,l.username,l.password,c.firstname,c.lastname,c.city,c.e_mail,c.phno,c.dob,c.doReg,c.pincode,c.address,cd.pancard_no,cd.bank_name,cd.branch_name,cd.bank_acc_no,cd.demat_acc_no from login l,customer c,customer_details cd\" +\r\n\t\t\t\"where l.loginid=c.loginid and c.user_id=cd.user_id and l.loginid=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"@Update({\n \"update tb_user\",\n \"set password = #{password,jdbcType=VARCHAR}\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int updateByPrimaryKey(User record);",
"public static void createMysqlUser(Eleve e) {\n Session session = HibernateUtils.getSessionFactory().openSession();\r\n String SQLRequest = \"CREATE USER '\" + e.getAbreviation() + \"'@'%' IDENTIFIED BY '\" + e.getPwd() + \"'; \";\r\n System.out.println(SQLRequest);\r\n session.beginTransaction();\r\n session.createSQLQuery(SQLRequest).executeUpdate();\r\n session.getTransaction().commit();\r\n session.close();\r\n\r\n }",
"public List<User> displayUsers() {\n\t\t\r\n\t\ttry {\r\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from com.niit.model.User\").list();\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getSystemUser()\n\t{\n\t\treturn \"postgres\";\n\t}",
"protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}",
"@Insert({\n \"insert into tb_user (username, password)\",\n \"values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR})\"\n })\n int insert(User record);",
"@Override\n\tpublic List<SysUser> getAllByPage(PageBean<SysUser> pageBean) throws Exception {\n\t\treturn null;\n\t}",
"public int addUser(HttpServletRequest request) {\n\t\tHashMap<String, Object> parameters = buildUserInsertCondition(request);\n\n\t\tSimpleJdbcInsert insert = new SimpleJdbcInsert(jt).withTableName(\"sys_user\").usingGeneratedKeyColumns(\"userId\");\n\n\t\tNumber id = insert.executeAndReturnKey(parameters);\n\n\t\tint pk = id.intValue();\n\n\t\treturn pk;\n\t}",
"@Override\r\n\tpublic User queryUserByUsername(String userName,String psswd) {\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"userService\");\r\n\t\t\r\n\t\treturn userMapper.selectUserByUserName(userName,psswd);\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\n\tpublic void GetServerUser() {\n\n\t}",
"@Override\r\n public UserModel queryUserModel(String userName) {\n System.out.println(\"query sys user build user model.\");\r\n return new UserModel(\"111\", \"sys\", \"123456\");\r\n }",
"public List<User> user_list() throws HibernateException \r\n\t{ \r\n\t\tList <User> Lista_usuarios = null; \r\n\t \r\n\t try \r\n\t { \r\n\t iniciaOperacion(); //IMPORTANTE la query: se pide la clase realmnete Cliente! no la tabla que se ha creado\r\n\t Lista_usuarios= sesion.createQuery(\"FROM User\").list(); //creamos consulta de la tabla clientes (en plural)!\r\n\t }finally \r\n\t { \r\n\t sesion.close(); \r\n\t } \r\n\t return Lista_usuarios; \r\n\t}",
"@Override\n\tpublic List<KeyValuePair> getUserNameList(boolean active) {\n\t\tif (active) { // only active cabs\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user WHERE user.ACTIVE ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t} else {\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t}\n\t}",
"@Override\n\tpublic SysUser getById(SysUser b) throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"List<User> getAll() throws SQLException;",
"@Update({\n \"update user_t\",\n \"set user_name = #{userName,jdbcType=VARCHAR},\",\n \"password = #{password,jdbcType=VARCHAR},\",\n \"age = #{age,jdbcType=INTEGER},\",\n \"ver = #{ver,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(User record);",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Trans(Long userid) throws Exception{\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name,cd.DEMAT_ACC_NO from customer c,CUSTOMER_DETAILS cd,login l where l.login_id=c.login_id and c.user_id=cd.user_id and l.login_id=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"public interface IApplicationUserSecurity {\n\n\n\n /**\n * Return the value associated with the column: dateCreated.\n\t * @return A Date object (this.dateCreated)\n\t */\n\tDate getDateCreated();\n\t\n\n \n /** \n * Set the value related to the column: dateCreated.\n\t * @param dateCreated the dateCreated value you wish to set\n\t */\n\tvoid setDateCreated(final Date dateCreated);\n\n /**\n * Return the value associated with the column: dateDisabled.\n\t * @return A Date object (this.dateDisabled)\n\t */\n\tDate getDateDisabled();\n\t\n\n \n /** \n * Set the value related to the column: dateDisabled.\n\t * @param dateDisabled the dateDisabled value you wish to set\n\t */\n\tvoid setDateDisabled(final Date dateDisabled);\n\n /**\n * Return the value associated with the column: dateUpdated.\n\t * @return A Date object (this.dateUpdated)\n\t */\n\tDate getDateUpdated();\n\t\n\n \n /** \n * Set the value related to the column: dateUpdated.\n\t * @param dateUpdated the dateUpdated value you wish to set\n\t */\n\tvoid setDateUpdated(final Date dateUpdated);\n\n /**\n * Return the value associated with the column: id.\n\t * @return A Long object (this.id)\n\t */\n\tLong getId();\n\t\n\n \n /** \n * Set the value related to the column: id.\n\t * @param id the id value you wish to set\n\t */\n\tvoid setId(final Long id);\n\n /**\n * Return the value associated with the column: role.\n\t * @return A SecurityRole object (this.role)\n\t */\n\tSecurityRole getRole();\n\t\n\n \n /** \n * Set the value related to the column: role.\n\t * @param role the role value you wish to set\n\t */\n\tvoid setRole(final SecurityRole role);\n\n /**\n * Return the value associated with the column: user.\n\t * @return A ApplicationUser object (this.user)\n\t */\n\tApplicationUser getUser();\n\t\n\n \n /** \n * Set the value related to the column: user.\n\t * @param user the user value you wish to set\n\t */\n\tvoid setUser(final ApplicationUser user);\n\n /**\n * Return the value associated with the column: userCreated.\n\t * @return A Long object (this.userCreated)\n\t */\n\tLong getUserCreated();\n\t\n\n \n /** \n * Set the value related to the column: userCreated.\n\t * @param userCreated the userCreated value you wish to set\n\t */\n\tvoid setUserCreated(final Long userCreated);\n\n /**\n * Return the value associated with the column: userUpdated.\n\t * @return A Long object (this.userUpdated)\n\t */\n\tLong getUserUpdated();\n\t\n\n \n /** \n * Set the value related to the column: userUpdated.\n\t * @param userUpdated the userUpdated value you wish to set\n\t */\n\tvoid setUserUpdated(final Long userUpdated);\n\n\t// end of interface\n}"
] | [
"0.6771733",
"0.65462595",
"0.62328744",
"0.6196613",
"0.60776955",
"0.6031062",
"0.6008189",
"0.6005118",
"0.6002843",
"0.5952266",
"0.5931212",
"0.5869234",
"0.58649075",
"0.58434963",
"0.579993",
"0.57949454",
"0.57858",
"0.5769281",
"0.57692075",
"0.57684946",
"0.57556194",
"0.5738935",
"0.57270706",
"0.57237065",
"0.5720913",
"0.5711317",
"0.5701847",
"0.5697634",
"0.56928754",
"0.56777996",
"0.56763977",
"0.5667951",
"0.5664326",
"0.56513447",
"0.5650252",
"0.5645967",
"0.5636749",
"0.56355506",
"0.562985",
"0.56282824",
"0.5616262",
"0.56063306",
"0.56050384",
"0.56001854",
"0.5599466",
"0.5587153",
"0.5584146",
"0.55746436",
"0.5566859",
"0.5552046",
"0.55478215",
"0.5537006",
"0.55172485",
"0.5512824",
"0.5500639",
"0.5495686",
"0.54905075",
"0.5476832",
"0.54543275",
"0.54510695",
"0.5448661",
"0.54480594",
"0.5446852",
"0.5442552",
"0.5437968",
"0.54334056",
"0.5430492",
"0.54244053",
"0.54228836",
"0.54134125",
"0.5411123",
"0.54090226",
"0.54033357",
"0.5400385",
"0.5394977",
"0.539045",
"0.53892344",
"0.53850263",
"0.5382836",
"0.5379031",
"0.53766674",
"0.5375851",
"0.53687537",
"0.53685707",
"0.53615206",
"0.5361343",
"0.53610486",
"0.535977",
"0.5354418",
"0.5345022",
"0.5343895",
"0.5332783",
"0.53321344",
"0.5327899",
"0.5320022",
"0.53196675",
"0.5314622",
"0.5305529",
"0.53039485",
"0.5296667",
"0.5294807"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table t_sys_user | int insertSelective(DrpCommissionRule record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Override\n public void intsertUser(SysUser user) {\n System.out.println(\"user插入到mysql数据库中(oracle数据库):\"+user);\n }",
"public interface sysUserService {\n @DataSource(\"master\")\n sysUser selectByid(String id);\n PageInfo selectUserList(String username, String name, String status, String org_id,\n String is_admin, String orderFiled, String orderSort, int pageindex, int pagenum);\n int addUser(sysUser sysuser);\n int modifyUser(sysUser sysuser);\n int deleteUser(String id);\n int changeUserStatus(String id,String status);\n}",
"List<SysUser> selectAll();",
"SysUser selectByPrimaryKey(Long userId);",
"public List<Systemuser> getUserList() throws Exception {\n\r\n List<Systemuser> userRoleList = new ArrayList<Systemuser>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Systemuser u order by Upper(u.username) asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"SysRoleUser selectByPrimaryKey(Long id);",
"public String getJdbcUser()\n {\n return getStringValue(DataSourceDobj.FLD_JDBC_USER);\n }",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"public List getSysUserTypes(SysUserType sysUserType);",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}",
"@Override\n public java.lang.String getUserUuid()\n throws com.liferay.portal.kernel.exception.SystemException {\n return _usersCatastropheOrgs.getUserUuid();\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getDatabaseUser();",
"@Override\n\tpublic List<SysUser> getAll() throws Exception {\n\t\treturn null;\n\t}",
"public SystemUser findByUserName(String userName);",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}",
"public void setJdbcUser(String val)\n {\n setValue(DataSourceDobj.FLD_JDBC_USER, val);\n }",
"public interface SysUserService extends Service<SysUser> {\n void sysUserAdd(SysUser sysUser,String userId) throws Exception;\n void sysUserUpdate(SysUser sysUser,String userId);\n String checkSysUsername(String sysUsername);\n\n /**\n * 通过 username 查询 a_sys_user 表中是否含有 username , 若无对应的 username ,则给出相应的提示。 2018/05/19 11:07 rk\n * @param username\n * @return\n */\n String checkUsername(String username);\n\n /**\n * 实现登录功能\n * @param username\n * @param password\n * @return\n */\n SysUser sysUserLogin(String username, String password);\n\n /**\n * 根据username查询role_id 在a_user_role表中查询\n * @param username\n * @return\n */\n // String queryRoleId(String username);\n List<String> queryRoleId(String username);\n\n /**\n * 通过 username 删除用户数据\n * @param username\n */\n void deleteUserByUsername(String username);\n\n /**\n * 模糊匹配,查询 a_sys_user \n * @param username\n * @param name\n * @param user_type\n * @param org_code\n * @param is_ok\n * @return\n */\n List<SysUser> selectByFiveParameter(String username, String name, String user_type, String org_code, String is_ok);\n\n}",
"@Override\n\tpublic User viewUser(String nm) {\n\t\treturn userdao.viewUser(nm);\n\t}",
"public ResultSet Retuser() throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from login where usertype='user'\");\r\n\treturn rs;\r\n\t\r\n}",
"@Override\n\tpublic IUser creatUser() {\n\t\treturn new SqlServerUser();\n\t}",
"SystemRoleUserMapperMo selectByPrimaryKey(Integer id);",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"public UsuarioTable getUsuarioLogueado() {\n String usuario = FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();\n return getUsuarioFacade().obtenerIDPorNombre(usuario);\n }",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"public SysUserType getSysUserType(final Long id);",
"@PermitAll\n @Override\n public User getCurrentUser() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntity(User.class, params);\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\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 list;\n\t\t\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"@Override\r\n public User getUser() throws RemoteException, SQLException {\r\n return user;\r\n }",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"@Override\n\tpublic List<User> getUserList(String userType) {\n\t\tStringBuilder sb = new StringBuilder(\n\t\t\t\t\"SELECT e.`FAILED_ATTEMPTS`, e.`EXPIRES_ON`, e.`LAST_LOGIN_DATE`, e.`NAME`, e.`USERNAME`, e.`ACTIVE`, e.`OUTSIDE_ACCESS`, e.USER_ID, er.ROLE_ID, r.ROLE_NAME FROM user e LEFT JOIN user_role er ON e.USER_ID=er.USER_ID LEFT JOIN role r ON er.ROLE_ID=r.ROLE_ID WHERE 1 \");\n\t\tMap<String, Object> params = new HashMap<>();\n\t\tif (userType.equals(\"1\")) { // only active users\n\t\t\tsb.append(\" AND e.`ACTIVE`\");\n\t\t} else if (userType.equals(\"-1\")) { // only deactive users\n\t\t\tsb.append(\" AND e.`ACTIVE`=false\");\n\t\t}\n\n\t\treturn this.namedParameterJdbcTemplate.query(sb.toString(), params, new UserRowMapper());\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"public List<TbccUser> getSysAdmin() {\n\t\treturn userdao.getSysAdmin();\n\t}",
"@Override\n\tpublic List<SimpleUser> getAllSimpleUser() {\n\t\treturn dao.getAllSimpleUser();\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"public Long saveSysUserType(SysUserType sysUserType);",
"public interface SysUserService {\n\n /**\n * 新增用户\n * @param SysUser\n * @return\n */\n SysUser addSysUser(SysUser SysUser);\n\n /**\n * 根据用户名查询用户\n * @param username\n * @return\n */\n SysUser findUserByUserName(String username);\n\n /**\n * 根据用户姓名查询用户\n * @param name\n * @return\n */\n SysUser findUserByName(String name);\n\n /**\n * 根据id获取用户\n * @param userId\n * @return\n */\n SysUser findUserByUserId(Integer userId);\n\n /**\n * 根据id删除用户\n * @param userId\n */\n void delete(Integer userId);\n\n /**\n * 分页查询用户\n * @param userName 用户名\n * @param page\n * @param rows\n * @return\n */\n List<SysUser> getUsers(String userName, Integer page, Integer rows);\n\n /**\n * 根据用户名查询数量\n * @param userName\n * @return\n */\n Integer getUsersCount(String userName);\n\n /**\n * 根据用户id查询用户\n * @param userId\n * @return\n */\n SysUser getUserById(Integer userId);\n\n /**\n * 更新用户信息\n * @param user\n */\n void update(SysUser user);\n\n /**\n * 修改登录密码\n * @param userId\n * @param newPassword\n */\n void modifyPassword(int userId, String newPassword);\n\n /**\n * 根据用户id获取用户密码\n * @param userId\n * @return\n */\n String getPassword(int userId);\n}",
"@Override\r\n\tpublic Integer registerUser(User user) throws SQLException, ClassNotFoundException, IOException \r\n\t{\r\n\t\t//Declare all variables\r\n\t\t//Create Connection, PreparedStatement, and ResultSet Objects and\r\n\t\t//initialize to null. Create an OracleConnection Object with Java default Constructor.\r\n\t\tConnection conn = null;\t\t\t\r\n\t\tPreparedStatement stmt = null;\t\r\n\t\tResultSet rs = null;\t\t\t\r\n\t\tOracleConnection orcl= new OracleConnection();\t\r\n\t\t\r\n\t\t// Assign query statement (SQL) to String variable\r\n\t\tString insertString = \"insert into users (user_name, password, admin_role) values (?,?,?)\";\r\n\t\t\r\n\t\t//Assign column id value to String array for auto generated keys\r\n\t\tString[] COL = {\"user_id\"};\r\n\t\tint ID = -1;\r\n\t \r\n\t\t//Assign value to Connection Object using getConnection\r\n\t\t//method from OracleConnection Class.\r\n\t conn = orcl.getConnection(); \r\n\t\tSystem.out.println(\"DATABASE CONNECTION ESTABLISHED\");\r\n\t \r\n\t try\r\n\t\t{\r\n\t \t//Initialize Statement Object with passing of query and column id \r\n\t \t//Initialize Statement Object with column index and value to be inserted into the column\r\n\t stmt = conn.prepareStatement(insertString, COL);\r\n\t \r\n\t stmt.setString(1, user.getUserName());\r\n\t stmt.setString(2, user.getPassword());\r\n\t stmt.setString(3, user.getAdminRole());\r\n\t \r\n\t //Execute query\r\n\t stmt.executeUpdate();\r\n\t \r\n\t //Assign returned values to ResultSet Object.\r\n\t rs = stmt.getGeneratedKeys();\r\n\t if(rs != null && rs.next()) \r\n\t {\r\n\t ID = rs.getInt(1);\r\n\t user.setUserId(ID);\r\n\t System.out.println(\"The user has been registered as USER ID#: \"+ID);\r\n\t }\r\n\t }\r\n\t catch (SQLException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t//Close all database access Objects\r\n\t\t\tif (rs != null) \r\n\t\t\t{\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\tif (stmt != null) \r\n\t\t\t{\r\n\t\t\t\tstmt.close();\r\n\t\t\t}\r\n\t\t\tif (conn != null) \r\n\t\t\t{\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n\t\treturn ID;\r\n\t}",
"@Component\npublic interface SysUserRoleMapper extends Mapper<SysUserRole> {\n @Select(\"select r.* from sys_role r, sys_user u, sys_user_role u_r where r.id = u_r.ROLE_ID and u_r.USER_ID = u.ID and u_r.IS_DELETE = 0 and u.ID = #{userId}\")\n List<SysRole> findSysRolesByUserId(String userId);\n\n @Select(\"select ROLE_ID from sys_user_role where IS_DELETE=0 and user_id=#{userID}\")\n List<String> findRolesByUserId(String userId);\n\n @Select(\"select r.`NAME` from sys_role r, sys_user u, sys_user_role u_r WHERE u.ID = u_r.USER_ID AND r.ID = u_r.ROLE_ID AND u_r.IS_DELETE=0 AND u.LOGIN_NAME = #{username}\")\n List<String> getSysRolesByUsername(String username);\n\n @Delete(\"update sys_user_role set IS_DELETE=1 where user_id=#{userId}\")\n void deleteByUserId(String userId);\n}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"@Override\n public String getTypeForDisplay() {\n return \"User\";\n }",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}",
"public ResultSet Appuser(Long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from customer where user_id=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"public ResultSet SelectUser(long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select l.loginid,l.username,l.password,c.firstname,c.lastname,c.city,c.e_mail,c.phno,c.dob,c.doReg,c.pincode,c.address,cd.pancard_no,cd.bank_name,cd.branch_name,cd.bank_acc_no,cd.demat_acc_no from login l,customer c,customer_details cd\" +\r\n\t\t\t\"where l.loginid=c.loginid and c.user_id=cd.user_id and l.loginid=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"@Update({\n \"update tb_user\",\n \"set password = #{password,jdbcType=VARCHAR}\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int updateByPrimaryKey(User record);",
"public static void createMysqlUser(Eleve e) {\n Session session = HibernateUtils.getSessionFactory().openSession();\r\n String SQLRequest = \"CREATE USER '\" + e.getAbreviation() + \"'@'%' IDENTIFIED BY '\" + e.getPwd() + \"'; \";\r\n System.out.println(SQLRequest);\r\n session.beginTransaction();\r\n session.createSQLQuery(SQLRequest).executeUpdate();\r\n session.getTransaction().commit();\r\n session.close();\r\n\r\n }",
"public List<User> displayUsers() {\n\t\t\r\n\t\ttry {\r\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from com.niit.model.User\").list();\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getSystemUser()\n\t{\n\t\treturn \"postgres\";\n\t}",
"protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}",
"@Insert({\n \"insert into tb_user (username, password)\",\n \"values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR})\"\n })\n int insert(User record);",
"@Override\n\tpublic List<SysUser> getAllByPage(PageBean<SysUser> pageBean) throws Exception {\n\t\treturn null;\n\t}",
"public int addUser(HttpServletRequest request) {\n\t\tHashMap<String, Object> parameters = buildUserInsertCondition(request);\n\n\t\tSimpleJdbcInsert insert = new SimpleJdbcInsert(jt).withTableName(\"sys_user\").usingGeneratedKeyColumns(\"userId\");\n\n\t\tNumber id = insert.executeAndReturnKey(parameters);\n\n\t\tint pk = id.intValue();\n\n\t\treturn pk;\n\t}",
"@Override\r\n\tpublic User queryUserByUsername(String userName,String psswd) {\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"userService\");\r\n\t\t\r\n\t\treturn userMapper.selectUserByUserName(userName,psswd);\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\n\tpublic void GetServerUser() {\n\n\t}",
"@Override\r\n public UserModel queryUserModel(String userName) {\n System.out.println(\"query sys user build user model.\");\r\n return new UserModel(\"111\", \"sys\", \"123456\");\r\n }",
"public List<User> user_list() throws HibernateException \r\n\t{ \r\n\t\tList <User> Lista_usuarios = null; \r\n\t \r\n\t try \r\n\t { \r\n\t iniciaOperacion(); //IMPORTANTE la query: se pide la clase realmnete Cliente! no la tabla que se ha creado\r\n\t Lista_usuarios= sesion.createQuery(\"FROM User\").list(); //creamos consulta de la tabla clientes (en plural)!\r\n\t }finally \r\n\t { \r\n\t sesion.close(); \r\n\t } \r\n\t return Lista_usuarios; \r\n\t}",
"@Override\n\tpublic List<KeyValuePair> getUserNameList(boolean active) {\n\t\tif (active) { // only active cabs\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user WHERE user.ACTIVE ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t} else {\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t}\n\t}",
"@Override\n\tpublic SysUser getById(SysUser b) throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"List<User> getAll() throws SQLException;",
"@Update({\n \"update user_t\",\n \"set user_name = #{userName,jdbcType=VARCHAR},\",\n \"password = #{password,jdbcType=VARCHAR},\",\n \"age = #{age,jdbcType=INTEGER},\",\n \"ver = #{ver,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(User record);",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Trans(Long userid) throws Exception{\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name,cd.DEMAT_ACC_NO from customer c,CUSTOMER_DETAILS cd,login l where l.login_id=c.login_id and c.user_id=cd.user_id and l.login_id=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"public interface IApplicationUserSecurity {\n\n\n\n /**\n * Return the value associated with the column: dateCreated.\n\t * @return A Date object (this.dateCreated)\n\t */\n\tDate getDateCreated();\n\t\n\n \n /** \n * Set the value related to the column: dateCreated.\n\t * @param dateCreated the dateCreated value you wish to set\n\t */\n\tvoid setDateCreated(final Date dateCreated);\n\n /**\n * Return the value associated with the column: dateDisabled.\n\t * @return A Date object (this.dateDisabled)\n\t */\n\tDate getDateDisabled();\n\t\n\n \n /** \n * Set the value related to the column: dateDisabled.\n\t * @param dateDisabled the dateDisabled value you wish to set\n\t */\n\tvoid setDateDisabled(final Date dateDisabled);\n\n /**\n * Return the value associated with the column: dateUpdated.\n\t * @return A Date object (this.dateUpdated)\n\t */\n\tDate getDateUpdated();\n\t\n\n \n /** \n * Set the value related to the column: dateUpdated.\n\t * @param dateUpdated the dateUpdated value you wish to set\n\t */\n\tvoid setDateUpdated(final Date dateUpdated);\n\n /**\n * Return the value associated with the column: id.\n\t * @return A Long object (this.id)\n\t */\n\tLong getId();\n\t\n\n \n /** \n * Set the value related to the column: id.\n\t * @param id the id value you wish to set\n\t */\n\tvoid setId(final Long id);\n\n /**\n * Return the value associated with the column: role.\n\t * @return A SecurityRole object (this.role)\n\t */\n\tSecurityRole getRole();\n\t\n\n \n /** \n * Set the value related to the column: role.\n\t * @param role the role value you wish to set\n\t */\n\tvoid setRole(final SecurityRole role);\n\n /**\n * Return the value associated with the column: user.\n\t * @return A ApplicationUser object (this.user)\n\t */\n\tApplicationUser getUser();\n\t\n\n \n /** \n * Set the value related to the column: user.\n\t * @param user the user value you wish to set\n\t */\n\tvoid setUser(final ApplicationUser user);\n\n /**\n * Return the value associated with the column: userCreated.\n\t * @return A Long object (this.userCreated)\n\t */\n\tLong getUserCreated();\n\t\n\n \n /** \n * Set the value related to the column: userCreated.\n\t * @param userCreated the userCreated value you wish to set\n\t */\n\tvoid setUserCreated(final Long userCreated);\n\n /**\n * Return the value associated with the column: userUpdated.\n\t * @return A Long object (this.userUpdated)\n\t */\n\tLong getUserUpdated();\n\t\n\n \n /** \n * Set the value related to the column: userUpdated.\n\t * @param userUpdated the userUpdated value you wish to set\n\t */\n\tvoid setUserUpdated(final Long userUpdated);\n\n\t// end of interface\n}"
] | [
"0.6771733",
"0.65462595",
"0.62328744",
"0.6196613",
"0.60776955",
"0.6031062",
"0.6008189",
"0.6005118",
"0.6002843",
"0.5952266",
"0.5931212",
"0.5869234",
"0.58649075",
"0.58434963",
"0.579993",
"0.57949454",
"0.57858",
"0.5769281",
"0.57692075",
"0.57684946",
"0.57556194",
"0.5738935",
"0.57270706",
"0.57237065",
"0.5720913",
"0.5711317",
"0.5701847",
"0.5697634",
"0.56928754",
"0.56777996",
"0.56763977",
"0.5667951",
"0.5664326",
"0.56513447",
"0.5650252",
"0.5645967",
"0.5636749",
"0.56355506",
"0.562985",
"0.56282824",
"0.5616262",
"0.56063306",
"0.56050384",
"0.56001854",
"0.5599466",
"0.5587153",
"0.5584146",
"0.55746436",
"0.5566859",
"0.5552046",
"0.55478215",
"0.5537006",
"0.55172485",
"0.5512824",
"0.5500639",
"0.5495686",
"0.54905075",
"0.5476832",
"0.54543275",
"0.54510695",
"0.5448661",
"0.54480594",
"0.5446852",
"0.5442552",
"0.5437968",
"0.54334056",
"0.5430492",
"0.54244053",
"0.54228836",
"0.54134125",
"0.5411123",
"0.54090226",
"0.54033357",
"0.5400385",
"0.5394977",
"0.539045",
"0.53892344",
"0.53850263",
"0.5382836",
"0.5379031",
"0.53766674",
"0.5375851",
"0.53687537",
"0.53685707",
"0.53615206",
"0.5361343",
"0.53610486",
"0.535977",
"0.5354418",
"0.5345022",
"0.5343895",
"0.5332783",
"0.53321344",
"0.5327899",
"0.5320022",
"0.53196675",
"0.5314622",
"0.5305529",
"0.53039485",
"0.5296667",
"0.5294807"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table t_sys_user | DrpCommissionRule selectByPrimaryKey(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Override\n public void intsertUser(SysUser user) {\n System.out.println(\"user插入到mysql数据库中(oracle数据库):\"+user);\n }",
"public interface sysUserService {\n @DataSource(\"master\")\n sysUser selectByid(String id);\n PageInfo selectUserList(String username, String name, String status, String org_id,\n String is_admin, String orderFiled, String orderSort, int pageindex, int pagenum);\n int addUser(sysUser sysuser);\n int modifyUser(sysUser sysuser);\n int deleteUser(String id);\n int changeUserStatus(String id,String status);\n}",
"List<SysUser> selectAll();",
"SysUser selectByPrimaryKey(Long userId);",
"public List<Systemuser> getUserList() throws Exception {\n\r\n List<Systemuser> userRoleList = new ArrayList<Systemuser>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Systemuser u order by Upper(u.username) asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"SysRoleUser selectByPrimaryKey(Long id);",
"public String getJdbcUser()\n {\n return getStringValue(DataSourceDobj.FLD_JDBC_USER);\n }",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"public List getSysUserTypes(SysUserType sysUserType);",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}",
"@Override\n public java.lang.String getUserUuid()\n throws com.liferay.portal.kernel.exception.SystemException {\n return _usersCatastropheOrgs.getUserUuid();\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getDatabaseUser();",
"@Override\n\tpublic List<SysUser> getAll() throws Exception {\n\t\treturn null;\n\t}",
"public SystemUser findByUserName(String userName);",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}",
"public void setJdbcUser(String val)\n {\n setValue(DataSourceDobj.FLD_JDBC_USER, val);\n }",
"public interface SysUserService extends Service<SysUser> {\n void sysUserAdd(SysUser sysUser,String userId) throws Exception;\n void sysUserUpdate(SysUser sysUser,String userId);\n String checkSysUsername(String sysUsername);\n\n /**\n * 通过 username 查询 a_sys_user 表中是否含有 username , 若无对应的 username ,则给出相应的提示。 2018/05/19 11:07 rk\n * @param username\n * @return\n */\n String checkUsername(String username);\n\n /**\n * 实现登录功能\n * @param username\n * @param password\n * @return\n */\n SysUser sysUserLogin(String username, String password);\n\n /**\n * 根据username查询role_id 在a_user_role表中查询\n * @param username\n * @return\n */\n // String queryRoleId(String username);\n List<String> queryRoleId(String username);\n\n /**\n * 通过 username 删除用户数据\n * @param username\n */\n void deleteUserByUsername(String username);\n\n /**\n * 模糊匹配,查询 a_sys_user \n * @param username\n * @param name\n * @param user_type\n * @param org_code\n * @param is_ok\n * @return\n */\n List<SysUser> selectByFiveParameter(String username, String name, String user_type, String org_code, String is_ok);\n\n}",
"@Override\n\tpublic User viewUser(String nm) {\n\t\treturn userdao.viewUser(nm);\n\t}",
"public ResultSet Retuser() throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from login where usertype='user'\");\r\n\treturn rs;\r\n\t\r\n}",
"@Override\n\tpublic IUser creatUser() {\n\t\treturn new SqlServerUser();\n\t}",
"SystemRoleUserMapperMo selectByPrimaryKey(Integer id);",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"public UsuarioTable getUsuarioLogueado() {\n String usuario = FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();\n return getUsuarioFacade().obtenerIDPorNombre(usuario);\n }",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"public SysUserType getSysUserType(final Long id);",
"@PermitAll\n @Override\n public User getCurrentUser() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntity(User.class, params);\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\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 list;\n\t\t\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"@Override\r\n public User getUser() throws RemoteException, SQLException {\r\n return user;\r\n }",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"@Override\n\tpublic List<User> getUserList(String userType) {\n\t\tStringBuilder sb = new StringBuilder(\n\t\t\t\t\"SELECT e.`FAILED_ATTEMPTS`, e.`EXPIRES_ON`, e.`LAST_LOGIN_DATE`, e.`NAME`, e.`USERNAME`, e.`ACTIVE`, e.`OUTSIDE_ACCESS`, e.USER_ID, er.ROLE_ID, r.ROLE_NAME FROM user e LEFT JOIN user_role er ON e.USER_ID=er.USER_ID LEFT JOIN role r ON er.ROLE_ID=r.ROLE_ID WHERE 1 \");\n\t\tMap<String, Object> params = new HashMap<>();\n\t\tif (userType.equals(\"1\")) { // only active users\n\t\t\tsb.append(\" AND e.`ACTIVE`\");\n\t\t} else if (userType.equals(\"-1\")) { // only deactive users\n\t\t\tsb.append(\" AND e.`ACTIVE`=false\");\n\t\t}\n\n\t\treturn this.namedParameterJdbcTemplate.query(sb.toString(), params, new UserRowMapper());\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"public List<TbccUser> getSysAdmin() {\n\t\treturn userdao.getSysAdmin();\n\t}",
"@Override\n\tpublic List<SimpleUser> getAllSimpleUser() {\n\t\treturn dao.getAllSimpleUser();\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"public Long saveSysUserType(SysUserType sysUserType);",
"public interface SysUserService {\n\n /**\n * 新增用户\n * @param SysUser\n * @return\n */\n SysUser addSysUser(SysUser SysUser);\n\n /**\n * 根据用户名查询用户\n * @param username\n * @return\n */\n SysUser findUserByUserName(String username);\n\n /**\n * 根据用户姓名查询用户\n * @param name\n * @return\n */\n SysUser findUserByName(String name);\n\n /**\n * 根据id获取用户\n * @param userId\n * @return\n */\n SysUser findUserByUserId(Integer userId);\n\n /**\n * 根据id删除用户\n * @param userId\n */\n void delete(Integer userId);\n\n /**\n * 分页查询用户\n * @param userName 用户名\n * @param page\n * @param rows\n * @return\n */\n List<SysUser> getUsers(String userName, Integer page, Integer rows);\n\n /**\n * 根据用户名查询数量\n * @param userName\n * @return\n */\n Integer getUsersCount(String userName);\n\n /**\n * 根据用户id查询用户\n * @param userId\n * @return\n */\n SysUser getUserById(Integer userId);\n\n /**\n * 更新用户信息\n * @param user\n */\n void update(SysUser user);\n\n /**\n * 修改登录密码\n * @param userId\n * @param newPassword\n */\n void modifyPassword(int userId, String newPassword);\n\n /**\n * 根据用户id获取用户密码\n * @param userId\n * @return\n */\n String getPassword(int userId);\n}",
"@Override\r\n\tpublic Integer registerUser(User user) throws SQLException, ClassNotFoundException, IOException \r\n\t{\r\n\t\t//Declare all variables\r\n\t\t//Create Connection, PreparedStatement, and ResultSet Objects and\r\n\t\t//initialize to null. Create an OracleConnection Object with Java default Constructor.\r\n\t\tConnection conn = null;\t\t\t\r\n\t\tPreparedStatement stmt = null;\t\r\n\t\tResultSet rs = null;\t\t\t\r\n\t\tOracleConnection orcl= new OracleConnection();\t\r\n\t\t\r\n\t\t// Assign query statement (SQL) to String variable\r\n\t\tString insertString = \"insert into users (user_name, password, admin_role) values (?,?,?)\";\r\n\t\t\r\n\t\t//Assign column id value to String array for auto generated keys\r\n\t\tString[] COL = {\"user_id\"};\r\n\t\tint ID = -1;\r\n\t \r\n\t\t//Assign value to Connection Object using getConnection\r\n\t\t//method from OracleConnection Class.\r\n\t conn = orcl.getConnection(); \r\n\t\tSystem.out.println(\"DATABASE CONNECTION ESTABLISHED\");\r\n\t \r\n\t try\r\n\t\t{\r\n\t \t//Initialize Statement Object with passing of query and column id \r\n\t \t//Initialize Statement Object with column index and value to be inserted into the column\r\n\t stmt = conn.prepareStatement(insertString, COL);\r\n\t \r\n\t stmt.setString(1, user.getUserName());\r\n\t stmt.setString(2, user.getPassword());\r\n\t stmt.setString(3, user.getAdminRole());\r\n\t \r\n\t //Execute query\r\n\t stmt.executeUpdate();\r\n\t \r\n\t //Assign returned values to ResultSet Object.\r\n\t rs = stmt.getGeneratedKeys();\r\n\t if(rs != null && rs.next()) \r\n\t {\r\n\t ID = rs.getInt(1);\r\n\t user.setUserId(ID);\r\n\t System.out.println(\"The user has been registered as USER ID#: \"+ID);\r\n\t }\r\n\t }\r\n\t catch (SQLException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t//Close all database access Objects\r\n\t\t\tif (rs != null) \r\n\t\t\t{\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\tif (stmt != null) \r\n\t\t\t{\r\n\t\t\t\tstmt.close();\r\n\t\t\t}\r\n\t\t\tif (conn != null) \r\n\t\t\t{\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n\t\treturn ID;\r\n\t}",
"@Component\npublic interface SysUserRoleMapper extends Mapper<SysUserRole> {\n @Select(\"select r.* from sys_role r, sys_user u, sys_user_role u_r where r.id = u_r.ROLE_ID and u_r.USER_ID = u.ID and u_r.IS_DELETE = 0 and u.ID = #{userId}\")\n List<SysRole> findSysRolesByUserId(String userId);\n\n @Select(\"select ROLE_ID from sys_user_role where IS_DELETE=0 and user_id=#{userID}\")\n List<String> findRolesByUserId(String userId);\n\n @Select(\"select r.`NAME` from sys_role r, sys_user u, sys_user_role u_r WHERE u.ID = u_r.USER_ID AND r.ID = u_r.ROLE_ID AND u_r.IS_DELETE=0 AND u.LOGIN_NAME = #{username}\")\n List<String> getSysRolesByUsername(String username);\n\n @Delete(\"update sys_user_role set IS_DELETE=1 where user_id=#{userId}\")\n void deleteByUserId(String userId);\n}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"@Override\n public String getTypeForDisplay() {\n return \"User\";\n }",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}",
"public ResultSet Appuser(Long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from customer where user_id=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"public ResultSet SelectUser(long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select l.loginid,l.username,l.password,c.firstname,c.lastname,c.city,c.e_mail,c.phno,c.dob,c.doReg,c.pincode,c.address,cd.pancard_no,cd.bank_name,cd.branch_name,cd.bank_acc_no,cd.demat_acc_no from login l,customer c,customer_details cd\" +\r\n\t\t\t\"where l.loginid=c.loginid and c.user_id=cd.user_id and l.loginid=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"@Update({\n \"update tb_user\",\n \"set password = #{password,jdbcType=VARCHAR}\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int updateByPrimaryKey(User record);",
"public static void createMysqlUser(Eleve e) {\n Session session = HibernateUtils.getSessionFactory().openSession();\r\n String SQLRequest = \"CREATE USER '\" + e.getAbreviation() + \"'@'%' IDENTIFIED BY '\" + e.getPwd() + \"'; \";\r\n System.out.println(SQLRequest);\r\n session.beginTransaction();\r\n session.createSQLQuery(SQLRequest).executeUpdate();\r\n session.getTransaction().commit();\r\n session.close();\r\n\r\n }",
"public List<User> displayUsers() {\n\t\t\r\n\t\ttry {\r\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from com.niit.model.User\").list();\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getSystemUser()\n\t{\n\t\treturn \"postgres\";\n\t}",
"protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}",
"@Insert({\n \"insert into tb_user (username, password)\",\n \"values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR})\"\n })\n int insert(User record);",
"@Override\n\tpublic List<SysUser> getAllByPage(PageBean<SysUser> pageBean) throws Exception {\n\t\treturn null;\n\t}",
"public int addUser(HttpServletRequest request) {\n\t\tHashMap<String, Object> parameters = buildUserInsertCondition(request);\n\n\t\tSimpleJdbcInsert insert = new SimpleJdbcInsert(jt).withTableName(\"sys_user\").usingGeneratedKeyColumns(\"userId\");\n\n\t\tNumber id = insert.executeAndReturnKey(parameters);\n\n\t\tint pk = id.intValue();\n\n\t\treturn pk;\n\t}",
"@Override\r\n\tpublic User queryUserByUsername(String userName,String psswd) {\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"userService\");\r\n\t\t\r\n\t\treturn userMapper.selectUserByUserName(userName,psswd);\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\n\tpublic void GetServerUser() {\n\n\t}",
"@Override\r\n public UserModel queryUserModel(String userName) {\n System.out.println(\"query sys user build user model.\");\r\n return new UserModel(\"111\", \"sys\", \"123456\");\r\n }",
"public List<User> user_list() throws HibernateException \r\n\t{ \r\n\t\tList <User> Lista_usuarios = null; \r\n\t \r\n\t try \r\n\t { \r\n\t iniciaOperacion(); //IMPORTANTE la query: se pide la clase realmnete Cliente! no la tabla que se ha creado\r\n\t Lista_usuarios= sesion.createQuery(\"FROM User\").list(); //creamos consulta de la tabla clientes (en plural)!\r\n\t }finally \r\n\t { \r\n\t sesion.close(); \r\n\t } \r\n\t return Lista_usuarios; \r\n\t}",
"@Override\n\tpublic List<KeyValuePair> getUserNameList(boolean active) {\n\t\tif (active) { // only active cabs\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user WHERE user.ACTIVE ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t} else {\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t}\n\t}",
"@Override\n\tpublic SysUser getById(SysUser b) throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"List<User> getAll() throws SQLException;",
"@Update({\n \"update user_t\",\n \"set user_name = #{userName,jdbcType=VARCHAR},\",\n \"password = #{password,jdbcType=VARCHAR},\",\n \"age = #{age,jdbcType=INTEGER},\",\n \"ver = #{ver,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(User record);",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Trans(Long userid) throws Exception{\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name,cd.DEMAT_ACC_NO from customer c,CUSTOMER_DETAILS cd,login l where l.login_id=c.login_id and c.user_id=cd.user_id and l.login_id=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"public interface IApplicationUserSecurity {\n\n\n\n /**\n * Return the value associated with the column: dateCreated.\n\t * @return A Date object (this.dateCreated)\n\t */\n\tDate getDateCreated();\n\t\n\n \n /** \n * Set the value related to the column: dateCreated.\n\t * @param dateCreated the dateCreated value you wish to set\n\t */\n\tvoid setDateCreated(final Date dateCreated);\n\n /**\n * Return the value associated with the column: dateDisabled.\n\t * @return A Date object (this.dateDisabled)\n\t */\n\tDate getDateDisabled();\n\t\n\n \n /** \n * Set the value related to the column: dateDisabled.\n\t * @param dateDisabled the dateDisabled value you wish to set\n\t */\n\tvoid setDateDisabled(final Date dateDisabled);\n\n /**\n * Return the value associated with the column: dateUpdated.\n\t * @return A Date object (this.dateUpdated)\n\t */\n\tDate getDateUpdated();\n\t\n\n \n /** \n * Set the value related to the column: dateUpdated.\n\t * @param dateUpdated the dateUpdated value you wish to set\n\t */\n\tvoid setDateUpdated(final Date dateUpdated);\n\n /**\n * Return the value associated with the column: id.\n\t * @return A Long object (this.id)\n\t */\n\tLong getId();\n\t\n\n \n /** \n * Set the value related to the column: id.\n\t * @param id the id value you wish to set\n\t */\n\tvoid setId(final Long id);\n\n /**\n * Return the value associated with the column: role.\n\t * @return A SecurityRole object (this.role)\n\t */\n\tSecurityRole getRole();\n\t\n\n \n /** \n * Set the value related to the column: role.\n\t * @param role the role value you wish to set\n\t */\n\tvoid setRole(final SecurityRole role);\n\n /**\n * Return the value associated with the column: user.\n\t * @return A ApplicationUser object (this.user)\n\t */\n\tApplicationUser getUser();\n\t\n\n \n /** \n * Set the value related to the column: user.\n\t * @param user the user value you wish to set\n\t */\n\tvoid setUser(final ApplicationUser user);\n\n /**\n * Return the value associated with the column: userCreated.\n\t * @return A Long object (this.userCreated)\n\t */\n\tLong getUserCreated();\n\t\n\n \n /** \n * Set the value related to the column: userCreated.\n\t * @param userCreated the userCreated value you wish to set\n\t */\n\tvoid setUserCreated(final Long userCreated);\n\n /**\n * Return the value associated with the column: userUpdated.\n\t * @return A Long object (this.userUpdated)\n\t */\n\tLong getUserUpdated();\n\t\n\n \n /** \n * Set the value related to the column: userUpdated.\n\t * @param userUpdated the userUpdated value you wish to set\n\t */\n\tvoid setUserUpdated(final Long userUpdated);\n\n\t// end of interface\n}"
] | [
"0.6771733",
"0.65462595",
"0.62328744",
"0.6196613",
"0.60776955",
"0.6031062",
"0.6008189",
"0.6005118",
"0.6002843",
"0.5952266",
"0.5931212",
"0.5869234",
"0.58649075",
"0.58434963",
"0.579993",
"0.57949454",
"0.57858",
"0.5769281",
"0.57692075",
"0.57684946",
"0.57556194",
"0.5738935",
"0.57270706",
"0.57237065",
"0.5720913",
"0.5711317",
"0.5701847",
"0.5697634",
"0.56928754",
"0.56777996",
"0.56763977",
"0.5667951",
"0.5664326",
"0.56513447",
"0.5650252",
"0.5645967",
"0.5636749",
"0.56355506",
"0.562985",
"0.56282824",
"0.5616262",
"0.56063306",
"0.56050384",
"0.56001854",
"0.5599466",
"0.5587153",
"0.5584146",
"0.55746436",
"0.5566859",
"0.5552046",
"0.55478215",
"0.5537006",
"0.55172485",
"0.5512824",
"0.5500639",
"0.5495686",
"0.54905075",
"0.5476832",
"0.54543275",
"0.54510695",
"0.5448661",
"0.54480594",
"0.5446852",
"0.5442552",
"0.5437968",
"0.54334056",
"0.5430492",
"0.54244053",
"0.54228836",
"0.54134125",
"0.5411123",
"0.54090226",
"0.54033357",
"0.5400385",
"0.5394977",
"0.539045",
"0.53892344",
"0.53850263",
"0.5382836",
"0.5379031",
"0.53766674",
"0.5375851",
"0.53687537",
"0.53685707",
"0.53615206",
"0.5361343",
"0.53610486",
"0.535977",
"0.5354418",
"0.5345022",
"0.5343895",
"0.5332783",
"0.53321344",
"0.5327899",
"0.5320022",
"0.53196675",
"0.5314622",
"0.5305529",
"0.53039485",
"0.5296667",
"0.5294807"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table t_sys_user | int updateByPrimaryKeySelective(DrpCommissionRule record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Override\n public void intsertUser(SysUser user) {\n System.out.println(\"user插入到mysql数据库中(oracle数据库):\"+user);\n }",
"public interface sysUserService {\n @DataSource(\"master\")\n sysUser selectByid(String id);\n PageInfo selectUserList(String username, String name, String status, String org_id,\n String is_admin, String orderFiled, String orderSort, int pageindex, int pagenum);\n int addUser(sysUser sysuser);\n int modifyUser(sysUser sysuser);\n int deleteUser(String id);\n int changeUserStatus(String id,String status);\n}",
"List<SysUser> selectAll();",
"SysUser selectByPrimaryKey(Long userId);",
"public List<Systemuser> getUserList() throws Exception {\n\r\n List<Systemuser> userRoleList = new ArrayList<Systemuser>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Systemuser u order by Upper(u.username) asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"SysRoleUser selectByPrimaryKey(Long id);",
"public String getJdbcUser()\n {\n return getStringValue(DataSourceDobj.FLD_JDBC_USER);\n }",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"public List getSysUserTypes(SysUserType sysUserType);",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}",
"@Override\n public java.lang.String getUserUuid()\n throws com.liferay.portal.kernel.exception.SystemException {\n return _usersCatastropheOrgs.getUserUuid();\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getDatabaseUser();",
"@Override\n\tpublic List<SysUser> getAll() throws Exception {\n\t\treturn null;\n\t}",
"public SystemUser findByUserName(String userName);",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}",
"public void setJdbcUser(String val)\n {\n setValue(DataSourceDobj.FLD_JDBC_USER, val);\n }",
"public interface SysUserService extends Service<SysUser> {\n void sysUserAdd(SysUser sysUser,String userId) throws Exception;\n void sysUserUpdate(SysUser sysUser,String userId);\n String checkSysUsername(String sysUsername);\n\n /**\n * 通过 username 查询 a_sys_user 表中是否含有 username , 若无对应的 username ,则给出相应的提示。 2018/05/19 11:07 rk\n * @param username\n * @return\n */\n String checkUsername(String username);\n\n /**\n * 实现登录功能\n * @param username\n * @param password\n * @return\n */\n SysUser sysUserLogin(String username, String password);\n\n /**\n * 根据username查询role_id 在a_user_role表中查询\n * @param username\n * @return\n */\n // String queryRoleId(String username);\n List<String> queryRoleId(String username);\n\n /**\n * 通过 username 删除用户数据\n * @param username\n */\n void deleteUserByUsername(String username);\n\n /**\n * 模糊匹配,查询 a_sys_user \n * @param username\n * @param name\n * @param user_type\n * @param org_code\n * @param is_ok\n * @return\n */\n List<SysUser> selectByFiveParameter(String username, String name, String user_type, String org_code, String is_ok);\n\n}",
"@Override\n\tpublic User viewUser(String nm) {\n\t\treturn userdao.viewUser(nm);\n\t}",
"public ResultSet Retuser() throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from login where usertype='user'\");\r\n\treturn rs;\r\n\t\r\n}",
"@Override\n\tpublic IUser creatUser() {\n\t\treturn new SqlServerUser();\n\t}",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"SystemRoleUserMapperMo selectByPrimaryKey(Integer id);",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"public UsuarioTable getUsuarioLogueado() {\n String usuario = FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();\n return getUsuarioFacade().obtenerIDPorNombre(usuario);\n }",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"public SysUserType getSysUserType(final Long id);",
"@PermitAll\n @Override\n public User getCurrentUser() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntity(User.class, params);\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\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 list;\n\t\t\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"@Override\r\n public User getUser() throws RemoteException, SQLException {\r\n return user;\r\n }",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"@Override\n\tpublic List<User> getUserList(String userType) {\n\t\tStringBuilder sb = new StringBuilder(\n\t\t\t\t\"SELECT e.`FAILED_ATTEMPTS`, e.`EXPIRES_ON`, e.`LAST_LOGIN_DATE`, e.`NAME`, e.`USERNAME`, e.`ACTIVE`, e.`OUTSIDE_ACCESS`, e.USER_ID, er.ROLE_ID, r.ROLE_NAME FROM user e LEFT JOIN user_role er ON e.USER_ID=er.USER_ID LEFT JOIN role r ON er.ROLE_ID=r.ROLE_ID WHERE 1 \");\n\t\tMap<String, Object> params = new HashMap<>();\n\t\tif (userType.equals(\"1\")) { // only active users\n\t\t\tsb.append(\" AND e.`ACTIVE`\");\n\t\t} else if (userType.equals(\"-1\")) { // only deactive users\n\t\t\tsb.append(\" AND e.`ACTIVE`=false\");\n\t\t}\n\n\t\treturn this.namedParameterJdbcTemplate.query(sb.toString(), params, new UserRowMapper());\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"public List<TbccUser> getSysAdmin() {\n\t\treturn userdao.getSysAdmin();\n\t}",
"@Override\n\tpublic List<SimpleUser> getAllSimpleUser() {\n\t\treturn dao.getAllSimpleUser();\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"public Long saveSysUserType(SysUserType sysUserType);",
"public interface SysUserService {\n\n /**\n * 新增用户\n * @param SysUser\n * @return\n */\n SysUser addSysUser(SysUser SysUser);\n\n /**\n * 根据用户名查询用户\n * @param username\n * @return\n */\n SysUser findUserByUserName(String username);\n\n /**\n * 根据用户姓名查询用户\n * @param name\n * @return\n */\n SysUser findUserByName(String name);\n\n /**\n * 根据id获取用户\n * @param userId\n * @return\n */\n SysUser findUserByUserId(Integer userId);\n\n /**\n * 根据id删除用户\n * @param userId\n */\n void delete(Integer userId);\n\n /**\n * 分页查询用户\n * @param userName 用户名\n * @param page\n * @param rows\n * @return\n */\n List<SysUser> getUsers(String userName, Integer page, Integer rows);\n\n /**\n * 根据用户名查询数量\n * @param userName\n * @return\n */\n Integer getUsersCount(String userName);\n\n /**\n * 根据用户id查询用户\n * @param userId\n * @return\n */\n SysUser getUserById(Integer userId);\n\n /**\n * 更新用户信息\n * @param user\n */\n void update(SysUser user);\n\n /**\n * 修改登录密码\n * @param userId\n * @param newPassword\n */\n void modifyPassword(int userId, String newPassword);\n\n /**\n * 根据用户id获取用户密码\n * @param userId\n * @return\n */\n String getPassword(int userId);\n}",
"@Override\r\n\tpublic Integer registerUser(User user) throws SQLException, ClassNotFoundException, IOException \r\n\t{\r\n\t\t//Declare all variables\r\n\t\t//Create Connection, PreparedStatement, and ResultSet Objects and\r\n\t\t//initialize to null. Create an OracleConnection Object with Java default Constructor.\r\n\t\tConnection conn = null;\t\t\t\r\n\t\tPreparedStatement stmt = null;\t\r\n\t\tResultSet rs = null;\t\t\t\r\n\t\tOracleConnection orcl= new OracleConnection();\t\r\n\t\t\r\n\t\t// Assign query statement (SQL) to String variable\r\n\t\tString insertString = \"insert into users (user_name, password, admin_role) values (?,?,?)\";\r\n\t\t\r\n\t\t//Assign column id value to String array for auto generated keys\r\n\t\tString[] COL = {\"user_id\"};\r\n\t\tint ID = -1;\r\n\t \r\n\t\t//Assign value to Connection Object using getConnection\r\n\t\t//method from OracleConnection Class.\r\n\t conn = orcl.getConnection(); \r\n\t\tSystem.out.println(\"DATABASE CONNECTION ESTABLISHED\");\r\n\t \r\n\t try\r\n\t\t{\r\n\t \t//Initialize Statement Object with passing of query and column id \r\n\t \t//Initialize Statement Object with column index and value to be inserted into the column\r\n\t stmt = conn.prepareStatement(insertString, COL);\r\n\t \r\n\t stmt.setString(1, user.getUserName());\r\n\t stmt.setString(2, user.getPassword());\r\n\t stmt.setString(3, user.getAdminRole());\r\n\t \r\n\t //Execute query\r\n\t stmt.executeUpdate();\r\n\t \r\n\t //Assign returned values to ResultSet Object.\r\n\t rs = stmt.getGeneratedKeys();\r\n\t if(rs != null && rs.next()) \r\n\t {\r\n\t ID = rs.getInt(1);\r\n\t user.setUserId(ID);\r\n\t System.out.println(\"The user has been registered as USER ID#: \"+ID);\r\n\t }\r\n\t }\r\n\t catch (SQLException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t//Close all database access Objects\r\n\t\t\tif (rs != null) \r\n\t\t\t{\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\tif (stmt != null) \r\n\t\t\t{\r\n\t\t\t\tstmt.close();\r\n\t\t\t}\r\n\t\t\tif (conn != null) \r\n\t\t\t{\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n\t\treturn ID;\r\n\t}",
"@Component\npublic interface SysUserRoleMapper extends Mapper<SysUserRole> {\n @Select(\"select r.* from sys_role r, sys_user u, sys_user_role u_r where r.id = u_r.ROLE_ID and u_r.USER_ID = u.ID and u_r.IS_DELETE = 0 and u.ID = #{userId}\")\n List<SysRole> findSysRolesByUserId(String userId);\n\n @Select(\"select ROLE_ID from sys_user_role where IS_DELETE=0 and user_id=#{userID}\")\n List<String> findRolesByUserId(String userId);\n\n @Select(\"select r.`NAME` from sys_role r, sys_user u, sys_user_role u_r WHERE u.ID = u_r.USER_ID AND r.ID = u_r.ROLE_ID AND u_r.IS_DELETE=0 AND u.LOGIN_NAME = #{username}\")\n List<String> getSysRolesByUsername(String username);\n\n @Delete(\"update sys_user_role set IS_DELETE=1 where user_id=#{userId}\")\n void deleteByUserId(String userId);\n}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"@Override\n public String getTypeForDisplay() {\n return \"User\";\n }",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}",
"public ResultSet Appuser(Long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from customer where user_id=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"public ResultSet SelectUser(long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select l.loginid,l.username,l.password,c.firstname,c.lastname,c.city,c.e_mail,c.phno,c.dob,c.doReg,c.pincode,c.address,cd.pancard_no,cd.bank_name,cd.branch_name,cd.bank_acc_no,cd.demat_acc_no from login l,customer c,customer_details cd\" +\r\n\t\t\t\"where l.loginid=c.loginid and c.user_id=cd.user_id and l.loginid=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"@Update({\n \"update tb_user\",\n \"set password = #{password,jdbcType=VARCHAR}\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int updateByPrimaryKey(User record);",
"public static void createMysqlUser(Eleve e) {\n Session session = HibernateUtils.getSessionFactory().openSession();\r\n String SQLRequest = \"CREATE USER '\" + e.getAbreviation() + \"'@'%' IDENTIFIED BY '\" + e.getPwd() + \"'; \";\r\n System.out.println(SQLRequest);\r\n session.beginTransaction();\r\n session.createSQLQuery(SQLRequest).executeUpdate();\r\n session.getTransaction().commit();\r\n session.close();\r\n\r\n }",
"public List<User> displayUsers() {\n\t\t\r\n\t\ttry {\r\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from com.niit.model.User\").list();\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getSystemUser()\n\t{\n\t\treturn \"postgres\";\n\t}",
"protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}",
"@Override\n\tpublic List<SysUser> getAllByPage(PageBean<SysUser> pageBean) throws Exception {\n\t\treturn null;\n\t}",
"@Insert({\n \"insert into tb_user (username, password)\",\n \"values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR})\"\n })\n int insert(User record);",
"@Override\r\n\tpublic User queryUserByUsername(String userName,String psswd) {\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"userService\");\r\n\t\t\r\n\t\treturn userMapper.selectUserByUserName(userName,psswd);\r\n\t}",
"public int addUser(HttpServletRequest request) {\n\t\tHashMap<String, Object> parameters = buildUserInsertCondition(request);\n\n\t\tSimpleJdbcInsert insert = new SimpleJdbcInsert(jt).withTableName(\"sys_user\").usingGeneratedKeyColumns(\"userId\");\n\n\t\tNumber id = insert.executeAndReturnKey(parameters);\n\n\t\tint pk = id.intValue();\n\n\t\treturn pk;\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"@Override\n\tpublic void GetServerUser() {\n\n\t}",
"@Override\r\n public UserModel queryUserModel(String userName) {\n System.out.println(\"query sys user build user model.\");\r\n return new UserModel(\"111\", \"sys\", \"123456\");\r\n }",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"public List<User> user_list() throws HibernateException \r\n\t{ \r\n\t\tList <User> Lista_usuarios = null; \r\n\t \r\n\t try \r\n\t { \r\n\t iniciaOperacion(); //IMPORTANTE la query: se pide la clase realmnete Cliente! no la tabla que se ha creado\r\n\t Lista_usuarios= sesion.createQuery(\"FROM User\").list(); //creamos consulta de la tabla clientes (en plural)!\r\n\t }finally \r\n\t { \r\n\t sesion.close(); \r\n\t } \r\n\t return Lista_usuarios; \r\n\t}",
"@Override\n\tpublic List<KeyValuePair> getUserNameList(boolean active) {\n\t\tif (active) { // only active cabs\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user WHERE user.ACTIVE ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t} else {\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t}\n\t}",
"@Override\n\tpublic SysUser getById(SysUser b) throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"List<User> getAll() throws SQLException;",
"@Update({\n \"update user_t\",\n \"set user_name = #{userName,jdbcType=VARCHAR},\",\n \"password = #{password,jdbcType=VARCHAR},\",\n \"age = #{age,jdbcType=INTEGER},\",\n \"ver = #{ver,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(User record);",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Trans(Long userid) throws Exception{\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name,cd.DEMAT_ACC_NO from customer c,CUSTOMER_DETAILS cd,login l where l.login_id=c.login_id and c.user_id=cd.user_id and l.login_id=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"Assist_table selectByPrimaryKey(Integer user);"
] | [
"0.6774368",
"0.6546757",
"0.6232606",
"0.6198149",
"0.6080078",
"0.6032495",
"0.6009085",
"0.6007126",
"0.6003564",
"0.59547377",
"0.59334403",
"0.5869383",
"0.586615",
"0.5846932",
"0.58029634",
"0.5796425",
"0.5786658",
"0.5772355",
"0.5770656",
"0.57704866",
"0.57587886",
"0.57412523",
"0.57294273",
"0.57260966",
"0.5723733",
"0.5713734",
"0.5704656",
"0.57014495",
"0.56940216",
"0.5680011",
"0.567695",
"0.56701463",
"0.56669253",
"0.56545895",
"0.5651114",
"0.56481594",
"0.56380683",
"0.5635796",
"0.56326336",
"0.5632137",
"0.56178015",
"0.56080323",
"0.5605957",
"0.5602399",
"0.5601927",
"0.5586325",
"0.5585328",
"0.55750555",
"0.55691665",
"0.5554917",
"0.55504185",
"0.5539173",
"0.55205107",
"0.5514391",
"0.5502798",
"0.5497261",
"0.5489051",
"0.5479486",
"0.54556143",
"0.54534835",
"0.54513806",
"0.5448546",
"0.5447766",
"0.54443175",
"0.54368913",
"0.54358196",
"0.54338306",
"0.5427804",
"0.54258364",
"0.54156053",
"0.5414516",
"0.5409143",
"0.54041684",
"0.54031366",
"0.53977966",
"0.53906184",
"0.539019",
"0.5388856",
"0.5383959",
"0.53824687",
"0.53780377",
"0.5377415",
"0.53701264",
"0.53692573",
"0.5364413",
"0.5364142",
"0.536212",
"0.5360647",
"0.53576076",
"0.53468394",
"0.53459394",
"0.53349805",
"0.53341633",
"0.533088",
"0.5321293",
"0.5319919",
"0.5316052",
"0.5308836",
"0.53054523",
"0.5299423",
"0.52958274"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table t_sys_user | int updateByPrimaryKey(DrpCommissionRule record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Override\n public void intsertUser(SysUser user) {\n System.out.println(\"user插入到mysql数据库中(oracle数据库):\"+user);\n }",
"public interface sysUserService {\n @DataSource(\"master\")\n sysUser selectByid(String id);\n PageInfo selectUserList(String username, String name, String status, String org_id,\n String is_admin, String orderFiled, String orderSort, int pageindex, int pagenum);\n int addUser(sysUser sysuser);\n int modifyUser(sysUser sysuser);\n int deleteUser(String id);\n int changeUserStatus(String id,String status);\n}",
"List<SysUser> selectAll();",
"SysUser selectByPrimaryKey(Long userId);",
"public List<Systemuser> getUserList() throws Exception {\n\r\n List<Systemuser> userRoleList = new ArrayList<Systemuser>();\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Systemuser u order by Upper(u.username) asc\";\r\n Query query = session.createQuery(sql);\r\n userRoleList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return userRoleList;\r\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"SysRoleUser selectByPrimaryKey(Long id);",
"public String getJdbcUser()\n {\n return getStringValue(DataSourceDobj.FLD_JDBC_USER);\n }",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"public List getSysUserTypes(SysUserType sysUserType);",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}",
"@Override\n public java.lang.String getUserUuid()\n throws com.liferay.portal.kernel.exception.SystemException {\n return _usersCatastropheOrgs.getUserUuid();\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getDatabaseUser();",
"@Override\n\tpublic List<SysUser> getAll() throws Exception {\n\t\treturn null;\n\t}",
"public SystemUser findByUserName(String userName);",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}",
"public void setJdbcUser(String val)\n {\n setValue(DataSourceDobj.FLD_JDBC_USER, val);\n }",
"public interface SysUserService extends Service<SysUser> {\n void sysUserAdd(SysUser sysUser,String userId) throws Exception;\n void sysUserUpdate(SysUser sysUser,String userId);\n String checkSysUsername(String sysUsername);\n\n /**\n * 通过 username 查询 a_sys_user 表中是否含有 username , 若无对应的 username ,则给出相应的提示。 2018/05/19 11:07 rk\n * @param username\n * @return\n */\n String checkUsername(String username);\n\n /**\n * 实现登录功能\n * @param username\n * @param password\n * @return\n */\n SysUser sysUserLogin(String username, String password);\n\n /**\n * 根据username查询role_id 在a_user_role表中查询\n * @param username\n * @return\n */\n // String queryRoleId(String username);\n List<String> queryRoleId(String username);\n\n /**\n * 通过 username 删除用户数据\n * @param username\n */\n void deleteUserByUsername(String username);\n\n /**\n * 模糊匹配,查询 a_sys_user \n * @param username\n * @param name\n * @param user_type\n * @param org_code\n * @param is_ok\n * @return\n */\n List<SysUser> selectByFiveParameter(String username, String name, String user_type, String org_code, String is_ok);\n\n}",
"@Override\n\tpublic User viewUser(String nm) {\n\t\treturn userdao.viewUser(nm);\n\t}",
"public ResultSet Retuser() throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from login where usertype='user'\");\r\n\treturn rs;\r\n\t\r\n}",
"@Override\n\tpublic IUser creatUser() {\n\t\treturn new SqlServerUser();\n\t}",
"SystemRoleUserMapperMo selectByPrimaryKey(Integer id);",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"public UsuarioTable getUsuarioLogueado() {\n String usuario = FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();\n return getUsuarioFacade().obtenerIDPorNombre(usuario);\n }",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"public SysUserType getSysUserType(final Long id);",
"@PermitAll\n @Override\n public User getCurrentUser() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntity(User.class, params);\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\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 list;\n\t\t\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"@Override\r\n public User getUser() throws RemoteException, SQLException {\r\n return user;\r\n }",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"@Override\n\tpublic List<User> getUserList(String userType) {\n\t\tStringBuilder sb = new StringBuilder(\n\t\t\t\t\"SELECT e.`FAILED_ATTEMPTS`, e.`EXPIRES_ON`, e.`LAST_LOGIN_DATE`, e.`NAME`, e.`USERNAME`, e.`ACTIVE`, e.`OUTSIDE_ACCESS`, e.USER_ID, er.ROLE_ID, r.ROLE_NAME FROM user e LEFT JOIN user_role er ON e.USER_ID=er.USER_ID LEFT JOIN role r ON er.ROLE_ID=r.ROLE_ID WHERE 1 \");\n\t\tMap<String, Object> params = new HashMap<>();\n\t\tif (userType.equals(\"1\")) { // only active users\n\t\t\tsb.append(\" AND e.`ACTIVE`\");\n\t\t} else if (userType.equals(\"-1\")) { // only deactive users\n\t\t\tsb.append(\" AND e.`ACTIVE`=false\");\n\t\t}\n\n\t\treturn this.namedParameterJdbcTemplate.query(sb.toString(), params, new UserRowMapper());\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"public List<TbccUser> getSysAdmin() {\n\t\treturn userdao.getSysAdmin();\n\t}",
"@Override\n\tpublic List<SimpleUser> getAllSimpleUser() {\n\t\treturn dao.getAllSimpleUser();\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"public Long saveSysUserType(SysUserType sysUserType);",
"public interface SysUserService {\n\n /**\n * 新增用户\n * @param SysUser\n * @return\n */\n SysUser addSysUser(SysUser SysUser);\n\n /**\n * 根据用户名查询用户\n * @param username\n * @return\n */\n SysUser findUserByUserName(String username);\n\n /**\n * 根据用户姓名查询用户\n * @param name\n * @return\n */\n SysUser findUserByName(String name);\n\n /**\n * 根据id获取用户\n * @param userId\n * @return\n */\n SysUser findUserByUserId(Integer userId);\n\n /**\n * 根据id删除用户\n * @param userId\n */\n void delete(Integer userId);\n\n /**\n * 分页查询用户\n * @param userName 用户名\n * @param page\n * @param rows\n * @return\n */\n List<SysUser> getUsers(String userName, Integer page, Integer rows);\n\n /**\n * 根据用户名查询数量\n * @param userName\n * @return\n */\n Integer getUsersCount(String userName);\n\n /**\n * 根据用户id查询用户\n * @param userId\n * @return\n */\n SysUser getUserById(Integer userId);\n\n /**\n * 更新用户信息\n * @param user\n */\n void update(SysUser user);\n\n /**\n * 修改登录密码\n * @param userId\n * @param newPassword\n */\n void modifyPassword(int userId, String newPassword);\n\n /**\n * 根据用户id获取用户密码\n * @param userId\n * @return\n */\n String getPassword(int userId);\n}",
"@Override\r\n\tpublic Integer registerUser(User user) throws SQLException, ClassNotFoundException, IOException \r\n\t{\r\n\t\t//Declare all variables\r\n\t\t//Create Connection, PreparedStatement, and ResultSet Objects and\r\n\t\t//initialize to null. Create an OracleConnection Object with Java default Constructor.\r\n\t\tConnection conn = null;\t\t\t\r\n\t\tPreparedStatement stmt = null;\t\r\n\t\tResultSet rs = null;\t\t\t\r\n\t\tOracleConnection orcl= new OracleConnection();\t\r\n\t\t\r\n\t\t// Assign query statement (SQL) to String variable\r\n\t\tString insertString = \"insert into users (user_name, password, admin_role) values (?,?,?)\";\r\n\t\t\r\n\t\t//Assign column id value to String array for auto generated keys\r\n\t\tString[] COL = {\"user_id\"};\r\n\t\tint ID = -1;\r\n\t \r\n\t\t//Assign value to Connection Object using getConnection\r\n\t\t//method from OracleConnection Class.\r\n\t conn = orcl.getConnection(); \r\n\t\tSystem.out.println(\"DATABASE CONNECTION ESTABLISHED\");\r\n\t \r\n\t try\r\n\t\t{\r\n\t \t//Initialize Statement Object with passing of query and column id \r\n\t \t//Initialize Statement Object with column index and value to be inserted into the column\r\n\t stmt = conn.prepareStatement(insertString, COL);\r\n\t \r\n\t stmt.setString(1, user.getUserName());\r\n\t stmt.setString(2, user.getPassword());\r\n\t stmt.setString(3, user.getAdminRole());\r\n\t \r\n\t //Execute query\r\n\t stmt.executeUpdate();\r\n\t \r\n\t //Assign returned values to ResultSet Object.\r\n\t rs = stmt.getGeneratedKeys();\r\n\t if(rs != null && rs.next()) \r\n\t {\r\n\t ID = rs.getInt(1);\r\n\t user.setUserId(ID);\r\n\t System.out.println(\"The user has been registered as USER ID#: \"+ID);\r\n\t }\r\n\t }\r\n\t catch (SQLException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t//Close all database access Objects\r\n\t\t\tif (rs != null) \r\n\t\t\t{\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\tif (stmt != null) \r\n\t\t\t{\r\n\t\t\t\tstmt.close();\r\n\t\t\t}\r\n\t\t\tif (conn != null) \r\n\t\t\t{\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n\t\treturn ID;\r\n\t}",
"@Component\npublic interface SysUserRoleMapper extends Mapper<SysUserRole> {\n @Select(\"select r.* from sys_role r, sys_user u, sys_user_role u_r where r.id = u_r.ROLE_ID and u_r.USER_ID = u.ID and u_r.IS_DELETE = 0 and u.ID = #{userId}\")\n List<SysRole> findSysRolesByUserId(String userId);\n\n @Select(\"select ROLE_ID from sys_user_role where IS_DELETE=0 and user_id=#{userID}\")\n List<String> findRolesByUserId(String userId);\n\n @Select(\"select r.`NAME` from sys_role r, sys_user u, sys_user_role u_r WHERE u.ID = u_r.USER_ID AND r.ID = u_r.ROLE_ID AND u_r.IS_DELETE=0 AND u.LOGIN_NAME = #{username}\")\n List<String> getSysRolesByUsername(String username);\n\n @Delete(\"update sys_user_role set IS_DELETE=1 where user_id=#{userId}\")\n void deleteByUserId(String userId);\n}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"@Override\n public String getTypeForDisplay() {\n return \"User\";\n }",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}",
"public ResultSet Appuser(Long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from customer where user_id=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"public ResultSet SelectUser(long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select l.loginid,l.username,l.password,c.firstname,c.lastname,c.city,c.e_mail,c.phno,c.dob,c.doReg,c.pincode,c.address,cd.pancard_no,cd.bank_name,cd.branch_name,cd.bank_acc_no,cd.demat_acc_no from login l,customer c,customer_details cd\" +\r\n\t\t\t\"where l.loginid=c.loginid and c.user_id=cd.user_id and l.loginid=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"@Update({\n \"update tb_user\",\n \"set password = #{password,jdbcType=VARCHAR}\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int updateByPrimaryKey(User record);",
"public static void createMysqlUser(Eleve e) {\n Session session = HibernateUtils.getSessionFactory().openSession();\r\n String SQLRequest = \"CREATE USER '\" + e.getAbreviation() + \"'@'%' IDENTIFIED BY '\" + e.getPwd() + \"'; \";\r\n System.out.println(SQLRequest);\r\n session.beginTransaction();\r\n session.createSQLQuery(SQLRequest).executeUpdate();\r\n session.getTransaction().commit();\r\n session.close();\r\n\r\n }",
"public List<User> displayUsers() {\n\t\t\r\n\t\ttry {\r\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from com.niit.model.User\").list();\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getSystemUser()\n\t{\n\t\treturn \"postgres\";\n\t}",
"protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}",
"@Insert({\n \"insert into tb_user (username, password)\",\n \"values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR})\"\n })\n int insert(User record);",
"@Override\n\tpublic List<SysUser> getAllByPage(PageBean<SysUser> pageBean) throws Exception {\n\t\treturn null;\n\t}",
"public int addUser(HttpServletRequest request) {\n\t\tHashMap<String, Object> parameters = buildUserInsertCondition(request);\n\n\t\tSimpleJdbcInsert insert = new SimpleJdbcInsert(jt).withTableName(\"sys_user\").usingGeneratedKeyColumns(\"userId\");\n\n\t\tNumber id = insert.executeAndReturnKey(parameters);\n\n\t\tint pk = id.intValue();\n\n\t\treturn pk;\n\t}",
"@Override\r\n\tpublic User queryUserByUsername(String userName,String psswd) {\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"userService\");\r\n\t\t\r\n\t\treturn userMapper.selectUserByUserName(userName,psswd);\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\n\tpublic void GetServerUser() {\n\n\t}",
"@Override\r\n public UserModel queryUserModel(String userName) {\n System.out.println(\"query sys user build user model.\");\r\n return new UserModel(\"111\", \"sys\", \"123456\");\r\n }",
"public List<User> user_list() throws HibernateException \r\n\t{ \r\n\t\tList <User> Lista_usuarios = null; \r\n\t \r\n\t try \r\n\t { \r\n\t iniciaOperacion(); //IMPORTANTE la query: se pide la clase realmnete Cliente! no la tabla que se ha creado\r\n\t Lista_usuarios= sesion.createQuery(\"FROM User\").list(); //creamos consulta de la tabla clientes (en plural)!\r\n\t }finally \r\n\t { \r\n\t sesion.close(); \r\n\t } \r\n\t return Lista_usuarios; \r\n\t}",
"@Override\n\tpublic List<KeyValuePair> getUserNameList(boolean active) {\n\t\tif (active) { // only active cabs\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user WHERE user.ACTIVE ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t} else {\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t}\n\t}",
"@Override\n\tpublic SysUser getById(SysUser b) throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"List<User> getAll() throws SQLException;",
"@Update({\n \"update user_t\",\n \"set user_name = #{userName,jdbcType=VARCHAR},\",\n \"password = #{password,jdbcType=VARCHAR},\",\n \"age = #{age,jdbcType=INTEGER},\",\n \"ver = #{ver,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(User record);",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Trans(Long userid) throws Exception{\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name,cd.DEMAT_ACC_NO from customer c,CUSTOMER_DETAILS cd,login l where l.login_id=c.login_id and c.user_id=cd.user_id and l.login_id=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"public interface IApplicationUserSecurity {\n\n\n\n /**\n * Return the value associated with the column: dateCreated.\n\t * @return A Date object (this.dateCreated)\n\t */\n\tDate getDateCreated();\n\t\n\n \n /** \n * Set the value related to the column: dateCreated.\n\t * @param dateCreated the dateCreated value you wish to set\n\t */\n\tvoid setDateCreated(final Date dateCreated);\n\n /**\n * Return the value associated with the column: dateDisabled.\n\t * @return A Date object (this.dateDisabled)\n\t */\n\tDate getDateDisabled();\n\t\n\n \n /** \n * Set the value related to the column: dateDisabled.\n\t * @param dateDisabled the dateDisabled value you wish to set\n\t */\n\tvoid setDateDisabled(final Date dateDisabled);\n\n /**\n * Return the value associated with the column: dateUpdated.\n\t * @return A Date object (this.dateUpdated)\n\t */\n\tDate getDateUpdated();\n\t\n\n \n /** \n * Set the value related to the column: dateUpdated.\n\t * @param dateUpdated the dateUpdated value you wish to set\n\t */\n\tvoid setDateUpdated(final Date dateUpdated);\n\n /**\n * Return the value associated with the column: id.\n\t * @return A Long object (this.id)\n\t */\n\tLong getId();\n\t\n\n \n /** \n * Set the value related to the column: id.\n\t * @param id the id value you wish to set\n\t */\n\tvoid setId(final Long id);\n\n /**\n * Return the value associated with the column: role.\n\t * @return A SecurityRole object (this.role)\n\t */\n\tSecurityRole getRole();\n\t\n\n \n /** \n * Set the value related to the column: role.\n\t * @param role the role value you wish to set\n\t */\n\tvoid setRole(final SecurityRole role);\n\n /**\n * Return the value associated with the column: user.\n\t * @return A ApplicationUser object (this.user)\n\t */\n\tApplicationUser getUser();\n\t\n\n \n /** \n * Set the value related to the column: user.\n\t * @param user the user value you wish to set\n\t */\n\tvoid setUser(final ApplicationUser user);\n\n /**\n * Return the value associated with the column: userCreated.\n\t * @return A Long object (this.userCreated)\n\t */\n\tLong getUserCreated();\n\t\n\n \n /** \n * Set the value related to the column: userCreated.\n\t * @param userCreated the userCreated value you wish to set\n\t */\n\tvoid setUserCreated(final Long userCreated);\n\n /**\n * Return the value associated with the column: userUpdated.\n\t * @return A Long object (this.userUpdated)\n\t */\n\tLong getUserUpdated();\n\t\n\n \n /** \n * Set the value related to the column: userUpdated.\n\t * @param userUpdated the userUpdated value you wish to set\n\t */\n\tvoid setUserUpdated(final Long userUpdated);\n\n\t// end of interface\n}"
] | [
"0.6771733",
"0.65462595",
"0.62328744",
"0.6196613",
"0.60776955",
"0.6031062",
"0.6008189",
"0.6005118",
"0.6002843",
"0.5952266",
"0.5931212",
"0.5869234",
"0.58649075",
"0.58434963",
"0.579993",
"0.57949454",
"0.57858",
"0.5769281",
"0.57692075",
"0.57684946",
"0.57556194",
"0.5738935",
"0.57270706",
"0.57237065",
"0.5720913",
"0.5711317",
"0.5701847",
"0.5697634",
"0.56928754",
"0.56777996",
"0.56763977",
"0.5667951",
"0.5664326",
"0.56513447",
"0.5650252",
"0.5645967",
"0.5636749",
"0.56355506",
"0.562985",
"0.56282824",
"0.5616262",
"0.56063306",
"0.56050384",
"0.56001854",
"0.5599466",
"0.5587153",
"0.5584146",
"0.55746436",
"0.5566859",
"0.5552046",
"0.55478215",
"0.5537006",
"0.55172485",
"0.5512824",
"0.5500639",
"0.5495686",
"0.54905075",
"0.5476832",
"0.54543275",
"0.54510695",
"0.5448661",
"0.54480594",
"0.5446852",
"0.5442552",
"0.5437968",
"0.54334056",
"0.5430492",
"0.54244053",
"0.54228836",
"0.54134125",
"0.5411123",
"0.54090226",
"0.54033357",
"0.5400385",
"0.5394977",
"0.539045",
"0.53892344",
"0.53850263",
"0.5382836",
"0.5379031",
"0.53766674",
"0.5375851",
"0.53687537",
"0.53685707",
"0.53615206",
"0.5361343",
"0.53610486",
"0.535977",
"0.5354418",
"0.5345022",
"0.5343895",
"0.5332783",
"0.53321344",
"0.5327899",
"0.5320022",
"0.53196675",
"0.5314622",
"0.5305529",
"0.53039485",
"0.5296667",
"0.5294807"
] | 0.0 | -1 |
Find all existing project(s). Support for paging and sorting. | SearchResultVO<Project> findAll(int nextPage, int num, String sortColName, String sortDirection); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Project> getAllProjects();",
"@Override\n\tpublic List<ProjectInfo> findAllProject() {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findAllProject\");\n\t}",
"public List<Project> findAllProject() {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t\tString query = \"SELECT * FROM TA_PROJECTS\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t\tprojectList.add(project);\r\n\t\t}\r\n\t\treturn projectList;\r\n\t}",
"public List<Project> findAllProject() {\n\treturn projectmapper.findProject(null);\n}",
"List<Project> selectAll();",
"@Override\r\n\tpublic List<Project> findProject() {\n\t\treturn iSearchSaleRecordDao.findProject();\r\n\t}",
"@GetMapping(\"/getAll\")\r\n\tpublic List<Project> getAllProjects() {\r\n\t\treturn persistenceService.getAllProjects();\r\n\t}",
"public Project[] findAll() throws ProjectDaoException {\n\t\treturn findByDynamicSelect(SQL_SELECT + \" ORDER BY ID\", null);\n\t}",
"void getAllProjectList(int id);",
"public List<ProjectType> invokeQueryProjects() throws TsResponseException {\n checkSignedIn();\n\n final List<ProjectType> projects = new ArrayList<>();\n\n int currentPage = 1; // Tableau starts counting at 1\n BigInteger totalReturned = BigInteger.ZERO;\n BigInteger totalAvailable;\n\n // Loop over pages\n do {\n // Query the projects page\n final String url = getUriBuilder().path(QUERY_PROJECTS) //\n .queryParam(\"pageNumber\", currentPage) //\n .queryParam(\"pageSize\", PROJECTS_PAGE_SIZE) //\n .build(m_siteId).toString();\n final TsResponse response = get(url);\n\n // Get the projects from the response\n projects.addAll(response.getProjects().getProject());\n\n // Next page\n currentPage++;\n // NOTE: total available is the number of datasources available\n totalAvailable = response.getPagination().getTotalAvailable();\n totalReturned = totalReturned.add(response.getPagination().getPageSize());\n } while (totalReturned.compareTo(totalAvailable) < 0);\n\n return projects;\n }",
"public List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> searchProjects(\n Map<String, String> filters, List<String> accessibleIds, int limit, int offset, Object orderByIdentifier,\n ResultOrderType resultOrderType) throws RegistryException {\n\n List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> result = new ArrayList<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource>();\n EntityManager em = null;\n try {\n String query = \"SELECT DISTINCT p from Project p WHERE \";\n\n // FIXME There is a performance bottleneck for using IN clause. Try using temporary tables ?\n if(accessibleIds != null){\n query += \" p.projectId IN (\";\n for(String id : accessibleIds)\n query += (\"'\" + id + \"'\" + \",\");\n query = query.substring(0, query.length()-1) + \") AND \";\n }\n\n if (filters != null && filters.size() != 0) {\n for (String field : filters.keySet()) {\n String filterVal = filters.get(field);\n if (field.equals(ProjectConstants.USERNAME)) {\n query += \"p.\" + field + \"= '\" + filterVal + \"' AND \";\n } else if (field.equals(ProjectConstants.GATEWAY_ID)) {\n query += \"p.\" + field + \"= '\" + filterVal + \"' AND \";\n } else {\n if (filterVal.contains(\"*\")) {\n filterVal = filterVal.replaceAll(\"\\\\*\", \"\");\n }\n query += \"p.\" + field + \" LIKE '%\" + filterVal + \"%' AND \";\n }\n }\n }\n query = query.substring(0, query.length() - 5);\n\n //ordering\n if (orderByIdentifier != null && resultOrderType != null\n && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {\n String order = (resultOrderType == ResultOrderType.ASC) ? \"ASC\" : \"DESC\";\n query += \" ORDER BY p.\" + ProjectConstants.CREATION_TIME + \" \" + order;\n }\n\n em = ExpCatResourceUtils.getEntityManager();\n em.getTransaction().begin();\n Query q;\n\n //pagination\n if (offset >= 0 && limit >= 0) {\n q = em.createQuery(query).setFirstResult(offset).setMaxResults(limit);\n } else {\n q = em.createQuery(query);\n }\n\n List resultList = q.getResultList();\n for (Object o : resultList) {\n Project project = (Project) o;\n org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource projectResource =\n (ProjectResource) Utils.getResource(ResourceType.PROJECT, project);\n result.add(projectResource);\n }\n em.getTransaction().commit();\n em.close();\n } catch (Exception e) {\n logger.error(e.getMessage(), e);\n throw new RegistryException(e);\n } finally {\n if (em != null && em.isOpen()) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n }\n }\n return result;\n }",
"@Override\n\tpublic List<ProjectInfo> findProject(ProjectInfo project) {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findProject\",project);\n\t}",
"@ApiMethod(\n name = \"getProjects\",\n path = \"getProjects\",\n httpMethod = HttpMethod.POST\n )\n public List<Project> getProjects(){\n \tQuery<Project> query = ofy().load().type(Project.class);\n \treturn query.list();\n }",
"@GetMapping(value = \"/projects\", produces = \"application/json\")\n public ResponseEntity<?> listAllProjects()\n {\n List<Project> projectList = projectService.findAllProjects();\n\n return new ResponseEntity<>(projectList, HttpStatus.OK);\n }",
"Page<ProjectsDTO> findAll(Pageable pageable);",
"List<ProjectDTO> findLimitProjects(int pageNumber);",
"List<Project> findProjectsOfAccount(String username);",
"public List<Project> getAllProject(boolean isDeleted) throws EmployeeManagementException;",
"@Override\n public List<ProjectproductDTO> findAll() {\n log.debug(\"Request to get all Projectproducts\");\n List<ProjectproductDTO> result = projectproductRepository.findAll().stream()\n .map(projectproductMapper::projectproductToProjectproductDTO)\n .collect(Collectors.toCollection(LinkedList::new));\n\n return result;\n }",
"@Override\r\n\tpublic List<Project> selectProjectList(String id,int cPage,int numPerpage) {\n\t\treturn dao.selectProjectList(session,id,cPage,numPerpage);\r\n\t}",
"@GetMapping(\"\")\n\t@CrossOrigin(origins = \"http://localhost:3000\")\n\tpublic List<Project> getProjects()\n\t{\n\t\treturn projectService.findAll();\n\t}",
"public void querySubProjects() {\r\n\t\t// Create a task\r\n\t\tProject master = new Project();\r\n\t\tmaster.setName(\"INFRASTRUCTURE\");\r\n\t\tmaster.setDisplayName(\"Infrastructure\");\r\n\t\tmaster.setDescription(\"Project to setup the new infrastructure\");\r\n\t\tmaster = (Project) aggregateService.create(master, new Settings());\t\r\n\r\n\t\t// Create 2 dependents\r\n\t\tProject A = new Project();\r\n\t\tA.setName(\"SETUP_NETWORK\");\r\n\t\tA.setDisplayName(\"Setup network\");\r\n\t\tA.setDescription(\"Project to lay the network cables and connect to routers\");\r\n\t\tA = (Project) aggregateService.create(A, new Settings());\r\n\r\n\t\tProject B = new Project();\r\n\t\tB.setName(\"SETUP_TELEPHONE\");\r\n\t\tB.setDisplayName(\"Setup telephone\");\r\n\t\tB.setDescription(\"Setup the telephone at each employee desk\");\r\n\t\tB = (Project) aggregateService.create(B, new Settings());\r\n\r\n\t\tMap<String, Project> subProjects = new HashMap<String, Project>();\r\n\t\tsubProjects.put(A.getName(), A);\r\n\t\tsubProjects.put(B.getName(), B);\r\n\t\tmaster.setSubProjects(subProjects);\r\n\t\tmaster = (Project) aggregateService.read(master, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setView(aggregateService.getView(\"SUBPROJECTS\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(master, settings);\r\n\r\n\t\tassert(toList.size() == 1);\t\t\r\n\r\n\t\tObject obj = toList.get(0);\r\n\t\tassert(Project.class.isAssignableFrom(obj.getClass()));\r\n\r\n\t\tProject root = (Project) obj;\r\n\t\tassert(root.getSubProjects() != null && root.getSubProjects().size() == 2);\r\n\t\tassert(root.getSubProjects().get(\"SETUP_NETWORK\").getName().equals(\"SETUP_NETWORK\"));\r\n\t\tassert(root.getSubProjects().get(\"SETUP_TELEPHONE\").getName().equals(\"SETUP_TELEPHONE\"));\t\t\r\n\t}",
"private void loadProjects() {\n\t\tprojectsList.clear();\n\t\t\n\t\tArrayList<Job> projects = jdbc.getProjects();\n\t\tfor (Job j : projects) {\n\t\t\tprojectsList.addElement(j.jobname);\n\t\t}\n\t}",
"public List<Project> findByPage(Map<String, Object> map) {\n\tString key=map.get(\"currpage\").toString()+map.get(\"rows\").toString()+\"prlist\";\n\tList<Object> olist=redistemplateutil.lGet(key, 0, -1);\n\tList<Project> list=new ArrayList<Project>();\n\tif(null!=olist &&olist.size()>0) {\n\t\tlist=(List<Project>) olist.get(0);\n\t\treturn list;\n\t}else{\n\t\n\tList<Project> ulist= projectmapper.findByPage(map);\n\tredistemplateutil.lSet(key, ulist,3);\n\treturn ulist;\n\t}\n}",
"public abstract List<ProjectBean> getProjectList();",
"@GetMapping(\"/projects\")\n @Timed\n public ResponseEntity<?> getAllProjects(\n @PageableDefault(size = Integer.MAX_VALUE) Pageable pageable,\n @RequestParam(name = \"minimized\", required = false, defaultValue = \"false\") Boolean\n minimized) throws NotAuthorizedException {\n log.debug(\"REST request to get Projects\");\n checkPermission(token, PROJECT_READ);\n Page<?> page = projectService.findAll(minimized, pageable);\n HttpHeaders headers = PaginationUtil\n .generatePaginationHttpHeaders(page, \"/api/projects\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }",
"void getAllProjectList(int id, UserType userType);",
"@Transactional(readOnly = true) \n public Page<TaskProject> findAll(Pageable pageable) {\n log.debug(\"Request to get all TaskProjects\");\n Page<TaskProject> result = taskProjectRepository.findAll(pageable);\n return result;\n }",
"void findWithPagination(Pagination<Task, Project> pagination);",
"@Override\r\n\tpublic List<Project> viewAllProjects(String authToken) throws ManualException{\r\n\t\tfinal\tSession session=sessionFactory.openSession();\r\n\t\tList<Project> projectList =null;\r\n\r\n\t\t/* check for authToken of admin */\r\n\t\tsession.beginTransaction();\r\n\t\ttry{\r\n\t\t\tAuthTable authtable=session.get(AuthTable.class, authToken);\r\n\t\r\n\t\t\tUser user = authtable.getUser();\r\n\t\t\tif(user.getUsertype().equals(\"Admin\")){\r\n\t\t\t\tString hql=\"from project\";\r\n\t\t\t\tQuery q=session.createQuery(hql);\r\n\t\t\t\tprojectList=(List)q.list();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tprojectList=null;\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t\tsession.close();\r\n\t\t\treturn projectList;\r\n\t\t}\r\n\t}",
"private void search() {\n if (dateFind.getValue() == null) {\n dateFind.setValue(LocalDate.now().minusDays(DEFAULT_PERIOD));\n }\n Long days = ChronoUnit.DAYS.between(dateFind.getValue(), LocalDate.now());\n final List<Project> findProject = ServiceFactory.getProjectService().getFindProject(days, comboProject.getValue());\n observableProjects.clear();\n observableProjects.addAll(findProject);\n table.setItems(observableProjects);\n }",
"public List<AbstractProject> getProjectList() {\n\t\tList<AbstractProject> projectList = new ArrayList<AbstractProject>();\n\t\tConnection conn = getConnection();\n\t\tPreparedStatement stmtSelect = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tStringBuilder sbSelect = new StringBuilder(SELECT)\n\t\t\t\t.append(projectIdColumnName).append(COMMA)\n\t\t\t\t.append(projectNameColumnName)\n\t\t\t\t.append(FROM).append(projectTableName);\n\n\t\t\tstmtSelect = conn.prepareStatement(sbSelect.toString());\n\t\t\trs = stmtSelect.executeQuery();\n\t\t\t\n\t\t\twhile (rs.next()) { \n\t\t\t\tAbstractProject project = (AbstractProject) ATElementFactory.createITreeComponent(projectType);\n\t\t\t\tproject.setId(rs.getInt(1));\n\t\t\t\tproject.setName(rs.getString(2));\n\t\t\t\tproject.setDescription(rs.getString(3));\n\t\t\t\tprojectList.add(project);\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DAOException(e);\n\t\t\t\n\t\t} finally {\n\t\t\tDbUtils.closeQuietly(conn);\n\t\t\tDbUtils.closeQuietly(stmtSelect);\n\t\t\tDbUtils.closeQuietly(rs);\n\t\t}\n\t\t\n\t\treturn projectList;\n\t}",
"@RequestMapping(value = \"/project\", method = RequestMethod.GET)\n\tpublic Response getProjects() {\n\t\tResponse response = new Response();\n\t\ttry {\n\t\t\tList<Project> projects = projectService.getAllProjects();\n\t\t\tif (!projects.isEmpty()) {\n\t\t\t\tresponse.setCode(CustomResponse.SUCCESS.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.SUCCESS.getMessage());\n\t\t\t\tresponse.setData(transformProjectToPojectDto(projects));\n\t\t\t} else {\n\t\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\tlogger.error(\"get all project Failed \", e);\n\t\t}\n\t\treturn response;\n\t}",
"@GetMapping(\"/my_projects\")\n public ResponseEntity<List<ProjectDto>> getMyProjects(){\n\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n String currentUserName = authentication.getName();\n User currentUser = userService.findByEmail(currentUserName).orElseThrow(\n () -> {throw new MyNotFoundException(\"User not found\");}\n );\n\n List<String> projects = Arrays.asList(currentUser.getProjects().split(\"#\"));\n\n List<ProjectDto> projectDtos = new ArrayList<>();\n for(String project : projects){\n if (projectService.findByName(project).isPresent()){\n Project temp = projectService.findByName(project).get();\n projectDtos.add(new ProjectDto(temp.getId(), temp.getName(), new CompanyDto(temp.getCompany()), temp.getStart_date(), temp.getStatus()));\n }\n }\n return ResponseEntity.ok(projectDtos);\n }",
"private Collection<EclipseProject> allProjects() {\n Collection<EclipseProject> all = new HashSet<EclipseProject>(selectedProjects);\n all.addAll(requiredProjects);\n return all;\n }",
"public List<GitLabProject> getProjectAlls(Boolean archived, String orderBy, String sort, String search, Boolean ciEnabledFirst) throws IOException {\n return getProjects(\"/all\", archived, orderBy, sort, search, ciEnabledFirst);\n }",
"public List getAvailableProjects (){\n\t\tList retValue = new ArrayList ();\n\t\tthis.setProcessing (true);\n\t\ttry {\n\t\t\tfor (Iterator it = getPersistenceManager().getExtent(Project.class, true).iterator();it.hasNext ();){\n\t\t\t\tretValue.add (it.next());\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.setProcessing (false);\n\t\t}\n\t\treturn retValue;\n\t}",
"public List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> getProjects(int limit, int offset, Object orderByIdentifier,\n ResultOrderType resultOrderType) throws RegistryException {\n List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> result = new ArrayList<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource>();\n List<ExperimentCatResource> list = get(ResourceType.PROJECT, limit, offset, orderByIdentifier, resultOrderType);\n for (ExperimentCatResource resource : list) {\n result.add((org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource) resource);\n }\n return result;\n }",
"Page<ProjectCodeDTO> findAll(Pageable pageable);",
"public ArrayList<Project> selectProject(String projectId) {\n\n try {\n ArrayList<Project> tasks = new ArrayList<Project>();\n\n String query = \"SELECT * FROM TASKS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(query);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n String hours = rs.getString(\"HOURS\");\n String hoursadded = rs.getString(\"HOURS_ADDED\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(description, hours, hoursadded,\n projectId);\n tasks.add(p);\n }\n rs.close();\n ps.close();\n return tasks;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }",
"@GetMapping(\"/byName\")\r\n\tpublic List<Project> getProject(Principal principal) {\r\n\t\treturn persistenceService.getProject(AppBuilderUtil.getLoggedInUserId());\r\n\t}",
"public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);",
"@Test\n\tpublic void getProjects() {\n\t\tList<Project> projects = new ArrayList<Project>();\n\t\tprojects.add(project);\n\t\twhen(repository.findAll()).thenReturn(projects);\n\t\tassertEquals(controller.getAllProjects(), projects);\n\t}",
"public List<String[]> getAllProject() {\n String url = Host.getSonar() + \"api/projects/index\";\n String json = null;\n try {\n Object[] response = HttpUtils.sendGet(url, Authentication.getBasicAuth(\"sonar\"));\n if (Integer.parseInt(response[0].toString()) == 200) {\n json = response[1].toString();\n }\n } catch (Exception e) {\n logger.error(\"Get sonar project list: GET request error.\", e);\n }\n if (json == null) {\n logger.warn(\"Get sonar project list: response empty.\");\n return null;\n }\n List<Map<String, Object>> projects = JSONArray.fromObject(json);\n if (projects.size() == 0) {\n logger.warn(\"Get sonar project list: empty list.\");\n return null;\n }\n List<String[]> result = new ArrayList<>();\n for (Map<String, Object> oneProject : projects) {\n result.add(new String[]{oneProject.get(\"nm\").toString(), oneProject.get(\"k\").toString()});\n }\n return result;\n }",
"public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }",
"@Override\n\tpublic List<Project> getProjectsByUserId(int id) {\n\t\treturn projectDao.getProjectsByUserId(id);\n\t}",
"@Query(\"FROM Project p\")\n\tList<Project> findPopProject();",
"@GetMapping(value = \"/getProjectDetails/ongoing\")\n\tpublic List<Project> getOngoingProjects()\n\t{\n\t\treturn integrationClient.getOngoingProjects();\n\t}",
"@GetMapping(\"/alluser/{i}\")\n\t@ResponseBody\n\tpublic \tList<Project> retrieveAllProjectsIdUser(@PathVariable(\"i\")int i){\n\t\tList<Project> p = (List<Project>) projectservice.retrieveAllProjectsIdUser(i);\n\t\treturn p;\n\t}",
"public List<ProjectEntity> getProjectByName() {\n\t\treturn null;\n\t}",
"@GetMapping(\"/api/getLatest\")\n\tpublic List<Project> findlatestProject()\n\t{\n\t\treturn this.integrationClient.findlatestProject();\n\t}",
"public String queryAllProjectListPaging(Map<String, Object> parameter) {\n return new SQL() {{\n SELECT(\"p.*\");\n SELECT(\"u.user_name as user_name\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition AS def WHERE def.project_id = p.id) AS def_count\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition def, t_escheduler_process_instance inst WHERE def.id = inst.process_definition_id AND def.project_id = p.id AND inst.state=1 ) as inst_running_count\");\n FROM(TABLE_NAME + \" p\");\n JOIN(\"t_escheduler_user u on p.user_id = u.id\");\n\n Object searchVal = parameter.get(\"searchVal\");\n if(searchVal != null && StringUtils.isNotEmpty(searchVal.toString())){\n WHERE( \" p.name like concat('%', #{searchVal}, '%') \");\n }\n WHERE(\" p.flag = 1\");\n ORDER_BY(\"p.create_time desc limit #{offset},#{pageSize} \");\n }}.toString();\n }",
"private void loadProjects() {\n observableProjects.clear();\n dateFind.setValue(null);\n observableProjects.addAll(getProject());\n table.setItems(observableProjects);\n\n ControllersDataFactory.getLink().delete(CalendarController.class);\n }",
"@GetMapping(value=\"/getProjectDetails/completed\")\n\tpublic List<Project> getAllProjectDetails()\n\t{\n\t\treturn integrationClient.getProjectDetiails();\n\t}",
"public List<Project> getSpecifiedProjects(List<Integer> projectIdList) \n \t\tthrows EmployeeManagementException;",
"@Override\n\t\tprotected List<ProjectModel> doInBackground(Void... params) {\n\t\t\tLog.i(\"LOGGER\", \"Starting...doInBackground loadList\");\n\t\t\tList<ProjectModel> projectsList = searchController.searchIntoXML();\n\t\t\treturn projectsList;\n\t\t}",
"@GetMapping(\"/project\")\n public Object doGet(){\n return service.getAllProjects();\n }",
"public List selectAllFromProjeto() throws IOException {\n erro = false;\n List projetos = null;\n try{\n projetos = con.query(\"Select * from projeto\", new BeanPropertyRowMapper(Projeto.class));\n } catch (CannotGetJdbcConnectionException ex){\n logger.gravarDadosLog(\"ERRO\",\"SELECT\" , \"Não foi possivel realizar a consulta dos projetos cadastrados.\" + Arrays.toString(ex.getStackTrace()));\n erro = true;\n }\n if(!erro){\n logger.gravarDadosLog(\"INFO\", \"SELECT\" , \"A busca por projetos cadastrados foi realizada com sucesso.\");\n }\n erro = false;\n return projetos;\n }",
"@Override\n\tpublic void getAllProjects(Model model) {\n\t\tmodel.addAttribute(\"projects\", pm.getAllProjects());\n\t}",
"Project findProjectById(String projectId);",
"public List<GitLabProject> getProjectsSearchByName(String query, Integer perPage, Integer page, String orderBy, String sort) throws IOException {\n String parameters = Query.newQuery().appendIf(\"per_page\", perPage).appendIf(\"page\", page).appendIf(\"orderBy\", orderBy).appendIf(\"sort\", sort).build();\n String tailUrl = String.format(\"/projects/search/%s%s\", gitLabAPI.sanitize(query), parameters);\n return gitLabAPI.retrieve().getAll(tailUrl, GitLabProject[].class);\n }",
"public ArrayList<Project> getProjectName() {\n\t\tArrayList<Project> projectDaoList;\n\t\tprojectDaoList = new ArrayList<Project>();\n\t\tConnection con = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet res = null;\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tcon = DBUtility.getConnection();\n\t\t\t\tString sql = \"select * from project_master\";\n\t\t\t\tst = con.prepareStatement(sql);\n\t\t\t\tres = st.executeQuery(sql);\n\t\t\t\twhile (res.next()) {\n\t\t\t\t\tProject pdao = new Project();\n\t\t\t\t\tpdao.setId(res.getString(\"project_id\"));\n\t\t\t\t\tpdao.setPro_name(res.getString(\"project_name\"));\n\t\t\t\t\tpdao.setSite_addr(res.getString(\"project_location\"));\n\t\t\t\t\tpdao.setC_name(res.getString(\"client_name\"));\n\t\t\t\t\tpdao.setMunicipality(res.getString(\"municipality\"));\n\t\t\t\t\tpdao.setWord_no(res.getString(\"word_no\"));\n\t\t\t\t\tpdao.setGar_name(res.getString(\"gar_name\"));\n\t\t\t\t\tpdao.setGar_rel(res.getString(\"gar_rel\"));\n\t\t\t\t\tprojectDaoList.add(pdao);\n\t\t\t\t}\n\t\t\t} catch (SQLException s) {\n\t\t\t\ts.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t\treturn null;\n\t\t\t} catch (NamingException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t}\n\t\t} finally {\n\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t}\n\t\treturn projectDaoList;\n\t}",
"public List<ProjectIdea> showAll(){\n try {\n List<ProjectIdea> result = new ArrayList<ProjectIdea>();\n CloseableIterator<ProjectIdea> itr = super.closeableIterator();\n try {\n while (itr.hasNext()) {\n ProjectIdea tmp = itr.next();\n result.add(tmp);\n }\n } finally {\n itr.close();\n }\n return result;\n }catch (Exception e){\n System.out.println(e.getMessage());\n return null;\n }\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @RolesAllowed({\"admin\", \"simple\"})\n public List<Task> listAll(@Context UriInfo uriInfo) {\n Long projectId = (uriInfo.getPathSegments().size() != 1?\n Long.valueOf(uriInfo.getPathSegments().get(1).getPath())\n :null);\n\n List<Task> results;\n\n if (projectId != null) {\n results = em.createQuery(\"SELECT t FROM Task t INNER JOIN t.project p WHERE p.id = :projId\", Task.class)\n .setParameter(\"projId\", projectId)\n .getResultList();\n } else {\n results = em.createQuery(\"SELECT t FROM Task t\", Task.class).getResultList();\n }\n\n return results;\n }",
"private void fetchProjects(Folder folder) {\n\n logger.atInfo().log(\"Fetching projects from \" + folder.getDisplayName());\n\n Set<Project> projectSet = new HashSet<Project>();\n ListProjectsPagedResponse projectsResponse = projectsClient.listProjects(folder.getName());\n Iterable<Project> iterableProjects = projectsResponse.iterateAll();\n Iterator<Project> projects = iterableProjects.iterator();\n\n while (projects.hasNext()) {\n Project project = projects.next();\n projectSet.add(project);\n }\n folderProjectMap.put(folder, projectSet);\n }",
"List<ProjectCollectionMember> getMyProjects(String userId,\n int startFrom,\n int pageSize) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;",
"@Operation(description = \"Lists all genome sequencing projects.\")\n @GetMapping(value = \"/projects\", produces = APPLICATION_JSON_VALUE)\n public Page<Project> getAllProjects(ProjectSpec projectSpec, Pageable pageable) {\n return repository.findAll(projectSpec, pageable);\n }",
"@Transactional(readOnly = true)\n public Page<TaskProject> search(String query, Pageable pageable) {\n log.debug(\"Request to search for a page of TaskProjects for query {}\", query);\n Page<TaskProject> result = taskProjectSearchRepository.search(queryStringQuery(query), pageable);\n return result;\n }",
"@Override\r\n\tpublic List<Project> findProject(int provinceId) {\n\t\treturn iImportSalesRecordDao.findProject(provinceId);\r\n\t}",
"public ProjectsList getProjects() {\n return projects.clone();\n }",
"public List<GitLabProject> getProjects(Boolean archived, String orderBy, String sort, String search, Boolean ciEnabledFirst) throws IOException {\n return getProjects(null, archived, orderBy, sort, search, ciEnabledFirst);\n }",
"@GET\n\t@Path(\"allProjectDetailsInPortfolioAndAccount/{portfolioId}/{accountId}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response fetchAllProjectsInPort(@PathParam(\"portfolioId\") Integer portfolioId,@PathParam(\"accountId\") Integer accountId) throws Exception{\n\t\t\n\n\t\tlogger.info(\"Fetching projects for particular portfolio\"+portfolioId+\" and account\"+accountId);\n\n\t\t\n\t\tList<ProjectTO> projectMasterList = new ArrayList<ProjectTO>();\n\t\tObject projectMaster[];\n\t\tProjectTO projectTO = null;\n\t\t\n\n\t\ttry {\n\n\t\t\t\n\t\t\tHashMap<String, Object> queryMap = new HashMap<String, Object>();\n\t\t\tqueryMap.put(\"portfolioId\",portfolioId);\n\t\t\tqueryMap.put(\"accountId\",accountId);\n\t\t\t\n\t\t\tList<Object> projectList = GenericDaoSingleton.getGenericDao()\n\t\t\t\t\t.findByQuery(ConstantQueries.GET_ALLOCATED_PROJECTS_FOR_PORTFOLIO_AND_ACCOUNT, queryMap);\n\n\t\t\n\t\t\t\n\t\t\tif (projectList == null || projectList.size() == 0\n\t\t\t\t\t|| projectList.isEmpty() == true) {\n\t\t\t\tSystem.out.println(\"Projects not found\");\n\t\t\t\tprojectTO = null;\n\t\t\t\tlogger.error(\"Projets not found for particular portfolio and account\");\n\n\t\t\t\treturn Response.status(Response.Status.NOT_FOUND)\n\t\t\t\t\t\t.entity(projectTO).build();\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < projectList.size(); i++) {\n\t\t\t\tprojectTO = new ProjectTO();\n\t\t\t\tprojectMaster = (Object[]) projectList.get(i);\n\t\t\t\tprojectTO.setProject_id(Integer.parseInt(projectMaster[0].toString()));\n\t\t\t\tprojectTO.setProject_name(projectMaster[1].toString());\n\t\t\t\tprojectTO.setProject_status(projectMaster[2].toString());\n\t\t\t\tprojectTO.setProject_creation_date((Date) projectMaster[3]);\n\t\t\t\tprojectTO.setAccount_id(Integer.parseInt(projectMaster[4].toString()));\n\n\t\t\t\tprojectMasterList.add(projectTO);\n\t\t\t}\n\n\t\t\tlogger.error(\"Projects fetched successfully\");\n\n\t\t\treturn Response.status(Response.Status.OK).entity(projectMasterList)\n\t\t\t\t\t.build();\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t\tprojectTO = null;\n\t\t\tlogger.error(\"Error while getting Projects in Project Config service\");\n\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Error while getting Projects in Project Config service\");\n\t\t\treturn Response.status(Response.Status.INTERNAL_SERVER_ERROR)\n\t\t\t\t\t.entity(projectTO).build();\n\t\t}\n\n\t}",
"public static MapList getCurrentUserProjects(Context context, String[] args) throws MatrixException {\n MapList projectList = new MapList();\n try {\n // rp3 : This needs to be tested to make sure the result creates no issue and returns the same set\n projectList = (MapList) JPO.invoke(context, \"emxProjectSpace\", null, \"getAllProjects\", args, MapList.class);\n\n // rp3 : Replace this code with the JPO invoke from the program central API.\n /*\n * com.matrixone.apps.common.Person person = (com.matrixone.apps.common.Person) DomainObject.newInstance(context, DomainConstants.TYPE_PERSON); com.matrixone.apps.program.ProjectSpace\n * project = (com.matrixone.apps.program.ProjectSpace) DomainObject.newInstance(context, DomainConstants.TYPE_PROJECT_SPACE,DomainConstants.PROGRAM);\n * \n * String ctxPersonId = person.getPerson(context).getId(); person.setId(ctxPersonId);\n * \n * //System.out.println(\"the project id is \" + ctxPersonId);\n * \n * StringList busSelects = new StringList(11); busSelects.add(project.SELECT_ID); busSelects.add(project.SELECT_TYPE); busSelects.add(project.SELECT_NAME);\n * busSelects.add(project.SELECT_CURRENT);\n * \n * //projectList = project.getUserProjects(context,person,null,null,null,null); // expand to get project members Pattern typePattern = new Pattern(DomainConstants.TYPE_PROJECT_SPACE);\n * typePattern.addPattern(DomainConstants.TYPE_PROJECT_CONCEPT);\n * \n * projectList = (person.getRelatedObjects( context, // context DomainConstants.RELATIONSHIP_MEMBER, // relationship pattern typePattern.getPattern(), // type filter. busSelects, //\n * business selectables null, // relationship selectables true, // expand to direction false, // expand from direction (short) 1, // level null, // object where clause null)); //\n * relationship where clause\n */\n\n // System.out.println(\"the project list is \" + projectList);\n } catch (Exception ex) {\n throw (new MatrixException(\"emxMsoiPMCUtil:getCurrentUserProjects : \" + ex.toString()));\n }\n return projectList;\n }",
"private static void list_projects(String select, String list_heading) {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(select);\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tSystem.out.println(list_heading);\r\n\t\t\r\n\t\t\twhile (project_rset.next()) {\r\n\t\t\t\tSystem.out.println(\"Project ID: \" + project_rset.getInt(\"project_id\") + \r\n\t\t\t\t\t\t\"\\nProject Name: \" + project_rset.getString(\"project_name\") + \"\\n\");\r\n\t\t\t}\r\n\t\t/**\r\n\t\t * @exception When something cannot be retrieved from the database then an SQLException is thrown\t\r\n\t\t */\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t}",
"private void displayAllProjects() {\n for(Project projects: Project.totalProjects){\n projects.displayProject();\n System.out.println(\"Popularity\\t\\t: \" + projects.getPopularityCounter());\n }\n }",
"public List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> getProjects() throws RegistryException {\n return getProjects(-1, -1, null, null);\n }",
"Project findProjectById(Long projectId);",
"List <ProjectAssignment> findAssignmentsByProject (int projectId);",
"List<Project> getProjectsWithChanges(List<Project> projects);",
"public String queryProjectListPaging(Map<String, Object> parameter) {\n return new SQL() {{\n SELECT(\"p.*\");\n SELECT(\"u.user_name as user_name\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition AS def WHERE def.project_id = p.id) AS def_count\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition def, t_escheduler_process_instance inst WHERE def.id = inst.process_definition_id AND def.project_id = p.id AND inst.state=1 ) as inst_running_count\");\n FROM(TABLE_NAME + \" p\");\n JOIN(\"t_escheduler_user u on u.id=p.user_id\");\n WHERE(\"p.id in \" +\n \"(select project_id from \"+ RELEATION_TABLE_NAME+\" where user_id=#{userId} \" +\n \"union select id as project_id from \"+ TABLE_NAME+\" where user_id=#{userId})\");\n\n Object searchVal = parameter.get(\"searchVal\");\n if(searchVal != null && StringUtils.isNotEmpty(searchVal.toString())){\n WHERE( \" p.name like concat('%', #{searchVal}, '%') \");\n }\n WHERE(\" p.flag = 1\");\n ORDER_BY(\"p.create_time desc limit #{offset},#{pageSize} \");\n }}.toString();\n }",
"public abstract KenaiProject[] getDashboardProjects(boolean onlyOpened);",
"@Transactional(readOnly = true)\n public List<ProjectDTO> getProjectsAssignedToUser(String login) {\n User userByLogin = userRepository.findOneWithRolesByLogin(login).get();\n List<Project> projectsOfUser = new ArrayList<>();\n for (Role role : userByLogin.getRoles()) {\n // get all projects for admin\n if (AuthoritiesConstants.SYS_ADMIN.equals(role.getAuthority().getName())) {\n return projectMapper.projectsToProjectDTOs(projectRepository.findAll());\n }\n // get unique project from roles\n if (!projectsOfUser.contains(role.getProject())) {\n projectsOfUser.add(role.getProject());\n }\n }\n return projectMapper.projectsToProjectDTOs(projectsOfUser);\n }",
"@TransactionAttribute(TransactionAttributeType.SUPPORTS)\r\n\t\tpublic List<DatosGrlsProyectoDO> getAllAll() throws ConectelException {\r\n\t\t\tTypedQuery<DatosGrlsProyectoDO> query = entityManager.createNamedQuery(\r\n\t\t\t\t\t\"DatosGrlsProyectoDO.findAllAll\", DatosGrlsProyectoDO.class);\r\n\t\t\tList<DatosGrlsProyectoDO> dataProjectList;\r\n\t\t\ttry {\r\n\t\t\t\tdataProjectList = query.getResultList();\r\n\t\t\t} catch(NoResultException e) {\r\n\t\t\t\tthrow new ConectelException(\"No existen Datos Generales registrados.\");\r\n\t\t\t}\r\n\t\t\treturn dataProjectList;\r\n\t\t}",
"public java.util.List<Todo> findAll();",
"public java.util.List<Campus> findAll();",
"List<EclipseProject> getProjects() {\n return getFlattenedProjects(selectedProjects);\n }",
"List<Team> findAll();",
"@Override\n\tpublic Projects findByProjectName(String name) {\n\t\tString sql = \"select * from projects where lower(proj_name)=lower('\"+name+\"')\";\n\t\treturn getJdbcTemplate().queryForObject(sql, new BeanPropertyRowMapper<Projects>(Projects.class));\n\t}",
"@Override\n protected SearchedResRepList getProjectSearchResults(final URI projectId) {\n SearchedResRepList resRepList = new SearchedResRepList(getResourceType());\n _dbClient.queryByConstraint(\n ContainmentConstraint.Factory.getProjectBlockConsistencyGroupConstraint(projectId),\n resRepList);\n return resRepList;\n }",
"public ArrayList<Project> allProjects() {\n ArrayList<Project> projects = new ArrayList<>();\n for (Role role : this.roles) {\n if (role instanceof Member) {\n projects.add(((Member) role).getProject());\n } else if (role instanceof Leader) {\n projects.add(((Member) role).getProject());\n }\n }\n return projects;\n }",
"public void testDemo() throws Exception {\n // prepare data\n Client client = createClient(200);\n Project project = createProjectWithClient(100, client);\n createProjectWithClient(101, client);\n createProjectWithClient(102, client);\n createProjectWithClient(103, client);\n getEntityManager().getTransaction().commit();\n\n // retrieve bean\n InitialContext ctx = new InitialContext();\n ProjectDAORemote bean = (ProjectDAORemote) ctx.lookup(\"client_project_entities_dao/ProjectDAOBean/remote\");\n\n Filter filter = new EqualToFilter(\"projectStatus\", project.getProjectStatus().getId());\n\n List<Project> projects;\n\n // get project for corresponding id\n Project tempProject = bean.retrieveById(100L);\n\n // get all projects\n projects = bean.retrieveAll();\n\n // get all projects with the name \"name\"\n projects = bean.searchByName(\"name\");\n\n // get all that match the given filter\n projects = bean.search(filter);\n\n // save or update a project\n bean.save(project);\n\n // delete the project\n bean.delete(project);\n\n // get project for corresponding id without projectChildren\n tempProject = bean.retrieveById(100L, false);\n\n // get project for corresponding id with projectChildren\n tempProject = bean.retrieveById(100L, true);\n\n // get all projects without projectChildrens\n projects = bean.retrieveAll(false);\n\n // get all projects with projectChildrens\n projects = bean.retrieveAll(true);\n\n // get projects by user\n projects = bean.getProjectsByUser(\"username\");\n\n // get all projects only\n projects = bean.retrieveAllProjectsOnly();\n\n // search projects by project name\n projects = bean.searchProjectsByProjectName(\"projectname\");\n\n // search projects by client name\n projects = bean.searchProjectsByClientName(\"clientname\");\n\n // get contest fees by project\n List<ProjectContestFee> fees = bean.getContestFeesByProject(100L);\n\n // save contest fees\n bean.saveContestFees(fees, 100L);\n\n // check client project permission\n boolean clientProjectPermission = bean.checkClientProjectPermission(\"username\", 100L);\n\n // check po number permission\n boolean poNumberPermission = bean.checkPoNumberPermission(\"username\", \"123456A\");\n\n // add user to billing projects.\n bean.addUserToBillingProjects(\"username\", new long[] {100, 101, 102});\n\n // remove user from billing projects.\n bean.removeUserFromBillingProjects(\"ivern\", new long[] {100, 201});\n\n // get the projects by the given client id.\n projects = bean.getProjectsByClientId(200);\n }",
"public Projects findByProjectID(int proj_id){\n\t\tString sql = \"select * from projects where proj_id = \"+proj_id;\n\t\treturn getJdbcTemplate().queryForObject(sql, new BeanPropertyRowMapper<Projects>(Projects.class));\n\t}",
"@GetMapping(value = \"/projectslist\", produces = \"application/json\")\n public ResponseEntity<?> findAllProjectsWithProblemName()\n {\n List<ProblemListGroupedByProject> projectList = projectService.findAllProjectsWithProblemName();\n\n return new ResponseEntity<>(projectList, HttpStatus.OK);\n }",
"public List<TeamProjectCollectionReference> getProjectCollections(\r\n final Integer top, \r\n final Integer skip) {\r\n\r\n final UUID locationId = UUID.fromString(\"8031090f-ef1d-4af6-85fc-698cd75d42bf\"); //$NON-NLS-1$\r\n final ApiResourceVersion apiVersion = new ApiResourceVersion(\"2.1\"); //$NON-NLS-1$\r\n\r\n final NameValueCollection queryParameters = new NameValueCollection();\r\n queryParameters.addIfNotNull(\"$top\", top); //$NON-NLS-1$\r\n queryParameters.addIfNotNull(\"$skip\", skip); //$NON-NLS-1$\r\n\r\n final Object httpRequest = super.createRequest(HttpMethod.GET,\r\n locationId,\r\n apiVersion,\r\n queryParameters,\r\n APPLICATION_JSON_TYPE);\r\n\r\n return super.sendRequest(httpRequest, new TypeReference<List<TeamProjectCollectionReference>>() {});\r\n }",
"public List<Project> findProjectByEmpId(String employeeId) {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t\tString query = \"SELECT P.`PROJECT_ID`,PROJECT_NAME,MANAGER_ID FROM TA_PROJECTS P JOIN TA_EMPLOYEE_PROJECT E ON E.`PROJECT_ID` = P.`PROJECT_ID`\"\r\n\t\t\t\t+ \" WHERE EMPLOYEE_ID='\" + employeeId + \"'\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t\tprojectList.add(project);\r\n\t\t}\r\n\t\treturn projectList;\r\n\t}",
"@Override\n @Transactional(readOnly = true)\n public List<ProjectTypeId> findAll() {\n log.debug(\"Request to get all ProjectTypeIds\");\n return projectTypeIdRepository.findAll();\n }",
"public static List<Project> getProjects() throws Exception {\n Multimap<String, File> mapOfAllFiles = null;\n mapOfAllFiles = createMapOfFiles(getProjectsPath());\n mapOfAllFiles = removeEntriesWithoutProjectFile(mapOfAllFiles);\n return convertMapToProjects(mapOfAllFiles);\n }",
"@Override\n public List<ProjectDTO> findProjectListByUserName(String username) {\n\n List<ProjectEntity> projectEntityList = projectRepository.findByAssignedManager(userMapper.convertToUserEntity(userService.findByUserName(username)));\n\n projectEntityList.forEach(each->{\n each.setCompleteTaskCounts(taskService.totalCompletedTasks(each.getProjectCode()));\n each.setUnfinishedTaskCounts(taskService.totalNonCompleteTasks(each.getProjectCode()));\n });\n\n return projectEntityList.stream().map(projectMapper::convertToProjectDto).collect(Collectors.toList());\n }",
"public IProject [] getProjects(){\n\t\treturn projects;\n\t}",
"protected Project[] fetchMultiResults(ResultSet rs) throws SQLException {\n\t\tCollection<Project> resultList = new ArrayList<Project>();\n\t\twhile (rs.next()){\n\t\t\tProject dto = new Project();\n\t\t\tpopulateDto(dto, rs);\n\t\t\tresultList.add(dto);\n\t\t}\n\n\t\tProject ret[] = new Project[resultList.size()];\n\t\tresultList.toArray(ret);\n\t\treturn ret;\n\t}"
] | [
"0.79467124",
"0.7880951",
"0.77529126",
"0.76360226",
"0.742655",
"0.7415399",
"0.74145615",
"0.73423904",
"0.73351157",
"0.730188",
"0.7070785",
"0.68844306",
"0.68269634",
"0.68171155",
"0.68155706",
"0.6773043",
"0.6733399",
"0.66999334",
"0.6684894",
"0.6649269",
"0.66367286",
"0.66231567",
"0.6605437",
"0.66025645",
"0.6557029",
"0.6551414",
"0.6533962",
"0.6530266",
"0.6492512",
"0.6482307",
"0.6472568",
"0.6454937",
"0.64274055",
"0.6367974",
"0.6359309",
"0.6356494",
"0.6318879",
"0.6300946",
"0.62880766",
"0.62828773",
"0.628216",
"0.624423",
"0.6234682",
"0.6227184",
"0.6219288",
"0.6218105",
"0.61926997",
"0.61692303",
"0.6166563",
"0.6163061",
"0.61549",
"0.6133082",
"0.6107297",
"0.6106552",
"0.6090304",
"0.60877323",
"0.6073419",
"0.60380095",
"0.60080624",
"0.60013986",
"0.5999121",
"0.5993768",
"0.5974757",
"0.59744364",
"0.59621376",
"0.59613043",
"0.59408253",
"0.5935079",
"0.5932838",
"0.59202886",
"0.59145427",
"0.5901841",
"0.5896687",
"0.58960587",
"0.58923054",
"0.58903885",
"0.5883599",
"0.5875101",
"0.587151",
"0.587074",
"0.58695126",
"0.58654046",
"0.5864829",
"0.5849021",
"0.5840274",
"0.5829993",
"0.5824522",
"0.58192474",
"0.58180666",
"0.5812197",
"0.58104855",
"0.5809184",
"0.58010596",
"0.57906115",
"0.57852644",
"0.5779944",
"0.5773146",
"0.5770362",
"0.5761938",
"0.57510555"
] | 0.69556016 | 11 |
Find project(s) based on [multiple search criteria]. Support for paging and sorting. | SearchResultVO<Project> findByCriteria(SearchCriteriaVO criteria, int currentPage, int num, String sortColName,
String sortDirection); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> searchProjects(\n Map<String, String> filters, List<String> accessibleIds, int limit, int offset, Object orderByIdentifier,\n ResultOrderType resultOrderType) throws RegistryException {\n\n List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> result = new ArrayList<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource>();\n EntityManager em = null;\n try {\n String query = \"SELECT DISTINCT p from Project p WHERE \";\n\n // FIXME There is a performance bottleneck for using IN clause. Try using temporary tables ?\n if(accessibleIds != null){\n query += \" p.projectId IN (\";\n for(String id : accessibleIds)\n query += (\"'\" + id + \"'\" + \",\");\n query = query.substring(0, query.length()-1) + \") AND \";\n }\n\n if (filters != null && filters.size() != 0) {\n for (String field : filters.keySet()) {\n String filterVal = filters.get(field);\n if (field.equals(ProjectConstants.USERNAME)) {\n query += \"p.\" + field + \"= '\" + filterVal + \"' AND \";\n } else if (field.equals(ProjectConstants.GATEWAY_ID)) {\n query += \"p.\" + field + \"= '\" + filterVal + \"' AND \";\n } else {\n if (filterVal.contains(\"*\")) {\n filterVal = filterVal.replaceAll(\"\\\\*\", \"\");\n }\n query += \"p.\" + field + \" LIKE '%\" + filterVal + \"%' AND \";\n }\n }\n }\n query = query.substring(0, query.length() - 5);\n\n //ordering\n if (orderByIdentifier != null && resultOrderType != null\n && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {\n String order = (resultOrderType == ResultOrderType.ASC) ? \"ASC\" : \"DESC\";\n query += \" ORDER BY p.\" + ProjectConstants.CREATION_TIME + \" \" + order;\n }\n\n em = ExpCatResourceUtils.getEntityManager();\n em.getTransaction().begin();\n Query q;\n\n //pagination\n if (offset >= 0 && limit >= 0) {\n q = em.createQuery(query).setFirstResult(offset).setMaxResults(limit);\n } else {\n q = em.createQuery(query);\n }\n\n List resultList = q.getResultList();\n for (Object o : resultList) {\n Project project = (Project) o;\n org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource projectResource =\n (ProjectResource) Utils.getResource(ResourceType.PROJECT, project);\n result.add(projectResource);\n }\n em.getTransaction().commit();\n em.close();\n } catch (Exception e) {\n logger.error(e.getMessage(), e);\n throw new RegistryException(e);\n } finally {\n if (em != null && em.isOpen()) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n }\n }\n return result;\n }",
"public List<ProjectType> invokeQueryProjects() throws TsResponseException {\n checkSignedIn();\n\n final List<ProjectType> projects = new ArrayList<>();\n\n int currentPage = 1; // Tableau starts counting at 1\n BigInteger totalReturned = BigInteger.ZERO;\n BigInteger totalAvailable;\n\n // Loop over pages\n do {\n // Query the projects page\n final String url = getUriBuilder().path(QUERY_PROJECTS) //\n .queryParam(\"pageNumber\", currentPage) //\n .queryParam(\"pageSize\", PROJECTS_PAGE_SIZE) //\n .build(m_siteId).toString();\n final TsResponse response = get(url);\n\n // Get the projects from the response\n projects.addAll(response.getProjects().getProject());\n\n // Next page\n currentPage++;\n // NOTE: total available is the number of datasources available\n totalAvailable = response.getPagination().getTotalAvailable();\n totalReturned = totalReturned.add(response.getPagination().getPageSize());\n } while (totalReturned.compareTo(totalAvailable) < 0);\n\n return projects;\n }",
"List<ProjectDTO> findLimitProjects(int pageNumber);",
"SearchResultVO<Project> findAll(int nextPage, int num, String sortColName, String sortDirection);",
"@Override\r\n\tpublic List<Project> findProject() {\n\t\treturn iSearchSaleRecordDao.findProject();\r\n\t}",
"void findWithPagination(Pagination<Task, Project> pagination);",
"@Override\n\tpublic List<ProjectInfo> findProject(ProjectInfo project) {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findProject\",project);\n\t}",
"@Override\n\tpublic List<ProjectInfo> findAllProject() {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findAllProject\");\n\t}",
"List<Project> findProjectsOfAccount(String username);",
"public List<Project> findAllProject() {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t\tString query = \"SELECT * FROM TA_PROJECTS\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t\tprojectList.add(project);\r\n\t\t}\r\n\t\treturn projectList;\r\n\t}",
"public String queryProjectListPaging(Map<String, Object> parameter) {\n return new SQL() {{\n SELECT(\"p.*\");\n SELECT(\"u.user_name as user_name\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition AS def WHERE def.project_id = p.id) AS def_count\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition def, t_escheduler_process_instance inst WHERE def.id = inst.process_definition_id AND def.project_id = p.id AND inst.state=1 ) as inst_running_count\");\n FROM(TABLE_NAME + \" p\");\n JOIN(\"t_escheduler_user u on u.id=p.user_id\");\n WHERE(\"p.id in \" +\n \"(select project_id from \"+ RELEATION_TABLE_NAME+\" where user_id=#{userId} \" +\n \"union select id as project_id from \"+ TABLE_NAME+\" where user_id=#{userId})\");\n\n Object searchVal = parameter.get(\"searchVal\");\n if(searchVal != null && StringUtils.isNotEmpty(searchVal.toString())){\n WHERE( \" p.name like concat('%', #{searchVal}, '%') \");\n }\n WHERE(\" p.flag = 1\");\n ORDER_BY(\"p.create_time desc limit #{offset},#{pageSize} \");\n }}.toString();\n }",
"public List<Project> findByPage(Map<String, Object> map) {\n\tString key=map.get(\"currpage\").toString()+map.get(\"rows\").toString()+\"prlist\";\n\tList<Object> olist=redistemplateutil.lGet(key, 0, -1);\n\tList<Project> list=new ArrayList<Project>();\n\tif(null!=olist &&olist.size()>0) {\n\t\tlist=(List<Project>) olist.get(0);\n\t\treturn list;\n\t}else{\n\t\n\tList<Project> ulist= projectmapper.findByPage(map);\n\tredistemplateutil.lSet(key, ulist,3);\n\treturn ulist;\n\t}\n}",
"private void search() {\n if (dateFind.getValue() == null) {\n dateFind.setValue(LocalDate.now().minusDays(DEFAULT_PERIOD));\n }\n Long days = ChronoUnit.DAYS.between(dateFind.getValue(), LocalDate.now());\n final List<Project> findProject = ServiceFactory.getProjectService().getFindProject(days, comboProject.getValue());\n observableProjects.clear();\n observableProjects.addAll(findProject);\n table.setItems(observableProjects);\n }",
"public void querySubProjects() {\r\n\t\t// Create a task\r\n\t\tProject master = new Project();\r\n\t\tmaster.setName(\"INFRASTRUCTURE\");\r\n\t\tmaster.setDisplayName(\"Infrastructure\");\r\n\t\tmaster.setDescription(\"Project to setup the new infrastructure\");\r\n\t\tmaster = (Project) aggregateService.create(master, new Settings());\t\r\n\r\n\t\t// Create 2 dependents\r\n\t\tProject A = new Project();\r\n\t\tA.setName(\"SETUP_NETWORK\");\r\n\t\tA.setDisplayName(\"Setup network\");\r\n\t\tA.setDescription(\"Project to lay the network cables and connect to routers\");\r\n\t\tA = (Project) aggregateService.create(A, new Settings());\r\n\r\n\t\tProject B = new Project();\r\n\t\tB.setName(\"SETUP_TELEPHONE\");\r\n\t\tB.setDisplayName(\"Setup telephone\");\r\n\t\tB.setDescription(\"Setup the telephone at each employee desk\");\r\n\t\tB = (Project) aggregateService.create(B, new Settings());\r\n\r\n\t\tMap<String, Project> subProjects = new HashMap<String, Project>();\r\n\t\tsubProjects.put(A.getName(), A);\r\n\t\tsubProjects.put(B.getName(), B);\r\n\t\tmaster.setSubProjects(subProjects);\r\n\t\tmaster = (Project) aggregateService.read(master, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setView(aggregateService.getView(\"SUBPROJECTS\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(master, settings);\r\n\r\n\t\tassert(toList.size() == 1);\t\t\r\n\r\n\t\tObject obj = toList.get(0);\r\n\t\tassert(Project.class.isAssignableFrom(obj.getClass()));\r\n\r\n\t\tProject root = (Project) obj;\r\n\t\tassert(root.getSubProjects() != null && root.getSubProjects().size() == 2);\r\n\t\tassert(root.getSubProjects().get(\"SETUP_NETWORK\").getName().equals(\"SETUP_NETWORK\"));\r\n\t\tassert(root.getSubProjects().get(\"SETUP_TELEPHONE\").getName().equals(\"SETUP_TELEPHONE\"));\t\t\r\n\t}",
"public String queryAllProjectListPaging(Map<String, Object> parameter) {\n return new SQL() {{\n SELECT(\"p.*\");\n SELECT(\"u.user_name as user_name\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition AS def WHERE def.project_id = p.id) AS def_count\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition def, t_escheduler_process_instance inst WHERE def.id = inst.process_definition_id AND def.project_id = p.id AND inst.state=1 ) as inst_running_count\");\n FROM(TABLE_NAME + \" p\");\n JOIN(\"t_escheduler_user u on p.user_id = u.id\");\n\n Object searchVal = parameter.get(\"searchVal\");\n if(searchVal != null && StringUtils.isNotEmpty(searchVal.toString())){\n WHERE( \" p.name like concat('%', #{searchVal}, '%') \");\n }\n WHERE(\" p.flag = 1\");\n ORDER_BY(\"p.create_time desc limit #{offset},#{pageSize} \");\n }}.toString();\n }",
"private void setProjectSearchResults(List<Project> aces, List<Project> aws, List<Project> elsewhere, List<Project> rcnc){\n resultsMap.put(titles[0], aces);\n resultsMap.put(titles[1], aws);\n resultsMap.put(titles[2], elsewhere);\n resultsMap.put(titles[3], rcnc);\n\n mAdapterSearch = new ProjectsExpandableSearchAdapter(main, R.layout.project_list_item, titles, resultsMap);\n mProjectsListView.setAdapter(mAdapterSearch);\n mProjectsListView.expandGroup(0);\n mProjectsListView.expandGroup(1);\n mProjectsListView.expandGroup(2);\n mProjectsListView.expandGroup(3);\n\n }",
"Page<ProjectsDTO> findAll(Pageable pageable);",
"public List<Project> getAllProjects();",
"List<Project> selectAll();",
"public List<Project> findAllProject() {\n\treturn projectmapper.findProject(null);\n}",
"@Override\r\n\tpublic List<Project> selectProjectList(String id,int cPage,int numPerpage) {\n\t\treturn dao.selectProjectList(session,id,cPage,numPerpage);\r\n\t}",
"public Project[] findByDynamicWhere(String sql, Object[] sqlParams) throws ProjectDaoException {\n\t\t// declare variables\n\t\tfinal boolean isConnSupplied = (userConn != null);\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry{\n\t\t\t// get the user-specified connection or get a connection from the\n\t\t\t// ResourceManager\n\t\t\tconn = isConnSupplied ? userConn : ResourceManager.getConnection();\n\n\t\t\t// construct the SQL statement\n\t\t\tfinal String SQL = SQL_SELECT + \" WHERE \" + sql;\n\t\t\tif (logger.isDebugEnabled()){\n\t\t\t\tlogger.debug(\"Executing \" + SQL);\n\t\t\t}\n\n\t\t\t// prepare statement\n\t\t\tstmt = conn.prepareStatement(SQL);\n\t\t\tstmt.setMaxRows(maxRows);\n\n\t\t\t// bind parameters\n\t\t\tfor (int i = 0; sqlParams != null && i < sqlParams.length; i++){\n\t\t\t\tstmt.setObject(i + 1, sqlParams[i]);\n\t\t\t}\n\n\t\t\trs = stmt.executeQuery();\n\n\t\t\t// fetch the results\n\t\t\treturn fetchMultiResults(rs);\n\t\t} catch (Exception _e){\n\t\t\tlogger.error(\"Exception: \" + _e.getMessage(), _e);\n\t\t\tthrow new ProjectDaoException(\"Exception: \" + _e.getMessage(), _e);\n\t\t} finally{\n\t\t\tResourceManager.close(rs);\n\t\t\tResourceManager.close(stmt);\n\t\t\tif (!isConnSupplied){\n\t\t\t\tResourceManager.close(conn);\n\t\t\t}\n\n\t\t}\n\n\t}",
"public List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> getProjects(int limit, int offset, Object orderByIdentifier,\n ResultOrderType resultOrderType) throws RegistryException {\n List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> result = new ArrayList<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource>();\n List<ExperimentCatResource> list = get(ResourceType.PROJECT, limit, offset, orderByIdentifier, resultOrderType);\n for (ExperimentCatResource resource : list) {\n result.add((org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource) resource);\n }\n return result;\n }",
"@Transactional(readOnly = true)\n public Page<TaskProject> search(String query, Pageable pageable) {\n log.debug(\"Request to search for a page of TaskProjects for query {}\", query);\n Page<TaskProject> result = taskProjectSearchRepository.search(queryStringQuery(query), pageable);\n return result;\n }",
"public Project[] findByDynamicSelect(String sql, Object[] sqlParams) throws ProjectDaoException {\n\t\t// declare variables\n\t\tfinal boolean isConnSupplied = (userConn != null);\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry{\n\t\t\t// get the user-specified connection or get a connection from the\n\t\t\t// ResourceManager\n\t\t\tconn = isConnSupplied ? userConn : ResourceManager.getConnection();\n\n\t\t\t// construct the SQL statement\n\t\t\tfinal String SQL = sql;\n\t\t\tif (logger.isDebugEnabled()){\n\t\t\t\tlogger.debug(\"Executing \" + SQL);\n\t\t\t}\n\n\t\t\t// prepare statement\n\t\t\tstmt = conn.prepareStatement(SQL);\n\t\t\tstmt.setMaxRows(maxRows);\n\n\t\t\t// bind parameters\n\t\t\tfor (int i = 0; sqlParams != null && i < sqlParams.length; i++){\n\t\t\t\tstmt.setObject(i + 1, sqlParams[i]);\n\t\t\t}\n\n\t\t\trs = stmt.executeQuery();\n\n\t\t\t// fetch the results\n\t\t\treturn fetchMultiResults(rs);\n\t\t} catch (Exception _e){\n\t\t\tlogger.error(\"Exception: \" + _e.getMessage(), _e);\n\t\t\tthrow new ProjectDaoException(\"Exception: \" + _e.getMessage(), _e);\n\t\t} finally{\n\t\t\tResourceManager.close(rs);\n\t\t\tResourceManager.close(stmt);\n\t\t\tif (!isConnSupplied){\n\t\t\t\tResourceManager.close(conn);\n\t\t\t}\n\n\t\t}\n\n\t}",
"public Project[] findAll() throws ProjectDaoException {\n\t\treturn findByDynamicSelect(SQL_SELECT + \" ORDER BY ID\", null);\n\t}",
"public List<TeamProjectReference> getProjects(\r\n final ProjectState stateFilter, \r\n final Integer top, \r\n final Integer skip) {\r\n\r\n final UUID locationId = UUID.fromString(\"603fe2ac-9723-48b9-88ad-09305aa6c6e1\"); //$NON-NLS-1$\r\n final ApiResourceVersion apiVersion = new ApiResourceVersion(\"2.1\"); //$NON-NLS-1$\r\n\r\n final NameValueCollection queryParameters = new NameValueCollection();\r\n queryParameters.addIfNotNull(\"stateFilter\", stateFilter); //$NON-NLS-1$\r\n queryParameters.addIfNotNull(\"$top\", top); //$NON-NLS-1$\r\n queryParameters.addIfNotNull(\"$skip\", skip); //$NON-NLS-1$\r\n\r\n final Object httpRequest = super.createRequest(HttpMethod.GET,\r\n locationId,\r\n apiVersion,\r\n queryParameters,\r\n APPLICATION_JSON_TYPE);\r\n\r\n return super.sendRequest(httpRequest, new TypeReference<List<TeamProjectReference>>() {});\r\n }",
"@ApiMethod(\n name = \"getProjects\",\n path = \"getProjects\",\n httpMethod = HttpMethod.POST\n )\n public List<Project> getProjects(){\n \tQuery<Project> query = ofy().load().type(Project.class);\n \treturn query.list();\n }",
"void getAllProjectList(int id);",
"@Override\n protected SearchedResRepList getProjectSearchResults(final URI projectId) {\n SearchedResRepList resRepList = new SearchedResRepList(getResourceType());\n _dbClient.queryByConstraint(\n ContainmentConstraint.Factory.getProjectBlockConsistencyGroupConstraint(projectId),\n resRepList);\n return resRepList;\n }",
"public void testSearchRules() throws Exception {\n Project project = new Project();\r\n \r\n DateFormatSymbols symbols = new DateFormatSymbols(Locale.US);\r\n \r\n for (int i = 0; i < 12; i++) {\r\n \r\n String month = symbols.getMonths()[i];\r\n String shortMonth = symbols.getShortMonths()[i];\r\n \r\n // Basic project info\r\n project.setId(i);\r\n project.setCategoryId(1);\r\n project.setAllowGuests(true);\r\n project.setMembershipRequired(false);\r\n project.setApproved(true);\r\n project.setClosed(false);\r\n project.setPortal(false);\r\n \r\n // Unique Title\r\n project.setTitle(month + \" test project\");\r\n project.setShortDescription(month + \" description word\");\r\n project.setKeywords(shortMonth);\r\n \r\n // Unique Location\r\n project.setCity(\"Virginia Beach\");\r\n project.setState(\"VA\");\r\n project.setPostalCode(\"234\" + String.valueOf(50 + i));\r\n \r\n // Random Rating for now\r\n project.setRatingCount(i + 1);\r\n project.setRatingValue(project.getRatingCount() * StringUtils.rand(1, 5));\r\n project.setRatingAverage(project.getRatingValue() / project.getRatingCount());\r\n \r\n // Index it\r\n ProjectIndexer indexer = new ProjectIndexer();\r\n indexer.add(snowballWriter, project, true);\r\n }\r\n \r\n QueryParser parser = new QueryParser(\"contents\", snowballAnalyzer);\r\n \r\n {\r\n // Make sure a single matching term yields a single hit\r\n SearchBean search = new SearchBean();\r\n search.setQuery(symbols.getMonths()[0]);\r\n search.setLocation(\"Virginia Beach\");\r\n assertNotNull(search.getQuery());\r\n assertNotNull(search.getLocation());\r\n search.parseQuery();\r\n assertTrue(search.isValid());\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n assertNotNull(queryString);\r\n \r\n // (approved:1)\r\n // AND (guests:1)\r\n // AND (closed:0)\r\n // AND (website:0)\r\n // AND (\"january\"^20 OR january^15 OR january*^4) AND (location:(\"virginia beach\"^30))\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 1);\r\n }\r\n \r\n {\r\n // Make sure a single matching term stem yields a single hit\r\n SearchBean search = new SearchBean();\r\n search.setQuery(symbols.getMonths()[0] + \"'s\");\r\n search.setLocation(\"Virginia Beach\");\r\n assertNotNull(search.getQuery());\r\n assertNotNull(search.getLocation());\r\n search.parseQuery();\r\n assertTrue(search.isValid());\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n assertNotNull(queryString);\r\n \r\n // (approved:1)\r\n // AND (guests:1)\r\n // AND (closed:0)\r\n // AND (website:0)\r\n // AND (\"january's\"^20 OR january's^15 OR january's*^4) AND (location:(\"virginia beach\"^30))\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 1);\r\n }\r\n \r\n {\r\n // Make sure multiple matching words yield two hits\r\n SearchBean search = new SearchBean();\r\n search.setQuery(symbols.getMonths()[0] + \" \" + symbols.getMonths()[1]);\r\n search.setLocation(\"Virginia Beach\");\r\n search.parseQuery();\r\n assertTrue(search.isValid());\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n assertNotNull(queryString);\r\n \r\n // (approved:1)\r\n // AND (guests:1)\r\n // AND (closed:0)\r\n // AND (website:0)\r\n // AND (\"january february\"^20 OR january^15 OR february^14 OR january*^4 OR february*^3) AND (location:(\"virginia beach\"^30))\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 2);\r\n }\r\n \r\n {\r\n // Make sure wilcards yield multiple hits\r\n SearchBean search = new SearchBean();\r\n search.setQuery(\"j\");\r\n search.setLocation(\"Virginia Beach\");\r\n search.parseQuery();\r\n assertTrue(search.isValid());\r\n \r\n // Look for data with a \"j\" for comparison\r\n int jCount = 0;\r\n for (int i = 0; i < symbols.getMonths().length; i++) {\r\n if (symbols.getMonths()[i].toLowerCase().indexOf(\"j\") > -1 ||\r\n symbols.getShortMonths()[i].toLowerCase().indexOf(\"j\") > -1) {\r\n ++jCount;\r\n }\r\n }\r\n assertTrue(jCount > 0);\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n assertNotNull(queryString);\r\n \r\n // (approved:1)\r\n // AND (guests:1)\r\n // AND (closed:0)\r\n // AND (website:0)\r\n // AND (\"j\"^20 OR j^15 OR j*^4) AND (location:(\"virginia beach\"^30))\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == jCount);\r\n }\r\n \r\n {\r\n // Make sure alternate locations do not yield any hits\r\n SearchBean search = new SearchBean();\r\n search.setQuery(symbols.getMonths()[0]);\r\n search.setLocation(\"Norfolk\");\r\n search.parseQuery();\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 0);\r\n }\r\n \r\n {\r\n // Make sure locations as query terms do not yield any hits\r\n SearchBean search = new SearchBean();\r\n search.setQuery(\"Virginia Beach\");\r\n search.setLocation(\"Virginia Beach\");\r\n search.parseQuery();\r\n \r\n String queryString = SearchUtils.generateProjectQueryString(search, UserUtils.createGuestUser().getId(), -1, null);\r\n \r\n Query query = parser.parse(queryString);\r\n Hits hits = getSnowballSearcher().search(query);\r\n assertTrue(hits.length() == 0);\r\n }\r\n }",
"protected Project[] fetchMultiResults(ResultSet rs) throws SQLException {\n\t\tCollection<Project> resultList = new ArrayList<Project>();\n\t\twhile (rs.next()){\n\t\t\tProject dto = new Project();\n\t\t\tpopulateDto(dto, rs);\n\t\t\tresultList.add(dto);\n\t\t}\n\n\t\tProject ret[] = new Project[resultList.size()];\n\t\tresultList.toArray(ret);\n\t\treturn ret;\n\t}",
"public List<GitLabProject> getProjectsSearchByName(String query, Integer perPage, Integer page, String orderBy, String sort) throws IOException {\n String parameters = Query.newQuery().appendIf(\"per_page\", perPage).appendIf(\"page\", page).appendIf(\"orderBy\", orderBy).appendIf(\"sort\", sort).build();\n String tailUrl = String.format(\"/projects/search/%s%s\", gitLabAPI.sanitize(query), parameters);\n return gitLabAPI.retrieve().getAll(tailUrl, GitLabProject[].class);\n }",
"Page<ProjectCodeDTO> findAll(Pageable pageable);",
"public List<Project> getSpecifiedProjects(List<Integer> projectIdList) \n \t\tthrows EmployeeManagementException;",
"@GetMapping(\"/my_projects\")\n public ResponseEntity<List<ProjectDto>> getMyProjects(){\n\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n String currentUserName = authentication.getName();\n User currentUser = userService.findByEmail(currentUserName).orElseThrow(\n () -> {throw new MyNotFoundException(\"User not found\");}\n );\n\n List<String> projects = Arrays.asList(currentUser.getProjects().split(\"#\"));\n\n List<ProjectDto> projectDtos = new ArrayList<>();\n for(String project : projects){\n if (projectService.findByName(project).isPresent()){\n Project temp = projectService.findByName(project).get();\n projectDtos.add(new ProjectDto(temp.getId(), temp.getName(), new CompanyDto(temp.getCompany()), temp.getStart_date(), temp.getStatus()));\n }\n }\n return ResponseEntity.ok(projectDtos);\n }",
"List<ProjectCollectionMember> getMyProjects(String userId,\n int startFrom,\n int pageSize) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;",
"private void compareProjects(DoapProject[] projects,\n\t\t\tDoapProject[] result) {\n\t\tassertEquals(projects.length, result.length);\n\t\tfor (int i = 0; i < projects.length; i++) {\n\t\t\tboolean found = false;\n\t\t\tfor (int j = 0; j < result.length; j++) {\n\t\t\t\tif (projects[i].getName() == null) {\n\t\t\t\t\tif (result[j].getName() == null) {\n\t\t\t\t\t\tif (projects[i].getHomePage() == null) {\n\t\t\t\t\t\t\tif (result[j].getHomePage() == null) {\n\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (projects[i].getHomePage().equals(result[j].getHomePage())) {\n\t\t\t\t\t\t\tfound = true;\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} else if (projects[i].getName().equals(result[j].getName())) {\n\t\t\t\t\tif (projects[i].getHomePage() == null) {\n\t\t\t\t\t\tif (result[j].getHomePage() == null) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (projects[i].getHomePage().equals(result[j].getHomePage())) {\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\tfail(\"Project not found: \"+projects[i].getName());\n\t\t\t}\n\t\t}\n\t}",
"public List<GitLabProject> getProjects(Boolean archived, String orderBy, String sort, String search, Boolean ciEnabledFirst) throws IOException {\n return getProjects(null, archived, orderBy, sort, search, ciEnabledFirst);\n }",
"private static void search_by_id() {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t\tSystem.out.println(\"Project id: \");\r\n\t\t\tString project_id_str = input.nextLine();\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tfetch_all_project_info(stmt, project_id_str, project_rset);\r\n\t\t/**\r\n\t\t * @exception If entered project id cannot be found in the projects table then an SQLException is thrown\r\n\t\t */\t\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t\t\r\n\t}",
"public interface ProjectResearchRepository extends JpaRepository<ProjectResearch, Integer> {\n\n\n public List<ProjectResearch> findByProjectIdAndPreResearchId(Integer projectId, Integer preResearchId);\n\n public List<ProjectResearch> findByProjectId(Integer projectId);\n\n\n}",
"public List<GitLabProject> getProjectAlls(Boolean archived, String orderBy, String sort, String search, Boolean ciEnabledFirst) throws IOException {\n return getProjects(\"/all\", archived, orderBy, sort, search, ciEnabledFirst);\n }",
"public List<ProdutoModel> search(Integer page, Integer linesPerPage) {\n \t\treturn repository.findAll();\n \t}",
"@Override\n\tpublic List<ProductProjectWithSuite> QueryProductProjectWithSuite(int currentPageNo, int pageSize, int productProjectId,int testSuiteId, String testSuiteName){\n\t\treturn productProjectWithSuiteDAO.QueryProductProjectWithSuite(currentPageNo, pageSize, productProjectId, testSuiteId, testSuiteName);\n\t}",
"@Override\n\tpublic List<Project> findProjectsByProjectCode(int ownerAccountId,\n\t\t\tString projectCode, Set<String> currentPhases, boolean headerOnly) {\n\t\ttry {\n\t\t\tList<Project> projects = super.findDomainObjectsByStringColumnVal(ownerAccountId, outJoins,\n\t\t\t\t\t\"o.ProjectCode\", projectCode, true, currentPhases, null);\n\t\t\treturn getQueryDetail(projects, headerOnly);\n\t\t}\n\t\tcatch (MustOverrideException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByProjectCode MustOverrideException: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByProjectCode Exception: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n\t\tprotected List<ProjectModel> doInBackground(Void... params) {\n\t\t\tLog.i(\"LOGGER\", \"Starting...doInBackground loadList\");\n\t\t\tList<ProjectModel> projectsList = searchController.searchIntoXML();\n\t\t\treturn projectsList;\n\t\t}",
"@Override\n public List<ProjectproductDTO> findAll() {\n log.debug(\"Request to get all Projectproducts\");\n List<ProjectproductDTO> result = projectproductRepository.findAll().stream()\n .map(projectproductMapper::projectproductToProjectproductDTO)\n .collect(Collectors.toCollection(LinkedList::new));\n\n return result;\n }",
"void getAllProjectList(int id, UserType userType);",
"@Override\r\n\tpublic List<Project> findProject(int provinceId) {\n\t\treturn iImportSalesRecordDao.findProject(provinceId);\r\n\t}",
"Project findProjectById(String projectId);",
"public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }",
"private static void search_by_name() {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t\tSystem.out.println(\"Project Name: \");\r\n\t\t\tString project_name = input.nextLine();\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tfetch_all_project_info(stmt, project_name, project_rset);\r\n\t\t/**\r\n\t\t * @exception If entered project name cannot be found in the projects table then an SQLException is thrown\r\n\t\t */\t\t\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t}",
"public void testDemo() throws Exception {\n // prepare data\n Client client = createClient(200);\n Project project = createProjectWithClient(100, client);\n createProjectWithClient(101, client);\n createProjectWithClient(102, client);\n createProjectWithClient(103, client);\n getEntityManager().getTransaction().commit();\n\n // retrieve bean\n InitialContext ctx = new InitialContext();\n ProjectDAORemote bean = (ProjectDAORemote) ctx.lookup(\"client_project_entities_dao/ProjectDAOBean/remote\");\n\n Filter filter = new EqualToFilter(\"projectStatus\", project.getProjectStatus().getId());\n\n List<Project> projects;\n\n // get project for corresponding id\n Project tempProject = bean.retrieveById(100L);\n\n // get all projects\n projects = bean.retrieveAll();\n\n // get all projects with the name \"name\"\n projects = bean.searchByName(\"name\");\n\n // get all that match the given filter\n projects = bean.search(filter);\n\n // save or update a project\n bean.save(project);\n\n // delete the project\n bean.delete(project);\n\n // get project for corresponding id without projectChildren\n tempProject = bean.retrieveById(100L, false);\n\n // get project for corresponding id with projectChildren\n tempProject = bean.retrieveById(100L, true);\n\n // get all projects without projectChildrens\n projects = bean.retrieveAll(false);\n\n // get all projects with projectChildrens\n projects = bean.retrieveAll(true);\n\n // get projects by user\n projects = bean.getProjectsByUser(\"username\");\n\n // get all projects only\n projects = bean.retrieveAllProjectsOnly();\n\n // search projects by project name\n projects = bean.searchProjectsByProjectName(\"projectname\");\n\n // search projects by client name\n projects = bean.searchProjectsByClientName(\"clientname\");\n\n // get contest fees by project\n List<ProjectContestFee> fees = bean.getContestFeesByProject(100L);\n\n // save contest fees\n bean.saveContestFees(fees, 100L);\n\n // check client project permission\n boolean clientProjectPermission = bean.checkClientProjectPermission(\"username\", 100L);\n\n // check po number permission\n boolean poNumberPermission = bean.checkPoNumberPermission(\"username\", \"123456A\");\n\n // add user to billing projects.\n bean.addUserToBillingProjects(\"username\", new long[] {100, 101, 102});\n\n // remove user from billing projects.\n bean.removeUserFromBillingProjects(\"ivern\", new long[] {100, 201});\n\n // get the projects by the given client id.\n projects = bean.getProjectsByClientId(200);\n }",
"Page<UserPortfolioDTO> search(String query, Pageable pageable);",
"public static MapList getCurrentUserProjects(Context context, String[] args) throws MatrixException {\n MapList projectList = new MapList();\n try {\n // rp3 : This needs to be tested to make sure the result creates no issue and returns the same set\n projectList = (MapList) JPO.invoke(context, \"emxProjectSpace\", null, \"getAllProjects\", args, MapList.class);\n\n // rp3 : Replace this code with the JPO invoke from the program central API.\n /*\n * com.matrixone.apps.common.Person person = (com.matrixone.apps.common.Person) DomainObject.newInstance(context, DomainConstants.TYPE_PERSON); com.matrixone.apps.program.ProjectSpace\n * project = (com.matrixone.apps.program.ProjectSpace) DomainObject.newInstance(context, DomainConstants.TYPE_PROJECT_SPACE,DomainConstants.PROGRAM);\n * \n * String ctxPersonId = person.getPerson(context).getId(); person.setId(ctxPersonId);\n * \n * //System.out.println(\"the project id is \" + ctxPersonId);\n * \n * StringList busSelects = new StringList(11); busSelects.add(project.SELECT_ID); busSelects.add(project.SELECT_TYPE); busSelects.add(project.SELECT_NAME);\n * busSelects.add(project.SELECT_CURRENT);\n * \n * //projectList = project.getUserProjects(context,person,null,null,null,null); // expand to get project members Pattern typePattern = new Pattern(DomainConstants.TYPE_PROJECT_SPACE);\n * typePattern.addPattern(DomainConstants.TYPE_PROJECT_CONCEPT);\n * \n * projectList = (person.getRelatedObjects( context, // context DomainConstants.RELATIONSHIP_MEMBER, // relationship pattern typePattern.getPattern(), // type filter. busSelects, //\n * business selectables null, // relationship selectables true, // expand to direction false, // expand from direction (short) 1, // level null, // object where clause null)); //\n * relationship where clause\n */\n\n // System.out.println(\"the project list is \" + projectList);\n } catch (Exception ex) {\n throw (new MatrixException(\"emxMsoiPMCUtil:getCurrentUserProjects : \" + ex.toString()));\n }\n return projectList;\n }",
"public abstract List<ProjectBean> getProjectList();",
"public List<AbstractProject> getProjectList() {\n\t\tList<AbstractProject> projectList = new ArrayList<AbstractProject>();\n\t\tConnection conn = getConnection();\n\t\tPreparedStatement stmtSelect = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tStringBuilder sbSelect = new StringBuilder(SELECT)\n\t\t\t\t.append(projectIdColumnName).append(COMMA)\n\t\t\t\t.append(projectNameColumnName)\n\t\t\t\t.append(FROM).append(projectTableName);\n\n\t\t\tstmtSelect = conn.prepareStatement(sbSelect.toString());\n\t\t\trs = stmtSelect.executeQuery();\n\t\t\t\n\t\t\twhile (rs.next()) { \n\t\t\t\tAbstractProject project = (AbstractProject) ATElementFactory.createITreeComponent(projectType);\n\t\t\t\tproject.setId(rs.getInt(1));\n\t\t\t\tproject.setName(rs.getString(2));\n\t\t\t\tproject.setDescription(rs.getString(3));\n\t\t\t\tprojectList.add(project);\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DAOException(e);\n\t\t\t\n\t\t} finally {\n\t\t\tDbUtils.closeQuietly(conn);\n\t\t\tDbUtils.closeQuietly(stmtSelect);\n\t\t\tDbUtils.closeQuietly(rs);\n\t\t}\n\t\t\n\t\treturn projectList;\n\t}",
"@GetMapping(\"/getAll\")\r\n\tpublic List<Project> getAllProjects() {\r\n\t\treturn persistenceService.getAllProjects();\r\n\t}",
"@GetMapping(\"/projects\")\n @Timed\n public ResponseEntity<?> getAllProjects(\n @PageableDefault(size = Integer.MAX_VALUE) Pageable pageable,\n @RequestParam(name = \"minimized\", required = false, defaultValue = \"false\") Boolean\n minimized) throws NotAuthorizedException {\n log.debug(\"REST request to get Projects\");\n checkPermission(token, PROJECT_READ);\n Page<?> page = projectService.findAll(minimized, pageable);\n HttpHeaders headers = PaginationUtil\n .generatePaginationHttpHeaders(page, \"/api/projects\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }",
"public RowSet find(Object object) throws DAOException {\r\n\t\t\r\n\t\tif (!(object instanceof ProjectInfo))\r\n\t\t\tthrow new DAOException (\"invalid.object.projdao\",\r\n\t\t\t\t\tnull, DAOException.ERROR, true);\r\n\t\t\t\r\n\t\t\r\n\t\tString sqlstmt = DAOConstants.PROJ_FIND_MAIN;\r\n\t\t//ProjectInfo project = (ProjectInfo) object;\r\n\t\tStatementGenerator stmGen = StatementGeneratorFactory.getGenerator().getStmtGenerator(StatementGenProject.class.getSimpleName());\r\n\t\t\r\n\t\tString sqlWhere=null; \r\n\t\ttry {\r\n\t\t\tsqlWhere = stmGen.transformStmt(object, DAOConstants.STMT_TYPE_WHERE ); \r\n\t\t\t\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\t\r\n\r\n\t\tConnection conn = null;\r\n\t\tCachedRowSet crset =null;\r\n\t\t\ttry{\r\n\t\t\t\tlog.debug(\"finding ProjectInfo entry by specified fields\");\r\n\t\t\t\tconn = dbAccess.getConnection();\r\n\t\t\t\t\r\n\t\t\t\tsqlstmt = sqlstmt.replaceFirst(\"@\", sqlWhere);\r\n\r\n\t\t\t\tPreparedStatement stmt = conn.prepareStatement(sqlstmt);\r\n\r\n\t\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tcrset = new CachedRowSetImpl();\r\n\t\t\t crset.populate(rs);\r\n\t\t\t\t\r\n\t\t\t stmt.close();\t\t\t\t\r\n\t\t\t\trs.close();\r\n\t\t\t\tlog.debug(\"found ProjectInfo entry by specified fields\");\r\n\t\t\t\treturn crset;\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t} catch (DBAccessException e) {\r\n\t\t\t\tthrow new DAOException(e.getMessageKey(), e, DAOException.ERROR,\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tSystem.err.println(\"error_sql: \" + e.getMessage());\r\n\t\t\t\tthrow new DAOException(\"sql.findmain.exception.projdao\",\r\n\t\t\t\t\t\te, DAOException.ERROR, true);\r\n\t\t\t} finally {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdbAccess.closeConnection(conn);\r\n\t\t\t\t} catch (DBAccessException e1) {\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n \r\n\t}",
"List <ProjectAssignment> findAssignmentsByProject (int projectId);",
"Page<Accessprofile> listWithCriterasByPage(List<SearchCriteria> searchCriterias, Pageable pageable);",
"@Test(groups = { \"wso2.esb\" }, description = \"agilezen {listProjects} integration test with optional parameters.\")\n public void testListProjectsWithOptionalParameters() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:listProjects\");\n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_listProjects_optional.json\");\n \n final String apiEndPoint =\n apiRequestUrl + \"/projects?enrichments=\" + connectorProperties.getProperty(\"enrichments\");\n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertEquals(esbRestResponse.getBody().getString(\"page\"), apiRestResponse.getBody().getString(\"page\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"pageSize\"), apiRestResponse.getBody().getString(\n \"pageSize\"));\n Assert.assertEquals(esbRestResponse.getBody().getJSONArray(\"items\").getJSONObject(0).getString(\"id\"),\n apiRestResponse.getBody().getJSONArray(\"items\").getJSONObject(0).getString(\"id\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"totalItems\"), apiRestResponse.getBody().getString(\n \"totalItems\"));\n Assert.assertEquals(esbRestResponse.getBody().getJSONArray(\"items\").length(), apiRestResponse.getBody()\n .getJSONArray(\"items\").length());\n \n }",
"public List<TeamProjectCollectionReference> getProjectCollections(\r\n final Integer top, \r\n final Integer skip) {\r\n\r\n final UUID locationId = UUID.fromString(\"8031090f-ef1d-4af6-85fc-698cd75d42bf\"); //$NON-NLS-1$\r\n final ApiResourceVersion apiVersion = new ApiResourceVersion(\"2.1\"); //$NON-NLS-1$\r\n\r\n final NameValueCollection queryParameters = new NameValueCollection();\r\n queryParameters.addIfNotNull(\"$top\", top); //$NON-NLS-1$\r\n queryParameters.addIfNotNull(\"$skip\", skip); //$NON-NLS-1$\r\n\r\n final Object httpRequest = super.createRequest(HttpMethod.GET,\r\n locationId,\r\n apiVersion,\r\n queryParameters,\r\n APPLICATION_JSON_TYPE);\r\n\r\n return super.sendRequest(httpRequest, new TypeReference<List<TeamProjectCollectionReference>>() {});\r\n }",
"@Override\r\n\tpublic List<Project> viewAllProjects(String authToken) throws ManualException{\r\n\t\tfinal\tSession session=sessionFactory.openSession();\r\n\t\tList<Project> projectList =null;\r\n\r\n\t\t/* check for authToken of admin */\r\n\t\tsession.beginTransaction();\r\n\t\ttry{\r\n\t\t\tAuthTable authtable=session.get(AuthTable.class, authToken);\r\n\t\r\n\t\t\tUser user = authtable.getUser();\r\n\t\t\tif(user.getUsertype().equals(\"Admin\")){\r\n\t\t\t\tString hql=\"from project\";\r\n\t\t\t\tQuery q=session.createQuery(hql);\r\n\t\t\t\tprojectList=(List)q.list();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tprojectList=null;\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t\tsession.close();\r\n\t\t\treturn projectList;\r\n\t\t}\r\n\t}",
"@Override\n public List<String> getTissueIdsMatchingQuery(Query query, List<FimsProject> projectsToMatch) throws ConnectionException {\n\n\n if(query instanceof BasicSearchQuery) {\n String value = ((BasicSearchQuery)query).getSearchText();\n List<Query> queries = new ArrayList<Query>();\n for(DocumentField field : getSearchAttributes()) {\n queries.add(Query.Factory.createFieldQuery(field, Condition.APPROXIMATELY_EQUAL, value));\n }\n return getTissueIdsMatchingQuery(Query.Factory.createOrQuery(queries.toArray(new Query[queries.size()]), Collections.<String, Object>emptyMap()), null);\n }\n if(query instanceof CompoundSearchQuery && (((CompoundSearchQuery)query).getOperator() == CompoundSearchQuery.Operator.OR)) {\n Set<String> results = new LinkedHashSet<String>();\n for(Query q : ((CompoundSearchQuery)query).getChildren()) {\n results.addAll(getTissueIdsMatchingQuery(q, null));\n }\n return new ArrayList<String>(results);\n }\n final List<String> results = new ArrayList<String>();\n String querySQLString = getQuerySQLString(query);\n if(querySQLString == null) {\n return Collections.emptyList();\n }\n String sql = \"SELECT '\" + getTissueCol() + \"' FROM \"+tableId+\" WHERE \"+ querySQLString;\n System.out.println(sql);\n\n try {\n Sqlresponse sqlresponse = FusionTableUtils.queryTable(sql, requestTimeoutInSeconds);\n List<List<Object>> rows = sqlresponse.getRows();\n if(rows == null) {\n return Collections.emptyList();\n }\n for (List<Object> row : rows) {\n String decoded = getRowValue(row, 0);\n results.add(decoded);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n throw new ConnectionException(e.getMessage(), e);\n }\n\n return results;\n }",
"private void search(ActionEvent x) {\n\t\tString text = this.searchText.getText();\n\t\tif (text.equals(\"\")) {\n\t\t\tupdate();\n\t\t\treturn;\n\t\t}\n\t\tboolean flag = false;\n\t\tfor (Project p : INSTANCE.getProjects()) {\n\t\t\tif (p.getName().indexOf(text) != -1) {\n\t\t\t\tif (!flag) {\n\t\t\t\t\tthis.projects.clear();\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t\tthis.projects.addElement(p);\n\t\t\t}\n\t\t}\n\n\t\tif (!flag) {\n\t\t\tINSTANCE.getCurrentUser().sendNotification(new Notification((Object) INSTANCE, \"No results\"));\n\t\t\tthis.searchText.setText(\"\");\n\t\t}\n\t}",
"Page<ExamPackage> searchList(int pageNo, int pageSize, Sort sort);",
"public abstract KenaiProject[] getDashboardProjects(boolean onlyOpened);",
"@Override\n public List<ProjectDTO> findProjectListByUserName(String username) {\n\n List<ProjectEntity> projectEntityList = projectRepository.findByAssignedManager(userMapper.convertToUserEntity(userService.findByUserName(username)));\n\n projectEntityList.forEach(each->{\n each.setCompleteTaskCounts(taskService.totalCompletedTasks(each.getProjectCode()));\n each.setUnfinishedTaskCounts(taskService.totalNonCompleteTasks(each.getProjectCode()));\n });\n\n return projectEntityList.stream().map(projectMapper::convertToProjectDto).collect(Collectors.toList());\n }",
"public LearningResultHasActivity[] findWhereProjectCodeEquals(String projectCode) throws LearningResultHasActivityDaoException;",
"public List<Project> findByStates(States states){\n\t\tif(states != null){\n\t\t\treturn projectRepository.findByStates(states);\n\t\t}\n\t\treturn null;\n\t}",
"@Transactional(readOnly = true)\n public List<ProjectDTO> getProjectsAssignedToUser(String login) {\n User userByLogin = userRepository.findOneWithRolesByLogin(login).get();\n List<Project> projectsOfUser = new ArrayList<>();\n for (Role role : userByLogin.getRoles()) {\n // get all projects for admin\n if (AuthoritiesConstants.SYS_ADMIN.equals(role.getAuthority().getName())) {\n return projectMapper.projectsToProjectDTOs(projectRepository.findAll());\n }\n // get unique project from roles\n if (!projectsOfUser.contains(role.getProject())) {\n projectsOfUser.add(role.getProject());\n }\n }\n return projectMapper.projectsToProjectDTOs(projectsOfUser);\n }",
"@Override\n\tpublic List<Project> findProjectsByName(int ownerAccountId,\n\t\t\tString name, Set<String> currentPhases, boolean headerOnly) {\n\t\ttry {\n\t\t\tList<Project> projects = super.findDomainObjectsByStringColumnVal(ownerAccountId, outJoins,\n\t\t\t\t\t\"o.Name\", name, true, currentPhases, null);\n\t\t\treturn getQueryDetail(projects, headerOnly);\n\t\t}\n\t\tcatch (MustOverrideException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByName MustOverrideException: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByName Exception: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"private static void list_projects(String select, String list_heading) {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(select);\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tSystem.out.println(list_heading);\r\n\t\t\r\n\t\t\twhile (project_rset.next()) {\r\n\t\t\t\tSystem.out.println(\"Project ID: \" + project_rset.getInt(\"project_id\") + \r\n\t\t\t\t\t\t\"\\nProject Name: \" + project_rset.getString(\"project_name\") + \"\\n\");\r\n\t\t\t}\r\n\t\t/**\r\n\t\t * @exception When something cannot be retrieved from the database then an SQLException is thrown\t\r\n\t\t */\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t}",
"private void loadProjects() {\n\t\tprojectsList.clear();\n\t\t\n\t\tArrayList<Job> projects = jdbc.getProjects();\n\t\tfor (Job j : projects) {\n\t\t\tprojectsList.addElement(j.jobname);\n\t\t}\n\t}",
"public Projects findByProjectID(int proj_id){\n\t\tString sql = \"select * from projects where proj_id = \"+proj_id;\n\t\treturn getJdbcTemplate().queryForObject(sql, new BeanPropertyRowMapper<Projects>(Projects.class));\n\t}",
"Project findProjectById(Long projectId);",
"@Override\n\tpublic List<Project> findProjectsByParentProjectId(int ownerAccountId,\n\t\t\tint parentProjectId, Set<String> currentPhases, boolean headerOnly) {\n\t\ttry {\n\t\t\tList<Project> projects = super.<Integer>findDomainObjectsByGenericTypeColumnVal(ownerAccountId, outJoins,\n\t\t\t\t\t\"o.ParentProjectId\", parentProjectId, currentPhases, null);\n\t\t\treturn getQueryDetail(projects, headerOnly);\n\t\t}\n\t\tcatch (MustOverrideException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByParentProjectId MustOverrideException: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByParentProjectId Exception: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"private static void fetch_all_project_info(Statement stmt, String project_identifier, ResultSet project_rset)\r\n\t\t\tthrows SQLException {\r\n\t\tint get_project_id = 0;\r\n\t\ttry {\r\n\t\t\tint project_id = Integer.parseInt(project_identifier);\r\n\t\t\twhile (project_rset.next()) {\r\n\t\t\t\tif (project_rset.getInt(\"project_id\") == project_id) {\r\n\t\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\"ID: \" + project_rset.getInt(\"project_id\") + \r\n\t\t\t\t\t\t\t\"\\nName: \" + project_rset.getString(\"project_name\") + \r\n\t\t\t\t\t\t\t\"\\nBuilding Type: \" + project_rset.getString(\"building_type\") + \r\n\t\t\t\t\t\t\t\"\\nPhysical Address: \" + project_rset.getString(\"physical_address\") + \r\n\t\t\t\t\t\t\t\"\\nErf Number: \" + project_rset.getInt(\"erf_num\") + \r\n\t\t\t\t\t\t\t\"\\nCharged: R\" + project_rset.getInt(\"charged\") + \r\n\t\t\t\t\t\t\t\"\\nDue on: \" + project_rset.getDate(\"deadline_date\") + \r\n\t\t\t\t\t\t\t\"\\nPaid: R\" + project_rset.getInt(\"paid\") + \r\n\t\t\t\t\t\t\t\"\\nComplete On: \" + project_rset.getDate(\"completion_date\") +\r\n\t\t\t\t\t\t\t\"\\nStatus: \" + project_rset.getString(\"status\"));\r\n\t\t\t\t\tget_project_id = project_rset.getInt(\"project_id\");\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\tcatch(Exception e) {\r\n\t\t\t System.out.println(\"No ID detected. Searching by name\");\r\n\t\t\t while (project_rset.next()) {\r\n\t\t\t\t\tif (project_rset.getString(\"project_name\").equals(project_identifier)) {\r\n\t\t\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\"ID: \" + project_rset.getInt(\"project_id\") + \r\n\t\t\t\t\t\t\t\t\"\\nName: \" + project_rset.getString(\"project_name\") + \r\n\t\t\t\t\t\t\t\t\"\\nBuilding Type: \" + project_rset.getString(\"building_type\") + \r\n\t\t\t\t\t\t\t\t\"\\nPhysical Address: \" + project_rset.getString(\"physical_address\") + \r\n\t\t\t\t\t\t\t\t\"\\nErf Number: \" + project_rset.getInt(\"erf_num\") + \r\n\t\t\t\t\t\t\t\t\"\\nCharged: R\" + project_rset.getInt(\"charged\") + \r\n\t\t\t\t\t\t\t\t\"\\nDue on: \" + project_rset.getDate(\"deadline_date\") + \r\n\t\t\t\t\t\t\t\t\"\\nPaid: R\" + project_rset.getInt(\"paid\") + \r\n\t\t\t\t\t\t\t\t\"\\nComplete On: \" + project_rset.getDate(\"completion_date\") +\r\n\t\t\t\t\t\t\t\t\"\\nStatus: \" + project_rset.getString(\"status\"));\r\n\t\t\t\t\t\tget_project_id = project_rset.getInt(\"project_id\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\tString strSelectPeople = String.format(\"SELECT * FROM people WHERE projects = '%s';\", get_project_id);\r\n\t\tResultSet people_rset = stmt.executeQuery(strSelectPeople);\r\n\r\n\t\twhile (people_rset.next()) {\r\n\t\t\tif (people_rset.getString(\"type\").equals(\"Customer\")) {\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"\\nCustomer:\" +\r\n\t\t\t\t\t\t\"\\nName: \" + people_rset.getString(\"name\") + \" \" + people_rset.getString(\"surname\") + \r\n\t\t\t\t\t\t\"\\nContact: \" + people_rset.getString(\"email_address\") + \" \" + people_rset.getString(\"telephone_number\") + \r\n\t\t\t\t\t\t\"\\nAddress: \" + people_rset.getString(\"address\"));\r\n\t\t\t}\r\n\t\t\tif (people_rset.getString(\"type\").equals(\"Contractor\")) {\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"\\nContractor:\" +\r\n\t\t\t\t\t\t\"\\nName: \" + people_rset.getString(\"name\") + \" \" + people_rset.getString(\"surname\") + \r\n\t\t\t\t\t\t\"\\nContact: \" + people_rset.getString(\"email_address\") + \" \" + people_rset.getString(\"telephone_number\") + \r\n\t\t\t\t\t\t\"\\nAddress: \" + people_rset.getString(\"address\"));\r\n\t\t\t}\r\n\t\t\tif (people_rset.getString(\"type\").equals(\"Architect\")) {\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"\\nArchitect:\" +\r\n\t\t\t\t\t\t\"\\nName: \" + people_rset.getString(\"name\") + \" \" + people_rset.getString(\"surname\") + \r\n\t\t\t\t\t\t\"\\nContact: \" + people_rset.getString(\"email_address\") + \" \" + people_rset.getString(\"telephone_number\") + \r\n\t\t\t\t\t\t\"\\nAddress: \" + people_rset.getString(\"address\"));\r\n\t\t\t}\r\n\t\t\tif (people_rset.getString(\"type\").equals(\"Project Manager\")) {\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"\\nProject Manager:\" +\r\n\t\t\t\t\t\t\"\\nName: \" + people_rset.getString(\"name\") + \" \" + people_rset.getString(\"surname\") + \r\n\t\t\t\t\t\t\"\\nContact: \" + people_rset.getString(\"email_address\") + \" \" + people_rset.getString(\"telephone_number\") + \r\n\t\t\t\t\t\t\"\\nAddress: \" + people_rset.getString(\"address\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@RequestMapping(value = \"/project\", method = RequestMethod.GET)\n\tpublic Response getProjects() {\n\t\tResponse response = new Response();\n\t\ttry {\n\t\t\tList<Project> projects = projectService.getAllProjects();\n\t\t\tif (!projects.isEmpty()) {\n\t\t\t\tresponse.setCode(CustomResponse.SUCCESS.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.SUCCESS.getMessage());\n\t\t\t\tresponse.setData(transformProjectToPojectDto(projects));\n\t\t\t} else {\n\t\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\tlogger.error(\"get all project Failed \", e);\n\t\t}\n\t\treturn response;\n\t}",
"public void testRetrieveProjectsByNameAndVersion() throws RetrievalException {\r\n System.out.println(\"Demo 5: Retrieves the projects by name and version.\");\r\n\r\n // There might be more than one with this name and version (e.g., different catalog)\r\n ExternalProject[] projects = defaultDBProjectRetrieval.retrieveProject(\"Project A\", \"Version 1\");\r\n\r\n ExternalProject project = null;\r\n String[] technologies = null;\r\n for (int i = 0; i < projects.length; ++i) {\r\n // Outputs the info of each project.\r\n project = projects[i];\r\n System.out.println(project.getId());\r\n System.out.println(project.getName());\r\n System.out.println(project.getVersion());\r\n System.out.println(project.getCatalogId());\r\n System.out.println(project.getForumId());\r\n System.out.println(project.getShortDescription());\r\n System.out.println(project.getFunctionalDescription());\r\n technologies = project.getTechnologies(); // should not be null\r\n for (int t = 0; t < technologies.length; t++) {\r\n System.out.println(\"Uses technology: \" + technologies[t]);\r\n }\r\n }\r\n\r\n // Should only have a maximum of 2 entries but the order may vary.\r\n ExternalProject[] projects2 = defaultDBProjectRetrieval.retrieveProjects(\r\n new String[] {\"Project A\", \"Project C\"}, new String[] {\"Version 1\", \"Version 2\"});\r\n // Should get only one.\r\n System.out.println(projects2.length);\r\n System.out.println(projects2[0].getName());\r\n\r\n System.out.println();\r\n }",
"public List<Project> findProjectByEmpId(String employeeId) {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t\tString query = \"SELECT P.`PROJECT_ID`,PROJECT_NAME,MANAGER_ID FROM TA_PROJECTS P JOIN TA_EMPLOYEE_PROJECT E ON E.`PROJECT_ID` = P.`PROJECT_ID`\"\r\n\t\t\t\t+ \" WHERE EMPLOYEE_ID='\" + employeeId + \"'\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t\tprojectList.add(project);\r\n\t\t}\r\n\t\treturn projectList;\r\n\t}",
"public void search() {\n\n lazyModel = new LazyDataModel<Pesquisa>() {\n private static final long serialVersionUID = -6541913048403958674L;\n\n @Override\n public List<Pesquisa> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters) {\n\n pesquisarBC.searhValidation(searchParam);\n\n int count = pesquisarBC.count(searchParam);\n lazyModel.setRowCount(count);\n\n if (count > 0) {\n if (first > count) {\n // Go to last page\n first = (count / pageSize) * pageSize;\n }\n SearchFilter parameters = new SearchFilter();\n parameters.setFirst(first);\n parameters.setPageSize(pageSize);\n List<Pesquisa> list = pesquisarBC.search(searchParam, parameters);\n\n logger.info(\"END: load\");\n return list;\n } else {\n return null;\n }\n }\n };\n\n }",
"@GetMapping(\"/byName\")\r\n\tpublic List<Project> getProject(Principal principal) {\r\n\t\treturn persistenceService.getProject(AppBuilderUtil.getLoggedInUserId());\r\n\t}",
"public static void search() {\n int userSelected = selectFromList(crudParamOptions);\n switch (userSelected){\n case 1:\n searchFirstName();\n break;\n case 2:\n searchLastName();\n break;\n case 3:\n searchPhone();\n break;\n case 4:\n searchEmail();\n break;\n default:\n break;\n }\n }",
"public ArrayList<Project> selectProject(String projectId) {\n\n try {\n ArrayList<Project> tasks = new ArrayList<Project>();\n\n String query = \"SELECT * FROM TASKS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(query);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n String hours = rs.getString(\"HOURS\");\n String hoursadded = rs.getString(\"HOURS_ADDED\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(description, hours, hoursadded,\n projectId);\n tasks.add(p);\n }\n rs.close();\n ps.close();\n return tasks;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }",
"public static ArrayList<Team> findTeamProject() throws DALException {\n\t\t\tConnection cnx = null;\n\t\t\tPreparedStatement pstmt = null;\n\t\t\tResultSet rs = null;\n\t\t\tArrayList<Team> listTeams = new ArrayList<>();\n\n\t\t\ttry {\n\t\t\t\t// Connection DB\n\t\t\t\tcnx = DBConnection.connect();\n\t\t\t\tpstmt = cnx.prepareStatement(LIST_TEAMS_PROJECTS);\n\t\t\t\trs = pstmt.executeQuery();\n\n\t\t\t\t// For each team\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tTeam team = new Team();\n\t\t\t\t\tteam.setIdTeam(rs.getInt(\"Teams_IdTeams\"));\n\t\t\t\t\tteam.setName(rs.getString(\"Teams_name\"));\n\t\t\t\t\tteam.setIdProject(rs.getInt(\"idProjects\"));\n\t\t\t\t\tteam.setNameProject(rs.getString(\"nameProject\"));\n\t\t\t\t\tlistTeams.add(team);\n\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\n\t\t\t\tthrow new DALException(\"Problem - listTeamHisProject - TeamDAO - Request : \"+ pstmt+ \" \" + e.getMessage());\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (rs != null)\n\t\t\t\t\t\trs.close();\n\t\t\t\t\tif (pstmt != null)\n\t\t\t\t\t\tpstmt.close();\n\t\t\t\t\tif (cnx != null)\n\t\t\t\t\t\tcnx.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tthrow new DALException(\"Problem - Closing connection - \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn listTeams;\n\n\t\t}",
"@Override\n\tpublic Projects findByProjectName(String name) {\n\t\tString sql = \"select * from projects where lower(proj_name)=lower('\"+name+\"')\";\n\t\treturn getJdbcTemplate().queryForObject(sql, new BeanPropertyRowMapper<Projects>(Projects.class));\n\t}",
"public List<Post> search(PostCriteria criteria, int page, int size);",
"@RequestMapping(value = \"findbysearchtext\", method = RequestMethod.GET, produces = {\n MediaType.APPLICATION_JSON_VALUE })\n @ResponseStatus(HttpStatus.OK)\n @ResponseBody\n public List<Scoring> findBySearchText(@RequestParam String projectId, @RequestParam String sortBy,\n @RequestHeader(value = RANGE) String range, @RequestParam(required = false) Integer limit,\n @RequestParam String searchText, HttpServletRequest request, HttpServletResponse response) throws Exception {\n sortBy = \"-id\";\n PagingAndSorting page = new PagingAndSorting(range, sortBy, limit, Scoring.class);\n Page<Scoring> pageResponse = scoreService.findAllBySearchText(page, Long.parseLong(projectId), searchText);\n response.setHeader(GenericConstants.CONTENT_RANGE_HEADER, page.getPageHeaderValue(pageResponse));\n return pageResponse.getContent();\n }",
"@GetMapping(\"\")\n\t@CrossOrigin(origins = \"http://localhost:3000\")\n\tpublic List<Project> getProjects()\n\t{\n\t\treturn projectService.findAll();\n\t}",
"@Query(value = \"SELECT * FROM questions_aides_project WHERE token_project=?1 \", nativeQuery = true)\n List<QuestionAidesProjectModel> findByProject(String tokenProject);",
"@Override\n\tpublic List<Project> findProjectsByProjectManager2Id(int ownerAccountId,\n\t\t\tint projectMgr2Id, Set<String> currentPhases, boolean headerOnly) {\n\t\ttry {\n\t\t\tList<Project> projects = super.<Integer>findDomainObjectsByGenericTypeColumnVal(ownerAccountId, outJoins,\n\t\t\t\t\t\"o.ProjectManager2Id\", projectMgr2Id, currentPhases, null);\n\t\t\treturn getQueryDetail(projects, headerOnly);\n\t\t}\n\t\tcatch (MustOverrideException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByProjectManager2Id MustOverrideException: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByProjectManager2Id Exception: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"public List<SearchKeyword> getByDsKeyProject(String dsKey) {\r\n StringBuilder sbHql = new StringBuilder();\r\n sbHql.append(\"from SearchKeyword sk\");\r\n sbHql.append(\" join fetch sk.project p\");\r\n sbHql.append(\" where p.dsKey = :dsKey\");\r\n\r\n Query query = getSession().createQuery(sbHql.toString());\r\n query.setParameter(\"dsKey\", dsKey);\r\n List<SearchKeyword> searchKeyword = query.list();\r\n return searchKeyword;\r\n }",
"List<Project> getProjectsWithChanges(List<Project> projects);",
"@Transactional(readOnly = true) \n public Page<TaskProject> findAll(Pageable pageable) {\n log.debug(\"Request to get all TaskProjects\");\n Page<TaskProject> result = taskProjectRepository.findAll(pageable);\n return result;\n }",
"public ArrayList getRisksForAProject(RisksCaptureBean captureBean,\r\n\t\t\tSession hibernateSession) throws ParseException {\r\n\r\n\t\tArrayList list = new ArrayList();\r\n\t\tCommonBaseDao commonBaseDao = BaseDaoFactory\r\n\t\t\t\t.getInstance(DaoConstants.BASE_DAO_CLASS);\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MMM-yyyy\");\r\n\t\tCalendar calendar1 = Calendar.getInstance();\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tif (captureBean.getFromDate() != null\r\n\t\t\t\t&& !captureBean.getFromDate().equalsIgnoreCase(\"\")) {\r\n\r\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tcalendar.set(Calendar.MINUTE, 0);\r\n\t\t\tcalendar.set(Calendar.SECOND, 0);\r\n\t\t\tcalendar.setTime(sdf.parse(captureBean.getFromDate()));\r\n\t\t}\r\n\t\tif (captureBean.getToDate() != null\r\n\t\t\t\t&& !captureBean.getToDate().equalsIgnoreCase(\"\")) {\r\n\r\n\t\t\tcalendar1.set(Calendar.HOUR_OF_DAY, 23);\r\n\t\t\tcalendar1.set(Calendar.MINUTE, 59);\r\n\t\t\tcalendar1.set(Calendar.SECOND, 59);\r\n\t\t\tcalendar1.setTime(sdf.parse(captureBean.getToDate()));\r\n\t\t\tcalendar1.add(Calendar.DATE, 1);\r\n\t\t}\r\n\r\n\t\tPagingSorting pagingSorting = captureBean.getPagingSorting();\r\n\t\tif (pagingSorting == null) {\r\n\t\t\tpagingSorting = new PagingSorting();\r\n\t\t\tcaptureBean.setPagingSorting(pagingSorting);\r\n\t\t}\r\n\t\tpagingSorting.setPagingSorting(true, true);\r\n\r\n\t\tpagingSorting.setDefaultifNotPresent(\"projissueid\",\r\n\t\t\t\tPagingSorting.increment, 1);\r\n\r\n\t\tpagingSorting.setMode(\"hibernate\");\r\n\t\tCriteria ce = hibernateSession.createCriteria(TtrnProjectrisks.class);\r\n\t\tce.createAlias(\"ttrnProject\", \"ttrnProject\");\r\n\r\n\t\tif (captureBean.getProjectId() != null\r\n\t\t\t\t&& !captureBean.getProjectId().equalsIgnoreCase(\r\n\t\t\t\t\t\tAppConstants.INI_VALUE)) {\r\n\t\t\tce.add(Restrictions.eq(\"ttrnProject.projectid\", new Long(\r\n\t\t\t\t\tcaptureBean.getProjectId())));\r\n\t\t}\r\n\t\tif (captureBean.getProjectName() != null\r\n\t\t\t\t&& !captureBean.getProjectName().equalsIgnoreCase(\r\n\t\t\t\t\t\tAppConstants.INI_VALUE)) {\r\n\t\t\tce.add(Restrictions.ilike(\"ttrnProject.projectName\", captureBean\r\n\t\t\t\t\t.getProjectName(), MatchMode.ANYWHERE));\r\n\t\t}\r\n\t\tif (captureBean.getToDate() != null\r\n\t\t\t\t&& captureBean.getFromDate() != null\r\n\t\t\t\t&& !(captureBean.getToDate().equalsIgnoreCase(\"\") && captureBean\r\n\t\t\t\t\t\t.getFromDate().equalsIgnoreCase(\"\"))) {\r\n\r\n\t\t\tce.add(Restrictions.between(\"createddate\", new Date(calendar\r\n\t\t\t\t\t.getTime().getTime()), new Date(calendar1.getTime()\r\n\t\t\t\t\t.getTime())));\r\n\r\n\t\t}\r\n\t\tif (ce.list() != null) {\r\n\r\n\t\t\tlist = (ArrayList) ce.list();\r\n\t\t\tpagingSorting.setRecordCount(list.size());\r\n\t\t}\r\n\t\tce.setFirstResult(pagingSorting.getStartRecordId());\r\n\t\tce.setMaxResults(pagingSorting.getPageRecords());\r\n\t\tlist = (ArrayList) ce.list();\r\n\t\treturn list;\r\n\t}",
"Page<T> search(Pageable pageable, QueryBuilder query);",
"@Override\n\tpublic List<Project> findProjectsByOwnerAccountId(int ownerAccountId,\n\t\t\tSet<String> currentPhases, boolean headerOnly) {\n\t\tif (ownerAccountId <= 0)\n\t\t\treturn null;\n\t\ttry {\n\t\t\tList<Project> projects = super.findDomainObjectsByOwnerAccountId(ownerAccountId, outJoins,\n\t\t\t\t\tcurrentPhases, null);\n\t\t\treturn getQueryDetail(projects, headerOnly);\n\t\t}\n\t\tcatch (MustOverrideException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByOwnerAccountId MustOverrideException: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByOwnerAccountId Exception: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}"
] | [
"0.739421",
"0.69549596",
"0.67917967",
"0.6738938",
"0.67102265",
"0.6616768",
"0.6612095",
"0.6535425",
"0.63959306",
"0.63784397",
"0.63119525",
"0.6309713",
"0.6277891",
"0.6196299",
"0.61827385",
"0.61468077",
"0.61385167",
"0.61339706",
"0.61116964",
"0.6037494",
"0.6016146",
"0.5983059",
"0.5936405",
"0.59097284",
"0.58659583",
"0.58247143",
"0.581787",
"0.5784086",
"0.5763247",
"0.574895",
"0.57382977",
"0.573205",
"0.5702036",
"0.5694327",
"0.56908786",
"0.5675859",
"0.56719756",
"0.5666455",
"0.5628345",
"0.5627623",
"0.5623449",
"0.56144106",
"0.55987245",
"0.5596358",
"0.55773664",
"0.5573721",
"0.5550375",
"0.55408597",
"0.55393124",
"0.5534178",
"0.5529154",
"0.55275106",
"0.54918766",
"0.54902077",
"0.5482969",
"0.5476921",
"0.5460579",
"0.5441238",
"0.543106",
"0.54083234",
"0.5408005",
"0.54018646",
"0.53959334",
"0.5393745",
"0.5377995",
"0.53721744",
"0.53694296",
"0.535722",
"0.53456724",
"0.53389627",
"0.5333123",
"0.5328221",
"0.5327983",
"0.53270996",
"0.5324712",
"0.5322816",
"0.5315759",
"0.53157485",
"0.5306573",
"0.5305371",
"0.5304672",
"0.53036195",
"0.529894",
"0.5297761",
"0.5296581",
"0.52795",
"0.5277713",
"0.5275053",
"0.5263479",
"0.5251477",
"0.5250468",
"0.5248423",
"0.5229484",
"0.52254647",
"0.5222537",
"0.52097213",
"0.5206488",
"0.51972646",
"0.51911926",
"0.51882136"
] | 0.6356931 | 10 |
Get the information of one project by its id. | Project getById(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Project getProjectDetails(String id) {\n\t\tProject pro;\n\t\tObject name = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet res = null;\n\t\tpro = null;\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tcon = DBUtility.getConnection();\n\t\t\t\tString sql = \"select * from project_master where project_id='\"\n\t\t\t\t\t\t+ id + \"'\";\n\t\t\t\tst = con.prepareStatement(sql);\n\t\t\t\tres = st.executeQuery(sql);\n\t\t\t\tif (res.next()) {\n\t\t\t\t\tpro = new Project();\n\t\t\t\t\tpro.setPro_name(res.getString(\"project_name\"));\n\t\t\t\t\tpro.setSite_addr(res.getString(\"project_location\"));\n\t\t\t\t\tpro.setC_name(res.getString(\"client_name\"));\n\t\t\t\t\tpro.setDate(res.getString(\"project_date\"));\n\t\t\t\t\tpro.setSite_details(res.getString(\"project_details\"));\n\t\t\t\t\tpro.setSite_no_floors(res.getString(\"project_no_floor\"));\n\t\t\t\t\tpro.setSite_no_units(res.getString(\"project_no_unit\"));\n\t\t\t\t\tpro.setGar_name(res.getString(\"gar_name\"));\n\t\t\t\t\tpro.setGar_rel(res.getString(\"gar_rel\"));\n\t\t\t\t\tpro.setMunicipality(res.getString(\"municipality\"));\n\t\t\t\t\tpro.setWord_no(res.getString(\"word_no\"));\n\t\t\t\t\tpro.setPro_typ(res.getString(\"project_type\"));\n\t\t\t\t\tpro.setContact1(res.getString(\"Contact1\"));\n\t\t\t\t\tpro.setContact2(res.getString(\"Contact2\"));\n\t\t\t\t\tpro.setEmail1(res.getString(\"Email1\"));\n\t\t\t\t\tpro.setEmail2(res.getString(\"Email2\"));\n\t\t\t\t}\n\t\t\t} catch (SQLException s) {\n\t\t\t\ts.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t\treturn null;\n\t\t\t} catch (NamingException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t}\n\t\t} finally {\n\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t}\n\t\treturn pro;\n\t}",
"@Override\n\tpublic Project getProjectById(int id) {\n\t\treturn projectDao.getProjectById(id);\n\t}",
"public Project findById(Integer id) {\n Session session = SessionManager.getSessionFactory().openSession();\n //The find method returns the object with the provided id\n Project project = session.find(Project.class, id);\n session.close();\n return project;\n }",
"public Project getProjectById(String id) {\n\t\tSQLiteQueryBuilder q = new SQLiteQueryBuilder();\n\t\tq.setTables(Constants.TABLE_PROJECTS);\n\n\t\tCursor cursor = q.query(database, null, Constants.COLUMN_ID + \" = ?\", new String[] { id }, null, null, null);\n\t\tcursor.moveToFirst();\n\n\t\tif (cursor.getCount() > 0)\n\t\t\treturn new Project(cursor);\n\t\telse\n\t\t\treturn null;\n\t}",
"@Transactional(readOnly = true) \n public TaskProject findOne(Long id) {\n log.debug(\"Request to get TaskProject : {}\", id);\n TaskProject taskProject = taskProjectRepository.findOne(id);\n return taskProject;\n }",
"TrackerProjects getTrackerProjects(final Integer id);",
"@RequestMapping(value = \"/hrProjectInfos/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<HrProjectInfo> getHrProjectInfo(@PathVariable Long id) {\n log.debug(\"REST request to get HrProjectInfo : {}\", id);\n HrProjectInfo hrProjectInfo = hrProjectInfoRepository.findOne(id);\n return Optional.ofNullable(hrProjectInfo)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"Project findProjectById(String projectId);",
"public Project getProject(Long projectId);",
"public Project findByPrimaryKey(int id) throws ProjectDaoException {\n\t\tProject ret[] = findByDynamicSelect(SQL_SELECT + \" WHERE ID = ?\", new Object[] { new Integer(id) });\n\t\treturn ret.length == 0 ? null : ret[0];\n\t}",
"public Project getProjectDetail(String idOrKey) throws IOException {\n\t\tif (client == null)\n\t\t\tthrow new IllegalStateException(\"HTTP Client not Initailized\");\n\t\t\n\t\tclient.setResourceName(Constants.JIRA_RESOURCE_PROJECT + \"/\" + idOrKey);\n\t\tClientResponse response = client.get();\n\t\t\t\t\t\n\t\tString content = response.getEntity(String.class);\t\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, true);\n\t\t\n\t\tTypeReference<Project> ref = new TypeReference<Project>(){};\n\t\tProject prj = mapper.readValue(content, ref);\n\t\t\n\t\treturn prj;\n\t}",
"@Override\n\tpublic Project getProjectById(int id) {\n\t\treturn null;\n\t}",
"ProjectsDTO findOne(String id);",
"TrackerProjects loadTrackerProjects(final Integer id);",
"Project findProjectById(Long projectId);",
"void getAllProjectList(int id);",
"@Override\n\tpublic Project findProjectById(int id) {\n\t\ttry {\n\t\t\tProject project = super.findDomainObjectById(id, outJoins);\n\t\t\tif (project != null) {\n\t\t\t\tproject = this.readProjectDetail(project);\n\t\t\t}\n\t\t\treturn project;\n\t\t}\n\t\tcatch (MustOverrideException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectById MustOverrideException: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectById Exception: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"java.lang.String getProjectId();",
"public void Found_project_from_DATABASE(int id){\n print_pro();\n// return project;\n }",
"ProjectDTO findProjectById(Long id);",
"public Integer getProjectID() { return projectID; }",
"Project selectByPrimaryKey(Long id);",
"public Project findProjectById(String projectId) {\n\t\tProject project = null;\r\n\t\tString query = \"SELECT FROM TA_PROJECTS WHERE PROJECT_ID='\" + projectId + \"'\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t}\r\n\t\treturn project;\r\n\t}",
"public int getProjectID() {\n return projectID;\n }",
"private Project getProject(ModelInfo<Project> info) {\n return data.get(info);\n }",
"@Override\n\tpublic ProjectDTO getPartialForProjectPageForId( int id ) throws SQLException {\n\t\t\n\t\tProjectDTO result = null;\n\t\t\n\t\tfinal String querySQL = \n\t\t\t\t\"SELECT title, abstract, project_locked, public_access_level \"\n\t\t\t\t+ \" FROM project_tbl \"\n\t\t\t\t+ \" WHERE id = ?\"\n\t\t\t\t+ \" AND marked_for_deletion != \" + Database_OneTrueZeroFalse_Constants.DATABASE_FIELD_TRUE;\n\t\t\n\t\ttry ( Connection dbConnection = super.getDBConnection();\n\t\t\t PreparedStatement preparedStatement = dbConnection.prepareStatement( querySQL ) ) {\n\t\t\t\n\t\t\tpreparedStatement.setInt( 1, id );\n\t\t\t\n\t\t\ttry ( ResultSet rs = preparedStatement.executeQuery() ) {\n\t\t\t\tif ( rs.next() ) {\n\t\t\t\t\tresult = new ProjectDTO();\n\t\t\t\t\tresult.setId( id );\n\t\t\t\t\tresult.setTitle( rs.getString( \"title\" ) );\n\t\t\t\t\tresult.setAbstractText( rs.getString( \"abstract\" ) );\n\t\t\t\t\t{\n\t\t\t\t\t\tint fieldIntValue = rs.getInt( \"project_locked\" );\n\t\t\t\t\t\tif ( fieldIntValue == Database_OneTrueZeroFalse_Constants.DATABASE_FIELD_TRUE ) {\n\t\t\t\t\t\t\tresult.setProjectLocked( true );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tint publicAccessLevel = rs.getInt( \"public_access_level\" );\n\t\t\t\t\tif ( ! rs.wasNull() ) {\n\t\t\t\t\t\tresult.setPublicAccessLevel( publicAccessLevel );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( RuntimeException e ) {\n\t\t\tString msg = \"SQL: \" + querySQL;\n\t\t\tlog.error( msg, e );\n\t\t\tthrow e;\n\t\t} catch ( SQLException e ) {\n\t\t\tString msg = \"SQL: \" + querySQL;\n\t\t\tlog.error( msg, e );\n\t\t\tthrow e;\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public String getProjectId() {\n return getProperty(Property.PROJECT_ID);\n }",
"public ProjectIdea getProjectIdea(int id){\n //String sql = \"SELECT * FROM project_idea WHERE idea_id = ?\";\n try{\n ProjectIdea result = super.queryForId(id);\n return result;\n } catch(SQLException e){\n System.out.println(e.getMessage());\n }\n return null;\n }",
"public void testRetrieveProjectsById() throws RetrievalException {\r\n System.out.println(\"Demo 4: Retrieves the projects by id.\");\r\n\r\n // Retrieve a known project\r\n ExternalProject project = defaultDBProjectRetrieval.retrieveProject(2);\r\n System.out.println(project.getId());\r\n\r\n // Outputs its info.\r\n System.out.println(project.getComponentId());\r\n System.out.println(project.getForumId());\r\n System.out.println(project.getName());\r\n System.out.println(project.getVersion());\r\n System.out.println(project.getVersionId());\r\n System.out.println(project.getDescription());\r\n System.out.println(project.getComments());\r\n System.out.println(project.getShortDescription());\r\n System.out.println(project.getFunctionalDescription());\r\n String[] technologies = project.getTechnologies(); // should not be null\r\n for (int t = 0; t < technologies.length; t++) {\r\n System.out.println(\"Uses technology: \" + technologies[t]);\r\n }\r\n\r\n // Not found ĘC should be null which is acceptable\r\n ExternalProject shouldBeNull = defaultDBProjectRetrieval.retrieveProject(Long.MAX_VALUE);\r\n System.out.println(shouldBeNull);\r\n\r\n // Should only have a maximum of 1 entry.\r\n ExternalProject[] projects = defaultDBProjectRetrieval.retrieveProjects(new long[] {1, 100});\r\n System.out.println(projects.length);\r\n System.out.println(projects[0].getName());\r\n\r\n System.out.println();\r\n }",
"public java.lang.Object getProjectID() {\n return projectID;\n }",
"@GetMapping(value = \"/getProjectDetails/mongodb/{theId}\")\n\tpublic List<ProjectDescStake> getProjectByIdMongo(@PathVariable (value =\"theId\") Long theId)\n\t{\n\t\treturn this.integrationClient.findProjectByIdMongo(theId);\n\t}",
"public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }",
"@GET\n\t@Path(\"getParticularProject/{projectId}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getParticularProject(\n\t\t\t@PathParam(\"projectId\") Integer projectId) throws Exception {\n\n\t\tProjectTO projectTO = null;\n\n\t\ttry {\n\t\t\tHashMap<String, Object> queryMap = new HashMap<String, Object>();\n\t\t\tqueryMap.put(\"projectId\", projectId);\n\n\t\t\tProjectMaster project = (ProjectMaster) GenericDaoSingleton\n\t\t\t\t\t.getGenericDao().findUniqueByQuery(\n\t\t\t\t\t\t\tConstantQueries.GET_PARTICULAR_PROJECT_BY_ID,\n\t\t\t\t\t\t\tqueryMap);\n\n\t\t\tif (project == null) {\n\t\t\t\tSystem.out.println(\"Project not found\");\n\t\t\t\tprojectTO = null;\n\t\t\t\treturn Response.status(Response.Status.NOT_FOUND)\n\t\t\t\t\t\t.entity(projectTO).build();\n\t\t\t}\n\n\t\t\tprojectTO = new ProjectTO();\n\t\t\t// projectMaster = (Object[]) projectList.get(i);\n\t\t\tprojectTO.setProject_id(project.getProject_id());\n\t\t\tprojectTO.setProject_name(project.getProject_name());\n\t\t\tprojectTO.setProject_status(project.getProject_status());\n\t\t\tprojectTO.setProject_creation_date(project\n\t\t\t\t\t.getProject_creation_date());\n\t\t\tprojectTO.setAccount_id(project.getAccountMaster().getAccount_id());\n\n\t\t\treturn Response.status(Response.Status.OK).entity(projectTO)\n\t\t\t\t\t.build();\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t\tprojectTO = null;\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Error while getting Projects in Project Config service\");\n\t\t\treturn Response.status(Response.Status.INTERNAL_SERVER_ERROR)\n\t\t\t\t\t.entity(projectTO).build();\n\t\t}\n\n\t}",
"public ProjectCart getSingleProjectCart(Integer id) {\n\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n try {\n\n results = session.find(\"from ProjectCart as projectCart where projectCart.projectCartId = ?\",\n new Object[]{id},\n new Type[]{Hibernate.INTEGER});\n\n\n\n } /*\n * If the object is not found, i.e., no Item exists with the\n * requested id, we want the method to return null rather\n * than throwing an Exception.\n *\n */ catch (ObjectNotFoundException onfe) {\n return null;\n } catch (HibernateException e) {\n /*\n * All Hibernate Exceptions are transformed into an unchecked\n * RuntimeException. This will have the effect of causing the\n * user's request to return an error.\n *\n */\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n if (results.isEmpty()) {\n return null;\n } else {\n return (ProjectCart) results.get(0);\n }\n\n }",
"@Override\n\tpublic List<Project> getProjectsByUserId(int id) {\n\t\treturn projectDao.getProjectsByUserId(id);\n\t}",
"public String getProjectId() {\n return projectId;\n }",
"public Projects findByProjectID(int proj_id){\n\t\tString sql = \"select * from projects where proj_id = \"+proj_id;\n\t\treturn getJdbcTemplate().queryForObject(sql, new BeanPropertyRowMapper<Projects>(Projects.class));\n\t}",
"public String getProjectId() {\r\n return projectId;\r\n }",
"@GetMapping(\"/byProjectName/{projectName}\")\r\n\tpublic Project getProjectDetails(@PathVariable String projectName) {\r\n\t\treturn persistenceService.getProjectDetails(projectName);\r\n\t}",
"public GitLabProject getProject(Serializable projectId) throws IOException {\n String tailUrl = String.format(\"/projects/%s\", gitLabAPI.sanitize(projectId));\n return gitLabAPI.retrieve().to(tailUrl, GitLabProject.class);\n }",
"public Integer getProjectId() {\n return projectId;\n }",
"@Override\n public ProjectproductDTO findOne(String id) {\n log.debug(\"Request to get Projectproduct : {}\", id);\n Projectproduct projectproduct = projectproductRepository.findOne(UUID.fromString(id));\n ProjectproductDTO projectproductDTO = projectproductMapper.projectproductToProjectproductDTO(projectproduct);\n return projectproductDTO;\n }",
"private Project getProject(ActivityDTO dto) {\n\t\treturn projectDAO.findById(dto.getProjectId()).get();\n//\t\treturn projectDAO.getOne(dto.getProjectId());\n\t}",
"@Override\n\tpublic List<ProjectInfo> findProject(ProjectInfo project) {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findProject\",project);\n\t}",
"public Integer getProjectId() {\n return projectId;\n }",
"public Integer getProjectId() {\n return projectId;\n }",
"public int getProjectId()\r\n\t{\r\n\t\treturn projectId;\r\n\t}",
"public Proyecto proyectoPorId(int id) {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tProyecto proyecto =plantilla.getForObject(\"http://localhost:5000/proyectos/\" + id, Proyecto.class);\n\t\t\treturn proyecto;\n\t\t}",
"public Project getProjectById(int projectId) throws InexistentProjectException, SQLException {\n return getMandatoryProject(projectId);\n }",
"public String getProjId() {\n return projId;\n }",
"public long getProjectId() {\r\n return projectId;\r\n }",
"public Project getProjectByName(String name);",
"@GetMapping(\"/project/{projectId}\")\n public Object doGet(@RequestParam(value = \"full\", defaultValue = \"false\") boolean full,\n @PathVariable(\"projectId\") Long projectId) throws InvalidIdentifierException {\n if(full)\n return service.fullInfo(projectId);\n else\n return service.getProjectById(projectId);\n }",
"@Schema(example = \"00000000-0000-0000-0000-000000000000\", description = \"Unique ID of the project\")\n public String getId() {\n return id;\n }",
"public Long getProjectId() {\n return projectId;\n }",
"public static Project getProject() {\n if (ProjectList.size() == 0) {\n System.out.print(\"No Projects were found.\");\n return null;\n }\n\n System.out.print(\"\\nPlease enter the project number: \");\n int projNum = input.nextInt();\n input.nextLine();\n\n for (Project proj : ProjectList) {\n if (proj.projNum == projNum) {\n return proj;\n }\n }\n\n System.out.print(\"\\nProject was not found. Please try again.\");\n return getProject();\n }",
"@Override\n @Transactional(readOnly = true)\n public Optional<ProjectTypeId> findOne(Long id) {\n log.debug(\"Request to get ProjectTypeId : {}\", id);\n return projectTypeIdRepository.findById(id);\n }",
"@Nonnull\n public String getProjectId() {\n return projectId;\n }",
"@GetMapping(value = \"/getProjectDetails/{sqlId}\")\n\tpublic List<Project> getProjectByIdSQL(@PathVariable Long sqlId)\n\t{\n\t\treturn this.integrationClient.findProjectByIdSQL(sqlId);\n\t}",
"@Query(\"SELECT * FROM Project WHERE id = :projectId\")\n LiveData<Project> getProject(long projectId);",
"public String getProjectId() {\n\t\treturn projectId;\n\t}",
"public ArrayList<Project> selectProject(String projectId) {\n\n try {\n ArrayList<Project> tasks = new ArrayList<Project>();\n\n String query = \"SELECT * FROM TASKS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(query);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n String hours = rs.getString(\"HOURS\");\n String hoursadded = rs.getString(\"HOURS_ADDED\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(description, hours, hoursadded,\n projectId);\n tasks.add(p);\n }\n rs.close();\n ps.close();\n return tasks;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }",
"@Transient\n @JsonProperty(\"project\")\n public Long getProjectId() {\n if (project == null) {\n return 0L;\n } else {\n return project.getId();\n }\n }",
"public ProjectInfo getProjectInfo()\n {\n\treturn c_projectInfo;\n }",
"@GetMapping(\"/my_projects/{id}\")\n public ResponseEntity<ProjectDtoExtendedForUser> getMyProjectById(@PathVariable long id){\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n String currentUserName = authentication.getName();\n User currentUser = userService.findByEmail(currentUserName).orElseThrow(\n () -> {throw new MyNotFoundException(\"User not found\");}\n );\n\n ProjectDtoExtendedForUser projectDtoExtendedForUser = new ProjectDtoExtendedForUser();\n\n Project project = projectService.findById(id).get();\n\n UsersOnProjects usersOnProjects = usersOnProjectsService.findByUsersOnProjectsPK(new UsersOnProjectsPK(currentUser, project));\n\n projectDtoExtendedForUser.setId(project.getId());\n projectDtoExtendedForUser.setName(project.getName());\n projectDtoExtendedForUser.setCompany_name(project.getCompany().getName());\n projectDtoExtendedForUser.setCEO_username(project.getCompany().getCEO().getUsername());\n projectDtoExtendedForUser.setCEO_email(project.getCompany().getCEO().getEmail());\n projectDtoExtendedForUser.setStart_date(project.getStart_date());\n projectDtoExtendedForUser.setStatus(project.getStatus());\n projectDtoExtendedForUser.setPosition(usersOnProjects.getPosition().getName());\n projectDtoExtendedForUser.setBase_salary(usersOnProjects.getBase_salary());\n projectDtoExtendedForUser.setRate(usersOnProjects.getRate());\n projectDtoExtendedForUser.setWeek_work_time(usersOnProjects.getWeek_work_time());\n\n return ResponseEntity.ok(projectDtoExtendedForUser);\n }",
"@GET(\"projects/session/{session_id}\")\n Call<ResponseBody> getAllProjects(@Path(\"session_id\") int id);",
"private static void search_by_id() {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t\tSystem.out.println(\"Project id: \");\r\n\t\t\tString project_id_str = input.nextLine();\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tfetch_all_project_info(stmt, project_id_str, project_rset);\r\n\t\t/**\r\n\t\t * @exception If entered project id cannot be found in the projects table then an SQLException is thrown\r\n\t\t */\t\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t\t\r\n\t}",
"public Project getProject()\n {\n \treturn project;\n }",
"@GetMapping(\"/byName\")\r\n\tpublic List<Project> getProject(Principal principal) {\r\n\t\treturn persistenceService.getProject(AppBuilderUtil.getLoggedInUserId());\r\n\t}",
"private ModelInfo<Project> getProjectInfo(String projectName) {\n return name2Info.get(projectName);\n }",
"Project getByPrjNumber(Integer num);",
"public String projectId() {\n return this.projectId;\n }",
"@GetMapping(\"/projects/{projectName:\" + Constants.ENTITY_ID_REGEX + \"}\")\n @Timed\n public ResponseEntity<ProjectDTO> getProject(@PathVariable String projectName)\n throws NotAuthorizedException {\n checkPermission(token, PROJECT_READ);\n log.debug(\"REST request to get Project : {}\", projectName);\n ProjectDTO projectDto = projectService.findOneByName(projectName);\n checkPermissionOnOrganizationAndProject(token, PROJECT_READ,\n projectDto.getOrganization().getName(), projectDto.getProjectName());\n return ResponseEntity.ok(projectDto);\n }",
"public Number getProjectId() {\n return (Number) getAttributeInternal(PROJECTID);\n }",
"public Integer getProjectId() {\n\t\treturn projectId;\n\t}",
"@GetMapping(\"/project-attachemnts/{id}\")\n @Timed\n public ResponseEntity<ProjectAttachemntDTO> getProjectAttachemnt(@PathVariable String id) {\n log.debug(\"REST request to get ProjectAttachemnt : {}\", id);\n ProjectAttachemntDTO projectAttachemntDTO = projectAttachemntService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(projectAttachemntDTO));\n }",
"public Project getProject(int projectId) throws EmployeeManagementException;",
"@Override\n\tpublic Project getProjectByName(String name) {\n\t\treturn projectDao.getProjectByName(name);\n\t}",
"@GetMapping(\"/showme/{name}\")\n\t@ResponseBody\n\tpublic Optional<Project> retrieveProjectsByName(@PathVariable(\"name\") String name){\n\t\tOptional<Project> t = projectrepository.findProjectByName(name);\n\t\treturn t;\n\t}",
"@GET\n @Path(\"/configAsTable/{project_id}\")\n @Produces(MediaType.TEXT_HTML)\n public Response getProjectConfig(@PathParam(\"project_id\") Integer project_id) {\n HttpSession session = request.getSession();\n Object username = session.getAttribute(\"user\");\n\n if (username == null) {\n throw new UnauthorizedRequestException(\"You must be this project's admin in order to view its configuration\");\n }\n projectMinter project = new projectMinter();\n String response = project.getProjectConfigAsTable(project_id, username.toString());\n project.close();\n return Response.ok(response).build();\n }",
"public Project getProject(){\n\t\treturn this.project;\n\t}",
"public Project getProject() {\r\n return project;\r\n }",
"Optional<ProjectCodeDTO> findOne(Long id);",
"public Project getProject()\n {\n return project;\n }",
"@RequestMapping(value = \"/project-hours/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<ProjectHour> getProjectHour(@PathVariable Long id) {\n log.debug(\"REST request to get ProjectHour : {}\", id);\n ProjectHour projectHour = projectHourService.findOne(id);\n return Optional.ofNullable(projectHour)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"com.appscode.api.auth.v1beta1.Project getProject();",
"@Override\n //@Transactional(readOnly = true)\n public ProjectTransactionRecordDTO findOne(Long id) {\n log.debug(\"Request to get ProjectTransactionRecord : {}\", id);\n ProjectTransactionRecord projectTransactionRecord = projectTransactionRecordRepository.findOne(id);\n return projectTransactionRecordMapper.toDto(projectTransactionRecord);\n }",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/projects/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Project> readProject(\n @Path(\"name\") String name);",
"public Project getProject(String name){\n\t\tfor ( Project p : m_Projects){\n\t\t\tif(p.getName().equals(name)) return p;\n\t\t}\n\t\treturn null;\n\t}",
"public Paciente get( Long id ) {\r\n\t\t\tlogger.debug(\"Retrieving codigo with id: \" + id);\r\n\t\t\t\r\n\t\t\t/*for (Paciente paciente:codigos) {\r\n\t\t\t\tif (paciente.getId().longValue() == id.longValue()) {\r\n\t\t\t\t\tlogger.debug(\"Found record\");\r\n\t\t\t\t\treturn paciente;\r\n\t\t\t\t}\r\n\t\t\t}*/\r\n\t\t\t\r\n\t\t\tlogger.debug(\"No records found\");\r\n\t\t\treturn null;\r\n\t\t}",
"public Project getProject() {\n return project;\n }",
"public Project getProject() {\n return project;\n }",
"void getProjectByID(Integer projectID, AsyncCallback<Project> callback);",
"public Profilo get( Integer id ) {\r\n\t\t//Recupero la sessione da Hibernate\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\t\t\r\n\t\t//Recupero il Profilo\r\n\t\tProfilo profilo = (Profilo) session.get(Profilo.class, id);\r\n\t\t\r\n\t\t//Restituisco il Profilo trovato\r\n\t\treturn profilo;\r\n\t}",
"@Transactional(readOnly = true)\r\n public DirectProjectCPConfig get(long directProjectId) throws ContributionServiceException {\r\n String signature = CLASS_NAME + \".get(long directProjectId)\";\r\n\r\n return getEntity(signature, DirectProjectCPConfig.class, directProjectId, \"directProjectId\");\r\n }",
"protected PublicInfo getPublicInfoById(int id) {\n\t\treturn publicInfoManager.getPublicInfoById(id);\n\t}",
"public static Project Construct(String id)\n\t{\n\t\treturn new Project(id);\n\t}",
"@GetMapping(\"/{email:.+}/{projectId}\")\n\t@CrossOrigin(origins = \"http://localhost:3000\")\n\tpublic Project getProjectByEmailAndId(@PathVariable(\"email\") String email,\n\t\t\t@PathVariable(\"projectId\") Long projectId) {\n\t\tStakeholder user = userService.findStakeholderByEmail(email);\n\t\tList<Project> projects = userService.getStakeholderProjects(user);\n\t\tfor (Project project : projects) {\n\t\t\tif (project.getProjectId() == projectId) {\n\t\t\t\treturn project;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\tpublic Project readProjectDetail(Project project) {\n\t\tif (project == null)\n\t\t\treturn null;\n\n\t\t// To do: uncomment\n\t\tif (project.getProjectManager1Id() > 0)\n\t\t\t;\n\t\t\t//project.setProjectManager1Name(employeeDao.getEmployeeNameById(project.getProjectManager1Id()));\n\t\tif (project.getProjectManager2Id() > 0)\n\t\t\t;\n\t\t\t//project.setProjectManager2Name(employeeDao.getEmployeeNameById(project.getProjectManager2Id()));\n\n\t\treturn project;\n\t}",
"@GetMapping(\"projekat/{id}\")\n\tprivate Projekat getProjekat(@PathVariable(\"id\") Integer id) {\n\t\treturn projekatRepository.getOne(id);\n\t}"
] | [
"0.80235714",
"0.78352684",
"0.7688585",
"0.7640409",
"0.756081",
"0.748615",
"0.7447433",
"0.73976284",
"0.7382248",
"0.7348412",
"0.72942835",
"0.723851",
"0.7221583",
"0.72195506",
"0.71573436",
"0.71279436",
"0.7104674",
"0.7071442",
"0.69972473",
"0.69739467",
"0.69327855",
"0.6921388",
"0.68767637",
"0.6852461",
"0.68344647",
"0.68102896",
"0.67870563",
"0.67715955",
"0.67683375",
"0.6760058",
"0.67586726",
"0.6728827",
"0.6725763",
"0.6682026",
"0.6674879",
"0.6674688",
"0.66592205",
"0.66563624",
"0.664686",
"0.6631552",
"0.663153",
"0.6620791",
"0.6576697",
"0.6528271",
"0.65269953",
"0.65269953",
"0.6516202",
"0.6504023",
"0.6502844",
"0.64989436",
"0.64861804",
"0.6472961",
"0.64654064",
"0.6462919",
"0.64539933",
"0.6437608",
"0.64272094",
"0.6379895",
"0.6372522",
"0.63559717",
"0.6352941",
"0.63213223",
"0.631946",
"0.631749",
"0.63133764",
"0.63018024",
"0.6289866",
"0.62898445",
"0.6283283",
"0.6270742",
"0.6268636",
"0.62684846",
"0.6268404",
"0.62530375",
"0.6251721",
"0.6244972",
"0.6235655",
"0.62268966",
"0.6224993",
"0.62236476",
"0.6211016",
"0.620623",
"0.6189926",
"0.6180852",
"0.61692727",
"0.6164656",
"0.6159629",
"0.61562574",
"0.6144388",
"0.6137197",
"0.6136711",
"0.6136711",
"0.6136062",
"0.6126592",
"0.61261487",
"0.6116825",
"0.6114247",
"0.6111984",
"0.61115825",
"0.6110776"
] | 0.8307632 | 0 |
Clone one project from existing one. | Long clone(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cloneProject(String selectedProjectName, String newProjectName) throws Exception{\n\t\tDataManager.createFolderVersion(selectedProjectName, newProjectName);\n\t\tajdtHandler.copyProject(selectedProjectName, newProjectName);\n\t}",
"public void projectClone(Project projectToBeCloned){\r\n\t\tthis.projectName = projectToBeCloned.getProjectName();\r\n\t\tthis.userName = projectToBeCloned.getUserName();\r\n\t\tthis.dateCreated = projectToBeCloned.getDateCreated();\r\n\t\tthis.dateEdited = projectToBeCloned.getDateEdited();\r\n\t\tthis.projectButton=projectToBeCloned.getProjectButton();\r\n\t\tthis.projectNameLabel=projectToBeCloned.getProjectNameLabel();\r\n\r\n\t}",
"private void cloneProjectAux(Company cloneCompany, Project cloneProj, Project originalProj) {\n\tString key = ProjectAux.constructKey(originalProj);\n\tProjectAux originalAux = this.projectAuxValueRepo.get(key);\n\tProjectAux cloneAux = originalAux.clone();\n\tcloneAux.setCompany(cloneCompany);\n\tcloneAux.setProject(cloneProj);\n\tthis.projectAuxValueRepo.set(cloneAux);\n }",
"public void createProject(Project newProject);",
"public IProject getNewProject() {\r\n\t\treturn newProject;\r\n\t}",
"private IProject createNewProject() {\r\n\t\tif (newProject != null) {\r\n\t\t\treturn newProject;\r\n\t\t}\r\n\r\n\t\t// get a project handle\r\n\t\tfinal IProject newProjectHandle = mainPage.getProjectHandle();\r\n\r\n\t\t// get a project descriptor\r\n\t\tURI location = mainPage.getLocationURI();\r\n\r\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\r\n\t\tfinal IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());\r\n\t\tdescription.setLocationURI(location);\r\n\r\n\t\tlog.info(\"Project name: \" + newProjectHandle.getName());\r\n\t\t//log.info(\"Location: \" + location.toString());\r\n\t\t\r\n\t\t// create the new project operation\r\n\t\tIRunnableWithProgress op = new IRunnableWithProgress() {\r\n\t\t\tpublic void run(IProgressMonitor monitor)\r\n\t\t\t\t\tthrows InvocationTargetException {\r\n\t\t\t\tCreateProjectOperation op = new CreateProjectOperation(description, ResourceMessages.NewProject_windowTitle);\r\n\t\t\t\ttry {\r\n\t\t\t\t\top.execute(monitor, WorkspaceUndoUtil.getUIInfoAdapter(getShell()));\r\n\t\t\t\t} catch (ExecutionException e) {\r\n\t\t\t\t\tthrow new InvocationTargetException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// run the new project creation operation\r\n\t\ttry {\r\n\t\t\tgetContainer().run(true, true, op);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tlog.error(\"Project creation failed.\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t} catch (InvocationTargetException e) {\r\n\t\t\tlog.error(\"Project creation failed.\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tnewProject = newProjectHandle;\r\n\r\n\t\treturn newProject;\r\n\t}",
"private void cloneProject(Company cloneCompany, Project originalProj, Project cloneProj,\n\t Set<Staff> originalStaffSet, Map<Long, Staff> oldIdToNewStaff) {\n\n\t// Get the set of original staff,\n\t// loop through the processed map and\n\t// get equivalent clones given the ID.\n\tcloneProj.setId(0);\n\tcloneProj.setCompany(cloneCompany);\n\tcloneProj.setAuditLogs(null);\n\n\t// Update collections.\n\tSet<Staff> clonedStaffSet = getClonedEquivalent(originalStaffSet, oldIdToNewStaff);\n\tcloneProj.setAssignedFields(null);\n\tcloneProj.setAssignedTasks(null);\n\tcloneProj.setAssignedStaff(clonedStaffSet);\n\tthis.projectDAO.create(cloneProj);\n }",
"Project createProject();",
"Project createProject();",
"Project createProject();",
"public Project getProjectByName(String name);",
"Project getProject();",
"public void copyProjectsAction(){\n\t\t\tAsyncCallback<BmUpdateResult> callback = new AsyncCallback<BmUpdateResult>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\tstopLoading();\n\t\t\t\t\tif (caught instanceof StatusCodeException && ((StatusCodeException) caught).getStatusCode() == 0) {\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-copyProject() ERROR: \" + caught.toString());\n\t\t\t\t\t\tcopyProjectDialog();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(BmUpdateResult result) {\n\t\t\t\t\tif(!result.hasErrors()) {\n\t\t\t\t\t\tstopLoading();\n\t\t\t\t\t\tdialogClose();\n\t\t\t\t\t\tBmoProject bmoProject = (BmoProject) result.getBmObject();\n\t\t\t\t\t\tUiProjectDetail uiProjectDetail = new UiProjectDetail(getUiParams(),\n\t\t\t\t\t\t\t\tbmoProject.getId());\n\t\t\t\t\t\tuiProjectDetail.show();\n\n\t\t\t\t\t\tgetUiParams().getUiTemplate().hideEastPanel();\n\t\t\t\t\t\tUiProject uiProject = new UiProject(getUiParams());\n\t\t\t\t\t\tuiProject.edit(bmoProject);\n\t\t\t\t\t\tshowSystemMessage(\"Copia Exitosa.\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstopLoading();\n\t\t\t\t\t\tcopyProjectDialog();\n\t\t\t\t\t\tshowSystemMessage(result.getBmErrorList().get(0).getMsg());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Llamada al servicio RPC\n\t\t\ttry {\n\t\t\t\tif (!isLoading()) {\n\t\t\t\t\tstartLoading();\n\t\t\t\t\tif(copyProjectSuggestBox.getSelectedId() > 0) {\n\t\t\t\t\t\tbmoProject.setId(copyProjectSuggestBox.getSelectedId());\n\t\t\t\t\t\tgetUiParams().getBmObjectServiceAsync().action(bmoProject.getPmClass(), bmoProject, BmoProject.ACCESS_COPYPROJECT, \"\" + customerSuggestBox.getSelectedId(), callback);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstopLoading();\n\t\t\t\t\t\tshowErrorMessage(this.getClass().getName() + \" ERROR: \" + \"Debe seleccionar Projecto\");\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} catch (SFException e) {\n\t\t\t\tstopLoading();\t\t\t\t\n\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-action() ERROR: \" + e.toString());\n\t\t\t}\n\t\t}",
"public abstract Pessoa clone();",
"public static Project creer(String name){\n\t\treturn new Project(name);\n\t}",
"Object clone();",
"Object clone();",
"public Project(String name) {\n this.name = name;\n }",
"HibProject getProject(InternalActionContext ac);",
"public IProject getProject();",
"LectureProject createLectureProject();",
"public SetFolderPermissionsPage setCopyFromExistingProject(String projectToCopy)\n {\n RadioButton radio = new RadioButton(Locator.xpath(\"//td[./label[text()='Copy From Existing Project']]/input\")\n .waitForElement(getDriver(), WAIT_FOR_JAVASCRIPT));\n radio.set(true);\n\n waitFor(() ->\n { // Workaround: erratic combo-box behavior\n try{_ext4Helper.selectComboBoxItem(Locator.xpath(\"//table[@id='targetProject']\"), projectToCopy);}\n catch (NoSuchElementException recheck) {return false;}\n\n if (!getFormElement(Locator.css(\"#targetProject input\")).equals(projectToCopy))\n {\n click(Locator.xpath(\"//table[@id='targetProject']\"));\n return false;\n }\n else\n {\n return true;\n }\n },\n \"Failed to select project\", WAIT_FOR_JAVASCRIPT);\n\n return this;\n }",
"@Override\n public Project getProject() {\n return super.getProject();\n }",
"@SuppressWarnings(\"synthetic-access\")\n\t\tpublic GitHubProject build() {\n\t\t\treturn new GitHubProject(this);\n\t\t}",
"void clone(RemoteConfig source) throws GitException, InterruptedException;",
"VcsRepositoryUrl copyRepository(String sourceProjectKey, String sourceRepositoryName, String targetProjectKey, String targetRepositoryName) throws VersionControlException;",
"public Project getProject(Long projectId);",
"private Project getProject(ActivityDTO dto) {\n\t\treturn projectDAO.findById(dto.getProjectId()).get();\n//\t\treturn projectDAO.getOne(dto.getProjectId());\n\t}",
"private static IProject createBaseProject(String projectName, URI location) {\n // it is acceptable to use the ResourcesPlugin class\n IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);\n \n if (!newProject.exists()) {\n URI projectLocation = location;\n IProjectDescription desc = newProject.getWorkspace().newProjectDescription(newProject.getName());\n if (location != null && ResourcesPlugin.getWorkspace().getRoot().getLocationURI().equals(location)) {\n projectLocation = null;\n }\n \n desc.setLocationURI(projectLocation);\n try {\n newProject.create(desc, null);\n if (!newProject.isOpen()) {\n newProject.open(null);\n }\n } catch (CoreException e) {\n e.printStackTrace();\n }\n }\n \n return newProject;\n }",
"public Project build() {\n return new Project(descriptor.build());\n }",
"private void cloneFields(Project originalProj, Project cloneProj) {\n\tSet<FieldAssignment> origianlFAssignments = originalProj.getAssignedFields();\n\tif (origianlFAssignments != null) {\n\t for (FieldAssignment originalAssign : origianlFAssignments) {\n\t\tFieldAssignment cloneField = originalAssign.clone();\n\t\tcloneField.setProject(cloneProj);\n\t\tthis.fieldDAO.assignFieldToProject(cloneField);\n\t }\n\t}\n }",
"@Ignore\n @Test\n public void test_clone_scenario(){\n try {\n TestData X = new TestData(\"project2.opt\");\n X.project.clone_scenario(\"scenarioA\",\"new_scenario\");\n assertTrue(\n X.project.get_scenario_with_name(\"scenarioA\")\n .equals(X.project.get_scenario_with_name(\"new_scenario\")) );\n } catch (Exception e) {\n fail(e.getMessage());\n }\n }",
"public Project createProjectFromPRJ() {\n\n\t\tSystem.out.println(\"Trying to load prj file with : \" + data_path + \" \" + projectName + \" \" + conceptName + \" \");\n\n\t\tProject project = null;\n\n\t\ttry {\n\n\t\t\tproject = new Project(data_path + projectName);\n\n\t\t\t// Sehr wichtig hier das Warten einzubauen, sonst gibts leere\n\t\t\t// Retrieval Results, weil die Faelle noch nicht geladen sind wenn\n\t\t\t// das\n\t\t\t// Erste Retrieval laueft\n\t\t\twhile (project.isImporting()) {\n\t\t\t\tThread.sleep(1000);\n\t\t\t\tSystem.out.print(\".\");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\"); // console pretty print\n\t\t} catch (Exception ex) {\n\n\t\t\tSystem.out.println(\"Error when loading the project\");\n\t\t}\n\t\treturn project;\n\t}",
"public Function clone();",
"@Override\n\tpublic Project getProjectByName(String name) {\n\t\treturn projectDao.getProjectByName(name);\n\t}",
"public Carta clone(){\n\t\treturn new Carta(palo, numero);\n\t}",
"private Vm cloneVm(final Vm vm) {\n final Vm clone = new VmSimple((long) vm.getMips(), (int) vm.getNumberOfPes());\n /*\n It' not required to set an ID for the clone.\n It is being set here just to make it easy to\n relate the ID of the vm to its clone,\n since the clone ID will be 10 times the id of its\n source VM.\n */\n clone.setId(vm.getId() * 10);\n clone.setDescription(\"Clone of VM \" + vm.getId());\n clone\n .setSize(vm.getStorage().getCapacity())\n .setBw(vm.getBw().getCapacity())\n .setRam(vm.getBw().getCapacity())\n .setCloudletScheduler(new CloudletSchedulerTimeShared());\n System.out.printf(\"\\n\\n#Cloning VM %d from Host %d\\n\\tMips %.2f Number of Pes: %d\\n\",\n vm.getId(), vm.getHost().getId(), clone.getMips(), clone.getNumberOfPes());\n\n return clone;\n }",
"public static Builder newProject(String name) {\n return new Builder(name);\n }",
"public Project(String name) {\r\n\t\tsuper(name);\r\n\t\tthis.opened = true;\r\n\t\tthis.projectFile = null;\r\n\t}",
"@SuppressWarnings(\"resource\")\n @Test\n public void testClone() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127625049L), 88,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"18fa817e-9d24-4344-a79a-ab19db23016c\", -15,\n \"7b9ca8ca-2f09-4496-b67e-f3a146e5c741\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127627362L));\n ApiKey apikey2 = apikey1.clone();\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }",
"public LibraryElement cloneElement();",
"private BoardSpace[][] boardClone(BoardSpace[][] board) {\n BoardSpace[][] newBoard = new BoardSpace[board.length][board[0].length];\n\n for (int row = 0; row < TicTacToeModel.BOARD_DIMENSION; row++) {\n for (int col = 0; col < TicTacToeModel.BOARD_DIMENSION; col++) {\n newBoard[row][col] = board[row][col].clone();\n }\n }\n\n return newBoard;\n }",
"@Override\n public Game cloneGame(){\n GridGame clone = new pegsolitaire();\n clone.pieces = new LinkedList<Piece>();\n for(Piece pc : pieces){\n clone.pieces.add(pc.clonePiece());\n }\n clone.current_player = current_player;\n clone.size_x = size_x;\n clone.size_y = size_y;\n return clone;\n }",
"public Clone() {}",
"private boolean createProject() {\r\n ProjectOverviewerApplication app = (ProjectOverviewerApplication)getApplication();\r\n Projects projects = app.getProjects();\r\n String userHome = System.getProperty(\"user.home\");\r\n // master file for projects management\r\n File projectsFile = new File(userHome + \"/.hackystat/projectoverviewer/projects.xml\");\r\n \r\n // create new project and add it to the projects\r\n Project project = new Project();\r\n project.setProjectName(this.projectName);\r\n project.setOwner(this.ownerName);\r\n project.setPassword(this.password);\r\n project.setSvnUrl(this.svnUrl);\r\n for (Project existingProject : projects.getProject()) {\r\n if (existingProject.getProjectName().equalsIgnoreCase(this.projectName)) {\r\n return false;\r\n }\r\n }\r\n projects.getProject().add(project);\r\n \r\n try {\r\n // create the specific tm3 file and xml file for the new project\r\n File tm3File = new File(userHome + \r\n \"/.hackystat/projectoverviewer/\" + this.projectName + \".tm3\");\r\n File xmlFile = new File(userHome + \r\n \"/.hackystat/projectoverviewer/\" + this.projectName + \".xml\");\r\n tm3File.createNewFile();\r\n \r\n // initialize the data for the file\r\n SensorDataCollector collector = new SensorDataCollector(app.getSensorBaseHost(), \r\n this.ownerName, \r\n this.password);\r\n collector.getRepository(this.svnUrl, this.projectName);\r\n collector.write(tm3File, xmlFile);\r\n } \r\n catch (IOException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n // write the projects.xml file with the new project added\r\n String packageName = \"org.hackystat.iw.projectoverviewer.jaxb.projects\";\r\n return XmlConverter.objectToXml(projects, projectsFile, packageName);\r\n }",
"public Search<SolutionType> copy() throws CoreHunterException;",
"public void testClone() {\n System.out.println(\"clone\");\n Play instance = new Play(\"Player1\", new Card(Rank.QUEEN, Suit.SPADES));\n Play expResult = instance;\n Play result = instance.clone();\n assertNotSame(expResult, result);\n }",
"public Project(Long projectId) {\n this.id = projectId;\n this.groups = new HashSet<>();\n this.nextGroupId = 0L;\n this.symbols = new HashSet<>();\n this.nextSymbolId = 1L;\n\n this.userId = 0L;\n this.mirrorUrls = \"\";\n }",
"private Project compileProject() {\n\t\t\tProject p = null;\n\t\t\t\n\t\t\tif(pType.equals(\"o\")) {\n\t\t\t\ttry {\n\t\t\t\t\tp = new OngoingProject(pCode.getText(), pName.getText(), dateFormat.parse(pSDate.getText()),pClient.getText(), dateFormat.parse(pDeadline.getText()), Double.parseDouble(pBudget.getText()), Integer.parseInt(pCompletion.getText()));\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} else if(pType.equals(\"f\")) {\n\t\t\t\ttry {\n\t\t\t\t\tp = new FinishedProject(pCode.getText(), pName.getText(), dateFormat.parse(pSDate.getText()),pClient.getText(), dateFormat.parse(pEndDate.getText()), Double.parseDouble(pTotalCost.getText()));\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\n\t\t\treturn p;\n\t\t}",
"public IVenda clone ();",
"public CommonDDBean cloneVersion(String version) {\n return (CommonDDBean) clone();\n }",
"public Object clone();",
"public Object clone();",
"public Object clone();",
"public Object clone();",
"public static void repoClone() throws IOException, InvalidRemoteException, TransportException, GitAPIException {\n\t\tFile localPath = new File(\"testRuby\");\n\t\tboolean directoryExist = localPath.exists();\n\t\tlocalPath.delete();\n\t\t// then clone\n\t\tSystem.out.println(\"Cloning from \" + REMOTE_URL + \" to \" + localPath);\n\t\tFileRepositoryBuilder builder = new FileRepositoryBuilder();\n\t\tRepository repository = builder.setWorkTree(localPath).readEnvironment().build();\n\t\tGit git = new Git(repository);\n\t\tif (!directoryExist) {\n\t\t\ttry (Git result = git.cloneRepository().setURI(REMOTE_URL).setDirectory(localPath).call()) {\n\t\t\t\t// Note: the call() returns an opened repository already which\n\t\t\t\t// needs to be closed to avoid file handle leaks!\n\t\t\t\tSystem.out.println(\"Having repository: \" + result.getRepository().getDirectory());\n\t\t\t}\n\t\t} else {\n\t\t\tPullResult pullresult=git.pull().call();\n\t\t\t// Note: the call() returns an opened repository already which needs\n\t\t\t// to be closed to avoid file handle leaks!\n\t\t\tSystem.out.println(\"pulled repository: \" + pullresult.isSuccessful());\n\n\t\t}\n\t}",
"public Sudoku clone() {\n\t\tSudoku s = new Sudoku(this.B);\n\t\ts.fileName = this.getFileName();\n\t\t// clone the puzzle\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tfor (int j = 1; j <= N; j++) {\n\t\t\t\ts.puzzle[i][j] = puzzle[i][j];\n\t\t\t}\n\t\t}\n\t\t// clone the constraints table\n\t\tfor (int i = 0; i <= N + 1; i++) {\n\t\t\tfor (int j = 0; j <= N; j++) {\n\t\t\t\ts.constraints[i][j] = (BitSet) constraints[i][j].clone();\n\t\t\t}\n\t\t}\n\t\t// clone the nonAssignedCells\n\t\ts.nonAssignedCells.addAll(this.nonAssignedCells);\n\t\treturn s;\n\t}",
"public static Port getCopy(Port port , String NewName) {\n\t\tPort copyport = behavFactory.createPort();\n\t\tPortDefinition pd = ((DefinitionBinding)port.getBinding()).getDefinition() ; \n\t\tPortDefinition copyportdefinition = getCopy(pd);\n\t\tcopyportdefinition.setName(NewName) ; \n\t\tcopyport = (Port) EcoreUtil.copy(port);\t\n\t\t((DefinitionBinding)copyport.getBinding()).setDefinition(copyportdefinition) ; \n\t\tcopyport.setName(NewName) ; \n\t\treturn copyport;\n\t}",
"public Project(String name){\n\t\tthis.pName = name;\n\t}",
"public PanelNewProject getNewProject(){\n return nuevoProyecto;\n }",
"public DescriptiveFramework clone();",
"Project getById(Long id);",
"private void copyReference(String oldKey, String newKey) {\n Object orig = getProject().getReference(oldKey);\n if (orig == null) {\n log(\"No object referenced by \" + oldKey + \". Can't copy to \"\n + newKey,\n Project.MSG_WARN);\n return;\n }\n \n Class c = orig.getClass();\n Object copy = orig;\n try {\n Method cloneM = c.getMethod(\"clone\", new Class[0]);\n if (cloneM != null) {\n copy = cloneM.invoke(orig, new Object[0]);\n log(\"Adding clone of reference \" + oldKey, Project.MSG_DEBUG);\n }\n } catch (Exception e) {\n // not Clonable\n }\n \n \n if (copy instanceof ProjectComponent) {\n ((ProjectComponent) copy).setProject(newProject);\n } else {\n try {\n Method setProjectM =\n c.getMethod(\"setProject\", new Class[] {Project.class});\n if (setProjectM != null) {\n setProjectM.invoke(copy, new Object[] {newProject});\n }\n } catch (NoSuchMethodException e) {\n // ignore this if the class being referenced does not have\n // a set project method.\n } catch (Exception e2) {\n String msg = \"Error setting new project instance for \"\n + \"reference with id \" + oldKey;\n throw new BuildException(msg, e2, getLocation());\n }\n }\n newProject.addReference(newKey, copy);\n }",
"private Project(){}",
"private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}",
"public void createProject(String name) {\n Project project = new Project(name);\n Leader leader = new Leader(this, project);\n project.addLeader(leader);\n }",
"private AppTProject populateAndSaveProjectDetails(Project project, boolean isNewProject) {\r\n\t\t// Project Details\r\n\t\tAppTProject appTProject = null;\r\n\t\tif (isNewProject) {\r\n\t\t\t// Creates a new Project Entity\r\n\t\t\tappTProject = new AppTProject();\r\n\t\t\tappTProject.setCreatedDate(new Date(System.currentTimeMillis()));\r\n\t\t} else {\r\n\t\t\t// Retrieves the existing Project Entity \r\n\t\t\tappTProject = projectRepository.getOne(project.getProjectId());\r\n\t\t\tappTProject.setModifiedDate(new Date(System.currentTimeMillis()));\r\n\t\t}\r\n\t\tappTProject.setProjectName(project.getProjectName());\r\n\t\tappTProject.setPriority(project.getPriority());\r\n\t\tappTProject.setStartDate(project.getStartDate());\r\n\t\tappTProject.setEndDate(project.getEndDate());\r\n\t\tappTProject.setActive(project.getActive());\r\n\t\tif (null != project.getUser()) {\r\n\t\t\tAppTUser appTUser = new AppTUser();\r\n\t\t\tBeanUtils.copyProperties(project.getUser(), appTUser);\r\n\t\t\tappTProject.setUser(appTUser);\r\n\t\t}\r\n\t\treturn projectRepository.save(appTProject);\r\n\t}",
"Prototype makeCopy();",
"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}",
"@POST\n @Path(\"accept\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public Factory acceptFactory(final Factory factory) {\n final ProjectImporter importer = getGitProjectImporter();\n\n //try to check if factory contains project name value otherwise we set default project name to \"Unnamed\"\n ProjectAttributes projectAttributes = factory.getProjectattributes();\n if (projectAttributes == null) {\n projectAttributes = DtoFactory.getInstance().createDto(ProjectAttributes.class).withPname(DEFAULT_PROJECT_NAME);\n factory.setProjectattributes(projectAttributes);\n } else if (projectAttributes.getPname() == null || projectAttributes.getPname().isEmpty()) {\n projectAttributes = factory.getProjectattributes().withPname(DEFAULT_PROJECT_NAME);\n }\n\n List<FolderEntry> existedFolders = projectManager.getProjectsRoot(workspace).getChildFolders();\n\n //if project with the same name exist we should create new one with another name.\n for (FolderEntry existProject : existedFolders) {\n if (projectAttributes.getPname().equals(existProject.getName())) {\n projectAttributes.setPname(NameGenerator.generate(projectAttributes.getPname(), 4));\n break;\n }\n }\n\n //get newly created empty folder in which clone should be proceed\n FolderEntry projectFolder = projectManager.getProjectsRoot(workspace).createFolder(factory.getProjectattributes().getPname());\n\n try {\n importer.importSources(projectFolder, factory.getVcsurl());\n } catch (IOException e) {\n if (e.getCause() != null && e.getCause() instanceof NotAuthorizedException) {\n throw halt(UNAUTHORIZED, e.getMessage(), e);\n }\n throw halt(INTERNAL_SERVER_ERROR, e.getMessage());\n }\n\n //get physical path to project on file system to allow native git to work with repository\n String absoluteProjectPath;\n try {\n absoluteProjectPath = localPathResolver.resolve(projectFolder.getVirtualFile());\n } catch (VirtualFileSystemException e) {\n removeInvalidClonedFolder(projectFolder);\n throw halt(INTERNAL_SERVER_ERROR, \"Unable to resolve Git project directory.\", e);\n }\n\n GitConnection gitConnection;\n try {\n gitConnection = gitConnectionFactory.getConnection(absoluteProjectPath);\n } catch (GitException e) {\n removeInvalidClonedFolder(projectFolder);\n throw halt(INTERNAL_SERVER_ERROR, \"Unable to get Git connection to cloned project.\", e);\n }\n\n if (!Strings.isNullOrEmpty(factory.getCommitid())) {\n performCheckoutToCommitId(factory.getCommitid(), gitConnection);\n } else if (!Strings.isNullOrEmpty(factory.getVcsbranch())) {\n performCheckoutToBranch(factory.getVcsbranch(), gitConnection);\n }\n\n if (factory.getVariables() != null && factory.getVariables().size() > 0) {\n performReplaceVariables(factory.getVariables(), absoluteProjectPath);\n }\n\n if (!factory.getVcsinfo()) {\n AbstractVirtualFileEntry gitFolder = projectFolder.getChild(\".git\");\n if (gitFolder != null && gitFolder.isFolder()) {\n pushClientNotification(\"Git information erased.\");\n gitFolder.remove();\n }\n }\n\n return factory;\n }",
"public abstract Object clone() ;",
"public Cliente clone(){\r\n return new Cliente(this.nome, this.email, this.endereco, this.id);\r\n }",
"public void getProject(){\n\t\n\t String getList[] = clientFacade.GetProjects().split(\"\\n\");\n\t DefaultComboBoxModel addPro = new DefaultComboBoxModel();\n\t\tfor(int i=1; i<getList.length; i+=2) \n\t\t\t addPro.addElement(getList[i]);\n\t\t\t \n\t\tcPro.setModel(addPro);\t\n\t}",
"@Override\n public Board clone() {\n return new Board(copyOf(this.board));\n }",
"public void newProjectAction() throws IOException {\n\t\tfinal FXMLSpringLoader loader = new FXMLSpringLoader(appContext);\n\t\tfinal Dialog<Project> dialog = loader.load(\"classpath:view/Home_NewProjectDialog.fxml\");\n\t\tdialog.initOwner(newProject.getScene().getWindow());\n\t\tfinal Optional<Project> result = dialog.showAndWait();\n\t\tif (result.isPresent()) {\n\t\t\tlogger.trace(\"dialog 'new project' result: {}\", result::get);\n\t\t\tprojectsObservable.add(result.get());\n\t\t}\n\t}",
"com.appscode.api.auth.v1beta1.Project getProject();",
"@Override\n\tpublic Project getProjectById(int id) {\n\t\treturn projectDao.getProjectById(id);\n\t}",
"public CreateProject() {\n\t\tsuper();\n\t}",
"@Override\n\tpublic IProject getProject() {\n\t\treturn fProject;\n\t}",
"public void changeCurrProject(ProjectModel p) {\n \tprojects.remove(p);\n \tprojects.add(0, p);\n }",
"@SuppressWarnings(\"resource\")\n @Test\n public void testClone() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704667174L), 118, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"d3327aef-1da3-4499-bcf3-8e63b04cb6f5\", -125,\n \"66affdfa-784e-4c17-bd15-ae9dd9843c00\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704661082L));\n SubtenantApiKey subtenantapikey2 = subtenantapikey1.clone();\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }",
"@Override\n\tpublic Project getProjectById(int id) {\n\t\treturn null;\n\t}",
"@Override\n public AbstractRelic makeCopy() {\n return new Compendium();\n }",
"@Test\n @org.junit.Ignore\n public void testProject_1()\n throws Exception {\n\n Project result = new Project();\n\n assertNotNull(result);\n assertEquals(null, result.getName());\n assertEquals(null, result.getWorkloadNames());\n assertEquals(null, result.getProductName());\n assertEquals(null, result.getComments());\n assertEquals(null, result.getCreator());\n assertEquals(0, result.getId());\n assertEquals(null, result.getModified());\n assertEquals(null, result.getCreated());\n }",
"public Cola clone2(){\n\n Cola clon = new Cola();\n Nodo aux1 = this.frente;\n clon.frente = new Nodo(aux1.getElemento(), null);\n Nodo aux2 = clon.frente;\n aux1 = aux1.getEnlace();\n\n while(aux1 != null){\n \n aux2.setEnlace(new Nodo(aux1.getElemento(), null));\n aux1 = aux1.getEnlace();\n aux2 = aux2.getEnlace();\n }\n clon.fin = aux2;\n\n return clon;\n }",
"public static Board copyBoard(Board board) {\n Board result = new Board();\n for (int col = 0; col < result._board.length; col++) {\n for (int row = 0; row < result._board.length; row++) {\n result._board[col][row] = board._board[col][row];\n }\n }\n result.winner = board.winner;\n result.tie = board.tie;\n result.size = board.size;\n result.currPlayer = board.currPlayer;\n return result;\n }",
"public Solution clone() {\n\t\treturn new Solution(new ArrayList<City>(this.cities));\n\t}",
"public Project getProject()\n {\n \treturn project;\n }",
"public static IndexRow clone(IndexRow indexRow) {\r\n\t\tString idString = ResourceUtil.idString(indexRow.getArtifactID());\r\n\t\tString phyURI = indexRow.getPhyURI();\r\n\t\tIndexMetaData metaData = indexRow.getMetaData();\r\n\t\tboolean generated = indexRow.isGenerated();\r\n\r\n\t\treturn buildIndexRow(idString, phyURI, metaData, generated);\r\n\t}",
"public static Project getProject() {\n if (ProjectList.size() == 0) {\n System.out.print(\"No Projects were found.\");\n return null;\n }\n\n System.out.print(\"\\nPlease enter the project number: \");\n int projNum = input.nextInt();\n input.nextLine();\n\n for (Project proj : ProjectList) {\n if (proj.projNum == projNum) {\n return proj;\n }\n }\n\n System.out.print(\"\\nProject was not found. Please try again.\");\n return getProject();\n }",
"public static Board cloneBoard(final Board gameBoard) {\n String FEN = serializeBoard(gameBoard);\n\n Player newLight = new Player(\n UserPreferences.getLightPlayerName(),\n ThemeColor.LightPiece\n );\n\n Player newDark = new Player(\n UserPreferences.getDarkPlayerName(),\n ThemeColor.DarkPiece\n );\n\n return makeBoard(newLight, newDark, FEN);\n }",
"public GitLabProject getProject(Serializable projectId) throws IOException {\n String tailUrl = String.format(\"/projects/%s\", gitLabAPI.sanitize(projectId));\n return gitLabAPI.retrieve().to(tailUrl, GitLabProject.class);\n }",
"void cancelClone();",
"void build(String name, Project project);",
"public Grid copyGrid() {\n Grid copy = new Grid(grid.length);\n System.arraycopy(grid, 0, copy.getGrid(), 0, grid.length);\n return copy;\n }",
"public abstract Object clone();",
"@Override\r\n\tpublic AI_Domain clone() {\r\n\t\treturn new Board2048model(this);\r\n\t}",
"public Project getProject(String name){\n\t\tfor ( Project p : m_Projects){\n\t\t\tif(p.getName().equals(name)) return p;\n\t\t}\n\t\treturn null;\n\t}",
"protected void makeConfigImmutable() {\n final Project project = speedment.getProjectComponent().getProject();\n if (project != null) {\n final Project immutableProject = ImmutableProject.wrap(project);\n speedment.getProjectComponent().setProject(immutableProject);\n }\n }",
"public CompletableFuture<CloneResponse> clone(CloneRequest request) throws IOException {\n\t\treturn this.transport.performRequestAsync(request, CloneRequest.ENDPOINT, this.requestOptions);\n\t}",
"private Board copy(Board board)\n {\n Board result = new Board(size);\n \n for (int i = 0; i < size; i++)\n for (int j = 0; j < size; j++)\n result.array[i][j] = board.array[i][j];\n \n return result;\n \n }"
] | [
"0.70735073",
"0.7019312",
"0.6403004",
"0.6331484",
"0.63112324",
"0.6235028",
"0.6169909",
"0.61590904",
"0.61590904",
"0.61590904",
"0.5893379",
"0.5842452",
"0.5818061",
"0.569706",
"0.56904256",
"0.5569775",
"0.5569775",
"0.5567486",
"0.5553113",
"0.55530065",
"0.55457056",
"0.5537905",
"0.5532305",
"0.5476087",
"0.54623973",
"0.54616755",
"0.5445963",
"0.53994393",
"0.5398001",
"0.5384338",
"0.5377434",
"0.5374706",
"0.5374256",
"0.53621185",
"0.53598285",
"0.53062385",
"0.5294416",
"0.5281135",
"0.5273836",
"0.5268181",
"0.5261448",
"0.5258279",
"0.5255209",
"0.52493894",
"0.5247372",
"0.52378297",
"0.52368325",
"0.5235937",
"0.5232346",
"0.52311754",
"0.5228331",
"0.52126926",
"0.52126926",
"0.52126926",
"0.52126926",
"0.52125317",
"0.5211941",
"0.5211807",
"0.5211748",
"0.52114016",
"0.5203494",
"0.51876354",
"0.51784295",
"0.51625746",
"0.516235",
"0.5159981",
"0.5152329",
"0.51480085",
"0.5145218",
"0.51339185",
"0.5124657",
"0.5118347",
"0.51147693",
"0.5106222",
"0.5105325",
"0.51049143",
"0.510218",
"0.5088388",
"0.5084439",
"0.5082304",
"0.50817305",
"0.50810826",
"0.5067978",
"0.50597876",
"0.50535464",
"0.5049059",
"0.5046465",
"0.50461245",
"0.5043712",
"0.50293005",
"0.5024065",
"0.50125986",
"0.50082237",
"0.50038904",
"0.4998816",
"0.49981415",
"0.4997176",
"0.49937418",
"0.49890003",
"0.49864033",
"0.49857944"
] | 0.0 | -1 |
Get the information of one project by its [number]. | Project getByPrjNumber(Integer num); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String projectNumber() {\n return this.projectNumber;\n }",
"public String getProjectno() {\r\n return projectno;\r\n }",
"public Project getProject(Long projectId);",
"public static Project getProject() {\n if (ProjectList.size() == 0) {\n System.out.print(\"No Projects were found.\");\n return null;\n }\n\n System.out.print(\"\\nPlease enter the project number: \");\n int projNum = input.nextInt();\n input.nextLine();\n\n for (Project proj : ProjectList) {\n if (proj.projNum == projNum) {\n return proj;\n }\n }\n\n System.out.print(\"\\nProject was not found. Please try again.\");\n return getProject();\n }",
"public Integer getProjectID() { return projectID; }",
"@Override\n\tpublic List<ProjectInfo> findProject(ProjectInfo project) {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findProject\",project);\n\t}",
"private Project getProject(ModelInfo<Project> info) {\n return data.get(info);\n }",
"private ModelInfo<Project> getProjectInfo(String projectName) {\n return name2Info.get(projectName);\n }",
"public void Found_project_from_DATABASE(int id){\n print_pro();\n// return project;\n }",
"Project findProjectById(String projectId);",
"public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }",
"@GetMapping(\"/byProjectName/{projectName}\")\r\n\tpublic Project getProjectDetails(@PathVariable String projectName) {\r\n\t\treturn persistenceService.getProjectDetails(projectName);\r\n\t}",
"Project getById(Long id);",
"@GET\n\t@Path(\"getParticularProject/{projectId}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getParticularProject(\n\t\t\t@PathParam(\"projectId\") Integer projectId) throws Exception {\n\n\t\tProjectTO projectTO = null;\n\n\t\ttry {\n\t\t\tHashMap<String, Object> queryMap = new HashMap<String, Object>();\n\t\t\tqueryMap.put(\"projectId\", projectId);\n\n\t\t\tProjectMaster project = (ProjectMaster) GenericDaoSingleton\n\t\t\t\t\t.getGenericDao().findUniqueByQuery(\n\t\t\t\t\t\t\tConstantQueries.GET_PARTICULAR_PROJECT_BY_ID,\n\t\t\t\t\t\t\tqueryMap);\n\n\t\t\tif (project == null) {\n\t\t\t\tSystem.out.println(\"Project not found\");\n\t\t\t\tprojectTO = null;\n\t\t\t\treturn Response.status(Response.Status.NOT_FOUND)\n\t\t\t\t\t\t.entity(projectTO).build();\n\t\t\t}\n\n\t\t\tprojectTO = new ProjectTO();\n\t\t\t// projectMaster = (Object[]) projectList.get(i);\n\t\t\tprojectTO.setProject_id(project.getProject_id());\n\t\t\tprojectTO.setProject_name(project.getProject_name());\n\t\t\tprojectTO.setProject_status(project.getProject_status());\n\t\t\tprojectTO.setProject_creation_date(project\n\t\t\t\t\t.getProject_creation_date());\n\t\t\tprojectTO.setAccount_id(project.getAccountMaster().getAccount_id());\n\n\t\t\treturn Response.status(Response.Status.OK).entity(projectTO)\n\t\t\t\t\t.build();\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t\tprojectTO = null;\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Error while getting Projects in Project Config service\");\n\t\t\treturn Response.status(Response.Status.INTERNAL_SERVER_ERROR)\n\t\t\t\t\t.entity(projectTO).build();\n\t\t}\n\n\t}",
"@Override\n\tpublic Project readProjectDetail(Project project) {\n\t\tif (project == null)\n\t\t\treturn null;\n\n\t\t// To do: uncomment\n\t\tif (project.getProjectManager1Id() > 0)\n\t\t\t;\n\t\t\t//project.setProjectManager1Name(employeeDao.getEmployeeNameById(project.getProjectManager1Id()));\n\t\tif (project.getProjectManager2Id() > 0)\n\t\t\t;\n\t\t\t//project.setProjectManager2Name(employeeDao.getEmployeeNameById(project.getProjectManager2Id()));\n\n\t\treturn project;\n\t}",
"public int getProjectID() {\n return projectID;\n }",
"Project findProjectById(Long projectId);",
"public Project getProject(int projectId) throws EmployeeManagementException;",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/projects/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Project> readProject(\n @Path(\"name\") String name);",
"java.lang.String getProjectId();",
"public ProjectInfo getProjectInfo()\n {\n\treturn c_projectInfo;\n }",
"public void testRetrieveProjectsById() throws RetrievalException {\r\n System.out.println(\"Demo 4: Retrieves the projects by id.\");\r\n\r\n // Retrieve a known project\r\n ExternalProject project = defaultDBProjectRetrieval.retrieveProject(2);\r\n System.out.println(project.getId());\r\n\r\n // Outputs its info.\r\n System.out.println(project.getComponentId());\r\n System.out.println(project.getForumId());\r\n System.out.println(project.getName());\r\n System.out.println(project.getVersion());\r\n System.out.println(project.getVersionId());\r\n System.out.println(project.getDescription());\r\n System.out.println(project.getComments());\r\n System.out.println(project.getShortDescription());\r\n System.out.println(project.getFunctionalDescription());\r\n String[] technologies = project.getTechnologies(); // should not be null\r\n for (int t = 0; t < technologies.length; t++) {\r\n System.out.println(\"Uses technology: \" + technologies[t]);\r\n }\r\n\r\n // Not found ĘC should be null which is acceptable\r\n ExternalProject shouldBeNull = defaultDBProjectRetrieval.retrieveProject(Long.MAX_VALUE);\r\n System.out.println(shouldBeNull);\r\n\r\n // Should only have a maximum of 1 entry.\r\n ExternalProject[] projects = defaultDBProjectRetrieval.retrieveProjects(new long[] {1, 100});\r\n System.out.println(projects.length);\r\n System.out.println(projects[0].getName());\r\n\r\n System.out.println();\r\n }",
"public Project getProjectByName(String name);",
"public void setProjectID(Integer projectID) { this.projectID = projectID; }",
"public abstract KenaiProject getKenaiProject(String url, String projectName) throws IOException;",
"public Project getProjectDetails(String id) {\n\t\tProject pro;\n\t\tObject name = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet res = null;\n\t\tpro = null;\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tcon = DBUtility.getConnection();\n\t\t\t\tString sql = \"select * from project_master where project_id='\"\n\t\t\t\t\t\t+ id + \"'\";\n\t\t\t\tst = con.prepareStatement(sql);\n\t\t\t\tres = st.executeQuery(sql);\n\t\t\t\tif (res.next()) {\n\t\t\t\t\tpro = new Project();\n\t\t\t\t\tpro.setPro_name(res.getString(\"project_name\"));\n\t\t\t\t\tpro.setSite_addr(res.getString(\"project_location\"));\n\t\t\t\t\tpro.setC_name(res.getString(\"client_name\"));\n\t\t\t\t\tpro.setDate(res.getString(\"project_date\"));\n\t\t\t\t\tpro.setSite_details(res.getString(\"project_details\"));\n\t\t\t\t\tpro.setSite_no_floors(res.getString(\"project_no_floor\"));\n\t\t\t\t\tpro.setSite_no_units(res.getString(\"project_no_unit\"));\n\t\t\t\t\tpro.setGar_name(res.getString(\"gar_name\"));\n\t\t\t\t\tpro.setGar_rel(res.getString(\"gar_rel\"));\n\t\t\t\t\tpro.setMunicipality(res.getString(\"municipality\"));\n\t\t\t\t\tpro.setWord_no(res.getString(\"word_no\"));\n\t\t\t\t\tpro.setPro_typ(res.getString(\"project_type\"));\n\t\t\t\t\tpro.setContact1(res.getString(\"Contact1\"));\n\t\t\t\t\tpro.setContact2(res.getString(\"Contact2\"));\n\t\t\t\t\tpro.setEmail1(res.getString(\"Email1\"));\n\t\t\t\t\tpro.setEmail2(res.getString(\"Email2\"));\n\t\t\t\t}\n\t\t\t} catch (SQLException s) {\n\t\t\t\ts.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t\treturn null;\n\t\t\t} catch (NamingException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t}\n\t\t} finally {\n\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t}\n\t\treturn pro;\n\t}",
"public JiraProjectRetrievalResult getProject(String token, String projectKey, String version) throws\r\n JiraManagerException {\r\n Util.logEnter(log, \"getProject\", token, projectKey, version);\r\n Util.checkString(log, \"token\", token);\r\n Util.checkString(log, \"projectKey\", projectKey);\r\n Util.checkString(log, \"version\", version);\r\n\r\n try {\r\n JiraProjectRetrievalResult result = getJiraManagementServicePort().getProject(token, projectKey, version);\r\n Util.logExit(log, \"getProject\", result);\r\n return result;\r\n } catch (JiraServiceException e) {\r\n throw processError(e);\r\n }\r\n }",
"public Number getProjectId() {\n return (Number) getAttributeInternal(PROJECTID);\n }",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/projects/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Project> readProject(\n @Path(\"name\") String name, \n @QueryMap ReadProject queryParameters);",
"@GetMapping(\"/projects/{projectName:\" + Constants.ENTITY_ID_REGEX + \"}\")\n @Timed\n public ResponseEntity<ProjectDTO> getProject(@PathVariable String projectName)\n throws NotAuthorizedException {\n checkPermission(token, PROJECT_READ);\n log.debug(\"REST request to get Project : {}\", projectName);\n ProjectDTO projectDto = projectService.findOneByName(projectName);\n checkPermissionOnOrganizationAndProject(token, PROJECT_READ,\n projectDto.getOrganization().getName(), projectDto.getProjectName());\n return ResponseEntity.ok(projectDto);\n }",
"public Integer getProjectId() {\n return projectId;\n }",
"String getPokemonByNumber(int number) throws Exception\n\t{\n\t\tString urlHalf1 = \"https://pokeapi.co/api/v2/pokemon-form/\";\n\t\tString url = urlHalf1 + number;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString pokemonName = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement name = treeObject.get(\"name\");\n\n\t\t\tpokemonName = name.getAsString();\n\t\t}\n\n\t\treturn pokemonName;\n\t}",
"public void testRetrieveProjectsByNameAndVersion() throws RetrievalException {\r\n System.out.println(\"Demo 5: Retrieves the projects by name and version.\");\r\n\r\n // There might be more than one with this name and version (e.g., different catalog)\r\n ExternalProject[] projects = defaultDBProjectRetrieval.retrieveProject(\"Project A\", \"Version 1\");\r\n\r\n ExternalProject project = null;\r\n String[] technologies = null;\r\n for (int i = 0; i < projects.length; ++i) {\r\n // Outputs the info of each project.\r\n project = projects[i];\r\n System.out.println(project.getId());\r\n System.out.println(project.getName());\r\n System.out.println(project.getVersion());\r\n System.out.println(project.getCatalogId());\r\n System.out.println(project.getForumId());\r\n System.out.println(project.getShortDescription());\r\n System.out.println(project.getFunctionalDescription());\r\n technologies = project.getTechnologies(); // should not be null\r\n for (int t = 0; t < technologies.length; t++) {\r\n System.out.println(\"Uses technology: \" + technologies[t]);\r\n }\r\n }\r\n\r\n // Should only have a maximum of 2 entries but the order may vary.\r\n ExternalProject[] projects2 = defaultDBProjectRetrieval.retrieveProjects(\r\n new String[] {\"Project A\", \"Project C\"}, new String[] {\"Version 1\", \"Version 2\"});\r\n // Should get only one.\r\n System.out.println(projects2.length);\r\n System.out.println(projects2[0].getName());\r\n\r\n System.out.println();\r\n }",
"@Override\n\tpublic List<ProjectInfo> findAllProject() {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findAllProject\");\n\t}",
"public ArrayList<Project> selectProject(String projectId) {\n\n try {\n ArrayList<Project> tasks = new ArrayList<Project>();\n\n String query = \"SELECT * FROM TASKS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(query);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n String hours = rs.getString(\"HOURS\");\n String hoursadded = rs.getString(\"HOURS_ADDED\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(description, hours, hoursadded,\n projectId);\n tasks.add(p);\n }\n rs.close();\n ps.close();\n return tasks;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }",
"@GetMapping(\"/byName\")\r\n\tpublic List<Project> getProject(Principal principal) {\r\n\t\treturn persistenceService.getProject(AppBuilderUtil.getLoggedInUserId());\r\n\t}",
"@GetMapping(value = \"/getProjectDetails/mongodb/{theId}\")\n\tpublic List<ProjectDescStake> getProjectByIdMongo(@PathVariable (value =\"theId\") Long theId)\n\t{\n\t\treturn this.integrationClient.findProjectByIdMongo(theId);\n\t}",
"public Contract findByNumber(int number) {\r\n\t\t\r\n\t\tTypedQuery<Contract> query = entityManager.createQuery(\r\n\t\t\t\t\"SELECT u FROM Contract u WHERE u.numContract = ?\", Contract.class);\r\n\t\t\r\n\t\tquery.setParameter(1, number);\r\n\t\t\r\n\t\t\r\n\t\treturn query.getResultList().isEmpty() ? null : query.getResultList().get(0);\r\n\t\t\r\n\t}",
"public java.lang.Object getProjectID() {\n return projectID;\n }",
"Integer getProjectCount( String key ){\n return developer.projects.size();\n }",
"public Project getProjectDetail(String idOrKey) throws IOException {\n\t\tif (client == null)\n\t\t\tthrow new IllegalStateException(\"HTTP Client not Initailized\");\n\t\t\n\t\tclient.setResourceName(Constants.JIRA_RESOURCE_PROJECT + \"/\" + idOrKey);\n\t\tClientResponse response = client.get();\n\t\t\t\t\t\n\t\tString content = response.getEntity(String.class);\t\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, true);\n\t\t\n\t\tTypeReference<Project> ref = new TypeReference<Project>(){};\n\t\tProject prj = mapper.readValue(content, ref);\n\t\t\n\t\treturn prj;\n\t}",
"public Project getProject()\n {\n \treturn project;\n }",
"public String retrieveProjectQuery(ArrayList<String> project,String pID) \r\n\t{\r\n\t\tString query = \"SELECT * FROM Project WHERE ProjectID=\\\"\"+project.get(17)+\"\\\"\";\r\n\t\tSystem.out.println(query);\r\n\t\treturn query;\r\n\t}",
"public String retrieveProjectQuery(ArrayList<String> project,String pID) \r\n\t{\r\n\t\tString query = \"SELECT * FROM Project WHERE ProjectID=\\\"\"+project.get(17)+\"\\\"\";\r\n\t\tSystem.out.println(query);\r\n\t\treturn query;\r\n\t}",
"public Integer getProjectId() {\n return projectId;\n }",
"public Integer getProjectId() {\n return projectId;\n }",
"public Project getProject() {\r\n return project;\r\n }",
"public static final String getProject() { return project; }",
"public static final String getProject() { return project; }",
"com.appscode.api.auth.v1beta1.Project getProject();",
"public JiraProjectRetrievalResult getProject(String token, String projectKey) throws JiraManagerException {\r\n Util.logEnter(log, \"getProject\", token, projectKey);\r\n Util.checkString(log, \"token\", token);\r\n Util.checkString(log, \"projectKey\", projectKey);\r\n\r\n try {\r\n JiraProjectRetrievalResult result = getJiraManagementServicePort().getProject(token, projectKey);\r\n Util.logExit(log, \"getProject\", result);\r\n return result;\r\n } catch (JiraServiceException e) {\r\n throw processError(e);\r\n }\r\n }",
"@Override\r\n\tpublic Board1 getByNum(int num) {\n\t\treturn dao.selectByNum(num);\r\n\t}",
"@GetMapping(path = \"/detail/\")\n\tpublic String viewProjectDetail() {\n\t\treturn \"sprint-detail\";\n\t}",
"public static FoundObject fetchByPrimaryKey(String number) {\n\t\treturn getPersistence().fetchByPrimaryKey(number);\n\t}",
"public Project getProject()\n {\n return project;\n }",
"public String getProjId() {\n return projId;\n }",
"@Override\n\tpublic PilotModel getPilotDetailByLicenseNumber(String licenseNumber) {\n\t\tfor (int i=0; i < archivePilot.size() ; i++) {\n\t\t\tPilotModel findPilot = archivePilot.get(i);\n\t\t\tif(findPilot.getLicenseNumber().equals(licenseNumber)) {\n\t\t\t\treturn findPilot;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public Project findProjectById(String projectId) {\n\t\tProject project = null;\r\n\t\tString query = \"SELECT FROM TA_PROJECTS WHERE PROJECT_ID='\" + projectId + \"'\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t}\r\n\t\treturn project;\r\n\t}",
"@GetMapping(\"/showme/{name}\")\n\t@ResponseBody\n\tpublic Optional<Project> retrieveProjectsByName(@PathVariable(\"name\") String name){\n\t\tOptional<Project> t = projectrepository.findProjectByName(name);\n\t\treturn t;\n\t}",
"public Projects findByProjectID(int proj_id){\n\t\tString sql = \"select * from projects where proj_id = \"+proj_id;\n\t\treturn getJdbcTemplate().queryForObject(sql, new BeanPropertyRowMapper<Projects>(Projects.class));\n\t}",
"public int getProjectId()\r\n\t{\r\n\t\treturn projectId;\r\n\t}",
"@Override\n\tpublic ProjectInfoVO inquireProjectInfo(String projectName) {\n\t\tproInfo.setProjectName(projectName);\n\t\treturn proInfo.convertToVO();\n\t}",
"@GetMapping(\"/project/{projectId}\")\n public Object doGet(@RequestParam(value = \"full\", defaultValue = \"false\") boolean full,\n @PathVariable(\"projectId\") Long projectId) throws InvalidIdentifierException {\n if(full)\n return service.fullInfo(projectId);\n else\n return service.getProjectById(projectId);\n }",
"public Project getProject(){\n\t\treturn this.project;\n\t}",
"public jkt.hrms.masters.business.MstrProject getProject () {\n\t\treturn project;\n\t}",
"@Query(\"SELECT * FROM Project WHERE id = :projectId\")\n LiveData<Project> getProject(long projectId);",
"@Override\r\n\tpublic TariffModel getByNum(int num) throws Exception {\n\t\treturn tariffMapper.selectByNum(num);\r\n\t}",
"public GitLabProject getProject(Serializable projectId) throws IOException {\n String tailUrl = String.format(\"/projects/%s\", gitLabAPI.sanitize(projectId));\n return gitLabAPI.retrieve().to(tailUrl, GitLabProject.class);\n }",
"public ProjectBean getProject2(String projectIdentifier) {\n List<Experiment> experiments =\n this.getOpenBisClient().getExperimentsForProject3(projectIdentifier);// TODO changed this\n // from\n // getExperimentsForProject2\n\n float projectStatus = this.getOpenBisClient().computeProjectStatus(experiments);\n\n Project project = getOpenbisDtoProject(projectIdentifier);\n if (project == null) {\n project = getOpenBisClient().getProjectByIdentifier(projectIdentifier);\n addOpenbisDtoProject(project);\n }\n ProjectBean newProjectBean = new ProjectBean();\n\n ProgressBar progressBar = new ProgressBar();\n progressBar.setValue(projectStatus);\n\n Date registrationDate = project.getRegistrationDetails().getRegistrationDate();\n\n String pi = getDatabaseManager().getPersonDetailsForProject(project.getIdentifier(), \"PI\");\n String cp = getDatabaseManager().getPersonDetailsForProject(project.getIdentifier(), \"Contact\");\n String manager =\n getDatabaseManager().getPersonDetailsForProject(project.getIdentifier(), \"Manager\");\n\n String longDesc = getDatabaseManager().getLongProjectDescription(project.getIdentifier());\n\n if (pi.equals(\"\")) {\n newProjectBean.setPrincipalInvestigator(\"n/a\");\n } else {\n newProjectBean.setPrincipalInvestigator(pi);\n }\n\n if (cp.equals(\"\")) {\n newProjectBean.setContactPerson(\"n/a\");\n } else {\n newProjectBean.setContactPerson(cp);\n }\n\n if (manager.equals(\"\")) {\n newProjectBean.setProjectManager(\"n/a\");\n } else {\n newProjectBean.setProjectManager(manager);\n }\n\n if (longDesc == null)\n longDesc = \"\";\n\n newProjectBean.setLongDescription(longDesc);\n\n newProjectBean.setId(project.getIdentifier());\n newProjectBean.setCode(project.getCode());\n String desc = project.getDescription();\n if (desc == null)\n desc = \"\";\n newProjectBean.setDescription(desc);\n newProjectBean.setRegistrationDate(registrationDate);\n newProjectBean.setProgress(progressBar);\n newProjectBean.setRegistrator(project.getRegistrationDetails().getUserId());\n newProjectBean.setContact(project.getRegistrationDetails().getUserEmail());\n\n // Create sample Beans (or fetch them) for samples of experiments\n List<Sample> allSamples = this.getOpenBisClient()\n .getSamplesWithParentsAndChildrenOfProjectBySearchService(projectIdentifier);\n\n BeanItemContainer<ExperimentBean> experimentBeans =\n new BeanItemContainer<ExperimentBean>(ExperimentBean.class);\n\n AlternativeSecondaryNameCreator altNameCreator = new AlternativeSecondaryNameCreator(\n openBisClient.getVocabCodesAndLabelsForVocab(\"Q_NCBI_TAXONOMY\"));\n for (Experiment experiment : experiments) {\n ExperimentBean newExperimentBean = new ExperimentBean();\n\n // TODO doesn't work with getExperimentsForProject2\n Map<String, String> assignedProperties = experiment.getProperties();\n\n String status = \"\";\n\n if (assignedProperties.keySet().contains(\"Q_CURRENT_STATUS\")) {\n status = assignedProperties.get(\"Q_CURRENT_STATUS\");\n }\n\n else if (assignedProperties.keySet().contains(\"Q_WF_STATUS\")) {\n status = assignedProperties.get(\"Q_WF_STATUS\");\n }\n\n List<Sample> samples = new ArrayList<Sample>();\n for (Sample s : allSamples) {\n if (s.getExperimentIdentifierOrNull().equals(experiment.getIdentifier()))\n samples.add(s);\n }\n BeanItemContainer<SampleBean> sampleBeans =\n new BeanItemContainer<SampleBean>(SampleBean.class);\n for (Sample sample : samples) {\n SampleBean sbean = new SampleBean();\n sbean.setId(sample.getIdentifier());\n sbean.setCode(sample.getCode());\n sbean.setType(sample.getSampleTypeCode());\n sbean.setProperties(sample.getProperties());\n sbean.setParents(this.getOpenBisClient().getParentsBySearchService(sample.getCode())); //changed by cfh \n sampleBeans.addBean(sbean);\n }\n newExperimentBean.setSamples(sampleBeans);\n\n newExperimentBean.setAltNameCreator(altNameCreator);\n newExperimentBean.setProperties(assignedProperties);\n newExperimentBean.setSecondaryName(assignedProperties.get(\"Q_SECONDARY_NAME\"));\n newExperimentBean.setId(experiment.getIdentifier());\n newExperimentBean.setCode(experiment.getCode());\n newExperimentBean.setType(experiment.getExperimentTypeCode());\n newExperimentBean.setRegistrator(experiment.getRegistrationDetails().getUserId());\n newExperimentBean\n .setRegistrationDate(experiment.getRegistrationDetails().getRegistrationDate());\n newExperimentBean.setStatus(status);\n experimentBeans.addBean(newExperimentBean);\n }\n\n List<ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.DataSet> projectData = this\n .getOpenBisClient().getDataSetsOfProjectByIdentifierWithSearchCriteria(projectIdentifier);\n\n Boolean containsData = false;\n Boolean containsResults = false;\n Boolean attachmentResult = false;\n // Boolean containsAttachments = false;\n\n for (ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.DataSet ds : projectData) {\n attachmentResult = false;\n if (ds.getDataSetTypeCode().equals(\"Q_PROJECT_DATA\")) {\n attachmentResult = ds.getProperties().get(\"Q_ATTACHMENT_TYPE\").equals(\"RESULT\");\n }\n\n if (!(ds.getDataSetTypeCode().equals(\"Q_PROJECT_DATA\"))\n && !(ds.getDataSetTypeCode().contains(\"RESULTS\"))) {\n containsData = true;\n } else if (ds.getDataSetTypeCode().contains(\"RESULTS\") || attachmentResult) {\n containsResults = true;\n } // else if (ds.getDataSetTypeCode() == \"Q_PROJECT_DATA\") {\n // containsAttachments = true;\n // }\n }\n\n newProjectBean.setContainsData(containsData);\n newProjectBean.setContainsResults(containsResults);\n // newProjectBean.setContainsAttachments(containsAttachments);\n\n newProjectBean.setExperiments(experimentBeans);\n newProjectBean.setMembers(new HashSet<String>());\n\n String secondaryName = getDatabaseManager().getProjectName(projectIdentifier);\n if (secondaryName == null || secondaryName.isEmpty())\n secondaryName = \"n/a\";\n\n newProjectBean.setSecondaryName(secondaryName);\n return newProjectBean;\n }",
"@Override\r\n\tpublic List<ProjectMember> selectProjectMemeber(int projectno) {\n\t\treturn pDao.selectProjectMemeber(projectno);\r\n\t}",
"public void setProjectID(int value) {\n this.projectID = value;\n }",
"public JiraProjectRetrievalResult getProject(String token, Long projectId) throws JiraManagerException {\r\n Util.logEnter(log, \"getProject\", token, projectId);\r\n Util.checkString(log, \"token\", token);\r\n Util.checkNull(log, \"projectId\", projectId);\r\n\r\n try {\r\n JiraProjectRetrievalResult result = getJiraManagementServicePort().getProject(token, projectId);\r\n Util.logExit(log, \"getProject\", result);\r\n return result;\r\n } catch (JiraServiceException e) {\r\n throw processError(e);\r\n }\r\n }",
"public String getProjectName(){\n return projectModel.getProjectName();\n }",
"public Project getProject() {\n return project;\n }",
"public Project getProject() {\n return project;\n }",
"void getProjectByID(Integer projectID, AsyncCallback<Project> callback);",
"public Subtask getSubtask(String task_name, int project_id) {\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT subtask_id, task_name FROM subtask where task_name = ? AND project_id = ?;\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setString(1, task_name);\n ps.setInt(2, project_id);\n\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n Subtask subtask = new Subtask(id, task_name, project_id);\n return subtask;\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n return null;\n }",
"private String getProjectNumber(ZipFile zipFile) throws ZipException\n {\n Pattern pattern = Pattern.compile( \"^P-[\\\\dA-F]{4}\", Pattern.CASE_INSENSITIVE);\n for (FileHeader fileHeader : zipFile.getFileHeaders ( ) ) {\n Matcher matcher = pattern.matcher(fileHeader.getFileName());\n if (matcher.find()) {\n return matcher.group();\n }\n }\n \n throw new PlcRuntimeException(\"Error determining project number.\");\n }",
"private static void fetch_all_project_info(Statement stmt, String project_identifier, ResultSet project_rset)\r\n\t\t\tthrows SQLException {\r\n\t\tint get_project_id = 0;\r\n\t\ttry {\r\n\t\t\tint project_id = Integer.parseInt(project_identifier);\r\n\t\t\twhile (project_rset.next()) {\r\n\t\t\t\tif (project_rset.getInt(\"project_id\") == project_id) {\r\n\t\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\"ID: \" + project_rset.getInt(\"project_id\") + \r\n\t\t\t\t\t\t\t\"\\nName: \" + project_rset.getString(\"project_name\") + \r\n\t\t\t\t\t\t\t\"\\nBuilding Type: \" + project_rset.getString(\"building_type\") + \r\n\t\t\t\t\t\t\t\"\\nPhysical Address: \" + project_rset.getString(\"physical_address\") + \r\n\t\t\t\t\t\t\t\"\\nErf Number: \" + project_rset.getInt(\"erf_num\") + \r\n\t\t\t\t\t\t\t\"\\nCharged: R\" + project_rset.getInt(\"charged\") + \r\n\t\t\t\t\t\t\t\"\\nDue on: \" + project_rset.getDate(\"deadline_date\") + \r\n\t\t\t\t\t\t\t\"\\nPaid: R\" + project_rset.getInt(\"paid\") + \r\n\t\t\t\t\t\t\t\"\\nComplete On: \" + project_rset.getDate(\"completion_date\") +\r\n\t\t\t\t\t\t\t\"\\nStatus: \" + project_rset.getString(\"status\"));\r\n\t\t\t\t\tget_project_id = project_rset.getInt(\"project_id\");\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\tcatch(Exception e) {\r\n\t\t\t System.out.println(\"No ID detected. Searching by name\");\r\n\t\t\t while (project_rset.next()) {\r\n\t\t\t\t\tif (project_rset.getString(\"project_name\").equals(project_identifier)) {\r\n\t\t\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\"ID: \" + project_rset.getInt(\"project_id\") + \r\n\t\t\t\t\t\t\t\t\"\\nName: \" + project_rset.getString(\"project_name\") + \r\n\t\t\t\t\t\t\t\t\"\\nBuilding Type: \" + project_rset.getString(\"building_type\") + \r\n\t\t\t\t\t\t\t\t\"\\nPhysical Address: \" + project_rset.getString(\"physical_address\") + \r\n\t\t\t\t\t\t\t\t\"\\nErf Number: \" + project_rset.getInt(\"erf_num\") + \r\n\t\t\t\t\t\t\t\t\"\\nCharged: R\" + project_rset.getInt(\"charged\") + \r\n\t\t\t\t\t\t\t\t\"\\nDue on: \" + project_rset.getDate(\"deadline_date\") + \r\n\t\t\t\t\t\t\t\t\"\\nPaid: R\" + project_rset.getInt(\"paid\") + \r\n\t\t\t\t\t\t\t\t\"\\nComplete On: \" + project_rset.getDate(\"completion_date\") +\r\n\t\t\t\t\t\t\t\t\"\\nStatus: \" + project_rset.getString(\"status\"));\r\n\t\t\t\t\t\tget_project_id = project_rset.getInt(\"project_id\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\tString strSelectPeople = String.format(\"SELECT * FROM people WHERE projects = '%s';\", get_project_id);\r\n\t\tResultSet people_rset = stmt.executeQuery(strSelectPeople);\r\n\r\n\t\twhile (people_rset.next()) {\r\n\t\t\tif (people_rset.getString(\"type\").equals(\"Customer\")) {\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"\\nCustomer:\" +\r\n\t\t\t\t\t\t\"\\nName: \" + people_rset.getString(\"name\") + \" \" + people_rset.getString(\"surname\") + \r\n\t\t\t\t\t\t\"\\nContact: \" + people_rset.getString(\"email_address\") + \" \" + people_rset.getString(\"telephone_number\") + \r\n\t\t\t\t\t\t\"\\nAddress: \" + people_rset.getString(\"address\"));\r\n\t\t\t}\r\n\t\t\tif (people_rset.getString(\"type\").equals(\"Contractor\")) {\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"\\nContractor:\" +\r\n\t\t\t\t\t\t\"\\nName: \" + people_rset.getString(\"name\") + \" \" + people_rset.getString(\"surname\") + \r\n\t\t\t\t\t\t\"\\nContact: \" + people_rset.getString(\"email_address\") + \" \" + people_rset.getString(\"telephone_number\") + \r\n\t\t\t\t\t\t\"\\nAddress: \" + people_rset.getString(\"address\"));\r\n\t\t\t}\r\n\t\t\tif (people_rset.getString(\"type\").equals(\"Architect\")) {\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"\\nArchitect:\" +\r\n\t\t\t\t\t\t\"\\nName: \" + people_rset.getString(\"name\") + \" \" + people_rset.getString(\"surname\") + \r\n\t\t\t\t\t\t\"\\nContact: \" + people_rset.getString(\"email_address\") + \" \" + people_rset.getString(\"telephone_number\") + \r\n\t\t\t\t\t\t\"\\nAddress: \" + people_rset.getString(\"address\"));\r\n\t\t\t}\r\n\t\t\tif (people_rset.getString(\"type\").equals(\"Project Manager\")) {\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"\\nProject Manager:\" +\r\n\t\t\t\t\t\t\"\\nName: \" + people_rset.getString(\"name\") + \" \" + people_rset.getString(\"surname\") + \r\n\t\t\t\t\t\t\"\\nContact: \" + people_rset.getString(\"email_address\") + \" \" + people_rset.getString(\"telephone_number\") + \r\n\t\t\t\t\t\t\"\\nAddress: \" + people_rset.getString(\"address\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public String getProjectId() {\r\n return projectId;\r\n }",
"public LcMain getLcMainByNumber(String number) {\n LcMain lcMain = null;\n LifeCARDProcessor lcProc = LifeCARDProcessor.getInstance(sco, this.em.getEntityManagerFactory());\n try {\n lcMain = lcProc.searchByNumber(number);\n } catch (GenericSEHRException ex) {\n Logger.getLogger(LifeCARDAdmin.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n return lcMain;\n }",
"@GetMapping(\"/api/getLatest\")\n\tpublic List<Project> findlatestProject()\n\t{\n\t\treturn this.integrationClient.findlatestProject();\n\t}",
"public String getProjectId() {\n return getProperty(Property.PROJECT_ID);\n }",
"Project selectByPrimaryKey(Long id);",
"public Project getProjectWithEmployee(int projectId) throws EmployeeManagementException;",
"@GetMapping(\"/api/getByYear\")\n\tpublic int[] getProjectByYear()\n\t{\n\t\treturn this.integrationClient.getProjectByYear();\n\t}",
"@RequestMapping(value = \"/hrProjectInfos/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<HrProjectInfo> getHrProjectInfo(@PathVariable Long id) {\n log.debug(\"REST request to get HrProjectInfo : {}\", id);\n HrProjectInfo hrProjectInfo = hrProjectInfoRepository.findOne(id);\n return Optional.ofNullable(hrProjectInfo)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"@Override\n\tpublic Project getProjectByName(String name) {\n\t\treturn projectDao.getProjectByName(name);\n\t}",
"public IProject getProject();",
"protected Integer getIdProject() {\n\n return (Integer) getExtraData().get(ProcessListener.EXTRA_DATA_IDPROJECT);\n }",
"private Project getProject(ActivityDTO dto) {\n\t\treturn projectDAO.findById(dto.getProjectId()).get();\n//\t\treturn projectDAO.getOne(dto.getProjectId());\n\t}",
"public String getProjectId() {\n return projectId;\n }",
"void getAllProjectList(int id);",
"public Project getProject() {\n\t\treturn project;\n\t}",
"public String getProjectName() {\n\t\treturn project;\n\t}",
"public abstract KenaiProject getKenaiProjectForRepository(String repositoryUrl) throws IOException;",
"public void setProjectId(Integer projectId) {\n this.projectId = projectId;\n }",
"@GetMapping(\"/api/OngoingByYear/{theYear}\")\n\tpublic List<Project> findprojectongoing(@PathVariable Integer theYear)\n\t{\n\t\treturn this.integrationClient.findprojectongoing(theYear);\n\t}",
"String getProjectName();",
"public Project getProjectById(int projectId) throws InexistentProjectException, SQLException {\n return getMandatoryProject(projectId);\n }"
] | [
"0.6985611",
"0.69789755",
"0.6840991",
"0.6794742",
"0.6648422",
"0.6645893",
"0.65479606",
"0.6472614",
"0.63784367",
"0.6344903",
"0.6333665",
"0.6290095",
"0.62342304",
"0.6215445",
"0.61993635",
"0.61770916",
"0.6133096",
"0.6131089",
"0.6098621",
"0.6097647",
"0.60767055",
"0.6066279",
"0.6059577",
"0.60211086",
"0.6004412",
"0.5974835",
"0.5974195",
"0.5958327",
"0.59508824",
"0.59454936",
"0.5926733",
"0.5909956",
"0.5890562",
"0.58387715",
"0.58257395",
"0.5819146",
"0.57927763",
"0.57839",
"0.57784617",
"0.5776003",
"0.5767832",
"0.57665074",
"0.5762716",
"0.5762716",
"0.5753718",
"0.5753718",
"0.574738",
"0.5742761",
"0.5742761",
"0.57337314",
"0.5733189",
"0.57315457",
"0.5719631",
"0.570565",
"0.57035685",
"0.57028246",
"0.5697562",
"0.56935227",
"0.5680395",
"0.5677274",
"0.5669621",
"0.56567127",
"0.5655915",
"0.5652836",
"0.56501985",
"0.5641132",
"0.5626949",
"0.5624708",
"0.5620963",
"0.5594927",
"0.5592768",
"0.55887145",
"0.55857104",
"0.5584523",
"0.5584523",
"0.5583263",
"0.5576398",
"0.5573398",
"0.5556365",
"0.5541491",
"0.5539196",
"0.5533783",
"0.55326355",
"0.55303144",
"0.5519055",
"0.55141735",
"0.5510077",
"0.55091894",
"0.5502973",
"0.5502403",
"0.54990256",
"0.5494456",
"0.54934186",
"0.5490618",
"0.54902816",
"0.54878354",
"0.54853904",
"0.5474165",
"0.54718363",
"0.54698974"
] | 0.8258811 | 0 |
Provides a list of possible proposals for the XSL Elements within the current scope. | @Override
public ArrayList<ICompletionProposal> getCompletionProposals() {
if (region.getType() == DOMRegionContext.XML_TAG_OPEN) {
computeTagOpenProposals();
} else if (region.getType() == DOMRegionContext.XML_TAG_NAME) {
computeTagNameProposals();
}
return getAllCompletionProposals();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.util.List<edu.ustb.sei.mde.xmu2.resource.xmu2.ui.Xmu2CompletionProposal> process(java.util.List<edu.ustb.sei.mde.xmu2.resource.xmu2.ui.Xmu2CompletionProposal> proposals) {\n\t\treturn proposals;\r\n\t}",
"public static Map<Integer, Proposal> getProposals() { return proposals; }",
"public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,\n\t\t\tint documentOffset) {\n\t\tboolean dotActivation = false;\n\n\t\tVector<ICompletionProposal> result = new Vector<ICompletionProposal>();\n\t\t// ICompletionProposal[] result= new\n\t\t// ICompletionProposal[fgProposals.length];\n\t\tIDocument doc = viewer.getDocument();\n\n\t\tFindReplaceDocumentAdapter frd = new FindReplaceDocumentAdapter(doc);\n\n\t\tint pos = documentOffset;\n\t\tdo {\n\t\t\tpos--;\n\t\t} while (pos >= 0 && !Character.isWhitespace(frd.charAt(pos)));\n\t\tpos++;\n\n\t\tString stp = \"\";\n\t\tif (pos >= 0)\n\t\t\tstp = frd.subSequence(pos, documentOffset).toString();\n\n\t\t// See if we have . activation\n\t\tif (frd.charAt(documentOffset - 1) == '.') {\n\t\t\tString props[] = dotActivation(stp, result);\n\t\t\tfor (int i = 0; i < props.length; i++) {\n\t\t\t\tString val = props[i];\n\t\t\t\tIContextInformation info = new ContextInformation(\n\t\t\t\t\t\tval,\n\t\t\t\t\t\tMessageFormat\n\t\t\t\t\t\t\t\t.format(\n\t\t\t\t\t\t\t\t\t\t\"CompletionProcessor.Proposal.ContextInfo.pattern\", new Object[] { val })); //$NON-NLS-1$\n\t\t\t\t// result.add(new CompletionProposal(fgProposals[i],\n\t\t\t\t// documentOffset, 0, fgProposals[i].length(), null,\n\t\t\t\t// fgProposals[i], info,\n\t\t\t\t// MessageFormat.format(\"CompletionProcessor.Proposal.hoverinfo.pattern\",\n\t\t\t\t// new Object[] { fgProposals[i]}))); //$NON-NLS-1$\n\t\t\t\tresult.add(new CompletionProposal(val, documentOffset, 0,\n\t\t\t\t\t\tval.length(), null, val, null, null)); //$NON-NLS-1$\n\t\t\t}\n\n\t\t} else {\n\t\t\t// System.out.println(\"String part:\" + stp);\n\t\t\tSet<String> comps = fgProposals.keySet();\n\t\t\tIterator<String> compitr = comps.iterator();\n\t\t\twhile (compitr.hasNext()) {\n\t\t\t\t// CompletionToken comp = comps.nextElement();\n\t\t\t\t// String val = comp.getKey();\n\t\t\t\tString val = compitr.next();\n\t\t\t\t// If there are too many matches (and it becomes annoying) then\n\t\t\t\t// remove the two calls to toLowerCase() below\n\t\t\t\t// if (val.toLowerCase().startsWith(stp.toLowerCase())) {\n\t\t\t\tif (val.startsWith(stp)) {\n\n\t\t\t\t\tString rep = val.substring(stp.length());\n\t\t\t\t\tIContextInformation info = new ContextInformation(\n\t\t\t\t\t\t\tval,\n\t\t\t\t\t\t\tMessageFormat\n\t\t\t\t\t\t\t\t\t.format(\n\t\t\t\t\t\t\t\t\t\t\t\"CompletionProcessor.Proposal.ContextInfo.pattern\", new Object[] { val })); //$NON-NLS-1$\n\t\t\t\t\t// result.add(new CompletionProposal(fgProposals[i],\n\t\t\t\t\t// documentOffset, 0, fgProposals[i].length(), null,\n\t\t\t\t\t// fgProposals[i], info,\n\t\t\t\t\t// MessageFormat.format(\"CompletionProcessor.Proposal.hoverinfo.pattern\",\n\t\t\t\t\t// new Object[] { fgProposals[i]}))); //$NON-NLS-1$\n\t\t\t\t\t\n\t\t\t\t\t// Do not show proposals with . if the stump does not have a .\n\t\t\t\t\tif(!((stp.indexOf('.') == -1) && val.indexOf('.') != -1)) {\n\t\t\t\t\t\tresult.add(new CompletionProposal(rep, documentOffset, 0,\n\t\t\t\t\t\t\t\trep.length(), null, val, null, null)); //$NON-NLS-1$\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// adding an empty string to ensure that the completion dialog appears\n\t\tif (result.size() == 0) {\n\t\t\tresult.add(new CompletionProposal(\n\t\t\t\t\t\"\", documentOffset, 0, 0, null, \"\", null, null)); //$NON-NLS-1$\n\t\t}\n\n\t\treturn result.toArray(new ICompletionProposal[result.size()]);\n\t}",
"public void sortProposals() {\n\n\t}",
"@NonNull\n public List<IkeSaProposal> getIkeSaProposals() {\n return Arrays.asList(mSaProposals);\n }",
"public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {\n\t\tDatabaseNode activeDatabaseNode = DatabaseView.getActiveDatabase();\n\t\tif (activeDatabaseNode == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString[] proposals = null;\n\t\tif (activeDatabaseNode != connectionModelCache) {\n\t\t\ttableNamesCache = getModelNames(activeDatabaseNode.getChildren());\n\t\t\tproposals = tableNamesCache;\n\t\t} else {\n\t\t\tdatabaseNamesCache = getModelNames(activeDatabaseNode.getChildren());\n\t\t\tproposals = databaseNamesCache;\n\t\t}\n\n\t\treturn getProposals(proposals, documentOffset);\n\t}",
"private static Collection<CompletionProposal> getVariableCompletionProposals(final CompletionContext context, CPModel model) {\n Collection<CompletionProposal> proposals = new LinkedHashSet<>();\n for (CPElement var : model.getVariables(context.getCaretOffset())) {\n if (var.getType() != CPElementType.VARIABLE_USAGE && !var.getRange().containsInclusive(context.getCaretOffset())) {\n ElementHandle handle = new CPCslElementHandle(context.getFileObject(), var.getName());\n VariableCompletionItem item = new VariableCompletionItem(\n handle,\n var.getHandle(),\n context.getAnchorOffset(),\n null); //no origin for current file\n// var.getFile() == null ? null : var.getFile().getNameExt());\n\n proposals.add(item);\n }\n }\n try {\n //now gather global vars from all linked sheets\n FileObject file = context.getFileObject();\n if (file != null) {\n Map<FileObject, CPCssIndexModel> indexModels = CPUtils.getIndexModels(file, DependencyType.REFERRING_AND_REFERRED, true);\n for (Entry<FileObject, CPCssIndexModel> entry : indexModels.entrySet()) {\n FileObject reff = entry.getKey();\n CPCssIndexModel cpIndexModel = entry.getValue();\n Collection<org.netbeans.modules.css.prep.editor.model.CPElementHandle> variables = cpIndexModel.getVariables();\n for (org.netbeans.modules.css.prep.editor.model.CPElementHandle var : variables) {\n if (var.getType() == CPElementType.VARIABLE_GLOBAL_DECLARATION) {\n ElementHandle handle = new CPCslElementHandle(context.getFileObject(), var.getName());\n VariableCompletionItem item = new VariableCompletionItem(\n handle,\n var,\n context.getAnchorOffset(),\n reff.getNameExt());\n\n proposals.add(item);\n }\n\n }\n\n }\n }\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n\n return proposals;\n }",
"public ArrayList getXsltParams() {\n return xsltParams;\n }",
"protected void computeTagNameProposals() {\n \t\t// completing the *first* tag in \"<tagname1 |<tagname2\"\n \t\t\n \t\t// Ignore attributes\n \t\tif (inAttributeRegion()) {\n \t\t\treturn;\n \t\t}\n \t\t\n \t\taddTagNameProposals(this.getElementPosition(node));\n \t\t// addEndTagNameProposals();\n \n \t}",
"protected void computeTagOpenProposals() {\n \n \t\tif (replacementBeginPosition == documentRegion.getStartOffset(region)) {\n \t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n \t\t\t\t// at the start of an existing tag, right before the '<'\n \t\t\t\tcomputeTagNameProposals();\n \t\t\t}\n \t\t} else {\n \t\t\t// within the white space\n \t\t\tITextRegion name = getNameRegion(((IDOMNode) node)\n \t\t\t\t\t.getStartStructuredDocumentRegion());\n \t\t\tif ((name != null)\n \t\t\t\t\t&& ((documentRegion.getStartOffset(name) <= replacementBeginPosition) && (documentRegion\n \t\t\t\t\t\t\t.getEndOffset(name) >= replacementBeginPosition))) {\n \t\t\t\t// replace the existing name\n \t\t\t\treplacementBeginPosition = documentRegion.getStartOffset(name);\n \t\t\t\treplacementLength = name.getTextLength();\n \t\t\t} else {\n \t\t\t\t// insert a valid new name, or possibly an end tag\n \t\t\t\t// addEndTagProposals(contentAssistRequest);\n \t\t\t\tsetReplacementLength(0);\n \t\t\t}\n \t\t\taddTagNameProposals(getElementPosition(node));\n \t\t}\n \t}",
"private ICompletionProposal[] getCompletionProposals(int offset) throws BadLocationException {\n \t\treturn contentAssistant.getContentAssistProcessor(document.getContentType(offset))\n \t\t\t\t.computeCompletionProposals(editor.getProjectionViewer(), offset);\n \t}",
"public void generatePropositions() {\r\n propositions.clear();\r\n\r\n\t\t// holds alternative options for each constituents (obtained by\r\n // processing coordinated conjunctions and xcomps)\r\n final List<List<Constituent>> constituents = new ArrayList<List<Constituent>>();\r\n\r\n // which of the constituents are required?\r\n final List<Flag> flags = new ArrayList<Flag>();\r\n final List<Boolean> include = new ArrayList<Boolean>();\r\n\r\n\t\t// holds all valid combination of constituents for which a proposition\r\n // is to be generated\r\n final List<List<Boolean>> includeConstituents = new ArrayList<List<Boolean>>();\r\n\r\n // let's start\r\n for (Clause clause : clauses) {\r\n // process coordinating conjunctions\r\n constituents.clear();\r\n for (int i = 0; i < clause.constituents.size(); i++) {\r\n\t\t\t\t// if(xcomp && clause.subject == i) continue; //An xcomp does\r\n // not have an internal subject so should not be processed here\r\n Constituent constituent = clause.constituents.get(i);\r\n List<Constituent> alternatives;\r\n if (!(xcomp && clause.subject == i)\r\n && constituent instanceof IndexedConstituent\r\n // the processing of the xcomps is done in Default\r\n // proposition generator. \r\n // Otherwise we get duplicate propositions.\r\n && !clause.xcomps.contains(i)\r\n && ((i == clause.verb && options.processCcAllVerbs) || (i != clause.verb && options.processCcNonVerbs))) {\r\n alternatives = ProcessConjunctions.processCC(depTree,\r\n clause, constituent, i);\r\n } else if (!(xcomp && clause.subject == i)\r\n && clause.xcomps.contains(i)) {\r\n alternatives = new ArrayList<Constituent>();\r\n ClausIE xclausIE = new ClausIE(options);\r\n xclausIE.semanticGraph = semanticGraph;\r\n xclausIE.depTree = depTree;\r\n xclausIE.xcomp = true;\r\n xclausIE.clauses = ((XcompConstituent) clause.constituents\r\n .get(i)).getClauses();\r\n xclausIE.generatePropositions();\r\n for (Proposition p : xclausIE.propositions) {\r\n StringBuilder sb = new StringBuilder();\r\n String sep = \"\";\r\n for (int j = 0; j < p.constituents.size(); j++) {\r\n if (j == 0) // to avoid including the subjecct, We\r\n {\r\n continue; // could also generate the prop\r\n }\t\t\t\t\t\t\t // without the subject\t\t\t\t\t\t\t\t\t\t\t\r\n sb.append(sep);\r\n sb.append(p.constituents.get(j));\r\n sep = \" \";\r\n }\r\n alternatives.add(new TextConstituent(sb.toString(),\r\n constituent.type));\r\n }\r\n } else {\r\n alternatives = new ArrayList<Constituent>(1);\r\n alternatives.add(constituent);\r\n }\r\n constituents.add(alternatives);\r\n }\r\n\r\n\t\t\t// create a list of all combinations of constituents for which a\r\n // proposition should be generated\r\n includeConstituents.clear();\r\n flags.clear();\r\n include.clear();\r\n for (int i = 0; i < clause.constituents.size(); i++) {\r\n Flag flag = clause.getFlag(i, options);\r\n flags.add(flag);\r\n include.add(!flag.equals(Flag.IGNORE));\r\n }\r\n if (options.nary) {\r\n\t\t\t\t// we always include all constituents for n-ary ouput \r\n // (optional parts marked later)\r\n includeConstituents.add(include);\r\n } else {\r\n // triple mode; determine which parts are required\r\n for (int i = 0; i < clause.constituents.size(); i++) {\r\n include.set(i, flags.get(i).equals(Flag.REQUIRED));\r\n }\r\n\r\n // create combinations of required/optional constituents\r\n new Runnable() {\r\n int noOptional;\r\n\r\n // @Override\r\n public void run() {\r\n noOptional = 0;\r\n for (Flag f : flags) {\r\n if (f.equals(Flag.OPTIONAL)) {\r\n noOptional++;\r\n }\r\n }\r\n run(0, 0, new ArrayList<Boolean>());\r\n }\r\n\r\n private void run(int pos, int selected, List<Boolean> prefix) {\r\n if (pos >= include.size()) {\r\n if (selected >= Math.min(options.minOptionalArgs,\r\n noOptional)\r\n && selected <= options.maxOptionalArgs) {\r\n includeConstituents.add(new ArrayList<Boolean>(\r\n prefix));\r\n }\r\n return;\r\n }\r\n prefix.add(true);\r\n if (include.get(pos)) {\r\n run(pos + 1, selected, prefix);\r\n } else {\r\n if (!flags.get(pos).equals(Flag.IGNORE)) {\r\n run(pos + 1, selected + 1, prefix);\r\n }\r\n prefix.set(prefix.size() - 1, false);\r\n run(pos + 1, selected, prefix);\r\n }\r\n prefix.remove(prefix.size() - 1);\r\n }\r\n }.run();\r\n }\r\n\r\n // create a temporary clause for which to generate a proposition\r\n final Clause tempClause = clause.clone();\r\n\r\n // generate propositions\r\n new Runnable() {\r\n public void run() {\r\n // select which constituents to include\r\n for (List<Boolean> include : includeConstituents) {\r\n // now select an alternative for each constituent\r\n selectConstituent(0, include);\r\n }\r\n }\r\n\r\n void selectConstituent(int i, List<Boolean> include) {\r\n if (i < constituents.size()) {\r\n if (include.get(i)) {\r\n List<Constituent> alternatives = constituents\r\n .get(i);\r\n for (int j = 0; j < alternatives.size(); j++) {\r\n tempClause.constituents.set(i,\r\n alternatives.get(j));\r\n selectConstituent(i + 1, include);\r\n }\r\n } else {\r\n selectConstituent(i + 1, include);\r\n }\r\n } else {\r\n // everything selected; generate\r\n propositionGenerator.generate(propositions, tempClause,\r\n include);\r\n }\r\n }\r\n }.run();\r\n }\r\n }",
"@Override\n\tpublic List<ICompletionProposal> computeCompletionProposals(ContentAssistInvocationContext context, IProgressMonitor monitor) {\n\t\treturn Arrays.asList(assistant.computeCompletionProposals(context.getViewer(), context.getInvocationOffset()));\n\t}",
"private void computeWordProposals(final String word, final int offset, final int carretColumnIndex, final List<ICompletionProposal> propositionList) {\n\t\tfinal int qualifierLength = word.length();\n\t\tfinal int replacementOffset = offset - qualifierLength;\n\n\t\t// keyword and other static proposals\n\t\tfor (List<CompletionProposalTemplate> list : filterPrefix(proposals, word).values()) {\n\t\t\t// and add to result list\n\t\t\tfor (CompletionProposalTemplate template : list) {\n\t\t\t\tpropositionList.add(template.getProposal(replacementOffset, carretColumnIndex - qualifierLength, qualifierLength));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Try to find matches among the spec's set of symbols (e.g. operators definitions and declarations).\n\t\tfinal SpecObj specObj = ToolboxHandle.getSpecObj();\n\t\tif (specObj != null && specObj.getRootModule() != null) { // null if spec hasn't been parsed.\n\t\t\tfinal ModuleNode rootModule = specObj.getRootModule();\n\n\t\t\tfinal Collection<SymbolNode> symbols = rootModule.getSymbols(matcher.setPrefix(word));\n\t\t\tfor (final SymbolNode symbolNode : symbols) {\n\t\t\t\tpropositionList.add(new CompletionProposalTemplate(symbolNode.getSignature(), symbolNode.getName(),\n\t\t\t\t\t\tsymbolNode.getHumanReadableImage()).getProposal(replacementOffset, carretColumnIndex - qualifierLength, qualifierLength));\n\t\t\t}\n\t\t}\n\t}",
"ImmutableList<SchemaOrgType> getPublishingPrinciplesList();",
"public void setProposals(ICompletionProposal[] preComputedProposals) {\n fPreComputedProposals = preComputedProposals;\n }",
"org.apache.xmlbeans.XmlBoolean xgetProbables();",
"@Override\r\n\t\t\tpublic List<Integer> finalEvaluation(\r\n\t\t\t\t\tList<Map<String, String>> proposalsContent,\r\n\t\t\t\t\tList<Integer> proposalEvaluation) {\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public Collection<P> getPoolableElements();",
"ImmutableList<SchemaOrgType> getPositionList();",
"public String getProposal() {\n return proposal;\n }",
"java.util.List<org.openxmlformats.schemas.presentationml.x2006.main.CTGuide> getGuideList();",
"private Proposal getSelectedProposal() {\n\t\tif (isValid()) {\n\t\t\tint index = proposalTable.getSelectionIndex();\n\t\t\tif (proposalList == null || index < 0 || index >= getTableLength()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tint proposalIndex = 0;\n\t\t\tfor (Proposal proposal : proposalList.getTopProposalList()) {\n\t\t\t\tif (index == proposalIndex) {\n\t\t\t\t\treturn proposal;\n\t\t\t\t}\n\t\t\t\tproposalIndex++;\n\t\t\t}\n\t\t\tfor (String provider : proposalList.getProviderList()) {\n\t\t\t\tif (index == proposalIndex) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tproposalIndex++;\n\t\t\t\tfor (Proposal proposal : proposalList.getProposals(provider)) {\n\t\t\t\t\tif (index == proposalIndex) {\n\t\t\t\t\t\treturn proposal;\n\t\t\t\t\t}\n\t\t\t\t\tproposalIndex++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"Collection<QName> getApplicableStyleNames(QName elementName);",
"ImmutableList<SchemaOrgType> getProducerList();",
"@NotNull\n @Override\n public Collection<JavaElementArrangementEntry> parse(@NotNull PsiElement root,\n @NotNull Document document,\n @NotNull Collection<TextRange> ranges)\n {\n List<JavaElementArrangementEntry> result = new ArrayList<JavaElementArrangementEntry>();\n root.accept(new JavaArrangementVisitor(result, document, ranges));\n return result;\n }",
"public ModelElement getParameterDefs() {\n\t((ClassDef)modelElement).clearParameterDef();\n\n\ttry {\n\t\tjava.util.Iterator iterator = getPnlDataSelector().getObjects().iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tParameterDef expression = (ParameterDef)ElementFactory.createObject(ParameterDef.class);\n\t\t\texpression.setSyntax((NlsString)iterator.next());\n\t\t\t((ClassDef)modelElement).addParameterDef(expression);\n\t\t}\n\t} catch(Throwable e) {\n\t\thandleException(e);\n\t}\n\n\treturn modelElement;\n}",
"public List getPrompts() {\n\t\tif (prompts == null) {\n\t\t\tprompts = new ArrayList();\n\t\t\tList nodes = doc.selectNodes(\"/metadataFieldInfo/field/prompts/prompt\");\n\t\t\tif (nodes != null) {\n\t\t\t\tfor (Iterator i = nodes.iterator(); i.hasNext();) {\n\t\t\t\t\tElement promptEl = (Element) i.next();\n\t\t\t\t\tprompts.add(promptEl.getTextTrim());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn prompts;\n\t}",
"private List<ICompletionProposal> getSuggestions(ITextViewer viewer,\n \t\t\tint offset, String prefix) throws BadLocationException {\n \n \t\tProperties properties = loadProposalFile();\n \n \t\tMap<String, String> filteredSuggestions = new HashMap<String, String>();\n \n \t\tfor (Entry<Object, Object> property : properties.entrySet()) {\n \t\t\tif (((String) property.getValue()).startsWith(prefix)) {\n \t\t\t\tfilteredSuggestions.put((String) property.getKey(),\n \t\t\t\t\t\t(String) property.getValue());\n \t\t\t}\n \t\t}\n \n \t\tList<ICompletionProposal> suggestions = createProposals(viewer,\n \t\t\t\tfilteredSuggestions, offset, prefix);\n \n \t\treturn suggestions;\n \t}",
"public String loadPropositions() {\n System.out.println(\"inside loadPropositions ::\");\n logger.info(PropValApproveBean.class, \"PropValApproveBean()\", \"Start loadPropositions\", null);\n Integer pgWUId = null;\n //This should work from the BPM UI Task.\n pgWUId = (Integer) JSFUtils.resolveExpression(\"#{bindings.WorkUnitId.inputValue}\");\n \n //This is for testing on local\n if(AdfFacesContext.getCurrentInstance().getPageFlowScope().get(\"workUnitId\")!= null) { \n pgWUId = Integer.parseInt(AdfFacesContext.getCurrentInstance().getPageFlowScope().get(\"workUnitId\").toString());\n } \n DCBindingContainer bindings = (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();\n\n DCIteratorBinding iter1 = (DCIteratorBinding) bindings.findIteratorBinding(\"PropertyIdentificationIterator\");\n iter1.executeQuery();\n Row row1 = iter1.getCurrentRow();\n\n String ain = (String) row1.getAttribute(\"AIN\");\n \n System.out.println(\"ain -----\"+ain);\n ADFUtils.setPageFlowValue(\"ain\", ain);\n logger.info(PropValApproveBean.class, \"PropValApproveBean()\", \"End loadPropositions\", null);\n return \"loadProp\";\n }",
"public void loadPreferecences()\n {\n // Load preferences for chapter\n chapterPref = Activator.getDefault().getPluginPreferences().getBoolean(PREFERENCE_FOR_CHAPTER);\n if (controller != null)\n { \n\t\t\tcontroller.setHierarchical(chapterPref);\n\t\t}\n // Load preferences for value to recognize req\n String pref = Activator.getDefault().getPluginPreferences().getString(PREFERENCE_FOR_VALUE_TO_RECOGNIZE_REQ);\n if (pref != null && pref.length() > 0)\n {\n Serializer<RecognizedElement> serializer = new Serializer<RecognizedElement>();\n RecognizedElement element = serializer.unSerialize(pref);\n if (element != null)\n {\n valueToRecognizeReq = element;\n }\n }\n\n // Load preferences for attributes list\n pref = Activator.getDefault().getPluginPreferences().getString(PREFERENCE_FOR_LIST_RECOGNIZED_ELEMENT);\n if (pref != null && pref.length() > 0)\n {\n Serializer<Collection<RecognizedElement>> serializer = new Serializer<Collection<RecognizedElement>>();\n Collection<RecognizedElement> paramDecoded = serializer.unSerialize(pref);\n if (paramDecoded != null && paramDecoded.size() > 0)\n {\n for (Iterator<RecognizedElement> iterator = paramDecoded.iterator(); iterator.hasNext();)\n {\n tree.add((RecognizedElement) iterator.next());\n }\n }\n }\n \n // Load preferences for the description\n descriptionChecked = Activator.getDefault().getPluginPreferences().getBoolean(PREFERENCE_FOR_DESCRIPTION);\n }",
"@Override\n @Transactional(readOnly = true)\n public Page<Proposal> findAll(Pageable pageable) {\n log.debug(\"Request to get all Proposals\");\n return proposalRepository.findAll(pageable);\n }",
"public List<Prodotto> getListaProdotti() {\n\t\treturn Shop.getInstance().getProdotti();\n\t}",
"Iterable<PrimaryPolicyMetadata> getApplicablePolicies();",
"Collection<QName> getDefinedStyleNames();",
"private ContentProposalList getEmptyProposalArray() {\n\t\treturn new ContentProposalList();\n\t}",
"public List<String> loadPrizes() {\n\t\tList<String> result = new ArrayList<String>();\n\t\tresult.add(getLocalizedString(\"defaultValue.prize\"));\n\t\tresult.add(getLocalizedString(\"value.prize.iceCream\"));\n\t\tresult.add(getLocalizedString(\"value.prize.iPhone5\"));\n\t\tresult.add(getLocalizedString(\"value.prize.newShoes\"));\n\t\treturn result;\n\t}",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"private void setProposals(ContentProposalList newProposalList) {\n\t\tif (newProposalList == null) {\n\t\t\tnewProposalList = getEmptyProposalArray();\n\t\t}\n\t\tthis.proposalList = newProposalList;\n\t\tif (!isValid())\n\t\t\treturn;\n\n\t\t// Reset item width\n\t\tmaxItemWidth = 0;\n\t\tnonSelectableItems.clear();\n\t\tint proposalIndex = proposalList.getTopProposalList().size();\n\t\tfor (String provider : proposalList.getProviderList()) {\n\t\t\tnonSelectableItems.add(proposalIndex);\n\t\t\tproposalIndex += proposalList.getProposals(provider).length + 1;\n\t\t}\n\n\t\t// If there is a table\n\t\tif (isValid()) {\n\t\t\tif (USE_VIRTUAL) {\n\t\t\t\t// Set and clear the virtual table. Data will be\n\t\t\t\t// provided in the SWT.SetData event handler.\n\t\t\t\tproposalTable.setItemCount(getTableLength());\n\t\t\t\tproposalTable.clearAll();\n\t\t\t\tinitializeTextLayouts();\n\t\t\t} else {\n\t\t\t\t// Populate the table manually\n\t\t\t\tproposalTable.setRedraw(false);\n\t\t\t\tproposalTable.setItemCount(getTableLength());\n\t\t\t\tTableItem[] items = proposalTable.getItems();\n\n\t\t\t\tint index = 0;\n\t\t\t\tfor (Proposal proposal : newProposalList.getTopProposalList()) {\n\t\t\t\t\tTableItem item = items[index];\n\t\t\t\t\titem.setText(\" \" + getString(proposal));\n\t\t\t\t\titem.setImage(getImage(proposal, false));\n\t\t\t\t\titem.setData(proposal);\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t\tfor (String provider : newProposalList.getProviderList()) {\n\t\t\t\t\tTableItem item = items[index];\n\t\t\t\t\tint count = newProposalList.getCount(provider);\n\t\t\t\t\tString text = provider + \" (\" + count + \" matching items)\";\n\t\t\t\t\titem.setText(text);\n\t\t\t\t\t// Data == null => not selectable\n\t\t\t\t\titem.setData(null);\n\n\t\t\t\t\tDisplay display = Display.getCurrent();\n\t\t\t\t\tColor color = display.getSystemColor(SWT.COLOR_GRAY);\n\t\t\t\t\tFontData fontData = item.getFont().getFontData()[0];\n\t\t\t\t\tFont font = new Font(display, new FontData(\n\t\t\t\t\t\t\tfontData.getName(), fontData.getHeight(),\n\t\t\t\t\t\t\tSWT.ITALIC | SWT.BOLD));\n\t\t\t\t\titem.setBackground(color);\n\t\t\t\t\titem.setFont(font);\n\n\t\t\t\t\tindex++;\n\t\t\t\t\tfor (Proposal proposal : newProposalList\n\t\t\t\t\t\t\t.getProposals(provider)) {\n\t\t\t\t\t\titem.setText(\" \" + getString(proposal));\n\t\t\t\t\t\titem.setImage(getImage(proposal, false));\n\t\t\t\t\t\titem.setData(proposal);\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tproposalTable.setRedraw(true);\n\t\t\t}\n\t\t\tif (infoPopup != null) {\n\t\t\t\tinfoPopup.close();\n\t\t\t}\n\t\t}\n\t\tfooter.setText(\"\");\n\t\t\n\t\tif (handleTopProposals) {\n\t\t\tadapter.handleTopProposals(newProposalList);\n\t\t\t// First to respond win otherwise if all reponded,\n\t\t\t// we stop handle\n\t\t\tif (adapter.hasSelectedTopProposal()\n\t\t\t\t\t|| newProposalList.allResponded()) {\n\t\t\t\thandleTopProposals = false;\n\t\t\t}\n\t\t}\n\t\t// Select the top proposal that was displayed, if any\n\t\tproposalTable.deselectAll();\n\t\tif (adapter.hasSelectedTopProposal()) {\n\t\t\tint index = proposalList.getTopProposalList().indexOf(\n\t\t\t\t\tadapter.getSelectedTopProposal());\n\t\t\tif (index >= 0)\n\t\t\t\tselectProposal(index);\n\t\t}\n\t\tif (AutoCompleteUIPlugin.isRAP())\n\t\t\tadjustTableBounds();\n\t}",
"private static Collection<CompletionProposal> getMixinsCompletionProposals(final CompletionContext context, CPModel model) {\n Collection<CompletionProposal> proposals = new LinkedHashSet<>();\n for (CPElement mixin : model.getMixins()) {\n if (mixin.getType() == CPElementType.MIXIN_DECLARATION) {\n ElementHandle handle = new CPCslElementHandle(context.getFileObject(), mixin.getName());\n MixinCompletionItem item = new MixinCompletionItem(\n handle,\n mixin.getHandle(),\n context.getAnchorOffset(),\n null); //no origin for current file\n// var.getFile() == null ? null : var.getFile().getNameExt());\n\n proposals.add(item);\n }\n }\n try {\n //now gather global vars from all linked sheets\n FileObject file = context.getFileObject();\n if (file != null) {\n Map<FileObject, CPCssIndexModel> indexModels = CPUtils.getIndexModels(file, DependencyType.REFERRING_AND_REFERRED, true);\n for (Entry<FileObject, CPCssIndexModel> entry : indexModels.entrySet()) {\n FileObject reff = entry.getKey();\n CPCssIndexModel cpIndexModel = entry.getValue();\n Collection<org.netbeans.modules.css.prep.editor.model.CPElementHandle> mixins = cpIndexModel.getMixins();\n for (org.netbeans.modules.css.prep.editor.model.CPElementHandle mixin : mixins) {\n if (mixin.getType() == CPElementType.MIXIN_DECLARATION) {\n ElementHandle handle = new CPCslElementHandle(context.getFileObject(), mixin.getName());\n MixinCompletionItem item = new MixinCompletionItem(\n handle,\n mixin,\n context.getAnchorOffset(),\n reff.getNameExt());\n\n proposals.add(item);\n }\n\n }\n\n }\n }\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n\n return proposals;\n }",
"private void asyncRecomputeProposals() {\n\t\tfooter.setText(\"Searching...\");\n\t\tif (isValid()) {\n\t\t\tsynchronized (uniqueId) {\n\t\t\t\tif (uniqueId == Long.MAX_VALUE)\n\t\t\t\t\tuniqueId = Long.MIN_VALUE;\n\t\t\t\tuniqueId++;\n\t\t\t}\n\t\t\tfinal Long currentId = new Long(uniqueId);\n\t\t\tcontrol.getDisplay().asyncExec(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tadapter.getProposals(new IContentProposalSearchHandler() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handleResult(\n\t\t\t\t\t\t\t\tfinal ContentProposalList proposalList) {\n\t\t\t\t\t\t\tif (control != null && !control.isDisposed()) {\n\t\t\t\t\t\t\t\tcontrol.getDisplay().asyncExec(new Runnable() {\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\tif (currentId.equals(uniqueId))\n\t\t\t\t\t\t\t\t\t\t\trecomputeProposals(proposalList);\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}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handleTooltips(List<TooltipData> tooltips) {\n\t\t\t\t\t\t\tadapter.handleTooltipData(tooltips);\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}",
"void xsetProbables(org.apache.xmlbeans.XmlBoolean probables);",
"@External(readonly = true)\n\tpublic List<Address> get_score_list(){\n\t\t\n\t\tAddress[] proposal_list = new Address[this.proposal_list.size()];\n\n\t\tfor(int i= 0; i< this.proposal_list.size(); i++) {\n\t\t\tproposal_list[i] = this.proposal_list.get(i);\n\t\t}\t\t\n\t\treturn List.of(proposal_list);\n\t}",
"private void recomputeProposals(ContentProposalList newProposalList) {\n\t\tif (newProposalList == null)\n\t\t\tnewProposalList = getEmptyProposalArray();\n\t\tif (newProposalList.fullLength() == 0 && newProposalList.allResponded()) {\n\t\t\tthis.proposalList = newProposalList;\n\t\t\tclose();\n\t\t} else {\n\t\t\tsetProposals(newProposalList);\n\t\t}\n\t}",
"public static void sortCompilationProposal(List<ICompletionProposal> prop){\r\n\t\tCollections.sort(prop,new Comparator<ICompletionProposal>(){\r\n\t\t\tpublic int compare(ICompletionProposal o1, ICompletionProposal o2){\r\n\t\t\t\treturn o1.getDisplayString().compareTo(o2.getDisplayString());\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"ImmutableList<SchemaOrgType> getPublicationList();",
"public ArrayList<Proceso> procesosPoliticaEnvejecimiento() {\n\t\tArrayList<Proceso> procesosPE = new ArrayList<Proceso>();\n\t\tProceso aux = this.raiz.sig;\n\t\twhile (aux != this.raiz) {\n\t\t\tint tiempoEnCola = this.tiempo - aux.tllegada + 1;\n\t\t\tif (tiempoEnCola >= this.tiempoPE) {\n\t\t\t\tProceso auxp = aux.padre;\n\t\t\t\tauxp.sig = aux.sig;\n\t\t\t\taux.sig.padre = auxp;\n\t\t\t\taux.padre = null;\n\t\t\t\tprocesosPE.add(aux);\n\t\t\t}\n\n\t\t\taux = aux.sig;\n\t\t}\n\t\tif (procesosPE.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn procesosPE;\n\t}",
"ImmutableList<SchemaOrgType> getEducationalAlignmentList();",
"public ArrayList<Integer> getProfs(){\r\n\t\treturn this.listeProfs;\r\n\t}",
"public static Properties getDocletList() {\n\t\treturn docPropList;\n\t}",
"ImmutableList<SchemaOrgType> getProviderList();",
"public static void llenarListaProcesados() {\n List<String> lista = Datos.getInstance().getDocumentos();\n if (lista == null) {\n return;\n }\n modelProcesados.clear();\n for (String s : lista) {\n modelProcesados.addElement(s);\n }\n\n }",
"public Page<Proposal> findAllWithEagerRelationships(Pageable pageable) {\n return proposalRepository.findAllWithEagerRelationships(pageable);\n }",
"public static String[] getParNamesFor(ExDesignNode parentNode) {\r\n\t\tString[] ap = getAllParNames();\r\n\t\tif (parentNode.getType() == de.pxlab.pxl.ExDesignNode.AssignmentGroupNode) {\r\n\t\t\tString[] sp = getSystemParNames();\r\n\t\t\treturn sp;\r\n\t\t} else if (parentNode.getType() == de.pxlab.pxl.ExDesignNode.DisplayNode) {\r\n\t\t\tArrayList l = new ArrayList(ap.length);\r\n\t\t\tfor (int i = 0; i < ap.length; i++) {\r\n\t\t\t\tif (ap[i].startsWith(parentNode.getInstanceName())) {\r\n\t\t\t\t\tl.add(ap[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tl.trimToSize();\r\n\t\t\tString[] pn = new String[l.size()];\r\n\t\t\tfor (int i = 0; i < l.size(); i++) {\r\n\t\t\t\tpn[i] = (String) l.get(i);\r\n\t\t\t}\r\n\t\t\treturn pn;\r\n\t\t} else {\r\n\t\t\treturn ap;\r\n\t\t}\r\n\t}",
"public List<? extends Declarator> directlyDeclaredElements();",
"Set<? extends Doclet.Option> getSupportedOptions();",
"org.landxml.schema.landXML11.AlignmentNameRefs xgetAlignmentRefs();",
"public String getParamDefs() {\r\n return super.getParamDefs() + \", \" + SampledPolicy.paramNameTypes;\r\n }",
"public char[] getCompletionProposalAutoActivationCharacters() {\n\t\t// return new char[] { '.', '(' };\n\t\treturn new char[] { '.' };\n\t}",
"public static List<ASTNode> getPreprocessorList() {\n\t\treturn preprocessorList;\n\t}",
"org.apache.xmlbeans.XmlString xgetCurp();",
"public static String getPollsHTML() {\r\n\t\tPollsController pc = new PollsController(PC.filterPolls(\"\", true, 0));\r\n\t\treturn xmlToHTML(\"/WEB-INF/PollsMainTransform.xsl\", pc,\r\n\t\t\t\tPollsController.class);\r\n\t}",
"public ArrayList<T> getOrderedElements() {\n\t\tArrayList<T> ordered = new ArrayList<T>(itemProbs_.keySet());\n\t\tCollections.sort(ordered, new ProbabilityComparator<T>());\n\n\t\treturn ordered;\n\t}",
"private List<QuestionDef> getQuestions(List<IFormElement> elements)\n\t{\n\t\t//define the return value\n\t\tArrayList<QuestionDef> questions = new ArrayList<QuestionDef>();\n\t\t//loop over elements\n\t\tif(elements == null)\n\t\t{\n\t\t\treturn questions;\n\t\t}\n\t\tfor(IFormElement element: elements)\n\t\t{\n\t\t\t//is it a question\n\t\t\tif(element instanceof QuestionDef)\n\t\t\t{\n\t\t\t\tquestions.add((QuestionDef)element);\n\t\t\t}\n\t\t\t//recurse\n\t\t\tquestions.addAll(getQuestions(element.getChildren()));\n\t\t}\n\t\t\n\t\treturn questions;\n\t}",
"ImmutableList<SchemaOrgType> getReviewList();",
"public ArrayList<JavaScope> getArguments() {\n\t\tArrayList<JavaScope> ret = new ArrayList<JavaScope>();\n\t\tfor (TypeContainer t : this.sig)\n\t\t\tret.add(t.item);\n\t\t\n\t\treturn ret;\n\t}",
"java.util.List<java.lang.String>\n getExtraJavacoptsList();",
"ImmutableList<SchemaOrgType> getAboutList();",
"public String getXsl() {\n return xsl;\n }",
"@Override\r\n\tpublic char[] getCompletionProposalAutoActivationCharacters() {\r\n\t\treturn null;\r\n\t}",
"public Path getProposalPath() { return proposalPath; }",
"ImmutableList<SchemaOrgType> getPublisherList();",
"private void htmlStaticsticsParagraphs() throws Exception{\n\t\tElements listP = htmlParsed.select(\"p\");\n\t\tMap<String,Boolean> option = new HashMap<>();\n\t\toption.put(\"currency\", true);\n\t\toption.put(\"table\", true);\n\t\toption.put(\"list\", true);\n\t\toption.put(\"p\", true);\n\t\ttextStatisticsElements(listP, \"p\", option);\n\t\tcomputeElementstatistics(listP, \"p\", option);\n\t}",
"public ProyectoElements getProyectoAccess() {\n\t\treturn pProyecto;\n\t}",
"ImmutableList<SchemaOrgType> getTextList();",
"public String getParamDefs() {\n return super.getParamDefs() + \", \" + PlainValueFunction.paramNameTypes;\n }",
"public ListIterator<Parameter<?>> getAdjustableParamsIterator();",
"public String getLocalXSLT(){\r\n\t\treturn this.localXSLT;\r\n\t}",
"java.util.List<org.landxml.schema.landXML11.ClassificationDocument.Classification> getClassificationList();",
"public abstract DtPropuesta[] getPropuestasPopulares();",
"public XWPFDocument startConversion() {\n\n convertParagraphs(docx);\n convertFooter(docx);\n convertHeader(docx);\n convertTables(docx);\n updateStylesToNewFont();\n\n\n return docx;\n }",
"public void testCompletion() throws Exception {\n \t\tsetUpIntentProject(\"completionTest\", INTENT_DOC_PATH);\n \t\teditor = openIntentEditor();\n \t\tdocument = editor.getDocumentProvider().getDocument(editor.getEditorInput());\n \t\tcontentAssistant = editor.getViewerConfiguration().getContentAssistant(editor.getProjectionViewer());\n \n \t\tICompletionProposal[] proposals = null;\n \n \t\t/*\n \t\t * STRUCTURE\n \t\t */\n \t\t// inside a document\n \t\tproposals = getCompletionProposals(12);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_CHAPTER, proposals[0].getDisplayString());\n \t\tproposals = getCompletionProposals(15);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(KW_CHAPTER, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_CHAPTER, proposals[1].getDisplayString());\n \n \t\t// inside a chapter\n \t\tproposals = getCompletionProposals(741);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_SECTION, proposals[0].getDisplayString());\n \t\tproposals = getCompletionProposals(745);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(KW_SECTION, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_SECTION, proposals[1].getDisplayString());\n \n \t\t// inside a section\n \t\tproposals = getCompletionProposals(773);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_SECTION, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_MU, proposals[1].getDisplayString());\n \n \t\t/*\n \t\t * MODELING UNITS\n \t\t */\n \t\t// beginning of the modeling unit\n \t\tproposals = getCompletionProposals(2138);\n \t\t// We should propose to create a new resource, a new entity, or contribute to an existing entity\n \t\tassertIsExpectedProposalsForEmptyModelingUnit(proposals);\n \n \t\t// beginning of a named modeling unit\n \t\tproposals = getCompletionProposals(3232);\n \t\tassertIsExpectedProposalsForEmptyModelingUnit(proposals);\n \n \t\t// resource declaration patterns\n \t\tproposals = getCompletionProposals(3263);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_URI, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_CONTENT, proposals[1].getDisplayString());\n \n \t\t// features proposals in instanciation\n \t\tproposals = getCompletionProposals(3557);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(\"nsURI : EString [?] - Set the value EPackage.nsURI\", proposals[0].getDisplayString());\n \t\tassertEquals(\"nsPrefix : EString [?] - Set the value EPackage.nsPrefix\",\n \t\t\t\tproposals[1].getDisplayString());\n \n \t\t// features proposals in contribution\n \t\tproposals = getCompletionProposals(3848);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(\"eClassifiers : EClassifier [0,*] - Set the value match.eClassifiers\",\n \t\t\t\tproposals[0].getDisplayString());\n \n \t\t// Boolean value\n \t\tproposals = getCompletionProposals(4016);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_BOOL_VALUE, proposals[0].getDisplayString());\n \n \t\t// Object value\n \t\tproposals = getCompletionProposals(3985);\n \t\tassertEquals(3, proposals.length);\n \t\t// We should propose to create a new Element\n \t\tassertEquals(\"new Element (of type EClassifier) - Set this new Element as value for eType\",\n \t\t\t\tproposals[0].getDisplayString());\n \t\t// Use existing elements (of matching type) defined in the document\n \t\tassertEquals(\"Reference to MatchElement - Set the MatchElement element as value for eType\",\n \t\t\t\tproposals[1].getDisplayString());\n \t\t// And available Classifiers from the package registry\n \t\tassertEquals(\"MatchElement - http://www.eclipse.org/emf/compare/match/1.1\",\n \t\t\t\tproposals[2].getDisplayString());\n \n \t\t// instanciation proposals\n \t\tproposals = getCompletionProposals(3865);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(\"EClass - http://www.eclipse.org/emf/2002/Ecore\", proposals[0].getDisplayString());\n \t\tassertEquals(\"EClassifier - http://www.eclipse.org/emf/2002/Ecore\", proposals[1].getDisplayString());\n \n \t\t// features proposals further in contribution\n \t\tproposals = getCompletionProposals(4128);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(\n \t\t\t\t\"eStructuralFeatures : EStructuralFeature [0,*] - Set the value EClass.eStructuralFeatures\",\n \t\t\t\tproposals[0].getDisplayString());\n \t}",
"public java.util.List<org.landxml.schema.landXML11.GPSPositionDocument.GPSPosition> getGPSPositionList()\r\n {\r\n final class GPSPositionList extends java.util.AbstractList<org.landxml.schema.landXML11.GPSPositionDocument.GPSPosition>\r\n {\r\n public org.landxml.schema.landXML11.GPSPositionDocument.GPSPosition get(int i)\r\n { return GPSSetupImpl.this.getGPSPositionArray(i); }\r\n \r\n public org.landxml.schema.landXML11.GPSPositionDocument.GPSPosition set(int i, org.landxml.schema.landXML11.GPSPositionDocument.GPSPosition o)\r\n {\r\n org.landxml.schema.landXML11.GPSPositionDocument.GPSPosition old = GPSSetupImpl.this.getGPSPositionArray(i);\r\n GPSSetupImpl.this.setGPSPositionArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.GPSPositionDocument.GPSPosition o)\r\n { GPSSetupImpl.this.insertNewGPSPosition(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.GPSPositionDocument.GPSPosition remove(int i)\r\n {\r\n org.landxml.schema.landXML11.GPSPositionDocument.GPSPosition old = GPSSetupImpl.this.getGPSPositionArray(i);\r\n GPSSetupImpl.this.removeGPSPosition(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return GPSSetupImpl.this.sizeOfGPSPositionArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new GPSPositionList();\r\n }\r\n }",
"Iterable<? extends XomNode> elements();",
"ContentProposalPopup(ContentProposalAdapter adapter, String infoText,\n\t\t\tContentProposalList proposalList) {\n\t\t// IMPORTANT: Use of SWT.ON_TOP is critical here for ensuring\n\t\t// that the target control retains focus on Mac and Linux. Without\n\t\t// it, the focus will disappear, keystrokes will not go to the\n\t\t// popup, and the popup closer will wrongly close the popup.\n\t\t// On platforms where SWT.ON_TOP overrides SWT.RESIZE,\n\t\t// we will live with this.\n\t\t// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=126138\n\t\tsuper(adapter.getControl().getShell(), SWT.RESIZE | SWT.ON_TOP | SWT.NO_FOCUS, false,\n\t\t\t\tfalse, false, false, false, null, infoText);\n\t\tthis.adapter = adapter;\n\t\tthis.control = adapter.getControl();\n\t\t\n\t\t// this.labelProvider = adapter.getLabelProvider();\n\t\tthis.partialContentImage = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/mglass-16.png\");\n\t\tthis.partialContentImageSelected = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/mglass-16-white.png\");\n\t\tthis.functionContentImage = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/function-16.png\");\n\t\tthis.functionContentImageSelected = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/function-16-white.png\");\n\t\tthis.nonSelectableItems = new ArrayList<Integer>();\n\n\t\tthis.proposalList = proposalList;\n\t\t// When the popup is opened & the content is not already completed, we\n\t\t// want to handle this behaviour\n\t\tif (!adapter.isPreventTopProposalSelection())\n\t\t\thandleTopProposals = true;\n\t}",
"java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();",
"java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();",
"void compileParameterList() {\n tagBracketPrinter(PAR_LIST_TAG, OPEN_TAG_BRACKET);\n try {\n compileParameterListHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(PAR_LIST_TAG, CLOSE_TAG_BRACKET);\n }",
"public String[] imprimeProfessores() {\n\t\tString[] st = new String[PROFESSORES.size()];\n\n\t\tfor (int i = 0; i < st.length; i++) {\n\n\t\t\tst[i] = PROFESSORES.get(i).getCodProfessor() + \" \" + PROFESSORES.get(i).getNome();\n\t\t}\n\n\t\treturn st;\n\t}",
"public StaticApplicablePolicyView getStaticApplicablePolicies()\n\t{\n\t\treturn this.rootPolicyEvaluator.getStaticApplicablePolicies();\n\t}",
"public ParameterRegistrationImplementor[] collectRefCursorParameters() {\n\t\tfinal List<ParameterRegistrationImplementor> refCursorParams = new ArrayList<>();\n\n\t\tgetParameterMetadata().visitRegistrations(\n\t\t\t\tqueryParameter -> {\n\t\t\t\t\tfinal ParameterRegistrationImplementor registration = (ParameterRegistrationImplementor) queryParameter;\n\t\t\t\t\tif ( registration.getMode() == ParameterMode.REF_CURSOR ) {\n\t\t\t\t\t\trefCursorParams.add( registration );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t);\n\t\treturn refCursorParams.toArray( new ParameterRegistrationImplementor[refCursorParams.size()] );\n\t}",
"private static void normalizePropositions(Set<ExternalizedStateComponent> componentSet) {\n\t\tfor(ExternalizedStateComponent component : componentSet) {\n\t\t\tif(component instanceof ExternalizedStateProposition) {\n\t\t\t\tExternalizedStateProposition p = (ExternalizedStateProposition) component;\n\t\t\t\tGdlSentence sentence = p.getName();\n\t\t\t\tif(sentence instanceof GdlRelation) {\n\t\t\t\t\tGdlRelation relation = (GdlRelation) sentence;\n\t\t\t\t\tif(relation.getName().equals(NEXT)) {\n\t\t\t\t\t\tp.setName(GdlPool.getProposition(GdlPool.getConstant(\"anon\")));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public String getAutoApproveScopes() {\n return autoApproveScopes;\n }",
"private void setUpSelect(){\n\t\tEPFuncion fun = new EPFuncion();\n\t\tEPPropiedad pro = new EPPropiedad();\n\t\tArrayList<EPExpresion> exps = new ArrayList<>();\n\t\t//seteamos la propiedad de la funcion.\n\t\tpro.setNombre(\"a1.p1\");\n\t\tpro.setPseudonombre(\"\");\n\t\t//metemos la propiedad en la funcion.\n\t\texps.add(pro);\n\t\tfun.setExpresiones(exps);\n\t\t//seteamos la funcion con el resto de valores.\n\t\tfun.setNombreFuncion(\"f1\");\n\t\tfun.setPseudonombre(\"fun1\");\n\t\t//metemos la funcion en la lista del select.\n\t\texpresionesSelect.add(fun);\n\t\t//seteamos el resto de propiedades.\n\t\tpro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p2\");\n\t\tpro.setPseudonombre(\"pro2\");\n\t\texpresionesSelect.add(pro);\n\t\tpro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p3\");\n\t\tpro.setPseudonombre(\"pro3\");\n\t\texpresionesSelect.add(pro);\n\t}",
"public static Iterable<SNode> sourceNodesQuery_72_11(final SourceSubstituteMacroNodesContext _context) {\n return Sequence.fromIterable(((Iterable<SNode>) _context.getVariable(\"var:menusAndContributionsForConcept\"))).select((it) -> (SNodeOperations.isInstanceOf(it, CONCEPTS.TransformationMenuContribution$jD) ? SLinkOperations.getTarget(SNodeOperations.cast(SLinkOperations.getTarget(SNodeOperations.cast(it, CONCEPTS.TransformationMenuContribution$jD), LINKS.menuReference$uYXm), CONCEPTS.TransformationMenuReference_Named$rf), LINKS.menu$8pZB) : it)).distinct().sort((it) -> (String) INamedConcept__BehaviorDescriptor.getFqName_idhEwIO9y.invoke(it), true);\n }",
"org.apache.xmlbeans.XmlString xgetPluginstate();",
"public PackageDoc[] specifiedPackages() {\n // System.out.println(\"RootDoc.specifiedPackages() called. values = \" +\n // specPackages.values());\n return specPackages.values().toArray(new PackageDoc[0]);\n // return new PackageDoc[0];\n }",
"public List<Promotion> getAllActivePromotions();",
"String getAssignmentApproaches();",
"@Override\n\t\tpublic List<PointsTarget> getPointTargets(Proposal proposal, PointType pointType, DistributionStrategy distributionStrategy) throws SystemException {\n\t\t\tList<PointsTarget> targets = new ArrayList<>();\n\t\t\tif (distributionStrategy == DistributionStrategy.USER_DEFINED) {\n\t\t\t\tfor (PointsDistributionConfiguration pdc: PointsDistributionConfigurationLocalServiceUtil.findByProposalIdPointTypeId(proposal.getProposalId(), pointType.getId())) {\n\t\t\t\t\tif (pdc.getTargetUserId() > 0) {\n\t\t\t\t\t\tPointsTarget target = new PointsTarget();\n\t\t\t\t\t\ttarget.setUserId(pdc.getTargetUserId());\n\t\t\t\t\t\ttarget.setPercentage(pdc.getPercentage());\n\t\t\t\t\t\ttargets.add(target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn targets;\n\t\t}"
] | [
"0.64083326",
"0.5844387",
"0.571928",
"0.558309",
"0.55707175",
"0.5469821",
"0.53752285",
"0.5329512",
"0.53228337",
"0.52196276",
"0.5214899",
"0.51981634",
"0.51178867",
"0.4991286",
"0.49715284",
"0.49303997",
"0.49108946",
"0.48213035",
"0.47746077",
"0.47517952",
"0.47070974",
"0.46447554",
"0.4622144",
"0.46165004",
"0.4616156",
"0.4611161",
"0.46091068",
"0.4600801",
"0.45864618",
"0.45813894",
"0.4570777",
"0.45436615",
"0.44901106",
"0.4483453",
"0.44796556",
"0.44688004",
"0.44535986",
"0.44525006",
"0.4444646",
"0.4429448",
"0.43951464",
"0.4360035",
"0.4351777",
"0.43385604",
"0.4334738",
"0.43218037",
"0.43151584",
"0.42978197",
"0.42747995",
"0.4257963",
"0.4254548",
"0.42540237",
"0.42461354",
"0.4245561",
"0.42402086",
"0.4233261",
"0.42105108",
"0.420604",
"0.41865304",
"0.4167208",
"0.41622236",
"0.41544923",
"0.41412562",
"0.4136906",
"0.4127777",
"0.4125223",
"0.41204715",
"0.41102552",
"0.41099674",
"0.41051307",
"0.409571",
"0.40920228",
"0.4091809",
"0.40849718",
"0.40790814",
"0.4076124",
"0.40735894",
"0.40519416",
"0.40485388",
"0.40483963",
"0.40472433",
"0.40457776",
"0.40437788",
"0.40428346",
"0.40374014",
"0.40316144",
"0.40316144",
"0.40308535",
"0.4028833",
"0.40263563",
"0.4016556",
"0.4010662",
"0.40087628",
"0.40060318",
"0.40046462",
"0.40011582",
"0.39986694",
"0.3993308",
"0.39901173",
"0.3989687"
] | 0.6788752 | 0 |
Calculate proposals for open content regions. | protected void computeTagOpenProposals() {
if (replacementBeginPosition == documentRegion.getStartOffset(region)) {
if (node.getNodeType() == Node.ELEMENT_NODE) {
// at the start of an existing tag, right before the '<'
computeTagNameProposals();
}
} else {
// within the white space
ITextRegion name = getNameRegion(((IDOMNode) node)
.getStartStructuredDocumentRegion());
if ((name != null)
&& ((documentRegion.getStartOffset(name) <= replacementBeginPosition) && (documentRegion
.getEndOffset(name) >= replacementBeginPosition))) {
// replace the existing name
replacementBeginPosition = documentRegion.getStartOffset(name);
replacementLength = name.getTextLength();
} else {
// insert a valid new name, or possibly an end tag
// addEndTagProposals(contentAssistRequest);
setReplacementLength(0);
}
addTagNameProposals(getElementPosition(node));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n \tpublic ArrayList<ICompletionProposal> getCompletionProposals() {\n\n \t\tif (region.getType() == DOMRegionContext.XML_TAG_OPEN) {\n \t\t\tcomputeTagOpenProposals();\n \t\t} else if (region.getType() == DOMRegionContext.XML_TAG_NAME) {\n \t\t\tcomputeTagNameProposals();\n \t\t}\n \t\treturn getAllCompletionProposals();\n \t}",
"public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,\n\t\t\tint documentOffset) {\n\t\tboolean dotActivation = false;\n\n\t\tVector<ICompletionProposal> result = new Vector<ICompletionProposal>();\n\t\t// ICompletionProposal[] result= new\n\t\t// ICompletionProposal[fgProposals.length];\n\t\tIDocument doc = viewer.getDocument();\n\n\t\tFindReplaceDocumentAdapter frd = new FindReplaceDocumentAdapter(doc);\n\n\t\tint pos = documentOffset;\n\t\tdo {\n\t\t\tpos--;\n\t\t} while (pos >= 0 && !Character.isWhitespace(frd.charAt(pos)));\n\t\tpos++;\n\n\t\tString stp = \"\";\n\t\tif (pos >= 0)\n\t\t\tstp = frd.subSequence(pos, documentOffset).toString();\n\n\t\t// See if we have . activation\n\t\tif (frd.charAt(documentOffset - 1) == '.') {\n\t\t\tString props[] = dotActivation(stp, result);\n\t\t\tfor (int i = 0; i < props.length; i++) {\n\t\t\t\tString val = props[i];\n\t\t\t\tIContextInformation info = new ContextInformation(\n\t\t\t\t\t\tval,\n\t\t\t\t\t\tMessageFormat\n\t\t\t\t\t\t\t\t.format(\n\t\t\t\t\t\t\t\t\t\t\"CompletionProcessor.Proposal.ContextInfo.pattern\", new Object[] { val })); //$NON-NLS-1$\n\t\t\t\t// result.add(new CompletionProposal(fgProposals[i],\n\t\t\t\t// documentOffset, 0, fgProposals[i].length(), null,\n\t\t\t\t// fgProposals[i], info,\n\t\t\t\t// MessageFormat.format(\"CompletionProcessor.Proposal.hoverinfo.pattern\",\n\t\t\t\t// new Object[] { fgProposals[i]}))); //$NON-NLS-1$\n\t\t\t\tresult.add(new CompletionProposal(val, documentOffset, 0,\n\t\t\t\t\t\tval.length(), null, val, null, null)); //$NON-NLS-1$\n\t\t\t}\n\n\t\t} else {\n\t\t\t// System.out.println(\"String part:\" + stp);\n\t\t\tSet<String> comps = fgProposals.keySet();\n\t\t\tIterator<String> compitr = comps.iterator();\n\t\t\twhile (compitr.hasNext()) {\n\t\t\t\t// CompletionToken comp = comps.nextElement();\n\t\t\t\t// String val = comp.getKey();\n\t\t\t\tString val = compitr.next();\n\t\t\t\t// If there are too many matches (and it becomes annoying) then\n\t\t\t\t// remove the two calls to toLowerCase() below\n\t\t\t\t// if (val.toLowerCase().startsWith(stp.toLowerCase())) {\n\t\t\t\tif (val.startsWith(stp)) {\n\n\t\t\t\t\tString rep = val.substring(stp.length());\n\t\t\t\t\tIContextInformation info = new ContextInformation(\n\t\t\t\t\t\t\tval,\n\t\t\t\t\t\t\tMessageFormat\n\t\t\t\t\t\t\t\t\t.format(\n\t\t\t\t\t\t\t\t\t\t\t\"CompletionProcessor.Proposal.ContextInfo.pattern\", new Object[] { val })); //$NON-NLS-1$\n\t\t\t\t\t// result.add(new CompletionProposal(fgProposals[i],\n\t\t\t\t\t// documentOffset, 0, fgProposals[i].length(), null,\n\t\t\t\t\t// fgProposals[i], info,\n\t\t\t\t\t// MessageFormat.format(\"CompletionProcessor.Proposal.hoverinfo.pattern\",\n\t\t\t\t\t// new Object[] { fgProposals[i]}))); //$NON-NLS-1$\n\t\t\t\t\t\n\t\t\t\t\t// Do not show proposals with . if the stump does not have a .\n\t\t\t\t\tif(!((stp.indexOf('.') == -1) && val.indexOf('.') != -1)) {\n\t\t\t\t\t\tresult.add(new CompletionProposal(rep, documentOffset, 0,\n\t\t\t\t\t\t\t\trep.length(), null, val, null, null)); //$NON-NLS-1$\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// adding an empty string to ensure that the completion dialog appears\n\t\tif (result.size() == 0) {\n\t\t\tresult.add(new CompletionProposal(\n\t\t\t\t\t\"\", documentOffset, 0, 0, null, \"\", null, null)); //$NON-NLS-1$\n\t\t}\n\n\t\treturn result.toArray(new ICompletionProposal[result.size()]);\n\t}",
"public static Map<Integer, Proposal> getProposals() { return proposals; }",
"private ICompletionProposal[] getCompletionProposals(int offset) throws BadLocationException {\n \t\treturn contentAssistant.getContentAssistProcessor(document.getContentType(offset))\n \t\t\t\t.computeCompletionProposals(editor.getProjectionViewer(), offset);\n \t}",
"public java.util.List<edu.ustb.sei.mde.xmu2.resource.xmu2.ui.Xmu2CompletionProposal> process(java.util.List<edu.ustb.sei.mde.xmu2.resource.xmu2.ui.Xmu2CompletionProposal> proposals) {\n\t\treturn proposals;\r\n\t}",
"public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {\n\t\tDatabaseNode activeDatabaseNode = DatabaseView.getActiveDatabase();\n\t\tif (activeDatabaseNode == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString[] proposals = null;\n\t\tif (activeDatabaseNode != connectionModelCache) {\n\t\t\ttableNamesCache = getModelNames(activeDatabaseNode.getChildren());\n\t\t\tproposals = tableNamesCache;\n\t\t} else {\n\t\t\tdatabaseNamesCache = getModelNames(activeDatabaseNode.getChildren());\n\t\t\tproposals = databaseNamesCache;\n\t\t}\n\n\t\treturn getProposals(proposals, documentOffset);\n\t}",
"@Override\n\tpublic List<ICompletionProposal> computeCompletionProposals(ContentAssistInvocationContext context, IProgressMonitor monitor) {\n\t\treturn Arrays.asList(assistant.computeCompletionProposals(context.getViewer(), context.getInvocationOffset()));\n\t}",
"public int countProposalsAboveMine() {\n int count = 0;\n for (ProposalData data : proposals.values()) {\n if (!data.mineAsBig) {\n count++;\n }\n }\n return count;\n }",
"@Override\r\n\t\t\tpublic List<Integer> finalEvaluation(\r\n\t\t\t\t\tList<Map<String, String>> proposalsContent,\r\n\t\t\t\t\tList<Integer> proposalEvaluation) {\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"private void asyncRecomputeProposals() {\n\t\tfooter.setText(\"Searching...\");\n\t\tif (isValid()) {\n\t\t\tsynchronized (uniqueId) {\n\t\t\t\tif (uniqueId == Long.MAX_VALUE)\n\t\t\t\t\tuniqueId = Long.MIN_VALUE;\n\t\t\t\tuniqueId++;\n\t\t\t}\n\t\t\tfinal Long currentId = new Long(uniqueId);\n\t\t\tcontrol.getDisplay().asyncExec(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tadapter.getProposals(new IContentProposalSearchHandler() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handleResult(\n\t\t\t\t\t\t\t\tfinal ContentProposalList proposalList) {\n\t\t\t\t\t\t\tif (control != null && !control.isDisposed()) {\n\t\t\t\t\t\t\t\tcontrol.getDisplay().asyncExec(new Runnable() {\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\tif (currentId.equals(uniqueId))\n\t\t\t\t\t\t\t\t\t\t\trecomputeProposals(proposalList);\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}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handleTooltips(List<TooltipData> tooltips) {\n\t\t\t\t\t\t\tadapter.handleTooltipData(tooltips);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}",
"public void sortProposals() {\n\n\t}",
"public int open() {\n\t\tint value = super.open();\n\t\tif (popupCloser == null) {\n\t\t\tpopupCloser = new PopupCloserListener();\n\t\t}\n\t\tpopupCloser.installListeners();\n\t\tProposal p = getSelectedProposal();\n\t\tif (p != null) {\n\t\t\tshowProposalDescription();\n\t\t}\n\t\treturn value;\n\t}",
"protected void computeTagNameProposals() {\n \t\t// completing the *first* tag in \"<tagname1 |<tagname2\"\n \t\t\n \t\t// Ignore attributes\n \t\tif (inAttributeRegion()) {\n \t\t\treturn;\n \t\t}\n \t\t\n \t\taddTagNameProposals(this.getElementPosition(node));\n \t\t// addEndTagNameProposals();\n \n \t}",
"ContentProposalPopup(ContentProposalAdapter adapter, String infoText,\n\t\t\tContentProposalList proposalList) {\n\t\t// IMPORTANT: Use of SWT.ON_TOP is critical here for ensuring\n\t\t// that the target control retains focus on Mac and Linux. Without\n\t\t// it, the focus will disappear, keystrokes will not go to the\n\t\t// popup, and the popup closer will wrongly close the popup.\n\t\t// On platforms where SWT.ON_TOP overrides SWT.RESIZE,\n\t\t// we will live with this.\n\t\t// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=126138\n\t\tsuper(adapter.getControl().getShell(), SWT.RESIZE | SWT.ON_TOP | SWT.NO_FOCUS, false,\n\t\t\t\tfalse, false, false, false, null, infoText);\n\t\tthis.adapter = adapter;\n\t\tthis.control = adapter.getControl();\n\t\t\n\t\t// this.labelProvider = adapter.getLabelProvider();\n\t\tthis.partialContentImage = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/mglass-16.png\");\n\t\tthis.partialContentImageSelected = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/mglass-16-white.png\");\n\t\tthis.functionContentImage = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/function-16.png\");\n\t\tthis.functionContentImageSelected = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/function-16-white.png\");\n\t\tthis.nonSelectableItems = new ArrayList<Integer>();\n\n\t\tthis.proposalList = proposalList;\n\t\t// When the popup is opened & the content is not already completed, we\n\t\t// want to handle this behaviour\n\t\tif (!adapter.isPreventTopProposalSelection())\n\t\t\thandleTopProposals = true;\n\t}",
"public void setProposals(ICompletionProposal[] preComputedProposals) {\n fPreComputedProposals = preComputedProposals;\n }",
"private void computeWordProposals(final String word, final int offset, final int carretColumnIndex, final List<ICompletionProposal> propositionList) {\n\t\tfinal int qualifierLength = word.length();\n\t\tfinal int replacementOffset = offset - qualifierLength;\n\n\t\t// keyword and other static proposals\n\t\tfor (List<CompletionProposalTemplate> list : filterPrefix(proposals, word).values()) {\n\t\t\t// and add to result list\n\t\t\tfor (CompletionProposalTemplate template : list) {\n\t\t\t\tpropositionList.add(template.getProposal(replacementOffset, carretColumnIndex - qualifierLength, qualifierLength));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Try to find matches among the spec's set of symbols (e.g. operators definitions and declarations).\n\t\tfinal SpecObj specObj = ToolboxHandle.getSpecObj();\n\t\tif (specObj != null && specObj.getRootModule() != null) { // null if spec hasn't been parsed.\n\t\t\tfinal ModuleNode rootModule = specObj.getRootModule();\n\n\t\t\tfinal Collection<SymbolNode> symbols = rootModule.getSymbols(matcher.setPrefix(word));\n\t\t\tfor (final SymbolNode symbolNode : symbols) {\n\t\t\t\tpropositionList.add(new CompletionProposalTemplate(symbolNode.getSignature(), symbolNode.getName(),\n\t\t\t\t\t\tsymbolNode.getHumanReadableImage()).getProposal(replacementOffset, carretColumnIndex - qualifierLength, qualifierLength));\n\t\t\t}\n\t\t}\n\t}",
"public void testCompletion() throws Exception {\n \t\tsetUpIntentProject(\"completionTest\", INTENT_DOC_PATH);\n \t\teditor = openIntentEditor();\n \t\tdocument = editor.getDocumentProvider().getDocument(editor.getEditorInput());\n \t\tcontentAssistant = editor.getViewerConfiguration().getContentAssistant(editor.getProjectionViewer());\n \n \t\tICompletionProposal[] proposals = null;\n \n \t\t/*\n \t\t * STRUCTURE\n \t\t */\n \t\t// inside a document\n \t\tproposals = getCompletionProposals(12);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_CHAPTER, proposals[0].getDisplayString());\n \t\tproposals = getCompletionProposals(15);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(KW_CHAPTER, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_CHAPTER, proposals[1].getDisplayString());\n \n \t\t// inside a chapter\n \t\tproposals = getCompletionProposals(741);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_SECTION, proposals[0].getDisplayString());\n \t\tproposals = getCompletionProposals(745);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(KW_SECTION, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_SECTION, proposals[1].getDisplayString());\n \n \t\t// inside a section\n \t\tproposals = getCompletionProposals(773);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_SECTION, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_MU, proposals[1].getDisplayString());\n \n \t\t/*\n \t\t * MODELING UNITS\n \t\t */\n \t\t// beginning of the modeling unit\n \t\tproposals = getCompletionProposals(2138);\n \t\t// We should propose to create a new resource, a new entity, or contribute to an existing entity\n \t\tassertIsExpectedProposalsForEmptyModelingUnit(proposals);\n \n \t\t// beginning of a named modeling unit\n \t\tproposals = getCompletionProposals(3232);\n \t\tassertIsExpectedProposalsForEmptyModelingUnit(proposals);\n \n \t\t// resource declaration patterns\n \t\tproposals = getCompletionProposals(3263);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_URI, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_CONTENT, proposals[1].getDisplayString());\n \n \t\t// features proposals in instanciation\n \t\tproposals = getCompletionProposals(3557);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(\"nsURI : EString [?] - Set the value EPackage.nsURI\", proposals[0].getDisplayString());\n \t\tassertEquals(\"nsPrefix : EString [?] - Set the value EPackage.nsPrefix\",\n \t\t\t\tproposals[1].getDisplayString());\n \n \t\t// features proposals in contribution\n \t\tproposals = getCompletionProposals(3848);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(\"eClassifiers : EClassifier [0,*] - Set the value match.eClassifiers\",\n \t\t\t\tproposals[0].getDisplayString());\n \n \t\t// Boolean value\n \t\tproposals = getCompletionProposals(4016);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_BOOL_VALUE, proposals[0].getDisplayString());\n \n \t\t// Object value\n \t\tproposals = getCompletionProposals(3985);\n \t\tassertEquals(3, proposals.length);\n \t\t// We should propose to create a new Element\n \t\tassertEquals(\"new Element (of type EClassifier) - Set this new Element as value for eType\",\n \t\t\t\tproposals[0].getDisplayString());\n \t\t// Use existing elements (of matching type) defined in the document\n \t\tassertEquals(\"Reference to MatchElement - Set the MatchElement element as value for eType\",\n \t\t\t\tproposals[1].getDisplayString());\n \t\t// And available Classifiers from the package registry\n \t\tassertEquals(\"MatchElement - http://www.eclipse.org/emf/compare/match/1.1\",\n \t\t\t\tproposals[2].getDisplayString());\n \n \t\t// instanciation proposals\n \t\tproposals = getCompletionProposals(3865);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(\"EClass - http://www.eclipse.org/emf/2002/Ecore\", proposals[0].getDisplayString());\n \t\tassertEquals(\"EClassifier - http://www.eclipse.org/emf/2002/Ecore\", proposals[1].getDisplayString());\n \n \t\t// features proposals further in contribution\n \t\tproposals = getCompletionProposals(4128);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(\n \t\t\t\t\"eStructuralFeatures : EStructuralFeature [0,*] - Set the value EClass.eStructuralFeatures\",\n \t\t\t\tproposals[0].getDisplayString());\n \t}",
"@Test\n public void testGetsAroundLocationIII() throws InvalidIdentifierException, DataSourceException {\n // Get limited number of demands from many locations\n //\n LocationOperations lOps = new LocationOperations();\n ProposalOperations sOps = new ProposalOperations();\n\n Location lFirst = new Location();\n lFirst.setPostalCode(RobotResponder.ROBOT_POSTAL_CODE);\n lFirst.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n lFirst = lOps.createLocation(lFirst);\n\n final Long ownerKey = 45678L;\n final Long storeKey = 78901L;\n Proposal sFirst = new Proposal();\n sFirst.setLocationKey(lFirst.getKey());\n sFirst.setOwnerKey(ownerKey);\n sFirst.setStoreKey(storeKey);\n sFirst = sOps.createProposal(sFirst);\n\n Location lSecond = new Location();\n lSecond.setPostalCode(\"H1H1H1\");\n lSecond.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n lSecond = lOps.createLocation(lSecond);\n\n Proposal sSecond = new Proposal();\n sSecond.setLocationKey(lSecond.getKey());\n sSecond.setOwnerKey(ownerKey);\n sSecond.setStoreKey(storeKey);\n sOps.createProposal(sSecond);\n\n Proposal sThird = new Proposal();\n sThird.setLocationKey(lSecond.getKey());\n sThird.setOwnerKey(ownerKey);\n sThird.setStoreKey(storeKey);\n sOps.createProposal(sThird);\n\n sFirst = sOps.getProposal(sFirst.getKey(), null, null);\n sSecond = sOps.getProposal(sSecond.getKey(), null, null);\n sThird = sOps.getProposal(sThird.getKey(), null, null);\n\n List<Location> places = new ArrayList<Location>();\n places.add(lFirst);\n places.add(lSecond);\n\n List<Proposal> selection = sOps.getProposals(places, 2); // Should cut to 2 items\n assertNotNull(selection);\n assertEquals(2, selection.size());\n assertEquals(sFirst.getKey(), selection.get(0).getKey());\n // No more test because it appears sometimes sSecond comes back, sometimes sThird comes back\n // FIXME: re-insert the test for sSecond in the returned list when we're sure the issue related ordering on inherited attribute is fixed.\n }",
"@NonNull\n public List<IkeSaProposal> getIkeSaProposals() {\n return Arrays.asList(mSaProposals);\n }",
"@Test\n public void testGetsAroundLocationI() throws DataSourceException, InvalidIdentifierException {\n // Get all demands from one location\n //\n Location where = new Location();\n where.setPostalCode(RobotResponder.ROBOT_POSTAL_CODE);\n where.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n where = new LocationOperations().createLocation(where);\n\n ProposalOperations ops = new ProposalOperations();\n\n final Long ownerKey = 45678L;\n final Long storeKey = 78901L;\n Proposal first = new Proposal();\n first.setLocationKey(where.getKey());\n first.setOwnerKey(ownerKey);\n first.setStoreKey(storeKey);\n first = ops.createProposal(first);\n\n Proposal second = new Proposal();\n second.setLocationKey(where.getKey());\n second.setOwnerKey(ownerKey);\n second.setStoreKey(storeKey);\n second = ops.createProposal(second);\n\n first = ops.getProposal(first.getKey(), null, null);\n second = ops.getProposal(second.getKey(), null, null);\n\n List<Location> places = new ArrayList<Location>();\n places.add(where);\n\n List<Proposal> selection = ops.getProposals(places, 0);\n assertNotNull(selection);\n assertEquals(2, selection.size());\n assertTrue (selection.get(0).getKey().equals(first.getKey()) && selection.get(1).getKey().equals(second.getKey()) ||\n selection.get(1).getKey().equals(first.getKey()) && selection.get(0).getKey().equals(second.getKey()));\n // assertEquals(first.getKey(), selection.get(1).getKey()); // Should be second because of ordered by descending date\n // assertEquals(second.getKey(), selection.get(0).getKey()); // but dates are so closed that sometines first is returned first...\n }",
"@Test\n public void testGetsAroundLocationII() throws InvalidIdentifierException, DataSourceException {\n // Get just one demand from one location\n //\n Location where = new Location();\n where.setPostalCode(RobotResponder.ROBOT_POSTAL_CODE);\n where.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n where = new LocationOperations().createLocation(where);\n\n ProposalOperations ops = new ProposalOperations();\n\n final Long ownerKey = 45678L;\n final Long storeKey = 78901L;\n Proposal first = new Proposal();\n first.setLocationKey(where.getKey());\n first.setOwnerKey(ownerKey);\n first.setStoreKey(storeKey);\n first = ops.createProposal(first);\n\n Proposal second = new Proposal();\n second.setLocationKey(where.getKey());\n second.setOwnerKey(ownerKey);\n second.setStoreKey(storeKey);\n second = ops.createProposal(second);\n\n first = ops.getProposal(first.getKey(), null, null);\n second = ops.getProposal(second.getKey(), null, null);\n\n List<Location> places = new ArrayList<Location>();\n places.add(where);\n\n List<Proposal> selection = ops.getProposals(places, 1);\n assertNotNull(selection);\n assertEquals(1, selection.size());\n assertTrue (selection.get(0).getKey().equals(first.getKey()) ||\n selection.get(0).getKey().equals(second.getKey()));\n // assertEquals(first.getKey(), selection.get(1).getKey()); // Should be second because of ordered by descending date\n // assertEquals(second.getKey(), selection.get(0).getKey()); // but dates are so closed that sometines first is returned first...\n }",
"private void recomputeProposals(ContentProposalList newProposalList) {\n\t\tif (newProposalList == null)\n\t\t\tnewProposalList = getEmptyProposalArray();\n\t\tif (newProposalList.fullLength() == 0 && newProposalList.allResponded()) {\n\t\t\tthis.proposalList = newProposalList;\n\t\t\tclose();\n\t\t} else {\n\t\t\tsetProposals(newProposalList);\n\t\t}\n\t}",
"@Override\n @Transactional(readOnly = true)\n public Page<Proposal> findAll(Pageable pageable) {\n log.debug(\"Request to get all Proposals\");\n return proposalRepository.findAll(pageable);\n }",
"private List<ICompletionProposal> getSuggestions(ITextViewer viewer,\n \t\t\tint offset, String prefix) throws BadLocationException {\n \n \t\tProperties properties = loadProposalFile();\n \n \t\tMap<String, String> filteredSuggestions = new HashMap<String, String>();\n \n \t\tfor (Entry<Object, Object> property : properties.entrySet()) {\n \t\t\tif (((String) property.getValue()).startsWith(prefix)) {\n \t\t\t\tfilteredSuggestions.put((String) property.getKey(),\n \t\t\t\t\t\t(String) property.getValue());\n \t\t\t}\n \t\t}\n \n \t\tList<ICompletionProposal> suggestions = createProposals(viewer,\n \t\t\t\tfilteredSuggestions, offset, prefix);\n \n \t\treturn suggestions;\n \t}",
"public void calcObjective() {\n double obj;\n double objectives[];\n\n for (int i = 0; i < population.getPopulationSize(); i++) { //300\n objectives = population.getObjectiveValues(i);\n obj = evaluateAll(population.getSingleChromosome(i)); //evaluateAll(chromosome chromosome1)\n objectives[indexOfObjective] = obj;\n population.setObjectiveValue(i, objectives);\n }\n }",
"public static void addPossesives(Annotation np, Document doc, Map<Annotation, ArrayList<Annotation>> posessives)\r\n{\r\n int end = np.getEndOffset();\r\n // get all nps that start within 2 to 5 characters of the end of the np\r\n AnnotationSet nps = doc.getAnnotationSet(Constants.NP);\r\n AnnotationSet candidates = nps.getOverlapping(end + 2, end + 5);\r\n ArrayList<Annotation> coresp = posessives.get(np);\r\n if (coresp == null) {\r\n coresp = new ArrayList<Annotation>();\r\n }\r\n if (candidates == null) {\r\n posessives.put(np, coresp);\r\n return;\r\n }\r\n for (Annotation c : candidates) {\r\n if (c.getStartOffset() >= end + 2) {\r\n String[] wds = FeatureUtils.getWords(doc.getAnnotText(end, c.getStartOffset()));\r\n if (wds != null && wds.length == 1) {\r\n if (wds[0].equalsIgnoreCase(\"of\")) {\r\n // we have x of y -- x is the pos of y\r\n coresp.add(c);\r\n }\r\n if (wds[0].equalsIgnoreCase(\"'s\")) {\r\n // we have y's x -- x is the pos of y\r\n ArrayList<Annotation> coresp2 = posessives.get(c);\r\n if (coresp2 == null) {\r\n coresp2 = new ArrayList<Annotation>();\r\n posessives.put(c, coresp2);\r\n }\r\n coresp2.add(np);\r\n }\r\n }\r\n }\r\n }\r\n posessives.put(np, coresp);\r\n}",
"private Proposal getSelectedProposal() {\n\t\tif (isValid()) {\n\t\t\tint index = proposalTable.getSelectionIndex();\n\t\t\tif (proposalList == null || index < 0 || index >= getTableLength()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tint proposalIndex = 0;\n\t\t\tfor (Proposal proposal : proposalList.getTopProposalList()) {\n\t\t\t\tif (index == proposalIndex) {\n\t\t\t\t\treturn proposal;\n\t\t\t\t}\n\t\t\t\tproposalIndex++;\n\t\t\t}\n\t\t\tfor (String provider : proposalList.getProviderList()) {\n\t\t\t\tif (index == proposalIndex) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tproposalIndex++;\n\t\t\t\tfor (Proposal proposal : proposalList.getProposals(provider)) {\n\t\t\t\t\tif (index == proposalIndex) {\n\t\t\t\t\t\treturn proposal;\n\t\t\t\t\t}\n\t\t\t\t\tproposalIndex++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public String loadPropositions() {\n System.out.println(\"inside loadPropositions ::\");\n logger.info(PropValApproveBean.class, \"PropValApproveBean()\", \"Start loadPropositions\", null);\n Integer pgWUId = null;\n //This should work from the BPM UI Task.\n pgWUId = (Integer) JSFUtils.resolveExpression(\"#{bindings.WorkUnitId.inputValue}\");\n \n //This is for testing on local\n if(AdfFacesContext.getCurrentInstance().getPageFlowScope().get(\"workUnitId\")!= null) { \n pgWUId = Integer.parseInt(AdfFacesContext.getCurrentInstance().getPageFlowScope().get(\"workUnitId\").toString());\n } \n DCBindingContainer bindings = (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();\n\n DCIteratorBinding iter1 = (DCIteratorBinding) bindings.findIteratorBinding(\"PropertyIdentificationIterator\");\n iter1.executeQuery();\n Row row1 = iter1.getCurrentRow();\n\n String ain = (String) row1.getAttribute(\"AIN\");\n \n System.out.println(\"ain -----\"+ain);\n ADFUtils.setPageFlowValue(\"ain\", ain);\n logger.info(PropValApproveBean.class, \"PropValApproveBean()\", \"End loadPropositions\", null);\n return \"loadProp\";\n }",
"private ReferencedEnvelope getExtentOfParcels() {\n ReferencedEnvelope envelope = null;\n if (this.targetParcelsLayer.getBeanList() != null) {\n for (CadastreObjectTargetBean parcel : this.targetParcelsLayer.getBeanList()) {\n Geometry geom = GeometryUtility.getGeometryFromWkb(parcel.getGeomPolygonCurrent());\n ReferencedEnvelope tmpEnvelope = JTS.toEnvelope(geom);\n if (envelope == null) {\n envelope = tmpEnvelope;\n } else {\n envelope.expandToInclude(tmpEnvelope);\n }\n }\n }\n return envelope;\n }",
"public void updateFeasiblePOIs() {\n PlaceOfInterest currPOI = tour.getCurrentVisit().getPlaceOfInterest();\n double currTime = tour.getCurrentVisit().getDepartTime();\n\n for (int i = feasiblePOIs.size()-1; i >= 0; i--) {\n PlaceOfInterest poi = feasiblePOIs.get(i);\n\n double timeToArrive = instance.travelTimeDepartAt(currPOI, poi, currTime);\n poi.setTimeToArrive(timeToArrive);\n\n double visitStartTime = currTime + timeToArrive;\n\n if (visitStartTime > poi.getCloseTime()) {\n feasiblePOIs.remove(i); // cannot meet the time window, infeasible\n continue;\n }\n\n if (visitStartTime < poi.getOpenTime())\n visitStartTime = poi.getOpenTime();\n\n poi.setTimeToStartVisit(visitStartTime - currTime);\n\n double visitFinishTime = visitStartTime + poi.getDuration();\n poi.setTimeToFinishVisit(visitFinishTime - currTime);\n\n double timeToReturn = instance.travelTimeDepartAt(poi, instance.getEndPOI(), visitFinishTime);\n poi.setTimeToReturn(timeToReturn);\n\n if (visitFinishTime + timeToReturn > instance.getEndTime()) {\n feasiblePOIs.remove(i); // cannot return in time, infeasible\n continue;\n }\n }\n }",
"private PMCGenotype[] advanceGeneration()\n\t{\n\t\tPMCGenotype[] newPop = new PMCGenotype[population.length];\n\t\tPMCGenotype[] parents = selectParents();\n\t\tArrayList<PMCGenotype> candidates = new ArrayList<PMCGenotype>();\n\n\t\t// Add the current population to the list of candidates.\n\t\tfor (PMCGenotype pmcg : population)\n\t\t{\n\t\t\tcandidates.add(pmcg);\n\t\t}\n\n\t\t// For each parent, generate a number of mutations (children), calculate their fitness\n\t\t// and add them to the list of candidates.\n\t\tint childrenPerParent = this.childrenPerGeneration / this.parentsToSelect;\n\t\tfor (PMCGenotype p : parents)\n\t\t{\n\t\t\tfor (int i = 0; i < childrenPerParent; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = PMCGenotype.mutate(p, r);\n\t\t\t\tpmcg.setFitness(fitness(pmcg, this.trials));\n\t\t\t\tcandidates.add(pmcg);\n\t\t\t}\n\t\t}\n\n\t\t// Find candidate with the best fitness and add it to the new population.\n\t\t// Repeat this until the new population size matches the previous population size.\n\t\tint candidatesChosen = 0;\n\t\twhile (candidatesChosen < this.population.length)\n\t\t{\n\t\t\tint numberOfRemainingCandidates = candidates.size();\n\t\t\tdouble currentBestFitnessScore = 0;\n\t\t\tint currentBestFitnessScoreIndex = 0;\n\n\t\t\tfor (int i = 0; i < numberOfRemainingCandidates; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = candidates.get(i);\n\t\t\t\tif (pmcg.getFitness() > currentBestFitnessScore)\n\t\t\t\t{\n\t\t\t\t\tcurrentBestFitnessScore = pmcg.getFitness();\n\t\t\t\t\tcurrentBestFitnessScoreIndex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnewPop[candidatesChosen] = candidates.get(currentBestFitnessScoreIndex);\n\t\t\tcandidatesChosen++;\n\n\t\t\tcandidates.remove(currentBestFitnessScoreIndex);\n\t\t}\n\n\t\treturn newPop;\n\t}",
"private void setProposals(ContentProposalList newProposalList) {\n\t\tif (newProposalList == null) {\n\t\t\tnewProposalList = getEmptyProposalArray();\n\t\t}\n\t\tthis.proposalList = newProposalList;\n\t\tif (!isValid())\n\t\t\treturn;\n\n\t\t// Reset item width\n\t\tmaxItemWidth = 0;\n\t\tnonSelectableItems.clear();\n\t\tint proposalIndex = proposalList.getTopProposalList().size();\n\t\tfor (String provider : proposalList.getProviderList()) {\n\t\t\tnonSelectableItems.add(proposalIndex);\n\t\t\tproposalIndex += proposalList.getProposals(provider).length + 1;\n\t\t}\n\n\t\t// If there is a table\n\t\tif (isValid()) {\n\t\t\tif (USE_VIRTUAL) {\n\t\t\t\t// Set and clear the virtual table. Data will be\n\t\t\t\t// provided in the SWT.SetData event handler.\n\t\t\t\tproposalTable.setItemCount(getTableLength());\n\t\t\t\tproposalTable.clearAll();\n\t\t\t\tinitializeTextLayouts();\n\t\t\t} else {\n\t\t\t\t// Populate the table manually\n\t\t\t\tproposalTable.setRedraw(false);\n\t\t\t\tproposalTable.setItemCount(getTableLength());\n\t\t\t\tTableItem[] items = proposalTable.getItems();\n\n\t\t\t\tint index = 0;\n\t\t\t\tfor (Proposal proposal : newProposalList.getTopProposalList()) {\n\t\t\t\t\tTableItem item = items[index];\n\t\t\t\t\titem.setText(\" \" + getString(proposal));\n\t\t\t\t\titem.setImage(getImage(proposal, false));\n\t\t\t\t\titem.setData(proposal);\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t\tfor (String provider : newProposalList.getProviderList()) {\n\t\t\t\t\tTableItem item = items[index];\n\t\t\t\t\tint count = newProposalList.getCount(provider);\n\t\t\t\t\tString text = provider + \" (\" + count + \" matching items)\";\n\t\t\t\t\titem.setText(text);\n\t\t\t\t\t// Data == null => not selectable\n\t\t\t\t\titem.setData(null);\n\n\t\t\t\t\tDisplay display = Display.getCurrent();\n\t\t\t\t\tColor color = display.getSystemColor(SWT.COLOR_GRAY);\n\t\t\t\t\tFontData fontData = item.getFont().getFontData()[0];\n\t\t\t\t\tFont font = new Font(display, new FontData(\n\t\t\t\t\t\t\tfontData.getName(), fontData.getHeight(),\n\t\t\t\t\t\t\tSWT.ITALIC | SWT.BOLD));\n\t\t\t\t\titem.setBackground(color);\n\t\t\t\t\titem.setFont(font);\n\n\t\t\t\t\tindex++;\n\t\t\t\t\tfor (Proposal proposal : newProposalList\n\t\t\t\t\t\t\t.getProposals(provider)) {\n\t\t\t\t\t\titem.setText(\" \" + getString(proposal));\n\t\t\t\t\t\titem.setImage(getImage(proposal, false));\n\t\t\t\t\t\titem.setData(proposal);\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tproposalTable.setRedraw(true);\n\t\t\t}\n\t\t\tif (infoPopup != null) {\n\t\t\t\tinfoPopup.close();\n\t\t\t}\n\t\t}\n\t\tfooter.setText(\"\");\n\t\t\n\t\tif (handleTopProposals) {\n\t\t\tadapter.handleTopProposals(newProposalList);\n\t\t\t// First to respond win otherwise if all reponded,\n\t\t\t// we stop handle\n\t\t\tif (adapter.hasSelectedTopProposal()\n\t\t\t\t\t|| newProposalList.allResponded()) {\n\t\t\t\thandleTopProposals = false;\n\t\t\t}\n\t\t}\n\t\t// Select the top proposal that was displayed, if any\n\t\tproposalTable.deselectAll();\n\t\tif (adapter.hasSelectedTopProposal()) {\n\t\t\tint index = proposalList.getTopProposalList().indexOf(\n\t\t\t\t\tadapter.getSelectedTopProposal());\n\t\t\tif (index >= 0)\n\t\t\t\tselectProposal(index);\n\t\t}\n\t\tif (AutoCompleteUIPlugin.isRAP())\n\t\t\tadjustTableBounds();\n\t}",
"private static Collection<CompletionProposal> getVariableCompletionProposals(final CompletionContext context, CPModel model) {\n Collection<CompletionProposal> proposals = new LinkedHashSet<>();\n for (CPElement var : model.getVariables(context.getCaretOffset())) {\n if (var.getType() != CPElementType.VARIABLE_USAGE && !var.getRange().containsInclusive(context.getCaretOffset())) {\n ElementHandle handle = new CPCslElementHandle(context.getFileObject(), var.getName());\n VariableCompletionItem item = new VariableCompletionItem(\n handle,\n var.getHandle(),\n context.getAnchorOffset(),\n null); //no origin for current file\n// var.getFile() == null ? null : var.getFile().getNameExt());\n\n proposals.add(item);\n }\n }\n try {\n //now gather global vars from all linked sheets\n FileObject file = context.getFileObject();\n if (file != null) {\n Map<FileObject, CPCssIndexModel> indexModels = CPUtils.getIndexModels(file, DependencyType.REFERRING_AND_REFERRED, true);\n for (Entry<FileObject, CPCssIndexModel> entry : indexModels.entrySet()) {\n FileObject reff = entry.getKey();\n CPCssIndexModel cpIndexModel = entry.getValue();\n Collection<org.netbeans.modules.css.prep.editor.model.CPElementHandle> variables = cpIndexModel.getVariables();\n for (org.netbeans.modules.css.prep.editor.model.CPElementHandle var : variables) {\n if (var.getType() == CPElementType.VARIABLE_GLOBAL_DECLARATION) {\n ElementHandle handle = new CPCslElementHandle(context.getFileObject(), var.getName());\n VariableCompletionItem item = new VariableCompletionItem(\n handle,\n var,\n context.getAnchorOffset(),\n reff.getNameExt());\n\n proposals.add(item);\n }\n\n }\n\n }\n }\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n\n return proposals;\n }",
"public String getProposal() {\n return proposal;\n }",
"@Override\n\tpublic List<ComboItem> getPositionsOpen() {\n\t\treturn positionsOpen;\n\t}",
"@Override\r\n\tpublic void selectionChanged(ICompletionProposal proposal, boolean smartToggle) {\n\t\ttry {\r\n\t\tTracer.info(this, \"Selection changed\" + proposal.getDisplayString());\r\n\t\tTracer.info(this, \"Selection contxt\" + proposal.getContextInformation());\r\n\r\n\t\t\r\n//\t\tSystem.out.println(proposal.getAdditionalProposalInfo());\r\n//\t\tif (proposal instanceof ICompletionProposalExtension2) {\r\n//\t\t\tICompletionProposalExtension2 anExtension2 = (ICompletionProposalExtension2) proposal;\r\n//\t\t\t\r\n//\t\t}\r\n//\t\tSystem.out.println(proposal.getContextInformation().getInformationDisplayString());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"public List<PDGRegion> getPDGRegions();",
"public void generatePropositions() {\r\n propositions.clear();\r\n\r\n\t\t// holds alternative options for each constituents (obtained by\r\n // processing coordinated conjunctions and xcomps)\r\n final List<List<Constituent>> constituents = new ArrayList<List<Constituent>>();\r\n\r\n // which of the constituents are required?\r\n final List<Flag> flags = new ArrayList<Flag>();\r\n final List<Boolean> include = new ArrayList<Boolean>();\r\n\r\n\t\t// holds all valid combination of constituents for which a proposition\r\n // is to be generated\r\n final List<List<Boolean>> includeConstituents = new ArrayList<List<Boolean>>();\r\n\r\n // let's start\r\n for (Clause clause : clauses) {\r\n // process coordinating conjunctions\r\n constituents.clear();\r\n for (int i = 0; i < clause.constituents.size(); i++) {\r\n\t\t\t\t// if(xcomp && clause.subject == i) continue; //An xcomp does\r\n // not have an internal subject so should not be processed here\r\n Constituent constituent = clause.constituents.get(i);\r\n List<Constituent> alternatives;\r\n if (!(xcomp && clause.subject == i)\r\n && constituent instanceof IndexedConstituent\r\n // the processing of the xcomps is done in Default\r\n // proposition generator. \r\n // Otherwise we get duplicate propositions.\r\n && !clause.xcomps.contains(i)\r\n && ((i == clause.verb && options.processCcAllVerbs) || (i != clause.verb && options.processCcNonVerbs))) {\r\n alternatives = ProcessConjunctions.processCC(depTree,\r\n clause, constituent, i);\r\n } else if (!(xcomp && clause.subject == i)\r\n && clause.xcomps.contains(i)) {\r\n alternatives = new ArrayList<Constituent>();\r\n ClausIE xclausIE = new ClausIE(options);\r\n xclausIE.semanticGraph = semanticGraph;\r\n xclausIE.depTree = depTree;\r\n xclausIE.xcomp = true;\r\n xclausIE.clauses = ((XcompConstituent) clause.constituents\r\n .get(i)).getClauses();\r\n xclausIE.generatePropositions();\r\n for (Proposition p : xclausIE.propositions) {\r\n StringBuilder sb = new StringBuilder();\r\n String sep = \"\";\r\n for (int j = 0; j < p.constituents.size(); j++) {\r\n if (j == 0) // to avoid including the subjecct, We\r\n {\r\n continue; // could also generate the prop\r\n }\t\t\t\t\t\t\t // without the subject\t\t\t\t\t\t\t\t\t\t\t\r\n sb.append(sep);\r\n sb.append(p.constituents.get(j));\r\n sep = \" \";\r\n }\r\n alternatives.add(new TextConstituent(sb.toString(),\r\n constituent.type));\r\n }\r\n } else {\r\n alternatives = new ArrayList<Constituent>(1);\r\n alternatives.add(constituent);\r\n }\r\n constituents.add(alternatives);\r\n }\r\n\r\n\t\t\t// create a list of all combinations of constituents for which a\r\n // proposition should be generated\r\n includeConstituents.clear();\r\n flags.clear();\r\n include.clear();\r\n for (int i = 0; i < clause.constituents.size(); i++) {\r\n Flag flag = clause.getFlag(i, options);\r\n flags.add(flag);\r\n include.add(!flag.equals(Flag.IGNORE));\r\n }\r\n if (options.nary) {\r\n\t\t\t\t// we always include all constituents for n-ary ouput \r\n // (optional parts marked later)\r\n includeConstituents.add(include);\r\n } else {\r\n // triple mode; determine which parts are required\r\n for (int i = 0; i < clause.constituents.size(); i++) {\r\n include.set(i, flags.get(i).equals(Flag.REQUIRED));\r\n }\r\n\r\n // create combinations of required/optional constituents\r\n new Runnable() {\r\n int noOptional;\r\n\r\n // @Override\r\n public void run() {\r\n noOptional = 0;\r\n for (Flag f : flags) {\r\n if (f.equals(Flag.OPTIONAL)) {\r\n noOptional++;\r\n }\r\n }\r\n run(0, 0, new ArrayList<Boolean>());\r\n }\r\n\r\n private void run(int pos, int selected, List<Boolean> prefix) {\r\n if (pos >= include.size()) {\r\n if (selected >= Math.min(options.minOptionalArgs,\r\n noOptional)\r\n && selected <= options.maxOptionalArgs) {\r\n includeConstituents.add(new ArrayList<Boolean>(\r\n prefix));\r\n }\r\n return;\r\n }\r\n prefix.add(true);\r\n if (include.get(pos)) {\r\n run(pos + 1, selected, prefix);\r\n } else {\r\n if (!flags.get(pos).equals(Flag.IGNORE)) {\r\n run(pos + 1, selected + 1, prefix);\r\n }\r\n prefix.set(prefix.size() - 1, false);\r\n run(pos + 1, selected, prefix);\r\n }\r\n prefix.remove(prefix.size() - 1);\r\n }\r\n }.run();\r\n }\r\n\r\n // create a temporary clause for which to generate a proposition\r\n final Clause tempClause = clause.clone();\r\n\r\n // generate propositions\r\n new Runnable() {\r\n public void run() {\r\n // select which constituents to include\r\n for (List<Boolean> include : includeConstituents) {\r\n // now select an alternative for each constituent\r\n selectConstituent(0, include);\r\n }\r\n }\r\n\r\n void selectConstituent(int i, List<Boolean> include) {\r\n if (i < constituents.size()) {\r\n if (include.get(i)) {\r\n List<Constituent> alternatives = constituents\r\n .get(i);\r\n for (int j = 0; j < alternatives.size(); j++) {\r\n tempClause.constituents.set(i,\r\n alternatives.get(j));\r\n selectConstituent(i + 1, include);\r\n }\r\n } else {\r\n selectConstituent(i + 1, include);\r\n }\r\n } else {\r\n // everything selected; generate\r\n propositionGenerator.generate(propositions, tempClause,\r\n include);\r\n }\r\n }\r\n }.run();\r\n }\r\n }",
"private ContentProposalList getEmptyProposalArray() {\n\t\treturn new ContentProposalList();\n\t}",
"public int getScopeOpen(){\r\n\t\tint i = getCaretPosition();\r\n\t\tint rtn = 0;\r\n\t\tString str = \"\";\r\n\t\ttry{\r\n\t\t\tstr = doc.getText(0,i);\r\n\t\t}catch(BadLocationException a){};\r\n\t\tfor(i-=1; i>0; i--) {\r\n\t\t\tif(str.charAt(i) == '{') rtn += 1;\r\n\t\t\tif(str.charAt(i) == '}') rtn -= 1;\r\n\t\t}\r\n\t\tif(rtn <0)rtn = 0;\r\n\t\treturn rtn;\r\n\t}",
"private static Collection<CompletionProposal> getMixinsCompletionProposals(final CompletionContext context, CPModel model) {\n Collection<CompletionProposal> proposals = new LinkedHashSet<>();\n for (CPElement mixin : model.getMixins()) {\n if (mixin.getType() == CPElementType.MIXIN_DECLARATION) {\n ElementHandle handle = new CPCslElementHandle(context.getFileObject(), mixin.getName());\n MixinCompletionItem item = new MixinCompletionItem(\n handle,\n mixin.getHandle(),\n context.getAnchorOffset(),\n null); //no origin for current file\n// var.getFile() == null ? null : var.getFile().getNameExt());\n\n proposals.add(item);\n }\n }\n try {\n //now gather global vars from all linked sheets\n FileObject file = context.getFileObject();\n if (file != null) {\n Map<FileObject, CPCssIndexModel> indexModels = CPUtils.getIndexModels(file, DependencyType.REFERRING_AND_REFERRED, true);\n for (Entry<FileObject, CPCssIndexModel> entry : indexModels.entrySet()) {\n FileObject reff = entry.getKey();\n CPCssIndexModel cpIndexModel = entry.getValue();\n Collection<org.netbeans.modules.css.prep.editor.model.CPElementHandle> mixins = cpIndexModel.getMixins();\n for (org.netbeans.modules.css.prep.editor.model.CPElementHandle mixin : mixins) {\n if (mixin.getType() == CPElementType.MIXIN_DECLARATION) {\n ElementHandle handle = new CPCslElementHandle(context.getFileObject(), mixin.getName());\n MixinCompletionItem item = new MixinCompletionItem(\n handle,\n mixin,\n context.getAnchorOffset(),\n reff.getNameExt());\n\n proposals.add(item);\n }\n\n }\n\n }\n }\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n\n return proposals;\n }",
"protected void addPopupMouseListener() {\n Object /*ContentProposalPopup*/ popup = ReflectionUtils.getFieldValue(adapter, \"popup\");\n if (popup == null) // e.g. due to no available proposal\n return;\n Table proposalTable = (Table)ReflectionUtils.getFieldValue(popup, \"proposalTable\");\n proposalTable.addMouseListener(MouseListener.mouseUpAdapter(e -> {\n if (e.button == 1 && proposalTable.getBounds().contains(e.x, e.y))\n ReflectionUtils.invokeMethod(popup, \"acceptCurrentProposal\");\n }));\n }",
"long getOpenInterest();",
"public Page<Proposal> findAllWithEagerRelationships(Pageable pageable) {\n return proposalRepository.findAllWithEagerRelationships(pageable);\n }",
"public Map<String, List<ExprNodeDesc>> getFinalCandidates() {\n return pushdownPreds;\n }",
"public abstract LearningEditProposal getBestEdit (boolean onlyAllowedEdits, boolean onlyPositiveEdits);",
"@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 }",
"private void initExplorationBounds() {\n switch (configuration.getCoverageCriteria()) {\n case GOAL_COVERAGE:\n case BRANCH_COVERAGE:\n configuration.setObjectScope(configuration.isIncrementalLoopUnroll() ?\n FajitaConfiguration.INITIAL_INCREMENTAL_OBJECT_SCOPE :\n configuration.getMaximumObjectScope()\n );\n configuration.setLoopUnroll(configuration.isIncrementalLoopUnroll() ?\n FajitaConfiguration.INITIAL_INCREMENAL_LOOP_UNROLL :\n configuration.getMaximumLoopUnroll()\n );\n break;\n case CLASS_COVERAGE:\n case DUAL_CLASS_BRANCH_COVERAGE:\n configuration.setObjectScope(configuration.getMaximumObjectScope());\n configuration.setLoopUnroll(configuration.getMaximumLoopUnroll());\n break;\n }\n }",
"private Collection<ProteinDomainRegion> getProteinDomainRegions(ObjectStore oOs,\r\n\t\t\tProtein oProtein) {\n\t\tQueryClass oQcProtein = new QueryClass(Protein.class);\r\n\t\tQueryClass oQcPdr = new QueryClass(ProteinDomainRegion.class);\r\n\r\n\t\t// create needed references between the clases\r\n\t\tQueryCollectionReference oQcrPdr = new QueryCollectionReference(oQcProtein,\r\n\t\t\t\t\"proteinDomainRegions\");\r\n\t\t//QueryObjectReference oQoePd\r\n\t\t//= new QueryObjectReference(oQcPdr, \"proteinDomain\");\r\n\r\n\t\t// build up constraint\r\n\t\tConstraintSet oCs = new ConstraintSet(ConstraintOp.AND);\r\n\t\tList<String> oAccs = new ArrayList<String>();\r\n\t\toAccs.add(oProtein.getPrimaryAccession());\r\n\t\tQueryField oQf = new QueryField(oQcProtein, \"primaryAccession\");\r\n\t\tBagConstraint oBc = new BagConstraint(oQf, ConstraintOp.IN, oAccs);\r\n\t\tContainsConstraint oCcPdr = new ContainsConstraint(oQcrPdr, ConstraintOp.CONTAINS, oQcPdr);\r\n\t\t//ContainsConstraint oCcPr = new ContainsConstraint(oQoePd, ConstraintOp.CONTAINS, oQcPr);\r\n\r\n\t\t// build up query\r\n\t\tQuery oQ = new Query();\r\n\t\toCs.addConstraint(oBc);\r\n\t\toCs.addConstraint(oCcPdr);\r\n\t\t//oCs.addConstraint(oCcPr);\r\n\r\n\t\toQ.setConstraint(oCs);\r\n\t\toQ.addToSelect(oQcPdr);\r\n\t\toQ.addFrom(oQcProtein);\r\n\t\toQ.addFrom(oQcPdr);\r\n\t\t//oQ.addFrom(oQcPr);\r\n\r\n\t\t// chenyian: modified for upgrading to v0.95\r\n\t\tSingletonResults srs = oOs.executeSingleton(oQ);\r\n\t\tList<ProteinDomainRegion> ret = new ArrayList<ProteinDomainRegion>();\r\n\t\tfor (Object sr : srs) {\r\n\t\t\tret.add((ProteinDomainRegion) sr);\r\n\t\t}\r\n\t\t\r\n\t\treturn ret;\r\n\t}",
"public Proposal withActions(ProposalActions actions) {\n setActions(actions);\n return this;\n }",
"@Override\n public Map<Integer, Puzzle> findSolutions() {\n if (Permutations.of(Arrays.asList(1, 2, 3, 4, 5, 6))\n .map(p -> p.collect(Collectors.toList()))\n .map(puzzleNumbers ->\n new Puzzle(this.inputPuzzle.getPuzzlePiece(PuzzleSide.findByValue(puzzleNumbers.get(0))),\n this.inputPuzzle.getPuzzlePiece(PuzzleSide.findByValue(puzzleNumbers.get(1))),\n this.inputPuzzle.getPuzzlePiece(PuzzleSide.findByValue(puzzleNumbers.get(2))),\n this.inputPuzzle.getPuzzlePiece(PuzzleSide.findByValue(puzzleNumbers.get(3))),\n this.inputPuzzle.getPuzzlePiece(PuzzleSide.findByValue(puzzleNumbers.get(4))),\n this.inputPuzzle.getPuzzlePiece(PuzzleSide.findByValue(puzzleNumbers.get(5)))))\n .anyMatch(this::checkStatesByOrientations)) {\n return solutions;\n }\n return null;\n }",
"public interface IContentSelection\n{\n \n /**\n * Returns true if this object has a selected part, false otherwise.\n * \n * @return true if a selected part is within this object, false otherwise.\n */\n public abstract boolean hasSelection();\n \n /**\n * Returns the selection start within this object.\n * \n * @return start position in atoms.\n */\n public abstract int getSelectionStart();\n \n /**\n * Returns the selection end within this object.\n * \n * @return end position in atoms.\n */\n public abstract int getSelectionEnd();\n \n /**\n * Removes all selections from this object. No content is removed.\n */\n public abstract void clearSelection(TextAppearance appearance);\n \n /**\n * Removes everything that is selected including the content of this object.\n */\n public abstract void removeSelection(IContentFactory factory,\n TextAppearance appearance);\n \n /**\n * Selected the parts between the to atom positions.\n * \n * @param start\n * start position in atoms\n * @param end\n * end position in atoms\n */\n public abstract void setSelection(int start, int end,\n TextAppearance appearance);\n \n}",
"protected void createOrgAnnotations() {\r\n\t\tString source = \"org.eclipse.emf.ecp.editor\";\r\n\t\taddAnnotation(getIssue_Proposals(), source, new String[] { \"priority\",\r\n\t\t\t\t\"21.0\", \"position\", \"left\" });\r\n\t\taddAnnotation(getIssue_Solution(), source, new String[] { \"priority\",\r\n\t\t\t\t\"20.0\", \"position\", \"left\" });\r\n\t\taddAnnotation(getIssue_Criteria(), source, new String[] { \"priority\",\r\n\t\t\t\t\"22.0\", \"position\", \"left\" });\r\n\t\taddAnnotation(getIssue_Activity(), source, new String[] { \"priority\",\r\n\t\t\t\t\"9.5\", \"position\", \"left\" });\r\n\t\taddAnnotation(getIssue_Assessments(), source, new String[] {\r\n\t\t\t\t\"priority\", \"30\", \"position\", \"bottom\" });\r\n\t\taddAnnotation(getProposal_Assessments(), source, new String[] {\r\n\t\t\t\t\"priority\", \"10.0\", \"position\", \"right\" });\r\n\t\taddAnnotation(getProposal_Issue(), source, new String[] { \"priority\",\r\n\t\t\t\t\"10.0\", \"position\", \"left\" });\r\n\t\taddAnnotation(getSolution_UnderlyingProposals(), source, new String[] {\r\n\t\t\t\t\"priority\", \"10.0\", \"position\", \"right\" });\r\n\t\taddAnnotation(getSolution_Issue(), source, new String[] { \"priority\",\r\n\t\t\t\t\"10.0\", \"position\", \"left\" });\r\n\t\taddAnnotation(getCriterion_Assessments(), source, new String[] {\r\n\t\t\t\t\"priority\", \"10.0\", \"position\", \"right\" });\r\n\t}",
"protected void adjustBounds() {\n\t\t\tRectangle parentBounds = getParentShell().getBounds();\n\t\t\tPoint textSize = text.getSize();\n\t\t\tRectangle itemBounds = proposalTable.getItem(\n\t\t\t\t\tproposalTable.getSelectionIndex()).getBounds();\n\t\t\tint controlY = parentBounds.y + proposalTable.getBounds().y\n\t\t\t\t\t+ itemBounds.y + POPUP_VERTICALSPACING + 1;\n\t\t\tint controlWidht = textSize.x + 20;\n\t\t\tint controlHeight = itemBounds.height;\n\t\t\tRectangle proposedBounds = null;\n\n\t\t\t// Try placing the info popup to the right\n\t\t\tRectangle rightProposedBounds = new Rectangle(parentBounds.x\n\t\t\t\t\t+ parentBounds.width + PopupDialog.POPUP_HORIZONTALSPACING,\n\t\t\t\t\tcontrolY, controlWidht, controlHeight);\n\t\t\trightProposedBounds = getConstrainedShellBounds(rightProposedBounds);\n\n\t\t\t// If it won't fit on the right, try the left\n\t\t\tif (rightProposedBounds.intersects(parentBounds)) {\n\t\t\t\tRectangle leftProposedBounds = new Rectangle(parentBounds.x\n\t\t\t\t\t\t- controlWidht - POPUP_HORIZONTALSPACING - 1, controlY,\n\t\t\t\t\t\tcontrolWidht, controlHeight);\n\t\t\t\tleftProposedBounds = getConstrainedShellBounds(leftProposedBounds);\n\n\t\t\t\t// If it won't fit on the left, display on top of the item\n\t\t\t\tif (leftProposedBounds.intersects(parentBounds)) {\n\t\t\t\t\trightProposedBounds.x = parentBounds.x + itemBounds.x;\n\t\t\t\t\trightProposedBounds.y = controlY - itemBounds.height + 1;\n\t\t\t\t\tproposedBounds = rightProposedBounds;\n\t\t\t\t} else {\n\t\t\t\t\t// Use the proposed bounds on the left\n\t\t\t\t\tproposedBounds = leftProposedBounds;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Use the proposed bounds on the right\n\t\t\t\tproposedBounds = rightProposedBounds;\n\t\t\t}\n\t\t\tgetShell().setBounds(proposedBounds);\n\t\t}",
"public CompletionProvider createCodeCompletionProvider() {\n\n\t\t// Add completions for the C standard library.\n\t\tDefaultCompletionProvider cp = new DefaultCompletionProvider();\n\n\t\t// First try loading resource (running from demo jar), then try\n\t\t// accessing file (debugging in Eclipse).\n\t\tClassLoader cl = getClass().getClassLoader();\n\t\tInputStream in = cl.getResourceAsStream(rootFolder + \"\\\\c.xml\");\n\t\ttry {\n\t\t\tif (in!=null) {\n\t\t\t\tcp.loadFromXML(in);\n\t\t\t\tin.close();\n\t\t\t\t//System.out.println(\"*******************File exists1***************\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tFile file = new File(rootFolder, \"c.xml\");\n\t\t\t\t//System.out.println(\"@AutoCompleteProvider completeFile:\" + file.getAbsolutePath());\n\t\t\t\tif (file.exists())\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"*******************File exists2***************\");\n\t\t\t\t\tcp.loadFromXML(file);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\n\t\t// Add some handy shorthand completions.\n\t\tcp.addCompletion(new ShorthandCompletion(cp, \"main\",\n\t\t\t\t\t\t\t\"int main(int argc, char **argv)\"));\n\n\t\t// Add a parameterized completion with a ton of parameters (see #67)\n\t\tFunctionCompletion functionCompletionWithLotsOfParameters = new FunctionCompletion(cp, \"long\", \"int\");\n\t\tParameterizedCompletion.Parameter param = new ParameterizedCompletion.Parameter(\"int\", \"intVal \");\n\t\tparam.setDescription(\"hello world\");\n\t\tfunctionCompletionWithLotsOfParameters.setParams(Arrays.asList(\n\t\t\tparam,\n\t\t\tnew ParameterizedCompletion.Parameter(\"float\", \"floatVal \"),\n\t\t\tnew ParameterizedCompletion.Parameter(\"string\", \"stringVal \"),\n\t\t\tnew ParameterizedCompletion.Parameter(\"int\", \"intVal2 \"),\n\t\t\tnew ParameterizedCompletion.Parameter(\"float\", \"floatVal2 \"),\n\t\t\tnew ParameterizedCompletion.Parameter(\"string\", \"stringVal2 \")\n\t\t\t\n\t\t));\n\t\t\n\t\tcp.addCompletion(functionCompletionWithLotsOfParameters);\n\t\treturn cp;\n\n\t}",
"public abstract int getPopulation(int west, int south, int east, int north);",
"private Integer getMines(Integer xOpen, Integer yOpen){\n int counter=0;\r\n // System.out.println(\"getMines() [\"+xOpen+\"][\"+yOpen+\"]\");\r\n for(int i=xOpen-1; i<=(xOpen+1) ; i++){\r\n for(int j=yOpen-1; j<=(yOpen+1) ; j++){\r\n if(isValidCell(i,j) && grid[i][j].isMine()){ //split y && le quite uno\r\n counter++; //solo un operador and \r\n }\r\n }\r\n }\r\n// System.out.println(\" getMines().result = \"+counter);\r\n return counter; //contador de minas, el mismo no puede ser una mina \r\n }",
"public void show() {\n int width = mEditor.getWidth();\n RectF leftHandleRect = mEditor.getLeftHandleRect();\n RectF rightHandleRect = mEditor.getRightHandleRect();\n\n // when right handle goes below visible area, it rect becomes empty. so this feature (or bug) used to calculate popup location\n // if we can not use this,\n // alternative method can be implemented using mMaximumTop\n // @TODO implement a proper way to calculate popup position\n if (rightHandleRect.isEmpty()) {\n rightHandleRect.top = mMaximumTop;\n rightHandleRect.left = width;\n rightHandleRect.bottom = mMaximumTop;\n rightHandleRect.right = width;\n }\n\n float handleHeight = leftHandleRect.height();\n selectionRect.top = Math.min(leftHandleRect.top, rightHandleRect.top);\n selectionRect.bottom = Math.max(leftHandleRect.bottom, rightHandleRect.bottom);\n selectionRect.left = Math.min(leftHandleRect.left, rightHandleRect.left);\n selectionRect.right = Math.max(leftHandleRect.right, rightHandleRect.right);\n\n // prevent drawing popup over the keyboard\n /*if (selectionRect.bottom > mMaximumTop - popHeightPx) {\n selectionRect.bottom -= popHeightPx;\n }*/\n\n if (mLeft > width - getWidth()) {\n mLeft = width - getWidth();\n }\n int height = mEditor.getHeight();\n if (mTop > height - getHeight()) {\n mTop = height - getHeight();\n }\n if (mTop < 0) {\n mTop = 0;\n }\n if (mLeft < 0) {\n mLeft = 0;\n }\n mEditor.getLocationInWindow(mLocation);\n boolean topCovered = mLocation[1] > selectionRect.top - textSizePx - popHeightPx - handleHeight;\n\n if (topCovered) {\n mTop = (int) (selectionRect.bottom + (handleHeight));\n } else {\n mTop = (int) (selectionRect.top - textSizePx - popHeightPx - handleHeight);\n }\n if (isShowing()) {\n update(mLocation[0] + mLeft, mLocation[1] + mTop, getWidth(), getHeight());\n return;\n }\n super.showAtLocation(mEditor,\n Gravity.START | Gravity.TOP,\n mLocation[0] + mLeft, mLocation[1] + mTop);\n }",
"public void testAnnotateReturn() throws Exception {\n String MY_MAP_PATH = \"pack/age/MyMap\";\n String[] pathAndContents = new String[] { MY_MAP_PATH + \".java\", \"package pack.age;\\n\" + \"public interface MyMap<K,V> {\\n\" + \" public V get(K key);\\n\" + \"}\\n\" };\n addLibrary(fJProject1, \"lib.jar\", \"lib.zip\", pathAndContents, ANNOTATION_PATH, JavaCore.VERSION_1_5, null);\n IType type = fJProject1.findType(MY_MAP_PATH.replace('/', '.'));\n JavaEditor javaEditor = (JavaEditor) JavaUI.openInEditor(type);\n try {\n SourceViewer viewer = (SourceViewer) javaEditor.getViewer();\n // invoke the full command and asynchronously collect the result:\n final ICompletionProposal[] proposalBox = new ICompletionProposal[1];\n viewer.getQuickAssistAssistant().addCompletionListener(new ICompletionListener() {\n\n @Override\n public void selectionChanged(ICompletionProposal proposal, boolean smartToggle) {\n proposalBox[0] = proposal;\n }\n\n @Override\n public void assistSessionStarted(ContentAssistEvent /* nop */\n event) {\n }\n\n @Override\n public void assistSessionEnded(ContentAssistEvent /* nop */\n event) {\n }\n });\n int offset = pathAndContents[1].indexOf(\"V get\");\n viewer.setSelection(new TextSelection(offset, 0));\n viewer.doOperation(JavaSourceViewer.ANNOTATE_CLASS_FILE);\n int count = 10;\n while (proposalBox[0] == null && count-- > 0) Thread.sleep(200);\n ICompletionProposal proposal = proposalBox[0];\n assertNotNull(\"should have a proposal\", proposal);\n viewer.getQuickAssistAssistant().uninstall();\n JavaProjectHelper.emptyDisplayLoop();\n assertEquals(\"expect proposal\", \"Annotate as '@NonNull V'\", proposal.getDisplayString());\n String expectedInfo = \"<dl><dt>get</dt>\" + \"<dd>(TK;)TV;</dd>\" + \"<dd>(TK;)T<b>1</b>V;</dd>\" + \"</dl>\";\n assertEquals(\"expect detail\", expectedInfo, proposal.getAdditionalProposalInfo());\n IDocument document = javaEditor.getDocumentProvider().getDocument(javaEditor.getEditorInput());\n proposal.apply(document);\n IFile annotationFile = fJProject1.getProject().getFile(new Path(ANNOTATION_PATH).append(\"pack/age/MyMap.eea\"));\n assertTrue(\"Annotation file should have been created\", annotationFile.exists());\n String expectedContent = \"class pack/age/MyMap\\n\" + \"get\\n\" + \" (TK;)TV;\\n\" + \" (TK;)T1V;\\n\";\n checkContentOfFile(\"annotation file content\", annotationFile, expectedContent);\n } finally {\n JavaPlugin.getActivePage().closeAllEditors(false);\n }\n }",
"public void populateDocumentWithRequisitions() {\r\n LOG.debug(\"populateDocumentWithRequisitions() Entering method.\");\r\n \r\n List<RequisitionDocument> unassignedRequisitions = new ArrayList(SpringContext.getBean(RequisitionService.class).getRequisitionsAwaitingContractManagerAssignment());\r\n List<String>documentHeaderIds = new ArrayList();\r\n for (RequisitionDocument req : unassignedRequisitions) {\r\n documentHeaderIds.add(req.getDocumentNumber());\r\n }\r\n \r\n List<RequisitionDocument> requisitionDocumentsFromDocService = new ArrayList();\r\n try {\r\n if ( documentHeaderIds.size() > 0 )\r\n requisitionDocumentsFromDocService = SpringContext.getBean(DocumentService.class).getDocumentsByListOfDocumentHeaderIds(RequisitionDocument.class, documentHeaderIds);\r\n }\r\n catch (WorkflowException we) {\r\n String errorMsg = \"Workflow Exception caught: \" + we.getLocalizedMessage();\r\n LOG.error(errorMsg, we);\r\n throw new RuntimeException(errorMsg, we);\r\n }\r\n \r\n for (RequisitionDocument req : requisitionDocumentsFromDocService) {\r\n contractManagerAssignmentDetails.add(new ContractManagerAssignmentDetail(this, req));\r\n }\r\n\r\n String[] fieldNames = {PurapPropertyConstants.DELIVERY_CAMPUS_CODE, PurapPropertyConstants.VENDOR_NAME, PurapPropertyConstants.REQUISITION_IDENTIFIER};\r\n DynamicCollectionComparator.sort(contractManagerAssignmentDetails, fieldNames);\r\n LOG.debug(\"populateDocumentWithRequisitions() Leaving method.\"); \r\n }",
"public Collection<Solution> start() {\n //Configure DSE\n configureDSE();\n\n //Create strategy\n DSEMergeStrategy strategy = new DSEMergeStrategy();\n \n //Start Exploration\n dse.startExploration(strategy);\n\n return buildSolutions(dse.getSolutions());\n }",
"public void run() {\n\t\t\t\t\t\t\tProposal p = getSelectedProposal();\n\t\t\t\t\t\t\tif (p != null) {\n\t\t\t\t\t\t\t\tString description = p.getDescription();\n\t\t\t\t\t\t\t\tif (description != null) {\n\t\t\t\t\t\t\t\t\tif (infoPopup == null) {\n\t\t\t\t\t\t\t\t\t\tinfoPopup = new InfoPopupDialog(getShell());\n\t\t\t\t\t\t\t\t\t\tinfoPopup.open();\n\t\t\t\t\t\t\t\t\t\tinfoPopup.getShell()\n\t\t\t\t\t\t\t\t\t\t\t\t.addDisposeListener(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew DisposeListener() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void widgetDisposed(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDisposeEvent event) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinfoPopup = null;\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}\n\t\t\t\t\t\t\t\t\tinfoPopup.setContents(p.getDescription());\n\t\t\t\t\t\t\t\t} else if (infoPopup != null) {\n\t\t\t\t\t\t\t\t\tinfoPopup.close();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tpendingDescriptionUpdate = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"@Override\r\n\tpublic List<EstimateTO> findEstimateDialog() {\n\t\treturn estimateApplicationService.findEstimateDialog();\r\n\t}",
"public IContextInformation[] computeContextInformation(ITextViewer viewer,\n\t\t\tint documentOffset) {\n\t\tIContextInformation[] result = new IContextInformation[5];\n\t\tfor (int i = 0; i < result.length; i++)\n\t\t\tresult[i] = new ContextInformation(\n\t\t\t\t\tMessageFormat\n\t\t\t\t\t\t\t.format(\n\t\t\t\t\t\t\t\t\tNescEditorMessages\n\t\t\t\t\t\t\t\t\t\t\t.getString(\"CompletionProcessor.ContextInfo.display.pattern\"), new Object[] { new Integer(i), new Integer(documentOffset) }), //$NON-NLS-1$\n\t\t\t\t\tMessageFormat\n\t\t\t\t\t\t\t.format(\n\t\t\t\t\t\t\t\t\tNescEditorMessages\n\t\t\t\t\t\t\t\t\t\t\t.getString(\"CompletionProcessor.ContextInfo.value.pattern\"), new Object[] { new Integer(i), new Integer(documentOffset - 5), new Integer(documentOffset + 5) })); //$NON-NLS-1$\n\t\treturn result;\n\t}",
"@Override\n protected Rectangle getSelectedRegion()\n {\n // Go through all widgets and union their bounds.\n Iterator<FrameEltSelnFig<?>> selectedFigs =\n selection.getSelectedFigures();\n\n return computeUnion(selectedFigs);\n }",
"public Population evolve()\r\n {\r\n\tArrayList<Chromosome> tempPop = \r\n\t new ArrayList<Chromosome>(chromos.size());\r\n\tChromosome u;\r\n\tChromosome v;\r\n\r\n\tfor(int i = 0; i < chromos.size()/2; i++)\r\n\t {\r\n\t\tu = selectParent();\r\n\t\tv = selectParent();\r\n\t\t\r\n\t\t//System.out.println(\"*****Parent 1 : \\n\" + v);\r\n\t\t\r\n Chromosome c1 = u.child(v);\r\n Chromosome c2 = v.child(u);\r\n\t\ttempPop.add(c1);\r\n\t\ttempPop.add(c2);\r\n\t\t\r\n //System.out.println(\"****Generated new child: \\n\" + c1);\r\n\t }\t \r\n\t\r\n\t// if needed, add in the code for keeping the best chromosome\r\n\tPopulation pop = new Population(tempPop, selMethod, selPara, \r\n\t\t\t\t\tcrossMethod, crossPara, mutMethod, mutPara, \r\n\t\t\t\t\treplaceMethod, replacePara, powerStep, tourStep, ff);\r\n\r\n\tif(replaceMethod == ELITISM)\r\n\t {\r\n\t\tpop.remove(worstChromoIndex);\r\n\t\tpop.add(bestChromo.clone());\r\n\t\tpop.initialize();\r\n\t }\r\n\r\n\tgeneration++;\r\n\treturn pop;\r\n }",
"@Test\n\tpublic void shouldReturnPagedOpenDocumentsForAmountRange()\n\t{\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getAllPagedDocuments(\n\t\t\t\tcreatePageableData(0, 10, StringUtils.EMPTY), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createAmountRangeCriteriaObject(AMOUNT_75_30, AMOUNT_76_31, DOCUMENT_STATUS_OPEN, FILTER_BY_AMOUNT)));\n\n\t\tTestCase.assertEquals(1, result.getResults().size());\n\t\tTestCase.assertEquals(DOCUMENT_NUMBER_PUR_002, result.getResults().get(0).getDocumentNumber());\n\t\tTestCase.assertEquals(AMOUNT_75_31, result.getResults().get(0).getAmount().toPlainString());\n\t}",
"public static Population evolve(Population p){\n Population evolvedPop = p;\n currentFittest = evolvedPop.getFittest();\n \n if(RunGA.elitism){\n // Preserve fittest x individuals in first indeces (elitism)\n elitismOffset = (int)Math.round(RunGA.elitismProportion*p.getSize());\n ArrayList<Tour> preserved = p.getXFittest(elitismOffset);\n for(int i=0; i<preserved.size(); i++){\n evolvedPop.setTour(i, preserved.get(i));\n }\n } else{\n elitismOffset = 0;\n }\n for(int i=elitismOffset; i<p.getSize(); i++){\n // Evaluation and Selection\n Tour parent1 = select(p);\n Tour parent2 = select(p);\n // Crossover\n Tour[] children = cross(parent1, parent2);\n for(int j=0; j<children.length; j++){\n evolvedPop.setTour(i, children[0]);\n // Adds both offspring if two are produced, otherwise adds the sole offspring\n if(children.length == 2){\n i++;\n if(i < evolvedPop.getSize()){\n evolvedPop.setTour(i, children[1]);\n } else{\n break;\n }\n }\n }\n }\n // Mutation\n mutation(evolvedPop);\n // Increment generation count\n evolvedPop.incrementGeneration();\n cumulativeFitness = null;\n return evolvedPop;\n }",
"private void updateGoldMineEstimate() {\n\t\tint x = currentState.getXExtent() - PEASANT_RANGE;\n\t int y = PEASANT_RANGE;\n\t\tfor (int range = 1; range < Math.max(currentState.getXExtent(), currentState.getYExtent()); range++) {\n\t\t\tfor (int i = x - range; i <= x + range; i++) {\n\t\t\t\tfor (int j = y - range; j <= y + range; j++) {\n\t\t\t\t\tif (currentState.inBounds(i, j) && !board.getSeen(i, j)) {\n\t\t\t\t\t\testGoldMineLocation = new Pair<Integer, Integer>(i, j);\n\t\t\t\t\t\tSystem.out.printf(\"New gold mine estimate at %d,%d\\n\", estGoldMineLocation.getX(), estGoldMineLocation.getY());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n public void onRegionClickSelected(ProteinRegionSelectionEvent event) {\r\n StateChanger changer = new StateChanger();\r\n List<Region> region = new ArrayList<>();\r\n List<PeptideMatch> peptides;\r\n List<String> modifications;\r\n\r\n try {\r\n region.add(new Region(event.getStart(), event.getStart() + event\r\n .getLength() - 1));\r\n changer.addRegionChange(region);\r\n\r\n peptides = PeptideUtils.filterPeptideMatchesNotIn(peptideMatchSelection,\r\n event.getStart(), event.getStart() + event.getLength() - 1);\r\n\r\n if(peptides.size() != peptideMatchSelection.size()) {\r\n changer.addPeptideChange(peptides);\r\n }\r\n\r\n modifications = filterModificationsNotIn(currentModifications,\r\n event.getStart(), event.getStart() + event.getLength() - 1);\r\n\r\n if (modifications.size() != currentModifications.size()) {\r\n changer.addModificationChange(modifications);\r\n }\r\n\r\n UserAction action = new UserAction(UserAction.Type.region,\r\n \"Click Set\");\r\n StateChangingActionEvent.fire(this, changer, action);\r\n } catch (IllegalRegionValueException e) {\r\n // This is probably because of an empty selection,\r\n // we don't send any event\r\n }\r\n }",
"private void updatePreferences() {\n\n /* Update preferences of the agent */\n patientAgent.updatePreferredAllocations();\n List<AllocationState> newPreferredAllocations = patientAgent.getAllocationStates();\n preferredAllocationsIterator = patientAgent.getAllocationStates().iterator();\n currentSize = patientAgent.getAllocationStates().size();\n\n if (newPreferredAllocations.isEmpty() || iterationsWithNoImprovementCount >= maxIterationsNum) {\n /* We shut down the behaviour if there are no better appointments\n or we exceeded the possible number of non-improving algorithm iterations\n */\n isHappyWithAppointment = true;\n\n } else if (newPreferredAllocations.size() >= currentSize) {\n\n /* No improvement has been made in our algorithm */\n iterationsWithNoImprovementCount++;\n } else {\n\n /* Improved the appointment, resetting the counter */\n iterationsWithNoImprovementCount = 0;\n }\n\n\n }",
"public Gel_BioInf_Models.File getRelevantRegions() {\n return relevantRegions;\n }",
"@Test\n\tpublic void shouldReturnPagedOpenDocumentsForProntoServicesSortedByCreationDateAsc()\n\t{\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getPagedDocumentsForUnit(UNIT_PRONTO_SERVICES,\n\t\t\t\tcreatePageableData(0, 10, StringUtils.EMPTY), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createFilterByCriteriaObject(DOCUMENT_STATUS_OPEN, StringUtils.EMPTY)));\n\n\t\tTestCase.assertEquals(2, result.getResults().size());\n\t\tTestCase.assertEquals(DocumentStatus.OPEN, result.getResults().get(0).getStatus());\n\t\tTestCase.assertEquals(DocumentStatus.OPEN, result.getResults().get(1).getStatus());\n\t}",
"@External(readonly = true)\n\tpublic List<Address> get_score_list(){\n\t\t\n\t\tAddress[] proposal_list = new Address[this.proposal_list.size()];\n\n\t\tfor(int i= 0; i< this.proposal_list.size(); i++) {\n\t\t\tproposal_list[i] = this.proposal_list.get(i);\n\t\t}\t\t\n\t\treturn List.of(proposal_list);\n\t}",
"private Map<Good, Integer> initiateMarketplace() {\n Random noise = new Random();\n Map<Good, Integer> map = Collections.synchronizedMap(\n new EnumMap<Good, Integer>(Good.class));\n for (Good item : Good.values()) {\n if (item.getMinTech() <= techLevel) {\n Integer price = Math.max(item.getBasePrice()\n - (techLevel - item.getMinTech()) + alignment.getPriceChange()\n + noise.nextInt(5),\n 5);\n map.put(item, price);\n }\n }\n return map;\n }",
"public interface ConflictRegionStrategy extends AlgStrategy {}",
"private void createInitialPopulation() throws InterruptedException, TimeoutException {\n\n\t\tProteinDatabase ident = new ProteinDatabase();\n\t\tident.parseInput(\"proteins.fasta\");\n\t\tList<Protein> database = ident.getDatabase();\n\n\t\tfor (Protein data : database) {\n\t\t\tdata.setExperimental(es);\n\t\t}\n\n\t\tList<Protein> candidates = new ArrayList<Protein>();\n\t\tfor (Protein p : database)\n\t\t{\n\t\t\tTheoreticalSpectrum theoreticalSpectrum = new TheoreticalSpectrum(p.getAminoAcidsequence());\n\t\t\tif (Math.abs(parentMass - theoreticalSpectrum.getParentMass()) <= parentMassThreshold) {\n\t\t\t\tcandidates.add(p);\n\t\t\t}\n\t\t}\n\n\t\trunInitialFitnessCalculations(candidates);\n\n\t\tCollections.sort(candidates, new ProteinFitnessComparator());\n\t\tdebug(candidates, 0);\n\n\n\t\tpopulation = new ArrayList<Protein>(populationSize);\n\n\t\tpopulationActualSize = 0;\n\t\tfor (Protein p : candidates)\n\t\t{\n\t\t\tpopulation.add(p);\n\t\t\tpopulationActualSize++;\n\t\t\tif (populationActualSize == populationSize)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"private static HashMap<Integer, ArrayList<String>> checkAndMergeIntersectedPoints(HashMap<Integer, ArrayList<String>> boundedRegionPointsMap) {\n\n\t\t// Iterate over regions one by one, to validate with rest of the regions iteratively.\n\t for(Integer key1 : boundedRegionPointsMap.keySet()) {\n\t ArrayList<String> list1 = boundedRegionPointsMap.get(key1);\n\n\t for (Integer key2 : boundedRegionPointsMap.keySet()) {\n\t \t// Only need to check for keys (region counters) incrementally\n\t if (key1 < key2) {\n\t ArrayList<String> list2 = boundedRegionPointsMap.get(key2);\n\t for(String point : list2) {\n\t \t// If there is an intersecting point in two regions, merge them.\n\t if (list1.contains(point)) {\n\t list1.addAll(list2);\n\t // Just to make sure there won't be any duplicate points introduced after the merge.\n\t Set<String> uniquePoints = new HashSet<String>(list1);\n\t boundedRegionPointsMap.put(key1, new ArrayList<String>(uniquePoints));\n\t break;\n\t }\n\t }\n\t }\n\t }\n\n\t }\n\t return boundedRegionPointsMap;\n\t}",
"public int getMaxCombinationsInRegion();",
"public int produce(int min, int max, int start, int subpopulation, Individual[] inds, ec.EvolutionState state, int thread)\n/* */ {\n/* 27 */ int n = this.sources[0].produce(min, max, start, subpopulation, inds, state, thread);\n/* */ \n/* */ \n/* */ \n/* 31 */ if (!state.random[thread].nextBoolean(this.likelihood)) {\n/* 32 */ return reproduce(n, start, subpopulation, inds, state, thread, false);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 38 */ if (!(this.sources[0] instanceof ec.BreedingPipeline)) {\n/* 39 */ for (int q = start; q < n + start; q++) {\n/* 40 */ inds[q] = ((Individual)inds[q].clone());\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 48 */ if (!(inds[start] instanceof TestCaseCandidate))\n/* 49 */ state.output.fatal(\"OurMutatorPipeline didn't get an Chromosome.The offending individual is in subpopulation \" + \n/* 50 */ subpopulation + \" and it's:\" + inds[start]);\n/* 51 */ ChromosomeSpecies species = (ChromosomeSpecies)inds[start].species;\n/* */ \n/* */ \n/* */ \n/* 55 */ for (int q = start; q < n + start; q++)\n/* */ {\n/* 57 */ TestCaseCandidate i = (TestCaseCandidate)inds[q];\n/* 58 */ double mutp = 1.0D / i.getGenes().size();\n/* */ \n/* 60 */ double[] propa = new double[i.getGenes().size()];\n/* 61 */ for (int x = 0; x < i.getGenes().size(); x++)\n/* 62 */ propa[x] = mutp;\n/* 63 */ for (int x = 0; x < i.getGenes().size(); x++) {\n/* 64 */ if (state.random[thread].nextBoolean(propa[x]))\n/* */ {\n/* */ \n/* 67 */ ((csbst.generators.AbsractGenerator)i.getGenes().get(x)).mutate();\n/* */ }\n/* */ }\n/* */ \n/* 71 */ i.evaluated = false;\n/* */ }\n/* */ \n/* 74 */ return n;\n/* */ }",
"public Path getProposalPath() { return proposalPath; }",
"@Override\r\npublic Object produceValue(Annotation np, Document doc)\r\n{\n SortedSet<Integer> quoteLocations = new TreeSet<Integer>();\r\n Pattern p = Pattern.compile(\"\\\"|''|``|\\u201C|\\u201D\");\r\n\r\n String text = doc.getText();\r\n Matcher m = p.matcher(text);\r\n\r\n boolean inQuote = false;\r\n while (m.find()) {\r\n int start = m.start();\r\n if (inQuote && (text.substring(start).startsWith(\"``\") || text.substring(start).startsWith(\"\\u201C\"))) {\r\n // We have an opening quote; Make sure the previous quote is closed\r\n quoteLocations.add((start - 1));\r\n inQuote = false;\r\n }\r\n quoteLocations.add((start));\r\n inQuote = !inQuote;\r\n }\r\n // System.out.println(\"Quote locations: \"+quoteLocations);\r\n\r\n // Figure out which noun corresponds to which quote\r\n AnnotationSet sent = doc.getAnnotationSet(Constants.SENT);\r\n Iterator<Integer> quoteIter = quoteLocations.iterator();\r\n HashMap<Integer, Annotation> reporters = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> companies = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> sentReporter = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> compReporter = new HashMap<Integer, Annotation>();\r\n int counter = 1;\r\n while (quoteIter.hasNext()) {\r\n int qStart = quoteIter.next();\r\n if (!quoteIter.hasNext()) {\r\n break;\r\n }\r\n int qEnd = quoteIter.next() + 1;\r\n\r\n AnnotationSet sentences = sent.getOverlapping(qStart, qEnd);\r\n\r\n // Three cases for the size of the sentences set\r\n Annotation match, compMatch;\r\n if (sentences.size() < 1) {\r\n System.out.println(\"Quote is not covered by any sentence:\");\r\n int beg = qStart - 15;\r\n beg = beg < 0 ? 0 : beg;\r\n int en = qStart + 15;\r\n en = en >= text.length() ? text.length() - 1 : en;\r\n System.out.println(Utils.getAnnotText(beg, en, text));\r\n System.out.println(\"Position \" + qStart);\r\n match = Annotation.getNullAnnot();\r\n compMatch = Annotation.getNullAnnot();\r\n // throw new RuntimeException(\"Quote is not covered by any sentence\");\r\n }\r\n else if (sentences.size() == 1) {\r\n Annotation s = sentences.getFirst();\r\n // System.out.println(\"Sent: \"+Utils.getAnnotText(s, text));\r\n if (s.properCovers(qStart, qEnd)) {\r\n match = findReporter(qStart, qEnd, s, doc);\r\n compMatch = findCompany(qStart, qEnd, s, doc);\r\n if (match.equals(Annotation.getNullAnnot())) {\r\n match = findReportCont(sentReporter, s, doc);\r\n compMatch = findReportCont(compReporter, s, doc);\r\n }\r\n }\r\n else {\r\n match = findReportCont(sentReporter, s, doc);\r\n compMatch = findReportCont(compReporter, s, doc);\r\n }\r\n sentReporter.put(Integer.decode(s.getAttribute(\"sentNum\")), match);\r\n compReporter.put(Integer.decode(s.getAttribute(\"sentNum\")), compMatch);\r\n }\r\n else {\r\n // The quoted string spans more than one sentence.\r\n Annotation beg = sentences.getFirst();\r\n // System.out.println(\"First sent: \"+Utils.getAnnotText(beg, text));\r\n Annotation end = sentences.getLast();\r\n // System.out.println(\"Last sent: \"+Utils.getAnnotText(end, text));\r\n match = Annotation.getNullAnnot();\r\n compMatch = Annotation.getNullAnnot();\r\n if (beg.getStartOffset() < qStart) {\r\n match = findReporter(qStart, qEnd, beg, doc);\r\n compMatch = findCompany(qStart, qEnd, beg, doc);\r\n }\r\n if (match.equals(Annotation.getNullAnnot()) && qEnd < end.getEndOffset()) {\r\n match = findReporter(qStart, qEnd, end, doc);\r\n compMatch = findCompany(qStart, qEnd, end, doc);\r\n }\r\n if (match.equals(Annotation.getNullAnnot())) {\r\n match = findReportCont(sentReporter, beg, doc);\r\n compMatch = findCompany(qStart, qEnd, end, doc);\r\n }\r\n sentReporter.put(Integer.parseInt(beg.getAttribute(\"sentNum\")), match);\r\n sentReporter.put(Integer.parseInt(end.getAttribute(\"sentNum\")), match);\r\n compReporter.put(Integer.parseInt(beg.getAttribute(\"sentNum\")), compMatch);\r\n compReporter.put(Integer.parseInt(end.getAttribute(\"sentNum\")), compMatch);\r\n\r\n }\r\n reporters.put(counter, match);\r\n companies.put(counter, compMatch);\r\n counter += 2;\r\n\r\n // System.out.println(\"Quote: \"+Utils.getAnnotText(qStart, qEnd, text));\r\n // if(!match.equals(Annotation.getNullAnnot())){\r\n // System.out.println(\"Match: \"+Utils.getAnnotText(match, text));\r\n // }else{\r\n // System.out.println(\"no match!\");\r\n // }\r\n }\r\n int initial = quoteLocations.size();\r\n\r\n AnnotationSet nps = doc.getAnnotationSet(Constants.NP);\r\n for (Annotation a : nps.getOrderedAnnots()) {\r\n int s = a.getStartOffset();\r\n quoteLocations = quoteLocations.tailSet(s);\r\n int numQuotes = initial - quoteLocations.size();\r\n\r\n // System.err.println(numQuotes);\r\n if (numQuotes % 2 == 0) {\r\n a.setProperty(this, -1);\r\n a.setProperty(Property.AUTHOR, Annotation.getNullAnnot());\r\n a.setProperty(Property.COMP_AUTHOR, Annotation.getNullAnnot());\r\n }\r\n else {\r\n a.setProperty(this, numQuotes);\r\n a.setProperty(Property.AUTHOR, reporters.get(numQuotes));\r\n a.setProperty(Property.COMP_AUTHOR, companies.get(numQuotes));\r\n // if(FeatureUtils.isPronoun(a, annotations, text)&&FeatureUtils.getPronounPerson(FeatureUtils.getText(a,\r\n // text))==1\r\n // &&FeatureUtils.NumberEnum.SINGLE.equals(FeatureUtils.getNumber(a, annotations, text))){\r\n // Annotation repo = reporters.get(new Integer(numQuotes));\r\n // if(repo==null||repo.equals(Annotation.getNullAnnot())){\r\n // Annotation thisSent = sent.getOverlapping(a).getFirst();\r\n // System.out.println(\"*** No author in \"+Utils.getAnnotText(thisSent, text+\"***\"));\r\n // }\r\n // }\r\n }\r\n }\r\n // System.out.println(\"End of inquote\");\r\n\r\n return np.getProperty(this);\r\n}",
"@Override\n @Transactional(readOnly = true)\n public Page<Proposal> search(String query, Pageable pageable) {\n log.debug(\"Request to search for a page of Proposals for query {}\", query);\n return proposalSearchRepository.search(queryStringQuery(query), pageable);\n }",
"@Test\n public void testDslTriggerPRAllowedBranchesWithApproveMergedFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslTriggerPRAllowedBranchesWithApproveMergedFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n boolean isToApprove = false;\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n assertEquals(1, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n BitBucketPPRPullRequestMergedActionFilter tmp3 = (BitBucketPPRPullRequestMergedActionFilter) tmp2.getTriggers()\n .get(0).getActionFilter();\n isToApprove = tmp3.shouldSendApprove();\n }\n assertEquals(1, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestMergedActionFilter\");\n assertTrue(isToApprove);\n }",
"private InferenceProteinGroup getProteinsPAG(IntermediateProtein protein) {\n List<InferenceProteinGroup> pags = piaModeller.getProteinModeller().getInferredProteins();\n if (pags == null) {\n return null;\n }\n \n for (InferenceProteinGroup pag : piaModeller.getProteinModeller().getInferredProteins()) {\n if (pag.getProteins().contains(protein)) {\n return pag;\n }\n \n for (InferenceProteinGroup subPAG : pag.getSubGroups()) {\n if (subPAG.getProteins().contains(protein)) {\n return subPAG;\n }\n }\n }\n \n return null;\n }",
"@Test\n\tpublic void shouldReturnPagedOpenDocumentsSortedByOpenAmountAsc()\n\t{\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getAllPagedDocuments(\n\t\t\t\tcreatePageableData(0, 10, \"byOpenAmountAsc\"), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createFilterByCriteriaObject(DOCUMENT_STATUS_OPEN, StringUtils.EMPTY)));\n\n\t\tTestCase.assertEquals(10, result.getResults().size());\n\t\tfor (final B2BDocumentModel document : result.getResults())\n\t\t{\n\t\t\tTestCase.assertEquals(DocumentStatus.OPEN, document.getStatus());\n\t\t}\n\t}",
"public Gel_BioInf_Models.File getRelevantRegions() {\n return relevantRegions;\n }",
"public Map<Integer, Boolean> getOverlaps(Geometry geom) throws SQLException {\n return retrieveExpected(createNativeOverlapsStatement(geom), BOOLEAN);\n }",
"public ProposalActions getActions() {\n return this.actions;\n }",
"ImmutableList<SchemaOrgType> getContentRatingList();",
"Association findAssociation(World w, BlockPos pos, String strategy);",
"public int[] calculateAutoAdjustPosition() {\n int[] result = new int[2];\n if (mMainView.getLayoutParams() == null || !(mMainView.getLayoutParams() instanceof MarginLayoutParams)) {\n return result;\n }\n // adjust position so it will align pdfviewctrl layout\n measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED);\n MarginLayoutParams mlp = (MarginLayoutParams) mMainView.getLayoutParams();\n\n\n int y;\n int verticalGravity = mGravity & Gravity.VERTICAL_GRAVITY_MASK;\n switch (verticalGravity) {\n case Gravity.TOP:\n y = mPDFViewCtrl.getTop() + mlp.topMargin;\n break;\n case Gravity.CENTER_VERTICAL:\n y = mPDFViewCtrl.getTop() + mPDFViewCtrl.getHeight() / 2 - getMeasuredHeight() / 2 + mlp.topMargin;\n break;\n default:\n y = mPDFViewCtrl.getBottom() - getMeasuredHeight() - mlp.bottomMargin;\n break;\n }\n\n result[1] = y;\n\n int x;\n int gravity = Utils.isJellyBeanMR1() ? Gravity.getAbsoluteGravity(mGravity, getLayoutDirection()) : mGravity;\n int horizontalGravity = gravity & Gravity.HORIZONTAL_GRAVITY_MASK;\n switch (horizontalGravity) {\n case Gravity.RIGHT:\n x = mPDFViewCtrl.getRight() - getMeasuredWidth()\n - mlp.leftMargin - mlp.rightMargin;\n break;\n case Gravity.CENTER_HORIZONTAL:\n x = mPDFViewCtrl.getLeft() + mPDFViewCtrl.getWidth() / 2 - getMeasuredWidth() / 2 + mlp.leftMargin;\n break;\n default:\n x = mPDFViewCtrl.getLeft() + mlp.leftMargin;\n break;\n }\n result[0] = x;\n return result;\n }",
"public PDAnnotationPopup getPopup() {\n/* 157 */ COSDictionary popup = (COSDictionary)getCOSObject().getDictionaryObject(\"Popup\");\n/* 158 */ if (popup != null)\n/* */ {\n/* 160 */ return new PDAnnotationPopup(popup);\n/* */ }\n/* */ \n/* */ \n/* 164 */ return null;\n/* */ }",
"@Override\r\n\t\t\tpublic void populationUpdate(PopulationData<? extends Solution> data) {\n//\t\t\t\tbuffer.append(data.getPopulationSize());\r\n//\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tdouble fit = data.getBestCandidateFitness();\r\n//\t\t\t\tSystem.out.println(fit);\r\n\t\t\t\tbuffer.delete(0, buffer.length());\r\n\t\t\t\tbuffer.append(fit);\r\n//\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tif (Run10FastExternalizer.initialFitness.getDbl() == -1.0) {\r\n\t\t\t\t\tRun10FastExternalizer.initialFitness.setDbl(fit);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (fit == 0.0){\r\n\t\t\t\t\tArrayList<Student> studentsCopy = new ArrayList<>();\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Student student: students){\r\n\t\t\t\t\t\tstudentsCopy.add(student.clone());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Student student: studentsCopy){\r\n\t\t\t\t\t\tstudent.register(data.getBestCandidate().getBlocks());\r\n//\t\t\t\t\t\tSystem.out.println(student.getSchedule());\r\n//\t\t\t\t\t\tbuffer.append(student.getSchedule().toString());\r\n//\t\t\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\t\tsb.append(student.getSchedule().toString());\r\n\t\t\t\t\t\tsb.append(\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tsuperValue = sb.toString();\r\n\t\t\t\t}\r\n\t\t\t}",
"public Map<OperationKey, List<Policy>> enforceOn(SourceBundle sourceBundle) {\n\t\tMap<OperationKey, List<Policy>> conflicts = new HashMap<OperationKey, List<Policy>>();\n\n\t\tSortedSet<Operation> operations = getAllOperations(sourceBundle, conflicts);\n\n\t\tif (operations.size() == 0) {\n\t\t\treturn conflicts;\n\t\t}\n\n\t\t// organize operations into a tree based on their nesting relationship\n\t\toperations = nestOperations(operations);\n\n\t\t// carry out the operations\n\t\texecuteOperations(sourceBundle, operations);\n\n\t\t// add the definition JS file to the beginning of web page\n\t\tsourceBundle.addTreatmentDefinitions(treatmentFactory.BASE_OBJECT_NAME + \".js\", treatmentFactory.getDefinitions());\n\n\t\treturn conflicts;\n\t}",
"@Override\n\tpublic Map<String, String> getAvailableProcedures(boolean refresh)\n\t{\n\t\treturn m_models.getAvailableProcedures(refresh);\n\t}",
"private ResizeContext getHoverArea(Point p) {\n ResizeContext toRet = null;\n ResizeType resizeType = null;\n Point resizePoint = null;\n for (Rectangle rectangle : originalAreas) {\n if (isMatch(new Point(rectangle.x, rectangle.y), p)) {\n resizeType = ResizeType.CORNER;\n resizePoint = new Point(rectangle.x, rectangle.y); \n } else if (isMatch(new Point(rectangle.x + rectangle.width, rectangle.y), p)) {\n resizeType = ResizeType.CORNER;\n resizePoint = new Point(rectangle.x + rectangle.width, rectangle.y); \n } else if (isMatch(new Point(rectangle.x, rectangle.y + rectangle.height), p)) {\n resizeType = ResizeType.CORNER;\n resizePoint = new Point(rectangle.x, rectangle.y + rectangle.height); \n } else if (isMatch(new Point(rectangle.x + rectangle.width, rectangle.y + rectangle.height), p)) {\n resizeType = ResizeType.CORNER;\n resizePoint = new Point(rectangle.x + rectangle.width, rectangle.y + rectangle.height);\n } \n // TODO The side resizing is not yet supported.\n// else if (isMatch(new Point(rectangle.x + rectangle.width / 2, rectangle.y), p)) {\n// resizeType = ResizeType.SIDE;\n// resizePoint = new Point(rectangle.x + rectangle.width / 2, rectangle.y); \n// } else if (isMatch(new Point(rectangle.x + rectangle.width, rectangle.y + rectangle.height / 2), p)) {\n// resizeType = ResizeType.SIDE;\n// resizePoint = new Point(rectangle.x + rectangle.width, rectangle.y + rectangle.height / 2); \n// } else if (isMatch(new Point(rectangle.x, rectangle.y + rectangle.height / 2), p)) {\n// resizeType = ResizeType.SIDE;\n// resizePoint = new Point(rectangle.x, rectangle.y + rectangle.height / 2); \n// } else if (isMatch(new Point(rectangle.x + rectangle.width / 2, rectangle.y + rectangle.height), p)) {\n// resizeType = ResizeType.SIDE;\n// resizePoint = new Point(rectangle.x + rectangle.width / 2, rectangle.y + rectangle.height); \n// }\n\n if (resizeType != null) {\n toRet = new ResizeContext(resizeType, resizePoint, rectangle);\n break;\n }\n }\n\n return toRet;\n }",
"public Map<String, Set<String>> concealedPackagesToOpen() {\n return concealedPackagesToOpen;\n }",
"public CompletionProvider createCompletionProvider() {\n\n\t\t// Create the provider used when typing code.\n\t\tCompletionProvider codeCP = createCodeCompletionProvider();\n\n\t\t// The provider used when typing a string.\n\t\tCompletionProvider stringCP = createStringCompletionProvider();\n\n\t\t// The provider used when typing a comment.\n\t\tCompletionProvider commentCP = createCommentCompletionProvider();\n\n\t\t// Create the \"parent\" completion provider.\n\t\tLanguageAwareCompletionProvider provider = new\n\t\t\t\t\t\t\t\tLanguageAwareCompletionProvider(codeCP);\n\t\tprovider.setStringCompletionProvider(stringCP);\n\t\tprovider.setCommentCompletionProvider(commentCP);\n\n\t\treturn provider;\n\n\t}",
"@Override\r\n\tpublic boolean isEnabled() {\r\n\t\tboolean result = false;\r\n\t\tif (getSelection().size() == 1) {\r\n\t\t\tif (getSelection().getFirstElement() instanceof IResource) {\r\n\t\t\t\tIResource resource = (IResource) getSelection().getFirstElement();\r\n\t\t\t\tString pomFileNames = AggregatedProperties.getPomFileNames(resource.getProject());\r\n\t\t\t\tStringTokenizer tkz = new StringTokenizer(pomFileNames, ConfigurationConstants.POM_FILES_SEPARATOR, false);\r\n\t\t\t\twhile (tkz.hasMoreTokens()) {\r\n\t\t\t\t\tif (resource.getName().equalsIgnoreCase(tkz.nextToken())) {\r\n\t\t\t\t\t\tresult = 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 result;\r\n\t}"
] | [
"0.6718606",
"0.6140564",
"0.6115631",
"0.60974574",
"0.58691925",
"0.5848606",
"0.5839067",
"0.5495504",
"0.5364234",
"0.53420544",
"0.53369457",
"0.5180224",
"0.5174687",
"0.5130649",
"0.5120359",
"0.5110804",
"0.5092465",
"0.50455236",
"0.48048124",
"0.479809",
"0.47766522",
"0.46639502",
"0.45610452",
"0.4547591",
"0.441674",
"0.43921667",
"0.43665472",
"0.4359276",
"0.43590984",
"0.4345164",
"0.4321549",
"0.43124428",
"0.43015355",
"0.42981544",
"0.42823505",
"0.4240863",
"0.42155468",
"0.42113394",
"0.42082983",
"0.41789353",
"0.41732147",
"0.4164608",
"0.41518158",
"0.41281486",
"0.41184887",
"0.41094628",
"0.40973124",
"0.4083369",
"0.40824243",
"0.40739766",
"0.40707535",
"0.40658212",
"0.40532324",
"0.4052304",
"0.40502173",
"0.40133297",
"0.40101174",
"0.40075076",
"0.40051755",
"0.3992032",
"0.39918575",
"0.39908117",
"0.3965634",
"0.39647987",
"0.39634803",
"0.3962454",
"0.3958403",
"0.39579687",
"0.39464462",
"0.39451218",
"0.39415342",
"0.3937116",
"0.39290565",
"0.39285877",
"0.39261454",
"0.39219734",
"0.3921817",
"0.38945517",
"0.38866255",
"0.38857093",
"0.38848096",
"0.38819048",
"0.3881304",
"0.3879799",
"0.3875685",
"0.38753438",
"0.38742086",
"0.38729945",
"0.38571173",
"0.3856328",
"0.38458547",
"0.38375846",
"0.38290843",
"0.38260698",
"0.38240457",
"0.38236874",
"0.3818979",
"0.3818211",
"0.3814785",
"0.38082123"
] | 0.6717154 | 1 |
Calculates the proposals for the XML Tag Name Region. | protected void computeTagNameProposals() {
// completing the *first* tag in "<tagname1 |<tagname2"
// Ignore attributes
if (inAttributeRegion()) {
return;
}
addTagNameProposals(this.getElementPosition(node));
// addEndTagNameProposals();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void computeTagOpenProposals() {\n \n \t\tif (replacementBeginPosition == documentRegion.getStartOffset(region)) {\n \t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n \t\t\t\t// at the start of an existing tag, right before the '<'\n \t\t\t\tcomputeTagNameProposals();\n \t\t\t}\n \t\t} else {\n \t\t\t// within the white space\n \t\t\tITextRegion name = getNameRegion(((IDOMNode) node)\n \t\t\t\t\t.getStartStructuredDocumentRegion());\n \t\t\tif ((name != null)\n \t\t\t\t\t&& ((documentRegion.getStartOffset(name) <= replacementBeginPosition) && (documentRegion\n \t\t\t\t\t\t\t.getEndOffset(name) >= replacementBeginPosition))) {\n \t\t\t\t// replace the existing name\n \t\t\t\treplacementBeginPosition = documentRegion.getStartOffset(name);\n \t\t\t\treplacementLength = name.getTextLength();\n \t\t\t} else {\n \t\t\t\t// insert a valid new name, or possibly an end tag\n \t\t\t\t// addEndTagProposals(contentAssistRequest);\n \t\t\t\tsetReplacementLength(0);\n \t\t\t}\n \t\t\taddTagNameProposals(getElementPosition(node));\n \t\t}\n \t}",
"@Override\n \tpublic ArrayList<ICompletionProposal> getCompletionProposals() {\n\n \t\tif (region.getType() == DOMRegionContext.XML_TAG_OPEN) {\n \t\t\tcomputeTagOpenProposals();\n \t\t} else if (region.getType() == DOMRegionContext.XML_TAG_NAME) {\n \t\t\tcomputeTagNameProposals();\n \t\t}\n \t\treturn getAllCompletionProposals();\n \t}",
"public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,\n\t\t\tint documentOffset) {\n\t\tboolean dotActivation = false;\n\n\t\tVector<ICompletionProposal> result = new Vector<ICompletionProposal>();\n\t\t// ICompletionProposal[] result= new\n\t\t// ICompletionProposal[fgProposals.length];\n\t\tIDocument doc = viewer.getDocument();\n\n\t\tFindReplaceDocumentAdapter frd = new FindReplaceDocumentAdapter(doc);\n\n\t\tint pos = documentOffset;\n\t\tdo {\n\t\t\tpos--;\n\t\t} while (pos >= 0 && !Character.isWhitespace(frd.charAt(pos)));\n\t\tpos++;\n\n\t\tString stp = \"\";\n\t\tif (pos >= 0)\n\t\t\tstp = frd.subSequence(pos, documentOffset).toString();\n\n\t\t// See if we have . activation\n\t\tif (frd.charAt(documentOffset - 1) == '.') {\n\t\t\tString props[] = dotActivation(stp, result);\n\t\t\tfor (int i = 0; i < props.length; i++) {\n\t\t\t\tString val = props[i];\n\t\t\t\tIContextInformation info = new ContextInformation(\n\t\t\t\t\t\tval,\n\t\t\t\t\t\tMessageFormat\n\t\t\t\t\t\t\t\t.format(\n\t\t\t\t\t\t\t\t\t\t\"CompletionProcessor.Proposal.ContextInfo.pattern\", new Object[] { val })); //$NON-NLS-1$\n\t\t\t\t// result.add(new CompletionProposal(fgProposals[i],\n\t\t\t\t// documentOffset, 0, fgProposals[i].length(), null,\n\t\t\t\t// fgProposals[i], info,\n\t\t\t\t// MessageFormat.format(\"CompletionProcessor.Proposal.hoverinfo.pattern\",\n\t\t\t\t// new Object[] { fgProposals[i]}))); //$NON-NLS-1$\n\t\t\t\tresult.add(new CompletionProposal(val, documentOffset, 0,\n\t\t\t\t\t\tval.length(), null, val, null, null)); //$NON-NLS-1$\n\t\t\t}\n\n\t\t} else {\n\t\t\t// System.out.println(\"String part:\" + stp);\n\t\t\tSet<String> comps = fgProposals.keySet();\n\t\t\tIterator<String> compitr = comps.iterator();\n\t\t\twhile (compitr.hasNext()) {\n\t\t\t\t// CompletionToken comp = comps.nextElement();\n\t\t\t\t// String val = comp.getKey();\n\t\t\t\tString val = compitr.next();\n\t\t\t\t// If there are too many matches (and it becomes annoying) then\n\t\t\t\t// remove the two calls to toLowerCase() below\n\t\t\t\t// if (val.toLowerCase().startsWith(stp.toLowerCase())) {\n\t\t\t\tif (val.startsWith(stp)) {\n\n\t\t\t\t\tString rep = val.substring(stp.length());\n\t\t\t\t\tIContextInformation info = new ContextInformation(\n\t\t\t\t\t\t\tval,\n\t\t\t\t\t\t\tMessageFormat\n\t\t\t\t\t\t\t\t\t.format(\n\t\t\t\t\t\t\t\t\t\t\t\"CompletionProcessor.Proposal.ContextInfo.pattern\", new Object[] { val })); //$NON-NLS-1$\n\t\t\t\t\t// result.add(new CompletionProposal(fgProposals[i],\n\t\t\t\t\t// documentOffset, 0, fgProposals[i].length(), null,\n\t\t\t\t\t// fgProposals[i], info,\n\t\t\t\t\t// MessageFormat.format(\"CompletionProcessor.Proposal.hoverinfo.pattern\",\n\t\t\t\t\t// new Object[] { fgProposals[i]}))); //$NON-NLS-1$\n\t\t\t\t\t\n\t\t\t\t\t// Do not show proposals with . if the stump does not have a .\n\t\t\t\t\tif(!((stp.indexOf('.') == -1) && val.indexOf('.') != -1)) {\n\t\t\t\t\t\tresult.add(new CompletionProposal(rep, documentOffset, 0,\n\t\t\t\t\t\t\t\trep.length(), null, val, null, null)); //$NON-NLS-1$\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// adding an empty string to ensure that the completion dialog appears\n\t\tif (result.size() == 0) {\n\t\t\tresult.add(new CompletionProposal(\n\t\t\t\t\t\"\", documentOffset, 0, 0, null, \"\", null, null)); //$NON-NLS-1$\n\t\t}\n\n\t\treturn result.toArray(new ICompletionProposal[result.size()]);\n\t}",
"public java.util.List<edu.ustb.sei.mde.xmu2.resource.xmu2.ui.Xmu2CompletionProposal> process(java.util.List<edu.ustb.sei.mde.xmu2.resource.xmu2.ui.Xmu2CompletionProposal> proposals) {\n\t\treturn proposals;\r\n\t}",
"public void sortProposals() {\n\n\t}",
"private void computeWordProposals(final String word, final int offset, final int carretColumnIndex, final List<ICompletionProposal> propositionList) {\n\t\tfinal int qualifierLength = word.length();\n\t\tfinal int replacementOffset = offset - qualifierLength;\n\n\t\t// keyword and other static proposals\n\t\tfor (List<CompletionProposalTemplate> list : filterPrefix(proposals, word).values()) {\n\t\t\t// and add to result list\n\t\t\tfor (CompletionProposalTemplate template : list) {\n\t\t\t\tpropositionList.add(template.getProposal(replacementOffset, carretColumnIndex - qualifierLength, qualifierLength));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Try to find matches among the spec's set of symbols (e.g. operators definitions and declarations).\n\t\tfinal SpecObj specObj = ToolboxHandle.getSpecObj();\n\t\tif (specObj != null && specObj.getRootModule() != null) { // null if spec hasn't been parsed.\n\t\t\tfinal ModuleNode rootModule = specObj.getRootModule();\n\n\t\t\tfinal Collection<SymbolNode> symbols = rootModule.getSymbols(matcher.setPrefix(word));\n\t\t\tfor (final SymbolNode symbolNode : symbols) {\n\t\t\t\tpropositionList.add(new CompletionProposalTemplate(symbolNode.getSignature(), symbolNode.getName(),\n\t\t\t\t\t\tsymbolNode.getHumanReadableImage()).getProposal(replacementOffset, carretColumnIndex - qualifierLength, qualifierLength));\n\t\t\t}\n\t\t}\n\t}",
"private static void parseNames(Document doc, String expression) throws XPathExpressionException, IOException, SAXException {\n // parse input document\n XPath xPath = XPathFactory.newInstance().newXPath();\n NodeList nodeList = (NodeList) xPath.compile(expression).evaluate(doc, XPathConstants.NODESET);\n\n for (int i = 0; i < nodeList.getLength(); i++) {\n if (nodeList.item(i).getAttributes().getNamedItem(\"name\") != null) {\n String nameValue = nodeList.item(i).getAttributes().getNamedItem(\"name\").getNodeValue();\n String locationValue = nodeList.item(i).getAttributes().getNamedItem(\"location\").getNodeValue();\n\n // add unique values only\n if (!nameValue.isEmpty()) {\n String resolvedName = resolveVariables(nameValue, null);\n String resolvedLocation = resolveVariables(locationValue, null);\n if (resolvedName == null) {\n if (!names.contains(nameValue)) {\n names.add(nameValue);\n }\n } else if (!names.contains(resolvedName)) {\n names.add(resolvedName);\n }\n if (resolvedLocation != null) {\n if (resolvedName == null) {\n locationsAndNames.put(resolvedLocation, nameValue);\n } else {\n locationsAndNames.put(resolvedLocation, resolvedName);\n }\n }\n }\n } else {\n String nodeValue = nodeList.item(i).getAttributes().getNamedItem(\"location\").getNodeValue();\n\n // add unique values only\n if (!nodeValue.isEmpty()) {\n String resolved = resolveVariables(nodeValue, null);\n if (resolved == null) {\n if (! namelessLocations.contains(nodeValue)) {\n namelessLocations.add(nodeValue);\n }\n } else if (! namelessLocations.contains(resolved)) {\n namelessLocations.add(resolved);\n }\n }\n }\n }\n }",
"@DSComment(\"Package priviledge\")\n @DSBan(DSCat.DEFAULT_MODIFIER)\n @DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.414 -0500\", hash_original_method = \"33259345EBD99FFF49F4E1AAD2529013\", hash_generated_method = \"296CADF2DCFE4D340DC221E4F2AE1D69\")\n \nString [] processName (String qName, boolean isAttribute)\n {\n String name[];\n Hashtable table;\n\n // detect errors in call sequence\n declsOK = false;\n\n // Select the appropriate table.\n if (isAttribute) {\n table = attributeNameTable;\n } else {\n table = elementNameTable;\n }\n\n // Start by looking in the cache, and\n // return immediately if the name\n // is already known in this content\n name = (String[])table.get(qName);\n if (name != null) {\n return name;\n }\n\n // We haven't seen this name in this\n // context before. Maybe in the parent\n // context, but we can't assume prefix\n // bindings are the same.\n name = new String[3];\n name[2] = qName.intern();\n int index = qName.indexOf(':');\n\n // No prefix.\n if (index == -1) {\n if (isAttribute) {\n if (qName == \"xmlns\" && namespaceDeclUris)\n name[0] = NSDECL;\n else\n name[0] = \"\";\n } else if (defaultNS == null) {\n name[0] = \"\";\n } else {\n name[0] = defaultNS;\n }\n name[1] = name[2];\n }\n\n // Prefix\n else {\n String prefix = qName.substring(0, index);\n String local = qName.substring(index+1);\n String uri;\n if (\"\".equals(prefix)) {\n uri = defaultNS;\n } else {\n uri = (String)prefixTable.get(prefix);\n }\n if (uri == null\n || (!isAttribute && \"xmlns\".equals (prefix))) {\n return null;\n }\n name[0] = uri;\n name[1] = local.intern();\n }\n\n // Save in the cache for future use.\n // (Could be shared with parent context...)\n table.put(name[2], name);\n return name;\n }",
"public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {\n\t\tDatabaseNode activeDatabaseNode = DatabaseView.getActiveDatabase();\n\t\tif (activeDatabaseNode == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString[] proposals = null;\n\t\tif (activeDatabaseNode != connectionModelCache) {\n\t\t\ttableNamesCache = getModelNames(activeDatabaseNode.getChildren());\n\t\t\tproposals = tableNamesCache;\n\t\t} else {\n\t\t\tdatabaseNamesCache = getModelNames(activeDatabaseNode.getChildren());\n\t\t\tproposals = databaseNamesCache;\n\t\t}\n\n\t\treturn getProposals(proposals, documentOffset);\n\t}",
"org.openxmlformats.schemas.drawingml.x2006.main.STGeomGuideName xgetName();",
"public static Map<Integer, Proposal> getProposals() { return proposals; }",
"org.landxml.schema.landXML11.AlignmentNameRefs xgetAlignmentRefs();",
"private void asyncRecomputeProposals() {\n\t\tfooter.setText(\"Searching...\");\n\t\tif (isValid()) {\n\t\t\tsynchronized (uniqueId) {\n\t\t\t\tif (uniqueId == Long.MAX_VALUE)\n\t\t\t\t\tuniqueId = Long.MIN_VALUE;\n\t\t\t\tuniqueId++;\n\t\t\t}\n\t\t\tfinal Long currentId = new Long(uniqueId);\n\t\t\tcontrol.getDisplay().asyncExec(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tadapter.getProposals(new IContentProposalSearchHandler() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handleResult(\n\t\t\t\t\t\t\t\tfinal ContentProposalList proposalList) {\n\t\t\t\t\t\t\tif (control != null && !control.isDisposed()) {\n\t\t\t\t\t\t\t\tcontrol.getDisplay().asyncExec(new Runnable() {\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\tif (currentId.equals(uniqueId))\n\t\t\t\t\t\t\t\t\t\t\trecomputeProposals(proposalList);\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}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handleTooltips(List<TooltipData> tooltips) {\n\t\t\t\t\t\t\tadapter.handleTooltipData(tooltips);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}",
"public static String tagValue(String name, String pgn) {\n name = \"[\" + name;\n\n int startIndex = pgn.indexOf(name);\n\n if (startIndex == -1) {\n return \"NOT GIVEN\";\n }\n\n startIndex += name.length() + 2;\n\n int endIndex = pgn.indexOf(\"]\", startIndex) - 1;\n\n return pgn.substring(startIndex, endIndex);\n }",
"void xsetName(org.openxmlformats.schemas.drawingml.x2006.main.STGeomGuideName name);",
"public void emissionProbabilities() {\r\n /**\r\n * Word and Tag List.\r\n */\r\n final TreeSet<String> words = new TreeSet(), tags = new TreeSet();\r\n Iterator<Kata> iterSatu = MarkovCore.LIST_KATA.iterator();\r\n while (iterSatu.hasNext()) {\r\n final Kata kata = iterSatu.next();\r\n words.add(kata.getKata());\r\n tags.add(kata.getTag());\r\n }\r\n System.out.println(\"Jumlah Kata: \" + words.size());\r\n System.out.println(\"Jumlah Tag: \" + tags.size());\r\n System.out.println();\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"Emissions Calculation\">\r\n /**\r\n * Perhitungan Emisi.\r\n */\r\n Iterator<String> iterDua = words.iterator();\r\n while (iterDua.hasNext()) {\r\n final String kata = iterDua.next();\r\n Iterator<String> iterTiga = tags.iterator();\r\n while (iterTiga.hasNext()) {\r\n final StrBuilder strBuilder = new StrBuilder(10);\r\n final String tag = iterTiga.next();\r\n strBuilder.append(\"P(\");\r\n strBuilder.append(kata + \"|\");\r\n strBuilder.append(tag + \") = \");\r\n final Emissions emissions = new Emissions(kata, tag, strBuilder.toString());\r\n emissionses.add(emissions);\r\n }\r\n }\r\n\r\n final HashMap<String, Double> penyebut = new HashMap();\r\n Iterator<Kata> iterEmpat = MarkovCore.LIST_KATA.iterator();\r\n while (iterEmpat.hasNext()) {\r\n final Kata kata = iterEmpat.next();\r\n if (penyebut.get(kata.getTag()) == null) {\r\n penyebut.put(kata.getTag(), 1.0);\r\n } else {\r\n penyebut.put(kata.getTag(), penyebut.get(kata.getTag()) + 1);\r\n }\r\n }\r\n\r\n Iterator<Emissions> iterTiga = emissionses.iterator();\r\n while (iterTiga.hasNext()) {\r\n final Emissions emissions = iterTiga.next();\r\n double pembilang = 0.0;\r\n Iterator<Kata> iterKata = MarkovCore.LIST_KATA.iterator();\r\n while (iterKata.hasNext()) {\r\n Kata kata = iterKata.next();\r\n if (StringUtils.equalsIgnoreCase(kata.getKata(), emissions.word) && StringUtils.equalsIgnoreCase(kata.getTag(), emissions.tag)) {\r\n pembilang++;\r\n }\r\n }\r\n\r\n /**\r\n * WARNING - Laplace Smoothing is Activated.\r\n */\r\n// emissions.setEmissionsProbability(pembilang + 1, penyebut.get(emissions.tag) + this.uniqueWords.size(), (pembilang + 1) / (penyebut.get(emissions.tag) + this.uniqueWords.size()));\r\n emissions.setEmissionsProbability(pembilang, penyebut.get(emissions.tag), pembilang / penyebut.get(emissions.tag));\r\n }\r\n//</editor-fold>\r\n\r\n// System.out.println(emissionses.size());\r\n Iterator<Emissions> emissionsIterator = emissionses.iterator();\r\n while (emissionsIterator.hasNext()) {\r\n final Emissions emissions = emissionsIterator.next();\r\n this.emissionsMap.put(new MultiKey(emissions.word, emissions.tag), emissions.emissionsProbability);\r\n// System.out.println(emissions);\r\n }\r\n// System.out.println(this.emissionsMap.size());\r\n }",
"private void processTags() {\r\n tagNames.stream().map(name -> {\r\n tags.get(name).checkMembers();\r\n return name;\r\n }).forEach(name -> {\r\n if (!tags.get(name).hasMembers()) {\r\n menu.remove(tags.get(name).getMenu());\r\n tags.remove(name);\r\n tagNames.remove(name);\r\n } else {\r\n menu.add(tags.get(name).getMenu());\r\n }\r\n });\r\n }",
"public String getProposal() {\n return proposal;\n }",
"private ICompletionProposal[] getCompletionProposals(int offset) throws BadLocationException {\n \t\treturn contentAssistant.getContentAssistProcessor(document.getContentType(offset))\n \t\t\t\t.computeCompletionProposals(editor.getProjectionViewer(), offset);\n \t}",
"@Override\r\n\tpublic String getName() {\n\t\treturn \"Vincent\";\r\n\t}",
"public interface XmlProjectTags {\r\n\r\n\tpublic static String SVG = \"svg\";\r\n\tpublic static final String GROUP = \"g\";\r\n\tpublic static final String RECT = \"rect\";\r\n\tpublic static final String PATH = \"path\";\r\n\tpublic static final String ELLIPSE = \"ellipse\";\r\n\tpublic static final String LINE = \"line\";\r\n\tpublic static final String IMAGE = \"image\";\r\n\tpublic static final String METADATA = \"metadata\";\r\n\r\n\tpublic static final String TITULO = \"id\";\r\n\tpublic static final String VIEWBOX = \"viewBox\";\r\n\tpublic static final String XMLNS = \"xmlns\";\r\n\tpublic static final String XMLNS_XLINK = \"xmlns:xlink\";\r\n\tpublic static final String ID = \"id\";\r\n\tpublic static final String FILL = \"fill\";\r\n\tpublic static final String FILL_OPACITY = \"fill-opacity\";\r\n\tpublic static final String POINTER_EVENTS = \"pointer-events\";\r\n\tpublic static final String STROKE = \"stroke\";\r\n\tpublic static final String STROKE_DASHARRAY = \"stroke-dasharray\";\r\n\tpublic static final String STROKE_OPACITY = \"stroke-opacity\";\r\n\tpublic static final String STROKE_WIDTH = \"stroke-width\";\r\n\tpublic static final String D = \"d\";\r\n\tpublic static final String OPACITY = \"opacity\";\r\n\tpublic static final String X = \"x\";\r\n\tpublic static final String Y = \"y\";\r\n\tpublic static final String WIDTH = \"width\";\r\n\tpublic static final String HEIGHT = \"height\";\r\n\tpublic static final String CX = \"cx\";\r\n\tpublic static final String CY = \"cy\";\r\n\tpublic static final String RX = \"rx\";\r\n\tpublic static final String RY = \"ry\";\r\n\tpublic static final String X1 = \"x1\";\r\n\tpublic static final String X2 = \"x2\";\r\n\tpublic static final String Y1 = \"y1\";\r\n\tpublic static final String Y2 = \"y2\";\r\n\tpublic static final String POINTS = \"points\";\r\n\tpublic static final String POLYLINE = \"polyline\";\r\n\tpublic static final String POLYGON = \"polygon\";\r\n\tpublic static final String STR = \"str\";\r\n\tpublic static final String TEXT = \"text\";\r\n\tpublic static final String FONTFAMILY = \"font-family\";\r\n\tpublic static final String FONTSIZE = \"font-size\";\r\n\tpublic static final String XLINKHREF = \"xlink:href\";\r\n\r\n}",
"public String getPvNameSetPoint() {\n\t\treturn pvNameSetPoint;\n\t}",
"org.apache.xmlbeans.XmlString xgetPoolName();",
"String getPresetName();",
"@Override\r\n protected void addParameters() {\r\n super.addParameters();\r\n addParameter(new AlgorithmParameter(\r\n PARAMETER_CENTER_TEMPLATES,\r\n GT._T(\"Possible replacements for {0} tags\", HtmlTagType.CENTER.getOpenTag()),\r\n new AlgorithmParameterElement[] {\r\n new AlgorithmParameterElement(\r\n \"template name\",\r\n GT._T(\"Template for replacing {0} tag\", HtmlTagType.CENTER.getOpenTag())),\r\n new AlgorithmParameterElement(\r\n \"parameter name\",\r\n GT._T(\"Parameter to use in the template for the text\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"true/false\",\r\n GT._T(\"If replacement can be automatic\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"explanation\",\r\n GT._T(\"Description of the template\"),\r\n true)\r\n },\r\n true));\r\n addParameter(new AlgorithmParameter(\r\n PARAMETER_STRIKE_TEMPLATES,\r\n GT._T(\"Possible replacements for {0} tags\", HtmlTagType.STRIKE.getOpenTag()),\r\n new AlgorithmParameterElement[] {\r\n new AlgorithmParameterElement(\r\n \"template name\",\r\n GT._T(\"Template for replacing {0} tag\", HtmlTagType.STRIKE.getOpenTag())),\r\n new AlgorithmParameterElement(\r\n \"parameter name\",\r\n GT._T(\"Parameter to use in the template for the text\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"true/false\",\r\n GT._T(\"If replacement can be automatic\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"explanation\",\r\n GT._T(\"Description of the template\"),\r\n true)\r\n },\r\n true));\r\n addParameter(new AlgorithmParameter(\r\n PARAMETER_TT_TEMPLATES,\r\n GT._T(\"Possible replacements for {0} tags\", HtmlTagType.TT.getOpenTag()),\r\n new AlgorithmParameterElement[] {\r\n new AlgorithmParameterElement(\r\n \"template name\",\r\n GT._T(\"Template for replacing {0} tag\", HtmlTagType.TT.getOpenTag())),\r\n new AlgorithmParameterElement(\r\n \"parameter name\",\r\n GT._T(\"Parameter to use in the template for the text\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"true/false\",\r\n GT._T(\"If replacement can be automatic\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"explanation\",\r\n GT._T(\"Description of the template\"),\r\n true)\r\n },\r\n true));\r\n }",
"@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 }",
"private String[] extractXmlElementValues(String xmlTagName, String text, boolean includeStartEndTags) {\n ArrayList<String> foundElements = new ArrayList<String>();\n int currentPos = 0;\n\n while ( currentPos >= 0 ) {\n String startTag = \"<\" + xmlTagName + \">\";\n String endTag = \"</\" + xmlTagName + \">\";\n\n String rootStartTag = \"\";\n String rootEndTag = \"\";\n\n String resultText = \"\";\n int startValuePos = text.indexOf(startTag,currentPos);\n if ( startValuePos < 0 ) {\n startTag = \"<\" + xmlTagName + \" \";\n startValuePos = text.indexOf(startTag,currentPos);\n }\n if ( startValuePos >= 0 ) {\n int rootStartTagPos = startValuePos;\n currentPos = -1;\n //iPos += 3;\n startValuePos = text.indexOf(\">\", startValuePos);\n if ( startValuePos >= 0 ) {\n startValuePos = startValuePos + 1;\n int endValuePos = text.indexOf(endTag, startValuePos);\n if ( endValuePos >= 0 && endValuePos > startValuePos ) {\n resultText = text.substring(startValuePos, endValuePos);\n if ( includeStartEndTags ) {\n rootStartTag = text.substring(rootStartTagPos, startValuePos);\n rootEndTag = text.substring(endValuePos, endValuePos+endTag.length()+1);\n// System.out.println(\"\");\n// System.out.println(\"START TAG : ]\" + rootStartTag + \"[\");\n// System.out.println(\"END TAG : ]\" + rootEndTag + \"[\");\n foundElements.add(rootStartTag + resultText + rootEndTag);\n } else {\n foundElements.add(resultText);\n }\n currentPos = endValuePos;\n }\n }\n } else {\n // Procedure for namespace defined tags\n startTag = \":\" + xmlTagName;\n startValuePos = text.indexOf(startTag,currentPos);\n if ( startValuePos < 0 ) {\n startTag = \":\" + xmlTagName + \" \";\n startValuePos = text.indexOf(startTag,currentPos);\n }\n currentPos = -1;\n if ( startValuePos >= 0 ) {\n int rootStartTagPos = startValuePos;\n int startBracket = text.lastIndexOf(\"<\", startValuePos );\n if ( startBracket >= 0 && startBracket < startValuePos ) {\n String nsName = text.substring(startBracket+1,startValuePos);\n endTag = \"</\" + nsName + \":\" + xmlTagName + \">\";\n startValuePos = text.indexOf(\">\", startValuePos);\n if ( startValuePos >= 0 ) {\n startValuePos = startValuePos + 1;\n int endValuePos = text.indexOf(endTag, startValuePos);\n if ( endValuePos >= 0 && endValuePos > startValuePos ) {\n resultText = text.substring(startValuePos, endValuePos);\n if ( includeStartEndTags ) {\n rootStartTag = \"<\" + nsName + text.substring(rootStartTagPos, startValuePos);\n rootEndTag = text.substring(endValuePos, endValuePos+endTag.length()+1);\n// System.out.println(\"\");\n// System.out.println(\"NAMESPACE START TAG : ]\" + rootStartTag + \"[\");\n// System.out.println(\"NAMESPACE END TAG : ]\" + rootEndTag + \"[\");\n foundElements.add(rootStartTag + resultText + rootEndTag);\n } else {\n foundElements.add(resultText);\n }\n currentPos = endValuePos + endTag.length();\n }\n }\n }\n }\n }\n }\n return foundElements.toArray(new String[foundElements.size()]);\n }",
"public static void setCandidatesPresident(String name1, String name2) \r\n\t{\r\n\t\tnameCandidatePresident1 = name1;\r\n\t\tnameCandidatePresident2 = name2;\r\n\t}",
"public AutoCompletionProposalsComparator(String nameStart, Language language) {\r\n\t\tthis.nameStart = nameStart;\r\n//\t\tthis.typePredicate = typePredicate;\r\n\t\tlabelProvider = new ChameleonLabelProvider(language, true, true, false);\r\n\t}",
"public void computeParagraph(){\r\n\r\n\t\tstrBuff = new StringBuffer();\r\n\r\n\t\t//For else for ER2 rule of inserting the first letter of my last name twice before each consonant\r\n\t\tfor(int i = 0; i < paragraph.length(); i++){\r\n\r\n\t\t\tif(paragraph.charAt(i) == 'a' || paragraph.charAt(i) == 'e' || paragraph.charAt(i) == 'i'\r\n\t\t\t\t|| paragraph.charAt(i) == 'o' || paragraph.charAt(i) == 'u' || paragraph.charAt(i) == 'A'\r\n\t\t\t\t|| paragraph.charAt(i) == 'E' || paragraph.charAt(i) == 'I' || paragraph.charAt(i) == 'O'\r\n\t\t\t\t|| paragraph.charAt(i) == 'U' || paragraph.charAt(i) == ' ' || paragraph.charAt(i) == '.'\r\n\t\t\t\t|| paragraph.charAt(i) == '!' || paragraph.charAt(i) == '?'){\r\n\t\t\t\tstrBuff.append(paragraph.charAt(i));\r\n\t\t\t}\r\n\r\n\t\t\telse{\r\n\t\t\t\tstrBuff.append(\"OO\");\r\n\t\t\t\tstrBuff.append(paragraph.charAt(i));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tnewParagraph = strBuff.toString();\r\n\r\n\t\tcount = 0;\r\n\r\n\t\t//For for ER2 rule of counting the number of characters in the initial text excluding the number of vowels\r\n\t\tfor(int i = 0; i < paragraph.length(); i++){\r\n\t\t\tif(paragraph.charAt(i) != 'a' && paragraph.charAt(i) != 'e' && paragraph.charAt(i) != 'i'\r\n\t\t\t\t&& paragraph.charAt(i) != 'o' && paragraph.charAt(i) != 'u' && paragraph.charAt(i) != 'A'\r\n\t\t\t\t&& paragraph.charAt(i) != 'E' && paragraph.charAt(i) != 'I' && paragraph.charAt(i) != 'O'\r\n\t\t\t\t&& paragraph.charAt(i) != 'U'){\r\n\t\t\t\t\tcount++;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t}",
"@Override\n public List<MatchSegment> getMatch(final String text)\n {\n final List<String> split = splitNameTypeAndInitialValues(text);\n if (split.size() < 1)\n return List.of();\n\n final List<MatchSegment> segs = new ArrayList<>(split.size());\n\n String name = split.get(0).trim();\n if (name.equals(\"loc://\"))\n { // Just \"loc://\" matches, add \"name\"\n segs.add(MatchSegment.match(name));\n segs.add(MatchSegment.normal(\"name\"));\n }\n else // Show (partial) match between entered name and this proposal\n segs.addAll(super.getMatch(name));\n\n // No type provided?\n if (split.get(1) == null)\n segs.add(MatchSegment.comment(\"<VType>\"));\n else if (type.toLowerCase().indexOf(split.get(1).toLowerCase()) >= 0)\n // Recognize piece of type, accept for full type\n segs.add(MatchSegment.match(\"<\" + type + \">\"));\n else\n // No type entered, would use this proposal's type when accepted\n segs.add(MatchSegment.normal(\"<\" + type + \">\"));\n\n // Add initial values\n final int common = Math.min(split.size()-2, initial_values.length);\n int parm;\n for (parm = 0; parm < common; ++parm)\n {\n final String another = parm < initial_values.length-1 ? \",\" : \")\";\n if (parm == 0)\n segs.add(MatchSegment.match(\"(\" + split.get(parm+2) + another,\n \"(\" + initial_values[parm] + another));\n else\n segs.add(MatchSegment.match(split.get(parm+2) + another,\n initial_values[parm] + another));\n }\n\n // Add remaining init.values as COMMENT\n final StringBuilder buf = new StringBuilder();\n if (parm < initial_values.length)\n {\n if (parm == 0)\n buf.append('(');\n for (/**/; parm<initial_values.length; ++parm)\n {\n buf.append(initial_values[parm]);\n if (parm < initial_values.length-1)\n buf.append(\", \");\n }\n buf.append(')');\n }\n if (buf.length() > 0)\n segs.add(MatchSegment.comment(buf.toString()));\n\n return segs;\n }",
"private static String getPersonalityOf(String name, String data) {\n\t int[] numberOfA = { 0, 0, 0, 0 };\n\t int[] numberOfB = { 0, 0, 0 ,0 };\n\t int[] percentageOfB = { 0, 0, 0 ,0 };\n\n\t countAB(data,numberOfA,numberOfB);\n\t\tcomputePercentage(numberOfA,numberOfB,percentageOfB);\n\n\t\treturn name + \": \" + Arrays.toString(percentageOfB)\n\t\t\t\t\t+ \" = \" + getStringFrom(percentageOfB);\n\t}",
"private void parseData(String dataToParse)\n {\n try\n {\n XmlPullParserFactory factory = XmlPullParserFactory.newInstance();\n factory.setNamespaceAware(true);\n XmlPullParser xpp = factory.newPullParser();\n xpp.setInput( new StringReader( dataToParse ) );\n int eventType = xpp.getEventType();\n while (eventType != XmlPullParser.END_DOCUMENT)\n {\n\n // Found a start tag\n if(eventType == XmlPullParser.START_TAG)\n {\n //Check for which tag we have\n if (xpp.getName().equalsIgnoreCase(\"geonameId\"))\n {\n //focuses parser on the <geometry> tags\n String temp = xpp.nextText();\n Log.e(\"Geocode\", \"geocode is \" + temp);\n geoname = Integer.parseInt(temp);\n }\n }\n else if (eventType == XmlPullParser.END_TAG)\n {\n if(xpp.getName().equalsIgnoreCase(\"geonameId\")) {\n Log.e(\"Parsing geoname\", \"parse finished\");//finished\n\n }\n }\n\n\n // Get the next event\n eventType = xpp.next();\n\n } // End of while\n }\n catch (XmlPullParserException ae1)\n {\n Log.e(\"MyTag\",\"Parsing error\" + ae1.toString());\n }\n catch (IOException ae1)\n {\n Log.e(\"MyTag\",\"IO error during parsing\");\n }\n\n Log.e(\"MyTag\",\"End document\");\n\n }",
"public void setProposals(ICompletionProposal[] preComputedProposals) {\n fPreComputedProposals = preComputedProposals;\n }",
"public void setNamePro(String namePro) {\n this.namePro = namePro;\n }",
"public String loadPropositions() {\n System.out.println(\"inside loadPropositions ::\");\n logger.info(PropValApproveBean.class, \"PropValApproveBean()\", \"Start loadPropositions\", null);\n Integer pgWUId = null;\n //This should work from the BPM UI Task.\n pgWUId = (Integer) JSFUtils.resolveExpression(\"#{bindings.WorkUnitId.inputValue}\");\n \n //This is for testing on local\n if(AdfFacesContext.getCurrentInstance().getPageFlowScope().get(\"workUnitId\")!= null) { \n pgWUId = Integer.parseInt(AdfFacesContext.getCurrentInstance().getPageFlowScope().get(\"workUnitId\").toString());\n } \n DCBindingContainer bindings = (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();\n\n DCIteratorBinding iter1 = (DCIteratorBinding) bindings.findIteratorBinding(\"PropertyIdentificationIterator\");\n iter1.executeQuery();\n Row row1 = iter1.getCurrentRow();\n\n String ain = (String) row1.getAttribute(\"AIN\");\n \n System.out.println(\"ain -----\"+ain);\n ADFUtils.setPageFlowValue(\"ain\", ain);\n logger.info(PropValApproveBean.class, \"PropValApproveBean()\", \"End loadPropositions\", null);\n return \"loadProp\";\n }",
"NameTagVisibility getNameTagVisibility();",
"private String getString(Proposal proposal) {\n\t\tif (proposal == null) {\n\t\t\treturn EMPTY;\n\t\t}\n\t\t// if (labelProvider == null) {\n\t\t// return proposal.getLabel() == null ? proposal.getContent()\n\t\t// : proposal.getLabel();\n\t\t// }\n\t\t// return labelProvider.getText(proposal);\n\t\treturn proposal.getValue();\n\t}",
"public void voteFor (String name)\n {\n boolean searching = true;\n int index = 0;\n\n while(searching)\n {\n if(index < pList.size())\n {\n Personality objectHolder = pList.get(index);\n String personalityName = objectHolder.getName();\n\n if(name.equals(personalityName))\n {\n objectHolder.increaseVotes(1);\n searching = false;\n }\n }\n else\n {\n System.out.println(\"No personality found with the name : \" + name);\n searching = false;\n }\n\n index++;\n }\n }",
"private void textStatisticsElements(Elements eles, String nameElement, Map<String, Boolean> option) throws Exception{\n\t\tif(eles.size() == 0)\n\t\t\treturn;\n\t\tList<String> textOfElements = new ArrayList<>();\n\t\tfor(Element el:eles){\n\t\t\tif(el.select(\"script\").isEmpty()){\n\t\t\t\tString text = el.text().replaceAll(\"<!--.*-->|\\r|\\n\", \" \")\n\t\t\t\t\t\t.replaceAll(\"\\\\s+| \", \" \");\n\t\t\t\ttextOfElements.add(text);\n\t\t\t}\n\t\t}\n\t\tList<Double> nbCharsInElement = new ArrayList<>();\n\t\tList<Double> nbNumberInElement = new ArrayList<>();\n\t\tList<Double> nbYearInElement= new ArrayList<>();\n\t\tList<Double> nbCurrencyInElement= new ArrayList<>();\n\t\tfor(String text : textOfElements){\n\t\t\tif(text.length() > 0){\n\t\t\t\tint textLength = text.replaceAll(\"\\\\s+\", \"\").length();\n\t\t\t\tnbCharsInElement.add((double) textLength);\n\t\t\t\tdouble countNumber = (double) ClassificationGeneralFunctions.countNbOfNumbers(text);\n\t\t\t\tif(countNumber > 0){\n\t\t\t\t\tnbNumberInElement.add(countNumber / textLength);\n\t\t\t\t}\n\t\t\t\tdouble countOccurency = (double) ClassificationGeneralFunctions.countNbOfYears(text);\n\t\t\t\tif(countOccurency > 0){\n\t\t\t\t\tnbYearInElement.add(countOccurency);\n\t\t\t\t}\n\t\t\t\tif(option.containsKey(\"currency\") && option.get(\"currency\")){\n\t\t\t\t\tcountOccurency = (double) ClassificationGeneralFunctions.countNbOfCurrency(text);\n\t\t\t\t\tif(countOccurency > 0){\n\t\t\t\t\t\tnbCurrencyInElement.add(countOccurency);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\tHashtable<String, List<Double>> elementStat = new Hashtable<>();\n\t\telementStat.put(\"chars_by_\" + nameElement, nbCharsInElement);\n\t\telementStat.put(\"number_in_\" + nameElement, nbNumberInElement);\n\t\telementStat.put(\"year_in_\" + nameElement, nbYearInElement);\n\t\tif(option.containsKey(\"currency\") && option.get(\"currency\"))\n\t\t\telementStat.put(\"currency_in_\" + nameElement, nbCurrencyInElement);\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 : elementStat.keySet()){\n\t\t\tif(!name.startsWith(\"currency\")) {\n\t\t\t\tList<Double> average = ClassificationGeneralFunctions.getAverageSkewness(elementStat.get(name));\n\t\t\t\tList<Double> highestElements = ClassificationGeneralFunctions.getHighestElementStatistics(elementStat.get(name), average.get(0));\n\t\t\t\tfor (int i = 0; i < averageName.size(); i++) {\n\t\t\t\t\thtmlStatistics.put(name + averageName.get(i), average.get(i));\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < bigName.size(); i++) {\n\t\t\t\t\thtmlStatistics.put(name + bigName.get(i), highestElements.get(i));\n\t\t\t\t}\n\t\t\t\thtmlStatistics.put(name + \"__percent\", (double) (elementStat.get(name).size() / eles.size()));\n\t\t\t}else{\n\t\t\t\thtmlStatistics.put(name, (double) nbCurrencyInElement.size());\n\t\t\t\thtmlStatistics.put(name + \"__percent\", ((double) nbCurrencyInElement.size() / eles.size()));\n\t\t\t}\n\t\t}\n\t}",
"public boolean collectNames(XmlObject empDoc)\n {\n boolean hasResults = false;\n\n // Create a cursor with which to execute query expressions. The cursor\n // is inserted at the very beginning of the incoming XML, then moved to\n // the first element's START token.\n XmlCursor pathCursor = empDoc.newCursor();\n pathCursor.toFirstChild();\n\n // Execute the path expression, qualifying it with the namespace\n // declaration.\n pathCursor.selectPath(m_namespaceDeclaration\n + \"$this//xq:employee/xq:name/text()\");\n\n // If there are results, then go ahead and do stuff.\n if (pathCursor.getSelectionCount() > 0)\n {\n hasResults = true;\n\n // Create a new <names> element into which names from the XML\n // will be copied. Note that this element is in the default\n // namespace; it's not part of the schema.\n XmlObject namesElement = null;\n try\n {\n namesElement = XmlObject.Factory.parse(\"<names/>\");\n } catch (XmlException e)\n {\n e.printStackTrace();\n }\n\n // Add a cursor the new element and put it between its START and END\n // tokens, where new values can be inserted.\n XmlCursor namesCursor = namesElement.newCursor();\n namesCursor.toFirstContentToken();\n namesCursor.toEndToken();\n\n // Loop through the selections, appending the incoming <name> element's \n // value to the new <name> element's value. (Of course, this could have\n // been done with a StringBuffer, but that wouldn't show the cursor in\n // use.)\n while (pathCursor.toNextSelection())\n {\n namesCursor.insertChars(pathCursor.getTextValue());\n if (pathCursor.hasNextSelection())\n {\n namesCursor.insertChars(\", \");\n }\n }\n // Dispose of the cursors now that they're not needed.\n pathCursor.dispose();\n namesCursor.dispose();\n\n // Print the new element.\n System.out.println(\"\\nNames collected by collectNames method: \\n\\n\"\n + namesElement + \"\\n\");\n }\n return hasResults;\n }",
"@Override\r\npublic Object produceValue(Annotation np, Document doc)\r\n{\n SortedSet<Integer> quoteLocations = new TreeSet<Integer>();\r\n Pattern p = Pattern.compile(\"\\\"|''|``|\\u201C|\\u201D\");\r\n\r\n String text = doc.getText();\r\n Matcher m = p.matcher(text);\r\n\r\n boolean inQuote = false;\r\n while (m.find()) {\r\n int start = m.start();\r\n if (inQuote && (text.substring(start).startsWith(\"``\") || text.substring(start).startsWith(\"\\u201C\"))) {\r\n // We have an opening quote; Make sure the previous quote is closed\r\n quoteLocations.add((start - 1));\r\n inQuote = false;\r\n }\r\n quoteLocations.add((start));\r\n inQuote = !inQuote;\r\n }\r\n // System.out.println(\"Quote locations: \"+quoteLocations);\r\n\r\n // Figure out which noun corresponds to which quote\r\n AnnotationSet sent = doc.getAnnotationSet(Constants.SENT);\r\n Iterator<Integer> quoteIter = quoteLocations.iterator();\r\n HashMap<Integer, Annotation> reporters = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> companies = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> sentReporter = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> compReporter = new HashMap<Integer, Annotation>();\r\n int counter = 1;\r\n while (quoteIter.hasNext()) {\r\n int qStart = quoteIter.next();\r\n if (!quoteIter.hasNext()) {\r\n break;\r\n }\r\n int qEnd = quoteIter.next() + 1;\r\n\r\n AnnotationSet sentences = sent.getOverlapping(qStart, qEnd);\r\n\r\n // Three cases for the size of the sentences set\r\n Annotation match, compMatch;\r\n if (sentences.size() < 1) {\r\n System.out.println(\"Quote is not covered by any sentence:\");\r\n int beg = qStart - 15;\r\n beg = beg < 0 ? 0 : beg;\r\n int en = qStart + 15;\r\n en = en >= text.length() ? text.length() - 1 : en;\r\n System.out.println(Utils.getAnnotText(beg, en, text));\r\n System.out.println(\"Position \" + qStart);\r\n match = Annotation.getNullAnnot();\r\n compMatch = Annotation.getNullAnnot();\r\n // throw new RuntimeException(\"Quote is not covered by any sentence\");\r\n }\r\n else if (sentences.size() == 1) {\r\n Annotation s = sentences.getFirst();\r\n // System.out.println(\"Sent: \"+Utils.getAnnotText(s, text));\r\n if (s.properCovers(qStart, qEnd)) {\r\n match = findReporter(qStart, qEnd, s, doc);\r\n compMatch = findCompany(qStart, qEnd, s, doc);\r\n if (match.equals(Annotation.getNullAnnot())) {\r\n match = findReportCont(sentReporter, s, doc);\r\n compMatch = findReportCont(compReporter, s, doc);\r\n }\r\n }\r\n else {\r\n match = findReportCont(sentReporter, s, doc);\r\n compMatch = findReportCont(compReporter, s, doc);\r\n }\r\n sentReporter.put(Integer.decode(s.getAttribute(\"sentNum\")), match);\r\n compReporter.put(Integer.decode(s.getAttribute(\"sentNum\")), compMatch);\r\n }\r\n else {\r\n // The quoted string spans more than one sentence.\r\n Annotation beg = sentences.getFirst();\r\n // System.out.println(\"First sent: \"+Utils.getAnnotText(beg, text));\r\n Annotation end = sentences.getLast();\r\n // System.out.println(\"Last sent: \"+Utils.getAnnotText(end, text));\r\n match = Annotation.getNullAnnot();\r\n compMatch = Annotation.getNullAnnot();\r\n if (beg.getStartOffset() < qStart) {\r\n match = findReporter(qStart, qEnd, beg, doc);\r\n compMatch = findCompany(qStart, qEnd, beg, doc);\r\n }\r\n if (match.equals(Annotation.getNullAnnot()) && qEnd < end.getEndOffset()) {\r\n match = findReporter(qStart, qEnd, end, doc);\r\n compMatch = findCompany(qStart, qEnd, end, doc);\r\n }\r\n if (match.equals(Annotation.getNullAnnot())) {\r\n match = findReportCont(sentReporter, beg, doc);\r\n compMatch = findCompany(qStart, qEnd, end, doc);\r\n }\r\n sentReporter.put(Integer.parseInt(beg.getAttribute(\"sentNum\")), match);\r\n sentReporter.put(Integer.parseInt(end.getAttribute(\"sentNum\")), match);\r\n compReporter.put(Integer.parseInt(beg.getAttribute(\"sentNum\")), compMatch);\r\n compReporter.put(Integer.parseInt(end.getAttribute(\"sentNum\")), compMatch);\r\n\r\n }\r\n reporters.put(counter, match);\r\n companies.put(counter, compMatch);\r\n counter += 2;\r\n\r\n // System.out.println(\"Quote: \"+Utils.getAnnotText(qStart, qEnd, text));\r\n // if(!match.equals(Annotation.getNullAnnot())){\r\n // System.out.println(\"Match: \"+Utils.getAnnotText(match, text));\r\n // }else{\r\n // System.out.println(\"no match!\");\r\n // }\r\n }\r\n int initial = quoteLocations.size();\r\n\r\n AnnotationSet nps = doc.getAnnotationSet(Constants.NP);\r\n for (Annotation a : nps.getOrderedAnnots()) {\r\n int s = a.getStartOffset();\r\n quoteLocations = quoteLocations.tailSet(s);\r\n int numQuotes = initial - quoteLocations.size();\r\n\r\n // System.err.println(numQuotes);\r\n if (numQuotes % 2 == 0) {\r\n a.setProperty(this, -1);\r\n a.setProperty(Property.AUTHOR, Annotation.getNullAnnot());\r\n a.setProperty(Property.COMP_AUTHOR, Annotation.getNullAnnot());\r\n }\r\n else {\r\n a.setProperty(this, numQuotes);\r\n a.setProperty(Property.AUTHOR, reporters.get(numQuotes));\r\n a.setProperty(Property.COMP_AUTHOR, companies.get(numQuotes));\r\n // if(FeatureUtils.isPronoun(a, annotations, text)&&FeatureUtils.getPronounPerson(FeatureUtils.getText(a,\r\n // text))==1\r\n // &&FeatureUtils.NumberEnum.SINGLE.equals(FeatureUtils.getNumber(a, annotations, text))){\r\n // Annotation repo = reporters.get(new Integer(numQuotes));\r\n // if(repo==null||repo.equals(Annotation.getNullAnnot())){\r\n // Annotation thisSent = sent.getOverlapping(a).getFirst();\r\n // System.out.println(\"*** No author in \"+Utils.getAnnotText(thisSent, text+\"***\"));\r\n // }\r\n // }\r\n }\r\n }\r\n // System.out.println(\"End of inquote\");\r\n\r\n return np.getProperty(this);\r\n}",
"@Override\n\tpublic List<ICompletionProposal> computeCompletionProposals(ContentAssistInvocationContext context, IProgressMonitor monitor) {\n\t\treturn Arrays.asList(assistant.computeCompletionProposals(context.getViewer(), context.getInvocationOffset()));\n\t}",
"private List<String> getTagNames() {\n String query = \"SELECT DISTINCT ?tagName WHERE { ?thing isa:tag [isa:tagName ?tagName; isa:tagDetail ?tagDetail]}\";\n List<Map<String, String>> results = moduleContext.getModel().executeSelectQuery(query);\n List<String> tags = new ArrayList<>();\n results.forEach(solution -> tags.add(solution.get(\"tagName\")));\n return tags;\n }",
"String regionName();",
"String regionName();",
"String regionName();",
"String regionName();",
"public abstract String getXMLName();",
"public String getTitle(XsdNode node) {\n\t\tString out = \"\";\n\n\t\t/** TODO: new */\n\t\tgetMaxCount(node);\n\n\t\tif (!node.isUsed) {\n\t\t\treturn out;\n\t\t}\n\n\t\tif (selections.contains(node)) {\n\t\t\tif (firstElement)\n\t\t\t\tfirstElement = false;\n\t\t\telse\n\t\t\t\tout += separator;\n\t\t\tout += node.getName() + nextNumber(node);\n\t\t}\n\n\t\tEnumeration children = node.children();\n\t\twhile (children.hasMoreElements()) {\n\t\t\tXsdNode child = (XsdNode) children.nextElement();\n\n\t\t\tif (child.isUsed) {\n\t\t\t\tswitch (((Annotated) child.getUserObject()).getStructureType()) {\n\t\t\t\tcase Structure.ELEMENT:\n\t\t\t\t\tint cpt = 0;\n\t\t\t\t\t/* create a NodeList with all childs with tagname */\n\t\t\t\t\tint maxCount = getMaxCount(child);\n\t\t\t\t\twhile (cpt < maxCount) {\n\t\t\t\t\t\tout += getTitle(child);\n\t\t\t\t\t\tcpt++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase Structure.ATTRIBUTE:\n\t\t\t\t\tif (firstElement)\n\t\t\t\t\t\tfirstElement = false;\n\t\t\t\t\telse\n\t\t\t\t\t\tout += separator;\n\t\t\t\t\tout += child.getName() + nextNumber(child);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"[PSI makers: flattener] ERROR: the node is neither an attribute nor an element\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}",
"VariationPointName createVariationPointName();",
"private String printName() {\n \t\treturn GPSFilterTextUtils.printName( this.getResources(), this.area.getName() );\n \t}",
"private void avaliaTagObrigatoria() throws SQLException {\r\n\t\t/*\r\n\t\t * busca as tags obrigatorias do documento.\r\n\t\t */\r\n\t\t// TODO ESTE SELECT SOH TRAZ A TAG !DOCTYPE, OU SEJA, SE ELE TRAZ AS\r\n\t\t// TAGS OBRIGATORIAS,\r\n\t\t// ENTAO ELE SOH TAH CONSIDERANDO O !DOCTYPE COMO OBRIGATORIO. OU ENTAO\r\n\t\t// TEM ALGUMA\r\n\t\t// COISA ERRADA NO BANCO DE DADOS. OBS: NA BASE DE DADOS SOH TEM\r\n\t\t// CADASTRADA UMA LINHA\r\n\t\t// COM ID_ATITUDE = 4 (TABELA ESPERADO) : (9,4,9,0,0,'','',0)\r\n\t\t// TRECHO COMENTADO E HARDCODED PARA DIMINUIR AS CONSULTAS A BANCO DE\r\n\t\t// DADOS\r\n\t\t// final String sql = \"SELECT ta.nome_tag, v.pv3 \"\r\n\t\t// + \" FROM esperado e, validante v, tipoavaliacaoerro t, tag ta \"\r\n\t\t// + \" WHERE e.idesperado=v.idesperado \"\r\n\t\t// + \" AND v.pv3=t.pv3 AND idatitude = 4 \"\r\n\t\t// + \" AND v.idtag=ta.idtag AND t.idorgao = \" + orgao;\r\n\t\t//\r\n\t\t// ResultSet rs = con.getCon().createStatement().executeQuery(sql);\r\n\t\t//\r\n\t\t// String nome = null;\r\n\t\t// ArrayList<Validado> validados = null;\r\n\t\t//\r\n\t\t// /*\r\n\t\t// * Monta as tags especificas.\r\n\t\t// */\r\n\t\t// while (rs.next()) {\r\n\t\t// nome = rs.getString(1);\r\n\t\t// validados = new ArrayList<Validado>();\r\n\t\t// validados.add(new Validado(nome, rs.getInt(2)));\r\n\t\t// this.erradosMap.put(nome, validados);\r\n\t\t// }\r\n\t\t// gambiarra?????\r\n\t\t// TRECHO HARDCODED QUE SUBSTITUI A CONSULTA AO BD ACIMA\r\n\r\n\t\tArrayList<ArmazenaErroOuAvisoAntigo> validados = new ArrayList<ArmazenaErroOuAvisoAntigo>();\r\n\r\n\t\tvalidados.add(new ArmazenaErroOuAvisoAntigo(\"!DOCTYPE\", 33));\r\n\r\n\t\tthis.erradosMap.put(\"!DOCTYPE\", validados);\r\n\r\n\t\t// FIM DO TRECHO\r\n\t\tfor (String element : this.erradosMap.keySet()) {\r\n\r\n\t\t\t/*\r\n\t\t\t * Verifica se a existencia da tag dentro do documento. N�o\r\n\t\t\t * existindo a tag, adiciona a mesma a lista de erros.\r\n\t\t\t */\r\n\t\t\tif (!tag.contains(element)) {\r\n\r\n\t\t\t\tthis.errados.addAll(this.erradosMap.get(element));\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"public static void main(String[] args) {\n \r\n PedersenScheme ps = new PedersenScheme();\r\n Element tag = ps.getTag();\r\n System.out.println(tag.convertToString());\r\n System.out.println(tag.toString());\r\n \r\n example1();\r\n \r\n }",
"@AutoEscape\n\tpublic String getNomProvincia();",
"public String getNamePro() {\n return namePro;\n }",
"@DISPID(-2147417108)\n @PropGet\n java.lang.String tagName();",
"public String getCurrentTagName() throws ParseException {\n return findCurrentTag(html, position);\n }",
"@VTID(7)\r\n java.lang.String name();",
"public void testCompletion() throws Exception {\n \t\tsetUpIntentProject(\"completionTest\", INTENT_DOC_PATH);\n \t\teditor = openIntentEditor();\n \t\tdocument = editor.getDocumentProvider().getDocument(editor.getEditorInput());\n \t\tcontentAssistant = editor.getViewerConfiguration().getContentAssistant(editor.getProjectionViewer());\n \n \t\tICompletionProposal[] proposals = null;\n \n \t\t/*\n \t\t * STRUCTURE\n \t\t */\n \t\t// inside a document\n \t\tproposals = getCompletionProposals(12);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_CHAPTER, proposals[0].getDisplayString());\n \t\tproposals = getCompletionProposals(15);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(KW_CHAPTER, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_CHAPTER, proposals[1].getDisplayString());\n \n \t\t// inside a chapter\n \t\tproposals = getCompletionProposals(741);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_SECTION, proposals[0].getDisplayString());\n \t\tproposals = getCompletionProposals(745);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(KW_SECTION, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_SECTION, proposals[1].getDisplayString());\n \n \t\t// inside a section\n \t\tproposals = getCompletionProposals(773);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_SECTION, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_MU, proposals[1].getDisplayString());\n \n \t\t/*\n \t\t * MODELING UNITS\n \t\t */\n \t\t// beginning of the modeling unit\n \t\tproposals = getCompletionProposals(2138);\n \t\t// We should propose to create a new resource, a new entity, or contribute to an existing entity\n \t\tassertIsExpectedProposalsForEmptyModelingUnit(proposals);\n \n \t\t// beginning of a named modeling unit\n \t\tproposals = getCompletionProposals(3232);\n \t\tassertIsExpectedProposalsForEmptyModelingUnit(proposals);\n \n \t\t// resource declaration patterns\n \t\tproposals = getCompletionProposals(3263);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_URI, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_CONTENT, proposals[1].getDisplayString());\n \n \t\t// features proposals in instanciation\n \t\tproposals = getCompletionProposals(3557);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(\"nsURI : EString [?] - Set the value EPackage.nsURI\", proposals[0].getDisplayString());\n \t\tassertEquals(\"nsPrefix : EString [?] - Set the value EPackage.nsPrefix\",\n \t\t\t\tproposals[1].getDisplayString());\n \n \t\t// features proposals in contribution\n \t\tproposals = getCompletionProposals(3848);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(\"eClassifiers : EClassifier [0,*] - Set the value match.eClassifiers\",\n \t\t\t\tproposals[0].getDisplayString());\n \n \t\t// Boolean value\n \t\tproposals = getCompletionProposals(4016);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_BOOL_VALUE, proposals[0].getDisplayString());\n \n \t\t// Object value\n \t\tproposals = getCompletionProposals(3985);\n \t\tassertEquals(3, proposals.length);\n \t\t// We should propose to create a new Element\n \t\tassertEquals(\"new Element (of type EClassifier) - Set this new Element as value for eType\",\n \t\t\t\tproposals[0].getDisplayString());\n \t\t// Use existing elements (of matching type) defined in the document\n \t\tassertEquals(\"Reference to MatchElement - Set the MatchElement element as value for eType\",\n \t\t\t\tproposals[1].getDisplayString());\n \t\t// And available Classifiers from the package registry\n \t\tassertEquals(\"MatchElement - http://www.eclipse.org/emf/compare/match/1.1\",\n \t\t\t\tproposals[2].getDisplayString());\n \n \t\t// instanciation proposals\n \t\tproposals = getCompletionProposals(3865);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(\"EClass - http://www.eclipse.org/emf/2002/Ecore\", proposals[0].getDisplayString());\n \t\tassertEquals(\"EClassifier - http://www.eclipse.org/emf/2002/Ecore\", proposals[1].getDisplayString());\n \n \t\t// features proposals further in contribution\n \t\tproposals = getCompletionProposals(4128);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(\n \t\t\t\t\"eStructuralFeatures : EStructuralFeature [0,*] - Set the value EClass.eStructuralFeatures\",\n \t\t\t\tproposals[0].getDisplayString());\n \t}",
"private static Collection<CompletionProposal> getVariableCompletionProposals(final CompletionContext context, CPModel model) {\n Collection<CompletionProposal> proposals = new LinkedHashSet<>();\n for (CPElement var : model.getVariables(context.getCaretOffset())) {\n if (var.getType() != CPElementType.VARIABLE_USAGE && !var.getRange().containsInclusive(context.getCaretOffset())) {\n ElementHandle handle = new CPCslElementHandle(context.getFileObject(), var.getName());\n VariableCompletionItem item = new VariableCompletionItem(\n handle,\n var.getHandle(),\n context.getAnchorOffset(),\n null); //no origin for current file\n// var.getFile() == null ? null : var.getFile().getNameExt());\n\n proposals.add(item);\n }\n }\n try {\n //now gather global vars from all linked sheets\n FileObject file = context.getFileObject();\n if (file != null) {\n Map<FileObject, CPCssIndexModel> indexModels = CPUtils.getIndexModels(file, DependencyType.REFERRING_AND_REFERRED, true);\n for (Entry<FileObject, CPCssIndexModel> entry : indexModels.entrySet()) {\n FileObject reff = entry.getKey();\n CPCssIndexModel cpIndexModel = entry.getValue();\n Collection<org.netbeans.modules.css.prep.editor.model.CPElementHandle> variables = cpIndexModel.getVariables();\n for (org.netbeans.modules.css.prep.editor.model.CPElementHandle var : variables) {\n if (var.getType() == CPElementType.VARIABLE_GLOBAL_DECLARATION) {\n ElementHandle handle = new CPCslElementHandle(context.getFileObject(), var.getName());\n VariableCompletionItem item = new VariableCompletionItem(\n handle,\n var,\n context.getAnchorOffset(),\n reff.getNameExt());\n\n proposals.add(item);\n }\n\n }\n\n }\n }\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n\n return proposals;\n }",
"String getNameElement();",
"private static List<String> getShipPostalValues(String xmlStr) {\n\t\t final List<String> tagValues = new ArrayList<String>();\r\n\t\t final Matcher matcher = TAG_REGEX.matcher(xmlStr);\r\n\t\t \r\n\t\t while (matcher.find()) {\r\n\t\t tagValues.add(matcher.group(1));\r\n\t\t }\r\n\t\t\r\n\t\treturn tagValues;\r\n\t}",
"private void setName(){\r\n\t\tString tagString = new String();\r\n\t\tfor (String k : tags.keySet()){\r\n\t\t\ttagString += \"@\" + k;\r\n\t\t}\r\n\t\tString newName = originalName + tagString +\".\"+ extension;\r\n\t\tif (!newName.equals(name)){\r\n\t\t\tremovePrevNames(newName); //if the new name is a previous name\r\n\t\t\taddPrevNames(name);\r\n\t\t\tupdateLog(newName);\r\n\t\t\tname = newName;\r\n\t\t\t//notify the tag observer\r\n\t\t\tsetChanged();\r\n\t\t\tnotifyObservers();\r\n\t\t\tclearChanged();\r\n\t\t}\r\n\t}",
"private static void populateValues(String name) throws Exception {\n\t\tDocument dom = null;\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\ttry {\n\t\t\t// Using factory get an instance of document builder\n\t\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"populateValues: Boolean Summary XML location passed: \"\n\t\t\t\t\t\t\t+ name);\n\t\t\t// parse using builder to get DOM representation of the XML file\n\t\t\tdom = db.parse(name);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"populateValues: Error: \");\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t\t// get a nodelist of 'rule' elements\n\t\tNodeList nl = dom.getElementsByTagName(RULE_TAG);\n\t\tSystem.out.println(\"populateValues:Rule Node Size: \" + nl.getLength());\n\t\t\n\t\tNode parnode;\n\n\t\tif (null != nl && nl.getLength() > 0) {\n\t\t\tfor (int rulecount = 0; rulecount < nl.getLength(); rulecount++) {\n\t\t\t\t// get each of these elements\n\t\t\t\tparnode = (Node) nl.item(rulecount);\n\n\t\t\t\tSystem.out.println(\"populateValues: Rule Node Name: \" + parnode.getNodeName());\n\t\t\t\t\n\t\t\t\tString expression = null;\n\t\t\t\tString docCount = null;\n\t\t\t\tString dupCount = null;\t\t\t\t\n\n\t\t\t\t//skip the node with <rule hash=\"0\">\n\t\t\t\t NamedNodeMap attributes = parnode.getAttributes();\n\t\t\t Node hashValue = attributes.getNamedItem(ATTRIBUTE);\n\t\t\t if(hashValue.getNodeValue().equals(\"0\")){\n\t\t\t \t continue;\n\t\t\t }\n\n\n\t\t\t\t//fetch the childnodes\n\t\t\t\tNodeList childlist = parnode.getChildNodes();\n\t\t\t\tNode child = null;\n\n\t\t\t\tfor(int childcnt = 0; childcnt < childlist.getLength(); childcnt++){\n\t\t\t\t\tchild = (Node) childlist.item(childcnt);\n\t\t\t\t\tif(child.getNodeName().equalsIgnoreCase(EXPRESSION_TAG)){\n\t\t\t\t\t\texpression = child.getTextContent();\n\t\t\t\t\t}\n\t\t\t\t\tif(child.getNodeName().equalsIgnoreCase(DOCCOUNT_TAG)){\n\t\t\t\t\t\tdocCount = child.getTextContent();\n\t\t\t\t\t}\n\t\t\t\t\tif(child.getNodeName().equalsIgnoreCase(DUPCOUNT_TAG)){\n\t\t\t\t\t\tdupCount = child.getTextContent();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\t\t\t\tSystem.out.println(\"populateValues: Expression: \" + expression + \" docCount: \" + docCount + \" dupCount: \" + dupCount);\n\n\t\t\t\t//populate in Map\n\t\t\t\thitterms.put(expression, new Element(Integer.parseInt(docCount), Integer.parseInt(dupCount)));\n\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"populateValues: Added \" + hitterms.size() + \" hit entries to hashmap\");\n\n\t}",
"private List<String> getSubstitutes(String postScriptName) {\n/* 218 */ List<String> subs = this.substitutes.get(postScriptName.replaceAll(\" \", \"\"));\n/* 219 */ if (subs != null)\n/* */ {\n/* 221 */ return subs;\n/* */ }\n/* */ \n/* */ \n/* 225 */ return Collections.emptyList();\n/* */ }",
"private List<String> getNames(String tag) {\n List<String> names = new ArrayList<>();\n for (Map.Entry<String, Object> item : input.entrySet()) {\n if (item.getKey().startsWith(tag)) {\n names.add((String) item.getValue());\n }\n }\n return names;\n }",
"String getPName();",
"private int getPoints(final String name) {\n\t\treturn getValue(name, POINTS);\n\t}",
"AbstractVariationPointName createAbstractVariationPointName();",
"private List<ICompletionProposal> getSuggestions(ITextViewer viewer,\n \t\t\tint offset, String prefix) throws BadLocationException {\n \n \t\tProperties properties = loadProposalFile();\n \n \t\tMap<String, String> filteredSuggestions = new HashMap<String, String>();\n \n \t\tfor (Entry<Object, Object> property : properties.entrySet()) {\n \t\t\tif (((String) property.getValue()).startsWith(prefix)) {\n \t\t\t\tfilteredSuggestions.put((String) property.getKey(),\n \t\t\t\t\t\t(String) property.getValue());\n \t\t\t}\n \t\t}\n \n \t\tList<ICompletionProposal> suggestions = createProposals(viewer,\n \t\t\t\tfilteredSuggestions, offset, prefix);\n \n \t\treturn suggestions;\n \t}",
"public static String getXMLElementTagName() {\n return \"nationOptions\";\n }",
"public String getStandardTag();",
"public String getTagname() {\n return tagname;\n }",
"void searchByName(String name) {\n\t\tint i=0;\n\t\t\tfor (Entity entity : Processing.nodeSet) {\n\t\t\t\t\n\t\t\t\t/* if Entity is person */\n\t\t\t\tif(entity instanceof Person) {\n\t\t\t\t\tPerson person=(Person)entity;\n\t\t\t\t\tif(person.getName().equalsIgnoreCase(name)){\n\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\tSystem.out.println(\" name : \" + person.getName());\n\t\t\t\t\tSystem.out.println(\" phone : \" + person.getPhone());\n\t\t\t\t\tSystem.out.println(\" email : \" + person.getEmail());\n\t\t\t\t\tSystem.out.println(\" school : \" + person.getSchool());\n\t\t\t\t\tSystem.out.println(\" college : \" + person.getCollege() + \"\\n\");\n\t\t\t\t\t\tfor(String interest:person.getInterests()){\n\t\t\t\t\t\t\tSystem.out.println(\" interest in : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/* If entity is organization */\n\t\t\t\telse {\n\t\t\t\t\tOrganization organization=(Organization)entity;\n\t\t\t\t\tif(organization.getName().equalsIgnoreCase(name)){\n\t\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\t\tSystem.out.println(\" name : \" + organization.getName());\n\t\t\t\t\t\tSystem.out.println(\" phone : \" + organization.getPhone());\n\t\t\t\t\t\tSystem.out.println(\" email : \" + organization.getEmail());\n\t\t\t\t\t\tfor(String interest:organization.getCourses()){\n\t\t\t\t\t\t\tSystem.out.println(\" courses are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getFaculty()){\n\t\t\t\t\t\t\tSystem.out.println(\" Faculties are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getPlacements()){\n\t\t\t\t\t\t\tSystem.out.println(\" Placements are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif(i>=Processing.nodeSet.size()) {//if no such name exist\n\t\t\t\tSystem.out.println(name+\" does not exist\");\n\t\t\t}\n\t}",
"public TagSequence getBestTag();",
"int getNameSourceStart();",
"public CallSpec<Type, String> retrieveAssignedTags() {\n return null;\n }",
"private GenericPair<Integer, String> getNameAttribute(String htmlCode) {\n String name = EMPTY_STRING;\n int index;\n for (index = 0; index < htmlCode.length(); index++) {\n char charAt = htmlCode.charAt(index);\n if (charAt == BLANK_CHARACTER) {\n break;\n }\n name += charAt;\n }\n return new GenericPair(index, name);\n }",
"private int scanTagName(char[] input,\n int offset,\n int end,\n int[] lineNr)\n throws XMLParseException {\n this.tagName = this.scanIdentifier(input, offset, end);\n\n if (this.tagName == null) {\n throw this.syntaxError(\"a tag name\", lineNr[0]);\n }\n\n return offset + this.tagName.length();\n }",
"private static String getSinOrPluOfPro(AnalyzedTokenReadings token) {\n if(!token.hasPartialPosTag(\"PRO:PER:\") && !token.hasPosTagStartingWith(\"IND:\")) {\n return null;\n }\n String ret = \"\";\n int nMatches = 0;\n if(token.matchesPosTagRegex(\".*:SIN.*\")) {\n ret += \"SIN\";\n nMatches++;\n }\n if(token.matchesPosTagRegex(\".*:PLU.*\")) {\n if(!ret.isEmpty()) {\n ret += \"|\";\n }\n ret += \"PLU\";\n nMatches++;\n }\n if(nMatches > 1) {\n ret = \"(\" + ret + \")\";\n }\n return ret;\n }",
"public Text pos(Text text) {\r\n\t\tInputStream model = null;\r\n\t\ttry {\r\n\t\t\tlog.debug(\"Executing POSTagger for each word in the text \" + text.getName());\r\n\t\t\tmodel = ClassLoader.getSystemClassLoader().getResourceAsStream(\"models/pt-pos-perceptron.bin\");\r\n\t\t\tPOSModel posModel = new POSModel(model);\r\n\t\t\t \r\n\t\t\tPOSTaggerME posTagger = new POSTaggerME(posModel); // uses maximum entropy model\r\n\t\t\t\r\n\t\t\tfor (Sentence sentence : text.getSentences()) {\r\n\t\t\t\tString tags[] = posTagger.tag(sentence.getRawWords());\r\n\t\t\t\tfor (int i = 0; i < tags.length; i++) {\r\n\t\t\t\t\tsentence.getWords().get(i).setPosTag(tags[i]);\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.warn(\"Problem with POSTagger model file.\" + e.getMessage());\r\n\t\t\tlog.warn(\"If you want to use POSTagger, please fix this issue first before proceeding.\");\r\n\t\t} finally {\r\n\t\t\tif(model != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tmodel.close();\r\n\t\t\t\t} catch (Exception e2) {\r\n\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn text;\r\n\t}",
"public void setpName(String name) {\n this.pName = name;\n }",
"private void createNameTokensFieldAndMethods() {\n if (!presenterConfigModel.isUsePlace()) {\n return;\n }\n\n PsiClass unitNameTokens = presenterConfigModel.getNameTokenPsiClass();\n if (unitNameTokens == null) {\n logger.info(\"createNameTokensFieldAndMethods: skipping creating nametokens methods.\");\n return;\n }\n\n addMethodsToNameTokens(unitNameTokens);\n }",
"@DISPID(14)\n\t// = 0xe. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tjava.lang.String name();",
"private Interpretations interpretNamesOfNLQuestion(\n String nlQuestion, int maxNumOfInterpretations, SuggestionParams params)\n throws SolrGrammarSuggester.GrammarLookupFailure, SolrNameSuggester.NameLookupFailed {\n\n Map<String, WordType> wordTypes = new HashMap<>();\n List<Interpretation> namesInterpretations = new ArrayList<>();\n\n String[] words = nlQuestion.split(\"\\\\s+\");\n\n boolean anyKnownName = false;\n\n // Find all names with their corresponding types in the question.\n // Add type and names to the hashmap names.\n for (String word : words) {\n\n //grammar word\n boolean isGrammarWord = grammarSuggester.checkIfGrammarWord(word);\n if (isGrammarWord) {\n wordTypes.put(word, WordType.Grammar);\n continue;\n }\n\n //check if the word can be interpreted as name\n List<NameResult> nameResults = nameSuggester.suggestNameResolution(word);\n\n //unknown word\n if (nameResults.isEmpty()) {\n wordTypes.put(word, WordType.Unknown);\n continue;\n }\n else { //name\n wordTypes.put(word, WordType.Name);\n anyKnownName = true;\n\n namesInterpretations = updateInterpretations(namesInterpretations,\n nameResults, word, maxNumOfInterpretations);\n }\n }\n\n avoidNameDuplicates(namesInterpretations, params);\n\n //there was no known names -> return one \"empty\" template\n if (!anyKnownName) {\n namesInterpretations.add(new Interpretation(new ArrayList<NameResult>()));\n }\n\n return new Interpretations(namesInterpretations, wordTypes);\n }",
"CompletionItem populateNamespaceDeclarationCompletionItem(SymbolInfo symbolInfo) {\n CompletionItem completionItem = new CompletionItem();\n completionItem.setLabel(symbolInfo.getSymbolName());\n String[] delimiterSeparatedTokens = (symbolInfo.getSymbolName()).split(\"\\\\.\");\n completionItem.setInsertText(delimiterSeparatedTokens[delimiterSeparatedTokens.length - 1]);\n completionItem.setDetail(ItemResolverConstants.XMLNS);\n\n return completionItem;\n }",
"@VTID(17)\n java.lang.String getName();",
"public static Annotation ruleResolvePronoun(Annotation[] basenps, int num, Document doc)\r\n{\n Annotation np2 = basenps[num];\r\n // Get some properties of the np\r\n FeatureUtils.PRTypeEnum type2 = Pronoun.getValue(np2, doc);\r\n String str2 = doc.getAnnotString(np2);\r\n boolean reflexive = FeatureUtils.isReflexive(str2);\r\n // Get the possible antecedents\r\n ArrayList<Annotation> antes = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums = new ArrayList<Integer>();\r\n if (DEBUG) {\r\n System.err.println(\"Pronoun: \" + doc.getAnnotText(np2));\r\n }\r\n if (FeatureUtils.getPronounPerson(str2) == PersonPronounTypeEnum.FIRST) {\r\n if (NumberEnum.SINGLE.equals(Number.getValue(np2, doc)))\r\n return ruleResolvePronounI(np2, basenps, num, doc);\r\n else\r\n return ruleResolvePronounWe(np2, basenps, num, doc);\r\n }\r\n if (FeatureUtils.getPronounPerson(str2) == PersonPronounTypeEnum.SECOND)\r\n return ruleResolvePronounYou(np2, basenps, num, doc);\r\n else {\r\n int sentnum = 0;\r\n for (int i = num - 1; i >= 0 && sentnum <= 3; i--) {\r\n Annotation np1 = basenps[i];\r\n sentnum = sentNum(np1, np2, doc);\r\n if (DEBUG) {\r\n System.err.println(\"Possible antecedent: \" + i + \" :\" + doc.getAnnotText(np1));\r\n }\r\n if (!isNumberIncompatible(np1, np2, doc) && !isGenderIncompatible(np1, np2, doc)\r\n && !isAnimacyIncompatible(np1, np2, doc) && isWNClassComp(np1, np2, doc) && isProComp(np1, np2, doc)\r\n && !Embedded.getValue(np1, doc) && isSyntax(np1, np2, doc)) {\r\n if (DEBUG) {\r\n System.err.println(\"Candidate antecedent: \" + i + \" :\" + doc.getAnnotText(np1));\r\n }\r\n antes.add(0, np1);\r\n nums.add(0, i);\r\n }\r\n }\r\n }\r\n if (antes.size() == 0) return null;\r\n // Check for reflexsives\r\n if (FeatureUtils.isReflexive(doc.getAnnotText(np2))) {\r\n union(nums.get(nums.size() - 1).intValue(), num);\r\n return antes.get(antes.size() - 1);\r\n }\r\n if (antes.size() == 1) {\r\n // Rule 1: Unique in discourse\r\n if (DEBUG) {\r\n System.err.println(\"Rule 1 match!!!\");\r\n }\r\n union(nums.get(0).intValue(), num);\r\n return antes.get(0);\r\n }\r\n // Rule 2: Reflexive -- the last possible antecedent\r\n if (reflexive) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 2 match!!!\");\r\n }\r\n union(nums.get(nums.size() - 1).intValue(), num);\r\n return antes.get(antes.size() - 1);\r\n }\r\n // Rule 3: Unique current + Prior\r\n ArrayList<Annotation> antes1 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums1 = new ArrayList<Integer>();\r\n int counter = 0;\r\n for (Annotation np1 : antes) {\r\n if (sentNum(np1, np2, doc) < 2) {\r\n antes1.add(np1);\r\n nums1.add(nums.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (antes1.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 3 match!!!\");\r\n }\r\n union(nums1.get(0).intValue(), num);\r\n return antes1.get(0);\r\n }\r\n // Rule 4: Possesive Pro\r\n\r\n if (FeatureUtils.isPossesive(str2) && antes1.size() > 0) {\r\n Integer found = null;\r\n Annotation ant = null;\r\n boolean multiple = false;\r\n for (int i = 0; i < antes1.size() && !multiple; i++) {\r\n Annotation np1 = antes1.get(i);\r\n if (doc.getAnnotText(np1).equalsIgnoreCase(str2) && sentNum(np1, np2, doc) == 1) {\r\n if (found == null) {\r\n found = nums1.get(i);\r\n ant = antes1.get(i);\r\n }\r\n else {\r\n multiple = true;\r\n }\r\n }\r\n }\r\n if (!multiple && found != null) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 4 match!!!\");\r\n }\r\n union(found.intValue(), num);\r\n return ant;\r\n }\r\n }\r\n // Rule #5: Unique in the current sentence\r\n ArrayList<Annotation> antes2 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums2 = new ArrayList<Integer>();\r\n counter = 0;\r\n for (Annotation np1 : antes1) {\r\n if (sentNum(np1, np2, doc) < 1) {\r\n antes2.add(np1);\r\n nums2.add(nums1.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (antes2.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 5 match!!!\");\r\n }\r\n union(nums2.get(0).intValue(), num);\r\n return antes2.get(0);\r\n }\r\n // Extra Rule: Unique in the current clause (or parent clauses\r\n AnnotationSet parse = doc.getAnnotationSet(Constants.PARSE);\r\n Annotation clause = SyntaxUtils.getClause(np2, parse);\r\n while (clause != null) {\r\n ArrayList<Annotation> antes3 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums3 = new ArrayList<Integer>();\r\n counter = 0;\r\n for (Annotation np1 : antes2) {\r\n if (clause.covers(np1)) {\r\n antes3.add(np1);\r\n nums3.add(nums2.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (DEBUG) {\r\n System.err.println(antes3.size() + \" antecedents in the clause\");\r\n }\r\n if (antes3.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Clause rule match!!!\");\r\n }\r\n union(nums3.get(0).intValue(), num);\r\n return antes3.get(0);\r\n }\r\n clause = SyntaxUtils.getParentClause(clause, parse);\r\n }\r\n\r\n // Rule #6: Unique Subject\r\n\r\n // //Look for the subject in the current sentence\r\n // boolean unique = true;\r\n // Annotation subject = null;\r\n // Integer subjectNum = null;\r\n // for(int i=antes.size()-1; i>=0; i--){\r\n // Annotation np1 = antes.get(i);\r\n // if(sentNum(np1, np2, annotations, text)==0){\r\n // if(FeatureUtils.getGramRole(np1, annotations, text).equals(\"SUBJECT\")){\r\n // //&&SyntaxUtils.isMainClause(np1, parse)){\r\n // if(DEBUG)\r\n // System.err.println(\"Rule 6 match!!!\");\r\n // if(subjectNum!=null)\r\n // unique=false;\r\n // subjectNum = nums.get(i);\r\n // subject = antes.get(i);\r\n // }\r\n // }\r\n // }\r\n\r\n // if(subject!=null&&unique){\r\n // union(subjectNum.intValue(), num);\r\n // return subject;\r\n // }\r\n\r\n // Look for the subject in the previous sentence\r\n boolean unique = true;\r\n Annotation subject = null;\r\n Integer subjectNum = null;\r\n if (GramRole.getValue(np2, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np2, parse)){\r\n for (int i = antes.size() - 1; i >= 0; i--) {\r\n Annotation np1 = antes.get(i);\r\n if (sentNum(np1, np2, doc) == 1) {\r\n if (GramRole.getValue(np1, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np1, parse)){\r\n if (DEBUG) {\r\n System.err.println(\"Rule 6 match!!!\");\r\n }\r\n if (subjectNum != null) {\r\n unique = false;\r\n }\r\n subjectNum = nums.get(i);\r\n subject = antes.get(i);\r\n }\r\n }\r\n }\r\n }\r\n if (subject != null && unique) {\r\n union(subjectNum.intValue(), num);\r\n return subject;\r\n }\r\n subjectNum = null;\r\n subject = null;\r\n\r\n // One more Rule -- assign possessive pronouns to the last subject\r\n if (type2.equals(FeatureUtils.PRTypeEnum.POSSESSIVE)) {\r\n for (int i = antes.size() - 1; i >= 0; i--) {\r\n Annotation np1 = antes.get(i);\r\n if (sentNum(np1, np2, doc) == 0) {\r\n if (GramRole.getValue(np1, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np1, parse)){\r\n if (DEBUG) {\r\n System.err.println(\"Rule 6a match!!!\");\r\n }\r\n if (subject == null) {\r\n subjectNum = nums.get(i);\r\n subject = antes.get(i);\r\n }\r\n }\r\n }\r\n }\r\n if (subject != null) {\r\n union(subjectNum.intValue(), num);\r\n return subject;\r\n }\r\n }\r\n\r\n return null;\r\n}",
"String[] getAvailableTags();",
"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 void generatePopulation(String filePathAndName) {\n\t\t\n\t\tList<String> dataAll = SU.readFile(filePathAndName);\n\t\tList<String> dataAgents = new ArrayList<String>();\n\t\tList<String> dataStock = new ArrayList<String>();\n\t\tList<String> dataRelations = new ArrayList<String>();\n\t\t\n\t\tint typeOfData = -1;\n\t\tfor (String datum : dataAll) {\n\t\t\tif (!datum.startsWith(\"%\")) {\n\t\t\t\tswitch(typeOfData) {\n\t\t\t\tcase 0:\tdataAgents.add(datum); break;\n\t\t\t\tcase 1: dataStock.add(datum); break;\n\t\t\t\tcase 2: dataRelations.add(datum); break;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttypeOfData = Integer.parseInt(datum.substring(1,2));\n\t\t\t}\n\t\t}\n\t\t\n\t\tgenerateAgents(dataAgents);\n\t\tgenerateStock(dataStock);\n\t\tgenerateRelations(dataRelations);\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}",
"private void calcNames() {\n final AddressBook addressBook = platform.getAddressBook();\n numColumns = addressBook.getSize();\n if (numColumns != numMembers) {\n numMembers = numColumns;\n names = new String[numColumns];\n for (int i = 0; i < numColumns; i++) {\n final NodeId nodeId = addressBook.getNodeId(i);\n names[i] = addressBook.getAddress(nodeId).getNickname();\n }\n }\n }",
"String[] getTags() {\n if (sections == null) {\n return null;\n }\n\n Vector<String> tagV = new Vector<>(sections.length * 2);\n\n for (Section section : sections) {\n String[] names = section.getOutputNames();\n\n Collections.addAll(tagV, names);\n } // outer for\n\n return tagV.toArray(new String[tagV.size()]);\n }",
"@Override\n public void collectMarkerSpecification(VariableSpecifications boundNames)\n {\n }",
"public String toString( int probPrecision )\n {\n String s = \"\";\n for( int i = 0; i < tags.length; i++ )\n {\n s += tokens[i] + \"/\" + tags[i];\n if( probs != null )\n s += \"/\" + new java.math.BigDecimal( probs[i] ).setScale( probPrecision, java.math.RoundingMode.UP );\n \n if(i < tags.length-1)\n s += \" \";\n }\n return s;\n }",
"VocNoun getRange();",
"public void startElement(String string, String localName, String string1, Attributes attributes) throws SAXException {\n if(localName.equals(\"protein\")){\r\n isReversed = attributes.getValue(\"label\").contains(\"reversed sequence\");\r\n }\r\n //handle opening group tags\r\n else if(localName.equals(\"group\") && attributes.getValue(\"id\") != null){\r\n currentGroup = Integer.parseInt(attributes.getValue(\"id\"));\r\n }\r\n //handle opening domain tags\r\n else if(localName.equals(\"domain\") && attributes.getValue(\"seq\") != null){\r\n modcount = 0;\r\n // get the starting sequence\r\n start = Integer.parseInt(attributes.getValue(\"start\"));\r\n // use the hyperscore as the score\r\n score = Double.parseDouble(attributes.getValue(\"hyperscore\"));\r\n// score = Double.parseDouble(attributes.getValue(\"b_score\"))+Double.parseDouble(attributes.getValue(\"y_score\"));\r\n // set the base sequence\r\n currentPep = attributes.getValue(\"seq\");\r\n // note the modification\r\n modifications = new String[currentPep.length()];\r\n start = Integer.parseInt(attributes.getValue(\"start\"));\r\n }\r\n //handle opening aa tags for mods\r\n else if(localName.equals(\"aa\") && attributes.getValue(\"type\")!= null && attributes.getValue(\"modified\")!= null){\r\n int at = Integer.parseInt(attributes.getValue(\"at\"));\r\n char type = attributes.getValue(\"type\").charAt(0);\r\n if(currentPep.charAt(at-start) != type && currentPep.toLowerCase().charAt(at-start) != type){\r\n throw new RuntimeException(\"modifying \" + currentPep.charAt(at-start) + \" but it should be \" + type);\r\n } else {\r\n // modify the current peptide\r\n if (modifications[at-start] == null) {\r\n modifications[at-start] = attributes.getValue(\"modified\");\r\n }\r\n // handle doubly modified amino-acids\r\n else {\r\n // sort the mods\r\n String[] sortedMods = new String[]{\r\n modifications[at-start],\r\n attributes.getValue(\"modified\")\r\n };\r\n Arrays.sort(sortedMods);\r\n \r\n // add the modification values\r\n double modificationMass = Double.parseDouble(sortedMods[0]);\r\n modificationMass += Double.parseDouble(sortedMods[1]);\r\n // set the modification mass\r\n modifications[at-start] = Double.toString(modificationMass);\r\n \r\n// // check n-term deamidation and iTRAQ\r\n// if (sortedMods[0].equals(\"0.98402\") && sortedMods[1].equals(\"144.155\")) {\r\n// modifications[at-start] = \"145.13902\";\r\n// }\r\n// // check n-term oxidation and iTRAQ\r\n// else if (sortedMods[0].equals(\"144.155\") && sortedMods[1].equals(\"15.9949\")) {\r\n// modifications[at-start] = \"160.1499\";\r\n// }\r\n// // check n-term K iTRAQ and iTRAQ\r\n// else if (sortedMods[0].equals(\"144.155\") && sortedMods[1].equals(\"144.155\")) {\r\n// modifications[at-start] = \"288.31\";\r\n// }\r\n// // check n-term Y iTRAQ and iTRAQ\r\n// else if (sortedMods[0].equals(\"144.102\") && sortedMods[1].equals(\"144.155\")) {\r\n// modifications[at-start] = \"288.257\";\r\n// }\r\n// // check n-term C MMTS and iTRAQ\r\n// else if (sortedMods[0].equals(\"144.155\") && sortedMods[1].equals(\"45.9878\")) {\r\n// modifications[at-start] = \"190.1428\";\r\n// }\r\n// // check n-term pyro-glu E and iTRAQ -- is this possible!?\r\n// else if (sortedMods[0].equals(\"-18.0106\") && sortedMods[1].equals(\"144.155\")) {\r\n// modifications[at-start] = \"126.1444\";\r\n// }\r\n// // check n-term pyro-glu/deamidated Q and iTRAQ -- is this possible!?\r\n// else if (sortedMods[0].equals(\"-17.0265\") && sortedMods[1].equals(\"145.13902\")) {\r\n// modifications[at-start] = \"128.11252\";\r\n// }\r\n// // check n-term pyro-glu Q and iTRAQ -- is this possible!?\r\n// else if (sortedMods[0].equals(\"-17.0265\") && sortedMods[1].equals(\"144.155\")) {\r\n// modifications[at-start] = \"127.1285\";\r\n// }\r\n// // check n-term pyro-glu Q and deamidation -- is this possible!?\r\n// else if (sortedMods[0].equals(\"-17.0265\") && sortedMods[1].equals(\"0.98402\")) {\r\n// modifications[at-start] = \"-16.04248\";\r\n// }\r\n// // check n-term pyro-glu Q and propionamide -- is this possible!?\r\n// else if (sortedMods[0].equals(\"-17.0265\") && sortedMods[1].equals(\"57.022\")) {\r\n// modifications[at-start] = \"39.9955\";\r\n// }\r\n// else {\r\n// // debug leftover\r\n// System.out.println(\"Couldn't handle: \"+currentPep+\", mod1: \"+sortedMods[0]+\", mod2: \"+sortedMods[1]);\r\n// }\r\n }\r\n }\r\n }\r\n }",
"public ArrayList getAttributeList() {\n nounList = new ArrayList();\n attributeLists = new ArrayList();\n ArrayList adjAtt = new ArrayList();\n int separator = 0;\n List<Tree> leaves;\n String phraseNotation = \"NP([<NNS|NN|NNP]![<JJ|VBG])!$VP\";// !<VBG\";//@\" + phrase + \"! << @\" + phrase;\n\n TregexPattern VBpattern = TregexPattern.compile(phraseNotation);\n TregexMatcher matcher = VBpattern.matcher(sTree);\n\n while (matcher.findNextMatchingNode()) {\n Tree match = matcher.getMatch();\n Tree[] innerChild = match.children();\n int adjectiveExist = 0;\n String adj = \"\";\n String attribute = \"\";\n String b = \"\";\n\n if (innerChild.length > 1) {\n int count = 1;\n\n for (Tree inChild : innerChild) {\n if (inChild.value().equals(\"CC\") || inChild.value().equals(\",\")) {\n separator = 1;\n }\n if ((inChild.value().equals(\"JJ\")) || (inChild.value().equals(\"VBG\"))) {\n adjectiveExist++;\n leaves = inChild.getLeaves();\n adj = leaves.get(0).toString();\n if (designEleList.contains(adj)) {\n adj = \"\";\n }\n }\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\")) || (inChild.value().equals(\"NNP\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n if (count == 1) {\n if (adjectiveExist == 1) {\n attribute = adj + \" \" + leaves.get(0).yieldWords().get(0).word();\n } else {\n attribute = leaves.get(0).yieldWords().get(0).word();\n }\n if (!designEleList.contains(attribute)) {\n String identifiedWord = attribute;\n if (!identifiedWord.contains(\"_\")) {\n attributeLists.add(morphology.stem(identifiedWord));\n } else {\n attributeLists.add(identifiedWord);\n }\n }\n\n } else if (count >= 2 && separator == 0) {\n if (!attribute.contains(\"_\")) {\n\n attributeLists.remove(morphology.stem(attribute));\n attributeLists.remove(attribute);\n } else {\n attributeLists.remove(attribute);\n }\n\n attribute += \" \" + (leaves.get(0).yieldWords()).get(0).word();\n attributeLists.add(attribute);\n } else if (count >= 2 && separator == 1) {\n attribute = (leaves.get(0).yieldWords()).get(0).word();\n if (!attribute.contains(\"_\")) {\n attributeLists.add(morphology.stem(attribute));\n } else {\n attributeLists.add(attribute);\n }\n separator = 0;\n }\n count++;\n }\n }\n } else {\n for (Tree inChild : innerChild) {\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n if (!identifiedWord.contains(\"_\")) {\n attributeLists.add(morphology.stem(identifiedWord));\n } else {\n attributeLists.add(identifiedWord);\n }\n }\n }\n }\n }\n adjAtt = getAdjectiveAttribute();\n if (!adjAtt.isEmpty()) {\n String att = \"\";\n for (int i = 0; i < adjAtt.size(); i++) {\n att = adjAtt.get(i).toString();\n if (!att.isEmpty() || !att.equals(\"\") || !(att.equals(\" \"))) {\n attributeLists.add(att.trim());\n }\n }\n }\n\n System.out.println(\"ATTRIBUTE LIST :\" + attributeLists);\n return attributeLists;\n\n }",
"@Override\n protected String getExcelNameBase()\n {\n return \"AnaTag\";\n }"
] | [
"0.72662926",
"0.6716229",
"0.5599355",
"0.5191257",
"0.505682",
"0.48878247",
"0.4795587",
"0.47879764",
"0.46927243",
"0.4605574",
"0.45782495",
"0.45746467",
"0.45484155",
"0.45243597",
"0.45154002",
"0.45072985",
"0.44675693",
"0.44287843",
"0.4428539",
"0.43638596",
"0.4277752",
"0.4271712",
"0.42553422",
"0.4252486",
"0.423106",
"0.42187536",
"0.42130888",
"0.42088512",
"0.42047435",
"0.42004853",
"0.41987452",
"0.4195463",
"0.41430914",
"0.41373095",
"0.41126025",
"0.41116866",
"0.41037604",
"0.41020897",
"0.40897343",
"0.40863672",
"0.40857518",
"0.40777022",
"0.40705574",
"0.4070499",
"0.40688318",
"0.40688318",
"0.40688318",
"0.40688318",
"0.4054742",
"0.40435532",
"0.4031217",
"0.40284464",
"0.40263322",
"0.40231428",
"0.40214562",
"0.40110773",
"0.40109473",
"0.40096605",
"0.40044194",
"0.40000513",
"0.39996174",
"0.3995345",
"0.39940238",
"0.3986614",
"0.3985139",
"0.3984755",
"0.39833882",
"0.39787918",
"0.39766505",
"0.3974277",
"0.3968048",
"0.39658695",
"0.39637727",
"0.3960582",
"0.3959518",
"0.39539728",
"0.3947849",
"0.39406943",
"0.3938693",
"0.39356896",
"0.39337984",
"0.39318144",
"0.3924971",
"0.39224532",
"0.3922268",
"0.3920134",
"0.39178002",
"0.39147735",
"0.39086226",
"0.39020342",
"0.39003915",
"0.3898805",
"0.3898082",
"0.38927242",
"0.3891103",
"0.38896596",
"0.3885366",
"0.38721362",
"0.38704357",
"0.3867617"
] | 0.8019916 | 0 |
Method to initialise the environment for testing. | @BeforeClass public static void initialiseScenario(){
SelectionScenario.initialiseScenario();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setupEnvironment() {\n // Create mocks for configurations\n bgpConfig = createMock(BgpConfig.class);\n participantsConfig = createMock(SdxParticipantsConfig.class);\n\n // Create mocks for services\n coreService = new TestCoreService();\n configService = new TestNetworkConfigService();\n registry = new NetworkConfigRegistryAdapter();\n interfaceService = createMock(InterfaceService.class);\n interfaceService.addListener(anyObject(InterfaceListener.class));\n expectLastCall().anyTimes();\n intentSynchronizer = createMock(IntentSynchronizationService.class);\n }",
"@Before\n public void setupEnvironment() {\n TestEnvironment testEnvironment;\n switch (mode) {\n case CLUSTER:\n // This only works because of the quirks we built in the TestEnvironment.\n // We should refactor this in the future!!!\n testEnvironment = MINI_CLUSTER_RESOURCE.getTestEnvironment();\n testEnvironment.getConfig().disableObjectReuse();\n testEnvironment.setAsContext();\n break;\n case CLUSTER_OBJECT_REUSE:\n // This only works because of the quirks we built in the TestEnvironment.\n // We should refactor this in the future!!!\n testEnvironment = MINI_CLUSTER_RESOURCE.getTestEnvironment();\n testEnvironment.getConfig().enableObjectReuse();\n testEnvironment.setAsContext();\n break;\n case COLLECTION:\n new CollectionTestEnvironment().setAsContext();\n break;\n }\n }",
"@BeforeTest\r\n\tpublic void setupenvi() throws IOException {\r\n\t\tsetup();\r\n\t\tinit();\r\n\t}",
"@PostConstruct\n\tpublic void init() {\n\t\tEnvironmentUtils.setEnvironment(env);\n\t}",
"@BeforeClass\n protected void initialize() {\n try {\n Class<?> testbedClass = Class.forName(\n MainframeEnvironmentVerification.class.getPackage().getName()\n + \".\" + envProperties.getTestbedPropertyById(\"id\"));\n\n if (!MainframeTestbed.class.isAssignableFrom(testbedClass)) {\n fail(\"This test can only be called on a testbed that implements the \"\n + MainframeTestbed.class.getName() + \" interface\");\n }\n MainframeTestbed testbed = (MainframeTestbed)testbedClass.newInstance();\n\n sysviewConfigs = testbed.getSysviewInstances();\n sysvDb2Configs = testbed.getSysvdb2Instances();\n cicsConfigs = testbed.getCicsRegions();\n mqConfigs = testbed.getMqSubsystems();\n imsConfigs = testbed.getImsRegions();\n datacomConfigs = testbed.getDatacomInstances();\n } catch (Exception e) {\n fail(\"Unable to query testbed for environment configuration values\", e);\n }\n\n if (!sysviewConfigs.isEmpty()) {\n // If the testbed has multiple Sysview instances we use the first for generic queries.\n try {\n sysview = new Sysview(sysviewConfigs.iterator().next().getLoadlib());\n } catch (IOException e) {\n fail(\"Unable to initialize Sysview instance used for generic queries\");\n }\n } else {\n logger.warn(\"Some checks will be skipped as the testbed contains no sysview instance\");\n }\n }",
"private static void loadTestEnv() {\n\n\t\tPropertyReader reader = new PropertyReader(GlobalContext.getAppDir(), Constants.FILENAME_TESTENV);\n\n\t\tTestEnv env = new TestEnv();\n\t\tenv.setDefaultHostName(reader.getProperty(Constants.DEFAULT_HOST_NAME));\n\t\tenv.setDefaultHostOS(reader.getProperty(Constants.DEFAULT_HOST_OS));\n\t\tenv.setDefaultCredentials(reader.getProperty(Constants.DEFAULT_CREDENTIALS));\n\t\tenv.setDefaultBrowser(reader.getProperty(Constants.DEFAULT_BROWSER));\n\t\tenv.setAppServer(reader.getProperty(Constants.APP_SERVER));\n\t\tenv.setDatabaseServer(reader.getProperty(Constants.DATABASE_SERVER));\n\t\tenv.setEmailReceipients(reader.getProperty(Constants.EMAIL_RECEIPIENTS));\n\t\tenv.setEmailSender(reader.getProperty(Constants.EMAIL_SENDER));\n\n\t\t// sets to global context.\n\t\tGlobalContext.setTestEnv(env);\n\t}",
"protected void setUp()\r\n {\r\n /* Add any necessary initialization code here (e.g., open a socket). */\r\n }",
"@BeforeClass(alwaysRun = true)\n\t@Parameters(\"Environment\")\n\tpublic void startEnvironment(String sEnv) {\n\t\ttry {\n\t\t\tcs = null;\n\t\t\tal = new AppLib(cs);\n\t\t\tal.setEnvironmentInfo(sEnv);\n\t\t\tproxy = al.getHttpProxy();\n\t\t\tapi = new API();\n\t\t\tapi.setProxy(proxy);\n\t\t\tmydb = al.getMongoDbConnection();\n\t\t\tma = new MemberAPIs();\n\t\t\tmember = new TC01_FindMemberFromDB();\n\t\t\t} catch (Exception e) {\n\t\t\t\tfail(e.toString());\n\t\t\t\t}\n\t}",
"protected void setUp()\n {\n /* Add any necessary initialization code here (e.g., open a socket). */\n }",
"@Before\n\tpublic void setup() {\n\t\tinit(rule.getProcessEngine());\n\t}",
"@BeforeClass(alwaysRun = true)\n public void setEnvironment() throws Exception {\n \n esbRequestHeadersMap = new HashMap<String, String>();\n \n apiRequestHeadersMap = new HashMap<String, String>();\n \n init(\"agilezen-connector-1.0.2-SNAPSHOT\");\n \n esbRequestHeadersMap.put(\"Accept\", \"application/json\");\n esbRequestHeadersMap.put(\"Content-Type\", \"application/json\");\n \n apiRequestHeadersMap.putAll(esbRequestHeadersMap);\n \n apiRequestHeadersMap.put(\"X-Zen-ApiKey\", connectorProperties.getProperty(\"apiKey\"));\n apiRequestUrl = connectorProperties.getProperty(\"apiUrl\") + \"/api/v1\";\n \n }",
"Environment createEnvironment();",
"Environment createEnvironment();",
"protected void setUp() throws Exception {\n TestEnvironnement.forceFakeDriver();\n testEnv = TestEnvironnement.newEnvironment();\n Dependency.setConnectionManager(testEnv.getConnectionManager());\n }",
"@BeforeClass(alwaysRun = true)\n public void setEnvironment() throws Exception {\n \n init(\"podio-connector-1.0.2-SNAPSHOT\");\n\n esbRequestHeadersMap = new HashMap<String, String>();\n apiRequestHeadersMap = new HashMap<String, String>();\n \n apiUrl = connectorProperties.getProperty(\"apiUrl\");\n timeOut = Long.parseLong(connectorProperties.getProperty(\"timeOut\"));\n \n esbRequestHeadersMap.put(\"Accept-Charset\", \"UTF-8\");\n \n apiRequestHeadersMap.putAll(esbRequestHeadersMap);\n apiRequestHeadersMap.put(\"Authorization\", \"Bearer \" + connectorProperties.getProperty(\"accessToken\"));\n apiRequestHeadersMap.put(\"Content-Type\", \"application/json\");\n }",
"@BeforeEach\n\tpublic void setup() {\n\t\tif (!initialized) {\n\t\t\tbaseURI = String.format(uri, port);\n\t\t\tinitialized = true;\n\t\t}\n\t}",
"@Before\n public void init() {\n }",
"@Before\n\tpublic void init() {\n\t}",
"@BeforeTest\n public void setupEnv() {\n CLUSTER.start();\n endpoints = CLUSTER.getClientEndpoints();\n Client client = Client.builder()\n .endpoints(endpoints)\n .build();\n\n this.authDisabledKVClient = client.getKVClient();\n this.authDisabledAuthClient = client.getAuthClient();\n }",
"@BeforeClass\n\tpublic static void init() {\n\t\ttestProduct = new Product();\n\t\ttestProduct.setPrice(1000);\n\t\ttestProduct.setName(\"Moto 360\");\n\t\ttestProduct.setDescrip(\"Moto 360 smart watch for smart generation.\");\n\n\t\ttestReview = new Review();\n\t\ttestReview.setHeadline(\"Excellent battery life\");\n\t\ttestReview.setContent(\"Moto 360 has an excellent battery life of 10 days per full charge.\");\n\t}",
"@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\t// Get the current FileSystem\r\n\t\tfs = MockFileSystem.getMockFileSys(\"MOCKENV\");\r\n\t\t// Initializes a Cd Object\r\n\t\tcd = new Cd();\r\n\t}",
"@BeforeClass\r\n\tpublic void setUp() {\n\t\tdriver = BrowserFactory.startApplication(DataProviderFactory.getConfig().getStagingURL(), DataProviderFactory.getConfig().getBrowser());\r\n\t}",
"@BeforeClass\n public static void _startup()\n {\n // this test requires local storage to be enabled\n System.setProperty(\"coherence.distributed.localstorage\", \"true\");\n\n AbstractFunctionalTest._startup();\n }",
"@BeforeClass\n public static void _startup()\n {\n // this test requires local storage to be enabled\n System.setProperty(\"coherence.distributed.localstorage\", \"true\");\n\n AbstractFunctionalTest._startup();\n }",
"@BeforeClass\n public static void setup() {\n // initialize the singleton of parking state\n ParkingState.getInstance();\n }",
"@Before\n @Override\n public void init() {\n }",
"@Test\n\tpublic void testInit() {\n\t\t/*\n\t\t * This test is just use to initialize everything and ensure a better\n\t\t * performance measure for all the other tests.\n\t\t */\n\t}",
"@Before\n public void init() {\n this.testMethodName = this.getTestMethodName();\n this.initialize();\n }",
"@BeforeClass\n\tpublic static void init() {\n\t\ttry {\n\t\t\tif (emf == null) {\n\t\t\t\temf = Persistence.createEntityManagerFactory(\"application\");\n\t\t\t\tif (em == null) {\n\t\t\t\t\tem = loadConfiguration(emf);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"@Before\n public void setup() {\n endpoint = new Endpoint();\n endpoint.setKey(1);\n endpoint.setUrl(URI.create(\"http://localhost/nmr\"));\n\n // Installation, synchronized against\n installation = new Installation();\n installation.setType(InstallationType.TAPIR_INSTALLATION);\n installation.addEndpoint(endpoint);\n\n // Populated Dataset\n dataset = prepareDataset();\n\n // RegistryUpdater, using mocked web service client implementation\n updater = new RegistryUpdater(datasetService, metasyncHistoryService);\n }",
"@BeforeClass\n\tpublic static void setupClass() throws JsonParseException, JsonMappingException, IOException, URISyntaxException {\n\t\tTEST_ENVIRONMENT.setupConfiguration();\n\t\tTEST_ENVIRONMENT.setupDbConnection();\n\t\tTEST_ENVIRONMENT.migrateDb();\n\t\tTEST_ENVIRONMENT.setupServer();\n\t}",
"@Override\n public void init(ProcessingEnvironment env) {\n // Not working at the moment.\n // myEnv = env;\n filer = env.getFiler();\n }",
"private void initialiseByHand() {\n Configuration production = new Configuration(\"api.example.com\", false, 2000);\n Configuration staging = new Configuration(\"api-staging.example.com\", false, 2000);\n Configuration debug = new Configuration(\"api-dev.example.com\", true, 1000);\n Map<String, Configuration> baseVariants = new HashMap<>();\n baseVariants.put(PRODUCTION, production);\n baseVariants.put(STAGING, staging);\n baseVariants.put(DEBUG, debug);\n Neanderthal.initialise(this, baseVariants, PRODUCTION);\n }",
"@BeforeAll\n static void init() {\n }",
"@BeforeClass\n public static void setUpBeforeClass() {\n TestNetworkClient.reset();\n context = ApplicationProvider.getApplicationContext();\n dataStorage = TestDataStorage.getInstance(context);\n ApplicationSessionManager.getInstance().startSession();\n }",
"@Before\n public void init() throws Exception {\n TestObjectGraphSingleton.init();\n TestObjectGraphSingleton.getInstance().inject(this);\n\n mockWebServer.start();\n }",
"@BeforeClass\n\tpublic void setUp() {\n\t\tapp = app.get(ApplicationSourcesRepo.getFirefoxHerokuApplication());\n\n\t}",
"public static void setUp() {\n RequestFactory.defaultFactory = new RequestFactory() {\n @Override\n public Request createRequest(\n String httpMethod,\n String apiMethod,\n RequestType type,\n Map<String, Object> params) {\n return new RequestHelper(httpMethod, apiMethod, type, params);\n }\n };\n RequestSender.setInstance(new ImmediateRequestSender());\n\n if (BuildConfig.DEBUG) {\n Leanplum.setAppIdForDevelopmentMode(APP_ID, DEVELOPMENT_KEY);\n } else {\n Leanplum.setAppIdForProductionMode(APP_ID, PRODUCTION_KEY);\n }\n Leanplum.setDeviceId(\"leanplum-unit-test-20527411-BF1E-4E84-91AE-2E98CBCF30AF\");\n Leanplum.setApiConnectionSettings(API_HOST_NAME, \"api\", API_SSL);\n Leanplum.setSocketConnectionSettings(SOCKET_HOST_NAME, SOCKET_PORT);\n Leanplum.setLogLevel(Log.Level.DEBUG);\n }",
"@BeforeClass\n public static void init() throws Exception {\n System.setProperty(\"instanceUri\", STANDALONE.getClass().getMethod(\"getBaseURI\").invoke(STANDALONE).toString());\n }",
"public void setUp()\r\n {\r\n //empty on purpose\r\n }",
"@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\tvendMachine = new VendingMachine();\r\n\t}",
"@BeforeClass\n\t\tpublic static void setup() {\n\t\t\t// Get the browser to use in testing\n\t\t\tSystem.setProperty(\"testBrowser\", \"chrome\");\n\t\t\t\n\t\t\t// Get the browser to use in testing\n\t\t\tString browserToUse = System.getProperty(\"testBrowser\");\n\t\t\t\n\t\t\t// Open the specified browser\n\t\t\topenBrowser(browserToUse);\n\t\t}",
"@Override\n\tprotected void setUp() throws Exception\n\t{\n\t\tTestEnvironment te = TestEnvironment.getTestEnvironment();\n\n\t\tif (EquationCommonContext.getContext().checkIfGPIsInstalled(te.getSessionId()))\n\t\t{\n\t\t\tEquationCommonContext.getContext().loadEquationConfigurationPropertiesBean();\n\t\t\tEquationCommonContext.getContext().runSystemStatusManagerMonitor();\n\t\t}\n\t\tif (session == null)\n\t\t{\n\t\t\tunit = te.getEquationUnit();\n\t\t\tuser = te.getEquationUser();\n\t\t\tsession = user.getSession();\n\t\t}\n\n\t\tsuper.setUp();\n\t}",
"@BeforeClass\n public static void init() {\n InitializrMetadataBuilder initializrMetadataBuilder = InitializrMetadataBuilder.fromInitializrProperties(\n InitializerMetadataTest.load(\n InitializerMetadataTest.loadProperties(new ClassPathResource(\"application-test-default.yml\"))));\n initializrMetadata = initializrMetadataBuilder.build();\n }",
"@Before\n public void init() throws MxException {\n InjectorContainer.get().injectMembers( this );\n InjectorContainer.set( iInjector );\n testTaskDefinitionResource.setEJBContext( ejbContext );\n\n setAuthorizedUser( AUTHORIZED );\n setUnauthorizedUser( UNAUTHORIZED );\n\n initializeTest();\n\n Mockito.when( ejbContext.getCallerPrincipal() ).thenReturn( principal );\n Mockito.when( principal.getName() ).thenReturn( AUTHORIZED );\n constructTaskDefinitions();\n }",
"public void setUp() {\n\n\t}",
"@Before\n public void init(){\n }",
"@BeforeAll\n public static void configInitialization() {\n System.setProperty(\"VSAC_DRC_URL\", \"https://vsac.nlm.nih.gov/vsac\");\n System.setProperty(\"SERVER_TICKET_URL\", \"https://vsac.nlm.nih.gov/vsac/ws/Ticket\");\n System.setProperty(\"SERVER_SINGLE_VALUESET_URL\", \"https://vsac.nlm.nih.gov/vsac/ws/RetrieveValueSet?\");\n System.setProperty(\"SERVER_MULTIPLE_VALUESET_URL_NEW\", \"https://vsac.nlm.nih.gov/vsac/svs/RetrieveMultipleValueSets?\");\n System.setProperty(\"SERVICE_URL\", \"http://umlsks.nlm.nih.gov\");\n System.setProperty(\"PROFILE_SERVICE\", \"https://vsac.nlm.nih.gov/vsac/profiles\");\n System.setProperty(\"VERSION_SERVICE\", \"https://vsac.nlm.nih.gov/vsac/oid/\");\n }",
"@Override\n\tprotected void setUp() {\n\t\ttry {\n\t\t\tconsole = new MMAConsole();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"@Before\n public void setUp() {\n start(fakeApplication(inMemoryDatabase(), fakeGlobal()));\n }",
"@BeforeEach\n void init() {\n carte = new Carte();\n planning = new Planning(carte);\n }",
"public void create(Environment environment);",
"protected void initialise() {\r\n loadDefaultConfig();\r\n loadCustomConfig();\r\n loadSystemConfig();\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"--- Scope properties ---\");\r\n for (Iterator i = properties.keySet().iterator(); i.hasNext(); ) {\r\n String key = (String) i.next();\r\n Object value = properties.get(key);\r\n LOG.debug(key + \" = \" + value);\r\n }\r\n LOG.debug(\"------------------------\");\r\n }\r\n }",
"@BeforeSuite\n\tpublic void initialize(){\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\t// loading config Repositories\n\t\t\tconfig = new Properties();\n\t\t\tFileInputStream fp = new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\src\\\\com\\\\hrm\\\\config\\\\config.properties\");\n\t\t\tconfig.load(fp);\n\t\t\t\n\t\t\t\n\t\t\t// checking the type of browser\n\t\t\tif(config.getProperty(\"browserType\").equalsIgnoreCase(\"Firefox\")){\n\t\n\t\t\t\twbDv = new FirefoxDriver();\n\t\t\t\t\n\t\t\t}else if(config.getProperty(\"browserType\").equalsIgnoreCase(\"IE\")){\n\t\t\t\t\n\t\t\t\twbDv = new InternetExplorerDriver();\n\t\t\t\tDesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();\n\t\t\t\tieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);\n\t\t\t\twbDv = new InternetExplorerDriver(ieCapabilities);\n\t\t\t}else if(config.getProperty(\"browserType\").equalsIgnoreCase(\"Chrome\")){\n\t\t\t\t\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", System.getProperty(\"user.dir\")+\"\\\\OtherUtility\\\\chromedriver.exe\");\n\t\t\t wbDv = new ChromeDriver();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tdriver = new EventFiringWebDriver(wbDv);\n\t\t\t\n\t\t\t// putting an implicit wait after every Action or Event\n\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\t\n\t\t\t// Loading the browser\n\t\t\tdriver.get(\"http://croissanceservices.com/hrm\");\n\t\t\t\n\t\t\t// opening the browser\n\t\t\tdriver.manage().window().maximize();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}",
"@Before\r\n\tpublic void setup() {\r\n\t}",
"@Override\n public void prepare() {\n applicationDeployer.initialize();\n this.initialize();\n }",
"@Before\n public void setUp() throws Exception {\n env = Environment.getInstance();\n parameterTypes = new Class[1];\n parameterTypes[0] = za.co.multichoice.environment.Tile.class;\n m = env.getClass().getDeclaredMethod(METHOD_NAME, parameterTypes);\n m.setAccessible(true);\n parameters = new Object[1];\n }",
"protected void setUp() {\n config = new ContestConfig();\n }",
"@BeforeClass\n public static void _startup()\n {\n // this test requires local storage to be enabled\n System.setProperty(\"coherence.distributed.localstorage\", \"true\");\n System.setProperty(\"coherence.distributed.threads.min\", \"4\");\n\n AbstractFunctionalTest._startup();\n }",
"@Override\n public void setUp() {\n try {\n testEngine = MockupSAMLEngine.getInstance();\n } catch (SAMLEngineException e) {\n e.log();\n fail(e.toString());\n }\n }",
"@Before\n public void setUp() throws Exception {\n String apiKey = System.getenv(\"OST_KIT_API_KEY\");\n if ( null == apiKey ) {\n throw new Exception(\"Environment Variable OST_KIT_API_KEY is not set.\");\n }\n \n // get the ost kit api secret from environment.\n String apiSecret = System.getenv(\"OST_KIT_API_SECRET\");\n if ( null == apiSecret ) {\n throw new Exception(\"Environment Variable OST_KIT_API_SECRET is not set.\");\n }\n \n // get the ost kit api endpoint from environment.\n String v0Endpoint = System.getenv(\"OST_KIT_API_ENDPOINT\");\n if ( null == v0Endpoint ) {\n throw new Exception(\"Environment Variable OST_KIT_API_ENDPOINT is not set.\");\n }\n \n // get the ost kit api endpoint for v1 version from environment.\n String v1Endpoint = System.getenv(\"OST_KIT_API_V1_ENDPOINT\");\n if ( null == v1Endpoint ) {\n throw new Exception(\"Environment Variable OST_KIT_API_V1_ENDPOINT is not set.\");\n }\n\n apiV0Params = new HashMap<String, Object>();\n apiV0Params.put( \"apiKey\", apiKey);\n apiV0Params.put( \"apiSecret\", apiSecret);\n apiV0Params.put( \"apiEndpoint\", v0Endpoint);\n\n apiV1Params = new HashMap<String, Object>();\n apiV1Params.put( \"apiKey\", apiKey);\n apiV1Params.put( \"apiSecret\", apiSecret);\n apiV1Params.put( \"apiEndpoint\", v1Endpoint);\n }",
"@BeforeClass\n public static void beforeAll() {\n // The logger is shared by everything so this is the right place for it.\n TestSupportLogger.initLogger();\n\n /**\n * The context represents the application environment - should be fine to set up once here.\n * It includes creation and adding (as attributes) other one off objects such as:\n * - SessionFactory\n * - Configuration\n * - GalleryManager\n */\n context = new MockServletContext(TestSupportConstants.contextBaseDirPrefix + TestSupportConstants.contextBaseDir, null);\n String realPath = context.getRealPath(\"/\");\n assertEquals(TestSupportConstants.contextBaseDir, realPath);\n\n factory = TestSupportSessionFactory.getSessionFactory();\n\n context.setAttribute(\"sessionFactory\", factory);\n assertSame(factory, context.getAttribute(\"sessionFactory\"));\n\n configurationManager = new Configuration(factory);\n // Test one configuration value to check this has worked.\n assertTrue(((BlogEnabled) (configurationManager.getConfigurationItem(\"blogEnabled\"))).get());\n\n context.setAttribute(\"configuration\", configurationManager);\n assertSame(configurationManager, context.getAttribute(\"configuration\"));\n\n galleryManager = gallerySetup();\n context.setAttribute(\"Galleries\",galleryManager);\n assertSame(galleryManager, context.getAttribute(\"Galleries\"));\n }",
"@Test\n public void init() {\n }",
"@Before\n\tpublic void setUp() throws Exception {\n\t\t// Initialize the ring buffer\n\t\tringBuffer = new RingBuffer<>(3);\n\t}",
"@BeforeClass\n\tpublic static void setUpBeforeClass() throws Exception {\n\t\tTestSetup testSetup = new TestSetup(false /* skip initialization */);\n\t\tString rootPath;\n\t\ttry {\n\t\t\trootPath = TestSetup.getRootPath();\n\t\t\ttestSetup.loadTestProperties(rootPath);\n\t\t} catch (IOException e) {\n\t\t\tLog.error(e.getMessage());\n\t\t}\n\n\t\ttestSetup.initialize();\n\t\tTestContext.INSTANCE.setTestSetup(testSetup);\n\n\t\tAdbInterface.init(testSetup.getAdbLocation());\n\t\tAndroidAutomationTools.start();\n\t}",
"protected void setUp() {\n\t}",
"public EnvironmentPanelTest()\n {\n }",
"public ApplicationTest() {\n\t\t/*\n\t\t * This constructor should not be modified. Any initialization code should be\n\t\t * placed in the setUp() method instead.\n\t\t */\n\n\t}",
"@BeforeClass\n\tpublic static void setup() {\n\n\t}",
"@BeforeEach\n\tpublic void setup() throws Exception {\n\t\tGDACoreActivator activator = new GDACoreActivator(); // Make an instance to call method that sets static field!\n\t\tactivator.start(mockContext); // Inject the mock\n\n\t\tosgiServiceBeanHandler = new OsgiServiceBeanHandler();\n\t}",
"@Before\n\t public void setUp() {\n\t }",
"@Before\n \tpublic void init() throws SimpleDBException {\n assertNotNull(applicationContext);\n handlerAdapter = applicationContext.getBean(\"handlerAdapter\", HandlerAdapter.class);\n this.testClient = this.createTestClient();\n \t\trefreshRequestAndResponse();\n \t}",
"@Override\r\n protected void setUp()\r\n {\r\n island = new Island(5,5);\r\n position = new Position(island, 4,4);\r\n seed = new BirdFood(position, \"seed\", \"Crunchy Seeds\", 1.0, 2.0, 1.5);\r\n }",
"@Before\n public void setup() throws Exception {\n mTestUtil.overrideAllowlists(true);\n // We need to turn the Consent Manager into debug mode\n mTestUtil.overrideConsentManagerDebugMode(true);\n mTestUtil.overrideMeasurementKillSwitches(true);\n mTestUtil.overrideAdIdKillSwitch(true);\n mTestUtil.overrideDisableMeasurementEnrollmentCheck(\"1\");\n mMeasurementManager =\n MeasurementManagerFutures.from(ApplicationProvider.getApplicationContext());\n\n // Put in a short sleep to make sure the updated config propagates\n // before starting the tests\n Thread.sleep(100);\n }",
"@Before public void setUp() { }",
"public void initialize() {\n\n getStartUp();\n }",
"protected void setUp() throws Exception {\n\n super.setUp();\n OpenXpertya.startup(true);\n }",
"@Before\n\tpublic void setup() {\n\t\tdatabase = new DatabaseLogic();\n\t}",
"@Before\n public void init() {\n appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();\n System.out.println(\"hello\");\n }",
"protected void setUp() {\r\n entry = new ExpenseEntry();\r\n }",
"public void setUp() {\r\n state1 = new DateState(new State(20200818, \"VM\", 110, 50, 123, 11, 19,\r\n 65, \"A+\", 15)); // root\r\n test1 = state1;\r\n state2 = new DateState(new State(20200818, \"VA\", 72, 43, 79, 12, 17, 33,\r\n \"B\", 9));\r\n state3 = new DateState(new State(20200817, \"VA\", 72, 43, 79, 12, 17, 33,\r\n \"B\", 9));\r\n state4 = new DateState(new State(20200817, \"VM\", 110, 50, 123, 11, 19,\r\n 65, \"A+\", 15));\r\n nullState = null;\r\n }",
"@PostConstruct\n public void init() {\n try {\n this.host = config.getConnectionHost();\n this.port = config.getConnectionPort();\n this.uri = config.getConnectionUri();\n } catch (final Exception e) {\n throw new IllegalStateException(\"Test failure: \" + e.getMessage(), e);\n }\n }",
"@Before\n public void setUp()\n {\n x = new Symbol(\"x\");\n y = new Symbol(\"y\");\n z = new Symbol(\"z\");\n i = new Lambda(\"x\", x);\n k1 = new Lambda(\"y\", x);\n k = new Lambda(\"x\", k1);\n xz = new Application(x, z);\n yz = new Application(y, z);\n xz_yz = new Application(xz, yz);\n s1 = new Lambda(\"z\", xz_yz);\n s2 = new Lambda(\"y\", s1);\n s = new Lambda(\"x\", s2);\n sk = new Application(s, k);\n skk = new Application(sk, k);\n foo = new Quote(\"foo\");\n bar = new Quote(\"bar\");\n }",
"public static TrackableEnvironment createEnvironment() {\n return null;\n }",
"public SwerveAutoTest() {\n // Initialize base classes.\n // All via self-construction.\n\n // Initialize class members.\n // All via self-construction.\n }",
"@BeforeClass\n\t public void setUp() {\n\t }",
"public static void init() {\n if (initialized) {\n return;\n }\n initialized = true;\n DebugOptions.DEV_ROOT_PATH = \"engine/src/main/resources/\";\n GL20 mockGL = new MockGL();\n Gdx.gl = mockGL;\n Gdx.gl20 = mockGL;\n\n ServiceRegistry serviceRegistry = new ServiceRegistry();\n serviceRegistry\n .with(FacadeModuleConfig.class)\n .lifetime(Lifetime.Singleton)\n .use(TestModuleConfig::new);\n serviceRegistry\n .with(ModulePathScanner.class)\n .lifetime(Lifetime.Singleton);\n\n final HeadlessApplication application = new HeadlessApplication(new SolApplication(100, serviceRegistry), new HeadlessApplicationConfiguration());\n game = ((SolApplication) application.getApplicationListener()).getGame();\n }",
"@BeforeSuite\n\tpublic void initialize(){\n\t\t\n\t\t// loading all the configuration values\n\t\ttry{\n\t\t\tconfig = new Properties();\n\t\t\tFileInputStream fp = new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\src\\\\com\\\\hybridsec\\\\telepath\\\\config\\\\config.properties\");\n\t\t\tconfig.load(fp);\n\t\t\t\n\t\t\t// loading Objects Repository\n\t\t\tOR = new Properties();\n\t\t\tfp = new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\src\\\\com\\\\hybridsec\\\\telepath\\\\config\\\\OR.properties\");\n\t\t\tOR.load(fp);\n\t\t\t\n\t\t\tdatatable = new Xls_Reader(System.getProperty(\"user.dir\")+\"\\\\src\\\\com\\\\hybridsec\\\\telepath\\\\xls\\\\Controller.xlsx\");\n\t\t\t\n\t\t\t// checking the type of browser and launching the browser\n\t\t\tif(config.getProperty(\"browserType\").equalsIgnoreCase(\"Firefox\")){\n\t\t\t\t\n\t\t\t\twbDv = new FirefoxDriver();\n\t\t\t\t\n\t\t\t}else if(config.getProperty(\"browserType\").equalsIgnoreCase(\"IE\")){\n\t\t\t\t\n\t\t\t\tSystem.setProperty(\"webdriver.ie.driver\", System.getProperty(\"user.dir\")+\"\\\\OtherUtilities\\\\IEDriverServer.exe\");\n\t\t\t\twbDv = new InternetExplorerDriver();\n\t\t\t\t\n\t\t\t}else if(config.getProperty(\"browserType\").equalsIgnoreCase(\"Chrome\")){\n\t\t\t\t\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", System.getProperty(\"user.dir\")+\"\\\\OtherUtilities\\\\chromedriver.exe\");\n\t\t\t\twbDv = new ChromeDriver();\n\t\t\t}\n\t\t\t\n\t\t\tdriver = new EventFiringWebDriver(wbDv);\n\t\t\t\n\t\t\t// Putting an implicit wait after every Action or Event\n\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\t\n\t\t\t// Maximize the browser window\n\t\t\tdriver.manage().window().maximize();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@BeforeClass\n public static void SetupEnviron() throws FileNotFoundException, UnsupportedEncodingException {\n if (outputDir != null && baseLocalDir != null) {\n // exit early if the environ is already set\n return;\n }\n BasicConfigurator.resetConfiguration();\n BasicConfigurator.configure();\n String container = \"testConfiguration\";\n InputStream templateInputStream = null;\n try {\n File configFile = new File(\"resources/tests_config.xml\");\n templateInputStream = new FileInputStream(configFile);\n Document configDoc = XMLDomUtils.getTemplateDom(templateInputStream);\n // read from the config file\n outputDir = XMLDomUtils.getNodeValue(configDoc, container, \"outputDirectory\");\n outputDir += \"desc_sen/\";\n baseLocalDir = XMLDomUtils.getNodeValue(configDoc, container, \"projectDirectory\");\n exampleOutputDir = XMLDomUtils.getNodeValue(configDoc, container, \"outputDirectory\");\n exampleOutputDir += \"examples/\";\n } finally {\n if (templateInputStream != null) {\n try {\n templateInputStream.close();\n } catch (IOException e) {\n // ignore, closing..\n }\n }\n }\n \n File file = new File(outputDir);\n file.mkdirs();\n \n file = new File(exampleOutputDir);\n file.mkdirs();\n \n baseQuery += URLEncoder.encode(\"text/xml;subtype=\\\"sensorML/1.0.1\\\"\", \"UTF-8\") + \"&\";\n }",
"@Before\n\tpublic void setup() {\n\n\t\tclient = ClientBuilder.newClient();\n\n\t}",
"private void initSetUp()\n\t{\n\t\tthis.setActionName(NAME);\n\t\tthis.setDescription(DESCRIPTION);\n\t\tthis.setMagic(IS_MAGIC);\n\t\tthis.setAttack(IS_ATTACK);\n\t\tthis.setTargetSelf(IS_TARGET_SELF);\n\t\tthis.setInternalName(INTERNAL_NAME);\n\t}",
"private void setUp() {\r\n\tvariables = new Vector();\r\n\tstatements = new Vector();\r\n\tconstraints = new Vector();\r\n\tvariableGenerator = new SimpleVariableGenerator(\"v_\");\r\n }",
"@BeforeTest\n\tpublic void Initialise() throws IOException\n\t{\n\t\t\t\tdriver=initialiseDriver();\n\t\t\t\t\n\t\t\t\tdriver.get(prop.getProperty(\"url\"));\n\t}",
"@Before\n public void setup() {\n }",
"@Before\n public void setup() {\n }",
"@Before\n public void setup() {\n }",
"@BeforeEach\n public void setup() {\n token = new TokenInfo();\n token.setNetid(\"lbecheanu\");\n token.setRole(\"student\");\n }",
"@BeforeClass(groups = { \"EtlNG\" })\n\tpublic void setUp() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tlog.warn(\"Starting: \" + this.getClass().getSimpleName());\n\n\t\t\tIEUtil.openNewBrowser();\n\t\t\tGeneralUtil.navigateToPO();\n\t\t\tGeneralUtil.logInSuper();\n\t\t\t// -----------------------------------\n\n\t\t} catch (Exception e) {\n\t\t\tAssert.fail(\"Unexpected Exception: \", e);\n\t\t}\n\t}",
"@Before\n public void initJUnitTest() {\n final double[] location = {0, 0};\n final String bodyFace = \"initial back\";\n final String bodyLocation = \"initial arm\";\n body = new BodyLocation(location, bodyFace, bodyLocation);\n }",
"@BeforeClass\n public void beforeClass() throws IOException {\n String[] strClassNameArray = this.getClass().getName().split(\"\\\\.\");\n className = strClassNameArray[strClassNameArray.length-1];\n Environment.put(\"CLASSNAME\", className);\n Environment.put(\"BROWSER\", browser);\n\n System.out.println(\"Before Class method for \" + className);\n\n //Initiate asapDriver\n asapDriver = new Driver(Dictionary, Environment);\n\n //Get Env\n env = System.getProperty(\"envName\");\n Assert.assertNotNull(env, \"No Environment Parameter value received\");\n\n //Add env global environments\n Environment.put(\"ENV_CODE\", env);\n Assert.assertTrue(asapDriver.createExecutionFolders(),\"Creating Execution Folders\");\n Assert.assertTrue(asapDriver.fetchEnvironmentDetailsFromConfigXML(),\"Fetching Environment Details\");\n\n //Initiate WebDriver\n driver = asapDriver.getWebDriver(browser);\n\n //Set implicit time\n if(driver != null) driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\n //Instantiate reporter\n Reporter = new Reporting(driver, Dictionary, Environment);\n Reporter.createSummaryReport();\n Reporter.createJenkinsReport();\n\n //Initialize Common functions\n objCommon = new Wrappers(driver,Reporter);\n }"
] | [
"0.76348627",
"0.7555615",
"0.75231713",
"0.7272474",
"0.7182094",
"0.7171796",
"0.7063189",
"0.70305645",
"0.7028994",
"0.6963451",
"0.6962992",
"0.6863303",
"0.6863303",
"0.6846588",
"0.6825703",
"0.6823138",
"0.6775337",
"0.6761039",
"0.67500144",
"0.6749097",
"0.6732905",
"0.66685766",
"0.6668256",
"0.6668256",
"0.66259354",
"0.66226494",
"0.6616064",
"0.66133964",
"0.660638",
"0.66063136",
"0.66041017",
"0.6597831",
"0.6591772",
"0.65902793",
"0.65644825",
"0.6560016",
"0.65547067",
"0.65403706",
"0.6537094",
"0.65259284",
"0.65228516",
"0.65226203",
"0.65187037",
"0.65110195",
"0.6506312",
"0.6505234",
"0.6502285",
"0.6478868",
"0.6474294",
"0.64709115",
"0.64591706",
"0.6452665",
"0.6445508",
"0.6431476",
"0.6431014",
"0.6423086",
"0.6414421",
"0.6411515",
"0.6406652",
"0.6406268",
"0.6405915",
"0.63949805",
"0.6389303",
"0.6386153",
"0.6381825",
"0.63816434",
"0.6379127",
"0.6368086",
"0.6359788",
"0.634656",
"0.6346063",
"0.6338777",
"0.6336679",
"0.63275933",
"0.632615",
"0.63260037",
"0.63242435",
"0.6322201",
"0.63219804",
"0.62949866",
"0.6293697",
"0.62928164",
"0.62910086",
"0.629037",
"0.6289478",
"0.62875587",
"0.6285337",
"0.62815535",
"0.6280054",
"0.62800163",
"0.6275963",
"0.627079",
"0.62686014",
"0.62668586",
"0.62668586",
"0.62668586",
"0.626481",
"0.6262916",
"0.6262646",
"0.62612504"
] | 0.6406178 | 60 |
End Method Method to initialise the system under test. | @Before public void initialiseSystemUnderTest(){
scenario = new SelectionScenario();
Mockito.when( scenario.shapes.canvasShapeSelection() ).thenReturn(
FXCollections.observableSet( scenario.diamond, scenario.triangle, scenario.pentagon ) );
Mockito.when( scenario.shapes.singletonSelection() ).thenReturn( FXCollections.observableSet() );
scenario.controller = new ShapeManagerSelectionControllerImpl( scenario.shapes );
systemUnderTest = new LocationItems( scenario.controller );
Assert.assertEquals( SelectionScenario.DIAMOND_CENTRE_X, scenario.diamond.centreXProperty().get(), TestCommon.precision() );
Assert.assertEquals( SelectionScenario.DIAMOND_CENTRE_Y, scenario.diamond.centreYProperty().get(), TestCommon.precision() );
Assert.assertEquals( SelectionScenario.TRIANGLE_CENTRE_X, scenario.triangle.centreXProperty().get(), TestCommon.precision() );
Assert.assertEquals( SelectionScenario.TRIANGLE_CENTRE_Y, scenario.triangle.centreYProperty().get(), TestCommon.precision() );
Assert.assertEquals( SelectionScenario.PENTAGON_CENTRE_X, scenario.pentagon.centreXProperty().get(), TestCommon.precision() );
Assert.assertEquals( SelectionScenario.PENTAGON_CENTRE_Y, scenario.pentagon.centreYProperty().get(), TestCommon.precision() );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@BeforeClass\r\n\tpublic static void setupSystem() {\r\n\t\tSystemActions.logSystemInfo();\r\n\t\tSystemActions.updateSettings();\r\n\t}",
"@BeforeClass\n protected void initialize() {\n try {\n Class<?> testbedClass = Class.forName(\n MainframeEnvironmentVerification.class.getPackage().getName()\n + \".\" + envProperties.getTestbedPropertyById(\"id\"));\n\n if (!MainframeTestbed.class.isAssignableFrom(testbedClass)) {\n fail(\"This test can only be called on a testbed that implements the \"\n + MainframeTestbed.class.getName() + \" interface\");\n }\n MainframeTestbed testbed = (MainframeTestbed)testbedClass.newInstance();\n\n sysviewConfigs = testbed.getSysviewInstances();\n sysvDb2Configs = testbed.getSysvdb2Instances();\n cicsConfigs = testbed.getCicsRegions();\n mqConfigs = testbed.getMqSubsystems();\n imsConfigs = testbed.getImsRegions();\n datacomConfigs = testbed.getDatacomInstances();\n } catch (Exception e) {\n fail(\"Unable to query testbed for environment configuration values\", e);\n }\n\n if (!sysviewConfigs.isEmpty()) {\n // If the testbed has multiple Sysview instances we use the first for generic queries.\n try {\n sysview = new Sysview(sysviewConfigs.iterator().next().getLoadlib());\n } catch (IOException e) {\n fail(\"Unable to initialize Sysview instance used for generic queries\");\n }\n } else {\n logger.warn(\"Some checks will be skipped as the testbed contains no sysview instance\");\n }\n }",
"public void initialize() {\n\n getStartUp();\n }",
"@Override\r\n\tpublic void sssDoLwTestInit() {\n\r\n\t}",
"protected void setup() {\r\n }",
"@BeforeClass\n public static void _startup()\n {\n // this test requires local storage to be enabled\n System.setProperty(\"coherence.distributed.localstorage\", \"true\");\n\n AbstractFunctionalTest._startup();\n }",
"@BeforeClass\n public static void _startup()\n {\n // this test requires local storage to be enabled\n System.setProperty(\"coherence.distributed.localstorage\", \"true\");\n\n AbstractFunctionalTest._startup();\n }",
"@BeforeSuite\n\tpublic void initialize(){\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\t// loading config Repositories\n\t\t\tconfig = new Properties();\n\t\t\tFileInputStream fp = new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\src\\\\com\\\\hrm\\\\config\\\\config.properties\");\n\t\t\tconfig.load(fp);\n\t\t\t\n\t\t\t\n\t\t\t// checking the type of browser\n\t\t\tif(config.getProperty(\"browserType\").equalsIgnoreCase(\"Firefox\")){\n\t\n\t\t\t\twbDv = new FirefoxDriver();\n\t\t\t\t\n\t\t\t}else if(config.getProperty(\"browserType\").equalsIgnoreCase(\"IE\")){\n\t\t\t\t\n\t\t\t\twbDv = new InternetExplorerDriver();\n\t\t\t\tDesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();\n\t\t\t\tieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);\n\t\t\t\twbDv = new InternetExplorerDriver(ieCapabilities);\n\t\t\t}else if(config.getProperty(\"browserType\").equalsIgnoreCase(\"Chrome\")){\n\t\t\t\t\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", System.getProperty(\"user.dir\")+\"\\\\OtherUtility\\\\chromedriver.exe\");\n\t\t\t wbDv = new ChromeDriver();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tdriver = new EventFiringWebDriver(wbDv);\n\t\t\t\n\t\t\t// putting an implicit wait after every Action or Event\n\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\t\n\t\t\t// Loading the browser\n\t\t\tdriver.get(\"http://croissanceservices.com/hrm\");\n\t\t\t\n\t\t\t// opening the browser\n\t\t\tdriver.manage().window().maximize();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}",
"public void setUp()\r\n {\r\n //empty on purpose\r\n }",
"@Override\n protected void startUp() {\n }",
"public abstract void initializeTestSuite();",
"@BeforeClass\n\tpublic static void init() {\n\t\ttestProduct = new Product();\n\t\ttestProduct.setPrice(1000);\n\t\ttestProduct.setName(\"Moto 360\");\n\t\ttestProduct.setDescrip(\"Moto 360 smart watch for smart generation.\");\n\n\t\ttestReview = new Review();\n\t\ttestReview.setHeadline(\"Excellent battery life\");\n\t\ttestReview.setContent(\"Moto 360 has an excellent battery life of 10 days per full charge.\");\n\t}",
"@Test\n\tpublic void testInit() {\n\t\t/*\n\t\t * This test is just use to initialize everything and ensure a better\n\t\t * performance measure for all the other tests.\n\t\t */\n\t}",
"@BeforeClass\n public static void startUp() {\n // \"override\" parent startUp\n resourceInitialization();\n }",
"protected void setUp()\r\n {\r\n /* Add any necessary initialization code here (e.g., open a socket). */\r\n }",
"public void init() {\n // These data structures are initialized here because other\n // module's startUp() might be called before ours\n this.systemStartTime = System.currentTimeMillis();\n }",
"public void autonomousInit() {\n \n }",
"@BeforeClass\n\tpublic static void initialization() {\n\t\tLOG.info(\"[#759] Initialization\");\n\t\tLOG.info(\"[#759] Prerequisite: The CSS is created\");\n\t\tLOG.info(\"[#759] Prerequisite: The user is logged to the CSS\");\n\n\t\tserviceBundleUrl = NominalTestCaseLowerTester.class.getClassLoader().getSystemResource(\"Calculator-0.3.jar\");//NominalTestCaseLowerTester.class.getClassLoader().getResource(\"Calculator-0.3.jar\");//\"file:/Calculator-0.3.jar\";\n\t\tcalculatorServiceId = null;\n\t\tassertNotNull(\"Can't find the service JAR location\", serviceBundleUrl);\n\t\tLOG.info(\"[#759] Service location: \"+serviceBundleUrl);\n\t}",
"@Override\n protected void setup() {\n // exception handling for invoke the main2();\n try {\n main2();\n } catch (StaleProxyException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n // create central agent of the application\n try {\n AgentController Main = main1.createNewAgent(\"Main\",\"test.Main\",null);\n Main.start();\n } catch (StaleProxyException e) {\n e.printStackTrace();\n }\n try {\n showResualt();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"@Before\n\tpublic void init() {\n\t}",
"private void setupEnvironment() {\n // Create mocks for configurations\n bgpConfig = createMock(BgpConfig.class);\n participantsConfig = createMock(SdxParticipantsConfig.class);\n\n // Create mocks for services\n coreService = new TestCoreService();\n configService = new TestNetworkConfigService();\n registry = new NetworkConfigRegistryAdapter();\n interfaceService = createMock(InterfaceService.class);\n interfaceService.addListener(anyObject(InterfaceListener.class));\n expectLastCall().anyTimes();\n intentSynchronizer = createMock(IntentSynchronizationService.class);\n }",
"private void initHardware(){\n }",
"private final void doSetup() {\r\n \tsetEnvironmentVariables();\r\n \t\r\n \tcreateAppWindows();\r\n \t\r\n \tcreateAppPages();\r\n\r\n \t//Set the default resource bundle. This necessary even for non-L10N tests, because even they\r\n \t// need to call localizeFieldLocators()\r\n\t\tsetResourceBundle(DDConstants.DEFAULT_L10N_BUNDLE);\r\n\t\t\r\n\t\t//MUST be called after super.setup!!!\r\n \t//NOTE that ddUser is the equivalent of a user that is found in the setup screen.\r\n \t// The user that logs in to the app is known as the auto user. Until we figure out\r\n \t// whether that model applies, don't call this.\r\n \t//setDDUser();\r\n }",
"@BeforeClass(groups = { \"EtlNG\" })\n\tpublic void setUp() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tlog.warn(\"Starting: \" + this.getClass().getSimpleName());\n\n\t\t\tIEUtil.openNewBrowser();\n\t\t\tGeneralUtil.navigateToPO();\n\t\t\tGeneralUtil.logInSuper();\n\t\t\t// -----------------------------------\n\n\t\t} catch (Exception e) {\n\t\t\tAssert.fail(\"Unexpected Exception: \", e);\n\t\t}\n\t}",
"public void setup() {\n }",
"@BeforeClass\n public static void _startup()\n {\n // this test requires local storage to be enabled\n System.setProperty(\"coherence.distributed.localstorage\", \"true\");\n System.setProperty(\"coherence.distributed.threads.min\", \"4\");\n\n AbstractFunctionalTest._startup();\n }",
"public void setUp() {\n\n\t}",
"@Before\n public void initTest() {\n tmpDir=new File(\"/tmp/luc/test\");\n //Setup System properties\n System.getProperties().remove(JNILoader.customPathKEY); //remove any \"old\" stuff\n System.setProperty(JNILoader.customPathKEY,tmpDir.getAbsolutePath());\n }",
"@Override\n\tprotected void setUp() throws Exception\n\t{\n\t\tTestEnvironment te = TestEnvironment.getTestEnvironment();\n\n\t\tif (EquationCommonContext.getContext().checkIfGPIsInstalled(te.getSessionId()))\n\t\t{\n\t\t\tEquationCommonContext.getContext().loadEquationConfigurationPropertiesBean();\n\t\t\tEquationCommonContext.getContext().runSystemStatusManagerMonitor();\n\t\t}\n\t\tif (session == null)\n\t\t{\n\t\t\tunit = te.getEquationUnit();\n\t\t\tuser = te.getEquationUser();\n\t\t\tsession = user.getSession();\n\t\t}\n\n\t\tsuper.setUp();\n\t}",
"@BeforeTest()\n\tpublic void initializemanager() {\n\t\tsetDriver(\"chrome\");\n\t\tdriver.get(getApplicationUrl(\"salesforce\"));\n\t\tdriver.manage().window().maximize();\n\t\tWebpageFactory.initializePageObjects(driver);\n\t\tDBUtil.createConnection();\n\t}",
"@Before\n public void init() {\n }",
"@Before\n\tpublic void setup() \n\t{\n\t\tsuper.setup();\n\t\t\n }",
"@Override\r\n\t@Before\r\n\tpublic void testInit() {\t\r\n\t\tsuper.testInit();\r\n\t\tsessionController.login(testHospitalAdmin, getCampus(0));\r\n\t\tadminController.addDoctor(\"Frank\");\r\n\r\n\t\tsessionController.login(testC1Nurse1, getCampus(0));\r\n\t\ttestPatient2 = nurseController.registerNewPatient(\"Bob\");\r\n\t\ttestPatient3 = nurseController.registerNewPatient(\"Clair\");\r\n\t\ttestPatient4 = nurseController.registerNewPatient(\"Dennis\");\r\n\t\ttestPatient5 = nurseController.registerNewPatient(\"Eric\");\r\n\t\t\r\n\t}",
"public void autonomousInit() {\n }",
"public void autonomousInit() {\n }",
"protected abstract void setup();",
"@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\tvendMachine = new VendingMachine();\r\n\t}",
"protected void setUp()\n {\n /* Add any necessary initialization code here (e.g., open a socket). */\n }",
"@Before\n public void init() {\n this.testMethodName = this.getTestMethodName();\n this.initialize();\n }",
"@BeforeMethod\r\n\tpublic void beforeMethod() {\r\n\t\t//initializeTestBaseSetup();\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 }",
"@Before\r\n\tpublic void setup() {\r\n\t}",
"protected void setUp() {\n\t}",
"public void autonomousInit() {\n\t\t\n\t}",
"private void setup() throws Exception {\n\t}",
"@BeforeAll\n static void initClass() {\n // start the program\n server = MpSecurityClientMain.startTheServer();\n }",
"public void setup() {\r\n\r\n\t}",
"private void initialize() {\n\t}",
"protected void setupLocal() {}",
"@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}",
"@BeforeSuite\n\tpublic void initialize(){\n\t\t\n\t\t// loading all the configuration values\n\t\ttry{\n\t\t\tconfig = new Properties();\n\t\t\tFileInputStream fp = new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\src\\\\com\\\\hybridsec\\\\telepath\\\\config\\\\config.properties\");\n\t\t\tconfig.load(fp);\n\t\t\t\n\t\t\t// loading Objects Repository\n\t\t\tOR = new Properties();\n\t\t\tfp = new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\src\\\\com\\\\hybridsec\\\\telepath\\\\config\\\\OR.properties\");\n\t\t\tOR.load(fp);\n\t\t\t\n\t\t\tdatatable = new Xls_Reader(System.getProperty(\"user.dir\")+\"\\\\src\\\\com\\\\hybridsec\\\\telepath\\\\xls\\\\Controller.xlsx\");\n\t\t\t\n\t\t\t// checking the type of browser and launching the browser\n\t\t\tif(config.getProperty(\"browserType\").equalsIgnoreCase(\"Firefox\")){\n\t\t\t\t\n\t\t\t\twbDv = new FirefoxDriver();\n\t\t\t\t\n\t\t\t}else if(config.getProperty(\"browserType\").equalsIgnoreCase(\"IE\")){\n\t\t\t\t\n\t\t\t\tSystem.setProperty(\"webdriver.ie.driver\", System.getProperty(\"user.dir\")+\"\\\\OtherUtilities\\\\IEDriverServer.exe\");\n\t\t\t\twbDv = new InternetExplorerDriver();\n\t\t\t\t\n\t\t\t}else if(config.getProperty(\"browserType\").equalsIgnoreCase(\"Chrome\")){\n\t\t\t\t\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", System.getProperty(\"user.dir\")+\"\\\\OtherUtilities\\\\chromedriver.exe\");\n\t\t\t\twbDv = new ChromeDriver();\n\t\t\t}\n\t\t\t\n\t\t\tdriver = new EventFiringWebDriver(wbDv);\n\t\t\t\n\t\t\t// Putting an implicit wait after every Action or Event\n\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\t\n\t\t\t// Maximize the browser window\n\t\t\tdriver.manage().window().maximize();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Before\n @Override\n public void init() {\n }",
"@Override\r\n\t@BeforeTest\r\n\tpublic void startSetting() {\n\t\tSystem.out.println(\"开始系统设置测试\");\r\n\t}",
"@Before\n\tpublic void setUp() {\n\t\tgateInfoDatabase = new GateInfoDatabase();\t\t\n\t}",
"private TestContext() {\n\t\tinitLog4j();\n\t\tloadConfig();\n\t}",
"@Override\r\n protected void setUp() {\r\n // nothing yet\r\n }",
"@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t}",
"@BeforeTest\r\n\tpublic void setupenvi() throws IOException {\r\n\t\tsetup();\r\n\t\tinit();\r\n\t}",
"@BeforeAll\n\tstatic void initOperate()\n\t{\t\n\t\tSystem.out.println(\"only Before All the tests....\");\n\t\toperate = new Operations();\n\t}",
"@BeforeClass(groups = { \"WorkflowNG\" })\n\tpublic void setUp() {\n\n\t\ttry {\n\t\t\t\n\t\t\tlog.warn(\"Starting: \" + this.getClass().getSimpleName());\n\n\t\t\tIEUtil.openNewBrowser();\n\t\t\tGeneralUtil.navigateToPO();\n\t\t\tGeneralUtil.logInSuper();\n\t\t\t// -----------------------------------\n\n\t\t} catch (Exception e) {\n\t\t\tAssert.fail(\"Unexpected error or exception\", e);\n\t\t}\n\t}",
"@Before\n\tpublic void setUp()\n\t{\n\t\tOptionsManager.getSingleton().setTestMode(true);\n\t\tQuestManager.resetSingleton();\n\t}",
"@Override\n public void init() {\n runtime.reset();\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n }",
"public EnvironmentPanelTest()\n {\n }",
"@Before\n public void init() throws MxException {\n InjectorContainer.get().injectMembers( this );\n InjectorContainer.set( iInjector );\n testTaskDefinitionResource.setEJBContext( ejbContext );\n\n setAuthorizedUser( AUTHORIZED );\n setUnauthorizedUser( UNAUTHORIZED );\n\n initializeTest();\n\n Mockito.when( ejbContext.getCallerPrincipal() ).thenReturn( principal );\n Mockito.when( principal.getName() ).thenReturn( AUTHORIZED );\n constructTaskDefinitions();\n }",
"protected void setUp() {\r\n entry = new ExpenseEntry();\r\n }",
"protected void initialize()\n\t{\n\t}",
"public void init() throws SystemStartupException\n {\n super.init();\n }",
"@Before\n public void setUp()\n {\n bookingS1 = new src.ticketbookingsystem.BookingSystem();\n bookingS1.newFlight(\"LHR - KIX\", \"11:30\", \"ANA 23\", \"15\");\n System.out.println(\"Setup flight done.\");\n bookingS1.newTicket(15, 5, \"Bobby Lee\");\n System.out.println(\"Setup Bobby done.\");\n bookingS1.newTicket(25, 3, \"Khalyla Lee\");\n System.out.println(\"Setup Khalyla done.\");\n System.out.println();\n }",
"@Before\n public void setup() {\n endpoint = new Endpoint();\n endpoint.setKey(1);\n endpoint.setUrl(URI.create(\"http://localhost/nmr\"));\n\n // Installation, synchronized against\n installation = new Installation();\n installation.setType(InstallationType.TAPIR_INSTALLATION);\n installation.addEndpoint(endpoint);\n\n // Populated Dataset\n dataset = prepareDataset();\n\n // RegistryUpdater, using mocked web service client implementation\n updater = new RegistryUpdater(datasetService, metasyncHistoryService);\n }",
"@Override\n\tprotected void setUp() {\n\t\ttry {\n\t\t\tconsole = new MMAConsole();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"@BeforeClass\n public static void classSetUp() {\n printTestClassHeader();\n uri = Const.ActionURIs.ADMIN_INSTRUCTORACCOUNT_ADD;\n // removeAndRestoreTypicalDataInDatastore();\n }",
"protected void initialize() {\n\n\t}",
"public abstract void initialise();",
"public abstract void initialise();",
"public abstract void initialise();",
"@Override\n public void prepare() {\n applicationDeployer.initialize();\n this.initialize();\n }",
"public void init() {\n log.info(\"initialization\");\n }",
"public void setUp()\n {\n empl = new SalariedEmployee(\"romeo\", 25.0);\n }",
"private void initialize() {\n\t\t\n\t}",
"protected void setup() {\n /**\n * Content manager manages the content languages and ontologies \"known\" by a given agent.\n * We register new languages that is required that our agent knows.\n * SLCodec is the codec class for the FIPA-SLn languages.\n * MobilityOntology is the class that represents the ontology used for JADE mobility.\n */\n getContentManager().registerLanguage(new SLCodec());\n getContentManager().registerOntology(MobilityOntology.getInstance());\n\n /**\n * Create containers. ProfileImpl allows us to set boot-parameters for the new containers.\n */\n homeContainer = getContainerController(); //retrieve the containercontroller that this agent lives in\n createdContainers = new AgentContainer[3]; //we require 3 containers for this scenario\n ProfileImpl curatorContainer1 = new ProfileImpl();\n curatorContainer1.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-1\");\n ProfileImpl curatorContainer2 = new ProfileImpl();\n curatorContainer2.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-2\");\n ProfileImpl artistManagerContainer = new ProfileImpl();\n artistManagerContainer.setParameter(ProfileImpl.CONTAINER_NAME, \"Artistmanager-Container\");\n createdContainers[0] = runtime.createAgentContainer(curatorContainer1);\n createdContainers[1] = runtime.createAgentContainer(curatorContainer2);\n createdContainers[2] = runtime.createAgentContainer(artistManagerContainer);\n doWait(2000); //wait while containers initializes\n\n /**\n * Request a list of all containers on the platform from AMS\n */\n getAllContainers();\n\n /**\n * Initialize gui\n */\n\n myGui = new ControllerAgentGUI(this, (String[]) containersOnPlatform.keySet().toArray(new String[containersOnPlatform.keySet().size()]));\n myGui.setVisible(true);\n }",
"@BeforeClass\n public static void startup()\n {\n _shutdown();\n }",
"private void runBaseInit(HttpServletRequest request, HttpServletResponse response) throws Exception {\n SimApi.initBaseSim();\n }",
"@Before\n\t public void setUp() {\n\t }",
"protected void initialize() {\n\t}",
"@Override\r\n\tprotected final void setup() {\r\n \tsuper.setup();\r\n\r\n \tdoSetup();\r\n }",
"@Override\r\n public void init() {\r\n /* Initialize the hardware variables.\r\n * The init() method of the hardware class does all the work here\r\n */\r\n robot.init(hardwareMap);\r\n\r\n // Send telemetry message to signify robot waiting;\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n }",
"private void testInitialization() {\r\n\r\n\r\n\t\tthis.myMapDB = MapDB.getInstance();\r\n\t\tthis.myClumpDB = ClumpDB.getInstance();\r\n\t}",
"private void initialize() {\n }",
"protected void initialize() {\n\t\t\n\t}",
"protected void initialize() {\n\t\t\n\t}",
"protected void setUp() \r\n {\n System.out.println(\"Setting up User Test !\");\r\n \t//lProps = new Properties();\t\r\n //lProps.put(Context.INITIAL_CONTEXT_FACTORY,lContextFactory);\r\n //lProps.put(Context.PROVIDER_URL,lURL);\r\n //lProps.put(Context.URL_PKG_PREFIXES,lPrefixes);\r\n try\r\n {\r\n lProps.list(System.out);\r\n lIC = new InitialContext(lProps);\r\n //sLog.debug(\"Created Initial Context\");\r\n System.out.println(\"Created Initial Context-looking for UserHome\");\r\n Object homeObj = lIC.lookup(lJndiName);\r\n System.out.println(\"got Object!\");\r\n lHome = (UserHome) PortableRemoteObject.narrow(homeObj,UserHome.class); \r\n \r\n //lSessionHome = (PJVTProducerSessionHome) lIC.lookup(lJndiName);\r\n \r\n System.out.println(\"User Home:\"+lHome.toString());\r\n \r\n }\r\n catch(Throwable t)\r\n {\r\n t.printStackTrace();\r\n }\r\n\t}",
"@BeforeClass\n\tpublic static void setup() {\n\t\tbaseWorld = new BaseWorld(1000 ,1500);\n \tGameManager.get().setWorld(new BaseWorld(1000, 1500));\n\t}",
"public Vending_MachineTest()\n {\n // initialise instance variables\n \n \n }",
"@Before\n public void init(){\n }",
"@Before\n\tpublic void init() {\n\t\tprofesseurServiceEmp = new ProfesseurServiceEmp();\n\t}",
"@BeforeClass\n\tpublic static void setUp() {\n\t\tsbu = Sbu.getUniqueSbu(\"SBU\");\n\t\tbiblio = new Biblioteca(\"Biblioteca\", \"viaBteca\", sbu);\n\t\tmanager = new ManagerSistema(\"codiceFiscaleManager\", \"NomeManager\", \"CognomeManager\", \n\t\t\t\t\"IndirizzoManager\", new Date(), \"34012899967\", \n\t\t\t\t\"[email protected]\", \"passwordM\", sbu);\n\t\tbibliotecario = new Bibliotecario(\"codiceFiscaleB1\", \"nomeB1\", \"cognomeB1\", \"indirizzoB1\", \n\t\t\t\tnew Date(), \"340609797\", \"[email protected]\", \n\t\t\t\t\"passwordB1\", biblio);\n\t}",
"protected void initialize()\r\n {\n }",
"private void Initialize()\n {\n\n }",
"protected void initialize() {}",
"protected void initialize() {}",
"@BeforeEach\r\n\tpublic void setUp() {\r\n\t\tplatform = new Platform();\r\n\t\tbastide = new Person(\"Rémi Bastide\");\r\n\t\thistoire = new Course(\"Histoire\", 15);\r\n\t\tgeo = new Course(\"Géographie\", 20);\r\n\t\tplatform.addCourse(histoire);\r\n\t\tplatform.addCourse(geo);\r\n\t\tplatform.registerStudent(bastide);\r\n\t}"
] | [
"0.74146605",
"0.7088382",
"0.7013224",
"0.6983294",
"0.68363744",
"0.6809909",
"0.6809909",
"0.6723991",
"0.6671041",
"0.6653403",
"0.66493624",
"0.66435015",
"0.6637053",
"0.6628919",
"0.6628555",
"0.66276985",
"0.66205275",
"0.66193396",
"0.6602304",
"0.6594619",
"0.6586605",
"0.6583508",
"0.6581996",
"0.6581238",
"0.65802276",
"0.657165",
"0.65616125",
"0.655346",
"0.6548359",
"0.6542261",
"0.6533426",
"0.65320444",
"0.6522693",
"0.6520941",
"0.6520941",
"0.6520603",
"0.65182024",
"0.65167147",
"0.6476505",
"0.64751035",
"0.64713734",
"0.6458922",
"0.64579356",
"0.6453743",
"0.64537305",
"0.6452689",
"0.64446187",
"0.6442967",
"0.6438834",
"0.64360267",
"0.64354575",
"0.6430479",
"0.6428116",
"0.64153975",
"0.641088",
"0.6408242",
"0.64030004",
"0.6398411",
"0.6393855",
"0.6393137",
"0.6392812",
"0.6392268",
"0.63906515",
"0.6389879",
"0.63884425",
"0.63881403",
"0.63862497",
"0.63846725",
"0.6370932",
"0.6368039",
"0.6366286",
"0.6362645",
"0.63613486",
"0.63613486",
"0.63613486",
"0.63519865",
"0.6350897",
"0.63493747",
"0.6348875",
"0.63482726",
"0.63480264",
"0.6344639",
"0.63399327",
"0.63379204",
"0.63361144",
"0.63352215",
"0.6333702",
"0.63294655",
"0.63278043",
"0.63278043",
"0.6323445",
"0.6322512",
"0.6319323",
"0.63190556",
"0.63142693",
"0.631385",
"0.6311748",
"0.6308824",
"0.6307777",
"0.6307777",
"0.630282"
] | 0.0 | -1 |
End Method Method to assert that the centre X is changed correctly. | private void assertCentreXProperty( double expected, double value ) {
Spinner< Double > spinner = systemUnderTest.centreXSpinner();
spinner.getValueFactory().valueProperty().set( value );
Assert.assertEquals( expected, scenario.diamond.translateXProperty().get(), TestCommon.precision() );
Assert.assertEquals( expected, scenario.triangle.translateXProperty().get(), TestCommon.precision() );
Assert.assertEquals( expected, scenario.pentagon.translateXProperty().get(), TestCommon.precision() );
shouldRetainOriginalConfigurationOfPolygon();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testGetCenter() {\n int expResult = 3;\n int result = this.dummyDigitSize.getCenter();\n assertEquals(expResult, result);\n }",
"private int get_x() {\n return center_x;\n }",
"@Test\n\tpublic void testTOutOfBoundsLeftMargin2() {\n\t\ttank.setX(180);\n\t\tassertEquals(false, tank.isWithinMarginsLeft());\n\t}",
"private void assertCentreYProperty( double expected, double value ) {\n Spinner< Double > spinner = systemUnderTest.centreYSpinner();\n spinner.getValueFactory().valueProperty().set( value );\n \n Assert.assertEquals( expected, scenario.diamond.translateYProperty().get(), TestCommon.precision() );\n Assert.assertEquals( expected, scenario.triangle.translateYProperty().get(), TestCommon.precision() );\n Assert.assertEquals( expected, scenario.pentagon.translateYProperty().get(), TestCommon.precision() );\n shouldRetainOriginalConfigurationOfPolygon();\n }",
"@Test\n\tpublic void testTOutOfBoundsLeftMargin3() {\n\t\ttank.setX(182);\n\t\tassertEquals(true, tank.isWithinMarginsLeft());\n\t}",
"@Test\n public final void testNormalSetPositionStart() {\n int expResX = 2;\n int expResY = 3;\n int resultX = ship.getX();\n int resultY = ship.getY();\n assertEquals(expResX, resultX);\n assertEquals(expResY, resultY);\n // Ship s = new Ship(1, true, 4, 5);\n IShip s = createShip(1, true, 4, 5);\n expResX = 4;\n expResY = 5;\n resultX = s.getX();\n resultY = s.getY();\n assertEquals(expResX, resultX);\n assertEquals(expResY, resultY);\n }",
"public float getCentreX() {\n return centreX;\n }",
"private double centerX() {\n return (piece.boundingBox().getWidth() % 2) / 2.0;\n }",
"public double getCenterX() { return centerX.get(); \t}",
"@Test\n\tpublic void testTOutOfBoundsLeftMargin1() {\n\t\ttank.setX(100);\n\t\tassertEquals(false, tank.isWithinMarginsLeft());\n\t}",
"public int getCenterX(){\r\n return centerX;\r\n }",
"@Test\n\tpublic void testTOutOfBoundsRightMargin3() {\n\t\ttank.setX(300);\n\t\tassertEquals(true, tank.isWithinMarginsRight());\n\t}",
"public final float exactCenterX() {\n return (left + right) * 0.5f;\n }",
"@Test\n public void testGetAndSetEnd(){\n largeMaze.setBegin(Maze.position(4,4));\n assertEquals(4, largeMaze.getBegin().getX());\n assertEquals(4, largeMaze.getBegin().getY());\n }",
"@Test\n\tpublic void testGetX() {\n\t\t//String verify = \"Returns the correct X value for a Coordinate\";\n\t assertEquals(\"Returns the correct X value for a Coordinate\", \n\t \t\torigin.getX(), 0.0, 0.0);\n\t assertEquals(\"Returns the correct X value for a Coordinate\", \n\t \t\tbasic.getX(), 5.0, 0.0);\n\t assertEquals(\"Returns the correct X value for a Coordinate\", \n\t \t\tbasic2.getX(), 4.0, 0.0);\n\t}",
"@Test\n\tpublic void testTOutOfBoundsRightMargin1() {\n\t\ttank.setX(550);\n\t\tassertEquals(false, tank.isWithinMarginsRight());\n\t}",
"@Test\r\n\t@Order(3)\r\n\tvoid testXnegative() {\r\n\t\trobot.setX(-100);\r\n\t\tassertNotEquals(-100, robot.getX() < 0 ,\"X coord test failed\\nREASON: Values less than 0 not allowed!\");\r\n\t}",
"@Test\n\tvoid testCheckCoordinates6() {\n\t\tassertTrue(DataChecker.checkCoordinate(90));\n\t}",
"@Test\n public void testCondition1() throws ArgumentOutOfBoundsException\n {\n // Check that position is changed as expected:\n Double[] expected = {5.0, 5.0, 1.0};\n _renderable.position(expected);\n Double actual[] = _renderable.position();\n assertEquals(\"x coordinate did not get set,\", expected[0], actual[0], 0.01);\n assertEquals(\"y coordinate did not get set,\", expected[1], actual[1], 0.01);\n assertEquals(\"z coordinate did not get set,\", expected[2], actual[2], 0.01);\n }",
"@RepeatedTest(10)\n @Test\n void afterUseMethod_setFly_AmmoShouldChange_nX_nY () {\n double x = ammo.getnX();\n double y = ammo.getnY();\n Point target = unit.getLookTarget().getPosition();\n target.setLocation(new Point(1000,1000));\n\n //when\n ammo.setFly();\n\n //then\n assertThat(ammo.getnX(),not(x));\n assertThat(ammo.getnY(),not(y));\n }",
"@Test\n\tvoid testCheckCoordinates7() {\n\t\tassertTrue(DataChecker.checkCoordinate(-90));\n\t}",
"@Test\n\tvoid testCheckCoordinates2() {\n\t\tassertTrue(DataChecker.checkCoordinate(-1));\n\t}",
"@Test\r\n\t@Order(4)\r\n\tvoid testXmoreThanHundred() {\r\n\t\trobot.setX(1000);\r\n\t\tassertNotEquals(1000, robot.getX() > 100,\"X coord test failed\\nREASON: Values more than 100 not allowed!\");\r\n\t}",
"@Test\n\tvoid testCheckCoordinates4() {\n\t\tassertFalse(DataChecker.checkCoordinate(-100));\n\t}",
"@Test\r\n\tpublic void testGetPositionX(){\n\t\tWinnerTitle title = new WinnerTitle(1, 0, 0);\r\n\t\ttitle.setPositionX(10);\r\n\t\t\r\n\t\tassertEquals(10, title.getPositionX());\r\n\t}",
"public void setCenter(Point newPoint) {\n this.center = newPoint;\n }",
"@Test\r\n @Order(9)\r\n void XmoveLeftTest() {\r\n \trobot.setX(0);\r\n \tassertNotEquals(robot.moveLeft(),\"Move test failed\\nREASON: moveleft() out of bounds!\");\r\n }",
"@Test\n\tvoid testCheckCoordinates3() {\n\t\tassertTrue(DataChecker.checkCoordinate(0));\n\t}",
"public void testSetLocationNegX() {\n try {\n container.setLocation(new Point(-1, 1));\n fail(\"the x of the point is -1, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }",
"public void verificaCoordenada() {\r\n\t\tif (X < 0) {\r\n\t\t\tX = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tX = X % Const.TAMANHO;\r\n\t\t}\r\n\r\n\t\tif (Y < 0) {\r\n\t\t\tY = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tY = Y % Const.TAMANHO;\r\n\t\t}\r\n\t}",
"private void updatePosition (float newCenterX, float newCenterY) {\n centerX = newCenterX;\n centerY = newCenterY;\n\n atomSpriteBoundary.left = centerX - spriteLength/2;\n atomSpriteBoundary.right = centerX + spriteLength/2;\n atomSpriteBoundary.top = centerY - spriteHeight/2;\n atomSpriteBoundary.bottom = centerY + spriteHeight/2;\n }",
"@Test\n public void testGetOriginCol() {\n setUp();\n assertEquals(5, move.getOriginCol());\n tearDown();\n }",
"public void setCentreX(float centreX) {\n this.centreX = centreX;\n }",
"public void setCentre(Vector2D newCentre) {\n this.center = newCentre;\n }",
"public void setXCoordinates(double newX) { this.xCoordinates = newX; }",
"@Test\n\tpublic void testXEnd() {\n\t\t\n\t\tdouble endX1 = 55.17, endX2 = 138.75;\n\t\tdouble v01 = 25, v02 = 38.6;\n\t\tdouble theta1 = 30, theta2 = 57;\n\t\tassertEquals(PhysicsEngine.findXEnd(v01, theta1, 0), endX1, DELTA);\n\t\tassertEquals(PhysicsEngine.findXEnd(v02, theta2, 0), endX2, DELTA);\n\t}",
"@Test\r\n\tpublic void testSetPositionX(){\n\t\tWinnerTitle title = new WinnerTitle(1, 0, 0);\r\n\t\ttitle.setPositionX(10);\r\n\t\t\r\n\t\tassertEquals(10, title.getPositionX());\r\n\t}",
"public void updateXLoc();",
"@Test\n public void testPositionEquals(){\n assertEquals(Maze.position(0,0), Maze.position(0,0));\n assertThat(Maze.position(1, 0), not(Maze.position(0, 0)));\n assertThat(Maze.position(0,0), not(Maze.position(0,1)));\n }",
"@Test\n\tpublic void testTOutOfBoundsRightMargin2() {\n\t\ttank.setX(460);\n\t\tassertEquals(false, tank.isWithinMarginsRight());\n\t}",
"@Test\n\tvoid testCheckCoordinates1() {\n\t\tassertTrue(DataChecker.checkCoordinate(1));\n\t}",
"public void setX(int newX)\r\n {\r\n xCoord = newX;\r\n }",
"@Override\n public void updateCenter(int newX, int newY) {\n Point oldCenter = wrappedPolygon.getCenterPoint();\n wrappedPolygon.translate(newX - oldCenter.x, newY - oldCenter.y);\n }",
"public double getCenterX() {\n\t\treturn centerX;\n\t}",
"@Test\n\tvoid testCheckCoordinates5() {\n\t\tassertFalse(DataChecker.checkCoordinate(100));\n\t}",
"private void checkRep() {\n assert (width <= Board.SIDELENGTH);\n assert (height <= Board.SIDELENGTH);\n assert (this.boundingBoxPosition.x() >= 0 && this.boundingBoxPosition.x() <= Board.SIDELENGTH);\n assert (this.boundingBoxPosition.y() >= 0 && this.boundingBoxPosition.y() <= Board.SIDELENGTH);\n }",
"@Override\n\tpublic void IsAtCentre(boolean b, Time time) {\n\t\t\n\t}",
"private void recalculatePosition()\n {\n position.x = gridCoordinate.getCol()*(width+horizontal_spacing);\n position.y = gridCoordinate.getRow()*(heigh+vertical_spacing);\n }",
"public static void SetCenter(int center) //set the center fret when needed\n\t{\n\t\tif(center==0)\n\t\t\tSfret=Efret=Center=1;\n\t\tif(center==15)\n\t\t\tSfret=Efret=Center=14;\n\t}",
"public int getX() {\r\n return (int) center.getX();\r\n }",
"@Test\r\n public void testGetSortCenterDimensions() {\r\n System.out.println(\"getSortCenterDimensions\");\r\n Controller instance = new Controller();\r\n Point2D expResult = new Point2D.Float(15f, 10f);\r\n Point2D result = instance.getSortCenterDimensions();\r\n assertEquals(expResult, result);\r\n }",
"public int getCenterX() {\n\t\t\treturn (int) origin.x + halfWidth;\n\t\t}",
"@Override\n\tpublic void onCenterChanged(GeoPoint center) {\n\t}",
"public void setXCoordinate(int newValue)\n {\n x = newValue;\n }",
"public Coordinate getCenter() {\n return center;\n }",
"@Test\n public void testWinCenter() {\n\n\n System.out.println(\"checkMoveIsWin\");\n\n int expResult = 1;\n int result = instance.checkMoveIsWin(new Move(9, 9, player1));\n assertEquals(expResult, result);\n }",
"public void setEndX(double x)\n {\n endxcoord=x; \n }",
"Point getCenter();",
"Point getCenter();",
"private void assertValidPointOnEC(BigInteger x, BigInteger y) {\n BigInteger ySqr = y.multiply(y);\n BigInteger xSqr = x.multiply(x);\n BigInteger xCube = xSqr.multiply(x);\n assert (ySqr == xCube.add(xSqr.multiply(COEFF_A)).add(x)) : \"not valid ec point!\";\n\n }",
"@Override\n\tpublic double getXLoc() {\n\t\tdouble side = Math.sqrt(getMySize())/2;\n\t\treturn x+side;\n\t}",
"@Test\n public void testSetLocation_Coordinates() {\n System.out.println(\"setLocation\");\n Coordinates newLocation = new Coordinates(100,100);\n Enemy instance = new SuperEnemy(new Coordinates(220,220));\n instance.setLocation(newLocation);\n Coordinates expResult = new Coordinates(100, 100);\n Coordinates result = instance.getLocation();\n assertEqualsC(expResult,result);\n }",
"@Test\n public void testHorizontalDisplacementTo() {\n System.out.println(\"Testing HorizontalDisplacementTo() for a range of different GPS coordinates\");\n double distancesExpected[] = {\n 555.998,\n 555.998,\n -555.998,\n -555.998,\n\t\t\t72.266,\n\t\t\t72.266,\n\t\t\t-72.266,\n\t\t\t-72.266\n };\n\t\t\n for (int i = 0; i < this.testCoordinates.length; i++) {\n double expResult = distancesExpected[i];\n double result = this.origin.horizontalDisplacementTo(this.testCoordinates[i]);\n\t\t\tSystem.out.println(\"Expected: \" + expResult + \", Actual: \" + result);\n assertEquals(expResult, result, 0.1);\n }\n }",
"private void calculateCentre() {\n \t\t// The size of the centre is presently one 5th of the maze size\n \t\tcentreSize = size / 5;\n \t\t// System.out.println(\"centreSize is: \" + centreSize);\n \n \t\t// Min and max are the start points of the centre\n \t\tint min = (int) Math.ceil((centreSize * 2.0));\n \t\tint max = min + centreSize;\n \t\tmin++; // this adjusts for the border\n \t\tmax++;\n \t\t// System.out.println(\"min is: \" + min);\n \t\t// System.out.println(\"max is: \" + max);\n \n \t\t// centre is the centre point of the maze\n \t\tdouble centre = (centreSize / 2.0) + min;\n \t\t// System.out.println(\"centre is: \" + centre);\n \t\tcentrePoint = new Point2D.Double(centre, centre);\n \t\t\n \t\t//set the min and max points for the centre\n \t\tcentreMin = min;\n \t\tcentreMax = max;\n \t}",
"public double getBorderCenterX()\n {\n return borderCenterX;\n }",
"@Test\r\n public void testCopyCenter() throws Exception {\r\n \tString parentCenter = \"parent-center\";\r\n \tString childCenter = \"child-center\";\r\n \tString centerCopy = \"child-center-copy\";\r\n \r\n \tnewCenter(parentCenter, null, null);\r\n \tnewCenter(childCenter, null, parentCenter);\r\n \t\r\n \tBoolean childCenterClicked = cp.clickItem(childCenter);\r\n \tAssert.assertTrue(childCenterClicked);\r\n \t\r\n \tcp.clickCopyButton();\r\n \t\r\n \tAssert.assertEquals(cp.getName(), null);\r\n \tAssert.assertEquals(cp.getParentCenter(), parentCenter);\r\n \t\r\n \tcp.setName(centerCopy);\r\n \tcp.clickApplyButton();\r\n \t\r\n \tAssert.assertTrue(cp.clickItem(centerCopy));\r\n \t\r\n \t// Delete centers\r\n \tcp.clickDeleteButton();\r\n \t\r\n \tcp.clickItem(childCenter);\r\n \tcp.clickDeleteButton();\r\n \t\r\n \tcp.clickItem(parentCenter);\r\n \tcp.clickDeleteButton();\r\n }",
"public void testGetOldPosition2() {\n WayPointEvent event = new WayPointEvent(edge, 0, offset);\n\n Point expectedOldPosition = edge.getWayPoints().get(0).getCenter();\n Point pt = event.getOldPosition();\n\n assertEquals(\"Failed to get the correct old position.\", expectedOldPosition, pt);\n\n // verify the point should be set by clone\n pt.x = 876;\n assertEquals(\"The old position getter should return a cloned point.\", expectedOldPosition,\n event.getOldPosition());\n }",
"public void testGetOldBoundary() {\n assertEquals(\"Old boundary should be got correctly.\", event.getOldBoundary(), oldBoundary);\n }",
"private void assertValidity() {\n if (latitudes.size() != longitudes.size()) {\n throw new IllegalStateException(\"GIS location needs equal number of lat/lon points.\");\n }\n if (!(latitudes.size() == 1 || latitudes.size() >= 3)) {\n throw new IllegalStateException(\"GIS location needs either one point or more than two.\");\n }\n }",
"public int getX() {\n return (int) center.getX();\n }",
"@Test\n public void eastMoveTest() {\n int eastInitialY = 0;\n Robot eastRobot = new Robot(0, eastInitialY, Direction.E);\n\n eastRobot.move(testBounds);\n Assert.assertEquals(1, eastRobot.getX());\n Assert.assertEquals(eastInitialY, eastRobot.getY());\n\n eastRobot.move(testBounds);\n Assert.assertEquals(2, eastRobot.getX());\n Assert.assertEquals(eastInitialY, eastRobot.getY());\n\n eastRobot.move(testBounds);\n Assert.assertEquals(3, eastRobot.getX());\n Assert.assertEquals(eastInitialY, eastRobot.getY());\n\n eastRobot.move(testBounds);\n Assert.assertEquals(4, eastRobot.getX());\n Assert.assertEquals(eastInitialY, eastRobot.getY());\n\n eastRobot.move(testBounds);\n Assert.assertEquals(4, eastRobot.getX());\n Assert.assertEquals(eastInitialY, eastRobot.getY());\n\n }",
"@Test\n public void testPlayerLocationX() {\n assertEquals(5, controller.getPlayerX());\n }",
"void setX(int newX) {\n this.xPos = newX;\n }",
"protected boolean checkRep() {\n if ( this.getX() < 0 || this.getY() < 0 || this.getX() >= 20 || this.getY() >= 20 ) {\n return false;\n }\n return true;\n }",
"public void testGetNewPosition2() {\n WayPointEvent event = new WayPointEvent(edge, 0, offset);\n\n Point pt = edge.getWayPoints().get(0).getCenter();\n assertEquals(\"Failed to get the correct new position.\", new Point(50 + pt.x, 60 + pt.y),\n event.getNewPosition());\n }",
"@Test\r\n\tpublic void testGetNewPosition() {\r\n\t\tBoard board = new Board(validSquareLocations); // board needs to have squares for this to be tested\r\n\t\tint actualNewPosition;\r\n\t\tactualNewPosition = board.getNewPosition(validCurrentPosition, validDieValue);\r\n\t\tassertEquals(actualNewPosition, expectedNewPosition);\r\n\t}",
"public double getCenterX()\n {\n return mainVBox.getTranslateX() + (mainVBox.getWidth() / 2);\n }",
"public void getBorderCenterX(double posX)\n {\n borderCenterX = posX;\n }",
"@Test\n public void testBorderOccupied() {\n new Submarine().placeShipAt(0, 0, true, ocean);\n new Submarine().placeShipAt(1, 0, true, ocean);\n new Submarine().placeShipAt(2, 0, true, ocean);\n final String errorMessage = \"Border is not occupied\";\n final int thirdColumn = 3;\n assertTrue(errorMessage, ocean.isBorderOccupied(1, thirdColumn));\n assertTrue(errorMessage, ocean.isBorderOccupied(1, 1));\n assertTrue(errorMessage, ocean.isBorderOccupied(0, 1));\n assertTrue(errorMessage, ocean.isBorderOccupied(0, thirdColumn));\n assertTrue(errorMessage, ocean.isBorderOccupied(0, 2));\n assertTrue(errorMessage, ocean.isBorderOccupied(2, 1));\n assertTrue(errorMessage, ocean.isBorderOccupied(2, thirdColumn));\n assertTrue(errorMessage, ocean.isBorderOccupied(2, 2));\n\n final int eighteenthRow = 18;\n final int tenthColumn = 10;\n new Submarine().placeShipAt(eighteenthRow, tenthColumn, true, ocean);\n\n final int nineColumn = 9;\n assertTrue(errorMessage, ocean.isBorderOccupied(eighteenthRow, nineColumn));\n final int thirteenColumn = 13;\n assertTrue(errorMessage, ocean.isBorderOccupied(eighteenthRow, thirteenColumn));\n }",
"public void setCenter(Point center) {\r\n this.center = center;\r\n }",
"public Point getCenter() {\r\n return this.center;\r\n }",
"public int centerX() {\n return mRect.centerX();\n }",
"public Point getCenter() {\n return center;\n }",
"void updatePosition() {\n if (gameScreen.cursorIsOnLeft()) \n {\n // set the panel's rightmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 11/12 - getWidth(), \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n else // Otherwise the cursor must be on the right half of the screen\n {\n // set the panel's leftmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 1/12, \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n }",
"public void validate()\n\t{\t\t\n\t\t// calculate the corner position\n\t\tsetCorner(\n\t\t\t\tcalculateCornerPosition(\n\t\t\t\t\t\tgetCentrePosition(),\n\t\t\t\t\t\tgetHorizontalSpanVector(),\n\t\t\t\t\t\tgetVerticalSpanVector()\n\t\t\t\t\t)\n\t\t\t);\n\t}",
"public float getCentreY() {\n return centreY;\n }",
"@Test\n\tpublic final void testProcGridCoord() {\n\t\tfor (int d=0; d<DIMENSIONALITY; d++) {\n\t\t\tassertTrue(0 <= block.procGridCoord(d)\n\t\t\t\t\t&& block.procGridCoord(d)<block.procGridSize(d));\n\t\t}\n\t}",
"@Test\n public void testCondition3() throws ArgumentOutOfBoundsException\n {\n Double[] coordinates = null;\n Double before[] = _renderable.position();\n _renderable.position(coordinates);\n Double after[] = _renderable.position();\n assertEquals(\"position array changed\", before[0], after[0], 0.01);\n assertEquals(\"position array changed\", before[1], after[1], 0.01);\n assertEquals(\"position array changed\", before[2], after[2], 0.01);\n }",
"public void setXY(int newX, int newY)\n\t{\n\t\tx=newX; \n\t\ty=newY;\n\t\tboundingBox = new Rectangle(x,y,width,height);\n\t}",
"void moveEast() {\n xpos = xpos + xspeed;\n if (xpos > width){\n xpos = 0; // 30\n }\n }",
"@Test\n\tpublic void testIfCoordinatesAreValid()\n\t{\n\t\tData d = new Data();\n\t\tCoordinate c = d.getCoordinate(0); // at index 0 is the king's default location (5, 5)\n\t\tassertEquals(c.getX(), 5);\n\t\tassertEquals(c.getY(), 5);\t\n\t}",
"private static void testGetCurrentLoc(Drunkard drunkard){\n\t System.out.println(\"get starting location[expected (3,5)]: (\" + drunkard.getCurrentLoc().getX() + \",\" + drunkard.getCurrentLoc().getY() + \")\");\n\t}",
"void setCenter() {\n\t\tLine line02 = new Line(myParent, new PVector(), new PVector());\n\t\tLine line13 = new Line(myParent, new PVector(), new PVector());\n\t\tline02.set(point[0].position, point[2].position);\n\t\tline13.set(point[1].position, point[3].position);\n\t\tif (line02.intersects_at(line13) != null) // if two points are on each\n\t\t\t\t\t\t\t\t\t\t\t\t\t// other\n\t\t\tcenter.set(line02.intersects_at(line13));\n\t}",
"public void setCenterX(double x) { centerX.set(clamp(x, X_MIN, X_MAX)); }",
"public void testDockDockPointNegX() {\n try {\n container.dock(new DockImpl(), new Point(-1, 1));\n fail(\"the x of location is -1, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }",
"private static void verifyViewPoint() {\n if (viewPoint.x < 0)\n viewPoint.x = 0;\n if (viewPoint.y < 0)\n viewPoint.y = 0;\n if (viewPoint.x > map.WIDTH - GAME_WIDTH * zoom)\n viewPoint.x = map.WIDTH - ((int) (GAME_WIDTH * zoom));\n if (viewPoint.y > map.HEIGHT - GAME_HEIGHT * zoom)\n viewPoint.y = map.HEIGHT - ((int) (GAME_HEIGHT * zoom));\n }",
"public void setCenter() {\n\t\tthis.isCenter = true;\n\t}",
"@Test\r\n @Order(10)\r\n void XmoveRightTest() {\r\n \trobot.setX(100);\r\n \tassertNotEquals(robot.moveRight(),\"Move test failed\\nREASON: moveRight() out of bounds!\");\r\n\t}",
"public void afficher()\n\t{\n\t\tSystem.out.println(\"Centre du cercle en \" + getPosX() + \", \" + getPosY());\n\t\tSystem.out.println(\"Rayon : \" + getRayon());\n\t}",
"@Test\n public void setGetPosition() {\n final CourseType courseType = new CourseType();\n final Integer POSITION = 5;\n courseType.setPosition(POSITION);\n\n assertSame(POSITION, courseType.getPosition());\n }"
] | [
"0.67004657",
"0.656067",
"0.6529887",
"0.6521826",
"0.65105563",
"0.64992696",
"0.6454195",
"0.6402853",
"0.6363465",
"0.6354081",
"0.63167673",
"0.6250086",
"0.62109977",
"0.6188375",
"0.6170868",
"0.61685807",
"0.614978",
"0.61460054",
"0.61313665",
"0.6126529",
"0.6116413",
"0.6112314",
"0.61031353",
"0.60839903",
"0.60760254",
"0.606854",
"0.6044075",
"0.60416037",
"0.6011282",
"0.60013735",
"0.5941939",
"0.59079224",
"0.59012395",
"0.5891091",
"0.5890213",
"0.5870855",
"0.58690125",
"0.5865734",
"0.58606553",
"0.5852754",
"0.5851766",
"0.58285433",
"0.5820751",
"0.5806767",
"0.5802585",
"0.5796841",
"0.57895464",
"0.5784808",
"0.57738197",
"0.57584614",
"0.57566583",
"0.5729823",
"0.5721126",
"0.57199377",
"0.5719482",
"0.5718164",
"0.57112765",
"0.57045954",
"0.57045954",
"0.5704331",
"0.5701706",
"0.56947356",
"0.56896067",
"0.5679163",
"0.567431",
"0.5670344",
"0.5667927",
"0.5660648",
"0.5654474",
"0.56469154",
"0.5645801",
"0.5643408",
"0.56410664",
"0.5640447",
"0.5638617",
"0.56348217",
"0.5620498",
"0.56059843",
"0.560557",
"0.5602554",
"0.56019646",
"0.55933976",
"0.5590925",
"0.5590066",
"0.55893767",
"0.5583715",
"0.55831516",
"0.55821586",
"0.5576168",
"0.557493",
"0.5572177",
"0.5570289",
"0.5564613",
"0.5562645",
"0.5561044",
"0.55496293",
"0.55415076",
"0.55407107",
"0.55401856",
"0.55379206"
] | 0.75737 | 0 |
End Method Method to assert that the centre Y is changed correctly. | private void assertCentreYProperty( double expected, double value ) {
Spinner< Double > spinner = systemUnderTest.centreYSpinner();
spinner.getValueFactory().valueProperty().set( value );
Assert.assertEquals( expected, scenario.diamond.translateYProperty().get(), TestCommon.precision() );
Assert.assertEquals( expected, scenario.triangle.translateYProperty().get(), TestCommon.precision() );
Assert.assertEquals( expected, scenario.pentagon.translateYProperty().get(), TestCommon.precision() );
shouldRetainOriginalConfigurationOfPolygon();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testGetSetY() {\n\t\tassertEquals(testNormal.getY(), 10);\n\t\tassertEquals(testZero.getY(), 0);\n\t\tassertEquals(testNegative.getY(), -10);\n\t\tassertEquals(testHuge.getY(), 10000);\n\t\t\n\t\t//SET NEW VALUE\n\t\ttestNormal.setY(8);\n\t\t\n\t\t//TEST GET NEW VALUE\n\t\tassertEquals(testNormal.getY(), 8);\n\t}",
"@Test\n\tpublic void testGetY() {\n\t\t//String verify = \"Returns the correct Y value for a Coordinate\";\n\t assertEquals(\"Returns the correct Y value for a Coordinate\", \n\t \t\torigin.getY(), 0.0, 0.0);\n\t assertEquals(\"Returns the correct Y value for a Coordinate\", \n\t \t\tbasic.getY(), 5.0, 0.0);\n\t assertEquals(\"Returns the correct Y value for a Coordinate\", \n\t \t\tbasic2.getY(), 9.0, 0.0);\n\t}",
"@Test\n public void testGetAndSetEnd(){\n largeMaze.setBegin(Maze.position(4,4));\n assertEquals(4, largeMaze.getBegin().getX());\n assertEquals(4, largeMaze.getBegin().getY());\n }",
"public double getCenterY() { return centerY.get(); }",
"public float getCentreY() {\n return centreY;\n }",
"@Test\r\n\tpublic void testGetPositionY(){\n\t\tWinnerTitle title = new WinnerTitle(1, 0, 0);\r\n\t\ttitle.setPositionY(25);\r\n\t\t\r\n\t\tassertEquals(25, title.getPositionY());\r\n\t}",
"@Test\r\n\t@Order(6)\r\n\tvoid testYmoreThanHundred() {\r\n\t\trobot.setY(1000);\r\n\t\tassertNotEquals(1000 , robot.getY() > 100 ,\"Y coord test failed\\nREASON: Values more than 100 not allowed!\");\r\n\t}",
"@Test\n void testUpdateGoaliePositionLimitsYmin() {\n goalie.setPosition(new Vector(goalie.getX(), 192f));\n\n // save the goalie position\n Vector prev_goalie_position = goalie.getPosition();\n\n // Set a moving direction for goalie in the negative minimum direction\n goalie.setNext_direction(new Vector(0,-1));\n\n // Generate a translation\n goalie.GenerateNextTranslation();\n\n // Apply translation\n goalie.UpdateGoaliePosition();\n\n // Check if new position is in the yMin position still\n // Check previous and new position are the same\n Vector new_goalie_position = goalie.getPosition();\n if (( prev_goalie_position.getY() - new_goalie_position.getY()) == 0)\n assertEquals(1,1);\n else {\n assertEquals(-1, 0, \"\\nFailed testUpdateGoaliePositionMovedLimitsYmin\" +\n \" Goalie moved past the Y-Min limit\");\n }\n }",
"@Test\n void testUpdateGoaliePositionLimitsYmax() {\n goalie.setPosition(new Vector(goalie.getX(), 512f));\n\n // save the goalie position\n Vector prev_goalie_position = goalie.getPosition();\n\n // Set a moving direction for goalie in the positive direction\n goalie.setNext_direction(new Vector(0,1));\n\n // Generate a translation\n goalie.GenerateNextTranslation();\n\n // Apply translation\n goalie.UpdateGoaliePosition();\n\n // Check if new position is in the yMin position still\n // Check previous and new position are the same\n Vector new_goalie_position = goalie.getPosition();\n if (( prev_goalie_position.getY() - new_goalie_position.getY()) == 0)\n assertEquals(1,1);\n else {\n assertEquals(1, 0, \"\\nFailed testUpdateGoaliePositionMovedLimitsYmax\" +\n \" Goalie moved past the Y-Max limit\");\n }\n\n }",
"public int getCenterY(){\r\n return centerY;\r\n }",
"@Test\r\n\t@Order(5)\r\n\tvoid testYnegative() {\r\n\t\trobot.setY(-100);\r\n\t\tassertNotEquals(-100, robot.getY() < 0 ,\"Y coord test failed\\nREASON: Values less than 0 not allowed!\");\r\n\t}",
"public void setY(int newY)\r\n {\r\n yCoord = newY;\r\n }",
"void setY(int newY) {\n this.yPos = newY;\n }",
"@Test\n void testTrackBallSameY() {\n goalie.setPosition(goalie.getX(),400);\n Vector result =\n goalie.TrackBallSetDirection(new Vector (120f,400), new Vector(-1,0));\n\n // when the goalieY == ballY the direction of movement should evaluate zero\n assertEquals(0, result.getY());\n }",
"public void setCentreY(float centreY) {\n this.centreY = centreY;\n }",
"private void assertCentreXProperty( double expected, double value ) {\n Spinner< Double > spinner = systemUnderTest.centreXSpinner();\n spinner.getValueFactory().valueProperty().set( value );\n \n Assert.assertEquals( expected, scenario.diamond.translateXProperty().get(), TestCommon.precision() );\n Assert.assertEquals( expected, scenario.triangle.translateXProperty().get(), TestCommon.precision() );\n Assert.assertEquals( expected, scenario.pentagon.translateXProperty().get(), TestCommon.precision() );\n shouldRetainOriginalConfigurationOfPolygon();\n }",
"public final float exactCenterY() {\n return (top + bottom) * 0.5f;\n }",
"public void setYCoordinates(double newY) { this.yCoordinates = newY; }",
"public void updateYLoc();",
"@Test\n void testTrackBallYMin() {\n goalie.TrackBallSetDirection(new Vector(45,187), new Vector(-0.5f,0.5f));\n // test if goalie direction is negative\n assertEquals(-1, goalie.getNext_direction().getY());\n }",
"@Test\r\n\tpublic void testSetPositionY(){\n\t\tWinnerTitle title = new WinnerTitle(1, 0, 0);\r\n\t\ttitle.setPositionY(25);\r\n\t\t\r\n\t\tassertEquals(25, title.getPositionY());\r\n\t}",
"public void testSetLocationNegY() {\n try {\n container.setLocation(new Point(1, -1));\n fail(\"the y of the point is -1, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }",
"@Test\r\n @Order(8)\r\n void YmoveDownTest() {\r\n \trobot.setY(100);\r\n \tassertNotEquals(robot.moveDown(), \"Move test failed\\nREASON: moveDown() out of bounds!\");\r\n }",
"public void setEndY(double y)\n {\n endycoord=y; \n }",
"abstract double getOrgY();",
"@Test\n public void testGetDeltaYRIGHT()\n {\n assertEquals(Direction.RIGHT.getDeltaY(), 0);\n }",
"double getEndY();",
"@Test\r\n\t@Order(7)\r\n\tvoid YmoveUpTest() {\r\n\t\trobot.setY(0);\r\n\t\tassertNotEquals(robot.moveUp(),\"Move test failed\\nREASON: moveUp() out of bounds!\");\r\n\t}",
"public void setCenterY(double y) { centerY.set(clamp(y, Y_MIN, Y_MAX)); }",
"@Test\n void testTrackBallYMax(){\n goalie.TrackBallSetDirection(new Vector(45,450),new Vector(-0.5f,0.5f));\n // test if goalie direction is positive\n assertEquals(1,goalie.getNext_direction().getY());\n }",
"public int getCenterY() {\n\t\t\treturn (int) origin.y + halfHeight;\n\t\t}",
"@Test\n\tpublic void testTGetY() {\n\t\tassertEquals(0, tank.getY());\n\t}",
"@Test\n public void testGetCenter() {\n int expResult = 3;\n int result = this.dummyDigitSize.getCenter();\n assertEquals(expResult, result);\n }",
"@Override\r\n\tpublic void setPositionY(int y) {\n\t\tif (!(y >= 0))\r\n\t\t\tthrow new PreConditionError(\"Error PreCondition: y >= 0\");\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\tsuper.setPositionY(y);\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\t// post: getPositionY() == y\r\n\t\tif (!(getPositionY() == y))\r\n\t\t\tthrow new PostConditionError(\"Error PostCondition: getPositionY() == y\");\r\n\t}",
"public void setYCoordinate(int newValue)\n {\n y = newValue;\n }",
"public double getEndY()\n {\n return endycoord; \n }",
"@Test\n public void testSetEndNotInMap(){\n smallMaze.setEnd(Maze.position(0, 23));\n }",
"@Test\n\tvoid testCheckCoordinates2() {\n\t\tassertTrue(DataChecker.checkCoordinate(-1));\n\t}",
"public void setY(int y){ yPosition = y; }",
"public int getYCenter() {\n return getYOrigin() + panelHeight/2;\n }",
"public int getY() {\r\n return (int) center.getY();\r\n }",
"public void resetY() {this.startY = 11.3f;}",
"public float getCenterY()\n\t{\n\t\treturn (this.sy / 2) + this.y;\n\t}",
"public void setY(int y) {\n\tbaseYCoord = y;\n}",
"@Test\n public void testGetDeltaYUP()\n {\n assertEquals(Direction.UP.getDeltaY(), -1);\n }",
"@Test\n public void testGetDeltaYDOWN()\n {\n assertEquals(Direction.DOWN.getDeltaY(), 1);\n }",
"public int getY() {\n return (int) center.getY();\n }",
"public void setYPosition(int newY) {\n this.yPosition = newY;\n }",
"@Test\n\tvoid testCheckCoordinates6() {\n\t\tassertTrue(DataChecker.checkCoordinate(90));\n\t}",
"public double getNewYPosition() {\n return newPosY;\n }",
"@Test\n public void testGetDeltaYLEFT()\n {\n assertEquals(Direction.LEFT.getDeltaY(), 0);\n }",
"private double centerY() {\n return (piece.boundingBox().getHeight() % 2) / 2.0;\n }",
"@Test\n\tvoid testCheckCoordinates7() {\n\t\tassertTrue(DataChecker.checkCoordinate(-90));\n\t}",
"@Test\n\tpublic void testXEnd() {\n\t\t\n\t\tdouble endX1 = 55.17, endX2 = 138.75;\n\t\tdouble v01 = 25, v02 = 38.6;\n\t\tdouble theta1 = 30, theta2 = 57;\n\t\tassertEquals(PhysicsEngine.findXEnd(v01, theta1, 0), endX1, DELTA);\n\t\tassertEquals(PhysicsEngine.findXEnd(v02, theta2, 0), endX2, DELTA);\n\t}",
"@Test\n public void eastMoveTest() {\n int eastInitialY = 0;\n Robot eastRobot = new Robot(0, eastInitialY, Direction.E);\n\n eastRobot.move(testBounds);\n Assert.assertEquals(1, eastRobot.getX());\n Assert.assertEquals(eastInitialY, eastRobot.getY());\n\n eastRobot.move(testBounds);\n Assert.assertEquals(2, eastRobot.getX());\n Assert.assertEquals(eastInitialY, eastRobot.getY());\n\n eastRobot.move(testBounds);\n Assert.assertEquals(3, eastRobot.getX());\n Assert.assertEquals(eastInitialY, eastRobot.getY());\n\n eastRobot.move(testBounds);\n Assert.assertEquals(4, eastRobot.getX());\n Assert.assertEquals(eastInitialY, eastRobot.getY());\n\n eastRobot.move(testBounds);\n Assert.assertEquals(4, eastRobot.getX());\n Assert.assertEquals(eastInitialY, eastRobot.getY());\n\n }",
"public void setY(int newY)\n\t{\n\t\ty+=newY;\n\t\tboundingBox = new Rectangle(x,y,width,height);\n\t}",
"@Test\n\tvoid testCheckCoordinates4() {\n\t\tassertFalse(DataChecker.checkCoordinate(-100));\n\t}",
"@Override\n\tpublic void setY(int y) {\n\t\t\n\t}",
"public void updateGridY();",
"public double getCenterY()\n {\n return mainVBox.getTranslateY() + (mainVBox.getHeight() / 2);\n }",
"public double getEndY() {\n\treturn v2.getY();\n }",
"@Test\n public void testcalAreaRectangle2() {\n double ex = 4;\n \n startPoint.setX(-1);\n startPoint.setY(-1);\n endPoint.setX(-3);\n endPoint.setY(-3);\n \n double ac = rec.calAreaRectangle(startPoint, endPoint);\n assertEquals(ex, ac, 0);\n }",
"public void setY(int y) { loc.y = y; }",
"public int getY() {\n return (int) this.center.getY();\n }",
"public void testGetOldBoundary() {\n assertEquals(\"Old boundary should be got correctly.\", event.getOldBoundary(), oldBoundary);\n }",
"public void testDockDockPointNegY() {\n try {\n container.dock(new DockImpl(), new Point(-1, 1));\n fail(\"the y of location is -1, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }",
"@Test\n public void testSetLocation_Coordinates() {\n System.out.println(\"setLocation\");\n Coordinates newLocation = new Coordinates(100,100);\n Enemy instance = new SuperEnemy(new Coordinates(220,220));\n instance.setLocation(newLocation);\n Coordinates expResult = new Coordinates(100, 100);\n Coordinates result = instance.getLocation();\n assertEqualsC(expResult,result);\n }",
"boolean hasHasYCoordinate();",
"@Test\n void testTrackBallYMid() {\n goalie.setPosition(goalie.getX(), 187f);\n\n // test ball y value equal 360 the goalie mid\n goalie.TrackBallSetDirection(new Vector(45f,360f), new Vector(-0.5f,0.5f));\n\n // goalie should move in pos direction to get to mid point in this case\n assertEquals(1,goalie.getNext_direction().getY());\n\n // test when goalie current position is greater than the middle\n goalie.setPosition(goalie.getX(), 480f);\n\n // test ball y = 360\n goalie.TrackBallSetDirection(new Vector(45f,360f), new Vector(-0.5f,0.5f));\n\n // goalie should move in negative direction to get to mid point in this case\n assertEquals(-1,goalie.getNext_direction().getY());\n\n }",
"@Test\n\tpublic void testTOutOfBoundsRightMargin2() {\n\t\ttank.setX(460);\n\t\tassertEquals(false, tank.isWithinMarginsRight());\n\t}",
"@Test\n public void testVerticalDisplacementTo() {\n System.out.println(\"Testing verticleDisplacementTo() for a range of different GPS coordinates\");\n double distancesExpected[] = {\n 555.998,\n -555.998,\n -555.998,\n 555.998,\n\t\t\t72.266,\n\t\t\t-72.266,\n\t\t\t-72.266,\n\t\t\t72.266\n };\n\t\t\n for (int i = 0; i < this.testCoordinates.length; i++) {\n double expResult = distancesExpected[i];\n double result = this.origin.verticalDisplacementTo(this.testCoordinates[i]);\n\t\t\tSystem.out.println(\"Expected: \" + expResult + \", Actual: \" + result);\n assertEquals(expResult, result, 0.1);\n }\n }",
"@RepeatedTest(10)\n @Test\n void afterUseMethod_setFly_AmmoShouldChange_nX_nY () {\n double x = ammo.getnX();\n double y = ammo.getnY();\n Point target = unit.getLookTarget().getPosition();\n target.setLocation(new Point(1000,1000));\n\n //when\n ammo.setFly();\n\n //then\n assertThat(ammo.getnX(),not(x));\n assertThat(ammo.getnY(),not(y));\n }",
"@Test\n public void testcalAreaRectangle1() {\n double ex = 4;\n \n startPoint.setX(1);\n startPoint.setY(1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calAreaRectangle(startPoint, endPoint);\n assertEquals(ex, ac, 0);\n }",
"public int getY() {\n\treturn baseYCoord;\n}",
"@Override\n\tpublic void setY(int y) {\n\n\t}",
"public void testGetNewPosition2() {\n WayPointEvent event = new WayPointEvent(edge, 0, offset);\n\n Point pt = edge.getWayPoints().get(0).getCenter();\n assertEquals(\"Failed to get the correct new position.\", new Point(50 + pt.x, 60 + pt.y),\n event.getNewPosition());\n }",
"public void setY(double newY) {\r\n y = newY;\r\n }",
"private void updatePosition (float newCenterX, float newCenterY) {\n centerX = newCenterX;\n centerY = newCenterY;\n\n atomSpriteBoundary.left = centerX - spriteLength/2;\n atomSpriteBoundary.right = centerX + spriteLength/2;\n atomSpriteBoundary.top = centerY - spriteHeight/2;\n atomSpriteBoundary.bottom = centerY + spriteHeight/2;\n }",
"public void verificaCoordenada() {\r\n\t\tif (X < 0) {\r\n\t\t\tX = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tX = X % Const.TAMANHO;\r\n\t\t}\r\n\r\n\t\tif (Y < 0) {\r\n\t\t\tY = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tY = Y % Const.TAMANHO;\r\n\t\t}\r\n\t}",
"private double yPos(double yMetres){\r\n\t\treturn -yMetres*14+canvas.getHeight();\r\n\t}",
"double getStartY();",
"@Test\n\tpublic void testTOutOfBoundsRightMargin3() {\n\t\ttank.setX(300);\n\t\tassertEquals(true, tank.isWithinMarginsRight());\n\t}",
"public void setY(double val) {\r\n\t\t this.yCoord = val;\r\n\t }",
"@Override\r\n\tpublic long getSurpriseBoxY(SurpriseBox surpriseBox) throws IllegalStateException\r\n\t{\r\n\t\tif (surpriseBox.getBoard() != null)\r\n\t\t{\r\n\t\t\treturn surpriseBox.getPosition().getCoordY();\r\n\t\t}\r\n\t\telse throw new IllegalStateException();\r\n\t}",
"double getPositionY();",
"double getPositionY();",
"double getPositionY();",
"@Test\n public void testCondition1() throws ArgumentOutOfBoundsException\n {\n // Check that position is changed as expected:\n Double[] expected = {5.0, 5.0, 1.0};\n _renderable.position(expected);\n Double actual[] = _renderable.position();\n assertEquals(\"x coordinate did not get set,\", expected[0], actual[0], 0.01);\n assertEquals(\"y coordinate did not get set,\", expected[1], actual[1], 0.01);\n assertEquals(\"z coordinate did not get set,\", expected[2], actual[2], 0.01);\n }",
"@Test\n\tpublic void testTOutOfBoundsRightMargin1() {\n\t\ttank.setX(550);\n\t\tassertEquals(false, tank.isWithinMarginsRight());\n\t}",
"public void setY(int theY)\r\n {\r\n y = theY;\r\n }",
"@Test\n public void testPositionEquals(){\n assertEquals(Maze.position(0,0), Maze.position(0,0));\n assertThat(Maze.position(1, 0), not(Maze.position(0, 0)));\n assertThat(Maze.position(0,0), not(Maze.position(0,1)));\n }",
"@Test\n public void testGetFinalCol() {\n setUp();\n assertEquals(1, move.getFinalCol());\n tearDown();\n }",
"@Test\n\tpublic void testYGivenT() {\n\t\t\n\t\tdouble y1 = 0, y2 = 7.6, y3 = 5.38, y4 = 3.76;\n\t\tdouble v0 = 25;\n\t\tdouble theta = 30;\n\t\tdouble t1 = 0, t2 = 1, t3 = 2, t4 = 2.2;\n\t\tassertEquals(PhysicsEngine.findYPos(v0, theta, t1, 0), y1, DELTA);\n\t\tassertEquals(PhysicsEngine.findYPos(v0, theta, t2, 0), y2, DELTA);\n\t\tassertEquals(PhysicsEngine.findYPos(v0, theta, t3, 0), y3, DELTA);\n\t\tassertEquals(PhysicsEngine.findYPos(v0, theta, t4, 0), y4, DELTA);\n\t\t\n\t\tdouble y5 = 0, y6 = 27.47, y7 = 45.13, y8 = 47.48;\n\t\tdouble v1 = 38.6;\n\t\tdouble phi = 57;\n\t\tassertEquals(PhysicsEngine.findYPos(v1, phi, t1, 0), y5, DELTA);\n\t\tassertEquals(PhysicsEngine.findYPos(v1, phi, t2, 0), y6, DELTA);\n\t\tassertEquals(PhysicsEngine.findYPos(v1, phi, t3, 0), y7, DELTA);\n\t\tassertEquals(PhysicsEngine.findYPos(v1, phi, t4, 0), y8, DELTA);\n\t}",
"public void testDockDockPointIntNegY() {\n try {\n container.dock(new DockImpl(), new Point(-1, 1), 1);\n fail(\"the y of location is -1, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }",
"@Override\n\tpublic void setY(float y) {\n\n\t}",
"public boolean isCenteringY() {\r\n return centeringY;\r\n }",
"@Test\n public void testGetOriginCol() {\n setUp();\n assertEquals(5, move.getOriginCol());\n tearDown();\n }",
"@Test\n public void testcalAreaRectangle3() {\n double ex = -4;\n \n startPoint.setX(1);\n startPoint.setY(1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calAreaRectangle(startPoint, endPoint);\n assertNotEquals(ex, ac, 0);\n }",
"protected void setYWithinBounds(double y) {\n\t\tif (getWorld() != null && (y < 0 || y >= getWorld().getWorldHeight()))\n\t\t\t\tterminate();\n\t\tsetY(Math.max(y, 0));\n\t}",
"@Override\n\tpublic int getY() {\n\t\treturn logicY;\n\t}"
] | [
"0.70262057",
"0.6955472",
"0.67523676",
"0.66334254",
"0.662557",
"0.64929414",
"0.64803934",
"0.6388558",
"0.637309",
"0.6362346",
"0.63358206",
"0.632661",
"0.6289147",
"0.6283973",
"0.62742615",
"0.62729496",
"0.6270809",
"0.62630224",
"0.6258003",
"0.62540936",
"0.6251172",
"0.6241426",
"0.6220804",
"0.6203396",
"0.617981",
"0.6174015",
"0.6166112",
"0.61658573",
"0.6163412",
"0.6149744",
"0.61424947",
"0.6124596",
"0.6118804",
"0.6060251",
"0.6044473",
"0.60160035",
"0.600488",
"0.5997264",
"0.59868103",
"0.5976142",
"0.59723943",
"0.59720623",
"0.5971901",
"0.5968164",
"0.5957067",
"0.5955773",
"0.59484524",
"0.5927",
"0.5926252",
"0.59244657",
"0.5919749",
"0.59158623",
"0.59093726",
"0.59022385",
"0.590109",
"0.588594",
"0.5870616",
"0.58697194",
"0.5857615",
"0.5855668",
"0.5853484",
"0.5847603",
"0.584349",
"0.5829144",
"0.582893",
"0.581973",
"0.58187705",
"0.5800652",
"0.57997835",
"0.5796751",
"0.5796186",
"0.57951474",
"0.5793277",
"0.5791929",
"0.57847583",
"0.5769052",
"0.5767531",
"0.5753432",
"0.57168853",
"0.57161105",
"0.5714823",
"0.57147545",
"0.57016265",
"0.5695487",
"0.5693756",
"0.5693756",
"0.5693756",
"0.56931895",
"0.56927145",
"0.5691989",
"0.56905776",
"0.5684476",
"0.5684024",
"0.5680244",
"0.56796443",
"0.567386",
"0.5661672",
"0.56581444",
"0.5646128",
"0.5645713"
] | 0.7774567 | 0 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.settings, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68515885",
"0.68467957",
"0.68194443",
"0.6817494",
"0.6813087",
"0.6813087",
"0.6812847",
"0.6805774",
"0.6801204",
"0.6797914",
"0.6791314",
"0.6789091",
"0.67883503",
"0.6783642",
"0.6759701",
"0.6757412",
"0.67478645",
"0.6744127",
"0.6744127",
"0.67411774",
"0.6740183",
"0.6726017",
"0.6723245",
"0.67226785",
"0.67226785",
"0.67208904",
"0.67113477",
"0.67079866",
"0.6704564",
"0.6699229",
"0.66989094",
"0.6696622",
"0.66952467",
"0.66865396",
"0.6683476",
"0.6683476",
"0.6682188",
"0.6681209",
"0.6678941",
"0.66772443",
"0.6667702",
"0.66673946",
"0.666246",
"0.6657578",
"0.6657578",
"0.6657578",
"0.6656586",
"0.66544783",
"0.66544783",
"0.66544783",
"0.66524047",
"0.6651954",
"0.6650132",
"0.66487855",
"0.6647077",
"0.66467404",
"0.6646615",
"0.66464466",
"0.66449624",
"0.6644209",
"0.6643461",
"0.6643005",
"0.66421187",
"0.6638628",
"0.6634786",
"0.6633529",
"0.6632049",
"0.6632049",
"0.6632049",
"0.66315657",
"0.6628954",
"0.66281766",
"0.6627182",
"0.6626297",
"0.6624309",
"0.6619582",
"0.6618876",
"0.6618876"
] | 0.0 | -1 |
all events will be received here get message | @Override
public void onReceive(Context context, Intent intent) {
srvrMessage = intent.getStringExtra("message");
if (srvrMessage != null) {
String[] parametreler = srvrMessage.split("&");
String[] esitlik;
final Dictionary<String, String> collection = new Hashtable<String, String>(parametreler.length);
for (String parametre : parametreler) {
esitlik = parametre.split("=");
if (esitlik.length == 2)
collection.put(esitlik[0], esitlik[1]);
}
String gelenkomut = collection.get("komut");
GlobalApplication.Komutlar komut;
try
{
komut = GlobalApplication.Komutlar.valueOf(gelenkomut);
}
catch (Exception ex)
{
komut = GlobalApplication.Komutlar.Default;
}
switch (komut)
{
case guncellemeyiBaslat:
veriGuncellemeyiBaslat();
break;
case dosyalar:
kacinci = Integer.parseInt(collection.get("kacinci"));
kacinci++;
g.commonAsyncTask.client.sendMessage("komut=veriGonder&kacinci=" + kacinci + "&sadeceXML=0");
break;
case aktarimTamamlandi:
runOnUiThread(new Runnable() {
@Override
public void run() {
alertDialog.show();
SetViewGroupEnabled.setViewGroupEnabled((RelativeLayout) findViewById(R.id.settings), true);
if(g.bitmapDictionary !=null && g.bitmapDictionary.size()>0)
g.bitmapDictionary = null;
}
});
dosyaAktarimiVarMi = false;
break;
case modemBilgileri:
SharedPreferences.Editor editor = preferences.edit();
try {
editor.putString("SSID", collection.get("SSID"));
editor.putString("ModemSifresi", collection.get("Sifre"));
editor.apply();
showAlertDialog = new ShowAlertDialog();
AlertDialog alertDialog = showAlertDialog.showAlert(context, "Kayıt başarılı",
"Modem bilgileri kayıt edildi.");
alertDialog.show();
} catch (Exception e) {
showAlertDialog = new ShowAlertDialog();
AlertDialog alertDialog = showAlertDialog.showAlert(context, "Kayıt başarısız!",
"Modem bilgileri kayıt edilemedi.");
alertDialog.show();
}
default:
break;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onRecieve(RoundTimeMessage message) {\n\n\n }",
"public void handleMessageEvent(StunMessageEvent e) {\n delegate.processRequest(e);\n }",
"private void readEvent() {\n\t\t\t\n\t\t\thandlePacket();\n\t\t\t\n\t\t}",
"@Override\n public void onMessageReceived(MessageEvent messageEvent) {\n if (messageEvent.getPath().equals(\"/watch/newSmokeEvents\")) {\n\n /* ...retrieve the message */\n final byte[] receivedEvents = messageEvent.getData();\n\n Intent messageIntent = new Intent();\n messageIntent.setAction(Intent.ACTION_SEND);\n messageIntent.putExtra(\"NEW_EVENTS_DATA\", receivedEvents);\n\n /* Broadcast the received Data Layer messages locally -> send to Synchronize */\n LocalBroadcastManager.getInstance(this).sendBroadcast(messageIntent);\n }\n else if (messageEvent.getPath().equals(\"/watch/newSensorData\")){\n\n Intent synchronizeServiceIntent = new Intent(this, SynchronizeService.class);\n synchronizeServiceIntent.putExtra(\"RECEIVED_SYNC_HASH_LIST_REQUEST\", true);\n SynchronizeService.enqueueWork(this, synchronizeServiceIntent);\n\n }\n else {\n super.onMessageReceived(messageEvent);\n }\n\n }",
"private void getMessage(MessageEvent messageEvent) {\n if(GUI.getInstance().getBusiness().getCurrentChat() != null && messageEvent.getMessageIn().getChatId() == GUI.getInstance().getBusiness().getCurrentChat().getId()) {\n Platform.runLater(() -> {\n IMessageIn message = messageEvent.getMessageIn();\n messages.add(message);\n });\n }\n }",
"void onMessageReceived(Message message);",
"public void listReceivedEvents() {\r\n for (Event event : receivedEvents) {\r\n System.out.print(event);\r\n }\r\n }",
"@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}",
"public void OnMessageReceived(String msg);",
"@Override\n public void onEvent(EMNotifierEvent event) {\n message = (EMMessage) event.getData();\n messageBean.setGetMsgCode(MessageContant.receiveMsgByListChanged);\n messageBean.setEmMessage(message);\n\n eventBus.post(messageBean);\n }",
"public EventOccurrence getReceiveEvent();",
"@Subscribe(threadMode = ThreadMode.MAIN)\n public void onMessageEvent(MessageEventBus event) {\n for (int i = 0; i < list.size(); i++) {\n User userData = list.get(i);\n Integer id = userData.getId();\n String name = userData.getName();\n String username = userData.getUsername();\n String email = userData.getEmail();\n Log.i(\"@@@@@\", \"onMessageEvent : userData : \" + userData.toString());\n textView.append(\"User Id : \" + id + \"\\n\" + \"Name : \" + name + \"\\n\" + \"UserName : \" + username + \"\\n\" + \"Email : \" + email + \"\\n\\n\");\n }\n Toast.makeText(this, event.message, Toast.LENGTH_LONG).show();\n }",
"@Override\r\n\tpublic IMessageEvents getMessageEvents() {\r\n\t\treturn replay.messageEvents;\r\n\t}",
"EventType getEvent();",
"public void receive(Message message) {\n try {\n if (logObj.isDebugEnabled()) {\n logObj.debug(\"Received Message from: \" + message.getSrc());\n }\n\n CayenneEvent event = messageObjectToEvent((Serializable) message.getObject());\n if (event != null) {\n if (logObj.isDebugEnabled()) {\n logObj.debug(\"Received CayenneEvent: \" + event.getClass().getName());\n }\n\n onExternalEvent(event);\n }\n } catch (Exception ex) {\n logObj.info(\"Exception while processing message: \", ex);\n }\n\n }",
"private static void send() {\n Map<String, ArrayList<Event>> eventsByStream = new HashMap<>();\n for (Event event : QUEUE) {\n String stream = event.getStream();\n if (!eventsByStream.containsKey(stream) || eventsByStream.get(stream) == null) {\n eventsByStream.put(stream, new ArrayList<>());\n }\n eventsByStream.get(stream).add(event);\n }\n for (String stream : eventsByStream.keySet()) {\n if (Prefs.INSTANCE.isEventLoggingEnabled()) {\n sendEventsForStream(STREAM_CONFIGS.get(stream), eventsByStream.get(stream));\n }\n }\n }",
"void onBusEvent(Event event);",
"@Override\n\tpublic void msgReceived(Message msg) {\n\n\t}",
"void onMessageRead(byte[] data);",
"public void pipeMsgEvent ( PipeMsgEvent event ){\r\n\t// Get the message object from the event object\r\n\tMessage msg=null;\r\n\ttry {\r\n\t msg = event.getMessage();\r\n\t if (msg == null)\r\n\t\treturn;\r\n\t} \r\n\tcatch (Exception e) {\r\n\t e.printStackTrace();\r\n\t return;\r\n\t}\r\n\t\r\n\t// Get the String message element by specifying the element tag\r\n\tMessageElement newMessage = msg.getMessageElement(TAG);\r\n\tif (newMessage == null)\t\t\t\r\n\t System.out.println(\"null msg received\");\r\n\telse\r\n\t System.out.println(\"Received message: \" + newMessage);\r\n }",
"Event getEvent();",
"@Override\n public void onMessage(Message message) {\n try {\n // Generate data\n QueueProcessor processor = getBean(QueueProcessor.class);\n ServiceData serviceData = processor.parseResponseMessage(response, message);\n\n // If return is a DataList or Data, parse it with the query\n if (serviceData.getClientActionList() == null || serviceData.getClientActionList().isEmpty()) {\n serviceData = queryService.onSubscribeData(query, address, serviceData, parameterMap);\n } else {\n // Add address to client action list\n for (ClientAction action : serviceData.getClientActionList()) {\n action.setAddress(getAddress());\n }\n }\n\n // Broadcast data\n broadcastService.broadcastMessageToUID(address.getSession(), serviceData.getClientActionList());\n\n // Log sent message\n getLogger().log(QueueListener.class, Level.DEBUG,\n \"New message received from subscription to address {0}. Content: {1}\",\n getAddress().toString(), message.toString());\n } catch (AWException exc) {\n broadcastService.sendErrorToUID(address.getSession(), exc.getTitle(), exc.getMessage());\n\n // Log error\n getLogger().log(QueueListener.class, Level.ERROR, \"Error in message from subscription to address {0}. Content: {1}\", exc,\n getAddress().toString(), message.toString());\n } catch (Exception exc) {\n broadcastService.sendErrorToUID(address.getSession(), null, exc.getMessage());\n\n // Log error\n getLogger().log(QueueListener.class, Level.ERROR, \"Error in message from subscription to address {0}. Content: {1}\", exc,\n getAddress().toString(), message.toString());\n }\n }",
"private void onMessage(JsonRpcMessage msg) {\n List<JsonRpcMessage> extraMessages = super.handleMessage(msg, true);\n notifyMessage(msg);\n for(JsonRpcMessage extraMsg: extraMessages) {\n notifyMessage(extraMsg);\n }\n }",
"public void testRequestsAndNotifications() {\n final ArrayList<String> results = new ArrayList<String>();\n ArrayList<String> resultsExpected = new ArrayList<String>();\n resultsExpected.add(\"deliveredNotificationRequested\");\n resultsExpected.add(\"composingNotificationRequested\");\n resultsExpected.add(\"displayedNotificationRequested\");\n resultsExpected.add(\"offlineNotificationRequested\");\n resultsExpected.add(\"deliveredNotification\");\n resultsExpected.add(\"displayedNotification\");\n resultsExpected.add(\"composingNotification\");\n resultsExpected.add(\"cancelledNotification\");\n\n // Create a chat for each connection\n Chat chat1 = getConnection(0).getChatManager().createChat(getBareJID(1), null);\n\n MessageEventManager messageEventManager1 = new MessageEventManager(getConnection(0));\n messageEventManager1\n .addMessageEventNotificationListener(new MessageEventNotificationListener() {\n public void deliveredNotification(String from, String packetID) {\n results.add(\"deliveredNotification\");\n }\n\n public void displayedNotification(String from, String packetID) {\n results.add(\"displayedNotification\");\n }\n\n public void composingNotification(String from, String packetID) {\n results.add(\"composingNotification\");\n }\n\n public void offlineNotification(String from, String packetID) {\n results.add(\"offlineNotification\");\n }\n\n public void cancelledNotification(String from, String packetID) {\n results.add(\"cancelledNotification\");\n }\n });\n\n MessageEventManager messageEventManager2 = new MessageEventManager(getConnection(1));\n messageEventManager2\n .addMessageEventRequestListener(new DefaultMessageEventRequestListener() {\n public void deliveredNotificationRequested(\n String from,\n String packetID,\n MessageEventManager messageEventManager) {\n super.deliveredNotificationRequested(from, packetID, messageEventManager);\n results.add(\"deliveredNotificationRequested\");\n }\n\n public void displayedNotificationRequested(\n String from,\n String packetID,\n MessageEventManager messageEventManager) {\n super.displayedNotificationRequested(from, packetID, messageEventManager);\n results.add(\"displayedNotificationRequested\");\n }\n\n public void composingNotificationRequested(\n String from,\n String packetID,\n MessageEventManager messageEventManager) {\n super.composingNotificationRequested(from, packetID, messageEventManager);\n results.add(\"composingNotificationRequested\");\n }\n\n public void offlineNotificationRequested(\n String from,\n String packetID,\n MessageEventManager messageEventManager) {\n super.offlineNotificationRequested(from, packetID, messageEventManager);\n results.add(\"offlineNotificationRequested\");\n }\n });\n\n // Create the message to send with the roster\n Message msg = new Message();\n msg.setSubject(\"Any subject you want\");\n msg.setBody(\"An interesting body comes here...\");\n // Add to the message all the notifications requests (offline, delivered, displayed,\n // composing)\n MessageEventManager.addNotificationsRequests(msg, true, true, true, true);\n\n // Send the message that contains the notifications request\n try {\n chat1.sendMessage(msg);\n messageEventManager2.sendDisplayedNotification(getBareJID(0), msg.getPacketID());\n messageEventManager2.sendComposingNotification(getBareJID(0), msg.getPacketID());\n messageEventManager2.sendCancelledNotification(getBareJID(0), msg.getPacketID());\n // Wait up to 2 seconds\n long initial = System.currentTimeMillis();\n while (System.currentTimeMillis() - initial < 2000 &&\n (!results.containsAll(resultsExpected))) {\n Thread.sleep(100);\n }\n assertTrue(\n \"Test failed due to bad results (1)\" + resultsExpected,\n resultsExpected.containsAll(results));\n assertTrue(\n \"Test failed due to bad results (2)\" + results,\n results.containsAll(resultsExpected));\n\n } catch (Exception e) {\n fail(\"An error occured sending the message\");\n }\n }",
"protected void ProcessOutboundEvent(XMSEvent evt){\n switch(evt.getEventType()){\n case CALL_CONNECTED:\n System.out.println(\"***** Outbound call connected *****\");\n SetOutboundCallState(OutboundCallStates.CALLCONNECTED);\n ConnectCalls();\n break;\n case CALL_RECORD_END:\n \n break; \n case CALL_SENDDTMF_END:\n System.out.println(\"***** END_DTMF *****\");\n System.out.println(\"***** ReJoin Calls *****\");\n ConnectCalls();\n \n break; \n case CALL_DTMF:\n \n System.out.println(\"***** outbound CALL_DTMF *****\");\n System.out.println(\"data=\" + evt.getData());\n myInboundCall.SendInfo(\"DTMF_\" + evt.getData());\n \n break; \n case CALL_INFO:\n \n System.out.println(\"***** Outbound CALL_INFO *****\");\n System.out.println(\"data=\" + evt.getData());\n myInboundCall.SendInfo(evt.getData());\n\n break;\n case CALL_PLAY_END:\n //May need to do something here\n break;\n case CALL_DISCONNECTED: // The far end hung up will simply wait for the media\n System.out.println(\"***** outbound CALL_Disconnected *****\");\n DisconnectCalls();\n break;\n default:\n System.out.println(\"Unknown Event Type!!\");\n }\n }",
"@Override\n public void onReceive(Object msg) throws Exception {\n }",
"EventHubs eventHubs();",
"public void handleMessageReceived(SessionEvent event) {\n \t\tfor(int i = 0; i < getMessageListeners().size(); i++) {\n \t\t\tIMessageListener l = (IMessageListener) getMessageListeners().get(i);\n \t\t\tID from = makeIDFromName(event.getFrom());\n \t\t\tID to = makeIDFromName(event.getTo());\n \t\t\tl.handleMessage(\n \t\t\t\t\tfrom, \n \t\t\t\t\tto, \n \t\t\t\t\tIMessageListener.Type.NORMAL, \n \t\t\t\t\tevent.getFrom(), \n \t\t\t\t\tevent.getMessage());\n \t\t}\n \t}",
"public void onMessage(Session session);",
"@Override\n public void handleMessage(Message msg) {\n System.out.println(\"recibe mensajes ...\");\n System.out.println(msg.obj);\n }",
"@Override\r\n\tpublic void messageReceived(Object obj) {\n\t\t\r\n\t}",
"@Override\r\n public void handleMessage(Message msg) {\n }",
"private void delegate(MessageEvent event) throws IOException {\n MessageChannel channel = event.getChannel();\n BullyAlgorithmParticipantImpl.Message messageType = BullyAlgorithmParticipantImpl.Message.valueOf(event.getActionCommand());\n\n int senderProcessId = 0;\n try {\n senderProcessId = channel.readNextInt();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n switch(messageType) {\n case Election:\n self.onElectionMessage(senderProcessId);\n break;\n case Answer:\n self.onAnswerMessage(senderProcessId);\n break;\n case Victory:\n self.onVictoryMessage(senderProcessId);\n break;\n }\n }",
"@Override\n public void handleMessage(Message msg) {\n Bundle data = msg.getData();\n if (data.containsKey(\"command\")) {\n if (data.getString(\"command\").equalsIgnoreCase(\"get_data\")) {\n mGetDataMessenger = msg.replyTo;\n getData();\n }\n }\n }",
"@Override\n public void run() {\n Message message = new Message();\n message.what=1;\n handler.sendMessage(message);\n }",
"public void testSendMessageEventRequest() {\n // Create a chat for each connection\n Chat chat1 = getConnection(0).getChatManager().createChat(getBareJID(1), null);\n\n // Create the message to send with the roster\n Message msg = new Message();\n msg.setSubject(\"Any subject you want\");\n msg.setBody(\"An interesting body comes here...\");\n // Add to the message all the notifications requests (offline, delivered, displayed,\n // composing)\n MessageEventManager.addNotificationsRequests(msg, true, true, true, true);\n\n // Send the message that contains the notifications request\n try {\n chat1.sendMessage(msg);\n } catch (Exception e) {\n fail(\"An error occured sending the message\");\n }\n }",
"@Override\n\t\t\tpublic void onEmsgOpenedListener() {\n\t\t\t\t\n\t\t\t}",
"protected void queryMsg() {\n\t\tif (currentPosition == 0) {//LIVE\n\t\t\tobtainLiveData(true, currentPosition, liveMaxChatId);\n\t\t} else {//CHAT\n\t\t\tobtainChatData(true, currentPosition, chatModels.get(0).getChatId());\n\t\t}\n\t}",
"public void messageReceived(Message m) {\n\t\t\r\n\t}",
"public void doService() {\n EventManager eventManager = new EventManager();\n while (!queue.isEmpty()) {\n Event firstEvent = queue.poll();\n if (!(firstEvent instanceof ServerBackEvent) &&\n !(firstEvent instanceof ServerRestEvent)) {\n System.out.println(firstEvent);\n } \n Event nextEvent = eventManager.getNext(servers, gen, firstEvent, stats, probability);\n if (nextEvent != null) {\n queue.add(nextEvent);\n }\n }\n System.out.println(stats);\n \n\n }",
"@Override\n public void run() {\n Message message = mHandler.obtainMessage(1);\n mHandler.sendMessage(message);\n }",
"private void receiveMessage() {\n ParseQuery<ParseObject> refreshQuery = ParseQuery.getQuery(\"Group\");\n\n refreshQuery.getInBackground(mGroupId, new GetCallback<ParseObject>() {\n @Override\n public void done(ParseObject parseObject, ParseException e) {\n if (e == null) {\n chatMessageArray = parseObject.getList(\"groupMessageArray\");\n\n messageArrayList.clear();\n messageArrayList.addAll(chatMessageArray);\n chatListAdapter.notifyDataSetChanged();\n chatLV.invalidate();\n } else {\n System.out.println(e.getMessage());\n }\n }\n });\n }",
"@EventName(\"receivedMessageFromTarget\")\n EventListener onReceivedMessageFromTarget(EventHandler<ReceivedMessageFromTarget> eventListener);",
"@Test\n public void testEventMessageContent() throws Exception {\n CountDownLatch latch = new CountDownLatch(1);\n EventContentClient eventContentClient = new EventContentClient(latch);\n\n try (EventStream streamEvents = new WebSocketEventStream(uri, new Token(\"token\"),\n 0, 0, 0, eventContentClient)) {\n latch.await(30, TimeUnit.SECONDS);\n synchronized (eventContentClient.events) {\n Event event = eventContentClient.events.get(1);\n Assert.assertTrue(event.getData().containsKey(\"jid\"));\n Assert.assertEquals(\"20150505113307407682\", event.getData().get(\"jid\"));\n }\n }\n }",
"public void transmitEvents(){\n Log.info(\"Transmitting Events\", EventShare.class);\n for(Entry<Class, List<EventTrigger>> eventGroup: HandlerRegistry.getHandlers().entrySet()){\n String annotation = eventGroup.getKey().getName();\n for(EventTrigger trigger : eventGroup.getValue()){\n if(trigger.getServer()!=this) { // do not send own events...\n if(trigger.getMethod()!=null){ // its a local event\n if(trigger.getMethod().isAnnotationPresent(ES.class)){\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }else {\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n }",
"@Override\r\n\tpublic void run() {\r\n\t\twhile(true){\r\n\t\t\ttry {\r\n\t\t\tLiftEvent event = connection.receive();\r\n\t\t\tLiftAction liftAction = eventActionMap.get(event.getClass());\r\n\r\n\t\t\tliftAction.execute(event);\r\n\t\t\t} catch(Exception e) {\r\n\t\t e.printStackTrace();\r\n\t\t throw new RuntimeException(e);\r\n\t\t } \r\n\t\t}\t\r\n\t}",
"private void messageRecv(M msg) {\n if (LOG.isTraceEnabled()) {\n LOG.trace(\"messageRecv = {}\", msg);\n } else if (LOG.isDebugEnabled()) {\n LOG.debug(\"messageRecv = {}\", msg.getClass().getName());\n }\n\n synchronized (_subscribers) {\n for (SubscriberImpl subscriber : _subscribers) {\n subscriber.message(msg);\n }\n }\n }",
"@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n int event = msg.arg1;\n int result = msg.arg2;\n Object data = msg.obj;\n Log.e(\"event\", \"event=\"+event);\n if (result == SMSSDK.RESULT_COMPLETE) {\n //短信注册成功后,返回MainActivity,然后提示新好友\n if (event == SMSSDK.EVENT_SUBMIT_VERIFICATION_CODE) {//提交验证码成功,验证通过\n Toast.makeText(getApplicationContext(), \"验证码校验成功\", Toast.LENGTH_SHORT).show();\n handlerText.sendEmptyMessage(2);\n } else if (event == SMSSDK.EVENT_GET_VERIFICATION_CODE){//服务器验证码发送成功\n reminderText();\n Toast.makeText(getApplicationContext(), \"验证码已经发送\", Toast.LENGTH_SHORT).show();\n }else if (event ==SMSSDK.EVENT_GET_SUPPORTED_COUNTRIES){//返回支持发送验证码的国家列表\n Toast.makeText(getApplicationContext(), \"获取国家列表成功\", Toast.LENGTH_SHORT).show();\n }\n } else {\n if(flag){\n btnGetCode.setVisibility(View.VISIBLE);\n Toast.makeText(RegiestActivity.this, \"验证码获取失败,请重新获取\", Toast.LENGTH_SHORT).show();\n tvTel.requestFocus();\n }else{\n ((Throwable) data).printStackTrace();\n int resId = getStringRes(RegiestActivity.this, \"smssdk_network_error\");\n Toast.makeText(RegiestActivity.this, \"验证码错误\", Toast.LENGTH_SHORT).show();\n tvCode.selectAll();\n if (resId > 0) {\n Toast.makeText(RegiestActivity.this, resId, Toast.LENGTH_SHORT).show();\n }\n }\n\n }\n }",
"abstract void onMessage(byte[] message);",
"@Override\n public void run() {\n Message message = new Message();\n message.what = 4;\n handler.sendMessage(message);\n }",
"public void handleMessageEvent(StunMessageEvent e) {\n delegate.handleMessageEvent(e);\n }",
"public void handleMessageEvent(StunMessageEvent e) {\n delegate.handleMessageEvent(e);\n }",
"@Override\n\tpublic void ActOnNotification(String message) {\n\t \tSystem.out.println(\"Sending Event\");\n\t}",
"private void receiveAndDispatchMessage() {\n String response = null;\n try {\n while((response = bufferedReader.readLine()) != null) {\n System.out.println(\"received message from server: \" + response);\n String messageKind = \"\";\n if(response.contains(\":\")) {\n messageKind = response.substring(0, response.indexOf(\":\"));\n } else {\n messageKind = response;\n }\n Bundle bundle = new Bundle();\n bundle.putString(\"response\", response);\n switch (messageKind) {\n case ClientMessageKind.SIGNUPDENIED:\n case ClientMessageKind.SIGNUPOK:\n if(resultReceiverMap.keySet().contains(ActivityNames.COMMONSIGNUPACTIVITY)) {\n resultReceiverMap.get(ActivityNames.COMMONSIGNUPACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.SIGNINDENIED:\n case ClientMessageKind.SIGNINOK:\n if(resultReceiverMap.keySet().contains(ActivityNames.COMMONSIGNINACTIVITY)) {\n resultReceiverMap.get(ActivityNames.COMMONSIGNINACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.DRIVERLOC:\n if(resultReceiverMap.keySet().contains(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.PASSENGERLOC:\n if(resultReceiverMap.keySet().contains(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.CHATFROMDRIVER:\n if(resultReceiverMap.keySet().contains(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.CHATFROMPASSENGER:\n if(resultReceiverMap.keySet().contains(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.PASSENGERDEST:\n if(resultReceiverMap.containsKey(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.STARTRIDE:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n } else if(resultReceiverMap.containsKey(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.ENDRIDE:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERENDSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERENDSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.DRIVERCANCEL:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.PASSENGERCANCEL:\n if(resultReceiverMap.containsKey(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.UPDATEPASSENGERPROFILEDENIED:\n case ClientMessageKind.UPDATEPASSENGERPROFILEOKAY:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERUPDATEPROFILEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERUPDATEPROFILEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.UPDATEDRIVERPROFILEDENIED:\n case ClientMessageKind.UPDATEDRIVERPROFILEOKAY:\n if(resultReceiverMap.containsKey(ActivityNames.DRIVERUPDATEPROFILEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERUPDATEPROFILEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.DRIVERREQUESTLOC:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.PASSENGERREQUESTLOC:\n if(resultReceiverMap.containsKey(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n default:\n break;\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n filterDayWise();\n }",
"@Override\n\tpublic void onMessageMainThread(Object object) {\n\t\tif(object!=null&&object instanceof KinderEventMessage)\n\t\t{\n\t\t\tKinderEventMessage msg=(KinderEventMessage)object;\n\t\t\tswitch(msg.getCode())\n\t\t\t{\n\t\t\tcase KinderEventMessage.MSG_GETARTICLES_START:\n\t\t\t\tstart_getData(msg.getObj());\n\t\t\t\tbreak;\n\t\t\tcase KinderEventMessage.MSG_GETARTICLES_SUCCESS:\n\t\t\t\tsucc_getData(msg.getObj());\n\t\t\t\tbreak;\n\t\t\tcase KinderEventMessage.MSG_GETARTICLES_FAIL:\n\t\t\t\tfail_getData(msg.getObj());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void handleMessage(Message message) {}",
"public void checkEvents()\n\t{\n\t\t((MBoxStandalone)events).processMessages();\n\t}",
"private void send() {\n vertx.eventBus().publish(GeneratorConfigVerticle.ADDRESS, toJson());\n }",
"@Override\n\tpublic void onMessage(Object arg0) {\n\t\t\n\t}",
"@Override\n public Object getEvent() {\n return eventObj;\n }",
"@Override\n public void onReceive(Object message) throws Exception {\n }",
"protected void ProcessInboundEvent(XMSEvent evt){\n \n FunctionLogger logger=new FunctionLogger(\"ProcessInboundEvent\",this,myLogger);\n logger.args(evt);\n try{\n switch(evt.getEventType()){\n case CALL_OFFERED:\n System.out.println(\"***** Inbound CALL_Offered *****\");\n SetGatewayState(GatewayStates.ESTABLISHING);\n SetInboundCallState(InboundCallStates.ACCEPTCALL);\n //Should there ba an accept Call\n\n StartOutboundCall(evt.getCall().getCalledAddress(),evt.getCall().getConnectionAddress());\n \n break;\n case CALL_CONNECTED:\n System.out.println(\"***** Inbound CALL_Connected *****\");\n SetInboundCallState(InboundCallStates.CALLCONNECTED);\n StartOutboundCall(evt.getCall().getCalledAddress(),evt.getCall().getConnectionAddress());\n if(PlayRingbackFlag ){\n myInboundCall.PlayOptions.SetMediaType(XMSMediaType.VIDEO);\n myInboundCall.Play(RingbackFile);\n } \n break;\n \n case CALL_INFO:\n \n System.out.println(\"***** Inbound CALL_INFO *****\");\n System.out.println(\"data=\" + evt.getData());\n myOutboundCall.SendInfo(evt.getData());\n \n break;\n case CALL_DTMF:\n \n System.out.println(\"***** inbound CALL_DTMF *****\");\n System.out.println(\"data=\" + evt.getData());\n \n UnJoinCalls(); \n SendDTMF(evt.getData()); \n \n break; \n case CALL_SENDDTMF_END:\n \n System.out.println(\"***** END_DTMF *****\");\n System.out.println(\"***** ReJoin Calls *****\");\n ConnectCalls();\n \n break;\n \n case CALL_RECORD_END:\n break; \n case CALL_PLAY_END:\n break;\n case CALL_DISCONNECTED: \n System.out.println(\"***** inbound CALL_Disconnected *****\");\n DisconnectCalls();\n break;\n default:\n System.out.println(\"Unknown Event Type!!\");\n }\n }catch(XMSGatewayOutboundCallException e){\n logger.info(\"Error is received\",e);\n }\n }",
"EventBus getEventBus();",
"public void messageReceived(OscMessage aMessage);",
"com.walgreens.rxit.ch.cda.EIVLEvent getEvent();",
"@Subscribe(threadMode = ThreadMode.MAIN)\n public void onMessageEvent(MessageEvent event) {\n btn.setText(event.Message);\n }",
"@Override\n public void publish(Event<? extends Enum, ?> event) {\n byte[] body = null;\n if (null == event) {\n log.error(\"Captured event is null...\");\n return;\n }\n if (event instanceof DeviceEvent) {\n body = bytesOf(MQUtil.json((DeviceEvent) event));\n } else if (event instanceof TopologyEvent) {\n body = bytesOf(MQUtil.json((TopologyEvent) event));\n } else if (event instanceof LinkEvent) {\n body = bytesOf(MQUtil.json((LinkEvent) event));\n } else {\n log.error(\"Invalid event: '{}'\", event);\n return;\n }\n processAndPublishMessage(body);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"SCXTT\", \"in ShowMapActivity we got a GCM and they successfully told us about it message:\" + message);\n Toast.makeText(context, \"Receiving Updates\", Toast.LENGTH_SHORT).show();\n postGetRoomMessages();\n\n //do other stuff here\n }",
"@Override\r\n public void onReceiveResult(Message message) {\r\n switch (message.what) {\r\n //TODO\r\n }\r\n }",
"public interface OnEventAvailableListener {\n\tpublic void OnEventAvailable(Message msg);\n}",
"public String getEventName();",
"@Override\n\tpublic void handleEvent(EnOceanMessage data) {\n\t}",
"@Override\n\tpublic void onChatReceived(ChatEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void handleMessage(Message msg) {\n\t Message msgg=null;\n\t\tswitch (msg.what) {\n\t\tcase MSG_GET_RSS_DATA:\n\t\t\tif(null!=handler){\n//\t\t\t\tString keyword = (String)msg.obj;\n//\t\t\t\thandler.sendEmptyMessage(MSG_DIALOG_SHOW);\n//\t\t\t\tmsgg = handler.obtainMessage(MSG_UPDATE_RSS);\n//\t\t\t\tmsgg.obj = WeiDataTools.getWeiDataByGroup(null);\n//\t\t\t\thandler.sendEmptyMessage(MSG_DIALOG_DISMISS);\n//\t\t\t\thandler.sendMessage(msgg);\n\t\t\t}\n\t\t break;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"private void consume()\r\n\t{\r\n\t\twhile (true)\r\n\t\t{\r\n\t\t\tSubscriberMessage sifMsg = queue.blockingPull();\t\t\t\t\r\n\t\t\tif (sifMsg != null)\r\n\t\t\t{\r\n\t\t\t\tlogger.debug(consumerID+\" has receive a message from its SubscriberQueue.\");\r\n\t\t\t\tif (sifMsg.isEvent())\r\n\t\t\t\t{\r\n\t\t\t\t\tSIFEvent sifEvent = new SIFEvent(sifMsg.getSIFObject(), sifMsg.getEventAction());\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsubscriber.processEvent(sifEvent, sifMsg.getZone(), sifMsg.getMappingInfo(), consumerID);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlogger.error(\"Failed processing SIF Event for subscriber \"+subscriber.getId()+\": \"+ex.getMessage()+\"\\nEvent Data:\\n\"+sifEvent, ex);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSIFDataObject sifObj = sifMsg.getSIFObject();\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsubscriber.processResponse(sifObj, sifMsg.getZone(), sifMsg.getMappingInfo(), consumerID);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlogger.error(\"Failed processing SIF Object for subscriber \"+subscriber.getId()+\": \"+ex.getMessage()+\"\\nSIF Object Data:\\n\"+((sifObj == null) ? \"null\" : sifObj.toXML()), ex);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tlogger.error(consumerID+\" has encountered a problem receiving a message from its SubscriberQueue.\");\r\n\t\t\t}\r\n\t\t}\t\r\n\t}",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch (msg.what) {\n\t\t\tcase 911:\n\t\t\t\tqueryMsg();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}",
"@Override\n public void publish(Object event) {\n System.out.println(\"Sending Event\");\n\n List<Hub> hubList = hubFacade.findAll();\n Iterator<Hub> it = hubList.iterator();\n while (it.hasNext()) {\n Hub hub = it.next();\n restEventPublisher.publish(hub, event);\n\n\n //Thread.currentThread().sleep(1000);\n }\n System.out.println(\"Sending Event After\");\n }",
"private void receive(EncryptedMessage msg) {\n for (MessageReceiver msgReceiver : subscribedMessageReceivers) {\n msgReceiver.receive(msg);\n }\n }",
"public void received(Message message){\n super.received(message);\n switch(message.getOpcode()){\n case 13:\n messageList.addElevatorButtonTime(((TelemetryMessage) message).getNanoSecondTime());\n break;\n case 14:\n messageList.addFloorButtonTime(((TelemetryMessage) message).getNanoSecondTime());\n break;\n case 15:\n messageList.addArrivalTime(((TelemetryMessage) message).getNanoSecondTime());\n break;\n case 17:\n \tTelemetryFloorButtonMessage telemetryFloorButtonMessage = (TelemetryFloorButtonMessage)message;\n \ttelemetryArrivalMap.addFloorBtnPressTime(telemetryFloorButtonMessage.getDirection(), \n \t\t\t\t\t\t\t\t\t\t\t telemetryFloorButtonMessage.getFloor(), \n \t\t\t\t\t\t\t\t\t\t\t telemetryFloorButtonMessage.getNanoSecondTime());\n \tbreak;\n case 18:\n \tTelemetryFloorArrivalMessage telemetryFloorArrivalMessage = (TelemetryFloorArrivalMessage)message;\n \ttelemetryArrivalMap.addFloorArrivalTime(telemetryFloorArrivalMessage.getDirection(), \n \t\t\t\t\t\t\t\t\t\t\ttelemetryFloorArrivalMessage.getFloor(),\n \t\t\t\t\t\t\t\t\t\t\ttelemetryFloorArrivalMessage.getNanoSecondTime());\n \tbreak;\n case 19:\n \tTelemetryElevatorButtonMessage telemetryElevBtnMsg = (TelemetryElevatorButtonMessage)message;\n \tSystem.out.println(\"Recieved temetry elevator button message\");\n \ttelemetryArrivalMap.addElevatorButnPressTime(telemetryElevBtnMsg.getElevatorId(), \n \t\t\t\t\t\t\t\t\t\t\t\t telemetryElevBtnMsg.getFloor(), \n \t\t\t\t\t\t\t\t\t\t\t\t telemetryElevBtnMsg.getNanoSecondTime());\n \tbreak;\n case 20:\n \tTelemetryElevatorArrivalMessage telemetryElevArvMsg = (TelemetryElevatorArrivalMessage)message;\n \ttelemetryArrivalMap.addElevatorArrivalTime(telemetryElevArvMsg.getElevatorId(), \n \t\t\t\t\t\t\t\t\t\t\t telemetryElevArvMsg.getFloor(), \n \t\t\t\t\t\t\t\t\t\t\t telemetryElevArvMsg.getNanoSecondTime());\n \tbreak;\n }\n }",
"public void doAction1(int eventId) {\n Log.d(LOG_TAG, \"doAction1 event id: \" + eventId);\n Cursor cursor = null;\n try {\n String name = \"\";\n String message = \"\";\n cursor = getContentResolver().query(Notification.Event.URI, null,\n Notification.EventColumns._ID + \" = \" + eventId, null, null);\n if (cursor != null && cursor.moveToFirst()) {\n int nameIndex = cursor.getColumnIndex(Notification.EventColumns.DISPLAY_NAME);\n int messageIndex = cursor.getColumnIndex(Notification.EventColumns.MESSAGE);\n name = cursor.getString(nameIndex);\n message = cursor.getString(messageIndex);\n }\n\n String toastMessage = getText(R.string.action_event_1) + \", Event: \" + eventId\n + \", Name: \" + name + \", Message: \" + message;\n Toast.makeText(this, toastMessage, Toast.LENGTH_LONG).show();\n } catch (SQLException e) {\n Log.e(LOG_TAG, \"Failed to query event\", e);\n } catch (SecurityException e) {\n Log.e(LOG_TAG, \"Failed to query event\", e);\n } catch (IllegalArgumentException e) {\n Log.e(LOG_TAG, \"Failed to query event\", e);\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n }",
"public void callReceiveEvent(PacketEvent event) {\n\t\tfor(PacketListener l : PACKET_IN_LISTENER) \n\t\t\tl.onEvent(event);\n\t}",
"public void MessageEvent(ChannelMessageEvent ev) {\n\t\t\n\t\tif (ev == null)\n\t\t\treturn;\n\t\tstdGroup.fireEventStatus(new StatusEvent(this,\"Channel \"+ ev.getChannelName() + \"is speaking to me\"));\n\t\tsetChanged();\n\t\tnotifyObservers(ev);\n\t\tstdGroup.fireEventStatus(new StatusEvent(this,\"Notifying for channel \"+ ev.getChannelName() + \" all views\"));\n\t\t\n\t}",
"@Override\n\tpublic void receive_message(Message m) {\n\t\t\n\t}",
"public void read() {\n synchronized (this) {\n while (events.size() == 0) {\n try {\n wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n System.out.printf(\"Read :%d,%s\\n\",\n events.size(), events.poll());\n notify();\n }\n }",
"public void handleMessage(Message message){\r\n\r\n // Application Protocol : 100 ==> 정상\r\n if(message.what == 100){\r\n scrollView.post(new Runnable(){\r\n public void run(){\r\n scrollView.fullScroll(ScrollView.FOCUS_DOWN);\r\n }\r\n });\r\n\r\n }else if(message.what==200){\r\n System.out.println(\"핸들러에 온 메시지가 200프로토콜로 왔습니다.\");\r\n\r\n final Booking booking = (Booking)message.obj;\r\n System.out.println(\":: booking.getMovieNm() in Activity : \"+booking.getMovie().getMovieNm());\r\n\r\n RelativeLayout relativeLayout = (RelativeLayout)View.inflate(AddBookingActivity.this, R.layout.booking_layout, null );\r\n\r\n TextView selectedTitle = (TextView)findViewById(R.id.selected_title_textview);\r\n selectedTitle.setText(booking.getMovie().getMovieNm());\r\n\r\n TextView selectedTime = (TextView)findViewById(R.id.selected_time_textview);\r\n selectedTime.setText(booking.getScreenContent().getScreenOpenTime());\r\n\r\n TextView selectedCount = (TextView)findViewById(R.id.selected_count_textview);\r\n selectedCount.setText(Integer.toString(booking.getHeadCount())+\"명\");\r\n\r\n TextView selectedPrice = (TextView)findViewById(R.id.selected_price_textview);\r\n selectedPrice.setText(Integer.toString(booking.getTotalTicketPrice())+\"원\");\r\n\r\n Button button = (Button)findViewById(R.id.request_pay_button);\r\n button.setOnClickListener(new View.OnClickListener() {\r\n\r\n @Override\r\n public void onClick(View view) {\r\n Intent intent = new Intent(AddBookingActivity.this, KakaoPayActivity.class);\r\n intent.putExtra(\"booking\", booking);\r\n startActivity(intent);\r\n }\r\n });\r\n }\r\n }",
"private void sendMessage() {\n Log.d(\"sender\", \"Broadcasting message\");\n Intent intent = new Intent(\"custom-event-name\");\n // You can also include some extra data.\n double[] destinationArray = {getDestination().latitude,getDestination().longitude};\n intent.putExtra(\"destination\", destinationArray);\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }",
"@Subscribe(threadMode = ThreadMode.MAIN)\n public void onMessageEvent(ReceviceMessageEvent event) {\n if (event.getEventName().equalsIgnoreCase(SocketManager.EVENT_MUTE)) {\n try {\n JSONObject objects = new JSONObject(event.getObjectsArray()[0].toString());\n\n String err = objects.getString(\"err\");\n if (err.equalsIgnoreCase(\"1\")) {\n mActivity.hideProgressDialog();\n }\n\n String from = objects.getString(\"from\");\n String to;\n if (objects.has(\"to\")) {\n to = objects.getString(\"to\");\n } else {\n to = objects.getString(\"convId\");\n }\n\n if (from.equalsIgnoreCase(mCurrentUserId) && to.equalsIgnoreCase(mLastMuteUserId)) {\n mActivity.hideProgressDialog();\n listener.onMuteDialogClosed(true);\n getDialog().dismiss();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n }",
"public void onReceive();",
"void received() throws ImsException;",
"public void onBattleMessage(BattleMessageEvent e) {\n//\t\tSystem.out.println(\"Msg> \" + e.getMessage());\n\t}",
"private synchronized void onRequest(ObjectMessage message) {\n try {\n Serializable request = message.getObject(); //serializer.requestFromString(message.getText());\n activeRequests.put(request, message);\n requestListener.receivedRequest(request);\n } catch (JMSException ex) {\n Logger.getLogger(AsynchronousReplier.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"@Override\n public void onMessageReceived(@NotNull MessageReceivedEvent event) {\n String message = event.getMessage().getContentRaw().toLowerCase();\n Commands commands = Main.getBOT().getCommands();\n\n // When message is intended for bob, check it\n if (message.startsWith(\"!bob\")) {\n commands.evaluateCommand(message.replace(\"!bob \", \"\"), event);\n } else if (message.contains(\"#blamekall\")) {\n event.getChannel().sendMessage(\"NO! BE NICE! GO TO NAUGHTY JAIL!\").queue();\n event.getChannel().sendMessage(\"https://tenor.com/view/bonk-gif-18805247\").queue();\n }\n\n }",
"@Override public void handleMessage(Message msg) {\n super.handleMessage(msg);\n byte[] byteArray = (byte[]) msg.obj;\n int length = msg.arg1;\n byte[] resultArray = length == -1 ? byteArray : new byte[length];\n for (int i = 0; i < byteArray.length && i < length; ++i) {\n resultArray[i] = byteArray[i];\n }\n String text = new String(resultArray, StandardCharsets.UTF_8);\n if (msg.what == BluetoothTalker.MessageConstants.MESSAGE_WRITE) {\n Log.i(TAG, \"we just wrote... [\" + length + \"] '\" + text + \"'\");\n// mIncomingMsgs.onNext(text);\n } else if (msg.what == BluetoothTalker.MessageConstants.MESSAGE_READ) {\n Log.i(TAG, \"we just read... [\" + length + \"] '\" + text + \"'\");\n Log.i(TAG, \" >>r \" + Arrays.toString((byte[]) msg.obj));\n mIncomingMsgs.onNext(text);\n sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// mReadTxt.setText(++ri + \"] \" + text);\n// if (mServerBound && mServerService.isConnected()) {\n// mServerService.sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// } else if (mClientBound && mClientService.isConnected()) {\n// mClientService.sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// }\n// mBluetoothStuff.mTalker.write();\n }\n }",
"@Override\r\n\tpublic void onEvent(Object e) {\n\t}",
"@Subscribe(threadMode = ThreadMode.MAIN)\n public void onMessageEvent(MessageEvent event) {\n\n // Display message in TextView\n logMessage(event.getMessage());\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch (msg.what) {\n\t\t\tcase 0:\n\t\t\t\ttv_read.setText(msg.obj.toString());\n\t\t\t\tToast.makeText(N20PINPadControllerActivity.this, \"recv\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"@Override\n public void onMessageReceived(MessageEvent messageEvent) {\n String path=messageEvent.getPath();\n Toast.makeText(this,\"Mensaje Recibido\",Toast.LENGTH_SHORT).show();\n this.controller.ControlKIT(path);\n\n }",
"@Override\n\tpublic void onMessage(Message message) {\n\t\tSystem.out.println(message.getBody());\n\t}",
"@Override\n public void onMessageReceived(JsonElement jsonElement) {\n try{\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n\n Toast.makeText(context,jsonElement.toString(),Toast.LENGTH_LONG).show();\n }\n });}catch (Exception ex){\n ex.printStackTrace();\n }\n System.out.println(\"test we have new sms received : \"+jsonElement.toString());\n }"
] | [
"0.6676001",
"0.65169317",
"0.64360154",
"0.6424683",
"0.6420029",
"0.6411295",
"0.6400089",
"0.6389",
"0.63583225",
"0.6340358",
"0.6332966",
"0.6319531",
"0.6301164",
"0.62756383",
"0.6264686",
"0.6264404",
"0.6261917",
"0.6260957",
"0.6246283",
"0.62095207",
"0.61981815",
"0.6197262",
"0.6179821",
"0.61782205",
"0.6147649",
"0.61293113",
"0.61225504",
"0.6121539",
"0.6111844",
"0.61070114",
"0.60717624",
"0.60697937",
"0.60694116",
"0.6068016",
"0.6062313",
"0.60618466",
"0.6051026",
"0.60452294",
"0.6043726",
"0.6022065",
"0.60191536",
"0.60178924",
"0.60060847",
"0.5999465",
"0.5994163",
"0.59855795",
"0.59832644",
"0.5978134",
"0.59771144",
"0.5973927",
"0.5973252",
"0.5973252",
"0.596317",
"0.5959973",
"0.5949118",
"0.59488976",
"0.59466517",
"0.59405506",
"0.59381634",
"0.5936843",
"0.59154713",
"0.59123856",
"0.59122443",
"0.5907215",
"0.59000707",
"0.5891896",
"0.5888519",
"0.5886143",
"0.587873",
"0.5874031",
"0.58737564",
"0.5872716",
"0.58697927",
"0.58672637",
"0.58658427",
"0.5862014",
"0.5852983",
"0.58503526",
"0.5846875",
"0.58418864",
"0.5838833",
"0.5838089",
"0.5838046",
"0.58328265",
"0.5829168",
"0.58290285",
"0.582887",
"0.5827046",
"0.5818698",
"0.5818641",
"0.58173656",
"0.58137786",
"0.581334",
"0.58050656",
"0.58029085",
"0.5799258",
"0.5792274",
"0.57873625",
"0.578588",
"0.57795155",
"0.5779227"
] | 0.0 | -1 |
Called when the connection to the broker is lost either unintentionally or because the client requested the disconnect. | void disconnected(MqttClient client, Throwable cause, boolean reconnecting); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void connectionLost(Throwable t) {\n System.out.println(\"Connection lost!\");\n // code to reconnect to the broker would go here if desired\n }",
"abstract protected void onDisconnection();",
"@Override\n public void connectionLost(Throwable cause) {\n System.out.println(\"MQTT Connection Lost\");\n }",
"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 }",
"public void connectionLost(Throwable throwable) {\n\t\tSystem.out.println(\"MQTT_CONNECTLOSS,\"+ System.currentTimeMillis() +\",bolt-\"+boltID);\n\t\tthrowable.printStackTrace();\n\t\t//System.out.println(\"***************************** lost connection to mqtt server\");\n\t}",
"public void connectionLost(String channelID);",
"protected void onDisconnect() {}",
"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 }",
"public void onDisconnect(IChatComponent reason) {\n\t\tlogger.info(this.getConnectionInfo() + \" lost connection: \" + reason.getUnformattedText());\n\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 }",
"@Override\r\n \tpublic void clientDisconnectedCallback(RoMClient client) {\r\n \t\tthis.disconnectClient(client);\r\n \t}",
"@Override\n public void onChannelDisconnected() {\n ConnectionManager.getInstance().setDisconnectNow(true);\n ((P2PListener)activity).onAfterDisconnect();\n }",
"public void onConnectionClosed() {\r\n\t\tcurrentConnections.decrementAndGet();\r\n\t}",
"private void connectionClosed() {\n if (this.state != SessionState.DISCONNECTING) {\n // this came unexpected\n connectionClosed(new VertxException(\"Connection closed\"));\n }\n }",
"protected void processDisconnection(){}",
"void onDisconnectFailure();",
"@Override\n public void connectionLost(Throwable thrwbl) {\n System.out.println(\"服务器的连接丢失\");\n }",
"public void disconnected(String reason) {}",
"@Override\r\n\tpublic void connectionLost(Throwable t) {\n\t}",
"@Override\r\n\t\tpublic void onDisconnect(Connection connection) {\n\r\n\t\t}",
"protected void connectionClosed() {}",
"@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t}",
"@Override\n public void connectionLost() {\n }",
"public void onDisconnected() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void connectionLost(Throwable cause) {\n\t\t\r\n\t}",
"void onDisconnect( String errorMsg );",
"public void doDisconnect() {\n Debug.logInfo(\"MQTT Disconnecting clientId[\" + client.getClientId() + \"] of [\" + client.getServerURI() + \"] ... \", MODULE);\n\n IMqttActionListener discListener = new IMqttActionListener() {\n public void onSuccess(IMqttToken asyncActionToken) {\n Debug.logInfo(\"Disconnect Completed\", MODULE);\n state = DISCONNECTED;\n carryOn();\n }\n\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n ex = exception;\n state = ERROR;\n Debug.logError(\"Disconnect failed\" + exception, MODULE);\n carryOn();\n }\n\n public void carryOn() {\n synchronized (caller) {\n donext = true;\n caller.notifyAll();\n }\n }\n };\n\n try {\n client.disconnect(null, null);\n } catch (MqttException e) {\n state = ERROR;\n donext = true;\n ex = e;\n }\n }",
"protected void processDisconnect() {\n\t\tconnected.set(false);\n\t\tsenderChannel = null;\n\t}",
"@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t\tSystem.out.println(\"CONNECTION HAS BEEN LOST.\");\r\n\t\t\t\t}",
"public void onClientDisconnected(Channel channel);",
"@Override\n\t\tpublic void connectionLost(Throwable cause) {\n\t\t\tif (connectionLostCallback != null) {\n\t\t\t\tint errorNumber = -1;\n\t\t\t\t\n\t\t\t\tif (cause == null) { // client initiated disconnect\n\t\t\t\t\terrorNumber = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (cause instanceof MqttException) {\n\t\t\t\t\terrorNumber = ((MqttException) cause).getReasonCode();\n\t\t\t\t}\n\t\t\t\tJSONObject callbackResult = new JSONObject();\n\t\t\t\tPluginResult result;\n\t\t\t\ttry {\n\t\t\t\t\tcallbackResult.put(\"errorMessage\",\n\t\t\t\t\t\t\t(cause != null) ? cause.getLocalizedMessage() : \"none\");\n\t\t\t\t\tcallbackResult.put(\"errorCode\", errorNumber);\n\t\t\t\t\ttraceDebug(TAG, \"connectionLost(\" + callbackResult + \")\");\n\t\t\t\t\tresult = new PluginResult(Status.OK, callbackResult);\n\t\t\t\t}\n\t\t\t\tcatch (JSONException e) {\n\t\t\t\t\ttraceDebug(TAG, \"connectionLost(\" + e + \")\");\n\t\t\t\t\tresult = new PluginResult(Status.ERROR, e.toString());\n\t\t\t\t}\n\t\t\t\tresult.setKeepCallback(true);\n\t\t\t\tconnectionLostCallback.sendPluginResult(result);\n\t\t\t}\n\t\t}",
"public void onDisconnected() {\r\n // Display the connection status\r\n Toast.makeText(this, \"Disconnected. Please re-connect.\",\r\n Toast.LENGTH_SHORT).show();\r\n }",
"@Override\n\tpublic void onDisconnected() {\n\t\t// Display the connection status\n\t\tToast.makeText(this, \"Disconnected. Please re-connect.\", Toast.LENGTH_SHORT).show();\n\t}",
"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 }",
"@Override\n public void connectionLost(Throwable arg0) {\n\n }",
"@Override\n public void connectionLost(final Throwable pThrowable) {\n if (DEBUG) {\n Log.d(LOG_TAG, \"Connection Lost...\");\n }\n // mClient = null;\n\n for (final RaspberryPiMessageListener listener : mListeners) {\n parentHandler.post(new Runnable() {\n\t@Override\n\tpublic void run() {\n\t listener.MqttConnectionLost(pThrowable.getLocalizedMessage());\n\t}\n });\n }\n \n// if (isNetworkAvailable()) {\n// if (DEBUG) {\n// Log.d(LOG_TAG, \"Network available, attempting to connect if possible...\");\n// }\n// reconnectIfNecessary();\n// }\n }",
"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 disconnect() {\n try {\n client.disconnect(null, null);\n } catch (MqttException e) {\n Debug.logError(e, MODULE);\n }\n }",
"@Override\n\tpublic void connectionLost(Throwable cause) {\n\t\t\n\t}",
"private void handleRemoteDisconnect(ProtonConnection connection) {\n\n LOG.info(\"AMQP disconnection with {}\", connection.getRemoteContainer());\n connection.disconnect();\n\n try {\n this.mqttEndpoint.close();\n } catch (IllegalStateException e) {\n LOG.warn(\"MQTT endpoint for client {} already closed\", this.mqttEndpoint.clientIdentifier());\n }\n }",
"void onDisconnect(DisconnectReason reason, String errorMessage);",
"@Override\n public void connectionLost(Throwable cause) {\n }",
"protected void handleDisconnect()\n {\n RemotingRMIClientSocketFactory.removeLocalConfiguration(locator);\n }",
"@Override\n\t\t\tpublic void connectionLost(Throwable throwable) {\n\t\t\t\tSystem.out.println(\"connectionLost\");\n\t\t\t}",
"void onConnectionLost();",
"@Override\n\tpublic void onDisconnected() {\n\t\tToast.makeText(context, \"Disconnected. Please re-connect.\",Toast.LENGTH_SHORT).show();\n\t}",
"public void socketDisconnected(PacketChannel pc, boolean failed);",
"@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t\tSystem.out.println(\"CLIENT DISCONNECTED FROM SERVER.\");\r\n\t\t\t\t}",
"@Override\n public void connectionLost(Throwable cause) {\n\n }",
"@Override\n public void onDisconnected() {\n }",
"@Override\n public void connectionLost(Throwable t) {\n System.out.println(\"Connection lost!\");\n }",
"@Override public void onDisconnected() {\n }",
"void onDisconnect();",
"void onDisconnect();",
"@Override\n public void connectionLost(Throwable cause) {\n Log.d(TAG, \"Connection lost\");\n }",
"@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t}",
"@Override\n public void onDisconnect(BinaryLogClient client) {\n }",
"public void connectionLost(){\n\t\ttry {\n\t\t\tconnect(\"andrewTest\", false, (short) 100);\n\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e1) {\t\t\t\n\t\t\t}\n\t\t\tconnectionLost();\n\t\t\t\n\t\t}\n\t}",
"@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}",
"@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}",
"@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}",
"void onDisconnected();",
"@Override\n\tpublic void onDisconnected() {\n\n\t}",
"protected void afterDisconnect() {\n // Empty implementation.\n }",
"void handleConnectionClosed();",
"@Override\n public void disconnected(final OfficeConnectionEvent event) {\n\n // Make the task executor unavailable.\n taskExecutor.setAvailable(false);\n\n // When it comes from an expected behavior (we have put\n // the field to true before calling a function), just reset\n // the disconnectExpected value to false. When we didn't expect\n // the disconnection, we must restart the office process, which\n // will cancel any task that may be running.\n if (!disconnectExpected.compareAndSet(true, false)) {\n\n // Here, we didn't expect this disconnection. We must restart\n // the office process, canceling any task that may be running.\n LOGGER.warn(\"Connection lost unexpectedly; attempting restart\");\n if (currentFuture != null) {\n currentFuture.cancel(true);\n }\n officeProcessManager.restartDueToLostConnection();\n }\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 }",
"protected void onDisconnected(long hconv)\n {\n }",
"public void onDisconnected() {\n\n }",
"public void onDisconnected() {\n\n }",
"@Override\n public void onDisconnected() {\n }",
"public void disconnect() throws Exception {\n\t\tif (mqttClient == null) {\n\t\t\tthrow new Exception(\"Client is not created yet\");\n\t\t}\n\t\tif (connected == true) {\n\t\t\ttry {\n\t\t\t\tmqttClient.disconnect();\n\t\t\t\tconnected = false;\n\t\t\t} catch (MqttException e) {\n\t\t\t\tthrow new Exception(\"Could not disconnect from broker\");\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void Disconnect() {\n bReConnect = true;\n }",
"@Override\n\t\tpublic void disconnected() {\n\t\t\tsuper.disconnected();\n\t\t}",
"private void disconnectHandler(Void v) {\n\n LOG.info(\"DISCONNECT from MQTT client {}\", this.mqttEndpoint.clientIdentifier());\n this.detachForced = false;\n }",
"@Override\r\n public void onDeactivated(int reason) {\r\n if (connectionEstablished) {\r\n Message msg = Message.obtain(null, StatefulProtocolHandler.MSG_NFC_CONNECTION_LOST);\r\n msg.arg1 = reason;\r\n try {\r\n mNfcMessagingService.send(msg);\r\n } catch (RemoteException e) {\r\n Log.e(TAG, \"Could not send status to NFC message exchange service.\");\r\n }\r\n }\r\n Log.i(TAG, \"Lost connection to NFC reader.\");\r\n }",
"void clientDisconnected(Client client, DisconnectInfo info);",
"public void connectionLost(Throwable cause) {\n\t}",
"public void disconnect() {}",
"private void onLost() {\n // TODO: broadcast\n }",
"void disconnect(String reason);",
"public static void disconnect()\n\t{\n\t\tTASK_LIST.add(ArduinoComms::disconnectInternal);\n\t\tTASK_LIST.add(ArduinoComms::notifyDisconnected);\n\t\t//TODO if waiting at socket.connect from connect() notify the tread\n\t}",
"@SubscribeEvent\n public void onFMLNetworkClientDisconnectionFromServer(ClientDisconnectionFromServerEvent event) {\n hypixel = false;\n bedwars = false;\n }",
"@Override\n public void onDown(Host host) {\n Connection current = connectionRef.get();\n if (logger.isTraceEnabled())\n logger.trace(\"[Control connection] {} is down, currently connected to {}\", host, current == null ? \"nobody\" : current.address);\n if (current != null && current.address.equals(host.getAddress()) && reconnectionAttempt.get() == null) {\n // We might very be on an I/O thread when we reach this so we should not do that on this thread.\n // Besides, there is no reason to block the onDown method while we try to reconnect.\n cluster.executor.submit(new Runnable() {\n @Override\n public void run() {\n reconnect();\n }\n });\n }\n }",
"@Disconnect\n public void disconnected(AtmosphereResourceEvent event){\n if (event.isCancelled()) {\n logger.info(\"User:\" + event.getResource().uuid() + \" unexpectedly disconnected\");\n } else if (event.isClosedByClient()) {\n logger.info(\"User:\" + event.getResource().uuid() + \" closed the connection\");\n }\n }",
"@Override\r\n\tpublic void packetLost(Connection connection, BaseDatagram lostDatagram)\r\n\t{\n\t\t\r\n\t}",
"@Override\n\t\t\tpublic void onNetworkDisconnected() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void playerDisconnected(String playerID, DisconnectReason reason) {\n\t}",
"public void disconnect()\n {\n \tLog.d(TAG, \"disconnect\");\n\n \tif(this.isConnected) {\n \t\t// Disable the client connection if have service\n \t\tif(mLedService != null) {\n \t\t\tthis.disable();\n \t\t}\n \t\t\n \t\t// Unbind service\n mContext.unbindService(mServiceConnection);\n \n this.isConnected = false;\n \t}\n }",
"@Override\n\tpublic void disconnect() {\n\t\t\n\t}",
"@Override\n\tpublic void disconnect() {\n\t\t\n\t}",
"void onConnectionRemoved(SocketConnection connection);",
"@Override\n\tpublic void disconnected (BluetoothDevice bluetoothDevice) {\n\t\tif (replay && manager.hasMessageToDeliver(bluetoothDevice)) {\n\t\t\trfComm.connect(bluetoothDevice, true, timeoutConnect);\n\t\t}\n\t}",
"public void handleDisconnect(){\r\n consoleAppend(this.getName() + \" disconnected.\");\r\n clientThreads.remove(getIndex(this.getName()));\r\n sendToAll(this.getName() + \" disconnected.\");\r\n sendCTToAll(new ControlToken(ControlToken.REMOVECODE, this.getName()));\r\n }",
"void firePeerDisconnected(ConnectionKey connectionKey);",
"public void disconnect()\n {\n isConnected = false;\n }",
"public void disconnected(XMPPConnection connection) {}",
"public void onPeerConnectionClosed();",
"@Override\n\tpublic void disconnect() {\n\n\t}",
"@Override\n\tpublic void disconnect() {\n\n\t}"
] | [
"0.78125846",
"0.73762625",
"0.7254389",
"0.7239953",
"0.7221847",
"0.7201453",
"0.7182708",
"0.71076953",
"0.7052173",
"0.70144135",
"0.6998248",
"0.6942933",
"0.6941158",
"0.6915551",
"0.69116986",
"0.6884361",
"0.6869606",
"0.6867084",
"0.6861936",
"0.6844809",
"0.6839023",
"0.68384737",
"0.68258154",
"0.6816156",
"0.6801591",
"0.6796547",
"0.6794286",
"0.6792813",
"0.6791029",
"0.67859274",
"0.6781261",
"0.6764605",
"0.6762315",
"0.6761474",
"0.673801",
"0.6724512",
"0.6716158",
"0.67131704",
"0.67123634",
"0.66980577",
"0.66969645",
"0.6680718",
"0.6675853",
"0.6672183",
"0.66648954",
"0.6662487",
"0.6662023",
"0.66617024",
"0.6661109",
"0.66410935",
"0.66377145",
"0.6593949",
"0.659205",
"0.659205",
"0.6591112",
"0.6590662",
"0.6590305",
"0.65779155",
"0.6576102",
"0.6576102",
"0.6576102",
"0.65519613",
"0.65380543",
"0.65365577",
"0.6521638",
"0.6512749",
"0.6512265",
"0.65110844",
"0.65040183",
"0.65040183",
"0.6482774",
"0.64631706",
"0.6459626",
"0.64560616",
"0.64377886",
"0.64296645",
"0.6429589",
"0.6428704",
"0.64256376",
"0.6421324",
"0.64028883",
"0.6398236",
"0.6394322",
"0.6388358",
"0.63771784",
"0.63749003",
"0.6369979",
"0.63608426",
"0.63442135",
"0.6338011",
"0.6338011",
"0.63364244",
"0.6333423",
"0.63329166",
"0.63160676",
"0.6315691",
"0.63140583",
"0.63085157",
"0.63060814",
"0.63060814"
] | 0.709323 | 8 |
item2() returns this node's item2. If this node is invalid, throws an exception. | public Object item2() throws InvalidNodeException {
if (!isValidNode()) {
throw new InvalidNodeException();
}
return item2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setItem2(Object item) throws InvalidNodeException {\n\t\tif (!isValidNode()) {\n\t\t\tthrow new InvalidNodeException();\n\t\t}\n\t\tthis.item2 = item;\n\t}",
"public VBox getPnItems2() {\n\t\treturn pnItems2;\n\t}",
"public String getAttribute2()\n {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getAttr2() {\n return attr2;\n }",
"public String getAttr2() {\n return attr2;\n }",
"public String getAttribute2() {\n return (String) getAttributeInternal(ATTRIBUTE2);\n }",
"public T2 _2() {\n return _2;\n }",
"public Vector2 getPos2() {\n\t\treturn pos2;\n\t}",
"public String getAttribute2() {\n return attribute2;\n }",
"@Override\n\tpublic java.lang.String getNode_2() {\n\t\treturn _dictData.getNode_2();\n\t}",
"public CVector getV2() {\n\treturn v2;\n }",
"@Basic\r\n\tpublic Position getPosition2() \r\n\t{\r\n\t\treturn this.position2;\r\n\t}",
"public java.lang.String getValue2() {\n return this.value2;\n }",
"public int getd2() {\n\t\treturn d2;\n\t}",
"public int getX2() {\n\t\treturn x2;\n\t}",
"public java.lang.String getSecondary2() {\n return secondary2;\n }",
"public double getX2()\n {\n return m_X2;\n }",
"public Point2D getPoint2() {\n return this.point2;\n }",
"public int getProperty2() {\n return property2_;\n }",
"public double getX2()\n\t{\n\t\treturn this.x[2];\n\t}",
"public java.lang.String getReserve2() {\n return reserve2;\n }",
"public Object getValue2() { return this.value2; }",
"public Object getItem(Node itemNode) throws XmlRecipeException;",
"public Double getX2() {\n\t\treturn x2;\n\t}",
"public StringItem getStringItem2() {\n if (stringItem2 == null) {//GEN-END:|51-getter|0|51-preInit\n // write pre-init user code here\n stringItem2 = new StringItem(\"V\\u00E9hicule non authoris\\u00E9\", \"Le v\\u00E9hicule n\\'est pas authoris\\u00E9. Donnez l\\'emplacement et le mod\\u00E8le de celui-ci pour faire prendre le relai aux services de police\");//GEN-LINE:|51-getter|1|51-postInit\n // write post-init user code here\n }//GEN-BEGIN:|51-getter|2|\n return stringItem2;\n }",
"public String getReserve2() {\n return reserve2;\n }",
"public int getProperty2() {\n return property2_;\n }",
"public int getNum2() {\r\n\t\t\t\treturn num2_;\r\n\t\t\t}",
"public RegistrationItems getRegistrationItems2() {\n return registrationItems2;\n }",
"public double getSide2() {\r\n\t\treturn side2;\r\n\t}",
"public Object getV2(){\n \treturn v2;\n }",
"public PileupElement getSecond() { return PE2; }",
"public String getLine2() {\n return line2;\n }",
"public int getSt2() {\r\n\t\treturn this.st2;\r\n\t}",
"public int getNum2() {\r\n\t\t\treturn num2_;\r\n\t\t}",
"public Type getType2() {\n\t\treturn this.data.getType2();\n\t}",
"@Override\n\tpublic void setNode_2(java.lang.String node_2) {\n\t\t_dictData.setNode_2(node_2);\n\t}",
"public void setItemOwned2(Item item) {\n itemOwned2 = item;\n if(itemOwned2 != null){\n items.put(itemOwned2.getName(), itemOwned2);\n }\n }",
"public java.lang.String getLine2() {\r\n return line2;\r\n }",
"public Integer reservedInt2() {\n return this.reservedInt2;\n }",
"public Integer reservedInt2() {\n return this.reservedInt2;\n }",
"public double getX2() {\n\t\treturn p2.x;\n\t}",
"public DListNode2 next(){\r\n return this.next;\r\n }",
"public String getId2() {\n return id2;\n }",
"public Double getY2() {\n\t\treturn y2;\n\t}",
"public Body getBody2() {\r\n\t\treturn body2;\r\n\t}",
"@org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }",
"public Bar get_bar(String node1, String node2) {\n return this.bars.get(node1).get(node2);\n }",
"@java.lang.Override\n public godot.wire.Wire.Vector2 getVector2Value() {\n if (typeCase_ == 6) {\n return (godot.wire.Wire.Vector2) type_;\n }\n return godot.wire.Wire.Vector2.getDefaultInstance();\n }",
"public float getField2() {\n return field2_;\n }",
"public String getText2() {\n return text2;\n }",
"@java.lang.Override\n public godot.wire.Wire.Vector2 getVector2Value() {\n if (vector2ValueBuilder_ == null) {\n if (typeCase_ == 6) {\n return (godot.wire.Wire.Vector2) type_;\n }\n return godot.wire.Wire.Vector2.getDefaultInstance();\n } else {\n if (typeCase_ == 6) {\n return vector2ValueBuilder_.getMessage();\n }\n return godot.wire.Wire.Vector2.getDefaultInstance();\n }\n }",
"public String getAddress2() {\n\t\treturn address2;\n\t}",
"public String getLine2() {\n return line2;\n }",
"public String getImg_2() {\n return img_2;\n }",
"public PToP.S2ARsp getS2Rsp() {\n return instance.getS2Rsp();\n }",
"public int getData2() {\n return data2_;\n }",
"public int getData2() {\n return data2_;\n }",
"public String getSelectedIndex2() {\n return mSelectedIndex2;\n }",
"public Node getL2pNode() {\n\t\treturn myNode;\n\t}",
"public int getITEM() {\r\n return item;\r\n }",
"public ResourcesOrPoints getGive2() {\n\t\treturn give2;\n\t}",
"public float getField2() {\n return field2_;\n }",
"public String getDescription2() {\r\n return description2;\r\n }",
"public int getY2() {\n\t\treturn y2;\n\t}",
"public ElementStub getEndTwoElement()\n {\n return endTwoElement;\n }",
"public Document getDoc2() {\r\n return doc2;\r\n }",
"public final ManagedElementList<VirtualMachine> getSecondSet() {\r\n return (ManagedElementList<VirtualMachine>) this.set2;\r\n }",
"public double getY2()\n {\n return m_Y2;\n }",
"public String getAddr2() {\r\n return addr2;\r\n }",
"public int getStateValue2() {\n return stateValue2_;\n }",
"public Point getP2(){\n return this.p2;\n }",
"public String getExtAttribute2() {\n return (String) getAttributeInternal(EXTATTRIBUTE2);\n }",
"public final double getX2()\n {\n return m_jso.getX2();\n }",
"@Override\r\n\tpublic vec2 get2(String ponits) {\n\t\treturn null;\r\n\t}",
"public ResultPoint getRp2() {\n return rp2;\n }",
"@AutoEscape\n\tpublic String getNode_2();",
"public int getStateValue2() {\n return stateValue2_;\n }",
"public IPoint getSecondPoint()\n {\n\n Set<IPoint> vertices = this.getVertices();\n Object[] verticesArray = vertices.toArray();\n IPoint secondPoint = (IPoint)verticesArray[1];\n\n return secondPoint;\n }",
"public byte getP2() {\n return this.apdu_buffer[P2];\n }",
"public void setAttr2(String attr2) {\n this.attr2 = attr2;\n }",
"public void setAttr2(String attr2) {\n this.attr2 = attr2;\n }",
"public String getAddressLine2() {\n return (String)getAttributeInternal(ADDRESSLINE2);\n }",
"public Number getWork2()\r\n {\r\n return (m_work2);\r\n }",
"public PToP.S2InfoRelay getS2InfoRsp() {\n return instance.getS2InfoRsp();\n }",
"public String getIntAttribute2() {\n return (String) getAttributeInternal(INTATTRIBUTE2);\n }",
"public String getOther2() {\n return other2;\n }",
"@Override\n\t\tpublic Object getItem(int p1)\n\t\t\t{\n\t\t\t\treturn is.get(p1);\n\t\t\t}",
"public double getY2()\n\t{\n\t\treturn this.y[2];\n\t}",
"public Point3D getPoint2() {\r\n return point2;\r\n }",
"public int getData2() {\n return data2_;\n }",
"public int getData2() {\n return data2_;\n }",
"@Override\r\n\tpublic void insertEncoreItem2(Item item) {\n\t\tint i = sqlSession.insert(ns+\".insertEncoreItem2\", item);\r\n\t\tif(i>0) System.out.println(\"insert Encore item2\");\r\n\t}",
"public ResourcesOrPoints getReceive2() {\n\t\treturn receive2;\n\t}",
"public String getExtra2() {\n return extra2;\n }"
] | [
"0.7652664",
"0.6698735",
"0.6175833",
"0.6148159",
"0.6148159",
"0.6148159",
"0.6148159",
"0.6148159",
"0.6144171",
"0.6144171",
"0.6113164",
"0.60481894",
"0.5990344",
"0.59888434",
"0.5926984",
"0.5910601",
"0.590326",
"0.5885804",
"0.5796904",
"0.57931376",
"0.5787978",
"0.57566196",
"0.5736629",
"0.57053214",
"0.5678781",
"0.56748533",
"0.56515384",
"0.5647237",
"0.56410635",
"0.5634242",
"0.55906194",
"0.5567814",
"0.556581",
"0.5561183",
"0.555885",
"0.5548763",
"0.55291003",
"0.5515986",
"0.55147135",
"0.55134183",
"0.550467",
"0.5484983",
"0.548058",
"0.54679793",
"0.5465676",
"0.5465676",
"0.5440652",
"0.5422948",
"0.538154",
"0.53700334",
"0.5363714",
"0.5363116",
"0.53426665",
"0.53414845",
"0.5337588",
"0.5330121",
"0.5328847",
"0.53247595",
"0.5317146",
"0.530776",
"0.53059465",
"0.53058076",
"0.53058076",
"0.5304153",
"0.52990514",
"0.5292693",
"0.52698505",
"0.52689236",
"0.5260824",
"0.5258324",
"0.5256543",
"0.5251759",
"0.52516234",
"0.5243315",
"0.5242149",
"0.5241411",
"0.52397096",
"0.5235801",
"0.5235483",
"0.5226285",
"0.5224661",
"0.5221166",
"0.52070934",
"0.51777476",
"0.51770216",
"0.51769435",
"0.51769435",
"0.5172723",
"0.5172473",
"0.5168973",
"0.51687354",
"0.5164187",
"0.5163875",
"0.51630837",
"0.51623887",
"0.5160672",
"0.5160672",
"0.51592964",
"0.515181",
"0.51491517"
] | 0.8931333 | 0 |
setItem2() sets this node's item2 to "item". If this node is invalid, throws an exception. Performance: runs in O(1) time. | public void setItem2(Object item) throws InvalidNodeException {
if (!isValidNode()) {
throw new InvalidNodeException();
}
this.item2 = item;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void setNode_2(java.lang.String node_2) {\n\t\t_dictData.setNode_2(node_2);\n\t}",
"public Object item2() throws InvalidNodeException {\n\t\tif (!isValidNode()) {\n\t\t\tthrow new InvalidNodeException();\n\t\t}\n\t\treturn item2;\n\t}",
"public void setItemOwned2(Item item) {\n itemOwned2 = item;\n if(itemOwned2 != null){\n items.put(itemOwned2.getName(), itemOwned2);\n }\n }",
"public void setNode_2(String node_2);",
"public void setOb2(CPointer<BlenderObject> ob2) throws IOException\n\t{\n\t\tlong __address = ((ob2 == null) ? 0 : ob2.getAddress());\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeLong(__io__address + 8, __address);\n\t\t} else {\n\t\t\t__io__block.writeLong(__io__address + 4, __address);\n\t\t}\n\t}",
"public void setAttr2(String attr2) {\n this.attr2 = attr2;\n }",
"public void setAttr2(String attr2) {\n this.attr2 = attr2;\n }",
"@Override\r\n\tpublic void insertEncoreItem2(Item item) {\n\t\tint i = sqlSession.insert(ns+\".insertEncoreItem2\", item);\r\n\t\tif(i>0) System.out.println(\"insert Encore item2\");\r\n\t}",
"void setPos2(Vector2 pos2) {\n\t\tthis.pos2 = pos2;\n\t}",
"public void setValue2(final java.lang.String value2) {\n this.value2 = value2;\n }",
"public void setValue2(Object value2) { this.value2 = value2; }",
"public void setReserve2(java.lang.String reserve2) {\n this.reserve2 = reserve2;\n }",
"public void setResolution2(org.astrogrid.stc.coords.v1_10.beans.Size2Type resolution2)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.astrogrid.stc.coords.v1_10.beans.Size2Type target = null;\n target = (org.astrogrid.stc.coords.v1_10.beans.Size2Type)get_store().find_element_user(RESOLUTION2$0, 0);\n if (target == null)\n {\n target = (org.astrogrid.stc.coords.v1_10.beans.Size2Type)get_store().add_element_user(RESOLUTION2$0);\n }\n target.set(resolution2);\n }\n }",
"public void setAttribute2(String value)\n {\n setAttributeInternal(ATTRIBUTE2, value);\n }",
"public void setInventorySlotContents(int par1, ItemStack par2ItemStack)\n {\n this.furnaceItemStacks[par1] = par2ItemStack;\n\n if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit())\n {\n par2ItemStack.stackSize = this.getInventoryStackLimit();\n }\n }",
"public void setX2(int x2) {\n\t\tthis.x2 = x2;\n\t\tfireListenerSignal();\n\t}",
"public void setAttribute2(String value) {\n setAttributeInternal(ATTRIBUTE2, value);\n }",
"public void setAttribute2(String value) {\n setAttributeInternal(ATTRIBUTE2, value);\n }",
"public void setAttribute2(String value) {\n setAttributeInternal(ATTRIBUTE2, value);\n }",
"public void setAttribute2(String value) {\n setAttributeInternal(ATTRIBUTE2, value);\n }",
"public void setAttribute2(String value) {\n setAttributeInternal(ATTRIBUTE2, value);\n }",
"public void setAttribute2(String value) {\n setAttributeInternal(ATTRIBUTE2, value);\n }",
"public void setItem (Item item)\n\t{\n\t\tthis.item = item;\n\t}",
"public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_)\n {\n this.inventoryContents[p_70299_1_] = p_70299_2_;\n\n if (p_70299_2_ != null && p_70299_2_.stackSize > this.getInventoryStackLimit())\n {\n p_70299_2_.stackSize = this.getInventoryStackLimit();\n }\n\n this.markDirty();\n }",
"public void setReserve2(String reserve2) {\n this.reserve2 = reserve2 == null ? null : reserve2.trim();\n }",
"public void setB2(int b2)\n {\n this.b2 = b2;\n }",
"@Override\n\tpublic void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {\n\t\tfield_145900_a[p_70299_1_] = p_70299_2_;\n\n\t\tif (p_70299_2_ != null\n\t\t\t\t&& p_70299_2_.stackSize > getInventoryStackLimit()) {\n\t\t\tp_70299_2_.stackSize = getInventoryStackLimit();\n\t\t}\n\t}",
"public void setItem(Item item) {\n\t\tthis.item = item;\n\t}",
"public void setItem(Item item) {\n\t\tthis.item = item;\n\t}",
"public void setX2(Double x2) {\n\t\tthis.x2 = x2;\n\t}",
"public void setTaxNumber2(\n @Nullable\n final String taxNumber2) {\n rememberChangedField(\"TaxNumber2\", this.taxNumber2);\n this.taxNumber2 = taxNumber2;\n }",
"private void setP2( Point p2 ){\n this.p2=p2;\n }",
"public void setLine2(java.lang.String line2) {\r\n this.line2 = line2;\r\n }",
"protected void setP2(byte p2) {\n\theader[3] = p2;\n }",
"public void setItem(Item item) {\n this.item = item;\n }",
"public void setAddr2(String addr2) {\r\n this.addr2 = addr2;\r\n }",
"public void setLine2(String line2) {\n this.line2 = line2;\n }",
"public void putItemLIFO(T item) {\n\t\tNode newItem = new Node(item);\n\t\tif (first == null) { \n\t\t\tfirst = newItem; \n\t\t} else {\n\t\t\tnewItem.next = first;\n\t\t\tfirst = newItem;\n\t\t}\n\t}",
"KMutableProperty2Impl$_setter$1(KMutableProperty2Impl kMutableProperty2Impl) {\n super(0);\n this.this$0 = kMutableProperty2Impl;\n }",
"public void setRegistrationItems2(RegistrationItems aRegistrationItems2) {\n registrationItems2 = aRegistrationItems2;\n }",
"public void setSpare2(String spare2) {\r\n this.spare2 = spare2;\r\n }",
"public final DragBounds setX2(final double x2)\n {\n m_jso.setX2(x2);\n\n return this;\n }",
"public void giveItem(Item item) {\n\t\tif (hasItem()) return;\n\t\tthis.item = item;\n\t}",
"public void setAttribute2(String attribute2) {\n this.attribute2 = attribute2 == null ? null : attribute2.trim();\n }",
"public void setDescription2(String description2) {\r\n this.description2 = description2;\r\n }",
"public void setItem(Object item, int i)\n {\n items.setElementAt(item, i);\n }",
"public void setX2()\n\t{\n\t\tthis.x[2] = this.x[0] + (this.length)/2;\n\t}",
"public void swapItemFromInventoryToOther(@NotNull Usable item, Usable other) {\n for (int i = 0; i < size; i++) {\n if (item == items[i]) {\n this.removeItem(i);\n if (other != null) {\n this.setItem(other, i);\n }\n return;\n }\n }\n }",
"public void setP2Card2(Card p2Card2){\n\t\tthis.p2Card2 = p2Card2;\n\t\trepaint();\n\t}",
"public Builder setS2(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n s2_ = value;\n onChanged();\n return this;\n }",
"public void setPoint2(Point3D point2) {\r\n this.point2 = point2;\r\n }",
"public void setC2(java.lang.String c2)\n {\n this.c2 = c2;\n }",
"public void putItem(Item item) {\n throw new OurBadException(\"Item '\" + this.serialize() + \"' is not an array.\");\n }",
"public void setItem(T item) {\n this.item = item;\n }",
"public void setA2(int a2)\n {\n this.a2 = a2;\n }",
"@Override\n public V setValue(V v2) {\n Object object = this.h;\n synchronized (object) {\n return this.a().setValue(v2);\n }\n }",
"public void setCurrentItemInternal(int i, boolean z, boolean z2) {\n setCurrentItemInternal(i, z, z2, 0);\n }",
"public void setId2(String id2) {\n this.id2 = id2 == null ? null : id2.trim();\n }",
"public Builder setData2(int value) {\n bitField0_ |= 0x00000004;\n data2_ = value;\n \n return this;\n }",
"public Builder setData2(int value) {\n bitField0_ |= 0x00000004;\n data2_ = value;\n \n return this;\n }",
"public void as(int i, int i2) {\n if (this.am.size() >= 1828238628 && !this.am.containsKey(Integer.valueOf(i))) {\n Iterator it = this.am.entrySet().iterator();\n it.next();\n it.remove();\n }\n if (i != 0) {\n this.am.put(Integer.valueOf(i), Integer.valueOf(i2));\n }\n }",
"public void setSide2(double side2) {\r\n\t\tthis.side2 = side2;\r\n\t}",
"public void setIpAddress2Value(IpAddress ipAddress2Value)\n throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"ip-address2\",\n ipAddress2Value,\n childrenNames());\n }",
"public void setIpAddress2Value(IpAddress ipAddress2Value)\n throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"ip-address2\",\n ipAddress2Value,\n childrenNames());\n }",
"public Builder setProperty2(int value) {\n bitField0_ |= 0x00000010;\n property2_ = value;\n \n return this;\n }",
"public void setSide2(String side2) {\n \tthis.side2 = side2;\n }",
"public void setP2(Player p2) {\n this.p2 = p2;\n }",
"public Address line2(String line2) {\n this.line2 = line2;\n return this;\n }",
"public void setText2(String text2) {\n this.text2 = text2 == null ? null : text2.trim();\n }",
"public void setRight(BSTItem n)\r\n\t{\r\n\t\tright = n;\r\n\t}",
"@Override\n\tpublic void setStreet2(java.lang.String street2) {\n\t\t_candidate.setStreet2(street2);\n\t}",
"public void setItem(Item item) throws Exception {\n\t\tfor(int i = 0; i < last; ++i)\n\t\t\tif(list[i].getCode() == item.getCode()) {\n\t\t\t\tlist[i].increment(item.getCount());\n\t\t\t\treturn;\n\t\t\t}\n\t\tif(last < size)\n\t\t\tlist[last++] = item;\n\t\telse\n\t\t\tthrow new Exception(\"list full\");\n\t}",
"public void setItem(ItemType item) {\n\t this.item = item;\n\t}",
"public void setItem(ItemType item) {\n\t this.item = item;\n\t}",
"public void setId2(int value) {\n this.id2 = value;\n }",
"Node(E item) {\n UNSAFE.putObject(this, itemOffset, item);\n }",
"@Override\n\tpublic void setField2(boolean field2) {\n\t\t_second.setField2(field2);\n\t}",
"public void setSecondary2(java.lang.String secondary2) {\n this.secondary2 = secondary2;\n }",
"private Op rewriteOp2(final Op2 op2, final OpRewriter rewriter) {\n op2.getLeft().visit(rewriter.reset());\n final Op left = rewriter.getResult();\n op2.getRight().visit(rewriter.reset());\n return left;\n }",
"public Vector2 Assign(Vector2 vector2){\n x = vector2.x;\n y = vector2.y;\n return this;\n }",
"public void setITEM(int value) {\r\n this.item = value;\r\n }",
"public void set(Item item) {\r\n if (lastAccessed == null) throw new IllegalStateException();\r\n lastAccessed.item = item;\r\n }",
"public void setAddress2(String address2) {\n\t\tthis.address2 = address2;\n\t}",
"public void appendToNode( Item node, Item item ) {\r\n\t\tappendToNode(node, item, null);\r\n\t}",
"public boolean set(V value2) {\n Object valueToSet;\n if (value2 == null) {\n valueToSet = NULL;\n } else {\n valueToSet = value2;\n }\n if (!ATOMIC_HELPER.casValue(this, null, valueToSet)) {\n return false;\n }\n complete(this);\n return true;\n }",
"public void setPawn2(Pawn pawn2) {\n this.pawn2 = pawn2;\n }",
"protected abstract Item createTestItem2();",
"public void setCategory2(String category2) {\n this.category2 = category2;\n }",
"public String getAttr2() {\n return attr2;\n }",
"public String getAttr2() {\n return attr2;\n }",
"public void setImg_2(String img_2) {\n this.img_2 = img_2;\n }",
"@Override\r\n\t\tpublic E setSecond(E second) {\n\t\t\treturn pair.setSecond(second);\r\n\t\t}",
"public T2 _2() {\n return _2;\n }",
"public ItemInfo addNewItem(int i, int i2) {\n ItemInfo itemInfo = new ItemInfo();\n itemInfo.position = i;\n if (this.mUseRecycler) {\n itemInfo.object = this.mAdapter.instantiateItemFromRecycler(this, getRecycleView(), i % this.mAdapter.getRealCount());\n if (itemInfo.object == null) {\n throw new RuntimeException(getContext().getString(R.string.adapter_instantiateitemfromrecycler_return_null));\n }\n } else {\n itemInfo.object = this.mAdapter.instantiateItem((ViewGroup) this, i % this.mAdapter.getRealCount());\n }\n itemInfo.widthFactor = this.mAdapter.getPageWidth(i);\n if (i2 < 0 || i2 >= this.mItems.size()) {\n this.mItems.add(itemInfo);\n } else {\n this.mItems.add(i2, itemInfo);\n }\n return itemInfo;\n }",
"public final void H(int i2) {\n try {\n this.d = true;\n V(i2, false);\n this.d = false;\n K();\n } catch (Throwable th) {\n this.d = false;\n throw th;\n }\n }",
"public void markVlanTag2Replace() throws JNCException {\n markLeafReplace(\"vlanTag2\");\n }",
"public void setData(Item i)\r\n\t{\r\n\t\ttheItem = i;\r\n\t}",
"public void setWork2(Number work2)\r\n {\r\n m_work2 = work2;\r\n }",
"public void setBand2V(org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle band2V)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().find_element_user(BAND2V$10, 0);\n if (target == null)\n {\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().add_element_user(BAND2V$10);\n }\n target.set(band2V);\n }\n }",
"public void setItemOwned1(Item item) {\n itemOwned1 = item;\n if(itemOwned1 != null){\n items.put(itemOwned1.getName(), itemOwned1);\n }\n }"
] | [
"0.70380986",
"0.6938994",
"0.65168995",
"0.6089316",
"0.5901108",
"0.5864833",
"0.5864833",
"0.5847802",
"0.58310515",
"0.5798765",
"0.57454014",
"0.56916606",
"0.5593914",
"0.5590915",
"0.55775154",
"0.5573107",
"0.55167335",
"0.55167335",
"0.55167335",
"0.55167335",
"0.55167335",
"0.55167335",
"0.5513173",
"0.5492298",
"0.5490793",
"0.5481432",
"0.54435104",
"0.5433387",
"0.5433387",
"0.54172134",
"0.54143727",
"0.54052037",
"0.539321",
"0.5386521",
"0.53496486",
"0.53437763",
"0.53374946",
"0.533579",
"0.53306246",
"0.5328295",
"0.5326849",
"0.532589",
"0.53155726",
"0.53127605",
"0.53007114",
"0.528608",
"0.5280423",
"0.5278164",
"0.52749944",
"0.5269297",
"0.525985",
"0.5239474",
"0.52008677",
"0.5190902",
"0.5172345",
"0.51623315",
"0.51552564",
"0.51530105",
"0.514759",
"0.514759",
"0.51411116",
"0.51238513",
"0.51229435",
"0.51229435",
"0.51154053",
"0.510693",
"0.5102761",
"0.51009226",
"0.50998735",
"0.50952625",
"0.5078074",
"0.5069705",
"0.50637853",
"0.50637853",
"0.5054195",
"0.50533026",
"0.50532264",
"0.5049814",
"0.50482446",
"0.50341713",
"0.50266755",
"0.50243485",
"0.5019089",
"0.5005592",
"0.5003694",
"0.50031424",
"0.5002513",
"0.49815625",
"0.4964186",
"0.4964186",
"0.4959996",
"0.49561435",
"0.49495375",
"0.49486592",
"0.49475917",
"0.49446332",
"0.49364927",
"0.492809",
"0.4922702",
"0.4917312"
] | 0.86367756 | 0 |
ccLvl case/cocase level to ignore copying the declared variables from the previous case/cocase level | private CaseOrCocase convertCoCase(CocaseContext ccas, Function fun) throws DecompositionDiversityException {
inCC = true;
String destName = ccas.cocaseDestr().name.getText();
cccName = destName;
ConstructorOrDestructor des = null;
try {
des = env.getConsOrDes(fun.getReturnType(), destName, false);
if (des instanceof Constructor) {
String msg = "Destructor " + ccas.cocaseDestr().name.getText() + " is not declared";
Error err = ErrorFactory.createError(ccas.cocaseDestr().name.getLine(),
ccas.cocaseDestr().name.getLine(), ccas.cocaseDestr().getStart().getCharPositionInLine(),
ccas.cocaseDestr().getStop().getCharPositionInLine(), msg);
errors.add(err);
throw new NotDeclaredException(msg);
}
} catch (DecompositionDiversityException e) {
// TODO: handle exception
}
List<Variable> varList = new ArrayList<>();
if (ccas.cocaseDestr().varList() != null) {
// getVarList(ccas.cocaseDestr().varList(), varList, des, 0, fun, ccas);
getVars(ccas.cocaseDestr().varList(), varList);
try {
checkVarList(varList, fun, des);
localVarsCase.put(destName, varList);
} catch (WrongArgumentsNumber e) {
Error err = ErrorFactory.createError(ccas.cocaseDestr().getStart().getLine(),
ccas.cocaseDestr().getStop().getLine(), ccas.cocaseDestr().getStart().getCharPositionInLine(),
ccas.cocaseDestr().getStop().getCharPositionInLine(), e.getMessage());
errors.add(err);
}
// localVarsCase.put(destName, varList);
}
// if (des != null && des.getTypeNames().size() == varList.size()) {
Expression ex = ConvertExpression(ccas.expression(), fun, 0);
if (ex.getType().contains(X) && !env.getExprWithTypeX().contains(ex))
env.getExprWithTypeX().add(ex);
inCC = false;
ScopedName sn;
MODIFIER mod = destName.contains("_") ? MODIFIER.LOCAL : MODIFIER.GLOBAL;
if (des == null) {
sn = new ScopedName(mod, new QualifiedName(fun.getReturnType(), destName));
} else {
sn = des.getsName();
}
if (sn.getqName().getTypeName().contains(X))
env.getConsDesWithTypeX().add(sn);
return new CaseOrCocase(ccas.getStart(), ccas.getStop(), sn, varList, ex);
// } else {
// String msg = "Number of arguments does not match definition.";
// Error err = ErrorFactory.createError(ccas.cocaseDestr().getStart().getLine(),
// ccas.cocaseDestr().getStop().getLine(), ccas.cocaseDestr().getStart().getCharPositionInLine(),
// ccas.cocaseDestr().getStop().getCharPositionInLine(), msg);
// errors.add(err);
// throw new WrongArgumentsNumber(msg);
// }
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void handleNonFrameShiftCase() {\n\t\t\tfinal boolean isInsertionAtEnd = (varAAInsertPos == wtAASeq.length());\n\t\t\tif (!isInsertionAtEnd && wtAASeq.charAt(varAAInsertPos) == '*')\n\t\t\t\thandleNonFrameShiftCaseStartsWithStopCodon();\n\t\t\telse\n\t\t\t\thandleNonFrameShiftCaseStartsWithNoStopCodon();\n\n\t\t\t// Check for being a splice site variant. The splice donor, acceptor, and region intervals are disjoint.\n\t\t\tfinal GenomePosition pos = change.getGenomePos();\n\t\t\tfinal GenomePosition lPos = change.getGenomePos().shifted(-1);\n\t\t\tif ((so.liesInSpliceDonorSite(lPos) && so.liesInSpliceDonorSite(pos)))\n\t\t\t\tvarTypes.add(VariantEffect.SPLICE_DONOR_VARIANT);\n\t\t\telse if ((so.liesInSpliceAcceptorSite(lPos) && so.liesInSpliceAcceptorSite(pos)))\n\t\t\t\tvarTypes.add(VariantEffect.SPLICE_ACCEPTOR_VARIANT);\n\t\t\telse if ((so.liesInSpliceRegion(lPos) && so.liesInSpliceRegion(pos)))\n\t\t\t\tvarTypes.add(VariantEffect.SPLICE_REGION_VARIANT);\n\t\t}",
"private void handleFrameShiftCase() {\n\t\t\tif (handleInsertionAtEndInCaseOfNoStopCodon())\n\t\t\t\treturn;\n\t\t\tfinal boolean isInsertionAtEnd = (varAAInsertPos == wtAASeq.length());\n\t\t\tif (!isInsertionAtEnd && wtAASeq.charAt(varAAInsertPos) == '*')\n\t\t\t\thandleFrameShiftCaseWTStartWithStopCodon();\n\t\t\telse\n\t\t\t\thandleFrameShiftCaseWTStartsWithNoStopCodon();\n\n\t\t\t// Check for being a splice site variant. The splice donor, acceptor, and region intervals are disjoint.\n\t\t\tfinal GenomePosition pos = change.getGenomePos();\n\t\t\tfinal GenomePosition lPos = change.getGenomePos().shifted(-1);\n\t\t\tif ((so.liesInSpliceDonorSite(lPos) && so.liesInSpliceDonorSite(pos)))\n\t\t\t\tvarTypes.add(VariantEffect.SPLICE_DONOR_VARIANT);\n\t\t\telse if ((so.liesInSpliceAcceptorSite(lPos) && so.liesInSpliceAcceptorSite(pos)))\n\t\t\t\tvarTypes.add(VariantEffect.SPLICE_ACCEPTOR_VARIANT);\n\t\t\telse if ((so.liesInSpliceRegion(lPos) && so.liesInSpliceRegion(pos)))\n\t\t\t\tvarTypes.add(VariantEffect.SPLICE_REGION_VARIANT);\n\t\t}",
"private void handleNonFrameShiftCaseStartsWithStopCodon() {\n\t\t\tif (varAAStopPos == 0) {\n\t\t\t\t// varAA starts with a stop codon\n\t\t\t\tproteinChange = ProteinMiscChange.build(true, ProteinMiscChangeType.NO_CHANGE);\n\t\t\t\tvarTypes.add(VariantEffect.SYNONYMOUS_VARIANT);\n\t\t\t} else if (varAAStopPos > 0) {\n\t\t\t\t// varAA contains a stop codon\n\t\t\t\tproteinChange = ProteinExtension.build(true, \"*\", aaChange.getPos(),\n\t\t\t\t\ttoString(varAASeq.charAt(aaChange.getPos())), (varAAStopPos - aaChange.getPos()));\n\t\t\t\t// last is stop codon AA pos\n\t\t\t\tvarTypes.add(VariantEffect.STOP_LOST);\n\t\t\t} else {\n\t\t\t\t// varAA contains no stop codon\n\t\t\t\tproteinChange = ProteinExtension.buildWithoutTerminal(true, toString(wtAASeq.charAt(aaChange.getPos())),\n\t\t\t\t\taaChange.getPos(), toString(varAASeq.charAt(aaChange.getPos())));\n\t\t\t\tvarTypes.add(VariantEffect.STOP_LOST);\n\t\t\t}\n\t\t}",
"@Override\n\tpublic Void visit(Case casee) {\n\t\tprintIndent(\"case\");\n\t\tindent++;\n\t\tcasee.var.accept(this);\n\t\tfor (var v : casee.cases)\n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}",
"public void setCpscCase(int cpscCase) { this.cpscCase = cpscCase; }",
"public static void c1_vl() {\n\t}",
"public int getCpscCase() { return cpscCase; }",
"public T caseVariableDeclarationWithoutInitListCS(VariableDeclarationWithoutInitListCS object) {\r\n return null;\r\n }",
"public T casePreConditionDeclarationCS(PreConditionDeclarationCS object) {\r\n return null;\r\n }",
"public T caseVariableDeclarationCS(VariableDeclarationCS object) {\r\n return null;\r\n }",
"private void level4() {\n }",
"private boolean isVcheck (JPLine plinesucc)\n\t{\n\t\tJPLine pline = plines.lower(plinesucc);\n\t\tif (pline == null) return false;\n\t\tif (pline.len != 2) return false;\n\t\tJPLine pred = plines.lower(pline);\n\t\tif (pred == null) return false;\n\t\treturn (pred.flag0 & 0x64) == 0x24; // branch instruction that is itself covered and not start of source code statement\n\t}",
"public static void c0_vl() {\n\t}",
"public T caseVariableDeclarationWithoutInitCS(VariableDeclarationWithoutInitCS object) {\r\n return null;\r\n }",
"@Override\n\tpublic void effetCase() {\n\t\t\n\t}",
"private LevelConstants() {\n\t\t\n\t}",
"@Override\r\n\tpublic Level getcCurrentLevel() {\n\t\treturn null;\r\n\t}",
"public void Unassigned_Cases()\n\t{\n\t\t//assigning a ContactTracer to a case\n\t\tif(coronaCase.size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"\\nDisplaying unassigned cases: \");\n\t\t\tfor(int i = 0; i < coronaCase.size(); i++)\n\t\t\t\tif(coronaCase.get(i).isAssignedCase() == false)\n\t\t\t\t\tSystem.out.println(coronaCase.get(i).toString());\n\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"No unassigned cases to display.\");\n\t\t\n\t}",
"private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }",
"public T caseContextDeclarationCS(ContextDeclarationCS object) {\r\n return null;\r\n }",
"public void setSuppressModeC(boolean suppressModeC) {\n this.suppressModeC = suppressModeC;\n }",
"static void cmc_with_car(String passed){\n\t\tCS = !CS;\n\t}",
"protected void cloneValAtTopOfStack(String typeOfField) {\n _generateClone(typeOfField, Constants.OUTER_COPY_METHOD_NAME, null, false);\n }",
"private long[][] appendCSRCToMatrix(long[][] levels, long csrc, int level)\n {\n int newLength = 1 + ((levels == null) ? 0 : levels.length);\n long[][] newLevels = new long[newLength][];\n\n //put the new level.\n newLevels[0] = new long[] { csrc, level };\n\n if (newLength == 1)\n return newLevels;\n\n System.arraycopy(levels, 0, newLevels, 1, levels.length);\n\n return newLevels;\n }",
"private void handleFrameShiftCaseWTStartWithStopCodon() {\n\t\t\tif (varAAStopPos == varAAInsertPos) {\n\t\t\t\t// The variant peptide also starts with a stop codon, is synonymous frameshift insertion.\n\t\t\t\tproteinChange = ProteinMiscChange.build(true, ProteinMiscChangeType.NO_CHANGE);\n\t\t\t\tvarTypes.add(VariantEffect.SYNONYMOUS_VARIANT);\n\t\t\t} else if (varAAStopPos > varAAInsertPos) {\n\t\t\t\t// The variant peptide contains a stop codon but does not start with it, is frameshift insertion. In\n\t\t\t\t// this case we cannot really differentiate this from a non-frameshift insertion but we still call\n\t\t\t\t// it so.\n\t\t\t\tproteinChange = ProteinExtension.build(true, \"*\", varAAInsertPos,\n\t\t\t\t\ttoString(varAASeq.charAt(varAAInsertPos)), (varAAStopPos - varAAInsertPos));\n\t\t\t\tvarTypes.add(VariantEffect.FRAMESHIFT_ELONGATION);\n\t\t\t} else {\n\t\t\t\t// The variant AA does not contain a stop codon, is stop loss.\n\t\t\t\tproteinChange = ProteinFrameshift.buildWithoutTerminal(true, toString(varAASeq.charAt(varAAInsertPos)),\n\t\t\t\t\tvarAAInsertPos, toString(varAASeq.charAt(varAAInsertPos)));\n\t\t\t\tvarTypes.add(VariantEffect.STOP_LOST);\n\t\t\t}\n\t\t}",
"public void putLevel(long csrc, int level)\n {\n //copy the levels matrix so that no one pulls it from under our feet.\n long[][] levelsRef = levels;\n int csrcIndex = findCSRC(levelsRef, csrc);\n\n if (csrcIndex == -1)\n {\n //we don't have the csrc in there yet so we need a new row.\n levels = appendCSRCToMatrix(levelsRef, csrc, level);\n }\n else\n {\n levelsRef[csrcIndex][1] = level;\n }\n }",
"private void handleNonFrameShiftCaseStartsWithNoStopCodon() {\n\t\t\tif (aaChange.getPos() == 0) {\n\t\t\t\t// The mutation affects the start codon, is start loss (in the case of keeping the start codon\n\t\t\t\t// intact, we would have jumped into a shifted duplication case earlier.\n\t\t\t\tproteinChange = ProteinMiscChange.build(true, ProteinMiscChangeType.NO_PROTEIN);\n\t\t\t\tvarTypes.add(VariantEffect.START_LOST);\n\t\t\t\tvarTypes.add(VariantEffect.INFRAME_INSERTION);\n\t\t\t} else {\n\t\t\t\t// The start codon is not affected. Since it is a non-FS insertion, the stop codon cannot be\n\t\t\t\t// affected.\n\t\t\t\tif (varAAStopPos == varAAInsertPos) {\n\t\t\t\t\t// The insertion directly starts with a stop codon, is stop gain.\n\t\t\t\t\tproteinChange = ProteinSubstitution.build(true, toString(wtAASeq.charAt(varAAInsertPos)),\n\t\t\t\t\t\tvarAAInsertPos, \"*\");\n\t\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\n\t\t\t\t\t// Differentiate the case of disruptive and non-disruptive insertions.\n\t\t\t\t\tif (insertPos.getPos() % 3 == 0)\n\t\t\t\t\t\tvarTypes.add(VariantEffect.INFRAME_INSERTION);\n\t\t\t\t\telse\n\t\t\t\t\t\tvarTypes.add(VariantEffect.DISRUPTIVE_INFRAME_INSERTION);\n\t\t\t\t} else {\n\t\t\t\t\tif (varAAStopPos != -1 && wtAAStopPos != -1\n\t\t\t\t\t\t&& varAASeq.length() - varAAStopPos != wtAASeq.length() - wtAAStopPos) {\n\t\t\t\t\t\t// The insertion does not directly start with a stop codon but the insertion leads to a stop\n\t\t\t\t\t\t// codon in the affected amino acids. This leads to an \"delins\" protein annotation.\n\t\t\t\t\t\tproteinChange = ProteinIndel.buildWithSeqDescription(true,\n\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos)), varAAInsertPos,\n\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos + 1)), varAAInsertPos + 1,\n\t\t\t\t\t\t\tnew ProteinSeqDescription(),\n\t\t\t\t\t\t\tnew ProteinSeqDescription(varAASeq.substring(varAAInsertPos, varAAStopPos)));\n\t\t\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\n\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// The changes on the amino acid level do not lead to a new stop codon, is non-FS insertion.\n\n\t\t\t\t\t\t// Differentiate the ins and the delins case.\n\t\t\t\t\t\tif (aaChange.getRef().equals(\"\")) {\n\t\t\t\t\t\t\t// Clean insertion.\n\t\t\t\t\t\t\tif (DuplicationChecker.isDuplication(wtAASeq, aaChange.getAlt(), varAAInsertPos)) {\n\t\t\t\t\t\t\t\t// We have a duplication, can only be duplication of AAs to the left because of\n\t\t\t\t\t\t\t\t// normalization in CDSExonicAnnotationBuilder constructor.\n\t\t\t\t\t\t\t\tif (aaChange.getAlt().length() == 1) {\n\t\t\t\t\t\t\t\t\tproteinChange = ProteinDuplication.buildWithSeqDescription(true,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\tnew ProteinSeqDescription());\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tproteinChange = ProteinDuplication.buildWithSeqDescription(true,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - aaChange.getAlt().length())),\n\t\t\t\t\t\t\t\t\t\tvarAAInsertPos - aaChange.getAlt().length(),\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\tnew ProteinSeqDescription());\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t\t\t\tvarTypes.add(VariantEffect.DIRECT_TANDEM_DUPLICATION);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// We have a simple insertion.\n\t\t\t\t\t\t\t\tproteinChange = ProteinInsertion.buildWithSequence(true,\n\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos)), varAAInsertPos, aaChange.getAlt());\n\n\t\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// The delins/substitution case.\n\t\t\t\t\t\t\tproteinChange = ProteinIndel.buildWithSeqDescription(true, aaChange.getRef(),\n\t\t\t\t\t\t\t\tvarAAInsertPos, aaChange.getRef(), varAAInsertPos, new ProteinSeqDescription(),\n\t\t\t\t\t\t\t\tnew ProteinSeqDescription(aaChange.getAlt()));\n\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\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}",
"@Override\n\tpublic Void visit(CaseVar casevar) {\n\t\tprintIndent(\"case branch\");\n\t\tindent++;\n\t\tcasevar.id.accept(this);\n\t\tcasevar.type.accept(this);\n\t\tcasevar.expr.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}",
"@Test\n\tpublic void testMakeSureVarVariablesCanShadowLetVariables()\n\t{\n\t\tString[] code = {\n\t\t\t\"let a = 1;\",\n\t\t \"let b = 2;\",\n\t\t \"var c = 3;\",\n\n\t\t \"function sup(a) {\",\n\t\t \"var b = 4;\",\n\t\t \"let c = 5;\",\n\t\t \"let d = 6;\",\n\t\t \"if (false) {\",\n\t\t \"var d = 7;\",\n\t\t \"}\",\n\t\t \"return b + c + a + d;\",\n\t\t \"}\",\n\n\t\t \"sup();\"\n\t\t};\n\t\t\n\t\tth.addError(1, 5, \"'a' is defined but never used.\");\n\t th.addError(2, 5, \"'b' is defined but never used.\");\n\t th.addError(3, 5, \"'c' is defined but never used.\");\n\t th.addError(9, 5, \"'d' has already been declared.\");\n\t\tth.test(code, new LinterOptions().set(\"esnext\", true).set(\"unused\", true).set(\"undef\", true).set(\"funcscope\", true));\n\t}",
"static public void setLevel( byte level ) {\n Debug.level=level;\n }",
"public void setCatLevel(int value) {\n this.catLevel = value;\n }",
"public void cpl() {\n\t\tint op = registers.getRegister(Register.A);\n\t\tint result = invert(op);\n\t\tregisters.setRegister(Register.A, result);\n\n\t\tregisters.setFlag(Flag.H, true);\n\t\tregisters.setFlag(Flag.N, true);\n\t}",
"public T caseVariableDeclarationWithInitListCS(VariableDeclarationWithInitListCS object) {\r\n return null;\r\n }",
"public Case() {}",
"public T caseVariables(Variables object)\n {\n return null;\n }",
"private void level5() {\n }",
"private void m3416c(C0933b bVar) {\n m3422v(bVar);\n }",
"public T caseBodyDeclarationCS(BodyDeclarationCS object) {\r\n return null;\r\n }",
"public static void changeLevel(int Rs, int Cs, int level, int[][] original){\n cowGrid = new int[3][3];\n max = 0;\n\n //Finds the max number in the 3x3 grid.\n for (int i = 0; i < 3; i++){\n for (int j = 0; j < 3; j++){\n if (max < original[Rs + i][Cs + j]){\n max = original[Rs + i][Cs + j];\n }\n }\n }\n\n //Changes the depth of the grid.\n for (int i = 0; i < 3; i++){\n for (int j = 0; j < 3; j++){\n if (max - original[Rs + i][Cs + j] <= level){\n original[Rs + i][Cs + j] = max - level;\n }\n }\n }\n }",
"static void stc_with_car(String passed){\n\t\tCS = true;\n\t}",
"@Override\n public void visit(CondFactExpr CondFactExpr) {\n Code.loadConst(1);\n Code.putFalseJump(Code.eq, 0);\n andList.add(Code.pc - 2);\n\n }",
"public T caseTypeCS(TypeCS object) {\r\n return null;\r\n }",
"void mo1749a(C0288c cVar);",
"public void sub() {\n\t\tlog.severe(\"severe level\");// <= (1)\n\t\tlog.warning(\"warning level\");// <= (2)\n\t\tlog.info(\"info level\");// <= (3)\n\t\tlog.config(\"config level\");// <= (4)\n\t\tlog.fine(\"fine level\");// <= (5)\n\t\tlog.finer(\"finer level\");// <= (6)\n\t\tlog.finest(\"finest level\");// <= (7)\n\n\t}",
"@Override\n public void visitLocalVariable(String name, String descriptor, String signature, Label start, Label end, int index) {\n if(this.preserveDebuggability){\n super.visitLocalVariable(name, descriptor, signature, start, end, index);\n }\n }",
"public void Case29(){\n\n }",
"void setCond(String name, long date, int lvl) {\n\tWeatherUnit weath1 = getWeather(date);\n\tint old = ((Integer)weath1.levels.get(name)).intValue();\n\tint nyu = old + lvl;\n\tif (nyu < 0) nyu = 0;\n\tif (old != nyu) {\n\t weath1.levels.put(name,new Integer(nyu));\n\t // Cascade down\n\t setCond(name, date);\n\t main.myFrw.announce(this);\n\t main.redo(false);\n\t}\n }",
"public T caseVariableDeclarationWithInitCS(VariableDeclarationWithInitCS object) {\r\n return null;\r\n }",
"public static void main(String[] args){\n final int a = 1;\n // final int b;\n // b = 2;\n int x = 5;\n switch(x){\n case a: System.out.println(\"case a\");\n // case b://constant expression required .. compile error\n case 3: // is a compile time constant.\n System.out.println(\"case 3\");\n System.out.println(\"2nd line in case 3\");\n // To be a variable that is a compile time constant, the variable needs to be...\n // 1.declared as final\n // 2.have a primative or String type\n // 3.initialized (on the same line as the declaration)\n // 4.assigned to a compile time constant expression\n default: System.out.println(\"default, if no break will continue\");\n case 4:{System.out.println(\"case 4\");};//can omit {} and ;\n }\n// String derp = \"s\";\n// switch(derp){\n// \n// }\n }",
"public void c(int paramInt)\r\n/* 101: */ {\r\n/* 102:122 */ this.b = false;\r\n/* 103:123 */ super.c(paramInt);\r\n/* 104: */ }",
"private void level7() {\n }",
"CodeContext(Context ctx, Node node) {\n super(ctx, node);\n switch (node.op) {\n case DO:\n case WHILE:\n case FOR:\n case FINALLY:\n case SYNCHRONIZED:\n this.breakLabel = new Label();\n this.contLabel = new Label();\n break;\n case SWITCH:\n case TRY:\n case INLINEMETHOD:\n case INLINENEWINSTANCE:\n this.breakLabel = new Label();\n break;\n default:\n if ((node instanceof Statement) && (((Statement)node).labels != null)) {\n this.breakLabel = new Label();\n }\n }\n }",
"@Test(groups = {\"conciseMethods\"})\n\tpublic void testConciseMethodsNameIsNotLocalVar()\n\t{\n\t\tString[] code = {\n\t\t\t\"var obj = {\",\n\t\t \" foo(foo) {},\",\n\t\t \" bar() { var bar; }\",\n\t\t \"};\"\n\t\t};\n\t\t\n\t\tth.test(code, new LinterOptions().set(\"esnext\", true));\n\t}",
"public T caseVar(Var object) {\r\n\t\treturn null;\r\n\t}",
"private void level6() {\n }",
"void mo61496a(C43469a aVar, C43471c cVar);",
"public final void c(a aVar) {\n super.c(aVar);\n aVar.a(\"undo_msg_v1\", this.a);\n aVar.a(\"undo_msg_type_v1\", this.b);\n }",
"public void removeIneffectiveDeclarations()\n\t{\n\t\t_declarations.removeIf((p) -> !p.isIgnored() && !p.isEffective());\n\t}",
"C32299a(EnumC32301c cVar, AbstractC32239o oVar) {\n super(cVar);\n this.f111322a = cVar;\n this.f111323b = oVar;\n }",
"private int countCases (CtMethod<?> Casein){\n List<CtCase> caseCalls = Casein.getElements(new TypeFilter<CtCase>(CtCase.class));\n int output = caseCalls.size();\n for (CtCase caseint : caseCalls){\n if (caseint.toString().toLowerCase().replace(\" \",\"\").contains(\"default:\")){\n output -= 1;\n }\n }\n return output;\n }",
"protected void setPlateauBlocked() {\r\n\t\tint idx = 0;\r\n\t\tfor (int i = 0; i < plateau4par4.getPlateau().length; i++) {\r\n\t\t\tfor (int j = 0; j < plateau4par4.getPlateau()[i].length; j++) {\r\n\t\t\t\tplateau4par4.getPlateau()[i][j] = new Case(new CaseContent(++idx));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public LocalBranch LocalBranch(Role src, Map<Label, LocalCase> cases)\n\t{\n\t\t//return new LocalBranch(self, src, cases);\n\t\treturn new LocalBranch(src, cases);\n\t}",
"public void setLevel(int v)\n {\n m_level = v;\n }",
"public void setStartLevelCollect()\n\t{\n\t\tsetCollect(_Prefix + HardZone.STARTLEVEL.toString(), \"\");\n\t}",
"public void mo1326c(ac acVar) {\n this.f15139b.f19004g.mo1315b(this.f15139b);\n }",
"private void fillStudyConditionsData() {\n for (Condition condition : workbookStudy.getStudyConditions()) {\n if (condition.getDataType().equals(DATA_TYPE_CHAR)) {\n //LevelC levelCFilter = new LevelC(false);\n //levelCFilter.setFactorid(Integer.SIZE);\n //GCP NEW SCHEMA\n List<LevelC> levelCList = condition.getFactor().getLevelsC();\n if (levelCList != null && levelCList.size() > 0) { //study conditions will only have 1 level\n condition.setValue(levelCList.get(0).getLvalue());\n }\n } else {\n List<LevelN> levelNList = condition.getFactor().getLevelsN();\n if (levelNList != null && levelNList.size() > 0) {\n condition.setValue(levelNList.get(0).getLvalue());\n }\n }\n }\n }",
"@Override\n public void enterVar_assign(FSMParser.Var_assignContext ctx) {\n if (findComp(ctx.var().NAME().getText()) == null) {\n Var temp = new Var(\n ctx.var().NAME().getText(),\n Integer.parseInt(ctx.var().INT().getText()),\n false, false, false);\n this.comps.add(temp);\n\n }\n }",
"public default int getLevel(){ return 0; }",
"protected void method_865(bcb var1) {\r\n label136: {\r\n boolean var2;\r\n boolean var3;\r\n label132: {\r\n label131: {\r\n label130: {\r\n label137: {\r\n label138: {\r\n label139: {\r\n label140: {\r\n label141: {\r\n var2 = method_1147();\r\n int var10000 = var1.field_450;\r\n if(var2) {\r\n switch(var1.field_450) {\r\n case 1:\r\n var10000 = class_687.field_2947;\r\n break;\r\n case 2:\r\n break label141;\r\n case 3:\r\n break label140;\r\n case 4:\r\n break label139;\r\n case 5:\r\n break label138;\r\n case 50:\r\n break label137;\r\n case 60:\r\n break label130;\r\n case 70:\r\n break label131;\r\n case 100:\r\n break label132;\r\n case 110:\r\n break label136;\r\n default:\r\n return;\r\n }\r\n }\r\n\r\n if(var2) {\r\n var10000 = var10000 == 0?1:0;\r\n }\r\n\r\n class_687.field_2947 = (boolean)var10000;\r\n this.field_972.field_449 = String.valueOf(class_687.field_2947);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2946;\r\n if(var2) {\r\n var3 = !class_687.field_2946;\r\n }\r\n\r\n class_687.field_2946 = var3;\r\n this.field_973.field_449 = String.valueOf(class_687.field_2946);\r\n this.field_984 = true;\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2948;\r\n if(var2) {\r\n var3 = !class_687.field_2948;\r\n }\r\n\r\n class_687.field_2948 = var3;\r\n this.field_974.field_449 = String.valueOf(class_687.field_2948);\r\n this.field_983 = true;\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2951;\r\n if(var2) {\r\n var3 = !class_687.field_2951;\r\n }\r\n\r\n class_687.field_2951 = var3;\r\n this.field_975.field_449 = String.valueOf(class_687.field_2951);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n var3 = class_687.field_2952;\r\n if(var2) {\r\n var3 = !class_687.field_2952;\r\n }\r\n\r\n class_687.field_2952 = var3;\r\n this.field_976.field_449 = String.valueOf(class_687.field_2952);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2949 = this.field_979.method_835();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2950 = this.field_980.method_835();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.field_2953 = (double)this.field_981.method_834();\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n bao var6;\r\n label77: {\r\n class_207 var5;\r\n label142: {\r\n var3 = this.field_983;\r\n if(var2) {\r\n if(this.field_983) {\r\n bbv var4 = bao.method_5273().canLoseFocus4;\r\n bbv.SetHUDText(\"\");\r\n }\r\n\r\n var5 = this;\r\n if(!var2) {\r\n break label142;\r\n }\r\n\r\n var3 = this.field_984;\r\n }\r\n\r\n if(var3) {\r\n var6 = this.field_557;\r\n if(!var2) {\r\n break label77;\r\n }\r\n\r\n if(this.field_557.cursorCounter6 != null) {\r\n class_687.field_2954 = true;\r\n }\r\n }\r\n\r\n class_687.method_3712();\r\n this.field_983 = false;\r\n this.field_984 = false;\r\n var5 = this;\r\n }\r\n\r\n var6 = var5.field_557;\r\n }\r\n\r\n var6.method_5236(this.field_971);\r\n if(var2) {\r\n return;\r\n }\r\n }\r\n\r\n class_687.method_3711();\r\n this.field_557.method_5236(this.field_971);\r\n this.field_983 = false;\r\n this.field_984 = false;\r\n }",
"public void setOrigCarrierInfoPoiLevel(java.lang.Short origCarrierInfoPoiLevel) {\r\n this.origCarrierInfoPoiLevel = origCarrierInfoPoiLevel;\r\n }",
"private void copyFields(NetcdfRecordInfo src, Set<String> excludedFields) {\n Iterator<String> keyIter = src.beanMap.keyIterator();\n Object val;\n while (keyIter.hasNext()) {\n String key = keyIter.next();\n if (this.beanMap.getWriteMethod(key) != null\n && !excludedFields.contains(key)) {\n val = src.beanMap.get(key);\n if (val != null) {\n this.beanMap.put(key, val);\n }\n }\n }\n }",
"public static void main(String[] args) {\nprivate final int d=20; // illegal modifier ( inside {} block private can't use\nfinal int f=20;\nprivate int g=30;\n\t}",
"public void resetCVars(int flags) {\n for (CVar cv : cvarList.values()) {\n if ((cv.getFlags() & flags) != 0) {\n cv.reset(true);\n }\n }\n }",
"public void setLevel(Level level) { this.currentLevel = level; }",
"private void handleFrameShiftCaseWTStartsWithNoStopCodon() {\n\t\t\tif (varAAInsertPos == 0) {\n\t\t\t\t// The mutation affects the start codon, is start loss.\n\t\t\t\tproteinChange = ProteinMiscChange.build(true, ProteinMiscChangeType.NO_PROTEIN);\n\t\t\t\tvarTypes.add(VariantEffect.START_LOST);\n\t\t\t} else {\n\t\t\t\t// The start codon is not affected.\n\t\t\t\tif (varAAStopPos == varAAInsertPos) {\n\t\t\t\t\t// The insertion directly creates a stop codon, is stop gain.\n\t\t\t\t\tproteinChange = ProteinSubstitution.build(true, toString(wtAASeq.charAt(varAAInsertPos)),\n\t\t\t\t\t\tvarAAInsertPos, \"*\");\n\t\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\t\t\t\t} else if (varAAStopPos > varAAInsertPos) {\n\t\t\t\t\t// The insertion is a frameshift variant that leads to a transcript still having a stop codon,\n\t\t\t\t\t// simple frameshift insertion.\n\t\t\t\t\tproteinChange = ProteinFrameshift.build(true, toString(wtAASeq.charAt(varAAInsertPos)),\n\t\t\t\t\t\tvarAAInsertPos, toString(varAASeq.charAt(varAAInsertPos)),\n\t\t\t\t\t\t(varAAStopPos + 1 - varAAInsertPos));\n\n\t\t\t\t\tif (varAASeq.length() > wtAASeq.length())\n\t\t\t\t\t\tvarTypes.add(VariantEffect.FRAMESHIFT_ELONGATION);\n\t\t\t\t\telse if (varAASeq.length() < wtAASeq.length())\n\t\t\t\t\t\tvarTypes.add(VariantEffect.FRAMESHIFT_TRUNCATION);\n\t\t\t\t\telse\n\t\t\t\t\t\tvarTypes.add(VariantEffect.FRAMESHIFT_VARIANT);\n\t\t\t\t} else {\n\t\t\t\t\t// The insertion is a frameshift variant that leads to the loss of the stop codon, we mark this as\n\t\t\t\t\t// frameshift elongation and the \"fs*?\" indicates that the stop codon is lost.\n\t\t\t\t\tproteinChange = ProteinFrameshift.buildWithoutTerminal(true,\n\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos)), varAAInsertPos,\n\t\t\t\t\t\ttoString(varAASeq.charAt(varAAInsertPos)));\n\t\t\t\t\tvarTypes.add(VariantEffect.FRAMESHIFT_ELONGATION);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private Mask$MaskMode() {\n void var2_-1;\n void var1_-1;\n }",
"void mo18323a(C7253c cVar);",
"private CIECADocument updateCoverageCategory(final CIECADocument inDoc, final java.util.logging.Logger mLogger) {\n\t\t\n\t\tif (inDoc != null && inDoc.getCIECA() != null && inDoc.getCIECA().getAssignmentAddRq() != null) {\n\t\t\t\n\t\t\t//\n\t\t\t// <ClaimInfo>/<PolicyInfo>/<CoverageInfo>/<Coverage>/<CoverageCategory>\n\t\t\t//\n\t\t\tfinal ClaimInfoType claimInfo = inDoc.getCIECA().getAssignmentAddRq().getClaimInfo();\n\t\t\tif (claimInfo != null) {\n\t\t\t\tif (claimInfo.isSetPolicyInfo()) {\n\t\t\t\t\tfinal PolicyInfoType policyInfo = claimInfo.getPolicyInfo();\n\t\t\t\t\tif (policyInfo != null) {\n\t\t\t\t\t\tif (policyInfo.isSetCoverageInfo()) {\n\t\t\t\t\t\t\tfinal CoverageInfoType coverageInfo = policyInfo.getCoverageInfo();\n\t\t\t\t\t\t\tif (coverageInfo != null && coverageInfo.sizeOfCoverageArray() > 0) {\n\t\t\t\t\t\t\t\tfinal Coverage coverage = coverageInfo.getCoverageArray(0);\n\t\t\t\t\t\t\t\tif (coverage != null) {\n\t\t\t\t\t\t\t\t\tif (coverage.isSetCoverageCategory()) {\n\t\t\t\t\t\t\t\t if (mLogger.isLoggable(Level.FINE)) {\n\t\t\t\t\t\t\t\t \tmLogger.fine(\"********* BEFORE updateCoverageCategory:: coverage.getCoverageCategory(): [ \" + coverage.getCoverageCategory() + \" ] *********\");\n\t\t\t\t\t\t\t\t }\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t// TypeOfLoss - C maps to G, P maps to A, M maps to D, \n\t\t\t\t\t\t\t\t\t\t// A (Animal) maps to 0 Else no mapping \n\t\t\t\t\t\t\t\t\t\tif (coverage.getCoverageCategory() != null) {\n\t\t\t\t\t\t\t\t\t\t\tfinal String inCoverageCategory = coverage.getCoverageCategory();\n\t\t\t\t\t\t\t\t\t\t\tif (inCoverageCategory.equalsIgnoreCase(\"C\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tcoverage.setCoverageCategory(\"G\");\n\t\t\t\t\t\t\t\t\t\t\t} else if (inCoverageCategory.equalsIgnoreCase(\"P\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tcoverage.setCoverageCategory(\"A\");\n\t\t\t\t\t\t\t\t\t\t\t} else if (inCoverageCategory.equalsIgnoreCase(\"M\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tcoverage.setCoverageCategory(\"D\");\n\t\t\t\t\t\t\t\t\t\t\t} else if (inCoverageCategory.equalsIgnoreCase(\"A\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t// Map A (Animal) to O (Other) - preventing collision with A (Property)\n\t\t\t\t\t\t\t\t\t\t\t\tcoverage.setCoverageCategory(\"0\");\n\t\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\t\t// else NO MAPPING of remaining LossTypes\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t if (mLogger.isLoggable(Level.FINE)) {\n\t\t\t\t\t\t\t\t \tmLogger.fine(\"********* AFTER updateCoverageCategory:: coverage.getCoverageCategory(): [ \" + coverage.getCoverageCategory() + \" ] *********\");\n\t\t\t\t\t\t\t\t }\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\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\treturn inDoc;\n\t}",
"@Override\n\tpublic void visit(CaseExpression arg0) {\n\t\t\n\t}",
"public T caseInitValueCS(InitValueCS object) {\r\n return null;\r\n }",
"public void mo5361b(C0275kc kcVar) {\n throw null;\n }",
"public T casePostConditionDeclarationCS(PostConditionDeclarationCS object) {\r\n return null;\r\n }",
"public void setLevel(int level) { \r\n\t\tthis.level = level; \r\n\t}",
"public void setLevel(String newLevel) {\n level = newLevel;\n }",
"static boolean patternCase(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"patternCase\")) return false;\n if (!nextTokenIs(b, CASE)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, CASE);\n r = r && guardedPattern(b, l + 1);\n r = r && consumeToken(b, COLON);\n exit_section_(b, m, null, r);\n return r;\n }",
"public T caseSourceCodeLine(SourceCodeLine object)\n\t{\n\t\treturn null;\n\t}",
"void controllerChangeReceived(rwmidi.Controller cntrl){\n\t println(\"cc recieved\");\n\t println(\": \" + cntrl.getCC()) ;\n\n\t \n\t if(cntrl.getCC() == 2){\n\t modThresh1(cntrl.getValue()); /// adjust threshold1\n\t }\n\t \n\t if(cntrl.getCC() == 3){\n\t modThresh2(cntrl.getValue()); /// adjust threshold1\n\t }\n\t \n\t if(cntrl.getCC() ==4){\n\t modThresh3(cntrl.getValue()); /// adjust threshold1\n\t }\n\t \n\t if(cntrl.getCC() == 5){ //// adjust skip\n\t modSkip(cntrl.getValue());\n\t }\n\t \n\t if(cntrl.getCC() == 6){ /// adjus scale\n\t modScale(cntrl.getValue());\n\t }\n\t}",
"@Override\n\tpublic void visit(CaseExpression arg0) {\n\n\t}",
"public static void setDebugValue(int inputLevel) {\n\t\tif (inputLevel == 0)\n\t\t\tDEBUG_VALUE = DebugLevel.NOOUTPUT;\n\t\telse if (inputLevel == 1)\n\t\t\tDEBUG_VALUE = DebugLevel.CONTENTSATEACHENTRY;\n\t\telse if (inputLevel == 2)\n\t\t\tDEBUG_VALUE = DebugLevel.RESULT;\n\t\telse if (inputLevel == 3)\n\t\t\tDEBUG_VALUE = DebugLevel.RUN;\n\t\telse if (inputLevel == 4)\n\t\t\tDEBUG_VALUE = DebugLevel.CONSTRUCTOR;\n\t\telse\n\t\t\tDEBUG_VALUE = DebugLevel.NOOUTPUT;\n\t}",
"public void setLevel(int level)\r\n {\r\n\tthis.level = level;\r\n }",
"public T caseClassifierContextDeclarationCS(ClassifierContextDeclarationCS object) {\r\n return null;\r\n }",
"@Override\r\n public void setCase(Case theCase) {\n }",
"public boolean visit(Clinit decl, ClassScope scope) {\r\n\t\t\tif (decl.isClinit())\r\n\t\t\t\tvalue -= 2;\r\n\r\n\t\t\treturn super.visit(decl, scope);\r\n\t\t}",
"private Submodel fixUniqueVars()\n {\n Submodel model = new Submodel();\n model.setInvariant(true);\n\n _fixUniqueVars_Helper(model);\n \n return model;\n }",
"public void mo1327d(ac acVar) {\n }",
"public void setLevel(int newlevel)\n {\n level = newlevel; \n }",
"private void ResetVarC() {\n anchura = true;\n iterator = 0;\n Yencoding = new ArrayList<Integer>();\n Cbencoding = new ArrayList<Integer>();\n Crencoding = new ArrayList<Integer>();\n FY = new StringBuilder();\n FCB = new StringBuilder();\n FCR = new StringBuilder();\n }",
"static void CopyPropagate( ParseResult p_result ){\n\n\tSet<String> fnames = p_result.fdetails.keySet( );\n\tIterator<String> f_iterator = fnames.iterator( );\n\n\twhile( f_iterator.hasNext( ) ){\n\t String fname = f_iterator.next( );\n\t FuncDetails fdetail = p_result.fdetails.get( fname );\n\t CopyPropFunction( fdetail );\n\t}\n\t\n\tCopyPropFunction( p_result.main_fn );\n/*\n\tHashSet<BasicBlock> to_visit = new HashSet<BasicBlock>( );\n\tHashSet<BasicBlock> visited = new HashSet<BasicBlock>( );\n\t\n\tto_visit.add( p_result.main_fn );\n\n\twhile( to_visit.isEmpty( ) == false ){\n\t BasicBlock b = (to_visit.iterator( )).next( );\n\t to_visit.remove( b );\n\t visited.add( b );\n\t \t \n\t for( int i = 0; i < b.NumNext( ); i++ ){\n\t\tBasicBlock nb = b.GetNext(i);\n\t \n\t\tif( visited.contains( nb ) == false )\n\t\t\tto_visit.add( nb );\n\t }\n\t}\n*/\t\t\n }",
"public CaseListOutMem() {\n \n cases = null;\n}",
"protected void do_switch() {\n {\n bind(OPC.CONST_0); iparmNone();\n pre(FLOW_NEXT); do_const(0); post();\n bind(OPC.CONST_1); iparmNone();\n pre(FLOW_NEXT); do_const(1); post();\n bind(OPC.CONST_2); iparmNone();\n pre(FLOW_NEXT); do_const(2); post();\n bind(OPC.CONST_3); iparmNone();\n pre(FLOW_NEXT); do_const(3); post();\n bind(OPC.CONST_4); iparmNone();\n pre(FLOW_NEXT); do_const(4); post();\n bind(OPC.CONST_5); iparmNone();\n pre(FLOW_NEXT); do_const(5); post();\n bind(OPC.CONST_6); iparmNone();\n pre(FLOW_NEXT); do_const(6); post();\n bind(OPC.CONST_7); iparmNone();\n pre(FLOW_NEXT); do_const(7); post();\n bind(OPC.CONST_8); iparmNone();\n pre(FLOW_NEXT); do_const(8); post();\n bind(OPC.CONST_9); iparmNone();\n pre(FLOW_NEXT); do_const(9); post();\n bind(OPC.CONST_10); iparmNone();\n pre(FLOW_NEXT); do_const(10); post();\n bind(OPC.CONST_11); iparmNone();\n pre(FLOW_NEXT); do_const(11); post();\n bind(OPC.CONST_12); iparmNone();\n pre(FLOW_NEXT); do_const(12); post();\n bind(OPC.CONST_13); iparmNone();\n pre(FLOW_NEXT); do_const(13); post();\n bind(OPC.CONST_14); iparmNone();\n pre(FLOW_NEXT); do_const(14); post();\n bind(OPC.CONST_15); iparmNone();\n pre(FLOW_NEXT); do_const(15); post();\n bind(OPC.OBJECT_0); iparmNone();\n pre(FLOW_NEXT); do_object(0); post();\n bind(OPC.OBJECT_1); iparmNone();\n pre(FLOW_NEXT); do_object(1); post();\n bind(OPC.OBJECT_2); iparmNone();\n pre(FLOW_NEXT); do_object(2); post();\n bind(OPC.OBJECT_3); iparmNone();\n pre(FLOW_NEXT); do_object(3); post();\n bind(OPC.OBJECT_4); iparmNone();\n pre(FLOW_NEXT); do_object(4); post();\n bind(OPC.OBJECT_5); iparmNone();\n pre(FLOW_NEXT); do_object(5); post();\n bind(OPC.OBJECT_6); iparmNone();\n pre(FLOW_NEXT); do_object(6); post();\n bind(OPC.OBJECT_7); iparmNone();\n pre(FLOW_NEXT); do_object(7); post();\n bind(OPC.OBJECT_8); iparmNone();\n pre(FLOW_NEXT); do_object(8); post();\n bind(OPC.OBJECT_9); iparmNone();\n pre(FLOW_NEXT); do_object(9); post();\n bind(OPC.OBJECT_10); iparmNone();\n pre(FLOW_NEXT); do_object(10); post();\n bind(OPC.OBJECT_11); iparmNone();\n pre(FLOW_NEXT); do_object(11); post();\n bind(OPC.OBJECT_12); iparmNone();\n pre(FLOW_NEXT); do_object(12); post();\n bind(OPC.OBJECT_13); iparmNone();\n pre(FLOW_NEXT); do_object(13); post();\n bind(OPC.OBJECT_14); iparmNone();\n pre(FLOW_NEXT); do_object(14); post();\n bind(OPC.OBJECT_15); iparmNone();\n pre(FLOW_NEXT); do_object(15); post();\n bind(OPC.LOAD_0); iparmNone();\n pre(FLOW_NEXT); do_load(0); post();\n bind(OPC.LOAD_1); iparmNone();\n pre(FLOW_NEXT); do_load(1); post();\n bind(OPC.LOAD_2); iparmNone();\n pre(FLOW_NEXT); do_load(2); post();\n bind(OPC.LOAD_3); iparmNone();\n pre(FLOW_NEXT); do_load(3); post();\n bind(OPC.LOAD_4); iparmNone();\n pre(FLOW_NEXT); do_load(4); post();\n bind(OPC.LOAD_5); iparmNone();\n pre(FLOW_NEXT); do_load(5); post();\n bind(OPC.LOAD_6); iparmNone();\n pre(FLOW_NEXT); do_load(6); post();\n bind(OPC.LOAD_7); iparmNone();\n pre(FLOW_NEXT); do_load(7); post();\n bind(OPC.LOAD_8); iparmNone();\n pre(FLOW_NEXT); do_load(8); post();\n bind(OPC.LOAD_9); iparmNone();\n pre(FLOW_NEXT); do_load(9); post();\n bind(OPC.LOAD_10); iparmNone();\n pre(FLOW_NEXT); do_load(10); post();\n bind(OPC.LOAD_11); iparmNone();\n pre(FLOW_NEXT); do_load(11); post();\n bind(OPC.LOAD_12); iparmNone();\n pre(FLOW_NEXT); do_load(12); post();\n bind(OPC.LOAD_13); iparmNone();\n pre(FLOW_NEXT); do_load(13); post();\n bind(OPC.LOAD_14); iparmNone();\n pre(FLOW_NEXT); do_load(14); post();\n bind(OPC.LOAD_15); iparmNone();\n pre(FLOW_NEXT); do_load(15); post();\n bind(OPC.STORE_0); iparmNone();\n pre(FLOW_NEXT); do_store(0); post();\n bind(OPC.STORE_1); iparmNone();\n pre(FLOW_NEXT); do_store(1); post();\n bind(OPC.STORE_2); iparmNone();\n pre(FLOW_NEXT); do_store(2); post();\n bind(OPC.STORE_3); iparmNone();\n pre(FLOW_NEXT); do_store(3); post();\n bind(OPC.STORE_4); iparmNone();\n pre(FLOW_NEXT); do_store(4); post();\n bind(OPC.STORE_5); iparmNone();\n pre(FLOW_NEXT); do_store(5); post();\n bind(OPC.STORE_6); iparmNone();\n pre(FLOW_NEXT); do_store(6); post();\n bind(OPC.STORE_7); iparmNone();\n pre(FLOW_NEXT); do_store(7); post();\n bind(OPC.STORE_8); iparmNone();\n pre(FLOW_NEXT); do_store(8); post();\n bind(OPC.STORE_9); iparmNone();\n pre(FLOW_NEXT); do_store(9); post();\n bind(OPC.STORE_10); iparmNone();\n pre(FLOW_NEXT); do_store(10); post();\n bind(OPC.STORE_11); iparmNone();\n pre(FLOW_NEXT); do_store(11); post();\n bind(OPC.STORE_12); iparmNone();\n pre(FLOW_NEXT); do_store(12); post();\n bind(OPC.STORE_13); iparmNone();\n pre(FLOW_NEXT); do_store(13); post();\n bind(OPC.STORE_14); iparmNone();\n pre(FLOW_NEXT); do_store(14); post();\n bind(OPC.STORE_15); iparmNone();\n pre(FLOW_NEXT); do_store(15); post();\n bind(OPC.LOADPARM_0); iparmNone();\n pre(FLOW_NEXT); do_loadparm(0); post();\n bind(OPC.LOADPARM_1); iparmNone();\n pre(FLOW_NEXT); do_loadparm(1); post();\n bind(OPC.LOADPARM_2); iparmNone();\n pre(FLOW_NEXT); do_loadparm(2); post();\n bind(OPC.LOADPARM_3); iparmNone();\n pre(FLOW_NEXT); do_loadparm(3); post();\n bind(OPC.LOADPARM_4); iparmNone();\n pre(FLOW_NEXT); do_loadparm(4); post();\n bind(OPC.LOADPARM_5); iparmNone();\n pre(FLOW_NEXT); do_loadparm(5); post();\n bind(OPC.LOADPARM_6); iparmNone();\n pre(FLOW_NEXT); do_loadparm(6); post();\n bind(OPC.LOADPARM_7); iparmNone();\n pre(FLOW_NEXT); do_loadparm(7); post();\n bind(OPC.WIDE_M1); iparmNone();\n pre(FLOW_CHANGE); do_wide(-1); post();\n bind(OPC.WIDE_0); iparmNone();\n pre(FLOW_CHANGE); do_wide(0); post();\n bind(OPC.WIDE_1); iparmNone();\n pre(FLOW_CHANGE); do_wide(1); post();\n bind(OPC.WIDE_SHORT); iparmNone();\n pre(FLOW_CHANGE); do_wide_short(); post();\n bind(OPC.WIDE_INT); iparmNone();\n pre(FLOW_CHANGE); do_wide_int(); post();\n bind(OPC.ESCAPE); iparmNone();\n pre(FLOW_CHANGE); do_escape(); post();\n bind(OPC.ESCAPE_WIDE_M1); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide(-1); post();\n bind(OPC.ESCAPE_WIDE_0); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide(0); post();\n bind(OPC.ESCAPE_WIDE_1); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide(1); post();\n bind(OPC.ESCAPE_WIDE_SHORT); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide_short(); post();\n bind(OPC.ESCAPE_WIDE_INT); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide_int(); post();\n bind(OPC.CATCH); iparmNone();\n pre(FLOW_NEXT); do_catch(); post();\n bind(OPC.CONST_NULL); iparmNone();\n pre(FLOW_NEXT); do_const_null(); post();\n bind(OPC.CONST_M1); iparmNone();\n pre(FLOW_NEXT); do_const(-1); post();\n bind(OPC.CONST_BYTE); iparmNone();\n pre(FLOW_NEXT); do_const_byte(); post();\n bind(OPC.CONST_SHORT); iparmNone();\n pre(FLOW_NEXT); do_const_short(); post();\n bind(OPC.CONST_CHAR); iparmNone();\n pre(FLOW_NEXT); do_const_char(); post();\n bind(OPC.CONST_INT); iparmNone();\n pre(FLOW_NEXT); do_const_int(); post();\n bind(OPC.CONST_LONG); iparmNone();\n pre(FLOW_NEXT); do_const_long(); post();\n bind(OPC.OBJECT); iparmUByte();\n bind(OPC.OBJECT_WIDE); pre(FLOW_NEXT); do_object(); post();\n bind(OPC.LOAD); iparmUByte();\n bind(OPC.LOAD_WIDE); pre(FLOW_NEXT); do_load(); post(); \n bind(OPC.LOAD_I2); iparmUByte();\n bind(OPC.LOAD_I2_WIDE); pre(FLOW_NEXT); do_load_i2(); post();\n bind(OPC.STORE); iparmUByte();\n bind(OPC.STORE_WIDE); pre(FLOW_NEXT); do_store(); post();\n bind(OPC.STORE_I2); iparmUByte();\n bind(OPC.STORE_I2_WIDE); pre(FLOW_NEXT); do_store_i2(); post();\n bind(OPC.LOADPARM); iparmUByte();\n bind(OPC.LOADPARM_WIDE); pre(FLOW_NEXT); do_loadparm(); post();\n bind(OPC.LOADPARM_I2); iparmUByte();\n bind(OPC.LOADPARM_I2_WIDE); pre(FLOW_NEXT); do_loadparm_i2(); post();\n bind(OPC.STOREPARM); iparmUByte();\n bind(OPC.STOREPARM_WIDE); pre(FLOW_NEXT); do_storeparm(); post();\n bind(OPC.STOREPARM_I2); iparmUByte();\n bind(OPC.STOREPARM_I2_WIDE); pre(FLOW_NEXT); do_storeparm_i2(); post();\n bind(OPC.INC); iparmUByte();\n bind(OPC.INC_WIDE); pre(FLOW_NEXT); do_inc(); post(); \n bind(OPC.DEC); iparmUByte();\n bind(OPC.DEC_WIDE); pre(FLOW_NEXT); do_dec(); post(); \n bind(OPC.INCPARM); iparmUByte();\n bind(OPC.INCPARM_WIDE); pre(FLOW_NEXT); do_incparm(); post();\n bind(OPC.DECPARM); iparmUByte();\n bind(OPC.DECPARM_WIDE); pre(FLOW_NEXT); do_decparm(); post();\n bind(OPC.GOTO); iparmByte();\n bind(OPC.GOTO_WIDE); pre(FLOW_CHANGE); do_goto(); post();\n bind(OPC.IF_EQ_O); iparmByte();\n bind(OPC.IF_EQ_O_WIDE); pre(FLOW_CHANGE); do_if(1, EQ, OOP); post();\n bind(OPC.IF_NE_O); iparmByte();\n bind(OPC.IF_NE_O_WIDE); pre(FLOW_CHANGE); do_if(1, NE, OOP); post();\n bind(OPC.IF_CMPEQ_O); iparmByte();\n bind(OPC.IF_CMPEQ_O_WIDE); pre(FLOW_CHANGE); do_if(2, EQ, OOP); post();\n bind(OPC.IF_CMPNE_O); iparmByte();\n bind(OPC.IF_CMPNE_O_WIDE); pre(FLOW_CHANGE); do_if(2, NE, OOP); post();\n bind(OPC.IF_EQ_I); iparmByte();\n bind(OPC.IF_EQ_I_WIDE); pre(FLOW_CHANGE); do_if(1, EQ, INT); post();\n bind(OPC.IF_NE_I); iparmByte();\n bind(OPC.IF_NE_I_WIDE); pre(FLOW_CHANGE); do_if(1, NE, INT); post();\n bind(OPC.IF_LT_I); iparmByte();\n bind(OPC.IF_LT_I_WIDE); pre(FLOW_CHANGE); do_if(1, LT, INT); post();\n bind(OPC.IF_LE_I); iparmByte();\n bind(OPC.IF_LE_I_WIDE); pre(FLOW_CHANGE); do_if(1, LE, INT); post();\n bind(OPC.IF_GT_I); iparmByte();\n bind(OPC.IF_GT_I_WIDE); pre(FLOW_CHANGE); do_if(1, GT, INT); post();\n bind(OPC.IF_GE_I); iparmByte();\n bind(OPC.IF_GE_I_WIDE); pre(FLOW_CHANGE); do_if(1, GE, INT); post();\n bind(OPC.IF_CMPEQ_I); iparmByte();\n bind(OPC.IF_CMPEQ_I_WIDE); pre(FLOW_CHANGE); do_if(2, EQ, INT); post();\n bind(OPC.IF_CMPNE_I); iparmByte();\n bind(OPC.IF_CMPNE_I_WIDE); pre(FLOW_CHANGE); do_if(2, NE, INT); post();\n bind(OPC.IF_CMPLT_I); iparmByte();\n bind(OPC.IF_CMPLT_I_WIDE); pre(FLOW_CHANGE); do_if(2, LT, INT); post();\n bind(OPC.IF_CMPLE_I); iparmByte();\n bind(OPC.IF_CMPLE_I_WIDE); pre(FLOW_CHANGE); do_if(2, LE, INT); post();\n bind(OPC.IF_CMPGT_I); iparmByte();\n bind(OPC.IF_CMPGT_I_WIDE); pre(FLOW_CHANGE); do_if(2, GT, INT); post();\n bind(OPC.IF_CMPGE_I); iparmByte();\n bind(OPC.IF_CMPGE_I_WIDE); pre(FLOW_CHANGE); do_if(2, GE, INT); post();\n bind(OPC.IF_EQ_L); iparmByte();\n bind(OPC.IF_EQ_L_WIDE); pre(FLOW_CHANGE); do_if(1, EQ, LONG); post();\n bind(OPC.IF_NE_L); iparmByte();\n bind(OPC.IF_NE_L_WIDE); pre(FLOW_CHANGE); do_if(1, NE, LONG); post();\n bind(OPC.IF_LT_L); iparmByte();\n bind(OPC.IF_LT_L_WIDE); pre(FLOW_CHANGE); do_if(1, LT, LONG); post();\n bind(OPC.IF_LE_L); iparmByte();\n bind(OPC.IF_LE_L_WIDE); pre(FLOW_CHANGE); do_if(1, LE, LONG); post();\n bind(OPC.IF_GT_L); iparmByte();\n bind(OPC.IF_GT_L_WIDE); pre(FLOW_CHANGE); do_if(1, GT, LONG); post();\n bind(OPC.IF_GE_L); iparmByte();\n bind(OPC.IF_GE_L_WIDE); pre(FLOW_CHANGE); do_if(1, GE, LONG); post();\n bind(OPC.IF_CMPEQ_L); iparmByte();\n bind(OPC.IF_CMPEQ_L_WIDE); pre(FLOW_CHANGE); do_if(2, EQ, LONG); post();\n bind(OPC.IF_CMPNE_L); iparmByte();\n bind(OPC.IF_CMPNE_L_WIDE); pre(FLOW_CHANGE); do_if(2, NE, LONG); post();\n bind(OPC.IF_CMPLT_L); iparmByte();\n bind(OPC.IF_CMPLT_L_WIDE); pre(FLOW_CHANGE); do_if(2, LT, LONG); post();\n bind(OPC.IF_CMPLE_L); iparmByte();\n bind(OPC.IF_CMPLE_L_WIDE); pre(FLOW_CHANGE); do_if(2, LE, LONG); post();\n bind(OPC.IF_CMPGT_L); iparmByte();\n bind(OPC.IF_CMPGT_L_WIDE); pre(FLOW_CHANGE); do_if(2, GT, LONG); post();\n bind(OPC.IF_CMPGE_L); iparmByte();\n bind(OPC.IF_CMPGE_L_WIDE); pre(FLOW_CHANGE); do_if(2, GE, LONG); post();\n bind(OPC.GETSTATIC_I); iparmUByte();\n bind(OPC.GETSTATIC_I_WIDE); pre(FLOW_CALL); do_getstatic(INT); post();\n bind(OPC.GETSTATIC_O); iparmUByte();\n bind(OPC.GETSTATIC_O_WIDE); pre(FLOW_CALL); do_getstatic(OOP); post();\n bind(OPC.GETSTATIC_L); iparmUByte();\n bind(OPC.GETSTATIC_L_WIDE); pre(FLOW_CALL); do_getstatic(LONG); post();\n bind(OPC.CLASS_GETSTATIC_I); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_I_WIDE); pre(FLOW_CALL); do_class_getstatic(INT); post();\n bind(OPC.CLASS_GETSTATIC_O); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_O_WIDE); pre(FLOW_CALL); do_class_getstatic(OOP); post();\n bind(OPC.CLASS_GETSTATIC_L); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_L_WIDE); pre(FLOW_CALL); do_class_getstatic(LONG); post();\n bind(OPC.PUTSTATIC_I); iparmUByte();\n bind(OPC.PUTSTATIC_I_WIDE); pre(FLOW_CALL); do_putstatic(INT); post();\n bind(OPC.PUTSTATIC_O); iparmUByte();\n bind(OPC.PUTSTATIC_O_WIDE); pre(FLOW_CALL); do_putstatic(OOP); post();\n bind(OPC.PUTSTATIC_L); iparmUByte();\n bind(OPC.PUTSTATIC_L_WIDE); pre(FLOW_CALL); do_putstatic(LONG); post();\n bind(OPC.CLASS_PUTSTATIC_I); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_I_WIDE); pre(FLOW_CALL); do_class_putstatic(INT); post();\n bind(OPC.CLASS_PUTSTATIC_O); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_O_WIDE); pre(FLOW_CALL); do_class_putstatic(OOP); post();\n bind(OPC.CLASS_PUTSTATIC_L); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_L_WIDE); pre(FLOW_CALL); do_class_putstatic(LONG); post();\n bind(OPC.GETFIELD_I); iparmUByte();\n bind(OPC.GETFIELD_I_WIDE); pre(FLOW_CALL); do_getfield(INT); post();\n bind(OPC.GETFIELD_B); iparmUByte();\n bind(OPC.GETFIELD_B_WIDE); pre(FLOW_CALL); do_getfield(BYTE); post();\n bind(OPC.GETFIELD_S); iparmUByte();\n bind(OPC.GETFIELD_S_WIDE); pre(FLOW_CALL); do_getfield(SHORT); post();\n bind(OPC.GETFIELD_C); iparmUByte();\n bind(OPC.GETFIELD_C_WIDE); pre(FLOW_CALL); do_getfield(USHORT); post();\n bind(OPC.GETFIELD_O); iparmUByte();\n bind(OPC.GETFIELD_O_WIDE); pre(FLOW_CALL); do_getfield(OOP); post();\n bind(OPC.GETFIELD_L); iparmUByte();\n bind(OPC.GETFIELD_L_WIDE); pre(FLOW_CALL); do_getfield(LONG); post();\n bind(OPC.GETFIELD0_I); iparmUByte();\n bind(OPC.GETFIELD0_I_WIDE); pre(FLOW_NEXT); do_getfield0(INT); post();\n bind(OPC.GETFIELD0_B); iparmUByte();\n bind(OPC.GETFIELD0_B_WIDE); pre(FLOW_NEXT); do_getfield0(BYTE); post();\n bind(OPC.GETFIELD0_S); iparmUByte();\n bind(OPC.GETFIELD0_S_WIDE); pre(FLOW_NEXT); do_getfield0(SHORT); post();\n bind(OPC.GETFIELD0_C); iparmUByte();\n bind(OPC.GETFIELD0_C_WIDE); pre(FLOW_NEXT); do_getfield0(USHORT); post();\n bind(OPC.GETFIELD0_O); iparmUByte();\n bind(OPC.GETFIELD0_O_WIDE); pre(FLOW_NEXT); do_getfield0(OOP); post();\n bind(OPC.GETFIELD0_L); iparmUByte();\n bind(OPC.GETFIELD0_L_WIDE); pre(FLOW_NEXT); do_getfield0(LONG); post();\n bind(OPC.PUTFIELD_I); iparmUByte();\n bind(OPC.PUTFIELD_I_WIDE); pre(FLOW_CALL); do_putfield(INT); post();\n bind(OPC.PUTFIELD_B); iparmUByte();\n bind(OPC.PUTFIELD_B_WIDE); pre(FLOW_CALL); do_putfield(BYTE); post();\n bind(OPC.PUTFIELD_S); iparmUByte();\n bind(OPC.PUTFIELD_S_WIDE); pre(FLOW_CALL); do_putfield(SHORT); post();\n bind(OPC.PUTFIELD_O); iparmUByte();\n bind(OPC.PUTFIELD_O_WIDE); pre(FLOW_CALL); do_putfield(OOP); post();\n bind(OPC.PUTFIELD_L); iparmUByte();\n bind(OPC.PUTFIELD_L_WIDE); pre(FLOW_CALL); do_putfield(LONG); post();\n bind(OPC.PUTFIELD0_I); iparmUByte();\n bind(OPC.PUTFIELD0_I_WIDE); pre(FLOW_NEXT); do_putfield0(INT); post();\n bind(OPC.PUTFIELD0_B); iparmUByte();\n bind(OPC.PUTFIELD0_B_WIDE); pre(FLOW_NEXT); do_putfield0(BYTE); post();\n bind(OPC.PUTFIELD0_S); iparmUByte();\n bind(OPC.PUTFIELD0_S_WIDE); pre(FLOW_NEXT); do_putfield0(SHORT); post();\n bind(OPC.PUTFIELD0_O); iparmUByte();\n bind(OPC.PUTFIELD0_O_WIDE); pre(FLOW_NEXT); do_putfield0(OOP); post();\n bind(OPC.PUTFIELD0_L); iparmUByte();\n bind(OPC.PUTFIELD0_L_WIDE); pre(FLOW_NEXT); do_putfield0(LONG); post();\n bind(OPC.INVOKEVIRTUAL_I); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_I_WIDE); pre(FLOW_CALL); do_invokevirtual(INT); post();\n bind(OPC.INVOKEVIRTUAL_V); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_V_WIDE); pre(FLOW_CALL); do_invokevirtual(VOID); post();\n bind(OPC.INVOKEVIRTUAL_L); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_L_WIDE); pre(FLOW_CALL); do_invokevirtual(LONG); post();\n bind(OPC.INVOKEVIRTUAL_O); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_O_WIDE); pre(FLOW_CALL); do_invokevirtual(OOP); post();\n bind(OPC.INVOKESTATIC_I); iparmUByte();\n bind(OPC.INVOKESTATIC_I_WIDE); pre(FLOW_CALL); do_invokestatic(INT); post();\n bind(OPC.INVOKESTATIC_V); iparmUByte();\n bind(OPC.INVOKESTATIC_V_WIDE); pre(FLOW_CALL); do_invokestatic(VOID); post();\n bind(OPC.INVOKESTATIC_L); iparmUByte();\n bind(OPC.INVOKESTATIC_L_WIDE); pre(FLOW_CALL); do_invokestatic(LONG); post();\n bind(OPC.INVOKESTATIC_O); iparmUByte();\n bind(OPC.INVOKESTATIC_O_WIDE); pre(FLOW_CALL); do_invokestatic(OOP); post();\n bind(OPC.INVOKESUPER_I); iparmUByte();\n bind(OPC.INVOKESUPER_I_WIDE); pre(FLOW_CALL); do_invokesuper(INT); post();\n bind(OPC.INVOKESUPER_V); iparmUByte();\n bind(OPC.INVOKESUPER_V_WIDE); pre(FLOW_CALL); do_invokesuper(VOID); post();\n bind(OPC.INVOKESUPER_L); iparmUByte();\n bind(OPC.INVOKESUPER_L_WIDE); pre(FLOW_CALL); do_invokesuper(LONG); post();\n bind(OPC.INVOKESUPER_O); iparmUByte();\n bind(OPC.INVOKESUPER_O_WIDE); pre(FLOW_CALL); do_invokesuper(OOP); post();\n bind(OPC.INVOKENATIVE_I); iparmUByte();\n bind(OPC.INVOKENATIVE_I_WIDE); pre(FLOW_CALL); do_invokenative(INT); post();\n bind(OPC.INVOKENATIVE_V); iparmUByte();\n bind(OPC.INVOKENATIVE_V_WIDE); pre(FLOW_CALL); do_invokenative(VOID); post();\n bind(OPC.INVOKENATIVE_L); iparmUByte();\n bind(OPC.INVOKENATIVE_L_WIDE); pre(FLOW_CALL); do_invokenative(LONG); post();\n bind(OPC.INVOKENATIVE_O); iparmUByte();\n bind(OPC.INVOKENATIVE_O_WIDE); pre(FLOW_CALL); do_invokenative(OOP); post();\n bind(OPC.FINDSLOT); iparmUByte();\n bind(OPC.FINDSLOT_WIDE); pre(FLOW_CALL); do_findslot(); post();\n bind(OPC.EXTEND); iparmUByte();\n bind(OPC.EXTEND_WIDE); pre(FLOW_NEXT); do_extend(); post();\n bind(OPC.INVOKESLOT_I); iparmNone();\n pre(FLOW_CALL); do_invokeslot(INT); post();\n bind(OPC.INVOKESLOT_V); iparmNone();\n pre(FLOW_CALL); do_invokeslot(VOID); post();\n bind(OPC.INVOKESLOT_L); iparmNone();\n pre(FLOW_CALL); do_invokeslot(LONG); post();\n bind(OPC.INVOKESLOT_O); iparmNone();\n pre(FLOW_CALL); do_invokeslot(OOP); post();\n bind(OPC.RETURN_V); iparmNone();\n pre(FLOW_CHANGE); do_return(VOID); post();\n bind(OPC.RETURN_I); iparmNone();\n pre(FLOW_CHANGE); do_return(INT); post();\n bind(OPC.RETURN_L); iparmNone();\n pre(FLOW_CHANGE); do_return(LONG); post();\n bind(OPC.RETURN_O); iparmNone();\n pre(FLOW_CHANGE); do_return(OOP); post();\n bind(OPC.TABLESWITCH_I); iparmNone();\n pre(FLOW_CHANGE); do_tableswitch(INT); post();\n bind(OPC.TABLESWITCH_S); iparmNone();\n pre(FLOW_CHANGE); do_tableswitch(SHORT); post();\n bind(OPC.EXTEND0); iparmNone();\n pre(FLOW_NEXT); do_extend0(); post();\n bind(OPC.ADD_I); iparmNone();\n pre(FLOW_NEXT); do_add(INT); post();\n bind(OPC.SUB_I); iparmNone();\n pre(FLOW_NEXT); do_sub(INT); post();\n bind(OPC.AND_I); iparmNone();\n pre(FLOW_NEXT); do_and(INT); post();\n bind(OPC.OR_I); iparmNone();\n pre(FLOW_NEXT); do_or(INT); post();\n bind(OPC.XOR_I); iparmNone();\n pre(FLOW_NEXT); do_xor(INT); post();\n bind(OPC.SHL_I); iparmNone();\n pre(FLOW_NEXT); do_shl(INT); post();\n bind(OPC.SHR_I); iparmNone();\n pre(FLOW_NEXT); do_shr(INT); post();\n bind(OPC.USHR_I); iparmNone();\n pre(FLOW_NEXT); do_ushr(INT); post();\n bind(OPC.MUL_I); iparmNone();\n pre(FLOW_NEXT); do_mul(INT); post();\n bind(OPC.DIV_I); iparmNone();\n pre(FLOW_CALL); do_div(INT); post();\n bind(OPC.REM_I); iparmNone();\n pre(FLOW_CALL); do_rem(INT); post();\n bind(OPC.NEG_I); iparmNone();\n pre(FLOW_NEXT); do_neg(INT); post();\n bind(OPC.I2B); iparmNone();\n pre(FLOW_NEXT); do_i2b(); post(); \n bind(OPC.I2S); iparmNone();\n pre(FLOW_NEXT); do_i2s(); post(); \n bind(OPC.I2C); iparmNone();\n pre(FLOW_NEXT); do_i2c(); post(); \n bind(OPC.ADD_L); iparmNone();\n pre(FLOW_NEXT); do_add(LONG); post();\n bind(OPC.SUB_L); iparmNone();\n pre(FLOW_NEXT); do_sub(LONG); post();\n bind(OPC.MUL_L); iparmNone();\n pre(FLOW_NEXT); do_mul(LONG); post();\n bind(OPC.DIV_L); iparmNone();\n pre(FLOW_CALL); do_div(LONG); post();\n bind(OPC.REM_L); iparmNone();\n pre(FLOW_CALL); do_rem(LONG); post();\n bind(OPC.AND_L); iparmNone();\n pre(FLOW_NEXT); do_and(LONG); post();\n bind(OPC.OR_L); iparmNone();\n pre(FLOW_NEXT); do_or(LONG); post();\n bind(OPC.XOR_L); iparmNone();\n pre(FLOW_NEXT); do_xor(LONG); post();\n bind(OPC.NEG_L); iparmNone();\n pre(FLOW_NEXT); do_neg(LONG); post();\n bind(OPC.SHL_L); iparmNone();\n pre(FLOW_NEXT); do_shl(LONG); post();\n bind(OPC.SHR_L); iparmNone();\n pre(FLOW_NEXT); do_shr(LONG); post();\n bind(OPC.USHR_L); iparmNone();\n pre(FLOW_NEXT); do_ushr(LONG); post();\n bind(OPC.L2I); iparmNone();\n pre(FLOW_NEXT); do_l2i(); post(); \n bind(OPC.I2L); iparmNone();\n pre(FLOW_NEXT); do_i2l(); post(); \n bind(OPC.THROW); iparmNone();\n pre(FLOW_CALL); do_throw(); post();\n bind(OPC.POP_1); iparmNone();\n pre(FLOW_NEXT); do_pop(1); post(); \n bind(OPC.POP_2); iparmNone();\n pre(FLOW_NEXT); do_pop(2); post(); \n bind(OPC.MONITORENTER); iparmNone();\n pre(FLOW_CALL); do_monitorenter(); post();\n bind(OPC.MONITOREXIT); iparmNone();\n pre(FLOW_CALL); do_monitorexit(); post();\n bind(OPC.CLASS_MONITORENTER); iparmNone();\n pre(FLOW_CALL); do_class_monitorenter(); post();\n bind(OPC.CLASS_MONITOREXIT); iparmNone();\n pre(FLOW_CALL); do_class_monitorexit(); post();\n bind(OPC.ARRAYLENGTH); iparmNone();\n pre(FLOW_CALL); do_arraylength(); post();\n bind(OPC.NEW); iparmNone();\n pre(FLOW_CALL); do_new(); post(); \n bind(OPC.NEWARRAY); iparmNone();\n pre(FLOW_CALL); do_newarray(); post();\n bind(OPC.NEWDIMENSION); iparmNone();\n pre(FLOW_CALL); do_newdimension(); post();\n bind(OPC.CLASS_CLINIT); iparmNone();\n pre(FLOW_CALL); do_class_clinit(); post();\n bind(OPC.BBTARGET_SYS); iparmNone();\n pre(FLOW_NEXT); do_bbtarget_sys(); post();\n bind(OPC.BBTARGET_APP); iparmNone();\n pre(FLOW_CALL); do_bbtarget_app(); post();\n bind(OPC.INSTANCEOF); iparmNone();\n pre(FLOW_CALL); do_instanceof(); post();\n bind(OPC.CHECKCAST); iparmNone();\n pre(FLOW_CALL); do_checkcast(); post();\n bind(OPC.ALOAD_I); iparmNone();\n pre(FLOW_CALL); do_aload(INT); post();\n bind(OPC.ALOAD_B); iparmNone();\n pre(FLOW_CALL); do_aload(BYTE); post();\n bind(OPC.ALOAD_S); iparmNone();\n pre(FLOW_CALL); do_aload(SHORT); post();\n bind(OPC.ALOAD_C); iparmNone();\n pre(FLOW_CALL); do_aload(USHORT); post();\n bind(OPC.ALOAD_O); iparmNone();\n pre(FLOW_CALL); do_aload(OOP); post();\n bind(OPC.ALOAD_L); iparmNone();\n pre(FLOW_CALL); do_aload(LONG); post();\n bind(OPC.ASTORE_I); iparmNone();\n pre(FLOW_CALL); do_astore(INT); post();\n bind(OPC.ASTORE_B); iparmNone();\n pre(FLOW_CALL); do_astore(BYTE); post();\n bind(OPC.ASTORE_S); iparmNone();\n pre(FLOW_CALL); do_astore(SHORT); post();\n bind(OPC.ASTORE_O); iparmNone();\n pre(FLOW_CALL); do_astore(OOP); post();\n bind(OPC.ASTORE_L); iparmNone();\n pre(FLOW_CALL); do_astore(LONG); post();\n bind(OPC.LOOKUP_I); iparmNone();\n pre(FLOW_CALL); do_lookup(INT); post();\n bind(OPC.LOOKUP_B); iparmNone();\n pre(FLOW_CALL); do_lookup(BYTE); post();\n bind(OPC.LOOKUP_S); iparmNone();\n pre(FLOW_CALL); do_lookup(SHORT); post();\n bind(OPC.PAUSE); iparmNone();\n pre(FLOW_NEXT); do_pause(); post();\n\n/*if[FLOATS]*/\n bind(OPC.FCMPL); iparmNone();\n pre(FLOW_NEXT); do_fcmpl(); post();\n bind(OPC.FCMPG); iparmNone();\n pre(FLOW_NEXT); do_fcmpg(); post();\n bind(OPC.DCMPL); iparmNone();\n pre(FLOW_NEXT); do_dcmpl(); post();\n bind(OPC.DCMPG); iparmNone();\n pre(FLOW_NEXT); do_dcmpg(); post();\n bind(OPC.GETSTATIC_F); iparmUByte();\n bind(OPC.GETSTATIC_F_WIDE); pre(FLOW_CALL); do_getstatic(FLOAT); post();\n bind(OPC.GETSTATIC_D); iparmUByte();\n bind(OPC.GETSTATIC_D_WIDE); pre(FLOW_CALL); do_getstatic(DOUBLE); post();\n bind(OPC.CLASS_GETSTATIC_F); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_F_WIDE); pre(FLOW_CALL); do_class_getstatic(FLOAT); post();\n bind(OPC.CLASS_GETSTATIC_D); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_D_WIDE); pre(FLOW_CALL); do_class_getstatic(DOUBLE); post();\n bind(OPC.PUTSTATIC_F); iparmUByte();\n bind(OPC.PUTSTATIC_F_WIDE); pre(FLOW_CALL); do_putstatic(FLOAT); post();\n bind(OPC.PUTSTATIC_D); iparmUByte();\n bind(OPC.PUTSTATIC_D_WIDE); pre(FLOW_CALL); do_putstatic(DOUBLE); post();\n bind(OPC.CLASS_PUTSTATIC_F); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_F_WIDE); pre(FLOW_CALL); do_class_putstatic(FLOAT); post();\n bind(OPC.CLASS_PUTSTATIC_D); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_D_WIDE); pre(FLOW_CALL); do_class_putstatic(DOUBLE); post();\n bind(OPC.GETFIELD_F); iparmUByte();\n bind(OPC.GETFIELD_F_WIDE); pre(FLOW_CALL); do_getfield(FLOAT); post();\n bind(OPC.GETFIELD_D); iparmUByte();\n bind(OPC.GETFIELD_D_WIDE); pre(FLOW_CALL); do_getfield(DOUBLE); post();\n bind(OPC.GETFIELD0_F); iparmUByte();\n bind(OPC.GETFIELD0_F_WIDE); pre(FLOW_NEXT); do_getfield0(FLOAT); post();\n bind(OPC.GETFIELD0_D); iparmUByte();\n bind(OPC.GETFIELD0_D_WIDE); pre(FLOW_NEXT); do_getfield0(DOUBLE); post();\n bind(OPC.PUTFIELD_F); iparmUByte();\n bind(OPC.PUTFIELD_F_WIDE); pre(FLOW_CALL); do_putfield(FLOAT); post();\n bind(OPC.PUTFIELD_D); iparmUByte();\n bind(OPC.PUTFIELD_D_WIDE); pre(FLOW_CALL); do_putfield(DOUBLE); post();\n bind(OPC.PUTFIELD0_F); iparmUByte();\n bind(OPC.PUTFIELD0_F_WIDE); pre(FLOW_NEXT); do_putfield0(FLOAT); post();\n bind(OPC.PUTFIELD0_D); iparmUByte();\n bind(OPC.PUTFIELD0_D_WIDE); pre(FLOW_NEXT); do_putfield0(DOUBLE); post();\n bind(OPC.INVOKEVIRTUAL_F); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_F_WIDE); pre(FLOW_CALL); do_invokevirtual(FLOAT); post();\n bind(OPC.INVOKEVIRTUAL_D); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_D_WIDE); pre(FLOW_CALL); do_invokevirtual(DOUBLE); post();\n bind(OPC.INVOKESTATIC_F); iparmUByte();\n bind(OPC.INVOKESTATIC_F_WIDE); pre(FLOW_CALL); do_invokestatic(FLOAT); post();\n bind(OPC.INVOKESTATIC_D); iparmUByte();\n bind(OPC.INVOKESTATIC_D_WIDE); pre(FLOW_CALL); do_invokestatic(DOUBLE); post();\n bind(OPC.INVOKESUPER_F); iparmUByte();\n bind(OPC.INVOKESUPER_F_WIDE); pre(FLOW_CALL); do_invokesuper(FLOAT); post();\n bind(OPC.INVOKESUPER_D); iparmUByte();\n bind(OPC.INVOKESUPER_D_WIDE); pre(FLOW_CALL); do_invokesuper(DOUBLE); post();\n bind(OPC.INVOKENATIVE_F); iparmUByte();\n bind(OPC.INVOKENATIVE_F_WIDE); pre(FLOW_CALL); do_invokenative(FLOAT); post();\n bind(OPC.INVOKENATIVE_D); iparmUByte();\n bind(OPC.INVOKENATIVE_D_WIDE); pre(FLOW_CALL); do_invokenative(DOUBLE); post();\n bind(OPC.INVOKESLOT_F); iparmNone();\n pre(FLOW_CALL); do_invokeslot(FLOAT); post();\n bind(OPC.INVOKESLOT_D); iparmNone();\n pre(FLOW_CALL); do_invokeslot(DOUBLE); post();\n bind(OPC.RETURN_F); iparmNone();\n pre(FLOW_CHANGE); do_return(FLOAT); post();\n bind(OPC.RETURN_D); iparmNone();\n pre(FLOW_CHANGE); do_return(DOUBLE); post();\n bind(OPC.CONST_FLOAT); iparmNone();\n pre(FLOW_CHANGE); do_const_float(); post();\n bind(OPC.CONST_DOUBLE); iparmNone();\n pre(FLOW_CHANGE); do_const_double(); post();\n bind(OPC.ADD_F); iparmNone();\n pre(FLOW_NEXT); do_add(FLOAT); post();\n bind(OPC.SUB_F); iparmNone();\n pre(FLOW_NEXT); do_sub(FLOAT); post();\n bind(OPC.MUL_F); iparmNone();\n pre(FLOW_NEXT); do_mul(FLOAT); post();\n bind(OPC.DIV_F); iparmNone();\n pre(FLOW_NEXT); do_div(FLOAT); post();\n bind(OPC.REM_F); iparmNone();\n pre(FLOW_NEXT); do_rem(FLOAT); post();\n bind(OPC.NEG_F); iparmNone();\n pre(FLOW_NEXT); do_neg(FLOAT); post();\n bind(OPC.ADD_D); iparmNone();\n pre(FLOW_NEXT); do_add(DOUBLE); post();\n bind(OPC.SUB_D); iparmNone();\n pre(FLOW_NEXT); do_sub(DOUBLE); post();\n bind(OPC.MUL_D); iparmNone();\n pre(FLOW_NEXT); do_mul(DOUBLE); post();\n bind(OPC.DIV_D); iparmNone();\n pre(FLOW_NEXT); do_div(DOUBLE); post();\n bind(OPC.REM_D); iparmNone();\n pre(FLOW_NEXT); do_rem(DOUBLE); post();\n bind(OPC.NEG_D); iparmNone();\n pre(FLOW_NEXT); do_neg(DOUBLE); post();\n bind(OPC.I2F); iparmNone();\n pre(FLOW_NEXT); do_i2f(); post(); \n bind(OPC.L2F); iparmNone();\n pre(FLOW_NEXT); do_l2f(); post(); \n bind(OPC.F2I); iparmNone();\n pre(FLOW_NEXT); do_f2i(); post(); \n bind(OPC.F2L); iparmNone();\n pre(FLOW_NEXT); do_f2l(); post(); \n bind(OPC.I2D); iparmNone();\n pre(FLOW_NEXT); do_i2d(); post(); \n bind(OPC.L2D); iparmNone();\n pre(FLOW_NEXT); do_l2d(); post(); \n bind(OPC.F2D); iparmNone();\n pre(FLOW_NEXT); do_f2d(); post(); \n bind(OPC.D2I); iparmNone();\n pre(FLOW_NEXT); do_d2i(); post(); \n bind(OPC.D2L); iparmNone();\n pre(FLOW_NEXT); do_d2l(); post(); \n bind(OPC.D2F); iparmNone();\n pre(FLOW_NEXT); do_d2f(); post(); \n bind(OPC.ALOAD_F); iparmNone();\n pre(FLOW_CALL); do_aload(FLOAT); post();\n bind(OPC.ALOAD_D); iparmNone();\n pre(FLOW_CALL); do_aload(DOUBLE); post();\n bind(OPC.ASTORE_F); iparmNone();\n pre(FLOW_CALL); do_astore(FLOAT); post();\n bind(OPC.ASTORE_D); iparmNone();\n pre(FLOW_CALL); do_astore(DOUBLE); post();\n/*end[FLOATS]*/\n }\n }"
] | [
"0.55735445",
"0.53235465",
"0.5134971",
"0.50924325",
"0.50918037",
"0.5001271",
"0.49959472",
"0.494832",
"0.49078694",
"0.49017784",
"0.48959088",
"0.48925376",
"0.48909593",
"0.48232722",
"0.48160237",
"0.4754727",
"0.460472",
"0.4600228",
"0.45889753",
"0.45863885",
"0.45761794",
"0.4574787",
"0.45382467",
"0.4509486",
"0.44799998",
"0.44759917",
"0.44749525",
"0.44681674",
"0.4456504",
"0.44541955",
"0.4453932",
"0.44415867",
"0.4423672",
"0.44055313",
"0.43993762",
"0.4392812",
"0.43915445",
"0.43888336",
"0.43885228",
"0.43847728",
"0.43819392",
"0.43724647",
"0.4366199",
"0.43607193",
"0.43601665",
"0.4345372",
"0.43451452",
"0.43436617",
"0.43418345",
"0.43391192",
"0.43317312",
"0.43261582",
"0.43255734",
"0.43221444",
"0.4319833",
"0.43175235",
"0.43143415",
"0.43117136",
"0.4306245",
"0.42992204",
"0.42914507",
"0.42914414",
"0.42903104",
"0.42873058",
"0.42867857",
"0.4285827",
"0.42840445",
"0.4282204",
"0.42761332",
"0.42666662",
"0.42609808",
"0.42575145",
"0.4251684",
"0.42449552",
"0.4243992",
"0.4242655",
"0.4241706",
"0.42396373",
"0.4237026",
"0.423346",
"0.42306882",
"0.4222945",
"0.42214948",
"0.42150894",
"0.42099303",
"0.42086667",
"0.420757",
"0.42001957",
"0.41978082",
"0.41940093",
"0.41891068",
"0.41829377",
"0.418234",
"0.41808623",
"0.41791078",
"0.41784066",
"0.41782084",
"0.41735673",
"0.41732037",
"0.4171699"
] | 0.53842604 | 1 |
Constructor per defecte, inicialitza el koncepte amb els valors en blanc. | public CreateKonceptWorker() {
super();
this.koncept = new KoncepteParaula();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Valvula(){}",
"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 Cgg_jur_anticipo(){}",
"public BabbleValue() {}",
"public ValorVariavel() {\r\n }",
"Constructor() {\r\n\t\t \r\n\t }",
"public AntrianPasien() {\r\n\r\n }",
"public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}",
"public Pasien() {\r\n }",
"public ContasCorrentes(){\n this(0,\"\",0.0,0.0,0);\n }",
"public Ov_Chipkaart() {\n\t\t\n\t}",
"public Chauffeur() {\r\n\t}",
"public Pitonyak_09_02() {\r\n }",
"public Constructor(){\n\t\t\n\t}",
"public Kullanici() {}",
"public BaseParameters(){\r\n\t}",
"public PowerMethodParameter() {\r\n\t\t\r\n\t\t//constructor fara parametru, utilizat in cazul in care utilizatorul nu introduce\r\n\t\t//fisierul sursa si nici fiesierul destinatie ca parametrii in linia de comanda\r\n\t\tSystem.out.println(\"****The constructor without parameters PowerMethodParameter has been called****\");\r\n\t\tSystem.out.println(\"You did not specify the input file and the output file\");\r\n\t\t\r\n\t}",
"public ContaBancaria() {\n }",
"private GrupoCuenta(String nombre, int operacion)\r\n/* 11: */ {\r\n/* 12:31 */ this.nombre = nombre;\r\n/* 13:32 */ this.operacion = operacion;\r\n/* 14: */ }",
"public bly(int paramInt, Random paramRandom, bjb parambjb, EnumDirection paramej)\r\n/* 10: */ {\r\n/* 11:831 */ super(paramInt);\r\n/* 12: */ \r\n/* 13:833 */ this.m = paramej;\r\n/* 14:834 */ this.d = a(paramRandom);\r\n/* 15:835 */ this.l = parambjb;\r\n/* 16: */ }",
"public Achterbahn() {\n }",
"public TebakNusantara()\n {\n }",
"public ctq(File paramFile, String paramString, oa paramoa, ckh paramckh)\r\n/* 22: */ {\r\n/* 23: 33 */ super(paramoa);\r\n/* 24: 34 */ this.i = paramFile;\r\n/* 25: 35 */ this.j = paramString;\r\n/* 26: 36 */ this.k = paramckh;\r\n/* 27: */ }",
"public Candidatura (){\n \n }",
"public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }",
"public Methods() { // ini adalah sebuah construktor kosong tidak ada parameternya\n System.out.println(\"Ini adalah Sebuah construktor \");\n }",
"public Perro() {\n// super(\"No define\", \"NN\", 0); en caso el constructor de animal tenga parametros\n this.pelaje = \"corto\";\n }",
"public Parameters() {\n\t}",
"public Alojamiento() {\r\n\t}",
"public bwq(String paramString1, String paramString2)\r\n/* 10: */ {\r\n/* 11: 9 */ this.a = paramString1;\r\n/* 12:10 */ this.f = paramString2;\r\n/* 13: */ }",
"public LightParameter()\r\n\t{\r\n\t}",
"public SimulasiBean() {\n this.crane = \"L\";\n this.tipePelayaran = \"d\";\n indonesianNumberConverter = new IndonesianNumberConverter();\n }",
"public Cilindro(int idCilindro, int idCombustible, double longitud, double radio, String codigo, String combustible, double volumenFijo) {\r\n this.idCilindro = idCilindro;\r\n this.idCombustible = idCombustible;\r\n this.longitud = longitud;\r\n this.radio = radio;\r\n this.codigo = codigo;\r\n this.combustible = combustible;\r\n this.volumenFijo = volumenFijo;\r\n }",
"public Vehiculo() {\r\n }",
"public Personaje(Juego juego,Celda c) {\r\n\t\tsuper(juego,c);\r\n\t}",
"public GchCarLifeBbs() {\n this(\"gch_car_life_bbs\", null);\n }",
"public Boleta(){\r\n\t\tsuper();\r\n\t}",
"public Caso_de_uso () {\n }",
"@Test\n public void billCustomConstructor_isCorrect() throws Exception {\n\n int billId = 100;\n String billName = \"test Bill\";\n int userId = 101;\n int accountId = 202;\n double billAmount = 300.25;\n String dueDate = \"02/02/2018\";\n int occurrenceRte = 1;\n\n //Create empty bill\n Bill bill = new Bill(billId,userId,accountId,billName,billAmount,dueDate,occurrenceRte);\n\n // Verify Values\n assertEquals(billId, bill.getBillId());\n assertEquals(billName, bill.getBillName());\n assertEquals(userId, bill.getUserId());\n assertEquals(accountId, bill.getAccountId());\n assertEquals(billAmount, bill.getBillAmount(), 0);\n assertEquals(dueDate, bill.getDueDate());\n assertEquals(occurrenceRte, bill.getOccurrenceRte());\n }",
"public Boleto() {\n this(3.0);\n }",
"public DABeneficios() {\n }",
"ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}",
"public Cat(int r){\r\n\t\ttipoRegistro = r;\r\n\t\tatributos = new ArrayList<String[]>();\r\n\t}",
"public Lanceur() {\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 }",
"public Cavalier(boolean blanc) {\n super(blanc);\n }",
"public FicheConnaissance() {\r\n }",
"public prueba()\r\n {\r\n }",
"private Values(){}",
"public Employe () {\n this ( NOM_BIDON, null );\n }",
"public MLetter(Parameters parametersObj) {\r\n\t\tsuper(parametersObj);\r\n\t}",
"public Carrera(){\n }",
"public Validacion(String descripcion) {\n super(descripcion);\n }",
"public CarteCaisseCommunaute() {\n super();\n }",
"public NhanVien()\n {\n }",
"public Contribuinte()\n {\n this.nif = \"\";\n this.nome = \"\";\n this.morada = \"\"; \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 Anschrift() {\r\n }",
"Campana(String suono, int volte){\n this.suono = suono;\n this.volte = volte;\n }",
"protected ParameterList(){\n //title = t;\n //cellWorld = cw;\n }",
"public Coche() {\n super();\n }",
"public Banco(){}",
"public BacInfo() {\n }",
"public Curso() {\r\n }",
"public BLabel()\n {\n this((String) null, WEST);\n }",
"public Ciudad()\n {\n\n }",
"public Busca(){\n }",
"public SlanjePoruke() {\n }",
"public lo(int paramInt1, int paramInt2, int paramInt3, int paramInt4, byte paramByte1, byte paramByte2, boolean paramBoolean)\r\n/* 26: */ {\r\n/* 27:33 */ this.a = paramInt1;\r\n/* 28:34 */ this.b = paramInt2;\r\n/* 29:35 */ this.c = paramInt3;\r\n/* 30:36 */ this.d = paramInt4;\r\n/* 31:37 */ this.e = paramByte1;\r\n/* 32:38 */ this.f = paramByte2;\r\n/* 33:39 */ this.g = paramBoolean;\r\n/* 34: */ }",
"public LabelValueBean() {\r\n\t\tsuper(\"\", \"\");\r\n\t}",
"private Font(long paramLong, Object paramObject) {\n/* 1031 */ this.a = paramLong;\n/* 1032 */ this.b = paramObject;\n/* */ }",
"public Conway(AutomataCelular ac,int fila, int columna)\n {\n super(ac,fila,columna);\n automata = ac;\n this.fila = fila;\n this.columna= columna;\n color=Color.blue;\n estadoActual='v';\n }",
"public CyanSus() {\n\n }",
"public TelaValores() {\n initComponents();\n }",
"public RptPotonganGaji() {\n }",
"public CTematicaBienestar() {\r\n\t}",
"public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }",
"private ControleurAcceuil(){ }",
"protected Betaling()\r\n\t{\r\n\t\t\r\n\t}",
"public LInfSCBLens(){\n\tsuper();\n }",
"public Valor(Integer id_valor, String valor){\n\n //A variavel da classe Construtora vai receber a variavel que está vindo por parametro (This faz referencia a classe)\n this.id_valor = id_valor ;\n this.valor = valor ;\n }",
"Constructor(int i,String n ,int x){ //taking three parameters which shows that it is constructor overloaded\r\n\t\t id = i; \r\n\t\t name = n; \r\n\t\t marks =x; \r\n\t\t }",
"public Bombas(int x,int y) {\n \tsuper(x,y);\n }",
"protected Asignatura()\r\n\t{}",
"public telefono(){\n this.telefono =\"00000000\";\n this.saldo = 0.0;\n this.marca= \"Sin Marca\";\n }",
"public AirAndPollen() {\n\n\t}",
"public HandicapParameterSet() {\n }",
"Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}",
"public BistableParams(){\n\t\tMinDiffGrpPhyloDist = 0.5;\n\t\tMaxSameGrpPhyloDist= 0.3;\n\t\tMaxContentDiss = 0;\n\t\tMinGrpMemSize = 3;\n\t\tMinOpSize = 3;\n\t}",
"private ProfitPerTariffType ()\n {\n super();\n }",
"public Catelog() {\n super();\n }",
"public ValidaCpf() {\n }",
"public TCubico(){}",
"public CambioComplementariosDTO() { }",
"public QLNhanVien(){\n \n }",
"public CambioComplementariosDTO(java.lang.String curpEmpleado,\n java.lang.String rfcEmpleado,\n java.lang.String primerApellido,\n java.lang.String segundoApellido,\n java.lang.String nombreEmpleado,\n java.lang.String clabeEmpleado,\n java.lang.String idBancoSar,\n java.util.Date ingresoGobFed, \n java.util.Date ingresoDependencia, \n java.util.Date terminoCargoSind, \n java.lang.String imssIssste, \n java.lang.String EMailOficial, \n java.lang.String EMailPersonal,\n java.lang.Integer idRusp, \n java.lang.String sistemaReparto, \n java.lang.String idTipoPago, \n java.lang.String idEdoCivil, \n java.lang.String idNacionalidad, \n java.lang.String idProfnCarrera, \n java.lang.Integer idNivelEscolar, \n java.lang.Integer idInstEducativa, \n java.lang.Integer idEspProtCivil, \n java.lang.Integer idInstProtcivil, \n java.util.Date fecNotDecPatr, \n java.util.Date fecIniDeclPatr, \n java.util.Date fecIngSpc, \n java.lang.String casoMuestra,\n java.lang.String discapacidad,\n java.lang.String estudiaSiNo,\n java.lang.String padreMadre,\n java.lang.String compatEmpleo,\n java.lang.String usuario,\n java.lang.Integer idInmuebleP,\n java.lang.String plazaTelOfc1,\n java.lang.String plazaExt1) { \n this.curpEmpleado = curpEmpleado;\n this.rfcEmpleado = rfcEmpleado;\n this.primerApellido = primerApellido;\n this.segundoApellido = segundoApellido;\n this.nombreEmpleado = nombreEmpleado;\n this.clabeEmpleado = clabeEmpleado;\n this.idBancoSar = idBancoSar;\n this.ingresoGobFed = ingresoGobFed;\n this.ingresoDependencia = ingresoDependencia;\n this.terminoCargoSind = terminoCargoSind;\n this.imssIssste = imssIssste;\n this.EMailOficial = EMailOficial;\n this.EMailPersonal = EMailPersonal;\n this.idRusp = idRusp;\n this.sistemaReparto = sistemaReparto;\n this.idTipoPago = idTipoPago;\n this.idEdoCivil = idEdoCivil;\n this.idNacionalidad = idNacionalidad;\n this.idProfnCarrera = idProfnCarrera;\n this.idNivelEscolar = idNivelEscolar;\n this.idInstEducativa = idInstEducativa;\n this.idEspProtCivil = idEspProtCivil;\n this.idInstProtcivil = idInstProtcivil;\n this.fecNotDecPatr = fecNotDecPatr;\n this.fecIniDeclPatr = fecIniDeclPatr;\n this.fecIngSpc = fecIngSpc;\n this.casoMuestra = casoMuestra;\n this.discapacidad = discapacidad;\n this.estudiaSiNo = estudiaSiNo;\n this.padreMadre = padreMadre;\n this.compatEmpleo = compatEmpleo;\n this.usuario = usuario;\n this.idInmuebleP = idInmuebleP;\n this.plazaTelOfc1 = plazaTelOfc1;\n this.plazaExt1 = plazaExt1;\n }",
"public Tbdcongvan36() {\n super();\n }",
"public CCuenta()\n {\n }",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public b3(){\n super();\n }",
"public Comida(String nombre){\n super(nombre);\n this.calorias = 10;\n }"
] | [
"0.67590374",
"0.657526",
"0.65215224",
"0.6503876",
"0.649124",
"0.64120585",
"0.6384542",
"0.63764656",
"0.63612044",
"0.6330828",
"0.62630874",
"0.62547797",
"0.62328976",
"0.62243116",
"0.6208569",
"0.61864185",
"0.61805624",
"0.6149388",
"0.6136443",
"0.61109906",
"0.6088896",
"0.6084465",
"0.60828984",
"0.6072953",
"0.6062032",
"0.60603034",
"0.6055674",
"0.6046715",
"0.60315716",
"0.6014719",
"0.5998993",
"0.59831256",
"0.598256",
"0.5980727",
"0.597971",
"0.59774935",
"0.59754336",
"0.596364",
"0.59528065",
"0.5942616",
"0.5937919",
"0.59278566",
"0.5922433",
"0.5914903",
"0.5907481",
"0.5906272",
"0.5902466",
"0.58988476",
"0.5871571",
"0.5870829",
"0.58684975",
"0.5868092",
"0.5867861",
"0.58507997",
"0.5848633",
"0.5842335",
"0.5837381",
"0.58361644",
"0.5835211",
"0.5831801",
"0.58273655",
"0.58272547",
"0.5827217",
"0.5819696",
"0.58089125",
"0.58084965",
"0.5807503",
"0.580273",
"0.5802609",
"0.5801205",
"0.5799921",
"0.5796996",
"0.57928723",
"0.5788446",
"0.5787892",
"0.5786557",
"0.5778797",
"0.57738847",
"0.57719827",
"0.5771552",
"0.57647055",
"0.5756258",
"0.5753122",
"0.5753029",
"0.57487696",
"0.5743351",
"0.5738071",
"0.5736656",
"0.5734139",
"0.57317793",
"0.572214",
"0.5721708",
"0.5720517",
"0.57178617",
"0.5717861",
"0.57172877",
"0.57171714",
"0.5714529",
"0.57106924",
"0.57105154",
"0.57097584"
] | 0.0 | -1 |
Constructor amb els paràmetres dels atributs del worker abstracte, per tal d'inicialitzar els atributs bàsics d'aquest. | public CreateKonceptWorker(HttpServletRequest req, HttpServletResponse res, String path, Map<String, String[]> params) {
this();
setReq(req);
setRes(res);
setPath(path);
setParams(params);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DataCaseWorker() {\n super();\n }",
"public Worker(){\n\n }",
"public Worker(int x, int y, int size) {\n super(x, y, size);\n// this.x = x;\n// this.y = y;\n// this.size = size;\n }",
"public Job() {\n\t\t\t\n\t\t}",
"public AbstractJob(){\n \n }",
"public parmLottC () {\r\n \r\n course = \"\"; // name of this course\r\n\r\n idA = new long [100]; // request id array\r\n wghtA = new int [100]; // weight of this request\r\n\r\n id2A = new long [100]; // request id array\r\n wght2A = new int [100]; // weight of this request\r\n players2A = new int [100]; // # of players in the request\r\n\r\n timeA = new int [100]; // tee time\r\n fbA = new short [100]; // f/b for the tee time\r\n busyA = new boolean [100]; // tee time busy flag\r\n\r\n atimeA = new int [5]; // assigned tee time array per req (save area)\r\n }",
"public QLearnAgent() {\n\t\tthis(name);\t\n\t}",
"Task(String n, int s, int c, boolean f,\n\t\t String m, int w)\n\t\t{\n\t\t\tmaster = m;\n\t\t\tweight = w;\n\n\t\t\tname = n;\n\t\t\ts_reqt = s;\n\t\t\tcmb_rec = c;\n\t\t\tfblock = f;\n\t\t}",
"public AirAndPollen() {\n\n\t}",
"public AutomaticJob() {\r\n \r\n }",
"public CreateKonceptWorker() {\n\t\tsuper();\n\t\tthis.koncept = new KoncepteParaula();\n\t}",
"BackgroundWorker (String page, String name, String type, Context context) {this.page=page; this.name=name; this.type=type; this.context=context; flag=2;}",
"public BNHaystackLearnStructureJob() {}",
"BackgroundWorker (String page, int id, int ivmin, int ivmax, String attack, String ulti, String name, String username, Context context) {this.context=context; this.page=page; this.id=id; this.ivmin=ivmin; this.ivmax=ivmax; this.attack=attack; this.ulti=ulti; this.name=name; this.username=username; flag=4;}",
"public tn(String paramString, ho paramho)\r\n/* 12: */ {\r\n/* 13:11 */ super(paramString, paramho);\r\n/* 14: */ }",
"protected void setup() {\r\n \t//inizializza gli attributi dell'iniziatore in base ai valori dei parametri\r\n Object[] args = this.getArguments();\r\n \t\tif (args != null)\r\n \t\t{\r\n \t\t\tthis.goodName = (String) args[0];\r\n \t\t\tthis.price = (int) args[1];\r\n \t\t\tthis.reservePrice = (int) args[2];\r\n \t\t\tthis.dif = (int) args[3];\r\n \t\t\tthis.quantity = (int) args[4];\r\n \t\t\tthis.msWait = (int) args[5];\r\n \t\t} \t\t\r\n\r\n manager.registerLanguage(codec);\r\n manager.registerOntology(ontology);\r\n \r\n //inizializza il bene oggetto dell'asta\r\n good = new Good(goodName, price, reservePrice, quantity);\r\n \r\n //cerca ed inserisce nell'ArrayList gli eventuali partecipanti\r\n findBidders(); \r\n \r\n //viene aggiunto l'apposito behaviour\r\n addBehaviour(new BehaviourInitiator(this));\r\n\r\n System.out.println(\"Initiator \" + this.getLocalName() + \" avviato\");\r\n }",
"public Worker(String id, String fname, String lname, String email, AccountType type) {\n super(id, fname, lname, email, type);\n }",
"public InquiryLftrattribRequest()\r\n\t{\r\n\t}",
"public Attraction(String englishName, String pinyinName, String admissionFees,\n String operatingHours, String attractionWebsite, String englishAddress,\n String pinyinAddress, String englishDescription) {\n mEnglishName = englishName;\n mPinyinName = pinyinName;\n\n mAdmissionFees = admissionFees;\n mOperatingHours = operatingHours;\n mAttractionWebsite = attractionWebsite;\n\n mEnglishAddress = englishAddress;\n mPinyinAddress = pinyinAddress;\n\n mEnglishDescription = englishDescription;\n\n }",
"public DataCaseWorker(String firstName, String middleName, String lastName, IAddress address, String phone, String email) {\n super(firstName, middleName, lastName, address, phone, email);\n this.id = 0;\n }",
"public MainThread()\n {\n super();\n setPriority(1);\n setId(0x55); \n }",
"public Ctacliente() {\n\t}",
"public HourlyWorker () {\r\n super ();\r\n hours = -1;\r\n hourlyRate = -1;\r\n salary = -1;\r\n }",
"public AETinteractions() {\r\n\t}",
"public Transportista() {\n }",
"public DetArqueoRunt () {\r\n\r\n }",
"public ControlWorker(Socket socket) {\n \n }",
"public As21Id27()\n\t{\n\t\tsuper() ;\n\t}",
"public Job() {\n }",
"public Job() {\n }",
"protected TaskChain() {\n\t}",
"MotifLearner(){\n notes = new ArrayList<>();\n times = new ArrayList<>();\n }",
"public ModemWorker (IConnection connection) {\n\t\tthis.connection = connection;\n\t}",
"MsaWSThread(ext.vamsas.MuscleWS server, String wsUrl,\n WebserviceInfo wsinfo, jalview.gui.AlignFrame alFrame,\n AlignmentView alview, String wsname, boolean subgaps,\n boolean presorder)\n {\n super(alFrame, wsinfo, alview, wsname, wsUrl);\n this.server = server;\n this.submitGaps = subgaps;\n this.preserveOrder = presorder;\n }",
"public Entity(int n, O thing, String... a) throws ThingsException {\t\r\n\t\t\r\n\t\t// Set fields\r\n\t\tnumeric = n;\r\n\t\tmyThing = thing;\r\n\t\tmyPriority = Priority.ROUTINE;\r\n\t\tmyType = Type.GENERIC;\r\n\t\tmyId = cachedNobody;\r\n\t\tmyCreatorId = cachedNobody;\r\n\t\t\r\n\t\t// Stamp the time.\r\n\t\tstamp = System.currentTimeMillis();\r\n\t\t\r\n\t\t// Attributes\r\n\t\tif (a==null) throw new ThingsException(\"Cannot set attribute object as null.\", ThingsException.DATA_ATTRIBUTE_OBJECT_NULL);\r\n\t\tReadWriteableAttributes tempAttributes = new ReadWriteableAttributes();\r\n\t\ttempAttributes.addMultiAttributes(a);\r\n\t\tattributes = tempAttributes;\r\n\t}",
"public Entity(int n, Type t, Priority p, O thing, WhoAmI imposedId, WhoAmI creatorId, String... a) throws ThingsException {\r\n\t\t\r\n\t\t// Set fields\r\n\t\tnumeric = n;\r\n\t\tmyThing = thing;\r\n\t\tmyPriority = p;\r\n\t\tmyType = t;\r\n\t\tmyId = imposedId;\r\n\t\tmyCreatorId = creatorId;\r\n\t\t\r\n\t\t// Fix ids?\r\n\t\tif (myId == null) myId = cachedNobody;\r\n\t\tif (myCreatorId == null) myCreatorId = cachedNobody;\t\r\n\t\t\r\n\t\t// Stamp the time.\r\n\t\tstamp = System.currentTimeMillis();\r\n\r\n\t\t// Attributes\r\n\t\tif (a==null) throw new ThingsException(\"Cannot set attribute object as null.\", ThingsException.DATA_ATTRIBUTE_OBJECT_NULL);\r\n\t\tReadWriteableAttributes tempAttributes = new ReadWriteableAttributes();\r\n\t\ttempAttributes.addMultiAttributes(a);\r\n\t\tattributes = tempAttributes;\r\n\t}",
"public ASLocation()\n\t{\n\t\tsuper() ;\n\t\tprepare() ;\n\t}",
"public Excellon ()\n {}",
"public Attraction(String attractionName, String attractionDescription, String attractionAddress, String attractionHours, String attractionPhone) {\n mAttractionName = attractionName;\n mAttractionDescription = attractionDescription;\n mAttractionHours = attractionHours;\n mAttractionAddress = attractionAddress;\n mAttractionPhone = attractionPhone;\n }",
"public PathwayCommonsAccessTool() {\n super(PC_NAME, PC_RESOURCEID, PC_STRUCTURE);\n try {\n this.getToolResource().setResourceURL(new URL(PC_URL));\n this.getToolResource().setResourceLogo(new URL(PC_LOGO));\n this.getToolResource().setResourceElementURL(PC_ELT_URL);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n this.getToolResource().setResourceDescription(PC_DESCRIPTION);\n }",
"public AbstractClass() { //Sobrecarga del constructor AbstractClass ya que se puede inicializar de 2 maneras\n }",
"public Maestro()\r\n\t{\r\n\t\tint i;\r\n\t\tint hora = 0;\r\n\t\tint minutos = 0;\r\n\t\tint segundos = 0;\r\n\t\tint milisegundos = 0;\r\n\t\tthis.reloj = new Reloj(\"Reloj Servidor\",hora,minutos,segundos,milisegundos);\r\n\t\tthis.reloj.start();\r\n\r\n\t\tthis.s_BD = new Sincronizador_BD(this.Conect);\r\n\t\tthis.s_BD.start();\r\n\t}",
"public ctq(File paramFile, String paramString, oa paramoa, ckh paramckh)\r\n/* 22: */ {\r\n/* 23: 33 */ super(paramoa);\r\n/* 24: 34 */ this.i = paramFile;\r\n/* 25: 35 */ this.j = paramString;\r\n/* 26: 36 */ this.k = paramckh;\r\n/* 27: */ }",
"private Reqbaz() {\n super(\"reqbaz\", null);\n }",
"public Telefone() {\n\t\t\n\t}",
"public ModemWorker (Properties connectionProperties) {\n\t\tthis.connectionProperties = connectionProperties;\n\t}",
"public Notifica(){}",
"public Transportador()\n {\n super();\n this.transporte = true;\n this.transporte_medico = false;\n this.classificacao = new HashMap<>();\n this.encomendas = new HashMap<>();\n this.raio = 0.0;\n }",
"public Telefone() {\n\t}",
"public XmlAdaptedTask() {\n\t}",
"public ExportThread( String[] params )\n {\n super();\n execParams = params;\n }",
"public Job() {\r\n\t\tSystem.out.println(\"Constructor\");\r\n\t}",
"private TMCourse() {\n\t}",
"public ChaCha()\n\t{\n\t\tsuper();\n\t}",
"protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }",
"public WorkDataFile()\n\t{\n\t\tsuper();\n\t}",
"public PioneeringMission(AIMain aiMain, Element element) {\n super(aiMain);\n readFromXMLElement(element);\n }",
"public UConnecte() {\n\t\tsuper();\n\t}",
"public AI(String n) {//constructor for super class\n super(n);\n }",
"public Aanbieder() {\r\n\t\t}",
"public TrainAbstract() {\n\t\tthis.id = \"\";\n\t\tthis.departure = new Departure();\n\t\tthis.arrivalTerminus = new ArrivalTerminus();\n\t\tthis.location = new Location(\"\", \"\");\n\t\tthis.stopPoints = new ArrayList<ArrivalStopPoint>();\n\t}",
"public ProgramWilmaa()\n\t{\n\t}",
"protected Asignatura()\r\n\t{}",
"public WorkerController(){\r\n\t}",
"protected abstract void construct();",
"public Cohete() {\n\n\t}",
"public AI(){\n super();\n }",
"public SocketParams() {\n init();\n }",
"public BusShared(String n, double l, double v, double h, double a, double num){\r\n\t\t\tsuper(n, l, v, h);\r\n\t\t\tthis.additional = a;\r\n\t\t\tthis.Stops = num;\r\n\t }",
"public bsm(PlayerStat paramtq)\r\n/* 7: */ {\r\n/* 8: 9 */ super(paramtq.e);\r\n/* 9:10 */ this.j = paramtq;\r\n/* 10: */ }",
"public PotionEffect(PotionEffect paramwq)\r\n/* 35: */ {\r\n/* 36: 44 */ this.id = paramwq.id;\r\n/* 37: 45 */ this.duration = paramwq.duration;\r\n/* 38: 46 */ this.amplifier = paramwq.amplifier;\r\n/* 39: 47 */ this.ambient = paramwq.ambient;\r\n/* 40: 48 */ this.showParticles = paramwq.showParticles;\r\n/* 41: */ }",
"protected void setup() {\n\t\tDFAgentDescription dfd = new DFAgentDescription();\n\t\tdfd.setName(getAID());\n\t\tServiceDescription sd = new ServiceDescription();\n\t\tsd.setType(\"paciente\");\n\t\tsd.setName(getName());\n\t\tdfd.addServices(sd);\n\t\ttry {\n\t\t\tDFService.register(this, dfd);\n\t\t} catch (FIPAException fe) {\n\t\t\tfe.printStackTrace();\n\t\t}\n\t\t\n\t\t// atualiza lista de monitores e atuadores\n\t\taddBehaviour(new UpdateAgentsTempBehaviour(this, INTERVALO_AGENTES));\n\t\t\n\t\t// ouve requisicoes dos atuadores e monitores\n\t\taddBehaviour(new ListenBehaviour());\n\t\t\n\t\t// adiciona comportamento de mudanca de temperatura\n\t\taddBehaviour(new UpdateTemperatureBehaviour(this, INTERVALO_ATUALIZACAO));\n\t\t\n\t\t// adiciona comportamento de mudanca de hemoglobina\t\t\n\t\taddBehaviour(new UpdateHemoglobinaBehaviour(this, INTERVALO_ATUALIZACAO));\n\t\t\n\t\t// adiciona comportamento de mudanca de bilirrubina\n\t\taddBehaviour(new UpdateBilirrubinaBehaviour(this, INTERVALO_ATUALIZACAO));\n\n\t\t// adiciona comportamento de mudanca de pressao\t\t\n\t\taddBehaviour(new UpdatePressaoBehaviour(this, INTERVALO_ATUALIZACAO));\n\t\t\n\t}",
"public RPCRequest()\n\t{\n\t\tsuper();\n\t}",
"private UsineJoueur() {}",
"public Trip() {}",
"@WorkerThread\n public abstract void zzaso();",
"public TaskAdapter(java.lang.String taskType, java.lang.Object worker) throws org.apache.ant.common.util.ExecutionException {\n this.worker = worker;\n try {\n java.lang.Class workerClass = worker.getClass();\n executeMethod = workerClass.getMethod(\"execute\", new java.lang.Class[0]);\n if (executeMethod == null) {\n throw new org.apache.ant.common.util.ExecutionException(((\"No execute method in the class\" + \" for the <\") + taskType) + \"> task.\");\n }\n } catch (java.lang.NoSuchMethodException e) {\n throw new org.apache.ant.common.util.ExecutionException(e);\n }\n }",
"@Override\n public void construct() throws IOException {\n \n }",
"protected Approche() {\n }",
"public Cgg_jur_anticipo(){}",
"public Commune() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public AntrianPasien() {\r\n\r\n }",
"BackgroundWorker (String page, int id, Context context) {this.page=page; this.id=id; this.context=context; flag=3;}",
"public WorkerController(int wid, JSONObject worker){\r\n\t\tthis.wid = wid;\r\n\t\tthis.workerobj = worker;\r\n\t}",
"public FicheConnaissance() {\r\n }",
"public AgenteEstAleatorio() {\r\n }",
"public Attraction(String englishName, String pinyinName, String admissionFees,\n String operatingHours, String attractionWebsite, String englishAddress,\n String pinyinAddress, String englishDescription, int imageResourceId) {\n mEnglishName = englishName;\n mPinyinName = pinyinName;\n\n mAdmissionFees = admissionFees;\n mOperatingHours = operatingHours;\n mAttractionWebsite = attractionWebsite;\n\n mEnglishAddress = englishAddress;\n mPinyinAddress = pinyinAddress;\n\n mEnglishDescription = englishDescription;\n\n mImageResourceId = imageResourceId;\n\n }",
"public AzioneProgrammata(ArrayList<Attuatore> attuatori, String azione) {\n this.attuatori = attuatori;\n this.azione = azione;\n }",
"protected FollowersItem() {\n hashDupA = hashDupB = \"\";\n aw = null;\n }",
"public schedulerJob() {\n }",
"public AmishMart()\n {\n super(\"PokeMart\");\n\n eventArray[20][14] = new Teleport();\n eventArray[20][14].setCoord(5, 2, 18, 17);\n\n eventArray[15][13] = new ShopKeep();\n }",
"protected LearningAbstractAgent(){}",
"protected ModelAgent ()\n {\n this (\"ModelAgent\");\n\n }",
"public aed(World paramaqu)\r\n/* 9: */ {\r\n/* 10: 24 */ super(paramaqu);\r\n/* 11: */ }",
"public void createWorker(Worker worker){\n }",
"public TarefaResource() {\r\n }",
"protected FitnessAssignmentProcess() {\r\n super();\r\n }",
"protected AbstractEvent(long t, EventEngine eng, String p) {\n // this sets the public final variables: time and engine\n time = t;\n engine = eng;\n parameters = p;\n }",
"public NSEIndexITDImportJob() {\n super() ;\n }",
"public Thaw_args(Thaw_args other) {\r\n }",
"protected Problem() {/* intentionally empty block */}"
] | [
"0.5682395",
"0.56688523",
"0.558517",
"0.5548451",
"0.54930216",
"0.54725456",
"0.5466377",
"0.5452125",
"0.542576",
"0.542503",
"0.5403126",
"0.5371684",
"0.5362807",
"0.53444374",
"0.53400254",
"0.5287129",
"0.5279588",
"0.52783614",
"0.52727765",
"0.5251159",
"0.52303797",
"0.5222181",
"0.52210873",
"0.51960665",
"0.5193409",
"0.5188415",
"0.5187768",
"0.51838773",
"0.51838064",
"0.51838064",
"0.518355",
"0.51791024",
"0.51778066",
"0.5176833",
"0.51489747",
"0.5128868",
"0.5123778",
"0.5121039",
"0.51154685",
"0.5113695",
"0.5111352",
"0.511081",
"0.51071924",
"0.5099662",
"0.5096064",
"0.5094192",
"0.5093883",
"0.5093467",
"0.5082746",
"0.5080773",
"0.5080276",
"0.50710624",
"0.5069399",
"0.5067946",
"0.504924",
"0.5039262",
"0.50388575",
"0.5036362",
"0.5029128",
"0.5025408",
"0.50244397",
"0.50203246",
"0.5020298",
"0.50136894",
"0.50106496",
"0.50020766",
"0.49971634",
"0.49928778",
"0.49900085",
"0.49883604",
"0.49883312",
"0.49850518",
"0.49796778",
"0.4978624",
"0.49782977",
"0.4968246",
"0.49678946",
"0.4965815",
"0.49623328",
"0.49615267",
"0.49558926",
"0.4955854",
"0.49548548",
"0.4949489",
"0.49454448",
"0.494505",
"0.49448714",
"0.4942186",
"0.49408612",
"0.49381045",
"0.49347505",
"0.49334252",
"0.49314907",
"0.49290463",
"0.49290138",
"0.4927262",
"0.49234748",
"0.4922582",
"0.4914911",
"0.49123874",
"0.49081132"
] | 0.0 | -1 |
Mètode que executa la tasca de creació de la paraula i la seva alta a la base de dades, i l'emmagatzematge dels fitxers d'àudio al sistema de fitxers del servidor. Un cop finalitzada la tasca s'escriu la resposta apropiada i s'envia al client. | @Override
public void processRequest() {
try {
koncept.setTextcat(getParams().get(PFCConstants.HTTP_REQUEST_PARAM_TEXT_CA)[0]);
koncept.setTextjap(getParams().get(PFCConstants.HTTP_REQUEST_PARAM_TEXT_JP)[0]);
if (getParams().containsKey(PFCConstants.HTTP_REQUEST_PARAM_LLISTA_ESTUDI)) {
koncept.setIdLlista(getParams().get(PFCConstants.HTTP_REQUEST_PARAM_LLISTA_ESTUDI)[0]);
}
if (getParams().containsKey(PFCConstants.HTTP_REQUEST_PARAM_PRON_JAP)) {
koncept.setPronjap(getParams().get(PFCConstants.HTTP_REQUEST_PARAM_PRON_JAP)[0]);
}
// TODO Gestionar amb excepcions.
boolean b = DBController.konceptExists(koncept);
String id = null;
if (!b) {
id = DBController.createKoncept(koncept);
koncept.setId(id);
logger.info("Koncept created. ID = " + id);
if (getParams().containsKey(PFCConstants.HTTP_REQUEST_PARAM_AUDIO_JP)) {
String pathJP = processAudio(getParams(), PFCConstants.LANG_JAP, koncept);
koncept.setAudioJapones(pathJP);
}
if (getParams().containsKey(PFCConstants.HTTP_REQUEST_PARAM_AUDIO_CA)) {
String pathCA = processAudio(getParams(), PFCConstants.LANG_CAT, koncept);
koncept.setAudioCatala(pathCA);
}
// Actualitzem valor audio.
DBController.update(koncept);
KonceptIdResponseBean rb = new KonceptIdResponseBean(koncept.getId());
writeResponse(rb);
} else {
ResponseBean rb = new ErrorResponseBean("La paraula ja existeix");
writeResponse(rb);
}
} catch (Exception e) {
logger.error("Error processing request!");
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Resultado executar(Requisicao requisicao) throws Exception {\r\n if (Logger.estaHabilitadoDebug(this)) {\r\n Logger.debug(this, \"***** Manutencao de Itens na Cesta de Garantias Via Arquivo ***** \");\r\n }\r\n\r\n idAtivos = new HashMap();\r\n\r\n Servico validacao = new ServicoValidaCadastroItensCestaGarantias();\r\n Servico inclusaoAporte = new ServicoRegistraItensCestaGarantias();\r\n Servico delecao = new ServicoDelecaoItensCestaGarantias();\r\n\r\n // Primeiro valida todas as linhas\r\n AtributosColunados ac = requisicao.obterAtributosColunados();\r\n while (ac.avancarLinha()) {\r\n populaValores(ac);\r\n if (!funcaoItem.mesmoConteudo(ICestaDeGarantias.EXCLUIR_GARANTIA)) {\r\n RequisicaoServicoValidaCadastroItensCestaGarantias reqV = new RequisicaoServicoValidaCadastroItensCestaGarantias();\r\n reqV.atribuirGARANTIAS_PARTICIPANTE_CodigoContaCetip(parte);\r\n reqV.atribuirGARANTIAS_CONTRAPARTE_CodigoContaCetip(contraParte);\r\n reqV.atribuirGARANTIAS_CODIGO_TIPO_CodigoTipoIF(codigoTipoIF);\r\n reqV.atribuirGARANTIAS_CODIGO_IF_CodigoIF(codigoIF);\r\n reqV.atribuirGARANTIAS_QUANTIDADE_Quantidade(quantidade);\r\n reqV.atribuirGARANTIAS_ITENS_Booleano(indEventosGarantidor);\r\n reqV.atribuirGARANTIAS_ITENS_DescricaoLimitada(descricao);\r\n reqV.atribuirGARANTIAS_DATA_CRIACAO_Data(data);\r\n reqV.atribuirGARANTIAS_CODIGO_IdTipoGarantia(idTipoGarantia);\r\n reqV.atribuirGARANTIAS_TIPO_ACESSO_Funcao(tipoAcesso);\r\n reqV.atribuirACAO_Funcao(funcaoItem);\r\n reqV.atribuirGARANTIAS_CODIGO_NumeroCestaGarantia(numeroCestaGarantia);\r\n reqV.atribuirOPERACAO_NumeroOperacao(numOperacao);\r\n\r\n // Valida a linha\r\n validacao.executarConsulta(reqV);\r\n }\r\n\r\n }\r\n\r\n ac.reiniciarLinha();\r\n while (ac.avancarLinha()) {\r\n populaValores(ac);\r\n\r\n // Insere ou Aporta / Deleta\r\n if (funcaoItem.mesmoConteudo(ICestaDeGarantias.INCLUIR_GARANTIA)\r\n || funcaoItem.mesmoConteudo(ICestaDeGarantias.APORTAR_GARANTIA)) {\r\n RequisicaoServicoRegistraItensCestaGarantias reqItem = new RequisicaoServicoRegistraItensCestaGarantias();\r\n\r\n reqItem.atribuirACAO_Funcao(funcaoItem);\r\n reqItem.atribuirGARANTIAS_CODIGO_Id(codigoIdCesta);\r\n reqItem.atribuirGARANTIAS_CODIGO_IF_CodigoIF(codigoIF);\r\n reqItem.atribuirGARANTIAS_PARTICIPANTE_CodigoContaCetip(parte);\r\n reqItem.atribuirGARANTIAS_CONTRAPARTE_CodigoContaCetip(contraParte);\r\n reqItem.atribuirGARANTIAS_CODIGO_TIPO_CodigoTipoIF(codigoTipoIF);\r\n reqItem.atribuirGARANTIAS_CODIGO_IdTipoGarantia(idTipoGarantia);\r\n reqItem.atribuirGARANTIAS_QUANTIDADE_Quantidade(quantidade);\r\n reqItem.atribuirGARANTIAS_ITENS_Booleano(indEventosGarantidor);\r\n reqItem.atribuirGARANTIAS_ITENS_DescricaoLimitada(descricao);\r\n reqItem.atribuirGARANTIAS_TIPO_ACESSO_Funcao(tipoAcesso);\r\n reqItem.atribuirOPERACAO_NumeroOperacao(numOperacao);\r\n\r\n inclusaoAporte.executar(reqItem);\r\n\r\n } else if (funcaoItem.mesmoConteudo(ICestaDeGarantias.EXCLUIR_GARANTIA)) {\r\n RequisicaoServicoDelecaoItensCestaGarantias reqItemDelecao = new RequisicaoServicoDelecaoItensCestaGarantias();\r\n reqItemDelecao.atribuirGARANTIAS_CODIGO_Id(codigoIdCesta);\r\n reqItemDelecao.atribuirGARANTIAS_CODIGO_NumeroCestaGarantia(numeroCestaGarantia);\r\n reqItemDelecao.atribuirGARANTIAS_CODIGO_IF_CodigoIF(codigoIF);\r\n reqItemDelecao.atribuirGARANTIAS_PARTICIPANTE_CodigoContaCetip(parte);\r\n reqItemDelecao.atribuirGARANTIAS_CONTRAPARTE_CodigoContaCetip(contraParte);\r\n reqItemDelecao.atribuirGARANTIAS_CODIGO_TIPO_CodigoTipoIF(codigoTipoIF);\r\n reqItemDelecao.atribuirGARANTIAS_CODIGO_IdTipoGarantia(idTipoGarantia);\r\n reqItemDelecao.atribuirGARANTIAS_QUANTIDADE_Quantidade(quantidade);\r\n reqItemDelecao.atribuirGARANTIAS_ITENS_Booleano(indEventosGarantidor);\r\n reqItemDelecao.atribuirOPERACAO_NumeroOperacao(numOperacao);\r\n reqItemDelecao.atribuirGARANTIAS_ITENS_DescricaoLimitada(descricao);\r\n\r\n delecao.executar(reqItemDelecao);\r\n }\r\n }\r\n\r\n return new ResultadoServicoManutencaoItensCestaGarantiasViaArquivo();\r\n }",
"public void ejecutarCargue() {\n String respuesta = null;\n try {\n loggerApp.info(\"Cargues masivos timbres - ejecutar cargue\");\n if (!validarExtension(Constantes.EXTENSIONES_ARCHIVO_EXCEL, file)) {\n abrirModal(\"SARA\", \"Error: El archivo \" + (null == file ? \" \" : file.getName()) + \" no cumple con el formato de extensión válido \" + Constantes.EXTENSIONES_ARCHIVO_EXCEL, null);\n return;\n }\n generarListaData();\n cargarTimbresMasivosObjectContext.setAtributo(\"listaTimbres\", listaData);\n this.servletHelper = new CargarTimbresMasivosServletHelper(sessionLocal, cargarTimbresMasivosObjectContext, objectContext, sessionAjustes, cuadreCifrasSessionLocal, cajeroSession);\n if (this.servletHelper != null) {\n respuesta = servletHelper.obtenerDatos();\n }\n if (respuesta != null && !respuesta.trim().isEmpty()) {\n abrirModal(\"SARA\", respuesta, null);\n }\n } catch (FileStructureException ex) {\n ex.printStackTrace();\n loggerApp.log(Level.SEVERE, ex.getMessage(), ex);\n abrirModal(\"SARA\", ex.getMessage(), null);\n } catch (Exception ex) {\n ex.printStackTrace();\n loggerApp.log(Level.SEVERE, ex.getMessage(), ex);\n abrirModal(\"SARA\", Constantes.MSJ_ERROR_INTERNO, null);\n }\n\n }",
"private void cargarFichaLepra_convivientes() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\t\tparameters.put(\"fecha_actual\", new Date());\r\n\r\n\t\t// log.info(\"parameters\" + parameters);\r\n\t\tseguimiento_control_pqtService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean fecha_tratamiento = seguimiento_control_pqtService\r\n\t\t\t\t.existe_fecha_fin_tratamiento(parameters);\r\n\t\t// log.info(\"fecha_tratamiento>>>>\" + fecha_tratamiento);\r\n\r\n\t\tif (fecha_tratamiento) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_CONTROL_CONVIVIENTES_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_CONTROL_CONVIVIENTES_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}",
"public void enviar() {\r\n\r\n Socket sock = null;\r\n\r\n try {\r\n sock = new Socket(host, PORT);\r\n\r\n InputStream inputStream = sock.getInputStream();\r\n ObjectInputStream in = new ObjectInputStream(inputStream);\r\n\r\n PrintWriter out = new PrintWriter(sock.getOutputStream(),true);\r\n //muestro en consola el script\r\n out.println(scriptSQL);\r\n\r\n //recibe el objeto mandado por el socket del server\r\n Lista<Object> objectLista = (Lista<Object>) in.readObject();\r\n\r\n //se lo envia al controlador para graficar el resultado\r\n Control_PantallaComprobante.recibirParaMostrarConfirmacion(objectLista);\r\n\r\n\r\n }\r\n catch (IOException | ClassNotFoundException error){\r\n error.printStackTrace();\r\n System.out.println(error);\r\n }\r\n finally {\r\n try{\r\n sock.close();\r\n }catch (IOException error){\r\n error.printStackTrace();\r\n }\r\n }\r\n\r\n\r\n }",
"private void inizia() throws Exception {\n this.setAllineamento(Layout.ALLINEA_CENTRO);\n this.creaBordo(\"Coperti serviti\");\n\n campoPranzo=CampoFactory.intero(\"a pranzo\");\n campoPranzo.setLarghezza(60);\n campoPranzo.setModificabile(false);\n campoCena=CampoFactory.intero(\"a cena\");\n campoCena.setLarghezza(60);\n campoCena.setModificabile(false);\n campoTotale=CampoFactory.intero(\"Totale\");\n campoTotale.setLarghezza(60); \n campoTotale.setModificabile(false);\n\n this.add(campoPranzo);\n this.add(campoCena);\n this.add(campoTotale);\n }",
"public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }",
"public void cargarPantalla() throws Exception {\n Long oidCabeceraMF = (Long)conectorParametroSesion(\"oidCabeceraMF\");\n\t\tthis.pagina(\"contenido_matriz_facturacion_consultar\");\n\n DTOOID dto = new DTOOID();\n dto.setOid(oidCabeceraMF);\n dto.setOidPais(UtilidadesSession.getPais(this));\n dto.setOidIdioma(UtilidadesSession.getIdioma(this));\n MareBusinessID id = new MareBusinessID(\"PRECargarPantallaConsultarMF\"); \n Vector parametros = new Vector();\n \t\tparametros.add(dto);\n parametros.add(id);\n \t\tDruidaConector conector = conectar(\"ConectorCargarPantallaConsultarMF\", parametros);\n if (oidCabeceraMF!=null)\n asignarAtributo(\"VAR\",\"varOidCabeceraMF\",\"valor\",oidCabeceraMF.toString());\n\t\t asignar(\"COMBO\", \"cbTiposOferta\", conector, \"dtoSalida.resultado_ROWSET\");\n\t\t///* [1]\n\n\n\n\t\ttraza(\" >>>>cargarEstrategia \");\n\t\t//this.pagina(\"contenido_catalogo_seleccion\"); \n\t\t \n\t\tComposerViewElementList cv = crearParametrosEntrada();\n\t\tConectorComposerView conectorV = new ConectorComposerView(cv, this.getRequest());\n\t\tconectorV.ejecucion();\n\t\ttraza(\" >>>Se ejecuto el conector \");\n\t\tDruidaConector resultados = conectorV.getConector();\n\t\tasignar(\"COMBO\", \"cbEstrategia\", resultados, \"PRECargarEstrategias\");\n\t\ttraza(\" >>>Se asignaron los valores \");\n\t\t// */ [1]\n\t\t\n\n }",
"public RespuestaBD crearRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioInsercion) {\n/* 342 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* 344 */ int elSiguiente = siguienteRegistro(codigoFlujo);\n/* 345 */ if (elSiguiente == 0) {\n/* 346 */ rta.setMensaje(\"Generando secuencia\");\n/* 347 */ return rta;\n/* */ } \n/* */ \n/* */ try {\n/* 351 */ String s = \"insert into wkf_detalle(codigo_flujo,secuencia,servicio_inicio,accion,codigo_estado,servicio_destino,nombre_procedimiento,correo_destino,enviar_solicitud,ind_mismo_proveedor,ind_mismo_cliente,estado,caracteristica,valor_caracteristica,caracteristica_correo,metodo_seleccion_proveedor,ind_correo_clientes,enviar_hermana,enviar_si_hermana_cerrada,ind_cliente_inicial,usuario_insercion,fecha_insercion) values (\" + codigoFlujo + \",\" + \"\" + elSiguiente + \",\" + \"\" + servicioInicio + \",\" + \"\" + accion + \",\" + \"\" + codigoEstado + \",\" + \"\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \"'\" + nombreProcedimiento + \"',\" + \"'\" + correoDestino + \"',\" + \"'\" + enviar + \"',\" + \"'\" + mismoProveedor + \"',\" + \"'\" + mismoCliente + \"',\" + \"'\" + estado + \"',\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \"'\" + usuarioInsercion + \"',\" + \"\" + Utilidades.getFechaBD() + \"\" + \")\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 398 */ rta = this.dat.executeUpdate2(s);\n/* 399 */ rta.setSecuencia(elSiguiente);\n/* */ }\n/* 401 */ catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"%FlujoDetalleDAO:crearRegistro \", e);\n/* 404 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 406 */ return rta;\n/* */ }",
"public void createDespesaDetalhe(ArrayList<PagamentoDespesasDetalhe> listaDespesasInseridas, int idDespesa) throws Exception {\n\r\n for(int i=0; i < listaDespesasInseridas.size(); i++){\r\n \r\n open(); //abre conexão com o banco de dados\r\n\r\n //define comando para o banco de dados\r\n stmt = con.prepareStatement(\"INSERT INTO pagamentoDespesasDetalhe(valor, dataPagamento, status, idDespesas, idFormaPagamento) VALUES (?,?,?,?,?)\");\r\n\r\n //atribui os valores das marcações do comando acima \r\n stmt.setFloat(1, listaDespesasInseridas.get(i).getValor());\r\n stmt.setString(2, listaDespesasInseridas.get(i).getDataPagamento());\r\n stmt.setInt(3, listaDespesasInseridas.get(i).getStatus());\r\n stmt.setInt(4, idDespesa);\r\n stmt.setInt(5, listaDespesasInseridas.get(i).getIdFormaPagamento());\r\n\r\n stmt.execute();//executa insert no banco de dados\r\n\r\n close();//fecha conexão com o banco de dados\r\n \r\n } \r\n\r\n }",
"OperacionColeccion createOperacionColeccion();",
"public static void insertFournisseur(Fournisseur unFournisseur ) {\n Bdd uneBdd = new Bdd(\"localhost\", \"paruline \", \"root\", \"\");\n\n String checkVille = \"CALL checkExistsCity('\" + unFournisseur.getVille() + \"','\" + unFournisseur.getCp() + \"');\";\n try {\n uneBdd.seConnecter();\n Statement unStat = uneBdd.getMaConnection().createStatement();\n\n ResultSet unRes = unStat.executeQuery(checkVille);\n\n int nb = unRes.getInt(\"nb\");\n\n if (nb == 0) {\n String ajoutVille = \"CALL InsertCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"');\";\n\n try {\n Statement unStatAjout = uneBdd.getMaConnection().createStatement();\n\n unStatAjout.executeQuery(ajoutVille);\n unStatAjout.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + ajoutVille);\n }\n }\n\n String id = \"CALL GetCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"')\";\n\n try {\n Statement unStatId = uneBdd.getMaConnection().createStatement();\n\n ResultSet unResId = unStatId.executeQuery(id);\n\n int id_city = unResId.getInt(\"id_city\");\n\n\n\n String insertFournisseur = \"INSERT INTO fournisseur(id_city, name_f, adresse_f, phoneFour) VALUES (\" + id_city + \", '\" + unFournisseur.getNom() + \"', \" +\n \"'\" + unFournisseur.getAdresse() + \"', '\" + unFournisseur.getTelephone() + \"')\";\n\n try {\n Statement unStatFourn = uneBdd.getMaConnection().createStatement();\n unStatFourn.executeQuery(insertFournisseur);\n\n unStatFourn.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + insertFournisseur);\n }\n\n unResId.close();\n unStatId.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + id);\n }\n\n unRes.close();\n unStat.close();\n uneBdd.seDeConnecter();\n } catch (SQLException exp) {\n System.out.println(\"Erreur : \" + checkVille);\n }\n }",
"Long crear(Espacio espacio);",
"public static void crearTicket(int codigoSupermercado, ArrayList <LineaCompra> lineasTicket, String nif ) throws SQLException{\n double precioTotal=0;\n for(int i=0;i<lineasTicket.size();i++){\n precioTotal+=lineasTicket.get(i).getPrecio_linea();\n }\n Ticket t1=new Ticket(codigoSupermercado, precioTotal, lineasTicket);\n LocalDate fecha=t1.getFechaCompra();\n LocalTime hora=t1.getHoraCompra();\n DateTimeFormatter formatoFecha=DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n DateTimeFormatter formatoHora=DateTimeFormatter.ofPattern(\"HH:mm\");\n try(PreparedStatement query=Herramientas.getConexion().prepareStatement(\"INSERT INTO ticket VALUES(?,?,?,?,?,?)\")){\n query.setInt(1, t1.getCodigo());\n query.setString(2, nif);\n query.setInt(3, t1.getCodigoSupermercado());\n query.setString(4, fecha.format(formatoFecha));\n query.setString(5, hora.format(formatoHora));\n query.setDouble(6, t1.getPrecioTotal());\n query.executeUpdate();\n for(int i=0;i<lineasTicket.size();i++){\n try(PreparedStatement query2=Herramientas.getConexion().prepareStatement(\"INSERT INTO linea_ticket VALUES(?,?,?,?,?)\")){\n query2.setInt(1, t1.getCodigo());\n query2.setInt(2, lineasTicket.get(i).getCodigo_producto());\n query2.setInt(3, lineasTicket.get(i).getCantidad());\n query2.setDouble(4, lineasTicket.get(i).getPrecio_linea());\n try (PreparedStatement query3 = Herramientas.getConexion().prepareStatement(\"SELECT nombre_producto FROM producto WHERE codigo_producto=?\")) {\n query3.setInt(1, lineasTicket.get(i).getCodigo_producto());\n try (ResultSet resultado = query3.executeQuery()) {\n resultado.next();\n query2.setString(5, resultado.getString(1));\n }\n }\n query2.executeUpdate();\n }\n }\n }\n }",
"@Override\n public ComprobanteContable createComprobante(\n Aerolinea a, Boleto boleto, Cliente cliente, String tipo) throws CRUDException {\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n return comprobante;\n }",
"@Override\n\tpublic void ejecutar() {\n\t\tcontrolador.resetPartida();\n\n\t}",
"public void CadastrarPassageiro(Connection con, List<Bilhetes> temporaria) {\n\t\t\n\t\ttry {\n\t\t\n\t\t\tstmt = con.prepareStatement(\"Select cpf from passageiro where cpf = ?\");\n\t\t\t\n\t\t\tstmt.setString(1, temporaria.get(0).getBilhete().get(0).getCpf() );\n\t\t\tstmt.execute();\n\t\t\t\n\t\t\trs=stmt.getResultSet();\n\t\t\t\n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(null, \"ERRO: CPF JA CADASTRADO\", \"Erro CADASTRO\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tstmt = con.prepareStatement(\n\t\t\t\t\t\" insert into BILHETES (Destino,Origem,Hpartida, Hembarque,Poltrona) values(?,?,?,?,NULL)\");\n\n\t\t\tstmt.setString(1, temporaria.get(0).getDestino());\n\t\t\tstmt.setString(2, temporaria.get(0).getOrigem());\n\t\t\tstmt.setString(3, temporaria.get(0).getHora_partida());\n\t\t\tstmt.setString(4, temporaria.get(0).getHora_embarque());\n\n\t\t\tstmt.execute();\n\n\t\t\tstmt = con.prepareStatement(\"select IDBILHETE FROM BILHETES WHERE poltrona is null \");\n\n\t\t\tstmt.execute();\n\n\t\t\trs = stmt.getResultSet();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tint idbilhete = rs.getInt(1);\n\t\t\t\ttemporaria.get(0).setIdbilhete(idbilhete);\n\t\t\t}\n\n\t\t\tstmt = con.prepareStatement(\"insert into Passageiro(nome,cpf,ID_BILHETE) values(?,?,?)\");\n\n\t\t\tstmt.setString(1, temporaria.get(0).getBilhete().get(0).getNome());\n\t\t\tstmt.setString(2, temporaria.get(0).getBilhete().get(0).getCpf());\n\t\t\tstmt.setInt(3, temporaria.get(0).getIdbilhete());\n\n\t\t\tstmt.execute();\n\n\t\t\t// VOLTANDO A CADEIRA PARA 0, PARA EVITAR ERRO NOS PROXIMOS USUARIOS CADASTRADOS\n\t\t\tstmt = con.prepareStatement(\"UPDATE BILHETES SET POLTRONA = 0 WHERE POLTRONA IS NULL\");\n\n\t\t\tstmt.execute();\n\n\t\t\t// Teste\n\n\t\t\tString nome = temporaria.get(0).getBilhete().get(0).getNome();\n\t\t\tString cpf = temporaria.get(0).getBilhete().get(0).getCpf();\n\n\t\t\tString destino = temporaria.get(0).getDestino();\n\t\t\tString Origem = temporaria.get(0).getOrigem();\n\n\t\t\tString hora_EMBARQUE = temporaria.get(0).getHora_embarque();\n\n\t\t\tString horasaida = temporaria.get(0).getHora_partida();\n\n\t\t\t// Instanciando valores\n\t\t\tBilhetes passagem = new Bilhetes(temporaria.get(0).getIdbilhete(), Origem, destino, hora_EMBARQUE,\n\t\t\t\t\thorasaida, null, 0);\n\n\t\t\tpassagem.adicionar(new Passageiro(nome, cpf));\n\n\t\t\tpassageiro.add(passagem);\n\n\t\t\t// Fim do teste antes do filme\n\n\t\t\tJOptionPane.showMessageDialog(null, \"Passageiro Cadastrado Com sucesso\");\n\n\t\t\tJOptionPane.showMessageDialog(null,\"CODIGO LOCALIZADOR DO BILHETE: \" + temporaria.get(0).getIdbilhete(),\" NÃO PERCA\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\n\t\n\t\t\t\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tJOptionPane.showMessageDialog(null, \"ERRO: CPF JA CADASTRADO\", \"Erro CADASTRO\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\n\n\t\t}\n\n\t}",
"public boolean InsertarDatosReserva(String fecini, String fecsal, String cantres, String estado, String codcli, String fecres, String coti, String codemp) throws Exception {\n try {\n String q = \"INSERT INTO Reserva (FECHAINICIORES,FECHAFINALRES,CANTIDADRES,ESTADORES,CLIENTE_PERSONA_IDPERSONA,FECHARES,COTIZACIONRES,EMPLEADO_PERSONA_IDPERSONA)\"\n + \"VALUES ('\" + fecini + \"', '\" + fecsal + \"' , '\" + cantres + \"', '\" + estado + \"', '\" + codcli + \"', '\" + fecres + \"', '\" + coti + \"', '\" + codemp + \"')\";\n\n PreparedStatement pstm = this.getCon().prepareStatement(q);\n pstm.execute();\n pstm.close();\n return true;\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n }\n return false;\n }",
"public synchronized void criarTabela(){\n \n String sql = \"CREATE TABLE IF NOT EXISTS CPF(\\n\"\n + \"id integer PRIMARY KEY AUTOINCREMENT,\\n\"//Autoincrement\n// + \"codDocumento integer,\\n\"\n + \"numCPF integer\\n\"\n + \");\";\n \n try (Connection c = ConexaoJDBC.getInstance();\n Statement stmt = c.createStatement()) {\n // create a new table\n stmt.execute(sql);\n stmt.close();\n c.close();\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage()); \n// System.out.println(e.getMessage());\n }\n System.out.println(\"Table created successfully\");\n }",
"public static void registrarOrden(java.sql.Connection conexion, ArrayList<String> datos, String orden, InputStream archivo){\n try {\n PreparedStatement dp = crearDeclaracionPreparada(conexion, datos, orden); \n dp.setBlob(datos.size() + 1, archivo);\n dp.executeUpdate();\n //Ejecutamos la orden de tipo Query creada a partir de la orden y datos dados\n if(conexion.isClosed() == false)//si la conexion está abierta la cerramos\n conexion.close();\n } catch (SQLException ex) {\n System.out.println(\"\\n\\n\\n\"+ex); //Imprimimos el error en consola en caso de fallar \n } \n }",
"@Override\n public ComprobanteContable createComprobante(Aerolinea a, Boleto boleto, Cliente cliente, String tipo, NotaDebito nota) throws CRUDException {\n\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n return comprobante;\n }",
"public void enviarValoresCabecera(){\n }",
"public Object executar() throws TarefaException {\n\t\t\r\n\t\tCollection colecaoRotasParaExecucao = (Collection) getParametro(ConstantesSistema.COLECAO_UNIDADES_PROCESSAMENTO_BATCH);\r\n\t\tIterator iterator = colecaoRotasParaExecucao.iterator();\r\n\r\n\t\twhile (iterator.hasNext()) {\r\n\r\n\t\t\tInteger idRota = (Integer) iterator.next();\r\n\r\n\t\t\tSystem.out.println(\"ROTA GERAR CARTAS \" + idRota + \" *********************************************************\");\r\n\r\n\t\t\tenviarMensagemControladorBatch(\r\n\t\t\t\t\tConstantesJNDI.BATCH_GERAR_CARTAS_CAMPANHA_SOLIDARIEDADE_CRIANCA_PARA_NEGOCIACAO_A_VISTA_MDB,\r\n\t\t\t\t\tnew Object[]{idRota, this.getIdFuncionalidadeIniciada()});\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}",
"public static void main(String[] args) {\n String url = \"jdbc:mysql://obiwan2.univ-brest.fr/zfm1-zparlanme\";\r\n String user = \"zparlanme\";\r\n String password = \"y4alfp4y\";\r\n\r\n Livre livre = new Livre();\r\n livre.setTitre(\"Salammbô\");\r\n livre.setAuteur(\"Flaubert\");\r\n livre.setAnnee(1862);\r\n\r\n try {\r\n Connection co = (Connection) DriverManager.getConnection(url, user, password);\r\n\r\n Statement st = (Statement) co.createStatement();\r\n\r\n // st.executeUpdate(\r\n // \"insert into t_livre (titre, auteur, annee) values ('Salammbô', 'Flaubert',\r\n // 1862)\");\r\n\r\n // V2\r\n st.executeUpdate(\"insert into t_livre (titre, auteur, annee) values ('\" + livre.getTitre()\r\n + \"', '\" + livre.getAuteur() + \"', \" + livre.getAnnee() + \")\");\r\n\r\n st.close();\r\n co.close();\r\n } catch (SQLException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }",
"@Override\r\n /* OSINE791 - RSIS1 - Inicio */\r\n //public ExpedienteDTO generarExpedienteOrdenServicio(ExpedienteDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO) throws ExpedienteException{\r\n public ExpedienteGSMDTO generarExpedienteOrdenServicio(ExpedienteGSMDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO,String sigla) throws ExpedienteException{\r\n LOG.error(\"generarExpedienteOrdenServicio\");\r\n ExpedienteGSMDTO retorno= new ExpedienteGSMDTO();\r\n try{\r\n expedienteDTO.setEstado(Constantes.ESTADO_ACTIVO);\r\n PghExpediente pghExpediente = ExpedienteGSMBuilder.toExpedienteDomain(expedienteDTO);\r\n pghExpediente.setFechaEstadoProceso(new Date());\r\n pghExpediente.setDatosAuditoria(usuarioDTO);\r\n crud.create(pghExpediente);\r\n retorno=ExpedienteGSMBuilder.toExpedienteDto(pghExpediente);\r\n \r\n //reg historicoEstado\r\n MaestroColumnaDTO tipoHistorico=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_EXPEDIENTE).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstado=historicoEstadoDAO.registrar(pghExpediente.getIdExpediente(), null, pghExpediente.getIdEstadoProceso().getIdEstadoProceso(), pghExpediente.getIdPersonal().getIdPersonal(), pghExpediente.getIdPersonal().getIdPersonal(), tipoHistorico.getIdMaestroColumna(),null,null, null, usuarioDTO);\r\n LOG.info(\"historicoEstado-->\"+historicoEstado);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n //inserta ordenServicio\r\n Long idLocador=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)?expedienteDTO.getOrdenServicio().getLocador().getIdLocador():null;\r\n Long idSupervisoraEmpresa=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)?expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa():null;\r\n OrdenServicioDTO OrdenServicioDTO=ordenServicioDAO.registrar(retorno.getIdExpediente(), \r\n expedienteDTO.getOrdenServicio().getIdTipoAsignacion(), expedienteDTO.getOrdenServicio().getEstadoProceso().getIdEstadoProceso(), \r\n /* OSINE791 - RSIS1 - Inicio */\r\n //codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO);\r\n codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO,sigla);\r\n /* OSINE791 - RSIS1 - Fin */\r\n LOG.info(\"OrdenServicioDTO:\"+OrdenServicioDTO.getNumeroOrdenServicio());\r\n //busca idPersonalDest\r\n PersonalDTO personalDest=null;\r\n List<PersonalDTO> listPersonalDest=null;\r\n if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)){\r\n //personalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null)).get(0);\r\n listPersonalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null));\r\n }else if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)){\r\n //personalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa())).get(0);\r\n listPersonalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa()));\r\n }\r\n if(listPersonalDest==null || listPersonalDest.isEmpty()){\r\n throw new ExpedienteException(\"La Empresa Supervisora no tiene un Personal asignado\",null);\r\n }else{\r\n personalDest=listPersonalDest.get(0);\r\n }\r\n //inserta historico Orden Servicio\r\n EstadoProcesoDTO estadoProcesoDto=estadoProcesoDAO.find(new EstadoProcesoFilter(Constantes.IDENTIFICADOR_ESTADO_PROCESO_OS_REGISTRO)).get(0);\r\n MaestroColumnaDTO tipoHistoricoOS=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_ORDEN_SERVICIO).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstadoOS=historicoEstadoDAO.registrar(null, OrdenServicioDTO.getIdOrdenServicio(), estadoProcesoDto.getIdEstadoProceso(), expedienteDTO.getPersonal().getIdPersonal(), personalDest.getIdPersonal(), tipoHistoricoOS.getIdMaestroColumna(),null,null, null, usuarioDTO); \r\n LOG.info(\"historicoEstadoOS:\"+historicoEstadoOS);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n retorno.setOrdenServicio(new OrdenServicioDTO(OrdenServicioDTO.getIdOrdenServicio(),OrdenServicioDTO.getNumeroOrdenServicio()));\r\n }catch(Exception e){\r\n LOG.error(\"error en generarExpedienteOrdenServicio\",e);\r\n throw new ExpedienteException(e.getMessage(), e);\r\n }\r\n return retorno;\r\n }",
"public void executarLogica() {\n\t\tchecarTarefaValida();\n\t\texecutar();\n\t\texecutandoTarefa();\n\t\tfinalizarTarefa();\n\t}",
"private void enviar_arquivo()\n {\n try\n {\n verifica_servidor();\n /*** Cria a conexão UDP ***/\n socket = new DatagramSocket();\n /*** Obtem o endereço IP ***/\n InetAddress IPAddress = InetAddress.getByName(this.ip);\n /*** Inicia o handshake ***/\n handshake(IPAddress);\n /*** Cria a instancia da classe arquivo para o envio ***/\n int pacotes_enviados = 1;\n while (pacotes_enviados < pacotes.size())\n {\n verifica_servidor();\n int enviar = this.CWND / Utils.tamanho_util_pacote;\n int enviados = 0;\n int enviei = 0;\n while (enviados < enviar)\n {\n verifica_servidor();\n if(pacotes_enviados + enviados >= pacotes.size()) break;\n meu_pacote = pacotes.get(pacotes_enviados + enviados);\n meu_pacote.setId((short) this.ID);\n this.ultimo_sequencia_enviado = proximo_sequencia(this.ultimo_sequencia_enviado);\n meu_pacote.setNumero_de_sequencia(this.ultimo_sequencia_enviado);\n meu_pacote.setNumero_ack(this.ultimo_ack);\n janela.get(pacotes_enviados + enviados).setNumero_sequencia(this.ultimo_sequencia_enviado);\n /*** Dados do arquivo para enviar ***/\n byte[] data = Utils.cria_pacote(meu_pacote);\n /*** Pacote para enviar ***/\n DatagramPacket sendPacket = new DatagramPacket(data, data.length, IPAddress, this.porta);\n /*** Envia o arquivo ***/\n if(!vai_falhar(Utils.chance_perda_cliente))\n {\n socket.send(sendPacket);\n System.out.println(Utils.prefixo_cliente + Utils.pacote_enviado(meu_pacote));\n }else\n {\n System.out.println(Utils.prefixo_cliente + Utils.pacote_perdido);\n }\n janela.get(pacotes_enviados + enviados).ativa_timer();\n janela.get(pacotes_enviados + enviados).setEstouro(false);\n enviados++;\n enviei++;\n /*** Tempo de espera minimo ***/\n try\n {\n Thread.sleep(100);\n } catch (InterruptedException e)\n {\n e.printStackTrace();\n }\n }\n boolean checkado = false;\n int recebidos = 0;\n while (!checkado)\n {\n try\n {\n verifica_servidor();\n byte[] incomingData2 = new byte[Utils.tamanho_pacote];\n /*** Recebe um pacote ***/\n DatagramPacket incomingPacket2 = new DatagramPacket(incomingData2, incomingData2.length);\n socket.setSoTimeout(Utils.tempo_espera_ack);\n socket.receive(incomingPacket2);\n byte[] data4 = incomingPacket2.getData();\n /*** Transforma os bytes em uma instancia de arquivo ***/\n Pacote pacote_2 = Utils.cria_pacote(data4);\n /*** LOG ***/\n System.out.println(Utils.janela(enviar, this.CWND, this.SS_THRESH, this.janela));\n int prox= 0;\n int indice = 0;\n for (Map.Entry a : janela.entrySet()){\n if(!((Estado) a.getValue()).isEstado())\n {\n prox = ((Estado) a.getValue()).getNumero_sequencia();\n indice = (int) a.getKey();\n break;\n }\n }\n /*** LOG ***/\n System.out.println(Utils.prefixo_cliente + Utils.seq_esperado(prox,pacote_2.getNumero_ack()));\n if (pacote_2.isACK() && pacote_2.getNumero_ack() >= prox)\n {\n System.out.println(Utils.prefixo_servidor + Utils.pacote_recebido(pacote_2));\n int contador = obtem_primeiro(pacote_2.getNumero_ack());\n for(int iterador = indice; iterador <= contador; iterador++)\n {\n desativa_s_timer();\n recebidos++;\n if (this.CWND < this.SS_THRESH) this.CWND += 512;\n else\n {\n this.CWND = (512 * 512)/this.CWND;\n if (this.CWND < 512){\n this.CWND = 512;\n// this.SS_THRESH = 10000;\n }\n }\n }\n verifica(contador);\n this.ultimo_ack = pacote_2.getNumero_de_sequencia()+1;\n }\n if (recebidos == enviei) checkado = true;\n }catch (SocketTimeoutException e){\n System.out.print(Utils.reenvio_pacote);\n checkado = true;\n verifica_servidor();\n }\n }\n int teste = houve_estouro();\n if (teste != -69)\n {\n pacotes_enviados = teste;\n if (teste != 1)\n {\n this.SS_THRESH = this.CWND;\n this.CWND = 512;\n }\n this.ultimo_sequencia_enviado = janela.get(teste-1).getNumero_sequencia();\n }\n else pacotes_enviados += enviar;\n }\n terminar_conexao();\n socket.close();\n System.exit(0);\n } catch (SocketException e)\n {\n System.out.println(Utils.prefixo_cliente + Utils.fim_de_conexao);\n } catch (IOException | ClassNotFoundException | InstantiationException | IllegalAccessException e)\n {\n e.printStackTrace();\n }\n }",
"public static void viaggia(List<Trasporto> lista,Taxi[] taxi,HandlerCoR h) throws SQLException\r\n {\n Persona app = (Persona) lista.get(0);\r\n /* ARGOMENTI handleRequest\r\n 1° Oggetto Request\r\n 2° Array Taxi per permettere la selezione e la modifica della disponibilità\r\n */\r\n h.handleRequest(new RequestCoR(app.getPosPartenza(),app.getPosArrivo(),taxi),taxi); \r\n SceltaPercorso tempo = new SceltaPercorso();\r\n SceltaPercorso spazio = new SceltaPercorso();\r\n tempo.setPercorsoStrategy(new timeStrategy());\r\n spazio.setPercorsoStrategy(new lenghtStrategy());\r\n for(int i=0;i<5;i++)\r\n if(!taxi[i].getLibero())\r\n {\r\n if(Scelta.equals(\"veloce\"))\r\n {\r\n JOptionPane.showMessageDialog(null,\"Hai Scelto il Percorso più Veloce...\");\r\n Connessione conn;\r\n conn = Connessione.getConnessione();\r\n String query = \"Delete from CRONOCORSE where PASSEGGERO = ? \";\r\n try (PreparedStatement ps = conn.connect.prepareStatement(query)) {\r\n ps.setString(1, app.getNome());\r\n ps.executeUpdate();\r\n ps.close();\r\n JOptionPane.showMessageDialog(null,\"Cliente in viaggio...\\n\"+app.getNome()+\" è arrivato a destinazione!\\nPrezzo Corsa: \"+taxi[i].getPrezzoTotale()+\"€\");\r\n \r\n \r\n }catch(SQLException e){JOptionPane.showMessageDialog(null,e);}\r\n tempo.Prenota(taxi[i]); \r\n app.setPosPartenza();\r\n taxi[i].setPosizione(app.getPosArrivo());\r\n taxi[i].setStato(true);\r\n taxi[i].clear();\r\n lista.set(0,app);\r\n i=5;\r\n \r\n } else\r\n \r\n {\r\n JOptionPane.showMessageDialog(null,\"Hai Scelto il Percorso più Breve...\");\r\n Connessione conn;\r\n conn = Connessione.getConnessione();\r\n String query = \"Delete from CRONOCORSE where PASSEGGERO = ? \";\r\n try (PreparedStatement ps = conn.connect.prepareStatement(query)) {\r\n ps.setString(1, app.getNome());\r\n ps.executeUpdate();\r\n ps.close();\r\n JOptionPane.showMessageDialog(null,\"Cliente in viaggio...\\n\"+app.getNome()+\" è arrivato a destinazione!\\nPrezzo Corsa: \"+taxi[i].getPrezzoTotale()+\"€\");\r\n \r\n \r\n }catch(SQLException e){JOptionPane.showMessageDialog(null,e);}\r\n spazio.Prenota(taxi[i]); \r\n app.setPosPartenza();\r\n taxi[i].setPosizione(app.getPosArrivo());\r\n taxi[i].setStato(true);\r\n taxi[i].clear();\r\n lista.set(0,app);\r\n i=5;\r\n \r\n \r\n }\r\n }\r\n \r\n }",
"public int InsertarAnuncioTematico(AnuncioTematicoDTO anuncio){\n int status=0;\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is); \n PreparedStatement ps= conect.prepareStatement(sqlProp.getProperty(\"insertar.AnuncioTematico\"));\n ps.setString(1, anuncio.getTipoAnuncio().toString());\n ps.setString(2, anuncio.getTitulo());\n ps.setString(3, anuncio.getCuerpo());\n java.sql.Date fechaPublicacion=new java.sql.Date(anuncio.getFechaPublicacion().getTime());\n ps.setDate(4, fechaPublicacion);\n ps.setString(5, anuncio.getPropietario().getEmail());\n ps.setString(6, anuncio.getEstadoAnuncio().toString());\n String intereses=\"\"; \n \n for(String interes : anuncio.getTemas()){\n intereses+=interes.toLowerCase()+\",\";\n }\n \n if(intereses.length()>0){\n \n intereses=intereses.substring(0,intereses.length()-1);\n }\n \n ps.setString(7, intereses);\n\n status=ps.executeUpdate();\n\n int idAnuncio=GetMaxID();\n for(Contacto c : anuncio.getDestinatarios()){\n PreparedStatement psDestinatario=conect.prepareStatement(sqlProp.getProperty(\"insertar.Destinatario\"));\n psDestinatario.setInt(1, idAnuncio);\n psDestinatario.setString(2, c.getEmail());\n psDestinatario.executeUpdate();\n }\n\n }catch(Exception e){\n e.printStackTrace();\n }\n return status;\n }",
"public double alugar(Cliente cliente, Usuario usuario, Date dataAluguel, List<Filme> filmes) \n throws AluguelPendenteException, QuantidadeFilimesException, ClassificacaoIndicativaException, Exception{\n if(filmes.size() > 3){\n throw new QuantidadeFilimesException();\n }\n \n if(this.buscarAluguelPendente(cliente) != null){\n throw new AluguelPendenteException();\n }\n \n //Salvando o aluguel para depois salvar os filmes para esse aluguel\n Double valor = 0D;\n for(Filme filme : filmes){\n //Verificando idade do cliente. Passa o filme para a exceção para que saiba qual está fora da idade\n if(filme.getClassificacao() > cliente.getIdade()){\n throw new ClassificacaoIndicativaException(filme);\n }\n valor += filme.getPreco();\n }\n StringBuilder sql = new StringBuilder();\n sql.append(\" INSERT INTO aluguel(id, data_aluguel, cliente_id, valor, operador_id) \");\n sql.append(\" VALUES (?, ?, ?, ?, ?)\");\n \n Connection connection = ConexaoUtil.getConnection();\n Long idAluguel = this.obterNovoId(connection);\n PreparedStatement preparedStatement = connection.prepareStatement(sql.toString());\n preparedStatement.setLong(1, idAluguel);\n preparedStatement.setTimestamp(2, new Timestamp(dataAluguel.getTime()));\n preparedStatement.setLong(3, cliente.getId());\n preparedStatement.setDouble(4, valor);\n preparedStatement.setLong(5, 0);\n preparedStatement.execute();\n \n sql.setLength(0);\n \n sql.append(\" INSERT INTO aluguel_filme (aluguel_id, filme_id) VALUES (?, ?)\");\n preparedStatement = connection.prepareStatement(sql.toString());\n for(Filme filme : filmes){\n preparedStatement.setLong(1, idAluguel);\n preparedStatement.setLong(2, filme.getId());\n preparedStatement.addBatch();\n }\n preparedStatement.executeBatch();\n preparedStatement.close();\n connection.close();\n \n Aluguel aluguelSalvo = new Aluguel(idAluguel, dataAluguel,filmes, cliente, valor, usuario);\n double preco=0;\n for(Filme filme :filmes){\n preco += filme.getPreco();\n }\n return preco;\n }",
"public void InsertarDespachoServidorKRADAC() {\n String sql;\n if (desp.getStrTelefono() == null\n || desp.getStrTelefono().equals(\"null\")\n || desp.getStrTelefono().equals(\"\")) {\n sql = \"INSERT INTO ASIGNADOS_LOCAL(\"\n + \"N_UNIDAD,\"\n + \"COD_CLIENTE,\"\n + \"ESTADO,\"\n + \"VALOR,\"\n + \"ESTADO_INSERT,\"\n + \"USUARIO,\"\n + \"DIRECCION\"\n + \") \"\n + \"VALUES (\"\n + desp.getIntUnidad()\n + \",\"\n + desp.getIntCodigo()\n + \",'OCUPADO',\"\n + \"-2\"\n + \",'\"\n + getEstadoInsert()\n + \"','\"\n + Principal.sesion[2]\n + \"','\"\n + desp.getStrDireccion()\n + \"');\";\n } else {\n sql = \"INSERT INTO ASIGNADOS_LOCAL(\"\n + \"N_UNIDAD,\"\n + \"COD_CLIENTE,\"\n + \"ESTADO,\"\n + \"FONO,\"\n + \"VALOR,\"\n + \"ESTADO_INSERT,\"\n + \"USUARIO,\"\n + \"DIRECCION\"\n + \") \"\n + \"VALUES (\"\n + desp.getIntUnidad()\n + \",\"\n + desp.getIntCodigo()\n + \",'OCUPADO','\"\n + desp.getStrTelefono() + \"',\"\n + \"-2\"\n + \",'\"\n + getEstadoInsert()\n + \"','\"\n + Principal.sesion[2]\n + \"','\"\n + desp.getStrDireccion()\n + \"');\";\n }\n\n if (bd.ejecutarSentencia(sql)) {\n /**\n * El respaldo y la insersión dentro del servidor de KRADAC se lo\n * realiza en la base de datos, para eso hay un trigger en la tabla\n * rastreosatelital.asignados_local que hace lo mismo que el del server KRADAC\n * pero tambien hace la ejecución de un procedimiento SP_INSERTAR_RESPALDAR_SERVER\n * el cual trata de insertar en la tabla federada si lo logra todo bien\n * pero si no se hace un insert en la tabla de respaldos locales estos subiran\n * al servidor cuando el icono de red cambie o cuando hay conexión, de\n * esta manera se elimina el retardo que existe cuando no se puede\n * alcanzar el insert a la tabla federada del servidor KRADAC\n */\n log.trace(\"--Insertar OCUPADO Local Trigger Server--> {}\", sql);\n }\n }",
"Compuesta createCompuesta();",
"public void create(Querellante quere) throws IOException, SQLException {\n con = getConnection();\n cs = con.prepareCall(\"Call create_persona(?,?,?,?,?,?)\");\n cs.setEscapeProcessing(true);\n cs.setString(1, quere.getNombre());\n cs.setString(2, quere.getApellido());\n cs.setInt(3, quere.getCedula());\n cs.setInt(4, quere.getTelefono());\n cs.setString(5, quere.getDireccion());\n cs.setInt(6, 3);\n cs.execute();\n\n con.close();\n\n }",
"@Override\n\tpublic String executa(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tJuncaoEstoqueProduto estoque = new JuncaoEstoqueProduto(Integer.parseInt(request.getParameter(\"quantidade\")),\n\t\t\t\trequest.getParameter(\"nome\"),request.getParameter(\"codProduto\"),Integer.parseInt(request.getParameter(\"quantidadeMinima\")));\n\t\t// enviar dados para o DAO persistir\n\t\tnew JuncaoEstoqueProdutoDAO().salvar(estoque);\n\t\t//retornar o nome da view\n\t\trequest.setAttribute(\"msg\", \"parabéns produto cadastrado com sucesso\");\n\t\treturn \"cadastroProduto\";\n\t}",
"public void instalarBaseDatos()\r\n\t{\r\n\t\tString nombrebuscado = \"information_schema\";\r\n\t\tArrayList parametrosbd = parametrosConectorBaseDatos();\r\n\t\tif(parametrosbd != null)\r\n\t\t{\r\n\t\t\tif(parametrosbd.size()>0)\r\n\t\t\t{\r\n\t\t\t\tnombrebuscado =(String)parametrosbd.get(0);\r\n\t\t\t}\r\n\t\t}\r\n\t\tString nombrebd = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector(\"information_schema\");\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tnombrebd = CrearBD.buscarBaseDatos(nombrebuscado, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\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}\r\n\t\tif(nombrebd == null)\r\n\t\t{\r\n\t\t\tint numerotablascreadas = 0;\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tConector conectora = new Conector(\"information_schema\");\r\n\t\t\t\tconectora.iniciarConexionBaseDatos();\r\n\t\t\t\tCrearBD.crearBaseDatos(nombrebuscado, conectora);\r\n\t\t\t\tconectora.terminarConexionBaseDatos();\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = 1; i < 20; i++) \r\n\t\t\t\t{\r\n\t\t\t\t\tString nombretabla = i+\".sql\";\r\n\t\t\t\t\tString contenidotabla = ejecutarCodigoSQLtablas(nombretabla);\r\n\t\t\t\t\tif(!contenidotabla.equalsIgnoreCase(\"\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tConector conectorb = new Conector(nombrebuscado);\r\n\t\t\t\t\t\tconectorb.iniciarConexionBaseDatos();\r\n\t\t\t\t\t\tCrearBD.ejecutarCodigoSQL(contenidotabla, conectorb);\r\n\t\t\t\t\t\tconectorb.terminarConexionBaseDatos();\r\n\t\t\t\t\t\tnumerotablascreadas++;\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\tConector conectorg = new Conector(nombrebuscado);\r\n\t\t\t\t\t\tconectorg.iniciarConexionBaseDatos();\r\n\t\t\t\t\t\tCrearBD.ejecutarCodigoSQL(\"DROP DATABASE \"+nombrebuscado, conectorg);\r\n\t\t\t\t\t\tconectorg.terminarConexionBaseDatos();\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(this,\"No se encontro el archivo \"+nombretabla,\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(numerotablascreadas == 19)\r\n\t\t\t\t{\r\n\t\t\t\t\tejecutarCodigoSQLdatos(nombrebuscado);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\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}\r\n\t\t}\r\n\t}",
"public void generar() throws Exception {\n\t\tAnalizador_Sintactico.salida.generar(\".DATA\", \"genero los datos estaticos para la clase \"+this.nombre);\r\n\t\tAnalizador_Sintactico.salida.generar(\"VT_\"+nombre+\":\",\" \");\r\n\t\t\r\n\t\tboolean esDinamico=false;\r\n\t\t\r\n\t\t//para cada metodo, genero la etiqueta dw al codigo\r\n\t\tfor (EntradaMetodo m: entradaMetodo.values()) {\r\n\t\t\tif (m.getModificador().equals(\"dynamic\")) {\r\n\t\t\t\tAnalizador_Sintactico.salida.gen_DW(\"DW \"+m.getEtiqueta(),\"offset: \"+m.getOffsetMetodo(),m.getOffsetMetodo());\r\n\t\t\t\tesDinamico=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tAnalizador_Sintactico.salida.agregar_DW();\r\n\t\t\r\n\t\t//si NO hay ningun metodo dinamico -> VT con NOP\r\n\t\tif (! esDinamico)\r\n\t\t\tAnalizador_Sintactico.salida.generar(\"NOP\",\"no hago nada\");\r\n\t\t\r\n\t\t//genero codigo para todos los metodos\r\n\t\tAnalizador_Sintactico.salida.generar(\".CODE\",\"seccion codigo de la clase \"+this.nombre);\r\n\t\t\r\n\t\tList<EntradaPar> listaParams;\r\n\t\tfor(EntradaMetodo m: entradaMetodo.values()) {\r\n\t\t\t//metodo actual es m\r\n\t\t\tAnalizador_Sintactico.TS.setMetodoActual(m);\r\n\t\t\t\r\n\t\t\t//SETEO el offset de sus parametros\r\n\t\t\tlistaParams= m.getEntradaParametros();\r\n\t\t\t\r\n\t\t\tfor(EntradaPar p: listaParams) {\r\n\t\t\t\t//seteo offset de p\r\n\t\t\t\t\r\n\t\t\t\t//si es dinamico m -> offset desde 3\r\n\t\t\t\tif (m.getModificador().equals(\"dynamic\")) {\r\n\t\t\t\t\tp.setOffset((listaParams.size() +4) - p.getUbicacion());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t//si es estatico m -> offset desde 2\r\n\t\t\t\t\tp.setOffset((listaParams.size() +3) - p.getUbicacion());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//genero el codigo del cuerpo de ese metodo\r\n\t\t\tm.generar();\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//genero codigo para todos los constructores\r\n\t\tfor(EntradaCtor c: entradaCtor.values()) {\r\n\t\t\t//metodo actual es m\r\n\t\t\tAnalizador_Sintactico.TS.setMetodoActual(c);\r\n\t\t\t\r\n\t\t\t//SETEO el offset de sus parametros\r\n\t\t\tlistaParams= c.getEntradaParametros();\r\n\t\t\t\r\n\t\t\tfor(EntradaPar p: listaParams) {\r\n\t\t\t\t//seteo offset de p\r\n\t\t\t\tp.setOffset(listaParams.size() +4 - p.getUbicacion());\t// +4 porque el ctor tiene this\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t//genero el codigo de ese metodo\r\n\t\t\tc.generar();\r\n\t\t}\t\r\n\t}",
"public void nuevoPaciente(String idPaciente, String DNI, String nombres, String apellidos, String direccion, String ubigeo, String telefono1, String telefono2, String edad)\n {\n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"insert into \" + \" paciente(idPaciente, dui, nombres, apellidos, direccion, ubigeo, telefono1, telefono2, edad)\" + \"values (?,?,?,?,?,?,?,?,?)\");\n \n pstm.setString(1, idPaciente);\n pstm.setString(2, DNI);\n pstm.setString(3, nombres);\n pstm.setString(4, apellidos);\n pstm.setString(5, direccion);\n pstm.setString(6, ubigeo);\n pstm.setString(7, telefono1);\n pstm.setString(8, telefono2);\n pstm.setString(9, edad); \n \n pstm.execute();\n pstm.close();\n }\n catch(SQLException e)\n {\n System.out.print(e);\n }\n }",
"public Resultado executar(Requisicao requisicao) throws Exception {\r\n if (Logger.estaHabilitadoDebug(this)) {\r\n Logger.debug(this, \"***** Chamada ao servico de inclusao de Cesta de Garantias ***** \");\r\n }\r\n\r\n RequisicaoServicoRegistraCadastroCestaGarantias req = (RequisicaoServicoRegistraCadastroCestaGarantias) requisicao;\r\n ResultadoServicoRegistraCadastroCestaGarantias res = new ResultadoServicoRegistraCadastroCestaGarantias();\r\n\r\n // validacao na mesma transacao?\r\n Booleano valida = req.obterGARANTIAS_CODIGO_Booleano();\r\n if (!Condicional.vazio(valida) && valida.ehVerdadeiro()) {\r\n RequisicaoServicoValidaCadastroCestaGarantias reqV = new RequisicaoServicoValidaCadastroCestaGarantias();\r\n reqV.atribuirGARANTIAS_PARTICIPANTE_CodigoContaCetip(req.obterGARANTIAS_PARTICIPANTE_CodigoContaCetip());\r\n reqV.atribuirGARANTIAS_CONTRAPARTE_CodigoContaCetip(req.obterGARANTIAS_CONTRAPARTE_CodigoContaCetip());\r\n ServicoValidaCadastroCestaGarantias servicoValida = new ServicoValidaCadastroCestaGarantias();\r\n servicoValida.setGarantias(getFactory());\r\n servicoValida.executarConsulta(reqV);\r\n }\r\n\r\n gp = getGp();\r\n\r\n CestaGarantiasDO nrCesta = criaEntradaCesta(req);\r\n Id codigo = nrCesta.getNumIdCestaGarantias();\r\n res.atribuirGARANTIAS_CODIGO_Id(codigo);\r\n return res;\r\n }",
"public String execute() throws SQLException\n {\n setDestPath(\"/home/hadoop/NetBeansProjects/RestfulAPI/document/\");\n\n try{\n System.out.println(\"name: \" + getName());\n\n System.out.println(\"Src File name: \" + getMyFile());\n System.out.println(\"Dst File name: \" + getMyFileFileName());\n\n File destFile = new File(getDestPath(), getMyFileFileName());\n FileUtils.copyFile(getMyFile(), destFile);\n System.out.println(\"Berhasil\");\n \n DBConnector connector = new DBConnector();\n Connection conn = connector.getConn();\n String sql = \"insert into book (name,sinopsis,author) values (?,?,?)\";\n PreparedStatement stmt = null;\n stmt = conn.prepareStatement(sql);\n stmt.setString(1, name);\n stmt.setString(2, sinopsis);\n stmt.setString(3, author);\n stmt.executeUpdate();\n// PreparedStatement ps = conn.prepareStatement(sql);\n// ResultSet rs0 = ps.executeQuery();\n \n// se.writeFakta(conn, namaperiod, list,Integer.parseInt(periodselect),Integer.parseInt(modelfakta));\n \n }catch(IOException e){\n e.printStackTrace();\n return ERROR;\n }\n\n return SUCCESS;\n }",
"public void InsertarLibreServidorKRADAC() {\n String sql;\n if (desp.getStrTelefono() == null\n || desp.getStrTelefono().equals(\"null\")\n || desp.getStrTelefono().equals(\"\")) {\n sql = \"INSERT INTO ASIGNADOS_LOCAL(\"\n + \"N_UNIDAD,\"\n + \"COD_CLIENTE,\"\n + \"ESTADO,\"\n + \"VALOR,\"\n + \"ESTADO_INSERT,\"\n + \"USUARIO,\"\n + \"DIRECCION\"\n + \") \"\n + \"VALUES (\"\n + desp.getIntUnidad()\n + \",\"\n + desp.getIntCodigo()\n + \",'LIBRE',\"\n + \"-2\"\n + \",'\"\n + getEstadoInsert()\n + \"','\"\n + Principal.sesion[2]\n + \"','\"\n + desp.getStrDireccion()\n + \"');\";\n } else {\n sql = \"INSERT INTO ASIGNADOS_LOCAL(\"\n + \"N_UNIDAD,\"\n + \"COD_CLIENTE,\"\n + \"ESTADO,FONO,\"\n + \"VALOR,\"\n + \"ESTADO_INSERT,\"\n + \"USUARIO,\"\n + \"DIRECCION\"\n + \") \"\n + \"VALUES (\"\n + desp.getIntUnidad()\n + \",\"\n + desp.getIntCodigo()\n + \",'LIBRE','\"\n + desp.getStrTelefono()\n + \"',\"\n + \"-2\"\n + \",'\"\n + getEstadoInsert()\n + \"','\"\n + Principal.sesion[2]\n + \"','\"\n + desp.getStrDireccion()\n + \"');\";\n }\n\n if (bd.ejecutarSentencia(sql)) {\n /**\n * El respaldo y la insersión dentro del servidor de KRADAC se lo\n * realiza en la base de datos, para eso hay un trigger en la tabla\n * rastreosatelital.asignados_local que hace lo mismo que el del server KRADAC\n * pero tambien hace la ejecución de un procedimiento SP_INSERTAR_RESPALDAR_SERVER\n * el cual trata de insertar en la tabla federada si lo logra todo bien\n * pero si no se hace un insert en la tabla de respaldos locales estos subiran\n * al servidor cuando el icono de red cambie o cuando hay conexión, de\n * esta manera se elimina el retardo que existe cuando no se puede\n * alcanzar el insert a la tabla federada del servidor KRADAC\n */\n log.trace(\"--Insertar LIBRE Local Trigger Server--> {}\", sql);\n }\n }",
"public void realtorioCli() throws ClassNotFoundException, FileNotFoundException, DocumentException, SQLException {\r\n ContCli cocli = new ContCli();\r\n \r\n\r\n //Instancia um novo documento\r\n Document doc = new Document();\r\n \r\n //Define o local do documento\r\n PdfWriter objpdf = PdfWriter.getInstance(doc, new FileOutputStream(\"relatorioClientes.pdf\"));\r\n doc.open();\r\n PdfPTable tb = new PdfPTable(1);\r\n tb.setWidthPercentage(50);\r\n tb.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n tb.setSpacingAfter(10f);\r\n tb.setSpacingBefore(10f);\r\n \r\n PdfPCell cel = new PdfPCell(new Paragraph(\"Relatório Clientes.\"));\r\n cel.setBorderColor(BaseColor.BLACK);\r\n cel.setPaddingLeft(10);\r\n cel.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n cel.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n tb.addCell(cel);\r\n\r\n doc.add(tb);\r\n\r\n try {\r\n PdfPTable tabela = new PdfPTable(4); // 4 colunas.\r\n tabela.setWidthPercentage(100); //largura 100%\r\n tabela.setSpacingBefore(10f); //espaços antes da tabela\r\n tabela.setSpacingAfter(10f); //espaços antes da tabela\r\n\r\n float[] larguraColuna = {1f, 1f, 1f, 1f};\r\n tabela.setWidths(larguraColuna);\r\n\r\n PdfPCell celula01 = new PdfPCell(new Paragraph(\"Código\"));\r\n celula01.setBorderColor(BaseColor.BLACK);\r\n celula01.setPaddingLeft(10);\r\n celula01.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula01.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n PdfPCell celula02 = new PdfPCell(new Paragraph(\"Nome\"));\r\n celula02.setBorderColor(BaseColor.BLACK);\r\n celula02.setPaddingLeft(10);\r\n celula02.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula02.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n PdfPCell celula03 = new PdfPCell(new Paragraph(\"CPF\"));\r\n celula03.setBorderColor(BaseColor.BLACK);\r\n celula03.setPaddingLeft(10);\r\n celula03.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula03.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n PdfPCell celula04 = new PdfPCell(new Paragraph(\"Divida\"));\r\n celula04.setBorderColor(BaseColor.BLACK);\r\n celula04.setPaddingLeft(10);\r\n celula04.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula04.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n tabela.addCell(celula01);\r\n tabela.addCell(celula02);\r\n tabela.addCell(celula03);\r\n tabela.addCell(celula04);\r\n for (Cliente cli : cocli.selecCli()) {\r\n\r\n //Set Column widths\r\n //Para evitar que a borda da célula e o conteúdo se sobreponham, \r\n //se você tiver tendo bordas de células grossas\r\n //celula01.setUserBorderPadding(true);\r\n //celula02.setUserBorderPadding(true);\r\n //celula03.setUserBorderPadding(true);\r\n doc.add(new Paragraph());\r\n\r\n celula01 = new PdfPCell(new Paragraph(\"\" + cli.getCod()));\r\n celula01.setBorderColor(BaseColor.BLACK);\r\n celula01.setPaddingLeft(10);\r\n celula01.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula01.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n celula02 = new PdfPCell(new Paragraph(cli.getNome()));\r\n celula02.setBorderColor(BaseColor.BLACK);\r\n celula02.setPaddingLeft(10);\r\n celula02.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula02.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n celula03 = new PdfPCell(new Paragraph(cli.getCpf()));\r\n celula03.setBorderColor(BaseColor.BLACK);\r\n celula03.setPaddingLeft(10);\r\n celula03.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula03.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n celula04 = new PdfPCell(new Paragraph(\"R$\" + cli.getDiv()));\r\n celula04.setBorderColor(BaseColor.BLACK);\r\n celula04.setPaddingLeft(10);\r\n celula04.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula04.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n tabela.addCell(celula01);\r\n tabela.addCell(celula02);\r\n tabela.addCell(celula03);\r\n tabela.addCell(celula04);\r\n\r\n// String linha = \"\";\r\n// linha += (\"Codigo: \" + contatos.getCodigoContato());\r\n// linha += (\" Nome: \" + contatos.getNomeContato());\r\n// linha += (\" Celular: \" + contatos.getNumCelular());\r\n// linha += (\" Fixo: \" + contatos.getNumFixo());\r\n// documento.add(new Paragraph(linha));\r\n }\r\n doc.add(tabela);\r\n\r\n doc.close();\r\n objpdf.close();\r\n doc.close();\r\n objpdf.close();\r\n } catch (DocumentException e) {\r\n e.printStackTrace();\r\n }\r\n PDF pd = new PDF();\r\n pd.abreArquivoPdf(\"relatorioClientes.pdf\");\r\n }",
"public void PrepararBaseDatos() { \r\n try{ \r\n conexion=DriverManager.getConnection(\"jdbc:ucanaccess://\"+this.NOMBRE_BASE_DE_DATOS,this.USUARIO_BASE_DE_DATOS,this.CLAVE_BASE_DE_DATOS);\r\n \r\n } \r\n catch (Exception e) { \r\n JOptionPane.showMessageDialog(null,\"Error al realizar la conexion \"+e);\r\n } \r\n try { \r\n sentencia=conexion.createStatement( \r\n ResultSet.TYPE_SCROLL_INSENSITIVE, \r\n ResultSet.CONCUR_READ_ONLY); \r\n \r\n System.out.println(\"Se ha establecido la conexión correctamente\");\r\n } \r\n catch (Exception e) { \r\n JOptionPane.showMessageDialog(null,\"Error al crear el objeto sentencia \"+e);\r\n } \r\n }",
"public void insercionMasiva() {\r\n\t\tif (!precondInsert())\r\n\t\t\treturn;\r\n\t\tUploadItem fileItem = seleccionUtilFormController.crearUploadItem(\r\n\t\t\t\tfName, uFile.length, cType, uFile);\r\n\t\ttry {\r\n\t\t\tlLineasArch = FileUtils.readLines(fileItem.getFile(), \"ISO-8859-1\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tstatusMessages.add(Severity.INFO, \"Error al subir el archivo\");\r\n\t\t}\r\n\r\n\t\tStringBuilder cadenaSalida = new StringBuilder();\r\n\t\tString estado = \"EXITO\";\r\n\t\tcantidadLineas = 0;\r\n\t\t//Ciclo para contar la cantdad de adjudicados o seleccionados que se reciben\r\n\t\tfor (String linea : lLineasArch) {\r\n\t\t\tcantidadLineas++;\r\n\t\t\tif(cantidadLineas > 1){\r\n\t\t\t\tseleccionados++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Condicion para verificar si la cantidad de seleccionados es mayor a la cantidad de vacancias (en cuyo caso se procede a abortar el proceso e imprimir\r\n\t\t//un mensaje de error) o verificar si esta es menor (se imprime el mensaje pero se continua)\r\n\t\t\r\n\t\tif(seleccionados > concursoPuestoAgrNuevo.getCantidadPuestos()){\r\n\t\t\testado = \"FRACASO\";\r\n\t\t\tcadenaSalida.append(estado + \" - CANTIDAD DE AJUDICADOS ES SUPERIOR A LA CANTIDAD DE PUESTOS VACANTES PARA EL GRUPO\");\r\n\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t}\r\n\t\telse if(seleccionados < concursoPuestoAgrNuevo.getCantidadPuestos()){\r\n\t\t\tcadenaSalida.append(\"ADVERTENCIA - CANTIDAD DE ADJUDICADOS ES INFERIOR A LA CANTIDAD DE PUESTOS VACANTES PARA EL GRUPO\");\r\n\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t}\r\n\t\tseleccionados = 0;\r\n\t\t\r\n\t\tif(!estado.equals(\"FRACASO\")){\r\n\r\n\t\tcantidadLineas = 0;\r\n\t\tfor (String linea : lLineasArch) {\r\n\r\n\t\t\tcantidadLineas++;\r\n\t\t\testado = \"EXITO\";\r\n\t\t\tString observacion = \"\";\r\n\t\t\tFilaPostulante fp = new FilaPostulante(linea);\r\n\t\t\tList<Persona> lista = null;\r\n\t\t\tif (cantidadLineas > 1 && fp != null && fp.valido) {\r\n\t\t\t\t//Verifica si la persona leida en el registro del archivo CSV existe en la Tabla Persona\r\n\t\t\t\tString sqlPersona = \"select * from general.persona where persona.documento_identidad = '\"+fp.getDocumento()+ \"'\";\r\n\t\t\t\tQuery q1 = em.createNativeQuery(sqlPersona, Persona.class);\r\n\t\t\t\tPersona personaLocal = new Persona();\r\n\t\t\t\tint banderaEncontroPersonas = 0;\r\n\t\t\t\t//Si existe, se almacena el registro de la tabla\r\n\t\t\t\tif(!q1.getResultList().isEmpty()){\r\n\t\t\t\t\tlista = q1.getResultList();\r\n\t\t\t\t\tif (compararNomApe(lista.get(0).getNombres(), removeCadenasEspeciales(fp.getNombres()))\r\n\t\t\t\t\t\t\t&& compararNomApe(lista.get(0).getApellidos(), removeCadenasEspeciales(fp.getApellidos())) ) {\r\n\t\t\t\t\t\t\tbanderaEncontroPersonas = 1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\t\t\tobservacion += \" PERSONA NO REGISTRADA EN LA BASE DE DATOS LOCAL\";\r\n\t\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\tobservacion += \" PERSONA NO REGITRADA EN LA BASE DE DATOS LOCAL\";\r\n\t\t\t\t}\r\n\t\t\t\t//Verificamos que la persona figure en la lista corta como seleccionado\r\n\t\t\t\tif(!estado.equals(\"FRACASO\")){\r\n\t\t\t\t\tint banderaExisteEnListaCorta = 0;\t\t\t\t\t\r\n\t\t\t\t\tint i=0;\r\n\t\t\t\t\tif (banderaEncontroPersonas == 1) {\r\n\t\t\t\t\t\twhile(i<lista.size()){\r\n\t\t\t\t\t\t\tpersonaLocal = (Persona) lista.get(i);\r\n\t\t\t\t\t\t\tQuery p = em.createQuery(\"select E from EvalReferencialPostulante E \"\r\n\t\t\t\t\t\t\t\t\t+ \"where E.postulacion.personaPostulante.persona.idPersona =:id_persona and E.concursoPuestoAgr.idConcursoPuestoAgr =:id_concurso_puesto_agr and E.listaCorta=:esta_en_lista_corta\");\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"id_persona\", personaLocal.getIdPersona());\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"id_concurso_puesto_agr\", this.idConcursoPuestoAgr);\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"esta_en_lista_corta\", true);\r\n\t\t\t\t\t\t\tList<EvalReferencialPostulante> listaEvalRefPost = p.getResultList();\r\n\t\t\t\t\t\t\tif (!listaEvalRefPost.isEmpty()) {\r\n\t\t\t\t\t\t\t\tbanderaExisteEnListaCorta = 1;\r\n\t\t\t\t\t\t\t\ti = lista.size();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (banderaExisteEnListaCorta == 0) {\r\n\t\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\t\tobservacion += \" NO SELECCIONADO/ELEGIBLE EN LISTA CORTA\";\r\n\t\t\t\t\t} else if (banderaExisteEnListaCorta == 1){\r\n\t\t\t\t\t\tobservacion += \" SELECCIONADO/ELEGIBLE EN LISTA CORTA\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tQuery p = em.createQuery(\"select E from EvalReferencialPostulante E \"\r\n\t\t\t\t\t\t\t\t+ \"where E.postulacion.personaPostulante.persona.idPersona =:id_persona and E.concursoPuestoAgr.idConcursoPuestoAgr =:id_concurso_puesto_agr and E.listaCorta=:esta_en_lista_corta\");\r\n\t\t\t\t\t\t\t\tp.setParameter(\"id_persona\", personaLocal.getIdPersona());\r\n\t\t\t\t\t\t\t\tp.setParameter(\"id_concurso_puesto_agr\", this.idConcursoPuestoAgr);\r\n\t\t\t\t\t\t\t\tp.setParameter(\"esta_en_lista_corta\", true);\r\n\t\t\t\t\t\tEvalReferencialPostulante auxEvalReferencialPostulante = (EvalReferencialPostulante) p.getResultList().get(0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Validaciones para actualizaciones\r\n\t\t\t\t\t\t//Bandera indicadora de actualizaciones hechas\r\n\t\t\t\t\t\tint bandera = 0;\r\n\t\t\t\t\t\tif(auxEvalReferencialPostulante.getSelAdjudicado() == null){\r\n\t\t\t\t\t\t\testado = \"EXITO\";\r\n\t\t\t\t\t\t\tauxEvalReferencialPostulante.setSelAdjudicado(true);;\r\n\t\t\t\t\t\t\tbandera = 1;\r\n\t\t\t\t\t\t\tem.merge(auxEvalReferencialPostulante);\r\n\t\t\t\t\t\t\tem.flush();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tagregarEstadoMotivo(linea, estado, observacion, cadenaSalida);\r\n\t\t\t}\r\n\t\t\tif (cantidadLineas > 1 && !fp.valido) {\r\n\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\tcadenaSalida\r\n\t\t\t\t\t\t.append(estado\r\n\t\t\t\t\t\t\t\t+ \" - ARCHIVO INGRESADO CON MENOS CAMPOS DE LOS NECESARIOS. DATOS INCORRECTOS EN ALGUNA COLUMNA.\");\r\n\t\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t\t}\r\n\r\n\t\t\t// FIN FOR\r\n\t\t}\r\n\t\t//FIN IF\r\n\t\t}\r\n\t\tif (lLineasArch.isEmpty()) {\r\n\t\t\tstatusMessages.add(Severity.INFO, \"Archivo inválido\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSimpleDateFormat sdf2 = new SimpleDateFormat(\"dd_MM_yyyy_HH_mm_ss\");\r\n\t\t\tString nArchivo = sdf2.format(new Date()) + \"_\" + fName;\r\n\t\t\tString direccion = System.getProperty(\"jboss.home.dir\") + System.getProperty(\"file.separator\") + \"temp\" + System.getProperty(\"file.separator\");\r\n\t\t\tFile archSalida = new File(direccion + nArchivo);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tFileUtils\r\n\t\t\t\t\t\t.writeStringToFile(archSalida, cadenaSalida.toString());\r\n\t\t\t\tif (archSalida.length() > 0) {\r\n\t\t\t\t\tstatusMessages.add(Severity.INFO, \"Insercion Exitosa\");\r\n\t\t\t\t}\r\n\t\t\t\tJasperReportUtils.respondFile(archSalida, nArchivo, false,\r\n\t\t\t\t\t\t\"application/vnd.ms-excel\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tstatusMessages.add(Severity.ERROR, \"IOException\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public String InsertarAnuncioGeneral(AnuncioGeneralDTO anuncio){\n int status=0;\n String message=\"Funciona bien\";\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"insertar.AnuncioGeneral\"));\n \n ps.setString(1, anuncio.getTipoAnuncio().toString());\n ps.setString(2,anuncio.getTitulo());\n ps.setString(3,anuncio.getCuerpo());\n \n java.sql.Date fechaPublicacion=new java.sql.Date(anuncio.getFechaPublicacion().getTime());\n // DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss dd/MM/yyyy\");\n // String fecha = dateFormat.format(anuncio.getFechaPublicacion());\n // java.sql.Date fechaPublicacion=new java.sql.Date(dateFormat.parse(fecha).getTime());\n ps.setDate(4, fechaPublicacion);\n message=\"Cargo bien la fecha\";\n ps.setString(5,anuncio.getPropietario().getEmail());\n ps.setString(6,anuncio.getEstadoAnuncio().toString());\n status=ps.executeUpdate();\n\n \n int idAnuncio=GetMaxID();\n for(Contacto c : anuncio.getDestinatarios()){\n PreparedStatement psDestinatario=conect.prepareStatement(sqlProp.getProperty(\"insertar.Destinatario\"));\n psDestinatario.setInt(1, idAnuncio);\n psDestinatario.setString(2, c.getEmail());\n psDestinatario.executeUpdate();\n }\n message=\"funciona bien\";\n }catch(Exception e){\n e.toString();\n }\n\n return message;\n }",
"Compleja createCompleja();",
"private void newResposta(int respostaUtilizador, int idQuestao, String mailUtilizador) {\n\t\tdbconn.newResposta(respostaUtilizador, idQuestao, mailUtilizador);\r\n\t}",
"public void generarContrato() {\r\n\t\ttry {\r\n\t\t\tString nombre = Contrato.generarContrato(estudiante, periodo, reserva.getArrSitioPeriodo().getSitNombre());\r\n\t\t\tnombre = \"Contrato_\" + estudiante.getId().getPerDni() + \".zip\";\r\n\t\t\tthis.zip(estudiante.getId().getPerDni(), periodo.getPrdId());\r\n\t\t\tFunciones.descargarZip(url_contrato+ nombre);\r\n\t\t\t// MODIFICAR NOMBRE CONTRATO\r\n\t\t\tmngRes.agregarContratoReserva(estudiante, periodo.getPrdId());\r\n\t\t} catch (Exception e) {\r\n\t\t\tFunciones.descargarPdf(url_contrato + \"error.pdf\");\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\r\n\t}",
"public void creaAddebitiGiornalieri(AddebitoFissoPannello pannello,\n int codConto,\n Date dataInizio,\n Date dataFine) {\n /* variabili e costanti locali di lavoro */\n boolean continua = true;\n Modulo modAddFisso;\n ArrayList<CampoValore> campiFissi;\n Campo campoQuery;\n CampoValore campoVal;\n ArrayList<WrapListino> lista;\n ArrayList<AddebitoFissoPannello.Riga> righeDialogo = null;\n int quantita;\n\n try { // prova ad eseguire il codice\n\n modAddFisso = this.getModulo();\n campiFissi = new ArrayList<CampoValore>();\n\n /* recupera dal dialogo il valore obbligatorio del conto */\n if (continua) {\n campoQuery = modAddFisso.getCampo(Addebito.Cam.conto.get());\n campoVal = new CampoValore(campoQuery, codConto);\n campiFissi.add(campoVal);\n }// fine del blocco if\n\n /* recupera dal dialogo il pacchetto di righe selezionate */\n if (continua) {\n righeDialogo = pannello.getRigheSelezionate();\n }// fine del blocco if\n\n /* crea il pacchetto delle righe di addebito fisso da creare */\n if (continua) {\n\n /* traverso tutta la collezione delle righe selezionate nel pannello */\n for (AddebitoFissoPannello.Riga riga : righeDialogo) {\n lista = ListinoModulo.getPrezzi(riga.getCodListino(),\n dataInizio,\n dataFine,\n true,\n false);\n quantita = riga.getQuantita();\n for (WrapListino wrapper : lista) {\n this.creaAddebitoFisso(codConto, dataInizio, wrapper, quantita);\n }\n } // fine del ciclo for-each\n }// fine del blocco if\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"public void registraPoliticasCond (Long codPropuesta, ReformaTributariaInput reformaIn, Collection deudas, ReformaTributariaOutput reformaOut)throws Exception{\n \t\n Connection conn = null;\n CallableStatement call = null;\n try{ \n conn = this.getConnection();\n //codPropuesta=null;//prueba que pasa\n //reformaIn=null;\n \t int canal=0;\n \t int tipoConvenio=0;\n \t int garantia=0;\n\t\t \tIterator itera = deudas.iterator();\n\t\t \t//System.out.println(\"<-------------------------------------Ingreso a registrar opciones--------------------------------------->\");\n\t\t while(itera.hasNext()) {\n\t\t \t\n\t\t \tDeudaWeb elemento = (DeudaWeb) itera.next();\n\t\t \t\n\t\t \t/*System.out.println(\"codPropuesta--->\"+codPropuesta);\n\t\t \tSystem.out.println(\"getIsIntranet--->\"+reformaIn.getIsIntranet());\n\t\t \tSystem.out.println(\"getPagoTotalConvenio--->\"+reformaIn.getPagoTotalConvenio());\n\t\t \tSystem.out.println(\"getComportamientoConvenio--->\"+reformaIn.getComportamientoConvenio());\n\t\t \tSystem.out.println(\"getRutContribuyente--->\"+reformaIn.getRutContribuyente());\n\t\t \tSystem.out.println(\"getTieneGarantia--->\"+reformaIn.getTieneGarantia());\n\t\t \tSystem.out.println(\"getTipoContribuyente--->\"+elemento.getTipoContribuyente());\n\t\t \tSystem.out.println(\"getTipoFormulario--->\"+elemento.getTipoFormulario());\n\t\t \tSystem.out.println(\"getRutRol--->\"+elemento.getRutRol());\n\t\t \tSystem.out.println(\"getFolio--->\"+elemento.getFolio());\n\t\t \tSystem.out.println(\"getFechaVencimiento--->\"+elemento.getFechaVencimiento());\n\t\t \tSystem.out.println(\"getFechaAntiguedad--->\"+elemento.getFechaAntiguedad());\n\t\t \tSystem.out.println(\"getPorcentajeCondonacionMultas--->\"+elemento.getPorcentajeCondonacionMultas());\n\t\t \tSystem.out.println(\"getPorcentajeCondonacionIntereses--->\"+elemento.getPorcentajeCondonacionIntereses());\n\t\t \tSystem.out.println(\"getBeneficioPp--->\"+reformaOut.getBeneficioPp());\n\t\t \tSystem.out.println(\"getMinCuotaContado--->\"+reformaOut.getMinCuotaContado());\n\t\t \tSystem.out.println(\"getMaxCuota--->\"+reformaOut.getMaxCuota());*/\n\t\t \t\n\t\t \tcall = conn.prepareCall(\"{call PKG_REFORMA_TRIBUTARIA.INSERTA_CONDICION_CNV(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t \t\n\t\t \t\n\t\t \t\n\t\t \t//obtengo canal\n\t\t \tif (reformaIn.getIsIntranet().booleanValue()){\n\t\t \t\tcanal=1;//presencial\n\t\t \t}else {\n\t\t \t\tcanal=2;//internet\n\t\t \t}\n\t\t \t\n\t\t \t//obtengo tipo convenio\n\t\t \tif (reformaIn.getPagoTotalConvenio().booleanValue()){\n\t\t \t\ttipoConvenio=1;//total\n\t\t \t}else{\n\t\t \t\ttipoConvenio=2;//parcial\n\t\t \t}\n\t\t \t\n\t\t \t//obtengo garantia\n\t\t \tif (reformaIn.getTieneGarantia().booleanValue()){\n\t\t \t\tgarantia=1;//con garatia\n\t\t \t}else{\n\t\t \t\tgarantia=2;//sin garantia\n\t\t \t}\n\t\t \t\n\t\t \t\n\t\t \tcall.setLong(1, codPropuesta.longValue());\n\t\t \tcall.setLong(2, canal);//canal;\n\t\t \tcall.setLong(3, tipoConvenio);//Tipo convenio Pago total-pago parcial\n\t\t \tcall.setLong(4, reformaIn.getComportamientoConvenio().longValue());//comportamiento Bueno=1 / Regular=2 / Malo=3\n\t\t \tcall.setLong(5, reformaIn.getRutContribuyente().longValue());//rut evaluado;\n\t\t \tcall.setLong(6, garantia);//embargo / o garantia\n\t\t \tcall.setLong(7, elemento.getTipoContribuyente());//cliente_tipo;\n\t\t \tcall.setLong(8, elemento.getTipoFormulario());//tipo_forulario;\n\t\t \tcall.setLong(9, elemento.getRutRol());//rut_rol;\n\t\t \tcall.setLong(10, elemento.getFolio());//form_folio;\n\t\t \tcall.setDate(11,elemento.getFechaVencimiento());//fecha_vcto;\n\t\t \tcall.setDate(12,elemento.getFechaAntiguedad());//fecha_antiguedad;\n\t\t \tcall.setLong(13, elemento.getPorcentajeCondonacionMultas());//porcentaje condonacion multas\n\t\t \tcall.setLong(14, elemento.getPorcentajeCondonacionIntereses());//porcentaje condonacion intereses\n\t\t \tcall.setLong(15, reformaOut.getBeneficioPp().longValue());//beneficio pronto pago o incentivo al pago;\n\t\t \tcall.setLong(16, reformaOut.getMinCuotaContado().longValue());//porcentaje minimo cuota contado\n\t\t \tcall.setLong(17, reformaOut.getMaxCuota().longValue());//porcentaje maximo cuotas\n\t\t \tcall.setNull(18, OracleTypes.VARCHAR);//error\n\t\t \t\n\t\t \tcall.execute();\n\t\t \t\n\t }\n\t\t \n\t\t call.close(); \n }catch (Exception e) {\n e.printStackTrace();\n }finally{\n this.closeConnection();\n }\t\t \n \t\n }",
"private void cargarFichaLepra_discapacidades() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\t\tparameters.put(\"fecha_actual\", new Date());\r\n\r\n\t\t// log.info(\"parameters\" + parameters);\r\n\t\tseguimiento_control_pqtService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean fecha_tratamiento = seguimiento_control_pqtService\r\n\t\t\t\t.existe_fecha_fin_tratamiento(parameters);\r\n\t\t// log.info(\"fecha_tratamiento>>>>\" + fecha_tratamiento);\r\n\r\n\t\tif (fecha_tratamiento) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}",
"private void creaModuloMem() {\n /* variabili e costanti locali di lavoro */\n ArrayList<Campo> campi = new ArrayList<Campo>();\n ModuloRisultati modulo;\n Campo campo;\n\n try { // prova ad eseguire il codice\n\n campo = CampoFactory.intero(Campi.Ris.codicePiatto.getNome());\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.nomePiatto.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"piatto\");\n campo.setToolTipLista(\"nome del piatto\");\n campo.decora()\n .etichetta(\"nome del piatto\"); // le etichette servono per il dialogo ricerca\n campo.setLarghezza(250);\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.categoria.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"categoria\");\n campo.setToolTipLista(\"categoria del piatto\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteVolte.getNome());\n campo.setVisibileVistaDefault();\n campo.setLarghezza(80);\n campo.setTitoloColonna(\"quante volte\");\n campo.setToolTipLista(\n \"quante volte questo piatto è stato offerto nel periodo analizzato\");\n campo.decora().etichetta(\"quante volte\");\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quantiCoperti.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"coperti\");\n campo.setToolTipLista(\"numero di coperti che avrebbero potuto ordinare\");\n campo.decora().etichetta(\"n. coperti\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteComande.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"comande\");\n campo.setToolTipLista(\"numero di comande effettive\");\n campo.decora().etichetta(\"n. comande\");\n campo.setLarghezza(80);\n campo.setTotalizzabile(true);\n campi.add(campo);\n\n campo = CampoFactory.percentuale(Campi.Ris.gradimento.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"gradimento\");\n campo.setToolTipLista(\n \"percentuale di gradimento (è il 100% se tutti i coperti potenziali lo hanno ordinato)\");\n campo.decora().etichetta(\"% gradimento\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n modulo = new ModuloRisultati(campi);\n setModuloRisultati(modulo);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }",
"ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);",
"@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n Connection connection = null;\r\n\r\n try{\r\n // establezco la connecion con la base de datos jdbc en el puerto 3306 con usuario y contrasenia root\r\n connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/jdbc\",\"root\",\"root\");\r\n // pongo auto commit en false esto hace que no se comite cada cueri y que se cada vez que lance\r\n // el comando commit se ejecuta el bloque query\r\n connection.setAutoCommit(false);\r\n\r\n // hago la sentencia preparada\r\n PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO estudiante (dni, nombre, apellido) VALUES (?, ?, ?);\");\r\n // modifico los \"?\" de la sentencia preparada con mis datos\r\n preparedStatement.setInt(1,40640217);\r\n preparedStatement.setString(2,\"Santiago\");\r\n preparedStatement.setString(3,\"Lampropulos\");\r\n\r\n // ejecuto la consulta preparada\r\n preparedStatement.executeUpdate();\r\n\r\n //traigo los datos de la tabla estudiante\r\n ResultSet resultSet = preparedStatement.executeQuery(\"SELECT * FROM estudiante\");\r\n\r\n // realizo el commit para que se guarden los cambios\r\n connection.commit();\r\n\r\n //muestro toda la tabla\r\n while(resultSet.next()){\r\n System.out.println(resultSet.getString(2)+\"\\t\"+resultSet.getString(\"nombre\")+\"\\t\"+resultSet.getString(\"apellido\"));\r\n }\r\n\r\n }catch (SQLException exceptionConnection){\r\n System.out.println(exceptionConnection);\r\n try{\r\n // si se creo la base de datos revierte el commit que se hizo\r\n if(connection!=null){\r\n connection.rollback();\r\n }\r\n }catch (SQLException exceptionCarth){\r\n //atrapo excepciones\r\n System.out.println(exceptionCarth);\r\n }\r\n\r\n\r\n }finally {\r\n // el bloque finally se ejecute sin inportar si viene de un catch o del try\r\n try{\r\n //si se crea una coneccion con base de datos la cierro\r\n if(connection!= null){\r\n connection.close();\r\n }\r\n }catch (SQLException eFinally){\r\n //atrapo excepciones\r\n System.out.println(eFinally);\r\n }\r\n }\r\n\r\n }",
"public void crearDepartamento(String nombredep, String num, int nvJefe, int horIn, int minIn, int horCi, int minCi) {\r\n\t\t// TODO Auto-generated method stub by carlos Sánchez\r\n\t\t//Agustin deberia devolverme algo q me indique si hay un fallo alcrearlo cual es\r\n\t\t//hazlo como mas facil te sea.Yo no se cuantos distintos puede haber.\r\n\t\r\n\t//para añadir el Dpto en la BBDD no se necesita el Nombre del Jefe\r\n\t//pero si su numero de vendedor (por eso lo he puesto como int) que forma parte de la PK \r\n\t\t\r\n\t\tint n= Integer.parseInt(num);\r\n\t\tString horaapertura=aplicacion.utilidades.Util.horaminutosAString(horIn, minIn);\r\n\t\tString horacierre=aplicacion.utilidades.Util.horaminutosAString(horCi, minCi);\r\n\t\tTime thI= Time.valueOf(horaapertura);\r\n\t\tTime thC=Time.valueOf(horacierre);\r\n\t\tthis.controlador.insertDepartamentoPruebas(nombredep, nvJefe,thI,thC); //tabla DEPARTAMENTO\r\n\t\tthis.controlador.insertNumerosDepartamento(n, nombredep); //tabla NumerosDEPARTAMENTOs\r\n\t\tthis.controlador.insertDepartamentoUsuario(nvJefe, nombredep); //tabla DepartamentoUsuario\r\n\r\n\t\t//insertamos en la cache\r\n\t\t//Departamento d=new Departamento(nombredep,Integer.parseInt(num),getEmpleado(nvJefe),null,null);\r\n\t\t//departamentosJefe.add(d);\r\n\t\t/*ArrayList<Object> aux=new ArrayList<Object>();\r\n\t\taux.add(nombredep);\r\n\t\taux.add(n);\r\n\t\taux.add(nvJefe);\r\n\t\tinsertCache(aux,\"crearDepartamento\");*///no quitar el parseInt\r\n\t}",
"public creacionempresa() {\n initComponents();\n mostrardatos();\n }",
"private void atualizaHistoricoPendenteRecarga(Date datExecucao) throws SQLException\n\t{\n\t\tCalendar calExecucao = Calendar.getInstance();\n\t\tcalExecucao.setTime(datExecucao);\n\t\tint diaExecucao = calExecucao.get(Calendar.DAY_OF_MONTH);\n\t\tConnection connClientes = null;\n//\t\tPreparedStatement prepClientes = null;\n\t\tPreparedStatement prepInsert = null;\n//\t\tResultSet resultClientes = null;\n\t\t\n\t\t//Parametros para consulta no banco de dados de assinantes pendentes de primeira recarga \n\t\tString datEntradaPromocao = null;\n\t\t\n\t\tswitch(diaExecucao)\n\t\t{\n\t\t\tcase 11:\n\t\t\t\tdatEntradaPromocao = \"DAT_ENTRADA_PROMOCAO >= TO_DATE('01/01/2005', 'DD/MM/YYYY') AND \" +\n\t\t\t\t\t\t\t\t\t \"DAT_ENTRADA_PROMOCAO < TO_DATE('09/02/2005', 'DD/MM/YYYY') \";\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\tdatEntradaPromocao = \"DAT_ENTRADA_PROMOCAO >= TO_DATE('09/02/2005', 'DD/MM/YYYY') AND \" +\n\t\t\t\t \t\t\t\t\t \"DAT_ENTRADA_PROMOCAO < TO_DATE('01/04/2005', 'DD/MM/YYYY') \";\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\tdatEntradaPromocao = \"DAT_ENTRADA_PROMOCAO >= TO_DATE('01/04/2005', 'DD/MM/YYYY') AND \" +\n\t\t\t\t \t\t\t\t\t \"DAT_ENTRADA_PROMOCAO < TO_DATE('01/07/2005', 'DD/MM/YYYY') \";\n\t\t\t\tbreak;\n\t\t\t//Caso contrario, nao faz nada e termina a execucao\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\t//Inserindo registros no historico\n\t\t\tString sqlInsert = \"INSERT INTO TBL_GER_HISTORICO_PULA_PULA \" +\n\t\t \t \t\t\t\t \"(IDT_MSISDN, IDT_PROMOCAO, DAT_EXECUCAO, DES_STATUS_EXECUCAO, \" +\n\t\t\t\t\t\t\t \" IDT_CODIGO_RETORNO, VLR_CREDITO_BONUS) \" +\n\t\t\t\t\t\t\t \"SELECT IDT_MSISDN, IDT_PROMOCAO, ?, 'SUCESSO', ?, 0 \" +\n\t\t\t\t\t\t\t \"FROM TBL_GER_PROMOCAO_ASSINANTE \" +\n\t\t\t\t\t\t\t \"WHERE IDT_PROMOCAO = \" + String.valueOf(ID_PENDENTE_RECARGA) + \n\t\t\t\t\t\t\t \" AND \" + datEntradaPromocao;\n\t\t\t\n\t\t\tconnClientes = DriverManager.getConnection(\"jdbc:oracle:oci8:@\" + sid, usuario,senha);\n\t\t\tprepInsert = connClientes.prepareStatement(sqlInsert);\n\t\t\tprepInsert.setDate (1, new java.sql.Date(datExecucao.getTime()));\n\t\t\tprepInsert.setString(2, (new DecimalFormat(\"0000\")).format(RET_PULA_PULA_PENDENTE_RECARGA));\n\t\t\tprepInsert.executeUpdate();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tif(prepInsert != null) prepInsert.close();\n\t\t\tif(connClientes != null) connClientes.close();\n\t\t}\n\t}",
"@_esCocinero\n public Result crearPaso() {\n Form<Paso> frm = frmFactory.form(Paso.class).bindFromRequest();\n\n // Comprobación de errores\n if (frm.hasErrors()) {\n return status(409, frm.errorsAsJson());\n }\n\n Paso nuevoPaso = frm.get();\n\n // Comprobar autor\n String key = request().getQueryString(\"apikey\");\n if (!SeguridadFunctions.esAutorReceta(nuevoPaso.p_receta.getId(), key))\n return Results.badRequest();\n\n // Checkeamos y guardamos\n if (nuevoPaso.checkAndCreate()) {\n Cachefunctions.vaciarCacheListas(\"pasos\", Paso.numPasos(), cache);\n Cachefunctions.vaciarCacheListas(\"recetas\", Receta.numRecetas(), cache);\n return Results.created();\n } else {\n return Results.badRequest();\n }\n\n }",
"@IgnoreMethodAuthentication\r\n\tpublic void execute() {\n\t\ttry {\r\n\t\t\tString licencaFull = SystemManager.getProperty(\"licenca.sistema\");\r\n\t\t\tlicencaFull = Criptografia.newInstance(SystemManager.getProperty(Constants.Parameters.Licenca.LICENCA_KEY)).decripto(licencaFull);\r\n\t\t\tif (licencaFull != null && licencaFull.equals(\"ENTERPRISE EDITION\")) {\r\n\t\t\t\twrite(\"ok\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tParametroLojaDAO paramDao = new ParametroLojaDAO();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString licenca = paramDao.getStringParametro(Constants.Parameters.Licenca.LICENCA_SISTEMA, empresasessao.getCodigoEmpresa(), lojasessao.getCodigoLoja());\r\n\t\t\t//SystemManager.LICENCA_SISTEMA = licenca;\r\n\t\t\t\r\n\t\t\tString dataSistemaStr = paramDao.getStringParametro(Constants.Parameters.Licenca.DATA_SISTEMA, empresasessao.getCodigoEmpresa(), lojasessao.getCodigoLoja());\r\n\t\t\t\r\n\t\t\tString dados = null;\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tdados = Criptografia.newInstance(SystemManager.getProperty(Constants.Parameters.Licenca.LICENCA_KEY)).decripto(licenca);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (dados == null || dados.trim().equals(\"\")) {\r\n\t\t\t\twriteErrorMessage(\"Sistema não licenciado!\", \"N\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Busca data do sistema \r\n\t\t\ttry {\r\n\t\t\t\tdataSistemaStr = Criptografia.newInstance(SystemManager.getProperty(Constants.Parameters.Licenca.LICENCA_KEY)).decripto(dataSistemaStr);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tdataSistemaStr = \"01/01/1900\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\t\tCalendar dataAtual = Calendar.getInstance();\r\n\t\t\t\r\n\t\t\t// Checa se houve modificacao na data do sistema\r\n\t\t\tif (dataSistemaStr != null) {\r\n\t\t\t\tCalendar dataSistema = Calendar.getInstance();\r\n\t\t\t\tdataSistema.setTime(sdf.parse(dataSistemaStr));\r\n\t\t\t\tif (dataSistema.after(dataAtual)) {\r\n\t\t\t\t\twriteErrorMessage(\"Data do sistema alterada!\", \"N\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (validarDados(dados)) {\r\n\t\t\t\twrite(\"ok\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void gerarparcelascontrato(int id, int idcliente, int idgrupofinanceiro) {\n\t\tContrato contrato = repo.findById(id).get();\n\t\t// contrato.setCliente(clientes);\n\t\t// contrato.setFinanceiroContrato(financeiroContrato);\n\t\trepo.save(contrato);\n\t\tMovimentoContrato movement = movimentoContratoRepository.findByContratoIdAndStatus(id,\n\t\t\t\tStatusActiv.ABERTO.getDescricao());\n\t\tif (movement == null) {\n\t\t\tmovement = new MovimentoContrato();\n\t\t\tmovement.setDataMovimento(new Date());\n\t\t\tmovement.setStatus(StatusActiv.ABERTO.getDescricao());\n\t\t\tmovement.setTipomovimento(TipoMovimentoEnum.entradaContrato.getDescricao());\n\t\t}\n\t\tmovement.setValor(contrato.getTotal());\n\t\tmovement.setContrato(contrato);\n\t\tmovement.setHistorico(contrato.getFinanceiroContrato());\n\t\tmovement.setParcela(contrato.getPeriodo());\n\n\t\tmovement.setName(\"Contrato Nº \" + String.valueOf(id) + \" Cliente: \" + contrato.getClientename());\n\t\tmovement = movimentoContratoRepository.save(movement);\n\n\t\tfichaLeituraRepository\n\t\t\t\t.deleteAll(fichaLeituraRepository.findByContratoIdAndStatus(id, StatusActiv.ABERTO.getDescricao()));\n\t\texcluirParcelas(movement);\n\t\tmovement.setValor(contrato.getTotal());\n\t\tDateTime dt;\n\t\tDateTime dt12;\n\n\t\t//if (movement.getFaturasQuit().size() > 0) {\n\n\t\t\t//dt = new DateTime(movement.getFaturasQuit().get(0).getDataVencimento());\n\t\t\tdt = new DateTime();\n\t\t\tint ano = dt.getYear();\n\t\t\tint mes = dt.getMonthOfYear();\n\t\t\tdt = new DateTime(ano, mes, contrato.getDiaVencimento(), 8, 0); \n\t\t\tdt12 = new DateTime(ano, mes, contrato.getDiaLeitura(), 8, 0); \n\n\t\t/*} \n\t\telse {\n\t\t\tdt = new DateTime();\n\t\t\tint ano = dt.getYear();\n\t\t\tint mes = dt.getMonthOfYear();\n\t\t\tdt12 = new DateTime(ano, mes, contrato.getDiaLeitura(), 8, 0);\n\t\t}*/\n\t\t/*DateTime dt1 = new DateTime(new Date());\n\t\tfor (Fatura itemmovimento : movement.getFaturasQuit()) {\n\t\t\tdt1 = new DateTime(itemmovimento.getDataVencimento());\n\t\t\tif (dt1.isAfter(dt)) {\n\t\t\t\tdt = dt1;\n\t\t\t}\n\t\t\tif (dt1.isAfter(dt12)) {\n\t\t\t\tdt12 = dt1;\n\t\t\t}\n\n\t\t}\n\t\tdt1 = dt12;*/\n\t\tDateTime plusPeriod = new DateTime();\n\t\tDateTime plusPeriodleitura = new DateTime();\n\t\tFatura itemmovimento;\n\t\tint j = movement.getParcela() - movement.getFaturasQuit().size();\n\t\tList<Integer> indiceparcalas = new LinkedList<Integer>();\n\t\tindiceparcalas = maxparcela(movement, j);\n\t\tdouble valr1 = contrato.getTotal();// getValorAberto() / j;\n\n\t\tList<FichaLeitura> fichas = new ArrayList<>();\n\t\tfor (int i = 0; i < j; i++) {\n\t\t\titemmovimento = new Fatura(movement, (movement.getValor() - movement.getValorAberto()));\n\t\t\tplusPeriod = dt.plus(org.joda.time.Period.months(i));\n\t\t\tplusPeriodleitura = dt12.plus(org.joda.time.Period.months(i));\n\t\t\tint dayOfWeekEndDateNumber = Integer.valueOf(plusPeriod.dayOfWeek().getAsString());\n\t\t\tint DaysToAdd;\n\t\t\t// se final de semana\n\t\t\tif (dayOfWeekEndDateNumber == 6 || dayOfWeekEndDateNumber == 7) {\n\t\t\t\tDaysToAdd = 8 - dayOfWeekEndDateNumber;\n\t\t\t\tplusPeriod = plusPeriod.plusDays(DaysToAdd);\n\t\t\t\tdayOfWeekEndDateNumber = Integer.valueOf(plusPeriod.dayOfWeek().getAsString());\n\t\t\t}\n\n\t\t\tdayOfWeekEndDateNumber = Integer.valueOf(plusPeriodleitura.dayOfWeek().getAsString());\n\n\t\t\t// se final de semana\n\t\t\tif (dayOfWeekEndDateNumber == 6 || dayOfWeekEndDateNumber == 7) {\n\t\t\t\tDaysToAdd = 8 - dayOfWeekEndDateNumber;\n\t\t\t\tplusPeriodleitura = plusPeriodleitura.plusDays(DaysToAdd);\n\t\t\t\tdayOfWeekEndDateNumber = Integer.valueOf(plusPeriod.dayOfWeek().getAsString());\n\t\t\t}\n\n\t\t\titemmovimento.setParcela(indiceparcalas.get(i));\n\t\t\titemmovimento.setValor(contrato.getTotal());\n\t\t\titemmovimento.setDataVencimento(plusPeriod.toDate());\n\t\t\titemmovimento.setDataleitura(plusPeriodleitura.toDate());\n\t\t\titemmovimento.setInstantCreation(new Date());\n\t\t\titemmovimento.setStatus(StatusActiv.ABERTO.getDescricao());\n\t\t\titemmovimento.setMovimentoFinanceiro(movement);\n\t\t\titemmovimento.setContrato(contrato);\n\t\t\titemmovimento.setDataMovimento(movement.getDataMovimento());\n\t\t\titemmovimento.setTipomovimento(TipoMovimentoEnum.entradaContrato.getDescricao());\n\n\t\t\t/*\n\t\t\t * FichaLeitura fichaLeitura = new FichaLeitura(contrato, equipamentoContrato,\n\t\t\t * itemmovimento.getDataleitura(), StatusActiv.ABERTO.getDescricao());\n\t\t\t */\n\n\t\t\tCentroCusto centroCusto = centroCustoRepository.findById(movement.getHistorico().getCentrocusto().getId())\n\t\t\t\t\t.get();\n\t\t\tcentroCusto.setSaldoReceber(centroCusto.getSaldoReceber() + (contrato.getTotal()));\n\n\t\t\tcentroCustoRepository.save(centroCusto);\n\t\t\titemmovimento = faturaRepository.save(itemmovimento);\n\t\t\tfor (EquipamentosContrato equipamentoContrato : contrato.getEquipamentosContratos()) {\n\t\t\t\tfichas.add(new FichaLeitura(contrato, equipamentoContrato, itemmovimento.getDataleitura(),\n\t\t\t\t\t\tStatusActiv.ABERTO.getDescricao(), itemmovimento));\n\t\t\t}\n\n\t\t}\n\t\tfichaLeituraRepository.saveAll(fichas);\n\n\t}",
"public ReformaTributariaOutput getComporConv(boolean comportamiento, ReformaTributariaInput reformaTributaria)throws Exception {\n Connection conn = null;\n CallableStatement call = null;\n int inComportamiento=0; \n int inTipoConvenio=0;\n int inEmbargo=0;\n int inPyme=0;\n String ContextoAmbienteParam = null;\n ReformaTributariaOutput reformaTributariaOut = new ReformaTributariaOutput();\n try {\n\n conn = this.getConnection();\n String beneficio = this.getBeneficio();\n \n System.out.println(\"Estoy adentro con parametro beneficio---------------------->\"+beneficio);\n \n if (beneficio.equalsIgnoreCase(\"S\")){\n\t if (reformaTributaria.getContextoAmbienteParam().endsWith(\"CNV_INTRA\")){\n\t \t ContextoAmbienteParam=\"CNV_INTRA\";\n\t }else{\n\t \t ContextoAmbienteParam=\"CNV_BENEFICIO_INTER\";\n\t }\n }else{\n \t ContextoAmbienteParam=reformaTributaria.getContextoAmbienteParam(); \n }\n //Deudas que forman parte de la propuesta, pero no son propias del contribuyente\n /*\n --------------------------------------------------------------\n ------- Las variables determinantes --------------------\n ------- para condiciones de convenios --------------------\n --------------------------------------------------------------\n ------- v_tipo_valor\n ------- v_tipo_convenio\n ------- v_comportamiento\n ------- v_embargo\n ------- v_canal\n --------------------------------------------------------------\n -------------------------------------------------------------- \n */\n if (comportamiento){\n \t inComportamiento=1;\n }else{\n \t inComportamiento=2;\n }\n \n //String parametros=reformaTributaria.pagoTotalConvenio()+\";\"+reformaTributaria.comportamiento()+\";\"+reformaTributaria.garantia()+\";\"+reformaTributaria.canal();\n String parametros=reformaTributaria.pagoTotalConvenio()+\";\"+reformaTributaria.comportamiento()+\";\"+reformaTributaria.garantia();\n \n //System.out.println(\"tipo reforma condonacion--->\"+reformaTributaria.getCodConvenios());\n //System.out.println(\"***************************estoy en comportamiento****************************************\");\n //System.out.println(\"reformaTributaria.garantia()--->\"+reformaTributaria.garantia());\n //System.out.println(\"param getComporConv---> \"+parametros);\n //call = conn.prepareCall(\"{call PKG_REFORMA_TRIBUTARIA.consulta_tabla_valores_conv(?,?,?,?,?,?)}\");\n call = conn.prepareCall(\"{call PKG_REFORMA_TRIBUTARIA.consulta_tabla_valores_conv(?,?,?,?,?,?,?,?)}\");\n call.setLong(1,inComportamiento);/*tipo comporamiento � condonaci�n */\n call.setString(2,parametros);/*tipo convenio */\n call.registerOutParameter(3, OracleTypes.INTEGER);/*max_cuotas*/\n call.registerOutParameter(4, OracleTypes.INTEGER);/*min_pie*/\n call.registerOutParameter(5, OracleTypes.INTEGER);/*por_condonacion*/ \n call.registerOutParameter(6, OracleTypes.INTEGER);/*error*/ \n /*se agrega nueva forma de servicio*/\n if (reformaTributaria.getCodConvenios()!=null){//si no es nulo quiere decir que es transitoria\n \t call.setLong(7,reformaTributaria.getCodConvenios().intValue());/*codigo condonacion si es transitoria*/\n }else{//si es null quiere decir que es convenio permanente\n \t call.setNull(7, OracleTypes.INTEGER);\n }\n //call.setString(8,reformaTributaria.getContextoAmbienteParam());/*ambiente Intranet � internet*/ \n System.out.println(\"ContextoAmbienteParam---> \"+ContextoAmbienteParam);\n call.setString(8,ContextoAmbienteParam);/*ambiente Intranet � internet*/\n call.execute();\n \n int maxCuotas = Integer.parseInt(call.getObject(3).toString());\n int minCuotaContado = Integer.parseInt(call.getObject(4).toString());\n \n\n int codError = Integer.parseInt(call.getObject(6).toString());\n \n reformaTributariaOut.setCodError(new Integer(codError));\n reformaTributariaOut.setMaxCuota(new Integer(maxCuotas));\n reformaTributariaOut.setMinCuotaContado(new Integer(minCuotaContado));\n call.close(); \n \n }catch (Exception e) {\n \te.printStackTrace();\n \t//throw new RemoteException(\"No tiene valor de comportamiento convenios:\" + e.getMessage());\n }\n finally{\n this.closeConnection();\n }\n\t\treturn reformaTributariaOut;\n }",
"public void createEmp(Empresa p) throws ClassNotFoundException {\r\n\r\n java.sql.Connection con = ConnectionFactory.getConnection();\r\n PreparedStatement stmt = null;\r\n\r\n try {\r\n stmt = con.prepareStatement(\"INSERT INTO tbempresas(codEmp,nomeEmp)\" + \"VALUES(?,?)\");\r\n stmt.setInt(1, p.getCodEmp());\r\n stmt.setString(2, p.getNomeEmp());\r\n\r\n stmt.executeUpdate();\r\n\r\n JOptionPane.showMessageDialog(null, \"salvo com sucesso\");\r\n } catch (SQLException ex) {\r\n System.out.println(ex);\r\n } finally {\r\n ConnectionFactory.closeConnection((com.mysql.jdbc.Connection) con, stmt);\r\n }\r\n }",
"public boolean insertarCreacionHistorialCliente(Cliente cliente) {\n String queryDividido1 = \"INSERT INTO Historial_Cliente(Usuario_Codigo, Nombre, DPI, Direccion, Sexo, Password, Nacimiento, DPI_Escaneado, Tipo, Fecha_Cambio) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?,?,?,?)\";\n java.sql.Date fechaCreacion = new java.sql.Date(Calendar.getInstance().getTime().getTime());\n\n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos de Creacion de un Nuevo Cliente a la Tabla Historial_Cliente\n enviarDividido1.setInt(1, cliente.getCodigo());\n enviarDividido1.setString(2, cliente.getNombre());\n enviarDividido1.setString(3, cliente.getDPI());\n enviarDividido1.setString(4, cliente.getDireccion());\n enviarDividido1.setString(5, cliente.getSexo());\n enviarDividido1.setString(6, cliente.getPassword());\n enviarDividido1.setString(7, cliente.getNacimiento());\n enviarDividido1.setBlob(8, cliente.getDPIEscaneado());\n enviarDividido1.setString(9, \"Creacion\");\n enviarDividido1.setString(10, fechaCreacion.toString());\n enviarDividido1.executeUpdate();\n\n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }",
"@Override\n public void crearReloj() {\n Manecilla seg;\n seg = new Manecilla(40,60,0,1,null);\n cronometro = new Reloj(seg);\n }",
"public void testCrearDispositivo() {\n\t\tString referencia = \"A0021R\";\n\t\tString nombre = \"Motorola G primera generacion\";\n\t\tString descripcion = \"1 GB de RAM\";\n\t\tint tipo = 1;\n\t\tString foto = \"url\";\n\t\tString emailAdministrador = \"[email protected]\";\n\t\ttry {\n\t\t\tdispositivoBL.crearDispositivo(referencia, nombre, descripcion, tipo, foto, emailAdministrador);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void main(String[] args) throws Exception {\n datosPronostico=null; \r\n _reloj= new Reloj(); \r\n setRouteCalculatorPronostico(new RouteCalculatorPronostico());\r\n getRouteCalculatorPronostico().inicializaValores();\r\n ManejaDatos m= new ManejaDatos(); \r\n _reloj.detenerReloj();\r\n DiaPronostico.setNumTurnos(3);\r\n _reloj.setReloj(0, 0, 17, 5, 2012);\r\n int diaInicio=369;\r\n //_reloj.getFechaActual().add(Calendar.DAY_OF_YEAR, diaInicio);\r\n getRouteCalculatorPronostico().setReloj(_reloj);\r\n insertaPronostico();\r\n getRouteCalculatorPronostico().setIdPronostico(idPronostico);\r\n try{\r\n \r\n datosPronostico= m.sacaDatosPronostico(\"dat\", datosPronostico,_reloj,servletContext);\r\n procesaDatos();\r\n \r\n GeneraArchivosPronostico generador= new GeneraArchivosPronostico();\r\n /*ArrayList<OrdenEntrega> ordenes; \r\n _reloj.getFechaActual().add(Calendar.DAY_OF_YEAR, 372);\r\n for(int i=1;i<28;i++){\r\n _reloj.getFechaActual().add(Calendar.DAY_OF_YEAR, 1);\r\n ordenes=generador.nuevoGeneraArchivo(372,_reloj, new Mapa(150,100));\r\n }*/\r\n \r\n /*\r\n System.out.println(ordenes.size());*/\r\n /*\r\n Mapa mapa = new Mapa(150, 100);\r\n generador.nuevoGeneraArchivo(diaInicio, _reloj, mapa);*/\r\n GestorVehiculos gestorV= new GestorVehiculos(_reloj); \r\n \r\n getRouteCalculatorPronostico().setGestorVehiculos(gestorV);\r\n _reloj.getFechaActual().add(Calendar.DAY_OF_YEAR, diaInicio);\r\n getRouteCalculatorPronostico().calculaPronostico(diaInicio);\r\n \r\n getRouteCalculatorPronostico().correrDibujaPronostico();\r\n \r\n setRouteCalculatorPronostico(null);\r\n }catch(Exception e){\r\n \r\n throw e;\r\n \r\n }\r\n \r\n }",
"public Maestro()\r\n\t{\r\n\t\tint i;\r\n\t\tint hora = 0;\r\n\t\tint minutos = 0;\r\n\t\tint segundos = 0;\r\n\t\tint milisegundos = 0;\r\n\t\tthis.reloj = new Reloj(\"Reloj Servidor\",hora,minutos,segundos,milisegundos);\r\n\t\tthis.reloj.start();\r\n\r\n\t\tthis.s_BD = new Sincronizador_BD(this.Conect);\r\n\t\tthis.s_BD.start();\r\n\t}",
"@Test\r\n public void testCrear() throws Exception {\r\n System.out.println(\"crear\");\r\n String pcodigo = \"bravos\";\r\n String pnombre = \"Arreglar bumper\";\r\n String tipo = \"Enderazado\";\r\n Date pfechaAsignacion = new Date(Calendar.getInstance().getTimeInMillis());\r\n String pplacaVehiculo = \"TX-101\";\r\n MultiReparacion instance = new MultiReparacion();\r\n Reparacion expResult = new Reparacion(pcodigo, pnombre,tipo,pfechaAsignacion,pplacaVehiculo);\r\n Reparacion result = instance.crear(pcodigo, pnombre, tipo, pfechaAsignacion, pplacaVehiculo);\r\n \r\n assertEquals(expResult.getCodigo(), result.getCodigo());\r\n assertEquals(expResult.getNombre(), result.getNombre());\r\n assertEquals(expResult.getTipo(), result.getTipo());\r\n assertEquals(expResult.getPlacaVehiculo(), result.getPlacaVehiculo());\r\n assertEquals(expResult.getFechaAsignacion(), result.getFechaAsignacion());\r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype.\");\r\n }",
"public boolean insertarNuevoClienteCA(Cliente cliente, List<Cuenta> listaCuentas) {\n String queryDividido1 = \"INSERT INTO Usuario(Codigo, Nombre, DPI, Direccion, Sexo, Password, Tipo_Usuario) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?)\";\n\n String queryDividido2 = \"INSERT INTO Cliente(Usuario_Codigo, Nombre, Nacimiento, DPI_Escaneado, Estado) \"\n + \"VALUES(?,?,?,?,?)\";\n \n String queryDividido3 = \"INSERT INTO Cuenta(No_Cuenta, Fecha_Creacion, Saldo_Cuenta, Cliente_Usuario_Codigo) \"\n + \"VALUES(?,?,?,?)\";\n int codigoCliente = cliente.getCodigo();\n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos Principales del cliente a la Tabla Usuario\n enviarDividido1.setInt(1, cliente.getCodigo());\n enviarDividido1.setString(2, cliente.getNombre());\n enviarDividido1.setString(3, cliente.getDPI());\n enviarDividido1.setString(4, cliente.getDireccion());\n enviarDividido1.setString(5, cliente.getSexo());\n enviarDividido1.setString(6, cliente.getPassword());\n enviarDividido1.setInt(7, 3);\n enviarDividido1.executeUpdate();\n\n //Envia los Datos Complementarios del Usuario a la tabla cliente\n PreparedStatement enviarDividido2 = Conexion.conexion.prepareStatement(queryDividido2);\n enviarDividido2.setInt(1, cliente.getCodigo());\n enviarDividido2.setString(2, cliente.getNombre());\n enviarDividido2.setString(3, cliente.getNacimiento());\n enviarDividido2.setBlob(4, cliente.getDPIEscaneado());\n enviarDividido2.setBoolean(5, cliente.isEstado());\n enviarDividido2.executeUpdate();\n \n //Envia los Datos de la Cuenta Adjudicada al Cliente\n PreparedStatement enviarDividido3 = Conexion.conexion.prepareStatement(queryDividido3);\n\n //Envio de los Datos Principales de una Cuenta a la Tabla Cuenta, perteneciente a un cliente en Especifico\n //Considerando que el cliente puede tener mas de una cuenta\n for (Cuenta cuenta : listaCuentas) {\n \n enviarDividido3.setInt(1, cuenta.getNoCuenta());\n enviarDividido3.setString(2, cuenta.getFechaCreacion());\n enviarDividido3.setDouble(3, cuenta.getSaldo());\n enviarDividido3.setInt(4, codigoCliente);\n enviarDividido3.executeUpdate();\n }\n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }",
"public boolean crearRegistro(int codigoCiclo, int codigoPlan, int codigoObjetivo, String descripcion, String justificacion, double valorMeta, double valorMinimo, double valorMaximo, String tipoMedicion, String estado, String fuenteDato, String aplicaEn, String unidadMedida, String tipoGrafica, String mes01, String mes02, String mes03, String mes04, String mes05, String mes06, String mes07, String mes08, String mes09, String mes10, String mes11, String mes12, Collection arrResponsables, Collection arrRecursos, String usuarioInsercion) {\n/* 664 */ int elSiguiente = siguienteRegistro(codigoCiclo, codigoPlan);\n/* 665 */ if (elSiguiente == 0) {\n/* 666 */ return false;\n/* */ }\n/* */ \n/* */ try {\n/* 670 */ String s = \"insert into cal_plan_metas (codigo_ciclo,codigo_plan,codigo_meta,codigo_objetivo,descripcion,justificacion,valor_meta,valor_minimo,valor_maximo,tipo_medicion,estado,fuente_dato,aplica_en,unidad_medida,tipo_grafica,mes01,mes02,mes03,mes04,mes05,mes06,mes07,mes08,mes09,mes10,mes11,mes12,fecha_insercion,usuario_insercion) values (\" + codigoCiclo + \",\" + \"\" + codigoPlan + \",\" + \"\" + elSiguiente + \",\" + \"\" + codigoObjetivo + \",\" + \"'\" + descripcion + \"',\" + \"'\" + justificacion + \"',\" + \"\" + valorMeta + \",\" + \"\" + valorMinimo + \",\" + \"\" + valorMaximo + \",\" + \"'\" + tipoMedicion + \"',\" + \"'\" + estado + \"',\" + \"'\" + fuenteDato + \"',\" + \"'\" + aplicaEn + \"',\" + \"'\" + unidadMedida + \"',\" + \"'\" + tipoGrafica + \"',\" + \"'\" + mes01 + \"',\" + \"'\" + mes02 + \"',\" + \"'\" + mes03 + \"',\" + \"'\" + mes04 + \"',\" + \"'\" + mes05 + \"',\" + \"'\" + mes06 + \"',\" + \"'\" + mes07 + \"',\" + \"'\" + mes08 + \"',\" + \"'\" + mes09 + \"',\" + \"'\" + mes10 + \"',\" + \"'\" + mes11 + \"',\" + \"'\" + mes12 + \"',\" + \"\" + Utilidades.getFechaBD() + \",\" + \"'\" + usuarioInsercion + \"'\" + \")\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 731 */ boolean rta = this.dat.executeUpdate(s);\n/* */ \n/* */ \n/* 734 */ if (rta) {\n/* */ \n/* 736 */ s = \"delete from cal_plan_recursos_meta where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + elSiguiente;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 742 */ this.dat.executeUpdate(s);\n/* 743 */ Iterator iterator = arrRecursos.iterator();\n/* 744 */ while (iterator.hasNext()) {\n/* 745 */ Integer codigo = (Integer)iterator.next();\n/* 746 */ crearRecurso(codigoCiclo, codigoPlan, elSiguiente, codigo.intValue(), \"A\", usuarioInsercion);\n/* */ } \n/* 748 */ s = \"delete from cal_plan_responsables_meta where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + elSiguiente + this.dat.executeUpdate(s);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 756 */ Iterator iterator2 = arrResponsables.iterator();\n/* 757 */ while (iterator2.hasNext()) {\n/* 758 */ Integer codigo = (Integer)iterator2.next();\n/* 759 */ crearResponsable(codigoCiclo, codigoPlan, elSiguiente, codigo.intValue(), \"A\", usuarioInsercion);\n/* */ } \n/* */ } \n/* */ \n/* 763 */ return rta;\n/* */ }\n/* 765 */ catch (Exception e) {\n/* 766 */ e.printStackTrace();\n/* 767 */ Utilidades.writeError(\"%CalMetasDAO:crearRegistro \", e);\n/* */ \n/* 769 */ return false;\n/* */ } \n/* */ }",
"public void crearActividad (Actividad a) {\r\n String query = \"INSERT INTO actividad (identificacion_navegate, numero_matricula, fecha, hora, destino, eliminar) VALUES (\\\"\" \r\n + a.getIdentificacionNavegante()+ \"\\\", \" \r\n + a.getNumeroMatricula() + \", \\\"\" \r\n + a.getFecha() + \"\\\", \\\"\" \r\n + a.getHora() + \"\\\", \\\"\" \r\n + a.getDestino()+ \"\\\" ,false)\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad creada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"private void cargarFichaLepra_control() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\r\n\t\tficha_inicio_lepraService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean ficha_inicio = ficha_inicio_lepraService\r\n\t\t\t\t.existe_paciente_lepra(parameters);\r\n\t\t// log.info(\"ficha_inicio>>>>\" + ficha_inicio);\r\n\r\n\t\tif (ficha_inicio) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}",
"public void execute() throws Exception {\n\n\t\tString datepattern = \"yyyy-MM-dd\";\n\t\tSimpleDateFormat sdf =new SimpleDateFormat(datepattern);\n\t\t//testing console\n\t\t if(TestHTTP.test(Parameters.LATC_CONSOLE_HOST))\n\t \tlogfile.info(Parameters.LATC_CONSOLE_HOST+\" OK\");\n\t else \n\t {\n\t \tlogfile.severe(Parameters.LATC_CONSOLE_HOST+\" DOWN\");\n\t \tSystem.exit(0);\n\t \t}\n \t\t\n\t\tListTranslator lt = new ListTranslator();\n ContentWriter cw = new ContentWriter();\n \n ConsoleConnection client = new ConsoleConnection(Parameters.LATC_CONSOLE_HOST);\n \n /*\n * Getting list of link configuration from LATC_CONSOLE\n * JSON Format : title, identifier\n */\n \n if(!client.getTasks())\n {\n \tlogfile.severe(\"Error during get Queue \"+client.getMessage());\n \tSystem.exit(0);\n }\n lt.translateMember(client.getMessage());\n toDoList = lt.getLinkingConfigs();\n \n ReportCSV report = new ReportCSV( Parameters.RESULT_LOCAL_DIR+\"/report\"+sdf.format(new Date())+\".csv\");\n \n for (String title : toDoList.keySet()) {\n \t boolean blacklist = false;\n \tfinal String [] split = toDoList.get(title).split(\"#\");\n \tfinal String id = split[0];\n \tfinal String speccretime = split[1];\n \tfinal String specmodtime = split[2];\n \tfinal String specAuthor = split[3];\n \n \t logfile.info( \"start processing id \"+id+\" title \"+title);\n \n // checking blacklist\n \t if(title.startsWith(\"**\"))\n {\n \tblacklist = true;\n \ttitle = title.substring(2);\n }\n \t\n \tReportCSV.status st = status.failed; \n //create id directory\n boolean exists = (new File(RESULTDIR +'/'+ title).exists());\n if (!exists)\n \t\t\t (new File(RESULTDIR +'/'+ title )).mkdirs();\n \n \n \n \t\n \n /*\n * Writing specification linking from LATC_CONSOLE_HOST/configuration/ID/specification\n */\n if(!client.getSpec(id))\n {\n \tlogfile.severe(\"Error during get Specification id \"+id+\" \"+client.getMessage());\n }\n else\n {\n \t\n \t\tDate startDate = new Date();\n \t\tdatepattern = \"yyyy-MM-dd'T'HH:mm:ssZZ\";\n \t\tsdf.applyPattern(datepattern);\n \tString specContent = client.getMessage();\n\t cw.writeIt(RESULTDIR +'/'+ title + '/'+ Parameters.SPEC_FILE, specContent);\n\t VoidInfoDto Void=this.parseSpec(RESULTDIR +'/'+ title + '/'+ Parameters.SPEC_FILE);\n \n\t Void.setSpecRetrievedTime(sdf.format(startDate));\n\t Void.setSpecCreatedTime(speccretime);\n\t Void.setSpecAuthor(specAuthor);\n\t Void.setID(id);\n\t Void.setTitle(title);\n\t Void.setSpecModifiedTime(specmodtime);\n\t Void.setSilkSpecAPIResource(Parameters.LATC_CONSOLE_HOST+\"/api/task/\"+id+\"/configuration\");\n\t \n//\t \t6- data dump\n\t datepattern = \"yyyy-MM-dd\";\n\t \t\tsdf.applyPattern(datepattern);\n Void.setDataDump(Parameters.RESULTS_HOST + '/' +sdf.format(new Date())+'/'+title + \"/\"+Parameters.LINKS_FILE_STORE);\n Void.setSpec(Parameters.RESULTS_HOST + '/' +sdf.format(new Date())+'/'+title + \"/\"+Parameters.SPEC_FILE);\n \n // blacklist\n if(blacklist)\n {\n \tst = status.ongoing;\n \tVoid.setRemarks(\"Unpredicted\");\n \tclient.postReport(id, Void,Parameters.API_KEY);\n \treport.putData(id, title, Void.getSpec(), 0, st, Void.getRemarks(),Void.getStatItem(),specAuthor);\n \tcontinue;\n }\n \n\t \t//testing endpoint\n\t if(Void.getSourceSparqlEndpoint()!=null && !this.testConn(Void.getSourceSparqlEndpoint()))\n\t \t{\n\t \t\tDate errDate = new Date();\n\t \t\tVoid.setRemarks(Void.getSourceSparqlEndpoint()+\" DOWN\");\n\t \t\tclient.postReport(id, Void,Parameters.API_KEY);\n\t \t\t report.putData(id, title, Void.getSpec(), errDate.getTime()-startDate.getTime(), st, Void.getRemarks(),Void.getStatItem(),specAuthor);\n\t \t\tcontinue;\n\t \t}\n\t if(Void.getTargetSparqlEndpoint()!=null && !this.testConn(Void.getTargetSparqlEndpoint()))\n\t \t{\n\t \t\tDate errDate = new Date();\t\n\t \t\tVoid.setRemarks(Void.getTargetSparqlEndpoint()+\" DOWN\");\n\t \t\tclient.postReport(id, Void,Parameters.API_KEY);\n\t \t\t report.putData(id, title, Void.getSpec(), errDate.getTime()-startDate.getTime(), st, Void.getRemarks(),Void.getStatItem(),specAuthor);\n\t \t\tcontinue;\n\t \t}\n\t if(Void.getSourceUriLookupEndpoint()!=null && !this.testConn(Void.getSourceUriLookupEndpoint()))\n\t \t{\n\t \tDate errDate = new Date();\t\n\t \tVoid.setRemarks(Void.getSourceUriLookupEndpoint()+\" DOWN\");\n\t \t\tclient.postReport(id, Void,Parameters.API_KEY);\n\t \t\t report.putData(id, title, Void.getSpec(), errDate.getTime()-startDate.getTime(), st, Void.getRemarks(),Void.getStatItem(),specAuthor);\n\t \t\tcontinue;\n\t \t}\n\t if(Void.getTargetUriLookupEndpoint()!=null && !this.testConn(Void.getTargetUriLookupEndpoint()))\n\t \t{\n\t \tDate errDate = new Date();\n\t \t\tVoid.setRemarks(Void.getTargetUriLookupEndpoint()+\" DOWN\");\n\t \t\tclient.postReport(id, Void, Parameters.API_KEY);\n\t \t\t report.putData(id, title, Void.getSpec(), errDate.getTime()-startDate.getTime(), st, Void.getRemarks(),Void.getStatItem(),specAuthor);\n\t \t\tcontinue;\n\t \t}\n \n\t \n\t \n\t /*\n\t * Running hadoop for silk Map reduce\n\t */\n\t if (this.runHadoop(title, Void,RESULTDIR)) {\n\t \n\t\n\t cw.writeIt(RESULTDIR +'/'+ title + '/'+ Parameters.VOID_FILE, Void);\n\t\n\t // 2-e\n\t Void.setRemarks(Void.getStatItem()+\" Links generated successfully\");\n\t logfile.info( \"Processing id \"+id+\" title \"+title+ \" success\");\n\t\n\t } // if hadoop\n\t else {\n\t \tlogfile.severe( \"Processing id \"+id+\" title \"+title+ \" failed\");\n \t \n\t }\n\t Date endDate = new Date();\n\t \n\t if(Void.getStatItem()>=0)\n\t \tst = status.sucesss;\n\t else if(Void.getStatItem()==-2)\n\t \tst= status.ongoing;\n\t \n\t report.putData(id, title, Void.getSpec(), endDate.getTime()-startDate.getTime(), st, Void.getRemarks(),Void.getStatItem(),specAuthor);\n\t client.postReport(id, Void,Parameters.API_KEY);\n\t }\n } // for loop\n report.close(); \n logfile.info(\"Runtime done\");\n \n }",
"public boolean iniciarParte(){\n Conexion.conectar();\n \n String sql = \"insert into partes (fecha, trabajadores_id) values (?,?)\";\n \n try {\n PreparedStatement smt = Conexion.getConexion().prepareStatement(sql);\n \n smt.setString(1, fecha);\n smt.setBigDecimal(2, idTrabajador);\n \n smt.executeUpdate();\n smt.close();\n Conexion.desconectar();\n return true;\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"No se puede efectuar la conexión, hable con el administrador del sistema\" + ex.getMessage());\n }\n \n return false;\n }",
"public void registrarPagoFacturaCredito(){\n if(facturaCredito != null){\n try{\n //NUEVA TRANSACCION\n Transaccion transac = new Transaccion();\n transac.setFechaTransac(new funciones().getTime());\n transac.setHoraTransac(new funciones().getTime());\n transac.setResponsableTransac(new JsfUtil().getEmpleado());\n transac.setTipoTransac(4); //REGISTRO DE PAGO\n transac.setIdtransac(ejbFacadeTransac.getNextIdTransac());\n ejbFacadeTransac.create(transac);\n //REGISTRAR PAGO\n PagoCompra pagoCompra = new PagoCompra();\n pagoCompra.setFacturaIngreso(facturaCredito);\n pagoCompra.setIdtransac(transac);\n pagoCompra.setInteresPagoCompra(new BigDecimal(intereses));\n pagoCompra.setMoraPagoCompra(new BigDecimal(mora));\n pagoCompra.setAbonoPagoCompra(new BigDecimal(pago));\n BigDecimal total = pagoCompra.getAbonoPagoCompra().add(pagoCompra.getInteresPagoCompra()).add(pagoCompra.getMoraPagoCompra());\n pagoCompra.setTotalPagoCompra(new BigDecimal(new funciones().redondearMas(total.floatValue(), 2)));\n pagoCompra.setIdpagoCompra(ejbFacadePagoCompra.getNextIdPagoCompra());\n ejbFacadePagoCompra.create(pagoCompra); // Registrar Pago en la BD\n //Actualizar Factura\n facturaCredito.getPagoCompraCollection().add(pagoCompra); //Actualizar Contexto\n BigDecimal saldo = facturaCredito.getSaldoCreditoCompra().subtract(pagoCompra.getAbonoPagoCompra());\n facturaCredito.setSaldoCreditoCompra(new BigDecimal(new funciones().redondearMas(saldo.floatValue(), 2)));\n if(facturaCredito.getSaldoCreditoCompra().compareTo(BigDecimal.ZERO)==0){\n facturaCredito.setEstadoCreditoCompra(\"CANCELADO\");\n facturaCredito.setFechaCancelado(transac.getFechaTransac());\n }\n facturaCredito.setUltimopagoCreditoCompra(transac.getFechaTransac());\n ejbFacadeFacturaIngreso.edit(facturaCredito);\n new funciones().setMsj(1, \"PAGO REGISTRADO CORRECTAMENTE\");\n if(facturaCredito.getEstadoCreditoCompra().equals(\"CANCELADO\")){\n RequestContext context = RequestContext.getCurrentInstance(); \n context.execute(\"alert('FACTURA CANCELADA POR COMPLETO');\");\n }\n prepararPago();\n }catch(Exception e){\n new funciones().setMsj(3, \"ERROR AL REGISTRAR PAGO\");\n }\n }\n }",
"private PreparedStatement prepareClientesRebarba(Connection conn, String data, String promocao) \n\t\tthrows ParseException, SQLException\n\t{\n\t\tPreparedStatement result = null;\t\t\n\t\tSimpleDateFormat conversorData = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\tDate dataExecucao = conversorData.parse(data);\t\t\n\t\t\n\t\t//Parametro 1: Promocao (Parametro do metodo)\n\t\t//Parametro 2: Ano e mes da execucao\n\t\tSimpleDateFormat conversorDatMes = new SimpleDateFormat(\"yyMM\");\n\t\tString datMes = conversorDatMes.format(mesAnterior(dataExecucao));\n\t\t//Parametros 3, 5 e 7: Primeiro dia do mes da execucao\n\t\tDate dataInicioMesExecucao = getPrimeiroDiaMes(dataExecucao);\n\t\t//Parametro 4: Tipo de transacao da promocao PulaPula\n\t\tString tipoTransacao = TIPO_TRANSACAO_PULA_PULA;\n\t\t//Parametro 5: Primeiro dia do mes posterior ao da execucao\n\t\tDate dataInicioProxMes = getPrimeiroDiaMes(proximoMes(dataExecucao));\n\t\t//Parametro 8: Ultimo dia do mes da execucao\n\t\tDate dataFimMesExecucao = getUltimoDiaMes(dataExecucao);\n\n\t\tString sqlClientes = getQuerySelecaoClientesRebarba();\n\t\tresult = conn.prepareStatement(sqlClientes);\t\t\n\t\tresult.setString(1, promocao);\n\t\tresult.setString(2, datMes);\n\t\tresult.setDate (3, new java.sql.Date(dataInicioMesExecucao.getTime()));\n\t\tresult.setString(4, tipoTransacao);\n\t\tresult.setDate (5, new java.sql.Date(dataInicioMesExecucao.getTime()));\n\t\tresult.setDate (6, new java.sql.Date(dataInicioProxMes.getTime()));\n\t\tresult.setDate (7, new java.sql.Date(dataInicioMesExecucao.getTime()));\n\t\tresult.setDate (8, new java.sql.Date(dataFimMesExecucao.getTime()));\n\t\t\n\t\treturn result;\n\t}",
"public void run() {\r\n\t\t\tthis.setName(\"Vista.CacheUploaderDaemon\");\r\n\t\t\tint frac = 0;\r\n\t\t\tint prog = 0; // Progreso de la cola\r\n\t\t\twhile (alive) {\r\n\t\t\t\tif (!colaEscritura.isEmpty()) {\r\n\t\t\t\t\tfrac = 100/colaEscritura.size();\r\n\t\t\t\t\tprog = 0;\r\n\t\t\t\t}\r\n\t\t\t\twhile (!colaEscritura.isEmpty()) {\r\n\t\t\t\t\tsetProgreso(\"Actualizando base de datos\", prog);\r\n\t\t\t\t\tprog+=frac;\r\n\t\t\t\t\tElementoCache e = colaEscritura.poll();\r\n\t\t\t\t\tif (e.i==INSERTAR) {\r\n\t\t\t\t\t\tif (e.tipo.equals(\"Empleado\" ))\t\tinsertEmpleadoBD((Empleado) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Cuadrante\"))\t\tcontrolador.insertCuadrante((Cuadrante) e.o.get(0)); \t\t\t\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"TurnoContrato\"))\tcontrolador.insertTurnoPorContrato((Integer)e.o.get(0), (Integer)e.o.get(1));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Sugerencia\"))\t\tcontrolador.insertSugerencia((Sugerencia)e.o.get(0));\r\n//\t\t\t\t\t\telse if (e.tipo.equals(\"Contrato\"))\t\t\tcontrolador.insertContrato((Contrato) e.o.get(0));\r\n\t\t\t\t\t\t/*else if (e.tipo.equals(\"Departamento\"))\t\tcontrolador.insertDepartamento((Departamento)e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"CrearDepartamento\")){ \tcontrolador.insertDepartamentoUsuario((Integer)e.o.get(2),e.o.get(0).toString()); //tabla DepartamentoUsuario\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.insertNumerosDepartamento((Integer)e.o.get(1),e.o.get(0).toString()); //tabla NumerosDEPARTAMENTOs\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.insertDepartamentoPruebas(e.o.get(0).toString(),(Integer)e.o.get(2)); //tabla DEPARTAMENTO\r\n\t\t\t\t\t\t}*/\r\n\t\t\t\t\t\t//TODO quitar esto\r\n\t\t\t\t\t\telse System.err.println(\"Error en cache - Insertar \"+e.tipo+\" no existe\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (e.i==ELIMINAR) {\r\n\t\t\t\t\t\tif (e.tipo.equals(\"Contrato\"))\t\t\tcontrolador.eliminaContrato((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Turno\"))\t\t\tcontrolador.eliminaTurno((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"ContratoConTurnos\"))\tcontrolador.eliminaContratoConTurnos((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Empleado\"))\t\t\tcontrolador.eliminaEmpleado((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"eliminaMesTrabaja\")) {\r\n\t\t\t\t\t\t\tArrayList<Object> ar = (ArrayList<Object>)e.o.get(0);\r\n\t\t\t\t\t\t\tcontrolador.eliminaMesTrabaja((Integer)ar.get(0),(Integer)ar.get(1),(Integer)ar.get(2),ar.get(3).toString());\r\n\t\t\t\t\t\t}else if (e.tipo.equals(\"eliminaTurnoDeContrato\")){\r\n\t\t\t\t\t\t\tArrayList<Object> aux = (ArrayList<Object>)e.o.get(0);\r\n\t\t\t\t\t\t\tcontrolador.eliminaTurnoDeContrato((Integer)aux.get(0),(Integer)aux.get(1));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//TODO quitar esto\r\n\t\t\t\t\t\telse System.err.println(\"Error en cache - Eliminar \"+e.tipo+\" no existe\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(e.i==MODIFICAR) {\r\n\t\t\t\t\t\tif (e.tipo.equals(\"Contrato\"))\t\t\tcontrolador.modificarContrato(((Contrato)e.o.get(0)).getNumeroContrato(), ((Contrato)e.o.get(0)).getTurnoInicial(), ((Contrato)e.o.get(0)).getNombreContrato(), ((Contrato)e.o.get(0)).getPatron() , ((Contrato)e.o.get(0)).getDuracionCiclo(), ((Contrato)e.o.get(0)).getSalario(), ((Contrato)e.o.get(0)).getTipoContrato());\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Turno\"))\t\t\tcontrolador.modificarTurno(((Turno)e.o.get(0)).getIdTurno(), ((Turno)e.o.get(0)).getDescripcion(), ((Turno)e.o.get(0)).getHoraEntrada(), ((Turno)e.o.get(0)).getHoraSalida(), ((Turno)e.o.get(0)).getHoraDescanso(), ((Turno)e.o.get(0)).getTDescanso(),((Turno)e.o.get(0)).getColor());\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Empleado\"))\t\t\tcontrolador.cambiarEmpleado(((Empleado)e.o.get(0)).getEmplId(), ((Empleado)e.o.get(0)).getNombre(), ((Empleado)e.o.get(0)).getApellido1(), ((Empleado)e.o.get(0)).getApellido2(), ((Empleado)e.o.get(0)).getFechaNac(), ((Empleado)e.o.get(0)).getSexo(), ((Empleado)e.o.get(0)).getEmail(), ((Empleado)e.o.get(0)).getPassword(), ((Empleado)e.o.get(0)).getGrupo(), ((Empleado)e.o.get(0)).getFcontrato(), ((Empleado)e.o.get(0)).getFAlta(), ((Empleado)e.o.get(0)).getFelicidad(), ((Empleado)e.o.get(0)).getIdioma(), ((Empleado)e.o.get(0)).getRango(), ((Empleado)e.o.get(0)).getTurnoFavorito(), ((Empleado)e.o.get(0)).getColor(),((Empleado)e.o.get(0)).getContratoId(), ((Empleado)e.o.get(0)).getPosicion());\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Mensaje\"))\t\t\tcontrolador.marcarMensaje((Mensaje)e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"MensajeLeido\"))\t\tcontrolador.setLeido((Mensaje)e.o.get(0));\r\n\t\t\t\t\t\t//else if (e.tipo.equals(\"JefeDepartamento\"))\tcontrolador.modificaDpto(((Departamento)e.o.get(0)).getNombreDepartamento(), ((Departamento)e.o.get(0)).getJefeDepartamento().getEmplId()); \r\n\t\t\t\t\t\telse if (e.tipo.equals(\"NombreDepartamento\")){controlador.cambiaNombreDpto(((ArrayList<String>)e.o.get(0)).get(0),((ArrayList<String>)e.o.get(0)).get(1));}//nombre antiguo,nombre nuevo\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.cambiaNombreDepartamentoUsuario(e.o.get(0).toString(),e.o.get(1).toString());\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.cambiaNombreNumerosDEPARTAMENTOs(e.o.get(0).toString(),e.o.get(1).toString());\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Trabaja\"))\t\t\tcontrolador.modificaTrabaja(((Trabaja)e.o.get(0)).getIdEmpl(), ((Trabaja)e.o.get(0)).getIdTurno(), (String)e.o.get(1));\r\n\t\t\t\t\t\t//TODO quitar esto\r\n\t\t\t\t\t\telse System.err.println(\"Error en cache - Modificar \"+e.tipo+\" no existe\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsetProgreso(\"Actualizando base de datos\", 100);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsleep(1000);\r\n\t\t\t\t} catch (Exception e) {};\r\n\t\t\t}\r\n\t\t}",
"private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }",
"public static void registrarOrden(java.sql.Connection conexion, ArrayList<String> datos, String orden){\n try { \n crearDeclaracionPreparada(conexion, datos, orden).executeUpdate(); //Ejecutamos la orden de tipo Query creada a partir de la orden y datos dados\n if(conexion.isClosed() == false)//si la conexion está abierta la cerramos\n conexion.close();\n } catch (SQLException ex) {\n System.out.println(\"\\n\\n\\n\"+ex); //Imprimimos el error en consola en caso de fallar \n } \n }",
"Operacion createOperacion();",
"protected String cargarEnfermedadCronica(String url, String username,\n String password) throws Exception {\n try {\n if(mEnfermedades.size()>0){\n // La URL de la solicitud POST\n final String urlRequest = url + \"/movil/enfermedadescro\";\n EnfermedadCronica[] envio = mEnfermedades.toArray(new EnfermedadCronica[mEnfermedades.size()]);\n HttpHeaders requestHeaders = new HttpHeaders();\n HttpAuthentication authHeader = new HttpBasicAuthentication(username, password);\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n requestHeaders.setAuthorization(authHeader);\n HttpEntity<EnfermedadCronica[]> requestEntity =\n new HttpEntity<EnfermedadCronica[]>(envio, requestHeaders);\n RestTemplate restTemplate = new RestTemplate();\n restTemplate.getMessageConverters().add(new StringHttpMessageConverter());\n restTemplate.getMessageConverters().add(new MappingJacksonHttpMessageConverter());\n // Hace la solicitud a la red, pone la vivienda y espera un mensaje de respuesta del servidor\n ResponseEntity<String> response = restTemplate.exchange(urlRequest, HttpMethod.POST, requestEntity,\n String.class);\n return response.getBody();\n }\n else{\n return \"Datos recibidos!\";\n }\n } catch (Exception e) {\n Log.e(TAG, e.getMessage(), e);\n return e.getMessage();\n }\n }",
"public void recargarDatos( ) {\n\t\tPAC_SHWEB_PROVEEDORES llamadaProv = null;\n\t\ttry {\n\t\t\tllamadaProv = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaCom = null;\n\n\t\ttry {\n\t\t\trespuestaCom = llamadaProv.ejecutaPAC_SHWEB_PROVEEDORES__F_COMUNICADOS_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t// Mostramos el estado del expediente\n\t\tPAC_SHWEB_PROVEEDORES llamada = null;\n\t\ttry {\n\t\t\tllamada = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuesta = null;\n\t\ttry {\n\t\t\trespuesta = llamada.ejecutaPAC_SHWEB_PROVEEDORES__F_ESTADO_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t\tMap<String, Object> retorno = new HashMap<String, Object>(respuesta);\n\n\t\t\tUI.getCurrent().getSession().setAttribute(\"estadoExpediente\",retorno.get(\"ESTADO\").toString());\n\t\t\t\n\t\t\tprovPantallaConsultaExpedienteInicial.setCaption(\"GESTIÓN DEL EXPEDIENTE Nº \" + UI.getCurrent().getSession().getAttribute(\"expediente\")\n\t\t\t\t\t+ \" ( \" + \n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\") + \" ) \");\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\t\n\t\t\n\t\t// Maestro comunicados\n\n\t\tWS_AMA llamadaAMA = null;\n\t\ttry {\n\t\t\tllamadaAMA = new WS_AMA(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaMaestro = null;\n\t\t\n\t\t//System.out.println(\"Llamammos maestro comunicados: \" + UI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1));;\n\t\ttry {\n\t\t\t// pPUSUARIO, pORIGEN, pTPCOMUNI, pTPUSUARIO, pESTADO)\n\t\t\t\n\t\t\trespuestaMaestro = llamadaAMA.ejecutaWS_AMA__MAESTRO_COMUNICADOS(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnull,\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\").toString()\n\t\t\t\t\t);\t\t\t\n\n\t\t\t\n\t\t\tMap<String, Object> retornoMaestro = new HashMap<String, Object>(respuestaMaestro);\n\t\t\tList<Map> valorMaestro = (List<Map>) retornoMaestro.get(\"COMUNICADOS\");\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",valorMaestro);\n\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",null);\n\t\t}\n\t\t\n\t\t// \t\n\t\t\n\t\t\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\t\t/*if ( !ValidarComunicado.EsValido(\"CA\") && !ValidarComunicado.EsValido(\"FT\") ) {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(true);\n\n\t\t\t\n\t\t\t\n\t\t}*/\n\t\t// Mostramos botonera de cerrar expediente\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\n\t}",
"private void ingresarReserva() throws Exception {\r\n\t\tif (mngRes.existeReservaPeriodo(getSitio().getId())) {\r\n\t\t\tif (mayorEdad) {\r\n\t\t\t\tmngRes.crearReserva(getEstudiante(), getSitio(), periodo.getPrdId(), null);\r\n\t\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\t} else {\r\n\t\t\t\tmngRes.crearReserva(getEstudiante(), getSitio(), periodo.getPrdId(),\r\n\t\t\t\t\t\tgetDniRepresentante() + \";\" + getNombreRepresentante());\r\n\t\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\t}\r\n\t\t\tMensaje.crearMensajeINFO(\"Reserva realizada correctamente, no olvide descargar su contrato.\");\r\n\t\t} else {\r\n\t\t\tMensaje.crearMensajeWARN(\"El sitio seleccionado ya esta copado, favor eliga otro.\");\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic Bloco0 criarBloco(MovimentoMensalIcmsIpi movimentoMensalIcmsIpi) {\n\t\tLOG.log(Level.INFO, \"Montando o BLOCO 0, com INICIO em: {0} e TERMINO: {1} \", movimentoMensalIcmsIpi.getDataInicio());\r\n\t\tBloco0 bloco0 = new Bloco0();\r\n\t\t\r\n\t\t/**\r\n\t\t * TODO (Para ver/pensar melhor)\r\n\t\t * Ver se eu tenho que fazer alguma validação aqui. Ex.: irá preecher registro X para aquele Mês?\r\n\t\t * Tentar capturar possiveis erros.: Ex o famosão -> @NullPointerException\r\n\t\t */\r\n\t\t\r\n\t\tbloco0.setReg0000(reg0000Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0001(reg0001Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0005(reg0005Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0100(reg0100Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0150(reg0150Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0190(reg0190Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0200(reg0200Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0400(reg0400Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0450(reg0450Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n//\t\tbloco0.setReg0460(reg0460Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n//\t\tbloco0.setReg0990(montarEncerramentoDoBloco0(bloco0));\r\n\t\t\r\n\t\tLOG.log(Level.INFO, \"Montagem do BLOCO 0, TEMINADA! {0} \" ,bloco0);\r\n\t\treturn bloco0;\r\n\t}",
"public void ejecutarCodigoSQLdatos(String nombrebuscado)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tFileReader codigoarchivo = new FileReader ( \"./images/BD/Codigo SQL crebas datos.sql\" );\r\n\t\t\tBufferedReader reader = new BufferedReader (codigoarchivo);\r\n\t\t\tString codigo = reader.readLine();\r\n\t\t\twhile(codigo!= null)\r\n\t\t\t{\r\n\t\t\t\tif(!codigo.equalsIgnoreCase(\"\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tConector conectord = new Conector(nombrebuscado);\r\n\t\t\t\t\tconectord.iniciarConexionBaseDatos();\r\n\t\t\t\t\tCrearBD.ejecutarCodigoSQL(codigo, conectord);\r\n\t\t\t\t\tconectord.terminarConexionBaseDatos();\r\n\t\t\t\t}\r\n\t\t\t\tcodigo = reader.readLine();\r\n\t\t\t}\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Se Instalo la Base de Datos Correctamente.\",\"Instalar Base de Datos\", JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tConector conectorg = new Conector(nombrebuscado);\r\n\t\t\t\tconectorg.iniciarConexionBaseDatos();\r\n\t\t\t\tCrearBD.ejecutarCodigoSQL(\"DROP DATABASE \"+nombrebuscado, conectorg);\r\n\t\t\t\tconectorg.terminarConexionBaseDatos();\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\"No se encontro el archivo Codigo SQL crebas datos.sql\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t}\r\n\t\t\tcatch (Exception ex)\r\n\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}\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public Integer guardarTramaProcesoCompraBD(Map<String, String> parametros, String codFormaPago) {\r\n try {\r\n log.debug(\"MC- ingreso a guardar Trama\");\r\n if (!DBPinpad.guardarTramaPinpadMC(parametros.get(\"response_code\"), parametros.get(\"amount\"),\r\n parametros.get(\"approval_code\"), parametros.get(\"message\"),\r\n nroTarjetaBruto, //parametros.get(\"card\"),\r\n parametros.get(\"card_id\"), parametros.get(\"month\"), parametros.get(\"amount_quota\"),\r\n parametros.get(\"credit_type\"), parametros.get(\"client_name\"), parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"), parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta, codFormaPago))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"private static void dbempresasNotExists(){\n new Thread(() -> {\n \n try {\n \n //Grt the connection params to dbempresas\n final ConfigFileModel ConfigFileModel = ConfigFileUtil.getSingleton().getConfigFileModel();\n \n //Create the jdbc datanase\n MysqlScriptsUtil.getInstance().creaDBJDBC(ConfigFileModel.getDb(), ConfigFileModel.getUser(), ConfigFileModel.getPassword(), ConfigFileModel.getInstance(), Integer.valueOf(ConfigFileModel.getPort()));\n \n //Create hibernate schemes and initial connection for dbempresas\n HibernateUtil.getSingleton().createDbEmpresas(); \n \n //Insert base catalogs in dbempresa\n MysqlScriptsUtil.getInstance().loadDBEmpresasCatalogFileIntoDatabase(ConfigFileModel.getDb(), ConfigFileModel.getUser(), ConfigFileModel.getPassword(), ConfigFileModel.getInstance(), Integer.valueOf(ConfigFileModel.getPort()));\n \n //Continue with the normal system flow\n veryLicense();\n \n } catch (Exception ex) {\n LoggerUtility.getSingleton().logError(Start.class, ex);\n\n try {\n //Rollback\n final HibernateConfigModel HibernateConfigModel_ = HibernateUtil.getSingleton().getHibernateConfigModelDbempresas();\n MysqlScriptsUtil.getInstance().rollbackDBEmpresas(HibernateConfigModel_.getUser(), HibernateConfigModel_.getPassword(), HibernateConfigModel_.getInstance(), HibernateConfigModel_.getPort());\n \n } catch (Exception ex1) {\n LoggerUtility.getSingleton().logError(Start.class, ex1);\n }\n \n ViewsFactory.getSingleton().getDialogJFrame(ex.getMessage()).setVisible();\n \n System.exit(-1);\n }\n \n }).start();\n }",
"public String save() {\r\n\t\ttry {\r\n\r\n\t\t\tif (obs != null && !obs.trim().isEmpty()) {\r\n\t\t\t\tconcurso.setObservacionReserva(obs);\r\n\t\t\t\tconcursoHome.setInstance(concurso);\r\n\t\t\t\tString res = concursoHome.update();\r\n\t\t\t}\r\n\r\n\t\t\tfor (PlantaCargoDetDTO dto : listaPlantaCargoDto) {\r\n\r\n\t\t\t\tif (dto.getReservar()) {\r\n\t\t\t\t\tEstadoDet est = buscarEstado(\"en reserva\");\r\n\t\t\t\t\tif (!existeEnDetalle(dto.getPlantaCargoDet(), est)) {\r\n\t\t\t\t\t\t// buscar\r\n\r\n\t\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\t\tp.setActivo(true);\r\n\t\t\t\t\t\tp.setFechaAlta(new Date());\r\n\t\t\t\t\t\tp.setUsuAlta(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\tp.setNroOrden(2);\r\n\t\t\t\t\t\tp.setPlantaCargoDet(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\t\tif (est != null)\r\n\t\t\t\t\t\t\tp.setEstadoDet(est);\r\n\t\t\t\t\t\tp.setConcurso(concursoHome.getInstance());\r\n\t\t\t\t\t\tem.persist(p);\r\n\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(est.getEstadoCab());\r\n\t\t\t\t\t\tplanta.setEstadoDet(est);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Incidencia 1079 */\r\n\t\t\t\trefreshListaPuestoReservados();\r\n\t\t\t\t/**/\r\n\t\t\t\tEstadoCab estadoCab = obtenerEstadosCabecera(\"VACANTE\");\r\n\t\t\t\tif (esta(dto.getPlantaCargoDet())) {\r\n\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\tp = recuperarConcurso(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\tif (!dto.getReservar()) {\r\n\t\t\t\t\t\tif (p.getConcursoPuestoAgr() != null) {\r\n\t\t\t\t\t\t\tstatusMessages.clear();\r\n\t\t\t\t\t\t\tstatusMessages.add(Severity.ERROR,\r\n\t\t\t\t\t\t\t\t\t\"El puesto pertenece a un grupo\");\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * p.setActivo(true); p.setNroOrden(1);\r\n\t\t\t\t\t\t * p.setFechaMod(new Date());\r\n\t\t\t\t\t\t * p.setUsuMod(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\t * EstadoDet est = buscarEstado(\"libre\");\r\n\t\t\t\t\t\t * p.setEstadoDet(est); em.merge(p);\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(estadoCab);\r\n\t\t\t\t\t\tplanta.setEstadoDet(null);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\t\t\t\t\t\tif (!concurso\r\n\t\t\t\t\t\t\t\t.getDatosEspecificosTipoConc()\r\n\t\t\t\t\t\t\t\t.getDescripcion()\r\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\r\n\t\t\t\t\t\t\t\t\t\tCONCURSO_INTERNO_INTERINSTITUCIONAL)\r\n\t\t\t\t\t\t\t\t&& planta.getPermanente())\r\n\t\t\t\t\t\t\treponerCategoriasController.reponerCategorias(p,\r\n\t\t\t\t\t\t\t\t\t\"PUESTO\", \"CONCURSO\");\r\n\t\t\t\t\t\tem.remove(p);\r\n\t\t\t\t\t\t// listaPlantaCargoDto.remove(dto);\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\tobs = null;\r\n\t\t\tem.flush();\r\n\t\t\tllenarListado1();\r\n\t\t\tstatusMessages.clear();\r\n\t\t\tstatusMessages.add(Severity.INFO, SeamResourceBundle.getBundle()\r\n\t\t\t\t\t.getString(\"GENERICO_MSG\"));\r\n\t\t\treturn \"persisted\";\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public void ejecutarMaquinaTuring() {\n\n\t\tString cadenaEntrada;\n\t\tArrayList<String> cadenaCinta = new ArrayList<>();\n\t\tsetEstadoActual(getEstadoInicial());\n\t\tSystem.out.println(\"Inserte la cadena a probar:\");\n\t\tScanner imputUsuario = new Scanner(System.in);\n\t\tcadenaEntrada = imputUsuario.nextLine();\n\t\tfor (int i = 0; i < cadenaEntrada.length(); i++) {\n\t\t\tcadenaCinta.add(String.valueOf(cadenaEntrada.charAt(i)));\n\t\t}\n\n\t\tcinta = new Cinta(cadenaCinta, new CabezaLE());// inicializamos la cinta\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// con la cadena del\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// usuario\n\t\t/*\n\t\t * Evaluamos\n\t\t */\n\t\tboolean noTransiciones = false;\n\n\t\twhile (noTransiciones == false) {// para cuando no hayan transiciones\n\n\t\t\tnoTransiciones = true;// suponemos, a priori, que no hay\n\t\t\t\t\t\t\t\t\t// transiciones\n\n\t\t\tfor (int j = 0; j < conjuntoTransiciones.size(); j++) {\n\n\t\t\t\tString estadoSiguiente = cinta.getCabezaLE().transitar(estadoActual, cinta.getCadenaCinta(),\n\t\t\t\t\t\tconjuntoTransiciones.get(j));\n\n\t\t\t\tif (estadoSiguiente != null) {// si encontro un estado al que\n\t\t\t\t\t\t\t\t\t\t\t\t// transitar...\n\n\t\t\t\t\testadoActual = estadoSiguiente; // transita\n\t\t\t\t\tnoTransiciones = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END FOR\n\t\t} // END WHILE (NO QUEDAN TRANSICIONES)\n\t\tgetCinta().mostrarCinta();\n\t\tcadenaEsAceptada();\n\t}",
"public FiltroRaEncerramentoComando() {\r\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\t\tString usuario = \"cleanGuy\";\r\n\t\tString bbdd = \"prueba\";\r\n\t\tString password = \"P@ssw0rd\"; \r\n\t\t\r\n\r\n\t\tc = new ConectorSQLBean(\"localhost\", \"3306\", bbdd, usuario, password);\r\n\t\tc.conectarBBDD();\r\n\r\n\t\tguRegis.sentencia(c, \"DELETE FROM empresa WHERE nombre = 'Mi casa'\", usuario, bbdd);\r\n\t\tguRegis.sentencia(c, \"DELETE FROM empleado WHERE nombre = 'Sergi'\", usuario, bbdd);\r\n\t\tguRegis.sentencia(c, \"DELETE FROM empresa WHERE nombre = 'Esteve Terrades'\", usuario, bbdd);\r\n\r\n\t\t\r\n\t\tc.desconectarBBDD();\r\n\r\n\t\t\r\n\t\t/*\r\n\t\t * ENTRAMOS CON EL SEGUNDO USUARIO: root\r\n\t\t * CON LA CONTRASENYA VACIA\r\n\t\t * EN LA MISMA BASE DE DATOS: prueba\r\n\t\t * CREAMOS CONEXION, HACEMOS CONSULTAS Y CERRAMOS CONEXION\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t\tusuario = \"root\";\r\n\t\tpassword = \"\";\r\n\t\tc = new ConectorSQLBean(\"localhost\", \"3306\", bbdd, usuario, password);\r\n\t\tc.conectarBBDD();\r\n\r\n\t\tguRegis.sentencia(c, \"CALL verEmpleadosNombre()\", usuario, bbdd);\r\n\t\tguRegis.sentencia(c, \"SELECT * FROM empleado WHERE nombre = 'David'\", usuario, bbdd);\r\n\t\tguRegis.sentencia(c, \"UPDATE empleado SET id_empresa = 2 WHERE id_empresa = 4\", usuario, bbdd);\r\n\t\tguRegis.sentencia(c, \"INSERT INTO empresa(nombre, direccion) VALUES('Mi casa', 'Calle Dr.vila')\",usuario, bbdd);\r\n\t\tguRegis.sentencia(c, \"INSERT INTO empleado(nombre, apellidos, telefono, id_empresa) VALUES('Sergi', 'Vaghi Garcia', 6785934, 8)\",usuario, bbdd);\r\n\t\t\r\n\t\tc.desconectarBBDD();\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * ENTRAMOS CON EL TERCER USUARIO: guts\r\n\t\t * CON LA CONTRASENYA VACIA\r\n\t\t * EN LA MISMA BASE DE DATOS: prueba\r\n\t\t * CREAMOS CONEXION, HACEMOS CONSULTAS, FALLAMOS CON ALGUNAS PARA COMPROBAR QUE LOS ERRORES ESTAN CONTEMPLADOS Y CERRAMOS CONEXION\r\n\t\t */\r\n\r\n\t\tusuario = \"guts\";\r\n\t\tpassword = \"\";\r\n\t\tc = new ConectorSQLBean(\"localhost\", \"3306\", bbdd, usuario, password);\r\n\t\tc.conectarBBDD();\r\n\r\n\t\tguRegis.sentencia(c, \"SELECT * FROM oficina WHERE id_empresa = 2\", usuario, bbdd);\r\n\t\tguRegis.sentencia(c, \"SELECT * FROM empleado WHERE id_empresa = 2\", usuario, bbdd);\r\n\t\tguRegis.sentencia(c, \"INSERT INTO empresa(nombre, direccion_empresarial) VALUES('Esteve Terrades', 'Calle de la sabiduria')\",usuario, bbdd);\r\n\t\tguRegis.sentencia(c, \"INSERT INTO empresa(nombre, direccion) VALUES('Esteve Terrades', 'Calle de la sabiduria')\",usuario, bbdd);\r\n\t\t\r\n\t\tc.desconectarBBDD();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * ENTRAMOS CON EL MISMO USUARIO: guts\r\n\t\t * CON LA CONTRASENYA VACIA\r\n\t\t * CAMBIAMOS LA BASE DE DATOS A: cartas\r\n\t\t * CREAMOS CONEXION, HACEMOS CONSULTAS Y CERRAMOS CONEXION\r\n\t\t */\r\n\r\n\t\tbbdd = \"cartas\";\r\n\t\tc = new ConectorSQLBean(\"localhost\", \"3306\", bbdd, usuario, password);\r\n\t\tc.conectarBBDD();\r\n\r\n\t\tguRegis.sentencia(c, \"INSERT INTO carta(nombre, valor, ataque, defensa) VALUES('Exodia', 5, 100, 50)\", usuario,bbdd);\r\n\t\tguRegis.sentencia(c, \"SELECT * FROM carta\", usuario, bbdd);\r\n\t\tguRegis.sentencia(c, \"DELETE FROM carta WHERE nombre = 'Exodia'\", usuario, bbdd);\r\n\r\n\r\n\t\tc.desconectarBBDD();\r\n\r\n\r\n\t\t/*\r\n\t\t * UNA VEZ HECHAS TODAS LAS PRUEBAS, COMPROBAREMOS EL SISTEMA DE PRINTADO DE REGISTROS MEDIANTE FILTROS\r\n\t\t * PARA EMPEZAR FILTRAREMOS POR BASE DE DATOS Y USUARIO\r\n\t\t * SEGUIDAMENTE FILTRAREMOS POR BASE DE DATOS Y TIPO DE CONSULTA\r\n\t\t * Y PARA FINALIZAR FILTRAREMOS POR LOS TRES CAMPOS POSIBLES, BASE DE DATOS USUARIO Y TIPO DE CONSULTA\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Busqueda de consultas realizadas en prueba por el usuario: \" + \"root\");\r\n\t\tguRegis.printRegis(\"prueba\", \"root\", \"\");\r\n\r\n\t\tSystem.out.println(\"Busqueda de consultas de tipo INSERT realizadas en prueba\");\r\n\t\tguRegis.printRegis(\"prueba\", \"\", \"INSERT\");\r\n\r\n\t\tSystem.out.println(\"Busqueda de consultas de tipo SELECT realizadas en \" + bbdd + \" por el usuario: \" + \"guts\");\r\n\t\tguRegis.printRegis(\"cartas\", \"guts\", \"SELECT\");\r\n\r\n\t\t\r\n\t\t\r\n\r\n\t\t//EL COMPONENTE TIENE UN METODO QUE DEVUELVE POR PANTALLA LA LISTA ENTERA DE REGISTROS DESDE QUE ARRANCA LA APLICACION\r\n\t\r\n//\t\tSystem.out.println(\"Lista entera de los registros\");\r\n//\t\tguRegis.printAllRegis();\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tPessoa PF1 = new PessoaFisica(1,\"Michel\",\"31/03/1988\",\"15785465-01\",\"145.217.365-54\");\n\t\tPF1.AdicionaContato(\"898\",\"222\");\n\t\tPF1.AdicionaEndereco(\"avenida das gar�as\", 1110, \"padre cicero\", \"petrolina\", \"PE\", \"56326000\");\n\t\t\n\t\t// criando cliente pessoa Juridica\n\t\tPessoa PJ1 = new PessoaJuridica(2,\"Tectronic\",\"TECLTDA\",\"10-1009290/0001\");\n\t\tPJ1.AdicionaContato(\"00000\",\"11111\");\n\t\tPJ1.AdicionaEndereco(\"avenida do bambu\", 878, \"jo�oo pio 10\", \"juazeiro\", \"BA\", \"56326000\");\n\t\t\n\t\t// criando objetos produtoodutos\n\t\t/*Produto produto1 = new Produto(10, \"impressora\",35,1,100);\n\t\tProduto produto2 = new Produto(11, \"MicroSystem\",550, 2,80);\n\t\tProduto produto3 = new Produto(12, \"Faqueiro Ipanema\",75, 3,70);\n\t\tProduto produto4 = new Produto(13, \"Mangueira de Jardim\",19, 4,80);\n\t\tProduto produto5 = new Produto(14, \"Mouse multilaser\",25,5,90);*/\n \n Facade fachada = new Facade();\n fachada.incializarProdutos();\n \n\n\t\t// algumas forma de pagamento\n\t\t/*FormaPagamento Pagamento1 = new CartaoCredito(1,\"visa\",\"credito\", 3, \"Mariano Ribeiro\", \"10/10/23\", \"54212345212\",\"132\");\n\t\tFormaPagamento Pagamento2 = new CartaoCredito(2,\"mastercard\",\"debito\", 1, \"Juliana Marinalva\", \"12/09/29\", \"232356789\",\"787\");\n\t\tFormaPagamento Pagamento3 = new Boleto(3,\"19/04/2017\",\"12345678912\",\"Sanatander\");\n\t\tFormaPagamento Pagamento4 = new Boleto(4,\"20/04/2017\",\"12232344423\",\"Banco do Brasil\");\t\t*/\n \n \n\t\t//------------------------------------------------------------------------------------------------------------------------\n\t\t// criando um pedido com cliente e numero de itemens\n\t\tPedido pedido1 = new Pedido(30,PF1,3);\n\t\t\t\t\n\t\t// adicionando produtos como itens da lista de pedido\n\t\t/*ItemPedido item1 = new ItemPedido(20,produto1,3);\n\t\tItemPedido item2 = new ItemPedido(21,produto2,9);\n\t\tItemPedido item3 = new ItemPedido(22,produto3,2);\n\t\tItemPedido item4 = new ItemPedido(23,produto4,4);\n\t\tItemPedido item5 = new ItemPedido(24,produto5,1);*/\n\t\t\n\t\t// adicionando itens a lista de pedido\n\t\t/*pedido1.AdicionandoItemLista(item1,0);\n\t\tpedido1.AdicionandoItemLista(item3,1);\n\t\tpedido1.AdicionandoItemLista(item5,2);*/\n\t\t\t\t\n\t\t//forma de pagamento para o pedido 1\n\t\t//pedido1.setPagamento(Pagamento3);\n\n\t\t// Mostrar dados\n\t\tpedido1.mostrarPedido();\n\t\tSystem.out.println(\"Valor total com desconto: \" + Pedido.desconto(pedido1.getValorTotal(),(float)0.1));\n\t\tpedido1.getPagamento().realizaPagamento(true, \"16/04/17\");\n\t\t\n\t\t\n\t\t\n\t}",
"public void copiarComprobanteContabilidad() {\r\n if (!tab_tabla1.isFilaInsertada()) {\r\n TablaGenerica tab_cabecera = ser_comprobante.getCabeceraComprobante(tab_tabla1.getValorSeleccionado());\r\n TablaGenerica tab_detalle = ser_comprobante.getDetallesComprobante(tab_tabla1.getValorSeleccionado());\r\n tab_tabla1.insertar();\r\n tab_tabla1.setValor(\"IDE_MODU\", tab_cabecera.getValor(\"IDE_MODU\"));\r\n tab_tabla1.setValor(\"IDE_GEPER\", tab_cabecera.getValor(\"IDE_GEPER\"));\r\n tab_tabla1.setValor(\"OBSERVACION_CNCCC\", tab_cabecera.getValor(\"OBSERVACION_CNCCC\"));\r\n tab_tabla1.setValor(\"ide_cntcm\", tab_cabecera.getValor(\"ide_cntcm\"));\r\n for (int i = 0; i < tab_detalle.getTotalFilas(); i++) {\r\n tab_tabla2.insertar();\r\n tab_tabla2.setValor(\"IDE_CNLAP\", tab_detalle.getValor(i, \"IDE_CNLAP\"));\r\n tab_tabla2.setValor(\"IDE_CNDPC\", tab_detalle.getValor(i, \"IDE_CNDPC\"));\r\n tab_tabla2.setValor(\"VALOR_CNDCC\", tab_detalle.getValor(i, \"VALOR_CNDCC\"));\r\n tab_tabla2.setValor(\"OBSERVACION_CNDCC\", tab_detalle.getValor(i, \"OBSERVACION_CNDCC\"));\r\n }\r\n calcularTotal();\r\n utilitario.addUpdate(\"gri_totales\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"No se puede copiar el comprobante de contabilidad\", \"El comprobante seleccionado no se encuentra grabado\");\r\n }\r\n }",
"private void limpiarDatos() {\n\t\t\n\t}",
"static void executa() {\n\t\tlistaProdutos = LoaderUtils.loadProdutos();\n\n\t\t// imprime lista de produtos cadastrados\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tloadEstoque();\n\t\t\n\t\t// imprime estoque\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tprintEstoque(listaEstoque);\n\t}",
"public void run_v0(String clase){\n\t\t//aviso(\"Ejecutando \"+clase+\" Tipo V0\");\n\t\t\n\t\tObject\toc=null;\n\t\t\n\t\t\t\n\t\t\n\t\ttry {\n\t\t\tClass c=Class.forName(clase);\n\t\t\toc=c.newInstance();\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (InstantiationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IllegalAccessException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tif (oc!=null){\n\t\t\tvisual.Task_Model T=(visual.Task_Model) oc;\n\t\t\tint i=0;\n\t\t\tbeta.tools.connector.GTransfer GX=null;\n\t\t\t\n\t\t\twhile (i<this.getConstructor().getParametros().size() & GX==null){\n\t\t\t\tObject[] p=(Object[]) this.getConstructor().getParametros().get(i);\n\t\t\t\tString id=(String)p[0];\n\t\t\t\tObject o=p[1];\n\t\t\t\tif (id.compareTo(\"GX\")==0){\n\t\t\t\t\tGX=(beta.tools.connector.GTransfer)o;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (GX==null){\n\t\t\t\tGX=new beta.tools.connector.GTransfer();\n\t\t\t\tGeneric _default=this.getConstructor().getConnectionHandler().getDefaultConnector();\n\t\t\t\tGX.setHost(_default.getHost());\n\t\t\t\tGX.setPort(_default.getPort());\n\t\t\t\tGX.setDatabase(_default.getDatabase());\n\t\t\t\tGX.setUser(_default.getUser());\n\t\t\t\tGX.setPassword(_default.getPassword());\n\t\t\t\tGX.setSucursal(_default.getId());\n\t\t\t\tGX.ConnectSQL(_default.getId());\n\t\t\t}\n\t\t\tboolean b=true;//esta_autorizado(iduser,clase);\n\t\t\tif (b){\n\t\t\t\tString NEW_LINE = System.getProperty(\"line.separator\");\n\t\t\t\t/*String msg=\"Esta es una aplicacion vieja.\"+NEW_LINE;\n\t\t\t\tmsg+=\"Hasta que no se reprograme. Esta aplicacion quedara inhabilitada por problemas de incompatibilida\";\n\t\t\t\terror(msg);*/\n\t\t\t\t\n\t\t\t\tT.setParameter(\"GX\", GX);\n\t\t\t\tT.setParameter(\"iduser\", this.getConstructor().getIduser());\n\t\t\t\tfor (i=0;i<this.getConstructor().getParametros().size();i++){\n\t\t\t\t\ttry {\n\t\t\t\t\tObject[] p=(Object[]) this.getConstructor().getParametros().get(i);\n\t\t\t\t\tString id=(String)p[0];\n\t\t\t\t\tObject o=p[1];\n\t\t\t\t\tT.setParameter(id, o);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(\"No se pudo Cargar el parametro \"+i+\" >\"+clase+\" \"+e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (javax.swing.SwingUtilities.isEventDispatchThread()){\n\t\t\t\t\tT.run();\n\t\t\t\t}else{\n\t\t\t\t\tfinal visual.Task_Model _T=T;\n\t\t\t\t\tRunnable _execute=new Runnable(){\n\t\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\t\t_T.run();\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tjavax.swing.SwingUtilities.invokeLater(_execute);\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\terror(\"(\"+this.getConstructor().getIduser()+\") No esta Autorizado\");\n\t\t\t\tT=null;\n\t\t\t}\t\n\t\t}\n\t}",
"@Override\r\n public void parar(Conexion conexion){\n }",
"public void makeSQLSinonimos(String insertStament, boolean[] isString, String patho, String nameFile, int columnaActive, HashSet<String> listaDrogasID, HashSet<String> listaDrogasIDTermino){ \n\t\tFile[] listOfFiles = new File(patho).listFiles();\n\t\tint i=0;\n\t\twhile ( i<listOfFiles.length && !listOfFiles[i].toString().contains(nameFile) )\n\t\t\ti++;\n\n\t\t// Si encontre el archivo creo la tabla, genero un scrip de insertar, lo ejecuto desde la consola y lo borro e inserto los datos\n\t\tif (i<listOfFiles.length){\n\n\n\t\t\tif (managerDB.createExecutorFile(\"C:\\\\\", \"prueba\")){\n\t\t\t\tParserSNOMED.fileToSqlScriptSinonimos(patho,listOfFiles[i].getName().toString(),insertStament, columnaActive, listaDrogasID, listaDrogasIDTermino);\n\t\t\t\tSystem.out.println(patho + listOfFiles[i].getName().toString());\n\t\t\t\ttry{\n\t\t\t\t\tThread.sleep(1000); \n\n\t\t\t\t\tRuntime.getRuntime().exec(\"cmd /c start C:\\\\prueba.bat\");\n\t\t\t\t\tmanagerDB.waitUntisFinishConsole(\"C://\",\"done.prov\" );\n\n\t\t\t\t\t// Borro todos los archivos luego de que termine el script\n\t\t\t\t\tFile file = new File(\"C:\\\\done.prov\"); \tfile.delete();\n\t\t\t\t\t//\t\t\tfile = new File(\"C:\\\\auxFile.sql\"); \tfile.delete();\n\t\t\t\t\tfile = new File(\"C:\\\\prueba.bat\");\t\tfile.delete();\n\t\t\t\t}\n\t\t\t\tcatch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();}\t\t\t\t}\n\t\t}\n\t}",
"private static void crearPedidoConStockDeVariedades() throws RemoteException {\n\t\tlong[] idVariedades = { 25, 33 };\n\t\tint[] cantidades = { 2, 3 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 1\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\t}",
"public void procesarRespuestaServidor(RutinaG rutina) {\n\n bdHelperRutinas = new BdHelperRutinas(context, BD_Rutinas);\n bdHelperRutinas.openBd();\n ContentValues registro = prepararRegistroRutina(rutina);\n bdHelperRutinas.insertTabla(DataBaseManagerRutinas.TABLE_NAME, registro);\n bdHelperRutinas.closeBd();\n }",
"public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}",
"public boolean insertarNuevoClienteVista(Cliente cliente, Cuenta cuenta) {\n \n String queryDividido1 = \"INSERT INTO Usuario(Codigo, Nombre, DPI, Direccion, Sexo, Password, Tipo_Usuario) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?)\";\n\n String queryDividido2 = \"INSERT INTO Cliente(Usuario_Codigo, Nombre, Nacimiento, DPI_Escaneado, Estado) \"\n + \"VALUES(?,?,?,?,?)\";\n \n String queryDividido3 = \"INSERT INTO Cuenta(No_Cuenta, Fecha_Creacion, Saldo_Cuenta, Cliente_Usuario_Codigo) \"\n + \"VALUES(?,?,?,?)\";\n \n \n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos Principales del cliente a la Tabla Usuario\n enviarDividido1.setInt(1, cliente.getCodigo());\n enviarDividido1.setString(2, cliente.getNombre());\n enviarDividido1.setString(3, cliente.getDPI());\n enviarDividido1.setString(4, cliente.getDireccion());\n enviarDividido1.setString(5, cliente.getSexo());\n enviarDividido1.setString(6, cliente.getPassword());\n enviarDividido1.setInt(7, 3);\n enviarDividido1.executeUpdate();\n\n //Envia los Datos Complementarios del Usuario a la tabla cliente\n PreparedStatement enviarDividido2 = Conexion.conexion.prepareStatement(queryDividido2);\n enviarDividido2.setInt(1, cliente.getCodigo());\n enviarDividido2.setString(2, cliente.getNombre());\n enviarDividido2.setString(3, cliente.getNacimiento());\n enviarDividido2.setBlob(4, cliente.getDPIEscaneado());\n enviarDividido2.setBoolean(5, cliente.isEstado());\n enviarDividido2.executeUpdate();\n \n //Envia los Datos de la Cuenta Adjudicada al Cliente\n PreparedStatement enviarDividido3 = Conexion.conexion.prepareStatement(queryDividido3);\n\n //Envio de los Datos Principales de una Cuenta a la Tabla Cuenta, perteneciente a un cliente en Especifico\n enviarDividido3.setInt(1, cuenta.getNoCuenta());\n enviarDividido3.setString(2, cuenta.getFechaCreacion());\n enviarDividido3.setDouble(3, cuenta.getSaldo());\n enviarDividido3.setInt(4, cliente.getCodigo());\n enviarDividido3.executeUpdate();\n \n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }"
] | [
"0.6231086",
"0.62230194",
"0.6220721",
"0.61993706",
"0.6167135",
"0.6134637",
"0.6102945",
"0.60780454",
"0.6064207",
"0.5997977",
"0.59946555",
"0.5989985",
"0.59795046",
"0.5979297",
"0.596376",
"0.59324735",
"0.59280604",
"0.5926921",
"0.5910236",
"0.59059435",
"0.5898583",
"0.58931583",
"0.58925736",
"0.58876115",
"0.58810353",
"0.5878515",
"0.58752024",
"0.5868629",
"0.58490264",
"0.58484465",
"0.5832392",
"0.5828508",
"0.58272856",
"0.5827278",
"0.5825973",
"0.5824448",
"0.58160007",
"0.5813851",
"0.5808438",
"0.5807824",
"0.58021116",
"0.57963645",
"0.5796362",
"0.5793153",
"0.5792508",
"0.5792351",
"0.5784936",
"0.5781327",
"0.57716125",
"0.5769143",
"0.5767847",
"0.5767577",
"0.57628614",
"0.5760734",
"0.5746042",
"0.5744375",
"0.5740881",
"0.5738763",
"0.57304114",
"0.57295847",
"0.5729365",
"0.57060456",
"0.5702808",
"0.5694065",
"0.5693738",
"0.56871015",
"0.5676974",
"0.56753683",
"0.5673215",
"0.56725603",
"0.5672467",
"0.56661755",
"0.56653327",
"0.5663785",
"0.5661559",
"0.5656993",
"0.5652448",
"0.5651475",
"0.5646723",
"0.5640205",
"0.56349504",
"0.5633992",
"0.5632999",
"0.56328183",
"0.56316596",
"0.56311363",
"0.5628004",
"0.56225187",
"0.5619787",
"0.561352",
"0.56132054",
"0.5612249",
"0.56111854",
"0.56105983",
"0.5608598",
"0.56081337",
"0.56070036",
"0.560558",
"0.5598808",
"0.55965006",
"0.5592599"
] | 0.0 | -1 |
Mètode que processa l'àudio rebut en l'idioma especificat pel paràmetre. La informació d'àudio que s'ha rebut és en format Base64, que caldrà descodificar abans d'escriure al sistema de fitxers. | private String processAudio(Map<String, String[]> params, String lang, KoncepteParaula k) throws IOException {
Properties props;
try {
props = PFCUtils.getProperties(PFCConstants.KEY_PROPERTIES_SERVER_FILE);
} catch (Exception e) {
throw new IOException("Error looking for properties file.");
}
String folder = props.getProperty(PFCConstants.PROPERTY_MP3_ROOT) + System.getProperty("file.separator") + lang;
String audio = null;
if (lang.equals(PFCConstants.LANG_CAT)) {
audio = getParams().get(PFCConstants.HTTP_REQUEST_PARAM_AUDIO_CA)[0];
} else if (lang.equals(PFCConstants.LANG_JAP)) {
audio = getParams().get(PFCConstants.HTTP_REQUEST_PARAM_AUDIO_JP)[0];
}
String path = folder + System.getProperty("file.separator") + k.getId() + ".mp3";
OutputStream out = new FileOutputStream(new File(path));
try {
PFCUtils.saveBase64(audio, out);
} catch (Exception e) {
e.printStackTrace();
throw new IOException("Cannot save in Base64!");
}
return path;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"default String codificarBase64(String contenido) {\n\t\tbyte[] encoded = Base64.getEncoder().encode(contenido.getBytes(StandardCharsets.UTF_8));\n\t\treturn new String(encoded);\n\t}",
"private static String descifrarBase64(String arg) {\n Base64.Decoder decoder = Base64.getDecoder();\n byte[] decodedByteArray = decoder.decode(arg);\n\n return new String(decodedByteArray);\n }",
"default byte[] decodificarBase64(String archivoBase64) {\n\t\treturn Base64.getDecoder().decode(archivoBase64);\n\t}",
"private String ConvertImagenTexto(Bitmap imagenpro) {\n ByteArrayOutputStream espacio = new ByteArrayOutputStream();\n imagenpro.compress(Bitmap.CompressFormat.JPEG,100,espacio);\n byte[] imagen = espacio.toByteArray();\n String imagenAstring = Base64.encodeToString(imagen,Base64.DEFAULT);\n return imagenAstring;\n }",
"public byte[] encode() throws IOException, IllegalStateException {\n check();\n\n // Tempat data ter-enkode\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n \n // Judul film dalam byte. UTF-8 adalah cara enkode karakter\n // yang sekarang populer dan kompatibel dengan ASCII, dan\n // muat dalam tipe data byte.\n byte titleByte[] = title.getBytes(StandardCharsets.UTF_8);\n\n // Dapatkan timestamp tanggal rilis. Timestamp yang dimaksud disini\n // adalah banyak detik semenjak 1 Januari 1970.\n // Method Date.getTime() menghasilkan waktu dalam milidetik (1/1000 detik)\n // jadi harus dibagi dengan 1000.\n // Tipe data long digunakan untuk menghindari masalah pada tahun 2038.\n long releaseTS = release.getTime() / 1000;\n\n // Sinopsis dalam bentuk byte.\n byte synopsisByte[] = synopsis.getBytes(StandardCharsets.UTF_8);\n // Daftar genre dalam bentuk byte, dipisah dengan koma.\n byte genreByte[] = genre.getBytes(StandardCharsets.UTF_8);\n // Sama untuk pemeran\n byte castByte[] = cast.getBytes(StandardCharsets.UTF_8);\n\n // Tulis panjang judul dalam bytes\n Utils.write(byteStream, titleByte.length);\n // Tulis judul\n byteStream.write(titleByte);\n\n // Tulis tanggal rilis\n Utils.write(byteStream, releaseTS);\n // Tulis durasi film\n Utils.write(byteStream, duration);\n\n // Tulis panjang sinopsis\n Utils.write(byteStream, synopsisByte.length);\n // Tulis sinopsis\n byteStream.write(synopsisByte);\n\n // Sama untuk genre\n Utils.write(byteStream, genreByte.length);\n byteStream.write(genreByte);\n\n // Dan pemeran\n Utils.write(byteStream, castByte.length);\n byteStream.write(castByte);\n\n byte result[] = byteStream.toByteArray();\n\n try {\n byteStream.close();\n } catch (IOException p) {\n // Masalah serius!\n p.printStackTrace(System.out);\n throw p;\n }\n\n return result;\n }",
"public String encode_dados_acesso(){\n\n String result = \"\";\n\n try {\n String iddispositivo = Settings.Secure.getString(myContext.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n Uri.Builder builder = new Uri.Builder()\n .appendQueryParameter(TAG_IDDIUSPOSITIVO, iddispositivo)\n //.appendQueryParameter(TAG_EMAIL, v_email)\n //.appendQueryParameter(TAG_SENHA, v_senha)\n .appendQueryParameter(TAG_TEXTO, vTexto);\n\n result = builder.build().getEncodedQuery();\n Log.d(\"workshop encode:\",result);\n\n } catch (Exception e) {\n //Log.d(\"InputStream\", e.getLocalizedMessage());\n }\n\n // 11. return result\n return result;\n }",
"public String encode_dados_acesso(){\n\n String result = \"\";\n\n try {\n String iddispositivo = Settings.Secure.getString(myContext.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n Uri.Builder builder = new Uri.Builder()\n .appendQueryParameter(TAG_IDDIUSPOSITIVO, iddispositivo)\n //.appendQueryParameter(TAG_EMAIL, v_email)\n //.appendQueryParameter(TAG_SENHA, v_senha)\n .appendQueryParameter(TAG_TEXTO, vTexto);\n\n result = builder.build().getEncodedQuery();\n Log.d(\"workshop encode:\",result);\n\n } catch (Exception e) {\n //Log.d(\"InputStream\", e.getLocalizedMessage());\n }\n\n // 11. return result\n return result;\n }",
"public static void LeerByte(File rutaLeer, File rutaEscribir) throws IOException {\n\n FileInputStream leer = new FileInputStream(rutaLeer);\n FileOutputStream escribir = new FileOutputStream(rutaEscribir);\n\n char[] letras = new char[numCaracteres(rutaLeer)]; //array para almacenar todos los char\n int b = 0;\n// letras = new char[numCaracteres(rutaLeer)];\n int contador = 0;\n while (b != -1) {\n b = leer.read(); //se lee los bytes\n char c = (char) b; // se convierte a char\n letras[contador] = c; // se guarda los char\n contador++;\n }\n\n //leer y escribir \n String letra = \"\";\n String frase = \"\";\n int contar = 0;\n boolean encontrarSigno = false;\n int data = -1;\n\n escribir.write(\"--------------------------------------\".getBytes());\n escribir.write('\\n');\n escribir.write(\" Cartelera de CineFBMoll\".getBytes());\n escribir.write('\\n');\n escribir.write(\"--------------------------------------\".getBytes());\n escribir.write('\\n');\n\n int corchete = 0;\n for (int i = 0; i < letras.length; i++) {\n if (letras[i] == '{') {\n corchete = i;\n }\n }\n letras[corchete] = '#'; // en la posición 475 ({) se cambia por #\n while (contar <= letras.length - 1 && encontrarSigno == false) {\n if (letras[contar] != '#' && contar != letras.length - 1) {\n letra = Character.toString(letras[contar]);\n frase += letra; // si no es un # se forma una frase\n\n contar++;\n } else {\n encontrarSigno = true;\n data++;\n contar++;\n int espacios = 0;\n int cortarLinea = 14; //cuenta los espacios ' ' para dar un salto de línea\n if (encontrarSigno == true) {\n if (frase.length() < 100) { // si es o no un párrafo\n escribir.write('\\n');\n escribir.write(datos[data].getBytes());\n escribir.write(\" : \".getBytes());\n escribir.write(frase.getBytes());\n escribir.write('\\n');\n\n encontrarSigno = false;\n frase = \"\";\n } else {\n escribir.write('\\n');\n escribir.write(datos[data].getBytes()); //sinopsis\n escribir.write(\" : \".getBytes());\n for (int i = 0; i < frase.length(); i++) {\n char c = frase.charAt(i);\n if (c == ' ') {\n espacios++;\n }\n if (espacios == cortarLinea) { //comprobación para dar salto de línea\n escribir.write('\\n');\n cortarLinea += 15;\n }\n escribir.write(c);\n }\n escribir.write('\\n');\n encontrarSigno = false;\n frase = \"\";\n }\n\n if (data + 1 == datos.length) {\n data = -1;\n escribir.write(\"-----------------------------\".getBytes());\n }\n }//'#'\n }\n }//while\n\n }",
"private byte[] processData(String peticion) {\n\t\t\n\t\tString respuesta = \"\";\n\t\t\n\t\tswitch (peticion) {\n\t\t\t\n\t\t\tcase \"noticias\": respuesta = \"¡Por fin la vacuna ya está en España!\"; break;\n\t\t\tcase \"hora\": respuesta = getFecha(); break;\n\t\t\tcase \"aleatorio\": respuesta = Double. toString(Math.random()*10); break;\n\t\t\tcase \"cerrar\": respuesta = \"Adios\"; break;\n\t\t\tcase \"cerrarServidor\": respuesta = \"Adios\"; break;\t\t\t\n\t\t\tdefault: respuesta = \"petición desconocida\";\n\t\t}\n\t\t\n\t\treturn respuesta.getBytes();\n\t}",
"public String codifica(String cadena) {\n MessageDigest messageDigest = null;\n\n //Se crea objeto de string buffer para almacenar la concatenacion de los datos del arreglo.\n StringBuffer sb = null;\n try {\n //Se inicializa el objeto y se le pasa el tipo de encriptacion deseada\n messageDigest = MessageDigest.getInstance(\"SHA-512\");\n\n //Se extraen los bytes que contiene la cadena\n byte[] encripta = messageDigest.digest(cadena.getBytes());\n\n //Se inicializa un objeto tipo String buffer\n sb = new StringBuffer();\n\n //Se recorre el arreglo de bytes que genero messageDigest\n for (byte hashB : encripta) {\n // se concatena los datos obtenidos del arreglo\n sb.append(String.format(\"%02x\", hashB));\n }\n\n } catch (Exception e) {\n// log.info(e.getMessage());\n// errorService.createError(e.getMessage(), \"Error encriptando la cadena: \"+ cadena);\n }\n\n return sb.toString();\n }",
"protected String getQRData() {\n String data = \"\";\n\n // positions de départ hardcodées (i,j), sens de parcours nombres de lignes (0:down, 1:up),\n // nombres de lignes à lire (nb_lines), spécial 1 colonnes (0:2 col, 1:1 col)\n int[][] start_bits_list = new int[][] {{28,28,1,20,0}, {9,26,0,20,0}, {28,24,1,4,0}, {19,24,1,11,0}, {9,22,0,11,0}, {25,22,0,4,0},\n {28,20,1,4,0}, {24,19,1,5,1}, {19,20,1,13,0}, {5,20,1,6,0}, {0,18,0,6,0}, {7,18,0,22,0},\n {28,16,1,22,0}, {5,16,1,6,0}, {0,14,0,6,0}, {7,14,0,22,0}, {28,12,1,22,0}, {5,12,1,6,0},\n {0,10,0,6,0}, {7,10,0,22,0}, {20,8,1,12,0}, {9,5,0,12,0}, {20,3,1,12,0}, {9,1,0,8,0},\n {17,1,0,1,1}};\n int[] start_bit;\n\n /* --- Traitement --- */\n for (int l = 0; l < start_bits_list.length; l++) {\n start_bit = start_bits_list[l];\n\n if (start_bit[2] == 1) { // sens de parcours : UP\n data += this.getDataUp(start_bit[0], start_bit[1], start_bit[3], start_bit[4]);\n }\n else { // sens de parcours : DOWN\n data += this.getDataDown(start_bit[0], start_bit[1], start_bit[3], start_bit[4]);\n }\n }\n\n return data;\n }",
"Base64Binary getCarrierAIDC();",
"public static void main(String[] args) {\n try {\n File image = new File(\"petite_image.png\");\n ImageSerializer serializer = new ImageSerializerBase64Impl();\n\n // Sérialization\n String encodedImage = (String) serializer.serialize(image);\n System.out.println(splitDisplay(encodedImage,76));\n\n // Désérialisation\n byte[] deserializedImage = (byte[]) serializer.deserialize(encodedImage);\n\n // Vérifications\n // 1/ Automatique\n assert (Arrays.equals(deserializedImage, Files.readAllBytes(image.toPath())));\n System.out.println(\"Cette sérialisation est bien réversible :)\");\n // 2/ Manuelle\n File extractedImage = new File(\"petite_image_extraite.png\");\n new FileOutputStream(extractedImage).write(deserializedImage);\n System.out.println(\"Je peux vérifier moi-même en ouvrant mon navigateur de fichiers et en ouvrant l'image extraite dans le répertoire de ce Test\");\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"String getCodiceFiscale();",
"private String[] condicionGeneral(String condicion) {\n String retorno[] = new String[2];\n try {\n String[] simbolos = {\"<=\", \">=\", \"==\", \"!=\", \"<\", \">\"};\n String simbolo = \"0\";\n\n if (condicion.length() > 3) {\n condicion = condicion.substring(1, condicion.length());\n for (int i = 0; i < simbolos.length; i++) {//selecciona el simbolo de la condicion\n if (condicion.contains(simbolos[i])) {\n simbolo = simbolos[i];\n break;\n }\n }\n if (simbolo.equals(\"0\")) {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n } else {\n String var[] = condicion.split(simbolo);\n if (var.length == 2) {\n if (esNumero(var[0])) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[1].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letas \n byte aux = 0;\n\n for (int i = 0; i < codigo.size(); i++) {\n if (var[1].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n if (var[0].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letras \n byte aux = 0;\n for (int i = 0; i < codigo.size(); i++) {\n if (var[0].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[0].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letas \n aux = 0;\n\n for (int i = 0; i < codigo.size(); i++) {\n if (var[1].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[0] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n\n\n\n } catch (Exception e) {\n System.out.println(\"Error en condicion \" + e.getClass());\n } finally {\n return retorno;\n }\n }",
"@Test\n public void convertTest() throws Exception{\n String str = FileUtils.readFileToString(new File(FilePath));\n// content.setContent(getMatcherStr(str,\"NumberLong\\\\((\\\\d+)\\\\)\"));\n// CVModel cvModel = JSONUtils.readValue(content.getContent(), CVModel.class);\n// String jsonStr = JSONUtils.writeValue(cvModel);\n \n String debase64 = URLDecoder.decode(str, ConstantUtils.CHARASET);\n debase64 = new String(Base64.decodeBase64(debase64.replaceAll(\"\\\\s\", \"+\")), ConstantUtils.CHARASET);\n CVModel cvModel = JSONUtils.readValue(debase64, CVModel.class);\n System.out.println(JSONUtils.writeValue(cvModel));\n }",
"private Base64(){}",
"public static void main(String[] args) throws UnsupportedEncodingException, IOException {\n BASE64Decoder baseDecoder = new BASE64Decoder();\n byte [] b = baseDecoder.decodeBuffer(\"MTTvvJoxOeadpeS4gOadoeivhOiuug==\");\n System.out.println(new String(b,\"UTF-8\"));\n }",
"public String entschlüsseln(SecretKey key, String nachricht) throws Exception{\n BASE64Decoder myDecoder2 = new BASE64Decoder();\n byte[] crypted2 = myDecoder2.decodeBuffer(nachricht);\n\n // Entschluesseln\n Cipher cipher2 = Cipher.getInstance(\"AES\");\n cipher2.init(Cipher.DECRYPT_MODE, key);\n byte[] cipherData2 = cipher2.doFinal(crypted2);\n String erg = new String(cipherData2);\n\n // Klartext\n return(erg);\n\n}",
"private String convertintobase64(Bitmap bitmap2) {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tbitmap2.compress(Bitmap.CompressFormat.PNG, 100, baos);\n\t\tbyte[] b = baos.toByteArray();\n\t\tString temp = Base64.encodeToString(b, Base64.DEFAULT | Base64.NO_WRAP);\n\t\tSystem.out.println(\"encoded string is:\" + temp);\n\t\treturn temp;\n\t}",
"private static byte[] decodeBase64(String data) {\n return Base64.decode(data, BASE64_DFLAGS);\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 void ReadDecompression(String aux) {\n StringBuilder calidadS = new StringBuilder();\n while (i < 8) {\n calidadS.append(aux.charAt(i));\n ++i;\n }\n quality = Integer.parseInt(calidadS.toString(), 2);\n StringBuilder widthS = new StringBuilder();\n while (i < 24) {\n widthS.append(aux.charAt(i));\n ++i;\n }\n width = Integer.parseInt(widthS.toString(), 2);\n StringBuilder heightS = new StringBuilder();\n while (i < 40) {\n heightS.append(aux.charAt(i));\n ++i;\n }\n height = Integer.parseInt(heightS.toString(), 2);\n StringBuilder sizeYS = new StringBuilder();\n while (i < 72) {\n sizeYS.append(aux.charAt(i));\n ++i;\n }\n sizeY = Integer.parseInt(sizeYS.toString(), 2);\n StringBuilder sizeCBS = new StringBuilder();\n while (i < 104) {\n sizeCBS.append(aux.charAt(i));\n ++i;\n }\n sizeCB = Integer.parseInt(sizeCBS.toString(), 2);\n StringBuilder sizeCRS = new StringBuilder();\n while (i < 136) {\n sizeCRS.append(aux.charAt(i));\n ++i;\n }\n sizeCR = Integer.parseInt(sizeCRS.toString(), 2);\n StringBuilder sizeYcS = new StringBuilder();\n while (i < 168) {\n sizeYcS.append(aux.charAt(i));\n ++i;\n }\n sizeYc = Integer.parseInt(sizeYcS.toString(), 2);\n StringBuilder sizeCBcS = new StringBuilder();\n while (i < 200) {\n sizeCBcS.append(aux.charAt(i));\n ++i;\n }\n sizeCBc = Integer.parseInt(sizeCBcS.toString(), 2);\n StringBuilder sizeCRcS = new StringBuilder();\n while (i < 232) {\n sizeCRcS.append(aux.charAt(i));\n ++i;\n }\n sizeCRc = Integer.parseInt(sizeCRcS.toString(), 2);\n }",
"public void decode() throws Exception {\n decodeFat();\n decodeDat();\n }",
"private String cadenaABinario(String cadena){\n String cb = \"\";\n int longitud;\n for(int i = 0; i < cadena.length(); i++){\n cb += String.format(\"%8s\",Integer.toBinaryString(cadena.charAt(i)));\n }\n cb = formato(cb);\n return cb;\n }",
"public String getDecod(String text) {\n Base64.Decoder decoder = Base64.getDecoder();\n return new String(decoder.decode(text));\n }",
"private String Rellenar(String cadena) \n {\n String c = \"\";\n for(int i=0; i<cadena.length();i++)\n {\n c+=Completar(Integer.toBinaryString( cadena.charAt(i)),8);\n }\n //Completar para que sea multiplo de 512\n int longitud = c.length();\n c+=\"1\";\n while((c.length()+64)%512!=0)\n c+=\"0\";\n c+=Completar(Integer.toBinaryString(longitud),64);\n return c;\n }",
"static public void wyslijObraz(Image image) throws IOException\n {\n if(Klient.czyRysuje == true)\n {\n String obrazek = \"<<OBRAZ>>\";\n obrazek += DatatypeConverter.printBase64Binary(obrazNaBity(image));//Konwersja obrazka do Base64Binary \n out.println(obrazek);\n }\n }",
"public byte[] decifrar(String archivo) {\n\t\tVector[] texto = null;\n\t\tMessageDigest md;\n\t\tPolinomio polinomio = new Polinomio();\n\t\tLinkedList<Vector> lista = new LinkedList<Vector>();\n\t\ttry {\n\t\t\tString linea;\n\t\t\tFileInputStream fis = new FileInputStream(archivo + \".frg\");\n\t\t\tDataInputStream in = new DataInputStream(fis);\n\t\t\tBufferedReader bf = new BufferedReader(new InputStreamReader(in));\n\t\t\twhile((linea = bf.readLine()) != null) {\n\t\t\t\tlista.add(new Vector(2));\n\t\t\t\t((Vector)lista.getLast()).add(0, new BigInteger(linea.substring(0, linea.indexOf(','))));\n\t\t\t\t((Vector)lista.getLast()).add(1, new BigInteger(linea.substring(linea.indexOf(',') + 1 , linea.length())));\n\t\t\t}\n\t\t\tin.close();\n\t\t\ttexto = new Vector[lista.size()];\n\t\t\tfor(int i = 0; i < texto.length; i++)\n\t\t\t\ttexto[i] = (Vector)lista.get(i);\n\t\t\treturn polinomio.interpolacion(new BigInteger(\"0\"), texto).toByteArray();\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"Error al decifrar!\");\n\t\t}\n\t\treturn null;\n\t}",
"@Test\n void testQuickBasics() throws Exception {\n HMEFMessage msg;\n try (InputStream is = _samples.openResourceAsStream(\"quick-winmail.dat\")) {\n msg = new HMEFMessage(is);\n }\n\n MAPIAttribute rtfAttr = msg.getMessageMAPIAttribute(MAPIProperty.RTF_COMPRESSED);\n assertNotNull(rtfAttr);\n assertTrue(rtfAttr instanceof MAPIRtfAttribute);\n\n // Check the start of the compressed version\n byte[] data = ((MAPIRtfAttribute) rtfAttr).getRawData();\n assertEquals(5907, data.length);\n\n // First 16 bytes is header stuff\n // Check it has the length + compressed marker\n assertEquals(5907 - 4, LittleEndian.getShort(data));\n assertEquals(\n \"LZFu\",\n StringUtil.getFromCompressedUnicode(data, 8, 4)\n );\n\n\n // Now Look at the code\n byte[] exp = {\n (byte) 0x07, // Flag: cccUUUUU\n (byte) 0x00, // c1a: offset 0 / 0x000\n (byte) 0x06, // c1b: length 6+2 -> {\\rtf1\\a\n (byte) 0x01, // c2a: offset 16 / 0x010\n (byte) 0x01, // c2b: length 1+2 -> def\n (byte) 0x0b, // c3a: offset 182 / 0xb6\n (byte) 0x60, // c3b: length 0+2 -> la\n (byte) 0x6e, // n\n (byte) 0x67, // g\n (byte) 0x31, // 1\n (byte) 0x30, // 0\n (byte) 0x32, // 2\n\n (byte) 0x66, // Flag: UccUUccU\n (byte) 0x35, // 5\n (byte) 0x00, // c2a: offset 6 / 0x006\n (byte) 0x64, // c2b: length 4+2 -> \\ansi\\a\n (byte) 0x00, // c3a: offset 7 / 0x007\n (byte) 0x72, // c3b: length 2+2 -> nsi\n (byte) 0x63, // c\n (byte) 0x70, // p\n (byte) 0x0d, // c6a: offset 221 / 0x0dd\n (byte) 0xd0, // c6b: length 0+2 -> g1\n (byte) 0x0e, // c7a: offset 224 / 0x0e0\n (byte) 0x00, // c7b: length 0+2 -> 25\n (byte) 0x32, // 2\n };\n\n assertArrayEquals(exp, Arrays.copyOfRange(data, 16, 16+25));\n }",
"private Base64(){\n\t}",
"public String base64Decode(String str) throws StoreFactoryException;",
"private String base64Decode(String token) {\n\t\t \tBase64 base64 = new Base64();\n\t \tbyte[] decodedBytes = base64.decode(token.getBytes()); \t\n\t \tString decodeString = new String(decodedBytes, Charset.forName(\"UTF-8\"));\t\t\n\t \tint index1 = decodeString.indexOf(\"3du\");\n\t \tint index2 = decodeString.indexOf(\"l0g\");\n\t \tint lengthChar = decodeString.length();\n//\t \tif(lengthChar %4 != 0) {\n//\t \t\treturn \"\";\n//\t \t}\n\t \tif((index1 < 3) & (index2 >=3))\n\t \t{\n\t \t\tlengthChar = lengthChar - 3;\n\t \t}\n\t \tif(lengthChar > 0) {\n\t \t\tdecodeString = decodeString.substring(3, lengthChar);\n\t \t} \t\n\t \treturn decodeString;\n\t\t}",
"public static byte[] decode(String encoded) {\n \n if (encoded == null)\n return null;\n \n char[] base64Data = encoded.toCharArray();\n // remove white spaces\n int len = removeWhiteSpace(base64Data);\n \n if (len%FOURBYTE != 0) {\n return null;//should be divisible by four\n }\n \n int numberQuadruple = (len/FOURBYTE );\n \n if (numberQuadruple == 0)\n return new byte[0];\n \n byte decodedData[] = null;\n byte b1=0,b2=0,b3=0, b4=0, marker0=0, marker1=0;\n char d1=0,d2=0,d3=0,d4=0;\n \n int i = 0;\n int encodedIndex = 0;\n int dataIndex = 0;\n decodedData = new byte[ (numberQuadruple)*3];\n \n for (; i<numberQuadruple-1; i++) {\n \n if (!isData( (d1 = base64Data[dataIndex++]) )||\n !isData( (d2 = base64Data[dataIndex++]) )||\n !isData( (d3 = base64Data[dataIndex++]) )||\n !isData( (d4 = base64Data[dataIndex++]) ))\n return null;//if found \"no data\" just return null\n \n b1 = base64Alphabet[d1];\n b2 = base64Alphabet[d2];\n b3 = base64Alphabet[d3];\n b4 = base64Alphabet[d4];\n \n decodedData[encodedIndex++] = (byte)( b1 <<2 | b2>>4 ) ;\n decodedData[encodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );\n decodedData[encodedIndex++] = (byte)( b3<<6 | b4 );\n }\n \n if (!isData( (d1 = base64Data[dataIndex++]) ) ||\n !isData( (d2 = base64Data[dataIndex++]) )) {\n return null;//if found \"no data\" just return null\n }\n \n b1 = base64Alphabet[d1];\n b2 = base64Alphabet[d2];\n \n d3 = base64Data[dataIndex++];\n d4 = base64Data[dataIndex++];\n if (!isData( (d3 ) ) ||\n !isData( (d4 ) )) {//Check if they are PAD characters\n if (isPad( d3 ) && isPad( d4)) { //Two PAD e.g. 3c[Pad][Pad]\n if ((b2 & 0xf) != 0)//last 4 bits should be zero\n return null;\n byte[] tmp = new byte[ i*3 + 1 ];\n System.arraycopy( decodedData, 0, tmp, 0, i*3 );\n tmp[encodedIndex] = (byte)( b1 <<2 | b2>>4 ) ;\n return tmp;\n } else if (!isPad( d3) && isPad(d4)) { //One PAD e.g. 3cQ[Pad]\n b3 = base64Alphabet[ d3 ];\n if ((b3 & 0x3 ) != 0)//last 2 bits should be zero\n return null;\n byte[] tmp = new byte[ i*3 + 2 ];\n System.arraycopy( decodedData, 0, tmp, 0, i*3 );\n tmp[encodedIndex++] = (byte)( b1 <<2 | b2>>4 );\n tmp[encodedIndex] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );\n return tmp;\n } else {\n return null;//an error like \"3c[Pad]r\", \"3cdX\", \"3cXd\", \"3cXX\" where X is non data\n }\n } else { //No PAD e.g 3cQl\n b3 = base64Alphabet[ d3 ];\n b4 = base64Alphabet[ d4 ];\n decodedData[encodedIndex++] = (byte)( b1 <<2 | b2>>4 ) ;\n decodedData[encodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );\n decodedData[encodedIndex++] = (byte)( b3<<6 | b4 );\n \n }\n \n return decodedData;\n }",
"public static void main(String args[]) throws IOException {\n\t\t\n\t\tString v=\"1001100000010001\";\n\t\t\t\n\t\tString value=Base64.encodeBase64String(v.getBytes());\n\t\tSystem.out.println(\"hiiiiii===\"+value);\n\t\t\n\t\tString v1=v.substring(0,3);\n\t\tSystem.out.println(\"hiiiiii\"+value);\n\n //System.out.println(\"hiiiiii\"+da);\n //encoding byte array into base 64\n //byte[] encoded = Base64.encodeBase64(orig.getBytes()); \n //byte[] data = SerializationUtils.serialize(yourObject);\n //System.out.println(\"Original String: \" + orig );\n // System.out.println(\"Base64 Encoded String : \" + new String(encoded));\n \n //decoding byte array into base64\n //byte[] decoded = Base64.decodeBase64(encoded);\n\t\ttry{\n byte[] decoded=Base64.decodeBase64(\"AAUMBAAAAP8AAAEAAAABAQAAAQIAAAEDAAABBAAAAQUAAAEGAAABBwAAAQgAAAEJAAABCg==\");\n //System.out.println(\"decoded val : \" +decoded[0]);\n \n //System.out.println(\"Base 64 Decoded String : \" + new String(decoded));\n for(Byte b: decoded){\n \tSystem.out.println(\"decoded val : \" + b);\n }\n // byte[] bb=new byte[decoded.length];\n \tif(decoded!=null && decoded.length>0){\n \t\t//System.out.println(\"decoded val 2: \" +String.valueOf(decoded[3]));\n \t\t//System.arraycopy(decoded, 10, bb, 4 , 4);\n \t\t//System.out.println(\"decoded val 2: \" +String.valueOf(decoded[3]));\n \t\t\n \t\t//String hex = \"ff\"\n \t\t//int value = Integer.parseInt(hex, 16);\n \t\t\n \t\t//String hex = hexToString(decoded[10]);\n \t\t //BigInteger bi = new BigInteger(hex, 16);\n \t\t//bi.intValue();\n \t\t//(String.format(\"%.7f\", f));\n \t\t\n \t\t//String hex = Integer.toHexString(decoded[10]);\n \t\t// Integer.parseInt(hex);\n \t\t\n \t\t//System.out.println(\"Lora \" +hex);\n \t\tint n=0;\n \t\ttry{\n \t\t\t//n=Byte.valueOf(hex);\n \t\t\t//System.out.println(\"Loraa \" +n);\n \t\t}catch(Exception e){\n \t\t\te.printStackTrace();\n \t\t}\n \t\tSystem.out.println(\"Lora1 \" +n);\n \t\t\n \t\tSystem.out.println(\"decoded 10 \" +decoded[10]);\n \t\tSystem.out.println(\"decoded 11 \" +decoded[11]);\n \t\tSystem.out.println(\"decoded 12 \" +decoded[12]);\t\n \t\tSystem.out.println(\"decoded 13 \" +decoded[13]);\n \t\t\n \t\t/*ByteBuffer bb = ByteBuffer.wrap(d);\n bb.order(ByteOrder.LITTLE_ENDIAN);\n System.out.println( bb.getInt());*/\n \t\t\n\t\t //int b=(int) Integer.toUnsignedLong((int)decoded[10]);\n\t\t// String b=String.format(\"%x\", decoded[10]);\n\t\t //int p1=Integer.valueOf(b);\n\t\t //System.out.println(\"Pppppp \" +b);\n\t\t// n=Integer.parseInt(hex);\n\t\t//long h=(long) (decoded[10] & 0x00000000ffffffffL);\n\t\t// System.out.println(\"nnnn \" +Integer.toHexString(decoded[10]));\n\t\t// System.out.println(b);\n\t\t int w=112;\n\t\t// Integer.toBinaryString(w)\n\t\t System.out.println(\"dfdfdfdf\"+Integer.toBinaryString(w));\n\t\t \n\t\t String p=Integer.toBinaryString(w);\n\t\t System.out.println(\"hiiddddd\"+p);\n\t\t int p1=decoded[10] & 0xFF;\n \t\t//int c=decoded[11];\n\t\t int c=0x5f;\n \t\tSystem.out.println(\"p1\"+p1);\n \t\tSystem.out.println(c);\n \t\tint d=decoded[12];\n \t\tSystem.out.println(d);\n \t\tint e=decoded[13] & 0xFF ;\n \t\t int a= (p1 | (c << 8) | (d << 16) | (e << 24));\n \t\t\n \t\t\n \t\tSystem.out.println(a);\n \t\t\n \t}\n \t\n \t//System.out.println(\"bb : \" + bb[4]);\n \n //char character = '2'; \n // int ascii = (int) character;\n // String a= new String(decoded);\n //.out.println(String.format(\"0x%08X\", a));\n //String str=String.format(\"0x%08X\", a);\n //String str = String.format(\"0x\", args)\n //System.out.println(\"String : \" + str);\n /* \n \tSystem.out.println(\"Base 64 Decoded String : \" + Integer.toHexString(50));*/\n }catch(Exception e){\n \te.printStackTrace();\n }\n }",
"public String readNwrite() {\n if (encoded) {\n try {\n msgEncoded = Files.readAllLines(msgEncodedPath);\n } catch (IOException e) {\n e.printStackTrace();\n }\n for (String line : msgEncoded) {\n try {\n Files.writeString(msgClearPath, transCoder.decodeMsg(line) + System.lineSeparator(), StandardOpenOption.CREATE, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return \"Votre message à bien été décodé, retrouvez le ici : \" + msgClearPath;\n } else {\n try {\n msgClear = Files.readAllLines(msgClearPath);\n } catch (IOException e) {\n e.printStackTrace();\n }\n for (String line : msgClear) {\n try {\n Files.writeString(msgEncodedPath, transCoder.encodeMsg(line) + System.lineSeparator(), StandardOpenOption.CREATE, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return \"Votre message à bien été codé, retrouvez le ici : \" + msgEncodedPath;\n }\n }",
"private static String encodeToBase64(byte[] data) {\n return Base64.encodeToString(data, BASE64_EFLAGS);\n }",
"public byte[] decodeContent(String contentDataString){\t\t\n return Base64.decodeBase64(contentDataString);\n}",
"@kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000T\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\t\\n\\u0002\\b\\u0007\\n\\u0002\\u0010\\u000b\\n\\u0002\\b\\u0005\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0005\\n\\u0002\\u0010 \\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\n\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\bv\\u0018\\u00002\\u00020\\u0001:\\u0004./01J\\b\\u0010,\\u001a\\u00020\\u000fH&J\\b\\u0010-\\u001a\\u00020\\u000fH&R\\u0014\\u0010\\u0002\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0004\\u0010\\u0005R\\u0012\\u0010\\u0006\\u001a\\u00020\\u0007X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\b\\u0010\\tR\\u0014\\u0010\\n\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u000b\\u0010\\u0005R\\u0014\\u0010\\f\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\r\\u0010\\u0005R\\u0012\\u0010\\u000e\\u001a\\u00020\\u000fX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u000e\\u0010\\u0010R\\u0012\\u0010\\u0011\\u001a\\u00020\\u000fX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0011\\u0010\\u0010R\\u0014\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0013\\u0010\\u0005R\\u0014\\u0010\\u0014\\u001a\\u0004\\u0018\\u00010\\u0015X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0016\\u0010\\u0017R\\u0014\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u001a\\u0010\\u001bR\\u0014\\u0010\\u001c\\u001a\\u0004\\u0018\\u00010\\u001dX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u001e\\u0010\\u001fR\\u0014\\u0010 \\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b!\\u0010\\u0005R\\u0018\\u0010\\\"\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030#X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b$\\u0010%R\\u0014\\u0010&\\u001a\\u0004\\u0018\\u00010\\'X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b(\\u0010)R\\u0018\\u0010*\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030#X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b+\\u0010%\\u0082\\u0001\\u000223\\u00a8\\u00064\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent;\", \"Lcom/stripe/android/model/StripeModel;\", \"clientSecret\", \"\", \"getClientSecret\", \"()Ljava/lang/String;\", \"created\", \"\", \"getCreated\", \"()J\", \"description\", \"getDescription\", \"id\", \"getId\", \"isConfirmed\", \"\", \"()Z\", \"isLiveMode\", \"lastErrorMessage\", \"getLastErrorMessage\", \"nextActionData\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"getNextActionData\", \"()Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"nextActionType\", \"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"getNextActionType\", \"()Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"paymentMethod\", \"Lcom/stripe/android/model/PaymentMethod;\", \"getPaymentMethod\", \"()Lcom/stripe/android/model/PaymentMethod;\", \"paymentMethodId\", \"getPaymentMethodId\", \"paymentMethodTypes\", \"\", \"getPaymentMethodTypes\", \"()Ljava/util/List;\", \"status\", \"Lcom/stripe/android/model/StripeIntent$Status;\", \"getStatus\", \"()Lcom/stripe/android/model/StripeIntent$Status;\", \"unactivatedPaymentMethods\", \"getUnactivatedPaymentMethods\", \"requiresAction\", \"requiresConfirmation\", \"NextActionData\", \"NextActionType\", \"Status\", \"Usage\", \"Lcom/stripe/android/model/PaymentIntent;\", \"Lcom/stripe/android/model/SetupIntent;\", \"payments-core_release\"})\npublic abstract interface StripeIntent extends com.stripe.android.model.StripeModel {\n \n /**\n * Unique identifier for the object.\n */\n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getId();\n \n /**\n * Time at which the object was created. Measured in seconds since the Unix epoch.\n */\n public abstract long getCreated();\n \n /**\n * An arbitrary string attached to the object. Often useful for displaying to users.\n */\n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getDescription();\n \n /**\n * Has the value true if the object exists in live mode or the value false if the object exists\n * in test mode.\n */\n public abstract boolean isLiveMode();\n \n /**\n * The expanded [PaymentMethod] represented by [paymentMethodId].\n */\n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.PaymentMethod getPaymentMethod();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getPaymentMethodId();\n \n /**\n * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.\n */\n @org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getPaymentMethodTypes();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.NextActionType getNextActionType();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getClientSecret();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.Status getStatus();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.NextActionData getNextActionData();\n \n /**\n * Whether confirmation has succeeded and all required actions have been handled.\n */\n public abstract boolean isConfirmed();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getLastErrorMessage();\n \n /**\n * Payment types that have not been activated in livemode, but have been activated in testmode.\n */\n @org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getUnactivatedPaymentMethods();\n \n public abstract boolean requiresAction();\n \n public abstract boolean requiresConfirmation();\n \n /**\n * Type of the next action to perform.\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\f\\b\\u0086\\u0001\\u0018\\u0000 \\u000e2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000eB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\nj\\u0002\\b\\u000bj\\u0002\\b\\fj\\u0002\\b\\r\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"RedirectToUrl\", \"UseStripeSdk\", \"DisplayOxxoDetails\", \"AlipayRedirect\", \"BlikAuthorize\", \"WeChatPayRedirect\", \"Companion\", \"payments-core_release\"})\n public static enum NextActionType {\n /*public static final*/ RedirectToUrl /* = new RedirectToUrl(null) */,\n /*public static final*/ UseStripeSdk /* = new UseStripeSdk(null) */,\n /*public static final*/ DisplayOxxoDetails /* = new DisplayOxxoDetails(null) */,\n /*public static final*/ AlipayRedirect /* = new AlipayRedirect(null) */,\n /*public static final*/ BlikAuthorize /* = new BlikAuthorize(null) */,\n /*public static final*/ WeChatPayRedirect /* = new WeChatPayRedirect(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.NextActionType.Companion Companion = null;\n \n NextActionType(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionType$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.NextActionType fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n /**\n * - [The Intent State Machine - Intent statuses](https://stripe.com/docs/payments/intents#intent-statuses)\n * - [PaymentIntent.status API reference](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-status)\n * - [SetupIntent.status API reference](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-status)\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\r\\b\\u0086\\u0001\\u0018\\u0000 \\u000f2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000fB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\nj\\u0002\\b\\u000bj\\u0002\\b\\fj\\u0002\\b\\rj\\u0002\\b\\u000e\\u00a8\\u0006\\u0010\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Status;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"Canceled\", \"Processing\", \"RequiresAction\", \"RequiresConfirmation\", \"RequiresPaymentMethod\", \"Succeeded\", \"RequiresCapture\", \"Companion\", \"payments-core_release\"})\n public static enum Status {\n /*public static final*/ Canceled /* = new Canceled(null) */,\n /*public static final*/ Processing /* = new Processing(null) */,\n /*public static final*/ RequiresAction /* = new RequiresAction(null) */,\n /*public static final*/ RequiresConfirmation /* = new RequiresConfirmation(null) */,\n /*public static final*/ RequiresPaymentMethod /* = new RequiresPaymentMethod(null) */,\n /*public static final*/ Succeeded /* = new Succeeded(null) */,\n /*public static final*/ RequiresCapture /* = new RequiresCapture(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.Status.Companion Companion = null;\n \n Status(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Status$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$Status;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.Status fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n /**\n * See [setup_intent.usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) and\n * [Reusing Cards](https://stripe.com/docs/payments/cards/reusing-cards).\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\t\\b\\u0086\\u0001\\u0018\\u0000 \\u000b2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000bB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\n\\u00a8\\u0006\\f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Usage;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"OnSession\", \"OffSession\", \"OneTime\", \"Companion\", \"payments-core_release\"})\n public static enum Usage {\n /*public static final*/ OnSession /* = new OnSession(null) */,\n /*public static final*/ OffSession /* = new OffSession(null) */,\n /*public static final*/ OneTime /* = new OneTime(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.Usage.Companion Companion = null;\n \n Usage(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Usage$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$Usage;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.Usage fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000&\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0007\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\b6\\u0018\\u00002\\u00020\\u0001:\\u0006\\u0003\\u0004\\u0005\\u0006\\u0007\\bB\\u0007\\b\\u0004\\u00a2\\u0006\\u0002\\u0010\\u0002\\u0082\\u0001\\u0006\\t\\n\\u000b\\f\\r\\u000e\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"Lcom/stripe/android/model/StripeModel;\", \"()V\", \"AlipayRedirect\", \"BlikAuthorize\", \"DisplayOxxoDetails\", \"RedirectToUrl\", \"SdkData\", \"WeChatPayRedirect\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$DisplayOxxoDetails;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$RedirectToUrl;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$BlikAuthorize;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$WeChatPayRedirect;\", \"payments-core_release\"})\n public static abstract class NextActionData implements com.stripe.android.model.StripeModel {\n \n private NextActionData() {\n super();\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u00004\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\r\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\'\\u0012\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u0012\\n\\b\\u0002\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\u0002\\u0010\\u0007J\\t\\u0010\\r\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\u000e\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J\\u000b\\u0010\\u000f\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J+\\u0010\\u0010\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u00052\\n\\b\\u0002\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0001J\\t\\u0010\\u0011\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0013\\u0010\\u0012\\u001a\\u00020\\u00132\\b\\u0010\\u0014\\u001a\\u0004\\u0018\\u00010\\u0015H\\u00d6\\u0003J\\t\\u0010\\u0016\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\t\\u0010\\u0017\\u001a\\u00020\\u0005H\\u00d6\\u0001J\\u0019\\u0010\\u0018\\u001a\\u00020\\u00192\\u0006\\u0010\\u001a\\u001a\\u00020\\u001b2\\u0006\\u0010\\u001c\\u001a\\u00020\\u0003H\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\b\\u0010\\tR\\u0013\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\n\\u0010\\u000bR\\u0013\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\u000b\\u00a8\\u0006\\u001d\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$DisplayOxxoDetails;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"expiresAfter\", \"\", \"number\", \"\", \"hostedVoucherUrl\", \"(ILjava/lang/String;Ljava/lang/String;)V\", \"getExpiresAfter\", \"()I\", \"getHostedVoucherUrl\", \"()Ljava/lang/String;\", \"getNumber\", \"component1\", \"component2\", \"component3\", \"copy\", \"describeContents\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class DisplayOxxoDetails extends com.stripe.android.model.StripeIntent.NextActionData {\n \n /**\n * The timestamp after which the OXXO expires.\n */\n private final int expiresAfter = 0;\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String number = null;\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String hostedVoucherUrl = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails copy(int expiresAfter, @org.jetbrains.annotations.Nullable()\n java.lang.String number, @org.jetbrains.annotations.Nullable()\n java.lang.String hostedVoucherUrl) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public DisplayOxxoDetails() {\n super();\n }\n \n public DisplayOxxoDetails(int expiresAfter, @org.jetbrains.annotations.Nullable()\n java.lang.String number, @org.jetbrains.annotations.Nullable()\n java.lang.String hostedVoucherUrl) {\n super();\n }\n \n /**\n * The timestamp after which the OXXO expires.\n */\n public final int component1() {\n return 0;\n }\n \n /**\n * The timestamp after which the OXXO expires.\n */\n public final int getExpiresAfter() {\n return 0;\n }\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getNumber() {\n return null;\n }\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component3() {\n return null;\n }\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getHostedVoucherUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails[] newArray(int size) {\n return null;\n }\n }\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000:\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\t\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\u0017\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\b\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\u0002\\u0010\\u0006J\\t\\u0010\\u000b\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\f\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J\\u001f\\u0010\\r\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0001J\\t\\u0010\\u000e\\u001a\\u00020\\u000fH\\u00d6\\u0001J\\u0013\\u0010\\u0010\\u001a\\u00020\\u00112\\b\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0013H\\u00d6\\u0003J\\t\\u0010\\u0014\\u001a\\u00020\\u000fH\\u00d6\\u0001J\\t\\u0010\\u0015\\u001a\\u00020\\u0005H\\u00d6\\u0001J\\u0019\\u0010\\u0016\\u001a\\u00020\\u00172\\u0006\\u0010\\u0018\\u001a\\u00020\\u00192\\u0006\\u0010\\u001a\\u001a\\u00020\\u000fH\\u00d6\\u0001R\\u0013\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0007\\u0010\\bR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\n\\u00a8\\u0006\\u001b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$RedirectToUrl;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"url\", \"Landroid/net/Uri;\", \"returnUrl\", \"\", \"(Landroid/net/Uri;Ljava/lang/String;)V\", \"getReturnUrl\", \"()Ljava/lang/String;\", \"getUrl\", \"()Landroid/net/Uri;\", \"component1\", \"component2\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class RedirectToUrl extends com.stripe.android.model.StripeIntent.NextActionData {\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n private final android.net.Uri url = null;\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String returnUrl = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl> CREATOR = null;\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl copy(@org.jetbrains.annotations.NotNull()\n android.net.Uri url, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n return null;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public RedirectToUrl(@org.jetbrains.annotations.NotNull()\n android.net.Uri url, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri component1() {\n return null;\n }\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri getUrl() {\n return null;\n }\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getReturnUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0004\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\r\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\b\\u0081\\b\\u0018\\u0000 \\\"2\\u00020\\u0001:\\u0001\\\"B#\\b\\u0010\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0006B+\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\b\\u0012\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\tJ\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\u0011\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0012\\u001a\\u00020\\bH\\u00c6\\u0003J\\u000b\\u0010\\u0013\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J5\\u0010\\u0014\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\b2\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0001J\\t\\u0010\\u0015\\u001a\\u00020\\u0016H\\u00d6\\u0001J\\u0013\\u0010\\u0017\\u001a\\u00020\\u00182\\b\\u0010\\u0019\\u001a\\u0004\\u0018\\u00010\\u001aH\\u00d6\\u0003J\\t\\u0010\\u001b\\u001a\\u00020\\u0016H\\u00d6\\u0001J\\t\\u0010\\u001c\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001d\\u001a\\u00020\\u001e2\\u0006\\u0010\\u001f\\u001a\\u00020 2\\u0006\\u0010!\\u001a\\u00020\\u0016H\\u00d6\\u0001R\\u0013\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\n\\u0010\\u000bR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\u000bR\\u0013\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\u000bR\\u0011\\u0010\\u0004\\u001a\\u00020\\b\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000e\\u0010\\u000f\\u00a8\\u0006#\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"data\", \"\", \"webViewUrl\", \"returnUrl\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V\", \"authCompleteUrl\", \"Landroid/net/Uri;\", \"(Ljava/lang/String;Ljava/lang/String;Landroid/net/Uri;Ljava/lang/String;)V\", \"getAuthCompleteUrl\", \"()Ljava/lang/String;\", \"getData\", \"getReturnUrl\", \"getWebViewUrl\", \"()Landroid/net/Uri;\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"Companion\", \"payments-core_release\"})\n public static final class AlipayRedirect extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String data = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String authCompleteUrl = null;\n @org.jetbrains.annotations.NotNull()\n private final android.net.Uri webViewUrl = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String returnUrl = null;\n @org.jetbrains.annotations.NotNull()\n private static final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect.Companion Companion = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect copy(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.Nullable()\n java.lang.String authCompleteUrl, @org.jetbrains.annotations.NotNull()\n android.net.Uri webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public AlipayRedirect(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.Nullable()\n java.lang.String authCompleteUrl, @org.jetbrains.annotations.NotNull()\n android.net.Uri webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getData() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getAuthCompleteUrl() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri getWebViewUrl() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component4() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getReturnUrl() {\n return null;\n }\n \n public AlipayRedirect(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.NotNull()\n java.lang.String webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect[] newArray(int size) {\n return null;\n }\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0014\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0082\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0012\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\u0006\\u0010\\u0005\\u001a\\u00020\\u0004H\\u0002\\u00a8\\u0006\\u0006\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect$Companion;\", \"\", \"()V\", \"extractReturnUrl\", \"\", \"data\", \"payments-core_release\"})\n static final class Companion {\n \n private Companion() {\n super();\n }\n \n /**\n * The alipay data string is formatted as query parameters.\n * When authenticate is complete, we make a request to the\n * return_url param, as a hint to the backend to ping Alipay for\n * the updated state\n */\n private final java.lang.String extractReturnUrl(java.lang.String data) {\n return null;\n }\n }\n }\n \n /**\n * When confirming a [PaymentIntent] or [SetupIntent] with the Stripe SDK, the Stripe SDK\n * depends on this property to invoke authentication flows. The shape of the contents is subject\n * to change and is only intended to be used by the Stripe SDK.\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0016\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\b6\\u0018\\u00002\\u00020\\u0001:\\u0002\\u0003\\u0004B\\u0007\\b\\u0004\\u00a2\\u0006\\u0002\\u0010\\u0002\\u0082\\u0001\\u0002\\u0005\\u0006\\u00a8\\u0006\\u0007\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"()V\", \"Use3DS1\", \"Use3DS2\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS1;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2;\", \"payments-core_release\"})\n public static abstract class SdkData extends com.stripe.android.model.StripeIntent.NextActionData {\n \n private SdkData() {\n super();\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u00004\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0006\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\r\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\t\\u0010\\u0007\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u0013\\u0010\\b\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003H\\u00c6\\u0001J\\t\\u0010\\t\\u001a\\u00020\\nH\\u00d6\\u0001J\\u0013\\u0010\\u000b\\u001a\\u00020\\f2\\b\\u0010\\r\\u001a\\u0004\\u0018\\u00010\\u000eH\\u00d6\\u0003J\\t\\u0010\\u000f\\u001a\\u00020\\nH\\u00d6\\u0001J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u0011\\u001a\\u00020\\u00122\\u0006\\u0010\\u0013\\u001a\\u00020\\u00142\\u0006\\u0010\\u0015\\u001a\\u00020\\nH\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006\\u00a8\\u0006\\u0016\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS1;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"url\", \"\", \"(Ljava/lang/String;)V\", \"getUrl\", \"()Ljava/lang/String;\", \"component1\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class Use3DS1 extends com.stripe.android.model.StripeIntent.NextActionData.SdkData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String url = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1 copy(@org.jetbrains.annotations.NotNull()\n java.lang.String url) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public Use3DS1(@org.jetbrains.annotations.NotNull()\n java.lang.String url) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1 createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\r\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001:\\u0001!B%\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0005\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0006\\u001a\\u00020\\u0007\\u00a2\\u0006\\u0002\\u0010\\bJ\\t\\u0010\\u000f\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0011\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0012\\u001a\\u00020\\u0007H\\u00c6\\u0003J1\\u0010\\u0013\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0005\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0006\\u001a\\u00020\\u0007H\\u00c6\\u0001J\\t\\u0010\\u0014\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\u0013\\u0010\\u0016\\u001a\\u00020\\u00172\\b\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019H\\u00d6\\u0003J\\t\\u0010\\u001a\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\t\\u0010\\u001b\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001c\\u001a\\u00020\\u001d2\\u0006\\u0010\\u001e\\u001a\\u00020\\u001f2\\u0006\\u0010 \\u001a\\u00020\\u0015H\\u00d6\\u0001R\\u0011\\u0010\\u0006\\u001a\\u00020\\u0007\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\nR\\u0011\\u0010\\u0004\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000b\\u0010\\fR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\fR\\u0011\\u0010\\u0005\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000e\\u0010\\f\\u00a8\\u0006\\\"\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"source\", \"\", \"serverName\", \"transactionId\", \"serverEncryption\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;)V\", \"getServerEncryption\", \"()Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"getServerName\", \"()Ljava/lang/String;\", \"getSource\", \"getTransactionId\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"DirectoryServerEncryption\", \"payments-core_release\"})\n public static final class Use3DS2 extends com.stripe.android.model.StripeIntent.NextActionData.SdkData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String source = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String serverName = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String transactionId = null;\n @org.jetbrains.annotations.NotNull()\n private final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2 copy(@org.jetbrains.annotations.NotNull()\n java.lang.String source, @org.jetbrains.annotations.NotNull()\n java.lang.String serverName, @org.jetbrains.annotations.NotNull()\n java.lang.String transactionId, @org.jetbrains.annotations.NotNull()\n com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public Use3DS2(@org.jetbrains.annotations.NotNull()\n java.lang.String source, @org.jetbrains.annotations.NotNull()\n java.lang.String serverName, @org.jetbrains.annotations.NotNull()\n java.lang.String transactionId, @org.jetbrains.annotations.NotNull()\n com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getSource() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getServerName() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getTransactionId() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption component4() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption getServerEncryption() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2 createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2[] newArray(int size) {\n return null;\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\n\\u0002\\u0010 \\n\\u0002\\b\\u000e\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B-\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\f\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006\\u0012\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\bJ\\t\\u0010\\u000f\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000f\\u0010\\u0011\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006H\\u00c6\\u0003J\\u000b\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J9\\u0010\\u0013\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\u00032\\u000e\\b\\u0002\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u00062\\n\\b\\u0002\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0001J\\t\\u0010\\u0014\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\u0013\\u0010\\u0016\\u001a\\u00020\\u00172\\b\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019H\\u00d6\\u0003J\\t\\u0010\\u001a\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\t\\u0010\\u001b\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001c\\u001a\\u00020\\u001d2\\u0006\\u0010\\u001e\\u001a\\u00020\\u001f2\\u0006\\u0010 \\u001a\\u00020\\u0015H\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\nR\\u0011\\u0010\\u0004\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000b\\u0010\\nR\\u0013\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\nR\\u0017\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\u000e\\u00a8\\u0006!\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"Landroid/os/Parcelable;\", \"directoryServerId\", \"\", \"dsCertificateData\", \"rootCertsData\", \"\", \"keyId\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)V\", \"getDirectoryServerId\", \"()Ljava/lang/String;\", \"getDsCertificateData\", \"getKeyId\", \"getRootCertsData\", \"()Ljava/util/List;\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class DirectoryServerEncryption implements android.os.Parcelable {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String directoryServerId = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String dsCertificateData = null;\n @org.jetbrains.annotations.NotNull()\n private final java.util.List<java.lang.String> rootCertsData = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String keyId = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption copy(@org.jetbrains.annotations.NotNull()\n java.lang.String directoryServerId, @org.jetbrains.annotations.NotNull()\n java.lang.String dsCertificateData, @org.jetbrains.annotations.NotNull()\n java.util.List<java.lang.String> rootCertsData, @org.jetbrains.annotations.Nullable()\n java.lang.String keyId) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public DirectoryServerEncryption(@org.jetbrains.annotations.NotNull()\n java.lang.String directoryServerId, @org.jetbrains.annotations.NotNull()\n java.lang.String dsCertificateData, @org.jetbrains.annotations.NotNull()\n java.util.List<java.lang.String> rootCertsData, @org.jetbrains.annotations.Nullable()\n java.lang.String keyId) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getDirectoryServerId() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getDsCertificateData() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.util.List<java.lang.String> component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.util.List<java.lang.String> getRootCertsData() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component4() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getKeyId() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption[] newArray(int size) {\n return null;\n }\n }\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000.\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u00c7\\u0002\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\t\\u0010\\u0003\\u001a\\u00020\\u0004H\\u00d6\\u0001J\\u0013\\u0010\\u0005\\u001a\\u00020\\u00062\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\bH\\u0096\\u0002J\\b\\u0010\\t\\u001a\\u00020\\u0004H\\u0016J\\u0019\\u0010\\n\\u001a\\u00020\\u000b2\\u0006\\u0010\\f\\u001a\\u00020\\r2\\u0006\\u0010\\u000e\\u001a\\u00020\\u0004H\\u00d6\\u0001\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$BlikAuthorize;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"()V\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class BlikAuthorize extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize INSTANCE = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize> CREATOR = null;\n \n private BlikAuthorize() {\n super();\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @androidx.annotation.RestrictTo(value = {androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP})\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000:\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0006\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u000e\\n\\u0000\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\r\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\t\\u0010\\u0007\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u0013\\u0010\\b\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003H\\u00c6\\u0001J\\t\\u0010\\t\\u001a\\u00020\\nH\\u00d6\\u0001J\\u0013\\u0010\\u000b\\u001a\\u00020\\f2\\b\\u0010\\r\\u001a\\u0004\\u0018\\u00010\\u000eH\\u00d6\\u0003J\\t\\u0010\\u000f\\u001a\\u00020\\nH\\u00d6\\u0001J\\t\\u0010\\u0010\\u001a\\u00020\\u0011H\\u00d6\\u0001J\\u0019\\u0010\\u0012\\u001a\\u00020\\u00132\\u0006\\u0010\\u0014\\u001a\\u00020\\u00152\\u0006\\u0010\\u0016\\u001a\\u00020\\nH\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006\\u00a8\\u0006\\u0017\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$WeChatPayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"weChat\", \"Lcom/stripe/android/model/WeChat;\", \"(Lcom/stripe/android/model/WeChat;)V\", \"getWeChat\", \"()Lcom/stripe/android/model/WeChat;\", \"component1\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class WeChatPayRedirect extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n private final com.stripe.android.model.WeChat weChat = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect copy(@org.jetbrains.annotations.NotNull()\n com.stripe.android.model.WeChat weChat) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public WeChatPayRedirect(@org.jetbrains.annotations.NotNull()\n com.stripe.android.model.WeChat weChat) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.WeChat component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.WeChat getWeChat() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect[] newArray(int size) {\n return null;\n }\n }\n }\n }\n}",
"private String preparaMensaje(String mensaje){\n String binario;\n int longitud = 0;\n String bi=\"\";\n longitud = mensaje.length() + 4;\n for( int i = 15; i>=0; i--){\n bi += ( ( ( longitud & ( 1<<i ) ) > 0 ) ? \"1\" : \"0\" ) ;\n }\n return binario = cadenaABinario(\" \") + bi + cadenaABinario(mensaje);\n }",
"public static String bitMapToBase64String(Bitmap bitmap){\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteStream);\n byte[] byteArray = byteStream.toByteArray();\n String baseString = Base64.encodeToString(byteArray,Base64.DEFAULT);\n return baseString;\n }",
"public final String deu() {\n String str;\n AppMethodBeat.i(26738);\n String str2 = \"\";\n synchronized (this) {\n try {\n if (this.iPr == null || this.iPr.size() <= 0) {\n str = \"\";\n } else {\n int i = 0;\n while (i < this.iPr.size()) {\n com.tencent.mm.plugin.wenote.model.a.c cVar = (com.tencent.mm.plugin.wenote.model.a.c) this.iPr.get(i);\n switch (cVar.getType()) {\n case -1:\n str = str2 + \"<hr/>\";\n break;\n case 1:\n i iVar = (i) cVar;\n if (!bo.isNullOrNil(iVar.content)) {\n str2 = str2 + iVar.content;\n if (i + 1 < this.iPr.size() && ((com.tencent.mm.plugin.wenote.model.a.c) this.iPr.get(i + 1)).getType() == 1 && !bo.isNullOrNil(((i) this.iPr.get(i + 1)).content)) {\n str = str2 + \"<br/>\";\n break;\n }\n }\n str = str2 + \"<br/>\";\n break;\n case 2:\n str = str2 + dO(((f) cVar).uOo, 2);\n break;\n case 3:\n str = str2 + dO(((g) cVar).uOo, 3);\n break;\n case 4:\n l lVar = (l) cVar;\n str = str2 + dO(lVar.uOo, lVar.getType());\n break;\n case 5:\n str = str2 + dO(((d) cVar).uOo, 5);\n break;\n case 6:\n str = str2 + dO(((k) cVar).uOo, 6);\n break;\n case 20:\n str = str2 + dO(((com.tencent.mm.plugin.wenote.model.a.b) cVar).uOo, 20);\n break;\n default:\n str = str2;\n break;\n }\n i++;\n str2 = str;\n }\n str = str2.replaceAll(IOUtils.LINE_SEPARATOR_UNIX, \"<br/>\");\n AppMethodBeat.o(26738);\n }\n } finally {\n while (true) {\n AppMethodBeat.o(26738);\n }\n }\n }\n return str;\n }",
"private byte[] datosInicio() {\n\tbyte comando = 1;\n\tbyte borna = (byte) sens.getNum_borna();\n\tbyte parametro1 = 0;\n\tbyte parametro2 = 0;\n\tbyte parametro3 = 0;\n\tbyte checksum = (byte) (comando + borna + parametro1 + parametro2 + parametro3);\n\n\t// Duermo para que le de tiempo a generar el puerto\n\ttry {\n\t Thread.sleep(IrrisoftConstantes.DELAY_SENSOR_RUN);\n\t} catch (InterruptedException e1) {\n\t if (logger.isErrorEnabled()) {\n\t\tlogger.error(\"Hilo interrumpido: \" + e1.getMessage());\n\t }\n\t}\n\n\tif (logger.isInfoEnabled()) {\n\t logger.info(\"Churro_Anemometro = \" + comando + \", \" + borna + \", \"\n\t\t + parametro1 + \", \" + parametro2 + \", \" + parametro3 + \", \"\n\t\t + checksum);\n\t}\n\n\tchurro[0] = comando;\n\tchurro[1] = borna;\n\tchurro[2] = parametro1;\n\tchurro[3] = parametro2;\n\tchurro[4] = parametro3;\n\tchurro[5] = checksum;\n\n\tif (!serialcon.serialPort.isOpened()) {\n\t SerialPort serialPort = new SerialPort(\n\t\t serialcon.serialPort.getPortName());\n\t serialcon.setSerialPort(serialPort);\n\t serialcon.conectaserial(sens.getNum_placa());\n\t}\n\n\treturn churro;\n }",
"public void llenarDiccionario(){\n String[] letras = {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\n \"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"1\",\"2\",\"3\",\"4\",\n \"5\",\"6\",\"7\",\"8\",\"9\",\" \"};\n String[] encriptado = {\"!\",\"]\",\"^\",\"æ\",\"ü\",\"×\",\"¢\",\"þ\",\"@\",\"§\",\"«\",\n \"A\",\"¥\",\"~\",\"c\",\"r\",\"z\",\"W\",\"8\",\"ç\",\"2\",\"L\",\"f\",\"&\",\"#\",\"[\",\",\",\n \"p\",\"Q\",\"K\",\"m\",\"s\",\"J\",\"V\",\"b\",\"U\",\"-\"};\n for (int i = 0; i < 36; i++) {\n diccionarioEncriptado.put(letras[i], encriptado[i]);\n }\n \n }",
"public String cargarDatos()\r\n/* 137: */ {\r\n/* 138:163 */ limpiar();\r\n/* 139:164 */ return \"\";\r\n/* 140: */ }",
"public String emitAsImageBase64() {\n BufferedImage img = emitAsBufferedImage();\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", os);\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n Base64 b64 = new Base64();\n String result = b64.encode(os.toByteArray());\n try {\n os.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return result;\n }",
"static Image bityNaObraz(String image) throws IOException\n {\n byte[] rysunek = DatatypeConverter.parseBase64Binary(image); \n BufferedImage img = ImageIO.read(new ByteArrayInputStream(rysunek));\n return img;\n }",
"public static String decodificarImagen(byte[] imagen){\n\t\tif(imagen!=null && imagen.length>0){\n\t\t\treturn \"data:image/jpeg;base64,\"+DatatypeConverter.printBase64Binary(imagen);\n\t\t}\n\t\treturn null;\n\t}",
"private String decodageMot(String message) {\n if (message == null || message.equals(\"\")) {\n throw new AssertionError(\"Texte non saisie\");\n } \n return transformWords(message, 2);\n }",
"public CodeBook getCodificacion(){\n CodeBook res=new CodeBook();\n \n //Se obtiene los valores ni\n ArrayList<Integer> n=obtenerNi(obtenerYi());\n \n //Se asigna a cada carácter un código\n ArrayList<String> candidatos;\n int i=0;\n int cont_alfa=0;\n int nd=0;\n \n // Se comprueba para cada ni si es mayor que 0, en cuyo caso, se generan\n // los posibles códigos de longitud i que quedan libres y se asignan.\n while (i<n.size()){\n nd=nd*base;\n int cont=n.get(i);\n if (cont>0){\n candidatos=generaCod(i+1,nd);\n int cod=0;\n while (cont>0){\n res.add(alfabeto.getN(cont_alfa), candidatos.get(cod));\n nd++;\n cont_alfa++;\n cod++;\n cont--;\n }\n }\n i++;\n } \n return res;\n }",
"public abstract byte[] mo32305a(String str);",
"public byte[] getCompleteMD();",
"@Override\n public String toEncodedString() {\n int completeBinary = 0;\n if (this.isComplete) {\n completeBinary = 1;\n }\n return \"D\" + \" | \" + completeBinary + \" | \" + this.taskDetails + \" | \"\n + this.date.format(inputDateFormat);\n }",
"@Test\n public void testEncodeDecodeBase64() {\n ///////////////////////////////\n // plaintext=\"Text to convert.\";\n plaintext=\"ABCDEFGHIJKLMNOPQRSTUPVWYZ123456789\";\n /////////////////////////////////\n System.out.println(\"Convert following text: \"+plaintext);\n \n System.out.println(\"::encodeBase64::\");\n \n byte[] plaindata = plaintext.getBytes();\n byte[] tmp = Base64Encoder.encodeBase64(plaindata);\n this.storeEncoding=new String(tmp);\n System.out.println(storeEncoding);\n System.out.println(\"::decodeBase64::\");\n byte[] base64Message = this.storeEncoding.getBytes();\n byte[] expResult = plaindata;\n byte[] result = Base64Encoder.decodeBase64(base64Message);\n String decodedText=new String(result);\n System.out.println(\"Decoded Text: \"+decodedText);\n assertArrayEquals(expResult, result);\n }",
"private static String convertDonnee(String donnee){\n byte[] tableau = convert.toBinaryFromString(donnee);\n StringBuilder sbDonnee = new StringBuilder();\n for (int i =0; i<tableau.length;i++){\n String too=Byte.toString(tableau[i]);\n sbDonnee.append(convert.decimalToBinary(Integer.parseInt(too)));\n }\n return sbDonnee.toString();\n }",
"public static String m136430b(String str) throws IOException {\n return new String(Base64.encodeBase64(m136428a(new File(str))));\n }",
"com.google.protobuf.ByteString\n getAdresaBytes();",
"private void bщ04490449щ0449щ(rrrrrr.rcccrr r6) {\n /*\n r5 = this;\n r4 = 0;\n r0 = r6.getJsonData();\t Catch:{ Exception -> 0x0056 }\n r1 = new rrrrrr.ccrcrc;\t Catch:{ Exception -> 0x0056 }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0056 }\n r2.<init>();\t Catch:{ Exception -> 0x0056 }\n r3 = r5.bнн043Dннн;\t Catch:{ Exception -> 0x0056 }\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = r3.getFilesDir();\t Catch:{ Exception -> 0x0056 }\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = java.io.File.separator;\t Catch:{ Exception -> 0x0056 }\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = \"3HC4C-01.txt\";\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0056 }\n r1.<init>(r2);\t Catch:{ Exception -> 0x0056 }\n r2 = bЗ04170417ЗЗЗ;\n r3 = bЗЗЗ0417ЗЗ;\n r3 = r3 + r2;\n r2 = r2 * r3;\n r3 = b04170417З0417ЗЗ;\n r2 = r2 % r3;\n switch(r2) {\n case 0: goto L_0x0041;\n default: goto L_0x0039;\n };\n L_0x0039:\n r2 = 38;\n bЗ04170417ЗЗЗ = r2;\n r2 = 29;\n b041704170417ЗЗЗ = r2;\n L_0x0041:\n r1.load();\t Catch:{ Exception -> 0x0056 }\n L_0x0044:\n switch(r4) {\n case 0: goto L_0x004b;\n case 1: goto L_0x0044;\n default: goto L_0x0047;\n };\t Catch:{ Exception -> 0x0056 }\n L_0x0047:\n switch(r4) {\n case 0: goto L_0x004b;\n case 1: goto L_0x0044;\n default: goto L_0x004a;\n };\t Catch:{ Exception -> 0x0056 }\n L_0x004a:\n goto L_0x0047;\n L_0x004b:\n r0 = r0.toString();\t Catch:{ Exception -> 0x0056 }\n r1.push(r0);\t Catch:{ Exception -> 0x0056 }\n r1.save();\t Catch:{ Exception -> 0x0056 }\n L_0x0055:\n return;\n L_0x0056:\n r0 = move-exception;\n goto L_0x0055;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.bщ04490449щ0449щ(rrrrrr.rcccrr):void\");\n }",
"public abstract java.lang.String getCod_dpto();",
"public static void main(String[] args) throws Exception {\n GeradorParChaves gpc = new GeradorParChaves(); \r\n gpc.geraParChaves (new File (\"chave.publica\"), new File (\"chave.privada\")); \r\n \r\n //-- Cifrando a mensagem \"Hello, world!\" \r\n byte[] textoClaro = \"Hello, world!\".getBytes(\"ISO-8859-1\"); \r\n CarregadorChavePublica ccp = new CarregadorChavePublica(); \r\n PublicKey pub = ccp.carregaChavePublica (new File (\"chave.publica\")); \r\n Cifrador cf = new Cifrador(); \r\n byte[][] cifrado = cf.cifra (pub, textoClaro); \r\n //printHex (cifrado[0]); \r\n //printHex (cifrado[1]); \r\n \r\n //-- Decifrando a mensagem \r\n CarregadorChavePrivada ccpv = new CarregadorChavePrivada(); \r\n PrivateKey pvk = ccpv.carregaChavePrivada (new File (\"chave.privada\")); \r\n Decifrador dcf = new Decifrador(); \r\n byte[] decifrado = dcf.decifra (pvk, cifrado[0], cifrado[1]); \r\n System.out.println (new String (textoClaro, \"ISO-8859-1\")); \r\n }",
"public abstract java.lang.String getCod_tecnico();",
"public void analizarArchivo(){\n\t\ttry{\n\t\t\twhile((caracter = inputStream.read())!=-1){\n\t\t\t\testado = analizador.analizarSimbolo(caracter);\n\t\t\t\t//outputStream.write(analizador.simbolo);\n\t\t\t\thistoriaStream.write(formatoEstado(estado));\n\t\t\t\tif(estado == 18 ){//La palabra es web o ebay\n\t\t\t\t\toutputStream.write(\"Auto: Línea [\"+analizador.numero_lineas+\"] Palabra: ebay \\n\");\n\t\t\t\t}else if(estado == 146){\n\t\t\t\t\toutputStream.write(\"Auto: Línea [\"+analizador.numero_lineas+\"] Palabra: web \\n\");\n\t\t\t\t}\n\t\t\t\tif(analizador.isPalabra == true || analizador.isLinea == true){\n\t\t\t\t\thistoriaStream.write(\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Num. palabras: \"+analizador.numero_palabras+\" Numero líneas: \"+analizador.numero_lineas+\" Numero correctas: \"+analizador.numero_correctas);\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private Bitmap stringToBitmap(String datos) {\n\n\t\tBitmap foto = null;\n\t\t\n\t\ttry {\n\t\t\tbyte[] byteData = Base64.decode(datos, Base64.DEFAULT);\n\t\t\tfoto = BitmapFactory.decodeByteArray(byteData, 0, byteData.length);\n\t\t\tLog.e(\"ImgArticulos\", \"Imagen convertida\");\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"ImgArticulos\", e.toString());\n\t\t}\n\n\t\treturn getScaledImage(foto);\n\n\t}",
"public static void applicaBarcode() throws InvalidPasswordException, IOException, DocumentException, SAXException, ParserConfigurationException {\n\t\tboolean processato = false;\t\t\t\t//per capire se ci sono file\r\n\t\tpath = new File(\"C:\\\\Users\\\\tommolini\\\\Desktop\\\\PROVABARCODEESTERI\\\\\");\r\n\t\tString nomePath = path.toString();\t\t\t\t\t//converto in stringa il path ottenuto in precedenza per darlo in pasto al get seguente\t\t\t\t\t//scelta cartella\r\n\t\t\t\t\r\n\t\tnew File(path + \"/Barcode\").mkdir();\t//creo la cartella per mettere i file con i barcode\r\n\t\tFile [] files = path.listFiles();\t\t//elenco tutti i file della cartella del percorso path\r\n\t\t//System.out.println(\"files: \" + files);\r\n\t\tString nomeFileSenzaEstensione;\r\n\t\tString nomeDaBarcode=\"\";\t\t\t\t\t//stringa in cui filtro il codice da mettere (prime 9 cifre del nome)\r\n\t\tint posizioneUnderscore;\r\n\t\t//System.out.println(\"files.lenght: \" + files.length);\r\n\t\t\r\n\t\tint lunghezzaListaFile= files.length;\r\n\t\t\r\n\t\tfor (int i = 0; i < files.length; i++){\t//ciclo tutti i file nella cartella\r\n\t\t\t\r\n\t\t\t//anche se ci sono dei file nella cartella con estensione diversa da .pdf non vengono considerati grazie al filtro\r\n\t\t\tif (files[i].isFile() & files[i].getName().endsWith((\".pdf\")) & !files[i].getName().contains(\"_A\")){ \t//finchè c'è un file (CON FILTRO .PDF)\r\n\t\t\t\tprocessato=true;\r\n\r\n\t\t\t\t//ripulisco il file dalla sua estensione (mi serve per sapere cosa scrivere come barcode)\r\n\t\t\t\tnomeFileSenzaEstensione = files[i].getName().replaceFirst(\"[.][^.]+$\", \"\");\t//prendo solo il nome file escludendo l'estenzione\r\n\t\t\t\t//System.out.println(\"nomeFileSenzaEstensione \" + nomeFileSenzaEstensione);\r\n\t\t\r\n\t\t\t\t\r\n\t\t\t\tposizioneUnderscore = nomeFileSenzaEstensione.indexOf(\"_\"); //trova la posizione del carattere _ fin dove devo arrivare per estrarre il barcode \r\n\t\t\t\tif (posizioneUnderscore != -1) {\t//se _ non è in posizione -1\r\n\t\t\t\t nomeDaBarcode= nomeFileSenzaEstensione.substring(0 , posizioneUnderscore); //estraggo i primi caratteri prima del primo _\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t System.out.println(\"nomeFileSenzaEstensione: \" + nomeFileSenzaEstensione + \" . Barcode estratto: \" + nomeDaBarcode);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//System.out.print(path + \"/\" + files[i].getName() + \"\\n\");\r\n\t \tPdfReader reader = new PdfReader(path + \"\\\\\" + files[i].getName());\t\t//creo flusso di lettura verso il file\r\n\t \tSystem.out.println(path + \"\\\\\" + files[i].getName());\r\n\t \tPdfStamper stamper = new PdfStamper(reader, new FileOutputStream(path + \"/Barcode/\" + files[i].getName() ));\t//creo il flusso di scrittura verso un nuovo file all'interno della cartella barcode\r\n\t\t\t \t\r\n\t \tRectangle pageSize = reader.getPageSize(1);\t\t\t\t\t\t//il parametro \"1\" si riferisce alla prima pagina\r\n\t \tPdfContentByte over = stamper.getOverContent(1);\t\t\t\t//overlay sulla prima pagina\r\n\t\t\t \r\n \tBarcode128 code128 = new Barcode128();\r\n code128.setBaseline(-1);\t\t\t\t\t\t\t\t\t\t//posizione della scritta del barcode\r\n code128.setSize(7);\t\t\t\t\t\t\t\t\t\t\t\t//dimensione della scritta del barcode\r\n code128.setCode(nomeDaBarcode);\t\t\t\t\t\t\t\t\t//codice del barcode da mostrare\r\n code128.setCodeType(Barcode128.CODE128);\t\t\t\t\t\t//codifica del barcode\r\n Image code128Image = code128.createImageWithBarcode(over, BaseColor.BLACK, BaseColor.BLACK);\t//colori del barcode\r\n code128Image.scalePercent(100, 70);\t\t\t\t\t\t\t//scala del barcode\r\n \r\n \r\n //System.out.println(\"code128Image.getWidth() \"+code128Image.getWidth());\r\n //System.out.println(\"code128Image.getHeight() \"+code128Image.getHeight());\r\n float x = pageSize.getRight() - code128Image.getWidth() - 110;\t//posizionamento del barcode rispetto alle dimensioni della pagina\r\n float y = pageSize.getTop() - code128Image.getHeight() - 10;\t//posizionamento del barcode rispetto alle dimensioni della pagina\r\n float w = pageSize.getRight() - 10;\t\t\t\t\t\t\t\t//posizionamento del barcode rispetto alle dimensioni della pagina\r\n float h = pageSize.getTop() - 10;\t\t\t\t\t\t\t\t//posizionamento del barcode rispetto alle dimensioni della pagina\r\n \r\n over.saveState();\r\n over.setColorFill(BaseColor.WHITE);\t\t\t\t\t\t\t\t//riempio lo sfondo dell'immagine col colore bianco\r\n over.rectangle(x-10, y-10, code128Image.getScaledWidth()+14, code128Image.getScaledHeight()+14);\t\t\t\t\t\t\t//imposto le dimensioni del rettangolo bianco che fa da sfondo al barcode\t\t\t\t\t\r\n over.fill();\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n over.restoreState();\r\n code128Image.setAbsolutePosition(x-10, y-10);\t\t\t\t\t//imposto la posizione in termini di riferimento assoluti dell'immagine che vado ad aggiungere\r\n over.addImage(code128Image); \t\t\t\t\t\t\t\t//aggiungo l'immagine al pdf\t \t\r\n \r\n\r\n \r\n\t \tstamper.close();\t\t\t\t\t\t\t\t\t\t\t\t//chiudo la scrittura\r\n\t reader.close();\t\t\t\t\t\t\t\t\t\t\t\t\t//chiudo la lettura\r\n\t \r\n\t //System.out.println(\"ifffff \");\r\n\t //elimino i file nella cartella in cui li ho scaricati\r\n\t //files[i].delete();\r\n\r\n\t\t\t} \r\n\t\t}\t\r\n\t}",
"public ControladorArchivos() {\n diccionarioEncriptado = new HashMap<>();\n llenarDiccionario();\n for (Map.Entry<String, String> entry : diccionarioEncriptado.entrySet()) {\n String key = entry.getKey();\n String value = entry.getValue();\n System.out.println(key);\n }\n }",
"private static String convertToHex(byte[] data) throws IOException {\n //create new instance of string buffer\n StringBuffer stringBuffer = new StringBuffer();\n String hex = \"\";\n\n //encode byte data with base64\n hex = Base64.getEncoder().encodeToString(data);\n stringBuffer.append(hex);\n\n //return string\n return stringBuffer.toString();\n }",
"private String decodageCesar(String text) {\n if (text == null || text.equals(\"\")) {\n throw new AssertionError(\"Aucun texte n'est saisie\");\n }\n String decoding = decodageMot(text);\n SubstCipher decodingText = new SubstCipher(this.shiftAlea);\n decodingText.ensureNegativeShift();\n decodingText.buildShiftedTextFor(decoding);\n return decodingText.getLastShiftedText();\n }",
"private static java.lang.String getFcFromRuim(byte r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.mediatek.internal.telephony.uicc.SsIccFileFetcher.getFcFromRuim(byte):java.lang.String, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.uicc.SsIccFileFetcher.getFcFromRuim(byte):java.lang.String\");\n }",
"public String encriptarMensajeArchivo(String mensaje){\n \n String textoEncriptado=\"\";\n \n for (int i = 0; i < mensaje.length(); i++) {\n String letra = mensaje.charAt(i)+\"\";\n System.out.println(letra);\n if(!letra.equals(\" \")){\n for (Map.Entry<String, String> entry : diccionarioEncriptado.entrySet()) {\n String key = entry.getKey();\n String value = entry.getValue();\n if(letra.equals(key)){\n textoEncriptado+=value;\n }\n } \n }else{\n textoEncriptado+=\"-\";\n } \n } \n return textoEncriptado;\n }",
"private void enviarLlaveSimetricaYReto() {\n\t\tString reto = \"reto\";\n\n\t\ttry {\n\t\t\tllaveSecreta = generarLlave(algSimetrica);\n\t\t\tbyte[] llaveSim=llaveSecreta.getEncoded();\n\t\t\tbyte[] simetrica = encriptarAsimetrico(llaveSim, llavePublica, algAsimetrica);\n\t\t\tout.println(printBase64Binary(simetrica));\n\t\t\tout.println(reto);\n\t\t\tString linea = in.readLine();\n\t\t\tbyte[] msg = parseBase64Binary(linea);\n\t\t\tbyte[] msgDecifrado = decriptadoSimetrico(msg, llaveSecreta, algSimetrica);\n\t\t\tSystem.out.println(\"Este es el mensaje descifrado:\" +printBase64Binary(msgDecifrado));\n\t\t\tif(!printBase64Binary(msgDecifrado).equals(\"reto\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error al decifrar el mensaje\");\n\t\t\t\tout.println(ERROR);\n\t\t\t}\n\t\t\tout.println(OK);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error generando llave simetrica\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private static String getFormattedText(byte[] bytes) {\n\t\tint len = bytes.length;\n\t\tStringBuilder buf = new StringBuilder(len * 2);\n\t\t// 把密文转换成十六进制的字符串形式\n\t\tfor (int j = 0; j < len; j++) {\n\t\t\tbuf.append(HEX_DIGITS[(bytes[j] >> 4) & 0x0f]);\n\t\t\tbuf.append(HEX_DIGITS[bytes[j] & 0x0f]);\n\t\t}\n\t\treturn buf.toString();\n\t}",
"private static String getFormattedText(byte[] bytes) {\n\t\tint len = bytes.length;\n\t\tStringBuilder buf = new StringBuilder(len * 2);\n\t\t// 把密文转换成十六进制的字符串形式\n\t\tfor (int j = 0; j < len; j++) {\n\t\t\tbuf.append(HEX_DIGITS[(bytes[j] >> 4) & 0x0f]);\n\t\t\tbuf.append(HEX_DIGITS[bytes[j] & 0x0f]);\n\t\t}\n\t\treturn buf.toString();\n\t}",
"public final String mo4983Fk() {\n AppMethodBeat.m2504i(50547);\n StringBuffer stringBuffer = new StringBuffer();\n stringBuffer.append(\"Tid:\").append(this.cZt);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"VideoUrl:\").append(this.cZu);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"NewMd5:\").append(this.cVC);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"DownloadStartTime:\").append(this.cVD);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"DownloadEndTime:\").append(this.cVE);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"VideoSize:\").append(this.cVF);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"VideoDuration:\").append(this.cVG);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"VideoBitrate:\").append(this.cVH);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"AudioBitrate:\").append(this.cVI);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"VideoFps:\").append(this.cVJ);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"VideoWidth:\").append(this.cVK);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"VideoHeight:\").append(this.cVL);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"CDNIp:\").append(this.cVM);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"OriginalAudioChannel:\").append(this.cVN);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"HadPreloadSize:\").append(this.cVO);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"HadPreloadCompletion:\").append(this.cVP);\n String stringBuffer2 = stringBuffer.toString();\n AppMethodBeat.m2505o(50547);\n return stringBuffer2;\n }",
"public static String montaPalavra(byte[] letras) {\n\n\t\t// 1º defino charset\n\t\tCharset iso88591charset = Charset.forName(\"ISO-8859-1\");\n\t\t// 2º montagem da palavra\n\t\tString palavra = new String(letras, iso88591charset);\n\n\t\treturn palavra;// retorna palavra montada\n\n\t}",
"public static String encode(byte[] binaryData) {\n \n if (binaryData == null)\n return null;\n \n int lengthDataBits = binaryData.length*EIGHTBIT;\n if (lengthDataBits == 0) {\n return \"\";\n }\n \n int fewerThan24bits = lengthDataBits%TWENTYFOURBITGROUP;\n int numberTriplets = lengthDataBits/TWENTYFOURBITGROUP;\n int numberQuartet = fewerThan24bits != 0 ? numberTriplets+1 : numberTriplets;\n int numberLines = (numberQuartet-1)/19+1;\n char encodedData[] = null;\n \n encodedData = new char[numberQuartet*4+numberLines];\n \n byte k=0, l=0, b1=0,b2=0,b3=0;\n \n int encodedIndex = 0;\n int dataIndex = 0;\n int i = 0;\n if (fDebug) {\n System.out.println(\"number of triplets = \" + numberTriplets );\n }\n \n for (int line = 0; line < numberLines-1; line++) {\n for (int quartet = 0; quartet < 19; quartet++) {\n b1 = binaryData[dataIndex++];\n b2 = binaryData[dataIndex++];\n b3 = binaryData[dataIndex++];\n \n if (fDebug) {\n System.out.println( \"b1= \" + b1 +\", b2= \" + b2 + \", b3= \" + b3 );\n }\n \n l = (byte)(b2 & 0x0f);\n k = (byte)(b1 & 0x03);\n \n byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);\n \n byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);\n byte val3 = ((b3 & SIGN)==0)?(byte)(b3>>6):(byte)((b3)>>6^0xfc);\n \n if (fDebug) {\n System.out.println( \"val2 = \" + val2 );\n System.out.println( \"k4 = \" + (k<<4));\n System.out.println( \"vak = \" + (val2 | (k<<4)));\n }\n \n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val2 | ( k<<4 )];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ (l <<2 ) | val3 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ b3 & 0x3f ];\n \n i++;\n }\n encodedData[encodedIndex++] = 0xa;\n }\n \n for (; i<numberTriplets; i++) {\n b1 = binaryData[dataIndex++];\n b2 = binaryData[dataIndex++];\n b3 = binaryData[dataIndex++];\n \n if (fDebug) {\n System.out.println( \"b1= \" + b1 +\", b2= \" + b2 + \", b3= \" + b3 );\n }\n \n l = (byte)(b2 & 0x0f);\n k = (byte)(b1 & 0x03);\n \n byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);\n \n byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);\n byte val3 = ((b3 & SIGN)==0)?(byte)(b3>>6):(byte)((b3)>>6^0xfc);\n \n if (fDebug) {\n System.out.println( \"val2 = \" + val2 );\n System.out.println( \"k4 = \" + (k<<4));\n System.out.println( \"vak = \" + (val2 | (k<<4)));\n }\n \n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val2 | ( k<<4 )];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ (l <<2 ) | val3 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ b3 & 0x3f ];\n }\n \n // form integral number of 6-bit groups\n if (fewerThan24bits == EIGHTBIT) {\n b1 = binaryData[dataIndex];\n k = (byte) ( b1 &0x03 );\n if (fDebug) {\n System.out.println(\"b1=\" + b1);\n System.out.println(\"b1<<2 = \" + (b1>>2) );\n }\n byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ k<<4 ];\n encodedData[encodedIndex++] = PAD;\n encodedData[encodedIndex++] = PAD;\n } else if (fewerThan24bits == SIXTEENBIT) {\n b1 = binaryData[dataIndex];\n b2 = binaryData[dataIndex +1 ];\n l = ( byte ) ( b2 &0x0f );\n k = ( byte ) ( b1 &0x03 );\n \n byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);\n byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);\n \n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val2 | ( k<<4 )];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ l<<2 ];\n encodedData[encodedIndex++] = PAD;\n }\n \n //encodedData[encodedIndex] = 0xa;\n \n return new String(encodedData);\n }",
"private void callbitmapmethod() {\n\t\ttry {\n\t\t\tencode.clear();\n\t\t\tfor (int i = 0; i < queueItemforApproval.size(); i++) {\n\t\t\t\t/**/\n\t\t\t\tQueueString en = new QueueString();\n\t\t\t\tif (queueItemforApproval.get(i).bitmap != null) {\n\t\t\t\t\tSystem.out.println(\"bitmap is:\"\n\t\t\t\t\t\t\t+ queueItemforApproval.get(i).bitmap);\n\t\t\t\t\ten.path = convertintobase64(queueItemforApproval.get(i).bitmap);\n\t\t\t\t\tSystem.out.println(\"path is :\" + en.path);\n\t\t\t\t\t// Bitmap bitmap = decodeBase64(en.path, i);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"bitmap is null\");\n\t\t\t\t}\n\t\t\t\tencode.add(en);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"java.lang.String getAboutRaw();",
"public static String encodeTobase64(Bitmap image){\n if(image != null) {\n Bitmap image2 = image;\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n image2.compress(Bitmap.CompressFormat.PNG, 100, baos);\n byte[] b = baos.toByteArray();\n String imageEncoded = Base64.encodeToString(b, Base64.DEFAULT);\n\n Log.d(\"Image Log:\", imageEncoded);\n return imageEncoded;\n }\n else{\n return \"\";\n }\n }",
"public void fileReader2(String fin) throws IOException {\r\n Decoder decoder = new Decoder();\r\n\r\n Map<String,String> dicionario = new HashMap<String,String>();\r\n Map<String,Integer> colecaoMetais = new HashMap<String,Integer>();\r\n BufferedReader br;\r\n String alien_Sound_1,alien_Sound_2,alien_Sound_3,alien_Sound_4;\r\n\r\n try { \r\n br = new BufferedReader(new FileReader(fin));\r\n \r\n int numLinhas = 0;\r\n String line = null;\r\n while ((line = br.readLine()) != null) {\r\n\r\n /*\r\n Read up to 7 lines of Notations\r\n and saves it on a HashMap.\r\n */\r\n if(((line.substring(5,6)).equals(\"is\")) && numLinhas<7){ \r\n String AlienLang = line.substring(0,4);\r\n String RomanNumeral = line.substring(8);\r\n dicionario.put(AlienLang,RomanNumeral);\r\n System.out.println(AlienLang+\" \"+RomanNumeral);\r\n }\r\n \r\n \r\n /*\r\n Read the info given: unidades, creditos and the type of the metal.\r\n And it saves the metal and its value in a HashMap.\r\n */\r\n else if(line.charAt(line.length()-1) != '?' && (line.substring(0,6).equals(\"quanto \")==false) || line.substring(0,6).equals(\"quantos\")==false){\r\n int unidadesInt = decoder.romanToInt((dicionario.get(line.substring(0,3)) + dicionario.get(line.substring(5,8))));\r\n String metal = dicionario.get(line.substring(10,13));\r\n int creditos = decoder.romanToInt(dicionario.get(line.substring(20,21))); \r\n int metalValor = creditos/unidadesInt;\r\n\r\n colecaoMetais.put(metal,metalValor);\r\n System.out.println(metal +\" \"+ metalValor);\r\n }\r\n\r\n /*\r\n Recongnizes that this a question \"quanto vale\"\r\n and calculates it with the numbers given.\r\n if the alien numbers given are not known it will print an error messege.\r\n */\r\n else if(numLinhas>7 && (line.substring(0,6).equals(\"quanto \"))){\r\n alien_Sound_1 = line.substring(12,15);\r\n alien_Sound_2 = line.substring(17,20);\r\n alien_Sound_3 = line.substring(22,25);\r\n alien_Sound_4 = line.substring(27,30);\r\n\r\n if(((dicionario.containsKey(alien_Sound_1) == false || \r\n (dicionario.containsKey(alien_Sound_2)) == false) || \r\n (dicionario.containsKey(alien_Sound_3)) == false) ||\r\n (dicionario.containsKey(alien_Sound_4)) == false){\r\n System.out.println(\"I have no idea what you are talking about\");\r\n\r\n }\r\n\r\n int finalCreditos = decoder.romanToInt(dicionario.get(alien_Sound_1)\r\n + (dicionario.get(alien_Sound_2))\r\n + (dicionario.get(alien_Sound_3)\r\n + (dicionario.get(alien_Sound_4))));\r\n\r\n System.out.println(alien_Sound_1 +\" \"+ alien_Sound_2 +\" \"+ alien_Sound_3 +\" \"+ alien_Sound_4 +\" is \"+ finalCreditos);\r\n }\r\n /*\r\n Recongnizes that this a question \"quantos créditos são\"\r\n and calculates it with the numbers and kind of metal given.\r\n if the alien numbers given or the metal are not known it will print an error messege.\r\n */\r\n if(line.charAt(line.length()-1) == '?' && (line.substring(0,6).equals(\"quantos\"))){\r\n alien_Sound_1 = line.substring(21,24);\r\n alien_Sound_2 = line.substring(26,29);\r\n alien_Sound_3 = line.substring(31,34);\r\n\r\n if(((dicionario.containsKey(alien_Sound_1) == false) || \r\n (dicionario.containsKey(alien_Sound_2) == false) || \r\n (colecaoMetais.containsKey(alien_Sound_3) == false))){\r\n System.out.println(\"I'm sorry Dave, I'm afraid I can't do that\");\r\n }\r\n\r\n int finalUnidades = decoder.romanToInt(dicionario.get(alien_Sound_1) + (dicionario.get(alien_Sound_2)));\r\n int valorMetal = colecaoMetais.get(alien_Sound_3);\r\n int finalMetalValue = finalUnidades * valorMetal;\r\n\r\n System.out.println(alien_Sound_1 +\" \"+ alien_Sound_2 +\" \"+ alien_Sound_3 +\" is \"+ finalMetalValue);\r\n }\r\n\r\n numLinhas++;\r\n \r\n }\r\n br.close();\r\n\r\n }\r\n catch(IOException e) \r\n { \r\n e.printStackTrace(); \r\n } \r\n \r\n }",
"public StringBuilder decodeSecretData(){\n\n // Define some initial variables required\n ArrayList<int[]> colourData = null; // Stores data about the next two colours to manipulate\n int firstColour; // Stores the first colour to be manipulated\n StringBuilder binary = new StringBuilder(); // Stores the data we wish have decoded (in bits)\n\n // Define some variables for determining which pixels to manipulate\n int currentColourPosition = -1;\n int currentLSBPosition = -1 ;\n int[] firstPosition = generateNextPosition(new int[] {17, 0}, false);\n\n // Loop through binary data to be inserted\n while(firstPosition[0] != endPositionX || firstPosition[1] != endPositionY || currentLSBPosition != endLSBPosition) {\n\n // Get the colour data required for embedding\n colourData = getNextData(firstPosition, currentColourPosition, currentLSBPosition);\n\n // Update positional information\n firstPosition = colourData.get(0);\n currentColourPosition = colourData.get(1)[0];\n currentLSBPosition = colourData.get(2)[0];\n\n // Get the next colour channel data\n firstColour = getColourAtPosition(firstPosition[0], firstPosition[1], currentColourPosition);\n\n // Append the retrieved binary data to the final string of data\n binary.append(getSpecificLSB(firstColour, lsbsToConsider.get(currentLSBPosition)));\n }\n\n return binary;\n }",
"private byte[] toBytes(String obj){\n return Base64.getDecoder().decode(obj);\n }",
"private String byteToBase64(final byte[] bytes) {\n String str = DatatypeConverter.printBase64Binary(bytes);\n return str;\n }",
"private Base64() {\r\n }",
"static String convertToBase64(byte[] image){\n return !Objects.isNull(image)\n ? Base64.getEncoder().encodeToString(image)\n : \"\";\n }",
"public byte[] packAllData1(byte[] data) {\n byte[] message = null;\n try{\n //CRC\n int crc16 = alisa.CRC.crc16(data, 0, data.length);\n byte hi = (byte)((crc16 >> 8) & 0xff);\n byte lo = (byte)(crc16 & 0xff);\n\n //crcData <- data + [hi][lo]\n byte[] crcData = new byte[data.length + 2];\n System.arraycopy(data, 0, crcData, 0, data.length);\n crcData[crcData.length-2] = hi;\n crcData[crcData.length-1] = lo;\n System.out.println(\"File-\" + this._id + \": key length = \" +this._key.length);\n byte[] secret = new Encode().encrypt(crcData, this._key);\n\n //check, can the encoded data be decode and crc?. before send it to server\n byte[] decode = new Encode().decrypt(secret, this._key);\n if(alisa.CRC.crc16(decode, 0, decode.length) != 0){\n System.out.println(\"File-\" + this._id + \": Wrong Encoding data!!\");\n return packAllData1(data);\n }\n\n System.out.println(\"File-\" + this._id + \": Password = \" +this._password + \"\\n\" + \"File-\" + this._id + \": Hash = \" + new String(this._key, \"ISO-8859-1\"));\n // //---------show crc data------------------------\n // String show2 = \"\";\n // for(int i =0; i < crcData.length; i++){\n // show2 += (int)crcData[i] + \" \";\n // }\n // System.out.println(\"File-\" + this._id + \" crcData: \" + show2);\n // //------------------------------------------\n // //---------show encnrypted data-----------------\n // String show3 = \"\";\n // for(int i =0; i < secret.length; i++){\n // show3 += (int)secret[i] + \" \";\n // }\n // System.out.println(\"File-\" + this._id + \" secret(no header): \" + show3);\n // //------------------------------------------\n // //---------show decnrypted data-----------------\n // String show4 = \"\";\n // for(int i =0; i < decode.length; i++){\n // show4 += (int)decode[i] + \" \";\n // }\n // System.out.println(\"File-\" + this._id + \" decodeed secret: \" + show4);\n // //------------------------------------------\n\n message = new byte[secret.length + 4];\n System.arraycopy(secret, 0, message, 3, secret.length);\n message[0] = (byte)255;\n message[1] = (byte)((this._id >> 8) & 0xff);\n message[2] = (byte)(this._id & 0xff);\n message[message.length-1] = (byte)254;\n }catch(Exception e){\n System.out.println(\"File-\" + this._id + \": packAllData Error\");\n try { Thread.sleep(this._interval); } catch (InterruptedException ex) { }\n return packAllData1(data);\n }\n return message;\n }",
"private void cargarPreescripcionMedica() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\tparametros.put(\"ocultaValor\", \"\");\r\n\t\tparametros.put(\"admision\", admision_seleccionada);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false, \"/pages/receta_rips.zul\",\r\n\t\t\t\t\"PRESCRIPCION MEDICA\", parametros);\r\n\t}",
"public void stringcon()\n {\n int i,j,k;\n int temp[]=new int[8];\n int a[]=new int[32];\n i=0;\n j=0;\n for(i=0;i<10000;i++)\n bytes[i]=0;\n i=0;\n maxbinary1=0;\n for(i=0;i<24;i++)\n a[i]=binary[i];\n for(i=0;i<24;i++)\n maxbinary1+=a[i]*Math.pow(2,23-i);\n maxbinary2=maxbinary1*8;\n ivalue=0;\n for(i=24,j=0;i<32;i++,j++)\n {\n a[j]=binary[i];\n ivalue+=a[j]*Math.pow(2,7-j);\n }\n if(ivalue==73)\n {\n i=32;\n while(i<maxbinary2)\n {\n for(k=0;k<=7;k++)\n temp[k]=binary[i++];\n for(k=0;k<=7;k++)\n bytes[j]+=temp[k]*Math.pow(2,7-k);\n j++;\n }\n String s=JOptionPane.showInputDialog(this,\"Enter key with 16 letters\");\n char ch[]=new char[s.length()];\n ch=s.toCharArray();\n try\n {\n FileOutputStream f=new FileOutputStream(\"key1.txt\");\n for(i=0;i<ch.length;i++)\n f.write(ch[i]);\n f.close();\n FileOutputStream fout=new FileOutputStream(\"enc1.txt\");\n DataOutputStream d=new DataOutputStream(fout);\n \t\ti=8;\n while(i<(maxbinary1))\n \t\t {\n \t\t\td.write(bytes[i]);\n\t\t i++;\n \t\t }\n fout.close();\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n\n ideaalgo b=new ideaalgo();\n b.procedure();\n b.decryption(\"enc1.txt\");\n try\n {\n BufferedReader d;\n StringBuffer sb=new StringBuffer();\n d=new BufferedReader(new FileReader(\"dec.txt\"));\n String line;\n while((line=d.readLine())!=null)\n sb.append(line+\"\\n\");\n ta.setText(sb.toString());\n d.close();\n }\ncatch(Exception e)\n {\n System.out.println(e);\n }\n }\n}",
"public final void mo75263ad() {\n String str;\n super.mo75263ad();\n if (C25352e.m83313X(this.f77546j)) {\n if (C6399b.m19944t()) {\n if (!C6776h.m20948b(mo75261ab(), C25352e.m83305P(this.f77546j)) && C25371n.m83443a(mo75261ab())) {\n C25371n.m83471b(mo75261ab(), C25352e.m83305P(this.f77546j));\n }\n } else if (!DownloaderManagerHolder.m75524a().mo51673b(C25352e.m83241x(this.f77546j))) {\n C19535g a = DownloaderManagerHolder.m75524a();\n String x = C25352e.m83241x(this.f77546j);\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme.getAwemeRawAd();\n if (awemeRawAd == null) {\n C7573i.m23580a();\n }\n C7573i.m23582a((Object) awemeRawAd, \"mAweme.awemeRawAd!!\");\n Long adId = awemeRawAd.getAdId();\n C7573i.m23582a((Object) adId, \"mAweme.awemeRawAd!!.adId\");\n long longValue = adId.longValue();\n Aweme aweme2 = this.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n C19386b a2 = C22943b.m75512a(\"result_ad\", aweme2.getAwemeRawAd(), false);\n Aweme aweme3 = this.f77546j;\n C7573i.m23582a((Object) aweme3, \"mAweme\");\n AwemeRawAd awemeRawAd2 = aweme3.getAwemeRawAd();\n if (awemeRawAd2 == null) {\n C7573i.m23580a();\n }\n a.mo51670a(x, longValue, 2, a2, C22942a.m75508a(awemeRawAd2));\n }\n }\n m110463ax();\n if (!C25352e.m83313X(this.f77546j) || C6776h.m20948b(mo75261ab(), C25352e.m83305P(this.f77546j)) || DownloaderManagerHolder.m75524a().mo51673b(C25352e.m83241x(this.f77546j))) {\n C24961b b = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"click\");\n if (C25352e.m83313X(this.f77546j)) {\n str = \"download_button\";\n } else {\n str = \"more_button\";\n }\n b.mo65283e(str).mo65270a(mo75261ab());\n }\n }",
"private String criptografaECompactaOrdem(File ordem, String arqAProcessar[]) throws Exception\n\t{\n\t\tlong numOrdem = getNumeroOrdem(ordem);\n\n\t\tString requisitante = getIdRequisitante(numOrdem);\n\t\t/* Se o requisitante ou a ordem nao for encontrada\n\t\t * o GPP retorna o valor NAO_DISPONIVEL para o id do\n\t\t * requisitante. Neste caso o metodo termina, pois\n\t\t * nada pode ser feito com os arquivos da ordem. Caso\n\t\t * os arquivos a serem processados tambem seja uma\n\t\t * referencia nula, o procedimento e o mesmo\n\t\t */\n\t\tif (requisitante.equals(GPPTransferenciaVoucher.REQUISITANTE_NAO_DIPONIVEL) || arqAProcessar == null)\n\t\t\treturn null;\n\t\t\t\n\t\tString nomeSoftware = getPropriedade(\"ordemVoucher.pgp\");\n\t\tString userId = getPropriedade(\"ordemVoucher.pgp.userID\");\n\t\tString verbPhrase = getPropriedade(\"ordemVoucher.pgp.verbPhrase\");\n\t\tfor (int i=0; i < arqAProcessar.length; i++)\n\t\t{\n\t\t\t/* Define a execucao do comando de criptografia */\n\t\t\tString nomeArquivo = arqAProcessar[i];\t\t\t\n//\t\t\tString cmd[] = {nomeSoftware,\"+force\",\"-es\",nomeArquivo,requisitante,\"-u\",userId,\"-z\",verbPhrase};\n\t\t\tString cmd[] = {nomeSoftware,verbPhrase,userId,requisitante,nomeArquivo};\n\n\t\t\tSystem.out.println(\"Criptografando arquivo:\"+nomeArquivo+\" ....\");\n\t\t\tRuntime rt = Runtime.getRuntime();\n\t\t\tProcess p = rt.exec(cmd);\n\t\t\tp.waitFor();\n\t\t\tif (p.exitValue() != 0)\n\t\t\t\tthrow new Exception(\"Processo de criptografia nao foi executado corretamente para o arquivo:\"+arqAProcessar[i]+\" requisitante:\"+requisitante+\" valor de saida:\"+p.exitValue());\n\t\t\t\n\t\t\t/* Fecha os \"Stream\" da classe Process\n\t\t\t * Isso evita o erro \"Too Many Open Files\" no sistema operacional\n\t\t\t */\n\t\t\tp.getOutputStream().close();\n\t\t\tp.getErrorStream().close();\n\t\t\tp.getInputStream().close();\n\t\t}\n\t\t\n\t\t/* Como este metodo ja possui o nome das caixas (arquivos de voucher)\n\t\t * que foram criptografados, entao chama o metodo responsavel \n\t\t * em compactar estes arquivos em um so com o mesmo nome do arquivo\n\t\t * de cabecalho da Ordem porem com extensao diferente\n\t\t */\n\t\tString nomeArqCompactado = compactaOrdem(ordem,arqAProcessar);\n\t\treturn nomeArqCompactado;\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tif (args.length != 2) {\n\t\t\tmensajeAyuda();\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tSecurity.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());\n\t\tMap<String, String> datos = new HashMap<String, String>();\n\t\tScanner ini = new Scanner(System.in);\n\t\tSystem.out.print(\"Nombre : \");\n\t\tString nombre = ini.nextLine();\n\t\tdatos.put(\"nombre\", nombre);\n\n\t\tSystem.out.print(\"DNI : \");\n\t\tString dni = ini.nextLine();\n\t\tdatos.put(\"dni\", dni);\n\t\t\n\t\tSystem.out.print(\"Domicilio : \");\n\t\tString domicilio = ini.nextLine();\n\t\tdatos.put(\"domicilio\", domicilio);\n\t\t\n\t\tSystem.out.print(\"Fecha : \");\n\t\tString fecha = ini.nextLine();\n\t\tdatos.put(\"fecha\", fecha);\n\n\t\tSystem.out.print(\"Lugar : \");\n\t\tString lugar = ini.nextLine();\n\t\tdatos.put(\"lugar\", lugar);\n\t\t\n\t\tSystem.out.print(\"Motivaciones : \");\n\t\tString motivaciones = ini.nextLine();\n\t\tdatos.put(\"motivaciones\", motivaciones);\n\t\tini.close();\n\n\t\tString json = Utils.map2json(datos);\n\t\tbyte[] c = json.getBytes();\n\n\t\tFileOutputStream compostela = new FileOutputStream(\"compostela.sinCifrar\");\n\t\tcompostela.write(c);\n\t\tcompostela.close();\n\t\t \n\t\t/*****************************************************************/\n\t\t//Cifrar datos de la compostela con DES con la clave secreta aleatoria\n\t\tSecurity.addProvider(new BouncyCastleProvider());\n\t\t\n\t\tKeyGenerator generadorDES = KeyGenerator.getInstance(\"DES\");\n\t\tgeneradorDES.init(56);\n\t\tSecretKey clave = generadorDES.generateKey();\n\n\t\tCipher cifrador = Cipher.getInstance(\"DES/ECB/PKCS5Padding\");\n\n\t\tcifrador.init(Cipher.ENCRYPT_MODE, clave);\n\n\t\tbyte[] buffer = new byte[1000];\n\t\tbyte[] bufferCifrado;\n\n\t\tFileInputStream in = new FileInputStream(\"compostela.sinCifrar\");\n\t\tFileOutputStream out = new FileOutputStream(\"compostela.cifrado\");\n\n\t\tint bytesLeidos = in.read(buffer, 0, 1000);\n\t\twhile (bytesLeidos != -1) {\n\t\t\tbufferCifrado = cifrador.update(buffer, 0, bytesLeidos);\n\t\t\tout.write(bufferCifrado);\n\t\t\tbytesLeidos = in.read(buffer, 0, 1000);\n\t\t}\n\t\tbufferCifrado = cifrador.doFinal(); \n\t\tout.write(bufferCifrado);\n\n\t\tin.close();\n\t\tout.close();\n\n\t\t/*****************************************************************/\n\t\t// Cifrar clave con RSA y la clave publica de la oficina\n\t\t\n\t\tbuffer = new byte[5000];\n\t\tin = new FileInputStream(args[0]);\n\t\tin.read(buffer, 0, 5000);\n\t\tin.close();\n\t\t\n\t\tX509EncodedKeySpec clavePublicaSpec = new X509EncodedKeySpec(buffer);\n\t\tKeyFactory keyFactoryRSAprofesor = KeyFactory.getInstance(\"RSA\", \"BC\");\n\t\tPublicKey clavePublicaOficina = keyFactoryRSAprofesor.generatePublic(clavePublicaSpec);\n\t\t\t\t\n\t\tcifrador = Cipher.getInstance(\"RSA\", \"BC\");\n\t\tcifrador.init(Cipher.ENCRYPT_MODE, clavePublicaOficina);\n\t\tbufferCifrado = cifrador.doFinal(clave.getEncoded());\n\n\t\tout = new FileOutputStream(\"Clave.cifrada\");\n\t\tout.write(bufferCifrado);\n\t\tout.close();\n\n\t\t/*****************************************************************************/\n\t\t// Crear firma\n\t\tbuffer = new byte[5000];\n\t\tin = new FileInputStream(args[1]);\n\t\tin.read(buffer, 0, 5000);\n\t\tin.close();\n\t\t\n\t\tPKCS8EncodedKeySpec clavePrivadaSpec = new PKCS8EncodedKeySpec(buffer);\n\t\tKeyFactory keyFactoryRSAalumno = KeyFactory.getInstance(\"RSA\", \"BC\");\n\t\tPrivateKey clavePrivadaPeregrino = keyFactoryRSAalumno.generatePrivate(clavePrivadaSpec);\n\t\t\n\t\tSignature firma = Signature.getInstance(\"SHA1withRSA\",\"BC\");\n\t\tfirma.initSign(clavePrivadaPeregrino);\n\t\t\n\t\tbuffer = new byte[1000];\n\t\tin = new FileInputStream(\"compostela.sinCifrar\");\n\t\t\n\t\tbytesLeidos = in.read(buffer, 0, 1000);\n\t\twhile (bytesLeidos != -1) {\n\t\t\tfirma.update(buffer, 0, bytesLeidos);\n\t\t\tbytesLeidos = in.read(buffer, 0, 1000);\n\t\t}\n\t\tbyte[] firmaEncriptada = firma.sign();\n\n\t\tout = new FileOutputStream(\"firma\");\n\t\tout.write(firmaEncriptada);\n\t\t\n\t\tin.close();\n\t\tout.close();\n\t\tSystem.out.println(\"Creacion correcta, buen viaje\");\n\n\t}",
"public void transcribir() \r\n\t{\r\n\t\tpalabras = new ArrayList<List<CruciCasillas>>();\r\n\t\tmanejadorArchivos = new CruciSerializacion();\r\n\t\tint contador = 0;\r\n\t\t\r\n\t\tmanejadorArchivos.leer(\"src/Archivos/crucigrama.txt\");\r\n\t\t\r\n\t\tfor(int x = 0;x<manejadorArchivos.getPalabras().size();x++){\r\n\t\t\t\r\n\t\t\tcontador++;\r\n\t\t\t\r\n\t\t\tif (contador == 4) {\r\n\t\t\t\r\n\t\t\t\tList<CruciCasillas> generico = new ArrayList<CruciCasillas>();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 0; y < manejadorArchivos.getPalabras().get(x).length();y++)\r\n\t\t\t\t{\r\n\t\t\t\t\t\tgenerico.add(new CruciCasillas(manejadorArchivos.getPalabras().get(x).charAt(y)));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (y == (manejadorArchivos.getPalabras().get(x).length() - 1)) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tpalabras.add(generico);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tcontador = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}",
"public static void main(String[] args) throws IOException {\n char[][] key = new char[8][8];\n\n String[] lines = new String[8];\n\n File fileCardan = new File(\"cardan.txt\");\n\n Scanner fileScanner = new Scanner(fileCardan);\n\n for (int i = 0; i < 8; i++) {\n lines[i] = fileScanner.nextLine();\n }\n\n for (int i = 0; i < 8; i++) {\n for (int j = 0; j < 8; j++) {\n key[i][j] = lines[i].charAt(j);\n }\n\n }\n\n // reading text from input.txt file and getting count of 64 char blocks\n String text = new String(Files.readAllBytes(Paths.get(\"input.txt\")));\n\n int blocksCount = text.length() / 64 + 1;\n\n FileWriter fw = new FileWriter(\"encode.txt\");\n\n // encoding all 64 char blocks\n for (int i = 0; i < blocksCount; i++) {\n\n char[][] res;\n if(64+i*64 > text.length())\n res = encode(key, text.substring(i*64));\n else\n res = encode(key, text.substring(i*64,64+i*64));\n fileWrite(res,fw);\n\n }\n\n fw.close();\n\n text = new String(Files.readAllBytes(Paths.get(\"encode.txt\")));\n\n fw = new FileWriter(\"decode.txt\");\n\n for (int i = 0; i < blocksCount; i++) {\n\n fw.write(decode(text.substring(i*64,i*64+64),key));\n\n }\n\n fw.close();\n\n\n\n }",
"public String decode(BufferedImage stegoImage){\n // Setup data to be used for decoding\n setupData(stegoImage);\n\n // Check parameter data will allow for successful decoding\n checkData();\n\n // Decode data from the image\n StringBuilder binary = decodeSecretData();\n\n // Convert the data back to text\n String text = getText(binary);\n\n // Return the retrieved text\n return text;\n }",
"private String beriIzDatoteke(String ime){\n\n // ustvarimo vhodni podatkovni tok\n FileInputStream inputStream;\n\n //ugotovimo, koliko je velika datoteka\n File file = new File(getFilesDir(), ime);\n int length = (int) file.length();\n\n //pripravimo spremenljivko, v katero se bodo prebrali podatki\n byte[] bytes = new byte[length];\n\n //preberemo podatke\n try {\n inputStream = openFileInput(ime);\n inputStream.read(bytes);\n inputStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //podatke pretvorimo iz polja bajtov v znakovni niz\n String vsebina = new String(bytes);\n\n return vsebina;\n }",
"public byte[] desfirmaArchivo(final String ruta, final String nombreArchivo, final String usuario, final Long idSecretaria) {\r\n try {\r\n File dir = new File(ruta);\r\n byte[] data;\r\n data = convertirArchivo(dir);\r\n\r\n if (data == null) {\r\n System.out.println(\"Error en el archivo...\");\r\n }\r\n SgCarguearchivos cargue = procesoMigracionDAO.consultaArchivo(nombreArchivo);\r\n try {\r\n try {\r\n byte[] contenido = cargueArchivosServices.validarCertificado(usuario, Base64.encodeBase64String(data), idSecretaria);\r\n if (contenido == null) {\r\n UserTransaction ut = context.getUserTransaction();\r\n ut.begin();\r\n cargue.setCarguearchivosEstado(CargueArchivoMensajes.RECHAZADO.toString());\r\n procesoMigracionDAO.actualizaEstadoArchivo(cargue);\r\n ut.commit();\r\n } else {\r\n return contenido;\r\n }\r\n } catch (Exception ex) {\r\n LOG.log(Level.SEVERE, ex.getLocalizedMessage());\r\n }\r\n } catch (Exception ex) {\r\n LOG.log(Level.SEVERE, ex.getLocalizedMessage());\r\n }\r\n } catch (Exception e) {\r\n LOG.log(Level.SEVERE, e.getLocalizedMessage());\r\n }\r\n\r\n return new byte[0];\r\n }",
"private String organizarCadena (Resultado res){\n String cadena = formatoCadenaTexto(res.getFuncion(),15) +\n formatoCadenaTexto(res.getAlgoritmo(),20) + \n res.getD() + \n \" \" + formatoDecimales(res.getPromedioIteracion(),1,6)+\n \" \" + formatoDecimales(res.getMejor_optimo(),10,10) + \n \" \" + formatoDecimales(res.getPeor_optimo(),10,10) + \n \" \" + formatoDecimales(res.getPromedioOptimos(), 10,10) + \n \" \" + formatoDecimales(res.getDesviacionOptimos(),10,15) + \n \" \" + formatoDecimales(res.getTiempoPromedio(), 3,1); \n return cadena;\n }",
"private static BitMatrix gerarBitMatrix(String conteudo, int width,\n\t\t\tint height) throws WriterException {\n\t\tQRCodeWriter writer = new QRCodeWriter();\n\t\tBitMatrix bm = writer.encode(conteudo, BarcodeFormat.QR_CODE, width,\n\t\t\t\theight);\n\t\treturn bm;\n\t}",
"public abstract java.lang.String getAcma_descripcion();",
"private static byte[] m24635a(Context context, String str) {\n String f = C6014b.m23956f();\n String string = Secure.getString(context.getContentResolver(), \"android_id\");\n String substring = str.substring(0, Math.min(8, str.length() - 1));\n StringBuilder sb = new StringBuilder();\n sb.append(substring);\n sb.append(f.substring(0, Math.min(8, f.length() - 1)));\n String sb2 = sb.toString();\n StringBuilder sb3 = new StringBuilder();\n sb3.append(sb2);\n sb3.append(string.substring(0, Math.min(8, string.length() - 1)));\n String sb4 = sb3.toString();\n if (sb4.length() != 24) {\n StringBuilder sb5 = new StringBuilder();\n sb5.append(sb4);\n sb5.append(str.substring(8, 24 - sb4.length()));\n sb4 = sb5.toString();\n }\n return sb4.getBytes();\n }",
"private byte[] PPMfile() {\n StringBuilder Finald = new StringBuilder();\n Finald.append(\"P6\");\n Finald.append(\"\\n\");\n Finald.append(width);\n Finald.append(\" \");\n Finald.append(height);\n Finald.append(\"\\n\");\n Finald.append(255);\n Finald.append(\"\\n\");\n for (int x = 0; x < height; ++x) {\n for (int y = 0; y < width; ++y) {\n char auxe = (char) FinalR[x][y];\n Finald.append(auxe);\n auxe = (char) FinalG[x][y];\n Finald.append(auxe);\n auxe = (char) FinalB[x][y];\n Finald.append(auxe);\n }\n }\n String Finaldes = Finald.toString();\n return Finaldes.getBytes();\n }",
"public static String encode(byte[] data) {\t\t\n\t\tif (data == null || data.length == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tStringBuilder resultBuffer = new StringBuilder();\n\t\t//mod\n\t\tint m = data.length % 3;\n\t\t//amount of data group with 3 byte\n\t\tint g = (m == 0) ? (data.length / 3) : (data.length / 3 + 1);\n\t\tfinal byte[] _clear_buff = {0, 0, 0};\n\t\tbyte[] dataBuffer = new byte[3];\n\t\tchar[] codeBuffer = new char[4];\n\t\tint offset = 0;\n\t\tfor (int i = 0; i < g; ++i) {\n\t\t\t//clear buffer\n\t\t\tSystem.arraycopy(_clear_buff, 0, dataBuffer, 0, 3);\n\t\t\t//copy data for handling\n\t\t\tint copySize = (m != 0 && i == g - 1) ? m : 3;\n\t\t\tSystem.arraycopy(data, offset, dataBuffer, 0, copySize);\n\t\t\t//concatenate the byte data buffer as an integer\n\t\t\tint tmp = 0x00000000;\n\t\t\tfor (int j = 0, z = 2; j < 3; ++j, --z) {\n\t\t\t\tint tt = ((dataBuffer[j] & 0xff) << (z * 8));\n\t\t\t\ttmp ^= tt;\n\t\t\t}\n\t\t\t//encode current data buffer with base64\n\t\t\tfor (int k = 0; k < 4; ++k) {\n\t\t\t\tint p = (tmp >> (k * 6)) & 0x0000003F;\n\t\t\t\tcodeBuffer[3 - k] = _dict_[p];\n\t\t\t}\n\t\t\t\n\t\t\tif (copySize != 3) {\n\t\t\t\tfor (int e = 0; e < 3 - copySize; ++e) {\n\t\t\t\t\tcodeBuffer[3 - e] = '=';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresultBuffer.append(codeBuffer);\n\t\t\toffset += 3;\n\t\t}\n\t\t\n\t\tString encodeText = resultBuffer.toString();\n\t\tresultBuffer.delete(0, resultBuffer.length());\n\t\treturn encodeText;\n\t}"
] | [
"0.66380715",
"0.65038574",
"0.6324177",
"0.6178356",
"0.5906888",
"0.5868003",
"0.5868003",
"0.5837939",
"0.5711178",
"0.57081145",
"0.56523377",
"0.5602198",
"0.5585863",
"0.5583573",
"0.5576569",
"0.55753833",
"0.5566466",
"0.55652905",
"0.555615",
"0.54918754",
"0.54799896",
"0.5478693",
"0.54669476",
"0.5464155",
"0.5434487",
"0.5426136",
"0.5401566",
"0.5399026",
"0.53948265",
"0.5391441",
"0.53461534",
"0.5336262",
"0.53281265",
"0.5318483",
"0.5313647",
"0.5309479",
"0.53085315",
"0.53009075",
"0.527581",
"0.52688193",
"0.5256666",
"0.52488446",
"0.52453125",
"0.5236245",
"0.52272284",
"0.5216919",
"0.5216437",
"0.52115566",
"0.52063084",
"0.5187618",
"0.51852155",
"0.5182115",
"0.51772994",
"0.5172828",
"0.5166851",
"0.5154892",
"0.5140265",
"0.51370287",
"0.5136199",
"0.51342976",
"0.5134008",
"0.5130264",
"0.5124929",
"0.51167387",
"0.5111091",
"0.51018715",
"0.51014054",
"0.5100466",
"0.5099703",
"0.5094369",
"0.5093323",
"0.5093323",
"0.50897974",
"0.50884306",
"0.50878435",
"0.5087142",
"0.5083716",
"0.50835985",
"0.5082946",
"0.5080299",
"0.5078623",
"0.50719684",
"0.50646996",
"0.50579363",
"0.5057074",
"0.50540155",
"0.50500965",
"0.50448924",
"0.50425017",
"0.5041818",
"0.50352436",
"0.5031289",
"0.502659",
"0.5020228",
"0.50179875",
"0.501647",
"0.5010167",
"0.500877",
"0.5006337",
"0.5005182",
"0.4999244"
] | 0.0 | -1 |
Accessor de lectura de l'atribut koncept. | public KoncepteParaula getKoncept() {
return koncept;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getAtk(){\n return atk;\n }",
"public int getAtk() {\n return atk;\n }",
"@Override\r\n public Object getAttribute() {\r\n return this.buttonKey;\r\n }",
"public int getTipoAtaque(){return tipoAtaque;}",
"Appearance getAppearance();",
"public int forma()\n {\n return Elemento.CUADRADA;\n }",
"public int getTinta()\n {\n //COMPLETE\n return this.tinta;\n }",
"public IfcCharacterStyleSelect getTextCharacterAppearance() {\n return textCharacterAppearance;\n }",
"public NodoCaracter getArbolRaiz() {\n return inicio;\n }",
"String getEtiqueta();",
"public abstract String getManipulatorButtonLabel();",
"public String getEtiqueta()\n/* 27: */ {\n/* 28:41 */ return this.etiqueta;\n/* 29: */ }",
"public JButton getBtn_instrucciones() {\n return Btn_instrucciones;\n }",
"public String getattribut() \n\t{\n\t\treturn attribut;\n\t}",
"public char getTav()\r\n\t{\r\n\t\treturn this.tav;\r\n\t}",
"public CtrlAcesso getCtrlA() {\r\n return this.ctrlAcesso;\r\n }",
"public int getNilaiBtn() {\n return nilaiBtn;\n }",
"public int getAnio() { return this.anio; }",
"public String getAesthetic() {\n return aesthetic;\n }",
"public String getTxtKondektur() {\n return txtKondektur.getText();\n }",
"public boolean getAButton() {\n\t\treturn getRawButton(A_Button);\n\t}",
"public String getAnfitrion() {\r\n\t\treturn anfitrion;\r\n\t}",
"public Number getAncho()\n {\n return (Number)getAttributeInternal(ANCHO);\n }",
"public String getAzione() {\n return azione;\n }",
"String getControllingAttributeName();",
"Attributes getAttributes();",
"public HTMLInputElement getElementTablaKey() { return this.$element_TablaKey; }",
"public MapeadorAtributos getMapeadorAtributos();",
"public int getAnio(){\r\n \r\n \r\n return this.anio;\r\n \r\n }",
"public int getAtt(){ \r\n return att;\r\n }",
"public char getRender() {\n\n return (animalChar);\n }",
"public JButton getComenzar() {\n return comenzar;\n }",
"Attribute getAttribute();",
"public char getSezione() {\r\n return this.sezione;\r\n }",
"public boolean getAButton() {\n\t\treturn getRawButton(A_BUTTON);\n\t}",
"public String getAutorizacion()\r\n/* 134: */ {\r\n/* 135:226 */ return this.autorizacion;\r\n/* 136: */ }",
"public String getAccession() {\n return accession;\n }",
"public String getNameAktivitaet() {\n return nameAktivitaet;\n }",
"@Override\n public int getAltura(){\n return(super.getAltura());\n }",
"public abstract java.lang.String getAcma_cierre();",
"int getAtk();",
"public EnumEtatOperation getEtat() {\r\n return etat;\r\n }",
"public UAC getUAC() { \r\n return getTyped(\"UAC\", UAC.class);\r\n }",
"public abstract java.lang.String getAcma_valor();",
"public char getSezione() {\r\n return this.sezione;\r\n }",
"public int getAnio()\r\n {\r\n return this._anio;\r\n }",
"public java.lang.CharSequence getKullaniciAdi() {\n return kullanici_adi;\n }",
"String getArcrole();",
"public IRAT getIraT() {\n\t\treturn iraT;\n\t}",
"public String getAttr() {\n return attr;\n }",
"public String getCitta() {\n return citta;\n }",
"public JoystickButton getButtonA() {\n\t\treturn button[0];\n\t}",
"public String getAsignatura() {\n return (sAsignatura);\n }",
"String getEditore();",
"public java.lang.CharSequence getKullaniciAdi() {\n return kullanici_adi;\n }",
"public char getIcon() {\n return this.icon;\n }",
"String getAttribute();",
"protected int getTreinAantal(){\r\n return treinaantal;\r\n }",
"public static int getLicznikTur() { return LicznikTur; }",
"public String getKontaktai() {\r\n\t\treturn kontaktai;\r\n\t}",
"@Basic( optional = true )\r\n\t@Column( length = 1 )\r\n\tpublic String getAktif() {\r\n\t\treturn this.aktif;\r\n\t\t\r\n\t}",
"public abstract java.lang.String getAcma_descripcion();",
"Modifier getModifier();",
"public int getArmadura(){return armadura;}",
"public String getLabel(){\n\t\treturn sAnzeige;\n\t}",
"public ID getActionCodeRXA() { \r\n\t\tID retVal = this.getTypedField(21, 0);\r\n\t\treturn retVal;\r\n }",
"public static int getAtChar(){\r\n\t\treturn atChar;\r\n\t}",
"public Button getSluitButton() {\n return this.sluitButton;\n }",
"public String getTermcat() {\r\n return (String) getAttributeInternal(TERMCAT);\r\n }",
"public char getName(){\n\t\treturn tipo;\n\t}",
"public JTextField getAvediscper() {\n return avediscper;\n }",
"public HTMLInputElement getElementBtnAyuda() { return this.$element_BtnAyuda; }",
"public static CtrlObras getInstancia() {\r\n return unicaInstancia;\r\n }",
"public HTMLInputElement getElementBtnPrincipal() { return this.$element_BtnPrincipal; }",
"default String getAccessibilityLabel() {\n return null;\n }",
"public abstract String getRightButtonText();",
"public char getopcion(){\n return opciones;\n }",
"public int getAncho() {\n\t\treturn ancho;\n\t}",
"public String getItalics() {\n return italics.getText(); /*FAULT:: return \"y\"; */\n }",
"public char getControlCharacter() {\r\n return ControlCharacter;\r\n }",
"public int getButacas() {\r\n\t\treturn butacas;\r\n\t}",
"public int getAtt() {\n\t\treturn att;\n\t}",
"public final String aoy() {\n return this.label;\n }",
"@Override\n public String toString() {\n return \"\" + this.getAppearance();\n }",
"public String getPress(){return this.press;}",
"public String attribute() {\n return this.attribute;\n }",
"@Override\n\tpublic char getCont() {\n\t\treturn super.getCont();\n\t}",
"public java.lang.String getATC() {\n return ATC;\n }",
"public String getApodo(){\n\t\treturn apodo;\n\t}",
"public java.lang.Boolean getAktif() {\n return aktif;\n }",
"@Override\n public java.lang.Object getUilButtonSeparation() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (UIL_BUTTON_SEPARATION_);\n return (java.lang.Object)retnValue;\n }",
"public int getPantallaApunta() {\r\n return this.iPantallaApunta;\r\n }",
"public Set<String> Atributos()\n {\n return this.repositorio.keySet();\n }",
"public String getAsignar() {\r\n return asignar;\r\n }",
"@Override\n\tpublic String getSituacion() {\n\t\treturn model.getSituacion();\n\t}",
"private javax.swing.JButton getJButtonAceptar() {\n\t\tif(jButtonAceptar == null) {\n\t\t\tjButtonAceptar = new JHighlightButton();\n\t\t\tjButtonAceptar.setText(\"Aceptar\");\n\t\t\tjButtonAceptar.setBackground(new java.awt.Color(226,226,222));\n\t\t\tjButtonAceptar.setIcon(new ImageIcon(getClass().getResource(\"/com/becoblohm/cr/gui/resources/icons/ix16x16/check2.png\")));\n\t\t}\n\t\treturn jButtonAceptar;\n\t}",
"public JTextField getTfaktual() {\n return tfaktual;\n }",
"public BasicChar getBasicChar() {\n return this.wotCharacter;\n }",
"public Short getShortAttribute();",
"public String getIvaFlag() {\n return (String) getAttributeInternal(IVAFLAG);\n }"
] | [
"0.6061672",
"0.59320146",
"0.5923804",
"0.57922024",
"0.5775482",
"0.57463545",
"0.57319725",
"0.5694271",
"0.5688415",
"0.5666908",
"0.56652975",
"0.5663722",
"0.5646704",
"0.56147385",
"0.55855906",
"0.5580808",
"0.5577565",
"0.55735934",
"0.55718774",
"0.55680466",
"0.55530435",
"0.55331457",
"0.5528965",
"0.54820764",
"0.548167",
"0.5466521",
"0.54648733",
"0.54639083",
"0.546075",
"0.5458882",
"0.5456825",
"0.5441353",
"0.5432419",
"0.5430395",
"0.5416158",
"0.5411031",
"0.5398001",
"0.5390965",
"0.5389976",
"0.5383992",
"0.5381374",
"0.5380146",
"0.5373463",
"0.53716075",
"0.5370804",
"0.53638047",
"0.5362826",
"0.5359212",
"0.53473324",
"0.5343301",
"0.5339674",
"0.5322407",
"0.5316582",
"0.53157836",
"0.531386",
"0.5303337",
"0.5297593",
"0.52966624",
"0.528898",
"0.52840936",
"0.5283745",
"0.5283368",
"0.52796113",
"0.52782226",
"0.52749753",
"0.52712435",
"0.5260598",
"0.5253817",
"0.5246898",
"0.5244329",
"0.5242492",
"0.5239615",
"0.5232146",
"0.5226545",
"0.52250874",
"0.5224697",
"0.52243614",
"0.5221413",
"0.52167124",
"0.5212101",
"0.5201421",
"0.5194506",
"0.5194163",
"0.5192627",
"0.51901335",
"0.5188771",
"0.5187335",
"0.51836085",
"0.51666594",
"0.5165332",
"0.5164778",
"0.51635027",
"0.5161458",
"0.51586884",
"0.51561534",
"0.5155945",
"0.5155875",
"0.5155507",
"0.5155019",
"0.51545954"
] | 0.58600503 | 3 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.