query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
> pega a lista de todos os produtos cadastrados
public void deleteProduto(int cd_Produto) { pdao.deleteProduto(cd_Produto); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<Produto> todosProdutos() {\n\t\treturn produtoService.todosProdutos();\n\t}", "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 List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }", "public List<Produto> listar() {\n return manager.createQuery(\"select distinct (p) from Produto p\", Produto.class).getResultList();\n }", "public List getProdutos() {\n\t\treturn null;\n\t}", "private void removeProdutos() {\n Collection<IProduto> prods = this.controller.getProdutos();\n for(IProduto p : prods) System.out.println(\" -> \" + p.getCodigo() + \" \" + p.getNome());\n System.out.println(\"Insira o codigo do produto que pretende remover da lista de produtos?\");\n String codigo = Input.lerString();\n // Aqui devia se verificar se o produto existe mas nao sei fazer isso.\n this.controller.removeProdutoControl(codigo);\n }", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "private void cargarProductos() {\r\n\t\tproductos = productoEJB.listarInventariosProductos();\r\n\r\n\t\tif (productos.size() == 0) {\r\n\r\n\t\t\tList<Producto> listaProductos = productoEJB.listarProductos();\r\n\r\n\t\t\tif (listaProductos.size() > 0) {\r\n\r\n\t\t\t\tMessages.addFlashGlobalWarn(\"Para realizar una venta debe agregar los productos a un inventario\");\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic List<Produto> listar(Produto entidade) {\n\t\treturn null;\n\t}", "public List<Producto> obtenerProductosConfigurados(List<Producto> productos){\n\t\treturn null;\n\t}", "public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }", "@Override\r\n\tpublic List prodAllseach() {\n\t\treturn adminDAO.seachProdAll();\r\n\t}", "public List<Map<String, Object>> getListaProdutos() {\n return pdao.getListaProdutos();\n }", "public List<ParProdutoQuantidade> produtosMaisComprados(String cliente){\r\n Map<String, Integer> m = new HashMap<>();\r\n for (int i = 0; i < this.numFiliais; i++){\r\n Map<String, Integer> m2 = this.filial.get(i).produtosMaisComprados(cliente);\r\n for (String produto: m2.keySet()){\r\n Integer quantidade = m.get(produto);\r\n if (quantidade == null){\r\n m.put(produto, m2.get(produto));\r\n }\r\n else {\r\n m.put(produto, quantidade + m2.get(produto));\r\n }\r\n }\r\n }\r\n Set<ParProdutoQuantidade> s = new TreeSet<>();\r\n for (String produto: m.keySet()){\r\n s.add(new ParProdutoQuantidade (produto, m.get(produto)));\r\n }\r\n List<ParProdutoQuantidade> l = new ArrayList<>();\r\n for (ParProdutoQuantidade p: s){\r\n l.add(p);\r\n }\r\n return l;\r\n }", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "private static void cadastroProduto() {\n\n\t\tString nome = Entrada(\"PRODUTO\");\n\t\tdouble PrecoComprado = Double.parseDouble(Entrada(\"VALOR COMPRA\"));\n\t\tdouble precoVenda = Double.parseDouble(Entrada(\"VALOR VENDA\"));\n String informacaoProduto = Entrada(\"INFORMAÇÃO DO PRODUTO\");\n String informacaoTecnicas = Entrada(\"INFORMAÇÕES TÉCNICAS\");\n\n\t\tProduto produto = new Produto(nome, PrecoComprado, precoVenda, informacaoProduto,informacaoTecnicas);\n\n\t\tListaDProduto.add(produto);\n\n\t}", "@Override\n\tpublic List<Produto> listarTodos() throws ControleEstoqueSqlException {\n\t\treturn null;\n\t}", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "List<Product> getProductsList();", "protected ArrayList efetuarCompra(ArrayList<Produto> produtosCtlg){\n for (int i=0; i<itens.size(); i++){\r\n for (int j=0; j<produtosCtlg.size(); j++){\r\n if (itens.get(i).getId() == produtosCtlg.get(j).getId()){\r\n produtosCtlg.get(j).setQuantidade(itens.get(i).getQtdPedida());\r\n }\r\n }\r\n }\r\n return itens;\r\n }", "public void listarProducto() {\n }", "public List<Tb_Prod_Painel_PromoBeans> getProdPainelConfig(Integer terminal, Integer painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \"where terminal=? and painel=? order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal);\r\n pstm.setInt(2, painel);\r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>();\r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "public static void deletarProdutos(){\n if(ListaDProduto.isEmpty()){\n SaidaDados(\"Nenhum produto cadastrado\");\n return;\n } \n ListaDProduto.clear();\n SaidaDados(\"Todos produto deletado com sucesso\");\n \n \n }", "public HashSet<String> conjProdutos(){\n return (HashSet)produtosComprados.values().stream().collect(Collectors.toSet());\n }", "public List<Tb_Prod_Painel_PromoBeans> getProdPainelTabelas(Integer terminal, String painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel in(\" + painel + \") order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal); \r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>(); \r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "@POST\r\n @GET\r\n @Path(\"/v1.0/produtos\")\r\n @Consumes({ WILDCARD })\r\n @Produces({ APPLICATION_ATOM_XML, APPLICATION_JSON + \"; charset=UTF-8\" })\r\n public Response listarProdutos() {\r\n\r\n log.debug(\"listarProdutos: {}\");\r\n\r\n try {\r\n\r\n List<Produto> produtos = produtoSC.listar();\r\n\r\n return respostaHTTP.construirResposta(produtos);\r\n\r\n } catch (Exception e) {\r\n\r\n return respostaHTTP.construirRespostaErro(e);\r\n }\r\n }", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public List<Tb_Prod_Painel_PromoBeans> getProdPainel(Integer terminal, Integer painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel=? order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal);\r\n pstm.setInt(2, painel);\r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>();\r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "private List<Produto> retornaProduto (Long cod){\n \n Query q = entityManager.createNamedQuery(\"Produto.findByCodigo\");\n q.setParameter(\"codigo\", cod);\n List <Produto> p = q.getResultList();\n return p; \n}", "@Override\n\t@Transactional(readOnly = true)\n\tpublic List<ProdutoPedido> buscarTodos() {\n\t\treturn dao.findAll();\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 static void apagarProduto(){\n if(ListaDProduto.size() == 0){\n SaidaDados(\"Nehum produto cadastrado!!\");\n return;\n }\n \n String pesquisarNome = Entrada(\"Informe o nome do produto que deseja deletar: \");\n for(int i =0; i < ListaDProduto.size(); i++){\n \n Produto produtoProcurado = ListaDProduto.get(i);\n \n if(pesquisarNome.equalsIgnoreCase(produtoProcurado.getNome())){\n ListaDProduto.remove(i);\n SaidaDados(\"Produto deletado com sucesso!!\");\n }\n \n }\n \n }", "public List getPorPertenceAProduto(long id) throws DaoException {\n\t\tsetMontador(null);\n\t\tString sql;\n \tsql = \"select \" + camposOrdenadosJoin() + \" from \" + tabelaSelect() + \n outterJoinAgrupado() +\n \t\" where id_produto_pa = \" + id + orderByLista();\n \tsetMontador(getMontadorAgrupado());\n \treturn getListaSql(sql);\n\t}", "public List<InsumoPedidoProveedorDAO> listarInsumosPedidos(){\n ArrayList<InsumoPedidoProveedorDAO> insumos_pedidos_proveedor = new ArrayList<InsumoPedidoProveedorDAO>();\n List<InsumoPedido> insumos_pedidos = this.procedureQueryPedido.listarInsumosPedidos();\n \n for (int i = 0; i< insumos_pedidos.size();i++){\n InsumoPedidoProveedorDAO ins = new InsumoPedidoProveedorDAO();\n ins.setInsumoPedido(insumos_pedidos.get(i));\n Insumo insumo = new Insumo();\n insumo = insumoService.retornarInsumoById(insumos_pedidos.get(i).getIdInsumo().getIdInsumo());\n ins.setInsumo(insumo);\n ins.setProveedores(this.procedureQueryPedido.listarProveedoresConInsumoPedido(BigInteger.valueOf(insumo.getIdInsumo())));\n insumos_pedidos_proveedor.add(ins);\n }\n return insumos_pedidos_proveedor;\n //return this.insumoPedidoDao.findAll();\n }", "@GetMapping(\"buscarProductos\")\n\tpublic List<Producto> getProductos(){\n\t\treturn this.productoServicios.findAll();\n\t}", "private static void VeureProductes (BaseDades bd) {\n ArrayList <Producte> llista = new ArrayList<Producte>();\n llista = bd.consultaPro(\"SELECT * FROM PRODUCTE\");\n if (llista != null)\n for (int i = 0; i<llista.size();i++) {\n Producte p = (Producte) llista.get(i);\n System.out.println(\"ID=>\"+p.getIdproducte()+\": \"\n +p.getDescripcio()+\"* Estoc: \"+p.getStockactual()\n +\"* Pvp: \"+p.getPvp()+\" Estoc Mínim: \"\n + p.getStockminim());\n }\n }", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "@GetMapping(\"/productos\")\n @Timed\n public List<Producto> getAllProductos() {\n log.debug(\"REST request to get all Productos\");\n List<Producto> productos = productoRepository.findAll();\n return productos;\n }", "public Response getProdutos_e_suas_receitas() {\n\t\tList<Produto> lista = ((ProdutoDao) getDao()).buscarProdutos_e_suas_receitas();\n\t\tif (lista != null) {\n\t\t\tList<Produto> produtos = new ArrayList<>();\n\t\t\t// percorrer a lista retornado do BD.\n\t\t\tfor (Produto produto : lista) {\n\t\t\t\tList<ItemReceita> componentes = new ArrayList<>();\n\t\t\t\t// pega os componentes da receita de cada produto.\n\t\t\t\tfor (ItemReceita item : produto.getReceita().getComponentes()) {\n\t\t\t\t\tcomponentes.add(new ItemReceita(item.getComponente(), item.getQtdUtilizada()));\n\t\t\t\t}\n\t\t\t\t// add um novo produto com os dados da lista percorrida.\n\t\t\t\tprodutos.add(new Produto(produto.getCodigo(), produto.getDescricao(), produto.getCategoria(),\n\t\t\t\t\t\tproduto.getSimbolo(), produto.getPreco(),\n\t\t\t\t\t\tnew Receita(produto.getReceita().getCodigo(), produto.getReceita().getRendimento(),\n\t\t\t\t\t\t\t\tproduto.getReceita().getTempoPreparo(), componentes)));\n\t\t\t}\n\t\t\t// converte a lista com os novos produtos para uma string em JSON.\n\t\t\tString listaEmJson = converterParaArrayJSON(produtos);\n\t\t\t// retorna um response com o lista de produtos em JSON.\n\t\t\tsetResposta(mensagemSucesso(listaEmJson));\n\t\t} else {\n\t\t\t// retorna um response informando que não possui cadastro.\n\t\t\tsetResposta(mensagemNaoEncontrado());\n\t\t}\n\t\treturn getResposta();\n\n\t}", "public List<Produto> consultarProdutoPorParteNome(String nome) {\n\t\t\tQuery q = manager.query();\n\t\t\tq.constrain(Produto.class);\n\t\t\tq.descend(\"nome\").constrain(nome).like();\n\t\t\tList<Produto> result = q.execute(); \n\t\t\treturn result;\n\t\t}", "@Override\n\tpublic List<Produto> listPorId(int id) throws Exception {\n\t\treturn null;\n\t}", "public Productos1[] buscarTodos() {\n\t\treturn productosColeccion.values().toArray(new Productos1[productosColeccion.size()]);// y te mide lo que ocupa procutosColeccion.\r\n\r\n\t}", "public List<Product> getProducts();", "public List<Product> getProducts();", "public List<LocalCentroComercial> consultarLocalesCentroComercialRegistrados();", "List<Product> retrieveProducts();", "private static void ListaProduto() throws IOException {\n \n if(ListaDProduto.isEmpty()){\n SaidaDados(\"Nenhum produto cadastrado\");\n return;\n }\n \n \n\t\tFileWriter arq = new FileWriter(\"lista_produto.txt\"); // cria o arquivo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// será criado o\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// arquivo para\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// armazenar os\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// dados\n\t\tPrintWriter gravarArq = new PrintWriter(arq); // imprimi no arquivo \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// dados.\n\n\t\tString relatorio = \"\";\n\n\t\tgravarArq.printf(\"+--LISTA DE PRODUTOS--+\\r\\n\");\n\n\t\tfor (int i = 0; i < ListaDProduto.size(); i++) {\n\t\t\tProduto Lista = ListaDProduto.get(i);\n\t\t\t\n\n\t\t\tgravarArq.printf(\n\t\t\t\t\t\" - |Codigo: %d |NOME: %s | VALOR COMPRA: %s | VALOR VENDA: %s | INFORMAÇÕES DO PRODUTO: %s | INFORMAÇÕES TÉCNICAS: %s\\r\\n\",\n\t\t\t\t\tLista.getCodigo(), Lista.getNome(), Lista.getPrecoComprado(),\n\t\t\t\t\tLista.getPrecoVenda(), Lista.getInformacaoProduto(), Lista.getInformacaoTecnicas()); // formatação dos dados no arquivos\n \n\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\n\n\t\t\trelatorio += \"\\nCódigo: \" + Lista.getCodigo() +\n \"\\nNome: \" + Lista.getNome() +\n\t\t\t\t \"\\nValor de Compra: \" + Lista.getPrecoComprado() + \n \"\\nValor de Venda: \" + Lista.getPrecoVenda() +\n \"\\nInformações do Produto: \" + Lista.getInformacaoProduto() +\n \"\\nInformações Técnicas: \" + Lista.getInformacaoTecnicas() +\n \"\\n------------------------------------------------\";\n\n\t\t}\n \n \n\n\t\tgravarArq.printf(\"+------FIM------+\\r\\n\");\n\t\tgravarArq.close();\n\n\t\tSaidaDados(relatorio);\n\n\t}", "public List<Product> getFullProductList(){\n\t\t/*\n\t\t * La lista dei prodotti da restituire.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\t\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella PRODOTTO.\n\t\t */\n\t\tStatement productStm = null;\n\t\tResultSet productRs = null;\n\t\t\n\t\ttry{\n\t\t\tproductStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM PRODOTTO;\";\n\t\t\tproductRs = productStm.executeQuery(sql);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tproductList = this.getProductListFromRs(productRs);\n\t\t\tproductStm.close(); // Chiude anche il ResultSet productRs\n\t\t\tConnector.releaseConnection(connection);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"ResultSet issue 2: failed to retrive data from ResultSet.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\treturn productList;\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 }", "private void getAllProducts() {\n }", "Product getPProducts();", "public static List<Produto> consultaProduto(int codigo, String nome, String tipo, String fornecedor) throws Exception {\n List<Produto> produto = ProdutoDAO.procurarProduto(codigo, nome, tipo, fornecedor);\r\n for (int i = 0; i < produto.size(); i++) {\r\n if (!produto.isEmpty()) {\r\n return produto;\r\n }\r\n }\r\n return null;\r\n }", "public ArrayList<Producto> ListaProductos() {\n ArrayList<Producto> list = new ArrayList<Producto>();\n \n try {\n conectar();\n ResultSet result = state.executeQuery(\"select * from producto;\");\n while(result.next()) {\n Producto nuevo = new Producto();\n nuevo.setIdProducto((int)result.getObject(1));\n nuevo.setNombreProducto((String)result.getObject(2));\n nuevo.setFabricante((String)result.getObject(3));\n nuevo.setCantidad((int)result.getObject(4));\n nuevo.setPrecio((int)result.getObject(5));\n nuevo.setDescripcion((String)result.getObject(6));\n nuevo.setSucursal((int)result.getObject(7));\n list.add(nuevo);\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return list;\n }", "private void somarQuantidade(Integer id_produto){\n\t for (ItensCompra it : itensCompra){\n\t\t //verifico se o item do meu arraylist é igual ao ID passado no Mapping\n\t\t if(it.getTable_Produtos().getId_produto().equals(id_produto)){\n\t //defino a quantidade atual(pego a quantidade atual e somo um)\n\t it.setQuantidade(it.getQuantidade() + 1);\n\t //a apartir daqui, faço o cálculo. Valor Total(ATUAL) + ((NOVA) quantidade * valor unitário do produto(ATUAL))\n\t it.setValorTotal(0.);\n\t it.setValorTotal(it.getValorTotal() + (it.getQuantidade() * it.getValorUnitario()));\n }\n}\n\t}", "List<Product> getAllProducts() throws PersistenceException;", "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 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 }", "private void getDepartamentos() {\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n\n String jpql =\"SELECT d FROM Departamento d \"\n + \"WHERE d.estado = 'a'\";\n\n Query query = em.createQuery(jpql);\n List<Departamento> listDepartamentos = query.getResultList();\n ArrayList<Departamento> arrayListDepartamentos = new ArrayList<>();\n for(Departamento d: listDepartamentos){\n arrayListDepartamentos.add(d);\n }\n this.Listdepartamentos = arrayListDepartamentos;\n em.close();\n emf.close();\n }\n catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n }", "List<Product> getProducts(Order order);", "public ArrayList<GrupoProducto> consultarTodos(){\r\n ArrayList<GrupoProducto> grupoProducto = new ArrayList<>();\r\n for (int i = 0; i < listaGrupoProductos.size(); i++) {\r\n if (!listaGrupoProductos.get(i).isEliminado()) {\r\n grupoProducto.add(listaGrupoProductos.get(i));\r\n }\r\n }\r\n return grupoProducto;\r\n }", "List<transactionsProducts> purchasedProducts();", "public static List getAllPrices() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT cena FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n int naziv = result.getInt(\"cena\");\n polovniautomobili.add(naziv);\n\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }", "@Override\n\tpublic List<Producto> productos(int id) {\n\n\t\tQuery query = entity.createQuery(\"FROM Seccion s WHERE s.id =: id_seccion\",Seccion.class);\n\t\tquery.setParameter(\"id_seccion\", id);\n \n Seccion seccion = (Seccion)query.getSingleResult();\t\n \n return seccion.getProductos();\t\n\t}", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "List<Product> list();", "List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;", "public ArrayList<ProductoDTO> mostrartodos() {\r\n\r\n\r\n PreparedStatement ps;\r\n ResultSet res;\r\n ArrayList<ProductoDTO> arr = new ArrayList();\r\n try {\r\n\r\n ps = conn.getConn().prepareStatement(SQL_READALL);\r\n res = ps.executeQuery();\r\n while (res.next()) {\r\n\r\n arr.add(new ProductoDTO(res.getInt(1), res.getString(2), res.getString(3), res.getInt(4), res.getInt(5), res.getString(6), res.getString(7), res.getString(8), res.getString(9)));\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"error vuelva a intentar\");\r\n } finally {\r\n conn.cerrarconexion();\r\n\r\n }\r\n return arr;\r\n\r\n }", "List<ParqueaderoEntidad> listar();", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\n\tpublic Vector<DistritoBean> distritos() throws Exception {\n\t\tVector<DistritoBean> distritos = new Vector<DistritoBean>();\n\t\tDistritoBean distrito = null;\n\t\tConnection con = MySQLDaoFactory.obtenerConexion();\n\t\ttry {\n\t\t\t\n\t\t\tString sql=\"select * from t_distrito ORDER BY codDistrito\";\n\t\t\tStatement stmt = con.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t\t\n\t\t\twhile(rs.next()){\n\t\t\t\tdistrito = new DistritoBean();\n\t\t\t\tdistrito.setCodDistrito(rs.getInt(\"codDistrito\"));\n\t\t\t\tdistrito.setNombre(rs.getString(\"nombre\"));\n\t\t\t\t\n\t\t\t\tdistritos.add(distrito);\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tcon.close();\n\t\t}\n\t\t\n\t\treturn distritos;\n\t}", "@Override\r\n\tpublic List<Producto> productosMasVendidos(@DateTimeFormat(pattern = \"dd-MM-yyyy\")Date fecha) {\n\t\treturn (List<Producto>)productoFacturaClienteDao.productosMasVendidos(fecha);\r\n\t}", "public List<Producto> getProductos(Producto producto) throws Exception {\n\t\treturn null;\n\t}", "List<Product> getAllProducts() throws DataBaseException;", "public int getQuantidade() {\r\n\r\n return produtos.size();\r\n }", "public java.util.List<com.alain.puntocoma.model.Catalogo> findAll()\n throws com.liferay.portal.kernel.exception.SystemException;", "private static ArrayList<Produto> listProdutosPorCategoria(int idCategoria) throws Exception {\r\n ArrayList<Produto> lista = arqProdutos.toList();\r\n lista.removeIf(p -> p.idCategoria != idCategoria);\r\n return lista;\r\n }", "public abstract List<Subproducto> listarSubproducto(EntityManager sesion, Subproducto subproducto);", "private void listadoEstados() {\r\n sessionProyecto.getEstados().clear();\r\n sessionProyecto.setEstados(itemService.buscarPorCatalogo(CatalogoEnum.ESTADOPROYECTO.getTipo()));\r\n }", "@Override\r\n\tpublic List<Producto> getAll() throws Exception {\n\t\treturn productRepository.buscar();\r\n\t}", "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 List getPorReferenteAProduto(long id) throws DaoException {\n\t\t// Existe no DAO\n\t\tCompartilhamentoProdutoDao dao = getDao();\n\t\tDaoConexao conn = dao.criaConexao();\n\t\tdao.setConexao(conn);\n\t\treturn dao.ListaPorProdutoReferenteA(id);\n\t}", "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 void listarDepartamentos() {\r\n\t\tdepartamentos = departamentoEJB.listarDepartamentos();\r\n\t}", "List<Product> findAll();", "List<Product> findAll();", "@Override\r\n\tpublic List<Factura> facturaConMasProductos(Date fecha) {\n\t\treturn (List<Factura>)facturaDao.facturaConMasProductos(fecha);\r\n\t}", "@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 listarCategorias() throws Exception {\n PreparedStatement ps = null;\n Connection conn = null;\n ResultSet rs = null;\n\n try {\n conn = this.conn;\n ps = conn.prepareStatement(\"select idRemedio,nome,categoria from Remedios order by nome ASC\");\n rs = ps.executeQuery();\n List<Produto> list = new ArrayList<Produto>();\n while (rs.next()) {\n Integer idRemedio = rs.getInt(1);\n String nome = rs.getString(2);\n String categoria = rs.getString(3);\n list.add(new Produto(idRemedio, nome, null, null, null, null,null, null, null, null, null, null, null, null, categoria, null));\n\n }\n return list;\n\n } catch (SQLException sqle) {\n throw new Exception(sqle);\n } finally {\n Conexao.closeConnection(conn, ps, rs);\n }\n }", "public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\tpublic List<Proyecto> listarProyectos() {\n\t\treturn proyectoRepo.findAll();\n\t}", "public List<Product> getProductList(){\n List<Product> productList = mongoDbConnector.getProducts();\n return productList;\n }", "ArrayList<Product> ListOfProducts();", "public List<ExistenciaMaq> buscarExistencias(final Producto producto,final Date fecha);", "public List<Product> findAll();", "public List<Color> coloresProducto(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Color> lista = new ArrayList<Color>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idcolor, t.nombre, t.observacion FROM conftbc_color t \"\n\t\t\t\t\t+ \" INNER JOIN conftbc_producto p ON t.idmarca = p.idmarca WHERE p.idproducto = \"+producto.getIdproducto();\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tColor color = new Color();\n\t\t\t\tcolor.setIdcolor(rs.getInt(\"idcolor\"));\n\t\t\t\tcolor.setNombre(rs.getString(\"nombre\"));\n\t\t\t\tcolor.setObservacion(rs.getString(\"observacion\"));\n\t\t\t\tlista.add(color);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public List<ProyeccionKid> getListaProyeccionKids(int idOrganizacion, Producto producto, Bodega bodega, Date fechaDesde, Date fechaHasta)\r\n/* 34: */ {\r\n/* 35:62 */ List<ProyeccionKid> listaProyeccionKid = new ArrayList();\r\n/* 36:63 */ for (ProductoMaterial productoMaterial : getListaProductoMaterial(0, null, null, null, null))\r\n/* 37: */ {\r\n/* 38:64 */ ProyeccionKid proyeccionKid = new ProyeccionKid();\r\n/* 39:65 */ proyeccionKid.setProductoMaterial(productoMaterial);\r\n/* 40:66 */ proyeccionKid.setStock(getStock(productoMaterial.getMaterial(), null, null, null));\r\n/* 41:67 */ proyeccionKid.setSaldo(proyeccionKid.getStock().divide(productoMaterial.getCantidad(), RoundingMode.HALF_UP));\r\n/* 42:68 */ listaProyeccionKid.add(proyeccionKid);\r\n/* 43: */ }\r\n/* 44:70 */ return listaProyeccionKid;\r\n/* 45: */ }", "List<BeanPedido> getPedidos();", "List<ProductDto> getProducts();", "@Select(FIND_ALL)\r\n public List<CProducto> findAll();" ]
[ "0.7386832", "0.731522", "0.71443623", "0.6996525", "0.6947329", "0.6683581", "0.6596733", "0.6538849", "0.6487985", "0.64815724", "0.6481109", "0.6458645", "0.6391935", "0.63866836", "0.63792986", "0.6310546", "0.63095313", "0.6279475", "0.6279475", "0.6279475", "0.6263304", "0.6224185", "0.62227577", "0.6213461", "0.6205937", "0.62033504", "0.6196405", "0.6196115", "0.61924344", "0.6192182", "0.61779916", "0.61630404", "0.61390483", "0.6133473", "0.6118989", "0.61169255", "0.61029464", "0.60812134", "0.6067972", "0.60669523", "0.6066706", "0.6062789", "0.6047114", "0.6045594", "0.60432816", "0.60432816", "0.60278195", "0.60187924", "0.6017798", "0.6014228", "0.60074675", "0.6005557", "0.59666824", "0.594436", "0.59424895", "0.59402823", "0.5938765", "0.59324867", "0.5924562", "0.59208703", "0.5918617", "0.590438", "0.59005123", "0.588527", "0.58829063", "0.5879027", "0.5874758", "0.5874458", "0.5867208", "0.5860504", "0.58591074", "0.5858489", "0.58570504", "0.5848989", "0.58405924", "0.5830273", "0.58231014", "0.5808668", "0.5802443", "0.5800668", "0.58005726", "0.57970893", "0.57965195", "0.5795194", "0.5783369", "0.57763803", "0.57763803", "0.57759655", "0.57756066", "0.5771394", "0.5767899", "0.5752333", "0.5750259", "0.5750059", "0.5748762", "0.5746162", "0.5733331", "0.5730608", "0.5728966", "0.5725744", "0.57213956" ]
0.0
-1
> apagar produto no banco de dados
public void updateProduto(int cd_Produto, Produto produto) { pdao.updateProduto(cd_Produto, produto); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void salvarProdutos(Produto produto){\n }", "public static void apagarProduto(){\n if(ListaDProduto.size() == 0){\n SaidaDados(\"Nehum produto cadastrado!!\");\n return;\n }\n \n String pesquisarNome = Entrada(\"Informe o nome do produto que deseja deletar: \");\n for(int i =0; i < ListaDProduto.size(); i++){\n \n Produto produtoProcurado = ListaDProduto.get(i);\n \n if(pesquisarNome.equalsIgnoreCase(produtoProcurado.getNome())){\n ListaDProduto.remove(i);\n SaidaDados(\"Produto deletado com sucesso!!\");\n }\n \n }\n \n }", "public void adiciona(Produto produto) {\n\t\tthis.produtos.addAll(produtos);\n\t}", "@Override\n\tpublic void entregarProductos(AgenteSaab a, Oferta o) {\n\t\t\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 }", "public static void main(String[] args) {\n\t\t\n\t\tEntityManagerFactory fabrica = Persistence.createEntityManagerFactory(\"mysql\");\n\t\t\n\t\tEntityManager em = fabrica.createEntityManager();\n\t\t\n\t\tProducto p=em.find(Producto.class, \"P0031\");\n\t\t\n\t\tif(p==null) {\n\t\t\tSystem.out.println(\"Producto no Existe\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Producto Encontrado : \"+p.getDescrip());\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\tem.close();\n\n\t}", "public void mudaQuantidadeAprovada(PedidoProduto pedidoProduto) {\n String sql = \"UPDATE pedidosprodutos SET QuantidadeAprovada=? WHERE Id=?\";\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, pedidoProduto.getQuantidadeAprovada());\n stmt.setInt(2, pedidoProduto.getId());\n stmt.execute();\n connFac.closeAll(rs, stmt, st, conn);\n } catch(SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.mudaQuantidadeAprovada: \" + error);\n throw new RuntimeException(\"PedidoDAO.mudaQuantidadeAprovada: \" + error);\n }\n }", "private static void cadastroProduto() {\n\n\t\tString nome = Entrada(\"PRODUTO\");\n\t\tdouble PrecoComprado = Double.parseDouble(Entrada(\"VALOR COMPRA\"));\n\t\tdouble precoVenda = Double.parseDouble(Entrada(\"VALOR VENDA\"));\n String informacaoProduto = Entrada(\"INFORMAÇÃO DO PRODUTO\");\n String informacaoTecnicas = Entrada(\"INFORMAÇÕES TÉCNICAS\");\n\n\t\tProduto produto = new Produto(nome, PrecoComprado, precoVenda, informacaoProduto,informacaoTecnicas);\n\n\t\tListaDProduto.add(produto);\n\n\t}", "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 static void VeureProductes (BaseDades bd) {\n ArrayList <Producte> llista = new ArrayList<Producte>();\n llista = bd.consultaPro(\"SELECT * FROM PRODUCTE\");\n if (llista != null)\n for (int i = 0; i<llista.size();i++) {\n Producte p = (Producte) llista.get(i);\n System.out.println(\"ID=>\"+p.getIdproducte()+\": \"\n +p.getDescripcio()+\"* Estoc: \"+p.getStockactual()\n +\"* Pvp: \"+p.getPvp()+\" Estoc Mínim: \"\n + p.getStockminim());\n }\n }", "List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;", "public void atualizar(BeanProdutosJsp produto) {\n\n\t\ttry {\n\t\t\tString sql = \"update produtos set nome = ?, quantidade = ?, valor = ?, categoria_id = ? where id = \" + produto.getId();\n\t\t\t\n\t\t\tPreparedStatement preparedStatement;\n\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\n\t\t\tpreparedStatement.setString(1, produto.getNome());\n\t\t\tpreparedStatement.setDouble(2, produto.getQuantidade());\n\t\t\tpreparedStatement.setDouble(3, produto.getValor());\n\t\t\tpreparedStatement.setLong(4, produto.getCategoria_id());\n\n\t\t\tpreparedStatement.executeUpdate();\n\t\t\tconnection.commit();\n\n\t\t} catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\n\t\t\ttry {\n\n\t\t\t\tconnection.rollback();\n\n\t\t\t} catch (SQLException e1) {\n\n\t\t\t\te1.printStackTrace();\n\n\t\t\t}\n\t\t}\n\t}", "public void salvaProduto(Produto produto){\n conecta = new Conecta();\n conecta.iniciaConexao();\n\n String sql = \"INSERT INTO `JoalheriaJoia`.`Produto` (`codigo`, `nome`, `valorCusto`, `valorVenda`, `idTipoJoia` , `quantidadeEstoque`) VALUES (?, ?, ?, ?, ?, ?);\";\n\n try {\n PreparedStatement pstm;\n pstm = conecta.getConexao().prepareStatement(sql); \n \n pstm.setString(1, produto.getCodigo());\n pstm.setString(2, produto.getNome());\n pstm.setFloat(3, produto.getValorCusto());\n pstm.setFloat(4, produto.getValorVenda());\n pstm.setInt(5, produto.getTipoJoia().getIdTipoJoia());\n pstm.setInt(6, produto.getQuantidadeEstoque());\n pstm.execute();\n } catch (SQLException ex) {\n Logger.getLogger(ProdutoDao.class.getName()).log(Level.SEVERE, null, ex);\n }\n conecta.fechaConexao(); \n \n }", "@Override\n\tpublic void atualizar(Produto entidade) {\n\n\t}", "public void agregar(Producto producto) throws BusinessErrorHelper;", "public void execProInventarioCarga(CatalogoBean catalogoBean) throws Exception;", "public String getIdProduto() {\r\n\t\treturn idProduto;\r\n\t}", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "boolean agregarProducto(Producto p) {\n boolean hecho = false;\n try {\n operacion = ayudar.beginTransaction();\n ayudar.save(p);\n operacion.commit();\n } catch (Exception e) {\n operacion.rollback();\n System.out.println(e);\n }\n return hecho;\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 Produto salvarProduto(Produto Produto) {\n\t\treturn null;\n\t}", "public IProduto getCodProd();", "private void cargarProductos() {\r\n\t\tproductos = productoEJB.listarInventariosProductos();\r\n\r\n\t\tif (productos.size() == 0) {\r\n\r\n\t\t\tList<Producto> listaProductos = productoEJB.listarProductos();\r\n\r\n\t\t\tif (listaProductos.size() > 0) {\r\n\r\n\t\t\t\tMessages.addFlashGlobalWarn(\"Para realizar una venta debe agregar los productos a un inventario\");\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public String addProduct(Context pActividad,int pId, String pDescripcion,float pPrecio)\n {\n AdminSQLiteOpenHelper admin = new AdminSQLiteOpenHelper(pActividad, \"administracion\", null, 1);\n\n // con el objeto de la clase creado habrimos la conexion\n SQLiteDatabase db = admin.getWritableDatabase();\n try\n {\n // Comprobamos si el id ya existe\n Cursor filas = db.rawQuery(\"Select codigo from Articulos where codigo = \" + pId, null);\n if(filas.getCount()<=0)\n {\n //ingresamos los valores mediante, key-value asocioados a nuestra base de datos (tecnica muñeca rusa admin <- db <- registro)\n ContentValues registro = new ContentValues();\n registro.put(\"codigo\",pId);\n registro.put(\"descripcion\",pDescripcion);\n registro.put(\"precio\", pPrecio);\n\n //ahora insertamos este registro en la base de datos\n db.insert(\"Articulos\", null, registro);\n }\n else\n return \"El ID insertado ya existe\";\n }\n catch (Exception e)\n {\n return \"Error Añadiendo producto\";\n }\n finally\n {\n db.close();\n }\n return \"Producto Añadido Correctamente\";\n }", "public static void addProduto(Produto p1) {\n\t\tprodutosCadastrados.add(p1);\n\t}", "public BuscarProducto(AgregandoProductos ventanaPadre) {\n this.daoProductos = new ProductoJpaController();\n this.ventanaPadre = ventanaPadre;\n initComponents();\n this.setupComponents();\n }", "@Scheduled(fixedDelay = 5000)\n @Transactional\n public void atribuirCartaoAPropostaElegivel(){\n List<Proposta> propostasElegiveis = propostaRepository.findByEstado(EstadoProposta.ELEGIVEL);\n\n for(Proposta proposta: propostasElegiveis){\n if(proposta.getCartao() == null){\n CartaoClientResponse response = cartoesClient.criaCartao(proposta.getId());\n Cartao novoCartaoProposta = response.toModel(proposta);\n\n proposta.setCartao(novoCartaoProposta);\n manager.merge(proposta);\n }\n }\n }", "public void ventaBilleteMaquina1()\n {\n maquina1.insertMoney(500);\n maquina1.printTicket();\n }", "private List<Produto> retornaProduto (Long cod){\n \n Query q = entityManager.createNamedQuery(\"Produto.findByCodigo\");\n q.setParameter(\"codigo\", cod);\n List <Produto> p = q.getResultList();\n return p; \n}", "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}", "List<AdvertBundleEntity> findAllRequiredNewProforma();", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "VentaJPA obtenerVenta(int comprobante);", "public void executar() {\n\t\tSystem.out.println(dao.getListaPorNome(\"abacatão\"));\n\t}", "public void listarProducto() {\n }", "public void setProduto(com.gvt.www.metaData.configuradoronline.DadosProduto produto) {\r\n this.produto = produto;\r\n }", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "@Override\n public void compraProducto(String nombre, int cantidad) {\n\n }", "public Produto atualizaProduto(Produto Produto) {\n\t\treturn null;\n\t}", "void adicionaComentario(Comentario comentario);", "public void ventaBilleteMaquina2()\n {\n maquina2.insertMoney(600);\n maquina1.printTicket();\n }", "public static void main(String[] args) {\n EntityManagerFactory fabrica = Persistence.createEntityManagerFactory(\"oracle\");\n EntityManager em = fabrica.createEntityManager();\n\n //Instanciar um novo aluno sem o código(Estado: new - não gerenciado)\n Aluno aluno = new Aluno(\"Gabriel\", \"2TDSJ\",\n new GregorianCalendar(200, Calendar.JULY, 10), Periodo.MATUTINO, true);\n //Adiciona o aluno no contexto do Entity Manager(gerencia-lo)\n em.persist(aluno);\n //Começar com uma transação\n em.getTransaction().begin();\n //Realizar o commit\n em.getTransaction().commit();\n\n System.out.println(\"Aluno Registrado\");\n //Atualiza o valor no banco, faz um update automatico.\n aluno.setNome(\"Luiz\");\n\n ///Fechar\n em.close();\n fabrica.close();\n }", "public static void atualizarProduto(long id_produto, String codigo, String descricao,String preco,long idgrupo){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"Update produto set codigo = ?, descricao =? , preco =?,idgrupo =? where id_produto = ?\");\r\n stmn.setString(1,codigo);\r\n stmn.setString(2,descricao);\r\n stmn.setString(3,preco);\r\n stmn.setLong(4,idgrupo);\r\n stmn.setLong(5,id_produto);\r\n\r\n int row = stmn.executeUpdate();\r\n if(row == 0){\r\n System.out.println(\"Informação não alterada\");\r\n }else{\r\n System.out.println(\"Dados atualizados\");\r\n }\r\n } catch (SQLException throwables) {\r\n throwables.printStackTrace();\r\n }\r\n }", "Boolean agregar(String userName, Long idProducto);", "public Producto guardar(Producto producto) throws IWDaoException;", "public String crearProducto(String id, String nombre, String precio, String idCategoria, \n String estado, String descripcion) {\n \n String validacion = \"\";\n if (verificarCamposVacios(id, nombre, precio, idCategoria, estado, descripcion) == false) {\n //Se crea en EntityManagerFactory con el nombre de nuestra unidad de persistencia\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"SG-RESTPU\");\n //se crea un objeto producto y se le asignan sus atributos\n if (verificarValoresNum(id,precio,idCategoria)) {\n //Se crea el controlador de la categoria del producto\n CategoriaProductoJpaController daoCategoriaProducto = new CategoriaProductoJpaController(emf);\n CategoriaProducto categoriaProducto = daoCategoriaProducto.findCategoriaProducto(Integer.parseInt(idCategoria));\n //se crea el controlador del producto \n ProductoJpaController daoProducto = new ProductoJpaController(emf);\n Producto producto = new Producto(Integer.parseInt(id), nombre);\n producto.setPrecio(Long.parseLong(precio));\n producto.setIdCategoria(categoriaProducto);\n producto.setDescripcion(descripcion);\n producto.setFotografia(copiarImagen());\n if (estado.equalsIgnoreCase(\"Activo\")) {\n producto.setEstado(true);\n } else {\n producto.setEstado(false);\n }\n try {\n if (ExisteProducto(nombre) == false) {\n daoProducto.create(producto);\n deshabilitar();\n limpiar();\n validacion = \"El producto se agrego exitosamente\";\n } else {\n validacion = \"El producto ya existe\";\n }\n } catch (NullPointerException ex) {\n limpiar();\n } catch (Exception ex) {\n Logger.getLogger(Gui_empleado.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n validacion = \"El campo id, precio, idCategoria deben ser numéricos\";\n }\n } else {\n validacion = \"Llene los datos obligatorios\";\n }\n return validacion;\n }", "private void somarQuantidade(Integer id_produto){\n\t for (ItensCompra it : itensCompra){\n\t\t //verifico se o item do meu arraylist é igual ao ID passado no Mapping\n\t\t if(it.getTable_Produtos().getId_produto().equals(id_produto)){\n\t //defino a quantidade atual(pego a quantidade atual e somo um)\n\t it.setQuantidade(it.getQuantidade() + 1);\n\t //a apartir daqui, faço o cálculo. Valor Total(ATUAL) + ((NOVA) quantidade * valor unitário do produto(ATUAL))\n\t it.setValorTotal(0.);\n\t it.setValorTotal(it.getValorTotal() + (it.getQuantidade() * it.getValorUnitario()));\n }\n}\n\t}", "public static void main(String[] args) {\n\t\tEntityManagerFactory factory = Persistence.createEntityManagerFactory(\"jpa-produtos\");\r\n\t\tEntityManager manager = factory.createEntityManager();\r\n\t\t\r\n\t\tQuery query = manager.createQuery(\"select p from Produto p where p.preco > :preco\");\r\n\t\tquery.setParameter(\"preco\", 99.99);\r\n\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Produto> produtos = query.getResultList();\r\n\t\t\r\n\t\tfor (Produto produto : produtos)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Produto: \" + produto.getNome());\r\n\t\t}\r\n\t\t\r\n\t\tmanager.close();\r\n\t}", "private static void menuProdutos() throws Exception {//Inicio menuProdutos\r\n byte opcao;\r\n boolean encerrarPrograma = false;\r\n do {\r\n System.out.println(\r\n \"\\n\\t*** MENU DE PRODUTOS ***\\n\"\r\n + \"0 - Adicionar produto\\n\"\r\n + \"1 - Remover produto\\n\"\r\n + \"2 - Alterar produto\\n\"\r\n + \"3 - Consultar produto\\n\"\r\n + \"4 - Listar produtos cadastrados\\n\"\r\n + \"5 - Sair\"\r\n );\r\n System.out.print(\"Digite a opção: \");\r\n opcao = read.nextByte();\r\n System.out.println();\r\n switch (opcao) {\r\n case 0:\r\n adicionarProduto();\r\n break;\r\n case 1:\r\n removerProduto();\r\n break;\r\n case 2:\r\n alterarProduto();\r\n break;\r\n case 3:\r\n consultaProduto();\r\n break;\r\n case 4:\r\n listaProdutosCadastrados();\r\n break;\r\n case 5:\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 } while (!encerrarPrograma);\r\n }", "@Override\n public Boleto anular(Boleto boleto) throws CRUDException {\n\n Boleto boletoAnular = em.find(Boleto.class, boleto.getIdBoleto());\n\n Optional op = Optional.ofNullable(boletoAnular);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No existe el Boleto\");\n }\n\n if (boletoAnular.getEstado().equals(Boleto.Estado.ANULADO)) {\n throw new CRUDException(\"El Boleto ya se encuentra anulado\");\n }\n\n //Si el Boleto esta Emitido se deben dar de bajas su contabilidad\n if (boletoAnular.getEstado().equals(Boleto.Estado.EMITIDO)) {\n System.out.println(\"Anulando Boleto:\" + boleto.getIdBoleto());\n System.out.println(\"Anulando Boleto NotaDebito:\" + boleto.getIdNotaDebito());\n System.out.println(\"Anulando Boleto IngresoCaja :\" + boleto.getIdIngresoCaja());\n boletoAnular.setEstado(Boleto.Estado.ANULADO);\n em.merge(boletoAnular);\n\n //anulamos los asientos contables de los asientos. (AD y CI)\n ejbComprobante.anularAsientosContables(boletoAnular);\n\n //anulamos las transacciones de la nota de debito\n //El proceso de Anular la transaccion de la Nota de Debito\n //llama internamente en el Procedimiento Almacenado a un proceso de anulacion \n //las transacciones del Ingreso de Caja. esto debido a mejorar el proceso y no \n //realizar un doble barrido en la tabla de transacciones de \n //la nota dede\n ejbNotaDebito.anularTransaccion(boletoAnular);\n\n //anulamos las transacciones del Ingreso de Caja\n //ejbIngresoCaja.anularTransaccion(boleto) ;\n // si esta en Pendiente solo debe cambiar el estado\n } else if (boletoAnular.getEstado().equals(Boleto.Estado.PENDIENTE)\n || boletoAnular.getEstado().equals(Boleto.Estado.CANCELADO)) {\n boletoAnular.setEstado(Boleto.Estado.ANULADO);\n em.merge(boletoAnular);\n //Si el Boleto es Void, se puede volver a ingresar el boleto.\n }\n return boletoAnular;\n\n }", "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 }", "@Override\r\n\tpublic void guardarCambiosProducto(Producto producto) {\r\nconectar();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = miConexion.prepareStatement(ConstantesSql.GUARDAR_CAMBIOS_PRODUCTO);\r\n\t\t\tps.setString(1, producto.getNombre());\r\n\t\t\tps.setString(2, producto.getCantidad());;\r\n\t\t\tps.setString(3, producto.getPrecio());\r\n\t\t\tps.setString(6, producto.getOferta());\r\n\t\t\tps.setString(4, producto.getFechaCad());\r\n\t\t\tps.setString(5, producto.getProveedor());\r\n\t\t\tps.setString(7, producto.getComentario());\r\n\t\t\tps.setInt(8, producto.getId());\r\n\t\t\tps.execute();\r\n\t\t\tps.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"error sql guardar producto\");\r\n\t\t}\r\n\t\t\r\n\t\tdesconectar();\r\n\t}", "public List<Soldados> conectar(){\n EntityManagerFactory conexion = Persistence.createEntityManagerFactory(\"ABP_Servicio_MilitarPU\");\n //creamos una instancia de la clase controller\n SoldadosJpaController tablasoldado = new SoldadosJpaController(conexion);\n //creamos una lista de soldados\n List<Soldados> listasoldado = tablasoldado.findSoldadosEntities();\n \n return listasoldado;\n }", "public Producto actualizar(Producto producto) throws IWDaoException;", "public boolean buy() throws Exception {\n\n int jogador = this.jogadorAtual();\n\n String lugar = this.tabuleiro.getPlaceName(posicoes[jogador]);\n // System.out.println(\"lugar[jogador]\" + lugar);\n boolean posicaoCompravel = this.posicaoCompravel(posicoes[jogador]);\n boolean isEstatal = this.isPosicaoEstatal(this.posicoes[jogador]);\n\n if (posicaoCompravel || (isEstatal && this.publicServices == true && verificaSeServicoPublicoFoiComprado(this.posicoes[jogador]))) {\n\n if (posicaoCompravel || (isEstatal && this.publicServices == true)) {\n this.listaJogadores.get(jogadorAtual()).addQuantidadeCompanhias();\n\n }\n int posicaoTabuleiro = posicoes[jogador];\n int preco = this.tabuleiro.getLugarPrecoCompra(posicaoTabuleiro);\n Jogador j = listaJogadores.get(jogador);\n this.terminarAVez();\n if (preco <= j.getDinheiro()) {\n this.print(\"\\tPossui dinheiro para a compra!\");\n j.retirarDinheiro(preco);\n this.Donos.put(posicaoTabuleiro, j.getNome());\n\n String nomeLugar = this.tabuleiro.getPlaceName(posicaoTabuleiro);\n j.addPropriedade(nomeLugar);\n if (nomeLugar.equals(\"Reading Railroad\") || nomeLugar.equals(\"Pennsylvania Railroad\") ||\n nomeLugar.equals(\"B & O Railroad\") || nomeLugar.equals(\"Short Line Railroad\")) {\n DonosFerrovias[jogador]++;\n }\n this.print(\"\\tVocê adquiriu \" + nomeLugar + \" por \" + preco);\n this.print(\"\\tAtual dinheiro: \" + j.getDinheiro());\n if (j.temPropriedades() && hipotecaAtiva) {\n j.adicionarComandoHipotecar();\n }\n if (j.verificaSeTemGrupo(posicaoTabuleiro)) {\n if (this.build == true) {\n j.adicionarComandoBuild();\n }\n\n this.tabuleiro.duplicarAluguelGrupo(posicaoTabuleiro);\n\n }\n } else {\n this.print(\"\\tNão possui dinheiro para realizar a compra!\");\n throw new Exception(\"Not enough money\");\n }\n\n } else {\n\n if (this.jaTemDono(posicoes[jogador])) {\n throw new Exception(\"Deed for this place is not for sale\");\n }\n\n if (isEstatal && this.publicServices == false) {\n throw new Exception(\"Deed for this place is not for sale\");\n }\n if (!posicaoCompravel) {\n throw new Exception(\"Place doesn't have a deed to be bought\");\n }\n }\n\n\n\n return false;\n\n\n\n }", "public void almacenar( Proyecto proyecto) {\n\n }", "public boolean inserirProposta(Proposta novaProposta) {\n\n conectarnoBanco();\n\n String sql = \"INSERT INTO proposta (propostaRealizada,valorProposta,id_usuario,id_projeto,id_client) values (?,?,?,?,?)\";\n\n try {\n pst = con.prepareStatement(sql);\n \n pst.setString(1, novaProposta.getPropostaRealizada());\n String prop = Float.toString(novaProposta.getValorProposta());\n pst.setString(2, prop);\n String usuario = Integer.toString(novaProposta.getIdUsuario());\n pst.setString(3, usuario);\n String proj = Integer.toString(novaProposta.getIdProjeto());\n pst.setString(4, proj);\n String cliente = Integer.toString(novaProposta.getIdCliente());\n pst.setString(5, cliente);\n pst.execute();\n\n sucesso = true;\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao inserir proposta = \" + 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 sucesso;\n }", "private List<Produto> todosProdutos() {\n\t\treturn produtoService.todosProdutos();\n\t}", "@Override\n public void procesarBoleto(Boleto boleto) throws CRUDException {\n\n //1 Obtenemos la configuracion de la contabilidad del boleto de acuerdo a la empresa\n HashMap<String, Integer> parameters = new HashMap<>();\n parameters.put(\"idEmpresa\", boleto.getIdEmpresa());\n\n ContabilidadBoletaje contabilidad = (ContabilidadBoletaje) get(\"ContabilidadBoletaje.find\", ContabilidadBoletaje.class, parameters);\n\n Optional op = Optional.ofNullable(contabilidad);\n if (!op.isPresent()) {\n throw new CRUDException(\"No existe configuracion de Boletaje para la Entidad \" + boleto.getIdEmpresa());\n }\n\n }", "public TelaProduto() {\n initComponents();\n \n carregaProdutos();\n }", "public void doSave(VideogameBean prod) throws SQLException {\n\n\t\tDatabaseConnector connector = new DatabaseConnector();\n\t\tconnector.startConnection();\n\t\tPreparedStatement state = null;\n\t\tstate = connector.getJdbcConnection()\n\t\t\t\t.prepareStatement(\"insert into Videogioco values (?, ?, ?, ?, ?, ?, ?, ?)\");\n\n\t\tstate.setInt(1, prod.getVideogameCode());\n\t\tstate.setString(2, prod.getTitle());\n\t\tstate.setString(3, prod.getDescription());\n\t\tstate.setString(4, prod.getConsole());\n\t\tstate.setDouble(5, prod.getPrice());\n\t\tstate.setInt(6, prod.getAvailability());\n\t\tstate.setInt(7, prod.getShipment());\n\t\tstate.setString(8, prod.getImgPath());\n\t\tstate.executeUpdate();\n\t\tconnector.closeConnection();\n\n\t}", "public Producto buscarProducto(int id) throws Exception {\n ProductoLogica pL = new ProductoLogica();\n Producto producto = pL.buscarProductoID(id);\n return producto;\n }", "@Quando(\"^Alterar a quantidade de produtos para compra acima do aceitavel no carrinho$\")\n\tpublic void alterar_a_quantidade_de_produtos_para_compra_acima_do_aceitavel_no_carrinho() throws Throwable {\n\t\tString txt_Quantidade = pegaMassa.QuantidadeProduto();\n\t\tpesquisaPage.quantidadeProduto(txt_Quantidade);\n\t}", "public List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }", "@DirtiesDatabase\n\t@Test\n\tpublic void testRetrievePAforBundle() {\n\t\tcreateBundles();\n\t\tPriceAdjustment createPA = createPA(\"P1\", \"PA1\", \"PLGUID\", \"CGUID\");\n\t\tPriceAdjustment createPA2 = createPA(\"P1\", \"PA2\", \"PLGUID\", \"C2GUID\");\n\t\t\n\t\tProductBundle bundle = (ProductBundle) productService.findByGuid(\"P1\");\n\t\tCollection<PriceAdjustment> findAllAdjustmentsOnBundle = priceAdjustmentService.findAllAdjustmentsOnBundle(\"PLGUID\", bundle);\n\t\tassertNotNull(findAllAdjustmentsOnBundle);\n\t\tassertEquals(2, findAllAdjustmentsOnBundle.size());\n\t\tassertEquals(createPA.getGuid(), ((PriceAdjustment) findAllAdjustmentsOnBundle.toArray()[0]).getGuid());\n\t\tassertEquals(createPA2.getGuid(), ((PriceAdjustment) findAllAdjustmentsOnBundle.toArray()[1]).getGuid());\n\t}", "public void handleBuyPiranhaCommand() {\n if (Aquarium.money >= PIRANHAPRICE) {\n piranhaController.addNewEntity();\n Aquarium.money -= PIRANHAPRICE;\n }\n }", "private void chargesBundles(){\n Bundle bundle = getIntent().getExtras();\n usuario = (Usuario) bundle.getSerializable(\"usuario\");\n tvNombreUsuario.setText(tvNombreUsuario.getText() + \"\" + usuario.getNombre());\n }", "public void chocoContraBomba(Bomba bomba){}", "public static void promedioBoletaCliente() {\r\n\t\tPailTap clienteBoleta = getDataTap(\"C:/Paula/masterset/data/9\");\r\n\t\tPailTap boletaProperty = getDataTap(\"C:/Paula/masterset/data/4\");\r\n\t\t\r\n\t\tSubquery promedio = new Subquery(\"?Cliente_id\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(clienteBoleta, \"_\", \"?data\")\r\n\t\t\t\t.predicate(boletaProperty, \"_\", \"?data2\")\r\n\t\t\t\t.predicate(new ExtractClienteBoleta(), \"?data\").out(\"?Cliente_id\", \"?Boleta_id\", \"?Dia\")\r\n\t\t\t\t.predicate(new ExtractBoletaTotal(), \"?data2\").out(\"?Boleta_id\",\"?Total\")\r\n\t\t\t\t.predicate(new Avg(), \"?Total\").out(\"?Promedio\");\r\n\t\t\r\n\t\tSubquery tobatchview = new Subquery(\"?json\")\r\n\t\t\t\t.predicate(promedio, \"?Cliente\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(new ToJSON(), \"?Cliente\", \"?Promedio\", \"?Dia\").out(\"?json\");\r\n\t\tApi.execute(new batchview(), tobatchview);\r\n\t\t//Api.execute(new StdoutTap(), promedio);\r\n\t}", "@Override\n\tpublic Produto pesquisar(Produto entidade) {\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n\t\tProduct p = new Product(\"Oppo\",5000.98f,0);\r\n\t\tMySqlProductDAO pd = new MySqlProductDAO();\r\n\t\tProduct ans = pd.addNew(p);\r\n\t\t//pd.display(ans);\r\n\t\t/*ans = pd.findOne(8);\r\n\t\tpd.display(ans);\r\n\t\tpd.delete(8);\r\n\t\tans = pd.findOne(8);\r\n\t\tpd.display(ans);*/\r\n\t\tList<Product> pro = pd.findAll();\r\n\t\tSystem.out.println(\"Finding All Products : \");\r\n\t\tpro.forEach(System.out::println);\r\n\t\tSystem.out.println(\"Price greater than 500 : \");\r\n\t\tpro = pd.findByPriceGreaterThan(5000);\r\n\t\tpro.forEach(System.out::println);\r\n\t\tpd.removeOutOfStockProducts();\r\n\t\tpd.findAll();\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tEntityManagerFactory fabrica = Persistence.createEntityManagerFactory(\"oracle\");\n\t\tEntityManager em = fabrica.createEntityManager();\n\t\t\n\t\t//Pesquisar pela PK (Retorna null ou o objeto gerenciado)\n\t\tVenda venda = em.find(Venda.class, 1);\n\t\t\n\t\t//Exibir os dados da venda\n\t\tSystem.out.println(venda);\n\t\t\n\t\t//Altera o valor da venda em memória\n\t\tvenda.setValor(900);\n\t\t\n\t\t//Commit -> atualiza a venda no banco\n\t\tem.getTransaction().begin();\n\t\tem.getTransaction().commit();\n\t\t\n\t\t//Fechar\n\t\tem.close();\n\t\tfabrica.close();\n\t}", "private void agregarProducto(HttpServletRequest request, HttpServletResponse response) throws SQLException {\n\t\tString codArticulo = request.getParameter(\"CArt\");\n\t\tString seccion = request.getParameter(\"seccion\");\n\t\tString nombreArticulo = request.getParameter(\"NArt\");\n\t\tSimpleDateFormat formatoFecha = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate fecha = null;\n\t\ttry {\n\t\t\tfecha = formatoFecha.parse(request.getParameter(\"fecha\"));\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdouble precio = Double.parseDouble(request.getParameter(\"precio\"));\n\t\tString importado = request.getParameter(\"importado\");\n\t\tString paisOrigen = request.getParameter(\"POrig\");\n\t\t// Crear un objeto del tipo producto\n\t\tProducto producto = new Producto(codArticulo, seccion, nombreArticulo, precio, fecha, importado, paisOrigen);\n\t\t// Enviar el objeto al modelo e insertar el objeto producto en la BBDD\n\t\tmodeloProductos.agregarProducto(producto);\n\t\t// Volver al listado de productos\n\t\tobtenerProductos(request, response);\n\n\t}", "public void pesquisar() {\n\t\tthis.alunos = this.alunoDao.listarTodos();\n\t\tthis.quantPesquisada = this.alunos.size();\n\t\tSystem.out.println(\"Teste\");\n\n\t}", "public void adicionar(ItemProduto item) {\n\t\titens.add(item);\n\t}", "public static Producto insertProducto(int codProd,String nomb_modelo,Cliente cliente){\n Producto prod = new Producto(codProd,nomb_modelo,cliente);\n try {\n prod.registrarProducto();\n } catch (SQLException ex) {\n // En caso de haber una excepcion se imprime el mensaje\n System.err.println(ex.getMessage());\n }\n return prod;\n }", "@Override\n\tpublic void altaProyecto(Proyecto proyecto) {\n\t\tproyectoRepo.save(proyecto);\n\t\t\n\t}", "@Path(\"{id}/produtos/{produtoId}/quantidade\") //Dizendo os parametro a serem recebidos na requisicao que vai vir pela uri\r\n\t@PUT //Digo que esse metodo deve ser acessado usando PUT (update)\r\n\tpublic Response alteraProduto( String conteudoRecebido, @PathParam (\"id\") long id, @PathParam(\"produtoId\") long produtoId ){ //Descrevo o tipo dos parametros recebidos\r\n\t\r\n\t\t//Busca o carrinho\r\n\t\tCarrinho carrinho = new CarrinhoDAO().busca(id);\r\n\t\t\r\n\t\t\r\n\t\t//Pegando o conteudo enviado na requisicao\r\n\t\tProduto produto = (Produto) new XStream().fromXML( conteudoRecebido );\r\n\t\t\r\n\t\t\r\n\t\t//Update do produto do Carrinho\r\n\t\tcarrinho.trocaQuantidade( produto );\r\n\r\n\t\t\r\n\t\t//Retorno o statusCode 200 ok\r\n\t\treturn Response.ok().build();\r\n\t\t\r\n\t\t\r\n\t}", "public void setCodProd(IProduto codigo);", "@Query(value = \"SELECT * FROM produtos WHERE prd_id = ?\", nativeQuery = true)\r\n public ProdutosModel findOneById (Integer id);", "@Override\n @TransactionAttribute(TransactionAttributeType.REQUIRED)\n public synchronized Boleto procesarBoleto(Boleto b) throws CRUDException {\n Optional op;\n Aerolinea a = em.find(Aerolinea.class, b.getIdAerolinea().getIdAerolinea());\n Cliente c = em.find(Cliente.class, b.getIdCliente().getIdCliente());\n NotaDebito notaDebito = null;\n NotaDebitoTransaccion transaccion = null;\n ComprobanteContable comprobanteAsiento = null, comprobanteIngreso = null;\n AsientoContable totalCancelar = null, montoPagarLinea = null,\n montoDescuento = null, montoComision = null, montoFee = null;\n\n AsientoContable ingTotalCancelarCaja = null, ingTotalCancelarHaber = null;\n IngresoCaja ingreso = null;\n IngresoTransaccion ingTran = null;\n\n try {\n // Revisamos que el boleto no este registrado\n if (isBoletoRegistrado(b)) {\n throw new CRUDException(\"El Numero de Boleto ya ha sido registrado\");\n }\n\n //4. Obtenemos la configuracion del Boleto para guardar en el comprobanteAsiento\n HashMap<String, Integer> parameters = new HashMap<>();\n parameters.put(\"idEmpresa\", b.getIdEmpresa());\n List lconf = ejbComprobante.get(\"ContabilidadBoletaje.find\", ContabilidadBoletaje.class, parameters);\n if (lconf.isEmpty()) {\n throw new CRUDException(\"Los parametros de Contabilidad para la empresa no estan Configurados\");\n }\n\n AerolineaCuenta av = getAerolineCuenta(b, \"V\");\n\n if (av == null) {\n throw new CRUDException(\"No existe Cuenta asociada a la Aerolinea para Ventas\");\n }\n\n AerolineaCuenta ac = getAerolineCuenta(b, \"C\");\n\n if (ac == null) {\n throw new CRUDException(\"No existe Cuenta asociada a la Aerolinea para Comisiones\");\n }\n\n //Obtenemos la configuracion de las cuentas para el boletaje\n ContabilidadBoletaje cbconf = (ContabilidadBoletaje) lconf.get(0);\n\n // SI no existiera alguna configuraion, no hace nada\n if (validarConfiguracion(cbconf)) {\n //1. Registra el nombre del pasajero en la tabla cnt_cliente_pasajero\n saveClientePasajero(b);\n\n //2. CRear nota de debito para el boleto en la tabla cnt_nota_debito\n notaDebito = ejbNotaDebito.createNotaDebito(b);\n notaDebito.setIdNotaDebito(insert(notaDebito));\n\n b.setIdNotaDebito(notaDebito.getIdNotaDebito());\n b.setEstado(Boleto.Estado.EMITIDO);\n insert(b);\n //notaDebito.getNotaDebitoPK().setIdNotaDebito(insert(notaDebito));\n //crea la transaccion de la nota de Debito\n transaccion = ejbNotaDebito.createNotaDebitoTransaccion(b, notaDebito);\n //transaccion.getNotaDebitoTransaccionPK().setIdNotaDebitoTransaccion(insert(transaccion));\n transaccion.setIdNotaDebitoTransaccion(insert(transaccion));\n //3. Registramos el Boleto\n\n //insert(b);\n // creamos el Comprobante Contable\n comprobanteAsiento = ejbComprobante.createAsientoDiarioBoleto(b);\n comprobanteAsiento.setIdNotaDebito(notaDebito.getIdNotaDebito());\n comprobanteAsiento.setIdLibro(insert(comprobanteAsiento));\n // se crean los asientos de acuerdo a la configuracion.\n b.setIdLibro(comprobanteAsiento.getIdLibro());\n\n //TotalCancelar\n //totalCancelar = ejbComprobante.crearTotalCancelar(b, comprobanteAsiento, cbconf, a, transaccion.getIdNotaDebitoTransaccion());\n totalCancelar = ejbComprobante.crearTotalCancelar(b, comprobanteAsiento, cbconf, a, transaccion);\n insert(totalCancelar);\n //ejbComprobante.insert(totalCancelar);\n //DiferenciaTotalBoleto\n montoPagarLinea = ejbComprobante.crearMontoPagarLineaAerea(b, comprobanteAsiento, cbconf, av, notaDebito, transaccion);\n //ejbComprobante.insert(montoPagarLinea);\n insert(montoPagarLinea);\n //Comision\n montoComision = ejbComprobante.crearMontoComision(b, comprobanteAsiento, a, ac, notaDebito, transaccion);\n //ejbComprobante.insert(montoComision);\n insert(montoComision);\n //Fee\n montoFee = ejbComprobante.crearMontoFee(b, comprobanteAsiento, cbconf, a, notaDebito, transaccion);\n //ejbComprobante.insert(montoFee);\n insert(montoFee);\n //Descuento\n montoDescuento = ejbComprobante.crearMontoDescuentos(b, comprobanteAsiento, cbconf, a, notaDebito, transaccion);\n //ejbComprobante.insert(montoDescuento);\n insert(montoDescuento);\n\n //actualizamos los montos Totales del Comprobante.\n double totalDebeNac = 0;\n double totalDebeExt = 0;\n double totalHaberNac = 0;\n double totalHaberExt = 0;\n //Se realizan las sumas para el comprobanteAsiento.\n if (b.getTipoCupon().equals(Boleto.Cupon.INTERNACIONAL)) {\n op = Optional.ofNullable(totalCancelar.getMontoDebeExt());\n if (op.isPresent()) {\n totalDebeExt += totalCancelar.getMontoDebeExt().doubleValue();\n }\n\n op = Optional.ofNullable(montoDescuento);\n if (op.isPresent()) {\n totalDebeExt += montoDescuento.getMontoDebeExt().doubleValue();\n }\n\n op = Optional.ofNullable(totalDebeExt);\n if (op.isPresent()) {\n totalDebeNac = totalDebeExt * b.getFactorCambiario().doubleValue();\n }\n // Haber\n\n op = Optional.ofNullable(montoPagarLinea.getMontoHaberExt());\n if (op.isPresent()) {\n totalHaberExt += montoPagarLinea.getMontoHaberExt().doubleValue();\n }\n\n op = Optional.ofNullable(montoComision);\n if (op.isPresent()) {\n totalHaberExt += montoComision.getMontoHaberExt().doubleValue();\n }\n\n op = Optional.ofNullable(montoFee);\n if (op.isPresent()) {\n totalHaberExt += montoFee.getMontoHaberExt().doubleValue();\n }\n\n op = Optional.ofNullable(totalHaberExt);\n if (op.isPresent()) {\n totalHaberNac = totalHaberExt * b.getFactorCambiario().doubleValue();\n }\n\n } else if (b.getTipoCupon().equals(Boleto.Cupon.NACIONAL)) {\n op = Optional.ofNullable(totalCancelar.getMontoDebeNac());\n if (op.isPresent()) {\n totalDebeNac += totalCancelar.getMontoDebeNac().doubleValue();\n }\n\n op = Optional.ofNullable(montoDescuento.getMontoDebeNac());\n if (op.isPresent()) {\n totalDebeNac += montoDescuento.getMontoDebeNac().doubleValue();\n }\n op = Optional.ofNullable(totalDebeNac);\n if (op.isPresent()) {\n totalDebeExt = totalDebeNac / b.getFactorCambiario().doubleValue();\n }\n //\n\n op = Optional.ofNullable(montoPagarLinea.getMontoHaberNac());\n if (op.isPresent()) {\n totalHaberNac += montoPagarLinea.getMontoHaberNac().doubleValue();\n }\n op = Optional.ofNullable(montoComision.getMontoHaberNac());\n if (op.isPresent()) {\n totalHaberNac += montoComision.getMontoHaberNac().doubleValue();\n }\n op = Optional.ofNullable(montoFee.getMontoHaberNac());\n if (op.isPresent()) {\n totalHaberNac += montoFee.getMontoHaberNac().doubleValue();\n }\n op = Optional.ofNullable(totalHaberNac);\n if (op.isPresent()) {\n totalHaberExt = totalHaberNac / b.getFactorCambiario().doubleValue();\n }\n }\n\n comprobanteAsiento.setTotalDebeExt(new BigDecimal(totalDebeExt));\n comprobanteAsiento.setTotalHaberExt(new BigDecimal(totalHaberExt));\n comprobanteAsiento.setTotalDebeNac(new BigDecimal(totalDebeNac));\n comprobanteAsiento.setTotalHaberNac(new BigDecimal(totalHaberNac));\n\n em.merge(comprobanteAsiento);\n\n // creamos para las formas de pago\n //Si son Contado o Tarjeta, se crea el Ingreso a Caja y el Comprobante de Ingreso\n if (b.getFormaPago().equals(FormasPago.CONTADO) || b.getFormaPago().equals(FormasPago.TARJETA)) {\n //Crear Ingreso a Caja\n ingreso = ejbIngresoCaja.createIngresoCaja(b, notaDebito);\n ingreso.setIdIngresoCaja(insert(ingreso));\n b.setIdIngresoCaja(ingreso.getIdIngresoCaja());\n\n ingTran = ejbIngresoCaja.createIngresoCajaTransaccion(b, notaDebito, transaccion, ingreso);\n ingTran.setIdTransaccion(insert(ingTran));\n b.setIdIngresoCajaTransaccion(ingTran.getIdTransaccion());\n\n //Crear Comprobante de Ingreso\n comprobanteIngreso = ejbComprobante.createComprobante(a, b, c, ComprobanteContable.Tipo.COMPROBANTE_INGRESO);\n comprobanteIngreso.setIdNotaDebito(notaDebito.getIdNotaDebito());\n /* if (ingreso.getMoneda().equals(Moneda.EXTRANJERA)) {\n comprobanteIngreso.setTotalDebeExt(ingreso.getMontoAbonadoUsd());\n comprobanteIngreso.setTotalHaberExt(ingreso.getMontoAbonadoUsd());\n comprobanteIngreso.setTotalDebeNac(ingreso.getMontoAbonadoUsd().multiply(ingreso.getFactorCambiario()));\n comprobanteIngreso.setTotalHaberNac(ingreso.getMontoAbonadoUsd().multiply(ingreso.getFactorCambiario()));\n\n notaDebito.setMontoAdeudadoUsd(notaDebito.getMontoTotalUsd().subtract(ingreso.getMontoAbonadoUsd()));\n } else {\n comprobanteIngreso.setTotalDebeExt(ingreso.getMontoAbonadoBs());\n comprobanteIngreso.setTotalHaberExt(ingreso.getMontoAbonadoBs());\n comprobanteIngreso.setTotalDebeNac(ingreso.getMontoAbonadoBs().divide(ingreso.getFactorCambiario()));\n comprobanteIngreso.setTotalHaberNac(ingreso.getMontoAbonadoBs().divide(ingreso.getFactorCambiario()));\n\n notaDebito.setMontoAdeudadoBs(notaDebito.getMontoTotalBs().subtract(ingreso.getMontoAbonadoBs()));\n }*/\n insert(comprobanteIngreso);\n\n /**\n *\n */\n // ESTAS TRANSACCIONES PASARLAS. al nuevo metodo de cada uno\n /*ingTotalCancelarCaja = ejbComprobante.createTotalCancelarIngresoCajaDebe(comprobanteIngreso, cbconf, a, b);\n ingTotalCancelarCaja.setIdIngresoCajaTransaccion(ingTran.getIdTransaccion());\n insert(ingTotalCancelarCaja);\n\n ingTotalCancelarHaber = ejbComprobante.createTotalCancelarIngresoClienteHaber(comprobanteIngreso, cbconf, a, b);\n ingTotalCancelarHaber.setIdIngresoCajaTransaccion(ingTran.getIdTransaccion());\n insert(ingTotalCancelarHaber);*/\n /**\n *\n */\n //actualizar nota debito\n em.merge(notaDebito);\n }\n\n //b.setIdLibro(notaDebito.getIdNotaDebito());\n if (ingTran != null) {\n b.setIdIngresoCajaTransaccion(ingTran.getIdTransaccion());\n }\n\n em.merge(b);\n }\n } catch (Exception e) {\n\n em.clear();\n\n Optional opex = Optional.ofNullable(notaDebito);\n if (opex.isPresent()) {\n remove(notaDebito);\n }\n\n opex = Optional.ofNullable(transaccion);\n if (opex.isPresent()) {\n remove(transaccion);\n }\n\n opex = Optional.ofNullable(comprobanteAsiento);\n if (opex.isPresent()) {\n remove(comprobanteAsiento);\n }\n\n opex = Optional.ofNullable(totalCancelar);\n if (opex.isPresent()) {\n remove(totalCancelar);\n }\n\n opex = Optional.ofNullable(montoPagarLinea);\n if (opex.isPresent()) {\n remove(montoPagarLinea);\n }\n opex = Optional.ofNullable(montoDescuento);\n if (opex.isPresent()) {\n remove(montoDescuento);\n }\n opex = Optional.ofNullable(montoComision);\n if (opex.isPresent()) {\n remove(montoComision);\n }\n opex = Optional.ofNullable(montoFee);\n if (opex.isPresent()) {\n remove(montoFee);\n }\n\n opex = Optional.ofNullable(b);\n if (opex.isPresent() && b.getIdBoleto() > 0) {\n remove(b);\n }\n\n opex = Optional.ofNullable(ingreso);\n if (opex.isPresent()) {\n remove(ingreso);\n }\n\n opex = Optional.ofNullable(ingTran);\n if (opex.isPresent()) {\n remove(ingTran);\n }\n\n opex = Optional.ofNullable(ingTotalCancelarCaja);\n if (opex.isPresent()) {\n remove(ingTotalCancelarCaja);\n }\n\n opex = Optional.ofNullable(ingTotalCancelarHaber);\n if (opex.isPresent()) {\n remove(ingTotalCancelarHaber);\n }\n\n throw new CRUDException(e.getMessage());\n\n }\n\n em.flush();\n return b;\n }", "public void setProdPainel(List<Tb_Prod_Painel_PromoBeans> lpb) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"insert into tb_prod_painel_promo(codigo,descricao,unid,valor1,valor2,oferta,terminal,painel) values \"; \r\n String sql2 = null;\r\n for (Tb_Prod_Painel_PromoBeans pb : lpb) { \r\n String sql3 = \"('\" +pb.getCodigo()+ \"','\" +pb.getDescricao() + \"','\" + pb.getUnid() + \"','\" + pb.getValor1() + \"','\" + pb.getValor2() + \"',\"\r\n + \"\" + pb.getOferta() + \",\" + pb.getTerminal() + \",\" + pb.getPainel() + \") \"; \r\n if (sql2==null) { \r\n sql2=sql+sql3;\r\n }else{ \r\n sql2=sql2+\",\"+sql3;\r\n }\r\n } \r\n PreparedStatement pstm = conexao.prepareStatement(sql2);\r\n pstm.execute();\r\n pstm.close();\r\n conexao.close();\r\n }\r\n }", "private static void atualizaContadorCodigos(ArrayList<Produto> produto) {\n int contadorAtual = produto.size() + 1;\n Produto.setContador(contadorAtual);\n }", "public interface CRUDProduto {\r\n \r\n public boolean save(Produto produto);\r\n\r\n public boolean update(Produto produto);\r\n\r\n public boolean delete(Produto produto);\r\n\r\n public Produto get(long id);\r\n\r\n public List<Produto> getAll();\r\n}", "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "public static void deletarProduto(long id_produto) {\r\n PreparedStatement stmn = null;\r\n try {\r\n stmn = connection.prepareStatement(\"Delete from produto where id_produto = ?\");\r\n stmn.setLong(1, id_produto);\r\n\r\n int row = stmn.executeUpdate();\r\n if (row == 0) {\r\n System.out.println(\"Não foi possível excluir o registro do id \" + id_produto);\r\n } else {\r\n System.out.println(\"Produto exluído com sucesso\");\r\n }\r\n } catch (SQLException throwables) {\r\n throwables.printStackTrace();\r\n }\r\n }", "public String agregar(String trama) throws JsonProcessingException {\n\t\tString respuesta = \"\";\n\t\tRespuestaGeneralDto respuestaGeneral = new RespuestaGeneralDto();\n \t\tlogger.info(HILO + \"[ \" + Thread.currentThread().getId()+ \" ] \" \n \t\t\t\t+ \", ProductoService.agregar trama entrante para agregar o actualizar producto: \" + trama);\n\t\ttry {\n\t\t\t/*\n\t\t\t * Se convierte el dato String a estructura json para ser manipulado en JAVA\n\t\t\t */\n\t\t\tJSONObject obj = new JSONObject(trama);\n\t\t\tProducto producto = new Producto();\n\t\t\t/*\n\t\t\t * use: es una bandera para identificar el tipo de solicitud a realizar:\n\t\t\t * use: 0 -> agregar un nuevo proudcto a la base de datos;\n\t\t\t * use: 1 -> actualizar un producto existente en la base de datos\n\t\t\t */\n\t\t\tString use = obj.getString(\"use\");\n\t\t\tif(use.equalsIgnoreCase(\"0\")) {\n\t\t\t\tString nombre = obj.getString(\"nombre\");\n\t\t\t\t/*\n\t\t\t\t * Se realiza una consulta por nombre a la base de datos a la tabla producto\n\t\t\t\t * para verificar que no existe un producto con el mismo nombre ingresado.\n\t\t\t\t */\n\t\t\t\tProducto productoBusqueda = productoDao.buscarPorNombre(nombre);\n\t\t\t\tif(productoBusqueda.getProductoId() == null) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Si no existe un producto con el mismo nombre pasa a crear el nuevo producto\n\t\t\t\t\t */\n\t\t\t\t\tproducto.setProductoNombre(nombre);\n\t\t\t\t\tproducto.setProductoCantidad(obj.getLong(\"cantidad\"));\n\t\t\t\t\tTipoProducto tipoProducto = tipoProductoDao.consultarPorId(obj.getLong(\"tipoProducto\"));\n\t\t\t\t\tproducto.setProductoTipoProducto(tipoProducto);\n\t\t\t\t\tproducto.setProductoPrecio(obj.getLong(\"precio\"));\n\t\t\t\t\tproducto.setProductoFechaRegistro(new Date());\n\t\t\t\t\tproductoDao.update(producto);\n\t\t\t\t\trespuestaGeneral.setTipoRespuesta(\"0\");\n\t\t\t\t\trespuestaGeneral.setRespuesta(\"Nuevo producto registrado con éxito.\");\n\t\t\t\t\t/*\n\t\t\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t\t\t */\n\t\t\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t\t\t}else {\n\t\t\t\t\t/*\n\t\t\t\t\t * Si existe un producto con el mismo nombre, se devolvera una excepcion,\n\t\t\t\t\t * para indicarle al cliente.\n\t\t\t\t\t */\n\t\t\t\t\trespuestaGeneral.setTipoRespuesta(\"1\");\n\t\t\t\t\trespuestaGeneral.setRespuesta(\"Ya existe un producto con el nombre ingresado.\");\n\t\t\t\t\t/*\n\t\t\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t\t\t */\n\t\t\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t/*\n\t\t\t\t * Se realiza una busqueda del producto registrado para actualizar\n\t\t\t\t * para implementar los datos que no van a ser reemplazados ni actualizados\n\t\t\t\t */\n\t\t\t\tProducto productoBuscar = productoDao.buscarPorId(obj.getLong(\"id\"));\n\t\t\t\tproducto.setProductoId(obj.getLong(\"id\"));\n\t\t\t\tproducto.setProductoNombre(obj.getString(\"nombre\"));\n\t\t\t\tproducto.setProductoCantidad(obj.getLong(\"cantidad\"));\n\t\t\t\tproducto.setProductoTipoProducto(productoBuscar.getProductoTipoProducto());\n\t\t\t\tproducto.setProductoPrecio(obj.getLong(\"precio\"));\n\t\t\t\tproducto.setProductoFechaRegistro(productoBuscar.getProductoFechaRegistro());\n\t\t\t\tproductoDao.update(producto);\n\t\t\t\trespuestaGeneral.setTipoRespuesta(\"0\");\n\t\t\t\trespuestaGeneral.setRespuesta(\"Producto actualizado con exito.\");\n\t\t\t\t/*\n\t\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t\t */\n\t\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t\t}\n\t\t\t/*\n\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t */\n\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t} catch (Exception e) {\n\t\t\t/*\n\t\t\t * En caso de un error, este se mostrara en los logs\n\t\t\t * Sera enviada la respuesta correspondiente al cliente.\n\t\t\t */\n\t\t\tlogger.error(HILO + \"[ \" + Thread.currentThread().getId()+ \" ] \" \n\t\t\t\t\t+ \"ProductoService.agregar, \"\n\t\t\t\t\t+ \", descripcion: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\trespuestaGeneral.setTipoRespuesta(\"1\");\n\t\t\trespuestaGeneral.setRespuesta(\"Error al ingresar los datos, por favor intente mas tarde.\");\n\t\t\t/*\n\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t */\n\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t}\n \t\tlogger.info(HILO + \"[ \" + Thread.currentThread().getId()+ \" ] \" \n \t\t\t\t+ \", ProductoService.agregar resultado de agregar/actualizar un producto: \" + respuesta);\n\t\treturn respuesta;\n\t}", "private static void adicionarProduto() throws Exception {\r\n //inserir produto \r\n String nomeProduto, descricao, marca, origem;\r\n int idCategoria = 0;\r\n Integer[] idsValidosC;\r\n float preco;\r\n int id;\r\n boolean erro, valido;\r\n System.out.println(\"\\t** Adicionar produto **\\n\");\r\n System.out.print(\"Nome do produto: \");\r\n nomeProduto = read.nextLine();\r\n nomeProduto = read.nextLine();\r\n System.out.print(\"Descricao do produto: \");\r\n descricao = read.nextLine();\r\n System.out.print(\"Preco do produto: \");\r\n preco = read.nextFloat();\r\n System.out.print(\"Marca do produto: \");\r\n marca = read.nextLine();\r\n marca = read.nextLine();\r\n System.out.print(\"Origem do produto: \");\r\n origem = read.nextLine();\r\n System.out.println();\r\n if ((idsValidosC = listaCategoriasCadastradas()) != null) {\r\n System.out.print(\"\\nEscolha uma categoria para o produto,\\ne digite o ID: \");\r\n do {\r\n valido = false;\r\n idCategoria = read.nextInt();\r\n valido = Arrays.asList(idsValidosC).contains(idCategoria);\r\n if (!valido) {\r\n System.out.println(\"Esse ID não é valido!\\nDigite um ID valido: \");\r\n }\r\n } while (!valido);\r\n do {\r\n erro = false;\r\n System.out.println(\"\\nAdicionar novo produto?\");\r\n System.out.print(\"1 - SIM\\n2 - NÂO\\nR: \");\r\n switch (read.nextByte()) {\r\n case 1:\r\n id = arqProdutos.inserir(new Produto(nomeProduto, descricao, preco, marca, origem, idCategoria));\r\n System.out.println(\"\\nProduto inserido com o ID: \" + id);\r\n break;\r\n case 2:\r\n System.out.println(\"\\nNovo produto não foi inserido!\");\r\n break;\r\n default:\r\n System.out.println(\"\\nOpção Inválida!\\n\");\r\n erro = true;\r\n break;\r\n }\r\n } while (erro);\r\n } else {\r\n System.out.println(\"\\nOps..! Aparentemente não existem categorias para associar o novo produto!\");\r\n System.out.println(\"Por favor, crie ao menos uma categoria antes de adicionar um produto!\");\r\n Thread.sleep(1000);\r\n }\r\n }", "public void aplicarDescuento();", "public interface GenereicDaoAPI extends CrudRepository<Producto, Long> {\n\n}", "public void salvar() throws Exception {\n // Verifica se o bean existe\n if(b == null)\n throw new Exception(Main.recursos.getString(\"bd.objeto.nulo\"));\n\n // Primeiro salva o subtipo de banca\n new SubTipoBancaBD(b.getSubTipoBanca()).salvar();\n\n String sql = \"INSERT INTO banca (idBanca, idTipoBanca, idSubTipoBanca, descricao, ano, idCurriculoLattes, idLattes) \" +\n \"VALUES (null, \"+ b.getTipoBanca().getIdTipoBanca() +\", \"+ b.getSubTipoBanca().getIdSubTipoBanca() +\", \" +\n \"'\"+ b.getDescricao() +\"', \"+ b.getAno() +\", \"+ idCurriculoLattes + \" , \"+ b.getIdLattes() +\")\";\n\n\n Transacao.executar(sql);\n }", "public static void deletarProdutos(){\n if(ListaDProduto.isEmpty()){\n SaidaDados(\"Nenhum produto cadastrado\");\n return;\n } \n ListaDProduto.clear();\n SaidaDados(\"Todos produto deletado com sucesso\");\n \n \n }", "public void menuAlterarProdutos(String username){\n Scanner s= new Scanner(System.in);\n CatalogoProdutos cp=b_dados.getLojas().get(username).getCatalogoProdutos();\n do {\n System.out.println(\"Escolha o que pretende fazer\");\n System.out.println(\"1 - Adicionar um produto\");\n System.out.println(\"2 - Atualizar um produto\");\n System.out.println(\"3 - Remover um produto\");\n System.out.println(\"0 - Retroceder\");\n String opcao=s.nextLine();\n if(opcao.equals(\"0\"))\n break;\n switch (opcao){\n case \"1\":\n System.out.println(\"Escreva a descrição do produto\");\n String descricao=s.nextLine();\n System.out.println(\"Introduza o preço do produto\");\n double preco=s.nextDouble();\n System.out.println(\"Introduza a quantidade disponivel\");\n double stock=s.nextDouble();\n Produto p = b_dados.novoProduto(username,descricao,preco,stock);\n b_dados.addProduto(username,p);\n break;\n case \"2\":\n int i=0;\n while(i==0){\n LogLoja l=b_dados.getLojas().get(username);\n System.out.println(l.getCatalogoProdutos().toString());\n System.out.println(\"Escreva o código de produto que deseja atualizar:\");\n String codigo=s.nextLine();\n if(b_dados.produtoExiste(username,codigo)) {\n i = 1;\n System.out.println(\"Introduza o novo stock do produto:\");\n double newstock = s.nextDouble();\n b_dados.updatestock(username, newstock, codigo);\n }\n\n else\n System.out.println(\"Esse Produto não existe tente de novo\");\n }\n break;\n case \"3\":\n int c=0;\n while(c==0){\n LogLoja l=b_dados.getLojas().get(username);\n System.out.println(l.getCatalogoProdutos().toString());\n System.out.println(\"Escreva o código de produto que deseja remover:\");\n String cod=s.nextLine();\n if(b_dados.produtoExiste(username,cod)){\n c=1;\n Produto prod=b_dados.buscaProduto(username,cod);\n b_dados.removeProduto(username,prod);\n }\n else\n System.out.println(\"Esse Produto não existe tente de novo\");\n }\n break;\n default:\n System.out.println(\"Entrada inválida\");\n break;\n }\n System.out.println(\"O seu catálogo:\");\n System.out.println(b_dados.getLojas().get(username).getCatalogoProdutos().toString());\n\n }while(true);\n }", "public void realiserAcahatProduit() {\n\t\t\n\t}", "private static void alterarProduto() throws Exception {\r\n String nomeProduto, descricao, marca, origem;\r\n int idCategoria;\r\n Integer[] idsValidosC;\r\n float preco;\r\n int id;\r\n boolean erro, result, valido;\r\n System.out.println(\"\\t** Alterar produto **\\n\");\r\n do {\r\n erro = false;\r\n System.out.print(\"ID do produto a ser alterado: \");\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 System.out.print(\"Nome do produto: \");\r\n nomeProduto = read.nextLine();\r\n nomeProduto = read.nextLine();\r\n System.out.print(\"Descricao do produto: \");\r\n descricao = read.nextLine();\r\n System.out.print(\"Preco do produto: \");\r\n preco = read.nextFloat();\r\n System.out.print(\"Marca do produto: \");\r\n marca = read.nextLine();\r\n marca = read.nextLine();\r\n System.out.print(\"Origem do produto: \");\r\n origem = read.nextLine();\r\n System.out.println();\r\n if ((idsValidosC = listaCategoriasCadastradas()) != null) {\r\n System.out.print(\"Escolha uma categoria para o produto,\\ne digite o ID: \");\r\n do {\r\n valido = false;\r\n idCategoria = read.nextInt();\r\n valido = Arrays.asList(idsValidosC).contains(idCategoria);\r\n if (!valido) {\r\n System.out.print(\"Esse ID não é valido!\\nDigite um ID valido: \");\r\n }\r\n } while (!valido);\r\n do {\r\n erro = false;\r\n System.out.println(\"\\nAlterar produto?\");\r\n System.out.print(\"1 - SIM\\n2 - NÂO\\nR: \");\r\n switch (read.nextByte()) {\r\n case 1:\r\n result = arqProdutos.alterar(id, new Produto(nomeProduto, descricao, preco, marca, origem, idCategoria));\r\n if (result) {\r\n System.out.println(\"Alterado com sucesso!\");\r\n } else {\r\n System.out.println(\"Produto para alterar não encontrado!\");\r\n }\r\n break;\r\n case 2:\r\n System.out.println(\"\\nOperação Cancelada!\");\r\n break;\r\n default:\r\n System.out.println(\"\\nOpção Inválida!\\n\");\r\n erro = true;\r\n break;\r\n }\r\n } while (erro);\r\n } else {\r\n System.out.println(\"\\nOps..! Aparentemente não existem categorias para associar ao produto!\");\r\n System.out.println(\"Por favor, crie ao menos uma categoria antes de adicionar um produto!\");\r\n Thread.sleep(1000);\r\n }\r\n }", "public Conocido agrega(Conocido modelo) {\n\n final EntityManager em = getEntityManager();\n\n try {\n\n final EntityTransaction tx = em.getTransaction();\n\n tx.begin();\n\n em.persist(modelo);\n\n tx.commit();\n\n return modelo;\n\n } finally {\n\n em.close();\n\n }\n\n }", "public abstract void registrarSubproducto(EntityManager sesion, Subproducto subproducto);", "public void guardarProducto(Producto producto, EntityManager em) {\n EntityTransaction etx = em.getTransaction();\n try {\n etx.begin(); \n em.persist(producto);\n etx.commit();\n } catch (Exception e) {\n em.getTransaction().rollback();\n LOGGER.error(e);\n } \n }", "public List<Tb_Prod_Painel_PromoBeans> getProdPainel(Integer terminal, Integer painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel=? order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal);\r\n pstm.setInt(2, painel);\r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>();\r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "public void borrarProducto() {\n }", "public BigDecimal premiacaoAberturaProduto(Produto p) {\n\t\tfor (PoliticaVendaConsignacaoTipoVendedorProduto politica : tipoVendedor.getPoliticasVCTVP()) {\n\t\t\tif (p.equals(politica.getProduto())) {\n\t\t\t\treturn politica.getAberturaPremiacao();\n\t\t\t}\n\t\t}\n\t\treturn BigDecimal.ZERO;\n\t}" ]
[ "0.6929276", "0.6612078", "0.63085383", "0.61874485", "0.61294794", "0.60325336", "0.5956253", "0.59513724", "0.59378463", "0.5928694", "0.59126574", "0.5884787", "0.5861008", "0.5810623", "0.58007777", "0.5798345", "0.5733258", "0.5732033", "0.5727585", "0.57097536", "0.5696663", "0.56834763", "0.56727916", "0.56608874", "0.5651242", "0.5634852", "0.56318545", "0.5628653", "0.562734", "0.56236", "0.5613227", "0.5599808", "0.55961096", "0.557845", "0.5573425", "0.55709517", "0.5537524", "0.5527552", "0.5521661", "0.551013", "0.5496988", "0.54800415", "0.5479772", "0.5473906", "0.54732496", "0.5472232", "0.5438647", "0.54288304", "0.54274774", "0.5424205", "0.542149", "0.54207593", "0.5407414", "0.5402276", "0.5401318", "0.53907114", "0.5386252", "0.53862154", "0.5382435", "0.53666884", "0.5365549", "0.5364086", "0.5355451", "0.5350362", "0.53492993", "0.53462195", "0.5345874", "0.534514", "0.532728", "0.53227633", "0.5322553", "0.5311863", "0.5299545", "0.52963465", "0.5287477", "0.52792263", "0.5278782", "0.5276654", "0.52734643", "0.52723235", "0.52687156", "0.5267842", "0.5266478", "0.52633154", "0.52557665", "0.5254327", "0.5252234", "0.52463603", "0.5244522", "0.52443486", "0.5242913", "0.52310926", "0.52298087", "0.52282065", "0.5227237", "0.5223912", "0.521755", "0.5217232", "0.5215323", "0.5214529", "0.5213618" ]
0.0
-1
Catch all for any exceptions
@ExceptionHandler({Exception.class}) protected ResponseEntity<Object> handleUnknownException(Exception ex, WebRequest request) { logger.error("Exception Stack",ex); ExceptionMessages emsg =new ExceptionMessages(); emsg.setExceptionMsg(ex.getMessage()); return new ResponseEntity<Object>(emsg, HttpStatus.BAD_REQUEST); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Catch[] exceptionHandlers();", "protected abstract void exceptionsCatching( ExceptionType exceptionType );", "private void doCatch() throws NotConnectedException, NotSuspendedException, NoResponseException\n\t{\n\t\twaitTilHalted();\n\n String typeToCatch = null;\n\n\t\t/* currentXXX may NOT be invalid! */\n\t\tif (!hasMoreTokens())\n\t\t{\n\t\t\terr(\"Catch requires an exception name.\");\n\t\t\treturn;\n\t\t}\n\n typeToCatch = nextToken();\n if (typeToCatch == null || typeToCatch.length() == 0)\n {\n \terr(\"Illegal argument\");\n \treturn;\n }\n\n Value type = null;\n if (typeToCatch.equals(\"*\")) //$NON-NLS-1$\n {\n \ttypeToCatch = null;\n }\n else\n {\n\t type = getSession().getGlobal(typeToCatch);\n\t if (type == null)\n\t {\n\t \terr(\"Type not found.\");\n\t \treturn;\n\t }\n\n\t String typeName = type.getTypeName();\n\t int at = typeName.indexOf('@');\n\t if (at != -1)\n\t \ttypeName = typeName.substring(0, at);\n\t if (!typeName.endsWith(\"$\"))\n\t {\n\t \terr(\"Not a type: \" + type);\n\t \treturn;\n\t }\n }\n\n CatchAction c;\n\t\ttry {\n\t\t\tc = addCatch(typeToCatch);\n\t\t} catch (NotSupportedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n \tMap<String, Object> args = new HashMap<String, Object>();\n \targs.put(\"id\", c.getId()); //$NON-NLS-1$\n \tc.getId();\n\t}", "@Override\n\tpublic void catching(Throwable t) {\n\n\t}", "private List<Throwable> exceptions(Object swallowing) {\n return Collections.emptyList();\n }", "public void setExceptionHandlers(Catch[] exceptions);", "void doCatch(Throwable t) throws Throwable;", "@ExceptionHandler(Exception.class)\n protected ResponseEntity<Object> handleAllOtherErrors(Exception ex, WebRequest request) {\n AppExceptionBean exceptionBean = new AppExceptionBean(String.format(\"Something unexpected happened! \" +\n \"We'll be looking into it, but if you want to further discuss this specific problem, \" +\n \"please use the following identifier when contacting support: %s.\", UUID.randomUUID()));\n log.error(exceptionBean.getMessage(), ex);\n return handleExceptionInternal(ex, exceptionBean, new HttpHeaders(), HttpStatus.BAD_REQUEST, request);\n }", "UsedExceptions getExceptions();", "Object getExceptionHandlers();", "public static TryExpression tryCatch(Expression body, CatchBlock[] handlers) { throw Extensions.todo(); }", "void mo57276a(Exception exc);", "@Override\n public List<String> catchFaults(){\n List<String> errors = new ArrayList<>();\n severityLevels.forEach(level -> {\n if(level.equals(\"ERROR\")){\n errors.add(level);\n }\n });\n return errors;\n }", "@Override\n\tpublic void catching(Level level, Throwable t) {\n\n\t}", "public void clearExceptions();", "void handleError(Exception ex);", "public static void catchingOnlyFromTry(){\n int x =1;\n try{\n if (true){throw new RuntimeException();}\n }\n catch (RuntimeException e){\n x*=2;\n System.out.println(x);\n if (true){throw new Error();}\n }\n catch(Error err){\n x*=3;\n System.out.println(x);\n }\n x*=5;\n System.out.println(x);\n }", "static void doStuff() {\n try {\n throw new Error();\n } catch (Error me) {\n throw me; // We catch but then rethrow it.\n }\n }", "public final List<BuilderTryBlock> catches() throws RecognitionException {\n List<BuilderTryBlock> tryBlocks = null;\n\n\n tryBlocks = Lists.newArrayList();\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:534:3: ( ^( I_CATCHES ( catch_directive )* ( catchall_directive )* ) )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:534:5: ^( I_CATCHES ( catch_directive )* ( catchall_directive )* )\n {\n match(input, I_CATCHES, FOLLOW_I_CATCHES_in_catches1314);\n if (input.LA(1) == Token.DOWN) {\n match(input, Token.DOWN, null);\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:534:17: ( catch_directive )*\n loop19:\n while (true) {\n int alt19 = 2;\n int LA19_0 = input.LA(1);\n if ((LA19_0 == I_CATCH)) {\n alt19 = 1;\n }\n\n switch (alt19) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:534:17: catch_directive\n {\n pushFollow(FOLLOW_catch_directive_in_catches1316);\n catch_directive();\n state._fsp--;\n\n }\n break;\n\n default:\n break loop19;\n }\n }\n\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:534:34: ( catchall_directive )*\n loop20:\n while (true) {\n int alt20 = 2;\n int LA20_0 = input.LA(1);\n if ((LA20_0 == I_CATCHALL)) {\n alt20 = 1;\n }\n\n switch (alt20) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:534:34: catchall_directive\n {\n pushFollow(FOLLOW_catchall_directive_in_catches1319);\n catchall_directive();\n state._fsp--;\n\n }\n break;\n\n default:\n break loop20;\n }\n }\n\n match(input, Token.UP, null);\n }\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return tryBlocks;\n }", "@Override\r\n\tpublic boolean doCatch(Throwable ex) throws Exception\r\n\t{\n\t\treturn false;\r\n\t}", "@Test\n public void testLoadItemsExceptions() throws Exception {\n\n boolean testFailed = false;\n\n try {\n fillInventoryFileWithTestData(VALID);\n } catch (VendingMachinePersistenceException ex) {\n }\n try {\n dao.loadItems();\n } catch (VendingMachinePersistenceException ex) {\n fail();\n }\n\n try {\n fillInventoryFileWithTestData(FORMAT);\n } catch (VendingMachinePersistenceException ex) {\n }\n try {\n testFailed = true;\n dao.loadItems();\n } catch (VendingMachinePersistenceException ex) {\n testFailed = false;\n } finally {\n if (testFailed) {\n fail();\n }\n }\n\n try {\n fillInventoryFileWithTestData(INCOMPLETE);\n } catch (VendingMachinePersistenceException ex) {\n }\n try {\n testFailed = true;\n dao.loadItems();\n } catch (VendingMachinePersistenceException ex) {\n testFailed = false;\n } finally {\n if (testFailed) {\n fail();\n }\n }\n }", "public static CatchBlock catch_(Class clazz, Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public abstract void onException(Exception e);", "@Override\r\n\tpublic void doException() {\n\r\n\t}", "@Override\n\tpublic void exceptionHandler(Handler<Exception> handler) {\n\t\t\n\t}", "protected boolean allowInExceptionThrowers() {\n return true;\n }", "public static void main(String[] args) throws IOException, SQLException {\n\t\t\ttry{\n\t\t\t\t\tif(args[0].equals(\"1\")){\n\t\t\t\t\t\t\tthrow new IOException(\"test\");\n\t\t\t\t\t}else if(args[0].equals(\"2\")){\n\t\t\t\t\t\t\tthrow new SQLException(\"test\");\n\t\t\t\t\t}\n\t\t\t//In releases prior to Java SE 7\n\t\t\t}catch(IOException ex){\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//duplicate code\n\t\t\t\t\tthrow ex;//duplicate code\n\t\t\t}catch(SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//duplicate code\n\t\t\t\t\tthrow ex;//duplicate code\n\t\t\t}\n\t\t\t\n\t\t\ttry{\n\t\t\t\t\tif(args[0].equals(\"3\")){\n\t\t\t\t\t\t\tthrow new IOException(\"test\");\n\t\t\t\t\t}else if(args[0].equals(\"4\")){\n\t\t\t\t\t\t\tthrow new SQLException(\"test\");\n\t\t\t\t\t}\n\t\t\t//In Java SE 7 and later, eliminates the duplicated code\n\t\t\t//The catch clause specifies the types of exceptions that the block can handle, \n\t\t\t// and each exception type is separated with a vertical bar (|).\n\t\t\t//Note: The catch parameter ex is final \n\t\t\t//\t\tand therefore you cannot assign any values to it within the catch block.\n\t\t\t//Bytecode generated by compiling a catch block that handles multiple exception types \n\t\t\t// will be smaller (and thus superior) than compiling many catch blocks that handle only one exception type each.\n\t\t\t}catch(IOException | SQLException ex){\n\t\t\t\t\t//ex = new SQLException(\"\");//Compile Error: The parameter ex of a multi-catch block cannot be assigned.\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//eliminates the duplicated code\n\t\t\t\t\tthrow ex;\t\n\t\t\t}\t\t\t\n\t}", "void onException(Exception e);", "@Override\n\tpublic void onException(Exception e) {\n\n\t}", "@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)\n @ExceptionHandler(Exception.class)\n public String handleAllException() {\n\n return \"server_error\";\n }", "@Override\n\tprotected Respond exceptHandle(Exception e) {\n\t\treturn SqlTool.normalExceptionDeal(new RspSingleRow(), e);\n\t}", "@jsweet.lang.Name(\"catch\")\r\n native public <U> Promise<U> Catch();", "@Override\n\t\tpublic void onException(Exception arg0) {\n\t\t\t\n\t\t}", "public static CatchBlock catch_(Class clazz, Expression expression) { throw Extensions.todo(); }", "Boolean ignoreExceptions();", "public void toss(Exception e);", "@ExceptionHandler(value = { Exception.class})\n public ResponseEntity<Object> handleAllException(Exception ex, final WebRequest request) {\n\n final String bodyOfResponse = \"Something went wrong.Please contact support\";\n return handleExceptionInternal(ex, bodyOfResponse, new HttpHeaders(), HttpStatus.INTERNAL_SERVER_ERROR, request);\n }", "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1) { throw Extensions.todo(); }", "protected MultiException() {\n\t\t// Can't delegate to the other constructor or GWT RPC gets cranky\n\t\tsuper(MULTIPLE);\n\t\t_causes = Collections.<Throwable> emptySet();\n\t}", "@SuppressWarnings(\"all\")\n public static void innerExceptionTest() {\n int result = -1;\n //Don't stop the loop with exception\n for (int i = 0; i < TEST_CIRCLE_NUM; i++) {\n try {\n //An exception code\n result = 1 / 0;\n } catch (ArithmeticException e) {\n LOGGER.error(\"Divide the zero is wrong\", result);\n }\n }\n }", "@Override\n\t\t\tpublic void onException(Exception arg0) {\n\n\t\t\t}", "public static void main(String[] args) {\n int a= 9;\n int b= 0;\n//one try can followed by multiple catch blocks\n //bcz there are multiple types of exceptions\n //for each exception you can write seperate catch blocks\n \n try {\n int c= a/b;\n System.out.println(c);\n \n }\n catch(ArithmeticException et) {\n\t System.out.println(\"ArithmeticException\");\n }\n \n catch(Exception e){\n\t //its a generic exception\n\t System.out.println(\"occurs maths error\");\n\t \n }\n finally\n {\n\t System.out.println(\"delete cookies\");\n }\n \n \n\t}", "void exceptionCaught(Throwable cause) throws Exception;", "void exceptionCaught(Throwable cause) throws Exception;", "protected void handleException(java.lang.Throwable exception) {\n\tsuper.handleException(exception);\n}", "public void rethrowExceptions() throws MoreAppropriateForThisLevelException {\n try {\n tryStuff();\n } catch (UserException e) {\n LOG.log(Level.SEVERE, RETHROWING_MESSAGE, e);\n\n throw new IllegalStateException(e);\n }\n\n try {\n tryStuff();\n } catch (UserException e) {\n LOG.log(Level.SEVERE, RETHROWING_MESSAGE, e);\n\n throw new MoreAppropriateForThisLevelException(e);\n }\n\n // Log at warn level, confusing though since the stack trace is included, so will appear more than once.\n try {\n tryStuff();\n } catch (UserException e) {\n LOG.log(Level.WARNING, RETHROWING_MESSAGE, e);\n\n throw new IllegalStateException(e);\n }\n }", "@SuppressWarnings(\"all\")\n public static void outerExceptionTest() {\n int result = -1;\n //Just executed once when the exception occur\n //And the compiler will give the check restriction\n try {\n for (int i = 0; i < TEST_CIRCLE_NUM; i++) {\n //An exception code\n result = i / 0;\n }\n } catch (ArithmeticException e) {\n LOGGER.error(\"Divide the zero is wrong\", result);\n }\n\n }", "@Override\n public void onException(Exception arg0) {\n }", "public interface ExceptionHandler\n{\n //TODO not sure how to handle this\n}", "void dispatchException(Throwable exception);", "protected abstract void onException(final Exception exception);", "@Test\r\n public void testCatch() {\n }", "public static void main(String[] args)\n{\ntry\n{\nnew Ex().m1();\n}\n///Exception e is a superclass of all the Exceptions in java// \n///In compile Time This Exception has been already Caught///\ncatch(ArithmeticException e)\n{\nSystem.out.println(\"Cannot Divide by Zero\");\n}\ncatch(Exception e)\n{\nSystem.out.println(\"Cannot Divide by Zero\");\n}\n}", "void dealException(List<E> elements, Exception e);", "private void addTraps() {\n final Jimple jimple = Jimple.v();\n for (TryBlock<? extends ExceptionHandler> tryItem : tries) {\n int startAddress = tryItem.getStartCodeAddress();\n int length = tryItem.getCodeUnitCount(); // .getTryLength();\n int endAddress = startAddress + length; // - 1;\n Unit beginStmt = instructionAtAddress(startAddress).getUnit();\n // (startAddress + length) typically points to the first byte of the\n // first instruction after the try block\n // except if there is no instruction after the try block in which\n // case it points to the last byte of the last\n // instruction of the try block. Removing 1 from (startAddress +\n // length) always points to \"somewhere\" in\n // the last instruction of the try block since the smallest\n // instruction is on two bytes (nop = 0x0000).\n Unit endStmt = instructionAtAddress(endAddress).getUnit();\n // if the try block ends on the last instruction of the body, add a\n // nop instruction so Soot can include\n // the last instruction in the try block.\n if (jBody.getUnits().getLast() == endStmt\n && instructionAtAddress(endAddress - 1).getUnit() == endStmt) {\n Unit nop = jimple.newNopStmt();\n jBody.getUnits().insertAfter(nop, endStmt);\n endStmt = nop;\n }\n\n List<? extends ExceptionHandler> hList = tryItem.getExceptionHandlers();\n for (ExceptionHandler handler : hList) {\n String exceptionType = handler.getExceptionType();\n if (exceptionType == null) {\n exceptionType = \"Ljava/lang/Throwable;\";\n }\n Type t = DexType.toSoot(exceptionType);\n // exceptions can only be of RefType\n if (t instanceof RefType) {\n SootClass exception = ((RefType) t).getSootClass();\n DexlibAbstractInstruction instruction =\n instructionAtAddress(handler.getHandlerCodeAddress());\n if (!(instruction instanceof MoveExceptionInstruction)) {\n logger.debug(\n \"\"\n + String.format(\n \"First instruction of trap handler unit not MoveException but %s\",\n instruction.getClass().getName()));\n } else {\n ((MoveExceptionInstruction) instruction).setRealType(this, exception.getType());\n }\n\n Trap trap = jimple.newTrap(exception, beginStmt, endStmt, instruction.getUnit());\n jBody.getTraps().add(trap);\n }\n }\n }\n }", "public void clearEndUserExceptions();", "protected void parseExceptionServices(ByteArrayInputStream stream) throws EOFException\n {\n int exceptionCount = EASMessage.parseUnsignedByte(stream);\n this.m_exceptions.ensureCapacity(exceptionCount);\n\n for (int i = 0; i < exceptionCount; ++i)\n {\n if ((EASMessage.parseUnsignedByte(stream) & 0x80) != 0)\n {\n int majorNumber = EASMessage.parseUnsignedShort(stream); // Note:\n // not\n // used\n // with\n // OCAP\n int minorNumber = EASMessage.parseUnsignedShort(stream); // Note:\n // not\n // used\n // with\n // OCAP\n this.m_exceptions.add(new EASInBandExceptionChannels(majorNumber, minorNumber));\n }\n else\n {\n stream.skip(2); // skip reserved field\n int sourceId = EASMessage.parseUnsignedShort(stream);\n this.m_exceptions.add(new EASOutOfBandExceptionSourceId(sourceId));\n }\n }\n\n this.m_exceptions.trimToSize();\n }", "public static void demoException() {\n\n try {\n print(1, \"hello\");\n String b = null;\n b.indexOf(\"a\");\n\n } catch (NullPointerException npe) {\n print(3, \"NPE\");\n } catch (Exception e) {\n print(4, \"Exception\");\n } finally {\n /** code will be executed anyway regardless of exception */\n print(2, \"finally\");\n // 做清理工作\n }\n\n try {\n print(1, \"hello\");\n int a = 2;\n a = a / 0;\n /** add a log file when an Exception occurs */\n } catch (NullPointerException npe) {\n print(3, \"NPE\");\n } catch (Exception e) {\n print(4, \"Exception\");\n } finally {\n /** code will be executed anyway regardless of exception */\n print(2, \"finally\");\n // 做清理工作\n }\n }", "@Override\r\n public void onException(Exception arg0) {\n\r\n }", "public void handleException(Throwable e) {\r\n handleException(e, mReportingInteractionMode);\r\n }", "@SuppressWarnings(\"all\")\n public static void innerThrowManualExceptionTest() {\n int result = -1;\n\n for (int i = 0; i < TEST_CIRCLE_NUM; i++) {\n try {\n //An exception code\n throw new RuntimeException(\"Test exception.\");\n } catch (Exception e) {\n LOGGER.error(\"Divide the zero is wrong\", result);\n }\n }\n\n\n }", "List<CSSParseException> getExceptions();", "private void handleException(java.lang.Throwable exception) {\n\n\t/* Uncomment the following lines to print uncaught exceptions to stdout */\n\t// System.out.println(\"--------- UNCAUGHT EXCEPTION ---------\");\n\t// exception.printStackTrace(System.out);\n}", "@Test\n public void unimplementedOps() throws Exception {\n testInfo(this.getClass().getSimpleName() + \" - notImplementedOps\");\n\n boolean error;\n\n error = false;\n try {\n print(account + \": Fetching bucket cors for \" + bucketName);\n s3.getBucketCrossOriginConfiguration(bucketName);\n } catch (AmazonServiceException ase) {\n verifyException(ase);\n error = true;\n } finally {\n assertTrue(\"Expected to receive a 501 NotImplemented error but did not\", error);\n }\n\n error = false;\n try {\n print(account + \": Fetching bucket policy for \" + bucketName);\n s3.getBucketPolicy(bucketName);\n } catch (AmazonServiceException ase) {\n verifyException(ase);\n error = true;\n } finally {\n assertTrue(\"Expected to receive a 501 NotImplemented error but did not\", error);\n }\n\n error = false;\n try {\n print(account + \": Fetching bucket notification configuration for \" + bucketName);\n s3.getBucketNotificationConfiguration(bucketName);\n } catch (AmazonServiceException ase) {\n verifyException(ase);\n error = true;\n } finally {\n assertTrue(\"Expected to receive a 501 NotImplemented error but did not\", error);\n }\n\n error = false;\n try {\n print(account + \": Fetching bucket website configuration for \" + bucketName);\n s3.getBucketWebsiteConfiguration(bucketName);\n } catch (AmazonServiceException ase) {\n verifyException(ase);\n error = true;\n } finally {\n assertTrue(\"Expected to receive a 501 NotImplemented error but did not\", error);\n }\n\n }", "@Test\n public void testFindAllException() {\n when(client.receiveFromServer()).thenThrow(new RuntimeException(\"acces denied\"));\n\n service.findAll();\n\n verify(client).sendToServer(\"findAll#PlantedPlant\");\n }", "public void checkForExceptions() throws Exception {\n\t\tif (mMinimumPurity <= 0.5 || mMinimumPurity > 1.0)\n\t\t\tthrow new Exception(\n\t\t\t\t\t\"Rule Generator: Minimum Purity must be greater than 0.5 and lest then or equal to 1.0.\");\n\t}", "public abstract boolean catches(final State state, final CatchableInSetlXException cise);", "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}", "public void onException(Exception ex) {\n \t\t\t}", "@ExceptionHandler(Exception.class)\n public String handleAllException(Exception ex) {\n logger.info(\"Error in dashboard.\");\n return \"error\";\n }", "@ExceptionHandler(Exception.class)\n\tpublic ModelAndView handleAllExceptions(Exception ex) {\n\t\tex.printStackTrace();\n\t\tModelAndView model = new ModelAndView(\"genericError\");\n\t\tmodel.addObject(\"errCode\", \"500\");\n\t\tmodel.addObject(\"errMsg\", \"Internal server error - omlouvame se za nami zpusobene potize.\");\n\t\treturn model;\n\t}", "private void handleException(Throwable e) {\n if (e instanceof ExitException) {\n if (e.getCause() != null) {\n handleException(e.getCause());\n }\n sysexit.accept(((ExitException) e).status);\n } else if (Level.QUIET.compareTo(verbosity) < 0) {\n String prefix = beforeFirst(name(), ' ') + \": \";\n stderr.print(prefix);\n if (Level.DEBUG.compareTo(verbosity) <= 0) {\n e.printStackTrace(stderr);\n } else if (Level.VERBOSE.compareTo(verbosity) <= 0) {\n int depth = 0;\n Throwable failure = e;\n while (failure != null) {\n stderr.print(Strings.repeat(\" \", (depth > 0 ? prefix.length() - 4 : 0) + (4 * depth++)));\n stderr.println(removePrefix(failure.toString(), failure.getClass().getName() + \": \"));\n failure = failure.getCause();\n }\n } else if (Level.DEFAULT.compareTo(verbosity) <= 0) {\n stderr.println(formatException(e));\n }\n }\n }", "Throwable cause();", "private void mapAndThrow(Exception e) {\n int status = HttpStatus.INTERNAL_SERVER_ERROR_500;\n String code = \"INTERNAL_SERVER_ERROR\";\n\n // Resolve and map standard exceptions\n if (e.getClass().isAssignableFrom(MockingjayDataAccessException.class) ||\n e.getClass().isAssignableFrom(MockingjayGenericException.class) ||\n e.getClass().isAssignableFrom(FileWriterException.class)) {\n status = HttpStatus.INTERNAL_SERVER_ERROR_500;\n code = \"INTERNAL_SERVER_ERROR\";\n } else if (e.getClass().isAssignableFrom(JsonTransformationException.class)) {\n status = HttpStatus.BAD_REQUEST_400;\n code = \"BAD_REQUEST\";\n } else if (e.getClass().isAssignableFrom(FileNotFoundException.class)) {\n status = HttpStatus.NOT_FOUND_404;\n code = \"RESOURCE_NOT_FOUND\";\n } else if (e.getClass().isAssignableFrom(FileStorageException.class)) {\n status = HttpStatus.INSUFFICIENT_STORAGE_507;\n code = \"INSUFFICIENT_STORAGE\";\n }\n\n // Throw resource exception\n throw new ResourceException(e, status, code);\n }", "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1, Expression expression2) { throw Extensions.todo(); }", "private void handleException(java.lang.Throwable exception) {\n\t\tSystem.out.println(\"--------- UNCAUGHT EXCEPTION ---------\");\n\t\texception.printStackTrace(System.out);\n\t}", "private void handleException(java.lang.Throwable exception) {\r\n\r\n\t/* Uncomment the following lines to print uncaught exceptions to stdout */\r\n\t// System.out.println(\"--------- UNCAUGHT EXCEPTION ---------\");\r\n\t// exception.printStackTrace(System.out);\r\n}", "public final void catchall_directive() throws RecognitionException {\n Label from = null;\n Label to = null;\n Label using = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:544:3: ( ^( I_CATCHALL from= label_ref to= label_ref using= label_ref ) )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:544:5: ^( I_CATCHALL from= label_ref to= label_ref using= label_ref )\n {\n match(input, I_CATCHALL, FOLLOW_I_CATCHALL_in_catchall_directive1362);\n match(input, Token.DOWN, null);\n pushFollow(FOLLOW_label_ref_in_catchall_directive1366);\n from = label_ref();\n state._fsp--;\n\n pushFollow(FOLLOW_label_ref_in_catchall_directive1370);\n to = label_ref();\n state._fsp--;\n\n pushFollow(FOLLOW_label_ref_in_catchall_directive1374);\n using = label_ref();\n state._fsp--;\n\n match(input, Token.UP, null);\n\n\n method_stack.peek().methodBuilder.addCatch(from, to, using);\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n }", "public final void catches() throws RecognitionException {\n int catches_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"catches\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(641, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 91) ) { return ; }\n // Java.g:642:5: ( catchClause ( catchClause )* )\n dbg.enterAlt(1);\n\n // Java.g:642:9: catchClause ( catchClause )*\n {\n dbg.location(642,9);\n pushFollow(FOLLOW_catchClause_in_catches3657);\n catchClause();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(642,21);\n // Java.g:642:21: ( catchClause )*\n try { dbg.enterSubRule(115);\n\n loop115:\n do {\n int alt115=2;\n try { dbg.enterDecision(115);\n\n int LA115_0 = input.LA(1);\n\n if ( (LA115_0==88) ) {\n alt115=1;\n }\n\n\n } finally {dbg.exitDecision(115);}\n\n switch (alt115) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:642:22: catchClause\n \t {\n \t dbg.location(642,22);\n \t pushFollow(FOLLOW_catchClause_in_catches3660);\n \t catchClause();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop115;\n }\n } while (true);\n } finally {dbg.exitSubRule(115);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 91, catches_StartIndex); }\n }\n dbg.location(643, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"catches\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "protected void connectionException(Exception exception) {}", "private void handleException(final Exception e) throws OsgpException {\n LOGGER.error(\"Exception occurred: \", e);\n if (e instanceof OsgpException) {\n throw (OsgpException) e;\n } else {\n throw new TechnicalException(COMPONENT_WS_PUBLIC_LIGHTING, e);\n }\n }", "private void handleExceptions(Exception e,String uri) throws ServiceProxyException {\n \n //Step 1: Is error AdfInvocationRuntimeException, AdfInvocationException or AdfException? \n String exceptionPrimaryMessage = e.getLocalizedMessage();\n String exceptionSecondaryMessage = e.getCause() != null? e.getCause().getLocalizedMessage() : null;\n String combinedExceptionMessage = \"primary message:\"+exceptionPrimaryMessage+(exceptionSecondaryMessage!=null?(\"; secondary message: \"+exceptionSecondaryMessage):(\"\"));\n \n //chances are this is the Oracle MCS erro message. If so then ths message has a JSON format. A simple JSON parsing \n //test will show if our assumption is true. If JSONObject parsing fails then apparently the message is not the MCS\n //error message\n //{\n // \"type\":\".....\",\n // * \"status\": <error_code>,\n // * \"title\": \"<short description of the error>\",\n // * \"detail\": \"<long description of the error>\",\n // * \"o:ecid\": \"...\",\n // * \"o:errorCode\": \"MOBILE-<MCS error number here>\",\n // * \"o:errorPath\": \"<URI of the request>\"\n // }\n if(exceptionSecondaryMessage!=null){\n try {\n JSONObject jsonErrorObject = new JSONObject(exceptionSecondaryMessage);\n //if we get here, then its a Oracle MCS error JSON Object. Get the \n //status code or set it to 0 (means none is found)\n int statusCode = jsonErrorObject.optInt(\"status\", 0);\n throw new ServiceProxyException(statusCode, exceptionSecondaryMessage);\n \n } catch (JSONException jse) {\n //if parsing fails, the this is proof enough that the error message is not \n //an Oracle MCS message and we need to continue our analysis\n \n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Exception message is not a Oracle MCS error JSONObject\", this.getClass().getSimpleName(), \"getCurrentUserInformation\");\n } \n }\n \n //continue message analysis and check for known error codes for the references MCS API\n \n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Rest invocation failed with following message\"+exceptionPrimaryMessage, this.getClass().getSimpleName(), \"getCurrentUserInformation\");\n \n int httpErrorCode = -1; \n String restoredOracleMcsErrorMessage = null;\n \n /*\n * Try to identify an MCS failure from the exception message.\n */\n if(combinedExceptionMessage.contains(\"400\")){\n httpErrorCode = 400; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(400, \"Invalid JSON payload\", \"One of the following problems occurred: \" +\n \"the user does not exist, the JSON is invalid, or a property was not found.\", uri);\n }\n else if(combinedExceptionMessage.contains(\"401\")){\n httpErrorCode = 401; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(401, \"Authorization failure\", \"The user is not authorized to retrieve the information for another user.\",uri); \n }\n else if(combinedExceptionMessage.contains(\"403\")){\n httpErrorCode = 404; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(403, \"Functionality is not supported\", \"Functionality is not supported.\",uri); \n }\n else if(combinedExceptionMessage.contains(\"403\")){\n httpErrorCode = 404; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(404, \"User not found\", \"The user with the specified ID does not exist.\",uri);\n }\n \n else{\n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Request failed with Exception: \"+e.getClass().getSimpleName()+\"; message: \"+e.getLocalizedMessage(), this.getClass().getSimpleName(), \"handleExcpetion\");\n throw new ServiceProxyException(e.getLocalizedMessage(), ServiceProxyException.ERROR);\n }\n //if we get here then again its an Oracle MCS error, though one we found by inspecting the exception message\n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Request succeeded successful but failed with MCS application error. HTTP response: \"+httpErrorCode+\", Error message: \"+restoredOracleMcsErrorMessage, this.getClass().getSimpleName(), \"handleExcpetion\");\n throw new ServiceProxyException(httpErrorCode, restoredOracleMcsErrorMessage);\n }", "private static void connectExcHandlers(MethodNode mth, List<TryCatchBlockAttr> tryBlocks) {\n\t\tif (tryBlocks.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\tint limit = tryBlocks.size() * 3;\n\t\tint count = 0;\n\t\tDeque<TryCatchBlockAttr> queue = new ArrayDeque<>(tryBlocks);\n\t\twhile (!queue.isEmpty()) {\n\t\t\tTryCatchBlockAttr tryBlock = queue.removeFirst();\n\t\t\tboolean complete = wrapBlocksWithTryCatch(mth, tryBlock);\n\t\t\tif (!complete) {\n\t\t\t\tqueue.addLast(tryBlock); // return to queue at the end\n\t\t\t}\n\t\t\tif (count++ > limit) {\n\t\t\t\tthrow new JadxRuntimeException(\"Try blocks wrapping queue limit reached! Please report as an issue!\");\n\t\t\t}\n\t\t}\n\t}", "private void handleUncaught(Throwable t) {\n try {\n Exceptions.handleUncaught(t);\n RxJavaPlugins.getInstance().getErrorHandler().handleError(t);\n } catch (Throwable e) {\n // nowhere to go now\n }\n }", "public boolean handleException(Throwable e);", "public ArrayList<Exception> getEndUserExceptions();", "public UnmatchedException(){\r\n\r\n\t}", "public void handle() throws Exception {}", "public static void main(String[] args) {\n\n\t\tint a = 10;\n\t\tint b = 0;\n\t\t\n\t\ttry\n\t\t{\n\t\tint div = a/b;\n\t\n\t\t}\n\t\tcatch(ArithmeticException e)\n\t\t{\n\t\t\tSystem.out.println(\"Arithmaetic Exception handled\");\n\t\t}\n\t\t\n\t\t\n\t\tcatch(Exception e)\n\t\t{\n\t\tSystem.out.println(\"Exception Handled\");\n\t\tSystem.out.println(\"Hello\");\n\t\t\n\t}\n\t\tfinally\n\t\t{\n\t\t\tSystem.out.println(\"Try catch block\");\n\t\t}\n\t\t\n\t\tint myarray[] = {2,3,4,5};\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"Third Value in the array \" +myarray[6]);\n\t\t}\n\t\t\n\t\tcatch(ArrayIndexOutOfBoundsException e)\n\t\t{\n\t\t\tSystem.out.println(\"my array exception handled\");\n\t\t}\n\t\t}", "public static int catchExceptionWithInnerCatch(){\n int x =1;\n try {\n try {\n x*=2;\n if (true) {throw new RuntimeException();}\n x*=3;\n } catch (RuntimeException e) {\n x*=5;\n } finally {\n x*=7;\n }\n x*=11;\n } catch (Exception e) {\n x*=13;\n } finally {\n x*=17;\n }\n return x; // x== 2*5*7*11*17\n }", "static void ex5() {\n\t\tDog spot=new Dog();\n\t\ttry {\n\t\t\tspot.run();\n\t\t}\n\t\tcatch(ArrayIndexOutOfBoundsException a) {\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\t/*\n\t\tcatch(IndexOutOfBoundsException a) {\n\t\t\tSystem.out.println(\"IndexOutOfBoundsException is caught\");\n\t\t\tSystem.out.println(\"exception is \"+a);\n\t\t}*/\n\t/*\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"exception exception is \"+e);\n\t\t}*/\n\t}", "@Override\n\tpublic boolean handlesThrowable() {\n\t\treturn false;\n\t}", "@Test\n public void testDumpError() {\n \n class TestExceptions {\n \n int start(int a, int b) {\n return sum(a, b);\n }\n \n int sum(int a, int b) {\n int result;\n \n try {\n result = a + product(a, b);\n } catch (Exception e) {\n throw new IllegalArgumentException(\"3 descendant exception\", e);\n }\n \n return result;\n }\n \n int product(int a, int b) {\n int result;\n \n try {\n result = division(a, b) * b;\n } catch (Exception e) {\n throw new IllegalArgumentException(\"2 descendant exception\", e);\n }\n \n return result;\n }\n \n int division(int a, int b) {\n int result;\n \n try {\n result = a / b;\n } catch (Exception e) {\n throw new IllegalArgumentException(\"1 descendant exception\", e);\n }\n \n return result;\n }\n }\n \n try {\n TestExceptions test = new TestExceptions();\n test.start(1, 0);\n } catch (Throwable e) {\n ErrorContainer errorContainer = new ErrorContainer(e);\n \n StringWriter writer = new StringWriter();\n e.printStackTrace(new PrintWriter(writer));\n \n assertEquals(e.getClass().getName(), errorContainer.getClassName());\n assertEquals(e.getMessage(), errorContainer.getMessage());\n assertEquals(writer.toString(), errorContainer.getStackTrace());\n }\n \n }", "@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 ignoreExceptionsDuringInit();", "void throwEvents();", "public IAeCatch selectMatchingCatch(IAeContextWSDLProvider aProvider, Iterator aIterOfCatches, IAeFaultTypeInfo aFault);", "public interface GlobalExceptionListener {\n\n boolean handleException(CatException e);\n\n}", "@Test\n public void testSystemHealthErrorInterpretation() {\n for (RouterErrorCode errorCode : RouterErrorCode.values()) {\n switch (errorCode) {\n case InvalidBlobId :\n case InvalidPutArgument :\n case BlobTooLarge :\n case BadInputChannel :\n case BlobDeleted :\n case BlobDoesNotExist :\n case BlobAuthorizationFailure :\n case BlobExpired :\n case RangeNotSatisfiable :\n case ChannelClosed :\n case BlobUpdateNotAllowed :\n Assert.assertFalse(RouterUtils.isSystemHealthError(new RouterException(\"\", errorCode)));\n break;\n default :\n Assert.assertTrue(RouterUtils.isSystemHealthError(new RouterException(\"\", errorCode)));\n break;\n }\n }\n Assert.assertTrue(RouterUtils.isSystemHealthError(new Exception()));\n Assert.assertFalse(RouterUtils.isSystemHealthError(Utils.convertToClientTerminationException(new Exception())));\n }", "protected void handleException(Exception e, Long[] testCases, long startTime) throws Exception {\n\t\thandleException(e, testCases, \"\", startTime);\n\t}", "public void onException(RequestException e);" ]
[ "0.6957974", "0.68823016", "0.68536973", "0.6707552", "0.64430505", "0.63815975", "0.6374871", "0.60724884", "0.60714144", "0.59254354", "0.5894557", "0.58664536", "0.58313596", "0.5830627", "0.5820103", "0.5819013", "0.58117944", "0.5770419", "0.57608426", "0.5753648", "0.57448906", "0.57320476", "0.57155365", "0.56842184", "0.567913", "0.56679505", "0.565607", "0.563539", "0.56216973", "0.5612933", "0.5609307", "0.56041986", "0.5574636", "0.5553672", "0.5551936", "0.555052", "0.5543056", "0.55218476", "0.55198884", "0.55193394", "0.55016506", "0.5487912", "0.5486593", "0.5486593", "0.5468218", "0.5466353", "0.5462036", "0.54560673", "0.5449715", "0.544627", "0.5433424", "0.54328084", "0.5417479", "0.54135007", "0.54091156", "0.54026735", "0.53998154", "0.5383261", "0.5382695", "0.5334096", "0.53234184", "0.53194", "0.5319317", "0.53106123", "0.52965975", "0.5295399", "0.5293803", "0.52860045", "0.52812314", "0.52782714", "0.52750766", "0.5273271", "0.52636665", "0.5260537", "0.52374506", "0.5236386", "0.522551", "0.5224402", "0.5217358", "0.5213531", "0.5206321", "0.5194744", "0.518811", "0.51813835", "0.5175974", "0.5169241", "0.5165581", "0.5157024", "0.51414126", "0.5139841", "0.51395863", "0.5138299", "0.5126433", "0.5125444", "0.5110112", "0.5101843", "0.5097139", "0.509058", "0.5090409", "0.5070974", "0.50674534" ]
0.0
-1
Vide la table de pianos
@Override public void clearTable() { final var query = "TRUNCATE TABLE piano_project.pianos"; try(final var statement = connection.createStatement()) { statement.executeUpdate(query); } catch (SQLException throwables) { throwables.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void pintarTabla() {\r\n ArrayList<Corredor> listCorredors = gestion.getCorredores();\r\n TableModelCorredores modelo = new TableModelCorredores(listCorredors);\r\n jTableCorredores.setModel(modelo);\r\n TableRowSorter<TableModel> elQueOrdena = new TableRowSorter<>(modelo);\r\n jTableCorredores.setRowSorter(elQueOrdena);\r\n\r\n }", "private void popuniTabelu() {\n try {\n List<PutnikEntity> putnici=Controller.vratiSvePutnike();\n TableModel tm=new PutnikTableModel(putnici);\n jtblPutnici.setModel(tm);\n } catch (Exception ex) {\n Logger.getLogger(FIzaberiLet.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private JTable getTablePacientes() {\n\t\t\n\t\t try {\n\t \t ConnectDatabase db = new ConnectDatabase();\n\t\t\t\tResultSet rs = db.sqlstatment().executeQuery(\"SELECT * FROM PACIENTE WHERE NOMBRE LIKE '%\"+nombre.getText()+\"%' AND APELLIDO LIKE '%\"+apellido.getText()+\"%'AND DNI LIKE '%\"+dni.getText()+\"%'\");\n\t\t\t\tObject[] transf = QueryToTable.getSingle().queryToTable(rs);\n\t\t\t\treturn table = new JTable(new DefaultTableModel((Vector<Vector<Object>>)transf[0], (Vector<String>)transf[1]));\t\t\n\t\t\t} catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn table;\n\t}", "public static void viewtable() {\r\n\t\tt.dibuixa(table);\r\n\t}", "private void establecerTablaPlatillos() {\n Object[] columnas = {\"Platillo\", \"Cantidad\", \"Costo\"};\n Object[][] modelo = new Object[platillosAVender.size()][3];\n int x = 0;\n\n for (VentaPlatillo ventaPlatillo : platillosAVender) {\n\n modelo[x][0] = ventaPlatillo.getPlatillo().getNombre();\n modelo[x][1] = ventaPlatillo.getCantidad();\n modelo[x][2] = ventaPlatillo.getCosto();\n x++;\n }\n // Se establece el modelo en la tabla con los datos\n tablaPlatillosAVender.setDefaultEditor(Object.class, null);\n tablaPlatillosAVender.setModel(new DefaultTableModel(modelo, columnas));\n tablaPlatillosAVender.setCellSelectionEnabled(false);\n tablaPlatillosAVender.setRowSelectionAllowed(false);\n txtTotal.setText(total + \"\");\n }", "private JTable itensNaoPagos() {\n\t\tinitConexao();\n\t\t\n try {\t \n\t String select = \"SELECT cod_item_d, nome_item_d, valor_item_d, data_vencimento_item_d FROM Item_despesa WHERE vencimento_item_d = '0'\";\n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Item de despesa\", \"Valor total\", \"Data do vencimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t \n\t while (rs.next()){\n\t\t linhas.add(new Object[]{rs.getString(\"nome_item_d\"),rs.getString(\"valor_item_d\"),rs.getString(\"data_vencimento_item_d\"), \"Pagar\", rs.getString(\"cod_item_d\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"itemPedido\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "private void intiPlanTable(){\n //gets all plans that are linked with the current profile\n List<Plan> planList = profile.getPlans().getPlans();\n //now add all plans to the table\n DefaultTableModel model = (DefaultTableModel) this.jTable1.getModel();\n model.setRowCount(0);\n planList.forEach((p) -> {\n model.addRow(new Object[]{p.getPlanName(),p});\n });\n }", "private static void popuniTabelu() {\r\n\t\tDefaultTableModel dfm = (DefaultTableModel) teretanaGui.getTable().getModel();\r\n\r\n\t\tdfm.setRowCount(0);\r\n\r\n\t\tfor (int i = 0; i < listaClanova.size(); i++) {\r\n\t\t\tClan c = listaClanova.getClan(i);\r\n\t\t\tdfm.addRow(new Object[] { c.getBrojClanskeKarte(), c.getIme(), c.getPrezime(), c.getPol() });\r\n\t\t}\r\n\t\tcentrirajTabelu();\r\n\t}", "public PantallaPaginas() {\r\n initComponents();\r\n framePaginas=new DefaultTableModel();\r\n framePaginas.addColumn(\"Num Pagina\");\r\n framePaginas.addColumn(\"Bit Residencia\");\r\n framePaginas.addColumn(\"Info Relevante\"); \r\n framePaginas.addRow(new Object []{null, null, null});\r\n tablaPaginas.setModel(framePaginas);\r\n Window[] w=PantallaProcesos.getWindows();\r\n w[1].setLocation(w[0].getWidth()+5, w[0].getY());\r\n\r\n TableColumn tcol;\r\n //va recrriendo las columnas\r\n for(int i=0;i<3;i++)\r\n {\r\n tcol= tablaPaginas.getColumnModel().getColumn(i);\r\n tcol.setCellRenderer(new CustomTableCellRenderer());\r\n }\r\n }", "Tablero consultarTablero();", "public void preencherTabela(){\n imagemEnunciado.setImage(imageDefault);\n pergunta.setImagemEnunciado(caminho);\n imagemResposta.setImage(imageDefault);\n pergunta.setImagemResposta(caminho);\n ///////////////////////////////\n perguntas = dao.read();\n if(perguntas != null){\n perguntasFormatadas = FXCollections.observableList(perguntas);\n\n tablePerguntas.setItems(perguntasFormatadas);\n }\n \n }", "private void displayAllTable() {\n\n nhacungcap = new NhaCungCap();\n nhacungcap.setVisible(true);\n jDestopTable.add(nhacungcap);\n\n thuoc = new SanPham();\n thuoc.setVisible(true);\n jDestopTable.add(thuoc);\n\n khachHang = new KhachHang();\n khachHang.setVisible(true);\n jDestopTable.add(khachHang);\n\n hoaDon = new HoaDon();\n hoaDon.setVisible(true);\n jDestopTable.add(hoaDon);\n\n }", "public void tabla_campos() {\n int rec = AgendarA.tblAgricultor.getSelectedRow();// devuelve un entero con la posicion de la seleccion en la tabla\n ccAgricultor = AgendarA.tblAgricultor.getValueAt(rec, 1).toString();\n crearModeloAgenda();\n }", "public void PreencherTabela() throws SQLException {\n try (Connection connection = ConnectionFactory.getConnection()) {\n String[] colunas = new String[]{\"ID\", \"Nome\", \"Nomenclatura\", \"Quantidade\"};\n ArrayList dados = new ArrayList();\n for (ViewProdutoPedido v : viewProdutoPedidos) {\n dados.add(new Object[]{v.getId(), v.getNome(), v.getNomenclatura(), v.getQuantidade()});\n }\n ModeloTabela modelo = new ModeloTabela(dados, colunas);\n jTableItensPedido.setModel(modelo);\n jTableItensPedido.setRowSorter(new TableRowSorter(modelo));\n jTableItensPedido.getColumnModel().getColumn(0).setPreferredWidth(2);\n jTableItensPedido.getColumnModel().getColumn(0).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(1).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(1).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(2).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(2).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(3).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(3).setResizable(false);\n\n }\n }", "public void LlenarPagos(){\n datos=new DefaultTableModel();\n LlenarModelo();\n this.TablaPagos.setModel(datos);\n }", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "public pulsautama() {\n initComponents();\n \n model = new DefaultTableModel();\n model.addColumn(\"Operator\");\n model.addColumn(\"Id Pulsa\");\n model.addColumn(\"Harga Default\");\n model.addColumn(\"Harga Jual\");\n model.addColumn(\"Harga Member\");\n tabelpulsa.setModel(model);\n selectAll();\n }", "public void llenadoDeTablas() {\n \n DefaultTableModel modelo1 = new DefaultTableModel();\n modelo1 = new DefaultTableModel();\n modelo1.addColumn(\"ID Usuario\");\n modelo1.addColumn(\"NOMBRE\");\n UsuarioDAO asignaciondao = new UsuarioDAO();\n List<Usuario> asignaciones = asignaciondao.select();\n TablaPerfiles.setModel(modelo1);\n String[] dato = new String[2];\n for (int i = 0; i < asignaciones.size(); i++) {\n dato[0] = (Integer.toString(asignaciones.get(i).getId_usuario()));\n dato[1] = asignaciones.get(i).getNombre_usuario();\n\n modelo1.addRow(dato);\n }\n }", "public void llenarTabla() {\n\n String matriz[][] = new String[lPComunes.size()][2];\n\n for (int i = 0; i < AccesoFichero.lPComunes.size(); i++) {\n matriz[i][0] = AccesoFichero.lPComunes.get(i).getPalabra();\n matriz[i][1] = AccesoFichero.lPComunes.get(i).getCodigo();\n\n }\n\n jTableComun.setModel(new javax.swing.table.DefaultTableModel(\n matriz,\n new String[]{\n \"Palabra\", \"Morse\"\n }\n ) {// Bloquea que las columnas se puedan editar, haciendo doble click en ellas\n @SuppressWarnings(\"rawtypes\")\n Class[] columnTypes = new Class[]{\n String.class, String.class\n };\n\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n @Override\n public Class getColumnClass(int columnIndex) {\n return columnTypes[columnIndex];\n }\n boolean[] columnEditables = new boolean[]{\n false, false\n };\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return columnEditables[column];\n }\n });\n\n }", "public void fill_table()\n {\n Secante secante = new Secante(GraficaSecanteController.a, GraficaSecanteController.b, GraficaSecanteController.ep, FuncionController.e);\n list = secante.algoritmo();\n }", "public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}", "private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }", "public void popularTabela() {\n\n try {\n\n RelatorioRN relatorioRN = new RelatorioRN();\n\n ArrayList<PedidoVO> pedidos = relatorioRN.buscarPedidos();\n\n javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) tRelatorio.getModel();\n dtm.fireTableDataChanged();\n dtm.setRowCount(0);\n\n for (PedidoVO pedidoVO : pedidos) {\n\n String[] linha = {\"\" + pedidoVO.getIdpedido(), \"\" + pedidoVO.getData(), \"\" + pedidoVO.getCliente(), \"\" + pedidoVO.getValor()};\n dtm.addRow(linha);\n }\n\n } catch (SQLException sqle) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + sqle.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n \n } catch (Exception e) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + e.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n }\n }", "private void apresentarListaNaTabela() {\n DefaultTableModel modelo = (DefaultTableModel) tblAlunos.getModel();\n modelo.setNumRows(0);\n for (Aluno item : bus.getLista()) {\n modelo.addRow(new Object[]{\n item.getIdAluno(),\n item.getNome(),\n item.getEmail(),\n item.getTelefone()\n });\n }\n }", "public void initTable_Pesanan(){\n //Set cell TableView\n id_pesan.setCellValueFactory(new PropertyValueFactory<Order, String>(\"Id\"));\n jumlah_pesan.setCellValueFactory(new PropertyValueFactory<Order, String>(\"Jumlah\"));\n harga_pesan.setCellValueFactory(new PropertyValueFactory<Order, Integer>(\"Harga\"));\n catatan_pesan.setCellValueFactory(new PropertyValueFactory<Order, String>(\"Catatan\"));\n hapus_pesan.setCellValueFactory(new PropertyValueFactory<Order, Button>(\"Hapus\"));\n\n //Editable\n catatan_pesan.setCellFactory(TextFieldTableCell.forTableColumn());\n catatan_pesan.setOnEditCommit(event ->\n {\n event.getTableView().getItems().get(event.getTablePosition().getRow()).setCatatan(event.getNewValue());\n });\n tablePesanan.setEditable(true);\n //Set TableView\n tablePesanan.setItems(list_order);\n }", "private void srediTabelu() {\n\n mtu = (ModelTabeleUlica) jtblUlica.getModel();\n ArrayList<Ulica> ulice = kontrolor.Kontroler.getInstanca().vratiUlice();\n mtu.setLista(ulice);\n\n }", "public void listar_mais_pedidos(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisPedidos.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisPedidos(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getQtd_pedido()});\n }\n \n \n }", "public pasien() {\n initComponents();\n model = new DefaultTableModel();\n tabelpasien.setModel(model);\n model.addColumn(\"ID_PASIEN\");\n model.addColumn(\"NAMA_PASIEN\");\n model.addColumn(\"ALAMAT\");\n \n loadData();\n \n }", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "public PromocionTableModel() {\n \n //Establecemos la sentencia SQL que vamos a ejecutar\n super(\"SELECT ID_PROMOCION , NOMBRE, DESCUENTO FROM PROMOCION\");\n \n }", "public void showNewTableaux() {\n System.out.println(\"Nowa tablica simpleksowa: \");\n DecimalFormat df = new DecimalFormat(\"0.00\");\n for (double[] row : tableaux) {\n for (double element : row) {\n System.out.print(df.format(element) + \"\\t\");\n }\n System.out.println();\n }\n double valueObjectiveFunction = tableaux[numberOfVariables][numberOfConstraints + numberOfVariables];\n System.out.println(\"Wartość funkcji celu = \" + df.format(valueObjectiveFunction));\n for (int i = 0; i < numberOfVariables; i++)\n if (basisVariables[i] < numberOfConstraints)\n System.out.println(\"x\"\n + basisVariables[i]\n + \" = \"\n + df.format(tableaux[numberOfVariables][numberOfConstraints + i]));\n }", "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 popular(){\n DAO dao = new DAO();\n modelo.setNumRows(0);\n\n for(Manuais m: dao.selecTudoManuaisVenda()){\n modelo.addRow(new Object[]{m.getId(),m.getNome(),m.getClasse(),m.getEditora(),m.getPreco()+\".00 MZN\"});\n \n }\n }", "public NuevoPrestamo() {\n initComponents();\n \n modeloHer = new DefaultTableModel();\n modeloPer = new DefaultTableModel();\n herramientasTable.setModel(modeloHer);\n personalTable.setModel(modeloPer);\n modeloHer.setColumnIdentifiers(titulosHer);\n modeloPer.setColumnIdentifiers(titulosPer);\n \n try {\n herramientas = herImp.lista_herramientas();\n for(Herramienta her : herramientas){\n Object[]o = new Object[4];\n o[0] = her.getCodigoProducto();\n o[1] = her.getNombre();\n o[2] = her.getDescripcion();\n o[3] = her.getCantidadDisponible();\n \n modeloHer.addRow(o);\n }\n } catch (Exception e) {\n System.out.println(\"Error al mostrar las herramientas en la tabla\");\n }\n \n try {\n listaPersonal = perImp.lista_personal();\n for(Personal per : listaPersonal){\n Object[]o = new Object[3];\n o[0] = per.getNombre();\n o[1] = per.getArea();\n o[2] = per.getPuesto();\n \n modeloPer.addRow(o);\n }\n } catch (Exception e) {\n System.out.println(\"Error al mostrar el personal en la tabla\");\n }\n \n }", "public void listar_mais_vendeu(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisVendidas.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisVendeu(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal_vendido()});\n }\n \n \n }", "private void dibujarPuntos() {\r\n for (int x = 0; x < 6; x++) {\r\n for (int y = 0; y < 6; y++) {\r\n panelTablero[x][y].add(obtenerIcono(partida.getTablero()\r\n .getTablero()[x][y].getColor()));\r\n }\r\n }\r\n }", "public void getProdotti() {\r\n\t\tprodotti = ac.getProdotti();\r\n\r\n\t\t//la tabella sara' non nulla quando sara' caricato il file VisualizzaLog.fxml\r\n\t\tif(tabellaProdotti != null) {\r\n\t\t\tcodiceCol.setCellValueFactory(new PropertyValueFactory<Prodotto, Integer>(\"codiceInteger\"));\r\n\t prodottoCol.setCellValueFactory(new PropertyValueFactory<Prodotto, String>(\"nome\"));\r\n\t descCol.setCellValueFactory(new PropertyValueFactory<Prodotto, String>(\"descrizione\"));\r\n\t prezzoCol.setCellValueFactory(new PropertyValueFactory<Prodotto, Float>(\"prezzoFloat\"));\r\n\t disponibilitaCol.setCellValueFactory(new PropertyValueFactory<Prodotto, Integer>(\"disponibilitaInteger\"));\r\n\t \r\n\t Collections.sort(prodotti);\r\n\t tabellaProdotti.getItems().setAll(prodotti);\t \r\n\t tabellaProdotti.setOnMouseClicked(e -> {\r\n\t \tif(tabellaProdotti.getSelectionModel().getSelectedItem() != null)\r\n\t \t\taggiornaQuantita(tabellaProdotti.getSelectionModel().getSelectedItem().getDisponibilita());\r\n\t });\r\n\t\t}\r\n\t}", "public void tabelaktivitas() {\n DefaultTableModel tbl= new DefaultTableModel();\n tbl.addColumn(\"Group\");\n tbl.addColumn(\"Compart\");\n tbl.addColumn(\"Activity\");\n tbl.addColumn(\"HA\");\n tbl.addColumn(\"Harga\");\n tbl.addColumn(\"Total\");\n tblaktivitas.setModel(tbl);\n try{\n java.sql.Statement statement=(java.sql.Statement)conek.GetConnection().createStatement();\n ResultSet res=statement.executeQuery(\"select * from tblaktivitas\");\n while(res.next())\n {\n tbl.addRow(new Object[]{\n res.getString(\"nama_grup\"),\n res.getString(\"compart\"),\n res.getString(\"pekerjaan\"),\n res.getInt(\"ha\"),\n res.getInt(\"harga\"),\n res.getInt(\"total\")\n });\n tblaktivitas.setModel(tbl); \n }\n }catch (Exception e){\n JOptionPane.showMessageDialog(rootPane,\"Salah\");\n }\n }", "private void srediTabelu() {\n ModelTabeleStavka mts = new ModelTabeleStavka();\n mts.setLista(n.getLista());\n tblStavka.setModel(mts);\n }", "public void listarQuartos(JTable table) {\r\n\t\ttry {\r\n\t\t\tStatement st = conexao.createStatement();\r\n\t\t\tResultSet rs = st.executeQuery(\"SELECT idQuartos,tipo FROM quartos\");\r\n\t\t\ttable.setModel(DbUtils.resultSetToTableModel(rs));\r\n\t\t}\r\n\t\tcatch (SQLException e) {}\r\n\t}", "private void Actualizar_Tabla() {\n String[] columNames = {\"iditem\", \"codigo\", \"descripcion\", \"p_vent\", \"p_comp\", \"cant\", \"fecha\"};\n dtPersona = db.Select_Item();\n // se colocan los datos en la tabla\n DefaultTableModel datos = new DefaultTableModel(dtPersona, columNames);\n jTable1.setModel(datos);\n }", "public void listarEquipamentos() {\n \n \n List<Equipamento> formandos =new EquipamentoJpaController().findEquipamentoEntities();\n \n DefaultTableModel tbm=(DefaultTableModel) listadeEquipamento.getModel();\n \n for (int i = tbm.getRowCount()-1; i >= 0; i--) {\n tbm.removeRow(i);\n }\n int i=0;\n for (Equipamento f : formandos) {\n tbm.addRow(new String[1]);\n \n listadeEquipamento.setValueAt(f.getIdequipamento(), i, 0);\n listadeEquipamento.setValueAt(f.getEquipamento(), i, 1);\n \n i++;\n }\n \n \n \n }", "private JTable fontesNaoPagas() {\n\t\tinitConexao();\n\t\t\n try {\t \n\t String select = \"SELECT data_ultimo_vencimento_fonte_r, cod_fonte_d, nome_fonte_d, valor_fonte_d, tipo_valor_fonte_d, data_abertura_fonte_d, periodo_fonte_d FROM Fonte_despesa WHERE vencimento_fonte_d = '0'\";\n\t \n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Fonte de despesa\", \"Valor previsto\", \"Data do vencimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t select = \"select DATE_ADD(?,INTERVAL ? day)\";\n\t while (rs.next()){\n\t \t \n\t \tptStatement = c.prepareStatement(select);\n\t\t\t\tptStatement.setString(1, rs.getString(\"data_ultimo_vencimento_fonte_r\"));\n\t\t\t\tptStatement.setString(2, rs.getString(\"periodo_fonte_d\"));\n\t\t\t\trs2 = ptStatement.executeQuery();\n\t\t\t\trs2.next();\n\t\t linhas.add(new Object[]{rs.getString(\"nome_fonte_d\"),rs.getString(\"valor_fonte_d\"),rs2.getString(1), \"Pagar\", rs.getString(\"cod_fonte_d\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"fonteNaoPaga\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "public Complementos() {\n initComponents();\n String cabecera []={\"Producto\",\"Precio\"};\nString datos[][]={};\nboolean t=true;\nboolean f=false;\nmodelo = new Tablachida(datos,cabecera);\ntabla.setModel(modelo);\nTableColumnModel columnModel = tabla.getColumnModel();\ncolumnModel.getColumn(0).setPreferredWidth(250);\ntabla.setRowHeight(40);\n\n }", "private void tableProspect() throws Exception{\n modelProspect = new DefaultTableModel(new Object[][]{}, headerProspect());\n jTable_Prospects.setModel(modelProspect);\n TableColumnModel columnModel = jTable_Prospects.getColumnModel();\n columnModel.getColumn(0).setPreferredWidth(70);\n columnModel.getColumn(1).setPreferredWidth(120);\n columnModel.getColumn(2).setPreferredWidth(80);\n columnModel.getColumn(3).setPreferredWidth(100);\n columnModel.getColumn(4).setPreferredWidth(150);\n columnModel.getColumn(5).setPreferredWidth(100);\n columnModel.getColumn(6).setPreferredWidth(80);\n columnModel.getColumn(7).setPreferredWidth(150);\n columnModel.getColumn(8).setPreferredWidth(50);\n columnModel.getColumn(9).setPreferredWidth(100);\n columnModel.getColumn(10).setPreferredWidth(30);\n AfficherListProspect();\n }", "public void limpiartabla(JTable pantallaclientes){\n modelo = (DefaultTableModel) pantallaclientes.getModel();\n while(modelo.getRowCount()>0) modelo.removeRow(0);\n }", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "private void cargar(List<Personas> listaP) {\n int total= listaP.size();\n Object [][] tab = new Object [total][10];\n int i=0;\n Iterator iter = listaP.iterator();\n while (iter.hasNext()){\n Object objeto = iter.next();\n Personas pro = (Personas) objeto;\n\n tab[i][0]=pro.getLocalidadesid().getProvinciasId();\n tab[i][1]=pro.getLocalidadesid();\n tab[i][2]=pro.getCuilcuit();\n tab[i][3]=pro.getApellido();\n tab[i][4]=pro.getNombres();\n tab[i][5]=pro.getCalle();\n tab[i][6]=pro.getAltura();\n tab[i][7]=pro.getPiso();\n tab[i][8]=pro.getEmail();\n// if(pro.getEmpleados().equals(\"\")){\n tab[i][9]=\"Cliente\";\n // }else{\n // tab[i][7]=\"Empleado\";\n // }\n i++;\n }\njTable1 = new javax.swing.JTable();\n\njTable1.setModel(new javax.swing.table.DefaultTableModel(\ntab,\nnew String [] {\n \"Provincia\", \"Localidad\", \"DNI/Cuit\", \"Apellido\", \"Nombres\", \"Calle\", \"Altura\", \"Piso\", \"Email\", \"Tipo\"\n}\n));\n jScrollPane1.setViewportView(jTable1);\n }", "private void tampilkan() {\n //To change body of generated methods, choose Tools | Templates.\n DefaultTableModel tabelpegawai = new DefaultTableModel();\n tabelpegawai.addColumn(\"NAMA\");\n tabelpegawai.addColumn(\"ALAMAT\");\n tabelpegawai.addColumn(\"HP\");\n tabelpegawai.addColumn(\"BBM\");\n tabelpegawai.addColumn(\"SITUS\");\n \n \n try {\n conek getCnn = new conek();\n con= null;\n con= (com.mysql.jdbc.Connection) getCnn.getConnection();\n String sql = \"select * from toko \";\n Statement stat = con.createStatement();\n ResultSet res=stat.executeQuery(sql);\n while (res.next()){\n tabelpegawai.addRow(new Object[]{res.getString(1),res.getString(2),res.getString(3),res.getString(4),res.getString(5)});\n }\n jTable1.setModel(tabelpegawai);\n } catch(Exception e){}\n }", "public void cargarTitulos1() throws SQLException {\n\n tabla1.addColumn(\"CLAVE\");\n tabla1.addColumn(\"NOMBRE\");\n tabla1.addColumn(\"DIAS\");\n tabla1.addColumn(\"ESTATUS\");\n\n this.tbpercep.setModel(tabla1);\n\n TableColumnModel columnModel = tbpercep.getColumnModel();\n\n columnModel.getColumn(0).setPreferredWidth(15);\n columnModel.getColumn(1).setPreferredWidth(150);\n columnModel.getColumn(2).setPreferredWidth(50);\n columnModel.getColumn(3).setPreferredWidth(70);\n\n }", "private void tampilkan() {\n int row = table.getRowCount();\n for(int a= 0; a<row;a++){\n model.removeRow(0);\n }\n \n \n }", "public void PreencherTabela2() throws SQLException {\n\n String[] colunas = new String[]{\"ID do Pedido\", \"Numero Grafica\", \"Data Emissao\",\"Boleto\"};\n ArrayList dados = new ArrayList();\n Connection connection = ConnectionFactory.getConnection();\n PedidoDAO pedidoDAO = new PedidoDAO(connection);\n ModeloPedido modeloPedido = new ModeloPedido();\n modeloPedido = pedidoDAO.buscaPorId(idPedidoClasse);\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n dados.add(new Object[]{modeloPedido.getId(), modeloPedido.getNumeroGrafica(), format.format(modeloPedido.getDataEmissao()), modeloPedido.isBoleto()});\n\n ModeloTabela modelo = new ModeloTabela(dados, colunas);\n\n jTablePedido.setModel(modelo);\n jTablePedido.setRowSorter(new TableRowSorter(modelo));\n jTablePedido.getColumnModel().getColumn(0).setPreferredWidth(2);\n jTablePedido.getColumnModel().getColumn(0).setResizable(false);\n jTablePedido.getColumnModel().getColumn(1).setPreferredWidth(20);\n jTablePedido.getColumnModel().getColumn(1).setResizable(false);\n\n jTablePedido.getTableHeader().setReorderingAllowed(false);\n connection.close();\n }", "private void tablesice() {\n //Modificamos los tamaños de las columnas.\n tablastock.getColumnModel().getColumn(0).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(1).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(2).setMinWidth(100);\n tablastock.getColumnModel().getColumn(3).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(4).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(5).setMaxWidth(70);\n }", "public dataPegawai() {\n initComponents();\n koneksiDatabase();\n tampilGolongan();\n tampilDepartemen();\n tampilJabatan();\n Baru();\n }", "public JTable getTablePregleFilijale() {\n\t\treturn tablePregleFilijale;\n\t}", "public void paramTable() {\n jTable2.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);\n mode = (DefaultTableModel) jTable2.getModel();\n dtcm = (DefaultTableColumnModel) jTable2.getColumnModel();\n\n jTable2.setRowHeight(40);\n largeurColoneMax(dtcm, 0, 70);\n largeurColoneMax(dtcm, 3, 50);\n largeurColoneMax(dtcm, 4, 100);\n largeurColoneMax(dtcm, 6, 90);\n largeurColoneMax(dtcm, 9, 70);\n\n TableCellRenderer tbcProjet = getTableCellRenderer();\n TableCellRenderer tbcProjet2 = getTableHeaderRenderer();\n for (int i = 0; i < jTable2.getColumnCount(); i++) {\n TableColumn tc = jTable2.getColumnModel().getColumn(i);\n tc.setCellRenderer(tbcProjet);\n tc.setHeaderRenderer(tbcProjet2);\n\n }\n\n }", "public final void detalleTabla()\n {\n \n try\n {\n ResultSet obj=nueva.executeQuery(\"SELECT cli_nit,cli_razon_social FROM clientes.cliente ORDER BY cli_razon_social ASC\");\n \n while (obj.next()) \n {\n \n Object [] datos = new Object[2];\n \n \n for (int i=0;i<2;i++)\n {\n datos[i] =obj.getObject(i+1);\n }\n\n modelo.addRow(datos);\n \n }\n tabla_cliente.setModel(modelo);\n nueva.desconectar();\n \n \n \n }catch(Exception e)\n {\n JOptionPane.showMessageDialog(null, e, \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "private void TampilData() {\n DefaultTableModel model = new DefaultTableModel();\n model.addColumn(\"NO\");\n model.addColumn(\"ID\");\n model.addColumn(\"NAME\");\n model.addColumn(\"USERNAME\");\n tabelakses.setModel(model);\n\n //menampilkan data database kedalam tabel\n try {\n int i=1;\n java.sql.Connection conn = new DBConnection().connect();\n java.sql.Statement stat = conn.createStatement();\n ResultSet data = stat.executeQuery(\"SELECT * FROM p_login order by Id asc\");\n while (data.next()) {\n model.addRow(new Object[]{\n (\"\" + i++),\n data.getString(\"Id\"),\n data.getString(\"Name\"),\n data.getString(\"Username\")\n });\n tabelakses.setModel(model);\n }\n } catch (Exception e) {\n System.err.println(\"ERROR:\" + e);\n }\n }", "public void llenadoDeTablas() {\n /**\n *\n * creaccion de la tabla de de titulos \n */\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Bitacora\");\n modelo.addColumn(\"Usuario\");\n modelo.addColumn(\"Fecha\");\n modelo.addColumn(\"Hora\");\n modelo.addColumn(\"Ip\");\n modelo.addColumn(\"host\");\n \n modelo.addColumn(\"Accion\");\n modelo.addColumn(\"Codigo Aplicacion\");\n modelo.addColumn(\"Modulo\");\n /**\n *\n * instaciamiento de las las clases Bitacora y BiracoraDAO\n * intaciamiento de la clases con el llenado de tablas\n */\n BitacoraDao BicDAO = new BitacoraDao();\n List<Bitacora> usuario = BicDAO.select();\n JtProductos1.setModel(modelo);\n String[] dato = new String[9];\n for (int i = 0; i < usuario.size(); i++) {\n dato[0] = usuario.get(i).getId_Bitacora();\n dato[1] = usuario.get(i).getId_Usuario();\n dato[2] = usuario.get(i).getFecha();\n dato[3] = usuario.get(i).getHora();\n dato[4] = usuario.get(i).getHost();\n dato[5] = usuario.get(i).getIp();\n dato[6] = usuario.get(i).getAccion();\n dato[7] = usuario.get(i).getCodigoAplicacion();\n dato[8] = usuario.get(i).getModulo();\n \n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }}", "public Gui( final Persistence p ){\r\n\r\n\t\tfinal JFrame frame = new JFrame();\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t//final Popups pu = new Popups();\r\n\r\n\t\t// Temporarily holds the row results\r\n\t\tObject[] tempRow;\r\n\r\n\t\tIterator<Ordem> ordens = p.getOrdens().iterator();\r\n\r\n\t\twhile(ordens.hasNext()){\r\n\t\t\tOrdem o = ordens.next();\r\n\t\t\ttempRow = new Object[]{o.getIdOrdem(), o.getIdFuncionario(), o.getIdCliente(),\r\n\t\t\t\t\to.getDescOrigem(), o.getDescdestino(), o.getDataPedido(), o.getVolume()};\r\n\r\n\t\t\tdTableModel.addRow(tempRow);\r\n\t\t\tpo.adicionarOrdem(o);\r\n\t\t}\r\n\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t//DEFINING JTABLE PERFS \r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t// Increase the font size for the cells in the table\r\n\t\ttable.setFont(new Font(\"Serif\", Font.PLAIN, 18));\r\n\r\n\t\t// Increase the size of the cells to allow for bigger fonts\r\n\t\ttable.setRowHeight(table.getRowHeight()+12);\r\n\r\n\t\t//set columns width\r\n\t\ttable.getColumnModel().getColumn(0).setMinWidth(60);\r\n\t\ttable.getColumnModel().getColumn(0).setMaxWidth(80);\r\n\t\ttable.getColumnModel().getColumn(1).setMinWidth(100);\r\n\t\ttable.getColumnModel().getColumn(1).setMaxWidth(120);\r\n\t\ttable.getColumnModel().getColumn(2).setMinWidth(100);\r\n\t\ttable.getColumnModel().getColumn(2).setMaxWidth(120);\r\n\t\ttable.getColumnModel().getColumn(5).setMinWidth(100);\r\n\t\ttable.getColumnModel().getColumn(5).setMaxWidth(120);\r\n\t\ttable.getColumnModel().getColumn(6).setMinWidth(30);\r\n\t\ttable.getColumnModel().getColumn(6).setMaxWidth(60);\r\n\r\n\t\ttable.setShowGrid(true);\r\n\t\tColor color = new Color(200,200,200);\r\n\t\ttable.setGridColor(color);\r\n\r\n\t\t// Allows the user to sort the data\r\n\t\ttable.setAutoCreateRowSorter(true);\r\n\r\n\t\t// Adds the table to a scrollpane\r\n\t\tJScrollPane scrollPane = new JScrollPane(table);\r\n\r\n\t\t// Adds the scrollpane to the frame\r\n\t\tframe.add(scrollPane, BorderLayout.CENTER);\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t//END DEFINING JTABLE PERFS\r\n\r\n\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t//ADDING TO ORDER AND PERSISTENCE\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t// Creates a button that when pressed executes the code\r\n\t\t// in the method actionPerformed \t \r\n\t\tJButton addOrdem = new JButton(\"Adicionar Ordem\");\r\n\r\n\t\taddOrdem.addActionListener(new ActionListener(){\r\n\r\n\t\t\tpublic void actionPerformed(ActionEvent e){\r\n\r\n\t\t\t\tString sIDOrdem = \"\", sIDFuncionario = \"\", sIDCliente = \"\", sDescOrigem = \"\",\r\n\t\t\t\t\t\tsDescDestino = \"\", sDataPedido = \"\", sVolume = \"\";\r\n\r\n\t\t\t\t// getText returns the value in the text field\t\t\r\n\t\t\t\tboolean ok = true;\r\n\r\n\t\t\t\tsIDOrdem = tfIDOrdem.getText();\r\n\t\t\t\tif(sIDOrdem.isEmpty())\r\n\t\t\t\t\tok = false;\r\n\t\t\t\t\r\n\t\t\t\tsIDFuncionario = tfIDFuncionario.getText();\r\n\t\t\t\tif(sIDFuncionario.isEmpty())\r\n\t\t\t\t\tok = false;\r\n\t\t\t\t\r\n\t\t\t\tsIDCliente = tfIDCliente.getText();\r\n\t\t\t\tif(sIDCliente.isEmpty())\r\n\t\t\t\t\tok = false;\r\n\t\t\t\t\r\n\t\t\t\tsDescOrigem = tfDescOrigem.getText();\r\n\t\t\t\tif(sDescOrigem.isEmpty())\r\n\t\t\t\t\tok = false;\r\n\r\n\t\t\t\tsDescDestino = tfDescDestino.getText();\r\n\t\t\t\tif(sDescDestino.isEmpty())\r\n\t\t\t\t\tok = false;\r\n\r\n\t\t\t\tsVolume = tfVolume.getText();\r\n\t\t\t\tif(sVolume.isEmpty())\r\n\t\t\t\t\tok = false;\r\n\r\n\t\t\t\tsDataPedido = tfDataPedido.getText();\r\n\t\t\t\tif(sDataPedido.isEmpty())\r\n\t\t\t\t\tok = false;\r\n\r\n\t\t\t\tif(ok){\r\n\t\t\t\t\t// Will convert from string to date\r\n\t\t\t\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tdataPedido = dateFormatter.parse(sDataPedido);\r\n\r\n\t\t\t\t\t\t//Adiciona a ordem ao ArrayList\r\n\t\t\t\t\t\tOrdem o = new Ordem(Integer.parseInt(sIDOrdem), Integer.parseInt(sIDFuncionario),\r\n\t\t\t\t\t\t\t\tInteger.parseInt(sIDCliente), sDescOrigem, sDescDestino,\r\n\t\t\t\t\t\t\t\tdataPedido,Integer.parseInt(sVolume) );\r\n\r\n\t\t\t\t\t\tif (po.adicionarOrdem(o)){\r\n\t\t\t\t\t\t\t//adicionar ordem ao ficheiro ordens.cvs\r\n\t\t\t\t\t\t\tp.addOrdem(o.toString());\r\n\r\n\t\t\t\t\t\t\tObject[] ordem = {sIDOrdem, sIDFuncionario, sIDCliente, sDescOrigem,\r\n\t\t\t\t\t\t\t\t\tsDescDestino, dataPedido, sVolume};\r\n\r\n\t\t\t\t\t\t\tdTableModel.addRow(ordem);\r\n\t\t\t\t\t\t\tnew Popups().showPrice(frame.getSize(), o);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew Popups().orderAlreadyExists(frame.getSize());\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} catch (ParseException e1) {\r\n\t\t\t\t\t\t//data invalida\r\n\t\t\t\t\t\tnew Popups().invalidDate(frame.getSize());\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t//e1.printStackTrace();\r\n\t\t\t\t\t} catch (NumberFormatException e1){\r\n\t\t\t\t\t\t//campos numericos invalidos\r\n\t\t\t\t\t\tnew Popups().invalidNumber(frame.getSize());\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t//e1.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//campos vazios\r\n\t\t\t\t\tnew Popups().emptyFields(frame.getSize());\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t});\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t//END ADDING TO ORDER AND PERSISTENCE\r\n\r\n\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t//DEFINING LABELS AND BUTTONS AND ADDING TO JTABLE AND JPANEL\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t// Define values for my labels\r\n\t\tlIDOrdem = new JLabel(\"ID Ordem\");\r\n\t\tlIDFuncionario = new JLabel(\"ID Funcionario\");\r\n\t\tlIDCliente = new JLabel(\"ID Cliente\");\r\n\t\tlDescOrigem = new JLabel(\"Morada de Origem\");\r\n\t\tlDescDestino = new JLabel(\"Morada de Destino\");\r\n\t\tlDataPedido = new JLabel(\"Data\");\r\n\t\tlVolume = new JLabel(\"Volume\");\r\n\r\n\t\t// Define the size of text fields\r\n\t\ttfIDOrdem = new JTextField(2);\r\n\t\ttfIDFuncionario = new JTextField(5);\r\n\t\ttfIDCliente = new JTextField(5);\r\n\t\ttfDescOrigem = new JTextField(10);\r\n\t\ttfDescDestino = new JTextField(10);\r\n\t\ttfVolume = new JTextField(2);\r\n\r\n\t\t// Set default text and size for text field\r\n\t\ttfDataPedido = new JTextField(\"dd-MM-yyyy\", 8);\r\n\r\n\t\t// Create a panel to hold editing buttons and fields\r\n\t\tJPanel inputPanel = new JPanel();\r\n\t\tFont font = new Font(\"Serif\", Font.BOLD, 12);\r\n\t\tFont fontIn = new Font(\"Serif\", Font.PLAIN, 12);\r\n\r\n\t\t// Put components in the panel\r\n\t\tinputPanel.add(lIDOrdem).setFont(font);\r\n\t\tinputPanel.add(tfIDOrdem).setFont(fontIn);\r\n\t\tinputPanel.add(lIDFuncionario).setFont(font);\r\n\t\tinputPanel.add(tfIDFuncionario).setFont(fontIn);\r\n\t\tinputPanel.add(lIDCliente).setFont(font);\r\n\t\tinputPanel.add(tfIDCliente).setFont(fontIn);\r\n\t\tinputPanel.add(lDescOrigem).setFont(font);\r\n\t\tinputPanel.add(tfDescOrigem).setFont(fontIn);\r\n\t\tinputPanel.add(lDescDestino).setFont(font);\r\n\t\tinputPanel.add(tfDescDestino).setFont(fontIn);\r\n\t\tinputPanel.add(lDataPedido).setFont(font);\r\n\t\tinputPanel.add(tfDataPedido).setFont(fontIn);\r\n\t\tinputPanel.add(lVolume).setFont(font);\r\n\t\tinputPanel.add(tfVolume).setFont(fontIn);\r\n\r\n\t\t//buttons for add and remove \r\n\t\tinputPanel.add(addOrdem).setFont(font);\r\n\t\t//inputPanel.add(removeOrdem);\r\n\r\n\r\n\t\t// Add the component panel to the frame\r\n\t\tframe.add(inputPanel, BorderLayout.SOUTH);\r\n\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t//END DEFINING LABELS AND BUTTONS AND ADDING TO JTABLE AND JPANEL\r\n\r\n\r\n\t\tframe.setSize(1200, 600);\r\n\t\tframe.setVisible(true);\r\n\t}", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "private void preencheTable(){\n\t\t\n\t\tlistaArquivos.setItemCount(0);\n\t\t\n\t\tfor(File f : arquivos){\n\t\t\tTableItem it = new TableItem(listaArquivos, SWT.NONE);\n\t\t\tit.setText(0, f.getName());\n\t\t\tit.setText(1, formataDouble(f.length()));\n\t\t\tit.setText(2, formataData(f.lastModified()));\n\t\t}\n\t\t\n\t}", "private EstabelecimentoTable() {\n\t\t\t}", "private void createTable() {\n\t\t// Tao dataModel & table \n\t\tdataModel = new DefaultTableModel(headers, 0);\n\t\ttable.setModel(dataModel);\n\t\t\n\t\tnapDuLieuChoBang();\n\t}", "private void llenar_tabla() {\n \n try {\n DefaultTableModel modelo;\n conexion cnx = new conexion();\n Connection registros = cnx.conexion();\n String[] nombre_atributos = {\"id_producto\", \"nombre\",\"id_categoria\"};\n String sql = (\"SELECT *FROM producto\");\n modelo = new DefaultTableModel(null, nombre_atributos);\n Statement st = (Statement) registros.createStatement();\n ResultSet rs = st.executeQuery(sql);\n String[] filas = new String[3];\n\n while (rs.next()) {\n filas[0] = rs.getString(\"id_producto\");\n filas[1] = rs.getString(\"nombre\");\n filas[2] = rs.getString(\"id_categoria\");\n modelo.addRow(filas);\n\n }\n jtabla.setModel(modelo);\n registros.close();\n } catch (SQLException ex) {\n Logger.getLogger(responsable.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "private void popularTabela() {\n\n if (CadastroCliente.listaAluno.isEmpty()) {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n }\n int t = 0;\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n int aux = CadastroCliente.listaAluno.size();\n\n while (t < aux) {\n aluno = CadastroCliente.listaAluno.get(t);\n modelo.addRow(new Object[]{aluno.getMatricula(), aluno.getNome(), aluno.getCpf(), aluno.getTel()});\n t++;\n }\n }", "private void PintaTabla() {\n panel.getTablaClientes().setModel(tabla);\n panel.getTablaClientes().getColumnModel().getColumn(0).setPreferredWidth(0);\n panel.getTablaClientes().getColumnModel().getColumn(0).setMaxWidth(0);\n panel.getTablaClientes().getColumnModel().getColumn(0).setMinWidth(0);\n panel.getPanelTabla().setViewportView(panel.getTablaClientes());\n }", "public void preencherTabela(ArrayList<Livro> lista) {\n\t\tDefaultTableModel modelo = (DefaultTableModel) table.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\t\tfor (Livro l : lista) {\n\t\t\tlinha[0] = l.getNome();\n\t\t\tlinha[1] = l.getAutor();\n\t\t\tlinha[2] = l.getDataDeLancamento();\n\t\t\tif (l.isDisponivel())\n\t\t\t\tlinha[3] = \"Disponivel\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"Indisponivel\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "private void createTable(){\n Object[][] data = new Object[0][8];\n int i = 0;\n for (Grupo grupo : etapa.getGrupos()) {\n Object[][] dataAux = new Object[data.length+1][8];\n System.arraycopy(data, 0, dataAux, 0, data.length);\n dataAux[i++] = new Object[]{grupo.getNum(),grupo.getAtletas().size(),\"Registar Valores\",\"Selecionar Vencedores\", \"Selecionar Atletas\"};\n data = dataAux.clone();\n }\n\n //COLUMN HEADERS\n String columnHeaders[]={\"Numero do Grupo\",\"Número de Atletas\",\"\",\"\",\"\"};\n\n tableEventos.setModel(new DefaultTableModel(\n data,columnHeaders\n ));\n //SET CUSTOM RENDERER TO TEAMS COLUMN\n tableEventos.getColumnModel().getColumn(2).setCellRenderer(new ButtonRenderer());\n tableEventos.getColumnModel().getColumn(3).setCellRenderer(new ButtonRenderer());\n tableEventos.getColumnModel().getColumn(4).setCellRenderer(new ButtonRenderer());\n\n //SET CUSTOM EDITOR TO TEAMS COLUMN\n tableEventos.getColumnModel().getColumn(2).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n tableEventos.getColumnModel().getColumn(3).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n tableEventos.getColumnModel().getColumn(4).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n\n }", "public DefaultTableModel Ordernar() {\n String sql;\n sql = \"SELECT idempleado,empleados.documento,nombre,apellido,sueldo,trabajo FROM empleados,personas WHERE empleados.documento=personas.documento ORDER BY idempleado\";\n try {\n setTitulos();\n PS = con.Conectarse().prepareStatement(sql);\n rst = PS.executeQuery();\n Object[] fila = new Object[6];\n while (rst.next()) {\n fila[0] = rst.getInt(\"idempleado\");\n fila[1] = rst.getString(\"documento\");\n fila[2] = rst.getString(\"nombre\");\n fila[3] = rst.getString(\"apellido\");\n fila[4] = rst.getDouble(\"sueldo\");\n fila[5] = rst.getString(\"trabajo\");\n DIM.addRow(fila);\n }\n\n } catch (SQLException e) {\n Toolkit.getDefaultToolkit().beep();\n JOptionPane.showMessageDialog(null, \"NO EXISTEN DATOS\", \"AVISO\", JOptionPane.INFORMATION_MESSAGE);\n }\n return DIM;\n }", "public void llenarTabla(){\n pedidoMatDao.llenarTabla();\n }", "private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }", "public void llenadoDeTablas() {\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Articulo\");\n modelo.addColumn(\"Fecha Ingreso\");\n modelo.addColumn(\"Nombre Articulo\");\n modelo.addColumn(\"Talla XS\");\n modelo.addColumn(\"Talla S\");\n modelo.addColumn(\"Talla M\");\n modelo.addColumn(\"Talla L\");\n modelo.addColumn(\"Talla XL\");\n modelo.addColumn(\"Color Articulo\");\n modelo.addColumn(\"Nombre Proveedor\");\n modelo.addColumn(\"Existencias\");\n\n RegistroArticuloDAO registroarcticuloDAO = new RegistroArticuloDAO();\n\n List<RegistroArticulo> registroarticulos = registroarcticuloDAO.select();\n TablaArticulo.setModel(modelo);\n String[] dato = new String[11];\n for (int i = 0; i < registroarticulos.size(); i++) {\n dato[0] = Integer.toString(registroarticulos.get(i).getPK_id_articulo());\n dato[1] = registroarticulos.get(i).getFecha_ingreso();\n dato[2] = registroarticulos.get(i).getNombre_articulo();\n dato[3] = registroarticulos.get(i).getTalla_articuloXS();\n dato[4] = registroarticulos.get(i).getTalla_articuloS();\n dato[5] = registroarticulos.get(i).getTalla_articuloM();\n dato[6] = registroarticulos.get(i).getTalla_articuloL();\n dato[7] = registroarticulos.get(i).getTalla_articuloXL();\n dato[8] = registroarticulos.get(i).getColor_articulo();\n dato[9] = registroarticulos.get(i).getNombre_proveedor();\n dato[10] = registroarticulos.get(i).getExistencia_articulo();\n\n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }\n }", "public void rePintarTablero() {\n int colorArriba = turnoComputadora != 0 ? turnoComputadora : -1;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n if (x % 2 == 0) {\n tablero[x][y].setFondo(y % 2 == 1 ? getNegro() : getBlanco());\n tablero[x][y].setResaltar(y % 2 == 1 ? getNegroResaltado() : getBlancoResaltado());\n } else {\n tablero[x][y].setFondo(y % 2 == 0 ? getNegro() : getBlanco());\n tablero[x][y].setResaltar(y % 2 == 0 ? getNegroResaltado() : getBlancoResaltado());\n }\n tablero[x][y].setBounds(anchoCuadro * (colorArriba == -1 ? x : (7 - x)), altoCuadro * (colorArriba == -1 ? y : (7 - y)), anchoCuadro, altoCuadro);\n }\n }\n }", "public void verTabla() {\r\n\t\tSession ss = Util.getSessionFactory().openSession();\r\n\t\tTransaction tr = null;\r\n\t\ttry {\r\n\t\t\ttr = ss.beginTransaction();\r\n\t\t\tList<Persona> p = ss.createQuery(\"from Persona\").list();\r\n\t\t\tSystem.out.println(\"id nombre apellidos Dni\");\r\n\t\t\tfor (Persona p2 : p) {\r\n\r\n\t\t\t\tSystem.out.println(\"-----------------------------\");\r\n\t\t\t\tSystem.out.println(p2.getId() + \" \" + p2.getNombre() + \" \"\r\n\t\t\t\t\t\t+ p2.getApellidos() + \" \" + p2.getDni());\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"**********************************\");\r\n\t\t\ttr.commit();\r\n\t\t} catch (HibernateException e) {\r\n\t\t\ttr.rollback();\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tss.close();\r\n\t\t}\r\n\r\n\t}", "public void imprimirTabuleiro() { \n\t\t\n\t\tfor(int i = 0; i < this.linhas; i++) {\n\t\t\tfor(int j = 0; j < this.colunas; j++) { \t\t\t\t\n\t\t\t\tSystem.out.print(this.tabuleiro[i][j] + \"\\t\"); \n\t\t\t}\n\t\t\tSystem.out.println(); \t\t\t\n\t\t}\n\t}", "public ExibeTarefas() {\n initComponents();\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n jTable1.setRowSorter(new TableRowSorter(modelo));\n readJTable();\n readItemBox();\n }", "public void BuscarFP(){\n String consulta=\"\";\n try {\n tb_Grupo.setModel(new DefaultTableModel());\n String titulos[]={\"Forma de Pago\",\"Descripcion\",\"\"};\n m=new DefaultTableModel(null,titulos);\n JTable p=new JTable(m);\n String fila[]=new String[3];\n\n Caja_Precio obj=new Caja_Precio();\n consulta=\"exec BuscarJerarquias ?\";\n \n PreparedStatement cmd = obj.getCn().prepareStatement(consulta);\n cmd.setString(1, txtBuscar.getText());\n ResultSet r= cmd.executeQuery();\n int c=1;\n while(r.next()){\n fila[0]=r.getString(1); // id de hc\n fila[1]=r.getString(2); // codigo de hc\n fila[2]=r.getString(3);\n \n\n m.addRow(fila);\n c++;\n }\n tb_Grupo.setModel(m);\n TableRowSorter<TableModel> elQueOrdena=new TableRowSorter<TableModel>(m);\n tb_Grupo.setRowSorter(elQueOrdena);\n this.tb_Grupo.setModel(m);\n\n formato1();\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "public void tabelpembayaran(){\n DefaultTableModel tbl = new DefaultTableModel();\n //tbl.addColumn(\"Kode\");\n tbl.addColumn(\"TGL Audit\");\n tbl.addColumn(\"TGL Pembayaran\");\n tbl.addColumn(\"Status\");\n tbl.addColumn(\"Grup\");\n tbl.addColumn(\"Aktivitas\");\n tbl.addColumn(\"JML Anggota\");\n tbl.addColumn(\"HA\");\n tbl.addColumn(\"Gaji PerHA\");\n tbl.addColumn(\"Gaji Anggota\");\n tbl.addColumn(\"Total\");\n tblpembayaran.setModel(tbl);\n try{\n java.sql.Statement statement=(java.sql.Statement)conek.GetConnection().createStatement();\n ResultSet res=statement.executeQuery(\"select * from tblpembayaran\");\n while(res.next())\n {\n tbl.addRow(new Object[]{\n res.getString(\"tanggal_audit\"),\n res.getString(\"tanggal_pembayaran\"), \n res.getString(\"status_pembayaran\"),\n res.getString(\"nama_grup\"),\n res.getString(\"nama_aktivitas\"),\n res.getInt(\"jumlah_anggota\"),\n res.getInt(\"ha\"),\n res.getInt(\"harga\"),\n res.getInt(\"gaji_peranggota\"),\n res.getInt(\"total\")\n });\n tblpembayaran.setModel(tbl); \n }\n }catch (Exception e){\n JOptionPane.showMessageDialog(rootPane,\"Salah\");\n }\n \n }", "public void limpiarcarrito() {\r\n setTotal(0);//C.P.M limpiamos el total\r\n vista.jTtotal.setText(\"0.00\");//C.P.M limpiamos la caja de texto con el formato adecuado\r\n int x = vista.Tlista.getRowCount() - 1;//C.P.M inicializamos una variable con el numero de columnas\r\n {\r\n try {\r\n DefaultTableModel temp = (DefaultTableModel) vista.Tlista.getModel();//C.P.M obtenemos el modelo actual de la tabla\r\n while (x >= 0) {//C.P.M la recorremos\r\n temp.removeRow(x);//C.P.M vamos removiendo las filas de la tabla\r\n x--;//C.P.M y segimos disminuyendo para eliminar la siguiente \r\n }\r\n } catch (ArrayIndexOutOfBoundsException e) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al limpiar la venta\");\r\n }\r\n }\r\n }", "private void load_table() {\n DefaultTableModel model = new DefaultTableModel();\n model.addColumn(\"ID\");\n model.addColumn(\"NIM\");\n model.addColumn(\"Nama\");\n model.addColumn(\"Kelamin\");\n model.addColumn(\"Phone\");\n model.addColumn(\"Agama\");\n model.addColumn(\"Status\");\n\n //menampilkan data database kedalam tabel\n try {\n String sql = \"SELECT * FROM mhs\";\n java.sql.Connection koneksi = (Connection) Koneksi.KoneksiDB();\n java.sql.Statement stm = koneksi.createStatement();\n java.sql.ResultSet res = stm.executeQuery(sql);\n\n while (res.next()) {\n model.addRow(new Object[]{res.getString(1), res.getString(2),\n res.getString(3), res.getString(4), res.getString(5),\n res.getString(6), res.getString(7)});\n }\n tabelMahasiswa.setModel(model);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "protected void dataTableleibie(int i) {\n\t\r\n}", "public void ukloniHranu() {\n\t\tthis.tabla[iHrana][jHrana] = '.';\t\t\n\t}", "public void iniciarUI()\n\t{\n\t\tDefaultTableModel model = new DefaultTableModel(columnas, 1);\n\t\tpasabordos = new JTable(model);\n\n\t\tvuelos = new JComboBox();\n\t\tllenarVuelos();\n\t\t\n\t\tVuelo v = (Vuelo) vuelos.getSelectedItem();\n\t\tif(v!=null)\n\t\t{\n\t\t\tllenarPasabordos(v.getId());\n\t\t}\n\n\t}", "public NuevaOrden() {\n initComponents();\n this.setTitle(\"Nueva orden\");\n this.setIconImage(img.getImage());\n this.setLocationRelativeTo(null);\n control = FachadaControl.getInstance();\n modelTablaBusqueda = (DefaultTableModel) tablaProductos.getModel();\n modelTablaOrden = (DefaultTableModel) tablaOrden.getModel();\n }", "private void enlazarListadoTabla() {\n tblCursos.setItems(listaCursos);\n\n //Enlazar columnas con atributos\n clmNombre.setCellValueFactory(new PropertyValueFactory<Curso, String>(\"nombre\"));\n clmAmbito.setCellValueFactory(new PropertyValueFactory<Curso, String>(\"familiaProfesional\"));\n clmDuracion.setCellValueFactory(new PropertyValueFactory<Curso, Integer>(\"duracion\"));\n }", "private void selectAll() {\n //To change body of generated methods, choose Tools | Templates.\n \n tabelpulsa.setModel(model);\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n \n \n try {\n Connection c=koneksidb.getkoneksi();\n Statement s=c.createStatement();\n ResultSet r=s.executeQuery(\"select* from pulsa\");\n while(r.next()){\n Object[] pulsa = new Object[5]; \n pulsa[0]=r.getString(\"operator\");\n pulsa[1]=r.getString(\"id_pulsa\");\n pulsa[2]=r.getString(\"harga_default\");\n pulsa[3]=r.getString(\"harga_jual\");\n pulsa[4]=r.getString(\"harga_member\");\n model.addRow(pulsa);\n }\n }catch (SQLException e){\n System.out.println(\"terjadi error :\" +e);\n }\n }", "private void preencherTabela() {\n\t\tList<Cidade> listCidade;\n\t\tCidadeDAO cidadeDAO;\n\t\tObservableList<Cidade> oListCidade;\n\n\t\t// Determina os atributos que irão preencher as colunas\n\t\tcolCidade.setCellValueFactory(new PropertyValueFactory<>(\"nomeCidades\"));\n\t\tcolEstado.setCellValueFactory(new PropertyValueFactory<>(\"nomeEstado\"));\n\t\tcolSigla.setCellValueFactory(new PropertyValueFactory<>(\"siglaEstado\"));\n\t\tcolCodigoCidade.setCellValueFactory(new PropertyValueFactory<>(\"idCidade\"));\n\t\tcolIdEstado.setCellValueFactory(new PropertyValueFactory<>(\"idEstado\"));\n\n\t\t// Instancia a lista de cidades e a DAO\n\t\tlistCidade = new ArrayList<Cidade>();\n\t\tcidadeDAO = new CidadeDAO();\n\n\t\t// Chama o metodo para selecionar todas as cidades e atribuir a lista\n\t\tlistCidade = cidadeDAO.selecionar();\n\n\t\t// Converte a lista de cidades em observablearray\n\t\toListCidade = FXCollections.observableArrayList(listCidade);\n\n\t\t// Adiciona a lista na tabela\n\t\ttblCidades.setItems(oListCidade);\n\t}", "public void populaTabela(Vector[] linhas, JTable tabela){\n DefaultTableModel tb = (DefaultTableModel)tabela.getModel();\n int count = (tb).getRowCount();\n \n if(count>0){\n limpaTabela(tabela);\n }\n\n\n for(int i = 0; i<linhas.length; i++){\n tb.addRow(linhas[i]);\n }\n \n }", "public DataMahasiswa() {\n initComponents();\n load_table();\n }", "public void preencherTabelaResultado() {\n\t\tArrayList<Cliente> lista = Fachada.getInstance().pesquisarCliente(txtNome.getText());\n\t\tDefaultTableModel modelo = (DefaultTableModel) tabelaResultado.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\n\t\tfor (Cliente c : lista) {\n\t\t\tlinha[0] = c.getIdCliente();\n\t\t\tlinha[1] = c.getNome();\n\t\t\tlinha[2] = c.getTelefone().toString();\n\t\t\tif (c.isAptoAEmprestimos())\n\t\t\t\tlinha[3] = \"Apto\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"A devolver\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "public TableauPlantes() \n {\n super(new GridLayout(1,0));\n \n m_table_model = new DefaultTableModel()\n {\n\t\t\tprivate static final long serialVersionUID = -6618499995948516988L;\n\n\t\t\t@Override\n public boolean isCellEditable(int row, int column) \n {\n // Rendre les cases non editables\n return false;\n }\n }; \n\n m_jtable = new JTable(m_table_model);\n \n // Création des colonnes\n m_table_model.addColumn(\"Cle\"); \n m_table_model.addColumn(\"Plante\"); \n m_table_model.addColumn(\"Stock\"); \n\n m_jtable.setPreferredScrollableViewportSize(new Dimension(500, 70));\n m_jtable.setFillsViewportHeight(true);\n \n // Definition de la largeur des colonnes\n m_jtable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\n m_jtable.getColumnModel().getColumn(0).setPreferredWidth(30); // Colonne Cle\n m_jtable.getColumnModel().getColumn(1).setPreferredWidth(160); // Colonne Plante\n m_jtable.getColumnModel().getColumn(2).setPreferredWidth(200); // Colonne Stock\n \n m_jtable.addMouseListener(new MouseAdapter() \n {\n \t public void mouseClicked(MouseEvent e) \n \t {\n \t\t if (e.getButton() == java.awt.event.MouseEvent.BUTTON3)\n \t\t {\n \t\t\t // bouton droit de la souris \n \t\t\t // Ne rien faire\n \t\t }\n \t\t else\n \t\t {\n \t\t\t // bouton gauche de la souris\n \t if (e.getClickCount() == 1) \n \t {\n \t \t // Selectionne et affiche la nouvelle plante selectionnee\n \t \t EcranPrincipal l_ecran_principal=(EcranPrincipal) m_ecran_parent;\n \t \t l_ecran_principal.set_pla_id_selectionne(getSelectedPlanteId());\n \t }\n \t\t }\n \t }\n \t});\n \n //-------------------\n m_jtable.addKeyListener(new KeyListener ()\n {\n @Override\n public void keyTyped(KeyEvent e) {}\n\n @Override\n public void keyReleased(KeyEvent e) \n {\n \t\n \tint keyCode = e.getKeyCode();\n switch( keyCode ) \n { \n case KeyEvent.VK_UP:\n case KeyEvent.VK_DOWN:\n case KeyEvent.VK_PAGE_UP:\n case KeyEvent.VK_PAGE_DOWN :\n case KeyEvent.VK_HOME:\n case KeyEvent.VK_END:\n \t \t EcranPrincipal l_ecran_principal=(EcranPrincipal) m_ecran_parent;\n \t \t l_ecran_principal.set_pla_id_selectionne(getSelectedPlanteId());\n \t\n break;\n }\n }\n\n @Override\n public void keyPressed(KeyEvent e) {} \t\n });\n \n //Create the scroll pane and add the table to it.\n JScrollPane scrollPane = new JScrollPane(m_jtable);\n\n //Add the scroll pane to this panel.\n add(scrollPane);\n }", "public ControleVendas() {\n initComponents();\n DefaultTableModel modelo = (DefaultTableModel) tabelaVendas.getModel();\n tabelaVendas.setRowSorter(new TableRowSorter(modelo));\n atualizarTabela();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void funkcie() {\n\t\tTableColumn<Znamka, String> datumColumn = new TableColumn<>(\"Datum pisomky\");\n\t\tdatumColumn.setMinWidth(velkostPolickaX - 1);\n\t\tdatumColumn.setCellValueFactory(new PropertyValueFactory<>(\"datumS\"));\n\n\t\tTableColumn<Znamka, Double> hodnotaColumn = new TableColumn<Znamka, Double>(\"Hodnota\");\n\t\thodnotaColumn.setMinWidth(velkostPolickaX - 1);\n\t\thodnotaColumn.setCellValueFactory(new PropertyValueFactory<>(\"hodnotaS\"));\n\n\t\tTableColumn<Znamka, Double> maxHodnotaColumn = new TableColumn<Znamka, Double>(\"Max. Hodnota\");\n\t\tmaxHodnotaColumn.setMinWidth(velkostPolickaX - 1);\n\t\tmaxHodnotaColumn.setCellValueFactory(new PropertyValueFactory<>(\"maxHodnotaS\"));\n\n\t\ttabulkaZiak.getColumns().addAll(hodnotaColumn, maxHodnotaColumn, datumColumn);\n\n\t\tvyberPredmetov.setItems(((Ziak) aktualnyPouzivatel).vratMenoPredmetov());\n\t\tvyberPredmetov.getSelectionModel().selectedIndexProperty()\n\t\t\t\t.addListener((ChangeListener<Number>) (ov, value, new_value) -> {\n\t\t\t\t\ttabulkaZiak.setItems(((Ziak) aktualnyPouzivatel).vratZnamkyPredmetu((int) new_value));\n\t\t\t\t});\n\t\tvyberPredmetov.getSelectionModel().selectFirst();\n\t}", "public void setValuesJTableResultados(){\n int alternativas = views.useController().getProblema().getAlternativas();\n TableModelPersonalizado modelo = new TableModelPersonalizado(alternativas, 1);\n jTableVectorResultados.setModel(modelo);\n jTableVectorResultados.setEnabled(false);\n jTableVectorResultados.getTableHeader().setResizingAllowed(false);\n jTableVectorResultados.getTableHeader().setReorderingAllowed(false);\n //HEADERS DE LA TABLA\n jTableVectorResultados.getColumnModel().getColumn(0).setHeaderValue(\" \"); \n //CONTENIDO DE LA TABLA\n for(int f = 0; f < alternativas; f++){\n modelo.setValueAt(df.format(views.useController().getProblema().getResult().getPriorityVector().get(f, 0)), f, 0);\n } \n }", "private void riempimentoTableQuote() {\n\t\tString[] nameColumns = { \"Id\", \"Data inizio\", \"Valore\", \"Tipologia\" };\n\t\tquote = new ArrayList<Quota>(model.getQuote());\n\n\t\t/* Istanza del TableModel con l'override di isCellEditable per rendere\n\t\tla tabella non modificabile */\n\t\t@SuppressWarnings(\"serial\")\n\t\tDefaultTableModel dati = new DefaultTableModel(nameColumns, 0) {\n\t\t\t@Override\n\t\t\tpublic boolean isCellEditable(int row, int column) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t\tfor (int j = 0; j < quote.size(); j++) {\n\t\t\tdati.addRow(new Vector<>());\n\t\t\tdati.setValueAt(quote.get(j).getId(), j, 0);\n\t\t\tdati.setValueAt(quote.get(j).getDataI(), j, 1);\n\t\t\tdati.setValueAt(quote.get(j).getValore(), j, 2);\n\t\t\tdati.setValueAt(quote.get(j).getTipologia(), j, 3);\n\t\t}\n\t\tviewGestione.getTable().setModel(dati);\n\t}", "public void llenarTabla(int inicio, int limite) {\n DefaultTableModel dtm = (DefaultTableModel) jTableVerRondas.getModel();//se usa DefaultTableModel para manipular facilmente el Tablemodel\n dtm.setRowCount(0);//eliminando la s filas que ya hay. para agregar desde el principio.\n //los datos se agregan la defaultTableModel.\n ArrayList<Partido> llenar = miOpenAustralia.getPartidos();//sacando al informacion a agregar en la tabla.\n\n //como se va a llenar una tabla de 5 columnas, se crea un vector de 3 elementos.\n //se usa un arreglo de Object para poder agregar a la tabla cualquier tipo de datos.\n Object[] datos = new Object[5];\n for (int i = inicio; i < limite; i++) {\n\n Partido parti = llenar.get(i);\n //Se agrega este if para evitar que el extraiga datos en un campo null\n if (parti != null) {\n\n datos[0] = parti.getId();\n datos[1] = parti.getFechaHora();//el primer elemetno del arreglo va a ser el id,la primera col en la Tabla.\n datos[2] = parti.getJugador1().getNombre();\n datos[3] = parti.getJugador2().getNombre();\n datos[4] = parti.getPista().getNombre();\n\n //agrego al TableModleo ese arreglo\n dtm.addRow(datos);\n }\n }\n }", "public void tampil_tb_mahasiswa(){\n Object []baris = {\"No Bp\",\"Nama\",\"Tempat Lahir\",\"Tanggal Lhair\",\"Jurusan\",\"Tanggal Masuk\"};\n tabmode = new DefaultTableModel(null, baris);\n //tb_mahasiswa.setModel(tabmode);\n try {\n Connection con = new koneksi().getConnection();\n String sql = \"select * from tb_mahasiswa order by no_bp asc\";\n java.sql.Statement stat = con.createStatement();\n java.sql.ResultSet hasil = stat.executeQuery(sql);\n while (hasil.next()){\n String no_bp = hasil.getString(\"no_bp\");\n String nama = hasil.getString(\"nama\");\n String tempat_lahir = hasil.getString(\"tempat_lahir\");\n String tanggal_lahir = hasil.getString(\"tanggal_lahir\");\n String jurusan = hasil.getString(\"jurusan\"); \n String tanggal_masuk = hasil.getString(\"tanggal_masuk\");\n String[] data = {no_bp, nama, tempat_lahir, tanggal_lahir, jurusan, tanggal_masuk};\n tabmode.addRow(data);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Menampilkan data GAGAL\",\"Informasi\", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "Table getTable();", "private void cargarPageTable(List<Pair<Integer, Integer>> frames){\n int cantidadFrames = frames.size();\n Pair<Integer, Integer> frame;\n for(int i = 0; i < cantidadFrames; i++){\n frame = frames.get(i);\n if(frame.getKey() < CPU.LARGOMEMORIA){\n modeloTablaPageTable.addRow(new Object[]{ i, frame.getKey() +\n \"(M:\" + frame.getKey() + \")\" });\n }else{\n modeloTablaPageTable.addRow(new Object[]{ i, frame.getKey() +\n \"(D:\" + (frame.getKey() - CPU.LARGOMEMORIA) + \")\" });\n }\n }\n }" ]
[ "0.70830864", "0.69477606", "0.6942802", "0.6915584", "0.6911786", "0.68960303", "0.6851625", "0.6799903", "0.67929435", "0.67577976", "0.6750595", "0.67169064", "0.66859376", "0.6672034", "0.6666525", "0.6663651", "0.66634864", "0.66571546", "0.66435647", "0.6613562", "0.6609783", "0.65760946", "0.65697336", "0.65677196", "0.65542656", "0.65482503", "0.6539887", "0.6536242", "0.65190345", "0.65152043", "0.6510676", "0.6497584", "0.6493364", "0.6489155", "0.64850664", "0.6468669", "0.646404", "0.6459278", "0.64525753", "0.6442231", "0.6440843", "0.64227015", "0.64176524", "0.64137346", "0.64093024", "0.64035445", "0.63983357", "0.6394908", "0.6393895", "0.6385976", "0.6384684", "0.6375483", "0.6371568", "0.63692003", "0.63671356", "0.6362632", "0.63610023", "0.6358544", "0.63428676", "0.6342609", "0.6337938", "0.6336432", "0.63361245", "0.63211405", "0.63210535", "0.6315564", "0.63018006", "0.62951964", "0.62825304", "0.62812245", "0.62656254", "0.6262791", "0.625793", "0.6247498", "0.62355274", "0.6231264", "0.62298197", "0.6229763", "0.62255526", "0.6218417", "0.6207403", "0.6198021", "0.6186814", "0.6178557", "0.61764324", "0.61744297", "0.6171931", "0.616946", "0.61668545", "0.6160969", "0.6160552", "0.6153946", "0.6148526", "0.6147334", "0.614625", "0.61446536", "0.6144014", "0.61374104", "0.6135373", "0.61348593", "0.61322016" ]
0.0
-1
Test the supercsv read API processing UTF8 with BOM file.
@Test public void testUTF8() throws IOException { BufferedReader reader = new BufferedReader( new InputStreamReader(new FileInputStream(UTF8_FILE), "UTF-8") ); ReadTestCSVFile(reader); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testUTF8WithoutBom() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF8_NO_BOM_FILE), \"UTF-8\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "private void skipBOM() {\n/* */ try {\n/* 471 */ if (PeekChar() == '') {\n/* 472 */ ReadChar();\n/* */ }\n/* 474 */ } catch (EOFException e) {}\n/* */ }", "@Test\n\tpublic void testUTF16BE() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16BE_FILE), \"UTF-16be\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "@Test\r\n\tpublic void readCsvTest() throws IOException {\r\n\t\t\tfail(\"Not yet implemented\");\r\n\t}", "@Test\n\tpublic void testUTF16() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16LE_FILE), \"UTF-16\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\n\t\tBufferedReader reader1 = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16BE_FILE), \"UTF-16\")\n\t\t);\n\t\tReadTestCSVFile(reader1);\n\t}", "@Test\n\tpublic void testUTF16LE() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16LE_FILE), \"UTF-16le\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "@Test\n\tpublic void test_ReadNextUtf8String() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, -107, -61, -65, 0, -22, -87, -107, 0);\n\t\tassertEquals(\"\\uaa55\\u00ff\", br.readNextUtf8String());\n\t\tassertEquals(\"\\uaa55\", br.readNextUtf8String());\n\t}", "protected List<String[]> readCsvFile(byte[] bytes, String separator, String quote) {\n\t\ttry (CharSequenceReader seq = new CharSequenceReader(new String(bytes, Charset.forName(DynamoConstants.UTF_8)));\n\t\t CSVReader reader = new CSVReader(seq, separator.charAt(0), quote.charAt(0))) {\n\t\t\treturn reader.readAll();\n\t\t} catch (IOException ex) {\n\t\t\tthrow new OCSImportException(ex.getMessage(), ex);\n\t\t}\n\t}", "public void testBigTOC() throws Exception {\n\n InputStream actIn = fact.createFilteredInputStream(mau,\n new StringInputStream(bigTOC),\n Constants.DEFAULT_ENCODING);\n\n assertEquals(bigTOCFiltered, StringUtil.fromInputStream(actIn));\n\n }", "@Test\n void testRead() throws IOException, URISyntaxException {\n final String[] expectedResult = {\n \"-199\t\\\"hello\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"2017/06/20\\\"\t0.0\t1\t\\\"2\\\"\t\\\"823478788778713\\\"\",\n \"2\t\\\"Sdfwer\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"1100/06/20\\\"\tInf\t2\t\\\"NaN\\\"\t\\\",1,2,3\\\"\",\n \"0\t\\\"cjlajfo.\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"3000/06/20\\\"\t-Inf\t3\t\\\"inf\\\"\t\\\"\\\\casdf\\\"\",\n \"-1\t\\\"Mywer\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"06-20-2011\\\"\t3.141592653\t4\t\\\"4.8\\\"\t\\\"  \\\\\\\" \\\"\",\n \"266128\t\\\"Sf\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"06-20-1917\\\"\t0\t5\t\\\"Inf+11\\\"\t\\\"\\\"\",\n \"0\t\\\"null\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"03/03/1817\\\"\t123\t6.000001\t\\\"11-2\\\"\t\\\"\\\\\\\"adf\\\\0\\\\na\\\\td\\\\nsf\\\\\\\"\\\"\",\n \"-2389\t\\\"\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:72\t2017-06-20\t\\\"2017-03-12\\\"\tNaN\t2\t\\\"nap\\\"\t\\\"💩⌛👩🏻■\\\"\"};\n BufferedReader result;\n File file = getFile(\"csv/ingest/IngestCSV.csv\");\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream stream = new BufferedInputStream(fileInputStream)) {\n CSVFileReader instance = createInstance();\n File outFile = instance.read(Tuple.of(stream, file), null).getTabDelimitedFile();\n result = new BufferedReader(new FileReader(outFile));\n }\n\n assertThat(result).isNotNull();\n assertThat(result.lines().collect(Collectors.toList())).isEqualTo(Arrays.asList(expectedResult));\n }", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~\\\"Py BTn?,~tnf\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 15, 15);\n javaCharStream0.bufpos = (-1396);\n javaCharStream0.backup((-1396));\n javaCharStream0.adjustBeginLineColumn((-1396), 76);\n assertEquals(0, javaCharStream0.bufpos);\n }", "@Test\n\tpublic void test_ReadUtf8String() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, -107, -61, -65, 0);\n\t\tassertEquals(\"\\uaa55\\u00ff\", br.readUtf8String(0));\n\t}", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~f'\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndColumn());\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\n public void testIncludeHeaderDelimited() throws Throwable {\n testIncludeHeaderDelimited(false);\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Z[^o)j]BO6Ns,$`3$e\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1, 0);\n char char0 = javaCharStream0.readChar();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndLine());\n assertEquals('Z', char0);\n }", "@Test\n public void testIncludeHeaderCSV() throws Throwable {\n testIncludeHeaderCSV(false);\n }", "@Test\n void testBrokenCSV() throws IOException {\n try {\n createInstance().read(null, null);\n fail(\"IOException not thrown on null csv\");\n } catch (NullPointerException ex) {\n assertThat(ex.getMessage()).isNull();\n } catch (IngestException ex) {\n assertThat(ex.getErrorKey()).isEqualTo(IngestError.UNKNOWN_ERROR);\n }\n File file = getFile(\"csv/ingest/BrokenCSV.csv\");\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream stream = new BufferedInputStream(fileInputStream)) {\n createInstance().read(Tuple.of(stream, file), null);\n fail(\"IOException was not thrown when collumns do not align.\");\n } catch (IngestException ex) {\n assertThat(ex.getErrorKey()).isEqualTo(IngestError.CSV_RECORD_MISMATCH);\n }\n }", "@Test(timeout=100)\r\n\tpublic void testUnquoted() {\r\n\t\tString [] r1 = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"A\",\"Bb\",\"C\",\"Dd\",\"5555\",\"six\",\"7-11\",\"8\",\"Nines\",\"10!!!\"};\r\n\t\tString [] r3 = {\"a\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\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}", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(416);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn(416, 416);\n assertEquals(3680, javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test063() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null);\n javaCharStream0.maxNextCharInd = 2;\n javaCharStream0.prevCharIsCR = true;\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('\\u0000', char0);\n }", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[6];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(5, javaCharStream0.bufpos);\n assertEquals(6, javaCharStream0.getEndColumn());\n }", "@Test\n @JUnitTemporaryDatabase // Relies on specific IDs so we need a fresh database\n public void testImportUtf8() throws Exception {\n createAndFlushServiceTypes();\n createAndFlushCategories();\n \n //Initialize the database\n ModelImporter mi = m_importer;\n String specFile = \"/utf-8.xml\";\n mi.importModelFromResource(new ClassPathResource(specFile));\n \n assertEquals(1, mi.getNodeDao().countAll());\n // \\u00f1 is unicode for n~ \n assertEquals(\"\\u00f1ode2\", mi.getNodeDao().get(1).getLabel());\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n StringReader stringReader0 = new StringReader(\"oh\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 89, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(2, javaCharStream0.getColumn());\n }", "@Test\n\tpublic void test_ReadUtf8String_bad_data() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, 'A', 0);\n\t\tassertEquals(\"\\ufffdA\" /* unicode replacement char, 'A'*/, br.readUtf8String(0));\n\t}", "@Test(timeout = 4000)\n public void test073() throws Throwable {\n StringReader stringReader0 = new StringReader(\"anBz*^T>\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n stringReader0.read();\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n javaCharStream0.adjustBeginLineColumn(122, 122);\n int int0 = javaCharStream0.getBeginColumn();\n assertEquals(122, int0);\n }", "@Test(timeout = 4000)\n public void test052() throws Throwable {\n StringReader stringReader0 = new StringReader(\"import\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 381, 381);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(5, javaCharStream0.bufpos);\n assertEquals(386, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Cf&9B{tMCu\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(4, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test062() 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 int int0 = javaCharStream0.getEndLine();\n assertEquals(10, javaCharStream0.getBeginLine());\n assertEquals(10, int0);\n assertEquals(0, javaCharStream0.getColumn());\n }", "@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 }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Q|ni.,qQXS\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 10, 754);\n javaCharStream0.adjustBeginLineColumn(754, 59);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals(59, javaCharStream0.getBeginColumn());\n assertEquals(755, int0);\n }", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[2];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(9, javaCharStream0.bufpos);\n assertEquals(10, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n javaCharStream0.UpdateLineColumn('d');\n assertEquals(1, javaCharStream0.getBeginLine());\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndLine();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals((-2818), int0);\n }", "@Test(expected=IndexOutOfBoundsException.class)\n public void testCharAt_File() {\n System.out.println(\"charAt_File\");\n int index = 0; \n Charset cs = Charset.forName(UTF_8);\n InputStream stream = getInputStream(TypeOfStream.FILE, TypeOfContent.BYTE_0, cs);\n @SuppressWarnings(\"deprecation\")\n BufferedCharSequence instance = new BufferedCharSequence(stream, cs.newDecoder(), 0);\n instance.charAt(index);\n }", "private void readEncoding(BufferedReader reader) throws IOException {\n String encoding = reader.readLine();\r\n if ( ! AbstractUtf8Message.UTF8_ENCODING_HEADER_STRING.equals(encoding)) {\r\n throw new IOException(\"Expected UTF-8 header when decoding UTF-8 message\");\r\n }\r\n }", "@Test(timeout = 4000)\n public void test071() throws Throwable {\n StringReader stringReader0 = new StringReader(\"<EOF>\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 89, 302);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(89, javaCharStream0.getEndLine());\n }", "@Test(timeout=100)\r\n\tpublic void testQuotedFields() {\r\n\t\tString [] r1 = {\"An Apple\", \"or Orange\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"\",\"a b\",\" has space \"};\r\n\t\tquoteline(r1);\r\n\t\tquoteline(r2);\r\n\t\tout.close();\r\n\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t}", "@Test\n public void doImport_doesNotModifyOriginalCsv() {\n ExternalDataReader externalDataReader = new ExternalDataReaderImpl(null);\n externalDataReader.doImport(formDefToCsvMedia);\n\n assertThat(dbFile.exists(), is(true));\n assertThat(csvFile.exists(), is(true));\n }", "@Test\n public void testBasicRead() throws IOException {\n String output = singleLineFileInit(file, Charsets.UTF_8);\n\n PositionTracker tracker = new DurablePositionTracker(meta, file.getPath());\n ResettableInputStream in = new ResettableFileInputStream(file, tracker);\n\n String result = readLine(in, output.length());\n assertEquals(output, result);\n\n String afterEOF = readLine(in, output.length());\n assertNull(afterEOF);\n\n in.close();\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n StringReader stringReader0 = new StringReader(\"c3UZts4z!|a\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 21, 47);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(23, javaCharStream0.getColumn());\n }", "@Test\r\n \tpublic void testFileEvents96_3() {\n \t\t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/CSVTest_96_2.txt\"); // issue 96\r\n \t\tassertNotNull(input);\r\n \t\r\n \t\t// Set the parameters\r\n \t\tParameters params = new Parameters();\r\n \t\tsetDefaults(params);\r\n \t\tparams.fieldDelimiter = \",\";\r\n \t\tparams.textQualifier = \"\\\"\";\r\n \t\tparams.sendColumnsMode = Parameters.SEND_COLUMNS_LISTED;\r\n \t\tparams.sourceColumns = \"1\";\r\n \t\tparams.targetColumns = \"2\";\r\n \t\tparams.targetLanguages = \"\"; //locFRCA.toString();\r\n \t\tparams.targetSourceRefs = \"1\";\r\n \t\tfilter.setParameters(params);\r\n \t\t\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN, locFRCA));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\t\t\t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"src\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"trg\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"data\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source1\", \"\", \"target1\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data1\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source2\", \"\", \"target2\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data2\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\t\t\tfilter.close();\t\t\r\n \t}", "@Test(timeout = 4000)\n public void test018() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{H}R}D';ZHm5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getLine();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, int0);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getColumn();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(1, int0);\n }", "@Test\r\n \tpublic void testFileEvents96_2() {\n \t\t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/CSVTest_96_2.txt\"); // issue 96\r\n \t\tassertNotNull(input);\r\n \t\r\n \t\t// Set the parameters\r\n \t\tParameters params = new Parameters();\r\n \t\tsetDefaults(params);\r\n \t\tparams.fieldDelimiter = \",\";\r\n \t\tparams.textQualifier = \"\\\"\";\r\n \t\tparams.sendColumnsMode = Parameters.SEND_COLUMNS_LISTED;\r\n \t\tparams.sourceColumns = \"1\";\r\n \t\tparams.targetColumns = \"2\";\r\n \t\tparams.targetLanguages = locFRCA.toString();\r\n \t\tparams.targetSourceRefs = \"1\";\r\n \t\tfilter.setParameters(params);\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\t\t\t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"src\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"trg\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"data\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source1\", \"\", \"target1\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data1\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source2\", \"\", \"target2\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data2\");\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}", "@Test(timeout = 4000)\n public void test000() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.adjustBeginLineColumn((-1), 4093);\n assertEquals(4093, javaCharStream0.getBeginColumn());\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n StringReader stringReader0 = new StringReader(\">+bg\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(1, javaCharStream0.getEndLine());\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n StringReader stringReader0 = new StringReader(\"H+\\\"RE_]I95BDm\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.ReadByte();\n assertEquals('H', char0);\n }", "@Test(timeout = 4000)\n public void test019() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 91, 91);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn((-366), 1);\n int int0 = javaCharStream0.getLine();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals((-366), int0);\n }", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\\\"for\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 114, (-473));\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[1];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals((-471), javaCharStream0.getColumn());\n }", "@Test\n public void givenStateCensusAnalyserFile_WhenImproperDelimiter_ReturnsException() {\n\n String CSV_FILE_PATH = \"src/test/resources/StateCensusData.csv\";\n try {\n indianCensusAnalyzer.loadStateCensusCSVData(CensusAnalyser.Country.INDIA, CSV_FILE_PATH);\n } catch (CSVBuilderException e) {\n Assert.assertEquals(CSVBuilderException.TypeOfException.INCORRECT_DELIMITER_HEADER_EXCEPTION, e.typeOfException);\n }\n }", "@Test(timeout = 4000)\n public void test129() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.getBeginLine();\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n StringReader stringReader0 = new StringReader(\"new\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.getBeginColumn());\n assertEquals(0, token0.kind);\n }", "@Test\n public void testOutputDelimitedStream() throws Throwable {\n testOutputDelimited(true);\n }", "public void convertToUTF8() {\n FileInputStream istream = null;\n Writer out = null;\n try {\n istream = new FileInputStream(path);\n BufferedInputStream in = new BufferedInputStream(istream);\n CharsetDecoder charsetDecoder = Charset.forName(\"UTF-8\").newDecoder();\n charsetDecoder.onMalformedInput(CodingErrorAction.REPLACE);\n charsetDecoder.onUnmappableCharacter(CodingErrorAction.REPLACE);\n Reader inputReader = new InputStreamReader(in, charsetDecoder);\n StringWriter writer = new StringWriter();\n IOUtils.copy(inputReader, writer);\n String theString = writer.toString();\n FileUtils.deleteQuietly(new File(path));\n out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path), \"UTF-8\"));\n out.write(theString);\n out.close();\n// System.out.println(\"\");\n } catch (FileNotFoundException ex) {\n logger.error(\"Error converting the file to utf8\", ex);\n } catch (IOException ex) {\n logger.error(\"Error converting the file to utf8\", ex);\n } finally {\n try {\n if (out != null) {\n out.close();\n }\n if (istream != null) {\n istream.close();\n }\n } catch (IOException ex) {\n logger.error(\"Error converting the file to utf8\", ex);\n }\n }\n\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 6, 1, 6);\n javaCharStream0.backup(4073);\n // Undeclared exception!\n try { \n javaCharStream0.readChar();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -4067\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test\n @Ignore(\"Zip file compare have some problem\")\n public void testOutputCompressCsvMode() throws Throwable {\n testCompressFile(true);\n }", "@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\r\n\tpublic void test() throws Exception {\r\n\t\t/*\r\n\t\tFileInputStream in = new FileInputStream(\"../src/test/resources/endpoints/bioconcentration_factor/EURAS_CEFIC_LRI-BCF_Fields&References_2008-01-08.xls\");\r\n\t\tEurasBCFReader reader = new EurasBCFReader(in,0);\r\n\t\tint c = 0;\r\n\t\twhile (reader.hasNext()) {\r\n\t\t\tIAtomContainer m = (IAtomContainer)reader.next();\r\n\t\r\n\t\t\tc++;\r\n\t\t}\r\n\t\treader.close();\r\n\t\tAssert.assertEquals(1130,c);\r\n\t\t*/\r\n\t}", "@Test\n public void eofHandling() {\n assertLine(Language.CSS, new Line(Language.CSS, BLANK), \" \");\n assertLine(Language.CSS, new Line(Language.CSS, BLANK), \"\\t\");\n assertLine(Language.CSS, new Line(Language.CSS, CODE), \"margin: 1em;\");\n assertLine(Language.CSS, new Line(Language.CSS, COMMENT), \"/* comment */\");\n assertLine(Language.CSS, new Line(Language.CSS, CODE), \"margin: 1em; /* with comment */\");\n }", "@Test(timeout=100)\r\n\tpublic void testUnquotedSpace() {\r\n\t\tString [] r1in = {\"aaa \",\" bbb\",\" ccc \"};\r\n\t\tString [] r1out = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"AA AA\",\"\",\"C C\",\"DD DD\"};\r\n\t\twriteArrayToLine(r1in);\r\n\t\twriteArrayToLine(r2);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertArrayEquals( r1out, csv.next() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t}", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.readChar();\n javaCharStream0.backup(1);\n javaCharStream0.readChar();\n javaCharStream0.backup(1);\n char char0 = javaCharStream0.BeginToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals('%', char0);\n }", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n javaCharStream0.backup(122);\n javaCharStream0.adjustBeginLineColumn(122, 122);\n assertEquals(122, javaCharStream0.getBeginColumn());\n }", "@Test\n\tpublic void test_ReadAsciiString_tab_terminates() throws IOException {\n\t\tBinaryReader br = br(true, 'A', 'B', 'C', '\\t', 'D', 'E', 'F', 0, /* magic flag */ 42);\n\t\tassertEquals(\"ABC\\tDEF\", br.readAsciiString(0));\n\t}", "@java.lang.Override\n public boolean hasCsv() {\n return schemaCase_ == 6;\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(1);\n javaCharStream0.getEndColumn();\n assertEquals(4094, javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test134() throws Throwable {\n FileDescriptor fileDescriptor0 = new FileDescriptor();\n MockFileInputStream mockFileInputStream0 = new MockFileInputStream(fileDescriptor0);\n StringReader stringReader0 = new StringReader(\"qC2NV{I?oox x04%Fm\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.ReInit((InputStream) mockFileInputStream0);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals((-2818), int0);\n }", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n StringReader stringReader0 = new StringReader(\"=<D!T!tLp\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 20, 0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(3, javaCharStream0.getEndColumn());\n }", "public void testInvalidTextValueWithBrokenUTF8() throws Exception\n {\n final byte[] input = readResource(\"/data/clusterfuzz-cbor-35979.cbor\");\n try (JsonParser p = MAPPER.createParser(input)) {\n assertToken(JsonToken.VALUE_STRING, p.nextToken());\n p.getText();\n fail(\"Should not pass\");\n } catch (StreamReadException e) {\n verifyException(e, \"Truncated UTF-8 character in Short Unicode Name (36 bytes)\");\n }\n\n }", "@java.lang.Override\n public boolean hasCsv() {\n return schemaCase_ == 6;\n }", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n StringReader stringReader0 = new StringReader(\"_ofi`~l69>EJdF\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1874, 1874);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(1877, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test095() throws Throwable {\n StringReader stringReader0 = new StringReader(\"r0j@\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getColumn());\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 test074() throws Throwable {\n StringReader stringReader0 = new StringReader(\"fA.W2e9@MV5G\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(2, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test143() throws Throwable {\n StringReader stringReader0 = new StringReader(\";{\\\"9n/s(2C'#tQX*\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[8];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(1, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(2, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n try { \n javaCharStream0.readChar();\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test(timeout = 4000)\n public void test127() throws Throwable {\n StringReader stringReader0 = new StringReader(\"<EOF>\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 89, 302);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n stringReader0.read();\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(304, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n StringReader stringReader0 = new StringReader(\"tU9~\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getColumn());\n }", "private char read() throws SAXException, IOException {\n for (;;) { // the loop is here for the CRLF case\n if (unreadBuffer != -1) {\n char c = (char) unreadBuffer;\n unreadBuffer = -1;\n return c;\n }\n assert (bufLen > -1);\n pos++;\n assert pos <= bufLen;\n linePrev = line;\n colPrevPrev = colPrev;\n colPrev = col;\n col++;\n if (pos == bufLen) {\n boolean charDataContinuation = false;\n if (cstart > -1) {\n flushChars();\n charDataContinuation = true;\n }\n bufLen = reader.read(buf);\n assert bufLen <= buf.length;\n if (bufLen == -1) {\n return '\\u0000';\n } else {\n for (int i = 0; i < characterHandlers.length; i++) {\n CharacterHandler ch = characterHandlers[i];\n ch.characters(buf, 0, bufLen);\n }\n }\n if (charDataContinuation) {\n cstart = 0;\n }\n pos = 0;\n }\n char c = buf[pos];\n if (c > '\\u007F' && nonAsciiProhibited\n && !alreadyComplainedAboutNonAscii) {\n err(\"The character encoding of the document was not explicit but the document contains non-ASCII.\");\n }\n switch (c) {\n case '\\n':\n /*\n * U+000D CARRIAGE RETURN (CR) characters, and U+000A LINE\n * FEED (LF) characters, are treated specially. Any CR\n * characters that are followed by LF characters must be\n * removed, and any CR characters not followed by LF\n * characters must be converted to LF characters.\n */\n if (prev == '\\r') {\n // swallow the LF\n colPrev = colPrevPrev;\n col = 0;\n if (cstart != -1) {\n flushChars();\n cstart = pos + 1;\n }\n prev = c;\n continue;\n } else {\n linePrev = line;\n line++;\n colPrevPrev = colPrev;\n colPrev = col;\n col = 0;\n }\n break;\n case '\\r':\n c = buf[pos] = '\\n';\n linePrev = line;\n line++;\n colPrevPrev = colPrev;\n colPrev = col;\n col = 0;\n prev = '\\r';\n if (contentModelFlag != ContentModelFlag.PCDATA) {\n prevFourPtr++;\n prevFourPtr %= 4;\n prevFour[prevFourPtr] = c;\n }\n return c;\n case '\\u0000':\n /*\n * All U+0000 NULL characters in the input must be replaced\n * by U+FFFD REPLACEMENT CHARACTERs. Any occurrences of such\n * characters is a parse error.\n */\n err(\"Found U+0000 in the character stream.\");\n c = buf[pos] = '\\uFFFD';\n break;\n case '\\u000B':\n case '\\u000C':\n if (inContent) {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.FATAL) {\n fatal(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n } else {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.ALTER_INFOSET) {\n c = buf[pos] = ' ';\n }\n warn(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n }\n }\n break;\n default:\n if ((c & 0xFC00) == 0xDC00) {\n // Got a low surrogate. See if prev was high surrogate\n if ((prev & 0xFC00) == 0xD800) {\n int intVal = (prev << 10) + c + SURROGATE_OFFSET;\n if (isNonCharacter(intVal)) {\n warn(\"Astral non-character.\");\n }\n if (isAstralPrivateUse(intVal)) {\n warnAboutPrivateUseChar();\n }\n } else {\n // XXX figure out what to do about lone high\n // surrogates\n err(\"Found low surrogate without high surrogate.\");\n c = buf[pos] = '\\uFFFD';\n }\n } else if (inContent && (c < ' ' || isNonCharacter(c))\n && (c != '\\t')) {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.FATAL) {\n fatal(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n } else {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.ALTER_INFOSET) {\n c = buf[pos] = '\\uFFFD';\n }\n warn(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n }\n } else if (isPrivateUse(c)) {\n warnAboutPrivateUseChar();\n }\n }\n prev = c;\n if (contentModelFlag != ContentModelFlag.PCDATA) {\n prevFourPtr++;\n prevFourPtr %= 4;\n prevFour[prevFourPtr] = c;\n }\n return c;\n }\n }", "@Test(timeout = 4000)\n public void test039() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n int[] intArray0 = new int[0];\n javaCharStream0.bufline = intArray0;\n // Undeclared exception!\n try { \n javaCharStream0.adjustBeginLineColumn(122, 122);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.FillBuff();\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test\n public void testOutputCsvStream() throws Throwable {\n testOutputCSV(true);\n }", "@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}", "@Test(timeout = 4000)\n public void test092() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s15IMZA$C/uXdG]R\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0, 0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(13, javaCharStream0.bufpos);\n assertEquals(\"uXdG\", token0.toString());\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(timeout = 4000)\n public void test052() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n javaCharStream0.ReInit((Reader) null, 122, 122, 122);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "public static void main(String[] args) {\n compareCharsets(\"Cp1252\", \"ISO-8859-15\");\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n StringReader stringReader0 = new StringReader(\"this\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 2914, 2914);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(2914, javaCharStream0.getBeginColumn());\n assertEquals(57, token0.kind);\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n StringReader stringReader0 = new StringReader(\"1dIHR}';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.ReadByte();\n assertEquals('1', char0);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 12, (-1783), 1289);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndColumn();\n assertEquals(12, javaCharStream0.getBeginLine());\n assertEquals((-1783), int0);\n }", "@Test(timeout = 4000)\n public void test159() throws Throwable {\n StringReader stringReader0 = new StringReader(\"x/C9mX)\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-2632), (-2632));\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals((-2631), javaCharStream0.getEndColumn());\n }", "private int readFdocaOneByte() {\n checkForSplitRowAndComplete(1);\n //return dataBuffer_[position_++] & 0xff;\n return dataBuffer_.readUnsignedByte();\n }", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(10, javaCharStream0.bufpos);\n assertEquals(12, javaCharStream0.getColumn());\n }", "List<String[]> readCsv(String inputFilePath,int skipLine,char separator)throws IOException;", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n StringReader stringReader0 = new StringReader(\"byte\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 19, 21, 19);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(21, javaCharStream0.getBeginColumn());\n assertEquals(17, token0.kind);\n }", "public void ach_doc_type_csv_test () {\n\t\t\n\t}", "private void fechaBuffer() {\n\t\tif (buffer != null){\n\t\t\ttry {\n\t\t\t\tbuffer.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"[ERRO] Erro ao fechar stream do arquivo csv.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testUnicodeAt4KB() {\n File f = getFile(\"more_than_4KB.txt\");\n assertNotNull(f);\n FileObject fo = FileUtil.toFileObject(f);\n assertNotNull(fo);\n BufferedCharSequence chars = new BufferedCharSequence(fo, cs_UTF_8.newDecoder(), f.length());\n assertEquals('0', chars.charAt(0));\n assertEquals('1', chars.charAt(1));\n int xPos;\n if (chars.charAt(4094) == '\\r' && chars.charAt(4095) == '\\n') {\n // windows line-endings, can be caused by hg extension win32text\n xPos = 4098;\n } else {\n // unix or mac line-endings\n xPos = 4097;\n }\n assertEquals('X', chars.charAt(xPos));\n assertEquals('Y', chars.charAt(xPos+1));\n }" ]
[ "0.84384036", "0.70746636", "0.6929349", "0.6267207", "0.620939", "0.6063805", "0.5948218", "0.5923407", "0.5799355", "0.57837415", "0.5756929", "0.57421744", "0.57170475", "0.5710504", "0.5702744", "0.5695222", "0.568727", "0.5676533", "0.5650051", "0.5629771", "0.5627789", "0.5514658", "0.54965055", "0.5472267", "0.54621905", "0.5440281", "0.5425128", "0.5424769", "0.5405789", "0.54000694", "0.5391003", "0.5386051", "0.5359769", "0.5342349", "0.5341854", "0.5340821", "0.5327412", "0.53212154", "0.53193396", "0.53021973", "0.52770853", "0.5265725", "0.52586627", "0.5253752", "0.52399594", "0.5236466", "0.52226555", "0.52163315", "0.52135116", "0.5211812", "0.5200994", "0.51987606", "0.51970816", "0.5196479", "0.5195065", "0.5194572", "0.51916957", "0.518966", "0.5183981", "0.51823056", "0.51805043", "0.51780933", "0.51756686", "0.5171381", "0.515249", "0.51418734", "0.5133674", "0.512502", "0.51247275", "0.5121334", "0.512058", "0.51150656", "0.5109524", "0.5107647", "0.5104482", "0.51042867", "0.510011", "0.50908655", "0.50889325", "0.50810176", "0.50803775", "0.5075934", "0.50742537", "0.506223", "0.5055906", "0.5049616", "0.5046311", "0.50426", "0.5037257", "0.5037251", "0.5030984", "0.50294393", "0.5029305", "0.5028442", "0.50228125", "0.5017061", "0.50143623", "0.50141644", "0.5011957", "0.50081676" ]
0.7762299
1
Test the supercsv read API processing UTF8 without BOM file.
@Test public void testUTF8WithoutBom() throws IOException { BufferedReader reader = new BufferedReader( new InputStreamReader(new FileInputStream(UTF8_NO_BOM_FILE), "UTF-8") ); ReadTestCSVFile(reader); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testUTF8() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF8_FILE), \"UTF-8\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "@Test\n\tpublic void testUTF16BE() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16BE_FILE), \"UTF-16be\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "private void skipBOM() {\n/* */ try {\n/* 471 */ if (PeekChar() == '') {\n/* 472 */ ReadChar();\n/* */ }\n/* 474 */ } catch (EOFException e) {}\n/* */ }", "@Test\r\n\tpublic void readCsvTest() throws IOException {\r\n\t\t\tfail(\"Not yet implemented\");\r\n\t}", "@Test\n\tpublic void testUTF16() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16LE_FILE), \"UTF-16\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\n\t\tBufferedReader reader1 = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16BE_FILE), \"UTF-16\")\n\t\t);\n\t\tReadTestCSVFile(reader1);\n\t}", "@Test\n public void testIncludeHeaderCSV() throws Throwable {\n testIncludeHeaderCSV(false);\n }", "@Test\n\tpublic void testUTF16LE() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16LE_FILE), \"UTF-16le\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "@Test\n void testRead() throws IOException, URISyntaxException {\n final String[] expectedResult = {\n \"-199\t\\\"hello\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"2017/06/20\\\"\t0.0\t1\t\\\"2\\\"\t\\\"823478788778713\\\"\",\n \"2\t\\\"Sdfwer\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"1100/06/20\\\"\tInf\t2\t\\\"NaN\\\"\t\\\",1,2,3\\\"\",\n \"0\t\\\"cjlajfo.\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"3000/06/20\\\"\t-Inf\t3\t\\\"inf\\\"\t\\\"\\\\casdf\\\"\",\n \"-1\t\\\"Mywer\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"06-20-2011\\\"\t3.141592653\t4\t\\\"4.8\\\"\t\\\"  \\\\\\\" \\\"\",\n \"266128\t\\\"Sf\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"06-20-1917\\\"\t0\t5\t\\\"Inf+11\\\"\t\\\"\\\"\",\n \"0\t\\\"null\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"03/03/1817\\\"\t123\t6.000001\t\\\"11-2\\\"\t\\\"\\\\\\\"adf\\\\0\\\\na\\\\td\\\\nsf\\\\\\\"\\\"\",\n \"-2389\t\\\"\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:72\t2017-06-20\t\\\"2017-03-12\\\"\tNaN\t2\t\\\"nap\\\"\t\\\"💩⌛👩🏻■\\\"\"};\n BufferedReader result;\n File file = getFile(\"csv/ingest/IngestCSV.csv\");\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream stream = new BufferedInputStream(fileInputStream)) {\n CSVFileReader instance = createInstance();\n File outFile = instance.read(Tuple.of(stream, file), null).getTabDelimitedFile();\n result = new BufferedReader(new FileReader(outFile));\n }\n\n assertThat(result).isNotNull();\n assertThat(result.lines().collect(Collectors.toList())).isEqualTo(Arrays.asList(expectedResult));\n }", "@Test\n public void testIncludeHeaderDelimited() throws Throwable {\n testIncludeHeaderDelimited(false);\n }", "@Test(timeout=100)\r\n\tpublic void testUnquoted() {\r\n\t\tString [] r1 = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"A\",\"Bb\",\"C\",\"Dd\",\"5555\",\"six\",\"7-11\",\"8\",\"Nines\",\"10!!!\"};\r\n\t\tString [] r3 = {\"a\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\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}", "@Test\n\tpublic void test_ReadNextUtf8String() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, -107, -61, -65, 0, -22, -87, -107, 0);\n\t\tassertEquals(\"\\uaa55\\u00ff\", br.readNextUtf8String());\n\t\tassertEquals(\"\\uaa55\", br.readNextUtf8String());\n\t}", "@Test\n void testBrokenCSV() throws IOException {\n try {\n createInstance().read(null, null);\n fail(\"IOException not thrown on null csv\");\n } catch (NullPointerException ex) {\n assertThat(ex.getMessage()).isNull();\n } catch (IngestException ex) {\n assertThat(ex.getErrorKey()).isEqualTo(IngestError.UNKNOWN_ERROR);\n }\n File file = getFile(\"csv/ingest/BrokenCSV.csv\");\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream stream = new BufferedInputStream(fileInputStream)) {\n createInstance().read(Tuple.of(stream, file), null);\n fail(\"IOException was not thrown when collumns do not align.\");\n } catch (IngestException ex) {\n assertThat(ex.getErrorKey()).isEqualTo(IngestError.CSV_RECORD_MISMATCH);\n }\n }", "@Test\n\tpublic void test_ReadUtf8String() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, -107, -61, -65, 0);\n\t\tassertEquals(\"\\uaa55\\u00ff\", br.readUtf8String(0));\n\t}", "@Test(timeout = 4000)\n public void test063() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null);\n javaCharStream0.maxNextCharInd = 2;\n javaCharStream0.prevCharIsCR = true;\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('\\u0000', char0);\n }", "@Test\n\tpublic void test_ReadUtf8String_bad_data() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, 'A', 0);\n\t\tassertEquals(\"\\ufffdA\" /* unicode replacement char, 'A'*/, br.readUtf8String(0));\n\t}", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Z[^o)j]BO6Ns,$`3$e\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1, 0);\n char char0 = javaCharStream0.readChar();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndLine());\n assertEquals('Z', char0);\n }", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~\\\"Py BTn?,~tnf\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 15, 15);\n javaCharStream0.bufpos = (-1396);\n javaCharStream0.backup((-1396));\n javaCharStream0.adjustBeginLineColumn((-1396), 76);\n assertEquals(0, javaCharStream0.bufpos);\n }", "protected List<String[]> readCsvFile(byte[] bytes, String separator, String quote) {\n\t\ttry (CharSequenceReader seq = new CharSequenceReader(new String(bytes, Charset.forName(DynamoConstants.UTF_8)));\n\t\t CSVReader reader = new CSVReader(seq, separator.charAt(0), quote.charAt(0))) {\n\t\t\treturn reader.readAll();\n\t\t} catch (IOException ex) {\n\t\t\tthrow new OCSImportException(ex.getMessage(), ex);\n\t\t}\n\t}", "public void testBigTOC() throws Exception {\n\n InputStream actIn = fact.createFilteredInputStream(mau,\n new StringInputStream(bigTOC),\n Constants.DEFAULT_ENCODING);\n\n assertEquals(bigTOCFiltered, StringUtil.fromInputStream(actIn));\n\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 test085() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~f'\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndColumn());\n }", "@Test\n public void doImport_doesNotModifyOriginalCsv() {\n ExternalDataReader externalDataReader = new ExternalDataReaderImpl(null);\n externalDataReader.doImport(formDefToCsvMedia);\n\n assertThat(dbFile.exists(), is(true));\n assertThat(csvFile.exists(), is(true));\n }", "@Test\n public void testOutputDelimitedStream() throws Throwable {\n testOutputDelimited(true);\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(416);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn(416, 416);\n assertEquals(3680, javaCharStream0.bufpos);\n }", "@java.lang.Override\n public boolean hasCsv() {\n return schemaCase_ == 6;\n }", "@Test\n @Ignore(\"Zip file compare have some problem\")\n public void testOutputCompressCsvMode() throws Throwable {\n testCompressFile(true);\n }", "@Test\n public void testOutputCsvStream() throws Throwable {\n testOutputCSV(true);\n }", "@java.lang.Override\n public boolean hasCsv() {\n return schemaCase_ == 6;\n }", "@Test(timeout = 4000)\n public void test129() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.getBeginLine();\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@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}", "@Test(timeout=100)\r\n\tpublic void testUnquotedSpace() {\r\n\t\tString [] r1in = {\"aaa \",\" bbb\",\" ccc \"};\r\n\t\tString [] r1out = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"AA AA\",\"\",\"C C\",\"DD DD\"};\r\n\t\twriteArrayToLine(r1in);\r\n\t\twriteArrayToLine(r2);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertArrayEquals( r1out, csv.next() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t}", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[6];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(5, javaCharStream0.bufpos);\n assertEquals(6, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n javaCharStream0.adjustBeginLineColumn(122, 122);\n int int0 = javaCharStream0.getBeginColumn();\n assertEquals(122, int0);\n }", "@Test\n public void testBasicRead() throws IOException {\n String output = singleLineFileInit(file, Charsets.UTF_8);\n\n PositionTracker tracker = new DurablePositionTracker(meta, file.getPath());\n ResettableInputStream in = new ResettableFileInputStream(file, tracker);\n\n String result = readLine(in, output.length());\n assertEquals(output, result);\n\n String afterEOF = readLine(in, output.length());\n assertNull(afterEOF);\n\n in.close();\n }", "public void ach_doc_type_csv_test () {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Q|ni.,qQXS\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 10, 754);\n javaCharStream0.adjustBeginLineColumn(754, 59);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals(59, javaCharStream0.getBeginColumn());\n assertEquals(755, int0);\n }", "@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 }", "@Test\n @JUnitTemporaryDatabase // Relies on specific IDs so we need a fresh database\n public void testImportUtf8() throws Exception {\n createAndFlushServiceTypes();\n createAndFlushCategories();\n \n //Initialize the database\n ModelImporter mi = m_importer;\n String specFile = \"/utf-8.xml\";\n mi.importModelFromResource(new ClassPathResource(specFile));\n \n assertEquals(1, mi.getNodeDao().countAll());\n // \\u00f1 is unicode for n~ \n assertEquals(\"\\u00f1ode2\", mi.getNodeDao().get(1).getLabel());\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(timeout = 4000)\n public void test078() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[2];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(9, javaCharStream0.bufpos);\n assertEquals(10, javaCharStream0.getColumn());\n }", "@Test\n public void testOutputDelimited() throws Throwable {\n testOutputDelimited(false);\n }", "@Test\n @Ignore(\"Zip file compare have some problem\")\n public void testOutputCompressDelimitedMode() throws Throwable {\n testCompressFile(false);\n }", "@Test(timeout=100)\r\n\tpublic void testQuotedFields() {\r\n\t\tString [] r1 = {\"An Apple\", \"or Orange\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"\",\"a b\",\" has space \"};\r\n\t\tquoteline(r1);\r\n\t\tquoteline(r2);\r\n\t\tout.close();\r\n\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t}", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n StringReader stringReader0 = new StringReader(\"H+\\\"RE_]I95BDm\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.ReadByte();\n assertEquals('H', char0);\n }", "@Test\n public void detailCompareDefaultDelimiterNoCompareOption(){\n LOGGER.info(\"------------- Start running detailCompareDefaultDelimiterNoCompareOption -------------\");\n srcCsv = Constant.RESOURCE_PATH + \"pluginautomation/sample/csv/output.csv\";\n desCsv = Constant.RESOURCE_PATH + \"pluginautomation/sample/csv/target.csv\";\n boolean result = CsvUtil.compareCsv(srcCsv, desCsv, null,null);\n assertTrue(result);\n }", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Cf&9B{tMCu\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(4, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n StringReader stringReader0 = new StringReader(\"oh\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 89, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(2, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n StringReader stringReader0 = new StringReader(\"c3UZts4z!|a\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 21, 47);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(23, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test062() 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 int int0 = javaCharStream0.getEndLine();\n assertEquals(10, javaCharStream0.getBeginLine());\n assertEquals(10, int0);\n assertEquals(0, javaCharStream0.getColumn());\n }", "private void readEncoding(BufferedReader reader) throws IOException {\n String encoding = reader.readLine();\r\n if ( ! AbstractUtf8Message.UTF8_ENCODING_HEADER_STRING.equals(encoding)) {\r\n throw new IOException(\"Expected UTF-8 header when decoding UTF-8 message\");\r\n }\r\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getColumn();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(1, int0);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndLine();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals((-2818), int0);\n }", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.FillBuff();\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test\n public void testOutputCSV() throws Throwable {\n testOutputCSV(false);\n }", "@Test(timeout = 4000)\n public void test073() throws Throwable {\n StringReader stringReader0 = new StringReader(\"anBz*^T>\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n stringReader0.read();\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(1);\n javaCharStream0.getEndColumn();\n assertEquals(4094, javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test134() throws Throwable {\n FileDescriptor fileDescriptor0 = new FileDescriptor();\n MockFileInputStream mockFileInputStream0 = new MockFileInputStream(fileDescriptor0);\n StringReader stringReader0 = new StringReader(\"qC2NV{I?oox x04%Fm\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.ReInit((InputStream) mockFileInputStream0);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test019() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 91, 91);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn((-366), 1);\n int int0 = javaCharStream0.getLine();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals((-366), int0);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n javaCharStream0.UpdateLineColumn('d');\n assertEquals(1, javaCharStream0.getBeginLine());\n }", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n StringReader stringReader0 = new StringReader(\"=<D!T!tLp\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 20, 0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(3, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 6, 1, 6);\n javaCharStream0.backup(4073);\n // Undeclared exception!\n try { \n javaCharStream0.readChar();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -4067\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test(timeout = 4000)\n public void test000() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.adjustBeginLineColumn((-1), 4093);\n assertEquals(4093, javaCharStream0.getBeginColumn());\n }", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n javaCharStream0.backup(122);\n javaCharStream0.adjustBeginLineColumn(122, 122);\n assertEquals(122, javaCharStream0.getBeginColumn());\n }", "@Test(expected=IndexOutOfBoundsException.class)\n public void testCharAt_File() {\n System.out.println(\"charAt_File\");\n int index = 0; \n Charset cs = Charset.forName(UTF_8);\n InputStream stream = getInputStream(TypeOfStream.FILE, TypeOfContent.BYTE_0, cs);\n @SuppressWarnings(\"deprecation\")\n BufferedCharSequence instance = new BufferedCharSequence(stream, cs.newDecoder(), 0);\n instance.charAt(index);\n }", "@Test(timeout = 4000)\n public void test052() throws Throwable {\n StringReader stringReader0 = new StringReader(\"import\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 381, 381);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(5, javaCharStream0.bufpos);\n assertEquals(386, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test018() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{H}R}D';ZHm5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getLine();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, int0);\n }", "@Test\n public void givenStateCensusAnalyserFile_WhenImproperDelimiter_ReturnsException() {\n\n String CSV_FILE_PATH = \"src/test/resources/StateCensusData.csv\";\n try {\n indianCensusAnalyzer.loadStateCensusCSVData(CensusAnalyser.Country.INDIA, CSV_FILE_PATH);\n } catch (CSVBuilderException e) {\n Assert.assertEquals(CSVBuilderException.TypeOfException.INCORRECT_DELIMITER_HEADER_EXCEPTION, e.typeOfException);\n }\n }", "public void testInvalidTextValueWithBrokenUTF8() throws Exception\n {\n final byte[] input = readResource(\"/data/clusterfuzz-cbor-35979.cbor\");\n try (JsonParser p = MAPPER.createParser(input)) {\n assertToken(JsonToken.VALUE_STRING, p.nextToken());\n p.getText();\n fail(\"Should not pass\");\n } catch (StreamReadException e) {\n verifyException(e, \"Truncated UTF-8 character in Short Unicode Name (36 bytes)\");\n }\n\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals((-2818), int0);\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n try { \n javaCharStream0.readChar();\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n StringReader stringReader0 = new StringReader(\"1dIHR}';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.ReadByte();\n assertEquals('1', char0);\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n StringReader stringReader0 = new StringReader(\"kE4X 9\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-1), 66, 1279);\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('k', char0);\n }", "@Test(timeout=100)\r\n\tpublic void testLongLines() {\r\n\t\tString message = \"Write-readable-software\";\r\n\t\tint length = message.length();\r\n\t\tRandom rand = new Random();\r\n\t\tint count = 100;\r\n\t\tString [] r1 = new String[count];\r\n\t\tfor(int k=0; k<count; k++) r1[k] = message.substring(rand.nextInt(length)+1);\r\n\t\tcount = 200;\r\n\t\tString [] r2 = new String[count];\r\n\t\tmessage = \"abcdefghij\";\r\n\t\tr2[0] = Character.toString(message.charAt(0));\r\n\t\tfor(int k=1; k<count; k++) r2[k] = r2[k-1]+message.charAt(k%10);\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\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\r\n\t\tassertFalse( csv.hasNext() );\r\n\t}", "List<String[]> readCsv(String inputFilePath,int skipLine,char separator)throws IOException;", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\\\"for\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 114, (-473));\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[1];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals((-471), javaCharStream0.getColumn());\n }", "@Test\r\n \tpublic void testFileEvents96_2() {\n \t\t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/CSVTest_96_2.txt\"); // issue 96\r\n \t\tassertNotNull(input);\r\n \t\r\n \t\t// Set the parameters\r\n \t\tParameters params = new Parameters();\r\n \t\tsetDefaults(params);\r\n \t\tparams.fieldDelimiter = \",\";\r\n \t\tparams.textQualifier = \"\\\"\";\r\n \t\tparams.sendColumnsMode = Parameters.SEND_COLUMNS_LISTED;\r\n \t\tparams.sourceColumns = \"1\";\r\n \t\tparams.targetColumns = \"2\";\r\n \t\tparams.targetLanguages = locFRCA.toString();\r\n \t\tparams.targetSourceRefs = \"1\";\r\n \t\tfilter.setParameters(params);\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\t\t\t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"src\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"trg\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"data\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source1\", \"\", \"target1\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data1\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source2\", \"\", \"target2\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data2\");\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}", "@Test\r\n \tpublic void testFileEvents96_3() {\n \t\t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/CSVTest_96_2.txt\"); // issue 96\r\n \t\tassertNotNull(input);\r\n \t\r\n \t\t// Set the parameters\r\n \t\tParameters params = new Parameters();\r\n \t\tsetDefaults(params);\r\n \t\tparams.fieldDelimiter = \",\";\r\n \t\tparams.textQualifier = \"\\\"\";\r\n \t\tparams.sendColumnsMode = Parameters.SEND_COLUMNS_LISTED;\r\n \t\tparams.sourceColumns = \"1\";\r\n \t\tparams.targetColumns = \"2\";\r\n \t\tparams.targetLanguages = \"\"; //locFRCA.toString();\r\n \t\tparams.targetSourceRefs = \"1\";\r\n \t\tfilter.setParameters(params);\r\n \t\t\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN, locFRCA));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\t\t\t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"src\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"trg\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"data\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source1\", \"\", \"target1\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data1\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source2\", \"\", \"target2\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data2\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\t\t\tfilter.close();\t\t\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(timeout = 4000)\n public void test136() throws Throwable {\n PipedInputStream pipedInputStream0 = new PipedInputStream();\n JavaCharStream javaCharStream0 = new JavaCharStream(pipedInputStream0, 9, (-6208), 9);\n javaCharStream0.getBeginColumn();\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Override\n @Test\n public void testXlsx() throws IOException, InvalidFormatException\n {\n super.testXlsx();\n }", "@Override\n @Test\n public void testXlsx() throws IOException, InvalidFormatException\n {\n super.testXlsx();\n }", "@Test\r\n public void testSerialReader() {\n Assert.assertTrue(true);\r\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n StringReader stringReader0 = new StringReader(\"new\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.getBeginColumn());\n assertEquals(0, token0.kind);\n }", "@Test\n public void detailCompareDefaultDelimiterBooleanOption(){\n LOGGER.info(\"------------- Start running detailCompareDefaultDelimiterNoCompareOption -------------\");\n srcCsv = Constant.RESOURCE_PATH + \"pluginautomation/sample/csv/output.csv\";\n desCsv = Constant.RESOURCE_PATH + \"pluginautomation/sample/csv/target.csv\";\n boolean result = CsvUtil.compareCsv(srcCsv, desCsv, null,null, CsvUtil.CompareOptions.TRUE_FALSE_IS_1_0);\n assertTrue(result);\n }", "@Test(timeout = 4000)\n public void test052() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n javaCharStream0.ReInit((Reader) null, 122, 122, 122);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test064() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 3171, 3171, 3171);\n javaCharStream0.backup(8);\n javaCharStream0.BeginToken();\n javaCharStream0.AdjustBuffSize();\n javaCharStream0.AdjustBuffSize();\n assertEquals(8, javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test143() throws Throwable {\n StringReader stringReader0 = new StringReader(\";{\\\"9n/s(2C'#tQX*\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[8];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(1, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(2, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test017() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(1);\n javaCharStream0.getLine();\n assertEquals(4094, javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.readChar();\n javaCharStream0.backup(1);\n javaCharStream0.readChar();\n javaCharStream0.backup(1);\n char char0 = javaCharStream0.BeginToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals('%', char0);\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Z[^o)j]BO6Ns,$`3$e\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.Done();\n javaCharStream0.ReInit((Reader) stringReader0);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test\n\tpublic void test_ReadAsciiString_tab_terminates() throws IOException {\n\t\tBinaryReader br = br(true, 'A', 'B', 'C', '\\t', 'D', 'E', 'F', 0, /* magic flag */ 42);\n\t\tassertEquals(\"ABC\\tDEF\", br.readAsciiString(0));\n\t}", "public void convertToUTF8() {\n FileInputStream istream = null;\n Writer out = null;\n try {\n istream = new FileInputStream(path);\n BufferedInputStream in = new BufferedInputStream(istream);\n CharsetDecoder charsetDecoder = Charset.forName(\"UTF-8\").newDecoder();\n charsetDecoder.onMalformedInput(CodingErrorAction.REPLACE);\n charsetDecoder.onUnmappableCharacter(CodingErrorAction.REPLACE);\n Reader inputReader = new InputStreamReader(in, charsetDecoder);\n StringWriter writer = new StringWriter();\n IOUtils.copy(inputReader, writer);\n String theString = writer.toString();\n FileUtils.deleteQuietly(new File(path));\n out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path), \"UTF-8\"));\n out.write(theString);\n out.close();\n// System.out.println(\"\");\n } catch (FileNotFoundException ex) {\n logger.error(\"Error converting the file to utf8\", ex);\n } catch (IOException ex) {\n logger.error(\"Error converting the file to utf8\", ex);\n } finally {\n try {\n if (out != null) {\n out.close();\n }\n if (istream != null) {\n istream.close();\n }\n } catch (IOException ex) {\n logger.error(\"Error converting the file to utf8\", ex);\n }\n }\n\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n StringReader stringReader0 = new StringReader(\"tU9~\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getColumn());\n }", "private char read() throws SAXException, IOException {\n for (;;) { // the loop is here for the CRLF case\n if (unreadBuffer != -1) {\n char c = (char) unreadBuffer;\n unreadBuffer = -1;\n return c;\n }\n assert (bufLen > -1);\n pos++;\n assert pos <= bufLen;\n linePrev = line;\n colPrevPrev = colPrev;\n colPrev = col;\n col++;\n if (pos == bufLen) {\n boolean charDataContinuation = false;\n if (cstart > -1) {\n flushChars();\n charDataContinuation = true;\n }\n bufLen = reader.read(buf);\n assert bufLen <= buf.length;\n if (bufLen == -1) {\n return '\\u0000';\n } else {\n for (int i = 0; i < characterHandlers.length; i++) {\n CharacterHandler ch = characterHandlers[i];\n ch.characters(buf, 0, bufLen);\n }\n }\n if (charDataContinuation) {\n cstart = 0;\n }\n pos = 0;\n }\n char c = buf[pos];\n if (c > '\\u007F' && nonAsciiProhibited\n && !alreadyComplainedAboutNonAscii) {\n err(\"The character encoding of the document was not explicit but the document contains non-ASCII.\");\n }\n switch (c) {\n case '\\n':\n /*\n * U+000D CARRIAGE RETURN (CR) characters, and U+000A LINE\n * FEED (LF) characters, are treated specially. Any CR\n * characters that are followed by LF characters must be\n * removed, and any CR characters not followed by LF\n * characters must be converted to LF characters.\n */\n if (prev == '\\r') {\n // swallow the LF\n colPrev = colPrevPrev;\n col = 0;\n if (cstart != -1) {\n flushChars();\n cstart = pos + 1;\n }\n prev = c;\n continue;\n } else {\n linePrev = line;\n line++;\n colPrevPrev = colPrev;\n colPrev = col;\n col = 0;\n }\n break;\n case '\\r':\n c = buf[pos] = '\\n';\n linePrev = line;\n line++;\n colPrevPrev = colPrev;\n colPrev = col;\n col = 0;\n prev = '\\r';\n if (contentModelFlag != ContentModelFlag.PCDATA) {\n prevFourPtr++;\n prevFourPtr %= 4;\n prevFour[prevFourPtr] = c;\n }\n return c;\n case '\\u0000':\n /*\n * All U+0000 NULL characters in the input must be replaced\n * by U+FFFD REPLACEMENT CHARACTERs. Any occurrences of such\n * characters is a parse error.\n */\n err(\"Found U+0000 in the character stream.\");\n c = buf[pos] = '\\uFFFD';\n break;\n case '\\u000B':\n case '\\u000C':\n if (inContent) {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.FATAL) {\n fatal(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n } else {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.ALTER_INFOSET) {\n c = buf[pos] = ' ';\n }\n warn(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n }\n }\n break;\n default:\n if ((c & 0xFC00) == 0xDC00) {\n // Got a low surrogate. See if prev was high surrogate\n if ((prev & 0xFC00) == 0xD800) {\n int intVal = (prev << 10) + c + SURROGATE_OFFSET;\n if (isNonCharacter(intVal)) {\n warn(\"Astral non-character.\");\n }\n if (isAstralPrivateUse(intVal)) {\n warnAboutPrivateUseChar();\n }\n } else {\n // XXX figure out what to do about lone high\n // surrogates\n err(\"Found low surrogate without high surrogate.\");\n c = buf[pos] = '\\uFFFD';\n }\n } else if (inContent && (c < ' ' || isNonCharacter(c))\n && (c != '\\t')) {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.FATAL) {\n fatal(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n } else {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.ALTER_INFOSET) {\n c = buf[pos] = '\\uFFFD';\n }\n warn(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n }\n } else if (isPrivateUse(c)) {\n warnAboutPrivateUseChar();\n }\n }\n prev = c;\n if (contentModelFlag != ContentModelFlag.PCDATA) {\n prevFourPtr++;\n prevFourPtr %= 4;\n prevFour[prevFourPtr] = c;\n }\n return c;\n }\n }", "@Test(timeout = 4000)\n public void test138() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 100, 100, 100);\n // Undeclared exception!\n try { \n javaCharStream0.getEndColumn();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -1\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\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 }", "private int readFdocaOneByte() {\n checkForSplitRowAndComplete(1);\n //return dataBuffer_[position_++] & 0xff;\n return dataBuffer_.readUnsignedByte();\n }", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(10, javaCharStream0.bufpos);\n assertEquals(12, javaCharStream0.getColumn());\n }", "@Override\n @Test\n public void testXls() throws IOException, InvalidFormatException\n {\n super.testXls();\n }", "@Override\n @Test\n public void testXls() throws IOException, InvalidFormatException\n {\n super.testXls();\n }" ]
[ "0.7927994", "0.6873159", "0.684486", "0.67208517", "0.62681437", "0.62054646", "0.61683124", "0.6133243", "0.6129981", "0.61200887", "0.6113315", "0.61007434", "0.60509574", "0.6025207", "0.5992166", "0.5949816", "0.5939017", "0.59158677", "0.5859761", "0.58144593", "0.57873124", "0.57552856", "0.5706832", "0.5705317", "0.56643873", "0.5636937", "0.563009", "0.56284225", "0.56085336", "0.5588911", "0.5572077", "0.55707186", "0.55605936", "0.5551457", "0.5544894", "0.5527961", "0.55126643", "0.5509578", "0.549678", "0.54949117", "0.5488918", "0.5488435", "0.5487703", "0.54829115", "0.5468335", "0.546598", "0.5423372", "0.5422732", "0.54192495", "0.5415252", "0.5415077", "0.54149973", "0.5413655", "0.54131633", "0.5387827", "0.5385402", "0.53853923", "0.5377184", "0.53741765", "0.53675765", "0.5364034", "0.5363649", "0.5344751", "0.5342207", "0.5333983", "0.5332475", "0.5328393", "0.5326467", "0.53230387", "0.53185177", "0.53096795", "0.5293683", "0.5286707", "0.5286259", "0.5284609", "0.5279154", "0.5275454", "0.52734184", "0.52725196", "0.527245", "0.527245", "0.5272049", "0.52578956", "0.52529013", "0.52321076", "0.52215827", "0.52186173", "0.5207684", "0.51984346", "0.519831", "0.51969033", "0.51687205", "0.5165081", "0.5164701", "0.5163252", "0.5161451", "0.51613224", "0.5157992", "0.5157644", "0.5157644" ]
0.8505388
0
Test the supercsv read API processing UTF16BE file.
@Test public void testUTF16BE() throws IOException { BufferedReader reader = new BufferedReader( new InputStreamReader(new FileInputStream(UTF16BE_FILE), "UTF-16be") ); ReadTestCSVFile(reader); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testUTF16() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16LE_FILE), \"UTF-16\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\n\t\tBufferedReader reader1 = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16BE_FILE), \"UTF-16\")\n\t\t);\n\t\tReadTestCSVFile(reader1);\n\t}", "@Test\n\tpublic void testUTF16LE() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16LE_FILE), \"UTF-16le\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "@Test\n\tpublic void testUTF8() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF8_FILE), \"UTF-8\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "@Test\n\tpublic void testUTF8WithoutBom() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF8_NO_BOM_FILE), \"UTF-8\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "@Test\n\tpublic void test_ReadUtf8String() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, -107, -61, -65, 0);\n\t\tassertEquals(\"\\uaa55\\u00ff\", br.readUtf8String(0));\n\t}", "@Test\n\tpublic void test_ReadNextUtf8String() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, -107, -61, -65, 0, -22, -87, -107, 0);\n\t\tassertEquals(\"\\uaa55\\u00ff\", br.readNextUtf8String());\n\t\tassertEquals(\"\\uaa55\", br.readNextUtf8String());\n\t}", "int readS16BE(String name)\n throws IOException, EOFException;", "@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 }", "int readS16BE()\n throws IOException, EOFException;", "@Test\r\n\tpublic void readCsvTest() throws IOException {\r\n\t\t\tfail(\"Not yet implemented\");\r\n\t}", "@Test\n public void testUnicodeAt4KB() {\n File f = getFile(\"more_than_4KB.txt\");\n assertNotNull(f);\n FileObject fo = FileUtil.toFileObject(f);\n assertNotNull(fo);\n BufferedCharSequence chars = new BufferedCharSequence(fo, cs_UTF_8.newDecoder(), f.length());\n assertEquals('0', chars.charAt(0));\n assertEquals('1', chars.charAt(1));\n int xPos;\n if (chars.charAt(4094) == '\\r' && chars.charAt(4095) == '\\n') {\n // windows line-endings, can be caused by hg extension win32text\n xPos = 4098;\n } else {\n // unix or mac line-endings\n xPos = 4097;\n }\n assertEquals('X', chars.charAt(xPos));\n assertEquals('Y', chars.charAt(xPos+1));\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n StringReader stringReader0 = new StringReader(\"H+\\\"RE_]I95BDm\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.ReadByte();\n assertEquals('H', char0);\n }", "@Test\n\tpublic void test_ReadUtf8String_bad_data() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, 'A', 0);\n\t\tassertEquals(\"\\ufffdA\" /* unicode replacement char, 'A'*/, br.readUtf8String(0));\n\t}", "@Test(expected=IndexOutOfBoundsException.class)\n public void testCharAt_File() {\n System.out.println(\"charAt_File\");\n int index = 0; \n Charset cs = Charset.forName(UTF_8);\n InputStream stream = getInputStream(TypeOfStream.FILE, TypeOfContent.BYTE_0, cs);\n @SuppressWarnings(\"deprecation\")\n BufferedCharSequence instance = new BufferedCharSequence(stream, cs.newDecoder(), 0);\n instance.charAt(index);\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(416);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn(416, 416);\n assertEquals(3680, javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~\\\"Py BTn?,~tnf\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 15, 15);\n javaCharStream0.bufpos = (-1396);\n javaCharStream0.backup((-1396));\n javaCharStream0.adjustBeginLineColumn((-1396), 76);\n assertEquals(0, javaCharStream0.bufpos);\n }", "@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 }", "private int readFdocaOneByte() {\n checkForSplitRowAndComplete(1);\n //return dataBuffer_[position_++] & 0xff;\n return dataBuffer_.readUnsignedByte();\n }", "@Test\n void testRead() throws IOException, URISyntaxException {\n final String[] expectedResult = {\n \"-199\t\\\"hello\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"2017/06/20\\\"\t0.0\t1\t\\\"2\\\"\t\\\"823478788778713\\\"\",\n \"2\t\\\"Sdfwer\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"1100/06/20\\\"\tInf\t2\t\\\"NaN\\\"\t\\\",1,2,3\\\"\",\n \"0\t\\\"cjlajfo.\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"3000/06/20\\\"\t-Inf\t3\t\\\"inf\\\"\t\\\"\\\\casdf\\\"\",\n \"-1\t\\\"Mywer\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"06-20-2011\\\"\t3.141592653\t4\t\\\"4.8\\\"\t\\\"  \\\\\\\" \\\"\",\n \"266128\t\\\"Sf\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"06-20-1917\\\"\t0\t5\t\\\"Inf+11\\\"\t\\\"\\\"\",\n \"0\t\\\"null\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"03/03/1817\\\"\t123\t6.000001\t\\\"11-2\\\"\t\\\"\\\\\\\"adf\\\\0\\\\na\\\\td\\\\nsf\\\\\\\"\\\"\",\n \"-2389\t\\\"\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:72\t2017-06-20\t\\\"2017-03-12\\\"\tNaN\t2\t\\\"nap\\\"\t\\\"💩⌛👩🏻■\\\"\"};\n BufferedReader result;\n File file = getFile(\"csv/ingest/IngestCSV.csv\");\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream stream = new BufferedInputStream(fileInputStream)) {\n CSVFileReader instance = createInstance();\n File outFile = instance.read(Tuple.of(stream, file), null).getTabDelimitedFile();\n result = new BufferedReader(new FileReader(outFile));\n }\n\n assertThat(result).isNotNull();\n assertThat(result.lines().collect(Collectors.toList())).isEqualTo(Arrays.asList(expectedResult));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndLine();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals((-2818), int0);\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 test085() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~f'\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndColumn());\n }", "int readS16LE()\n throws IOException, EOFException;", "@Test(timeout = 4000)\n public void test063() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null);\n javaCharStream0.maxNextCharInd = 2;\n javaCharStream0.prevCharIsCR = true;\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('\\u0000', char0);\n }", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Cf&9B{tMCu\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(4, javaCharStream0.getColumn());\n }", "@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 }", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.FillBuff();\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Z[^o)j]BO6Ns,$`3$e\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1, 0);\n char char0 = javaCharStream0.readChar();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndLine());\n assertEquals('Z', char0);\n }", "int readS16LE(String name)\n throws IOException, EOFException;", "@Test(timeout = 4000)\n public void test144() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s15IMZA$C/uXdG]R\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.readChar();\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0, 0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(8, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(10, javaCharStream0.getColumn());\n }", "@Test\n public void testunicode32() {\n assertEquals(\"\\uD834\\uDD1E\", JsonReader.read(\"\\\"\\\\uD834\\\\uDD1E\\\"\"));\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n StringReader stringReader0 = new StringReader(\"1dIHR}';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.ReadByte();\n assertEquals('1', char0);\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n javaCharStream0.adjustBeginLineColumn(122, 122);\n int int0 = javaCharStream0.getBeginColumn();\n assertEquals(122, int0);\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Q|ni.,qQXS\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 10, 754);\n javaCharStream0.adjustBeginLineColumn(754, 59);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals(59, javaCharStream0.getBeginColumn());\n assertEquals(755, int0);\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n StringReader stringReader0 = new StringReader(\"c3UZts4z!|a\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 21, 47);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(23, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test137() throws Throwable {\n StringReader stringReader0 = new StringReader(\"9F83|i5vU 84Kd\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 887, 887);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(3, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(890, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n byte[] byteArray0 = new byte[2];\n byteArray0[0] = (byte)48;\n byteArray0[1] = (byte)48;\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);\n JavaCharStream javaCharStream0 = new JavaCharStream(byteArrayInputStream0, 102, (byte)84, (byte)48);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(85, javaCharStream0.getEndColumn());\n }", "@Test\n @JUnitTemporaryDatabase // Relies on specific IDs so we need a fresh database\n public void testImportUtf8() throws Exception {\n createAndFlushServiceTypes();\n createAndFlushCategories();\n \n //Initialize the database\n ModelImporter mi = m_importer;\n String specFile = \"/utf-8.xml\";\n mi.importModelFromResource(new ClassPathResource(specFile));\n \n assertEquals(1, mi.getNodeDao().countAll());\n // \\u00f1 is unicode for n~ \n assertEquals(\"\\u00f1ode2\", mi.getNodeDao().get(1).getLabel());\n }", "@Test\n void testBrokenCSV() throws IOException {\n try {\n createInstance().read(null, null);\n fail(\"IOException not thrown on null csv\");\n } catch (NullPointerException ex) {\n assertThat(ex.getMessage()).isNull();\n } catch (IngestException ex) {\n assertThat(ex.getErrorKey()).isEqualTo(IngestError.UNKNOWN_ERROR);\n }\n File file = getFile(\"csv/ingest/BrokenCSV.csv\");\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream stream = new BufferedInputStream(fileInputStream)) {\n createInstance().read(Tuple.of(stream, file), null);\n fail(\"IOException was not thrown when collumns do not align.\");\n } catch (IngestException ex) {\n assertThat(ex.getErrorKey()).isEqualTo(IngestError.CSV_RECORD_MISMATCH);\n }\n }", "@Test(timeout = 4000)\n public void test019() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 91, 91);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn((-366), 1);\n int int0 = javaCharStream0.getLine();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals((-366), int0);\n }", "public int readFromFile(int index) throws IOException {\n FileReader file = (FileReader) filePtrs.get(index);\n int i16 = file.read(); // UTF-16 as int\n char c16 = (char)i16; // UTF-16\n if (Character.isHighSurrogate(c16))\n {\n int low_i16 = file.read(); // low surrogate UTF-16 as int\n char low_c16 = (char)low_i16;\n return Character.toCodePoint(c16, low_c16);\n }\n return i16;\n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n StringReader stringReader0 = new StringReader(\"byte\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 19, 21, 19);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(21, javaCharStream0.getBeginColumn());\n assertEquals(17, token0.kind);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Gnzd86`;Gs=\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 14, 14, 14);\n javaCharStream0.nextCharInd = 14;\n char char0 = javaCharStream0.BeginToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('\\u0000', char0);\n }", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n StringReader stringReader0 = new StringReader(\"=<D!T!tLp\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 20, 0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(3, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getColumn();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(1, int0);\n }", "@Test(timeout = 4000)\n public void test018() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{H}R}D';ZHm5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getLine();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, int0);\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n StringReader stringReader0 = new StringReader(\"kE4X 9\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-1), 66, 1279);\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('k', char0);\n }", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[2];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(9, javaCharStream0.bufpos);\n assertEquals(10, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Gnzd86`;Gs=\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 14, 4094, 4075);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndColumn();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(4094, int0);\n }", "@Test(timeout = 4000)\n public void test126() throws Throwable {\n StringReader stringReader0 = new StringReader(\"9F}n S'~C\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(74, token0.kind);\n assertEquals(\"F\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals((-2818), int0);\n }", "private int readFdocaOneByte(int index) {\n\n checkForSplitRowAndComplete(1, index);\n //return dataBuffer_[position_++] & 0xff;\n return dataBuffer_.readByte();\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n StringReader stringReader0 = new StringReader(\"oh\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 89, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(2, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test062() 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 int int0 = javaCharStream0.getEndLine();\n assertEquals(10, javaCharStream0.getBeginLine());\n assertEquals(10, int0);\n assertEquals(0, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test159() throws Throwable {\n StringReader stringReader0 = new StringReader(\"x/C9mX)\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-2632), (-2632));\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals((-2631), javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test134() throws Throwable {\n FileDescriptor fileDescriptor0 = new FileDescriptor();\n MockFileInputStream mockFileInputStream0 = new MockFileInputStream(fileDescriptor0);\n StringReader stringReader0 = new StringReader(\"qC2NV{I?oox x04%Fm\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.ReInit((InputStream) mockFileInputStream0);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "public abstract char read_wchar();", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n StringReader stringReader0 = new StringReader(\"fA.W2e9@MV5G\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(2, javaCharStream0.getColumn());\n }", "@Test\n public void testOutputDelimitedStream() throws Throwable {\n testOutputDelimited(true);\n }", "@Test(timeout = 4000)\n public void test016() throws Throwable {\n StringReader stringReader0 = new StringReader(\"7o9?>+o`*qi$\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('7', char0);\n }", "@Test(timeout = 4000)\n public void test115() throws Throwable {\n StringReader stringReader0 = new StringReader(\"V&H#2E6u%Ql&dI\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 2, 2);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"V\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[6];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(5, javaCharStream0.bufpos);\n assertEquals(6, javaCharStream0.getEndColumn());\n }", "public void testBigTOC() throws Exception {\n\n InputStream actIn = fact.createFilteredInputStream(mau,\n new StringInputStream(bigTOC),\n Constants.DEFAULT_ENCODING);\n\n assertEquals(bigTOCFiltered, StringUtil.fromInputStream(actIn));\n\n }", "private static String loadConvert(String str) {\n\t\tint off = 0;\n\t\tint len = str.length();\n\t\tchar[] in = str.toCharArray();\n\t\tchar[] convtBuf = new char[1024];\n\t\tif (convtBuf.length < len) {\n\t\t\tint newLen = len * 2;\n\t\t\tif (newLen < 0) {\n\t\t\t\tnewLen = Integer.MAX_VALUE;\n\t\t\t}\n\t\t\tconvtBuf = new char[newLen];\n\t\t}\n\t\tchar aChar;\n\t\tchar[] out = convtBuf;\n\t\tint outLen = 0;\n\t\tint end = off + len;\n\n\t\twhile (off < end) {\n\t\t\taChar = in[off++];\n\t\t\tif (aChar == '\\\\') {\n\t\t\t\taChar = in[off++];\n\t\t\t\tif (aChar == 'u') {\n\t\t\t\t\t// Read the xxxx\n\t\t\t\t\tint value = 0;\n\t\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\t\taChar = in[off++];\n\t\t\t\t\t\tswitch (aChar) {\n\t\t\t\t\t\tcase '0':\n\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\tcase '2':\n\t\t\t\t\t\tcase '3':\n\t\t\t\t\t\tcase '4':\n\t\t\t\t\t\tcase '5':\n\t\t\t\t\t\tcase '6':\n\t\t\t\t\t\tcase '7':\n\t\t\t\t\t\tcase '8':\n\t\t\t\t\t\tcase '9':\n\t\t\t\t\t\t\tvalue = (value << 4) + aChar - '0';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\tcase 'e':\n\t\t\t\t\t\tcase 'f':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'a';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'A':\n\t\t\t\t\t\tcase 'B':\n\t\t\t\t\t\tcase 'C':\n\t\t\t\t\t\tcase 'D':\n\t\t\t\t\t\tcase 'E':\n\t\t\t\t\t\tcase 'F':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'A';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(\"Malformed \\\\uxxxx encoding.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tout[outLen++] = (char) value;\n\t\t\t\t} else {\n\t\t\t\t\tif (aChar == 't')\n\t\t\t\t\t\taChar = '\\t';\n\t\t\t\t\telse if (aChar == 'r')\n\t\t\t\t\t\taChar = '\\r';\n\t\t\t\t\telse if (aChar == 'n')\n\t\t\t\t\t\taChar = '\\n';\n\t\t\t\t\telse if (aChar == 'f')\n\t\t\t\t\t\taChar = '\\f';\n\t\t\t\t\tout[outLen++] = aChar;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tout[outLen++] = aChar;\n\t\t\t}\n\t\t}\n\t\treturn new String(out, 0, outLen);\n\t}", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+Y6{Tr P>D9wb\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 44, 21, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(22, javaCharStream0.getBeginColumn());\n assertEquals(74, token0.kind);\n }", "@Test\r\n public void testSerialReader() {\n Assert.assertTrue(true);\r\n }", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n javaCharStream0.backup(122);\n javaCharStream0.adjustBeginLineColumn(122, 122);\n assertEquals(122, javaCharStream0.getBeginColumn());\n }", "@Test\r\n \tpublic void testFileEvents96_2() {\n \t\t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/CSVTest_96_2.txt\"); // issue 96\r\n \t\tassertNotNull(input);\r\n \t\r\n \t\t// Set the parameters\r\n \t\tParameters params = new Parameters();\r\n \t\tsetDefaults(params);\r\n \t\tparams.fieldDelimiter = \",\";\r\n \t\tparams.textQualifier = \"\\\"\";\r\n \t\tparams.sendColumnsMode = Parameters.SEND_COLUMNS_LISTED;\r\n \t\tparams.sourceColumns = \"1\";\r\n \t\tparams.targetColumns = \"2\";\r\n \t\tparams.targetLanguages = locFRCA.toString();\r\n \t\tparams.targetSourceRefs = \"1\";\r\n \t\tfilter.setParameters(params);\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\t\t\t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"src\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"trg\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"data\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source1\", \"\", \"target1\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data1\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source2\", \"\", \"target2\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data2\");\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}", "@Test\n public void testIntializerProvidesTheRequestedCharsetIfItIsValid()\n throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, NoSuchFieldException\n {\n String goodCharsetName = \"UTF-16\";\n Charset goodCharset = Charset.forName(goodCharsetName);\n\n final DefaultCharset defaultCharsetInstance = setInternalDefaultCharset(goodCharsetName);\n final Charset charset = getCurrentCharsetFromDefaultCharsetInstance(defaultCharsetInstance);\n\n assertEquals(goodCharset.name(), charset.name());\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Q!@aV0Ak~pvq\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[4];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(2, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(3, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test136() throws Throwable {\n PipedInputStream pipedInputStream0 = new PipedInputStream();\n JavaCharStream javaCharStream0 = new JavaCharStream(pipedInputStream0, 9, (-6208), 9);\n javaCharStream0.getBeginColumn();\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test(expected=IndexOutOfBoundsException.class)\n public void testCharAt_Byte() {\n System.out.println(\"charAt_Byte\");\n int index = 0;\n Charset cs = Charset.forName(UTF_8);\n InputStream stream = getInputStream(TypeOfStream.BYTE, TypeOfContent.BYTE_0, cs);\n @SuppressWarnings(\"deprecation\")\n BufferedCharSequence instance = new BufferedCharSequence(stream, cs.newDecoder(), 0);\n instance.charAt(index);\n }", "public void ach_doc_type_csv_test () {\n\t\t\n\t}", "@Test(timeout=100)\r\n\tpublic void testUnquoted() {\r\n\t\tString [] r1 = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"A\",\"Bb\",\"C\",\"Dd\",\"5555\",\"six\",\"7-11\",\"8\",\"Nines\",\"10!!!\"};\r\n\t\tString [] r3 = {\"a\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\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}", "public String readUTF() throws IOException;", "private void handleCharacterByte(int ch) throws IOException {\n\t\tif (parsingHex) {\n\t\t\tint b = HexUtils.parseHexDigit(ch) << 4;\n\t\t\tch = source.read();\n\t\t\tif (ch == -1) {\n\t\t\t\tthrow new IllegalStateException(\"Unexpected end of file\");\n\t\t\t}\n\t\t\tb += HexUtils.parseHexDigit(ch);\n\t\t\tbuffer.add(b);\n\t\t\tparsingHex = false;\n\t\t} else {\n\t\t\tbuffer.add(ch);\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test064() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 3171, 3171, 3171);\n javaCharStream0.backup(8);\n javaCharStream0.BeginToken();\n javaCharStream0.AdjustBuffSize();\n javaCharStream0.AdjustBuffSize();\n assertEquals(8, javaCharStream0.bufpos);\n }", "@Test\r\n \tpublic void testFileEvents96_3() {\n \t\t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/CSVTest_96_2.txt\"); // issue 96\r\n \t\tassertNotNull(input);\r\n \t\r\n \t\t// Set the parameters\r\n \t\tParameters params = new Parameters();\r\n \t\tsetDefaults(params);\r\n \t\tparams.fieldDelimiter = \",\";\r\n \t\tparams.textQualifier = \"\\\"\";\r\n \t\tparams.sendColumnsMode = Parameters.SEND_COLUMNS_LISTED;\r\n \t\tparams.sourceColumns = \"1\";\r\n \t\tparams.targetColumns = \"2\";\r\n \t\tparams.targetLanguages = \"\"; //locFRCA.toString();\r\n \t\tparams.targetSourceRefs = \"1\";\r\n \t\tfilter.setParameters(params);\r\n \t\t\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN, locFRCA));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\t\t\t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"src\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"trg\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"data\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source1\", \"\", \"target1\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data1\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source2\", \"\", \"target2\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data2\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\t\t\tfilter.close();\t\t\r\n \t}", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n StringReader stringReader0 = new StringReader(\";{\\\"9n/s(2C'#tQX*\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n byte[] byteArray0 = new byte[8];\n byteArray0[0] = (byte)115;\n byteArray0[1] = (byte)93;\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);\n javaCharStream0.ReInit((InputStream) byteArrayInputStream0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"s\", token0.toString());\n }", "public void testOneByte () throws IOException\n {\n Stream stream;\n\n stream = new Stream (new ByteArrayInputStream (new byte[] { (byte)0x42 }));\n assertTrue (\"erroneous character\", 0x42 == stream.read ());\n assertTrue (\"erroneous character\", -1 == stream.read ());\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n javaCharStream0.UpdateLineColumn('d');\n assertEquals(1, javaCharStream0.getBeginLine());\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n try { \n javaCharStream0.readChar();\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test(timeout = 4000)\n public void test158() throws Throwable {\n StringReader stringReader0 = new StringReader(\".0*yBK7wQ\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1997, 1997);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(1998, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 12, (-1783), 1289);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndColumn();\n assertEquals(12, javaCharStream0.getBeginLine());\n assertEquals((-1783), int0);\n }", "@Test(timeout = 4000)\n public void test073() throws Throwable {\n StringReader stringReader0 = new StringReader(\"anBz*^T>\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n stringReader0.read();\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test154() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Q!@aV0Ak~pvq\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(4, javaCharStream0.bufpos);\n assertEquals(7, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n StringReader stringReader0 = new StringReader(\"ej.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-1076), 115);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.readChar();\n javaCharStream0.readChar();\n try { \n javaCharStream0.FillBuff();\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test(timeout=100)\r\n\tpublic void testLongLines() {\r\n\t\tString message = \"Write-readable-software\";\r\n\t\tint length = message.length();\r\n\t\tRandom rand = new Random();\r\n\t\tint count = 100;\r\n\t\tString [] r1 = new String[count];\r\n\t\tfor(int k=0; k<count; k++) r1[k] = message.substring(rand.nextInt(length)+1);\r\n\t\tcount = 200;\r\n\t\tString [] r2 = new String[count];\r\n\t\tmessage = \"abcdefghij\";\r\n\t\tr2[0] = Character.toString(message.charAt(0));\r\n\t\tfor(int k=1; k<count; k++) r2[k] = r2[k-1]+message.charAt(k%10);\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\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\r\n\t\tassertFalse( csv.hasNext() );\r\n\t}", "@Test(timeout = 4000)\n public void test092() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s15IMZA$C/uXdG]R\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0, 0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(13, javaCharStream0.bufpos);\n assertEquals(\"uXdG\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-619), 1185, 4086);\n javaCharStream0.readChar();\n javaCharStream0.ExpandBuff(true);\n int int0 = javaCharStream0.getEndLine();\n assertEquals(4086, javaCharStream0.bufpos);\n assertEquals(0, int0);\n }", "@Test\n void test7BitEncoding() throws Exception {\n ascii_cp1251_lcid1049.guess7BitEncoding();\n ascii_cp1251_lcid1049.setReturnNullOnMissingChunk(true);\n ascii_utf_8_cp1252_lcid1031.guess7BitEncoding();\n ascii_utf_8_cp1252_lcid1031.setReturnNullOnMissingChunk(true);\n ascii_utf_8_cp1252_lcid1031_html.guess7BitEncoding();\n ascii_utf_8_cp1252_lcid1031_html.setReturnNullOnMissingChunk(true);\n htmlbodybinary_cp1251.guess7BitEncoding();\n htmlbodybinary_cp1251.setReturnNullOnMissingChunk(true);\n htmlbodybinary_utf_8.guess7BitEncoding();\n htmlbodybinary_utf_8.setReturnNullOnMissingChunk(true);\n\n assertEquals(\"Subject автоматически Subject\", ascii_cp1251_lcid1049.getSubject());\n assertEquals(\"Body автоматически Body\", ascii_cp1251_lcid1049.getTextBody());\n assertEquals(\"<!DOCTYPE html><html><meta charset=\\\\\\\"windows-1251\\\\\\\"><body>HTML автоматически</body></html>\", ascii_cp1251_lcid1049.getHtmlBody());\n\n assertEquals(\"Subject öäü Subject\", ascii_utf_8_cp1252_lcid1031.getSubject());\n assertEquals(\"Body öäü Body\", ascii_utf_8_cp1252_lcid1031.getTextBody());\n assertNull(ascii_utf_8_cp1252_lcid1031.getHtmlBody());\n\n assertEquals(\"Subject öäü Subject\", ascii_utf_8_cp1252_lcid1031_html.getSubject());\n assertEquals(\"Body öäü Body\", ascii_utf_8_cp1252_lcid1031_html.getTextBody());\n assertEquals(\"<!DOCTYPE html><html><meta charset=\\\\\\\"utf-8\\\\\\\"><body>HTML öäü</body></html>\", ascii_utf_8_cp1252_lcid1031_html.getHtmlBody());\n\n assertEquals(\"Subject öäü Subject\", htmlbodybinary_cp1251.getSubject());\n assertNull(htmlbodybinary_cp1251.getTextBody());\n assertEquals(\"<!DOCTYPE html><html><meta charset=\\\\\\\"utf-8\\\\\\\"><body>HTML автоматически</body></html>\", htmlbodybinary_cp1251.getHtmlBody());\n\n assertEquals(\"Subject öäü Subject\", htmlbodybinary_utf_8.getSubject());\n assertNull(htmlbodybinary_utf_8.getTextBody());\n assertEquals(\"<!DOCTYPE html><html><meta charset=\\\\\\\"utf-8\\\\\\\"><body>HTML öäü</body></html>\", htmlbodybinary_utf_8.getHtmlBody());\n }", "public void testInvalidTextValueWithBrokenUTF8() throws Exception\n {\n final byte[] input = readResource(\"/data/clusterfuzz-cbor-35979.cbor\");\n try (JsonParser p = MAPPER.createParser(input)) {\n assertToken(JsonToken.VALUE_STRING, p.nextToken());\n p.getText();\n fail(\"Should not pass\");\n } catch (StreamReadException e) {\n verifyException(e, \"Truncated UTF-8 character in Short Unicode Name (36 bytes)\");\n }\n\n }", "private void readEncoding(BufferedReader reader) throws IOException {\n String encoding = reader.readLine();\r\n if ( ! AbstractUtf8Message.UTF8_ENCODING_HEADER_STRING.equals(encoding)) {\r\n throw new IOException(\"Expected UTF-8 header when decoding UTF-8 message\");\r\n }\r\n }", "@Test(timeout = 4000)\n public void test129() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.getBeginLine();\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@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 }", "private static int[] internal16Readin(String name) {\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(FileUtils.getResourceInputStream(\"/luts/\" + name)));\n String strLine;\n\n int[] intArray = new int[65536];\n int counter = 0;\n while ((strLine = br.readLine()) != null) {\n\n String[] array = strLine.split(\" \");\n\n for (int i = 0; i < array.length; i++) {\n if (array[i].equals(\" \") || array[i].equals(\"\")) {\n\n } else {\n intArray[counter] = Integer.parseInt(array[i]);\n counter++;\n }\n }\n }\n br.close();\n return intArray;\n } catch (Exception e) {// Catch exception if any\n System.err.println(\"Error open internal color table \" + name);\n e.printStackTrace();\n return null;\n }\n }", "public void testIsFirstUtf8Byte() {\n checkIsFirstUtf8Byte(\"0\"); // First 2 bits: 00\n checkIsFirstUtf8Byte(\"A\"); // First 2 bits: 01\n \n checkIsFirstUtf8Byte(\"\\u00A2\"); // 2 bytes in UTF-8.\n checkIsFirstUtf8Byte(\"\\u20AC\"); // 3 bytes in UTF-8.\n checkIsFirstUtf8Byte(\"\\uD852\\uDF62\"); // 4 bytes in UTF-8. (surrogate pair)\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n StringReader stringReader0 = new StringReader(\"WA.W2e9@MV5G\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getColumn());\n }", "@Test\n public void testIncludeHeaderDelimited() throws Throwable {\n testIncludeHeaderDelimited(false);\n }" ]
[ "0.81872773", "0.79835695", "0.7393534", "0.6700329", "0.6059534", "0.6040685", "0.57823837", "0.57658327", "0.5751133", "0.571993", "0.5656801", "0.56206506", "0.56023806", "0.5602063", "0.5592709", "0.5586487", "0.55608135", "0.55385214", "0.5512904", "0.54866874", "0.5484441", "0.5479437", "0.54654825", "0.5458195", "0.54556274", "0.5454692", "0.543465", "0.54269713", "0.53619665", "0.5347779", "0.5335784", "0.5318195", "0.5315512", "0.5306676", "0.5301395", "0.5298477", "0.52970946", "0.529032", "0.5288685", "0.5286849", "0.5281295", "0.5273872", "0.5260751", "0.5243755", "0.52436155", "0.52384853", "0.52374446", "0.52363294", "0.5221214", "0.521705", "0.5199532", "0.5197637", "0.5196031", "0.51912063", "0.5187575", "0.5178881", "0.5176328", "0.51617396", "0.5149205", "0.5142189", "0.51379657", "0.5135508", "0.51297057", "0.5126202", "0.5118653", "0.5115329", "0.5111122", "0.5106872", "0.5104436", "0.5086555", "0.50835496", "0.50825924", "0.50669044", "0.50668484", "0.50657344", "0.50645065", "0.5053618", "0.50527185", "0.505201", "0.50515866", "0.5051198", "0.5047612", "0.5043855", "0.5039155", "0.5037699", "0.5026123", "0.50251716", "0.5021919", "0.5020532", "0.50188947", "0.50147516", "0.50131327", "0.50131196", "0.5011772", "0.5010387", "0.50059146", "0.5004089", "0.5002105", "0.49834204", "0.49824563" ]
0.8651955
0
Test the supercsv read API processing UTF16LE file.
@Test public void testUTF16LE() throws IOException { BufferedReader reader = new BufferedReader( new InputStreamReader(new FileInputStream(UTF16LE_FILE), "UTF-16le") ); ReadTestCSVFile(reader); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testUTF16() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16LE_FILE), \"UTF-16\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\n\t\tBufferedReader reader1 = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16BE_FILE), \"UTF-16\")\n\t\t);\n\t\tReadTestCSVFile(reader1);\n\t}", "@Test\n\tpublic void testUTF16BE() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16BE_FILE), \"UTF-16be\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "@Test\n\tpublic void testUTF8() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF8_FILE), \"UTF-8\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "@Test\n\tpublic void testUTF8WithoutBom() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF8_NO_BOM_FILE), \"UTF-8\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "int readS16LE()\n throws IOException, EOFException;", "int readS16LE(String name)\n throws IOException, EOFException;", "@Test\n\tpublic void test_ReadUtf8String() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, -107, -61, -65, 0);\n\t\tassertEquals(\"\\uaa55\\u00ff\", br.readUtf8String(0));\n\t}", "@Test\n\tpublic void test_ReadNextUtf8String() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, -107, -61, -65, 0, -22, -87, -107, 0);\n\t\tassertEquals(\"\\uaa55\\u00ff\", br.readNextUtf8String());\n\t\tassertEquals(\"\\uaa55\", br.readNextUtf8String());\n\t}", "int readS16BE(String name)\n throws IOException, EOFException;", "int readS16BE()\n throws IOException, EOFException;", "@Test\r\n\tpublic void readCsvTest() throws IOException {\r\n\t\t\tfail(\"Not yet implemented\");\r\n\t}", "@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 }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n StringReader stringReader0 = new StringReader(\"H+\\\"RE_]I95BDm\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.ReadByte();\n assertEquals('H', char0);\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 }", "public int readFromFile(int index) throws IOException {\n FileReader file = (FileReader) filePtrs.get(index);\n int i16 = file.read(); // UTF-16 as int\n char c16 = (char)i16; // UTF-16\n if (Character.isHighSurrogate(c16))\n {\n int low_i16 = file.read(); // low surrogate UTF-16 as int\n char low_c16 = (char)low_i16;\n return Character.toCodePoint(c16, low_c16);\n }\n return i16;\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndLine();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals((-2818), int0);\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(416);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn(416, 416);\n assertEquals(3680, javaCharStream0.bufpos);\n }", "private static int[] internal16Readin(String name) {\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(FileUtils.getResourceInputStream(\"/luts/\" + name)));\n String strLine;\n\n int[] intArray = new int[65536];\n int counter = 0;\n while ((strLine = br.readLine()) != null) {\n\n String[] array = strLine.split(\" \");\n\n for (int i = 0; i < array.length; i++) {\n if (array[i].equals(\" \") || array[i].equals(\"\")) {\n\n } else {\n intArray[counter] = Integer.parseInt(array[i]);\n counter++;\n }\n }\n }\n br.close();\n return intArray;\n } catch (Exception e) {// Catch exception if any\n System.err.println(\"Error open internal color table \" + name);\n e.printStackTrace();\n return null;\n }\n }", "@Test\n\tpublic void test_ReadUtf8String_bad_data() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, 'A', 0);\n\t\tassertEquals(\"\\ufffdA\" /* unicode replacement char, 'A'*/, br.readUtf8String(0));\n\t}", "public abstract char read_wchar();", "@Test\n void testRead() throws IOException, URISyntaxException {\n final String[] expectedResult = {\n \"-199\t\\\"hello\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"2017/06/20\\\"\t0.0\t1\t\\\"2\\\"\t\\\"823478788778713\\\"\",\n \"2\t\\\"Sdfwer\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"1100/06/20\\\"\tInf\t2\t\\\"NaN\\\"\t\\\",1,2,3\\\"\",\n \"0\t\\\"cjlajfo.\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"3000/06/20\\\"\t-Inf\t3\t\\\"inf\\\"\t\\\"\\\\casdf\\\"\",\n \"-1\t\\\"Mywer\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"06-20-2011\\\"\t3.141592653\t4\t\\\"4.8\\\"\t\\\"  \\\\\\\" \\\"\",\n \"266128\t\\\"Sf\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"06-20-1917\\\"\t0\t5\t\\\"Inf+11\\\"\t\\\"\\\"\",\n \"0\t\\\"null\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"03/03/1817\\\"\t123\t6.000001\t\\\"11-2\\\"\t\\\"\\\\\\\"adf\\\\0\\\\na\\\\td\\\\nsf\\\\\\\"\\\"\",\n \"-2389\t\\\"\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:72\t2017-06-20\t\\\"2017-03-12\\\"\tNaN\t2\t\\\"nap\\\"\t\\\"💩⌛👩🏻■\\\"\"};\n BufferedReader result;\n File file = getFile(\"csv/ingest/IngestCSV.csv\");\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream stream = new BufferedInputStream(fileInputStream)) {\n CSVFileReader instance = createInstance();\n File outFile = instance.read(Tuple.of(stream, file), null).getTabDelimitedFile();\n result = new BufferedReader(new FileReader(outFile));\n }\n\n assertThat(result).isNotNull();\n assertThat(result.lines().collect(Collectors.toList())).isEqualTo(Arrays.asList(expectedResult));\n }", "static private native int imeToUTF16(long handle, int runes);", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~f'\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndColumn());\n }", "@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 }", "@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 public void testunicode32() {\n assertEquals(\"\\uD834\\uDD1E\", JsonReader.read(\"\\\"\\\\uD834\\\\uDD1E\\\"\"));\n }", "@Test\n public void testUnicodeAt4KB() {\n File f = getFile(\"more_than_4KB.txt\");\n assertNotNull(f);\n FileObject fo = FileUtil.toFileObject(f);\n assertNotNull(fo);\n BufferedCharSequence chars = new BufferedCharSequence(fo, cs_UTF_8.newDecoder(), f.length());\n assertEquals('0', chars.charAt(0));\n assertEquals('1', chars.charAt(1));\n int xPos;\n if (chars.charAt(4094) == '\\r' && chars.charAt(4095) == '\\n') {\n // windows line-endings, can be caused by hg extension win32text\n xPos = 4098;\n } else {\n // unix or mac line-endings\n xPos = 4097;\n }\n assertEquals('X', chars.charAt(xPos));\n assertEquals('Y', chars.charAt(xPos+1));\n }", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.FillBuff();\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~\\\"Py BTn?,~tnf\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 15, 15);\n javaCharStream0.bufpos = (-1396);\n javaCharStream0.backup((-1396));\n javaCharStream0.adjustBeginLineColumn((-1396), 76);\n assertEquals(0, javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Cf&9B{tMCu\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(4, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test144() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s15IMZA$C/uXdG]R\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.readChar();\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0, 0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(8, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(10, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n StringReader stringReader0 = new StringReader(\"1dIHR}';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.ReadByte();\n assertEquals('1', char0);\n }", "public abstract void read_wchar_array(char[] value, int offset, int\nlength);", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Q!@aV0Ak~pvq\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[4];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(2, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(3, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n StringReader stringReader0 = new StringReader(\"c3UZts4z!|a\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 21, 47);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(23, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Z[^o)j]BO6Ns,$`3$e\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1, 0);\n char char0 = javaCharStream0.readChar();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndLine());\n assertEquals('Z', char0);\n }", "@Test(timeout = 4000)\n public void test159() throws Throwable {\n StringReader stringReader0 = new StringReader(\"x/C9mX)\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-2632), (-2632));\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals((-2631), javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[2];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(9, javaCharStream0.bufpos);\n assertEquals(10, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test063() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null);\n javaCharStream0.maxNextCharInd = 2;\n javaCharStream0.prevCharIsCR = true;\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('\\u0000', char0);\n }", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n StringReader stringReader0 = new StringReader(\"=<D!T!tLp\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 20, 0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(3, javaCharStream0.getEndColumn());\n }", "private static String loadConvert(String str) {\n\t\tint off = 0;\n\t\tint len = str.length();\n\t\tchar[] in = str.toCharArray();\n\t\tchar[] convtBuf = new char[1024];\n\t\tif (convtBuf.length < len) {\n\t\t\tint newLen = len * 2;\n\t\t\tif (newLen < 0) {\n\t\t\t\tnewLen = Integer.MAX_VALUE;\n\t\t\t}\n\t\t\tconvtBuf = new char[newLen];\n\t\t}\n\t\tchar aChar;\n\t\tchar[] out = convtBuf;\n\t\tint outLen = 0;\n\t\tint end = off + len;\n\n\t\twhile (off < end) {\n\t\t\taChar = in[off++];\n\t\t\tif (aChar == '\\\\') {\n\t\t\t\taChar = in[off++];\n\t\t\t\tif (aChar == 'u') {\n\t\t\t\t\t// Read the xxxx\n\t\t\t\t\tint value = 0;\n\t\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\t\taChar = in[off++];\n\t\t\t\t\t\tswitch (aChar) {\n\t\t\t\t\t\tcase '0':\n\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\tcase '2':\n\t\t\t\t\t\tcase '3':\n\t\t\t\t\t\tcase '4':\n\t\t\t\t\t\tcase '5':\n\t\t\t\t\t\tcase '6':\n\t\t\t\t\t\tcase '7':\n\t\t\t\t\t\tcase '8':\n\t\t\t\t\t\tcase '9':\n\t\t\t\t\t\t\tvalue = (value << 4) + aChar - '0';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\tcase 'e':\n\t\t\t\t\t\tcase 'f':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'a';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'A':\n\t\t\t\t\t\tcase 'B':\n\t\t\t\t\t\tcase 'C':\n\t\t\t\t\t\tcase 'D':\n\t\t\t\t\t\tcase 'E':\n\t\t\t\t\t\tcase 'F':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'A';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(\"Malformed \\\\uxxxx encoding.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tout[outLen++] = (char) value;\n\t\t\t\t} else {\n\t\t\t\t\tif (aChar == 't')\n\t\t\t\t\t\taChar = '\\t';\n\t\t\t\t\telse if (aChar == 'r')\n\t\t\t\t\t\taChar = '\\r';\n\t\t\t\t\telse if (aChar == 'n')\n\t\t\t\t\t\taChar = '\\n';\n\t\t\t\t\telse if (aChar == 'f')\n\t\t\t\t\t\taChar = '\\f';\n\t\t\t\t\tout[outLen++] = aChar;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tout[outLen++] = aChar;\n\t\t\t}\n\t\t}\n\t\treturn new String(out, 0, outLen);\n\t}", "@Test(timeout = 4000)\n public void test018() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{H}R}D';ZHm5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getLine();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, int0);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-619), 1185, 4086);\n javaCharStream0.readChar();\n javaCharStream0.ExpandBuff(true);\n int int0 = javaCharStream0.getEndLine();\n assertEquals(4086, javaCharStream0.bufpos);\n assertEquals(0, int0);\n }", "@Test(timeout = 4000)\n public void test137() throws Throwable {\n StringReader stringReader0 = new StringReader(\"9F83|i5vU 84Kd\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 887, 887);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(3, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(890, javaCharStream0.getColumn());\n }", "@Test(expected=IndexOutOfBoundsException.class)\n public void testCharAt_File() {\n System.out.println(\"charAt_File\");\n int index = 0; \n Charset cs = Charset.forName(UTF_8);\n InputStream stream = getInputStream(TypeOfStream.FILE, TypeOfContent.BYTE_0, cs);\n @SuppressWarnings(\"deprecation\")\n BufferedCharSequence instance = new BufferedCharSequence(stream, cs.newDecoder(), 0);\n instance.charAt(index);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getColumn();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(1, int0);\n }", "@Test\n @JUnitTemporaryDatabase // Relies on specific IDs so we need a fresh database\n public void testImportUtf8() throws Exception {\n createAndFlushServiceTypes();\n createAndFlushCategories();\n \n //Initialize the database\n ModelImporter mi = m_importer;\n String specFile = \"/utf-8.xml\";\n mi.importModelFromResource(new ClassPathResource(specFile));\n \n assertEquals(1, mi.getNodeDao().countAll());\n // \\u00f1 is unicode for n~ \n assertEquals(\"\\u00f1ode2\", mi.getNodeDao().get(1).getLabel());\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Gnzd86`;Gs=\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 14, 4094, 4075);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndColumn();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(4094, int0);\n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n StringReader stringReader0 = new StringReader(\"byte\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 19, 21, 19);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(21, javaCharStream0.getBeginColumn());\n assertEquals(17, token0.kind);\n }", "@Test(timeout=100)\r\n\tpublic void testLongLines() {\r\n\t\tString message = \"Write-readable-software\";\r\n\t\tint length = message.length();\r\n\t\tRandom rand = new Random();\r\n\t\tint count = 100;\r\n\t\tString [] r1 = new String[count];\r\n\t\tfor(int k=0; k<count; k++) r1[k] = message.substring(rand.nextInt(length)+1);\r\n\t\tcount = 200;\r\n\t\tString [] r2 = new String[count];\r\n\t\tmessage = \"abcdefghij\";\r\n\t\tr2[0] = Character.toString(message.charAt(0));\r\n\t\tfor(int k=1; k<count; k++) r2[k] = r2[k-1]+message.charAt(k%10);\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\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\r\n\t\tassertFalse( csv.hasNext() );\r\n\t}", "@Test(timeout = 4000)\n public void test016() throws Throwable {\n StringReader stringReader0 = new StringReader(\"7o9?>+o`*qi$\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('7', char0);\n }", "@Test(timeout = 4000)\n public void test019() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 91, 91);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn((-366), 1);\n int int0 = javaCharStream0.getLine();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals((-366), int0);\n }", "private int readFdocaOneByte() {\n checkForSplitRowAndComplete(1);\n //return dataBuffer_[position_++] & 0xff;\n return dataBuffer_.readUnsignedByte();\n }", "@Test(timeout = 4000)\n public void test115() throws Throwable {\n StringReader stringReader0 = new StringReader(\"V&H#2E6u%Ql&dI\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 2, 2);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"V\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n StringReader stringReader0 = new StringReader(\"oh\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 89, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(2, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+Y6{Tr P>D9wb\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 44, 21, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(22, javaCharStream0.getBeginColumn());\n assertEquals(74, token0.kind);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Gnzd86`;Gs=\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 14, 14, 14);\n javaCharStream0.nextCharInd = 14;\n char char0 = javaCharStream0.BeginToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('\\u0000', char0);\n }", "@Test(timeout = 4000)\n public void test126() throws Throwable {\n StringReader stringReader0 = new StringReader(\"9F}n S'~C\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(74, token0.kind);\n assertEquals(\"F\", token0.toString());\n }", "@Test\n void testBrokenCSV() throws IOException {\n try {\n createInstance().read(null, null);\n fail(\"IOException not thrown on null csv\");\n } catch (NullPointerException ex) {\n assertThat(ex.getMessage()).isNull();\n } catch (IngestException ex) {\n assertThat(ex.getErrorKey()).isEqualTo(IngestError.UNKNOWN_ERROR);\n }\n File file = getFile(\"csv/ingest/BrokenCSV.csv\");\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream stream = new BufferedInputStream(fileInputStream)) {\n createInstance().read(Tuple.of(stream, file), null);\n fail(\"IOException was not thrown when collumns do not align.\");\n } catch (IngestException ex) {\n assertThat(ex.getErrorKey()).isEqualTo(IngestError.CSV_RECORD_MISMATCH);\n }\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n StringReader stringReader0 = new StringReader(\"fA.W2e9@MV5G\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(2, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 12, (-1783), 1289);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndColumn();\n assertEquals(12, javaCharStream0.getBeginLine());\n assertEquals((-1783), int0);\n }", "public static final String readSzUTF16LEString(IRandomAccess ra) throws IOException {\n byte[] buff = new byte[512];\n int len = 0;\n while (true) {\n byte b1 = (byte)ra.read();\n if (b1 == -1) {\n throw new EOFException(\"ERROR_EOF\");\n }\n byte b2 = (byte)ra.read();\n if (b1 == -1) {\n throw new EOFException(\"ERROR_EOF\");\n }\n\n if (b1 == 0 && b2 == 0) {\n break; // Reached the null!\n } else if (len < buff.length) {\n buff[len++] = b1;\n buff[len++] = b2;\n } else {\n byte[] buff2 = new byte[buff.length + 512];\n for (int i = 0; i < buff.length; i++) {\n buff2[i] = buff[i];\n }\n buff = buff2;\n buff[len++] = b1;\n buff[len++] = b2;\n }\n }\n return getSzUTF16LEString(buff, 0, len);\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals((-2818), int0);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n byte[] byteArray0 = new byte[2];\n byteArray0[0] = (byte)48;\n byteArray0[1] = (byte)48;\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);\n JavaCharStream javaCharStream0 = new JavaCharStream(byteArrayInputStream0, 102, (byte)84, (byte)48);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(85, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Q|ni.,qQXS\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 10, 754);\n javaCharStream0.adjustBeginLineColumn(754, 59);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals(59, javaCharStream0.getBeginColumn());\n assertEquals(755, int0);\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n StringReader stringReader0 = new StringReader(\"tU9~\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n StringReader stringReader0 = new StringReader(\"...\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 62, 62);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(62, javaCharStream0.getLine());\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n StringReader stringReader0 = new StringReader(\"ej.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-1076), 115);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }", "@Test(timeout = 4000)\n public void test158() throws Throwable {\n StringReader stringReader0 = new StringReader(\".0*yBK7wQ\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1997, 1997);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(1998, javaCharStream0.getEndColumn());\n }", "@Test(timeout=100)\r\n\tpublic void testUnquoted() {\r\n\t\tString [] r1 = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"A\",\"Bb\",\"C\",\"Dd\",\"5555\",\"six\",\"7-11\",\"8\",\"Nines\",\"10!!!\"};\r\n\t\tString [] r3 = {\"a\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\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}", "public void ach_doc_type_csv_test () {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.readChar();\n javaCharStream0.readChar();\n try { \n javaCharStream0.FillBuff();\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n StringReader stringReader0 = new StringReader(\"kE4X 9\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-1), 66, 1279);\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('k', char0);\n }", "@Test\n public void testOutputDelimitedStream() throws Throwable {\n testOutputDelimited(true);\n }", "public String readUTF() throws IOException;", "@Test(timeout = 4000)\n public void test123() throws Throwable {\n StringReader stringReader0 = new StringReader(\"[KXX]J]NmN+<TJ,w1_\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 2897, 2897);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(2898, javaCharStream0.getBeginColumn());\n assertEquals(74, token0.kind);\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n StringReader stringReader0 = new StringReader(\"short\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 66, 66);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(66, javaCharStream0.getBeginColumn());\n assertEquals(\"short\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n StringReader stringReader0 = new StringReader(\"_ofi`~l69>EJdF\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1874, 1874);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(1877, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[6];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(5, javaCharStream0.bufpos);\n assertEquals(6, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test073() throws Throwable {\n StringReader stringReader0 = new StringReader(\"anBz*^T>\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n stringReader0.read();\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test134() throws Throwable {\n FileDescriptor fileDescriptor0 = new FileDescriptor();\n MockFileInputStream mockFileInputStream0 = new MockFileInputStream(fileDescriptor0);\n StringReader stringReader0 = new StringReader(\"qC2NV{I?oox x04%Fm\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.ReInit((InputStream) mockFileInputStream0);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\\\"for\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 114, (-473));\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[1];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals((-471), javaCharStream0.getColumn());\n }", "public abstract String read_wstring();", "@Test(timeout = 4000)\n public void test154() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Q!@aV0Ak~pvq\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(4, javaCharStream0.bufpos);\n assertEquals(7, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test156() throws Throwable {\n StringReader stringReader0 = new StringReader(\"w\\\"[\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-3472), 1634);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"w\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n StringReader stringReader0 = new StringReader(\"WA.W2e9@MV5G\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n javaCharStream0.adjustBeginLineColumn(122, 122);\n int int0 = javaCharStream0.getBeginColumn();\n assertEquals(122, int0);\n }", "private int readFdocaTwoByteLength() {\n\n checkForSplitRowAndComplete(2);\n return dataBuffer_.readShort();\n// return\n// ((dataBuffer_[position_++] & 0xff) << 8) +\n// ((dataBuffer_[position_++] & 0xff) << 0);\n }", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.readChar();\n javaCharStream0.backup(1);\n javaCharStream0.readChar();\n javaCharStream0.backup(1);\n char char0 = javaCharStream0.BeginToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals('%', char0);\n }", "@Test(timeout = 4000)\n public void test010() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 754, 65, 0);\n javaCharStream0.backup((-1));\n try { \n javaCharStream0.readChar();\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n StringReader stringReader0 = new StringReader(\"oh\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 89, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[1];\n stringReader0.read(charArray0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(74, token0.kind);\n assertEquals(\"h\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n StringReader stringReader0 = new StringReader(\"XlJO@=TH|\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 124, 1);\n char[] charArray0 = new char[6];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(2, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n javaCharStream0.UpdateLineColumn('d');\n assertEquals(1, javaCharStream0.getBeginLine());\n }", "@Test(timeout = 4000)\n public void test132() throws Throwable {\n StringReader stringReader0 = new StringReader(\"??S,\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 28, 21, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(91, token0.kind);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n StringReader stringReader0 = new StringReader(\"c3UZts4z!|a\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 21, 47);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(9, javaCharStream0.bufpos);\n assertEquals(30, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test064() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 3171, 3171, 3171);\n javaCharStream0.backup(8);\n javaCharStream0.BeginToken();\n javaCharStream0.AdjustBuffSize();\n javaCharStream0.AdjustBuffSize();\n assertEquals(8, javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 6, 1, 6);\n javaCharStream0.backup(4073);\n // Undeclared exception!\n try { \n javaCharStream0.readChar();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -4067\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n try { \n javaCharStream0.readChar();\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n StringReader stringReader0 = new StringReader(\"WA.W2e9@MV5G\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[8];\n stringReader0.read(charArray0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(\"MV5G\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n StringReader stringReader0 = new StringReader(\"elg6*[%|8BECpLep_\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }" ]
[ "0.8488988", "0.8400491", "0.72888464", "0.6251874", "0.6156932", "0.60510933", "0.592991", "0.588537", "0.5772399", "0.57033974", "0.56902695", "0.56685996", "0.5647584", "0.56336606", "0.55488384", "0.55462795", "0.55442595", "0.5533076", "0.5515528", "0.550628", "0.54989505", "0.5492148", "0.5485673", "0.545695", "0.5447059", "0.5445629", "0.54352134", "0.5422249", "0.5412999", "0.5397168", "0.5396951", "0.5375347", "0.5374399", "0.53686714", "0.53661627", "0.53631836", "0.5361662", "0.53408384", "0.5338681", "0.53273064", "0.5321848", "0.5314838", "0.52964604", "0.5283121", "0.528097", "0.5272784", "0.526041", "0.52496207", "0.52437186", "0.5236247", "0.5236196", "0.5231118", "0.52299774", "0.5228523", "0.5227275", "0.5221938", "0.5210853", "0.5204984", "0.51945764", "0.51929224", "0.51894677", "0.51854265", "0.5161073", "0.51582277", "0.51568115", "0.51490724", "0.51439756", "0.51352364", "0.51107246", "0.5110123", "0.5109953", "0.51040703", "0.5094051", "0.5092868", "0.50924826", "0.5088414", "0.5085605", "0.50824547", "0.50816053", "0.50745493", "0.50706017", "0.50611484", "0.50560755", "0.5055138", "0.50528556", "0.5050187", "0.5047136", "0.50389946", "0.50374687", "0.5031762", "0.5024427", "0.5019258", "0.49988407", "0.4995914", "0.49912855", "0.49910283", "0.49900937", "0.49863985", "0.49863222", "0.498133" ]
0.8608595
0
Test the supercsv read API processing UTF16 files.
@Test public void testUTF16() throws IOException { BufferedReader reader = new BufferedReader( new InputStreamReader(new FileInputStream(UTF16LE_FILE), "UTF-16") ); ReadTestCSVFile(reader); BufferedReader reader1 = new BufferedReader( new InputStreamReader(new FileInputStream(UTF16BE_FILE), "UTF-16") ); ReadTestCSVFile(reader1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testUTF16BE() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16BE_FILE), \"UTF-16be\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "@Test\n\tpublic void testUTF16LE() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16LE_FILE), \"UTF-16le\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "@Test\n\tpublic void testUTF8() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF8_FILE), \"UTF-8\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "@Test\n\tpublic void testUTF8WithoutBom() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF8_NO_BOM_FILE), \"UTF-8\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "@Test\n\tpublic void test_ReadUtf8String() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, -107, -61, -65, 0);\n\t\tassertEquals(\"\\uaa55\\u00ff\", br.readUtf8String(0));\n\t}", "@Test\r\n\tpublic void readCsvTest() throws IOException {\r\n\t\t\tfail(\"Not yet implemented\");\r\n\t}", "@Test\n\tpublic void test_ReadNextUtf8String() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, -107, -61, -65, 0, -22, -87, -107, 0);\n\t\tassertEquals(\"\\uaa55\\u00ff\", br.readNextUtf8String());\n\t\tassertEquals(\"\\uaa55\", br.readNextUtf8String());\n\t}", "@Test\n void testRead() throws IOException, URISyntaxException {\n final String[] expectedResult = {\n \"-199\t\\\"hello\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"2017/06/20\\\"\t0.0\t1\t\\\"2\\\"\t\\\"823478788778713\\\"\",\n \"2\t\\\"Sdfwer\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"1100/06/20\\\"\tInf\t2\t\\\"NaN\\\"\t\\\",1,2,3\\\"\",\n \"0\t\\\"cjlajfo.\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"3000/06/20\\\"\t-Inf\t3\t\\\"inf\\\"\t\\\"\\\\casdf\\\"\",\n \"-1\t\\\"Mywer\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"06-20-2011\\\"\t3.141592653\t4\t\\\"4.8\\\"\t\\\"  \\\\\\\" \\\"\",\n \"266128\t\\\"Sf\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"06-20-1917\\\"\t0\t5\t\\\"Inf+11\\\"\t\\\"\\\"\",\n \"0\t\\\"null\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"03/03/1817\\\"\t123\t6.000001\t\\\"11-2\\\"\t\\\"\\\\\\\"adf\\\\0\\\\na\\\\td\\\\nsf\\\\\\\"\\\"\",\n \"-2389\t\\\"\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:72\t2017-06-20\t\\\"2017-03-12\\\"\tNaN\t2\t\\\"nap\\\"\t\\\"💩⌛👩🏻■\\\"\"};\n BufferedReader result;\n File file = getFile(\"csv/ingest/IngestCSV.csv\");\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream stream = new BufferedInputStream(fileInputStream)) {\n CSVFileReader instance = createInstance();\n File outFile = instance.read(Tuple.of(stream, file), null).getTabDelimitedFile();\n result = new BufferedReader(new FileReader(outFile));\n }\n\n assertThat(result).isNotNull();\n assertThat(result.lines().collect(Collectors.toList())).isEqualTo(Arrays.asList(expectedResult));\n }", "@Test(expected=IndexOutOfBoundsException.class)\n public void testCharAt_File() {\n System.out.println(\"charAt_File\");\n int index = 0; \n Charset cs = Charset.forName(UTF_8);\n InputStream stream = getInputStream(TypeOfStream.FILE, TypeOfContent.BYTE_0, cs);\n @SuppressWarnings(\"deprecation\")\n BufferedCharSequence instance = new BufferedCharSequence(stream, cs.newDecoder(), 0);\n instance.charAt(index);\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 }", "@Test\n public void testUnicodeAt4KB() {\n File f = getFile(\"more_than_4KB.txt\");\n assertNotNull(f);\n FileObject fo = FileUtil.toFileObject(f);\n assertNotNull(fo);\n BufferedCharSequence chars = new BufferedCharSequence(fo, cs_UTF_8.newDecoder(), f.length());\n assertEquals('0', chars.charAt(0));\n assertEquals('1', chars.charAt(1));\n int xPos;\n if (chars.charAt(4094) == '\\r' && chars.charAt(4095) == '\\n') {\n // windows line-endings, can be caused by hg extension win32text\n xPos = 4098;\n } else {\n // unix or mac line-endings\n xPos = 4097;\n }\n assertEquals('X', chars.charAt(xPos));\n assertEquals('Y', chars.charAt(xPos+1));\n }", "public int readFromFile(int index) throws IOException {\n FileReader file = (FileReader) filePtrs.get(index);\n int i16 = file.read(); // UTF-16 as int\n char c16 = (char)i16; // UTF-16\n if (Character.isHighSurrogate(c16))\n {\n int low_i16 = file.read(); // low surrogate UTF-16 as int\n char low_c16 = (char)low_i16;\n return Character.toCodePoint(c16, low_c16);\n }\n return i16;\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~f'\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndColumn());\n }", "@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 }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(416);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn(416, 416);\n assertEquals(3680, javaCharStream0.bufpos);\n }", "@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\n\tpublic void test_ReadUtf8String_bad_data() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, 'A', 0);\n\t\tassertEquals(\"\\ufffdA\" /* unicode replacement char, 'A'*/, br.readUtf8String(0));\n\t}", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n StringReader stringReader0 = new StringReader(\"H+\\\"RE_]I95BDm\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.ReadByte();\n assertEquals('H', char0);\n }", "@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 public void testunicode32() {\n assertEquals(\"\\uD834\\uDD1E\", JsonReader.read(\"\\\"\\\\uD834\\\\uDD1E\\\"\"));\n }", "@Test\n @JUnitTemporaryDatabase // Relies on specific IDs so we need a fresh database\n public void testImportUtf8() throws Exception {\n createAndFlushServiceTypes();\n createAndFlushCategories();\n \n //Initialize the database\n ModelImporter mi = m_importer;\n String specFile = \"/utf-8.xml\";\n mi.importModelFromResource(new ClassPathResource(specFile));\n \n assertEquals(1, mi.getNodeDao().countAll());\n // \\u00f1 is unicode for n~ \n assertEquals(\"\\u00f1ode2\", mi.getNodeDao().get(1).getLabel());\n }", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Cf&9B{tMCu\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(4, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Z[^o)j]BO6Ns,$`3$e\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1, 0);\n char char0 = javaCharStream0.readChar();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndLine());\n assertEquals('Z', char0);\n }", "int readS16LE()\n throws IOException, EOFException;", "public void ach_doc_type_csv_test () {\n\t\t\n\t}", "int readS16LE(String name)\n throws IOException, EOFException;", "@Test(timeout = 4000)\n public void test144() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s15IMZA$C/uXdG]R\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.readChar();\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0, 0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(8, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(10, javaCharStream0.getColumn());\n }", "@Test\r\n \tpublic void testFileEvents96_2() {\n \t\t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/CSVTest_96_2.txt\"); // issue 96\r\n \t\tassertNotNull(input);\r\n \t\r\n \t\t// Set the parameters\r\n \t\tParameters params = new Parameters();\r\n \t\tsetDefaults(params);\r\n \t\tparams.fieldDelimiter = \",\";\r\n \t\tparams.textQualifier = \"\\\"\";\r\n \t\tparams.sendColumnsMode = Parameters.SEND_COLUMNS_LISTED;\r\n \t\tparams.sourceColumns = \"1\";\r\n \t\tparams.targetColumns = \"2\";\r\n \t\tparams.targetLanguages = locFRCA.toString();\r\n \t\tparams.targetSourceRefs = \"1\";\r\n \t\tfilter.setParameters(params);\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\t\t\t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"src\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"trg\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"data\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source1\", \"\", \"target1\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data1\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source2\", \"\", \"target2\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data2\");\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}", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~\\\"Py BTn?,~tnf\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 15, 15);\n javaCharStream0.bufpos = (-1396);\n javaCharStream0.backup((-1396));\n javaCharStream0.adjustBeginLineColumn((-1396), 76);\n assertEquals(0, javaCharStream0.bufpos);\n }", "@Test(timeout=100)\r\n\tpublic void testUnquoted() {\r\n\t\tString [] r1 = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"A\",\"Bb\",\"C\",\"Dd\",\"5555\",\"six\",\"7-11\",\"8\",\"Nines\",\"10!!!\"};\r\n\t\tString [] r3 = {\"a\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\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}", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n StringReader stringReader0 = new StringReader(\"=<D!T!tLp\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 20, 0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(3, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[2];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(9, javaCharStream0.bufpos);\n assertEquals(10, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test159() throws Throwable {\n StringReader stringReader0 = new StringReader(\"x/C9mX)\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-2632), (-2632));\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals((-2631), javaCharStream0.getEndColumn());\n }", "@Test\n public void testIntializerProvidesTheRequestedCharsetIfItIsValid()\n throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, NoSuchFieldException\n {\n String goodCharsetName = \"UTF-16\";\n Charset goodCharset = Charset.forName(goodCharsetName);\n\n final DefaultCharset defaultCharsetInstance = setInternalDefaultCharset(goodCharsetName);\n final Charset charset = getCurrentCharsetFromDefaultCharsetInstance(defaultCharsetInstance);\n\n assertEquals(goodCharset.name(), charset.name());\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n StringReader stringReader0 = new StringReader(\"c3UZts4z!|a\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 21, 47);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(23, javaCharStream0.getColumn());\n }", "@Test\r\n \tpublic void testFileEvents96_3() {\n \t\t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/CSVTest_96_2.txt\"); // issue 96\r\n \t\tassertNotNull(input);\r\n \t\r\n \t\t// Set the parameters\r\n \t\tParameters params = new Parameters();\r\n \t\tsetDefaults(params);\r\n \t\tparams.fieldDelimiter = \",\";\r\n \t\tparams.textQualifier = \"\\\"\";\r\n \t\tparams.sendColumnsMode = Parameters.SEND_COLUMNS_LISTED;\r\n \t\tparams.sourceColumns = \"1\";\r\n \t\tparams.targetColumns = \"2\";\r\n \t\tparams.targetLanguages = \"\"; //locFRCA.toString();\r\n \t\tparams.targetSourceRefs = \"1\";\r\n \t\tfilter.setParameters(params);\r\n \t\t\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN, locFRCA));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\t\t\t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"src\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"trg\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"data\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source1\", \"\", \"target1\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data1\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"source2\", \"\", \"target2\", locFRCA, \"\");\r\n \t\ttestEvent(EventType.DOCUMENT_PART, \"\\\"[#$$self$]\\\",\\\"[#$$self$]\\\",data2\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\t\t\tfilter.close();\t\t\r\n \t}", "@Test(timeout = 4000)\n public void test063() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null);\n javaCharStream0.maxNextCharInd = 2;\n javaCharStream0.prevCharIsCR = true;\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('\\u0000', char0);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndLine();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals((-2818), int0);\n }", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.FillBuff();\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test\n void testBrokenCSV() throws IOException {\n try {\n createInstance().read(null, null);\n fail(\"IOException not thrown on null csv\");\n } catch (NullPointerException ex) {\n assertThat(ex.getMessage()).isNull();\n } catch (IngestException ex) {\n assertThat(ex.getErrorKey()).isEqualTo(IngestError.UNKNOWN_ERROR);\n }\n File file = getFile(\"csv/ingest/BrokenCSV.csv\");\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream stream = new BufferedInputStream(fileInputStream)) {\n createInstance().read(Tuple.of(stream, file), null);\n fail(\"IOException was not thrown when collumns do not align.\");\n } catch (IngestException ex) {\n assertThat(ex.getErrorKey()).isEqualTo(IngestError.CSV_RECORD_MISMATCH);\n }\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getColumn();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(1, int0);\n }", "@Test\n public void testOutputDelimitedStream() throws Throwable {\n testOutputDelimited(true);\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n StringReader stringReader0 = new StringReader(\"1dIHR}';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.ReadByte();\n assertEquals('1', char0);\n }", "int readS16BE(String name)\n throws IOException, EOFException;", "@Test\n\tpublic void testParseTagFile_Success() throws IOException \n\t{\n\t\tString expected = \"aus-capitals.csv|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\tassertEquals(expected, actual);\t\n\t}", "@Test(timeout = 4000)\n public void test018() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{H}R}D';ZHm5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getLine();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, int0);\n }", "@Test(timeout = 4000)\n public void test126() throws Throwable {\n StringReader stringReader0 = new StringReader(\"9F}n S'~C\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(74, token0.kind);\n assertEquals(\"F\", token0.toString());\n }", "public abstract char read_wchar();", "@Test(timeout = 4000)\n public void test016() throws Throwable {\n StringReader stringReader0 = new StringReader(\"7o9?>+o`*qi$\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('7', char0);\n }", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.readChar();\n javaCharStream0.backup(1);\n javaCharStream0.readChar();\n javaCharStream0.backup(1);\n char char0 = javaCharStream0.BeginToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals('%', char0);\n }", "@Test(timeout = 4000)\n public void test134() throws Throwable {\n FileDescriptor fileDescriptor0 = new FileDescriptor();\n MockFileInputStream mockFileInputStream0 = new MockFileInputStream(fileDescriptor0);\n StringReader stringReader0 = new StringReader(\"qC2NV{I?oox x04%Fm\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.ReInit((InputStream) mockFileInputStream0);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Q!@aV0Ak~pvq\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[4];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(2, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(3, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[6];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(5, javaCharStream0.bufpos);\n assertEquals(6, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test115() throws Throwable {\n StringReader stringReader0 = new StringReader(\"V&H#2E6u%Ql&dI\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 2, 2);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"V\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\\\"for\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 114, (-473));\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[1];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals((-471), javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n StringReader stringReader0 = new StringReader(\"oh\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 89, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(2, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n StringReader stringReader0 = new StringReader(\"kE4X 9\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-1), 66, 1279);\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('k', char0);\n }", "private static int[] internal16Readin(String name) {\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(FileUtils.getResourceInputStream(\"/luts/\" + name)));\n String strLine;\n\n int[] intArray = new int[65536];\n int counter = 0;\n while ((strLine = br.readLine()) != null) {\n\n String[] array = strLine.split(\" \");\n\n for (int i = 0; i < array.length; i++) {\n if (array[i].equals(\" \") || array[i].equals(\"\")) {\n\n } else {\n intArray[counter] = Integer.parseInt(array[i]);\n counter++;\n }\n }\n }\n br.close();\n return intArray;\n } catch (Exception e) {// Catch exception if any\n System.err.println(\"Error open internal color table \" + name);\n e.printStackTrace();\n return null;\n }\n }", "private static String loadConvert(String str) {\n\t\tint off = 0;\n\t\tint len = str.length();\n\t\tchar[] in = str.toCharArray();\n\t\tchar[] convtBuf = new char[1024];\n\t\tif (convtBuf.length < len) {\n\t\t\tint newLen = len * 2;\n\t\t\tif (newLen < 0) {\n\t\t\t\tnewLen = Integer.MAX_VALUE;\n\t\t\t}\n\t\t\tconvtBuf = new char[newLen];\n\t\t}\n\t\tchar aChar;\n\t\tchar[] out = convtBuf;\n\t\tint outLen = 0;\n\t\tint end = off + len;\n\n\t\twhile (off < end) {\n\t\t\taChar = in[off++];\n\t\t\tif (aChar == '\\\\') {\n\t\t\t\taChar = in[off++];\n\t\t\t\tif (aChar == 'u') {\n\t\t\t\t\t// Read the xxxx\n\t\t\t\t\tint value = 0;\n\t\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\t\taChar = in[off++];\n\t\t\t\t\t\tswitch (aChar) {\n\t\t\t\t\t\tcase '0':\n\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\tcase '2':\n\t\t\t\t\t\tcase '3':\n\t\t\t\t\t\tcase '4':\n\t\t\t\t\t\tcase '5':\n\t\t\t\t\t\tcase '6':\n\t\t\t\t\t\tcase '7':\n\t\t\t\t\t\tcase '8':\n\t\t\t\t\t\tcase '9':\n\t\t\t\t\t\t\tvalue = (value << 4) + aChar - '0';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\tcase 'e':\n\t\t\t\t\t\tcase 'f':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'a';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'A':\n\t\t\t\t\t\tcase 'B':\n\t\t\t\t\t\tcase 'C':\n\t\t\t\t\t\tcase 'D':\n\t\t\t\t\t\tcase 'E':\n\t\t\t\t\t\tcase 'F':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'A';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(\"Malformed \\\\uxxxx encoding.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tout[outLen++] = (char) value;\n\t\t\t\t} else {\n\t\t\t\t\tif (aChar == 't')\n\t\t\t\t\t\taChar = '\\t';\n\t\t\t\t\telse if (aChar == 'r')\n\t\t\t\t\t\taChar = '\\r';\n\t\t\t\t\telse if (aChar == 'n')\n\t\t\t\t\t\taChar = '\\n';\n\t\t\t\t\telse if (aChar == 'f')\n\t\t\t\t\t\taChar = '\\f';\n\t\t\t\t\tout[outLen++] = aChar;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tout[outLen++] = aChar;\n\t\t\t}\n\t\t}\n\t\treturn new String(out, 0, outLen);\n\t}", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Gnzd86`;Gs=\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 14, 14, 14);\n javaCharStream0.nextCharInd = 14;\n char char0 = javaCharStream0.BeginToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('\\u0000', char0);\n }", "@Test(timeout = 4000)\n public void test092() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s15IMZA$C/uXdG]R\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0, 0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(13, javaCharStream0.bufpos);\n assertEquals(\"uXdG\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n StringReader stringReader0 = new StringReader(\"tU9~\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Gnzd86`;Gs=\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 14, 4094, 4075);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndColumn();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(4094, int0);\n }", "@Test\n @Timeout(value = 5, timeUnit = TimeUnit.SECONDS)\n public void testCsvFileImportWithStringDates2(Vertx vertx, VertxTestContext testContext) {\n String pathCsvFile = AssertResponseGivenRequestHelper.class.getResource(\"/http/ingestion/csv/onemetric-3points/csvfiles/datapoints_string_date_utc_2.csv\").getFile();\n MultipartForm multipartForm = MultipartForm.create()\n .attribute(FORMAT_DATE, \"yyyy-D-m HH:mm:ss.SSS\")\n .attribute(TIMEZONE_DATE, \"UTC\")\n .textFileUpload(\"my_csv_file\", \"datapoints.csv\", pathCsvFile, \"text/csv\");\n List<RequestResponseConfI<?>> confs = Arrays.asList(\n new MultipartRequestResponseConf<JsonObject>(IMPORT_CSV_ENDPOINT,\n multipartForm,\n \"/http/ingestion/csv/onemetric-3points/testImport/expectedResponse.json\",\n CREATED, StatusMessages.CREATED,\n BodyCodec.jsonObject(), vertx),\n new RequestResponseConf<JsonArray>(HURENCE_DATASOURCE_GRAFANA_QUERY_API_ENDPOINT,\n \"/http/ingestion/csv/onemetric-3points/testQuery/request.json\",\n \"/http/ingestion/csv/onemetric-3points/testQuery/expectedResponse.json\",\n OK, StatusMessages.OK,\n BodyCodec.jsonArray(), vertx)\n );\n AssertResponseGivenRequestHelper\n .assertRequestGiveResponseFromFileAndFinishTest(webClient, testContext, confs);\n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n StringReader stringReader0 = new StringReader(\"byte\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 19, 21, 19);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(21, javaCharStream0.getBeginColumn());\n assertEquals(17, token0.kind);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n StringReader stringReader0 = new StringReader(\"fA.W2e9@MV5G\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(2, javaCharStream0.getColumn());\n }", "protected abstract void readFile();", "public static void verifyUtf8andTransactionsHelper() {\r\n\r\n //hibernate not ok yet, try next time starting up\r\n if (!GrouperDdlUtils.okToUseHibernate()) {\r\n return;\r\n }\r\n \r\n\r\n // Property configuration.detect.utf8.problems wasn't functioning as intended. Discourage its use\r\n if (!isBlank(GrouperConfig.retrieveConfig().propertyValueString(\"configuration.detect.utf8.problems\"))) {\r\n String error = \"Warning: grouper property configuration.detect.utf8.problems is no longer used. Instead, \"\r\n + \"set configuration.detect.utf8.file.problems and configuration.detect.utf8.db.problems\";\r\n LOG.warn(error);\r\n System.out.println(error);\r\n\r\n }\r\n\r\n boolean detectTransactionProblems = GrouperConfig.retrieveConfig().propertyValueBoolean(\"configuration.detect.db.transaction.problems\", true);\r\n\r\n boolean detectUtf8FileProblems = GrouperConfig.retrieveConfig().propertyValueBoolean(\"configuration.detect.utf8.file.problems\", true);\r\n\r\n boolean detectUtf8DbProblems = GrouperConfig.retrieveConfig().propertyValueBoolean(\"configuration.detect.utf8.db.problems\", true);\r\n\r\n boolean detectCaseSensitiveProblems = GrouperConfig.retrieveConfig().propertyValueBoolean(\"configuration.detect.db.caseSensitive.problems\", true);\r\n\r\n if (!detectUtf8FileProblems && !detectUtf8DbProblems && !detectTransactionProblems && !detectCaseSensitiveProblems) {\r\n return;\r\n }\r\n\r\n final String someUtfString = \"ٹٺٻټكلل\";\r\n\r\n /* Do the contents of grouper/conf/grouperUtf8.txt match the hard-coded string above? */\r\n if (detectUtf8FileProblems) {\r\n boolean utfProblems = false;\r\n String theStringFromFile = null;\r\n try {\r\n theStringFromFile = GrouperUtil.readResourceIntoString(\"grouperUtf8.txt\", false);\r\n } catch (Exception e) {\r\n String error = \"Error: Cannot read string from resource grouperUtf8.txt\";\r\n LOG.error(error, e);\r\n System.out.println(error);\r\n e.printStackTrace();\r\n utfProblems = true;\r\n }\r\n if (!utfProblems && !StringUtils.equals(theStringFromFile, someUtfString)) {\r\n String error = \"Error: Cannot properly read UTF-8 string from resource: grouperUtf8.txt: '\" + theStringFromFile\r\n + \"'\";\r\n\r\n String fileEncoding = System.getProperty(\"file.encoding\");\r\n if (fileEncoding == null || !fileEncoding.toLowerCase().startsWith(\"utf\")) {\r\n error += \", make sure you pass in the JVM switch -Dfile.encoding=utf-8 (currently is '\" \r\n + fileEncoding + \"')\";\r\n }\r\n\r\n fileEncoding = GrouperConfig.retrieveConfig().propertyValueString(\"grouper.default.fileEncoding\");\r\n if (fileEncoding == null || !fileEncoding.toLowerCase().startsWith(\"utf\")) {\r\n error += \", make sure you have grouper.default.fileEncoding set to UTF-8 in the grouper.properties (or leave it out since the default should be UTF-8)\";\r\n }\r\n\r\n LOG.error(error);\r\n System.out.println(error);\r\n utfProblems = true;\r\n }\r\n if (!utfProblems & GrouperConfig.retrieveConfig().propertyValueBoolean(\"configuration.display.utf8.success.message\", false)) {\r\n System.out.println(\"Grouper can read UTF-8 characters correctly from files\");\r\n }\r\n }\r\n\r\n /* Check for case-insensitive selects. The row in grouper_ddl is object_name='Grouper'. If it can be found\r\n * with object_name='GROUPER', the database is not case-sensitive */\r\n if (detectCaseSensitiveProblems) {\r\n Hib3GrouperDdl grouperDdl = GrouperDdlUtils.retrieveDdlByNameFromDatabase(\"GROUPER\");\r\n\r\n if (grouperDdl != null) {\r\n String error = \"Error: Queries in your database seem to be case insensitive, \"\r\n + \"this can be a problem for Grouper, if you are using MySQL you should use a bin collation\";\r\n LOG.error(error);\r\n System.out.println(error);\r\n } else if (GrouperConfig.retrieveConfig().propertyValueBoolean(\"configuration.display.db.caseSensitive.success.message\", false)) {\r\n System.out.println(\"Your database can handle case sensitive queries correctly\");\r\n }\r\n }\r\n\r\n /* Check for both DB transactions and UTF-8 support. Insert a new entry in grouper_ddl, with\r\n * object_name = grouperUtf_{random uuid} and history = {a UTF string}. When read back, is the history\r\n * still the original string? */\r\n if (!HibernateSession.isReadonlyMode()) {\r\n //this shouldnt exist, just make sure\r\n GrouperDdlUtils.deleteUtfDdls();\r\n\r\n final String id = GrouperUuid.getUuid();\r\n final String name = \"grouperUtf_\" + id;\r\n\r\n Hib3GrouperDdl grouperDdl = GrouperDdlUtils.storeAndReadUtfString(someUtfString, id, name);\r\n \r\n //lets check transactions\r\n if (detectTransactionProblems) {\r\n Hib3GrouperDdl grouperDdlNew = GrouperDdlUtils.retrieveDdlByIdFromDatabase(id);\r\n if (grouperDdlNew != null) {\r\n \r\n String error = \"Error: Your database does not seem to support transactions, Grouper requires a transactional database\";\r\n LOG.error(error);\r\n System.out.println(error);\r\n \r\n //delete it again\r\n GrouperDdlUtils.deleteDdlById(id);\r\n \r\n } else if (GrouperConfig.retrieveConfig().propertyValueBoolean(\"configuration.display.transaction.success.message\", false)) {\r\n System.out.println(\"Your database can handle transactions correctly\");\r\n }\r\n }\r\n\r\n //check reading a utf8 string\r\n if (detectUtf8DbProblems) {\r\n\r\n boolean utfProblems = false;\r\n\r\n if (grouperDdl == null) {\r\n String error = \"Error: Why is grouperDdl utf null???\";\r\n LOG.error(error);\r\n System.out.println(error);\r\n utfProblems = true;\r\n } else {\r\n if (!StringUtils.equals(grouperDdl.getHistory(), someUtfString)) {\r\n String error = \"Error: Cannot properly read UTF-8 string from database: '\" + grouperDdl.getHistory()\r\n + \"', make sure your database has UTF-8 tables and perhaps a hibernate.connection.url in grouper.hibernate.properties\";\r\n LOG.error(error);\r\n System.out.println(error);\r\n utfProblems = true;\r\n }\r\n }\r\n if (!utfProblems & GrouperConfig.retrieveConfig().propertyValueBoolean(\"configuration.display.utf8.success.message\", false)) {\r\n System.out.println(\"The grouper database can handle UTF-8 characters correctly\");\r\n }\r\n }\r\n }\r\n }", "@Test(timeout = 4000)\n public void test156() throws Throwable {\n StringReader stringReader0 = new StringReader(\"w\\\"[\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-3472), 1634);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"w\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test137() throws Throwable {\n StringReader stringReader0 = new StringReader(\"9F83|i5vU 84Kd\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 887, 887);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(3, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(890, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Z[^o)j]BO6Ns,$`3$e\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n javaCharStream0.readChar();\n javaCharStream0.GetImage();\n assertEquals(1, javaCharStream0.bufpos);\n }", "@Test(timeout = 4000)\n public void test019() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 91, 91);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn((-366), 1);\n int int0 = javaCharStream0.getLine();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals((-366), int0);\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n try { \n javaCharStream0.readChar();\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test\n public void testFileReading() throws Exception {\n String[] args = new String[1];\n args[0] = testFile;\n ConferenceManager.main(args);\n\n }", "int readS16BE()\n throws IOException, EOFException;", "@Test(timeout = 4000)\n public void test154() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Q!@aV0Ak~pvq\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(4, javaCharStream0.bufpos);\n assertEquals(7, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.readChar();\n javaCharStream0.readChar();\n try { \n javaCharStream0.FillBuff();\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Q|ni.,qQXS\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 10, 754);\n javaCharStream0.adjustBeginLineColumn(754, 59);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals(59, javaCharStream0.getBeginColumn());\n assertEquals(755, int0);\n }", "private void testDataReader() {\n File csv = new File(pathTest);\n try (FileReader fr = new FileReader(csv); BufferedReader bfr = new BufferedReader(fr)) {\n Logger.printInfo(\"Reading test data\");\n for (String line; (line = bfr.readLine()) != null; ) {\n String[] split = line.split(\",\");\n String data = textCleaner(split[indexData].toLowerCase());\n int label = Integer.parseInt(split[indexLabel].toLowerCase());\n\n linesTest.add(data);\n labelsTest.add(label);\n Logger.print(\"Reading size: \" + linesTest.size());\n }\n for (String l : linesTest) {\n matrixTest.add(wordVectorizer(l));\n }\n } catch (IOException ex) {\n Logger.printError(\"!! Test Data Not Reading !!\");\n System.exit(0);\n }\n }", "static private native int imeToUTF16(long handle, int runes);", "@Test\n void test7BitEncoding() throws Exception {\n ascii_cp1251_lcid1049.guess7BitEncoding();\n ascii_cp1251_lcid1049.setReturnNullOnMissingChunk(true);\n ascii_utf_8_cp1252_lcid1031.guess7BitEncoding();\n ascii_utf_8_cp1252_lcid1031.setReturnNullOnMissingChunk(true);\n ascii_utf_8_cp1252_lcid1031_html.guess7BitEncoding();\n ascii_utf_8_cp1252_lcid1031_html.setReturnNullOnMissingChunk(true);\n htmlbodybinary_cp1251.guess7BitEncoding();\n htmlbodybinary_cp1251.setReturnNullOnMissingChunk(true);\n htmlbodybinary_utf_8.guess7BitEncoding();\n htmlbodybinary_utf_8.setReturnNullOnMissingChunk(true);\n\n assertEquals(\"Subject автоматически Subject\", ascii_cp1251_lcid1049.getSubject());\n assertEquals(\"Body автоматически Body\", ascii_cp1251_lcid1049.getTextBody());\n assertEquals(\"<!DOCTYPE html><html><meta charset=\\\\\\\"windows-1251\\\\\\\"><body>HTML автоматически</body></html>\", ascii_cp1251_lcid1049.getHtmlBody());\n\n assertEquals(\"Subject öäü Subject\", ascii_utf_8_cp1252_lcid1031.getSubject());\n assertEquals(\"Body öäü Body\", ascii_utf_8_cp1252_lcid1031.getTextBody());\n assertNull(ascii_utf_8_cp1252_lcid1031.getHtmlBody());\n\n assertEquals(\"Subject öäü Subject\", ascii_utf_8_cp1252_lcid1031_html.getSubject());\n assertEquals(\"Body öäü Body\", ascii_utf_8_cp1252_lcid1031_html.getTextBody());\n assertEquals(\"<!DOCTYPE html><html><meta charset=\\\\\\\"utf-8\\\\\\\"><body>HTML öäü</body></html>\", ascii_utf_8_cp1252_lcid1031_html.getHtmlBody());\n\n assertEquals(\"Subject öäü Subject\", htmlbodybinary_cp1251.getSubject());\n assertNull(htmlbodybinary_cp1251.getTextBody());\n assertEquals(\"<!DOCTYPE html><html><meta charset=\\\\\\\"utf-8\\\\\\\"><body>HTML автоматически</body></html>\", htmlbodybinary_cp1251.getHtmlBody());\n\n assertEquals(\"Subject öäü Subject\", htmlbodybinary_utf_8.getSubject());\n assertNull(htmlbodybinary_utf_8.getTextBody());\n assertEquals(\"<!DOCTYPE html><html><meta charset=\\\\\\\"utf-8\\\\\\\"><body>HTML öäü</body></html>\", htmlbodybinary_utf_8.getHtmlBody());\n }", "@Test(timeout = 4000)\n public void test158() throws Throwable {\n StringReader stringReader0 = new StringReader(\".0*yBK7wQ\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1997, 1997);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(1998, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 12, (-1783), 1289);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndColumn();\n assertEquals(12, javaCharStream0.getBeginLine());\n assertEquals((-1783), int0);\n }", "private void readEncoding(BufferedReader reader) throws IOException {\n String encoding = reader.readLine();\r\n if ( ! AbstractUtf8Message.UTF8_ENCODING_HEADER_STRING.equals(encoding)) {\r\n throw new IOException(\"Expected UTF-8 header when decoding UTF-8 message\");\r\n }\r\n }", "@Test(timeout = 4000)\n public void test073() throws Throwable {\n StringReader stringReader0 = new StringReader(\"anBz*^T>\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n stringReader0.read();\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test010() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 754, 65, 0);\n javaCharStream0.backup((-1));\n try { \n javaCharStream0.readChar();\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n StringReader stringReader0 = new StringReader(\"...\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 62, 62);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(62, javaCharStream0.getLine());\n }", "@Test\n\tpublic final void testRussianMacronOverI() \n\t\t\tthrows ParserConfigurationException, IOException, SAXException \n\t{\n\t\tassertSingleResult(\"2099904\", fldName, \"istorīi\");\n\t\tassertSingleResult(\"2099904\", fldName, \"istorii\");\n\t\t// i have no idea if these should work, or how it should look here\n//\t\tassertSingleDocWithValue(\"2099904\", fldName, \"istorī\");\n//\t\tassertSingleDocWithValue(\"2099904\", fldName, \"istori\");\n\t}", "@Test(timeout = 4000)\n public void test054() throws Throwable {\n StringReader stringReader0 = new StringReader(\"ri/eKZUUk8oH\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 66, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(\"ri\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n StringReader stringReader0 = new StringReader(\"_ofi`~l69>EJdF\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1874, 1874);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(1877, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test052() throws Throwable {\n StringReader stringReader0 = new StringReader(\"import\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 381, 381);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(5, javaCharStream0.bufpos);\n assertEquals(386, javaCharStream0.getColumn());\n }", "@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 test112() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+Y6{Tr P>D9wb\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 44, 21, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(22, javaCharStream0.getBeginColumn());\n assertEquals(74, token0.kind);\n }", "public CsvConverterTest( String testName )\n {\n super( testName );\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n StringReader stringReader0 = new StringReader(\"short\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 66, 66);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(66, javaCharStream0.getBeginColumn());\n assertEquals(\"short\", token0.toString());\n }", "public void testBigTOC() throws Exception {\n\n InputStream actIn = fact.createFilteredInputStream(mau,\n new StringInputStream(bigTOC),\n Constants.DEFAULT_ENCODING);\n\n assertEquals(bigTOCFiltered, StringUtil.fromInputStream(actIn));\n\n }", "public abstract void read_wchar_array(char[] value, int offset, int\nlength);", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n StringReader stringReader0 = new StringReader(\";{\\\"9n/s(2C'#tQX*\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n byte[] byteArray0 = new byte[8];\n byteArray0[0] = (byte)115;\n byteArray0[1] = (byte)93;\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);\n javaCharStream0.ReInit((InputStream) byteArrayInputStream0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"s\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test064() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 3171, 3171, 3171);\n javaCharStream0.backup(8);\n javaCharStream0.BeginToken();\n javaCharStream0.AdjustBuffSize();\n javaCharStream0.AdjustBuffSize();\n assertEquals(8, javaCharStream0.bufpos);\n }", "@Test\n public void testIncludeHeaderDelimited() throws Throwable {\n testIncludeHeaderDelimited(false);\n }" ]
[ "0.8116914", "0.8049912", "0.75808084", "0.6462757", "0.6015708", "0.59956324", "0.5953902", "0.56270814", "0.56167287", "0.55958515", "0.55309683", "0.5528514", "0.5519778", "0.5497177", "0.54896873", "0.54894537", "0.54881567", "0.54757833", "0.54657024", "0.54655343", "0.5453327", "0.5426836", "0.5408228", "0.53867596", "0.538314", "0.5374597", "0.53708816", "0.5365179", "0.5364988", "0.5362962", "0.5361294", "0.5352185", "0.5347203", "0.5328405", "0.53258383", "0.5320477", "0.5310289", "0.5303539", "0.5299091", "0.5289896", "0.52885556", "0.5266843", "0.5256295", "0.52433175", "0.5239892", "0.5223396", "0.5222092", "0.5213882", "0.5209919", "0.5206006", "0.52032423", "0.51875824", "0.5183418", "0.51769924", "0.517225", "0.51694554", "0.51685494", "0.51542014", "0.5137526", "0.5134965", "0.513285", "0.5130138", "0.51049644", "0.5103909", "0.5102173", "0.5100123", "0.50894475", "0.50883156", "0.50859267", "0.5085092", "0.5079355", "0.50686675", "0.5059846", "0.5059223", "0.50559384", "0.50543004", "0.50464535", "0.5046138", "0.5042082", "0.5041986", "0.5039888", "0.50336236", "0.5030398", "0.5029937", "0.50223404", "0.50183374", "0.5018148", "0.5014768", "0.5012218", "0.50116074", "0.5010126", "0.5007304", "0.5004598", "0.49957618", "0.49908474", "0.49881288", "0.49880216", "0.49815488", "0.49813932", "0.49794185" ]
0.8276029
0
This is only public so that the tests work. I could use reflection in JUnit but that is more work than I want to do.
public String[] getContainers(String base, String dn) throws LDAPException { if (DN.isAncestorOf(base, dn, false) == false) { log.warn("getContainers: incorrect arguments base is : " + base + " dn is : " + dn); return null; } RDN[] baserdns = DN.getRDNs(base); RDN[] dnrdns = DN.getRDNs(dn); int len = dnrdns.length - baserdns.length - 1; if (len < 0) {//Something went wrong. log.warn("getContainers: incorrect arguments base is : " + base + " dn is : " + dn); len = 0; } String[] ret = new String[len]; for (int i = len; i > 0 ; --i) { //0th position is not a container String[] vals = dnrdns[i].getAttributeValues(); String c = vals[0]; /* for (int j = 1; j < vals.length; ++j) { c += " + " + vals[j]; } */ ret[len - i] = c; } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test01()\n {\n MetaClass.forClass(Class, reflectorFactory)\n }", "@Test\npublic void testCalTransactionUTF() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = ResultService.getClass().getMethod(\"calTransactionUTF\", int.class, int.class, int.class, EstimationTransactionData.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}", "@Test\npublic void testCalFileUFP() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = ResultService.getClass().getMethod(\"calFileUFP\", int.class, int.class, int.class, EstimationFileData.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Test\npublic void testJudge() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = ResultService.getClass().getMethod(\"judge\", String.class, String.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}", "@Test\n public void testProgramElementsType() {\n // TODO: test ProgramElementsType\n }", "protected void runTest() throws Throwable {\n assertNotNull(\"TestCase.fName cannot be null\", fName); // Some VMs crash when calling getMethod(null,null);\n Method runMethod= null;\n try {\n // use getMethod to get all public inherited\n // methods. getDeclaredMethods returns all\n // methods of this class but excludes the\n // inherited ones.\n runMethod= getClass().getMethod(fName, (Class [])null);\n } catch (NoSuchMethodException e) {\n fail(\"Method \\\"\"+fName+\"\\\" not found\");\n }\n if (!Modifier.isPublic(runMethod.getModifiers())) {\n fail(\"Method \\\"\"+fName+\"\\\" should be public\");\n }\n\n try {\n runMethod.invoke(this);\n }\n catch (InvocationTargetException e) {\n e.fillInStackTrace();\n throw e.getTargetException();\n }\n catch (IllegalAccessException e) {\n e.fillInStackTrace();\n throw e;\n }\n }", "public void testGetInsDyn() {\n }", "@Test\n\tpublic void testPrimitives() throws Exception {\n\t\ttestWith(TestClassWithPrimitives.getInstance());\n\t}", "@Test\n public void testSetMagic() {\n hero.setMagic(45);\n assertEquals(hero.getMagic(), 45);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n \n }", "@Test\n public void _objectTest() {\n // TODO: test _object\n }", "private ProtomakEngineTestHelper() {\r\n\t}", "@Test\n public void testGetMagic() {\n assertEquals(hero.getMagic(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n \n \n }", "private Mocks() { }", "@Test\n public void testSimpleReflectionObjectCycle() {\n final SimpleReflectionTestFixture simple = new SimpleReflectionTestFixture();\n simple.o = simple;\n assertEquals(this.toBaseString(simple) + \"[o=\" + this.toBaseString(simple) + \"]\", simple.toString());\n }", "@Test\n public void publicInstanceTest() {\n // TODO: test publicInstance\n }", "@Test\n public void testFindByProperties(){\n\n }", "@Test\n public void testGetName() {\n assertEquals(hero.getName(), \"hero\");\n System.out.println(testName.getMethodName() + \" PASSED.\");\n \n }", "private DataClayMockObject() {\n\n\t}", "@Test\n public void testGetBeanCopier() {\n//TODO: Test goes here... \n/* \ntry { \n Method method = BeanUtil.getClass().getMethod(\"getBeanCopier\", Class<?>.class, Class<?>.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/\n }", "public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException, NoSuchFieldException {\n Class clazz = Test.class;\n Class clazz3 = Class.forName(\"Reflection.Test\");\n\n Test test = (Test) clazz.newInstance();\n\n // вызвать метод по имени у заданного объекта\n Method method = clazz.getMethod(\"foo\");\n System.out.println(method.toString());\n method.invoke(test);\n\n // установить поле по имени у заданного объекта\n Field field = clazz.getDeclaredField(\"num\");\n field.setAccessible(true);\n field.set(test, 100);\n System.out.println(test);\n\n // выводим название пакета\n Package pack = clazz.getPackage();\n System.out.println(\"package \" + pack.getName() + \";\");\n\n // начинаем декларацию класса с модификаторов\n int modifiers = clazz.getModifiers();\n System.out.print(getModifiers(modifiers));\n // выводим название класса\n System.out.print(\"class \" + clazz.getSimpleName() + \" \");\n\n // выводим название родительского класса\n System.out.print(\"extends \" + clazz.getSuperclass().getSimpleName() + \" \");\n\n // выводим интерфейсы, которые реализует класс\n Class[] interfaces = clazz.getInterfaces();\n for (int i = 0, size = interfaces.length; i < size; i++) {\n System.out.print(i == 0 ? \"implements \" : \", \");\n System.out.print(interfaces[i].getSimpleName());\n }\n System.out.println(\" {\");\n\n // выводим поля класса\n Field[] fields = clazz.getDeclaredFields();\n for (Field f : fields) {\n System.out.println(\"\\t\" + getModifiers(f.getModifiers()) +\n getType(f.getType()) + \" \" + f.getName() + \";\");\n }\n\n // выводим методы класса\n Method[] methods = clazz.getDeclaredMethods();\n for (Method m : methods) {\n // получаем аннотации\n Annotation[] annotations = m.getAnnotations();\n System.out.print(\"\\t\");\n for (Annotation a : annotations) {\n System.out.print(\"@\" + a.annotationType().getSimpleName() + \" \");\n }\n System.out.println();\n\n System.out.print(\"\\t\" + getModifiers(m.getModifiers()) +\n getType(m.getReturnType()) + \" \" + m.getName() + \"(\");\n System.out.print(getParameters(m.getParameterTypes()));\n System.out.println(\") { }\");\n }\n\n System.out.println(\"}\");\n }", "private ReflectionUtil()\n {\n }", "@Test\n public void testGetProductInfo() throws Exception {\n }", "@Test\n public void testSetName() {\n \n hero.setName(\"cheyo\");\n assertEquals(hero.getName(), \"cheyo\");\n System.out.println(testName.getMethodName() + \" PASSED.\");\n \n }", "@Test\n public void TransformConstructorTest() {\n }", "@Test\n public void testSetHealth() {\n assertEquals(hero.getHealth(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n\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 }", "@Test\r\n\tpublic void testSanity() {\n\t}", "private void test() {\n\n\t}", "@Test\n public void instanceTest() {\n // TODO: test instance\n }", "static void testCaculator(){\n }", "@Test\n public void init() {\n }", "@Override\n public void test() {\n \n }", "@Test\n public void testClassName() {\n TestClass testClass = new TestClass();\n logger.info(testClass.getClass().getCanonicalName());\n logger.info(testClass.getClass().getName());\n logger.info(testClass.getClass().getSimpleName());\n }", "@Test\n public void testGetManagerTypeString() {\n System.out.println(\"getManagerTypeString\");\n Manager instance = new Manager();\n String expResult = \"\";\n String result = instance.getManagerTypeString();\n assertEquals(expResult, result);\n \n fail(\"The test case is a prototype.\");\n }", "public static void loadTest(){\n }", "private static void reflection() throws Exception {\n Class cl = Class.forName(\"com.videobet.sandbox.Person\");\r\n Person p = (Person)cl.getConstructor(new Class[] {String.class, String.class})\r\n .newInstance(\"Smith\", \"John\");\r\n System.out.print(cl.getMethod(\"getFullName\").invoke(p));\r\n }", "@Override\n public void setUp() throws Exception {}", "@Test\n public void simpleUse(){\n }", "public void testGetBasedata() {\n }", "public void test_Initialize_Failure2_unitName_notString()\r\n throws Exception {\r\n context.addEntry(\"unitName\", new Object());\r\n context.addEntry(\"activeContestStatusId\", new Long(1));\r\n context.addEntry(\"defaultDocumentPathId\", new Long(1));\r\n context.addEntry(\"loggerName\", \"contestManager\");\r\n context.addEntry(\"documentContentManagerClassName\",\r\n \"com.topcoder.service.studio.contest.documentcontentmanagers.SocketDocumentContentManager\");\r\n context.addEntry(\"documentContentManagerAttributeKeys\",\r\n \"serverAddress,serverPort\");\r\n context.addEntry(\"serverAddress\", \"127.0.0.1\");\r\n context.addEntry(\"serverPort\", new Integer(40000));\r\n\r\n Method method = beanUnderTest.getClass()\r\n .getDeclaredMethod(\"initialize\",\r\n new Class[0]);\r\n\r\n method.setAccessible(true);\r\n\r\n try {\r\n method.invoke(beanUnderTest, new Object[0]);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (InvocationTargetException e) {\r\n // success\r\n }\r\n }", "@Test\n public void testSelfInstanceVarReflectionObjectCycle() {\n final SelfInstanceVarReflectionTestFixture test = new SelfInstanceVarReflectionTestFixture();\n assertEquals(this.toBaseString(test) + \"[typeIsSelf=\" + this.toBaseString(test) + \"]\", test.toString());\n }", "@Test\n\tpublic void testClasses() throws Exception {\n\t\ttestWith(String.class);\n\t}", "@Test\n public void atTypeTest() {\n // TODO: test atType\n }", "@Test\n void getArgString() {\n }", "@Override\n public void testGetAllObjects() {\n }", "@Test\npublic void testFilter() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = VirtualCoinCtrl.getClass().getMethod(\"filter\", VirtualCoin.class, VirtualCoinAddReq.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}", "@Test\npublic void testPrivateChat() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = HandlerClient.getClass().getMethod(\"privateChat\", String.class, String.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}", "@Test\n public void testGetValue() throws Exception {\n\n Map<String, IMetaData<SampleMark>> name2MetaData;\n name2MetaData = factory.class2MetaDataByFullPath(Person.class);\n\n assertEquals(3, name2MetaData.size());\n\n for (Person p : persons) {\n\n Person.assertPerson(p,\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Person|lastname\").getValue(p),\n (Float) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Person|weight\").getValue(p),\n (Integer) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Person|age\").getValue(p));\n }\n\n name2MetaData = factory.class2MetaDataByFullPath(Driver.class);\n\n assertEquals(4, name2MetaData.size());\n\n for (Driver d : drivers) {\n\n Driver.assertDriver(d,\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Driver|lastname\").getValue(d),\n (Float) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Driver|weight\").getValue(d),\n (Integer) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Driver|age\").getValue(d),\n (Boolean) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Driver|hasDrivingLicense\").getValue(d));\n\n }\n\n name2MetaData = factory.class2MetaDataByFullPath(Car.class);\n\n assertEquals(10, name2MetaData.size());\n\n for (Car c : cars) {\n Driver.assertDriver(c.getDriver(),\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|lastname\").getValue(c),\n (Float) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|weight\").getValue(c),\n (Integer) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|age\").getValue(c),\n (Boolean) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|hasDrivingLicense\").getValue(c));\n Driver.assertDriver((Driver) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver\").getValue(c),\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|lastname\").getValue(c),\n (Float) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|weight\").getValue(c),\n (Integer) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|age\").getValue(c),\n (Boolean) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|hasDrivingLicense\").getValue(c));\n Engine.assertEngine(c.getEngine(),\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|productName\").getValue(c));\n Engine.assertEngine((Engine) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine\").getValue(c),\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|productName\").getValue(c));\n\n Oil.assertOil(c.getEngine().oil,\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|oil|vendorName\").getValue(c),\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|oil|producentName\").getValue(c));\n Oil.assertOil((Oil) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|oil\").getValue(c),\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|oil|vendorName\").getValue(c),\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|oil|producentName\").getValue(c));\n }\n\n }", "Reproducible newInstance();", "@Test\n public void atBaseTypeTest() {\n // TODO: test atBaseType\n }", "@Override\n public void runTest() {\n }", "@Test\n void getName() {\n assertEquals(\"roo\", roo.getName());\n }", "@Test\n public void testSelfInstanceTwoVarsReflectionObjectCycle() {\n final SelfInstanceTwoVarsReflectionTestFixture test = new SelfInstanceTwoVarsReflectionTestFixture();\n assertEquals(this.toBaseString(test) + \"[otherType=\" + test.getOtherType().toString() + \",typeIsSelf=\" + this.toBaseString(test) + \"]\", test.toString());\n }", "@Override\n @Before\n public void setUp() throws IOException {\n }", "@Test\n public void typeTest() {\n // TODO: test type\n }", "@Test\n public void typeTest() {\n // TODO: test type\n }", "@Test\n public void typeTest() {\n // TODO: test type\n }", "private static void initTestOffset() {\n ArtMethodSizeTest.method1();\n ArtMethodSizeTest.method2();\n // get test methods\n try {\n testOffsetMethod1 = ArtMethodSizeTest.class.getDeclaredMethod(\"method1\");\n testOffsetMethod2 = ArtMethodSizeTest.class.getDeclaredMethod(\"method2\");\n } catch (NoSuchMethodException e) {\n throw new RuntimeException(\"SandHook init error\", e);\n }\n initTestAccessFlag();\n }", "@Test\n void setName() {\n }", "private test5() {\r\n\t\r\n\t}", "@Test\n\tpublic abstract void testTransform4();", "@Test\n void constructorTest() {\n super.checkConstruction();\n }", "@Test\n\tpublic void testMain() {\n\t}", "@Override\n protected String testName(FrameworkMethod method)\n {\n return method.getName() + getName();\n }", "@Test\r\n\tpublic void test() {\r\n\t}", "private Inspect() {\n }", "@Override\n\tpublic void test() {\n\t\t\n\t}", "@Test\n void testAssertPropertyReflectionEquals_equals() {\n assertPropertyReflectionEquals(\"stringProperty\", \"stringValue\", testObject);\n }", "@Test\n public void testInitialize() {\n \n \n }", "@Test\r\n public void testSetName() {\r\n\r\n }", "@Before\n\t public void setUp() {\n\t }", "@Override\n public void setUp() {\n }", "@org.junit.Test\n public void setName() {\n }", "@Test\n void get() {\n }", "@Test\n public void testWalkForPduTarget() throws Exception {\n//TODO: Test goes here... \n }", "@Test\n void setName() {\n\n }", "public void testJavaClassRepository872() throws Exception {\n\t\tJavaClassRepository var2730 = new JavaClassRepository();\n\t\tvar2730.getClass(SingleMethodClass.class.getCanonicalName());\n\t\tvar2730.getClass(Example.class.getCanonicalName());\n\t}", "@Test\n public void testGetPower() {\n assertEquals(hero.getPower(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n \n }", "@Test\n\tvoid test() {\n\t\t\n\t}", "LoadTest createLoadTest();", "@Test\n\tpublic void getTest() {\n\t}", "protected TestBench() {}", "@Test\r\n\tpublic void contents() throws Exception {\n\t}", "@Test\n public void testCityReportNameSuccess(){\n City city = new City(\"London\");\n assertEquals(\"London\", city.getName());\n }", "@Test\n public void testGetOwner() {\n \n }", "TestTarget createTestTarget();", "@Test\n public void testPerson() {\n }", "@Test\n\tpublic void testVersionCheck() throws Exception{\n\t}", "public void testSetBasedata() {\n }", "public static void main(String[] args) throws Exception {\n\n Class<?> rcc = Class.forName(\"com.flyex.testNoUse.ReflectTest\");\n\n Object rccc = rcc.newInstance();\n Object rcccc = rcc.newInstance();\n\n\n }", "@Before public void setUp() { }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n Type type2 = Type.DOUBLE_TYPE;\n typeArray0[2] = type2;\n Type type3 = Type.INT_TYPE;\n typeArray0[3] = type3;\n Type type4 = Type.VOID_TYPE;\n typeArray0[4] = type4;\n Type type5 = Type.BOOLEAN_TYPE;\n typeArray0[5] = type5;\n Type type6 = Type.FLOAT_TYPE;\n typeArray0[6] = type6;\n Type type7 = Type.SHORT_TYPE;\n type2.toString();\n typeArray0[7] = type7;\n Class<Integer> class0 = Integer.class;\n Type.getType(class0);\n Type[] typeArray1 = new Type[1];\n typeArray1[0] = type0;\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n Type.getMethodDescriptor(type1, typeArray1);\n ClassWriter classWriter0 = new ClassWriter(174);\n Item item0 = classWriter0.newConstItem(\"\");\n // Undeclared exception!\n try { \n frame0.execute(3, 2, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test\n\tpublic void getWorksTest() throws Exception {\n\t}", "@Test\n void loadData() {\n }", "@Test\n void testAssertPropertyReflectionEquals_equalsMessage() {\n assertPropertyReflectionEquals(\"a message\", \"stringProperty\", \"stringValue\", testObject);\n }", "@Test\n public void testGetManagerType() {\n System.out.println(\"getManagerType\");\n Manager instance = new Manager();\n int expResult = 0;\n int result = instance.getManagerType();\n assertEquals(expResult, result);\n \n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void test() {\n\t}", "@Test\n\tpublic void test() {\n\t}", "@Before public void setUp() {\n // Insert some initial values into the inheritance\n // tree\n //\n\n //\n treeManager = new InheritanceTreeManager(\n GNode.create(\"ClassDeclaration\"));\n // Put in some example classes\n GNode newClass = GNode.create(\"ClassDeclaration\", \"Point\");\n\n //\n ArrayList<String> point = new ArrayList<String>();\n point.add(\"qimpp\");\n point.add(\"Point\");\n treeManager.insertClass(point, null, newClass);\n\n //\n //\n\n //\n\n newClass = GNode.create(\"ClassDeclaration\", \"ColorPoint\");\n ArrayList<String> ColorPoint = new ArrayList<String>();\n ColorPoint.add(\"qimpp\");\n ColorPoint.add(\"ColorPoint\");\n treeManager.insertClass(ColorPoint, point, newClass);\n //\n\n //\n // Test that classes with the same name in different\n // packages are distinct\n //\n newClass = GNode.create(\"ClassDeclaration\", \"OtherColorPoint\");\n ColorPoint = new ArrayList<String>( \n Arrays.asList(\"org\", \"fake\", \"ColorPoint\") );\n treeManager.insertClass(ColorPoint, null, newClass);\n\n \n }", "public void testCtor() {\r\n new FileSystemPersistence();\r\n }" ]
[ "0.66856956", "0.64185405", "0.63870907", "0.63444656", "0.6179095", "0.61653745", "0.61360204", "0.60977596", "0.6074048", "0.60499656", "0.603292", "0.6026529", "0.6024407", "0.6015016", "0.5966231", "0.5954354", "0.5945723", "0.5932521", "0.5930701", "0.5891452", "0.5886055", "0.58667773", "0.5866159", "0.58608216", "0.5853836", "0.5839789", "0.5834143", "0.5825364", "0.58144003", "0.58052295", "0.57953775", "0.57937354", "0.57892275", "0.57768744", "0.5773082", "0.5772362", "0.5760686", "0.57598776", "0.57578886", "0.57413965", "0.57409537", "0.57339734", "0.57336986", "0.5727727", "0.57255656", "0.57142603", "0.5703221", "0.5702888", "0.56980056", "0.56952834", "0.56921816", "0.5690153", "0.56846786", "0.5684381", "0.5683463", "0.568207", "0.568207", "0.568207", "0.56809086", "0.5676309", "0.5675721", "0.56733483", "0.56696093", "0.56691647", "0.5668245", "0.5658221", "0.5647167", "0.5645907", "0.5645383", "0.5642055", "0.5640994", "0.56329995", "0.56302613", "0.5628302", "0.56250817", "0.5617503", "0.5613698", "0.5609499", "0.5608621", "0.5606063", "0.5603649", "0.56029564", "0.5601034", "0.5600743", "0.5596497", "0.55961037", "0.55938566", "0.55900323", "0.55888075", "0.557807", "0.5575733", "0.55671746", "0.5562706", "0.5558841", "0.55586225", "0.5556918", "0.55540943", "0.5554011", "0.5554011", "0.5552747", "0.55417514" ]
0.0
-1
write a method to get player info and write it to a file
public void load(){ Player temp; try{ FileInputStream inputFile = new FileInputStream("./data.sec"); ObjectInputStream objectIn = new ObjectInputStream(inputFile); temp = (Player)objectIn.readObject(); Arena.CUR_PLAYER = temp; objectIn.close(); inputFile.close(); } catch(FileNotFoundException e ){ System.err.print("data.sec not found"); } catch(IOException e){ System.out.println("Error 201"); } catch(ClassNotFoundException e){ System.out.println("Error 202"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void SavePlayerData() {\r\n\r\n Player player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerInfo.txt\";\r\n\t\tString playerlifepoint = \"\"+player.getLifePoints();\r\n\t\tString playerArmore = player.getArmorDescription();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerlifepoint);\r\n\t\t\tprint.println(playerArmore);\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "static void savePlayerData() throws IOException{\n\t\t/*\n\t\t\tFile playerData = new File(\"Players/\" + Player.getName() +\".txt\");\n\t\t\tif (!playerData.exists()) {\n\t\t\t\tplayerData.createNewFile(); \n\t\t\t}\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(\"Players/\" + Player.getName() +\".txt\"));\n\t\toos.writeObject(Player.class);\n\t\toos.close();\n\t\t*/\n\t\t\n\t\tString[] player = Player.getInfoAsStringArray();\n\t\tjava.io.File playerData = new java.io.File(\"Players/\" + player[0] +\".txt\");\n\t\tif (!playerData.exists()){\n\t\t\tplayerData.createNewFile();\n\t\t}\n\t\tjava.io.PrintWriter writer = new java.io.PrintWriter(playerData);\n\t\t//[0] Name, \n\t\twriter.println(\"# Name\");\n\t\twriter.println(player[0]);\n\t\t//[1] Level, \n\t\twriter.println(\"# Level\");\n\t\twriter.println(player[1]);\n\t\t//[2] getRoleAsInt(),\n\t\twriter.println(\"# Role/Class\");\n\t\twriter.println(player[2]);\n\t\t//[3] exp,\n\t\twriter.println(\"# Exp\");\n\t\twriter.println(player[3]);\n\t\t//[4] nextLevelAt,\n\t\twriter.println(\"# Exp Required for Next Level Up\");\n\t\twriter.println(player[4]);\n\t\t//[5] health,\n\t\twriter.println(\"# Current Health\");\n\t\twriter.println(player[5]);\n\t\t//[6] maxHealth,\n\t\twriter.println(\"# Max Health\");\n\t\twriter.println(player[6]);\n\t\t//[7] intelligence,\n\t\twriter.println(\"# Intelligence\");\n\t\twriter.println(player[7]);\n\t\t//[8] dexterity,\n\t\twriter.println(\"# Dexterity\");\n\t\twriter.println(player[8]);\n\t\t//[9] strength,\n\t\twriter.println(\"# Strength\");\n\t\twriter.println(player[9]);\n\t\t//[10] speed,\n\t\twriter.println(\"# Speed\");\n\t\twriter.println(player[10]);\n\t\t//[11] protection,\n\t\twriter.println(\"# Protection\");\n\t\twriter.println(player[11]);\n\t\t//[12] accuracy,\n\t\twriter.println(\"# Accuracy\");\n\t\twriter.println(player[12]);\n\t\t//[13] dodge,\n\t\twriter.println(\"# Dodge\");\n\t\twriter.println(player[13]);\n\t\t//[14] weaponCode,\n\t\twriter.println(\"# Weapon's Code\");\n\t\twriter.println(player[14]);\n\t\t//[15] armorCode,\n\t\twriter.println(\"# Armor's Code\");\n\t\twriter.println(player[15]);\n\t\t//[16] Gold,\n\t\twriter.println(\"# Gold\");\n\t\twriter.println(player[16]);\n\t\twriter.close();\n\t\t\n\t}", "public static void writePlayerToFile(Player p)\r\n {\r\n try{\r\n //Create an \"players.txt\" file with an ObjectOutputStream\r\n FileOutputStream fileOut = new FileOutputStream(\"players.txt\", true);\r\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut); \r\n\r\n //Write the Player objetct to the file \r\n objectOut.writeObject(p);\r\n //Close file\r\n objectOut.close();\r\n }catch (IOException ioException) \r\n { \r\n //Output error message \r\n System.out.println(\"Error: The file cannot be created\"); \r\n }//end try\r\n }", "@Override\r\n\tpublic void SavePlayerName() {\r\n\t\tPlayer player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerName.txt\";\r\n\t\tString playerName = player.getName();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerName);\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void writeToStringToFile(Player p)\r\n {\r\n try \r\n { \r\n //Create file \r\n PrintWriter fileOutput = new PrintWriter(new FileWriter(\"playersData.txt\", true), true); \r\n\r\n //Write data from given ArrayList to the file \r\n fileOutput.println(p);\r\n\r\n //Close file\r\n fileOutput.close();\r\n } \r\n catch (IOException ioException) \r\n { \r\n //Output error message \r\n System.out.println(\"Error: The file cannot be created\"); \r\n }//end try \r\n }", "public abstract void info(Player p);", "public void printPlayerStat(Player player);", "public void printDetailedPlayer(Player player);", "public void writePlayerFile(String fileName)\r\n\t{\r\n\t\tPrintWriter fileWrite;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfileWrite = new PrintWriter(new FileOutputStream(fileName));\r\n\t\t\tfileWrite.println(\"Name \" + name);\r\n\t\t\tfileWrite.println(\"HP \" + hp);\r\n\t\t\tfileWrite.println(\"Strength \" + strength);\r\n\t\t\tfileWrite.println(\"Speed \" + speed);\r\n\t\t\tfileWrite.println(\"Weapon \" + weapon);\r\n\t\t\tfileWrite.close();\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public void printDataToFile(){\n\ttry {\n\t File file = new File(\"media/gameOutput.txt\");\n \n\t // if file doesnt exists, then create it\n\t if (!file.exists()) {\n\t\tfile.createNewFile();\n\t }\n \n\t FileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t BufferedWriter bw = new BufferedWriter(fw);\n\t bw.write(printString);\n\t bw.close();\n\t} catch (IOException e) {\n\t e.printStackTrace();\n\t}\n }", "public void FileWrite(Nimsys nimSys,ArrayList<Player> list)throws IOException{\r\n\t\tOutputStream out = new FileOutputStream(\"players.dat\");\r\n\t\tIterator<Player> aa = list.iterator();\r\n\t\twhile(aa.hasNext()){ //each line includes the information below related to the players\r\n\t\t\tPlayer in = aa.next();\r\n\t\t\tout.write(in.getUserName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(in.getSurName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(in.getGivenName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getGamePlay()).getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getWinGame()).getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getID()).getBytes());\r\n\t\t\tout.write('\\r');\r\n\t\t}\r\n\t}", "static void writeRanking(ArrayList<PlayerInfo> player){\n\t\ttry{\r\n\t\t\tFileOutputStream fos = new FileOutputStream(\"ranking.dat\");\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\r\n\t\t\toos.writeObject(player);\r\n\t\t\toos.flush();\r\n\t\t\toos.close();\r\n\t\t\tfos.close();\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//return player;\r\n\t}", "@Override\n\tpublic boolean writeData(File file) {\n\n Collection<SoccerPlayer> soccerPlayers = stats.values();\n\n\n\n try {\n\n PrintWriter writer = new PrintWriter(file);\n\n for (SoccerPlayer sp : soccerPlayers) {\n\n writer.println(logString(sp.getFirstName()));\n writer.println(logString(sp.getLastName()));\n writer.println(logString(sp.getTeamName()));\n writer.println(logString(sp.getUniform()+\"\"));\n writer.println(logString(sp.getGoals() + \"\"));\n writer.println(logString(sp.getAssists() + \"\"));\n writer.println(logString(sp.getShots() + \"\"));\n writer.println(logString(sp.getSaves() + \"\"));\n writer.println(logString(sp.getFouls() + \"\"));\n writer.println(logString(sp.getYellowCards() + \"\"));\n writer.println(logString(sp.getRedCards() + \"\"));\n\n }\n\n writer.close();\n\n return true;\n\n }\n\n catch(java.io.FileNotFoundException ex) {\n\n return false;\n }\n\t}", "@Override\n\tpublic void savePlayerData(OutputStream os) {\n\t\t\n\t}", "@Override\n\tpublic void savePlayerData(OutputStream os) {\n\n\t}", "public void save(){\n Player temp = Arena.CUR_PLAYER;\n try{\n FileOutputStream outputFile = new FileOutputStream(\"./data.sec\");\n ObjectOutputStream objectOut = new ObjectOutputStream(outputFile);\n objectOut.writeObject(temp);\n objectOut.close();\n outputFile.close();\n }\n catch(FileNotFoundException e){\n System.out.print(\"Cannot create a file at that location\");\n }\n catch(SecurityException e){\n System.out.print(\"Permission Denied!\");\n }\n catch(IOException e){\n System.out.println(\"Error 203\");\n } \n }", "@Override\n\tpublic void savePlayerData(OutputStream arg0) {\n\n\t}", "@Override\n\tpublic void savePlayerData(OutputStream arg0)\n\t{\n\n\t}", "public static void savePlayer(Player player){\n if (player != null){\n try {\n mapper.writeValue(new File(\"Data\\\\PlayerData\\\\\" + getFileName(player) + \".json\"), player);\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n }\n }", "private void writeInfoToFile() {\n createInfoFile(\"infoList.txt\", fwExMessage);\n outFile.println(\"منشی\");\n outFile.println(username);\n outFile.println(password);\n outFile.println(\" \");\n outFile.close();\n }", "private void writeToFile(){\r\n File file = new File(\"leaderboard.txt\");\r\n\r\n try {\r\n FileWriter fr = new FileWriter(file, true);\r\n BufferedWriter br = new BufferedWriter(fr);\r\n for(Player player : this.sortedPlayers){\r\n br.write(player.toString());\r\n br.write(\"\\n\");\r\n }\r\n br.close();\r\n fr.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public static void writePlayerToFile(ArrayList<Player> players)\r\n {\r\n clearFile(new File(\"players.txt\"));\r\n\r\n for(Player p : players)\r\n {\r\n writePlayerToFile(p);\r\n }//end for\r\n }", "public static File createPlayerFile(){\n try {\n playerFile = new File(System.getProperty(\"user.dir\") + \"/PlayerFiles/\" + \".txt\"); //creates player file, can it run on android?\n playerFile.createNewFile();\n }catch (IOException e){\n e.printStackTrace();\n }\n finally {\n return playerFile;\n }\n }", "public void playerDetailedInfo(Player p){\n System.out.println(\"Indicator: \" + indicator + \"\\nJoker: \"+joker);\n System.out.println(\"Winner: Player\" + p.getPlayerNo());\n System.out.println(\"Tile size: \" + p.getTiles().size());\n System.out.println(\"Joker count: \" + p.getJokerCount());\n System.out.println(\"Double score: \" + p.getDoubleCount()*2);\n System.out.println(\"All tiles in ascending order:\\t\" + p.getTiles());\n System.out.println(\"Clustered according to number: \\t\" + p.getNoClus());\n System.out.println(\"Total number clustering score: \" + p.totalNoClustering());\n System.out.println(\"Clustered according to color: \\t\" + p.getColClus());\n System.out.println(\"Total color clustering score: \" + p.totalColCluster());\n System.out.println(\"Final score of Player\"+p.getPlayerNo()+\": \" + p.getPlayerScore());\n }", "String getPlayer();", "static void saveMeta() {\n File dir = new File(\"./plugins/SkyblockShop/\");\n if (!dir.exists()) {if (!dir.mkdir()) { System.out.println(\"Failed to create SkyblockShop directory!\");}}\n\n //save 'money' to .meta file\n try {\n PrintWriter writer = new PrintWriter(\"./plugins/SkyblockShop/.meta\", \"UTF-8\");\n writer.println(Main.money);\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n System.out.println(\"Something went wrong while creating the .meta file!\");\n }\n }", "private void saveScore() {\n try {\n PrintWriter writer = new PrintWriter(new FileOutputStream(new File(Const.SCORE_FILE), true));\n writer.println(this.player.getName() + \":\" + this.player.getGold() + \":\" + this.player.getStrength());\n writer.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void SerialWriteFile() {\r\n\r\n PrintWriter pwrite = null;\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(getName(), getNickname(), getTotalScore());\r\n\r\n try {\r\n ObjectOutputStream outputStream =\r\n new ObjectOutputStream(new FileOutputStream(fileObject));\r\n\r\n outputStream.writeObject(q); //Writes the object to the serialized file.\r\n outputStream.close();\r\n\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problem with file output.\");\r\n }\r\n\r\n }", "public void savePokemonData()\r\n {\r\n try\r\n {\r\n int currentPokemon = playerPokemon.getCurrentPokemon();\r\n\r\n FileWriter fw = new FileWriter(\"tempPlayerPokemon.txt\");\r\n\r\n List<String> list = Files.readAllLines(Paths.get(\"playerPokemon.txt\"), StandardCharsets.UTF_8);\r\n String[] pokemonList = list.toArray(new String[list.size()]);\r\n\r\n String currentPokemonStr = pokemonList[currentPokemon];\r\n String[] currentPokemonArray = currentPokemonStr.split(\"\\\\s*,\\\\s*\");\r\n\r\n currentPokemonArray[1] = Integer.toString(playerPokemon.getLevel());\r\n currentPokemonArray[3] = Integer.toString(playerPokemon.getCurrentHealth());\r\n currentPokemonArray[4] = Integer.toString(playerPokemon.getCurrentExperience());\r\n for(int c = 0; c < 4; c++)\r\n {\r\n currentPokemonArray[5 + c] = playerPokemon.getMove(c);\r\n }\r\n\r\n String arrayAdd = currentPokemonArray[0];\r\n for(int i = 1; i < currentPokemonArray.length; i++)\r\n {\r\n arrayAdd = arrayAdd.concat(\", \" + currentPokemonArray[i]);\r\n }\r\n\r\n pokemonList[currentPokemon] = arrayAdd;\r\n\r\n for(int f = 0; f < pokemonList.length; f++)\r\n {\r\n fw.write(pokemonList[f]);\r\n fw.write(\"\\n\");\r\n }\r\n fw.close();\r\n\r\n Writer.overwriteFile(\"tempPlayerPokemon\", \"playerPokemon\");\r\n }\r\n catch(Exception error)\r\n {\r\n }\r\n }", "static void saveAllPlayersToFiles(){\n \tfor( String playername : GoreaProtect.playersData.getKeys(false))\n \t{\n \t\tFile playerfile = new File(GoreaProtect.datafolder + File.separator + \"Protections\");\n \t\tFile fileplayer= new File(playerfile, playername + \".yml\");\n\n \t\tConfigurationSection playerdata = GoreaProtect.playersData.getConfigurationSection(playername);\n\n \t\tYamlConfiguration PlayersDatayml = new YamlConfiguration();\n\n \t\tfor (String aaa:playerdata.getKeys(false))\n \t\tPlayersDatayml.set(aaa, playerdata.get(aaa));\n \t\t\n \t\t\n \t\ttry {\n\t\t\t\tPlayersDatayml.save(fileplayer);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \n \t} \n }", "public static void saveDataToFile() {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy MM dd, HH mm\");\n Date date = new Date();\n String fileName= dateFormat.format(date)+\".txt\";\n\n try {\n PrintWriter writer = new PrintWriter(fileName, \"UTF-8\");\n writer.print(\"Wins: \");\n writer.println(wins);\n writer.print(\"Draws: \");\n writer.println(draws);\n writer.print(\"Losses: \");\n writer.println(loses);\n writer.close();\n System.out.println(\"File Write Successful\");\n } catch (IOException e) {\n\n }\n\n\n }", "public void saveGame(String fileName){\n Gson gson = new Gson();\n String userJson = gson.toJson(player);\n\n try(Writer w = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(fileName), \"UTF-8\"))) {\n w.write(userJson);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void save(){\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tPrintWriter pw=new PrintWriter(f);\n\t\t\tpw.println(turn);\n\t\t\tpw.println(opponent.toString());\n\t\t\tfor(Unit u:punits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Player Units\");\n\t\t\tfor(Unit u:ounits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Opponent Units\");\n\t\t\tpw.println(priorities);\n\t\t\tpw.println(Arrays.asList(xpgains));\n\t\t\tpw.println(spikesplaced+\" \"+numpaydays+\" \"+activeindex+\" \"+activeunit.getID()+\" \"+weather+\" \"+weatherturn);\n\t\t\tpw.println(bfmaker.toString());\n\t\t\tpw.close();\n\t\t}catch(Exception e){e.printStackTrace();}\n\t}", "public String playerString() {\n String outString = \"\";\n outString = (playerName + \",\" + String.valueOf(ID) + \",\" + club + \",\" + position + \",\" +\n String.valueOf(age) + \",\" + String.valueOf(projectedScore)\n + \",\" + String.valueOf(available) + \",\" + String.valueOf(onTeam) + \",\"+String.valueOf(draftPick)+\",\"+String.valueOf(predictedPick));\n\n return outString;\n }", "public abstract void saveToFile(PrintWriter out);", "public String toString() {\n\t\tcreatePlayers(playerInfo);\n\t\tString result = \"\";\n\t\t//splits each player in the create players method\n\t\tfor (NFL_Player player : playerInfo) {\n\t\t\tresult += player.toString() + \"\\r------------------------------------------------------\\r\";\n\n\t\t}\n\t\treturn result;\n\t}", "public void writeData(UserInfo info)\n\t{\n\t\tSystem.out.println(\"file has been written!\");\n\t\tuserinfos.add(info);\n\t}", "private String getPlayersInfo(List<LightPlayer> players, String name){\n StringBuilder stringBuilder = new StringBuilder();\n for (LightPlayer player : players){\n stringBuilder.append(player.getName());\n if (player.getName().equals(name)) {\n stringBuilder.append(\" (you)\");\n }\n\n stringBuilder\n .append(\"\\n\")\n .append(player.getColor().name())\n .append(\" \")\n .append(\"[\")\n .append(player.getColor().name().toCharArray()[0])\n .append(\"]\")\n .append(\"\\n\");\n\n if (player.getCard() != null) {\n stringBuilder.append(player.getCard().getName().name());\n }\n\n stringBuilder.append(\"\\n\\n\\n\");\n }\n\n return stringBuilder.toString();\n }", "public void addPlayerToPlayers(String username) throws IOException{\r\n\t\tScanner readPlayers = new Scanner(new BufferedReader(new FileReader(\"players.txt\")));\r\n\t\tint numberOfPlayers = readPlayers.nextInt();\r\n\t\tif(numberOfPlayers == 0) { // no need to store data to rewrite\r\n\t\t\ttry {\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(numPlayers.toString()); // write userId as 1 because only 1 player\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t/* Store all current usernames and userIds in a directory to rewrite to file */\r\n\t\t\tPlayerName[] directory = new PlayerName[numberOfPlayers];\r\n\t\t\t\r\n\t\t\tfor(int index = 0; index < numberOfPlayers; index++) {\r\n\t\t\t\tPlayerName playerName = new PlayerName();\r\n\t\t\t\tplayerName.setUserId(readPlayers.nextInt());\r\n\t\t\t\tplayerName.setUserName(readPlayers.next());\r\n\t\t\t\tdirectory[index] = playerName;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treadPlayers.close();\r\n\t\t\t/* Add a new player */\r\n\t\t\ttry {\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\"); // maintains format of players.txt\r\n\t\t\t\t\r\n\t\t\t\tfor(int index = 0; index < numberOfPlayers - 1; index++) { // - 1 because it was incremented\r\n\t\t\t\t\tInteger nextId = directory[index].getUserId();\r\n\t\t\t\t\tplayerWriter.write(nextId.toString());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t\tplayerWriter.write(directory[index].getUserName());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tInteger lastId = numberOfPlayers;\r\n\t\t\t\tplayerWriter.write(lastId.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treadPlayers.close();\r\n\t}", "public String playerStatsToString() {\r\n\t\t\tString stats = \"\";\r\n\t\t\tstats = stats + username + \"\\n\";\r\n\t\t\tstats = stats + numberOfWins + \"\\n\";\r\n\t\t\tstats = stats + numberOfGames + \"\\n\";\r\n\t\t\tstats = stats + numberOfAttacks + \"\\n\";\r\n\t\t\tstats = stats + numberOfSPAttacks + \"\\n\";\r\n\t\t\tstats = stats + numberOfMeals + \"\\n\";\r\n\t\t\treturn stats;\r\n\t\t}", "public void saveCurrentPlayer() {\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/current_player\");\n\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/current_player\",_currentPlayer));\n\t}", "void printPlayersActionInfo(Player p) {\n }", "public void updatePlayerDAO(ArrayList<Player> playerList){\n\t\ttry {\n\t\t\tPrintStream writer = new PrintStream(new FileOutputStream(\"data\\\\player.csv\", false));\n\t\t\t writer.println(\"userName,fullName,password,gold,exp,noOfLand\");\n \n\t\t\tfor(Player player: playerList){\n\t\t\t\twriter.println(player.getUserName() + \",\" + player.getFullName() + \",\" + \n\t\t\t\tplayer.getPassword() + \",\" + player.getGold() + \",\" + player.getExp() + \",\" + player.getNoOfLand());\n\t\t\t}\n\t\t\twriter.close();\n\t\t}\n\t\t\t\n\t\tcatch (IOException e) {\n\t\t\t//Specify the location of IOException\n\t\t\te.printStackTrace();\n\t\t}\t \n\t}", "private static String getFileName(Player player){\n if (player != null) {\n return (player != null) ? player.getFirstName() + player.getLastName() + player.getNumber() + player.getTeamName() : \"\";\n } else {\n return null;\n }\n }", "public String saveGame(String fileName) {\n File file = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n File saveFile = new File(file, fileName);\n\n try {\n PrintWriter writer = new PrintWriter(saveFile.getAbsolutePath(), \"UTF-8\");\n writer.println(\"Black: \" + playerBlack.getScore());\n writer.println(\"White: \" + playerWhite.getScore());\n writer.println(\"Board:\");\n\n for (int r = 0; r < Board.MAX_ROW; r++) {\n for (int c = 0; c < Board.MAX_COLUMN; c++) {\n if (boardObject.getSlot(r, c).getColor() == Slot.BLACK) {\n writer.print(\"B \");\n } else if (boardObject.getSlot(r, c).getColor() == Slot.WHITE) {\n writer.print(\"W \");\n } else {\n writer.print(\"O \");\n }\n }\n writer.println();\n }\n\n String nextPlayer = playerWhite.isTurn() ? \"White\" : \"Black\";\n writer.println(\"Next player: \" + nextPlayer);\n\n String humanPlayer = playerWhite.isComputer() ? \"Black\" : \"White\";\n writer.println(\"Human: \" + humanPlayer);\n\n writer.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return saveFile.getAbsolutePath();\n }", "@Override\n\tpublic void onStart()\n\t{\n\t\ttry{\n\t\t\tFile f = new File(getDirectoryData() + \"\\\\\" + getParameters() + \".bot\");\n\t\t\tlog(\"creating file \" + getDirectoryData() + \"\\\\\" + getParameters() + \".bot\");\n\t\t\tf.deleteOnExit();\n\t\tPrintWriter out = new PrintWriter(f);\n\t\tout.println(myPlayer().getName());\n\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void makeProfile(String name){\r\n try{\r\n PrintWriter out = new PrintWriter(new FileWriter(\"../profiles/\" + name + \".profile\"));\r\n out.println(\"HORATIU INCORPORATED PROTECTED\"); //Header\r\n out.println(name); //Player name\r\n out.println(0); //Score\r\n \r\n //UNLOCK CODES\r\n //-1 if not unlocked\r\n //0 if unlocked but not completed\r\n //1 if completed\r\n out.println(0); //Initial level is unlocked by default\r\n for(int i = 0; i < 5; i++){\r\n out.println(-1); //\r\n }\r\n out.close();\r\n }\r\n catch(IOException e){\r\n }\r\n Player.playerName = name;\r\n Player.playerScore = 0; //Score\r\n Player.scores[0] = 0;\r\n for(int i = 1; i < 6; i++){ //1 to 6 so it does not overwrite the first 0\r\n Player.scores[i] = -1;\r\n }\r\n GameApp.makeToView(name);\r\n }", "public static void saveStats() {\r\n\t\tif(Main.optionsCheckbox.getState()) FileUtils.exportGameOptions();\r\n\t\t\r\n\t\tif(Main.isFourHandedTeams) {\r\n\t\t\tif(Main.team1Checkbox.getState()) FileUtils.exportTeamFile(Main.teamOne);\r\n\t\t\tif(Main.team2Checkbox.getState()) FileUtils.exportTeamFile(Main.teamTwo);\r\n\t\t\tif(Main.teamPreviousCheckbox.getState()) FileUtils.exportTeamFile(Main.teamPrevious);\r\n\t\t}\r\n\t\t\r\n\t\tif(Main.isFourHandedSingle) {\r\n\t\t\tif(Main.player1Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerOne);\r\n\t\t\tif(Main.player2Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerTwo);\r\n\t\t\tif(Main.player3Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerThree);\r\n\t\t\tif(Main.player4Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerFour);\r\n\t\t\tif(Main.playerPreviousCheckbox.getState()) FileUtils.exportPlayerFile(Main.playerPrevious);\r\n\t\t}\r\n\t\t\r\n\t\tif(Main.isThreeHanded) {\r\n\t\t\tif(Main.player1Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerOne);\r\n\t\t\tif(Main.player2Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerTwo);\r\n\t\t\tif(Main.player3Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerThree);\r\n\t\t\tif(Main.playerPreviousCheckbox.getState()) FileUtils.exportPlayerFile(Main.playerPrevious);\r\n\t\t}\r\n\t}", "void savePlayer(String playerIdentifier, int score, int popID) {\n //save the players top score and its population id\n Table playerStats = new Table();\n playerStats.addColumn(\"Top Score\");\n playerStats.addColumn(\"PopulationID\");\n TableRow tr = playerStats.addRow();\n tr.setFloat(0, score);\n tr.setInt(1, popID);\n\n Constants.processing.saveTable(playerStats, \"data/playerStats\" + playerIdentifier + \".csv\");\n\n //save players brain\n Constants.processing.saveTable(brain.NetToTable(), \"data/player\" + playerIdentifier + \".csv\");\n }", "static void recordProcess() {\n try {\n PrintWriter output = new PrintWriter(new FileWriter(file, true));\n output.print(huLuWaList.size() + \" \");\n lock.lock();\n for (Creature creature : huLuWaList) {\n output.print(creature.getCreatureName() + \" \" + creature.getX() + \" \" + creature.getY()+\" \");\n }\n output.print(enemyList.size() + \" \");\n for (Creature creature : enemyList) {\n output.print(creature.getCreatureName() + \" \" + creature.getX() + \" \" + creature.getY()+\" \");\n }\n output.println();\n output.close();\n lock.unlock();\n }catch (Exception ex){\n System.out.println(ex);\n }\n }", "String getPlayerName();", "public String toFile(){\n\t\tString personInfo = this.firstName + \" ; \" + this.lastName + \" ; \";\n\t\t\n\t\treturn personInfo;\n\t}", "public static String getPlayerString(float[] playerInfo){\n\t\tif(playerInfo.length!=4)throw new IllegalArgumentException(\"Method only accepts playerinfo of length 4: ID,X,Y,ROT\");\n\t\tplayerInfo[1]*=100.0f;\n\t\tplayerInfo[2]*=100.0f;\n\t\t//P [ID] [X*100] [Y*100] [ROT]\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"P \");\n\t\tfor(int i =0;i<4;i++){\n\t\t\tsb.append((int)playerInfo[i]);\n\t\t\tsb.append(\" \");\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String toString() {\n\t\treturn \"player \" + player.id + \"\\n\";\n\t}", "public void grabaArchivo() throws IOException {\n\n System.out.println(\"Grabando archivo\");\n PrintWriter fileOut = new PrintWriter(new FileWriter(\"src/images/save.txt\"));\n for (int i = 0; i < vec.size(); i++) {\n\n Object x = vec.get(i);\n\n if (x instanceof Player) {\n x = (Player) vec.get(i);\n fileOut.println(x.toString());\n } else if (x instanceof Shot) {\n x = (Shot) vec.get(i);\n fileOut.println(x.toString());\n } else if (x instanceof Alien){\n x = (Alien) vec.get(i);\n fileOut.println(x.toString());\n } else {\n fileOut.println((String) x);\n }\n }\n\n vec.clear();\n fileOut.close();\n }", "public void saveInfoToFile(File file) {\n PrintWriter printFile = null;\n try {\n printFile = new PrintWriter(file);\n } catch (FileNotFoundException e) {\n e.getStackTrace();\n return;\n }\n ArrayList<Passenger> reservedPas = airplane.getAllReservedPas(false);\n reservedPas.addAll(airplane.getAllReservedPas(true));\n\n for (Passenger k : reservedPas) {\n String info = getReservedPassInfo(k);\n printFile.println(info);\n }\n printFile.close();\n }", "public interface PlayerWDS {\n\n /**\n * 根据球队缩写列表和当前赛季年份 爬取球员基本数据.html表\n *\n * @param abbr 球队缩写\n * @param year 当前赛季年份\n * @return List<StringBuffer> 爬取球员基本数据.html表\n */\n public StringBuffer getPlayerInfo(String abbr,int year);\n\n /**\n * 根据路径 爬取球员职业生涯的数据\n *\n * @param path 球员数据路径\n * @return StringBuffer 爬取球员职业生涯的数据\n */\n public StringBuffer getPlayerImg(String path);\n}", "private void outputfile() {\n\n ConnectDB dbconnect = new ConnectDB();\n\n try {\n PrintWriter writer = new PrintWriter(\"memberoutput.txt\");\n\n try {\n dbconnect.pst = dbconnect.con.prepareStatement(\"select * from members\");\n dbconnect.rs = dbconnect.pst.executeQuery();\n\n while (dbconnect.rs.next()) {\n writer.println(dbconnect.rs.getString(1) + \",\"\n + dbconnect.rs.getString(2) + \",\"\n + dbconnect.rs.getString(3) + \",\"\n + dbconnect.rs.getString(4) + \",\"\n + dbconnect.rs.getString(5) + \",\"\n + dbconnect.rs.getString(6) + \",\"\n + dbconnect.rs.getString(7) + \",\"\n + dbconnect.rs.getString(8) + \",\"\n + dbconnect.rs.getString(9));\n }\n\n writer.flush();\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n }\n writer.close();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n JOptionPane.showMessageDialog(null, \"File exported\");\n }", "public String writeDetails ()\n {\n String memberData = \"\";\n memberData = memberData.concat(fname);\n memberData = memberData.concat(\",\");\n memberData = memberData.concat(sname);\n memberData = memberData.concat(\",\");\n memberData = memberData.concat(Float.toString(mark));\n return memberData;\n }", "public String getPlayFile();", "public void writeInfoTofile() throws IOException\n\t{\n\t\tFileWriter fstream = new FileWriter(\"booking.txt\",true);\n BufferedWriter out = new BufferedWriter(fstream); //buffer class name out\n out.append(\"name : \"+this.customer_name);\n out.newLine();\n out.append(hotelInfo.getName());// Writing all customer info\n out.newLine();\n out.append(\"country : \"+hotelInfo.getCountry());\n out.newLine();\n out.append(\"Hotel rating : \"+hotelInfo.getStar());\n out.newLine(); \n out.append(\"check-in date : \"+this.checkin_date);\n out.newLine();\n out.append(\"check-out date: \"+this.checkout_date);\n out.newLine();\n out.append(\"Total price : \"+this.totalPrice);\n out.newLine();\n out.close();\n System.out.println(\"Writting successful.\");\n\t}", "public void writeFile()\n\t{\n\t\t//Printwriter object\n\t\tPrintWriter writer = FileUtils.openToWrite(\"TobaccoUse.txt\");\n\t\twriter.print(\"Year, State, Abbreviation, Percentage of Tobacco Use\\n\");\n\t\tfor(int i = 0; i < tobacco.size(); i++)\n\t\t{\n\t\t\tStateTobacco state = tobacco.get(i);\n\t\t\tString name = state.getState();\n\t\t\tString abbr = state.getAbbreviation();\n\t\t\tdouble percent = state.getPercentUse();\n\t\t\tint year = state.getYear();\n\t\t\twriter.print(\"\"+ year + \", \" + name + \", \" + abbr + \", \" + percent + \"\\n\");\n\t\t} \n\t\twriter.close(); //closes printwriter object\n\t}", "public void printAllPlayers(){\n for (Player player : players){\n player.printPlayerInfo();\n }\n }", "public static void printOut(Talkable p) {\n System.out.println(p.getName() + \" says=\" + p.talk());\n outFile.fileWrite(p.getName() + \"|\" + p.talk());\n }", "public void updateInfo(Player p, boolean isFirst) {\r\n\t\tif (p.isDead() || p.isFree()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Updating player info\");\r\n\t\t\r\n\t\t// Build embed with all stats\r\n\t\tEmbedBuilder embed = new EmbedBuilder();\r\n\t\tembed.setColor(p.getColor());\r\n\t\tembed.setTitle(\"**\"+Utils.getName(p.getPlayerID(),guild)+\"**'s Information\");\r\n\t\tembed.addField(\"Health :heart:\",\"``\"+p.getHealth()+\"``\", true);\r\n\t\tembed.addField(\"Board Clank :warning:\",\"``\"+p.getClankOnBoard()+\"``\", true);\r\n\t\tembed.addField(\"Bag Clank :briefcase:\",\"``\"+p.getClankInBag()+\"``\", true);\r\n\t\tembed.addField(\"**Skill** :diamond_shape_with_a_dot_inside:\",\"``\"+p.getSkill()+\"``\",true);\r\n\t\tembed.addField(\"**Boots** :boot:\",\"``\"+p.getBoots()+\"``\",true);\r\n\t\tembed.addField(\"**Swords** :crossed_swords:\",\"``\"+p.getSwords()+\"``\",true);\r\n\t\tembed.addField(\"Gold :moneybag:\",\"``\"+p.getGold()+\"``\",true);\r\n\t\t//embed.addField(\"Room [\"+ p.getCurrentRoom() + \"] :door:\",\"``\"+Utils.arrayToString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\"``\",true);\r\n\t\tembed.addField(\"Room [\"+ p.getCurrentRoom() + \"] :door:\",Utils.arrayToEmojiString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()]),true);\r\n\t\tif (p.getTeleports() > 0) {\r\n\t\t\tif (GlobalVars.teleportRoomsPerRoom[p.getCurrentRoom()].length > 0) {\r\n\t\t\t\t//embed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\"``\"+\r\n\t\t\t\t//\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\" ┃ \"+\r\n\t\t\t\t//\t\tUtils.arrayToString(GlobalVars.teleportRoomsPerRoom[p.getCurrentRoom()])+\"``\",true);\r\n\t\t\t\tembed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\r\n\t\t\t\t\t\tUtils.arrayToEmojiString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\"┃\"+\r\n\t\t\t\t\t\tUtils.arrayToEmojiString(GlobalVars.teleportRoomsPerRoom[p.getCurrentRoom()],GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()].length),true);\r\n\t\t\t} else {\r\n\t\t\t\t//embed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\"``\"+\r\n\t\t\t\t//\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\"``\",true);\r\n\t\t\t\tembed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\r\n\t\t\t\t\t\tUtils.arrayToEmojiString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()]),true);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tembed.addField(\"\",\"\",true);\r\n\t\t}\r\n\t\t\r\n\t\t// Set history as footer\r\n\t\tString history = \"\";\r\n\t\tfor (int i = p.getHistory().size()-1; i >= 0; i--) {\r\n\t\t\thistory += p.getHistory().get(i) + \" / \";\r\n\t\t}\r\n\t\tembed.setFooter(history, null);\r\n\t\t\r\n\t\tif (isFirst) {\r\n\t\t\tgameChannel.sendMessage(embed.build()).queueAfter(5000, TimeUnit.MILLISECONDS);\r\n\t\t} else {\r\n\t\t\tgameChannel.editMessageById(infoID, embed.build()).queue();\r\n\t\t\tupdateReactionsInfo(); // To allow for hiding rooms that can't be moved into\r\n\t\t}\r\n\t}", "public static synchronized void save() {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n String team_backup = config.Server.serverdata_file_location + \"/teams\";\n\n Calendar dato = new GregorianCalendar();\n\n team_backup += dato.get(Calendar.YEAR) + \"-\" + dato.get(Calendar.DAY_OF_MONTH) + \"-\" + dato.get(Calendar.MONTH) + \"-\";\n team_backup += dato.get(Calendar.HOUR) + \"-\" + dato.get(Calendar.MINUTE) + \".ser\";\n\n admin.logging.globalserverMsg(\"Saving team data to file.\");\n\n try {\n FileOutputStream fil = new FileOutputStream(team_fil);\n FileOutputStream fil_backup = new FileOutputStream(team_backup);\n\n //Skriv til teams.txt\n ObjectOutputStream out = new ObjectOutputStream(fil);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n\n //Skriv til backup fil.\n out = new ObjectOutputStream(fil_backup);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n } catch (Exception e) {\n e.printStackTrace();\n admin.logging.globalserverMsg(\"Error saving team data to file.\");\n }\n }", "private void updateFile() {\n\t\tPrintWriter outfile;\n\t\ttry {\n\t\t\toutfile = new PrintWriter(new BufferedWriter(new FileWriter(\"stats.txt\")));\n\t\t\toutfile.println(\"15\"); // this is the number\n\t\t\tfor (Integer i : storeInfo) {\n\t\t\t\toutfile.println(i); // we overwrite the existing files\n\t\t\t}\n\t\t\tfor (String s : charBought) {\n\t\t\t\toutfile.println(s); // overwrite the character\n\t\t\t}\n\t\t\tfor (String s : miscBought) {\n\t\t\t\toutfile.println(s);\n\t\t\t}\n\t\t\toutfile.close();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t}", "public static void Save(String filename) throws IOException {\n\t\tFileWriter fw=new FileWriter(filename);\r\n\t\tround=A1063307_GUI.round;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tfw.write(\"Round:\"+round+\",Turn:\"+who+\"\\n\");\r\n\t\tint t2=1;\r\n\t\twhile(t2<(linenumber)) {\r\n\t\t\tint zz=0;\r\n\t\t\twhile(zz<5) {\r\n\t\t\t\tif(zz==0) {\t\t\r\n\t\t\t\t\tch[t2].location=ch[t2].location%20;\r\n\t\t\t\t fw.write(Integer.toString(ch[t2].location)+\",\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(zz==1){\r\n\t\t\t\t fw.write(Integer.toString(ch[t2].CHARACTER_NUMBER)+\",\");\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\telse if(zz==2){\r\n\t\t\t\t\tfw.write(Integer.toString(ch[t2].money)+\",\");\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t else if(zz==3){\r\n\t\t\t \tfw.write(Integer.toString(ch[t2].status)+\",\");\r\n\t\t\t \r\n\t\t\t \t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfw.write(ch[t2].IMAGE_FILENAME);\t\t\t\t\r\n\t\t\t\t\t }\r\n\t\t\t\tzz++;\r\n\t\t\t}\r\n\t\t\tfw.write(\"\\n\");\r\n\t\t\tt2++;\r\n\t\t}\r\n\t\tfw.close();\r\n\t\tFileWriter fw1=new FileWriter(\"Land.txt\");\r\n\t\tfw1.write(\"LOCATION_NUMBER, owner\\n\");\r\n\t\tfor(int i=1;i<17;i++) {\r\n\t\t\tfw1.write(Land[i].PLACE_NUMBER+\",\"+Land[i].owner+\"\\n\");\r\n\t\t}\r\n\t\tfw1.close();\r\n\t}", "public void save() {\n CSVWriter csvWriter = new CSVWriter();\n csvWriter.writeToTalks(\"phase1/src/Resources/Talks.csv\", this.getTalkManager()); //Not implemented yet\n }", "private void writeDeviceInfo() {\n StringBuffer text = new StringBuffer(getDeviceReport());\n dataWriter.writeTextData(text, \"info.txt\");\n }", "public static void saveBoxScore(){\n Engine engine = Utility.getEngine();\n ArrayList<Player> homePlayers = engine.getHomePlayers();\n ArrayList<Player> awayPlayers = engine.getAwayPlayers();\n ArrayList<String> output = new ArrayList<String>();\n output.add(\"Home team\");\n for(Player player : homePlayers){\n Player upToDatePlayer = Utility.getPlayer(player);\n output.add(upToDatePlayer.toString());\n }\n\n output.add(\"Away team\");\n for(Player player : awayPlayers){\n Player upToDatePlayer = Utility.getPlayer(player);\n output.add(upToDatePlayer.toString());\n }\n\n try {\n Path path = Paths.get(Constants.OUTPUT_FILE_PATH);\n Files.write(path,output,StandardCharsets.UTF_8);\n } catch (Exception e){\n System.out.println(\"Exception: \" + e.toString());\n }\n\n System.exit(0);\n }", "public void save(){\n try{\n Date date = new Date();\n \n PrintWriter writer = new PrintWriter(\"data.MBM\", \"UTF-8\");\n \n writer.println(\"version:\"+MBMDriver.version);\n writer.println(\"numworlds:\" + worlds.size());\n writer.println(\"lastclosed:\" + date.toString());\n writer.println(\"outDir:\"+outputDir.toPath());\n \n for(int i = 0; i < worlds.size(); i++){\n \n writer.println(\"MBMWORLD:\"+worlds.get(i).getWorldFile().getName()+\":\"+worlds.get(i).getName()+\":\"+worlds.get(i).getWorldFile().toPath()+\":\"+worlds.get(i).getLastBackupDate());\n }\n \n writer.close();\n }catch(FileNotFoundException e){\n System.out.println(\"ERROR: Failed to Find File\");\n }catch(UnsupportedEncodingException e){\n System.out.println(\"ERROR: Unsupported Encoding Exception\");\n }\n }", "private void saveGame(int gameId, String fileName){\n\n }", "public static String getPlayerOutput(ClientController game_client){\n\t\tfloat[] info = game_client.getPlayerInfo();\n\t\tStringBuilder toReturn = new StringBuilder();\n\t\ttoReturn.append(getPlayerString(info));\n\n\t\tEntity pickedUp = game_client.getToInteract();\n\t\tif(pickedUp !=null){\n\t\t\t//if we want to pick up an item, send a pick up request in the form INTERACT [Item ID] [Player ID]\n\t\t\ttoReturn.append(\" \");\n\t\t\tif(game_client.useOnSelf){\n\t\t\t\ttoReturn.append(\"USE \");\n\t\t\t}else{\n\t\t\t\ttoReturn.append(\"INTERACT \");\n\t\t\t}\n\t\t\ttoReturn.append(pickedUp.getID());\n\t\t\ttoReturn.append(\" \");\n\t\t\ttoReturn.append(game_client.getCurrentPlayer().getID());\n\t\t}\n\t\treturn toReturn.toString();\n\t}", "void registerPlayer() throws IOException;", "public String save(){\r\n StringBuilder saveString = new StringBuilder(\"\");\r\n //currentPlayer, numPlayer, players[], \r\n saveString.append(currentPlayer + \" \");\r\n saveString.append(numPlayers + \" \");\r\n \r\n int i = 0;\r\n while(i < numPlayers){\r\n saveString.append(playerToString(players[i]) + \" \");\r\n i = i + 1;\r\n }\r\n\t\t\r\n\t\t//encrypt saveString\r\n\t\tString result = encryptSave(saveString.toString());\r\n \r\n return result;\r\n }", "public void toFile(String root){\n\t PrintWriter writer;\n\t\t try {\n\t \t writer = new PrintWriter(new File(root + \"/\" + username + \".txt\"));\n\t }catch(FileNotFoundException e) {\n\t \t System.out.println(e.getMessage());\n\t \t return;\n\t }\n\t writer.println(\"username: \" + username);\n\t writer.println(\"password: \" + password);\n\t writer.println(\"name: \" + name);\n\t writer.println(\"image: \" + imageLocation);\n\t writer.print(\"friends: \");\n\t for(String friend: friends){\n\t writer.print(friend + \",\");\n\t }\n\t writer.println();\n\t writer.println(\"posts:\");\n\t for(Post post: posts){\n\t writer.println(post.toString());\n\t }\n\t writer.flush();\n\t writer.close();\n\t }", "public String getSavePitchSave(String team) {\n\n String savePitchSave = \"\";\n\n // if the game status is in preview, pre-game, or warmup\n if (getGameStatus(team).equals(\"Preview\") || getGameStatus(team).equals(\"Pre-Game\") || getGameStatus(team).equals(\"Warmup\")) {\n try {\n if (compareDates(getGameInfo(team, \"original_date\"), 3)) {\n String throwinghand = getPlayerInfo(team, \"home_probable_pitcher\",\"throwinghand\");\n String number = \" #\" + getPlayerInfo(team, \"home_probable_pitcher\",\"number\") + \"\\n\";\n String wins = getPlayerInfo(team, \"home_probable_pitcher\",\"wins\");\n String losses = \"-\" + getPlayerInfo(team, \"home_probable_pitcher\",\"losses\");\n String era = \", \" + getPlayerInfo(team, \"home_probable_pitcher\",\"era\") + \" ERA\";\n\n savePitchSave = throwinghand + number + wins + losses + era;\n }\n else {\n savePitchSave = \"\";\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }\n // if the game is in progress get the current on-deck batter\n if (getGameStatus(team).equals(\"In Progress\")) {\n String ip = getPlayerInfo(team, \"pitcher\",\"ip\") + \" IP\";\n String er = getPlayerInfo(team, \"pitcher\",\"er\") + \" ER\";\n String era = getPlayerInfo(team, \"pitcher\",\"era\") + \" ERA\";\n\n savePitchSave = ip + \", \" + er + \", \" + era;\n }\n // if game is a final and a save has taken place\n if (getGameStatus(team).equals(\"Game Over\") || getGameStatus(team).equals(\"Final\") || getGameStatus(team).equals(\"Completed Early\")) {\n savePitchSave = \"(\" + getPlayerInfo(team, \"save_pitcher\", \"saves\") + \")\";\n }\n // if today is an off day or a save has not been recorded in the game\n if (savePitchSave.equals(\"(0)\") || savePitchSave.equals(\"()\")) {\n savePitchSave = \" \";\n }\n\n return savePitchSave;\n }", "String getInfo();", "public void save(PrintWriter pw) {\n\t\tpw.println(color);\n\t\tpw.println(name);\n\t\tpw.println(diceValue);\n\t\tpw.println(diceTossed);\n\t\tfor(int i = 1; i<=4; i++)\n\t\t\tif(hasPawn(i))\n\t\t\t\tpw.println(pawns[i-1].getPosition());\n\t\t\telse\n\t\t\t\tpw.println(0);\n\t}", "@Override\r\n//displays the property of defensive players to console\r\npublic String toString() {\r\n\t\r\n\tdouble feet = getHeight()/12;\r\n\tdouble inches = getHeight()%12;\r\n\t\r\n\treturn \"\\n\" + \"\\nDefensive Player: \\n\" + getName() \r\n\t+ \"\\nCollege: \" + getCollege() \r\n\t+ \"\\nHighschool: \" + getHighschool() \r\n\t+ \"\\nAge: \" + getAge() \r\n\t+ \"\\nWeight: \" + getWeight() \r\n\t+ \"\\nHeight: \" + feet + \" ft\" + \" \" + inches + \" in\" \r\n\t+ \"\\nTeam Number: \" + getNumber() \r\n\t+ \"\\nExperience: \" + getExperience()\r\n\t+ \"\\nTeam: \" + getTeam() \r\n\t+ \"\\nPosition: \" +getPosition() \r\n\t+ \"\\nTackles : \" + getTackles() \r\n\t+ \"\\nSacks: \" +getSacks() \r\n\t+ \"\\nInterceptions: \" + getInterceptions();\r\n}", "public void save()\n\t{\n\t\tif(entity != null)\n\t\t\t((SaveHandler)DimensionManager.getWorld(0).getSaveHandler()).writePlayerData(entity);\n\t}", "public void saveGame(File fileLocation);", "public void writeLog(){\n\t\ttry\n\t\t{\n\t\t\tFileWriter writer = new FileWriter(\"toptrumps.log\");\n\t\t\twriter.write(log);\n\t\t\twriter.close();\n\t\t\tSystem.out.println(\"log saved to toptrumps.log\");\n\t\t\t\n\t\t\tDataBaseCon.gameInfo(winName, countRounds, roundWins);\n\t\t\tDataBaseCon.numGames();\n\t\t\tDataBaseCon.humanWins();\n\t\t\tDataBaseCon.aIWins();\n\t\t\tDataBaseCon.avgDraws();\n\t\t\tDataBaseCon.maxDraws();\n\t\t\t\n\t\t} catch (IOException e)\n\t\t{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveUserCoordinatesHit(PrintWriter out){\r\n\t\t\r\n\t\tfor (int i = 0; i < Player.coordinatesHit.size(); i++) {\r\n\t\t\tout.print(\" \"+Player.coordinatesHit.get(i));\r\n\t\t}\r\n\t\tout.println(\"\");\r\n\t}", "public void saveGame() {\r\n\t\t//separator used by system\r\n\t\tString separator = System.getProperty(\"file.separator\");\r\n\t\t//path to where files will be saved\r\n\t\tString path = System.getProperty(\"user.dir\") + separator + \"src\" + separator + \"GameFiles\" + separator;\r\n\r\n\t\ttry {\r\n\r\n\t\t\t//Save the world objects\r\n\t\t\tString world_objects_name = EnvironmentVariables.getTitle() + \"WorldObjects\";\r\n\t\t\t//create a new file with name given by user with added text for identification\r\n\t\t\tFile world_objects_file = new File(path + world_objects_name + \".txt\");\r\n\t\t\tFileOutputStream f_world_objects = new FileOutputStream(world_objects_file);\r\n\t\t\tObjectOutputStream o_world_objects = new ObjectOutputStream(f_world_objects);\r\n\r\n\t\t\t//loop through list and write each object to file\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getWorldObjects()) {\r\n\t\t\t\to_world_objects.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_world_objects.flush();\r\n\t\t\to_world_objects.close();\r\n\t\t\tf_world_objects.flush();\r\n\t\t\tf_world_objects.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Save terrain is done the same ass world objects but we create a new file \r\n\t\t\t//with different added text\r\n\t\t\tString terrain_name = EnvironmentVariables.getTitle() + \"Terrain\";\r\n\t\t\tFile terrain_file = new File(path + terrain_name + \".txt\");\r\n\t\t\tFileOutputStream f_terrain = new FileOutputStream(terrain_file);\r\n\t\t\tObjectOutputStream o_terrain = new ObjectOutputStream(f_terrain);\r\n\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getTerrain()) {\r\n\t\t\t\to_terrain.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_terrain.flush();\r\n\t\t\to_terrain.close();\r\n\t\t\tf_terrain.flush();\r\n\t\t\tf_terrain.close();\r\n\t\t\t\r\n\t\t\t//Save main player, given own file but just a single object\r\n\t\t\tString main_player_name = EnvironmentVariables.getTitle() + \"MainPlayer\";\r\n\t\t\tFile main_player_file = new File(path + main_player_name + \".txt\");\r\n\t\t\tFileOutputStream f_main_player = new FileOutputStream(main_player_file);\r\n\t\t\tObjectOutputStream o_main_player = new ObjectOutputStream(f_main_player);\r\n\r\n\t\t\to_main_player.writeObject(EnvironmentVariables.getMainPlayer());\r\n\r\n\t\t\to_main_player.flush();\r\n\t\t\to_main_player.close();\r\n\t\t\tf_main_player.flush();\r\n\t\t\tf_main_player.close();\r\n\t\t\t\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t} \r\n\t\t\r\n\t\t//saving the environment variables\r\n\t\ttry {\r\n\t\t\tString env_name = EnvironmentVariables.getTitle() + \"EnvVariables\";\r\n\t\t\tFile env_file = new File(path + env_name + \".txt\");\r\n\t\t\t\r\n\t\t\tif(!env_file.exists()) {\r\n\t\t\t\tenv_file.createNewFile();\r\n\t\t }\r\n\t\t\t \r\n\t\t\t//FileWriter fw = new FileWriter(env_file);\r\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(env_file));\r\n\t\t\t//write each variable to a new line as a string\r\n\t\t\tbw.write(EnvironmentVariables.getTitle()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getWidth())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getHeight())); bw.newLine();\r\n\t\t\tbw.write(EnvironmentVariables.getPlanet()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMass())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getRadius())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getAirDensity())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMeter())); bw.newLine();\r\n\r\n\t\t\t\r\n\t\t\t//bw.flush();\r\n\t\t\tbw.close();\r\n\t\t\t\r\n\t\t}catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t}\r\n\t\t\r\n\t\tEnvironmentVariables.getTerrain().clear();\r\n\t\tEnvironmentVariables.getWorldObjects().clear();\r\n\t}", "private void writeFile(List<ClubPointsDTO> clubs) {\n\t\tFileWriter file = null;\n\t\ttry {\n\n\t\t\tfile = new FileWriter(\"clubs.txt\");\n\n\t\t\t// Escribimos linea a linea en el fichero\n\t\t\tfile.write(\"CLUB\\tPUNTOS\\r\\n\");\n\t\t\tfor(ClubPointsDTO c : clubs)\n\t\t\t\tfile.write(c.getName()+\"\\t\"+c.getPoints()+\"\\r\\n\");\n\n\t\t\tfile.close();\n\n\t\t} catch (Exception ex) {\n\t\t\tthrow new FileException();\n\t\t}\n\t}", "void setOpp(PrintWriter out_opp){ this.out_opp = out_opp; }", "String getNewPlayerName();", "public String toString() {\n\t\treturn \"Player \" + playerNumber + \": \" + playerName;\n\t}", "void getInfo() {\n\tSystem.out.println(\"My name is \"+name+\" and I am going to \"+school+\" and my grade is \"+grade);\n\t}", "public void write() {\n\t\tint xDist, yDist;\r\n\t\ttry {\r\n\t\t\tif (Pipes.getPipes().get(0).getX() - b.getX() < 0) { // check if pipes are behind bird\r\n\t\t\t\txDist = Pipes.getPipes().get(1).getX() - b.getX();\r\n\t\t\t\tyDist = Pipes.getPipes().get(1).getY() - b.getY() + Pipes.height;\r\n\t\t\t} else {\r\n\t\t\t\txDist = Pipes.getPipes().get(0).getX() - b.getX();\r\n\t\t\t\tyDist = Pipes.getPipes().get(0).getY() - b.getY() + Pipes.height;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\txDist = -6969;\r\n\t\t\tyDist = -6969;\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Pipe out of bounds\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tFile file = new File(\"DATA.txt\");\r\n\t\t\tFileWriter fr = new FileWriter(file, true);\r\n\t\t\tfr.write(xDist + \",\" + yDist + \",\" + b.getYVel() + \",\" + didJump);\r\n\t\t\tfr.write(System.getProperty(\"line.separator\")); // makes a new line\r\n\t\t\tfr.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Wtrie file error\");\r\n\t\t}\r\n\t}", "public void outputToFile(StatementList original, StatementList mutant)\n {\n if (comp_unit == null) \n \t return;\n\t\tif(original.toString().equalsIgnoreCase(mutant.toString()))\n\t\t\treturn;\n String f_name;\n num++;\n f_name = getSourceName(\"SDL\");\n String mutant_dir = getMuantID(\"SDL\");\n\n try \n {\n\t\t PrintWriter out = getPrintWriter(f_name);\n\t\t SDL_Writer writer = new SDL_Writer(mutant_dir, out);\n\t\t writer.setMutant(original, mutant);\n writer.setMethodSignature(currentMethodSignature);\n\t\t comp_unit.accept( writer );\n\t\t out.flush(); \n\t\t out.close();\n } catch ( IOException e ) \n {\n\t\t System.err.println( \"fails to create \" + f_name );\n } catch ( ParseTreeException e ) {\n\t\t System.err.println( \"errors during printing \" + f_name );\n\t\t e.printStackTrace();\n }\n }", "private static void addInfo(String info){\n\tif (started) {\n\t try{\n\t\tif (verbose) {\n\t\t System.out.println(info);\n\t\t System.out.println(newLine);\n\t\t}\n\t\tfStream.writeBytes(info);\n\t\tfStream.writeBytes(newLine);\n\t }catch(IOException e){\n\t }\n\t}\n }", "public void printAssistants(Player player);", "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void getInfo() {\n System.out.println(\"Content : \" + content);\n System.out.println(\"Name : \" + name);\n System.out.println(\"Location : (\" + locX + \",\" + locY + \")\");\n System.out.println(\"Weight : \" + String.format(\"%.5f\", weight) + \" kg/day\");\n System.out.println(\"Habitat : \" + habitat);\n System.out.println(\"Type : \" + type);\n System.out.println(\"Diet : \" + diet);\n System.out.println(\"Fodder : \" + String.format(\"%.5f\", getFodder()) + \" kg\");\n System.out.println(tamed ? \"Tame : Yes \" : \"Tame : No \");\n System.out.println(\"Number of Legs : \" + legs);\n }", "public static ArrayList<String> getPlayerInformation() {\n clearScreen();\n ArrayList<String> Names = new ArrayList<String>();\n for (int i = 1; i < 3; i++) {\n System.out.println(\"Player \" + i + \"'s Name:\");\n Names.add(Input.nextLine());\n clearScreen();\n }\n return Names;\n }", "void onGameSaved(File file);", "public static void schoolInfo(Player player) {\n\t\t\n\t}", "public void txtResponse(String response , Player player);" ]
[ "0.7862921", "0.7623167", "0.7127983", "0.7068633", "0.70095825", "0.6751721", "0.6726031", "0.6647733", "0.6602057", "0.64728385", "0.6391163", "0.6307272", "0.6279438", "0.62787783", "0.6277185", "0.6265797", "0.62435555", "0.6223375", "0.6156025", "0.61293375", "0.6124236", "0.6103064", "0.6063953", "0.60501385", "0.6022209", "0.6019257", "0.59993595", "0.59893775", "0.5984081", "0.59263456", "0.59203696", "0.5866228", "0.58421004", "0.58070797", "0.580086", "0.5773267", "0.5710297", "0.570998", "0.57013804", "0.57012165", "0.5696926", "0.5695253", "0.5664638", "0.56482714", "0.5643769", "0.5639731", "0.5635558", "0.56273305", "0.5619345", "0.56175256", "0.56156576", "0.56153697", "0.5612749", "0.5612472", "0.5608039", "0.5604685", "0.5591848", "0.5581043", "0.55613595", "0.5559456", "0.55589795", "0.55568975", "0.55533624", "0.55409616", "0.5539713", "0.5534156", "0.5531631", "0.5520297", "0.55082685", "0.54809254", "0.5477251", "0.5472599", "0.5467416", "0.54639393", "0.5450481", "0.5445726", "0.5444738", "0.54401106", "0.5431479", "0.54310226", "0.5428355", "0.5427393", "0.54235256", "0.54139787", "0.5413259", "0.54090416", "0.54039824", "0.5393639", "0.5383709", "0.5376749", "0.5374154", "0.5371691", "0.5365359", "0.5361169", "0.5358995", "0.5353165", "0.53525436", "0.5336692", "0.53338027", "0.53337055", "0.53329366" ]
0.0
-1
write another method to read data from a file and insert it into CUR_Player
public void save(){ Player temp = Arena.CUR_PLAYER; try{ FileOutputStream outputFile = new FileOutputStream("./data.sec"); ObjectOutputStream objectOut = new ObjectOutputStream(outputFile); objectOut.writeObject(temp); objectOut.close(); outputFile.close(); } catch(FileNotFoundException e){ System.out.print("Cannot create a file at that location"); } catch(SecurityException e){ System.out.print("Permission Denied!"); } catch(IOException e){ System.out.println("Error 203"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadCurrentPlayer() {\n\t\tScanner sc;\n\t\tFile file = new File(\"data/current_player\");\n\t\tif(file.exists()) {\n\t\t\ttry {\n\t\t\t\tsc = new Scanner(new File(\"data/current_player\"));\n\t\t\t\tif(sc.hasNextLine()) {\n\t\t\t\t\tString player = sc.nextLine();\n\t\t\t\t\t_currentPlayer= player;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t_currentPlayer = null;\n\t\t\t\t}\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}\n\t\telse {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/current_player\");\n\t\t\t_currentPlayer = null;\n\t\t}\n\t}", "public void load(){\n Player temp;\n try{\n FileInputStream inputFile = new FileInputStream(\"./data.sec\");\n ObjectInputStream objectIn = new ObjectInputStream(inputFile);\n temp = (Player)objectIn.readObject();\n Arena.CUR_PLAYER = temp;\n objectIn.close();\n inputFile.close(); \n }\n catch(FileNotFoundException e ){\n System.err.print(\"data.sec not found\");\n }\n catch(IOException e){\n System.out.println(\"Error 201\");\n }\n catch(ClassNotFoundException e){\n System.out.println(\"Error 202\");\n }\n }", "public void loadPlayers(String filename) throws IOException {\r\n //TODO:4\r\n // 1. use try-with-resources syntax to ensure the file is closed\r\n // 2. read the number of players, then read an empty line\r\n // 3. for each player:\r\n // 3.1 read playerName, gold, sciencePoint, productionPoint, numCities and numMinisters separated by blank characters.\r\n // 3.2 create a player of corresponding values\r\n // 3.3 for (int i=1; i<numCities; i++):\r\n // read population, troops, cropYields\r\n // create a corresponding city object and add to the player's city list\r\n // 3.4 for (int i=1; i<numMinisters; i++):\r\n // read type, intelligence, experience, leadership\r\n // use switch-case to create a corresponding minister object and add to the player's minister list\r\n // check for invalid formats and throw custom exceptions.\r\n // (When there is any invalid minister type, throw InvalidMinisterTypeException.\r\n // Only \"WarGeneral\", \"Scientist\" and \"Economist\" are allowed.)\r\n // 3.5 add the player to the ArrayList<Player> players\r\n // Hint: use add() method of ArrayList.\r\n players = new ArrayList<>();\r\n File inputFile = new File(filename);\r\n try(\r\n Scanner reader = new Scanner(inputFile);\r\n ) {\r\n int numOfPlayers = reader.nextInt();\r\n String line = \"\";\r\n for (int i = 0; i < numOfPlayers; i++) {\r\n String name = reader.next();\r\n int gold = reader.nextInt();\r\n int sciencePoint = reader.nextInt();\r\n int productionPoint = reader.nextInt();\r\n Player newPlayer = new Player(name, gold, sciencePoint, productionPoint);\r\n this.players.add(newPlayer);\r\n\r\n int numOfCity = reader.nextInt();\r\n int numOfMin = reader.nextInt();\r\n\r\n for (int j = 0; j < numOfCity; j++) {\r\n int cityID = reader.nextInt();\r\n String cName = reader.next();\r\n int pop = reader.nextInt();\r\n int troops = reader.nextInt();\r\n int cropYields= reader.nextInt();\r\n\r\n City temp = new City(cityID, cName, pop, troops, cropYields);\r\n this.players.get(i).getCities().add(temp);\r\n }\r\n\r\n for (int j = 0; j < numOfMin; j++) {\r\n String mName = reader.next();\r\n int intel = reader.nextInt();\r\n int exp = reader.nextInt();\r\n int lead = reader.nextInt();\r\n\r\n if (mName.equals(\"Scientist\")) {\r\n Scientist temp = new Scientist(intel, exp, lead);\r\n this.players.get(i).getMinisters().add(temp);\r\n }\r\n else if (mName.equals(\"Economist\")) {\r\n Economist temp = new Economist(intel, exp, lead);\r\n this.players.get(i).getMinisters().add(temp);\r\n }\r\n else if (mName.equals(\"WarGeneral\")) {\r\n WarGeneral temp = new WarGeneral(intel, exp, lead);\r\n this.players.get(i).getMinisters().add(temp);\r\n }\r\n else {\r\n throw new InvalidMinisterTypeException(\"Only \\\"WarGeneral\\\", \\\"Scientist\\\" and \\\"Economist\\\" are allowed\");\r\n }\r\n }\r\n }\r\n }\r\n }", "public static ArrayList<Player> readPlayersFromFile() \r\n {\r\n //Inisialize Arraylist \r\n ArrayList<Player> players = new ArrayList<Player>();\r\n //Inisialize FileInputStream\r\n FileInputStream fileIn = null;\r\n\r\n try \r\n {\r\n //Establish connection to file \r\n fileIn = new FileInputStream(\"players.txt\");\r\n while (true) \r\n {\r\n //Create an ObjectOutputStream \r\n ObjectInputStream objectIn = new ObjectInputStream(fileIn);\r\n //Read a Player object from the file and add it to the ArrayList\r\n players.add((Player)objectIn.readObject());\r\n }//end while\r\n\r\n }\r\n catch (Exception e)\r\n {\r\n //System.out.println(e);\r\n }\r\n finally \r\n {\r\n usernamesTaken.clear();\r\n\r\n for(int i = 0; i < players.size(); i++)\r\n {\r\n usernamesTaken.add(players.get(i).getUsername());\r\n }//end for\r\n\r\n //Try to close the file and return the ArrayList\r\n try\r\n {\r\n //Check if the end of the file is reached\r\n if (fileIn != null)\r\n { \r\n //Close the file \r\n fileIn.close();\r\n //Return the ArrayList of players\r\n return players;\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n //System.out.println(e)\r\n }//end try \r\n\r\n //Return null if there is an excetion \r\n return null;\r\n }//end try \r\n }", "public void loadPlayer(HashMap<Integer, Player> Player_HASH){\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+\"Player.csv\"));\r\n Scanner dataScanner = null;\r\n int index = 0;\r\n \r\n while (scanner.hasNextLine()) {\r\n dataScanner = new Scanner(scanner.nextLine());\r\n \r\n if(Player_HASH.size() == 0){\r\n dataScanner = new Scanner(scanner.nextLine());\r\n }\r\n \r\n dataScanner.useDelimiter(\",\");\r\n Player player = new Player(-1, \"\", Color.BLACK, -1, -1);\r\n \r\n while (dataScanner.hasNext()) {\r\n String data = dataScanner.next();\r\n if (index == 0) {\r\n player.setID(Integer.parseInt(data));\r\n } else if (index == 1) {\r\n player.setName(data);\r\n } else if (index == 2) {\r\n player.setColor(Color.valueOf(data));\r\n } else if (index == 3) {\r\n player.setOrder(Integer.parseInt(data));\r\n } else {\r\n System.out.println(\"invalid data::\" + data);\r\n }\r\n index++;\r\n }\r\n \r\n Player_HASH.put(player.getID(), player);\r\n index = 0;\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadPlayer\");\r\n }\r\n }", "public void addPlayerToPlayers(String username) throws IOException{\r\n\t\tScanner readPlayers = new Scanner(new BufferedReader(new FileReader(\"players.txt\")));\r\n\t\tint numberOfPlayers = readPlayers.nextInt();\r\n\t\tif(numberOfPlayers == 0) { // no need to store data to rewrite\r\n\t\t\ttry {\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(numPlayers.toString()); // write userId as 1 because only 1 player\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t/* Store all current usernames and userIds in a directory to rewrite to file */\r\n\t\t\tPlayerName[] directory = new PlayerName[numberOfPlayers];\r\n\t\t\t\r\n\t\t\tfor(int index = 0; index < numberOfPlayers; index++) {\r\n\t\t\t\tPlayerName playerName = new PlayerName();\r\n\t\t\t\tplayerName.setUserId(readPlayers.nextInt());\r\n\t\t\t\tplayerName.setUserName(readPlayers.next());\r\n\t\t\t\tdirectory[index] = playerName;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treadPlayers.close();\r\n\t\t\t/* Add a new player */\r\n\t\t\ttry {\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\"); // maintains format of players.txt\r\n\t\t\t\t\r\n\t\t\t\tfor(int index = 0; index < numberOfPlayers - 1; index++) { // - 1 because it was incremented\r\n\t\t\t\t\tInteger nextId = directory[index].getUserId();\r\n\t\t\t\t\tplayerWriter.write(nextId.toString());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t\tplayerWriter.write(directory[index].getUserName());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tInteger lastId = numberOfPlayers;\r\n\t\t\t\tplayerWriter.write(lastId.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treadPlayers.close();\r\n\t}", "@Override\n\tpublic void loadPlayerData(InputStream is) {\n\t}", "@Override\n\tpublic void loadPlayerData(InputStream is) {\n\n\t}", "@Override\n\tpublic void loadPlayerData(InputStream arg0)\n\t{\n\n\t}", "@Override\n\tpublic void loadPlayerData(InputStream arg0) {\n\n\t}", "public void loadPlayerCard(HashMap<Integer, PlayerCard> PlayerCard_HASH, String file_name){\r\n PlayerCardFactory playerCardFactory = new PlayerCardFactory();\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+file_name));\r\n \r\n while (scanner.hasNextLine()) {\r\n String line = scanner.nextLine();\r\n \r\n if(PlayerCard_HASH.size() == 0){\r\n line = scanner.nextLine();\r\n }\r\n \r\n PlayerCard playerCard = playerCardFactory.getPlayerCard(line);\r\n /*if(playerCard.getPlayerID() == 0)\r\n playerCard.setPlayerID(ConstantField.DEFAULT_UNDEFINED_PLAYID);\r\n if(playerCard.getOrder() == 0)\r\n playerCard.setOrder(ConstantField.DEFAULT_UNDEFINED_ORDER);\r\n */\r\n PlayerCard_HASH.put(playerCard.getId(), playerCard);\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadPlayerCard\");\r\n }\r\n }", "public ArrayList<Player> importPlayerData() {\n \n try {\n //Try to access player.csv in the given directory\n\t\t\tFile file = new File(\"data\\\\player.csv\");\n Scanner fileIn = new Scanner(file);\n \n fileIn.skip(\"userName,fullName,password,gold,exp,noOfLand\");\n \n\t\t\t//Use comma as delimiter in extracting various player info\n\t\t\tfileIn.useDelimiter(\",|\\r\\n|\\n\");\n \n while (fileIn.hasNext()) {\n String userName = fileIn.next().trim();\n String fullName = fileIn.next().trim();\n String password = fileIn.next().trim();\n int gold = fileIn.nextInt();\n int exp = fileIn.nextInt();\n\t\t\t\tint noOfLand = fileIn.nextInt();\n\t\t\t\t\n\t\t\t\t//Create new players based on extracted info\n Player player = new Player(userName, fullName, password, gold, exp, noOfLand);\n\t\t\t\t\n\t\t\t\t//Add players to playerList\n playerList.add(player);\n }\n \n }\n \n catch (IOException e) {\n //Specify the location of IOException\n\t\t\te.printStackTrace();\n }\n\t\t\n\t\treturn playerList;\n\t}", "private void readFileAndStoreData_(String fileName) {\n In in = new In(fileName);\n int numberOfTeams = in.readInt();\n int teamNumber = 0;\n while (!in.isEmpty()) {\n assignTeam_(in, teamNumber);\n assignTeamInfo_(in, numberOfTeams, teamNumber);\n teamNumber++;\n }\n }", "public Roster(String fileName){\n players = new ArrayList<>();\n try {\n Scanner input = new Scanner(new File(fileName));\n\n // Loop will cycle through all the \"words\" in the text file\n while (input.hasNext()){\n // Concatenates the first and last names\n String name = input.next();\n name += \" \" + input.next();\n double attackStat = input.nextDouble();\n double blockStat = input.nextDouble();\n // Creates a new Player object and stores it in the players ArrayList\n players.add(new Player(name, attackStat, blockStat));\n }\n }\n catch (IOException e) {\n System.out.println(\"IO Exception \" + e);\n }\n\n }", "static String[] readPlayerData() throws FileNotFoundException{\n\t\tjava.io.File player = new java.io.File(\"Players/\" + Player.getName() +\".txt\");\n\t\tjava.util.Scanner fileScanner = new java.util.Scanner(player); \n\t\tString[] tempPlayerData = new String[17];\n\t\tint counter = 0;\n\t\twhile (fileScanner.hasNextLine()) {\n\t\t\tString s = fileScanner.nextLine();\n\t\t\tif (!s.startsWith(\"#\")){\n\t\t\t\ttempPlayerData[counter] = s;\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\tfileScanner.close();\n\t\treturn tempPlayerData;\n\t}", "@Override\r\n\tpublic void SavePlayerData() {\r\n\r\n Player player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerInfo.txt\";\r\n\t\tString playerlifepoint = \"\"+player.getLifePoints();\r\n\t\tString playerArmore = player.getArmorDescription();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerlifepoint);\r\n\t\t\tprint.println(playerArmore);\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public Game() throws IOException\n\t {\n\t\t //reading the game.txt file \n\t\t try\n\t\t\t{\n\t\t\t \tHeliCopIn = new Scanner(HeliCopFile);\n\t\t\t\tString line = \"\";\n\t\t\t\twhile ( HeliCopIn.hasNext() )\n\t\t\t\t{\n\t\t\t\t\tline = HeliCopIn.nextLine();\n\t\t\t\t\tStringTokenizer GameTokenizer = new StringTokenizer(line);\n\t\t\t\t\tif ( !GameTokenizer.hasMoreTokens() || GameTokenizer.countTokens() != 5 )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint XCoord = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint YCoord = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint health = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint NumRocketsStart = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint NumBulletsStart = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tif (Player.Validate(line) == true)\n\t\t\t\t\t{\n\t\t\t\t\t\t//creating a new player and initialising the number of bullets; \n\t\t\t\t\t pl = new Player(XCoord,YCoord,health,NumRocketsStart,NumBulletsStart); \n\t\t\t\t\t pl.NumBullets = pl.GetNumBulletsStart(); \n\t\t\t\t\t pl.NumRockets = pl.GetnumRocketsStart(); \n\t\t\t\t\t \n\t\t\t\t\t//\tSystem.out.println(XCoord) ;\n\t\t\t\t\t\t//System.out.println(YCoord) ;\n\t\t\t\t\t\t//System.out.println(health) ;\n\t\t\t\t\t\t//System.out.println(NumRocketsStart) ;\n\t\t\t\t\t\t//System.out.println(NumBulletsStart) ;\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}\n\t\t\tcatch (FileNotFoundException ex)\n\t\t\t{\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tif ( HeliCopIn != null )\n\t\t\t\t{\n\t\t\t\t\tHeliCopIn.close();\n\t\t\t\t}\n\t\t\t}\n\t\t \n\t\t \n\t\t //loading the background image and explosion image\n\t\t try {\n\t\t\t\tBackGround = ImageIO.read(new File(\"images\\\\finalcloud.jpg\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tExplosion = ImageIO.read(new File(\"images\\\\explosion.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tGameOver = ImageIO.read(new File(\"images\\\\gameover.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tGameWin = ImageIO.read(new File(\"images\\\\gamewin.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\n\t\t\t\t\t\t\t\t\t\n\t\t\tupdate();\n\t\t\t\n\t\t\tint del = 2000; \n\t\t // createEnemyHelicopter(); \n\t\t\ttime = new Timer(del , new ActionListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t{\n\t\t\t\t\tcreateEnemyHelicopter(); \n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t});\n\t\t\ttime.start();\n\t\t\t\n\t\t\ttime = new Timer(delay , new ActionListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t{\n\t\t\t\t\tif (GameOn==true ){\n\t\t\t\t\t\t updateEnemies(); \n\t\t\t\t \t UpdateBullets(); \n\t\t\t\t \t UpdateRockets(); \n\t\t\t\t \t pl.Update(); \n\t\t\t\t \t repaint();\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t \t try {\n\t\t\t\t\t\tWiriteToBinary();\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t});\n\t\t\ttime.start();\n\t\t\n\t\t\t//WiriteToBinary(); \n\t\t\t\n\t }", "public static void updateScores(BattleGrid player) {\n\t String fileName = SCORE_FILE_NAME;\n\t ArrayList<String> listOfScores = new ArrayList<String>(); //Also contains player names\n\t \n\t //First read old content of file and place in string ArrayList\n\t try {\n\t FileReader readerStream = new FileReader(fileName);\n\t BufferedReader bufferedReader = new BufferedReader(readerStream);\n\t \n\t //Read First Line\n\t String readLine = bufferedReader.readLine();\n\t \n\t while(readLine != null) {\n\t listOfScores.add(readLine);\n\t readLine = bufferedReader.readLine();\n\t }\n\t \n\t readerStream.close();\n\t }\n\t catch (IOException e) {\n\t //Situation where file was not able to be read, in which case we ignore assuming we create a new file.\n\t System.out.println(\"Failed to create stream for reading scores. May be ok if its the first time we set scores to this file.\");\n\t \n\t }\n\t \n\t //Determine location of new player (if same score then first in has higher ranking)\n\t int playerScore = player.getPlayerScore();\n\t int storedPlayerScore;\n\t ArrayList<String> lineFields = new ArrayList<String>();\n\t \n\t //Run code only if there are scores previously in file and the name of the user is not null\n\t if (!listOfScores.isEmpty() && (player.name != null)) {\n\t for (int index = 0; index < listOfScores.size(); index++) {\n\t //Retrieve String array of fields in line\n\t lineFields = (returnFieldsInLine(listOfScores.get(index)));\n\t \n\t //Convert score from string to int (2nd element)\n\t storedPlayerScore = Integer.parseInt(lineFields.get(1));\n\t lineFields.clear(); //Clear out for next set\n\t \n\t //Compare with new score to be added and inserts, shifting old element right\n\t if (storedPlayerScore < playerScore) {\t \n\t listOfScores.add(index, player.name + DELIMITER + playerScore);\t \n\t\t break; //Once we found the correct location we end the loop\n\t } \n\t }\n\t }\n\t //When it's the first code to be entered\n\t else\n\t listOfScores.add(player.name + DELIMITER + playerScore);\n\t \n\t //Delete old content from file and add scores again with new one.\n\t try {\n\t FileWriter writerStream = new FileWriter(fileName);\n\t PrintWriter fileWriter = new PrintWriter(writerStream);\n\t \n\t for (String index : listOfScores) {\n\t fileWriter.println(index);\n\t }\n\t \n\t writerStream.close(); //Resource Leaks are Bad! :(\n\t }\n\t catch (IOException e) {\n\t System.out.println(\"Failed to create stream for writing scores.\");\n\t } \n\t \n\t }", "private void readScores() {\n final List<Pair<String, Integer>> list = new LinkedList<>();\n try (DataInputStream in = new DataInputStream(new FileInputStream(this.file))) {\n while (true) {\n /* reads the name of the player */\n final String name = in.readUTF();\n /* reads the score of the relative player */\n final Integer score = Integer.valueOf(in.readInt());\n list.add(new Pair<String, Integer>(name, score));\n }\n } catch (final Exception ex) {\n }\n this.sortScores(list);\n /* if the list was modified by the cutting method i need to save it */\n if (this.cutScores(list)) {\n this.toSave = true;\n }\n this.list = Optional.of(list);\n\n }", "private void findAndConstructPlayerFromDatabase(int id) throws IOException {\n openPlayerDataFromCSV(); // generate the file reader for the csv\n csvReader.readLine(); // read the first line through because it's just the headers\n String row = csvReader.readLine();\n\n // create a loop that reads until we find the player in the csv file\n while (row != null) {\n List<String> playerData = Arrays.asList(row.split(\",\"));\n playerID = Integer.parseInt(playerData.get(NbaGachaApp.ID_INDEX));\n if (playerID == id) {\n setPlayerData(playerData);\n row = null; // we've created the player so don't need to keep looking\n } else {\n row = csvReader.readLine(); // keep looking until we find the player\n }\n }\n\n }", "private void SetCurrentPlayer() throws IOException\n {\n if( mTeamsComboBox.getSelectedItem() != null )\n {\n String team = mTeamsComboBox.getSelectedItem().toString();\n String position = mPositionComboBox.getSelectedItem().toString();\n String playerData = GetPlayerString(team, position);\n if( playerData != null )\n SetPlayerData(playerData);\n }\n }", "public void load()\n\t{\n\t\tfor(String s : playerData.getConfig().getKeys(false))\n\t\t{\n\t\t\tPlayerData pd = new PlayerData(playerData, s);\n\t\t\tpd.load();\n\t\t\tdataMap.put(s, pd);\n\t\t}\n\t}", "static void savePlayerData() throws IOException{\n\t\t/*\n\t\t\tFile playerData = new File(\"Players/\" + Player.getName() +\".txt\");\n\t\t\tif (!playerData.exists()) {\n\t\t\t\tplayerData.createNewFile(); \n\t\t\t}\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(\"Players/\" + Player.getName() +\".txt\"));\n\t\toos.writeObject(Player.class);\n\t\toos.close();\n\t\t*/\n\t\t\n\t\tString[] player = Player.getInfoAsStringArray();\n\t\tjava.io.File playerData = new java.io.File(\"Players/\" + player[0] +\".txt\");\n\t\tif (!playerData.exists()){\n\t\t\tplayerData.createNewFile();\n\t\t}\n\t\tjava.io.PrintWriter writer = new java.io.PrintWriter(playerData);\n\t\t//[0] Name, \n\t\twriter.println(\"# Name\");\n\t\twriter.println(player[0]);\n\t\t//[1] Level, \n\t\twriter.println(\"# Level\");\n\t\twriter.println(player[1]);\n\t\t//[2] getRoleAsInt(),\n\t\twriter.println(\"# Role/Class\");\n\t\twriter.println(player[2]);\n\t\t//[3] exp,\n\t\twriter.println(\"# Exp\");\n\t\twriter.println(player[3]);\n\t\t//[4] nextLevelAt,\n\t\twriter.println(\"# Exp Required for Next Level Up\");\n\t\twriter.println(player[4]);\n\t\t//[5] health,\n\t\twriter.println(\"# Current Health\");\n\t\twriter.println(player[5]);\n\t\t//[6] maxHealth,\n\t\twriter.println(\"# Max Health\");\n\t\twriter.println(player[6]);\n\t\t//[7] intelligence,\n\t\twriter.println(\"# Intelligence\");\n\t\twriter.println(player[7]);\n\t\t//[8] dexterity,\n\t\twriter.println(\"# Dexterity\");\n\t\twriter.println(player[8]);\n\t\t//[9] strength,\n\t\twriter.println(\"# Strength\");\n\t\twriter.println(player[9]);\n\t\t//[10] speed,\n\t\twriter.println(\"# Speed\");\n\t\twriter.println(player[10]);\n\t\t//[11] protection,\n\t\twriter.println(\"# Protection\");\n\t\twriter.println(player[11]);\n\t\t//[12] accuracy,\n\t\twriter.println(\"# Accuracy\");\n\t\twriter.println(player[12]);\n\t\t//[13] dodge,\n\t\twriter.println(\"# Dodge\");\n\t\twriter.println(player[13]);\n\t\t//[14] weaponCode,\n\t\twriter.println(\"# Weapon's Code\");\n\t\twriter.println(player[14]);\n\t\t//[15] armorCode,\n\t\twriter.println(\"# Armor's Code\");\n\t\twriter.println(player[15]);\n\t\t//[16] Gold,\n\t\twriter.println(\"# Gold\");\n\t\twriter.println(player[16]);\n\t\twriter.close();\n\t\t\n\t}", "public void load() throws IOException {\r\n File file = new File(this.filename);\r\n //if file exist.\r\n if (file.exists() && !file.isDirectory()) {\r\n ObjectInputStream is = null;\r\n try {\r\n //opening and reaind the source file\r\n is = new ObjectInputStream(new FileInputStream(this.filename));\r\n SettingsFile temp = (SettingsFile) is.readObject();\r\n //import the loaded file data to the current core.SettingsFile\r\n this.boardSize = temp.getBoardSize();\r\n this.firstPlayer = temp.getFirstPlayer();\r\n this.secondPlayer = temp.getSecondPlayer();\r\n this.player1Color = temp.getPlayer1Color();\r\n this.player2Color = temp.getPlayer2Color();\r\n } catch (IOException e) {\r\n System.out.println(\"Error while loading\");\r\n } catch (ClassNotFoundException e) {\r\n System.out.println(\"Problem with class\");\r\n } finally {\r\n if (is != null) {\r\n is.close();\r\n }\r\n }\r\n }\r\n //if no file, set default settings.\r\n else {\r\n save(SIZE, FIRST_PLAYER, SECOND_PLAYER, PLAYER1COLOR, PLAYER2COLOR);\r\n }\r\n }", "public static void addGame(String fileName, String newRec)\n {\n String data[]= new String[20]; //max 20 characters per input\n int count = 0;\n int a = 0;\n try\n {\n DataInput f1 = new DataInputStream(new FileInputStream(fileName));\n String txt = f1.readLine();\n while(txt != null)//Read all records from file\n {\n data[a++] = txt;\n txt = f1.readLine();\n ++count;\n }\n DataOutput f2 = new DataOutputStream(new FileOutputStream(fileName));\n for(int i = 0; i < count; i++)\n {\n f2.writeBytes(data[i] + \"\\r\\n\"); //Write to file\n }\n f2.writeBytes(newRec);//insert new record \n }\n catch(Exception e)\n {\n }\n }", "public Player get(String filepath) throws Exception {\r\n File playerFile = new File(filepath);\r\n //content contains a string splitted by \",\" name,birthdate,height,clubName\r\n String content = read(playerFile);\r\n// System.out.println(filepath+\"'s content=\"+content);\r\n String[] contents = content.split(\",\");\r\n String name = contents[0];\r\n String birthdate = contents[1];\r\n int height = Integer.parseInt(contents[2]);\r\n int goal = Integer.parseInt(contents[3]);\r\n String clubName = contents[4];\r\n String role = contents[5];\r\n// System.out.println(\"name=\"+name+\",birthdate=\"+birthdate+\",height=\"+height+\",clubName=\"+clubName+\",role=\"+role);\r\n Club club = Club.dao.exists(clubName);\r\n Player player = null;\r\n try {\r\n if (club!=null){\r\n player = new Player(name,birthdate,height,goal,clubName,role);\r\n }else {\r\n throw new Exception(\"Club \"+clubName+\" not exists!\");\r\n }\r\n }catch (Exception e){\r\n System.out.println(\"Error in returning a player\");\r\n }\r\n\r\n return player;\r\n }", "@Override\n\tpublic void loadPlayer() {\n\t\t\n\t}", "public void fileReadGameHistory(String filename)\n {\n \t//ArrayList<GameObject> gameObject = new ArrayList<>();\n\t\tFileReader file = null;\n\t\ttry {\n\t\t\tfile = new FileReader(filename);\n\t\t} catch (FileNotFoundException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(filename);\n\t\tBufferedReader br = new BufferedReader(file);\n\t\tString s = \"\";\n\t\ttry\n\t\t{\n\t\t\twhile((s = br.readLine()) != null )\n\t\t\t{\n\t\t\t\tString[] prop1 = s.split(\"#\");\n\t\t\t\tSystem.out.println(prop1[0] + \" fgdfsgfds \" + prop1[1]);\n\t\t\t\tString indexOfList = prop1[0];\n\t\t\t\tString[] prop2 = prop1[1].split(\",\");\n\t\t\t\tString[] prop3;\n\t\t\t\tString[] prop4 = indexOfList.split(\";\");\n\t\t\t\t//gameObject.add(new GameObject(indexOfList));\n\t\t\t\tcount = count +1;\n\t\t\t\texistCount = existCount + 1;\n\t\t\t\tif (indexOfList.charAt(0) == 's')//when this line is data of a swimming game\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(prop4[0]);\n\t\t\t\t\tgames.add(new Swimming(prop4[1],\"Swimming\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'c')//when this line is data of a cycling game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Cycling(prop4[1],\"Cycling\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'r')//when this line is data of a running game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Running(prop4[1],\"Running\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "private void readFile() {\n\t\tint newPlayerScore = level.animal.getPoints();\n\t\t\n\t\tlevel.worDim = 30;\n\t\tlevel.wordShift = 25;\n\t\tlevel.digDim = 30;\n\t\tlevel.digShift = 25;\n\t\t\n\t\tfor( int y =0; y<10; y++ ) { //display placeholder numbers\n\t\t\tfor( int x=0; x<4; x++ ) {\n\t\t\t\tbackground.add(new Digit( 0, 30, 470 - (25*x), 200 + (35*y) ) );\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry { //display highscores from highscores.txt\n\t\t\tScanner fileReader = new Scanner(new File( System.getProperty(\"user.dir\") + \"\\\\highscores.txt\"));\n\t\t\t\n\t\t\tint loopCount = 0;\n\t\t\twhile( loopCount < 10 ) {\n\t\t\t\tString playerName = fileReader.next() ;\n\t\t\t\tString playerScore = fileReader.next() ;\n\t\t\t\tint score=Integer.parseInt(playerScore);\n\t\t\t\t\n\t\t\t\tif( newPlayerScore >= score && newHighScore == false ) {\n\t\t\t\t\tstopAt = loopCount;\n\t\t\t\t\tnewHighScore = true;\n\t\t\t\t\tlevel.wordY = 200 + (35*loopCount);\n\t\t\t\t\t\n\t\t\t\t\tpointer = new Icon(\"pointer.png\", 30, 75, 200 + (35*loopCount) );// add pointer indicator\n\t\t\t\t\tbackground.add( pointer ); \n\t\t\t\t\tlevel.setNumber(newPlayerScore, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t\tlevel.setWord(playerName, 10, 100, 200 + (35*loopCount));\n\t\t\t\t\tlevel.setNumber(score, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t}else {\n\t\t\t\t\tlevel.setWord(playerName, 10, 100, 200 + (35*loopCount));\n\t\t\t\t\tlevel.setNumber(score, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t}\n\t\t\t}//end while\n\t\t\tfileReader.close();\n\t\t\tif( newHighScore ) {\n\t\t\t\tnewHighScoreAlert();\n\t\t\t}else {\n\t\t\t\tgameOverAlert();\n\t\t\t}\n } catch (Exception e) {\n \tSystem.out.print(\"ERROR: Line 168: Unable to read file\");\n //e.printStackTrace();\n }\n\t}", "public void load(String filePath){\r\n File loadFile = new File(filePath);\r\n if (!loadFile.exists()){\r\n System.out.println(\"I failed. There are no saved games.\");\r\n return;\r\n }\r\n FileInputStream fis = null;\r\n ObjectInputStream in = null;\r\n try {\r\n fis = new FileInputStream(filePath);\r\n in = new ObjectInputStream(fis);\r\n long versionUID = (long) in.readObject();\r\n if (versionUID != this.serialVersionUID) {\r\n throw new UnsupportedClassVersionError(\"Version mismatch for save game!\");\r\n }\r\n this.p = (Character) in.readObject();\r\n this.map = (SpecialRoom[][]) in.readObject();\r\n\r\n } catch (FileNotFoundException ex){\r\n System.out.println(\"The saved game was not found!\");\r\n ex.printStackTrace();\r\n } catch (IOException ex) {\r\n System.out.println(\"There was an error reading your save game :(\");\r\n ex.printStackTrace();\r\n System.out.println(\")\");\r\n } catch (ClassNotFoundException ex) {\r\n System.out.println(\"The version of the save game is not compatible with this game!\");\r\n ex.printStackTrace();\r\n } catch (UnsupportedClassVersionError ex) {\r\n System.out.println(ex.getMessage());\r\n ex.printStackTrace();\r\n } catch (Exception ex) {\r\n System.out.println(\"An unknown error occurred!\");\r\n }\r\n\r\n }", "@Override\r\n\tpublic ScoresByPlayer read(File file, LeaguePosition leaguePosition) throws IOException {\r\n\r\n\t\tfinal ScoresByPlayer scoresByPlayer = new ScoresByPlayer();\r\n\r\n\t\t// Open file\r\n\t\tfinal CSVReader reader = new CSVReader(new FileReader(file));\r\n\r\n\t\t// Read first line\r\n\t\tfinal String[] firstLine = reader.readNext();\r\n\t\tLOGGER.debug(\"Read first line: \" + Arrays.asList(firstLine));\r\n\r\n\t\tString[] line;\r\n\t\twhile ((line = reader.readNext()) != null) {\r\n\r\n if ((line[0] == null) || \"\".equals(line[0])) {\r\n LOGGER.debug(\"Read (and ignored) line: \" + Arrays.asList(line));\r\n continue; // empty line so ignore it.\r\n }\r\n\r\n LOGGER.debug(\"Read line: \" + Arrays.asList(line));\r\n\r\n final Athlete athlete = new Athlete(transformer.getAthleteName(line));\r\n final Collection<Integer> scores = transformer.getScores(line);\r\n\t\t\tfinal PlayerScores playerPositionScores = new PlayerScores(athlete, leaguePosition, scores);\r\n\r\n\t\t\t// Exception if already exists\r\n\t\t\tif (scoresByPlayer.hasScoresFor(playerPositionScores.getAthlete(), playerPositionScores.getLeaguePosition())) {\r\n\t\t\t\tthrow new IOException(\"Duplicate set of averages for Athlete : \" + playerPositionScores.getAthlete());\r\n\t\t\t}\r\n\r\n\t\t\tLOGGER.debug(\" transformed to : \" + playerPositionScores);\r\n\t\t\tscoresByPlayer.addPlayerScores(playerPositionScores);\r\n\t\t}\r\n\t\treader.close();\r\n\r\n\t\treturn scoresByPlayer;\r\n\t}", "public void readFile() {\n ArrayList<Movement> onetime = new ArrayList<Movement>(); \n Movement newone = new Movement(); \n String readLine; \n\n File folder = new File(filefolder); \n File[] listOfFiles = folder.listFiles(); \n for (File file : listOfFiles) {\n if (file.isFile()&& file.getName().contains(\"200903\")) {\n try {\n onetime = new ArrayList<Movement>(); \n newone = new Movement(); \n BufferedReader br = new BufferedReader(new FileReader(filefolder+\"\\\\\"+file.getName())); \n readLine = br.readLine (); \n String[] previouline = readLine.split(\",\"); \n int previousint = Integer.parseInt(previouline[7]); \n while ( readLine != null) {\n String[] currentline = readLine.split(\",\"); \n if (Integer.parseInt(currentline[7]) == previousint)\n {\n newone.addRecord(currentline[0], currentline[1], currentline[2], currentline[4], currentline[5], currentline[6]); \n newone.ID = Integer.parseInt(currentline[7]); \n newone.filedate = file.getName();\n } else\n { \n onetime.add(newone); \n newone = new Movement(); \n newone.addRecord(currentline[0], currentline[1], currentline[2], currentline[4], currentline[5], currentline[6]);\n }\n previousint = Integer.parseInt(currentline[7]); \n readLine = br.readLine ();\n }\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n rawdata.add(onetime);\n } \n }\n println(rawdata.size());\n}", "public void savePokemonData()\r\n {\r\n try\r\n {\r\n int currentPokemon = playerPokemon.getCurrentPokemon();\r\n\r\n FileWriter fw = new FileWriter(\"tempPlayerPokemon.txt\");\r\n\r\n List<String> list = Files.readAllLines(Paths.get(\"playerPokemon.txt\"), StandardCharsets.UTF_8);\r\n String[] pokemonList = list.toArray(new String[list.size()]);\r\n\r\n String currentPokemonStr = pokemonList[currentPokemon];\r\n String[] currentPokemonArray = currentPokemonStr.split(\"\\\\s*,\\\\s*\");\r\n\r\n currentPokemonArray[1] = Integer.toString(playerPokemon.getLevel());\r\n currentPokemonArray[3] = Integer.toString(playerPokemon.getCurrentHealth());\r\n currentPokemonArray[4] = Integer.toString(playerPokemon.getCurrentExperience());\r\n for(int c = 0; c < 4; c++)\r\n {\r\n currentPokemonArray[5 + c] = playerPokemon.getMove(c);\r\n }\r\n\r\n String arrayAdd = currentPokemonArray[0];\r\n for(int i = 1; i < currentPokemonArray.length; i++)\r\n {\r\n arrayAdd = arrayAdd.concat(\", \" + currentPokemonArray[i]);\r\n }\r\n\r\n pokemonList[currentPokemon] = arrayAdd;\r\n\r\n for(int f = 0; f < pokemonList.length; f++)\r\n {\r\n fw.write(pokemonList[f]);\r\n fw.write(\"\\n\");\r\n }\r\n fw.close();\r\n\r\n Writer.overwriteFile(\"tempPlayerPokemon\", \"playerPokemon\");\r\n }\r\n catch(Exception error)\r\n {\r\n }\r\n }", "public GameLevel LoadGame() throws IOException {\n FileReader fr = null;\n BufferedReader reader = null;\n\n try {\n System.out.println(\"Reading \" + fileName + \" data/saves.txt\");\n\n fr = new FileReader(fileName);\n reader = new BufferedReader(fr);\n\n String line = reader.readLine();\n int levelNumber = Integer.parseInt(line);\n\n //--------------------------------------------------------------------------------------------\n\n if (levelNumber == 1){\n gameLevel = new Level1();\n } else if(levelNumber == 2){\n gameLevel = new Level2();\n JFrame debugView = new DebugViewer(gameLevel, 700, 700);\n } else {\n gameLevel = new Level3();\n }\n\n //------------------------------------------------------------------------------------------\n\n\n while ((line = reader.readLine()) != null){\n String[] tokens = line.split(\",\");\n String className = tokens[0];\n float x = Float.parseFloat(tokens[1]);\n float y = Float.parseFloat(tokens[2]);\n Vec2 pos = new Vec2(x, y);\n Body platform = null;\n\n if (className.equals(\"PlayableCharacter\")){\n PlayableCharacter playableCharacter = new PlayableCharacter(gameLevel, PlayableCharacter.getItemsCollected(),PlayableCharacter.isSpecialGravity(),game);\n playableCharacter.setPosition(pos);\n gameLevel.setPlayer(playableCharacter);\n\n }\n\n if (className.equals(\"LogPlatform\")){\n Body body = new LogPlatform(gameLevel, platform);\n body.setPosition(pos);\n }\n\n if (className.equals(\"Coin\")){\n Body body = new Coin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(new Pickup(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"ReducedGravityCoin\")){\n Body body = new ReducedGravityCoin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new PickupRGC(gameLevel.getPlayer(), game)\n\n );\n }\n\n if (className.equals(\"AntiGravityCoin\")){\n Body body = new AntiGravityCoin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new PickupAGC(gameLevel.getPlayer(), game) );\n }\n\n if (className.equals(\"Rock\")){\n Body body = new Rock(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new FallCollisionListener(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"Pellet\")){\n Body body = new Pellet(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new AddLifeCollisionListener(gameLevel.getPlayer(), game));\n }\n\n if (className.equals(\"Branch\")){\n Body body = new Branch(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(new BranchListener(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"Portal\")){\n Body portal = new Portal(gameLevel);\n portal.setPosition(pos);\n portal.addCollisionListener(new DoorListener(game));\n }\n\n if (className.equals(\"DeathPlatform\")){\n float w = Float.parseFloat(tokens[3]);\n float h = Float.parseFloat(tokens[4]);\n float deg = Float.parseFloat(tokens[5]);\n\n Body body = new DeathPlatform(gameLevel, w, h);\n body.setPosition(pos);\n body.addCollisionListener(new FallCollisionListener(gameLevel.getPlayer(), game));\n body.setFillColor(Color.black);\n body.setAngleDegrees(deg);\n\n }\n\n }\n\n return gameLevel;\n } finally {\n if (reader != null) {\n reader.close();\n }\n if (fr != null) {\n fr.close();\n }\n }\n }", "public static void load(){\n\t\tinbattle=true;\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tScanner s=new Scanner(f);\n\t\t\tturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tString curr=s.next();\n\t\t\tif(curr.equals(\"WildTrainer:\"))\n\t\t\t\topponent=WildTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"EliteTrainer:\"))\n\t\t\t\topponent=EliteTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"Trainer:\"))\n\t\t\t\topponent=Trainer.readInTrainer(s);\n\t\t\tSystem.out.println(\"Initializing previous battle against \"+opponent.getName());\n\t\t\tcurr=s.next();\n\t\t\tallunits=new ArrayList<Unit>();\n\t\t\tpunits=new ArrayList<Unit>();\n\t\t\tounits=new ArrayList<Unit>();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tpunits.add(Unit.readInUnit(null,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Player Units\n\t\t\tcurr=s.next();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tounits.add(Unit.readInUnit(opponent,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Opponent Units\n\t\t\tallunits.addAll(punits);\n\t\t\tallunits.addAll(ounits);\n\t\t\tpriorities=new ArrayList<Integer>();\n\t\t\tint[] temp=GameData.readIntArray(s.nextLine());\n\t\t\tfor(int i:temp){\n\t\t\t\tpriorities.add(i);\n\t\t\t}\n\t\t\txpgains=GameData.readIntArray(s.nextLine());\n\t\t\tspikesplaced=s.nextBoolean();\n\t\t\tnumpaydays=s.nextInt();\n\t\t\tactiveindex=s.nextInt();\n\t\t\tactiveunit=getUnitByID(s.nextInt());\n\t\t\tweather=Weather.valueOf(s.next());\n\t\t\tweatherturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tbfmaker=new LoadExistingBattlefieldMaker(s);\n\t\t\tinitBattlefield();\n\t\t\tplaceExistingUnits();\n\t\t\tMenuEngine.initialize(new UnitMenu(activeunit));\n\t\t}catch(Exception e){e.printStackTrace();System.out.println(e.getCause().toString());}\n\t}", "void loadFromFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile source = new File(directory, FILE_NAME);\n\t\t\tMap<String, Scoreboard> scoreboards = new HashMap<String, Scoreboard>();\n\t\t\tif (source.exists()) {\n\t\t\t\tJsonReader reader = new JsonReader(new FileReader(source));\n\t\t\t\treader.beginArray();\n\t\t\t\twhile (reader.hasNext()) {\n\t\t\t\t\tScoreboard scoreboard = readScoreboard(reader);\n\t\t\t\t\tscoreboards.put(scoreboard.getName(), scoreboard);\n\t\t\t\t}\n\t\t\t\treader.endArray();\n\t\t\t\treader.close();\n\t\t\t} else {\n\t\t\t\tsource.createNewFile();\n\t\t\t}\n\t\t\tthis.scoreboards = scoreboards;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void readFile() {\n try (BufferedReader br = new BufferedReader(new FileReader(\"../CS2820/src/production/StartingInventory.txt\"))) {\n String line = br.readLine();\n while (line != null) {\n line = br.readLine();\n this.items.add(line);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void stockLoad() {\n try {\n File file = new File(stockPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()) {\n String data = scanner.nextLine();\n String[] userData = data.split(separator);\n Stock stock = new Stock();\n stock.setProductName(userData[0]);\n int stockCountToInt = Integer.parseInt(userData[1]);\n stock.setStockCount(stockCountToInt);\n float priceToFloat = Float.parseFloat(userData[2]);\n stock.setPrice(priceToFloat);\n stock.setBarcode(userData[3]);\n\n stocks.add(stock);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "private static void read(BufferedReader br, String field, String line, int pos, GameFile gameFile) throws IOException {\r\n\t\t\r\n\t\tGameFile f = gameFile;\r\n\t\t\r\n\t\tif(field.contains(\":\")) {\r\n\t\t\tfield = field.replace(\":\", \"\");\r\n\t\t\tf = new GameFile(field);\r\n\t\t\tgameFile.add(f);\r\n\t\t}\r\n\t\t\r\n\t\t//loops through all line in file\r\n\t\tfor(String l = (line.isEmpty())? br.readLine(): line; l != null; l = br.readLine()) {\r\n\t\t\t\r\n\t\t\tl = l.replaceAll(\"\\\\s+\",\"\"); //get rid of white spaces\r\n\t\t\t\r\n\t\t\tif(l.contains(\"{\") && l.contains(\"}\")) //if both currly brackets exist on the same line, replace end curlly bracket to prevent exiting the function premacherly\r\n\t\t\t\tl = l.replace(\"}\", \"\\\\}\");\r\n\t\t\tif(l.equals(\"}\")) //if the current line contanise only an end currly breaket then exit the function\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\treadLine(br, field, l, pos, f); //interpets the current line\r\n\t\t\t\r\n\t\t\tif(l.contains(\"}\") && !l.contains(\"\\\\}\")) //if the line containes an end currly breaket in it, exit the function\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn;\r\n\t\t\r\n\t}", "private void loadGame() {\r\n\t\tJFileChooser fileChooser = new JFileChooser();\r\n\t\tArrayList<String> data = new ArrayList<String>();\r\n\t\tFile file = null;\r\n\t\tif (fileChooser.showOpenDialog(gameView) == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tfile = fileChooser.getSelectedFile();\r\n\t\t}\r\n\r\n\t\tif (file != null) {\r\n\t\t\tmyFileReader fileReader = new myFileReader(file);\r\n\t\t\ttry {\r\n\t\t\t\tdata = fileReader.getFileContents();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// TODO: allow writing of whose turn it is!\r\n\t\t\tParser parse = new Parser();\r\n\t\t\tint tempBoard[][] = parse.parseGameBoard(data);\r\n\t\t\tgameBoard = new GameBoardModel(tempBoard, parse.isBlackTurn(), parse.getBlackScore(), parse.getRedScore());\r\n\t\t}\r\n\t}", "public void loadData() {\n Path path= Paths.get(filename);\n Stream<String> lines;\n try {\n lines= Files.lines(path);\n lines.forEach(ln->{\n String[] s=ln.split(\";\");\n if(s.length==3){\n try {\n super.save(new Teme(Integer.parseInt(s[0]),Integer.parseInt(s[1]),s[2]));\n } catch (ValidationException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }else\n System.out.println(\"linie corupta in fisierul teme.txt\");});\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void onEnable(){\n new File(getDataFolder().toString()).mkdir();\n playerFile = new File(getDataFolder().toString() + \"/playerList.txt\");\n commandFile = new File(getDataFolder().toString() + \"/commands.txt\");\n blockFile = new File(getDataFolder().toString() + \"/blockList.txt\");\n deathFile = new File(getDataFolder().toString() + \"/deathList.txt\");\n startupFile = new File(getDataFolder().toString() + \"/startupCommands.txt\");\n \n //Load the player file data\n playerCommandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(playerFile));\n StringTokenizer st;\n String input;\n String name;\n String command;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Player> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n command = st.nextToken();\n playerCommandMap.put(name, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original player command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading player command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted player command file\");\n }\n \n //Load the block file data\n blockCommandMap = new HashMap<Location, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(blockFile));\n StringTokenizer st;\n String input;\n String command;\n Location loc = null;\n \n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Block Location> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n loc = new Location(getServer().getWorld(UUID.fromString(st.nextToken())), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()));\n command = st.nextToken();\n blockCommandMap.put(loc, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original block command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading block command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted block command file\");\n }\n \n //Load the player death file data\n deathCommandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(deathFile));\n StringTokenizer st;\n String input;\n String name;\n String command;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Player> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n command = st.nextToken();\n deathCommandMap.put(name, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original player death command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading player death command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted player death command file\");\n }\n \n //Load the start up data\n startupCommands = \"\";\n try{\n BufferedReader br = new BufferedReader(new FileReader(startupFile));\n String input;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Command>\") == 0){\n continue;\n }\n startupCommands += \":\" + input;\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original start up command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading start up command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted start up command file\");\n }\n \n //Load the command file data\n commandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(commandFile));\n StringTokenizer st;\n String input;\n String args;\n String name;\n \n //Assumes that the name is only one token long\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Identifing name> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n args = st.nextToken();\n while(st.hasMoreTokens()){\n args += \" \" + st.nextToken();\n }\n commandMap.put(name, args);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted command file\");\n }\n \n placeBlock = false;\n startupDone = false;\n blockCommand = \"\";\n playerPosMap = new HashMap<String, Location>();\n \n //Set up the listeners\n PluginManager pm = this.getServer().getPluginManager();\n pm.registerEvent(Event.Type.PLAYER_INTERACT_ENTITY, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_JOIN, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Event.Priority.Normal, this);\n \n log.info(\"Autorun Commands v2.3 is enabled\");\n }", "private void loadPlayer(String player, String dir, String dbFile) {\n OwnedWarp warp;\n List<OwnedWarp> playerWarps = new ArrayList<OwnedWarp>();\n FlatDB database = new FlatDB(dir, dbFile);\n List<Row> rows = database.getAll();\n for(Row r : rows) {\n try {\n warp = OwnedWarp.fromRow(r, plugin.getServer(), player);\n } catch(NullPointerException e) {\n Stdout.println(\"Couldn't Warp \" + player + \"/\" + r.getIndex(), Level.ERROR);\n continue;\n }\n playerWarps.add(warp);\n }\n warps.put(player, playerWarps);\n }", "public void play() {\n\t\tnew Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tplayer = new AdvancedPlayer(new BufferedInputStream(new FileInputStream(file)));\n\t\t\t\t\tplayer.setPlayBackListener(listener = new TanksPlaybackListener(false));\n\t\t\t\t\tplayer.play();\n\t\t\t\t} catch (JavaLayerException e) {\n\t\t\t\t\t--currentlyPlaying;\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t--currentlyPlaying;\n\t\t\t\t}\n\t\t\t}\n\t\t}.start();\n\t}", "@Override\n\tpublic void startInput(String path) throws FileNotFoundException, JavaLayerException {\n\t\tfis = new FileInputStream(path);\n\t\tsetBis(new BufferedInputStream(fis));\n\n\t\tplayer = new Player(getBis());\n\t}", "public void load(String loadString){\r\n try{\r\n String[] split = loadString.split(\"\\\\ \");\r\n\t\t\t\r\n\t\t\t//Before we do anything else, attempt to verify the checksum\r\n\t\t\tif(verifySave(split) == false){\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Initialize fields\r\n currentPlayer = Integer.parseInt(split[0]);\r\n numPlayers = Integer.parseInt(split[1]);\r\n players = new Player[numPlayers];\r\n \r\n int i = 0;\r\n int j = 2;\t//index to start reading in player information\r\n while(i < numPlayers){\r\n players[i] = stringToPlayer(split[j], split[j+1] );\t\r\n j = j + 2;\r\n i = i + 1;\r\n }\r\n }catch(Exception e){\r\n System.out.println(\"ERROR: Sorry, but could not load a game from that file\");\r\n System.exit(0);\r\n }\r\n \r\n \r\n }", "private void SetPlayerData(String playerLine) throws IOException\n {\n String fName = m_Parser.GetFirstName(playerLine);\n String lName = m_Parser.GetLastName(playerLine);\n int face = m_Parser.GetFace(playerLine);\n int jerseyNumber = m_Parser.GetJerseyNumber(playerLine);\n int[] attrs = m_Parser.GetInts(playerLine);\n int[] simData = m_Parser.GetSimVals(playerLine);\n\n mFirstNameTextBox.setText( fName);\n mLastNameTextBox.setText( lName);\n m_ImageNumber = face;\n if( jerseyNumber > -1 && jerseyNumber < 0x100)\n mJerseyNumberUpDown.setValue( Integer.parseInt(String.format(\"%x\", jerseyNumber)));\n\n if( attrs != null )\n {\n int attrIndex = 0;\n for(int i = 0; i < attrs.length && i < m_Attributes.length; i++)\n {\n attrIndex = AttrIndex(attrs[i]+\"\");\n if( attrIndex > -1 )\n m_Attributes[i].setSelectedIndex(attrIndex);\n }\n }\n if( simData != null)\n {\n for( int i =0; i < simData.length; i++)\n {\n m_SimAttrs[i].setValue( Integer.parseInt(simData[i]+\"\"));\n }\n }\n if( jerseyNumber > -1 && jerseyNumber < 0x100)\n {\n mJerseyNumberUpDown.setValue(Integer.parseInt(String.format(\"%x\", jerseyNumber)));\n ShowCurrentFace();\n }\n }", "private void loadGame(String fileName){\n\n }", "@Override\n public void load() {\n File file = new File(path + \"/\" + \"rooms.txt\"); //Hold file of the riddles. riddles.txt should be placed in the root folder.\n Scanner scanner = null; //if the scanner can't load the file.\n\n try {\n scanner = new Scanner(file); // scanner for the file\n } catch (FileNotFoundException ex) {\n try {\n //if not such file exists create it.\n file.createNewFile();\n } catch (IOException ex1) {\n Logger.getLogger(LoadRooms.class.getName()).log(Level.SEVERE, null, ex1);\n return;\n }\n }\n while (scanner.hasNextLine()) { //if scanner har fundt next line of text in the file\n switch (scanner.nextLine()) {\n case \"[Room]:\": //if scanner fundt \"[Room]:\" case, get rooms attributes\n state = LOAD_ATTRIBUTES;\n break;\n case \"[Connections]:\"://if scanner fundt \"[Connections]:\" case, get connections from file\n state = LOAD_CONNECTIONS;\n break;\n\n default:\n break;\n }\n switch (state) {\n case LOAD_ATTRIBUTES: //case, that get rooms attributes and add them to room_list\n String name = scanner.nextLine();\n int timeToTravel = Integer.parseInt(scanner.nextLine());\n boolean isLocked = Boolean.parseBoolean(scanner.nextLine());\n boolean isTransportRoom = Boolean.parseBoolean(scanner.nextLine());\n Room newRoom = new Room(name, timeToTravel, isLocked, isTransportRoom);\n if (newRoom.isTransportRoom()) {\n newRoom.setExit(\"exit\", newRoom);\n newRoom.setExitDir(\"west\", newRoom);\n }\n rooms_list.add(newRoom);\n break;\n case LOAD_CONNECTIONS: //case that get connections betweem rooms in game\n while (scanner.hasNextLine()) {\n String[] string = scanner.nextLine().split(\",\");\n Room room = this.getRoomByName(string[0]);\n room.setExit(string[1], this.getRoomByName(string[1]));\n if (!this.getRoomByName(string[1]).isTransportRoom() && !room.isTransportRoom()) {\n room.setExitDir(string[2], getRoomByName(string[1]));\n }\n }\n break;\n default:\n break;\n }\n }\n }", "public Account load() throws IOException {\n Account account = new Account();\n try {\n FileReader fileReader = new FileReader(fileName);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n //if (line.contains(\"#\")) { continue; }\n String[] info = line.split(\" @ \");\n\n switch (info[0]) {\n case \"INIT\":\n account.setToInitialize(Boolean.parseBoolean(info[1]));\n break;\n case \"BS\":\n account.setBaseSavings(Float.parseFloat((info[1])));\n break;\n case \"INC\":\n parseIncome(info, account);\n break;\n case \"EXP\":\n parseExpenditure(info, account);\n break;\n case \"G\":\n parseGoal(info, account);\n break;\n case \"INS\":\n parseInstalment(info, account);\n break;\n case \"LOA\":\n parseLoan(info, account);\n break;\n case \"BAN\":\n parseBankAccount(info, account);\n break;\n default:\n throw new DukeException(\"OOPS!! Your file has been corrupted/ input file is invalid!\");\n }\n }\n bufferedReader.close();\n } catch (FileNotFoundException err) {\n final File parentDir = new File(\"dataFG\");\n parentDir.mkdir();\n final String hash = \"moneyAccount\";\n final String fileName = hash + \".txt\";\n final File file = new File(parentDir, fileName);\n file.createNewFile();\n } catch (IOException | DateTimeParseException | DukeException e) {\n e.printStackTrace();\n }\n return account;\n }", "public void initPlayer() throws IOException\n\t{\n\t\t\n\t\tout.println(\"Enter your name: \");\n\t\tout.flush();\n\t\tthis.name = in.readLine();\n\t\t\n//Here's some nice instructions to show a client\t\t\n\t\tout.println(\" You will now place 2 ships. You may choose between either a Cruiser (C) \" );\n\t\tout.println(\" and Destroyer (D)...\");\n\t\tout.println(\" Enter Ship info. An example input looks like:\");\n\t\tout.println(\"\\nD 2 4 S USS MyBoat\\n\");\n\t\tout.println(\" The above line creates a Destroyer with the stern located at x=2 (col),\" );\n\t\tout.println(\" y=4 (row) and the front of the ship will point to the SOUTH (valid\" );\n\t\tout.println(\" headings are N, E, S, and W.\\n\\n\" );\n\t\tout.println(\" the name of the ship will be \\\"USS MyBoat\\\"\");\n\t\tout.println(\"Enter Ship 1 information:\" );\n\t\tout.flush();\n\t\t\n\t\t//Get ship locations from the player for all 2 ships (or more than 2 if you're using more ships)\n\t\tString[] ships;\n\t\tdo {\n\t\t\tships = in.readLine().split(\" \");\n\t\t\tif (ships[0].equalsIgnoreCase(\"C\") && ships.length > 3) {\n\t\t\t\tboolean yes = board.addShip(new Cruiser(Arrays.copyOfRange(ships, 4, ships.length).toString()), new Position(Integer.parseInt(ships[1]), Integer.parseInt(ships[2])), HEADING.valueOf((ships[3])));\n\t\t\t\tout.println(\"Added a cruiser.\");\n\t\t\t} else if (ships[0].equalsIgnoreCase(\"D\") && ships.length > 3) {\n\t\t\t\tboard.addShip(new Destroyer(Arrays.copyOfRange(ships, 4, ships.length).toString()), new Position(Integer.parseInt(ships[1]), Integer.parseInt(ships[2])), HEADING.valueOf((ships[3]).toUpperCase()));\n\t\t\t\tout.println(\"Added a destroyer.\");\n\t\t\t} else if (ships[0].equalsIgnoreCase(\"pic\")) {\n\t\t\t\tString pic = board.draw();\n\t\t\t\tpic.replaceAll(\"\\\\n\", NEWL);\n\t\t\t\tout.println(pic);\n\t\t\t\tSystem.out.println(pic);\n\t\t\t\tout.flush();\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tout.println(\"Wrong ship placement. Try again.\");\n\t\t\t}\n\t\t\tout.flush();\n\t\t} while (board.myShips.size() < 2);\n\t\t\n\t\t\n\t\t//After all game state is input, draw the game board to the client\n\t\t\n\t\t\n\t\tSystem.out.println( \"Waiting for other player to finish their setup, then war will ensue!\" );\n\t}", "public void openPlayerDataFromCSV() throws FileNotFoundException {\n csvReader = new BufferedReader(new FileReader(PATH_TO_CSV));\n }", "public interface ShapleyReader {\n Player[] read(String fileName) throws IOException;\n}", "public void saveCurrentPlayer() {\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/current_player\");\n\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/current_player\",_currentPlayer));\n\t}", "public void loadSaveGameFromFile(File file) {\r\n\t\t//TODO\r\n\t}", "public void readFile()\n {\n try {\n fileName = JOptionPane.showInputDialog(null,\n \"Please enter the file you'd like to access.\"\n + \"\\nHint: You want to access 'catalog.txt'!\");\n \n File aFile = new File(fileName);\n Scanner myFile = new Scanner(aFile);\n \n String artist, albumName; \n while(myFile.hasNext())\n { //first we scan the document\n String line = myFile.nextLine(); //for the next line. then we\n Scanner myLine = new Scanner(line); //scan that line for our info.\n \n artist = myLine.next();\n albumName = myLine.next();\n ArrayList<Track> tracks = new ArrayList<>();\n \n while(myLine.hasNext()) //to make sure we get all the tracks\n { //that are on the line.\n Track song = new Track(myLine.next());\n tracks.add(song);\n }\n myLine.close();\n Collections.sort(tracks); //sort the list of tracks as soon as we\n //get all of them included in the album.\n Album anAlbum = new Album(artist, albumName, tracks);\n catalog.add(anAlbum);\n }\n myFile.close();\n }\n catch (NullPointerException e) {\n System.err.println(\"You failed to enter a file name!\");\n System.exit(1);\n }\n catch (FileNotFoundException e) {\n System.err.println(\"Sorry, no file under the name '\" + fileName + \"' exists!\");\n System.exit(2);\n }\n }", "void registerPlayer() throws IOException;", "boolean InitialisePlayer (String path_name);", "public void inPutFile(Scanner PutFileIn,Nimsys nimSys,ArrayList<Player> list){\r\n\t\tString st=null;\r\n\t\twhile(PutFileIn.hasNext()){\r\n\t\t\tst=PutFileIn.nextLine();\r\n\t\t\tnimSys.commands=st.split(\" \");\r\n\t\t\tif(nimSys.commands[5].equals(\"Human\"))\r\n\t\t\t\tlist.add(new NimPlayer(nimSys.commands[0],nimSys.commands[1],nimSys.commands[2],\r\n\t\t\t\t\t\tInteger.parseInt(nimSys.commands[3]),Integer.parseInt(nimSys.commands[4]),nimSys.commands[5]));\r\n\t\t\telse\r\n\t\t\t\tlist.add(new NimAIPlayer(nimSys.commands[0],nimSys.commands[1],nimSys.commands[2],\r\n\t\t\t\t\t\tInteger.parseInt(nimSys.commands[3]),Integer.parseInt(nimSys.commands[4]),nimSys.commands[5]));\r\n\t\t\t\t\t\t\r\n\t\t}\r\n\t}", "public void importFile() {\n \ttry {\n\t File account_file = new File(\"accounts/CarerAccounts.txt\");\n\n\t FileReader file_reader = new FileReader(account_file);\n\t BufferedReader buff_reader = new BufferedReader(file_reader);\n\n\t String row;\n\t while ((row = buff_reader.readLine()) != null) {\n\t String[] account = row.split(\",\"); //implementing comma seperated value (CSV)\n\t String[] users = account[6].split(\"-\");\n\t int[] usersNew = new int[users.length];\n\t for (int i = 0; i < users.length; i++) {\n\t \tusersNew[i] = Integer.parseInt(users[i].trim());\n\t }\n\t this.add(Integer.parseInt(account[0]), account[1], account[2], account[3], account[4], account[5], usersNew);\n\t }\n\t buff_reader.close();\n } catch (IOException e) {\n System.out.println(\"Unable to read text file this time.\");\n \t}\n\t}", "public static void savePlayer(Player player){\n if (player != null){\n try {\n mapper.writeValue(new File(\"Data\\\\PlayerData\\\\\" + getFileName(player) + \".json\"), player);\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n }\n }", "@Override\n public void run() {\n try (BufferedReader reader = new BufferedReader(new FileReader(file.getAbsoluteFile()))) {\n String lineFromFile = reader.readLine();\n String[] splitLine;\n String userName;\n String url;\n long time;\n while ((lineFromFile = reader.readLine()) != null) {\n splitLine = lineFromFile.split(\";\");\n userName = splitLine[3];\n url = splitLine[1];\n time = Long.parseLong(splitLine[2]);\n if (userNamesAndCorrespondingContent.containsKey(userName)) {\n Content content = userNamesAndCorrespondingContent.get(userName);\n if (content.getUrlAndCorrespondingTime().containsKey(url)) {\n content.updateTimeForCorrespondingUrl(url, time);\n } else {\n content.updateUrlAndTimeInfoForCorrespondingUsername(url, time);\n }\n } else {\n Map<String, Long> newUrlAndTime = new ConcurrentSkipListMap<>();\n newUrlAndTime.put(url, time);\n userNamesAndCorrespondingContent.put(userName, new Content(newUrlAndTime));\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void plzreadDataFiles(){\n\n //This line opens the file and returns an Input Stream data type\n InputStream itemIs = getResources().openRawResource(R.raw.card_data);\n\n //Read the file line by line\n BufferedReader reader = new BufferedReader(new InputStreamReader(itemIs, Charset.forName(\"UTF-8\")));\n\n //Initialize a var to track the line of the file being read in\n String line =\"\";\n\n // error proofing if the file is weird\n try {\n int i = 0;\n int k = 0;\n while ((line = reader.readLine()) != null){\n //split data by commas into an array of strings\n String[] token = line.split(\",\");\n\n itemArray[i] = new itemInfo();\n\n //Read the data\n itemArray[i].setCardType(token[0]);\n itemArray[i].setCardName(token[1]);\n itemArray[i].setItemType(token[2]);\n itemArray[i].setFrontText(token[3]);\n itemArray[i].setRearText(token[4]);\n itemArray[i].setDuration(token[5]);\n\n\n // Create a list of ITEM names for the autocomplete\n if ((itemArray[i].getCardType().intern()) == (\"Common Item\")){\n //itemSearchArray[i] = token[1];\n itemsOnlyList[k] = token[1];\n k = k + 1;\n }\n\n else if ((itemArray[i].getCardType().intern()) == (\"Unique Item\")){\n //itemSearchArray[i] = token[1];\n itemsOnlyList[k] = token[1];\n k = k + 1;\n }\n\n else if ((itemArray[i].getCardType().intern()) == (\"Spell\")){\n //itemSearchArray[i] = token[1];\n itemsOnlyList[k] = token[1];\n k = k + 1;\n }\n\n //Check that the damage column has a number in it, and write it in\n if (token[5].intern() != \"-\"){\n itemArray[i].setDamage(Integer.parseInt(token[5]));\n }\n else{\n //Set it to zero if the dash is detected\n itemArray[i].setDamage(0);\n }\n itemArray[i].setDuration(token[6]);\n\n i = i + 1;\n\n Log.d(\"My Activity\", \"Just added: \"+itemArray[i]);\n }\n\n } catch (IOException e) {\n Log.wtf(\"MyActivity\",\"Error reading data file on line\"+line,e);\n e.printStackTrace();\n }\n }", "@SuppressWarnings(\"unchecked\")\n public static void load() {\n\n System.out.print(\"Loading team data from file...\");\n\n try {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n\n FileInputStream fil = new FileInputStream(team_fil);\n ObjectInputStream in = new ObjectInputStream(fil);\n\n team_list = (ConcurrentHashMap<Integer, Team>) in.readObject();\n cleanTeams();\n\n fil.close();\n in.close();\n\n //Gå gjennom alle lagene og registrer medlemmene i team_members.\n Iterator<Team> lag = team_list.values().iterator();\n\n while (lag.hasNext()) {\n\n Team laget = lag.next();\n\n Iterator<TeamMember> medlemmer = laget.getTeamMembers();\n while (medlemmer.hasNext()) {\n registerMember(medlemmer.next().getCharacterID(), laget.getTeamID());\n }\n\n }\n\n System.out.println(\"OK! \" + team_list.size() + \" teams loaded.\");\n\n } catch (Exception e) {\n System.out.println(\"Error loading team data from file.\");\n }\n\n }", "public static Player[] setPlayers(String playerConfigFile) throws IOException {\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(playerConfigFile));\n String[] playerData = br.readLine().split(\",\");\n Player[] players = new Player[playerData.length];\n\n for(int i=0; i<playerData.length; i++) {\n players[i] = new Player(playerData[i].trim(), 0);\n }\n\n return players;\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "void fileReader(String filename) \r\n\t\t{\r\n\r\n\t\ttry (Scanner s = new Scanner(new FileReader(filename))) { \r\n\t\t while (s.hasNext()) { \r\n\t\t \tString name = s.nextLine(); // read name untill space\r\n\t\t \tString str[] = name.split(\",\");\r\n\t\t \tString nam = str[0]; \r\n\t\t \tint number = Integer.parseInt(str[1]); // read number untill space\r\n\t\t this.addContact(nam, number);\r\n\t\t\r\n\t\t }\t\t \r\n\t\t \r\n\t\t} \r\n\t\tcatch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t}", "public void load (){\n try{\n FileInputStream fis = new FileInputStream(\"game.data\");\n ObjectInputStream o = new ObjectInputStream(fis);\n for (int i = 0; i < 8; i++){\n for (int j = 0; j < 8; j++){\n String loaded = o.readUTF();\n if (loaded.equals(\"null\")){\n Tiles[i][j].removePiece();\n }else if (loaded.equals(\"WhiteLeftKnight\")){\n Tiles[i][j].setPiece(WhiteLeftKnight);\n }else if (loaded.equals(\"WhiteRightKnight\")){\n Tiles[i][j].setPiece(WhiteRightKnight);\n }else if (loaded.equals(\"WhiteLeftBishop\")){\n Tiles[i][j].setPiece(WhiteLeftBishop);\n }else if (loaded.equals(\"WhiteRightBishop\")){\n Tiles[i][j].setPiece(WhiteRightBishop);\n }else if (loaded.equals(\"WhiteLeftRook\")){\n Tiles[i][j].setPiece(WhiteLeftRook);\n }else if (loaded.equals(\"WhiteRightRook\")){\n Tiles[i][j].setPiece(WhiteRightRook);\n }else if (loaded.equals(\"WhiteQueen\")){\n Tiles[i][j].setPiece(WhiteQueen);\n }else if (loaded.equals(\"WhiteKing\")){\n Tiles[i][j].setPiece(WhiteKing);\n }else if (loaded.equals(\"WhitePromotedRookPawn\")){\n Rook WhitePromotedRookPawn = new Rook(\"WhitePromotedRookPawn\");\n WhitePromotedRookPawn.setIcon(WhiteRookImg);\n Tiles[i][j].setPiece(WhitePromotedRookPawn);\n }else if (loaded.equals(\"WhitePromotedBishopPawn\")){\n Bishop WhitePromotedBishopPawn = new Bishop(\"WhitePromotedBishopPawn\");\n WhitePromotedBishopPawn.setIcon(WhiteBishopImg);\n Tiles[i][j].setPiece(WhitePromotedBishopPawn);\n }else if (loaded.equals(\"WhitePromotedKnightPawn\")){\n Knight WhitePromotedKnightPawn = new Knight(\"WhitePromotedKnightPawn\");\n WhitePromotedKnightPawn.setIcon(WhiteKnightImg);\n Tiles[i][j].setPiece(WhitePromotedKnightPawn);\n }else if (loaded.equals(\"WhitePromotedQueenPawn\")){\n Queen WhitePromotedQueenPawn = new Queen(\"WhitePromotedQueenPawn\");\n WhitePromotedQueenPawn.setIcon(WhiteQueenImg);\n Tiles[i][j].setPiece(WhitePromotedQueenPawn);\n }else if (loaded.equals(\"BlackLeftKnight\")){\n Tiles[i][j].setPiece(BlackLeftKnight);\n }else if (loaded.equals(\"BlackRightKnight\")){\n Tiles[i][j].setPiece(BlackRightKnight);\n }else if (loaded.equals(\"BlackLeftBishop\")){\n Tiles[i][j].setPiece(BlackLeftBishop);\n }else if (loaded.equals(\"BlackRightBishop\")){\n Tiles[i][j].setPiece(BlackRightBishop);\n }else if (loaded.equals(\"BlackLeftRook\")){\n Tiles[i][j].setPiece(BlackLeftRook);\n }else if (loaded.equals(\"BlackRightRook\")){\n Tiles[i][j].setPiece(BlackRightRook);\n }else if (loaded.equals(\"BlackQueen\")){\n Tiles[i][j].setPiece(BlackQueen);\n }else if (loaded.equals(\"BlackKing\")){\n Tiles[i][j].setPiece(BlackKing);\n }else if (loaded.equals(\"BlackPromotedQueenPawn\")){\n Queen BlackPromotedQueenPawn = new Queen(\"BlackPromotedQueenPawn\");\n BlackPromotedQueenPawn.setIcon(BlackQueenImg);\n Tiles[i][j].setPiece(BlackPromotedQueenPawn);\n }else if (loaded.equals(\"BlackPromotedRookPawn\")){\n Rook BlackPromotedRookPawn = new Rook(\"BlackPromotedRookPawn\");\n BlackPromotedRookPawn.setIcon(BlackRookImg);\n Tiles[i][j].setPiece(BlackPromotedRookPawn);\n }else if (loaded.equals(\"BlackPromotedBishopPawn\")){\n Bishop BlackPromotedBishopPawn = new Bishop(\"BlackPromotedBishopPawn\");\n BlackPromotedBishopPawn.setIcon(BlackBishopImg);\n Tiles[i][j].setPiece(BlackPromotedBishopPawn);\n }else if (loaded.equals(\"BlackPromotedKnightPawn\")){\n Knight BlackPromotedKnightPawn = new Knight(\"BlackPromotedKnightPawn\");\n BlackPromotedKnightPawn.setIcon(BlackKnightImg);\n Tiles[i][j].setPiece(BlackPromotedKnightPawn);\n }else if (loaded.equals(\"WhitePawn0\")){\n Tiles[i][j].setPiece(WhitePawns[0]);\n }else if (loaded.equals(\"WhitePawn1\")){\n Tiles[i][j].setPiece(WhitePawns[1]);\n }else if (loaded.equals(\"WhitePawn2\")){\n Tiles[i][j].setPiece(WhitePawns[2]);\n }else if (loaded.equals(\"WhitePawn3\")){\n Tiles[i][j].setPiece(WhitePawns[3]);\n }else if (loaded.equals(\"WhitePawn4\")){\n Tiles[i][j].setPiece(WhitePawns[4]);\n }else if (loaded.equals(\"WhitePawn5\")){\n Tiles[i][j].setPiece(WhitePawns[5]);\n }else if (loaded.equals(\"WhitePawn6\")){\n Tiles[i][j].setPiece(WhitePawns[6]);\n }else if (loaded.equals(\"WhitePawn7\")){\n Tiles[i][j].setPiece(WhitePawns[7]);\n }else if (loaded.equals(\"BlackPawn0\")){\n Tiles[i][j].setPiece(BlackPawns[0]);\n }else if (loaded.equals(\"BlackPawn1\")){\n Tiles[i][j].setPiece(BlackPawns[1]);\n }else if (loaded.equals(\"BlackPawn2\")){\n Tiles[i][j].setPiece(BlackPawns[2]);\n }else if (loaded.equals(\"BlackPawn3\")){\n Tiles[i][j].setPiece(BlackPawns[3]);\n }else if (loaded.equals(\"BlackPawn4\")){\n Tiles[i][j].setPiece(BlackPawns[4]);\n }else if (loaded.equals(\"BlackPawn5\")){\n Tiles[i][j].setPiece(BlackPawns[5]);\n }else if (loaded.equals(\"BlackPawn6\")){\n Tiles[i][j].setPiece(BlackPawns[6]);\n }else if (loaded.equals(\"BlackPawn7\")){\n Tiles[i][j].setPiece(BlackPawns[7]);\n }\n }\n }\n player = o.readInt();\n if (player == 1){\n area.setText(\"\\t\\t\\tPlayer \"+player+\" (White)\");\n }else{\n area.setText(\"\\t\\t\\tPlayer \"+player+\" (Black)\");\n }\n o.close();\n OriginalColor();\n }catch (Exception ex){\n\n }\n }", "private String readFile() {\n try {\n BufferedReader in = new BufferedReader(new FileReader(\"C:\\\\Users\"\n + \"\\\\MohammadLoqman\\\\cs61b\\\\sp19-s1547\"\n + \"\\\\proj3\\\\byow\\\\Core\\\\previousGame.txt\"));\n StringBuilder sb = new StringBuilder();\n String toLoad;\n try {\n toLoad = in.readLine();\n while (toLoad != null) {\n sb.append(toLoad);\n sb.append(System.lineSeparator());\n toLoad = in.readLine();\n }\n String everything = sb.toString();\n return everything;\n } catch (IOException E) {\n System.out.println(\"do nothin\");\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"file not found\");\n }\n return null;\n\n }", "public void loadFile()\n {\n\n FileDialog fd = null; //no value\n fd = new FileDialog(fd , \"Pick up a bubble file: \" , FileDialog.LOAD); //create popup menu \n fd.setVisible(true); // make visible manu\n String directory = fd.getDirectory(); // give the location of file\n String name = fd.getFile(); // give us what file is it\n String fullName = directory + name; //put together in one sting \n \n File rideNameFile = new File(fullName); //open new file with above directory and name\n \n Scanner nameReader = null;\n //when I try to pick up it read as scanner what I choose\n try\n {\n nameReader = new Scanner(rideNameFile);\n }\n catch (FileNotFoundException fnfe)//if dont find return this message below\n {\n return; // immedaitely exit from here\n }\n \n //if load button pressed, it remove all ride lines in the world\n if(load.getFound()){\n removeAllLines();\n } \n \n //read until is no more stings inside of file and until fullfill max rides\n while(nameReader.hasNextLine()&&currentRide<MAX_RIDES)\n {\n \n String rd= nameReader.nextLine();//hold and read string with name of ride\n RideLines nova =new RideLines(rd);\n rides[currentRide]=nova;\n \n //Create a RideLine with string given from file\n addObject(rides[currentRide++], 650, 20 + 40*currentRide);\n }\n \n //when is no more strings inside it close reader\n nameReader.close();\n }", "public GameInput load() {\n int rows = 0;\n int columns = 0;\n char[][] arena = new char[rows][columns];\n int noPlayers = 0;\n LinkedList<Hero> heroList = new LinkedList<Hero>();\n LinkedList<String> moves = new LinkedList<String>();\n int noRounds = 0;\n try {\n FileSystem fs = new FileSystem(inputPath, outputPath);\n rows = fs.nextInt();\n columns = fs.nextInt();\n arena = new char[rows][columns];\n for (int i = 0; i < rows; i++) {\n String rowLandTypes = fs.nextWord();\n char[] landType = rowLandTypes.toCharArray();\n for (int j = 0; j < columns; j++) {\n arena[i][j] = landType[j];\n }\n }\n noPlayers = fs.nextInt();\n for (int i = 0; i < noPlayers; i++) {\n\n char playerType = fs.nextWord().charAt(0);\n int positionX = fs.nextInt();\n int positionY = fs.nextInt();\n\n Hero myHero = new Hero();\n\n if (playerType == 'W') {\n myHero = new Wizard(positionX, positionY, arena[positionX][positionY]);\n } else if (playerType == 'P') {\n myHero = new Pyromancer(positionX, positionY, arena[positionX][positionY]);\n } else if (playerType == 'R') {\n myHero = new Rogue(positionX, positionY, arena[positionX][positionY]);\n } else if (playerType == 'K') {\n myHero = new Knight(positionX, positionY, arena[positionX][positionY]);\n }\n\n heroList.add(myHero);\n }\n\n noRounds = fs.nextInt();\n\n for (int i = 0; i < noRounds; i++) {\n String listOfMoves = fs.nextWord();\n moves.add(listOfMoves);\n }\n\n fs.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return new GameInput(rows, columns, arena, noPlayers, heroList, noRounds, moves);\n }", "public static ArrayList<Sprite> readLevel(String currentLevel) throws IOException {\n\n ArrayList<Sprite> spriteList = new ArrayList<>();\n String[] line;\n String text;\n\n try (BufferedReader reader = new BufferedReader(new FileReader(currentLevel))) {\n\n\n while((text = reader.readLine()) != null) {\n\n line = text.split(\",\");\n\n switch (line[0]) {\n case \"water\":\n spriteList.add(Tile.createWaterTile(Float.parseFloat(line[1]), Float.parseFloat(line[2])));\n break;\n\n case \"grass\":\n spriteList.add(Tile.createGrassTile(Float.parseFloat(line[1]), Float.parseFloat(line[2])));\n break;\n\n case \"tree\":\n spriteList.add(Tile.createTreeTile(Float.parseFloat(line[1]), Float.parseFloat(line[2])));\n break;\n\n case \"bus\":\n spriteList.add(new Bus(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"bulldozer\":\n spriteList.add(new Bulldozer(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"log\":\n spriteList.add(new Log(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"longLog\":\n spriteList.add(new LongLog(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"racecar\":\n spriteList.add(new Racecar(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"turtle\":\n spriteList.add(new Turtle(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"bike\":\n spriteList.add(new Bike(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n }\n }\n }\n return spriteList;\n }", "public boolean loadPlayer(P player){\n\n //Is the player already loaded?\n if(playerMap.containsKey(player)){\n System.out.println(\"Tried to load player \" + player.getName() + \"'s data, even though it's already loaded!\");\n return false;\n } else {\n\n if(data.getConfig().contains(player.getUniqueId().toString())){\n //Load player\n PlayerProfile playerProfile = new PlayerProfile(false, data, player);\n playerMap.put(player, playerProfile);\n\n return true;\n } else {\n //Create player profile\n PlayerProfile playerProfile = new PlayerProfile(true, data, player);\n playerMap.put(player, playerProfile);\n\n return true;\n }\n }\n }", "@Override\n public void createShoeFromFile(String fileName) {\n\n File file = new File(fileName);\n Scanner myReader = null;\n try {\n myReader = new Scanner(file);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n while (myReader.hasNextLine()) {\n String rankStr = \"\";\n Rank rank;\n rank = Rank.ACE;\n String suit = \"\";\n\n // The cards are separated by spaces in the file\n // Splits next line of the file into chunks containing each Card of the Shoe\n // Iterates over each card\n for (String data : myReader.nextLine().split(\" \"))\n {\n int len = data.length();\n if(data.length() == 3){\n rankStr = \"\";\n suit = \"\";\n rankStr += String.valueOf(data.charAt(0));\n rankStr += String.valueOf(data.charAt(1));\n //1 char suit\n suit = String.valueOf(data.charAt(2));\n this.cards.add(new Card( Suit.valueOf(suit), rank.getRank(rankStr), true));\n }else if(data.length() == 2){\n rankStr = \"\";\n suit = \"\";\n rankStr = String.valueOf(data.charAt(0));\n suit = String.valueOf(data.charAt(1));\n this.cards.add(new Card(Suit.valueOf(suit), rank.getRank(rankStr), true));\n }else if(data.length() == 0){\n return;\n }else{\n System.out.println(\"Error reading card.\");\n System.exit(0);\n }\n }\n }\n myReader.close();\n }", "public void readFromFile() {\n\n\t}", "private void loadFromXml(String fileName) throws IOException {\n\t\tElement root = new XmlReader().parse(Gdx.files.internal(fileName));\n\n\t\tthis.name = root.get(\"name\");\n\t\tGdx.app.log(\"Tactic\", \"Loading \" + this.name + \"...\");\n\n\t\tArray<Element> players = root.getChildrenByName(\"player\");\n\t\tint playerIndex = 0;\n\t\tfor (Element player : players) {\n\t\t\t//int shirt = player.getInt(\"shirt\"); // shirt number\n\t\t\t//Gdx.app.log(\"Tactic\", \"Location for player number \" + shirt);\n\n\t\t\t// regions\n\t\t\tArray<Element> regions = player.getChildrenByName(\"region\");\n\t\t\tfor (Element region : regions) {\n\t\t\t\tString regionName = region.get(\"name\"); // region name\n\n\t\t\t\tthis.locations[playerIndex][Location.valueOf(regionName).ordinal()] = new Vector2(region.getFloat(\"x\"), region.getFloat(\"y\"));\n\n\t\t\t\t//Gdx.app.log(\"Tactic\", locationId + \" read\");\n\t\t\t}\n\t\t\tplayerIndex++;\n\t\t}\t\n\t}", "public void newDeck()\r\n\t{\r\n\t\t// attempts to read the file\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// sets up file input\r\n\t\t\tFile file = new File(FILE_NAME);\r\n\t\t\tScanner inputFile = new Scanner(file);\r\n\t\t\t\r\n\t\t\t// creates counter for array input\r\n\t\t\tint i = 0;\r\n\t\t\t\r\n\t\t\t// reads card notations from file\r\n\t\t\twhile (inputFile.hasNext() && i < DECK_SIZE)\r\n\t\t\t{\r\n\t\t\t\tcards[i] = inputFile.nextLine();\r\n\t\t\t\t\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\r\n\t\t\t// Closes the file.\r\n\t\t\tinputFile.close();\r\n\t\t\t\r\n\t\t\t// Sets topCard\r\n\t\t\ttopCard = 51;\r\n\t\t\t\r\n\t\t\t// shuffles deck\r\n\t\t\tshuffle();\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e)\r\n\t\t{\r\n\t\t\t// prints error if file not found\r\n\t\t\tSystem.out.println(\"The file \" + FILE_NAME + \" does not exist.\");\r\n\t\t}\r\n\t}", "private void readActorData(String[] lineData)\n {\n int actorCodeIdx = 0;\n int actorFileNameIdx = 1;\n int actorIngameNameIdx = 2;\n int sprite_statusIdx = 3;\n int sensor_statusIdx = 4;\n int directionIdx = 5;\n\n Direction direction = Direction.of(lineData[directionIdx]);\n ActorData actorData = new ActorData(lineData[actorFileNameIdx], lineData[actorIngameNameIdx], lineData[sprite_statusIdx], lineData[sensor_statusIdx], direction);\n actorDataMap.put(lineData[actorCodeIdx], actorData);\n\n //Player start position is not based on tile schema\n if (actorData.actorFileName.equals(ACTOR_DIRECTORY_PATH + \"player\"))\n createPlayer(actorData);\n else\n loadedTileIdsSet.add(lineData[actorCodeIdx]);//Player is not defined by layers\n }", "@Override\n\tpublic void loadData() throws FileNotFoundException {\n\t\tthis.getPromoShare();\n\t}", "public void load() {\n\t\n\t\tdataTable = new HashMap();\n\t\t\n\t\tArrayList musicArrayList = null;\n\t\tStringTokenizer st = null;\n\n\t\tMusicRecording myRecording;\n\t\tString line = \"\";\n\n\t\tString artist, title;\n\t\tString category, imageName;\n\t\tint numberOfTracks;\n\t\tint basePrice;\n\t\tdouble price;\n\n\t\tTrack[] trackList;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tlog(\"Loading File: \" + FILE_NAME + \"...\");\n\t\t\tBufferedReader inputFromFile = new BufferedReader(new FileReader(FILE_NAME));\n\t\t\t\n\t\t\t// read until end-of-file\n\t\t\twhile ( (line = inputFromFile.readLine()) != null ) {\t\t\t\n\t\t\t\n\t\t\t\t// create a tokenizer for a comma delimited line\n\t\t\t\tst = new StringTokenizer(line, \",\");\n\t\t\n\t\t\t\t// Parse the info line to read following items formatted as\n\t\t\t\t// - the artist, title, category, imageName, number of tracks\n\t\t\t\t//\n\t\t\t\tartist = st.nextToken().trim();\n\t\t\t\ttitle = st.nextToken().trim();\n\t\t\t\tcategory = st.nextToken().trim();\n\t\t\t\timageName = st.nextToken().trim();\n\t\t\t\tnumberOfTracks = Integer.parseInt(st.nextToken().trim());\n\t\t\t\t\t\t\n\t\t\t\t// read all of the tracks in\n\t\t\t\ttrackList = readTracks(inputFromFile, numberOfTracks);\n\n\t\t\t\t// select a random price between 9.99 and 15.99\n\t\t\t\tbasePrice = 9 + (int) (Math.random() * 7);\n\t\t\t\tprice = basePrice + .99;\n\n\t\t\t\t// create the music recording\n\t\t\t\tmyRecording = new MusicRecording(artist, trackList, title, \n\t\t\t\t\t\t\t\t\t\t\t\t price, category, imageName);\n\n\t\t\t\t// check to see if we have information on this category\n\t\t\t\tif (dataTable.containsKey(category)) {\n\t\t\t\t\n\t\t\t\t\t// get the list of recordings for this category\n\t\t\t\t\tmusicArrayList = (ArrayList) dataTable.get(category); \t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\n\t\t\t\t\t// this is a new category. simply add the category\n\t\t\t\t\t// to our dataTable\n\t\t\t\t\tmusicArrayList = new ArrayList();\n\t\t\t\t\tdataTable.put(category, musicArrayList);\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// add the recording\n\t\t\t\tmusicArrayList.add(myRecording);\n\t\t\t\t\n\t\t\t\t// move ahead and consume the line separator\n\t\t\t\tline = inputFromFile.readLine();\n\t\t\t}\n\n\t\t\tinputFromFile.close();\n\t\t\tlog(\"File loaded successfully!\");\n\t\t\tlog(\"READY!\\n\");\n\n\t\t}\n\t\tcatch (FileNotFoundException exc) {\n\t\t\tlog(\"Could not find the file \\\"\" + FILE_NAME + \"\\\".\");\n\t\t\tlog(\"Make sure it is in the current directory.\");\n\t\t\tlog(\"========>>> PLEASE CONTACT THE INSTRUCTOR.\\n\\n\\n\");\n\t\t\tlog(exc);\n\t\t\t\n\t\t}\n\t\tcatch (IOException exc) {\n\t\t\tlog(\"IO error occurred while reading file: \" + FILE_NAME);\n\t\t\tlog(\"========>>> PLEASE CONTACT THE INSTRUCTOR.\\n\\n\\n\");\n\t\t\tlog(exc);\n\n\t\t}\n\t\n\t}", "public void addNewPlayerStatsToStats(String username) throws IOException{\r\n\t\tScanner statsReader = new Scanner(new BufferedReader(new FileReader(\"statistics.txt\")));\r\n\t\tint numberOfPlayers = statsReader.nextInt();\r\n\t\tPlayerStats[] statsDirectory = new PlayerStats[numberOfPlayers];\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tPlayerStats tempPlayerStats = new PlayerStats();\r\n\t\t\t/* load temporary stats object with stats */\r\n\t\t\treadPlayerStats(tempPlayerStats, statsReader);\r\n\t\t\t/* add new stats object to directory */\r\n\t\t\tstatsDirectory[count] = tempPlayerStats;\r\n\t\t}\r\n\t\t\r\n\t\tstatsReader.close();\r\n\t\t/* rewrite the statistics file with user stats reset */\r\n\t\tFileWriter writer = new FileWriter(\"statistics.txt\");\r\n\t\tBufferedWriter statsWriter = new BufferedWriter(writer);\r\n\t\tnumberOfPlayers++;\r\n\t\tInteger numPlayers = numberOfPlayers;\r\n\t\tstatsWriter.write(numPlayers.toString()); // write the number of players\r\n\t\tstatsWriter.write(\"\\n\");\r\n\t\tfor(int count = 0; count < numberOfPlayers - 1; count++) { // - 1 because numberOfPlayers was incremented\r\n\t\t\tstatsWriter.write(statsDirectory[count].playerStatsToString()); // write player to statistics.txt\r\n\t\t}\r\n\t\t/* add new entry with 0s at end */\r\n\t\t\tInteger zero = 0;\r\n\t\t\tstatsWriter.write(username);\r\n\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t\r\n\t\t\tfor(int count = 0; count < 5; count++) {\r\n\t\t\t\tstatsWriter.write(zero.toString());\r\n\t\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\tstatsWriter.close();\r\n\t}", "public QuizPlayer serialReadFile() {\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(); //If any error is caught the program will re ask the user for input.\r\n try {\r\n ObjectInputStream inputStream =\r\n new ObjectInputStream(new FileInputStream(fileObject));\r\n q = (QuizPlayer) inputStream.readObject();\r\n\r\n\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Cannot find file. Please Enter a different file Name\");\r\n\r\n } catch (ClassNotFoundException e) {\r\n System.out.println(\"Problems with file input. Please Enter a different file name\");\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problems with file input. Please Enter a differet file name\");\r\n }\r\n\r\n\r\n return q;\r\n }", "@Override\r\n\tpublic Level LoadLevel(InputStream LevelLoad)throws IOException\r\n\t{\r\n\r\n\t\tBufferedReader read = new BufferedReader(new InputStreamReader(LevelLoad));\r\n\t\tString line;\r\n\t\tint column=0;\r\n\t\tint row=0;\r\n\t\tArrayList<String> ans= new ArrayList<String>();\r\n\t\twhile((line = read.readLine()) != null)\r\n\t\t{\r\n\t\t\tif (line.length() > row)\r\n\t\t\t{\r\n\t\t\t\trow = line.length();\r\n\t\t\t}\r\n\t\tcolumn++;\r\n\t\tans.add(line);\r\n\r\n\t\t}\r\n\t\tLevel level = new Level(column,row);\r\n\t\tcolumn = 0;\r\n\t\tfor(String resualt: ans)\r\n\t\t{\r\n\r\n\t\t\tfor(int i=0;i<resualt.length();i++)\r\n\t\t\t{\r\n\t\t\t\tswitch(resualt.charAt(i))\r\n\t\t\t\t{\r\n\t\t\t\t\tcase ' ':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive(' ');\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i,item);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase '#':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive('#');\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i,item);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase 'A':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive('A');\r\n\t\t\t\t\t\tlevel.setMoveableMap(column,i,item);\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i, new AbstractItems(new Position2D(column,i), ' '));\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase '@':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive('@');\r\n\t\t\t\t\t\tlevel.setMoveableMap(column,i,item);\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i, new AbstractItems(new Position2D(column,i), ' '));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase 'o':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive('o');\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i,item);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcolumn++;\r\n\t\t}\r\n\r\n\r\n\t\treturn level;\r\n\t}", "public void readFile(String file)\n\t{\t\n\t\tfindPieces(file);\n\t}", "public void ReadFromBinary() throws IOException\n\t {\n\t \t\n\t \tDataInputStream Input = new DataInputStream(new FileInputStream(\"GameProgress.dat\"));\n\t \t\n\t \t\tpl.xCoord = Input.read(); \n\t \t\tpl.xCoord = Input.read(); \n\t\t\t\tpl.NumRockets = Input.read(); \n\t\t\t\tpl.NumBullets = Input.read();\n\t\t\t\tpl.Health =Input.read();\n\t\t\t\tDestroyedEnemies =Input.read();\n\t\t\t\tRunAwayEnemies =Input.read();\n\t\t\t\t\n\t\t\t\tint x, y = 0; \n\t\t\t\t\n\t\t\t\tfor (int i = 0 ; i < EnemyList.size(); i++ )\n\t\t\t\t{\n\t\t\t\t\tx = Input.read();\n\t\t\t\t\ty = Input.read();\n\t\t\t\t\teh = new Enemy(x,y);\n\t\t\t\t\tEnemyList.add(eh);\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tInput.close(); \n\t }", "public static Player getPlayer(Player player){\n Player returnPlayer = null;\n if (player != null) {\n try {\n returnPlayer = mapper.readValue(new File(\"Data\\\\PlayerData\\\\\" + getFileName(player) + \".json\"), Player.class);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return returnPlayer;\n }", "Player loadPlayer(String playerIdentifier) {\n\n Player load = new Player();\n Table t = Constants.processing.loadTable(\"data/player\" + playerIdentifier + \".csv\");\n load.brain.TableToNet(t);\n return load;\n }", "public void fillFromFile()\n\t{\n\t\tJFileChooser fc = new JFileChooser();\t//creates a new fileChooser object\n\t\tint status = fc.showOpenDialog(null);\t//creates a var to catch the dialog output\n\t\tif(status == JFileChooser.APPROVE_OPTION)\t\n\t\t{\n\t\t\tFile selectedFile = fc.getSelectedFile ( );\n\t\t\tthis.fileName = selectedFile;\n\t\t\tScanner file = null; //scans the file looking for information to load\n\n\t\t\tif(selectedFile.exists())\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tfile = new Scanner(fileName); //scans the input file\n\t\t\t\t}\n\t\t\t\tcatch(Exception IOException)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showConfirmDialog (null, \"Unable to import data from the list\");\n\t\t\t\t\tSystem.exit (-1);\n\t\t\t\t}//if there was an error it will pop up this message\n\t\t\t\t\n\t\t\t\tString str = file.nextLine ( ); //names the line\n\t\t\t\tString [] header = str.split (\"\\\\|\"); //splits the line at the |\n\t\t\t\tsetCourseNumber(header[1]);\n\t\t\t\tsetCourseName(header[0]);\n\t\t\t\tsetInstructor(header[2]);\n\t\t\t\t\n\t\t\t\twhile(file.hasNextLine ( ))\n\t\t\t\t{\n\t\t\t\t\tstr = file.nextLine ( ); //names the line\n\t\t\t\t\tString [] tokens = str.split (\"\\\\|\"); //splits the line at the |\n\t\t\t\t\tStudent p = new Student();\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tp.setStrNameLast (String.valueOf (tokens[0]));\n\t\t\t\t\t\tp.setStrNameFirst (String.valueOf (tokens[1]));\n\t\t\t\t\t\tp.setStrMajor (String.valueOf (tokens[2]));\n\t\t\t\t\t\tp.setClassification (tokens[3]);\n\t\t\t\t\t\tp.setiHoursCompleted (new Integer (tokens[4]).intValue ( ));\n\t\t\t\t\t\tp.setfGPA (new Float (tokens[5]).floatValue ( ));\n\t\t\t\t\t\tp.setStrStudentPhoto (String.valueOf (tokens[6]));\n\t\t\t\t\t//creates a person object and then populates it with an array of scanned input values\n\t\t\t\t\t\tclassRoll.add (p);\n\t\t\t\t\t\t}//creates a person object and then populates it with an array of scanned input values\n\t\t\t\t\t\tcatch(Exception IOException)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tIOException.printStackTrace ( );\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog (null, \"Bad input record: '\" + str + \"'\" + IOException.getMessage());\n\t\t\t\t\t\t}//pops up a message if there were any errors reading from the file\n\t\t\t\t}//continues through the file until there are no more lines to scan\n\t\t\tfile.close ( ); //closes the file\n\n\t\t\t\tif(selectedFile.exists ( )==false)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception IOException)\n\t\t\t\t\t{\n\t\t\t\t\t\tJOptionPane.showMessageDialog (null, \"Bad input record: '\" + selectedFile + \"' \" + IOException.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}//if the user picks a file that does not exist this error message will be caught.\n\t\t\t}\n\t\t}//if the input is good it will load the information from the selected file to and Array List\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.exit (0);\n\t\t\t}\n\t\tthis.saveNeed = true;\n\n\t\t}", "public interface FileController {\n\n Game readFromFile(File file) throws IOException;\n\n}", "public static void loadGameStats(Player player) throws FileNotFoundException {\n gameStatsReader = new BufferedReader(new FileReader(\"src/main/resources/stats/gamestats.txt\"));\n try {\n player.getGameStats().setAttacks(Integer.parseInt(gameStatsReader.readLine()));\n player.getGameStats().setHits(Integer.parseInt(gameStatsReader.readLine()));\n player.getGameStats().setDamage(Long.parseLong(gameStatsReader.readLine()));\n player.getGameStats().setKills(Integer.parseInt(gameStatsReader.readLine()));\n player.getGameStats().setFirstHitKill(Integer.parseInt(gameStatsReader.readLine()));\n player.getGameStats().setAssists(Integer.parseInt(gameStatsReader.readLine()));\n player.getGameStats().setCasts(Integer.parseInt(gameStatsReader.readLine()));\n player.getGameStats().setSpellDamage(Long.parseLong(gameStatsReader.readLine()));\n player.getGameStats().setTimePlayed(Long.parseLong(gameStatsReader.readLine()));\n\n } catch (IOException ex) {\n Logger.getLogger(StatsLoader.class.getName()).log(Level.SEVERE, \"Cannot find specificed stats file\", ex);\n }\n }", "public void readDataFromFile(){\n try {\n weatherNow.clear();\n // Open File\n Scanner scan = new Scanner(context.openFileInput(fileSaveLoc));\n\n // Find all To Do items\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n\n // if line is not empty it is data, add item.\n if (!line.isEmpty()) {\n // first is the item name and then the item status.\n String[] readList = line.split(\",\");\n String city = readList[0];\n String countryCode = readList[1];\n double temp = Double.parseDouble(readList[2]);\n String id = readList[3];\n String description = readList[4];\n\n weatherNow.add(new WeatherNow(city,countryCode, temp, id, description));\n }\n }\n\n // done\n scan.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void setImage2(String file){ \n try {\n player = ImageIO.read(new File(file));\n } catch (IOException ex) {\n Logger.getLogger(GridSquarePanel.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void loadPlayers() {\r\n this.passive_players.clear();\r\n this.clearRoster();\r\n //Map which holds the active and passive players' list\r\n Map<Boolean, List<PlayerFX>> m = ServiceHandler.getInstance().getDbService().getPlayersOfTeam(this.team.getID())\r\n .stream().map(PlayerFX::new)\r\n .collect(Collectors.partitioningBy(x -> x.isActive()));\r\n this.passive_players.addAll(m.get(false));\r\n m.get(true).stream().forEach(E -> {\r\n //System.out.println(\"positioning \"+E.toString());\r\n PlayerRosterPosition pos = this.getPlayerPosition(E.getCapnum());\r\n if (pos != null) {\r\n pos.setPlayer(E);\r\n }\r\n });\r\n }", "public void loadGame(File fileLocation, boolean replay);", "public void load(String file){\n try{\n Scanner sc = new Scanner(new FileReader(file));\n ArrayList <String> saving = new ArrayList<String>();\n boolean line = sc.hasNext();\n while(line ==true ){\n String x = sc.next();\n if(!(x.contains(\"CO\")||x.contains(\"CB\"))){\n saving.add(x);\n line = sc.hasNext();\n }\n }\n sc.close();\n setValues(saving);\n }catch(IOException e){\n JOptionPane.showMessageDialog(null, \"error in reading file\", \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n }", "public void loadGame() throws IOException\r\n\t{\r\n\t\tjava.io.BufferedReader reader;\r\n\t String line;\r\n\t String[] elements;\r\n\t int ammo = 0;\r\n\t String state = null;\r\n\t try\r\n\t {\r\n\t reader = new java.io.BufferedReader(new java.io.FileReader(\"Game.ser\"));\r\n\t line = reader.readLine();\r\n\t elements = line.split(\":\");\r\n\t state = elements[0];\r\n\t ammo = Integer.decode(elements[1]);\r\n\t \r\n\t reader.close();\r\n\t \r\n\t\t gamePanel.getView().getPlayer().setAmmo(ammo);\r\n\t\t gamePanel.getView().getPlayer().setState(state);\r\n\t }\r\n\t catch(Exception e)\r\n\t {\r\n\t System.out.println(\"Can't load this save\");\r\n\t }\r\n\t \r\n\t \r\n\r\n\t}", "public void insertdata(String file) {\n\r\n\r\n final String csvFile = file;\r\n\r\n try (BufferedReader br = new BufferedReader(new FileReader(csvFile))) {\r\n\r\n\r\n while ((line = br.readLine()) != null) {\r\n\r\n\r\n // use comma as separator\r\n String[] country = line.split(\",\");\r\n\r\n if (country.length == 12) {\r\n model_lacakMobil = new Model_LacakMobil();\r\n realmHelper = new RealmHelper(realm);\r\n\r\n model_lacakMobil.setNama_mobil(country[1]);\r\n model_lacakMobil.setNo_plat(country[2]);\r\n model_lacakMobil.setNamaunit(country[3]);\r\n model_lacakMobil.setFinance(country[4]);\r\n model_lacakMobil.setOvd(country[5]);\r\n model_lacakMobil.setSaldo(country[6]);\r\n model_lacakMobil.setCabang(country[7]);\r\n model_lacakMobil.setNoka(country[8]);\r\n model_lacakMobil.setNosin(country[9]);\r\n model_lacakMobil.setTahun(country[10]);\r\n model_lacakMobil.setWarna(country[11]);\r\n realmHelper.save(model_lacakMobil);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } finally {\r\n// fixing_data();\r\n\r\n }\r\n }", "private void loadDataFromFile(File file) {\n\t\tString fileName = file.getName();\n\t\tQuickParser test = new QuickParser();\n\n\t\tif(fileName.trim().toUpperCase().startsWith(\"INV\")) {\n\t\t\tfileType = FileType.INVENTORY;\n\t\t\ttableView.getColumns().clear();\n\t\t\ttableView.getColumns().addAll(rfid,campus,building,room,lastScannedOn,lastScannedBy,purchaseOrder,serviceTag,comments);\n\t\t\tmasterInventoryData.clear();\n\t\t\tmasterInventoryData = test.Parse(file, fileType);\n\t\t\tpresentationInventoryData.clear();\n\t\t\tpresentationInventoryData.addAll(masterInventoryData);\n\t\t\tswitch (fileType) {\n\t\t\tcase INVENTORY:\n\t\t\t\tcurrentTabScreen = CurrentTabScreen.INVENTORY;\n\t\t\t\tbreak;\n\t\t\tcase INITIAL:\n\t\t\t\tcurrentTabScreen = CurrentTabScreen.INITIAL;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t} // End switch statement \n\t\t} // End if statement\n\t\telse if(fileName.toUpperCase().startsWith(\"INI\")) {\n\t\t\tfileType = FileType.INITIAL;\n\t\t\ttableView.getColumns().clear();\n\t\t\ttableView.getColumns().addAll(rfid,campus,building,room,lastScannedOn,lastScannedBy,purchaseOrder,serviceTag,comments);\n\t\t\tmasterInitialData.clear();\n\t\t\tmasterInitialData = test.Parse(file, fileType);\n\t\t\tpresentationInitialData.clear();\n\t\t\tpresentationInitialData.addAll(masterInitialData);\n\t\t\tswitch (fileType) {\n\t\t\tcase INVENTORY:\n\t\t\t\tcurrentTabScreen = CurrentTabScreen.INVENTORY;\n\t\t\t\tbreak;\n\t\t\tcase INITIAL:\n\t\t\t\tcurrentTabScreen = CurrentTabScreen.INITIAL;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t} // End switch statement \n\t\t} // End else if statement \n\t\telse {\n\t\t\tfileType = FileType.UNASSIGNED;\n\t\t} // End else statement\n\t\tchangeToScanTable();\n\t}", "@Override\n\tpublic void savePlayerData(OutputStream arg0) {\n\n\t}", "public static void loadDatabase(){\n\t\ttry(BufferedReader reader = new BufferedReader(new FileReader(filePath))){\n\t\t\tfor(String line; (line = reader.readLine()) != null; ){\n\t\t\t\tString[] info = line.split(Pattern.quote(\"|\"));\n\t\t\t\tString path = info[0].trim();\n\t\t\t\tString fileID = info[1];\n\t\t\t\tInteger nOfChunks = Integer.parseInt(info[2]);\n\t\t\t\tPair<FileID, Integer> pair = new Pair<FileID, Integer>(new FileID(fileID), nOfChunks);\n\t\t\t\tPeer.fileList.put(path, pair);\n\t\t\t}\n\t\t\treader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/*\n\t\t * LOAD THE CHUNK LIST\n\t\t */\n\t\ttry(BufferedReader reader = new BufferedReader(new FileReader(chunkPath))){\n\t\t\tfor(String line; (line = reader.readLine()) != null; ){\n\t\t\t\tString[] info = line.split(Pattern.quote(\"|\"));\n\t\t\t\tString fileID = info[0].trim();\n\t\t\t\tInteger chunkNo = Integer.parseInt(info[1]);\n\t\t\t\tInteger drd = Integer.parseInt(info[2]);\n\t\t\t\tInteger ard = Integer.parseInt(info[3]);\n\t\t\t\tChunkInfo ci = new ChunkInfo(fileID,chunkNo,drd,ard);\n\t\t\t\tPeer.chunks.add(ci);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}" ]
[ "0.68603283", "0.68009716", "0.66960955", "0.65252566", "0.64360017", "0.6390436", "0.63831735", "0.6363182", "0.6258432", "0.62486315", "0.62199503", "0.617525", "0.61116266", "0.6103466", "0.6075382", "0.60666776", "0.6030375", "0.6025629", "0.60119045", "0.6007809", "0.59897196", "0.59762627", "0.5902771", "0.58980966", "0.5886582", "0.58802366", "0.58788455", "0.58685863", "0.58350265", "0.58067596", "0.57380086", "0.5724361", "0.57131195", "0.5695813", "0.56786215", "0.5678128", "0.5671451", "0.56599104", "0.56185585", "0.5613644", "0.56079614", "0.55923617", "0.5590833", "0.5581963", "0.5556161", "0.55379224", "0.5532334", "0.55321085", "0.55281264", "0.5523028", "0.54899794", "0.54875624", "0.54771066", "0.54745144", "0.5464138", "0.54479015", "0.5446743", "0.5442975", "0.54291797", "0.5422359", "0.54132164", "0.5412729", "0.54121745", "0.5406548", "0.54064775", "0.537887", "0.5378685", "0.53759044", "0.53741556", "0.5372112", "0.5365436", "0.53650784", "0.5363171", "0.53587246", "0.5348026", "0.53469014", "0.53320926", "0.5328424", "0.5294726", "0.529459", "0.5293582", "0.5280571", "0.5264964", "0.5258581", "0.5255442", "0.5253711", "0.5249617", "0.52491874", "0.52481323", "0.523453", "0.5233619", "0.5227427", "0.5221125", "0.5218173", "0.5212984", "0.52084184", "0.52042705", "0.51988435", "0.51985013", "0.5191511" ]
0.51946354
99
Constructs a ModuloOperator from the given divisor and remainder.
public ModuloOperator(Number divisor, Number remainder) { this.divisor = divisor; this.remainder = remainder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String toString() {\n\t\treturn \"ModuloOperator{divisor=\" + divisor.toString() + \", remainder=\" + remainder.toString() + \"}\";\n\t}", "public static BinaryExpression modulo(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.Modulo, expression0, expression1);\n }", "public final EObject ruleModulusOperator() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4891:28: ( ( () otherlv_1= '%' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4892:1: ( () otherlv_1= '%' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4892:1: ( () otherlv_1= '%' )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4892:2: () otherlv_1= '%'\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4892:2: ()\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4893:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getModulusOperatorAccess().getModulusOperatorAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,67,FOLLOW_67_in_ruleModulusOperator11025); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getModulusOperatorAccess().getPercentSignKeyword_1());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public static NumberP Modulo(NumberP first, NumberP second)\n {\n return OperationsManaged.PerformArithmeticOperation\n (\n first, second, ExistingOperations.Modulo\n ); \t\n }", "public static BinaryExpression moduloAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.ModuloAssign, expression0, expression1);\n }", "public static BinaryExpression modulo(Expression expression0, Expression expression1, Method method) {\n return makeBinary(\n ExpressionType.Modulo,\n expression0,\n expression1,\n shouldLift(expression0, expression1, method),\n method);\n }", "public PghModulo() {\r\n }", "public static NodeValue numericMod(NodeValue nv1, NodeValue nv2) {\n switch (XSDFuncOp.classifyNumeric(\"mod\", nv1, nv2)) {\n // a = (a idiv b)*b+(a mod b)\n // => except corner cases (none or xsd:decimal except precision?)\n // a - (a idiv b)*b\n\n case OP_INTEGER :\n // Not BigInteger.mod. F&O != Java.\n BigInteger bi1 = nv1.getInteger();\n BigInteger bi2 = nv2.getInteger();\n if ( BigInteger.ZERO.equals(bi2) )\n throw new ExprEvalException(\"Divide by zero in MOD\") ;\n BigInteger bi3 = bi1.remainder(bi2);\n return NodeValue.makeInteger(bi3);\n case OP_DECIMAL :\n BigDecimal bd_a = nv1.getDecimal();\n BigDecimal bd_b = nv2.getDecimal();\n if ( BigDecimal.ZERO.compareTo(bd_b) == 0 )\n throw new ExprEvalException(\"Divide by zero in MOD\") ;\n // This is the MOD for X&O\n BigDecimal bd_mod = bd_a.remainder(bd_b);\n return NodeValue.makeDecimal(bd_mod);\n case OP_FLOAT :\n float f1 = nv1.getFloat();\n float f2 = nv2.getFloat();\n if ( f2 == 0 )\n throw new ExprEvalException(\"Divide by zero in MOD\") ;\n return NodeValue.makeFloat( f1 % f2) ;\n case OP_DOUBLE :\n double d1 = nv1.getDouble();\n double d2 = nv2.getDouble();\n if ( d2 == 0 )\n throw new ExprEvalException(\"Divide by zero in MOD\") ;\n return NodeValue.makeDouble(d1 % d2) ;\n default :\n throw new ARQInternalErrorException(\"Unrecognized numeric operation : (\" + nv1 + \" ,\" + nv2 + \")\") ;\n }\n }", "public IntegerModComparator(Integer divisorValue) {\n this.divisorValue = divisorValue;\n }", "public static BinaryExpression moduloAssign(Expression expression0, Expression expression1, Method method) {\n return makeBinary(ExpressionType.ModuloAssign, expression0, expression1, false, method);\n }", "public int modulo(int a, int b) {\n return a % b;\n }", "private static void helloHelloModulo() {\n int a = 1;\n int b = 10;\n int c = 1 / 10;\n\n int d = 1 % 10;\n\n\n System.out.println(\" Result deleniya \" + c);\n System.out.println(\" Result deleniya \" + d);\n\n\n int делимое = 75;\n int делитель = 13;\n int f = делимое % делитель;\n\n int остаток = делимое - (делимое / делитель) * делитель;\n int j = 7 % 2;\n\n System.out.println(f);\n System.out.println(остаток);\n\n\n }", "public final void mMOD() throws RecognitionException {\n try {\n int _type = MOD;\n // /Users/benjamincoe/HackWars/C.g:214:5: ( '%' )\n // /Users/benjamincoe/HackWars/C.g:214:7: '%'\n {\n match('%'); \n\n }\n\n this.type = _type;\n }\n finally {\n }\n }", "public final void mMOD() throws RecognitionException {\n try {\n int _type = MOD;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:29:5: ( '%' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:29:7: '%'\n {\n match('%'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "private static int cprModFunction(int a, int b) {\n\t\tint res = a % b;\n\t\tif (res < 0)\n\t\t\tres += b;\n\t\treturn res;\n\t}", "protected MatrixToken _moduloElement(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.modulo(_value, scalar);\n\t\treturn new LongMatrixToken(result, _rowCount, _columnCount, DO_NOT_COPY);\n\t}", "public AzModulo(Modulo modulo) {\n /* rimanda al costruttore della superclasse */\n super(modulo);\n super.setUsaIconaModulo(true);\n }", "public static long mod(int dividend, int divisor) {\r\n\t\tif(dividend < divisor) return dividend;\r\n\t\tif(dividend == divisor) return 0; \r\n\t\tif(divisor == 1) return dividend;\r\n\t\t\r\n\t\treturn mod(dividend - divisor, divisor); \r\n\t}", "@Test\n public void testModulo() {\n System.out.println(\"modulo\");\n int x = 0;\n int y = 0;\n int expResult = 0;\n int result = utilsHill.modulo(x, y);\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 }", "public static int mod(int x, int y) {\n return x % y;\n }", "public static int modulo(int iValue, int modulus) {\n assert Validate.positive(modulus, \"modulus\");\n\n int remainder = iValue % modulus;\n int result;\n if (iValue >= 0) {\n result = remainder;\n } else {\n result = (remainder + modulus) % modulus;\n }\n\n assert result >= 0f : result;\n assert result < modulus : result;\n return result;\n }", "public OPE(BigInteger modulus)\n\t{\t\t\n\t\tthis.modulus = modulus;\n\t}", "static int modulo(int x, int y) {\n return (x%y);\n }", "@Override\n\tpublic void visit(Modulo arg0) {\n\t\t\n\t}", "public StatementParse mulDivTransform(StatementParse node) {\n // This function is called on _every_ multiply and divide node.\n StatementParse node1 = node.getChildren().get(0);\n StatementParse node2 = node.getChildren().get(1);\n if (!(node1 instanceof IntegerParse) || !(node2 instanceof IntegerParse)){\n return node;\n }\n int value1 = ((IntegerParse) node1).getValue();\n int value2 = ((IntegerParse) node2).getValue();\n int result;\n if (node.getName().equals(\"*\")){\n result = value1 * value2;\n } else{ // div node\n if (value2 == 0) return node;\n result = value1 / value2;\n }\n\n IntegerParse newNode = new IntegerParse(result);\n if (node.isNegative()) newNode.setNegative(true);\n return newNode;\n }", "public static BinaryExpression moduloAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) {\n return makeBinary(ExpressionType.ModuloAssign, expression0, expression1, false, method, lambdaExpression);\n }", "public Counter (int modulus) {\n count = 0;\n this.modulus = modulus;\n }", "public final EObject entryRuleModulusOperator() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleModulusOperator = null;\r\n\r\n\r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4880:2: (iv_ruleModulusOperator= ruleModulusOperator EOF )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4881:2: iv_ruleModulusOperator= ruleModulusOperator EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getModulusOperatorRule()); \r\n }\r\n pushFollow(FOLLOW_ruleModulusOperator_in_entryRuleModulusOperator10969);\r\n iv_ruleModulusOperator=ruleModulusOperator();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleModulusOperator; \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleModulusOperator10979); if (state.failed) return current;\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 }", "public void setModulo(boolean modulo){\n\t\tthis.modulo = modulo;\n\t\tif(this.modulo) setMin(0);\n\t}", "public PghModulo(Long idModulo, String ruta, String descripcion, Date fechaCreacion, Date fechaActualizacion, String usuarioCreacion, String usuarioActualizacion, String terminalCreacion, String terminalActualizacion, String estado, String observaciones) {\r\n this.idModulo = idModulo;\r\n this.ruta = ruta;\r\n this.descripcion = descripcion;\r\n this.fechaCreacion = fechaCreacion;\r\n this.fechaActualizacion = fechaActualizacion;\r\n this.usuarioCreacion = usuarioCreacion;\r\n this.usuarioActualizacion = usuarioActualizacion;\r\n this.terminalCreacion = terminalCreacion;\r\n this.terminalActualizacion = terminalActualizacion;\r\n this.estado = estado;\r\n this.observaciones = observaciones;\r\n }", "@Factory\n public static Matcher<QueryTreeNode> bitwiseAndUsingMod(Matcher<QueryTreeNode> leftMatcher, Matcher<QueryTreeNode> rightMatcher) {\n return new BinaryOperatorNodeMatcher(leftMatcher, \"mod\", rightMatcher);\n }", "public static double modulo(double dValue, double modulus) {\n assert Validate.positive(modulus, \"modulus\");\n\n double remainder = dValue % modulus;\n double result;\n if (dValue >= 0) {\n result = remainder;\n } else {\n result = (remainder + modulus) % modulus;\n }\n\n assert result >= 0.0 : result;\n assert result < modulus : result;\n return result;\n }", "@Override\n\tpublic Operation createOperate() {\n\t\treturn new OperationDiv();\n\t}", "public HugeUInt mod(HugeUInt b) {\r\n \t HugeUInt q = new HugeUInt(this);\r\n HugeUInt t;\r\n HugeUInt m;\r\n int lenA = q.getSize();\r\n int lenB = b.getSize();\r\n int sh = lenA - lenB;\r\n int d; \r\n while (b.compareTo(q) <= 0) {\r\n \tsh = lenA - lenB;\r\n t = q.shiftRight(sh);\r\n if (t.compareTo(b) < 0) {\r\n sh--;\r\n }\r\n d = 9;\r\n m = b.multiply(d).shiftLeft(sh);\r\n while (q.compareTo(m) < 0) {\r\n d--;\r\n m = b.multiply(d).shiftLeft(sh);\r\n }\r\n q = q.subtract(m);\r\n q.trim();\r\n lenA = q.getSize();\r\n }\r\n q.trim();\r\n return q;\r\n }", "protected final double mod(double value, double modulus) {\n return (value % modulus + modulus) % modulus;\n }", "public Snippet visit(ModulusExpression n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t\t Snippet f0 = n.identifier.accept(this, argu);\n\t\t n.nodeToken.accept(this, argu);\n\t\t Snippet f2 = n.identifier1.accept(this, argu);\n\t\t _ret.returnTemp = f0.returnTemp+\" % \"+f2.returnTemp;\n\t return _ret;\n\t }", "@Override\n public InterpreterValue mod(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the modulo-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 modulo-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 static double modulo(double val, double mod) {\n double n = Math.floor(val / mod);\n double r = val - n * mod;\n return Util.almost_equals(r,mod) ? 0.0 : r;\n }", "public static float modulo(float fValue, float modulus) {\n assert Validate.positive(modulus, \"modulus\");\n\n float remainder = fValue % modulus;\n float result;\n if (fValue >= 0) {\n result = remainder;\n } else {\n result = (remainder + modulus) % modulus;\n }\n\n assert result >= 0f : result;\n assert result < modulus : result;\n return result;\n }", "public void mulop() {\n if (lexer.token != Symbol.MULT && lexer.token != Symbol.DIV) {\n error.signal(\"Wrong operator for mulop. Not multiplication or division.\");\n }\n lexer.nextToken();\n }", "@Test\n public void testPowerMod_0_0_2() {\n NaturalNumber n = new NaturalNumber2(0);\n NaturalNumber p = new NaturalNumber2(0);\n NaturalNumber m = new NaturalNumber2(2);\n CryptoUtilities.powerMod(n, p, m);\n assertEquals(\"1\", n.toString());\n assertEquals(\"0\", p.toString());\n assertEquals(\"2\", m.toString());\n }", "@Test\n public void testModulo0() {\n MainPanel mp = new MainPanel();\n ProgramArea pa = new ProgramArea();\n ProgramStack ps = new ProgramStack();\n\n ps.push(10);\n ps.push(5);\n\n ProgramExecutor pe = new ProgramExecutor(mp, ps, pa);\n\n pe.modulo();\n\n Assert.assertEquals(0, ps.pop());\n }", "public void div(String operand, Integer value) throws Exception{\n Integer divisor = null;\n if (operand.equals(\"=\")){\n divisor = value;\n }else if (operand.equals(\" \")){\n divisor = dataMemory.getData(value);\n }else if (operand.equals(\"*\")){\n Integer newDirection = dataMemory.getData(value);\n divisor = dataMemory.getData(newDirection);\n }else{\n throw new IllegalArgumentException(\"No valid operand\");\n }\n\n Integer dividend = dataMemory.getData(0);\n Integer sum = 0;\n Integer quotient = 0;\n while (sum < dividend){\n sum += divisor;\n quotient++;\n }\n\n /*In case that the remainder isn't zero*/\n if (sum > dividend)\n quotient--;\n\n dataMemory.setData(0, quotient);\n }", "BaseNumber divide(BaseNumber operand);", "int getRemainder(int num, int divisor) {\n\t\treturn (num - divisor * (num/divisor));\n\t}", "public static int mod(int a,int b) {\n\t\tif (b == 0) return 0;\n\t\tif (b<0) {\n\t\t\treturn -mod(-a,-b);\n\t\t} else if(a<0) {\n\t\t\twhile (Math.abs(a-b)>b)a+=b;\n\t\t\treturn a;\n\t\t} else {\n\t\t\twhile (a-b>=0) a-=b;\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}", "void arithmetic() {\n\n int sum, subtraction, multi, div,mod; //Local variable\n Scanner num = new Scanner(System.in); //create a class\n System.out.println(\"Input the first value: \");\n a = num.nextInt(); //\n System.out.println(\"Input the second value\");\n ArithmeticOperator.b = num.nextInt();\n\n sum = a + b;\n System.out.println(a + \" + \" + b + \" = \" + sum);\n\n subtraction = a - b;\n System.out.println(a + \" - \" + b + \" = \" + subtraction);\n\n multi = a * b;\n System.out.println(a + \" * \" + b + \" = \" + multi);\n\n div = a / b;\n System.out.println(a + \" / \" + b + \" = \" + div);\n\n mod=a%b;\n System.out.println(a+\" mod \"+b+\" = \"+mod);\n\n }", "@ZenCodeType.Operator(ZenCodeType.OperatorType.MOD)\n default IData mod(IData other) {\n \n return notSupportedOperator(OperatorType.MOD);\n }", "private String getModulo(){\n int lenghtOfInput = String.valueOf(modulo).length();\n String even = new String();\n String odd = new String();\n\n if (lenghtOfInput != 8){\n return modulo + getString(R.string.notValidMatrikelNotePt1) + lenghtOfInput + getString(R.string.notValidMatrikelNotePt2);\n } else {\n int[] arr = new int[lenghtOfInput];\n\n //make an array of digits\n int i = 0;\n do {\n arr[i] = modulo % 10;\n modulo = modulo / 10;\n i++;\n } while (modulo != 0);\n\n //seperate even digits from odd ones\n for (int runner = 0; runner < lenghtOfInput; runner++){\n if(arr[runner] % 2 == 0){\n even += arr[runner];\n } else {\n odd += arr[runner];\n }\n }\n\n //Sorting of the char-rays which are numbers\n char[] evenSorted = even.toCharArray();\n Arrays.sort(evenSorted);\n String evenSortedString = new String(evenSorted);\n char[] oddSorted = odd.toCharArray();\n Arrays.sort(oddSorted);\n String oddSortedString = new String(oddSorted);\n\n return getString(R.string.solutionTxt) + \"\\n\" + evenSortedString + oddSortedString;\n }\n }", "public static float modulus(float a, float b)\n\t{\n\t\treturn (a % b + b) % b;\n\t}", "@Test\n public void testModuloNegative() {\n MainPanel mp = new MainPanel();\n ProgramArea pa = new ProgramArea();\n ProgramStack ps = new ProgramStack();\n\n ps.push(-10);\n ps.push(3);\n\n ProgramExecutor pe = new ProgramExecutor(mp, ps, pa);\n\n pe.modulo();\n\n Assert.assertEquals(-1, ps.pop());\n }", "public Builder setRemainderPercent(int value) {\n \n remainderPercent_ = value;\n onChanged();\n return this;\n }", "public PghModulo(Long idModulo, String ruta, String descripcion, String estado, String observaciones) {\r\n\t\tthis.idModulo = idModulo;\r\n\t\tthis.ruta = ruta;\r\n\t\tthis.descripcion = descripcion;\r\n\t\tthis.estado = estado;\r\n\t\tthis.observaciones = observaciones;\r\n\t}", "public static final int flooredMulDiv( int multiplicand, int multiplier, int divisor )\n {\n long result = (long) multiplicand * (long) multiplier;\n if ( result >= 0 ) return(int) (result / divisor);\n else return(int) ((result-divisor+1) / divisor);\n }", "MulOrDiv createMulOrDiv();", "public static NumberP Division(NumberP first, NumberP second)\n {\n return OperationsManaged.PerformArithmeticOperation\n (\n first, second, ExistingOperations.Division\n ); \t\n }", "public PrintSequenceRunnable (int remainder) {\r\n\t\tthis.remainder = remainder;\r\n\t}", "@Test\n public void testParseDiv() {\n System.out.println(\"testParseDiv\");\n\n byte[] expected = {\n Instruction.LIT.getId(), 0, 1,\n Instruction.LIT.getId(), 0, 2,\n Instruction.DIV.getId(),\n Instruction.LV.getId(), 0, 0, 32,\n Instruction.DIV.getId()\n };\n\n TermParser p = TermParserTestSetup.getDivTermSetup();\n assertEquals(\"Parse\", true, p.parse());\n AssemblerCodeChecker.assertCodeEquals(\"Code \", expected, TermParserTestSetup.getByteCode());\n }", "private static long modPow(long a, long b, long c) {\n long res = 1;\n for (int i = 0; i < b; i++)\n {\n res *= a;\n res %= c;\n }\n return res % c;\n }", "public Fraction divide(Fraction divisor)\n {\n Fraction flipDivisor = divisor.reciprocal();\n Fraction newFraction = new Fraction();\n newFraction = this.multiply(flipDivisor);\n return newFraction;\n }", "@Test\n public void testModulus10() {\n System.out.println(\"modulus10\");\n int pz = 7;\n AbstractMethod instance = new AbstractMethodImpl();\n int expResult = 3;\n int result = instance.modulus10(pz);\n assertEquals(expResult, result);\n pz = 5;\n expResult = 5;\n result = instance.modulus10(pz);\n assertEquals(expResult, result);\n\n pz = 17;\n expResult = 3;\n result = instance.modulus10(pz);\n assertEquals(expResult, result);\n\n }", "public void MOD( ){\n String tipo1 = pilhaVerificacaoTipos.pop().toString();\n String tipo2 = pilhaVerificacaoTipos.pop().toString();\n String val1 = dads.pop().toString();\n float fresult = -1;\n String val2 = dads.pop().toString();\n if(val1 != null && val2 != null){\n if (tipo1 != null && tipo2 != null){\n if(tipo1 == \"inteiro\" && tipo2 == \"real\"){\n if(Float.parseFloat(val2) != 0){\n fresult = Integer.parseInt(val1) % Float.parseFloat(val2);\n dads.push(fresult);\n pilhaVerificacaoTipos.push(\"real\");\n }\n else{\n mensagensErrosVM += \"\\nRUNTIME ERROR(5): impossível realizar a operação. O valor do dividendo deve ser maior que zero\";\n numErrVM += 1;\n }\n }else if(tipo1 == \"real\" && tipo2 ==\"inteiro\"){\n if(Float.parseFloat(val1) != 0){\n fresult = Integer.parseInt(val2) % Float.parseFloat(val1);\n dads.push(fresult);\n pilhaVerificacaoTipos.push(\"real\");\n }\n else{\n mensagensErrosVM += \"\\nRUNTIME ERROR(5): impossível realizar a operação. O valor do dividendo deve ser maior que zero\";\n numErrVM += 1;\n }\n }else if(tipo1 == \"real\" && tipo2 ==\"real\"){\n if(Float.parseFloat(val1) != 0){\n fresult = Float.parseFloat(val2) % Float.parseFloat(val1);\n dads.push(fresult);\n pilhaVerificacaoTipos.push(\"real\");\n }\n else{\n mensagensErrosVM += \"\\nRUNTIME ERROR(5): impossível realizar a operação. O valor do dividendo deve ser maior que zero\";\n numErrVM += 1;\n }\n }else if(tipo1 == \"inteiro\" && tipo2 ==\"inteiro\"){\n if(Integer.parseInt(val1) != 0){\n fresult = Integer.parseInt(val2) % Integer.parseInt(val1);\n dads.push(fresult);\n pilhaVerificacaoTipos.push(\"real\");\n }\n else{\n mensagensErrosVM += \"\\nRUNTIME ERROR(5): impossível realizar a operação. O valor do dividendo deve ser maior que zero\";\n numErrVM += 1;\n return;\n }\n }\n else{\n mensagensErrosVM += \"\\nRUNTIME ERROR(1): essa instrução é válida apenas para valores inteiros ou reais.\";\n numErrVM += 1;\n return;\n }\n }else{\n mensagensErrosVM += \"\\nRUNTIME ERROR(2): não foi possível executar a instrução, tipo null encontrado.\";\n numErrVM += 1;\n return;\n }\n }else {\n mensagensErrosVM += \"\\nRUNTIME ERROR(3): não foi possível executar a instrução, valor null encontrado.\";\n numErrVM += 1;\n return;\n }\n\n\n topo += -1;\n ponteiro += 1;\n }", "public Command createOperationCommand(int operator, Operand operand1, Operand operand2);", "public LongNum div2(LongNum divided){\n LongNum res = divided.copy();\n for(int i = res.size()-1;i>=0;i--){\n if(i!=0)res.set(i-1,res.get(i-1)+(res.get(i)%2)*base);\n res.set(i , Math.floorDiv(res.get(i),2));\n }\n return res;\n }", "public static Object mod(Object val1, Object val2) {\n\t\tif (isInt(val1) && isInt(val2)) {\n\t\t\treturn ((BigInteger) val1).mod((BigInteger) val2);\n\t\t}\n\t\tthrow new OrccRuntimeException(\"type mismatch in mod\");\n\t}", "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "private ASTNode binaryDivisionRules(ASTNode left, ASTNode right) throws Exception {\n\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n TokenType varType = TokenType.VAR;\n TokenType numType = TokenType.NUMBER;\n TokenType divType = TokenType.DIV;\n\n Token tempToken;\n if (patternMatcher(leftType, rightType, varType, varType)){\n tempToken = new Token(numType, \"1\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else{\n tempToken = new Token(divType);\n return new BinaryOp(tempToken, left, right);\n }\n }", "@Test\n\tpublic void quotientAndReminder(){\n\t\t\n\t\tint dividend = 80;\n\t\tint divider = 40;\n\t\t\n\t\tint quotient = dividend/divider;\n\t\tint remainder = dividend%divider;\n\t\t\n\t\tSystem.out.println(\"quotient is :\" +quotient);\n\t\tSystem.out.println(\"remainder is : \"+ remainder);\n\t}", "public void testModulusValue() throws Exception {\r\n // Create key pair using java.security\r\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\", \"BC\");\r\n keyGen.initialize(1024, new SecureRandom());\r\n KeyPair keyPair = keyGen.generateKeyPair();\r\n \r\n PublicKeyRSA rsaKey = (PublicKeyRSA)KeyFactory.createInstance(keyPair.getPublic(), \"SHA1WITHRSA\", null);\r\n byte[] modulusData = ((ByteField)rsaKey.getSubfield(CVCTagEnum.MODULUS)).getData();\r\n assertTrue(\"Leading zero found in modulus\", modulusData[0]!=0);\r\n }", "long perm(int n, int m, long mod) {\n long result = 1;\n for (int i = n - m + 1; i <= n; ++i) {\n result = result * i % mod;\n }\n return result;\n }", "protected ImsInteger createRandomTestNumber(ImsInteger modulus){\r\n\t\t\r\n\t\t// get a random number\r\n\t\tImsInteger testNumber = new ImsInteger(modulus.bitLength(), new Random());\r\n\t\t\r\n\t\t// assure that it is positive and smaller modulus\r\n\t\ttestNumber = testNumber.mod(modulus);\r\n\t\t\r\n\t\t// assure that it is non zero\r\n\t\tif(testNumber.compareTo(ImsInteger.ZERO)==0){\r\n\t\t\ttestNumber = modulus.subtract(ImsInteger.ONE);\r\n\t\t}\r\n\t\treturn testNumber;\r\n\t}", "private void createMul(Code32 code, int op, int cond, int Rd, int Rn, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rd << 16) | (Rm << 8) | (0x9 << 4) | Rn;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public TermPrime(ArithmeticOperator operator, Term term) {\r\n\t\tsuper();\r\n\t\tthis.operator = operator;\r\n\t\tthis.term = term;\r\n\t}", "private static int modExp(int a, int b, int n) {\n\n // get a char array of the bits in b\n char[] k = (Integer.toBinaryString(b)).toCharArray();\n\n // initialize variables\n int c = 0, f = 1;\n // loop over every bit in k\n for (int i = 0; i < k.length; i ++) {\n\n // for every bit, i.e. if 0 or 1, do this\n c *= 2;\n f = (f * f) % n;\n\n // If current bit is equal to 1, then do this\n if (k[i] == '1') {\n c += 1;\n f = (f * a) % n;\n }\n }\n\n // returns the remainder\n return f;\n }", "public static OmniDivisibleValue of(BigDecimal amount) {\n return new OmniDivisibleValue(amount.multiply(willettsPerDivisibleBigDecimal).longValueExact());\n }", "@Test\n\tpublic void divisionTest() {\n\t\tMathOperation division = new Division();\n\n\t\tassertEquals(0, division.operator(ZERO, FIVE).intValue());\n\t\tassertEquals(4, division.operator(TWENTY, FIVE).intValue());\n\t}", "public void operacionletradni(int dni, int result){\n this.result=dni%23;}", "public AzModulo(Modulo modulo, String posMenu) {\n /* rimanda al costruttore della superclasse */\n super(modulo, posMenu);\n super.setUsaIconaModulo(true);\n }", "public static ObjectInstance getDivideOperationObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 4);\n properties.put(\"name\", StringMangler\n .EncodeForJmx(getDivideOperationMBean().getName()));\n properties.put(\"jmxType\", new Operation().getJmxType());\n o = new ObjectName(_domain, properties);\n\n }\n catch (Exception e)\n {\n Assert\n .fail(\"'Divide' Operation ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new Operation().getClass().getName());\n }", "public static void main(String[] args) {\n\n double fraction = 1/2.0;\n System.out.println(fraction);\n\n //Modules is the remainder of a division problem\n //25 % 6 = 1\n //31 % 5 = 1\n //17 % 3 = 2\n //4 % 2 = 0\n //5 % 2 = 1\n //6 % 2 = 0\n //121 % 100 = 21\n // 47 % 15 = 2\n //55 % 15 =10\n\n //5 + 2 * 4 =\n //12 / 2 - 4 =\n //4 + 17 % 2 -1 =\n //4 + 5 * 2 / 2 + 1 =\n //4 * (6 + 3 * 2) + 7 =\n\n System.out.println(5 + 2 * 4);\n System.out.println (12 / 2 -4);\n System.out.println(4 + 17 % 2 - 1);\n System.out.println(4 + 5 * 2 / 2 + 1);\n System.out.println(4 * (6 + 3 *2) + 7);\n\n\n }", "public HugeUInt mod(int b) {\r\n return mod(new HugeUInt(b));\r\n }", "@Test\n public void testParseMod() {\n System.out.println(\"testParseMod\");\n\n byte[] expected = {\n Instruction.LIT.getId(), 0, 10,\n Instruction.LV.getId(), 0, 0, 32,\n Instruction.MOD.getId(),\n Instruction.LV.getId(), 0, 0, 36,\n Instruction.MOD.getId()\n };\n\n TermParser p = TermParserTestSetup.getModTermSetup();\n assertEquals(\"Parse\", true, p.parse());\n AssemblerCodeChecker.assertCodeEquals(\"Code \", expected, TermParserTestSetup.getByteCode());\n }", "public DivisionAccessBean constructDivision(java.lang.Integer aDivisionCode) throws Exception {\n\n\tDivisionAccessBean bean = null;\n\tif (aDivisionCode != null) {\t\n\t\tbean = new DivisionAccessBean();\n\t\tbean.setInitKey_division(aDivisionCode.intValue());\n\t\tbean.refreshCopyHelper();\n\t}\n\treturn bean;\n}", "public Mod(int theMod) {\n\t\tswitch(theMod) {\n\t\t\tcase 1:\n\t\t\t\tthis.mod = \"Classique\";\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\tthis.mod = \"Contact Rapide\";\n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tthis.mod = \"Duo\";\n\t\t\tbreak;\n\t\t}\n\t}", "public void divide(Object divValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, divValue) {\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}", "@Test\n public void test_DivisionWithTwoVariables() {\n Operator add = new Operator(new Constant(10), new Variable(\"x\"), Operator.Operators.ADD);\n Operator min = new Operator(new Constant(12), new Variable(\"y\"), Operator.Operators.MINUS);\n Operator mul = new Operator(add, min, Operator.Operators.MUL);\n Operator add2 = new Operator(new Constant(5), new Variable(\"x\"), Operator.Operators.ADD);\n Operator div = new Operator(mul, add2, Operator.Operators.DIV);\n\n\t\t/* x = 3 y = 2 */\n Context c = new Context();\n c.assign(\"x\", 3);\n c.assign(\"y\", 2);\n\n assertThat(div.evaluate(c), is(16.25));\n }", "public static void main(String args[])\n {\n int a=8%3; //Finding the reminder of 8 when divided by 3 using the modulus operator '%'\n\n System.out.println(\"a=\"+a);\n\n }", "public void enfoncerDiv() {\n\t\ttry {\n\t\t\tthis.op = new Div();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (ArithmeticException e) {\n\t\t\tSystem.out.println(\"Erreur : Division par zero !\");\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "public static int mathNumerators(int firstNumerator, int secondNumerator, int firstDenominator,\n int secondDenominator, String operator) {\n int numerator;\n if (operator.equals(\"+\")) {\n numerator = firstNumerator + secondNumerator;\n } else if (operator.equals(\"-\")) {\n numerator = firstNumerator - secondNumerator;\n } else if (operator.equals(\"*\")) {\n numerator = firstNumerator * secondNumerator;\n } else {\n numerator = firstNumerator * secondDenominator;\n }\n return numerator;\n }", "public FuncionMultiplicacion(String operador, int hijos) {\n super(operador, hijos);\n }", "public static UnitP Division(UnitP first, UnitP second)\n {\n return OperationsPublic.PerformUnitOperation\n (\n first, second, Operations.Division,\n OperationsOther.GetOperationString(first, second, Operations.Division) \n );\n }", "public static OmniDivisibleValue of(long amount) {\n return OmniDivisibleValue.of(BigDecimal.valueOf(amount));\n }", "public static OperationMBean getDivideOperationMBean()\n {\n return new Operation(\"divide\");\n }", "public Object clone()\n {\n DataSetDivide new_op = new DataSetDivide( );\n // copy the data set associated\n // with this operator\n new_op.setDataSet( this.getDataSet() );\n new_op.CopyParametersFrom( this );\n\n return new_op;\n }", "private static int wrap(int a, int b)\n {\n return (a < 0) ? (a % b + b) : (a % b);\n }", "public double divide(double a, double b, boolean rem){ return rem? a%b: a/b; }", "public static String getOperator(Operator operator) {\n\t\tif (operator == MOD) {\n\t\t\treturn \"%\";\n\t\t} else if (operator == DIV) {\n\t\t\treturn \"/\";\n\t\t} else {\n\t\t\treturn operator.toString();\n\t\t}\n\t}", "public T div(T first, T second);", "@Factory\n public static Matcher<QueryTreeNode> dividedBy(Matcher<QueryTreeNode> leftMatcher, \n Matcher<QueryTreeNode> rightMatcher) {\n return new BinaryOperatorNodeMatcher(leftMatcher, \"/\", rightMatcher);\n }", "@Test\n public void testModuloExpectedUse() {\n MainPanel mp = new MainPanel();\n ProgramArea pa = new ProgramArea();\n ProgramStack ps = new ProgramStack();\n\n ps.push(10);\n ps.push(3);\n\n ProgramExecutor pe = new ProgramExecutor(mp, ps, pa);\n\n pe.modulo();\n\n Assert.assertEquals(1, ps.pop());\n }" ]
[ "0.6962243", "0.6409049", "0.61774457", "0.610668", "0.60528636", "0.59497315", "0.5796891", "0.57847965", "0.5780437", "0.57648736", "0.5728188", "0.56148034", "0.54557437", "0.5349801", "0.53270656", "0.5292437", "0.52906704", "0.5273473", "0.52732134", "0.52681863", "0.5232218", "0.5223576", "0.51880914", "0.5170676", "0.51645625", "0.5153328", "0.51414263", "0.51234674", "0.51001245", "0.50904626", "0.5087082", "0.5071893", "0.505071", "0.5048668", "0.50322384", "0.5029167", "0.502773", "0.50065583", "0.5002383", "0.49551016", "0.49062976", "0.4895315", "0.48926368", "0.48603237", "0.4846229", "0.4840805", "0.48353556", "0.4820588", "0.4813466", "0.47958237", "0.4754105", "0.47522548", "0.46898404", "0.46813688", "0.46645308", "0.46483424", "0.464066", "0.46265805", "0.46136707", "0.46073613", "0.4601657", "0.45892534", "0.45769358", "0.45578516", "0.45205182", "0.45202982", "0.45099384", "0.44933158", "0.44918928", "0.44738737", "0.44735166", "0.44685197", "0.44680384", "0.44598445", "0.4454561", "0.44499198", "0.44474125", "0.44467723", "0.44428068", "0.4441504", "0.44368094", "0.44336608", "0.442836", "0.44259998", "0.4420652", "0.44114536", "0.44062862", "0.44036925", "0.43955505", "0.43887365", "0.43848583", "0.4384698", "0.4379799", "0.43748885", "0.43691623", "0.43614146", "0.43535084", "0.43428883", "0.43315706", "0.43304637" ]
0.8577838
0
Gets the value this will divide by.
public Number getDivisor() { return divisor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getValue(){\n return (double) numerator / (double) denominator;\n }", "public double value() {\n return ((double) this.numerator / this.denominator);\n }", "public double getValue() {\n return (numeratorValue * multiplier) / (denominatorValue * divisor);\n }", "public float _getValue()\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n return (getValue() / max);\r\n } else\r\n {\r\n return getValue();\r\n }\r\n }", "public double getValue() {\n return NUMERATOR / DENOMINATOR;\n }", "float getValue();", "float getValue();", "float getValue();", "double getBasedOnValue();", "public double getValue() {\n return value_;\n }", "public double getValue() {\n return value_;\n }", "public float getValue()\n\t{\n\t\treturn this.value;\n\t}", "public double getNumeratorValue() {\n return numeratorValue;\n }", "public double floatValue() {\n\treturn numerator/(double)denominator;\n }", "public double getValue(){\n value*=100;\n value = Math.floor(value);\n value/=100;//returns to hundredths place\n return value;\n }", "public double getValue() {\n\t\treturn(value);\n\t}", "public double getValue()\n {\n return this.value;\n }", "public float getValue() {\n return value_;\n }", "public float getValue() {\n return value;\n }", "public double getValue() {\n return value;\n }", "public double getValue() {\n return value;\n }", "public double getValue() {\n return value;\n }", "public float getValue() {\n return value_;\n }", "private double getValue() {\n return value;\n }", "public double getValue() {\r\n return this.value;\r\n }", "public float getValue() {\n\t\treturn value;\n\t}", "public double getValue() {\n return this.value;\n }", "public double getValue() {\n return this.value;\n }", "public int division(){\r\n return Math.round(x/y);\r\n }", "public final float getValue() {\r\n\t\treturn value;\r\n\t}", "public int getDenominator() { \n return denominator; \n }", "public double getValue(){\n return value;\n }", "public double getValue() {\n\t\treturn this.value; \n\t}", "public double getValue() {\r\n\t\treturn value;\r\n\t}", "double getValue();", "double getValue();", "double getValue();", "public double getValue() {\n\t\treturn value;\n\t}", "public double getValue() {\n\t\treturn value;\n\t}", "public double getValue() {\n\t\treturn value;\n\t}", "public double getValue() {\n return this._value;\n }", "public double getValue() {\n\t\treturn this.value;\n\t}", "public double getDoubleValue() {\n\t\treturn (this.numerator/1.0)/this.denominator;\n\t}", "public double value() {\r\n return value;\r\n }", "int getLum(){\n return getPercentageValue(\"lum\");\n }", "public double getValue() {\n return this.num;\n }", "public int getDenominator()\r\n {\r\n return denominator;\r\n }", "public double getFactor() {\n return ((double) multiplier) / ((double) divisor);\n }", "public double getValue();", "int getLumMod(){\n return getPercentageValue(\"lumMod\");\n }", "public double getValue() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 1.00;\n\t}", "public double getValue()\r\n\t{\r\n\t\treturn (double) value;\r\n\t}", "public double doubleValue()\n\t\t{\n\t\t\t// Converts BigIntegers to doubles and then divides \n\t\t\treturn (numerator.doubleValue()*1)/denominator.doubleValue();\n\t\t}", "public Float getValue() {\n\t\treturn value;\n\t}", "public Float getValue() {\n\t\treturn value;\n\t}", "double doubleValue()\n {\n double top = 1.0 * numerator;\n double bottom=1.0*denominator;\n top=top/bottom;\n return top;\n\n }", "public int getDenominator()\n {\n return this.denominator;\n }", "public double getMedia()\n {\n return ( suma / cantidad );\n }", "public Double getValue() {\n return value;\n }", "public Double getValue() {\n return value;\n }", "Double getValue();", "@Override\n\tpublic double getValue() {\n\t\treturn value;\n\t}", "@Override\n public double getValue() {\n return currentLoad;\n }", "public double getValue() {\n return 0.05;\n }", "@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}", "public int getNumerator() {\n return numerator; \n }", "public int getNumerator()\r\n {\r\n return numerator;\r\n }", "public int getNumerator() {\n return numerator;\n }", "public double obtValor() {\r\n\t\treturn v;\r\n\t}", "public float getValue()\r\n {\r\n return getSemanticObject().getFloatProperty(swps_floatValue);\r\n }", "double getValue() {\n return mValue;\n }", "public Double value() {\n return this.value;\n }", "public static double div() {\n System.out.println(\"Enter dividend\");\n double a = getNumber();\n System.out.println(\"Enter divisor\");\n double b = getNumber();\n\n return a / b;\n }", "public double getDoubleValue()\n {\n return (double) getValue() / (double) multiplier;\n }", "@Override\n public double getValue()\n {\n return value;\n }", "double get();", "public int getNumerator()\n {\n return this.numerator;\n }", "@Override\n\tpublic float value() {\n\t\treturn currnet().value();\n\t}", "public int getDenominator() {\n return this.denominator;\n }", "public Number getValue() {\n return currentVal;\n }", "public double getValue() {\n\t\treturn m_dValue;\n\t}", "public int getNumerator() {\n return this.numerator;\n }", "public int getPercentage() {\r\n return Percentage;\r\n }", "public double getValue(){\n\t\treturn slider.getValue() ;\n\t}", "public double getValue()\n\t{\n\t\treturn ifD1.getValue();// X100 lux\n\t}", "int getLumOff(){\n return getPercentageValue(\"lumOff\");\n }", "public float getIterationValue()\n\t{\n\t\tif (getDuration() <= 0) { return 1; }\n\t\treturn getCurrentTime() / getDuration();\n\t}", "public double getValue() {\n\t\treturn sensorval;\n\t}", "public double value(){\n\t return (double) this.f;\n }", "public abstract float getValue();", "org.hl7.fhir.Ratio getValueRatio();", "static int valDiv2 (){\n return val/2;\n }", "public int getCalculationValue(){\n return calculationValue;\n }", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "double getPValue();", "public Integer getRatio() {\n return ratio;\n }" ]
[ "0.78827375", "0.78596437", "0.77222246", "0.7282618", "0.7280221", "0.7006889", "0.7006889", "0.7006889", "0.68755895", "0.6863214", "0.6844203", "0.68401486", "0.6832941", "0.68309176", "0.68003756", "0.67955554", "0.67927635", "0.67878073", "0.6773217", "0.6763458", "0.6763458", "0.6763458", "0.67613167", "0.6760521", "0.674882", "0.6747908", "0.67363244", "0.67363244", "0.67209756", "0.67209256", "0.6719187", "0.6716678", "0.6715273", "0.67123544", "0.6712296", "0.6712296", "0.6712296", "0.6710097", "0.6710097", "0.6710097", "0.6694157", "0.6691446", "0.66656405", "0.6629261", "0.66218317", "0.66122454", "0.6608986", "0.66068727", "0.65679705", "0.65446496", "0.65439725", "0.6518488", "0.65011096", "0.64876676", "0.64876676", "0.6484659", "0.64649564", "0.6453316", "0.6452448", "0.6452448", "0.64518064", "0.6451554", "0.64380467", "0.6418643", "0.64146346", "0.63976", "0.6383216", "0.63829565", "0.63711506", "0.63645154", "0.6362892", "0.6351818", "0.63514674", "0.6343296", "0.6333533", "0.63264745", "0.6320627", "0.63085055", "0.6299857", "0.6296451", "0.6295914", "0.62949294", "0.62781346", "0.6275764", "0.626627", "0.62636447", "0.6252019", "0.6240691", "0.6237794", "0.6235751", "0.62273556", "0.6227249", "0.62266", "0.622563", "0.622563", "0.622563", "0.622563", "0.622563", "0.622367", "0.6195671" ]
0.65183794
52
Gets the value this will check the remainder of the division against.
public Number getRemainder() { return remainder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getRemainderPercent() {\n return remainderPercent_;\n }", "public static double div() {\n System.out.println(\"Enter dividend\");\n double a = getNumber();\n System.out.println(\"Enter divisor\");\n double b = getNumber();\n\n return a / b;\n }", "static int valDiv2 (){\n return val/2;\n }", "int getRemainder(int num, int divisor) {\n\t\treturn (num - divisor * (num/divisor));\n\t}", "int getRemainderPercent();", "public int getRemainderPercent() {\n return remainderPercent_;\n }", "@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}", "public int division(){\r\n return Math.round(x/y);\r\n }", "public double getValue(){\n return (double) numerator / (double) denominator;\n }", "public Number getDivisor() {\n\t\treturn divisor;\n\t}", "public double getValue() {\n return (numeratorValue * multiplier) / (denominatorValue * divisor);\n }", "int getLumMod(){\n return getPercentageValue(\"lumMod\");\n }", "double getBasedOnValue();", "public static int p_div(){\n Scanner keyboard = new Scanner(System.in);\n System.out.println(\"please put the first number that you want to divide:\");\n int v_div_number_1 = keyboard.nextInt();\n System.out.println(\"please put the second number that you want to divide:\");\n int v_div_number_2 = keyboard.nextInt();\n int v_total_div= v_div_number_1/v_div_number_2;\n return v_total_div;\n }", "public double getValue(){\n value*=100;\n value = Math.floor(value);\n value/=100;//returns to hundredths place\n return value;\n }", "private int getRemainder (int numerator, int denominator)\n {\n if (denominator >= numerator)\n return 0;\n\n int diff = numerator;\n while (diff >= denominator)\n {\n diff = diff - denominator;\n }\n\n return diff;\n }", "public float _getValue()\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n return (getValue() / max);\r\n } else\r\n {\r\n return getValue();\r\n }\r\n }", "@Test\n\tpublic void quotientAndReminder(){\n\t\t\n\t\tint dividend = 80;\n\t\tint divider = 40;\n\t\t\n\t\tint quotient = dividend/divider;\n\t\tint remainder = dividend%divider;\n\t\t\n\t\tSystem.out.println(\"quotient is :\" +quotient);\n\t\tSystem.out.println(\"remainder is : \"+ remainder);\n\t}", "public double divide(double a, double b, boolean rem){ return rem? a%b: a/b; }", "public double value() {\n return ((double) this.numerator / this.denominator);\n }", "int getSatMod(){\n return getPercentageValue(\"satMod\");\n }", "int getLumOff(){\n return getPercentageValue(\"lumOff\");\n }", "public double getValue() {\n return NUMERATOR / DENOMINATOR;\n }", "synchronized public long getValue() {\n\n if (limitReached) {\n throw Error.error(ErrorCode.X_2200H);\n }\n\n long nextValue;\n\n if (increment > 0) {\n if (currValue > maxValue - increment) {\n if (isCycle) {\n nextValue = minValue;\n } else {\n limitReached = true;\n nextValue = minValue;\n }\n } else {\n nextValue = currValue + increment;\n }\n } else {\n if (currValue < minValue - increment) {\n if (isCycle) {\n nextValue = maxValue;\n } else {\n limitReached = true;\n nextValue = minValue;\n }\n } else {\n nextValue = currValue + increment;\n }\n }\n\n long result = currValue;\n\n currValue = nextValue;\n\n return result;\n }", "void div(double val) {\r\n\t\tresult = result / val;\r\n\t}", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "public int getMod() {\n return (int) Math.floor((base + bonus - 10) / 2);\n }", "public static double modulo(double val, double mod) {\n double n = Math.floor(val / mod);\n double r = val - n * mod;\n return Util.almost_equals(r,mod) ? 0.0 : r;\n }", "float getValue();", "float getValue();", "float getValue();", "int getAlphaMod(){\n return getPercentageValue(\"alphaMod\");\n }", "Integer getValue();", "Integer getValue();", "public int getDenominator() { \n return denominator; \n }", "public int valueCheck(int currentValue)\n { \n int currentVal = currentValue;\n \n if(digitChecker == 2)\n currentVal = a[k] % 10;\n else\n currentVal = a[k] / 10;\n \n return currentVal;\n }", "int getLum(){\n return getPercentageValue(\"lum\");\n }", "protected final double mod(double value, double modulus) {\n return (value % modulus + modulus) % modulus;\n }", "private int getCurrentValue()\n {\n return\n // Overall wait time...\n _countdownValue -\n // ...minus the time we waited so far.\n (int)(_clock.currentTime() - _startWait);\n }", "private static void helloHelloModulo() {\n int a = 1;\n int b = 10;\n int c = 1 / 10;\n\n int d = 1 % 10;\n\n\n System.out.println(\" Result deleniya \" + c);\n System.out.println(\" Result deleniya \" + d);\n\n\n int делимое = 75;\n int делитель = 13;\n int f = делимое % делитель;\n\n int остаток = делимое - (делимое / делитель) * делитель;\n int j = 7 % 2;\n\n System.out.println(f);\n System.out.println(остаток);\n\n\n }", "public double getFactor() {\n return ((double) multiplier) / ((double) divisor);\n }", "public final void div() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (topMostValue > 0) {\n\t\t\t\tpush(secondTopMostValue / topMostValue);\n\t\t\t}\n\t\t}\n\t}", "int div(int num1, int num2) {\n\t\treturn num1/num2;\n\t}", "public int getCalculationValue(){\n return calculationValue;\n }", "public double getCurrentPercentageError() {\n\t\tdouble returnValue = 0.0;\n\t\tint currentValue = this.readSensorValue();\n\t\tint optimum = getOptimumSensorValue(currentValue);\n\t\tif (currentValue > optimum) {\n\t\t\treturnValue = (double) (currentValue - optimum)\n\t\t\t\t\t/ (double) (this.highReadInValue - optimum);\n\t\t} else if (currentValue < optimum) {\n\t\t\treturnValue = -((double) (optimum - currentValue) / (double) (optimum - this.lowReadInValue));\n\t\t}\n\t\treturn returnValue;\n\t}", "public static float div(int value1, int value2){\r\n return (float) value1 / value2;\r\n }", "BaseNumber divide(BaseNumber operand);", "@Override\n public Float div(Float lhs, Float rhs) {\n\t\n\tassert(rhs != 0);\n\t\n\tfloat res = lhs/rhs;\n\treturn res;\n }", "public float getPercentage() {\r\n\t\tif(!isValid)\r\n\t\t\treturn -1;\r\n\t\treturn percentage;\r\n\t}", "public Number getValue() {\n return currentVal;\n }", "public static int getRemainder(int num1, int num2) {\n\t\tString message = \"Remainder of this operation is: \";\n\t\tint result = num1 % num2;\n\t\tSystem.out.println(message+result);\n\t\treturn result;\n\t\t\n\t//\tSystem.out.println(\"Method execution is complete\");\n\t}", "public int getDenominator()\r\n {\r\n return denominator;\r\n }", "public double getPercentRem(){\n return ((double)freeSpace / (double)totalSpace) * 100d;\n }", "@Test\n\tvoid divide() {\n\t\tfloat result = calculator.divide(12, 4);\n\t\tassertEquals(3,result);\n\t}", "public void ex() {\n int inches = 86; \n int pie = 12; //1 pie = 12 inches \n //Operaciones para obtener la cantidad de pies e inches\n int cant = inches / pie; \n int res = inches % pie;\n //Muestra de resultados\n System.out.println(inches + \" pulgadas es equivalente a\\n \" + \n cant + \" pies \\n \" + res + \" pulgadas \");\n }", "public int getValue ()\r\n\t{\r\n\t\treturn (m_value);\r\n\t}", "public double getCurrentValue()\r\n\t{\r\n\t\tcurrentValue=(2*border+24)/2;\r\n\t\treturn currentValue;\r\n\t}", "public <V extends Number> FluentExp<V> div (V value)\n {\n return new Div<V>(this, value);\n }", "public float getIterationValue()\n\t{\n\t\tif (getDuration() <= 0) { return 1; }\n\t\treturn getCurrentTime() / getDuration();\n\t}", "int getMPValue();", "private static int cprModFunction(int a, int b) {\n\t\tint res = a % b;\n\t\tif (res < 0)\n\t\t\tres += b;\n\t\treturn res;\n\t}", "public long getDenominator();", "public String division()\r\n {if (Second.compareTo(BigDecimal.ZERO)==0){\r\n throw new RuntimeException(\"Error\");\r\n }\r\n return First.divide(Second,5,BigDecimal.ROUND_UP).stripTrailingZeros().toString();\r\n }", "public double getNumeratorValue() {\n return numeratorValue;\n }", "double doubleValue()\n {\n double top = 1.0 * numerator;\n double bottom=1.0*denominator;\n top=top/bottom;\n return top;\n\n }", "int getPercentageHeated();", "private static int getNumber() {\n LOG.info(\"Generating Value\");\n return 1 / 0;\n }", "public int getValue() {\n\t\tif (!this.isCard()) {\n\t\t\tSystem.out.println(\"Error! \" + id + \" isn't a card!\");\n\t\t\treturn 0;\n\t\t} else if (id % 13 != 0)\n\t\t\treturn id % 13;\n\t\telse\n\t\t\treturn 13;\n\t}", "public int division(int a, int b) {\n return a / b;\n }", "public double getValue() {\n return this.num;\n }", "public int getTrueValue()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start getTrueValue Method ***************/\n\n // Return true value\n return trueValue;\n\n }", "public int getPercentage() {\r\n return Percentage;\r\n }", "public long getValue()\n {\n return itsValue;\n }", "@Override\n public double calculate(double input)\n {\n return input/getValue();\n }", "int getPokeballValue();", "public int getValue() {\n int tmp = value;\n value = -1;\n return tmp;\n }", "public static float modulo(float fValue, float modulus) {\n assert Validate.positive(modulus, \"modulus\");\n\n float remainder = fValue % modulus;\n float result;\n if (fValue >= 0) {\n result = remainder;\n } else {\n result = (remainder + modulus) % modulus;\n }\n\n assert result >= 0f : result;\n assert result < modulus : result;\n return result;\n }", "public int getValue() {\n\t\t// Precondition -- The value is a non-negative integer.\n\t\tassert(value >= 0);\n\t\t\n\t\treturn value;\n\t}", "public double getPeRatio() throws ArithmeticException {\n\t\tdouble peRatio = Double.NEGATIVE_INFINITY;\n\t\t\n\t\tif (lastDividend > 0.0){\n\t\t\tpeRatio = sharePrice/lastDividend;\n\t\t}else if (lastDividend == 0){\n\t\t\tlogger.error(\"The last dividend should be greater than 0\");\n\t\t\tthrow new ArithmeticException();\n\t\t}\n\t\t\n\t\treturn peRatio;\n\t}", "public int getDenominator()\n {\n return this.denominator;\n }", "public static int branch(long accountNo){\n return (int)(accountNo/div);\n }", "public int gcd(){\n\tint min;\n\tint max;\n\tint stor;\n\tif ((numerator == 0) || (denominator == 0)){\n\t return 0;\n\t}\n\telse {\n\t if ( numerator >= denominator ) {\n\t\tmax = numerator;\n\t\tmin = denominator;\n\t }\n\t else {\n\t\tmax = denominator;\n\t\tmin = numerator;\n\t }\n\t while (min != 0){\n\t stor = min;\n\t\tmin = max % min;\n\t\tmax = stor;\n\t }\n\t return max;\n\t}\n }", "public double getModX() {\n return (modX != 0 ? (modX > 0 ? (modX - RESTADOR) : (modX + RESTADOR)) : modX);\n }", "double getValue();", "double getValue();", "double getValue();", "private float valOf(SeekBar bar) {\n return (float) bar.getProgress() / bar.getMax();\n }", "static int modulo(int x, int y) {\n return (x%y);\n }", "protected int value() {\n System.out.print(\"Cloth Value: \");\n return finalValue;\n }", "public float perimetro() {\n return (lado * 2 + base);\r\n }", "public int getNumerator()\r\n {\r\n return numerator;\r\n }", "public final long getCurrentProgress() {\n /*\n r9 = this;\n int r0 = r9.getState()\n r1 = 1\n r2 = 0\n if (r0 == r1) goto L_0x0012\n r1 = 2\n if (r0 == r1) goto L_0x0019\n r1 = 3\n if (r0 == r1) goto L_0x0014\n r1 = 4\n if (r0 == r1) goto L_0x0014\n L_0x0012:\n r0 = r2\n goto L_0x0032\n L_0x0014:\n long r0 = r9.getTargetProgress()\n goto L_0x0032\n L_0x0019:\n java.lang.String r0 = \"current_value\"\n long r0 = r9.getLong(r0)\n java.lang.String r4 = \"quest_state\"\n long r4 = r9.getLong(r4)\n r6 = 6\n int r8 = (r4 > r6 ? 1 : (r4 == r6 ? 0 : -1))\n if (r8 == 0) goto L_0x0032\n java.lang.String r4 = \"initial_value\"\n long r4 = r9.getLong(r4)\n long r0 = r0 - r4\n L_0x0032:\n java.lang.String r4 = \"MilestoneRef\"\n int r5 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))\n if (r5 >= 0) goto L_0x003e\n java.lang.String r0 = \"Current progress should never be negative\"\n com.google.android.gms.games.internal.zzbd.m3401e(r4, r0)\n r0 = r2\n L_0x003e:\n long r2 = r9.getTargetProgress()\n int r5 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))\n if (r5 <= 0) goto L_0x004f\n java.lang.String r0 = \"Current progress should never exceed target progress\"\n com.google.android.gms.games.internal.zzbd.m3401e(r4, r0)\n long r0 = r9.getTargetProgress()\n L_0x004f:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.games.quest.zzb.getCurrentProgress():long\");\n }", "int getResultValue();", "int getResultValue();", "private double getValue() {\n return value;\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }" ]
[ "0.6629357", "0.6569814", "0.6556298", "0.6548007", "0.6536078", "0.6524737", "0.62192506", "0.62094706", "0.6203536", "0.61941063", "0.61621857", "0.61211026", "0.61090136", "0.60981363", "0.6091423", "0.6043988", "0.6001188", "0.5998899", "0.5963312", "0.58788776", "0.58693856", "0.5867289", "0.5859954", "0.5858536", "0.5836077", "0.57617605", "0.57617605", "0.57617605", "0.57617605", "0.57617605", "0.5747671", "0.57432926", "0.5742762", "0.5742762", "0.5742762", "0.57184595", "0.56927013", "0.56927013", "0.5687721", "0.56854725", "0.5677579", "0.56742126", "0.5674176", "0.56716335", "0.5664878", "0.5633063", "0.5630546", "0.56296206", "0.5619393", "0.5612941", "0.55893636", "0.5587562", "0.55871046", "0.55803764", "0.55657613", "0.55636626", "0.5544803", "0.554052", "0.5538277", "0.5536557", "0.5536533", "0.5536313", "0.5522784", "0.55186045", "0.55020374", "0.54992205", "0.5495512", "0.54804385", "0.5470769", "0.54675376", "0.54524106", "0.5449377", "0.54456335", "0.5442225", "0.54380715", "0.54340935", "0.5430804", "0.5426994", "0.5421702", "0.54209244", "0.54114735", "0.5396825", "0.5386389", "0.53857076", "0.53788805", "0.53788495", "0.5374037", "0.5365022", "0.5365022", "0.5365022", "0.5364534", "0.53634465", "0.5360848", "0.53597534", "0.53572863", "0.53557926", "0.5353263", "0.5353263", "0.53475153", "0.5344028" ]
0.65043265
6
Creates and returns a string representation of this.
@Override public String toString() { return "ModuloOperator{divisor=" + divisor.toString() + ", remainder=" + remainder.toString() + "}"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n StringWriter writer = new StringWriter();\n this.write(writer);\n return writer.toString();\n }", "public String toString() { return stringify(this, true); }", "@Override\n public String toString() {\n return new Gson().toJson(this);\n }", "@Override()\n public String toString()\n {\n final StringBuilder buffer = new StringBuilder();\n toString(buffer);\n return buffer.toString();\n }", "@Override\n public String toString() {\n return new JSONSerializer().serialize(this);\n }", "public String toString() {\n\t\t\tif (lastAppendNewLine) {\n\t\t\t\tmBuilder.deleteCharAt(mBuilder.length() - 1);\n\t\t\t}\n\t\t\treturn mBuilder.toString();\n\t\t}", "public String toString() {\n\t\treturn toString(this);\n\t}", "@Override\n public String toString() {\n // TODO: Using Serializer\n return Serializer.toByteArray(this).toString();\n }", "public String toString()\n\t{\n\t\treturn Printer.stringify(this, false);\n\t}", "public String toString() {\n return ToStringBuilder.reflectionToString(this);\n }", "public String toString() {\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\n\t\tDocument document = XMLUtils.newDocument();\n\t\tdocument.appendChild(toXML(document));\n\t\tXMLUtils.write(bos, document);\n\n\t\treturn bos.toString();\n\t}", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "@Override\n public String toString() {\n String str = \"\";\n\n //TODO: Complete Method\n\n return str;\n }", "public String toString() {\n\t\treturn toString(true);\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn toStringBuilder(new StringBuilder()).toString();\n\t}", "public String toString() {\n\t\treturn this.toJSON().toString();\n\t}", "public String toString() {\n\t\treturn this.toJSON().toString();\n\t}", "public String toString() {\r\n return ToStringBuilder.reflectionToString(this,\r\n ToStringStyle.MULTI_LINE_STYLE);\r\n }", "@Override\n public String toString() {\n return gson.toJson(this);\n }", "@Override\n public String toString() {\n final Map<String, Object> augmentedToStringFields = Reflect.getStringInstanceVarEntries(this);\n augmentToStringFields(augmentedToStringFields);\n return Reflect.joinStringMap(augmentedToStringFields, this);\n }", "public String toString() {\n\treturn createString(data);\n }", "public final String toString() {\n\t\tStringWriter write = new StringWriter();\n\t\tString out = null;\n\t\ttry {\n\t\t\toutput(write);\n\t\t\twrite.flush();\n\t\t\tout = write.toString();\n\t\t\twrite.close();\n\t\t} catch (UnsupportedEncodingException use) {\n\t\t\tuse.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\treturn (out);\n\t}", "public String toString() {\n\t\treturn toString(0, 0);\n\t}", "public String toString() {\n\t\treturn this;\n\t}", "@Override\n public String toString() {\n return (this.str);\n }", "public String toString() {\n\t\treturn super.toString();\n\t\t// This gives stack overflows:\n\t\t// return ToStringBuilder.reflectionToString(this);\n\t}", "@Override\r\n public String toString() {\r\n return JsonSerializer.SerializeObject(this);\r\n }", "@Override\n public String toString() {\n return toString(false, true, true, null);\n }", "@Override\n public String toString() {\n ObjectMapper mapper = new ObjectMapper();\n try {\n return mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n return null;\n }\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "public String toString() {\n\t\t//TODO add your own field name here\t\t\n\t\t//return buffer.append(this.yourFieldName).toString();\n\t\treturn \"\";\n\t}", "public String toString()\n\t{\n\t\tString result = \"\";\n\t\tresult += this.data;\n\t\treturn result;\n\t}", "@Override\n\tpublic String toString() {\n\t\tif (repr == null)\n\t\t\trepr = toString(null);\n\n\t\treturn repr;\n\t}", "@Override\n public String toString() {\n Gson gson = new Gson();\n\n String json = gson.toJson(this);\n System.out.println(\"json \\n\" + json);\n return json;\n }", "@Override\r\n\tpublic String toString() {\n\t\tString str = \"\";\r\n\t\treturn str;\r\n\t}", "public String toString() {\n\t\treturn EPPUtil.toString(this);\n\t}", "public String toString() {\n\t\treturn EPPUtil.toString(this);\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn JSONObject.toJSONString(this);\r\n\t}", "@Override\n public String toString() {\n ByteArrayOutputStream bs = new ByteArrayOutputStream();\n PrintStream out = new PrintStream(bs);\n output(out, \"\");\n return bs.toString();\n }", "public String toString()\r\n\t{\r\n\t\treturn toCharSequence().toString();\r\n\t}", "@Override String toString();", "@Override\n\tpublic String toString()\n\t{\n\t\treturn this.str;\n\t}", "@Override\n public String toString() {\n return new GsonBuilder().serializeNulls().create().toJson(this).toString();\n }", "public String toString()\n\t{\n\t\tString output=\"\";\n\n\n\n\n\n\n\t\treturn output+\"\\n\\n\";\n\t}", "@Override\r\n public String toString() {\r\n return JAXBToStringBuilder.valueOf(this, JAXBToStringStyle.SIMPLE_STYLE);\r\n }", "@Override\n\tpublic String toString() {\n\t\ttry {\n\t\t\treturn this.toJSONString(0);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public final String toString() {\n return asString(0, 4);\n }", "@Override\n\tpublic String toString() {\n\t\treturn toText();\n\t}", "public String toString() {\n\t\treturn str;\n\t}", "public String toString(){\r\n\t\tString output=\"\";\r\n\t\toutput+=super.toString();\r\n\t\treturn output;\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn Json.pretty( this );\n\t}", "public String toString()\n {\n \tString text = \"------------------------\\n\";\n \ttext += \"Name: \" + name + \"\\n\";\n \ttext += \"Phone Number: \" + formatPhoneNumber(phoneNumber) + \"\\n\";\n \ttext += \"Email: \" + email + \"\\n\";\n \tif (!notes.equals(\"\"))\n \t{\n \t\ttext += \"Notes:\\n\" + notes + \"\\n\";\n \t}\n \treturn text;\n }", "public String toString() {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tthis.createSpecSection(buffer);\n\t\tthis.createOperatorSection(buffer);\n\t\treturn buffer.toString();\n\t}", "@Override\n public StringValue toStringBuilder()\n {\n UnicodeBuilderValue sb = new UnicodeBuilderValue();\n\n sb.append(VHelper.noCtx(), this);\n\n return sb;\n }", "@Override\n public String toString() {\n return MoreObjects.toStringHelper(this) //\n .add(\"name\", getName()) //\n .add(\"phNumber\", getPhNumber()) //\n .add(\"emailId\", getEmailId()) //\n .add(\"parent\", getParent()) //\n .toString();\n }", "public String toString(){\n return XMLParser.parseObject(this);\n }", "public String toString() {\n\t\treturn String.format(\"Append \" + result.length() + \" chars to String\\n\" + \"final string length = \" + result.length());\n\t}", "public String toString() {\n StringBuffer aBuffer = new StringBuffer(super.toString());\n aBuffer.append(\"[id=\").append(_theId).\n append(\" parent=\").append(_theParent).\n append(\" paths=\").append(_thePaths).\n append(\"]\");\n\n return aBuffer.toString();\n }", "@Override\n public String toString()\n {\n StringBuilder builder = new StringBuilder();\n dump(builder, 0, '\\'');\n return builder.toString();\n }", "public String toString() {\n \n TmpStringBuffer = new StringBuffer(1000);\n TmpStringBuffer.append(this.getClass().getName());\n \n return TmpStringBuffer.toString();\n \n }", "public String toString() {\n \n TmpStringBuffer = new StringBuffer(1000);\n TmpStringBuffer.append(this.getClass().getName());\n \n return TmpStringBuffer.toString();\n \n }", "public String toString() {\n \n TmpStringBuffer = new StringBuffer(1000);\n TmpStringBuffer.append(this.getClass().getName());\n \n return TmpStringBuffer.toString();\n \n }", "public String toString() {\n \n TmpStringBuffer = new StringBuffer(1000);\n TmpStringBuffer.append(this.getClass().getName());\n \n return TmpStringBuffer.toString();\n \n }", "public String toString() {\n String output = \"\\nName: \" + name;\n output += \"\\nType: \" + type;\n output += \"\\nContact Details: \" + contactNo;\n output += \"\\nEmail address: \" + email;\n output += \"\\nResidentail Address: \" + address;\n\n return output;\n }", "public String toString() {\n StringBuffer buffer = new StringBuffer();\n\n buffer.append(getClass().getName());\n buffer.append(\"@\");\n buffer.append(Integer.toHexString(hashCode()));\n buffer.append(\" [\");\n buffer.append(objectToString(\"Id\", getId()));\n buffer.append(objectToString(\"ProjectName\", getProjectName()));\n buffer.append(objectToStringFK(\"DataProvider\", getDataProvider()));\n buffer.append(objectToStringFK(\"PrimaryInvestigator\", getPrimaryInvestigator()));\n buffer.append(objectToStringFK(\"CreatedBy\", getCreatedBy()));\n buffer.append(objectToString(\"CreatedTime\", getCreatedTime()));\n buffer.append(\"]\");\n\n return buffer.toString();\n }", "public String toString ( ) {\r\n String returnString = _name + \"{ id: \" + _uniqueID + \" pos: [\"+ getPosition().getPosition() + \"] }\";\r\n return returnString;\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn new StringBuilder()\n\t\t\t.append(this.getClass().getSimpleName())\n\t\t\t.append(\" { id:\").append(id)\n\t\t\t.append(\", version:\").append(version)\n\t\t\t.append(\" }\")\n\t\t\t.toString();\n\t}", "public String toString()\r\n\t{\r\n\t\tStringBuffer OutString = new StringBuffer();\r\n\t\t// Open tag\r\n\t\tOutString.append(\"<\");\r\n\t\t// Add the object's type\r\n\t\tOutString.append(getType());\r\n\t\t// attach the ID if required.\r\n\t\tif (DEBUG)\r\n\t\t\tOutString.append(getObjID());\r\n\t\t// add the class attribute if required; default: don't.\r\n\t\tif (getIncludeClassAttribute() == true)\r\n\t\t\tOutString.append(getClassAttribute());\r\n\t\t// Add any transformation information,\r\n\t\t// probably the minimum is the x and y values.\r\n\t\t// again this is new to Java 1.4;\r\n\t\t// this function returns a StringBuffer.\r\n\t\tOutString.append(getAttributes());\r\n\t\t// close the tag.\r\n\t\tOutString.append(\">\");\r\n\t\tOutString.append(\"&\"+entityReferenceName+\";\");\r\n\t\t// close tag\r\n\t\tOutString.append(\"</\");\r\n\t\tOutString.append(getType());\r\n\t\tOutString.append(\">\");\r\n\r\n\t\treturn OutString.toString();\r\n\t}", "public String toString()\n\t{\n\t\treturn String.format(\"%-25s%-15s\\n%-25s%-15s\\n%-25s%-15s\\n%-25s%-15d\\n%-25s%-15s\\n%-25s$%,-13.2f\", \n\t\t\t\t \t\t \t \"Name\", this.getName(), \"Address:\", this.getAddress(), \"Telephone number:\", this.getTelephone(), \n\t\t\t\t \t\t \t \"Customer Number:\", this.getCustNum(), \"Email notifications:\", this.getSignedUp() == true ? \"Yes\" : \"No\",\n\t\t\t\t \t\t \t \"Purchase amount:\", this.getCustomerPurchase());\n\t}", "public java.lang.String toString() {\n return this.stringValue;\n }", "public String toString() {\n\t\tString resultString = \"I am a weighted Instances object.\\r\\n\" + \"I have \" + numInstances()\n\t\t\t\t+ \" instances and \" + (numAttributes() - 1) + \" conditional attributes.\\r\\n\"\n\t\t\t\t+ \"My weights are: \" + Arrays.toString(weights) + \"\\r\\n\" + \"My data are: \\r\\n\"\n\t\t\t\t+ super.toString();\n\n\t\treturn resultString;\n\t}", "public String toString() {\n return \"\";\n }", "public String toString() {\n return \"\";\n }", "@Override\n\tpublic String toString() {\n\t\treturn this.toAnticipatedString();\n\t}", "@Override\n public String toString()\n {\n return this.toLsString();\n }", "@Override public String toString();", "public String toString()\n\t{\n\t\treturn toString(0);\n\t}", "public String toString()\n\t{\n\t\treturn toString(0);\n\t}", "public String toString()\n\t{\n\t\treturn toString(0);\n\t}", "@Override\n \tpublic String toString() {\n \t\treturn toStringHelper(1, \"\");\n \t}", "@Override\n public String toString() {\n return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);\n }", "public String toString() {\n\n // **** ****\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"\\n n: \" + this.n);\n sb.append(\"\\nparents: \" + Arrays.toString(this.parents));\n\n // **** ****\n return sb.toString();\n }", "public String toString() {\n StringBuffer result = new StringBuffer(this.m_content.length() + 2);\n result.append('\"');\n if (this.m_content != null) result.append(escape(this.m_content));\n result.append('\"');\n return result.toString();\n }", "public String toString() {\n return \"\" + data;\n }", "public String toString() {\r\n String result = \"Name: \" + name + \"\\n\";\r\n\r\n result += \"Address: \" + address + \"\\n\";\r\n result += \"Phone: \" + phone;\r\n\r\n return result;\r\n }", "@Override\n public String toString() {\n // TODO this is a sudo method only for testing puroposes\n return \"{name: 5aled, age:15}\";\n }", "public String toString() {\n StringBuffer buffer = new StringBuffer();\n\n buffer.append(getClass().getName());\n buffer.append(\"@\");\n buffer.append(Integer.toHexString(hashCode()));\n buffer.append(\" [\");\n buffer.append(objectToString(\"Id\", getId()));\n buffer.append(objectToStringFK(\"Project\", getProject()));\n buffer.append(objectToStringFK(\"User\", getUser()));\n buffer.append(objectToString(\"Status\", getStatus()));\n buffer.append(objectToString(\"LastActivityDate\", getLastActivityDate()));\n buffer.append(objectToString(\"HasPiSeen\", getHasPiSeen()));\n buffer.append(objectToString(\"HasDpSeen\", getHasDpSeen()));\n buffer.append(objectToString(\"HasAdminSeen\", getHasAdminSeen()));\n buffer.append(objectToString(\"HasRequestorSeen\", getHasRequestorSeen()));\n buffer.append(objectToString(\"EmailStatus\", getEmailStatus()));\n buffer.append(\"]\");\n\n return buffer.toString();\n }", "public String toString() {\n String text = TAB + \"Name: \" + this.name + lineSeparator()\n + Ui.formatMessage(\"Address: \" + this.address, MAX_LINE_LENGTH)\n + lineSeparator() + TAB\n + \"Faculty: \" + this.faculty + lineSeparator() + TAB\n + \"Port: \" + this.hasPort + lineSeparator() + TAB\n + \"Indoor: \" + this.isIndoor + lineSeparator() + TAB\n + \"Maximum number of Pax: \" + this.maxPax;\n String line = TAB + \"__________________________________________________________\";\n return line + lineSeparator() + text + lineSeparator() + line;\n }", "public String toString () {\n\t\tString resumen = \"\";\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tresumen = resumen + this.get(i).toString();\n\t\t}\n\t\treturn resumen;\n\t}", "public String toString() {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tsb.append(\"<div>\");\r\n\t\tsb.append(\"Names: \").append(this.getNames().toString()).append(\",<br/>\");\r\n\t\tsb.append(\"Addresses: \").append(this.getAddresses().toString()).append(\",<br/>\");\r\n\t\tsb.append(\"Contacts: \").append(this.getContacts().toString()).append (\",<br/>\");\r\n\t\tsb.append(\"Identifiers: \").append(this.getIdentifiers().toString()).append(\",<br/>\");\r\n\t\tsb.append(\"</div>\");\r\n\t\treturn sb.toString();\r\n\t}", "@Override\r\n public String toString() {\r\n return toSmartText().toString();\r\n }", "@Override\n public String toString() {\n byte[] buffer = toBuffer();\n return (buffer == null) ? null : new String(buffer, StandardCharsets.UTF_8);\n }", "public java.lang.String toString()\n {\n return this.stringValue;\n }", "public String toString() {\r\n\t\t\r\n\t\treturn super.toString();\r\n\t\t\r\n\t}", "public String toStringMultiline() {\n return Serializer.INSTANCE.serialize(this, true);\n }", "public String toStringMultiline() {\n return Serializer.INSTANCE.serialize(this, true);\n }", "public String toStringMultiline() {\n return Serializer.INSTANCE.serialize(this, true);\n }", "public String toStringMultiline() {\n return Serializer.INSTANCE.serialize(this, true);\n }" ]
[ "0.80813384", "0.8080322", "0.75771433", "0.75657624", "0.7545196", "0.7508742", "0.7501174", "0.7492558", "0.74814284", "0.7435861", "0.743217", "0.7430953", "0.7430953", "0.7402879", "0.7383311", "0.73612833", "0.73588544", "0.73588544", "0.73549545", "0.7348021", "0.7342131", "0.73062915", "0.72858405", "0.72850096", "0.72814184", "0.724366", "0.7216356", "0.721301", "0.72112304", "0.7209217", "0.720533", "0.720533", "0.720533", "0.72015923", "0.7167714", "0.7142378", "0.7126561", "0.7114242", "0.7101637", "0.7101637", "0.70990646", "0.7091974", "0.70711786", "0.7070283", "0.70610034", "0.7059557", "0.7057789", "0.70496464", "0.70493776", "0.70340985", "0.7013645", "0.70058924", "0.70016193", "0.69947946", "0.6977558", "0.69553083", "0.695169", "0.694943", "0.6948944", "0.69468504", "0.69467854", "0.694133", "0.69322014", "0.69322014", "0.69322014", "0.69322014", "0.68981296", "0.6887086", "0.6882398", "0.687613", "0.687573", "0.6867127", "0.6863645", "0.68632764", "0.68602186", "0.68602186", "0.68556523", "0.6847124", "0.68373287", "0.6819491", "0.6819491", "0.6819491", "0.6818503", "0.6812551", "0.6808834", "0.6795006", "0.67919296", "0.6791918", "0.67879504", "0.67871004", "0.67867154", "0.6785649", "0.67850125", "0.6782752", "0.6780585", "0.67802644", "0.6778774", "0.6778358", "0.6778358", "0.6778358", "0.6778358" ]
0.0
-1
Gets the type of this selector operator.
@Override public Selector getType() { return Selector.MODULUS; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SelectorType getType() {\r\n\t\treturn type;\r\n\t}", "SelectorType getSelector();", "public int getSelectorType() {\n return m_selectorType;\n }", "public Expression getType();", "public short getSelectorType() {\n return Selector.SAC_CONDITIONAL_SELECTOR;\n }", "public java.lang.String getSelector() {\n return instance.getSelector();\n }", "public QueryType getType();", "public Type getExpressionType();", "public java.lang.String getSelector() {\n return selector_;\n }", "public __Type getQueryType() {\n return (__Type) get(\"queryType\");\n }", "public int getType() {\r\n\t\treturn (type);\r\n\t}", "public Selector<GenomeType> getSelector()\n {\n return this.selector;\n }", "Operator.Type getOperation();", "public Class getEvaluationType() {\n return lho.getOperandType();\n }", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public Class getType();", "public String getSelector() {\n return selector;\n }", "type getType();", "public String type();", "public String getQueryType() {\r\n\t\treturn this._queryType;\r\n\t}", "public String getType()\n\t{\n\t\t// The enumerated type's name satisfies all the type criteria, so use\n\t\t// it.\n\t\treturn name();\n\t}", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public String getQueryType();", "public String getQueryType();", "public Type getType();", "Classifier getType();", "public Type getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public ConditionConnectiveType getType() {\n\t\treturn type;\n\t}", "public Class<?> getType() {\n return this.value.getClass();\n }", "public String getType() {\n\t\treturn _type;\n\t}", "public type getType() {\r\n\t\treturn this.Type;\r\n\t}", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "public String getType() {\r\n\t\treturn this.type;\r\n\t}", "public Type getType () {\n\t\treturn type;\n\t}", "public String getType () {\n return type;\n }", "public String getType () {\n return type;\n }", "public String getType () {\n return type;\n }", "public Class getType();", "public Class<T> type() {\n\t\treturn _type;\n\t}", "public String obtenirType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "Type getType();" ]
[ "0.78457916", "0.7254623", "0.7188252", "0.7010275", "0.6823393", "0.64928514", "0.63947916", "0.6361886", "0.62902844", "0.6239287", "0.62305516", "0.6202995", "0.6196405", "0.6154786", "0.6132605", "0.6132605", "0.6132605", "0.6132605", "0.6132605", "0.6132605", "0.6132605", "0.6132605", "0.6132605", "0.6132605", "0.6132605", "0.6132605", "0.6132605", "0.61040807", "0.60957265", "0.60903084", "0.6075754", "0.60714316", "0.6069144", "0.60637504", "0.60637504", "0.60637504", "0.60637504", "0.60637504", "0.6063545", "0.6063545", "0.6044263", "0.60310787", "0.60200816", "0.60169154", "0.60169154", "0.60169154", "0.60169154", "0.60169154", "0.60169154", "0.60169154", "0.60169154", "0.60165304", "0.6013711", "0.6008682", "0.60000503", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5999741", "0.5994356", "0.59807396", "0.59762746", "0.59762746", "0.59762746", "0.597266", "0.5970972", "0.5960187", "0.5959428", "0.5959428", "0.5959428", "0.5959428", "0.5959428", "0.5959428", "0.5959428", "0.5959428", "0.5959428", "0.5959428", "0.5959428", "0.5959428", "0.5955369" ]
0.0
-1
TODO Autogenerated method stub
public static boolean pat() { 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
Creates a new SwerveDrive.
public SwerveDrive() { //TODO:properly construct the swerve modules, and put then in an array, int already in Constants // frontLeft = new SwerveModule(); // rearLeft = new SwerveModule(); // rearRight = new SwerveModule(); // frontRight = new SwerveModule(); ////This may seem repetitive, but it makes clear which module is which. // swerveModules = new SwerveModule[]{ // frontLeft, // rearLeft, // rearRight, // frontRight // }; //TODO:Construct the IMU object, alreeady named imu }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DriveHandle createDrive( String name )\n throws CdbException , InterruptedException {\n return _pvr.createDrive( name ) ;\n }", "public SwerveDrive(SwerveModule FrontLeft, SwerveModule FrontRight, SwerveModule BackLeft, SwerveModule BackRight) {\n super(\"SwerveDrive\");\n modules.add(FrontLeft);\n modules.add(FrontRight);\n modules.add(BackLeft);\n modules.add(BackRight);\n setMode(SwerveMode.FrontDriveBackLock); // Default mode\n}", "public DriveService(){}", "public Drive(String path, String fName){\n drv = new File(path);\n folderName = fName;\n totalSpace = drv.getTotalSpace();\n freeSpace = drv.getUsableSpace();\n checkSetup();\n }", "public Drive() {\r\n leftFrontDrive = new Talon(Constants.DRIVE_LEFT_FRONT);\r\n leftRearDrive = new Talon(Constants.DRIVE_LEFT_REAR);\r\n rightFrontDrive = new Talon(Constants.DRIVE_RIGHT_FRONT);\r\n rightRearDrive = new Talon(Constants.DRIVE_RIGHT_REAR);\r\n \r\n robotDrive = new RobotDrive(\r\n leftFrontDrive,\r\n leftRearDrive, \r\n rightFrontDrive, \r\n rightRearDrive);\r\n \r\n driveDirection = 1.0;\r\n \r\n arcadeYRamp = new CarbonRamp();\r\n arcadeXRamp = new CarbonRamp();\r\n tankLeftRamp = new CarbonRamp();\r\n tankRightRamp = new CarbonRamp();\r\n \r\n ui = CarbonUI.getUI();\r\n }", "public DriveSubsystem() {\n leftDrive = new Spark(0);\n rightDrive = new Spark(1);\n\n leftEncoder = new Encoder(0, 1);\n rightEncoder = new Encoder(2, 3);\n\n leftEncoder.setDistancePerPulse((Math.PI * WHEEL_DIAMETER) / PPR);\n rightEncoder.setDistancePerPulse((Math.PI * WHEEL_DIAMETER) / PPR);\n \n drive = new DifferentialDrive(leftDrive, rightDrive);\n\n }", "public RLDiskDrive() {\n }", "public void setupDrive(){\n // Place Dove/ into base of drive\n new File(drv.toString() + File.separator + folderName).mkdir();\n //upload preset content if required\n isSetup = true;\n }", "public ArcadeDrive() {\n\t\tthis.drivetrain = Robot.DRIVETRAIN;\n\t\trequires(drivetrain);\n\t}", "public DriveSubsystem() {\n\t\tJaguar frontLeftCIM = new Jaguar(RobotMap.D_FRONT_LEFT_CIM);\n\t\tJaguar rearLeftCIM = new Jaguar(RobotMap.D_REAR_LEFT_CIM);\n\t\tJaguar frontRightCIM = new Jaguar(RobotMap.D_FRONT_RIGHT_CIM);\n\t\tJaguar rearRightCIM = new Jaguar(RobotMap.D_REAR_RIGHT_CIM);\n\t\t\n\t\tdrive = new RobotDrive(frontLeftCIM, rearLeftCIM, frontRightCIM, rearRightCIM);\n\t}", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "@RequestMapping(value = \"/file\", \n\t\t\t\t\tmethod = RequestMethod.POST)\n\tpublic ResponseEntity<DriveFile> createFile(@RequestBody DriveFile driveFile) throws IOException, IllegalArgumentException, NullPointerException {\n\t\t\n\t\tFile metadata = new File();\n\t\tmetadata.setName(driveFile.getTitle());\n\t\tmetadata.setDescription(driveFile.getDescription());\n\n\t\tFile file = DriveConnection.driveService.files().create(metadata) // creamos \n\t\t .setFields(\"id, name, description\")\n\t\t .execute();\n\t\n\t\tdriveFile.setId(file.getId()); // seteamos su ID\n\t\n\t\treturn new ResponseEntity<DriveFile>(driveFile, HttpStatus.OK); // lo mostramos en la consola\n\t\t\n\t}", "private void createFile() {\n if (mDriveServiceHelper != null) {\n Log.d(TAG, \"Creating a file.\");\n\n mDriveServiceHelper.createFile()\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n //progressDialog.setProgress(100);\n progressDialog.dismiss();\n Toast.makeText(MainActivity.this, \"Download Successful\", Toast.LENGTH_SHORT).show();\n }\n })\n .addOnFailureListener(exception ->\n Log.e(TAG, \"Couldn't Create file.\", exception));}\n }", "public BasicDriveTeleOp() {\n\n }", "public DriveSubsystem() {\n m_leftSpark1 = new CANSparkMax(DriveConstants.kLeftMotor1Port, MotorType.kBrushless);\n m_leftSpark2 = new CANSparkMax(DriveConstants.kLeftMotor2Port, MotorType.kBrushless);\n m_rightSpark1 = new CANSparkMax(DriveConstants.kRightMotor1Port, MotorType.kBrushless);\n m_rightSpark2 = new CANSparkMax(DriveConstants.kRightMotor2Port, MotorType.kBrushless);\n\n initSparkMax(m_leftSpark1);\n initSparkMax(m_leftSpark2);\n initSparkMax(m_rightSpark1);\n initSparkMax(m_rightSpark2);\n\n m_leftSpark2.follow(m_leftSpark1);\n m_rightSpark2.follow(m_rightSpark2);\n\n m_leftEncoder = m_leftSpark1.getEncoder();\n m_rightEncoder = m_rightSpark1.getEncoder();\n\n m_drive = new DifferentialDrive(m_leftSpark1, m_rightSpark1);\n }", "public void save(ReservationDrive reservationDrive){\n reservationDriveRepository.save(reservationDrive);\n }", "Vehicle createVehicle();", "Vehicle createVehicle();", "public TankDrive(DriveTrainSubsystem driveTrain) {\n // Use addRequirements() here to declare subsystem dependencies.\n driveTrainSubsystem = driveTrain;\n addRequirements(driveTrainSubsystem);\n }", "public DriveSubsystem() {\n }", "public DriveTrain() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n leftFrontTalon = new WPI_TalonSRX(11);\n leftRearTalon = new WPI_TalonSRX(12);\n rightFrontTalon = new WPI_TalonSRX(13);\n rightRearTalon = new WPI_TalonSRX(14);\n victorTestController = new WPI_VictorSPX(4);\n robotDrive41 = new RobotDrive(leftRearTalon, leftFrontTalon,rightFrontTalon, rightRearTalon);\n \n robotDrive41.setSafetyEnabled(false);\n robotDrive41.setExpiration(0.1);\n robotDrive41.setSensitivity(0.5);\n robotDrive41.setMaxOutput(1.0);\n\n \n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n }", "public static Drivetrain getInstance(){\n if(instance == null){\n instance = new Drivetrain();\n }\n return instance;\n }", "public SwerveDriveCalculator() {\n this(1.0, 1.0);\n }", "public VMWareDriver() {\n }", "@Test(description = \"Create a DVSwitch inside a valid folder with\"\n + \"the following configuration: \\n\"\n + \"VmwareDVSPortSetting.blocked set to false\\n\"\n + \"VmwareDVSPortSetting.policy set to an invalid policy\\n\")\n public void test()\n throws Exception\n {\n log.info(\"Test Begin:\");\n boolean status = false;\n try {\n this.dvsMOR = this.iFolder.createDistributedVirtualSwitch(\n this.networkFolderMor, this.configSpec);\n log.error(\"The API did not throw Exception\");\n } catch (Exception actualMethodFaultExcep) {\n MethodFault actualMethodFault = com.vmware.vcqa.util.TestUtil.getFault(actualMethodFaultExcep);\n InvalidArgument expectedMethodFault = new InvalidArgument();\n status = TestUtil.checkMethodFault(actualMethodFault,\n expectedMethodFault);\n }\n\n assertTrue(status, \"Test Failed\");\n }", "abstract public Vcard createVcard();", "void createDriver(Driver driver);", "private void createDriver() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L,\n new Licence(\"Full for over 2 years\", \"YXF87231\",\n LocalDate.parse(\"12/12/2015\", formatter),\n LocalDate.parse(\"12/12/2020\", formatter)));\n }", "public Drive(DriveTrain dr, TestableJoystick controller) {\n\n m_driveTrain = dr;\n this.m_controller = controller;\n\n this.m_speed = 0.0;\n this.m_rot = 0.0;\n\n addRequirements(dr);\n }", "private SWDrive() {\n super();\n leftMaster = new TalonSRX(Constants.LEFT_MASTER_PORT);\n leftMaster.setNeutralMode(NeutralMode.Brake);\n leftMaster.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n leftMaster.setSelectedSensorPosition(0, 0, 0);\n leftMaster.config_kP(0, Constants.LINEAR_GAINS[0], 0);\n leftMaster.config_kI(0, Constants.LINEAR_GAINS[1], 0);\n leftMaster.config_kD(0, Constants.LINEAR_GAINS[2], 0);\n leftMaster.configMotionAcceleration(1000, 0);\n\t\tleftMaster.configMotionCruiseVelocity(5000, 0);\n\t\tleftMaster.config_IntegralZone(0, 200, 0);\n\t\tleftMaster.configClosedloopRamp(0, 256);\n\t\tleftMaster.configOpenloopRamp(0, 256);\n\t\tleftMaster.configAllowableClosedloopError(0, Constants.LINEAR_EPSILON, 0);\n\n rightMaster = new TalonSRX(Constants.RIGHT_MASTER_PORT);\n rightMaster.setNeutralMode(NeutralMode.Brake);\n rightMaster.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n rightMaster.setSelectedSensorPosition(0, 0, 0);\n rightMaster.setInverted(true);\n rightMaster.config_kP(0, Constants.LINEAR_GAINS[0], 0);\n rightMaster.config_kI(0, Constants.LINEAR_GAINS[1], 0);\n rightMaster.config_kD(0, Constants.LINEAR_GAINS[2], 0);\n rightMaster.configMotionAcceleration(1000, 0);\n\t\trightMaster.configMotionCruiseVelocity(5000, 0);\n\t\trightMaster.config_IntegralZone(0, 200, 0);\n\t\trightMaster.configClosedloopRamp(0, 256);\n\t\trightMaster.configOpenloopRamp(0, 256);\n rightMaster.configAllowableClosedloopError(0, Constants.LINEAR_EPSILON, 0); \n\n leftSlave = new VictorSPX(Constants.LEFT_SLAVE_PORT);\n leftSlave.setNeutralMode(NeutralMode.Brake);\n leftSlave.follow(leftMaster);\n\n rightSlave = new VictorSPX(Constants.RIGHT_SLAVE_PORT);\n rightSlave.setNeutralMode(NeutralMode.Brake);\n //rightSlave.setInverted(true);\n rightSlave.follow(rightMaster);\n\n gearSolenoid = new DoubleSolenoid(Constants.DRIVE_SOLENOID_FORWARD, Constants.DRIVE_SOLENOID_REVERSE);\n\n navx = new AHRS(Port.kMXP);\n controller = new XboxController(Constants.PRIMARY_DRIVER_PORT);\n pid = new PIDController();\n\n try {\n //piComm = new DatagramSocket();\n //host = InetAddress.getByName(\"10.2.63.25\");\n } catch(Exception e) {\n System.out.println(\"Exception caught when initializing socket: \" + e.getMessage());\n }\n \n //tXBuffer = new CircularBuffer(10);\n\n tankEnabled = false;\n setpointReached = true;\n rotateSet = false;\n antiTiltEnabled = true;\n cargoSearch = false;\n piCamera = false;\n leftTarget = 0;\n rightTarget = 0;\n lacc = 0;\n racc = 0;\n }", "FuelingStation createFuelingStation();", "public DriveSubsystem() {\n leftFrontMotor = new TalonSRX(RobotMap.leftFrontMotor);\n rightFrontMotor = new TalonSRX(RobotMap.rightFrontMotor);\n leftBackMotor = new TalonSRX(RobotMap.leftBackMotor);\n rightBackMotor = new TalonSRX(RobotMap.rightBackMotor);\n // rightMotor.setInverted(true); \n direction = 0.75;\n SmartDashboard.putString(\"Direction\", \"Shooter side\");\n }", "private void createFile() {\n if (mDriveServiceHelper != null) {\n Log.d(\"error\", \"Creating a file.\");\n\n mDriveServiceHelper.createFile()\n .addOnSuccessListener(fileId -> readFile(fileId))\n .addOnFailureListener(exception ->\n Log.e(\"error\", \"Couldn't create file.\", exception));\n }\n }", "public ReservationDrive findReservationDrive(Long id){\n return reservationDriveRepository.findOne(id);\n }", "public DriveTrain()\n\t{\n\t\tleftMotor1 = new VictorSPX(DriveTrainConstants.leftFrontMotorChannel);\n\t\tleftMotor2 = new VictorSPX(DriveTrainConstants.leftRearMotorChannel);\n\t\trightMotor1 = new VictorSPX(DriveTrainConstants.rightFrontMotorChannel);\n\t\trightMotor2 = new VictorSPX(DriveTrainConstants.rightRearMotorChannel);\n\n\t\tleftMotor1.setInverted(DriveTrainConstants.leftMotorInverted);\n\t\trightMotor1.setInverted(DriveTrainConstants.rightMotorInverted);\n\n\t\tleftMotor2.setInverted(InvertType.FollowMaster);\n\t\trightMotor2.setInverted(InvertType.FollowMaster);\n\n\t\tleftMotor2.set(ControlMode.Follower, leftMotor1.getDeviceID());\n\t\trightMotor2.set(ControlMode.Follower, rightMotor1.getDeviceID());\n\t}", "public void setDriveType(DriveType driveType) {\n this.driveType = driveType;\n }", "private Drive getDriveService(HttpServletRequest req,\n\t\t\tHttpServletResponse resp) throws IOException {\n\n\t\tCredential credentials = getCredential(req, resp);\n\t\treturn new Builder(TRANSPORT, JSON_FACTORY, credentials).build();\n\t}", "public DefaultDriveCommand(SK20Drive subsystem) {\n m_subsystem = subsystem;\n\n // Use addRequirements() here to declare subsystem dependencies.\n addRequirements(m_subsystem);\n }", "Strobo createStrobo();", "public DriveSystem() {\n \t\n \tsuper(\"DriveSystem\", 0.5, 0.3, 1.0);//Must be first line of constructor!\n \tultraRangeFinder.setAutomaticMode(true);\n \tultraRangeFinder.setEnabled(true);\n \tultraRangeFinderBack.setAutomaticMode(true);\n \tultraRangeFinderBack.setEnabled(true);\n //double kp = 0.0001;\n \t//double ki = 0.001;\n \t//double kd = 0.01;\n \t//getPIDController().setPID(kp,ki,kd);//Set the PID controller gains.\n this.setInputRange(-180.0, 180.0);//Sets the MIN and MAX values expected from the input and setPoint!\n this.setOutputRange(-1.0, 1.0);//Sets the the MIN and MAX values to write to output\n //this.setAbsoluteTolerance(5.0);//Set the absolute error which is considered tolerable for use with OnTarget()\n //this.setPercentTolerance(10);//Set the percentage error which is considered tolerable for use with OnTarget()\n //this.setSetpoint(45);//Set the where to go to, clears GetAvgError()\n getPIDController().setContinuous(true);//True=input is continuous, calculates shortest route to setPoint()\n //this.enable();//Begin running the PID Controller.\n \n LiveWindow.addActuator(\"DriveSystem\", \"PID DriveSystem\", getPIDController());\n \n // getPIDController().startLiveWindowMode();//Start having this object automatically respond to value changes.\n }", "public ArcadeDrive() { \n addRequirements(Robot.driveBase);\n\n // Use addRequirements() here to declare subsystem dependencies.\n }", "public void persists(Drive drive){\n\t\tem.persist(drive);\n\t}", "Drone createDrone();", "public Servos() {\n\n }", "public DriverForCreateBuilder() {\r\n driverForCreate = new DriverForCreate();\r\n }", "Swarm createSwarm();", "public DriveTrain() {\n\n\t\tleft1 = new CANTalon(RobotMap.DMTOPleft);\n\t\tleft2 = new CANTalon(RobotMap.DMMIDDLEleft);\n\t\tleft3 = new CANTalon(RobotMap.DMBOTTOMleft);\n\t\tright1 = new CANTalon(RobotMap.DMTOPright);\n\t\tright2 = new CANTalon(RobotMap.DMMIDDLEright);\n\t\tright3 = new CANTalon(RobotMap.DMBOTTOMright);\n\t\tright = new Encoder(RobotMap.DRIVEencoderRA, RobotMap.DRIVEencoderRB, false, Encoder.EncodingType.k4X);\n\t\tleft = new Encoder(RobotMap.DRIVEencoderLA, RobotMap.DRIVEencoderLB, true, Encoder.EncodingType.k4X);\n\t\tspeedShifter = new DoubleSolenoid(RobotMap.PCM, RobotMap.SHIFTLOW, RobotMap.SHIFTHI);\n\t\tultrasonic = new AnalogInput(RobotMap.ULTRASONICDT);\n\t\tservo = new Servo(RobotMap.SERVO_drivetrain);\n\n\t\t// TODO: set left and right encoder distance per pulse here! :)\n\n\t\tspeedShifter.set(DoubleSolenoid.Value.kReverse);\n\t\tdouble dpp = 3 * ((6 * Math.PI) / 1024); // distance per pulse\n\t\t\t\t\t\t\t\t\t\t\t\t\t// (circumference/counts per\n\t\t\t\t\t\t\t\t\t\t\t\t\t// revolution)\n\t\tright.setDistancePerPulse(dpp); // must be changed for both right and\n\t\t\t\t\t\t\t\t\t\t// left\n\t\tleft.setDistancePerPulse(dpp);\n\n\t}", "public Drive(double left, double right) {\n requires(Robot.drivetrain);\n this.left = left;\n this.right = right;\n }", "public void create(){}", "public DriveTrain(){\r\n super(\"Drive Train\");\r\n Log = new MetaCommandLog(\"DriveTrain\", \"Gyro\" , \"Left Jaguars,Right Jaguars\");\r\n gyro1 = new Gyro(RobotMap.AnalogSideCar , RobotMap.DriveTrainGyroInput);\r\n lfJag = new Jaguar(RobotMap.frontLeftMotor);\r\n lfRearJag = new Jaguar(RobotMap.rearLeftMotor);\r\n rtJag = new Jaguar(RobotMap.frontRightMotor);\r\n rtRearJag = new Jaguar(RobotMap.rearRightMotor);\r\n drive = new RobotDrive(lfJag, lfRearJag, rtJag, rtRearJag);\r\n \r\n //lfFrontJag = new Jaguar (3);\r\n //rtFrontJag = new Jaguar (4);\r\n \r\n //joystick2 = new Joystick(2);\r\n //sensor1 = new DigitalInput(1);\r\n //sensor2 = new DigitalInput (2);\r\n\r\n }", "VM createVM();", "public DriveHandle getDriveByName( String name )\n throws CdbException , InterruptedException {\n return _pvr.getDriveByName( name ) ;\n }", "public static Storage create(String fileName) throws DukeException {\n try {\n if (!Files.exists(Storage.DATA_DIR)) {\n Files.createDirectory(Storage.DATA_DIR);\n }\n Path filePath = Paths.get(Storage.DATA_DIR.toString(), fileName);\n BufferedWriter writer = Files.newBufferedWriter(filePath);\n return new Storage(writer);\n } catch (IOException e) {\n throw Ui.ioException(e);\n }\n }", "public static void create(Disks disk){\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tHibernateUtilMastere.getSession().save(disk);\r\n\t\t\tHibernateUtilMastere.getSession().getTransaction().commit();\r\n\t\t} catch(HibernateException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "SpaceInvaderTest_test_VaisseauAvancePartiellement_DeplacerVaisseauVersLaDroite createSpaceInvaderTest_test_VaisseauAvancePartiellement_DeplacerVaisseauVersLaDroite();", "public boolean setupDrive(String s){\n boolean flag = false;\n for(String i: drv.list()){\n if(s.equals(i)){\n flag = true;\n }\n }\n if(flag == true){\n System.out.println(s + \" is already taken as a folder name!\");\n return false;//false for operation could not complete!\n }else{\n drv = new File(drv.toString() + File.separator + s);\n drv.mkdir();\n folderName = s;\n isSetup = true;\n return true;\n }\n }", "public ArcadeDrivetrain build() {\n verify();\n return new ArcadeDrivetrain(this);\n }", "public DriveTrain (int motorChannelL1,int motorChannelL2,int motorChannelR1,int motorChannelR2 ){\n leftMotor1 = new Victor(motorChannelL1);\n leftMotor2 = new Victor(motorChannelL2);\n rightMotor1 = new Victor(motorChannelR1);\n rightMotor2 = new Victor(motorChannelR2);\n highDrive = new RobotDrive(motorChannelL1, motorChannelR1);\n lowDrive = new RobotDrive(motorChannelL2, motorChannelR2);\n \n }", "public SubsystemDrive(){\n \t\n \t//Master Talons\n \tleft1 = new CANTalon(Constants.LEFT_MOTOR);\n \tright1 = new CANTalon(Constants.RIGHT_MOTOR);\n \t\n \t//Slave Talons\n \tleft2 = new CANTalon(Constants.OTHER_LEFT_MOTOR);\n \tright2 = new CANTalon(Constants.OTHER_RIGHT_MOTOR);\n \t\n \t//VOLTAGE\n \tvoltage(left1); \t\n \tvoltage(left2); \t\n \tvoltage(right1); \t\n \tvoltage(right2); \t\n\n \t//Train the Masters\n \tleft1.setFeedbackDevice(CANTalon.FeedbackDevice.CtreMagEncoder_Relative);\n \tright1.setFeedbackDevice(CANTalon.FeedbackDevice.CtreMagEncoder_Relative);\n \tleft1.setEncPosition(0);\n \tright1.setEncPosition(0);\n \tleft1.reverseSensor(false);\n \tright1.reverseSensor(false);\n \t\n \t//Train the Slaves\n \tleft2.changeControlMode(CANTalon.TalonControlMode.Follower);\n \tright2.changeControlMode(CANTalon.TalonControlMode.Follower);\n \tleft2.set(left1.getDeviceID());\n \tright2.set(right1.getDeviceID());\n \t\n \tpid = new TalonPID(new CANTalon[]{left1, right1}, \"MOTORS\");\n }", "@Override\n public DriverDO create(DriverDO driverDO) throws ConstraintsViolationException {\n DriverDO driver;\n try {\n driver = driverRepository.save(driverDO);\n } catch (DataIntegrityViolationException e) {\n LOG.warn(\"ConstraintsViolationException while creating a driver: {}\", driverDO, e);\n throw new ConstraintsViolationException(e.getMessage());\n }\n return driver;\n }", "public Drive(DriveTrain dr, double speed, double rot) {\n\n m_driveTrain = dr;\n\n m_speed = speed; m_rot = rot;\n\n addRequirements(dr);\n }", "public DVD()\n\t{\n\n\t}", "public DriveTrain(side left, side right){\n this.left = left;\n this.right = right;\n this.gear = new twoSpeed();\n }", "public void omniDrive() {\r\n \r\n }", "SpaceInvaderTest_test_VaisseauImmobile_DeplacerVaisseauVersLaDroite createSpaceInvaderTest_test_VaisseauImmobile_DeplacerVaisseauVersLaDroite();", "CreateWorkerFleetResult createWorkerFleet(CreateWorkerFleetRequest createWorkerFleetRequest);", "SpaceInvaderTest_test_VaisseauAvance_DeplacerVaisseauVersLaDroite createSpaceInvaderTest_test_VaisseauAvance_DeplacerVaisseauVersLaDroite();", "@Override\n\tpublic void create(IWizardEntity entity, WizardRunner runner) {\n\t\t\n\t}", "public static void createInstance(Model model, Resource instanceResource) {\r\n\t\tBase.createInstance(model, RDFS_CLASS, instanceResource);\r\n\t}", "Klassenstufe createKlassenstufe();", "public DriveTrain(SpeedController left, SpeedController right){\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t\tthis.drive = new RobotDrive(left,right);\n\t\t/*\n\t\tthis.leftDrive=new RobotDrive(left,right);\n\t\tthis.rightDrive=new RobotDrive(right);\n\t\t*/\n\t}", "public void setDriveTrain(DriveTrain driveTrain) {\r\n this.driveTrain = driveTrain;\r\n }", "public DriverConfig createDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _driverList.add(driver);\n \n return driver;\n }", "static public QRScanProviderVolunteerRequest create(String serializedData) {\n Gson gson = new Gson();\n return gson.fromJson(serializedData, QRScanProviderVolunteerRequest.class);\n }", "@Override\n\tpublic void drive() {\n\n\t}", "public DiskPoolVolume() {\n }", "public void createFile(String name, String type) {\n\n final String fileName = name;\n\n final String fileType = type;\n\n // create new contents resource\n Drive.DriveApi.newDriveContents(mGoogleApiClient)\n .setResultCallback(new ResultCallback<DriveApi.DriveContentsResult>() {\n @Override\n public void onResult(DriveApi.DriveContentsResult result) {\n\n if (!result.getStatus().isSuccess()) {\n\n return;\n }\n\n final DriveContents driveContents = result.getDriveContents();\n\n // Perform I/O off the UI thread.\n new Thread() {\n\n @Override\n public void run() {\n\n if (mCRUDapi != null) {\n // write content to DriveContents\n mCRUDapi.onCreateFile(driveContents.getOutputStream());\n }\n\n createFile(fileName, fileType, driveContents);\n }\n }.start();\n\n\n }\n });\n }", "@Override\r\n\tpublic Share create(long shareId) {\r\n\t\tShare share = new ShareImpl();\r\n\r\n\t\tshare.setNew(true);\r\n\t\tshare.setPrimaryKey(shareId);\r\n\r\n\t\tString uuid = PortalUUIDUtil.generate();\r\n\r\n\t\tshare.setUuid(uuid);\r\n\r\n\t\tshare.setCompanyId(companyProvider.getCompanyId());\r\n\r\n\t\treturn share;\r\n\t}", "@Override\r\n\tpublic boolean create(Station obj) {\n\t\treturn false;\r\n\t}", "private byte drive(Vehicle v){\n\n return v.drive();\n }", "protected FileSystem createFileSystem()\n throws SmartFrogException, RemoteException {\n ManagedConfiguration conf = createConfiguration();\n FileSystem fileSystem = DfsUtils.createFileSystem(conf);\n return fileSystem;\n }", "@Override\n\tpublic Paper create(long paperId) {\n\t\tPaper paper = new PaperImpl();\n\n\t\tpaper.setNew(true);\n\t\tpaper.setPrimaryKey(paperId);\n\n\t\tString uuid = PortalUUIDUtil.generate();\n\n\t\tpaper.setUuid(uuid);\n\n\t\tpaper.setCompanyId(companyProvider.getCompanyId());\n\n\t\treturn paper;\n\t}", "public Vehicle(){}", "@Override\n\tpublic void drive() {\n\t\tSystem.out.println(\"VAN IS DRIVING\");\n\t}", "public File getDrive(){\n return drv;\n }", "public GoalTrack(Drivetrain drivetrain, Vision vision) {\n // Use addRequirements() here to declare subsystem dependencies.\n\n this.drivetrain = drivetrain;\n this.vision = vision;\n }", "public Storage(String filePath) {\n file = new File(filePath);\n try {\n file.getParentFile().mkdir();\n file.createNewFile();\n } catch (IOException e) {\n System.err.println(\"Unable to create file\");\n }\n }", "public TankDrive() {\n // Use requires() here to declare subsystem dependencies\n requires(chassis);\n \n }", "ChargingStation createChargingStation();", "Segment createSegment();", "public static Drive getDriveService(String token) throws IOException, GeneralSecurityException {\n Credential credential = new GoogleCredential().setAccessToken(token);\n return new Drive.Builder(GoogleNetHttpTransport.newTrustedTransport(), JacksonFactory.getDefaultInstance(), credential).setApplicationName(APPLICATION_NAME).build();\n }", "public void saveAndCreateNew() throws Exception {\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\t\tgetControl(\"saveAndCreateNew\").click();\n\t\tVoodooUtils.waitForReady();\n\t\tVoodooUtils.focusDefault();\n\t}", "public SwerveDriveCalculator(Rectangle base) {\n setBase(base.getWidth(), base.getHeight());\n }", "public Segment createSegmentFromString(String segmentstring) {\n\n SegmentImpl segment = new SegmentImpl();\n\n String[] chars = segmentstring.split(\"\");\n\n List<String> worldChars = Arrays.asList(chars);\n\n for (String tocken : worldChars) {\n StepImpl step = new StepImpl();\n Overlay over = null;\n\n if (tocken.equals(\"W\")) {\n over = new Sword();\n } else if (tocken.equals(\"M\")) {\n over = new MonsterImpl();\n } else if (tocken.equals(\"P\")){\n over = new Princess();\n }\n\n if (over != null) {\n step.addOverlay(over);\n }\n segment.addStep(step);\n }\n\n return segment;\n }", "public void CreateFileOnGoogleDrive(DriveApi.DriveContentsResult result){\n\n final DriveContents driveContents = result.getDriveContents();\n\n // Perform I/O off the UI thread.\n new Thread() {\n @Override\n public void run() {\n // write content to DriveContents\n OutputStream outputStream = driveContents.getOutputStream();\n Writer writer = new OutputStreamWriter(outputStream);\n try {\n writer.write(\"Hello abhay!\");\n writer.close();\n } catch (IOException e) {\n Log.e(TAG, e.getMessage());\n }\n\n MetadataChangeSet changeSet = new MetadataChangeSet.Builder()\n .setTitle(\"abhaytest2\")\n .setMimeType(\"text/plain\")\n .setStarred(true).build();\n\n // create a file in root folder\n Drive.DriveApi.getRootFolder(mGoogleApiClient)\n .createFile(mGoogleApiClient, changeSet, driveContents)\n .setResultCallback(fileCallback);\n }\n }.start();\n }", "public Perfil create(Perfil perfil);", "void setPath(DrivePath path);", "public SwerveDriveCalculator(double baseWidth, double baseLength) {\n setBase(baseWidth, baseLength);\n }", "SpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche createSpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche();", "public Vehicle() {}" ]
[ "0.6881972", "0.5955585", "0.593189", "0.58337384", "0.57708937", "0.5735849", "0.56361383", "0.5620373", "0.5504591", "0.54616916", "0.54615235", "0.5458539", "0.5380737", "0.5346366", "0.5312759", "0.52909225", "0.52680945", "0.52680945", "0.52039605", "0.5193514", "0.51919264", "0.5166247", "0.5148334", "0.5120935", "0.50881314", "0.5073324", "0.5072278", "0.5061705", "0.5008793", "0.5005876", "0.49839815", "0.49178", "0.49009803", "0.48904285", "0.48767433", "0.48521408", "0.48145273", "0.4794795", "0.47941944", "0.4791013", "0.4789924", "0.4776217", "0.47696596", "0.47631568", "0.47501078", "0.4744104", "0.4739627", "0.4717871", "0.4681344", "0.46803883", "0.46671677", "0.46521363", "0.4650357", "0.46472147", "0.46465388", "0.4641349", "0.46368346", "0.46333072", "0.46304575", "0.46164685", "0.45924184", "0.4573003", "0.45655295", "0.45648727", "0.45640633", "0.45639908", "0.45611167", "0.45518", "0.45450315", "0.45442003", "0.45384207", "0.45295796", "0.45289853", "0.45168614", "0.45138", "0.45126584", "0.4510757", "0.4504546", "0.44997382", "0.4497522", "0.44922787", "0.44908592", "0.44828948", "0.4481279", "0.4466207", "0.4447147", "0.44444594", "0.44438988", "0.44431597", "0.44408333", "0.44402957", "0.44402888", "0.4435024", "0.44349608", "0.4431125", "0.44230396", "0.44018707", "0.43988854", "0.43947718", "0.43933013" ]
0.53744036
13
This method will be called once per scheduler run
@Override public void periodic() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }", "@Override\r\n\tpublic void doInitialSchedules() {\n\t}", "@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }", "protected abstract void scheduler_init();", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}", "@Override\n public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n public void autonomousPeriodic()\n {\n Scheduler.getInstance().run();\n }", "@Override\n public void run() {\n schedule();\n }", "@Override\n public void reportScheduler() {\n }", "private void scheduleJob() {\n\n }", "@Override\n protected Scheduler scheduler() {\n return scheduler;\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\t\n\t}", "@Override\n public void autonomousPeriodic() {\n\t// updateDiagnostics();9\n\tScheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\r\n Scheduler.getInstance().run();\r\n }", "public static void flushScheduler() {\n while (!RuntimeEnvironment.getMasterScheduler().advanceToLastPostedRunnable()) ;\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n public void autonomousPeriodic() {\n\n }", "@Override\n public void autonomousPeriodic() {\n \n }", "public void init(){\n\t\t//this.lock = new ReentrantLock();\n\t\t//jobscheduler.setLock(this.lock);\n\t\tthis.poller.inspect();\n\t\tschedule(this.poller.refresh());\t\t\t\t\n\t}", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n }", "protected void runEachDay() {\n \n }", "@Override\n public void autonomousPeriodic() {\n }", "public void autonomousPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "@Override\n public void teleopPeriodic()\n {\n Scheduler.getInstance().run();\n }", "@Override\n public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n log();\n }", "public void setScheduler(Scheduler scheduler)\r\n/* 25: */ {\r\n/* 26: 65 */ this.scheduler = scheduler;\r\n/* 27: */ }", "@Override\n public void teleopPeriodic() {\n\tupdateDiagnostics();\n\tScheduler.getInstance().run();\n }", "@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n \n }", "public void autonomousPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n protected Scheduler scheduler() {\n return Scheduler.newFixedRateSchedule(0, 1, TimeUnit.SECONDS);\n }", "@Override\n public void autonomousPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "public void generateSchedule(){\n\t\t\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "public void teleopPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tlog();\n\t}", "@Override\n public void run() {\n createScheduleFile();\n createWinnerScheduleFile();\n }", "@Override\n public void run() {\n\n\n\n System.out.println(\"run scheduled jobs.\");\n\n\n checkBlackOutPeriod();\n\n\n\n checkOfficeActionPeriod1();\n\n checkAcceptedFilings();\n\n checkNOAPeriod();\n checkFilingExtensions();\n\n\n\n }", "protected abstract String scheduler_next();", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n protected Scheduler scheduler() {\n return Scheduler.newFixedRateSchedule(0, 1, TimeUnit.DAYS);\n }", "private void schedule() {\n service.scheduleDelayed(task, schedulingInterval);\n isScheduled = true;\n }", "@Override\n public void periodic() {\n UpdateDashboard();\n }", "protected void runEachHour() {\n \n }", "@Override\n public void autonomousPeriodic()\n {\n commonPeriodic();\n }", "protected void runEachMinute() {\n \n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tOI.refreshAll();\n\t\tScheduler.getInstance().run();\n\t\tlog();\n\t}", "@Override\n public void syncState() {\n scheduledCounter.check();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "protected void beforeJobExecution() {\n\t}" ]
[ "0.79959375", "0.71370137", "0.7053971", "0.6965585", "0.69561255", "0.6893155", "0.68800586", "0.6876765", "0.67826825", "0.67659134", "0.6764156", "0.67577356", "0.6701485", "0.6687244", "0.6663779", "0.6658108", "0.6658108", "0.6658108", "0.6658108", "0.6644757", "0.6644757", "0.6644757", "0.6644757", "0.6644757", "0.6644757", "0.66429067", "0.6637915", "0.66273797", "0.66178864", "0.66178864", "0.66178864", "0.6614001", "0.65720326", "0.65580493", "0.6552124", "0.655197", "0.6537553", "0.6512464", "0.6478613", "0.645125", "0.6445831", "0.643673", "0.64337045", "0.64049494", "0.6391861", "0.6391861", "0.6391861", "0.6374168", "0.6369688", "0.6369592", "0.63500774", "0.63436323", "0.63429624", "0.63429624", "0.6324376", "0.63060725", "0.6303406", "0.6298463", "0.62968045", "0.6295609", "0.6295192", "0.6289829", "0.6271111", "0.6271111", "0.6271111", "0.6271111", "0.62665445" ]
0.62594575
99
This function is meant to drive one module at a time for testing purposes.
public void driveOneModule(int moduleNumber,double moveSpeed, double rotatePos){ //TODO:test that moduleNumber is between 0-3, return if not(return;) //TODO:write code to drive one module in a testing form }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setupModules(){\n\t\tStart.setupModules();\n\t\t//add\n\t\t//e.g.: special custom scripts, workers, etc.\n\t}", "protected void initModules()\n {\n\n }", "@Test\n public void testModuleOperations()\n throws Exception\n {\n // instance exists (auto-created)\n ModuleInfo info = moduleManager.getModuleInfo(MarketDataCoreModuleFactory.INSTANCE_URN);\n assertNotNull(info);\n assertNotNull(info.getCreated());\n assertNotNull(info.getStarted());\n // instance started (auto-started)\n assertEquals(ModuleState.STARTED,\n info.getState());\n new ExpectedFailure<ModuleStateException>(Messages.MODULE_NOT_STARTED_STATE_INCORRECT) {\n @Override\n protected void run()\n throws Exception\n {\n moduleManager.start(MarketDataCoreModuleFactory.INSTANCE_URN);\n }\n };\n new ExpectedFailure<ModuleException>(Messages.CANNOT_DELETE_SINGLETON) {\n @Override\n protected void run()\n throws Exception\n {\n moduleManager.deleteModule(MarketDataCoreModuleFactory.INSTANCE_URN);\n }\n };\n new ExpectedFailure<ModuleException>(Messages.CANNOT_CREATE_SINGLETON) {\n @Override\n protected void run()\n throws Exception\n {\n moduleManager.createModule(MarketDataCoreModuleFactory.PROVIDER_URN);\n }\n };\n moduleManager.stop(MarketDataCoreModuleFactory.INSTANCE_URN);\n info = moduleManager.getModuleInfo(MarketDataCoreModuleFactory.INSTANCE_URN);\n assertEquals(ModuleState.STOPPED,\n info.getState());\n moduleManager.start(MarketDataCoreModuleFactory.INSTANCE_URN);\n info = moduleManager.getModuleInfo(MarketDataCoreModuleFactory.INSTANCE_URN);\n assertEquals(ModuleState.STARTED,\n info.getState());\n }", "@Test\n public void shouldListModulesWithInDirectCycles() throws Exception {\n initializeOSGiProjectWithIndirectCycle();\n resetOutput();\n queueInputLines(\"y\");\n getShell().execute(\"osgi cycles\");\n Assert.assertTrue(getOutput().contains(\"module1 =====\" + TestUtils.getNewLine() +\n \"module1,module2,module1\" + TestUtils.getNewLine() +\n \"module1,module2,module3,module1\"));\n\n Assert.assertTrue(getOutput().contains(\"module2 =====\" + TestUtils.getNewLine() +\n \"module2,module1,module2\" + TestUtils.getNewLine() +\n \"module2,module3,module1,module2\"));\n\n Assert.assertTrue(getOutput().contains(\"module3 =====\" + TestUtils.getNewLine() +\n \"module3,module1,module2,module3\"));\n\n }", "@Before\n public void setUp() {\n LOG.info(\"===========================================================\");\n module1 = context.mock(Module.class, \"module1\");\n module2 = context.mock(Module.class, \"module2\");\n managerListener = context.mock(ModuleLifecycleManagerListener.class);\n listener = context.mock(ModuleLifecycleListener.class);\n peerGroup = context.mock(PeerGroup.class);\n id = IDFactory.newModuleClassID();\n pgx = new PeerGroupException(\"Hardcoded test exception\");\n\n manager = new ModuleLifecycleManager<Module>();\n manager.addModuleLifecycleManagerListener(managerListener);\n manager.addModuleLifecycleListener(listener);\n }", "protected void setUp() {\n Collection<? extends ModuleInfo> infos = Lookup.getDefault().<ModuleInfo>lookupAll(ModuleInfo.class);\n }", "public interface IModuleRepo {\n\n /**\n * @return true if this repository has been initialized.\n */\n boolean isInitialized();\n\n /**\n * Initializes the repository.\n */\n void initialize(int shards, Integer shardIndex, File testsDir, Set<IAbi> abis,\n List<String> deviceTokens, List<String> testArgs, List<String> moduleArgs,\n Set<String> mIncludeFilters, Set<String> mExcludeFilters,\n MultiMap<String, String> metadataIncludeFilters,\n MultiMap<String, String> metadataExcludeFilters,\n IBuildInfo buildInfo);\n\n /**\n * @return a {@link LinkedList} of all modules to run on the device referenced by the given\n * serial.\n */\n LinkedList<IModuleDef> getModules(String serial, int shardIndex);\n\n /**\n * @return the number of shards this repo is initialized for.\n */\n int getNumberOfShards();\n\n /**\n * @return the modules which do not have token and have not been assigned to a device.\n */\n List<IModuleDef> getNonTokenModules();\n\n /**\n * @return the modules which have token and have not been assigned to a device.\n */\n List<IModuleDef> getTokenModules();\n\n /**\n * @return An array of all module ids in the repo.\n */\n String[] getModuleIds();\n\n /**\n * Clean up all internal references.\n */\n void tearDown();\n}", "@Override\n\tpublic void prepareModule() throws Exception {\n\n\t}", "public void testMultipleWeaversWithRankings() throws Exception {\n\n\t\tConfigurableWeavingHook hook1 = new ConfigurableWeavingHook();\n\t\tConfigurableWeavingHook hook2 = new ConfigurableWeavingHook();\n\t\tConfigurableWeavingHook hook3 = new ConfigurableWeavingHook();\n\n\t\t//Called in proper order\n\t\thook3.setChangeTo(\"3 Finished\");\n\t\thook1.setExpected(\"3 Finished\");\n\t\thook1.setChangeTo(\"1 Finished\");\n\t\thook2.setExpected(\"1 Finished\");\n\t\thook2.setChangeTo(\"Chain Complete\");\n\n\n\t\tServiceRegistration<WeavingHook> reg1 = null;\n\t\tServiceRegistration<WeavingHook> reg2= null;\n\t\tServiceRegistration<WeavingHook> reg3 = null;\n\t\ttry {\n\t\t\treg1 = hook1.register(getContext(), 0);\n\t\t\treg2 = hook2.register(getContext(), 0);\n\t\t\treg3 = hook3.register(getContext(), 1);\n\t\t\tClass<?>clazz = weavingClasses.loadClass(TEST_CLASS_NAME);\n\t\t\tassertEquals(\"Weaving was unsuccessful\", \"Chain Complete\",\n\t\t\t\t\tclazz.getConstructor().newInstance().toString());\n\n\t\t\t// We expect the order to change if we update our ranking\n\t\t\tHashtable<String, Object> table = new Hashtable<String, Object>();\n\t\t\ttable.put(Constants.SERVICE_RANKING, Integer.valueOf(2));\n\t\t\treg2.setProperties(table);\n\n\t\t\thook2.setExpected(DEFAULT_EXPECTED);\n\t\t\thook2.setChangeTo(\"2 Finished\");\n\t\t\thook3.setExpected(\"2 Finished\");\n\t\t\thook3.setChangeTo(\"3 Finished\");\n\t\t\thook1.setChangeTo(\"org.osgi.framework.hooks.weaving.WovenClass\");\n\n\t\t\thook2.addImport(\"org.osgi.framework.hooks.weaving\");\n\n\t\t\tclazz = weavingClasses.loadClass(DYNAMIC_IMPORT_TEST_CLASS_NAME);\n\t\t\tassertEquals(\"Weaving was unsuccessful\", \"interface org.osgi.framework.hooks.weaving.WovenClass\",\n\t\t\t\t\tclazz.getConstructor().newInstance().toString());\n\t\t} finally {\n\t\t\tif (reg1 != null)\n\t\t\t\treg1.unregister();\n\t\t\tif (reg2 != null)\n\t\t\t\treg2.unregister();\n\t\t\tif (reg3 != null)\n\t\t\t\treg3.unregister();\n\t\t}\n\t}", "@Test public void runCommonTests() {\n\t\trunAllTests();\n\t}", "public void testAddModule() {\n\t System.out.println(\"addModule\");\n\t Module module = module1;\n\t Student instance = student1;\n\t instance.addModule(module);\n\t }", "private void registerAllKnownModules() throws ModulesFactoryException\n\t{\n\t\tfor(MODULE_TYPE m: MODULE_TYPE.values() )\n\t\t{\n\t\t\tthis.allocator.registerModule(ModulesFactory.getModule(m));\n\t\t}\n\t}", "@Test(enabled =true, groups={\"fast\",\"window.One\",\"unix.One\",\"release1.one\"})\n\tpublic void testOne(){\n\t\tSystem.out.println(\"In TestOne\");\n\t}", "public void setup() {\r\n\r\n\t}", "public void startDriver();", "private void initModules(SwerveDriveModule m0, SwerveDriveModule m1, SwerveDriveModule m2, SwerveDriveModule m3) {\n\t\tmSwerveModules[0] = m0;\n\t\tmSwerveModules[1] = m1;\n\t\tmSwerveModules[2] = m2;\n\t\tmSwerveModules[3] = m3;\n\t\tzeroGyro();\n\n\t\t// mSwerveModules[0].getDriveMotor().setInverted(InvertType.InvertMotorOutput); //real: false\n\t\t// mSwerveModules[2].getDriveMotor().setInverted(true); //\n\t\t// mSwerveModules[1].getDriveMotor().setInverted(false); //real: true\n\t\t// mSwerveModules[2].getDriveMotor().setInverted(false); //real: false\n\t\t//mSwerveModules[3].getDriveMotor().setInverted(TalonFXInvertType.CounterClockwise); //real: false\n\t\t\n\t\t mSwerveModules[0].getAngleMotor().setInverted(true); //real: true\n\t\t mSwerveModules[2].getAngleMotor().setInverted(true); //real: true\n\t\t mSwerveModules[1].getAngleMotor().setInverted(true); //real: true\n\t\t mSwerveModules[3].getAngleMotor().setInverted(true); //real: true\n\n\t\tmSwerveModules[0].resetEncoder();\n\t\tmSwerveModules[1].resetEncoder();\n\t\tmSwerveModules[2].resetEncoder();\n\t\tmSwerveModules[3].resetEncoder();\n\t\tfor(int i = 0; i < 4; i++) {\n\t\t\tmSwerveModules[i].getDriveMotor().setNeutralMode(NeutralMode.Brake);\n\t\t}\n\n\t\tisAuto = false;\n\t}", "public static void SwipeUp_Counter_hourly_submodules() throws Exception{\n\n\t\tfor(int i=1;i<=7 ;i++){\n\n\t\t\tSwipe();\n\n\n\t\t\tBoolean b=verifyElement(By.id(\"com.weather.Weather:id/hourly_more\"));\n\t\t\tif(b==true)\n\t\t\t{\n\t\t\t\tlogStep(\"Hourly page is presented on the screen\");\t\t\n\t\t\t\tAd.findElementById(\"com.weather.Weather:id/hourly_more\").click();\n\t\t\t\tlogStep(\"clicked the hourly page link\");\n\t\t\t\tAd.findElementByClassName(\"android.widget.ImageButton\").click();\n\t\t\t\tThread.sleep(5000);\n\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Module is not present scroll down\");\n\t\t\t}\n\n\n\n\t\t}\n\t}", "public BQTestClassFactory autoLoadModules() {\n this.autoLoadModules = true;\n return this;\n }", "private Map<String, TestModuleHolder> getTestModules() {\n\t\treturn testModuleSupplier.get();\n\t}", "private void loadModules() {\n\n ModuleTiers moduleTiers = new ModuleTiers();\n moduleTiers.setSource(.5);\n moduleTiers.setNumTiers(5);\n String tiersKey = \"module tiers\";\n addDemoPanelWithModule(moduleTiers, tiersKey, null);\n demoPanels.get(tiersKey).removeGUI();\n\n ModuleCellular moduleCellular = new ModuleCellular();\n moduleCellular.setCoefficients(9, .5, 3, 7);\n String cellularKey = \"module cellular\";\n addDemoPanelWithModule(moduleCellular, cellularKey, null);\n demoPanels.get(cellularKey).removeGUI();\n\n /*\n * ground_gradient\n */\n // ground_gradient\n ModuleGradient groundGradient = new ModuleGradient();\n groundGradient.setGradient(0, 0, 0, 1, 0, 0);\n String gradientKey = \"Ground Gradient\";\n addDemoPanelWithModule(groundGradient, gradientKey, null);\n demoPanels.get(gradientKey).removeGUI();\n\n String mountainsKey = \"mountains before gradient\";\n TerrainNoiseSettings mountainSettings = getDemoPanelSettings(mountainsKey);\n if (mountainSettings == null) {\n mountainSettings = TerrainNoiseSettings.MountainTerrainNoiseSettings(seed, false);\n }\n Module mountainTerrainNoGradient = mountainSettings.makeTerrainModule(null);\n addDemoPanelWithModule(mountainTerrainNoGradient, mountainsKey, mountainSettings);\n\n String mountainsWithGradientKey = \"translate gradient domain with mountains\";\n TerrainNoiseSettings gradMountainSettings = getDemoPanelSettings(mountainsWithGradientKey);\n if (gradMountainSettings == null) {\n gradMountainSettings = TerrainNoiseSettings.MountainTerrainNoiseSettings(seed, false);\n }\n ModuleTranslateDomain mountainTerrain = new ModuleTranslateDomain();\n mountainTerrain.setAxisYSource(mountainTerrainNoGradient);\n mountainTerrain.setSource(groundGradient);\n\n addDemoPanelWithModule(mountainTerrain, mountainsWithGradientKey, gradMountainSettings);\n demoPanels.get(mountainsWithGradientKey).removeGUI();\n\n /*\n String highlandKey = \"highlands\";\n TerrainNoiseSettings highlandSettings = getDemoPanelSettings(highlandKey);\n if (highlandSettings == null) {\n highlandSettings = TerrainNoiseSettings.HighLandTerrainNoiseSettings(seed);\n }\n Module highlandTerrain = TerrainDataProvider.MakeTerrainNoise(groundGradient, highlandSettings );\n addDemoPanelWithModule(highlandTerrain, highlandKey, highlandSettings);\n */\n /*\n * select air or solid with mountains\n */\n String terrainSelectKey = \"terrain Select\";\n TerrainNoiseSettings terrSelectSettings = getDemoPanelSettings(terrainSelectKey);\n if (terrSelectSettings == null) {\n terrSelectSettings = TerrainNoiseSettings.TerrainSettingsWithZeroOneModuleSelect(seed, mountainTerrain);\n } else {\n terrSelectSettings.moduleSelectSettings.controlSource = mountainTerrain;\n }\n Module terrSelectModule = terrSelectSettings.moduleSelectSettings.makeSelectModule();\n addDemoPanelWithModule(terrSelectModule, terrainSelectKey, terrSelectSettings);\n\n /*\n * noise to determine which kind of solid block\n */\n String typeSelectSettingKey = \"terrain type select\";\n TerrainNoiseSettings typeSelectSettings = getDemoPanelSettings(typeSelectSettingKey);\n if (typeSelectSettings == null) {\n typeSelectSettings = TerrainNoiseSettings.TerrainTypeSelectModuleNoiseSettings(seed, false);\n }\n Module selectTypeTerr = typeSelectSettings.makeTerrainModule(null);\n //addDemoPanelWithModule(selectTypeTerr, typeSelectSettingKey, typeSelectSettings);\n\n String dirtOrStoneSelectSettingsKey = \"dirt or stone\";\n TerrainNoiseSettings dirtOrStoneSelectSettings = getDemoPanelSettings(dirtOrStoneSelectSettingsKey);\n if (dirtOrStoneSelectSettings == null) {\n dirtOrStoneSelectSettings = TerrainNoiseSettings.BlockTypeSelectModuleSettings(seed, selectTypeTerr, BlockType.DIRT, BlockType.STONE);\n } else {\n dirtOrStoneSelectSettings.moduleSelectSettings.controlSource = selectTypeTerr;\n }\n Module dirtOrStoneModule = dirtOrStoneSelectSettings.moduleSelectSettings.makeSelectModule();\n //addDemoPanelWithModule(dirtOrStoneModule, dirtOrStoneSelectSettingsKey, dirtOrStoneSelectSettings);\n\n /*\n * combine terrain select and block type select\n */\n String combineTerrainAndBlockTypeKey = \"Terrain And BlockType\";\n ModuleCombiner terrAndBlockTypeMod = new ModuleCombiner(ModuleCombiner.CombinerType.MULT);\n terrAndBlockTypeMod.setSource(0, terrSelectModule);\n terrAndBlockTypeMod.setSource(1, dirtOrStoneModule);\n TerrainNoiseSettings combineSettings = new TerrainNoiseSettings(seed); //defaults\n combineSettings.renderWithBlockColors = true;\n //addDemoPanelWithModule(terrAndBlockTypeMod, combineTerrainAndBlockTypeKey, combineSettings);\n //demoPanels.get(combineTerrainAndBlockTypeKey).removeGUI();\n\n\n\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void refreshModules()\n\t{\n\t\t// Scan each directory in turn to find JAR files\n\t\t// Subdirectories are not scanned\n\t\tList<File> jarFiles = new ArrayList<>();\n\n\t\tfor (File dir : moduleDirectories) {\n\t\t\tfor (File jarFile : dir.listFiles(jarFileFilter)) {\n\t\t\t\tjarFiles.add(jarFile);\n\t\t\t}\n\t\t}\n\n\t\t// Create a new class loader to ensure there are no class name clashes.\n\t\tloader = new GPIGClassLoader(jarFiles);\n\t\tfor (String className : loader.moduleVersions.keySet()) {\n\t\t\ttry {\n\t\t\t\t// Update the record of each class\n\t\t\t\tClass<? extends Interface> clz = (Class<? extends Interface>) loader.loadClass(className);\n\t\t\t\tClassRecord rec = null;\n\t\t\t\tfor (ClassRecord searchRec : modules.values()) {\n\t\t\t\t\tif (searchRec.clz.getName().equals(className)) {\n\t\t\t\t\t\trec = searchRec;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (rec != null) {\n\t\t\t\t\t// This is not an upgrade, ignore it\n\t\t\t\t\tif (rec.summary.moduleVersion >= loader.moduleVersions.get(className)) continue;\n\n\t\t\t\t\t// Otherwise update the version number stored\n\t\t\t\t\trec.summary.moduleVersion = loader.moduleVersions.get(className);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\trec = new ClassRecord();\n\t\t\t\t\trec.summary = new ModuleSummary(IDGenerator.getNextID(), loader.moduleVersions.get(className),\n\t\t\t\t\t\t\tclassName);\n\t\t\t\t\tmodules.put(rec.summary.moduleID, rec);\n\t\t\t\t}\n\t\t\t\trec.clz = clz;\n\n\t\t\t\t// Update references to existing objects\n\t\t\t\tfor (StrongReference<Interface> ref : instances.values()) {\n\t\t\t\t\tif (ref.get().getClass().getName().equals(className)) {\n\t\t\t\t\t\tConstructor<? extends Interface> ctor = clz.getConstructor(Object.class);\n\t\t\t\t\t\tref.object = ctor.newInstance(ref.get());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (NoSuchMethodException e) {\n\t\t\t\t// Thrown when trying to find a suitable constructor\n\t\t\t\tSystem.err.println(\"Discovered class which has no available upgrade constructor: \" + className + \"\\n\\t\"\n\t\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t\t}\n\t\t\tcatch (InstantiationException | IllegalAccessException | IllegalArgumentException\n\t\t\t\t\t| InvocationTargetException e) {\n\t\t\t\t// All thrown by the instantiate call\n\t\t\t\tSystem.err.println(\"Unable to create new instance of class: \" + className + \"\\n\\t\"\n\t\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t\t}\n\t\t\tcatch (ClassNotFoundException e) {\n\t\t\t\t// Should never occur but required to stop the compiler moaning\n\t\t\t\tSystem.err.println(\"Discovered class which has no available upgrade constructor: \" + className + \"\\n\\t\"\n\t\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void test1() throws Throwable {\n MovementBlockType2__Basic movementBlockType2__Basic0 = new MovementBlockType2__Basic();\n movementBlockType2__Basic0.event_INIT(true);\n movementBlockType2__Basic0.event_FAULT();\n movementBlockType2__Basic0.event_RESUME();\n movementBlockType2__Basic0.event_CLK(true);\n }", "private ModuleSyncHelper() {\n //Private constructor to avoid instances for this helper.\n }", "@BeforeEach\n\tvoid setUp() throws Exception {\n\t\tnameLib = new LibraryGeneric<String>();\n\t\tnameLib.add(9780374292799L, \"Thomas L. Friedman\", \"The World is Flat\");\n\t\tnameLib.add(9780330351690L, \"Jon Krakauer\", \"Into the Wild\");\n\t\tnameLib.add(9780446580342L, \"David Baldacci\", \"Simple Genius\");\n\n\t\tphoneLib = new LibraryGeneric<PhoneNumber>();\n\t\tphoneLib.add(9780374292799L, \"Thomas L. Friedman\", \"The World is Flat\");\n\t\tphoneLib.add(9780330351690L, \"Jon Krakauer\", \"Into the Wild\");\n\t\tphoneLib.add(9780446580342L, \"David Baldacci\", \"Simple Genius\");\n\t}", "public void setup() {\n }", "protected void setup() {\r\n }", "void start() throws TestFailed\n {\n this.startSkeletons();\n }", "private void setupAllMafiosis()\n {\n }", "@Test\n public void startApp2Do(){\n }", "@Test\n public void verifyPathsInSequence() {\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n testGetCompanyHome();\n testGetCabinetFolder();\n testGetCaseFolder();\n testGetDocumentLibraryFolder();\n testEvidenceBankFolder();\n\n }", "public void startTests() {\n if(testSettings.accessibleProperties || testSettings.accessibleInterface)\n testProperties();\n if(testSettings.tabTraversal)\n testTraversal();\n }", "void scanModulesHealth() {\n\t\t// activate main module action\n\t\tactivateMainModuleAction();\n\n\t\tlog.debug(\"Scanning modules.\");\n\t\tactionsFactory.executeAtomicModuleAction(this, \"metrics-check\", () -> iterateRegisteredModules(ACTIVITY_LABEL), false);\n\n\t\tif (!isWorking() || Objects.isNull(runnerFuture)) {\n\t\t\tlog.debug(\"Scanning is stopped.\");\n\t\t\treturn;\n\t\t}\n\t\tlog.debug(\"Rescheduling service for {} millis\", delay);\n\t\trunnerFuture = activityRunner.schedule(this::scanModulesHealth, delay, TimeUnit.MILLISECONDS);\n\t}", "public static void runAllTests() {\n\t\trunClientCode(SimpleRESTClientUtils.getCToFServiceURL());\n\t\trunClientCode(SimpleRESTClientUtils.getCToFServiceURL(new String [] {\"100\"}));\n\t}", "public static void SwipeUp_Counter_news_submodules() throws Exception{\n\n\t\tfor(int i=1;i<=12 ;i++){\n\n\t\t\tSwipe();\n\n\n\t\t\tBoolean b=verifyElement(By.id(\"com.weather.Weather:id/news_title\"));\n\t\t\tif(b==true)\n\t\t\t{\n\t\t\t\tAd.findElementById(\"com.weather.Weather:id/news_grid_item_0\").click();\n\t\t\t\tThread.sleep(5000);\n\t\t\t\t//Ad.findElementByClassName(\"android.widget.ImageButton\").click();\n\t\t\t\t//Thread.sleep(5000);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Module is not present scroll down\");\n\t\t\t}\n\n\n\n\t\t}\n\t}", "private void updateModules()\n throws Exception\n {\n LogUtil.put(LogFactory.getInstance(\"Start\", this, \"updateModules\"));\n \n Vector vector = this.findNewModules();\n Iterator iterator = vector.iterator();\n while(iterator.hasNext())\n {\n Bundle bundle = this.install((URL) iterator.next());\n \n if(bundle != null)\n {\n bundle.start(MODULES_START_LEVEL);\n }\n }\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\ts1 = new ServiceManager();\n\n\t\tFile f = new File(\"deviceList.txt\");\n\t\tScanner fileScanner = new Scanner(f);\n\n\t\ts2 = new ServiceManager(fileScanner);\n\t}", "private void setup() throws Exception {\n\t}", "public void setup()\n {\n }", "boolean setup(BT_Class cls,String file,String outf)\n{\n patch_delta = 0;\n patch_index = 0;\n\n return patch_type.getInstrumenter().setupFiles(cls,file,outf);\n}", "public void test_prepare() throws Throwable {\r\n\t\tSET_LONG_NAME(\"system.cli.simple\");\r\n\t DECLARE(TEST_PING);\r\n\t DECLARE(TEST_PROCESSLIST);\r\n\t DECLARE(TEST_PROCESSLIST_LOG);\r\n\t}", "@Before\n\tpublic void setUp() throws Exception {\n\t\tc1 = new ComDevice(\"123ABC\", \"Kate\", 3);\n\t\tc2 = new ComDevice(\"456DEF\", \"Bender\", 0);\n\t}", "private Map<String, TestModuleHolder> findTestModules() {\n\n\t\tMap<String, TestModuleHolder> testModules = new HashMap<>();\n\n\t\tClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false);\n\t\tscanner.addIncludeFilter(new AnnotationTypeFilter(PublishTestModule.class));\n\t\tfor (BeanDefinition bd : scanner.findCandidateComponents(\"io.fintechlabs\")) {\n\t\t\ttry {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tClass<? extends TestModule> c = (Class<? extends TestModule>) Class.forName(bd.getBeanClassName());\n\t\t\t\tPublishTestModule a = c.getDeclaredAnnotation(PublishTestModule.class);\n\n\t\t\t\ttestModules.put(a.testName(), new TestModuleHolder(c, a));\n\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tlogger.error(\"Couldn't load test module definition: \" + bd.getBeanClassName());\n\t\t\t}\n\t\t}\n\n\t\treturn testModules;\n\t}", "abstract void setup();", "private void initModuleLibraries() {\r\n // local path in the temporarily directory for this module\r\n String localTmpPath = \"soundModule\";\r\n\r\n // path to jar\r\n String jarPath = System.getProperty(\"user.dir\") + File.separator\r\n + \"modules\" + File.separator + \"soundModule.jar\";\r\n\r\n // extract the jar files for sound module\r\n try {\r\n JarUtil.extractFileFromJar(jarPath, localTmpPath, \"lib\", \"jl1.0.jar\");\r\n JarUtil.extractFileFromJar(jarPath, localTmpPath, \"lib\",\r\n \"mp3spi1.9.4.jar\");\r\n JarUtil.extractFileFromJar(jarPath, localTmpPath, \"lib\",\r\n \"tritonus_share-0.3.6.jar\");\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n\r\n // add this path in the library path...\r\n JarUtil.setLibraryPath(localTmpPath);\r\n\r\n // load jars from that temporarily directory (sound required jars)\r\n JarUtil.loadJar(localTmpPath, \"tritonus_share-0.3.6.jar\");\r\n JarUtil.loadJar(localTmpPath, \"mp3spi1.9.4.jar\");\r\n JarUtil.loadJar(localTmpPath, \"jl1.0.jar\");\r\n }", "public interface BlogLibTestMasterAppModule extends ApplicationModule {\r\n String helloMasterModule(String param);\r\n}", "@Before\n public void setUp() throws Exception {\n cut = new LightScheduler();\n// spyLedController = new SpyLedController();\n// fakeTimeService = new FakeTimeService();\n }", "private void doTests()\n {\n doDeleteTest(); // doSelectTest();\n }", "@Override\n public void setup() {\n\n }", "public void commonPeriodic()\n {\n double d1LeftJoystick = driver1.getAxis(driver1.LAxisUD);\n double d1RightJoystick = driver1.getAxis(driver1.RAxisUD);\n\n double d2LeftJoystick = driver2.getAxis(driver2.LAxisUD);\n double d2RightJoystick = driver2.getAxis(driver2.RAxisUD);\n\n // -------------------- DRIVER 1\n\n driveTrain.drive(d1LeftJoystick * speedModifier, d1RightJoystick * speedModifier);\n\n // driver1 controls ramp\n // press start and select together to deploy\n if(driver1.down(driver1.Start) && driver1.down(driver1.Select))\n {\n ramp.deploy();\n hatchArm.fingerGrab();\n }\n else\n {\n ramp.undeploy();\n }\n\n // driver 1 can double speed by holding L2\n //driveTrain.fastSpeed = driver1.down(driver1.L2);\n if(driver1.pressed(driver1.A))\n {\n driveTrain.slowSpeed = !driveTrain.slowSpeed;\n System.out.println(\"Fast speed toggled to: \" + driveTrain.slowSpeed);\n }\n\n //drive straight\n if(driver1.down(driver1.L1))\n {\n driveTrain.set_right_motors(speedModifier);\n }\n if(driver1.down(driver1.R1))\n {\n driveTrain.set_left_motors(speedModifier);\n }\n\n // flip drive orientation\n if(driver1.pressed(driver1.Select))\n {\n driveTrain.flip_orientation();\n \n if(driveTrain.isFacingForward())\n {\n camServForward.setSource(camFront);\n //camServReverse.setSource(camBack);\n // camBack.free();\n // camFront.close();\n // camFront = CameraServer.getInstance().startAutomaticCapture(0);\n // camBack = CameraServer.getInstance().startAutomaticCapture(1);\n }\n else\n {\n camServForward.setSource(camBack);\n //camServReverse.setSource(camFront);\n // camBack.close();\n // camFront.close();\n // camFront = CameraServer.getInstance().startAutomaticCapture(1);\n // camBack = CameraServer.getInstance().startAutomaticCapture(0);\n }\n }\n\n\n // -------------------- DRIVER 2\n\n\n // up is out\n // down is in\n // (when it's negated)\n cargoArm.spinBallMotor(-1 * d2LeftJoystick * 0.9);\n\n // control hatch placement pistons\n if(driver2.pressed(driver2.A))\n {\n hatchArm.pushPistons();\n }\n else if (driver2.released(driver2.A))\n {\n hatchArm.retractPistons();\n }\n\n // open/close hatch grabber arms\n if(driver2.pressed(driver2.B))\n {\n hatchArm.toggleGrabber();\n }\n\n if(driver2.pressed(driver2.Select))\n {\n //cargoArm.toggleArmLock();\n hatchArm.toggleFinger();\n }\n\n // extend/de-extend cargo hand\n if(driver2.pressed(driver2.Start))\n {\n cargoArm.toggleHand();\n }\n\n // button 7: L2\n // button 8: R2\n // L2 will reverse the finger\n // R2 will rotate it forward\n if(driver2.down(driver2.L1))\n {\n hatchArm.rotateFinger(1);\n }\n else\n {\n if(driver2.down(driver2.L2))\n {\n hatchArm.rotateFinger(-1);\n }\n else\n {\n hatchArm.rotateFinger(0);\n }\n }\n\n \n // button 5: L1\n // button 6: R1\n // L1 will move the hatch arm one way\n // R1 will move it the other way\n if(driver2.down(driver2.R1))\n {\n hatchArm.rotateArm(-1 * speedModifier);// * 0.75);\n }\n else\n {\n if(driver2.down(driver2.R2))\n {\n hatchArm.rotateArm(1 * speedModifier);// * 0.75);\n }\n else\n {\n hatchArm.rotateArm(0);\n }\n }\n\n \n // button 1: x\n // button 4: y\n // button 1 will move the ball arm one way\n // button 4 will move it the other way\n if(driver2.down(driver2.X))\n {\n //cargoArm.requestMove(-1 * speedModifier);\n cargoArm.rotateArm(-1);\n //cargoArm.solArmBrake.set(false);\n }\n else\n {\n if(driver2.down(driver2.Y))\n {\n //cargoArm.requestMove(2 * speedModifier);\n cargoArm.rotateArm(1);\n //cargoArm.solArmBrake.set(false);\n }\n else\n {\n //cargoArm.rotateArm(cargoArm.getArmCalculation());\n //cargoArm.solArmBrake.set(true);\n cargoArm.rotateArm(0);\n }\n }\n if(driver2.released(driver2.X) || driver2.released(driver2.Y))\n {\n //cargoArm.setArmTarget(cargoArm.currentPosition());\n //cargoArm.solArmBrake.set(true);\n cargoArm.rotateArm(0);\n }\n\n if(driver2.dpad(driver2.Up))\n {\n cargoArm.setArmUp();\n }\n if(driver2.dpad(driver2.Down))\n {\n cargoArm.setArmDown();\n }\n if(driver2.dpad(driver2.Left))\n {\n cargoArm.setArmMid();\n }\n if(driver2.dpad(driver2.Right))\n {\n cargoArm.setArmLow();\n }\n\n if(driver2.pressed(driver2.LThumb))\n {\n cargoArm.armLockEnabled = !cargoArm.armLockEnabled;\n \n }\n if(driver2.pressed(driver2.RThumb))\n {\n cargoArm.toggleBrake();\n }\n\n\n // allow move-to calculations to occur\n hatchArm.periodic();\n cargoArm.periodic();\n }", "@Before\n public void setUp() {\n for (int index = 0; index < testPartsIndex.length - 1; index++) {\n testPartsIndex[index] = 0;\n }\n }", "@Override\n public void setup() {\n }", "@Override\n public void setup() {\n }", "public void testLoadOrder() throws Exception {\n }", "public static void twoClientSetupProcesses() {\n\n\tList<String> aClientTags=TagsFactory.getAssignmentTags().getTwoClientClientTags();\n\tList<String> aServerTags=TagsFactory.getAssignmentTags().getTwoClientServerTags();\n\n\ttwoClientSetupProcesses(aClientTags, aServerTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcessTeams(Arrays.asList(\"RegistryBasedDistributedProgram\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setTerminatingProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Client_0\", \"Client_1\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Registry\", \"Server\", \"Client_0\", \"Client_1\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Registry\", Arrays.asList(\"Registry\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Server\", aServerTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_0\", aClientTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_1\", aClientTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Registry\", FlexibleStaticArgumentsTestCase.TEST_REGISTRY_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Server\", FlexibleStaticArgumentsTestCase.TEST_SERVER_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_0\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_0_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_1\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_1_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Registry\", 500);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Server\", 2000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Client_0\", 5000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Client_1\", 5000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().getProcessTeams().forEach(team -> System.out.println(\"### \" + team));\n}", "@Override\n\tpublic void homeTestRun() {\n\t\t\n\t}", "@Test\n public void test3() throws Throwable {\n MovementBlockType2__Basic movementBlockType2__Basic0 = new MovementBlockType2__Basic();\n movementBlockType2__Basic0.event_INIT(false);\n movementBlockType2__Basic0.event_CLK(true);\n movementBlockType2__Basic0.event_CLK(true);\n }", "public static void registerModules()\n {\n // Mystcraft is pushed in through the backdoor so it can't be disabled.\n moduleLoader.registerUncheckedModule(Mystcraft.class);\n\n // Register the remaining plugin classes normally\n moduleLoader.registerModule(AppEng.class);\n moduleLoader.registerModule(BuildcraftTransport.class);\n moduleLoader.registerModule(IC2.class);\n moduleLoader.registerModule(Thaumcraft.class);\n moduleLoader.registerModule(NotEnoughItems.class);\n moduleLoader.registerModule(Waila.class);\n moduleLoader.registerModule(ThermalExpansion.class);\n }", "void setup() throws Exception;", "@Before\r\n\tpublic void setup() {\r\n\t}", "protected abstract void setup();", "@Test\n public void test6() throws Throwable {\n MovementBlockType2__Basic movementBlockType2__Basic0 = new MovementBlockType2__Basic();\n movementBlockType2__Basic0.event_INIT(false);\n movementBlockType2__Basic0.event_CLK(false);\n movementBlockType2__Basic0.event_CLK(false);\n }", "@Test\n public void test0() throws Throwable {\n MovementBlockType2__Basic movementBlockType2__Basic0 = new MovementBlockType2__Basic();\n movementBlockType2__Basic0.event_INIT(true);\n movementBlockType2__Basic0.event_CLK(true);\n movementBlockType2__Basic0.event_FAULT();\n }", "@Ignore\n @Test\n public void discoverOneTypes() throws Exception {\n }", "private void loadOutputModules() {\n\t\tthis.outputModules = new ModuleLoader<IOutput>(\"/Output_Modules\", IOutput.class).loadClasses();\n\t}", "@Before\n public void prepare() throws Exception{\n systemController = new SystemControllerImpl();\n //List<Node> inputNodes = NodeDataGenerator.generate(3, 5);\n List<Node> inputNodes = NodeDataGenerator.generateFixedReal();\n inputNodes.forEach(node -> systemController.addNode(node));\n }", "@Test\n public void test2() throws Throwable {\n MovementBlockType2__Basic movementBlockType2__Basic0 = new MovementBlockType2__Basic();\n movementBlockType2__Basic0.event_INIT(false);\n movementBlockType2__Basic0.event_FAULT();\n movementBlockType2__Basic0.event_RESUME();\n movementBlockType2__Basic0.event_CLK(false);\n }", "@Test\n public void test4() throws Throwable {\n MovementBlockType2__Basic movementBlockType2__Basic0 = new MovementBlockType2__Basic();\n movementBlockType2__Basic0.event_INIT(false);\n movementBlockType2__Basic0.event_CLK(false);\n movementBlockType2__Basic0.event_CLK(true);\n }", "static void allowAccess(ClassMaker cm) {\n var thisModule = CoreUtils.class.getModule();\n var thatModule = cm.classLoader().getUnnamedModule();\n thisModule.addExports(\"org.cojen.dirmi.core\", thatModule);\n }", "@Test\n public void test7() throws Throwable {\n MovementBlockType2__Basic movementBlockType2__Basic0 = new MovementBlockType2__Basic();\n movementBlockType2__Basic0.event_INIT(false);\n movementBlockType2__Basic0.event_CLK(true);\n movementBlockType2__Basic0.event_CLK(false);\n }", "@Test\n public void testCOH9787()\n {\n // Test distributed scheme with local backing map\n COH9787Helper(\"COH9787-local-BM\");\n\n // Test distributed scheme with RWBM\n COH9787Helper(\"COH9787-RWBM-local-front\");\n }", "public void testMultipleWeavers() throws Exception {\n\n\t\tConfigurableWeavingHook hook1 = new ConfigurableWeavingHook();\n\t\tConfigurableWeavingHook hook2 = new ConfigurableWeavingHook();\n\t\tConfigurableWeavingHook hook3 = new ConfigurableWeavingHook();\n\n\t\thook1.setChangeTo(\"1 Finished\");\n\t\thook2.setExpected(\"1 Finished\");\n\t\thook2.setChangeTo(\"2 Finished\");\n\t\thook3.setExpected(\"2 Finished\");\n\t\thook3.setChangeTo(\"Chain Complete\");\n\n\t\tServiceRegistration<WeavingHook> reg1 = null;\n\t\tServiceRegistration<WeavingHook> reg2= null;\n\t\tServiceRegistration<WeavingHook> reg3 = null;\n\t\ttry {\n\t\t\treg1 = hook1.register(getContext(), 0);\n\t\t\treg2 = hook2.register(getContext(), 0);\n\t\t\treg3 = hook3.register(getContext(), 0);\n\t\t\tClass<?>clazz = weavingClasses.loadClass(TEST_CLASS_NAME);\n\t\t\tassertEquals(\"Weaving was unsuccessful\", \"Chain Complete\",\n\t\t\t\t\tclazz.getConstructor().newInstance().toString());\n\t\t} finally {\n\t\t\tif (reg1 != null)\n\t\t\t\treg1.unregister();\n\t\t\tif (reg2 != null)\n\t\t\t\treg2.unregister();\n\t\t\tif (reg3 != null)\n\t\t\t\treg3.unregister();\n\t\t}\n\t}", "public static void main(String[] args){\n IFlyBehaviour simpleFlyBehaviour = new SimpleFlyBehaviour(); // Horizontal sharing of code which is not possible with inheritance\n IQuackBehaviour simpleQuackBehaviour = new SimpleQuackBehaviour();\n IQuackBehaviour complexQuackBehaviour = new ComplexQuackBehaviour();\n\n // Create instances of the classes with different behaviours\n DuckBehaviourModule simpleDuckBehaviour = new DuckBehaviourModule(simpleFlyBehaviour, simpleQuackBehaviour);\n DuckBehaviourModule complexDuckBehaviour = new DuckBehaviourModule(simpleFlyBehaviour, complexQuackBehaviour);\n\n // Print them to check if they are working fine\n System.out.println(simpleDuckBehaviour.toString());\n System.out.println(\"Prediction :: \\n\");\n simpleDuckBehaviour.duckPrediction();\n\n System.out.println(\"-------------------------------- \\n\");\n\n System.out.println(complexDuckBehaviour.toString());\n System.out.println(\"Prediction :: \\n\");\n complexDuckBehaviour.duckPrediction();\n\n\n }", "@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}", "@Override\n protected void setup() {\n }", "private void startGame() {\n\t\tmain.next_module = new Game(main, inputs, gameSelectionData);\n\t}", "public void run() {\r\n\t\t\tModule module = null;\r\n\t\t\ttry {\r\n\t\t\t\t// Verificamos si el modulo ya esta abierto\r\n\t\t\t\tfor (int i = 0; i < desktopPane.getComponentCount(); i++) {\r\n\t\t\t\t\tComponent component2 = desktopPane.getComponent(i);\r\n\t\t\t\t\tif (moduleClass.isInstance(component2)) {\r\n\t\t\t\t\t\t// Si lo esta, lo seleccionamos y retornamos\r\n\t\t\t\t\t\tLoadingFrame.hide();\r\n\t\t\t\t\t\t((JInternalFrame) component2).setSelected(true);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tmodule = (Module) moduleClass.newInstance();\r\n\t\t\t\tdesktopPane.add((Component) module);\r\n\t\t\t\tLoadingFrame.hide();\r\n\t\t\t\t((JInternalFrame) module).setSelected(true);\r\n\t\t\t} catch (InstantiationException e) {\r\n\t\t\t\tErrorLogLoader.addErrorEntry(e);\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (IllegalAccessException e) {\r\n\t\t\t\tErrorLogLoader.addErrorEntry(e);\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (PropertyVetoException e) {\r\n\t\t\t\tErrorLogLoader.addErrorEntry(e);\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}", "@Before\n public void setup() {\n }", "private void initSharedPre() {\n\t}", "public static void loadTest(){\n }", "public void initializeDriver() {\n }", "@BeforeClass\n public static void beforeClass() throws Throwable {\n h = new Helper();\n ts = new TestServer();\n ts.getServerExecutableSpecification().setCodeline(h.getServerVersion());\n\n ts.initialize();\n // just use RSH\n //ts.start();\n\n server = h.getServer(ts);\n server.setUserName(ts.getUser());\n server.connect();\n\n user = server.getUser(ts.getUser());\n\n client = h.createClient(server, \"client1\");\n server.setCurrentClient(client);\n\n h.createDepot(server, \"Ace\", STREAM, null, \"ace/...\");\n h.createStream(server, \"//Ace/main\", MAINLINE, null);\n\n client.setStream(\"//Ace/main\");\n client.update();\n client.sync(makeFileSpecList(\"//...\"), null);\n\n testFile = new File(client.getRoot() + FILE_SEP + \"foo.txt\");\n h.addFile(server, user, client, testFile.getAbsolutePath(), \"GetStreamIntegrationStatusTest\", \"text\");\n testFile = new File(client.getRoot() + FILE_SEP + \"bar.txt\");\n h.addFile(server, user, client, testFile.getAbsolutePath(), \"GetStreamIntegrationStatusTest\", \"text\");\n\n h.createStream(server, \"//Ace/dev\", DEVELOPMENT, \"//Ace/main\");\n client.setStream(\"//Ace/dev\");\n client.update();\n client.sync(makeFileSpecList(\"//...\"), null);\n\n h.addBranchspec(server, user, \"branch1\", \"//Ace/main/...\", \"//Ace/dev/...\");\n\n h.createStream(server, \"//Ace/subDev\", DEVELOPMENT, \"//Ace/dev\");\n }", "@BeforeClass\n public static void setUp() throws Exception {\n game = ((StonePits) Gdx.app.getApplicationListener());\n soundMan = game.getSoundManager();\n assetMan = game.getAssetManager();\n }", "@Test\n public void functionalityTest() {\n new TestBuilder()\n .setModel(MODEL_PATH)\n .setContext(new ModelImplementationGroup3())\n .setPathGenerator(new RandomPath(new EdgeCoverage(100)))\n .setStart(\"e_GoToPage\")\n .execute();\n }", "@Before\r\n\tpublic void doThisEveryTime() {\n\t}", "@Before\n public void setup()\n throws Exception\n {\n moduleManager = new ModuleManager();\n moduleManager.init();\n moduleManager.start(BogusFeedModuleFactory.INSTANCE_URN);\n receiver = new EventReceiver();\n receiverUrn = moduleManager.createModule(ReceiverModuleFactory.PROVIDER_URN,\n \"receiver\");\n ReceiverModule.getModuleForInstanceName(\"receiver\").subscribe(receiver);\n }", "@Before\n public void setUp() throws Exception {\n fileFinder = new FileFinder();\n testFiles = new ArrayList<>(10);\n }", "@CalledBy({\n \"kz.edu.nu.monitored_test.Main#main\"\n })\n void test2() {\n\n }", "private void startComponents(){\n\n if(isAllowed(sentinel)){\n SentinelComponent sentinelComponent = new SentinelComponent(getInstance());\n sentinelComponent.getCanonicalName();\n }\n\n if(isAllowed(\"fileserver\")){\n FileServer fileServer = new FileServer(getInstance());\n fileServer.getCanonicalName();\n }\n\n if(isAllowed(\"manager\")){\n ManagerComponent Manager = new ManagerComponent(getInstance());\n Manager.getCanonicalName();\n }\n\n// if(isAllowed(\"sdk\")){\n// SDK sdk = new SDK(getInstance());\n// sdk.getCanonicalName();\n// }\n\n if(isAllowed(\"centrum\")){\n CentrumComponent centrum1 = new CentrumComponent(getInstance(), null);\n centrum1.getCanonicalName();\n }\n\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"HW\");\n\t\tSingle1.getInstance();\n\t\tSingle2.getInstance();\n\t}", "@Before\n public void setUp() {\n \n hawthorn1 = new HawthornWandBehavior();\n }", "@BeforeClass\n\tpublic static void generatingItems() {\n\t\tfor (Item i : allItems) {\n\t\t\tif (i.getType().equals(\"spores engine\")) {\n\t\t\t\titem4 = i;\n\t\t\t}\n\t\t}\n\t\tltsTest = new LongTermStorage();\n\t\tltsTest1 = new LongTermStorage();\n\t}", "static void test2() {\n\n System.out.println( \"Begin test2. ===============================\\n\" );\n\n Thread init = Thread.currentThread(); // init spawns the Mogwais\n\n System.out.println( \"TODO: write a more involved test here.\" );\n //\n // Create a GremlinsBridge of capacity 3.\n // Set an OPTIONAL, test delay to stagger the start of each mogwai.\n // Create the Mogwais and store them in an array.\n // Run them by calling their start() method.\n // Now, the test must give the mogwai time to finish their crossings.\n //\n System.out.println( \"TODO: follow the pattern of the example tests.\" );\n System.out.println( \"\\n=============================== End test2.\" );\n }", "void enableMod();", "@Ignore\n @Test\n public void discoverSeveralTypes() throws Exception {\n }", "public static void SwipeUp_Counter_Maps_submodule() throws Exception{\n\n\t\tfor(int i=1;i<=7 ;i++){\n\n\t\t\t//Swipe();\n\n\t\t\tBoolean b=verifyElement(By.id(\"com.weather.Weather:id/map_module_title\"));\n\n\t\t\tif(b==true)\n\t\t\t{\n\t\t\t\tlogStep(\"Maps page is presented on the screen\");\n\t\t\t\ttry\n\t\t\t\t{\n\n\t\t\t\t\tAd.findElementById(\"com.weather.Weather:id/map_module_thumbnail\").click();\n\t\t\t\t\tlogStep(\"clicked the Daily page link\");\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\tAd.findElementById(\"com.weather.Weather:id/map_module_more\").click();\n\t\t\t\t\tlogStep(\"clicked the Daily page link\");\n\t\t\t\t}\n\t\t\t\tAd.findElementByClassName(\"android.widget.ImageButton\").click();\n\t\t\t\tThread.sleep(5000);\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Module is not present scroll down\");\n\t\t\t}\n\n\n\n\t\t}\n\t}", "@BeforeClass\n public static void oneTimeSetUp() {\n\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "void runTestSuites() throws InterruptedException {\n // all test suites are located under this directory\n String testSuiteDirectory = config.getTestSuiteDirectoryPathString();\n if (!testSuiteDirectory.endsWith(Constants.FILE_SEPARATOR)) {\n testSuiteDirectory += Constants.FILE_SEPARATOR;\n }\n\n String programNames = options.getValueFor(Constants.PROGRAMS_OPTION);\n String[] programNamesSeparated = programNames.split(Constants.COLON);\n\n // Find test subdirectories that match program names\n List<String> matchingDirectories;\n for (String programName : programNamesSeparated) {\n Path path = Paths.get(programName);\n String fname = path.getFileName().toString();\n programName = fname;\n DirectoryNameMatcher directoryFinder = new DirectoryNameMatcher(programName);\n try {\n Files.walkFileTree(Paths.get(testSuiteDirectory), directoryFinder);\n matchingDirectories = directoryFinder.getMatchingDirectories();\n if (matchingDirectories.isEmpty()) {\n Log.warn(messages.get(\"WRN001\", programName, testSuiteDirectory));\n }\n } catch (IOException ioException) {\n throw new PossibleInternalLogicErrorException(\n messages.get(\"ERR019\", programName));\n }\n\n for (String matchingDirectory : matchingDirectories) {\n TestSuiteConcatenator concatenator =\n new TestSuiteConcatenator(config, options);\n testSuite = concatenator.concatenateTestSuites(matchingDirectory);\n\n // Create READER for the Cobol source program to be tested\n StringBuilder cobolSourceInPath = new StringBuilder();\n cobolSourceInPath.append(System.getProperty(\"user.dir\"));\n cobolSourceInPath.append(Constants.FILE_SEPARATOR);\n cobolSourceInPath.append(config.getApplicationSourceDirectoryPathString());\n if (!cobolSourceInPath.toString().endsWith(Constants.FILE_SEPARATOR)) {\n cobolSourceInPath.append(Constants.FILE_SEPARATOR);\n }\n cobolSourceInPath.append(programName);\n\n List<String> applicationFilenameSuffixes = config.getApplicationFilenameSuffixes();\n for (String suffix : applicationFilenameSuffixes) {\n Log.debug(\"Driver looking for source file <\" + cobolSourceInPath.toString() + suffix + \">\");\n if (Files.isRegularFile(Paths.get(cobolSourceInPath.toString() + suffix))) {\n cobolSourceInPath.append(suffix);\n Log.debug(\"Driver recognized this file as a regular file: <\" + cobolSourceInPath.toString() + \">\");\n break;\n }\n }\n String cobolSourceInPathString = adjustPathString(cobolSourceInPath.toString());\n\n try {\n cobolSourceIn = new FileReader(cobolSourceInPathString);\n } catch (IOException cobolSourceInException) {\n throw new PossibleInternalLogicErrorException(\n messages.get(\"ERR018\", programName));\n }\n\n // Create WRITER for the test source program (copy of program to be tested plus test code)\n StringBuilder testSourceOutPath = new StringBuilder();\n testSourceOutPath.append(new File(Constants.EMPTY_STRING).getAbsolutePath());\n testSourceOutPath.append(Constants.FILE_SEPARATOR);\n testSourceOutPath.append(\n config.getString(Constants.TEST_PROGRAM_NAME_CONFIG_KEY,\n Constants.DEFAULT_TEST_PROGRAM_NAME));\n\n Log.debug(\"Driver.runTestSuites() testSourceOutPath: <\" + testSourceOutPath.toString() + \">\");\n\n try {\n testSourceOut = new FileWriter(testSourceOutPath.toString());\n } catch (IOException testSourceOutException) {\n throw new PossibleInternalLogicErrorException(\n messages.get(\"ERR016\", programName));\n }\n\n mergeTestSuitesIntoTheTestProgram();\n try {\n testSourceOut.close();\n } catch (IOException closeTestSourceOutException) {\n throw new PossibleInternalLogicErrorException(\n messages.get(\"ERR017\", programName));\n }\n\n // Compile and run the test program\n String processConfigKeyPrefix;\n ProcessLauncher launcher = null;\n switch (PlatformLookup.get()) {\n case LINUX :\n Log.debug(\"Driver launching Linux process\");\n processConfigKeyPrefix = \"linux\";\n launcher = new LinuxProcessLauncher(config);\n break;\n case WINDOWS :\n Log.debug(\"Driver launching Windows process\");\n processConfigKeyPrefix = \"windows\";\n launcher = new WindowsProcessLauncher(config);\n break;\n case OSX :\n Log.debug(\"Driver launching OS X process\");\n processConfigKeyPrefix = \"osx\";\n //launcher = new OSXProcessLauncher(config);\n break;\n case ZOS :\n Log.debug(\"Driver launching z/OS process\");\n processConfigKeyPrefix = \"zos\";\n //launcher = new ZOSProcessLauncher(config);\n break;\n default :\n Log.debug(\"Driver launching default process\");\n processConfigKeyPrefix = \"unix\";\n launcher = new LinuxProcessLauncher(config);\n break;\n }\n String processConfigKey = processConfigKeyPrefix + Constants.PROCESS_CONFIG_KEY;\n String processName = config.getString(processConfigKey);\n if (isBlank(processName)) {\n String errorMessage = messages.get(\"ERR021\", processConfigKey);\n Log.error(errorMessage);\n throw new PossibleInternalLogicErrorException(errorMessage);\n }\n if (launcher != null){\n Process process = launcher.run(testSourceOutPath.toString());\n int exitCode = 1;\n// try {\n exitCode = process.waitFor();\n// } catch (InterruptedException interruptedException) {\n// exitCode = 1;\n// }\n Log.info(messages.get(\"INF009\", processName, String.valueOf(exitCode)));\n }\n }\n }\n }" ]
[ "0.64558876", "0.6311639", "0.598568", "0.5926026", "0.58693403", "0.5753431", "0.56736743", "0.5648227", "0.56264746", "0.5597217", "0.55439925", "0.55354714", "0.5521086", "0.5512339", "0.55006826", "0.5468929", "0.54616255", "0.5459305", "0.54391146", "0.54150933", "0.54000133", "0.5385168", "0.5381067", "0.5370504", "0.53700936", "0.5364767", "0.5360686", "0.5346425", "0.53236777", "0.5323224", "0.52797014", "0.5273096", "0.52702534", "0.5266834", "0.52650696", "0.5259876", "0.5257108", "0.5254849", "0.525312", "0.52524734", "0.52427495", "0.52426", "0.52415574", "0.5205145", "0.5191511", "0.51907915", "0.51874006", "0.5186086", "0.5181551", "0.5180914", "0.5178282", "0.5178282", "0.5172992", "0.51719767", "0.51708555", "0.5170472", "0.5165613", "0.5161197", "0.51570237", "0.5156343", "0.5152012", "0.51498556", "0.5146167", "0.5145795", "0.5145395", "0.5143334", "0.514048", "0.5138", "0.5134236", "0.51312053", "0.5129585", "0.51270515", "0.51245975", "0.5123711", "0.5114374", "0.5113826", "0.5108442", "0.5106697", "0.51039344", "0.51038104", "0.5097071", "0.50890064", "0.5084181", "0.50822383", "0.5082045", "0.50813454", "0.5080278", "0.5073645", "0.5072857", "0.5071383", "0.50680935", "0.5067671", "0.50659096", "0.506064", "0.50573486", "0.505547", "0.5049655", "0.5049655", "0.5049655", "0.50412375" ]
0.5650015
7
A function that allows the user to reset the gyro
public void resetGyro(){ //TODO:Reset the gyro(zero it) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetGyro () {\n gyro.reset();\n }", "public void resetGyroAngle() {\n\t\tgyro.reset();\n\t}", "public void calibrateGyro() {\n gyro.SetYaw(0);\n }", "void gyroSafety(){\n }", "public void zeroHeading() {\n m_gyro.reset();\n }", "public void resetGyroAngle(double angle) {\n\t\tgyro.resetGyroAngle(angle);\n\t}", "protected void initialize() {\n \tDrivetrain.gyro.reset();\n }", "public void zeroGyroscope() {\n mGyroOffset = getGyroscopeRotation(false);\n }", "public void updateGyro() {\n\t\tangleToForward = gyro.getAngle();\n\t\tif (angleToForward >= 360) {\n\t\t\tangleToForward -= 360;\n\t\t} else if (angleToForward < 0) {\n\t\t\tangleToForward += 360;\n\t\t}\n\n\t}", "@Override\n public void resetAccelY()\n {\n }", "public void zeroHeading() {\n gyro.reset();\n gyro.zeroYaw();\n }", "protected void end() {\n \tSystem.out.println(\"Gyro: \" + Drivetrain.gyro.getAngle());\n \tDrivetrain.gyro.reset();\n \tDrivetrain.frontRight.set(ControlMode.PercentOutput, 0.0);\n\t\tDrivetrain.rearRight.set(ControlMode.PercentOutput, 0.0);\n\t\tDrivetrain.frontLeft.set(ControlMode.PercentOutput, 0.0);\n\t\tDrivetrain.rearLeft.set(ControlMode.PercentOutput, 0.0);\n \t\n }", "public void reset() {\n // stop motors\n Motor.A.stop();\t\n Motor.A.setPower(0);\t\n Motor.B.stop();\n Motor.B.setPower(0);\t\n Motor.C.stop();\n Motor.C.setPower(0);\t\n // passivate sensors\n Sensor.S1.passivate();\n Sensor.S2.passivate();\n Sensor.S3.passivate();\n for(int i=0;i<fSensorState.length;i++)\n fSensorState[i] = false;\n }", "protected void initialize() {\n \tRobot.gyroSubsystem.reset();\n \tstartAngle = Robot.gyroSubsystem.gyroPosition();\n \ttargetAngle = startAngle + goal;\n }", "public interface Gyro {\n /**\n * Get the amount of time the gyro spends calibrating\n *\n * @return Length of gyro calibration period\n */\n double getCalibrationPeriod();\n\n /**\n * Set the amount of time the gyro will spend calibrating\n *\n * @param calibrationPeriod Desired length of gyro calibration period\n */\n void setCalibrationPeriod(double calibrationPeriod);\n\n /**\n * Reset calibration and angle monitoring\n */\n void fullReset();\n\n /**\n * Starts calibrating the gyro. Resets the calibration value and begins\n * sampling gyro values to get the average 0 value. Sample time determined\n * by calibrationTicks\n */\n void startCalibration();\n\n /**\n * Finishes calibration. Stops calibrating and sets the calibration value.\n */\n void finishCalibration();\n\n /**\n * Gets the zero point for rate measurement\n *\n * @return The offset found by calibration\n */\n double getCalibrationOffset();\n\n /**\n * Checks if the gyro is currently calibrating.\n * If it is, measured rate and angle values are not guaranteed to be accurate.\n *\n * @return Whether the gyro is currently calibrating\n */\n boolean isCalibrating();\n\n /**\n * Gets the rate of yaw change from the gyro\n *\n * @return The rate of yaw change in degrees per second, positive is clockwise\n */\n double getRate();\n\n /**\n * Gets the yaw of the gyro\n *\n * @return The yaw of the gyro in degrees\n */\n double getAngle();\n\n /**\n * Resets the current angle of the gyro to zero\n */\n void resetAngle();\n}", "private void resetAngle()\n {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n globalAngle = 0;\n }", "void resetAngle();", "public void resetAngle() {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n globalAngle = 0;\n\n }", "private void resetAngle() {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC,\n AxesOrder.ZYX, AngleUnit.DEGREES);\n globalAngle = 0;\n }", "public double[] getGyro();", "private void CalibrateGyro() {\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.mode = BNO055IMU.SensorMode.IMU;\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n imu.initialize(parameters);\n while (!imu.isGyroCalibrated()){}\n }", "private void resetAngle() {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n startAngles = lastAngles;\n globalAngle = 0;\n }", "@Override\n public void gyroRoll(int value, int timestamp) {\n }", "public void resetPosition() {\n\t\tposition = new double[3];\n\t\tgyroOffset = 0;\n\t}", "public void initialize() {\n\n Robot.driveSubsystem.resetGyro();\n\n }", "@Override\n public void gyroYaw(int value, int timestamp) {\n }", "public Gyro (){\n try {\n /* Communicate w/navX MXP via the MXP SPI Bus. */\n /* Alternatively: I2C.Port.kMXP, SerialPort.Port.kMXP or SerialPort.Port.kUSB */\n /* See http://navx-mxp.kauailabs.com/guidance/selecting-an-interface/ for details. */\n gyro_board = new AHRS(SPI.Port.kMXP);\n\n last_world_linear_accel_x = gyro_board.getWorldLinearAccelX();\n last_world_linear_accel_y = gyro_board.getWorldLinearAccelY();\n last_check_time = Timer.getFPGATimestamp();\n\n initial_offset = gyro_board.getYaw();\n } catch (RuntimeException ex ) {\n DriverStation.reportError(\"Error instantiating navX MXP: \" + ex.getMessage(), true);\n }\n\n\n }", "public void reset () {\n if (!this.on) {\n return;\n }\n\n this.currentSensorValue = 0;\n }", "public double getGyroInRad(){\n return 0.0;//TODO:Pull and return gyro in radians\n }", "public Drive() {\r\n \tgyro.calibrate();\r\n \tgyro.reset();\r\n }", "public void initGyro() {\r\n\t\tresult = new AccumulatorResult();\r\n\t\tif (m_analog1 == null || m_analog2 == null) {\r\n\t\t\tSystem.out.println(\"Null m_analog\");\r\n\t\t}\r\n\t\tm_voltsPerDegreePerSecond = kDefaultVoltsPerDegreePerSecond;\r\n\t\t\r\n\t\t\r\n\t\tm_analog1.setAverageBits(kAverageBits);\r\n\t\tm_analog1.setOversampleBits(kOversampleBits);\r\n\t\t\r\n\t\tm_analog2.setAverageBits(kAverageBits);\r\n\t\tm_analog2.setOversampleBits(kOversampleBits);\r\n\t\t\r\n\t\t\r\n\t\tdouble sampleRate = kSamplesPerSecond\r\n\t\t\t\t* (1 << (kAverageBits + kOversampleBits));\r\n\t\tAnalogInput.setGlobalSampleRate(sampleRate);\r\n\t\tTimer.delay(1.0);\r\n\r\n\t\tm_analog1.initAccumulator();\r\n\t\tm_analog1.resetAccumulator();\r\n\t\tm_analog2.initAccumulator();\r\n\t\tm_analog2.resetAccumulator();\r\n\r\n\t\tTimer.delay(kCalibrationSampleTime);\r\n\r\n\t\tfor(int i =0 ; i < mAnalogs.length; i++)\r\n\t\t{\r\n\t\t\tmAnalogs[i].getAccumulatorOutput(result);\r\n\t\r\n\t\t\tm_centers[i]= (int) ((double) result.value / (double) result.count + .5);\r\n\t\r\n\t\t\tm_offsets[i] = ((double) result.value / (double) result.count)\r\n\t\t\t\t\t- m_centers[i];\r\n\t\r\n\t\t\tmAnalogs[i].setAccumulatorCenter(m_centers[i]);\r\n\t\t\tmAnalogs[i].resetAccumulator();\r\n\t\r\n\t\t\t\r\n\t\t\t//LiveWindow.addSensor(\"Gyro\", m_analog.getChannel(), this);\r\n\t\t}\r\n\t\tif(mMode == TWO_CANCEL) setDeadband(kCancelDeadband);\r\n\t\telse if(mMode == TWO_DEADBAND) {\r\n\t\t\tsetDeadband1(0.0);\r\n\t\t\tmAccumulatedAngle = 0;\r\n\t\t}\r\n\t\t\r\n\t\tmOffset = 0;\r\n\t}", "public double getGyroInDeg(){\n return 0.0;//TODO:Pull gyro in radians and convert to degrees\n }", "public void setSensorOff() {\n\n }", "protected void interrupted() {\n \tRobot.driveBase.resetEnc(2);\n \tRobot.gyro.reset();\n }", "@Override\n public void gyroPitch(int value, int timestamp) {\n }", "protected void end() {\n \tRobot.driveBase.resetEnc(2);\n \tRobot.gyro.reset();\n \tRobot.driveBase.set(ControlMode.PercentOutput, 0, 0);\n }", "public void reset() {\n\t\txD = x;\n\t\tyD = y;\n\t\taction = 0;\n\t\tdir2 = dir;\n\t\tvisibleToEnemy = false;\n\t\tselected = false;\n\t\t\n\t\tif (UNIT_R == true) {\n\t\t\t// dir = 0;\n\t\t} else if (UNIT_G == true) {\n\t\t\t// dir = 180 / 2 / 3.14;\n\t\t}\n\t}", "public void gripReset() {\n LtUtil.log_d(\"GripSensorTestTouchIc\", \"gripReset\", \"gripReset\");\n this.RESET_FLUG = false;\n Kernel.write(Kernel.GRIP_TOUCH_SENSOR_RESET, EgisFingerprint.MAJOR_VERSION);\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n timestamp = event.timestamp;\n gyroX = event.values[0];\n gyroY = event.values[1];\n gyroZ = event.values[2];\n\n this.setChanged();\n this.notifyObservers(Sensor.TYPE_GYROSCOPE);\n }", "public void resetAngle() {\n\t\tnavx.zeroYaw();\n\t}", "public void resetPot() {\n m_minRawAngle = getRawAngle();\n }", "private void remapGyroVector(){\n\t\tif (referenceGyroMatrix == null){\n\t\t\ttempGyroMatrix = new float[16];\n\t\t\treferenceGyroMatrix = new float[16];\n\t\t\tMatrix.setIdentityM(tempGyroMatrix, 0);\n\t\t\tSensorManager.remapCoordinateSystem(tempGyroMatrix, remapX, remapY, referenceGyroMatrix);\n\t\t\tSystem.arraycopy(referenceGyroMatrix, 0, tempGyroMatrix, 0, 16);\n\t\t\tthis.remappedGyro = new float[4];\n\t\t\tthis.tempGyroValues = new float[4];\n\t\t\t//need to transpose, since sensor manager and matrix use different notations\n\t\t\t//Matrix.transposeM(referenceGyroMatrix, 0, tempGyroMatrix, 0);\n\t\t}\n\t\t\n\t\tfloat[] gyroValues = getValues(VALUE_KEYS.GYRO.name());\n\t\t//System.arraycopy(gyroValues, 0, this.gyroValues, 0, 3);\n\t\tSystem.arraycopy(gyroValues, 0, this.tempGyroValues, 0, 3);\n\t\tMatrix.multiplyMV(this.remappedGyro, 0, referenceGyroMatrix, 0, this.tempGyroValues, 0);\n\t\tSystem.arraycopy(this.remappedGyro, 0, this.finalGyroValues, 0, 3);\n\t\t\n\t}", "public void clearAngularVelocity();", "public void resume() {\n mSensorMgr = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);\n if (mSensorMgr == null) {\n throw new UnsupportedOperationException(\"Sensors not supported\");\n }\n mAccelerometer = mSensorMgr.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n if (!mSensorMgr.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_UI)) { // if not supported\n mSensorMgr.unregisterListener(this);\n throw new UnsupportedOperationException(\"Accelerometer not supported\");\n }\n }", "public void autonomous() {\n /*myRobot.setSafetyEnabled(false);\n myRobot.drive(-0.5, 0.0);\t// drive forwards half speed\n Timer.delay(2.0);\t\t// for 2 seconds\n myRobot.drive(0.0, 0.0);\t// stop robot\n */\n \t/*gyro.reset();\n \twhile(isAutonomous()){\n \t\tdouble angle = gyro.getAngle();\n \tmyRobot.drive(0, -angle * Kp);\t\n \tTimer.delay(.004);\n \t}\n \tmyRobot.drive(0.0, 0.0);\n \t*/\n }", "void resetForce();", "public void resetYVel() {\n this.yVel = 0;\n }", "@Override\n\tpublic void onResume() \n\t{\n\t\tsuper.onResume();\n\t\tgyroscope.onResume();\n\t}", "public final void GyroTurn (int degrees, double power)\n {\n //Define gyro angle\n float GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n\n //While the gyro is reading degrees that is not the desired, turn right or left\n while (GyroAngle != degrees)\n {\n //\n robot.DriveLeftBack.setPower(-.1);\n robot.DriveRightBack.setPower(.1);\n robot.DriveRightFront.setPower(.1);\n robot.DriveLeftFront.setPower(-.1);\n\n //Update gyro angle\n GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n }\n\n //Stop\n Stop();\n }", "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}", "@Override\r\n\tpublic String getSmartDashboardType() {\r\n\t\treturn \"Gyro\";\r\n\t}", "public static Gyro getGyro() {\n return sGyro;\n }", "public void disableAnglePid() {\n\t\tgyroPid.disable();\n\t}", "private void setFullScaleGyroRange(byte range) {\n gyroscopeCoef = getGyroscopeCoefficient(range);\n try {\n i2cDevice.writeRegByte(MPU6050_RA_GYRO_CONFIG, range);\n } catch (IOException e) {\n throw new IllegalStateException(\"Unable to set gyro range\", e);\n }\n }", "public double GyroPosition() {\n\t\tswitch (gyroToUse) {\n\t\tcase ANALOG:\n\t\t\tgyroAngle = gyro.getAngle();\n\t\t\tbreak;\n\n\t\tcase SPI:\n\t\t\tgyroAngle = spi.getAngle();\n\t\t\tbreak;\n\n\t\tcase IMU:\n\t\t\tgyroAngle = imu.getAngleZ();\n\t\t\tbreak;\n\t\t}\n\n\t\tgyroAngle = gyroAngle % 360;\n\n\t\t// SmartDashboard.putNumber(\"gyroAngle\", gyroAngle);\n\t\treturn gyroAngle;\n\n\t}", "public synchronized void external_reset()\n {\n // Set EXTRF bit in MCUSR\n try { set_ioreg(MCUSR,get_ioreg(MCUSR) | 0x02); }\n catch (RuntimeException e) { }\n\n // TO DO: Handle an external reset\n // This happens when the RESET pin of the atmel is set low for 50 ns or more\n mClockCycles = 0;\n mMBR = mMBR2 = 0;\n mPC = 0;\n mSleeping = false;\n System.out.println(\"Atmel.external_reset\");\n }", "@Override\n\tpublic void reset() {\n\t\tsuper.reset();\n\t\tmSpeed = 0.0;\n\t\tmGoalAngle = 0.0;\n\t\tmCurrentAngle = mNavigation.getHeadingInDegrees();\n\t}", "public static void resetModemTemperature() {\n\t\t\n\t}", "static void resetVelocity(){currentVelocity = INITIAL_SPEED;}", "public void right90 () {\n saveHeading = 0; //modernRoboticsI2cGyro.getHeading();\n gyroTurn(TURN_SPEED, saveHeading - 90);\n gyroHold(HOLD_SPEED, saveHeading - 90, 0.5);\n }", "public synchronized void reset(){\n\t\tif(motor.isMoving())\n\t\t\treturn;\n\t\tmotor.rotateTo(0);\n\t}", "private void stopOrientationSensor() {\n orientationValues = null;\n SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n sensorManager.unregisterListener(this);\n }", "public void function_yaw(int x, int y,int gyro){\n\n\n }", "@Override public void init_loop() {\n if (gyro.isCalibrated()) {\n telemetry.addData(\"Gyro\", \"Calibrated\");\n }\n\n /** Place any code that should repeatedly run after INIT is pressed but before the op mode starts here. **/\n }", "@Override\n public void initialize() {\n m_drive.resetGyro();// first call\n m_drive.resetEncoders();\n m_drive.lockMotors();\n }", "public void gyroTurn(int degrees, double power) throws InterruptedException{\n //restart angle tracking\n resetAngle();\n\n if(degrees < 0){\n turnClockwise(power);\n }else if(degrees > 0){\n turnCounterClockwise(power);\n }else{\n return;\n }\n\n //Rotate until current angle is equal to the target angle\n if (degrees < 0){\n while (opMode.opModeIsActive() && getAngle() > degrees){\n composeAngleTelemetry();\n //display the target angle\n telemetry.addData(\"Target angle\", degrees);\n telemetry.update();\n }\n }else{\n while (opMode.opModeIsActive() && getAngle() < degrees) {\n composeAngleTelemetry();\n //display the target angle\n telemetry.addData(\"Target angle\", degrees);\n telemetry.update();\n }\n }\n\n completeStop();\n //Wait .5 seconds to ensure robot is stopped before continuing\n Thread.sleep(500);\n resetAngle();\n }", "public void Reset(){\n py = 0f;\n }", "private void stopOrientationSensor() {\n SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n sensorManager.unregisterListener(this);\n }", "protected void initialize() {\n \tRobot.driveBase.resetEnc(2);\n \tRobot.gyro.reset();\n \t//stop extraneous moving parts\n }", "public void onAccuracyReset() {\n onAccuracyChanged(ACCURACY_TYPE_NOT_SET);\n }", "public void resetOdometry(Pose2d pose) {\n m_odometry.resetPosition(\n Rotation2d.fromDegrees(m_gyro.getAngle()),\n new SwerveModulePosition[] {\n m_frontLeft.getPosition(),\n m_frontRight.getPosition(),\n m_rearLeft.getPosition(),\n m_rearRight.getPosition()\n },\n pose);\n }", "public void testGyroAngleCalibratedParameters() {\n // Get calibrated parameters to make new Gyro with parameters\n final double calibratedOffset = m_tpcam.getGyro().getOffset();\n final int calibratedCenter = m_tpcam.getGyro().getCenter();\n m_tpcam.freeGyro();\n m_tpcam.setupGyroParam(calibratedCenter, calibratedOffset);\n Timer.delay(TiltPanCameraFixture.RESET_TIME);\n // Repeat tests\n testInitial(m_tpcam.getGyroParam());\n testDeviationOverTime(m_tpcam.getGyroParam());\n testGyroAngle(m_tpcam.getGyroParam());\n }", "public void onSensorChanged(SensorEvent event)\n {\n if (event.sensor.getType()==Sensor.TYPE_ACCELEROMETER) {\n gravity[0] = event.values[0];\n gravity[1] = event.values[1];\n gravity[2] = event.values[2];\n\n }\n if (event.sensor.getType()==Sensor.TYPE_MAGNETIC_FIELD) {\n geomagnetic[0] = event.values[0];\n geomagnetic[1] = event.values[1];\n geomagnetic[2] = event.values[2];\n\n }\n\n if(SensorManager.getRotationMatrix(_R, null, gravity, geomagnetic)){\n _R = this.opglr.swapRotMatrix(_R);\n }\n\n }", "public void restoreValues() {\n drive_control.stopDriving();\n if (ACTUAL_DIFICULTY == EASY)\n drive_control.setSpeedScale(EASY_BASE_SPEED);\n if (ACTUAL_DIFICULTY == MEDIUM)\n drive_control.setSpeedScale(MEDIUM);\n if (ACTUAL_DIFICULTY == HARD)\n drive_control.setSpeedScale(HARD);\n drive_control.startDriving(getContext(), DriveControl.JOY_STICK);\n isUserControlAct = true;\n }", "public void gyroHold(double speed, double angle, double holdTime) {\n\n ElapsedTime holdTimer = new ElapsedTime();\n\n // keep looping while we have time remaining.\n holdTimer.reset();\n while (opModeIsActive() && (holdTimer.time() < holdTime)) {\n // Update telemetry & Allow time for other processes to run.\n onHeading(speed, angle, P_TURN_COEFF);\n //telemetry.update();\n }\n\n // Stop all motion;\n robot.DriveLeft1.setPower(0);\n robot.DriveRight1.setPower(0);\n robot.DriveLeft2.setPower(0);\n robot.DriveRight2.setPower(0);\n }", "@Override\n\t\tpublic void onGyroscopeData(Myo myo, long timestamp, Vector3 gyro) {\n\t\t\tsuper.onGyroscopeData(myo, timestamp, gyro);\n\t\t}", "public double getGyroAngleX() {\n return m_gyro.getAngleX();\n }", "@Override\n public void runOpMode() {\n androidGyroscope = new AndroidGyroscope();\n\n // Put initialization blocks here.\n if (androidGyroscope.isAvailable()) {\n telemetry.addData(\"Status\", \"GyroAvailable\");\n }\n waitForStart();\n if (opModeIsActive()) {\n // Put run blocks here.\n androidGyroscope.startListening();\n androidGyroscope.setAngleUnit(AngleUnit.DEGREES);\n while (opModeIsActive()) {\n telemetry.addData(\"X Axis\", androidGyroscope.getX());\n telemetry.update();\n }\n }\n }", "public void stopRobot(){\n LAM.setPower(0);\n RAM.setPower(0);\n ILM.setPower(0);\n IRM.setPower(0);\n BLM.setPower(0);\n BRM.setPower(0);\n FLM.setPower(0);\n FRM.setPower(0);\n }", "public void reset() {\n\n\t\tazDiff = 0.0;\n\t\taltDiff = 0.0;\n\t\trotDiff = 0.0;\n\n\t\tazMax = 0.0;\n\t\taltMax = 0.0;\n\t\trotMax = 0.0;\n\n\t\tazInt = 0.0;\n\t\taltInt = 0.0;\n\t\trotInt = 0.0;\n\n\t\tazSqInt = 0.0;\n\t\taltSqInt = 0.0;\n\t\trotSqInt = 0.0;\n\n\t\tazSum = 0.0;\n\t\taltSum = 0.0;\n\t\trotSum = 0.0;\n\n\t\tcount = 0;\n\n\t\tstartTime = System.currentTimeMillis();\n\t\ttimeStamp = startTime;\n\n\t\trotTrkIsLost = false;\n\t\tsetEnableAlerts(true);\n\n\t}", "public void ResetDailyData(long _new_ref_time) {\n reference_time = _new_ref_time;\n\n last_acc_timestamp = 0;\n last_gyro_timestamp = 0;\n\n last_acc_x = 0;\n last_gyro_x = 0;\n\n velocity_x = 0;\n angle_z = 0;\n\n DailyDistanceCoveredFw = 0;\n DailyDistanceCoveredBw = 0;\n DailyAngleCoveredR = 0;\n DailyAngleCoveredL = 0;\n\n acc_data_counter = 0;\n gyro_data_counter = 0;\n\n acc_data_counter_calibration = 0;\n gyro_data_counter_calibration = 0;\n\n //TODO: verificare se serve resettare anche questi\n HourlyAngleCovered = 0;\n HourlyDistanceCovered = 0;\n\n\n //TODO: verificare se sia eventualmente necessario azzerare il tutto\n if (false) {\n for (int i = 0; i < NUM_OF_SAMPLES; i++) {\n AccXDataArray[i] = 0;\n AccYDataArray[i] = 0;\n AccZDataArray[i] = 0;\n\n GyroXDataArray[i] = 0;\n GyroYDataArray[i] = 0;\n GyroZDataArray[i] = 0;\n\n AccTimestampArray[i] = 0;\n GyroTimestampArray[i] = 0;\n }\n }\n }", "@Override\n public void teleopPeriodic() {\n double x = xcontroller2.getX(Hand.kLeft);\n //double y = xcontroller1.getTriggerAxis(Hand.kRight) - xcontroller1.getTriggerAxis(Hand.kLeft);\n // For testing just use left joystick. Use trigger axis code for GTA Drive/\n double y = -xcontroller2.getY(Hand.kLeft);\n double z = xcontroller2.getX(Hand.kRight);\n double yaw = imu.getAngleZ();\n RobotDT.driveCartesian(x, y, 0, 0);\n \n\n // After you spin joystick R3 press A button to reset gyro angle\n if (xcontroller1.getAButtonPressed()) {\n imu.reset();\n }\n \n if (xcontroller2.getBButtonPressed()){\n mGPM.goSpongeHatch();\n }\n\n if (xcontroller2.getXButtonPressed()){\n mGPM.goPineHome();\n \n }\n\n\n /** \n * If Bumpers are pressed then Cargo Intake Motor = -1 for Intake \n *if Triggers are pressed set value to 1 for Outtake\n *If triggers are released set value to 0*/\n if(xcontroller2.getBumperPressed(Hand.kLeft) && xcontroller2.getBumperPressed(Hand.kRight)) {\n mGPM.setCargoMotor(-1);\n } else if((xcontroller2.getTriggerAxis(Hand.kLeft) >0.75) && (xcontroller2.getTriggerAxis(Hand.kRight) >0.75)) {\n mGPM.setCargoMotor(1);\n } else{\n mGPM.setCargoMotor(0);\n }\n }", "@Override\n\tpublic void onPause() \n\t{\n\t\tsuper.onPause();\n\t\tgyroscope.onPause();\n\t}", "public void resetPose() {\n }", "@Override\r\n\tpublic void resetState() {\r\n\t\t// what to do for a tape device??\r\n\t}", "protected void end() {\n\t\tRobot.resetSensors();\n\t}", "public int getGyroAngle() {\r\n \treturn (int)Math.round(gyro.getAngle());\r\n }", "public final void GyroStrafeDistance (int Distance, double power)\n {\n //Define variable for the right range senson that measures centimeters\n double RightRangeDistance = RightRange.getDistance(DistanceUnit.CM);\n\n //While the robot's distance is less than the wanted distance do the following\n while (Distance >= RightRangeDistance && opModeIsActive())\n {\n //Define variable for gyro angle\n float GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n\n //Update the variable for the range sensor\n RightRangeDistance = RightRange.getDistance(DistanceUnit.CM);\n\n //If the gyro's read angle is more than 3 degrees turn right until it is not\n if (GyroAngle > 3 )\n {\n while(GyroAngle > 3 && opModeIsActive())\n {\n //Turn Right\n robot.DriveLeftBack.setPower(-.1);\n robot.DriveRightBack.setPower(.1);\n robot.DriveRightFront.setPower(.1);\n robot.DriveLeftFront.setPower(-.1);\n\n //Update the gyro's angle\n GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n }\n }\n\n //If the gyro's read angle is less than -3 degrees turn left until it is not\n else if (GyroAngle < -3)\n {\n while (GyroAngle < -3 && opModeIsActive())\n {\n //Turn Left\n robot.DriveLeftBack.setPower(.1);\n robot.DriveRightBack.setPower(-.1);\n robot.DriveRightFront.setPower(-.1);\n robot.DriveLeftFront.setPower(.1);\n\n //Update the gyro's angle\n GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n }\n }\n\n //Strafe (right or left)\n robot.DriveLeftBack.setPower(-power);\n robot.DriveRightBack.setPower(power);\n robot.DriveRightFront.setPower(-power);\n robot.DriveLeftFront.setPower(power);\n\n //Send feedback to phone\n telemetry.addData(\"Angle\",\n GyroAngle);\n telemetry.addData(\"Distance\", RightRangeDistance);\n telemetry.update();\n\n //End of loop, robot will repeat the above until it reaches the wanted distance\n }\n robot.DriveLeftBack.setPower(0);\n robot.DriveRightBack.setPower(0);\n robot.DriveRightFront.setPower(0);\n robot.DriveLeftFront.setPower(0);\n }", "public static void zero_acceleration( Body body ) {\r\n body.currentState.ax = 0;\r\n body.currentState.ay = 0;\r\n body.currentState.az = 0;\r\n }", "public static void reset(){\r\n\t\tx=0;\r\n\t\ty=0;\r\n\t}", "public void resetValor();", "public void clearGyroCrits() {\n for (int i = 0; i < locations(); i++) {\n removeCriticals(i, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_GYRO));\n }\n }", "public void gyroHold( double speed, double angle, double holdTime) {\n\n ElapsedTime holdTimer = new ElapsedTime();\n\n // keep looping while we have time remaining.\n holdTimer.reset();\n while (opModeIsActive() && (holdTimer.time() < holdTime)) {\n // Update telemetry & Allow time for other processes to run.\n onHeading(speed, angle, P_TURN_COEFF);\n telemetry.update();\n }\n\n // Stop all motion;\n robot.leftDrive.setPower(0);\n robot.rightDrive.setPower(0);\n }", "public void reset()\n {\n m_fCorrectEvent = false;\n }", "public void setVibrationOff() {\n\n }", "protected float getGyroscopeAngle() {\n if (doGyro) {\n Orientation exangles = bosch.getAngularOrientation(AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES);\n float gyroAngle = exangles.thirdAngle;\n //exangles.\n //telemetry.addData(\"angle\", \"angle: \" + exangles.thirdAngle);\n float calculated = normalizeAngle(reverseAngle(gyroAngle));\n //telemetry.addData(\"angle2\",\"calculated:\" + calculated);\n return calculated;\n } else {\n return 0.0f;\n }\n }", "public void onResume() {\n sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_NORMAL);\n }", "private void reset () {\n this.logic = null;\n this.lastPulse = 0;\n this.pulseDelta = 0;\n }", "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 }", "void reset ();" ]
[ "0.85116154", "0.8070037", "0.7552296", "0.69978255", "0.6947297", "0.6910332", "0.6908842", "0.6907031", "0.66107637", "0.65853345", "0.64858955", "0.6480985", "0.6416725", "0.64084494", "0.63656247", "0.63509005", "0.6340683", "0.6325899", "0.6319071", "0.6318955", "0.6312328", "0.6309218", "0.62943846", "0.62927943", "0.62570727", "0.625141", "0.624143", "0.6214859", "0.6207023", "0.6169441", "0.6159337", "0.6121609", "0.6117559", "0.607851", "0.6077078", "0.60491574", "0.604902", "0.6040441", "0.59650666", "0.59403384", "0.59361297", "0.5918931", "0.5912068", "0.5910538", "0.5869607", "0.5868224", "0.5825582", "0.5809557", "0.5794247", "0.57876414", "0.5780029", "0.577957", "0.57725036", "0.5756913", "0.57460034", "0.5742371", "0.5738031", "0.57298374", "0.5725091", "0.57230365", "0.57184255", "0.57175124", "0.57099575", "0.56975573", "0.5693453", "0.5687131", "0.56859255", "0.56699014", "0.5645193", "0.56225157", "0.5615092", "0.5607575", "0.5593664", "0.55881035", "0.5571272", "0.5569788", "0.5567723", "0.55651325", "0.5561961", "0.55558", "0.5555279", "0.5554671", "0.55188596", "0.55076253", "0.54914117", "0.54868037", "0.5481999", "0.54782426", "0.5474141", "0.5462052", "0.54618794", "0.54392165", "0.54294306", "0.5428481", "0.54234076", "0.54232913", "0.5396799", "0.53849584", "0.5369574", "0.535964" ]
0.85934514
0
this polls the onboard gyro, which, when the robot boots, assumes and angle of zero
public double getGyroInRad(){ return 0.0;//TODO:Pull and return gyro in radians }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void initialize() {\n \tRobot.gyroSubsystem.reset();\n \tstartAngle = Robot.gyroSubsystem.gyroPosition();\n \ttargetAngle = startAngle + goal;\n }", "public void initGyro() {\r\n\t\tresult = new AccumulatorResult();\r\n\t\tif (m_analog1 == null || m_analog2 == null) {\r\n\t\t\tSystem.out.println(\"Null m_analog\");\r\n\t\t}\r\n\t\tm_voltsPerDegreePerSecond = kDefaultVoltsPerDegreePerSecond;\r\n\t\t\r\n\t\t\r\n\t\tm_analog1.setAverageBits(kAverageBits);\r\n\t\tm_analog1.setOversampleBits(kOversampleBits);\r\n\t\t\r\n\t\tm_analog2.setAverageBits(kAverageBits);\r\n\t\tm_analog2.setOversampleBits(kOversampleBits);\r\n\t\t\r\n\t\t\r\n\t\tdouble sampleRate = kSamplesPerSecond\r\n\t\t\t\t* (1 << (kAverageBits + kOversampleBits));\r\n\t\tAnalogInput.setGlobalSampleRate(sampleRate);\r\n\t\tTimer.delay(1.0);\r\n\r\n\t\tm_analog1.initAccumulator();\r\n\t\tm_analog1.resetAccumulator();\r\n\t\tm_analog2.initAccumulator();\r\n\t\tm_analog2.resetAccumulator();\r\n\r\n\t\tTimer.delay(kCalibrationSampleTime);\r\n\r\n\t\tfor(int i =0 ; i < mAnalogs.length; i++)\r\n\t\t{\r\n\t\t\tmAnalogs[i].getAccumulatorOutput(result);\r\n\t\r\n\t\t\tm_centers[i]= (int) ((double) result.value / (double) result.count + .5);\r\n\t\r\n\t\t\tm_offsets[i] = ((double) result.value / (double) result.count)\r\n\t\t\t\t\t- m_centers[i];\r\n\t\r\n\t\t\tmAnalogs[i].setAccumulatorCenter(m_centers[i]);\r\n\t\t\tmAnalogs[i].resetAccumulator();\r\n\t\r\n\t\t\t\r\n\t\t\t//LiveWindow.addSensor(\"Gyro\", m_analog.getChannel(), this);\r\n\t\t}\r\n\t\tif(mMode == TWO_CANCEL) setDeadband(kCancelDeadband);\r\n\t\telse if(mMode == TWO_DEADBAND) {\r\n\t\t\tsetDeadband1(0.0);\r\n\t\t\tmAccumulatedAngle = 0;\r\n\t\t}\r\n\t\t\r\n\t\tmOffset = 0;\r\n\t}", "public Gyro (){\n try {\n /* Communicate w/navX MXP via the MXP SPI Bus. */\n /* Alternatively: I2C.Port.kMXP, SerialPort.Port.kMXP or SerialPort.Port.kUSB */\n /* See http://navx-mxp.kauailabs.com/guidance/selecting-an-interface/ for details. */\n gyro_board = new AHRS(SPI.Port.kMXP);\n\n last_world_linear_accel_x = gyro_board.getWorldLinearAccelX();\n last_world_linear_accel_y = gyro_board.getWorldLinearAccelY();\n last_check_time = Timer.getFPGATimestamp();\n\n initial_offset = gyro_board.getYaw();\n } catch (RuntimeException ex ) {\n DriverStation.reportError(\"Error instantiating navX MXP: \" + ex.getMessage(), true);\n }\n\n\n }", "private void CalibrateGyro() {\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.mode = BNO055IMU.SensorMode.IMU;\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n imu.initialize(parameters);\n while (!imu.isGyroCalibrated()){}\n }", "public void calibrateGyro() {\n gyro.SetYaw(0);\n }", "protected void initialize() {\n if ( Math.abs( m_autorotateangle - Robot.drive.gyroGetAngle()) <= 45) {\n rampthreshold = 35;\n } else { // > 45 degrees}\n rampthreshold = Math.abs( m_autorotateangle - Robot.drive.gyroGetAngle()) / 2.5;\n }\n\n \tsetTimeout(m_timeout);\n\n }", "public void autonomous() {\n /*myRobot.setSafetyEnabled(false);\n myRobot.drive(-0.5, 0.0);\t// drive forwards half speed\n Timer.delay(2.0);\t\t// for 2 seconds\n myRobot.drive(0.0, 0.0);\t// stop robot\n */\n \t/*gyro.reset();\n \twhile(isAutonomous()){\n \t\tdouble angle = gyro.getAngle();\n \tmyRobot.drive(0, -angle * Kp);\t\n \tTimer.delay(.004);\n \t}\n \tmyRobot.drive(0.0, 0.0);\n \t*/\n }", "protected void initialize() {\n \tDrivetrain.gyro.reset();\n }", "public void resetGyroAngle() {\n\t\tgyro.reset();\n\t}", "public void resetGyro(){\n //TODO:Reset the gyro(zero it)\n }", "public void initialize() {\n\n Robot.driveSubsystem.resetGyro();\n\n }", "public void updateGyro() {\n\t\tangleToForward = gyro.getAngle();\n\t\tif (angleToForward >= 360) {\n\t\t\tangleToForward -= 360;\n\t\t} else if (angleToForward < 0) {\n\t\t\tangleToForward += 360;\n\t\t}\n\n\t}", "@Override\n public void teleopPeriodic() {\n double pi4 = (double)Math.PI/4;\n/*\n double deadzoneX = 0.1;\n double multiplierX = 1/deadzoneX;\n double deadzoneY = 0.1;\n double multiplierY = 1/deadzoneY;\n\n double maxSpeed = stick.getThrottle() * 1f;\nstick.getX()/Math.abs(stick.getX())\n double stickX;\n if (Math.abs(stick.getX())< deadzoneX){\n stickX = 0;\n }\n\n else {\n stickX = ((stick.getMagnitude() * Math.sin(stick.getDirectionRadians())) - deadzoneX)*multiplierX;\n }\n\n \n double stickY;\n if (Math.abs(stick.getY())< deadzoneY){\n stickY = 0;\n }\n\n else {\n stickY = (stick.getMagnitude() * Math.cos(stick.getDirectionRadians()) - deadzoneY)*multiplierY;\n }\n \n\n double stickTwist = stick.getTwist();\n\n double leftFrontForwardsPower = -stickY;\n double rightFrontForwardsPower = stickY;\n double leftBackForwardsPower = -stickY;\n double rightBackForwardsPower = stickY;\n\n double leftFrontSidePower = -stickX;\n double rightFrontSidePower = -stickX;\n double leftBackSidePower = +stickX;\n double rightBackSidePower = stickX;\n\n double leftFrontRotatePower = -stickTwist;\n double rightFrontRotatePower = -stickTwist;\n double leftBackRotatePower = -stickTwist;\n double rightBackRotatePower = -stickTwist;\n\n */\n\n /* get gyro from robot\n set gyro tto original gyro\n void()\n\n get X for joystick\n get Y for Joystick\n\n get gyro for robot\n\n if X = 0\n then Joystick angle pi/2\n else\n then Joystick angle = arctan(Y/X)\n\n newGyro = original gyro - gyro\n\n xfinal = cos(newGyro+joystickangle) * absolute(sqrt(x^2+y^2))\n yfinal = sin(newGyro+joystickangle) * absolute(sqrt(x^2+y^2))\n*/\n\n//Xbox COntroller\n \n double maxSpeed = stick.getThrottle() * 0.2f;\n double maxRot = 1f;\n\n double controllerX = -controller.getX(Hand.kRight);\n double controllerY = controller.getY(Hand.kRight);\n double joyAngle;\n boolean gyroRestart = controller.getAButtonPressed();\n\n if (gyroRestart){\n gyro.reset();\n origGyro = Math.toRadians(gyro.getAngle());\n }\n\n double mainGyro = Math.toRadians(gyro.getAngle());\n/*\n if (controllerX == 0 && controllerY > 0){\n joyAngle = (3*Math.PI)/2;\n }\n\n \n if (controllerX == 0 && controllerY < 0){\n joyAngle = Math.PI/2;\n }\n\n else{\n joyAngle = Math.atan(controllerY/controllerX);\n }\n\n if (controllerX > 0 && controllerY < 0){\n joyAngle = Math.abs(joyAngle + Math.toRadians(180));\n }\n if (controllerX > 0 && controllerY > 0){\n joyAngle -= Math.toRadians(180);\n }\n / * if (controllerX < 0 && controllerY > 0){\n joyAngle -= Math.toRadians(270);\n }* /\n*/\n joyAngle = Math.atan2(controllerY, controllerX);\n\n double newGyro = origGyro - mainGyro;\n //double newGyro = 0;\n\n double controllerTurn = -controller.getX(Hand.kLeft)*maxRot;\n\n double magnitude = Math.abs(Math.sqrt(Math.pow(controllerX,2) + Math.pow(controllerY, 2)));\n\n double xFinal = Math.cos(newGyro + joyAngle) * magnitude;\n double yFinal = Math.sin(newGyro + joyAngle) * magnitude;\n\n\n /* \n double leftFrontForwardsPower = -controllerY;\n double rightFrontForwardsPower = controllerY;\n double leftBackForwardsPower = -controllerY;\n double rightBackForwardsPower = controllerY;\n\n double leftFrontSidePower = -controllerX;\n double rightFrontSidePower = -controllerX;\n double leftBackSidePower = controllerX;\n double rightBackSidePower = controllerX;\n*/\n \n double leftFrontForwardsPower = -yFinal;\n double rightFrontForwardsPower = yFinal;\n double leftBackForwardsPower = -yFinal;\n double rightBackForwardsPower = yFinal;\n\n double leftFrontSidePower = -xFinal;\n double rightFrontSidePower = -xFinal;\n double leftBackSidePower = xFinal;\n double rightBackSidePower = xFinal;\n \n double leftFrontRotatePower = -controllerTurn;\n double rightFrontRotatePower = -controllerTurn;\n double leftBackRotatePower = -controllerTurn;\n double rightBackRotatePower = -controllerTurn;\n\n double forwardsWeight = 1;\n double sideWeight = 1;\n double rotateWeight = 1;\n\n double leftFrontPower = leftFrontForwardsPower * forwardsWeight + leftFrontSidePower * sideWeight + leftFrontRotatePower * rotateWeight;\n double rightFrontPower = rightFrontForwardsPower * forwardsWeight + rightFrontSidePower * sideWeight + rightFrontRotatePower * rotateWeight;\n double leftBackPower = leftBackForwardsPower * forwardsWeight + leftBackSidePower * sideWeight + leftBackRotatePower * rotateWeight;\n double rightBackPower = rightBackForwardsPower * forwardsWeight + rightBackSidePower * sideWeight + rightBackRotatePower * rotateWeight;\n\n leftFrontPower *= maxSpeed;\n rightFrontPower *= maxSpeed;\n leftBackPower *= maxSpeed;\n rightBackPower *= maxSpeed;\n\n\n double largest = Math.max( \n Math.max( Math.abs( leftFrontPower),\n Math.abs(rightFrontPower)),\n Math.max( Math.abs( leftBackPower), \n Math.abs( rightBackPower)));\n\n if (largest > 1) {\n leftFrontPower /= largest;\n rightFrontPower /= largest;\n leftBackPower /= largest;\n rightBackPower /= largest;\n }\n \n \n leftFrontMotor.set(leftFrontPower);\n rightFrontMotor.set(rightFrontPower); \n leftBackMotor.set(leftBackPower);\n rightBackMotor.set(rightBackPower);\n\n SmartDashboard.putNumber(\"Main Gyro\", mainGyro);\n SmartDashboard.putNumber(\"Original Gyro\", origGyro);\n SmartDashboard.putNumber(\"New Gyro\", newGyro);\n SmartDashboard.putNumber(\"Controller X\", controllerX);\n SmartDashboard.putNumber(\"Controller Y\", controllerY);\n SmartDashboard.putNumber(\"Magnitude \", magnitude);\n SmartDashboard.putNumber(\"Largest\", largest);\n SmartDashboard.putNumber(\"Joystick Angle\", Math.toDegrees(joyAngle));\n SmartDashboard.putNumber(\"X final\", xFinal);\n SmartDashboard.putNumber(\"Y final\", yFinal);\n SmartDashboard.putNumber(\"Left Front Power\", leftFrontPower);\n SmartDashboard.putNumber(\"Right Front Power\", rightFrontPower);\n SmartDashboard.putNumber(\"Left Back Power\", leftBackPower);\n SmartDashboard.putNumber(\"Right Back Power\", rightBackPower);\n }", "public void testGyroAngleCalibratedParameters() {\n // Get calibrated parameters to make new Gyro with parameters\n final double calibratedOffset = m_tpcam.getGyro().getOffset();\n final int calibratedCenter = m_tpcam.getGyro().getCenter();\n m_tpcam.freeGyro();\n m_tpcam.setupGyroParam(calibratedCenter, calibratedOffset);\n Timer.delay(TiltPanCameraFixture.RESET_TIME);\n // Repeat tests\n testInitial(m_tpcam.getGyroParam());\n testDeviationOverTime(m_tpcam.getGyroParam());\n testGyroAngle(m_tpcam.getGyroParam());\n }", "@Override\n public void robotInit() {\n\n // Motor controllers\n leftMotor = new CANSparkMax(1, MotorType.kBrushless);\n leftMotor.setInverted(false);\n leftMotor.setIdleMode(IdleMode.kBrake);\n\n CANSparkMax leftSlave1 = new CANSparkMax(2, MotorType.kBrushless);\n leftSlave1.setInverted(false);\n leftSlave1.setIdleMode(IdleMode.kBrake);\n leftSlave1.follow(leftMotor);\n\n CANSparkMax leftSlave2 = new CANSparkMax(3, MotorType.kBrushless);\n leftSlave2.setInverted(false);\n leftSlave2.setIdleMode(IdleMode.kBrake);\n leftSlave2.follow(leftMotor);\n\n rightMotor = new CANSparkMax(4, MotorType.kBrushless);\n rightMotor.setInverted(false);\n rightMotor.setIdleMode(IdleMode.kBrake);\n\n CANSparkMax rightSlave1 = new CANSparkMax(5, MotorType.kBrushless);\n rightSlave1.setInverted(false);\n rightSlave1.setIdleMode(IdleMode.kBrake);\n rightSlave1.follow(leftMotor);\n\n CANSparkMax rightSlave2 = new CANSparkMax(6, MotorType.kBrushless);\n rightSlave2.setInverted(false);\n rightSlave2.setIdleMode(IdleMode.kBrake);\n rightSlave2.follow(leftMotor);\n\n // Encoders\n leftEncoder = leftMotor.getEncoder();\n rightEncoder = rightMotor.getEncoder();\n\n // Gyro\n gyro = new ADXRS450_Gyro();\n\n }", "public interface Gyro {\n /**\n * Get the amount of time the gyro spends calibrating\n *\n * @return Length of gyro calibration period\n */\n double getCalibrationPeriod();\n\n /**\n * Set the amount of time the gyro will spend calibrating\n *\n * @param calibrationPeriod Desired length of gyro calibration period\n */\n void setCalibrationPeriod(double calibrationPeriod);\n\n /**\n * Reset calibration and angle monitoring\n */\n void fullReset();\n\n /**\n * Starts calibrating the gyro. Resets the calibration value and begins\n * sampling gyro values to get the average 0 value. Sample time determined\n * by calibrationTicks\n */\n void startCalibration();\n\n /**\n * Finishes calibration. Stops calibrating and sets the calibration value.\n */\n void finishCalibration();\n\n /**\n * Gets the zero point for rate measurement\n *\n * @return The offset found by calibration\n */\n double getCalibrationOffset();\n\n /**\n * Checks if the gyro is currently calibrating.\n * If it is, measured rate and angle values are not guaranteed to be accurate.\n *\n * @return Whether the gyro is currently calibrating\n */\n boolean isCalibrating();\n\n /**\n * Gets the rate of yaw change from the gyro\n *\n * @return The rate of yaw change in degrees per second, positive is clockwise\n */\n double getRate();\n\n /**\n * Gets the yaw of the gyro\n *\n * @return The yaw of the gyro in degrees\n */\n double getAngle();\n\n /**\n * Resets the current angle of the gyro to zero\n */\n void resetAngle();\n}", "@Override public void init_loop() {\n if (gyro.isCalibrated()) {\n telemetry.addData(\"Gyro\", \"Calibrated\");\n }\n\n /** Place any code that should repeatedly run after INIT is pressed but before the op mode starts here. **/\n }", "@Override\n public void run() {\n hdt.gyroTurn180Fast(1500);\n hdt.gyroTurn180(1100);\n //sleep(1300);\n }", "@Override\n public void teleopPeriodic() {\n double x = xcontroller2.getX(Hand.kLeft);\n //double y = xcontroller1.getTriggerAxis(Hand.kRight) - xcontroller1.getTriggerAxis(Hand.kLeft);\n // For testing just use left joystick. Use trigger axis code for GTA Drive/\n double y = -xcontroller2.getY(Hand.kLeft);\n double z = xcontroller2.getX(Hand.kRight);\n double yaw = imu.getAngleZ();\n RobotDT.driveCartesian(x, y, 0, 0);\n \n\n // After you spin joystick R3 press A button to reset gyro angle\n if (xcontroller1.getAButtonPressed()) {\n imu.reset();\n }\n \n if (xcontroller2.getBButtonPressed()){\n mGPM.goSpongeHatch();\n }\n\n if (xcontroller2.getXButtonPressed()){\n mGPM.goPineHome();\n \n }\n\n\n /** \n * If Bumpers are pressed then Cargo Intake Motor = -1 for Intake \n *if Triggers are pressed set value to 1 for Outtake\n *If triggers are released set value to 0*/\n if(xcontroller2.getBumperPressed(Hand.kLeft) && xcontroller2.getBumperPressed(Hand.kRight)) {\n mGPM.setCargoMotor(-1);\n } else if((xcontroller2.getTriggerAxis(Hand.kLeft) >0.75) && (xcontroller2.getTriggerAxis(Hand.kRight) >0.75)) {\n mGPM.setCargoMotor(1);\n } else{\n mGPM.setCargoMotor(0);\n }\n }", "@Override\n\tpublic void testPeriodic(){\n\t\t//Testing xbox buttons, joysticks and triggers\n\t\tOI.refreshAll();\n//\t\t//System.out.println(\"Left Y = \" + xbox.LeftStick.Y);\n//\t\t//System.out.println(\"Right Y = \" + xbox.RightStick.Y);\n//\t\t\n//\t\t\n//\t\tfinal double cpr = 360.0;\n//\t\tfinal double encoder_angular_distance_per_pulse = 2.0*Math.PI / cpr;\n//\t\tfinal double wheel_radius = 2.5; // .564 in (18T 5mm pitch)\n//\t\tfinal double encLinearDistancePerPulse = wheel_radius * encoder_angular_distance_per_pulse; //2.0 * Math.PI / cpr;\n//\t\t\n//\t\tSystem.out.println(enc.getRaw()*encLinearDistancePerPulse);\n//\t\t\n\t\t\n\t\t//System.out.println(gyro.getAngle(MPU6050.Axis.X));\n\n\t //PNEUMATICS\n\t //c.setClosedLoopControl(true);\n\t //c.setClosedLoopControl(false);\n\t}", "public void resetGyro () {\n gyro.reset();\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = true;\n\t\tisTeleoperated = false;\n\t\tisEnabled = true;\n\t\tvisionNetworkTable.getGearData();\n\t\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\t\n\t\tupdateLedState();\n\t\t//visionNetworkTable.getHighData();\n\t}", "void gyroSafety(){\n }", "@Override\n public void runOpMode() {\n androidGyroscope = new AndroidGyroscope();\n\n // Put initialization blocks here.\n if (androidGyroscope.isAvailable()) {\n telemetry.addData(\"Status\", \"GyroAvailable\");\n }\n waitForStart();\n if (opModeIsActive()) {\n // Put run blocks here.\n androidGyroscope.startListening();\n androidGyroscope.setAngleUnit(AngleUnit.DEGREES);\n while (opModeIsActive()) {\n telemetry.addData(\"X Axis\", androidGyroscope.getX());\n telemetry.update();\n }\n }\n }", "public double getGyroInDeg(){\n return 0.0;//TODO:Pull gyro in radians and convert to degrees\n }", "@Override\n public void init_loop() {\n\n\n if (robot.gyro.isCalibrating()) {\n telemetry.addData(\"we calibrating\", \"\");\n } else {\n telemetry.addData(\"Hell naw\", \"\");\n }\n telemetry.update();\n\n\n // Send telemetry message to signify robot waiting;\n // telemetry.addData(\"Say\", \"Dick\"); //\n // telemetry.update();\n\n // Wait for the game to start (driver presses PLAY)\n\n\n // run until the end of the match (driver presses STOP)\n }", "public void gyroTurn ( double speed, double angle) {\n\n // keep looping while we are still active, and not on heading.\n while (!onHeading(speed, angle, P_TURN_COEFF) ) {\n // Update telemetry & Allow time for other processes to run.\n try {\n sleep(50);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n }", "public void zeroGyroscope() {\n mGyroOffset = getGyroscopeRotation(false);\n }", "protected void initialize() {\n \t starttime = Timer.getFPGATimestamp();\n \tthis.startAngle = RobotMap.navx.getAngle();\n \tangleorientation.setSetPoint(RobotMap.navx.getAngle());\n \t\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \n //settting talon control mode\n \tRobotMap.motorLeftTwo.changeControlMode(TalonControlMode.MotionMagic);\t\t\n\t\tRobotMap.motorLeftOne.changeControlMode(TalonControlMode.Follower);\t\n\t\tRobotMap.motorRightTwo.changeControlMode(TalonControlMode.MotionMagic);\t\n\t\tRobotMap.motorRightOne.changeControlMode(TalonControlMode.Follower);\n\t\t//setting peak and nominal output voltage for the motors\n\t\tRobotMap.motorLeftTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorLeftTwo.configNominalOutputVoltage(0.00f, 0.0f);\n\t\tRobotMap.motorRightTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorRightTwo.configNominalOutputVoltage(0.0f, 0.0f);\n\t\t//setting who is following whom\n\t\tRobotMap.motorLeftOne.set(4);\n\t\tRobotMap.motorRightOne.set(3);\n\t\t//setting pid value for both sides\n\t//\tRobotMap.motorLeftTwo.setCloseLoopRampRate(1);\n\t\tRobotMap.motorLeftTwo.setProfile(0);\n\t RobotMap.motorLeftTwo.setP(0.000014f);\n \tRobotMap.motorLeftTwo.setI(0.00000001);\n\t\tRobotMap.motorLeftTwo.setIZone(0);//325);\n\t\tRobotMap.motorLeftTwo.setD(1.0f);\n\t\tRobotMap.motorLeftTwo.setF(this.fGainLeft+0.014);//0.3625884);\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t RobotMap.motorRightTwo.setCloseLoopRampRate(1);\n\t RobotMap.motorRightTwo.setProfile(0);\n\t\tRobotMap.motorRightTwo.setP(0.000014f);\n\t\tRobotMap.motorRightTwo.setI(0.00000001);\n\t\tRobotMap.motorRightTwo.setIZone(0);//325);\n\t\tRobotMap.motorRightTwo.setD(1.0f);\n\t\tRobotMap.motorRightTwo.setF(this.fGainRight);// 0.3373206);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t\t//setting Acceleration and velocity for the left\n\t\tRobotMap.motorLeftTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorLeftTwo.setMotionMagicCruiseVelocity(250);\n\t\t//setting Acceleration and velocity for the right\n\t\tRobotMap.motorRightTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorRightTwo.setMotionMagicCruiseVelocity(250);\n\t\t//resets encoder position to 0\t\t\n\t\tRobotMap.motorLeftTwo.setEncPosition(0);\n\t\tRobotMap.motorRightTwo.setEncPosition(0);\n\t //Set Allowable error for the loop\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(300);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(300);\n\t\t\n\t\t//sets desired endpoint for the motors\n RobotMap.motorLeftTwo.set(motionMagicEndPoint);\n RobotMap.motorRightTwo.set(-motionMagicEndPoint );\n \t\n }", "public double GyroPosition() {\n\t\tswitch (gyroToUse) {\n\t\tcase ANALOG:\n\t\t\tgyroAngle = gyro.getAngle();\n\t\t\tbreak;\n\n\t\tcase SPI:\n\t\t\tgyroAngle = spi.getAngle();\n\t\t\tbreak;\n\n\t\tcase IMU:\n\t\t\tgyroAngle = imu.getAngleZ();\n\t\t\tbreak;\n\t\t}\n\n\t\tgyroAngle = gyroAngle % 360;\n\n\t\t// SmartDashboard.putNumber(\"gyroAngle\", gyroAngle);\n\t\treturn gyroAngle;\n\n\t}", "public void gyroTurn(int degrees, double power) throws InterruptedException{\n //restart angle tracking\n resetAngle();\n\n if(degrees < 0){\n turnClockwise(power);\n }else if(degrees > 0){\n turnCounterClockwise(power);\n }else{\n return;\n }\n\n //Rotate until current angle is equal to the target angle\n if (degrees < 0){\n while (opMode.opModeIsActive() && getAngle() > degrees){\n composeAngleTelemetry();\n //display the target angle\n telemetry.addData(\"Target angle\", degrees);\n telemetry.update();\n }\n }else{\n while (opMode.opModeIsActive() && getAngle() < degrees) {\n composeAngleTelemetry();\n //display the target angle\n telemetry.addData(\"Target angle\", degrees);\n telemetry.update();\n }\n }\n\n completeStop();\n //Wait .5 seconds to ensure robot is stopped before continuing\n Thread.sleep(500);\n resetAngle();\n }", "@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n leftFrontMotor = new CANSparkMax(10, MotorType.kBrushless);\n leftBackMotor = new CANSparkMax(11, MotorType.kBrushless);\n rightFrontMotor = new CANSparkMax(12, MotorType.kBrushless);\n rightBackMotor = new CANSparkMax(13, MotorType.kBrushless);\n leftFrontMotor.setIdleMode(IdleMode.kCoast);\n leftBackMotor.setIdleMode(IdleMode.kCoast);\n rightFrontMotor.setIdleMode(IdleMode.kCoast);\n rightBackMotor.setIdleMode(IdleMode.kCoast);\n gyro = new ADXRS450_Gyro();\n gyro.calibrate();\n stick = new Joystick(1);\n controller = new XboxController(0);\n origGyro = 0;\n }", "@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n\n /* lets grab the 360 degree position of the MagEncoder's absolute position */\n /* mask out the bottom12 bits, we don't care about the wrap arounds */ \n\t\tint absolutePosition = elevator.getSelectedSensorPosition(0) & 0xFFF;\n \n /* use the low level API to set the quad encoder signal */\n elevator.setSelectedSensorPosition(absolutePosition, Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n\n /* choose the sensor and sensor direction */\n elevator.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, \n Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n\n /* Ensure sensor is positive when output is positive */\n elevator.setSensorPhase(false);\n\n /**\n * Set based on what direction you want forward/positive to be.\n * This does not affect sensor phase. \n */ \n //elevator.setInverted(Constants.kMotorInvert);\n \n /* Config the peak and nominal outputs, 12V means full */\n elevator.configNominalOutputForward(0, Constants.kTimeoutMs);\n elevator.configNominalOutputReverse(0, Constants.kTimeoutMs);\n //elevator.configPeakOutputForward(1, Constants.kTimeoutMs);\n elevator.configNominalOutputForward(0.5);\n //elevator.configPeakOutputForward(1, Constants.kTimeoutMs);\n elevator.configPeakOutputForward(0.5);\n elevator.configPeakOutputReverse(-1, Constants.kTimeoutMs);\n \n /**\n * Config the allowable closed-loop error, Closed-Loop output will be\n * neutral within this range. See Table in Section 17.2.1 for native\n * units per rotation.\n */\n //elevator.configAllowableClosedloopError(0, Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n \n /* Config Position Closed Loop gains in slot0, typically kF stays zero. */\n elevator.config_kF(Constants.kPIDLoopIdx, 0.0, Constants.kTimeoutMs);\n elevator.config_kP(Constants.kPIDLoopIdx, 0.5, Constants.kTimeoutMs);\n elevator.config_kI(Constants.kPIDLoopIdx, 0.0, Constants.kTimeoutMs);\n elevator.config_kD(Constants.kPIDLoopIdx, 0.0, Constants.kTimeoutMs);\n\n\n }", "protected float getGyroscopeAngle() {\n if (doGyro) {\n Orientation exangles = bosch.getAngularOrientation(AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES);\n float gyroAngle = exangles.thirdAngle;\n //exangles.\n //telemetry.addData(\"angle\", \"angle: \" + exangles.thirdAngle);\n float calculated = normalizeAngle(reverseAngle(gyroAngle));\n //telemetry.addData(\"angle2\",\"calculated:\" + calculated);\n return calculated;\n } else {\n return 0.0f;\n }\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Arm Pot Value\", Robot.arm.getArmPot());\n\n\t\tScheduler.getInstance().run();\n\t\t\n\t\tif(!elevator.getBottomElevatorLimit()) {\n\t\t\televator.resetElevatorMag();\n\t\t}\n\t}", "@Override\n public void periodic() {\n\t\t// myDrive.\n\n\t\t// System.out.println(Robot.m_oi.getSpeed());\n\t\t// SmartDashboard.putNumber(\"Dial Output: \", Robot.m_oi.getSpeed());\n\n\t\t// //Wheel Speed Limits\n\n\t\t// SmartDashboard.putNumber(\"Front Left Percent\", myDrive.getFLSpeed());\n\t\t// SmartDashboard.putNumber(\"Front Right Percent\", myDrive.getFRSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Left Percent\", myDrive.getRLSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Right Percent\", myDrive.getRRSpeed());\n\n\t\t//Test Code for Selecting Calibration Motor \n\t\t//***COMMENT OUT BEFORE REAL GAME USE***\n\t\t// if (Robot.m_oi.getArmDown()) {\n\t\t// \t// System.out.println(\"Front Left Wheel Selected\");\n\t\t// \tWheel = 1;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getArmUp()) {\n\t\t// \t// System.out.println(\"Back Left Wheel Selected\");\n\t\t// \tWheel = 2;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallIn()) {\n\t\t// \t// System.out.println(\"Front Right Wheel Selected\");\n\t\t// \tWheel = 3;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallOut()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 4;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBlueButton()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 0;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t// } \n\n\t\t// if (Wheel == 1) {\n\n\t\t// \tmyDrive.setFLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 2) {\n\n\t\t// \tmyDrive.setRLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 3) {\n\n\t\t// \tmyDrive.setFRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 4) {\n\n\t\t// \tmyDrive.setRRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// }\n\n\t\t// if (Robot.m_oi.getSafety()) {\n\n\t\t// \tspeedLimit = 1.0;\n\t\t// \tstrafeLimit = 1.0;\n\n\t\t// } else {\n\n\t\t// \tspeedLimit = 0.5; \n\t\t// \tstrafeLimit = 0.8;\n\t\t\t\t\n\t\t// }\n\n\n\n\t\t//System.out.print (\"strafeLimit: \" + strafeLimit);\n\t\t//System.out.println(Robot.m_oi.getX() * strafeLimit);\n\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY() * speedLimit), // set Y speed\n\t\t// \t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t// \t(Robot.m_oi.getRotate() * rotateLimit), // set rotation rate\n\t\t// \t0); // gyro angle \n\t\t\n\t\t//TODO: Rotate robot with vision tracking, set up curve to slow down as target approaches center.\n\t\t// if (Robot.m_oi.getStartButton()) {\n\t\t// \tmyDrive.driveCartesian(\n\t\t// \t\t (0.4), // set Rotation\n\t\t// \t\t (0.0), // set Strafe\n\t\t// \t\t (0.0), // set Forward/Back\n\t\t// \t\t 0);\n\t\t// } else {\n\t\tmyDrive.driveCartesian(\n\t\t\t(Robot.m_oi.getY() * rotateLimit), // set Y speed\n\t\t\t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t\t(Robot.m_oi.getRotate() * speedLimit), // set rotation rate\n\t\t\t0);\n\t\t// }\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY()), // set Y speed\n\t\t// \t(Robot.m_oi.getX()), // set X speed\n\t\t// \t(Robot.m_oi.getRotate()), // set rotation rate\n\t\t// \t0); \n\n }", "@Override\n public void initialize() {\n m_drive.resetGyro();// first call\n m_drive.resetEncoders();\n m_drive.lockMotors();\n }", "protected void initialize() {\n \t\n \ttimeStarted = System.currentTimeMillis();\n \tangle = driveTrain.gyro.getYaw();\n \tspeed = RobotMap.speedAtFullVoltage * power;\n \ttimeToGo = (long)(distance / speed) * 1000;\n }", "protected void initialize() {\n \tRobot.io.bottomGyro.reset();\n \tRobot.io.topGyro.reset();\n \tpid.reset();\n \tpid.setSetpoint(rotAngle);\n \tpid.enable();\n }", "public void robotInit() {\r\n\r\n shootstate = down;\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n initialpot = Components.ShooterPot.getAverageVoltage();\r\n //shootpotdown +=initialpot;\r\n //shootpotlow+= initialpot;\r\n //shootpotmiddle+= initialpot;\r\n //shootpothigh+=initialpot;\r\n\r\n }", "protected void execute() {\n \tSystem.out.println(\"Gyro: \" + Drivetrain.gyro.getAngle());\n\t\tif (degrees > 0) {\n\t\t\twhile (Drivetrain.gyro.getAngle() < degrees) {\n\t\t\t\tDrivetrain.frontRight.set(ControlMode.PercentOutput, 0.25);\n\t\t\t\tDrivetrain.rearRight.set(ControlMode.PercentOutput, 0.25);\n\t\t\t\tDrivetrain.frontLeft.set(ControlMode.PercentOutput, 0.25);\n\t\t\t\tDrivetrain.rearLeft.set(ControlMode.PercentOutput, 0.25);\n\t\t\t}\n\t\t} \n\t\telse {\n\t\t\twhile (Drivetrain.gyro.getAngle() > degrees) {\n\t\t\t\tDrivetrain.frontRight.set(ControlMode.PercentOutput, -0.25);\n\t\t\t\tDrivetrain.rearRight.set(ControlMode.PercentOutput, -0.25);\n\t\t\t\tDrivetrain.frontLeft.set(ControlMode.PercentOutput, -0.25);\n\t\t\t\tDrivetrain.rearLeft.set(ControlMode.PercentOutput, -0.25);\n\t\t\t}\n\t\t}\n }", "@Override\npublic void teleopPeriodic() {\nm_robotDrive.arcadeDrive(m_stick.getRawAxis(5)* (-0.5), m_stick.getRawAxis(4)*0.5);\n}", "void initialize() {\n setClockSource(MPU6050_CLOCK_PLL_INTERNAL);\n setFullScaleGyroRange(MPU6050_GYRO_FS_250);\n setFullScaleAccelRange(MPU6050_ACCEL_FS_2);\n }", "public void gyroHold(double speed, double angle, double holdTime) {\n\n ElapsedTime holdTimer = new ElapsedTime();\n\n // keep looping while we have time remaining.\n holdTimer.reset();\n while (opModeIsActive() && (holdTimer.time() < holdTime)) {\n // Update telemetry & Allow time for other processes to run.\n onHeading(speed, angle, P_TURN_COEFF);\n //telemetry.update();\n }\n\n // Stop all motion;\n robot.DriveLeft1.setPower(0);\n robot.DriveRight1.setPower(0);\n robot.DriveLeft2.setPower(0);\n robot.DriveRight2.setPower(0);\n }", "protected void initialize()\n {\n // Set the pid up for driving straight\n Robot.drivetrain.getAngleGyroController().setPID(Constants.DrivetrainAngleGyroControllerP, Constants.DrivetrainAngleGyroControllerI, Constants.DrivetrainAngleGyroControllerD);\n //Robot.drivetrain.resetGyro();\n if (setpointSpecified == true)\n {\n Robot.drivetrain.getAngleGyroController().setSetpoint(Robot.initialGyroAngle); \n }\n else\n {\n Robot.drivetrain.getAngleGyroController().setSetpoint(Robot.drivetrain.getGyroValue());\n }\n Robot.drivetrain.setDirection(driveDirection);\n Robot.drivetrain.setMagnitude(drivePower);\n Robot.drivetrain.getAngleGyroController().enable();\n timer.reset();\n timer.start();\n }", "public double getGyroAngle() {\n double[] ypr = new double[3];\n gyro.GetYawPitchRoll(ypr);\n return ypr[0];\n }", "public void init() {\n//\t\tint anglesToEncTicks = (int) ((90 - currentAngle) * encoderTicksPerRev);\n//\t\tarmMotor.setEncPosition(anglesToEncTicks);\n\t\twhile (armMotor.isFwdLimitSwitchClosed() != true) {\n\t\t\tarmMotor.set(.2);\n\t\t}\n\t\tSystem.out.println(\"Calibrated!\");\n\t\tarmMotor.setEncPosition(0);\n\t}", "public double[] getGyro();", "public Drive() {\r\n \tgyro.calibrate();\r\n \tgyro.reset();\r\n }", "public int getGyroAngle() {\r\n \treturn (int)Math.round(gyro.getAngle());\r\n }", "public void zeroHeading() {\n m_gyro.reset();\n }", "private void getSensorService() {\n mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n if (mSensorManager == null) {\n Log.e(TAG, \"----getSystemService failed\");\n\n } else {\n mWakeupUncalibratedGyro = mSensorManager.getDefaultSensor(\n Sensor.TYPE_GYROSCOPE_UNCALIBRATED, true);\n }\n\n if (mWakeupUncalibratedGyro != null) {\n mSensorManager.registerListener(mListener, mWakeupUncalibratedGyro,\n SensorManager.SENSOR_DELAY_UI);\n }\n }", "@Override\n public void teleopPeriodic() {\n CommandScheduler.getInstance().run();\n OI.getInstance().getPilot().run();\n SmartDashboard.putNumber(\"gyro\", getRobotContainer().getTecbotSensors().getYaw());\n SmartDashboard.putBoolean(\"isSpeed\", getRobotContainer().getDriveTrain().getTransmissionMode() == DriveTrain.TransmissionMode.speed);\n SmartDashboard.putString(\"DT_MODE\", getRobotContainer().getDriveTrain().getCurrentDrivingMode().toString());\n SmartDashboard.putNumber(\"x_count\", getRobotContainer().getClimber().getxWhenPressedCount());\n\n }", "@Override\n public void robotPeriodic() {\n\n boolean c = mGPM.haveCargo();\n \n // Need signal due to distance for assurance that cargo is obtained/\n if (c) {\n CargoLight.set(Value.kOn);\n } else{\n CargoLight.set(Value.kOff);\n }\n }", "private void initSensorManager() {\n\t\ttry {\n\t\t\tSensorManager sensorManage = (SensorManager) getSystemService(Context.SENSOR_SERVICE);\n\t\t\tList<Sensor> mySensors = sensorManage\n\t\t\t\t\t.getSensorList(Sensor.TYPE_ACCELEROMETER);\n\t\t\tmAccel = 0.00f;\n\t\t\tmAccelCurrent = SensorManager.GRAVITY_EARTH;\n\t\t\tmAccelLast = SensorManager.GRAVITY_EARTH;\n\t\t\tsensorManage.registerListener(new SensorEventListener() {\n\t\t\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n\t\t\t\t}\n\n\t\t\t\t@SuppressLint(\"FloatMath\")\n\t\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\n\t\t\t\t\tfloat x = event.values[0];// Get X-Coordinator\n\n\t\t\t\t\tfloat y = event.values[1];// Get Y-Coordinator\n\n\t\t\t\t\tfloat z = event.values[2];// Get Z-Coordinator\n\n\t\t\t\t\tmAccelLast = mAccelCurrent;\n\t\t\t\t\tmAccelCurrent = (float) Math\n\t\t\t\t\t\t\t.sqrt((double) (x * x + y * y + z * z));\n\t\t\t\t\tfloat delta = mAccelCurrent - mAccelLast;\n\t\t\t\t\tmAccel = mAccel * 0.9f + delta; // perform low-cut filter\n\n\t\t\t\t\tif (SHAKING_DELTA > mAccel\n\t\t\t\t\t\t\t&& CommonValues.getInstance().CameraMessage != CameraMessageStatus.Focused) {\n\t\t\t\t\t\t// BY SAM for start autofocusing\n\t\t\t\t\t\tif (!lock_autofocus) {\n\t\t\t\t\t\t\tif (autoFocusCounter > AUTO_FOCUS_START_INTERVAL\n\t\t\t\t\t\t\t\t\t&& CommonValues.getInstance().CameraMessage == CameraMessageStatus.Shacked) {\n//\t\t\t\t\t\t\t\tCameraManager.get().requestAutoFocus(handler,\n//\t\t\t\t\t\t\t\t\t\tR.id.auto_focus);\n\t\t\t\t\t\t\t\tautoFocusCounter = 0;\n\t\t\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\t\t\t\t\t\t\t} else if (autoFocusCounter > AUTO_FOCUS_START_INTERVAL) {\n\t\t\t\t\t\t\t\tautoFocusCounter = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!lock_autofocus\n\t\t\t\t\t\t\t\t&& Math.abs(z - old_z) > SHAKING_Z_DELTA) {\n\n\t\t\t\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n//\t\t\t\t\t\t\tCameraManager.get().requestAutoFocus(handler,\n//\t\t\t\t\t\t\t\t\tR.id.auto_focus);\n\t\t\t\t\t\t\tautoFocusCounter = 0;\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (!lock_autofocus) {\n\n\t\t\t\t\t\t\t\tstatusView\n\t\t\t\t\t\t\t\t\t\t.setText(getString(R.string.brcd_img_middle));\n\t\t\t\t\t\t\t\tautoFocusCounter++;\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstatusView\n\t\t\t\t\t\t\t\t\t\t.setText(getString(R.string.brcd_press_focus));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if (mAccel > SHAKING_DELTA)// Shaking\n\t\t\t\t\t{\n\n\t\t\t\t\t\tstatusView.setText(getString(R.string.phone_silent));\n\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Shacked;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\n\t\t\t\t\t}\n\t\t\t\t\told_z = z;\n\n\t\t\t\t}\n\t\t\t}, mySensors.get(0), SensorManager.SENSOR_DELAY_NORMAL);\n\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"Unable to detect SensorManager. \",\n\t\t\t\t\t\"Error data \" + e.toString());\n\t\t}\n\t}", "public void autonomous() {\n robot.drive(0.5); //Drives in a square\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n }", "public void testGyroAngle(AnalogGyro gyro) {\n // Set angle\n for (int i = 0; i < 5; i++) {\n m_tpcam.getPan().set(0);\n Timer.delay(0.1);\n }\n\n Timer.delay(0.5);\n // Reset for setup\n gyro.reset();\n Timer.delay(0.5);\n\n // Perform test\n for (int i = 0; i < 53; i++) {\n m_tpcam.getPan().set(i / 100.0);\n Timer.delay(0.05);\n }\n Timer.delay(1.2);\n\n double angle = gyro.getAngle();\n\n double difference = TEST_ANGLE - angle;\n\n double diff = Math.abs(difference);\n\n assertEquals(errorMessage(diff, TEST_ANGLE), TEST_ANGLE, angle, 10);\n }", "public void initialize() {\n // RobotContainer.drive.zeroAngle();\n this.angle = this.angle + RobotContainer.drive.getAngle();\n }", "@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n // ros_string = workingSerialCom.read();\n // yavuz = workingSerialCom.StringConverter(ros_string, 2);\n // Inverse.Inverse(yavuz);\n\n // JoystickDrive.execute();\n\n\n\n // ros_string = workingSerialCom.read();\n // alt_yurur = workingSerialCom.StringConverter(ros_string, 1);\n // robot_kol = workingSerialCom.StringConverter(ros_string, 2);\n Full.Full(yavuz);\n \n }", "@Override\n public void gyroYaw(int value, int timestamp) {\n }", "public void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\t\n shooterArm.updateSmartDashboard();\n\t\tdriveTrain.getDegrees();\n\n\t\tvision.findGoal();\n\t\tvision.getGoalXAngleError();\n\t\tvision.getGoalArmAngle();\n\n\t\t// Stop auto mode if the robot is tilted too much\n\t\tif (Math.abs(driveTrain.getRobotPitch())<=60 && Math.abs(driveTrain.getRobotRoll())<=60)\n\t\t\ttimerTilt.reset();\n\t\t\n\t\t// For some reason, robot did not move in last match in auto, so this code is suspect\n\t\t// Do the Pitch/Roll values need to be zeroed?\n//\t\tif ( autonomousCommand != null && timerTilt.get()>0.5)\n//\t\t\tautonomousCommand.cancel();\n\n\t}", "public void gyroHold( double speed, double angle, double holdTime) {\n\n ElapsedTime holdTimer = new ElapsedTime();\n\n // keep looping while we have time remaining.\n holdTimer.reset();\n while (opModeIsActive() && (holdTimer.time() < holdTime)) {\n // Update telemetry & Allow time for other processes to run.\n onHeading(speed, angle, P_TURN_COEFF);\n telemetry.update();\n }\n\n // Stop all motion;\n robot.leftDrive.setPower(0);\n robot.rightDrive.setPower(0);\n }", "@Override\n public void teleopPeriodic() {\n\n double l = left.calculate((int)rightEnc.get());\n double r = right.calculate((int)rightEnc.get());\n\n double gyro_heading = gyro.getYaw(); // Assuming the gyro is giving a value in degrees\n double desired_heading = Pathfinder.r2d(left.getHeading()); // Should also be in degrees\n\n double angleDifference = Pathfinder.boundHalfDegrees(desired_heading - gyro_heading);\n double turn = 0.8 * (-1.0/80.0) * angleDifference;\n\n //left1.set(l + turn);\n //right1.set(r - turn);\n left1.set(0);\n right1.set(0);\n System.out.println(\"Get: \" + rightEnc.get() + \" Raw: \" + rightEnc.getRaw());\n\n }", "@Override\n public void periodic() {\n double leftX = xboxController.getX(Hand.kLeft);\n double leftY = -xboxController.getY(Hand.kLeft);\n\n leftX = Math.pow(leftX, LEFT_STICK_EXPONENT);\n leftY = Math.pow(leftY, LEFT_STICK_EXPONENT);\n\n drive.driveManual(leftY, leftX);\n\n // Process Rotation control\n double rightX = xboxController.getX(Hand.kRight);\n double rightY = -xboxController.getY(Hand.kRight);\n\n rightX = Math.pow(rightX, RIGHT_STICK_EXPONENT);\n rightY = Math.pow(rightY, RIGHT_STICK_EXPONENT);\n\n double angle = rightX >= 0 ? Math.atan2(rightY, rightX) : -Math.atan2(rightY, rightX);\n double rotationSpeed = Math.sqrt(Math.pow(rightX, 2) + Math.pow(rightY, 2));\n\n if (rotationSpeed > ROTATION_SPEED_THRESHOLD) {\n drive.lookAt(angle, rotationSpeed);\n } else {\n drive.lookAt(angle, 0);\n }\n\n if (xboxController.getBumper(Hand.kLeft)) {\n roller.start();\n } else {\n roller.stop();\n }\n\n if (xboxController.getBumper(Hand.kRight) && storage.storageMode == StorageMode.FIRING) {\n launcher.start();\n storage.advance();\n } else {\n launcher.stop();\n }\n\n if (xboxController.getAButton()) {\n storage.unprime();\n }\n\n if (xboxController.getBButton()) {\n storage.prime();\n }\n\n data = DriverStation.getInstance().getGameSpecificMessage();\n if (xboxController.getAButton()) {\n if (data.length() > 0) {\n wheel.spinToColor(data.charAt(0));\n } else {\n wheel.spinRevolutions();\n }\n }\n\n }", "@Override\n public void loop() {\n gp1y = (-1 * gamepad1.left_stick_y);\n // calculations bloc\n // speed - while our technical value is within the range of [-1,1], we'll just keep it\n // positive.\n if (gamepad1.right_bumper) {\n speed = -1 * gamepad1.right_trigger;\n } else {\n speed = gamepad1.right_trigger;\n }\n // angle - this is calculated using the direction our stick is pointing. should be in a\n // range of [0,2pi] like a unit circle. terrible things, unit circles.\n // this means the stick held right should be 2pi.\n angle = Math.atan2(gp1y, gamepad1.left_stick_x);\n // corrections to ensure our angle is like a unit circle instead of delivering a coordinate\n if (angle <= 0) {\n angle += Math.PI * 2;\n }\n /*\n if (gamepad1.left_stick_x == 0 && gamepad1.left_stick_y == 0){\n angle = (Math.PI)/2;\n }\n */\n\n // rotation magnitude\n if (gamepad1.left_bumper){\n rotate = gamepad1.left_trigger * -1;\n } else {\n rotate = gamepad1.left_trigger;\n }\n // alternative rotation mag.\n if (gamepad1.right_stick_x != 0){\n rotate = gamepad1.right_stick_x;\n }\n\n\n //DEBUG: dump outputs\n /*\n telemetry.addData(\"REQUIRED INFORMATION\", \"\");\n telemetry.addData(\"speed:\", speed);\n telemetry.addData(\"angle:\", angle);\n telemetry.addData(\"angle (pi):\", angle/Math.PI);\n telemetry.addData(\"rot. magnitude:\", rotate);\n */\n // calc voltage multipliers\n if (gamepad1.left_stick_x == 0 && gamepad1.left_stick_y == 0) {\n speed = 0;\n }\n voltageMultiplier[0] = speed * Math.cos(angle - (Math.PI/4)) + rotate;\n voltageMultiplier[1] = speed * Math.sin(angle - (Math.PI/4)) - rotate;\n voltageMultiplier[2] = speed * Math.sin(angle - (Math.PI/4)) + rotate;\n voltageMultiplier[3] = speed * Math.cos(angle - (Math.PI/4)) - rotate;\n if (rotate == 0) {\n for (int i = 0; i < 4; i++) {\n voltageMultiplier[i] *= Math.sqrt(2);\n }\n }\n //DEBUG: voltage multiplier output\n /*\n telemetry.addData(\"VOLTAGE MULTIPLIERS (unnormalized)\", \"\");\n telemetry.addData(\"VM1\", voltageMultiplier[0]);\n telemetry.addData(\"VM2\", voltageMultiplier[1]);\n telemetry.addData(\"VM3\", voltageMultiplier[2]);\n telemetry.addData(\"VM4\", voltageMultiplier[3]);\n */\n // begin normalization process\n // store the biggest voltage multiplier\n double topStore = 1;\n for (int x = 0; x < 4; x++){\n if (Math.abs(voltageMultiplier[x]) > topStore) {\n topStore = Math.abs(voltageMultiplier[x]);\n }\n }\n // followed by dividing them all by the top one\n // additionally, do a sanity check that ensures we don't actually do this\n // if our top stored number is \"0\" because that would make NaN and do bad\n // things ;~\n for (int x = 0; x < 4; x++) {\n voltageMultiplier[x] /= topStore;\n }\n /*\n telemetry.addData(\"VOLTAGE MULTIPLIERS (normalized)\", \"\");\n telemetry.addData(\"VM1\", voltageMultiplier[0]);\n telemetry.addData(\"VM2\", voltageMultiplier[1]);\n telemetry.addData(\"VM3\", voltageMultiplier[2]);\n telemetry.addData(\"VM4\", voltageMultiplier[3]);\n */\n if (gamepad1.b) {\n for (int i = 0; i < 4; i++) {\n voltageMultiplier[i] = 0;\n }\n }\n\n if(gamepad1.y){\n robot.arm.setPosition(1); // outwards\n }\n if(gamepad1.x){\n robot.arm.setPosition(0.4); // back up towards robot\n }\n // TODO: gripper implementation and locking setup\n\n if (!(robot.limitTop.getState() && gamepad2.left_stick_y < 0)) {\n robot.lift.setPower(gamepad2.left_stick_y / 2);\n } else if (robot.limitTop.getState()) {\n robot.lift.setPower(0);\n }\n\n // hold a to open gripper to limit.\n // press b to unlock\n if (gamepad2.a){\n robot.gripper.setPower(-GRIPPER_POWER);\n robot.gripper.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n } else if (gamepad2.b){\n robot.gripper.setPower(GRIPPER_POWER);\n robot.gripper.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);\n } else {\n robot.gripper.setPower(0);\n }\n\n telemetry.addData(\"ZPB\", robot.gripper.getZeroPowerBehavior());\n telemetry.addData(\"gp2 y\", gamepad2.left_stick_y);\n telemetry.addData(\"top limiter\", robot.limitTop.getState());\n\n robot.flDrive.setPower(voltageMultiplier[0]);\n robot.frDrive.setPower(voltageMultiplier[1]);\n robot.rlDrive.setPower(voltageMultiplier[2]);\n robot.rrDrive.setPower(voltageMultiplier[3]);\n }", "@Override\n public void robotInit()\n {\n System.out.println(\"RoboRIO initializing...\");\n\n // initialize cameras\n camFront = CameraServer.getInstance().startAutomaticCapture(0);\n camBack = CameraServer.getInstance().startAutomaticCapture(1);\n camServForward = CameraServer.getInstance().getServer();\n camServReverse = CameraServer.getInstance().getServer();\n\n camServForward.setSource(camFront);\n //camServReverse.setSource(camBack);\n\n // init joysticks\n Joystick[] joysticks = getControllers();\n\n driveTrain = new DriveTrain();\n hatchArm = new HatchArm();\n cargoArm = new CargoArm();\n ramp = new Ramp();\n\n driver1 = new Buttons(joysticks[0]);\n driver2 = new Buttons(joysticks[1]);\n\n // init gyro\n // try\n // {\n // gyro = new AHRS(I2C.Port.kOnboard);\n // }\n // catch (RuntimeException ex)\n // {\n // // DriverStation.reportError(\"Error instantiating navX-MXP: \" + ex.getMessage(),\n // // true);\n // System.out.println(\"Error initializing gyro!\");\n // }\n\n // // update gyro info on smart dashboard\n // SmartDashboard.putNumber(\"X angle\", gyro.getYaw() + 180);\n // SmartDashboard.putNumber(\"Y angle\", gyro.getPitch() + 180);\n // SmartDashboard.putNumber(\"Z angle\", gyro.getRoll() + 180);\n \n // SmartDashboard.putNumber(\"X vel\", gyro.getVelocityX());\n // SmartDashboard.putNumber(\"Y vel\", gyro.getVelocityY());\n // SmartDashboard.putNumber(\"Z vel\", gyro.getVelocityZ());\n\n // SmartDashboard.putData(gyro);\n updateVars();\n updateShuffleboard();\n\n System.out.println(\"RoboRIO initialization complete.\");\n }", "@Override\n public void robotPeriodic() {\n double high = m_filter.calculate(m_photoHigh.getValue());// * kValueToInches;\n double low = m_filter.calculate(m_photoLow.getValue()); //* kValueToInches;\n if (low<=6){\n BallPresent = true;\n //stop motor if ultrasonic sensor median falls below 6 inches indicating a ball is blocking the sensor\n m_RightMotor.set(ControlMode.PercentOutput, 0);\n } else {\n BallPresent = false;\n //stop motor if ultrasonic sensor median falls below 6 inches indicating a ball is blocking the sensor\n m_RightMotor.set(ControlMode.PercentOutput, 0.5);\n }\n /*Shuffleboard.getTab(\"Shooter\").add(\"Ball Present\", BallPresent)\n .withWidget(BuiltInWidgets.kBooleanBox)\n .withPosition(0, 0)\n .withSize(1, 1)\n .withProperties(Map.of(\"colorWhenTrue\",\"green\",\"colorWhenFalse\",\"black\"));*/\n SmartDashboard.putNumber(\"High\", high);\n SmartDashboard.putNumber(\"Low\", low); \n /*Shuffleboard.getTab(\"Shooter\").add(\"Ultrasonic 1\", currentDistance)\n .withWidget(BuiltInWidgets.kGraph)\n .withPosition(0, 2)\n .withSize(4, 4);*/\n // convert distance error to a motor speed\n //double currentSpeed = (kHoldDistance - currentDistance) * kP;\n\n // drive robot\n //m_robotDrive.arcadeDrive(currentSpeed, 0);\n }", "public void gyroTurn(double speed, double angle) {\n while (opModeIsActive() && !onHeading(speed, angle, P_TURN_COEFF)) {\n // Update telemetry & Allow time for other processes to run.\n telemetry.update();\n }\n }", "@Override\n public void periodic() {\n m_odometry.update(\n Rotation2d.fromDegrees(m_gyro.getAngle()),\n new SwerveModulePosition[] {\n m_frontLeft.getPosition(),\n m_frontRight.getPosition(),\n m_rearLeft.getPosition(),\n m_rearRight.getPosition()\n });\n }", "public void gyroHold( double speed, double angle, double holdTime) {\n\n ElapsedTime holdTimer = new ElapsedTime();\n\n // keep looping while we have time remaining.\n holdTimer.reset();\n while ((holdTimer.time() < holdTime)) {\n // Update telemetry & Allow time for other processes to run.\n onHeading(speed, angle, P_TURN_COEFF);\n try {\n sleep(50);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n }\n\n // Stop all motion;\n leftmotor.setPower(0);\n rightmotor.setPower(0);\n }", "public double getGyroAngleX() {\n return m_gyro.getAngleX();\n }", "@Override\n protected void initialize() {\n\n /* System clock starts */\n baseTime = System.currentTimeMillis();\n /* Determines time that robot has to timeout after */\n thresholdTime = baseTime + duration;\n\n /* Convert the starting angle */\n if (Robot.drivetrain.getGyroYaw() < 0.0f) {\n /* Negative turn to 180-360 */\n startingAngle = Robot.drivetrain.getGyroYaw() + 360.0f;\n } else {\n /* Positives stay 0-180 */\n startingAngle = Robot.drivetrain.getGyroYaw();\n }\n\n /* The total angle needed to turn */\n totalAngleTurn = startingAngle + inputAngle;\n\n /* Declare the turning direction of special cases when the angle passes over 0 or 360 */\n if (totalAngleTurn < 0.0f) { \n /* If the angle is negative, convert it */\n totalAngleTurn += 360.0f;\n /* Trigger special case */\n specialCase = true;\n /* Trigger counterclockwise */\n clockwise = false;\n }\n if (totalAngleTurn > 360.0f) {\n /* If the angle is above 360, subtract 360 */\n totalAngleTurn -= 360.0f;\n /* Trigger special case */\n specialCase = true;\n /* Trigger clockwise */\n clockwise = true;\n }\n /* Only run if the special cases do not already declare a turning direction */\n if (!specialCase) {\n /* If the input angle is bigger, turn clockwise */\n if (totalAngleTurn > startingAngle) {\n clockwise = true;\n }\n /* If the input angle is smaller, turn counterclockwise */\n if (totalAngleTurn < startingAngle) {\n clockwise = false;\n }\n }\n }", "private void robotMovement()\n {\n\n /* If it will be rotating, don't drive */\n if (!joystick.rightShouldMove()) {\n\n if (joystick.leftShouldMove()) {\n\n /* Derive movement values from gamepad */\n Joystick.Direction direction = joystick.getLeftDirection();\n double power = joystick.getLeftPower();\n\n int[] modifier;\n\n if (direction == Joystick.Direction.UP) {\n modifier = modUP;\n } else if (direction == Joystick.Direction.DOWN) {\n modifier = modDOWN;\n } else if (direction == Joystick.Direction.RIGHT) {\n modifier = modRIGHT;\n } else {\n modifier = modLEFT;\n }\n\n motorLeftFront.setPower(modifier[0] * ((power * 0.8) + (0.01 * frontInc)));\n motorRightFront.setPower(modifier[1] * ((power * 0.8) + (0.01 * frontInc)));\n motorLeftBack.setPower(modifier[2] * ((power * 0.8) + (0.01 * backInc)));\n motorRightBack.setPower(modifier[3] * ((power * 0.8) + (0.01 * backInc)));\n\n } else {\n setMotorPowerToZero();\n }\n\n } else {\n\n /* Rotation modifiers for sides of bot */\n Joystick.Direction d = joystick.getRightDirection();\n double power = joystick.getRightPower();\n boolean left = d == Joystick.Direction.LEFT;\n double sideMod = left ? 1 : -1;\n\n /* Set motor power */\n motorLeftFront.setPower(sideMod * power);\n motorLeftBack.setPower(sideMod * power);\n motorRightFront.setPower(sideMod * power);\n motorRightBack.setPower(sideMod * power);\n\n }\n\n }", "public double getGyroAngleY() {\n return m_gyro.getAngleY();\n }", "@Override\n public void robotInit() {\n myRobot = new DifferentialDrive(leftfrontmotor, rightfrontmotor);\n leftrearmotor.follow(leftfrontmotor);\n rightrearmotor.follow(rightfrontmotor);\n leftfrontmotor.setInverted(true); // <<<<<< Adjust this until robot drives forward when stick is forward\n\t\trightfrontmotor.setInverted(true); // <<<<<< Adjust this until robot drives forward when stick is forward\n\t\tleftrearmotor.setInverted(InvertType.FollowMaster);\n rightrearmotor.setInverted(InvertType.FollowMaster);\n \n CameraServer.getInstance().startAutomaticCapture();\n\n \n\n comp.setClosedLoopControl(true);\n \n\n /* Set up Dashboard widgets */\n SmartDashboard.putNumber(\"L Stick\", gamepad.getRawAxis(1));\n\t\tSmartDashboard.putNumber(\"R Stick\", gamepad.getRawAxis(5));\n\t\tSmartDashboard.putBoolean(\"Back Button\", gamepad.getRawButton(5));\n\t\tSmartDashboard.putBoolean(\"Fwd Button\", gamepad.getRawButton(6));\n\t\t\n SmartDashboard.putNumber(\"LF\", pdp.getCurrent(leftfrontmotorid));\n\t\tSmartDashboard.putNumber(\"LR\", pdp.getCurrent(leftrearmotorid));\n\t\tSmartDashboard.putNumber(\"RF\", pdp.getCurrent(rightfrontmotorid));\n\t\tSmartDashboard.putNumber(\"RR\", pdp.getCurrent(rightrearmotorid));\n SmartDashboard.putNumber(\"Total\", pdp.getCurrent(0) + pdp.getCurrent(1) + pdp.getCurrent(2) + pdp.getCurrent(3) + pdp.getCurrent(4) + pdp.getCurrent(5) + pdp.getCurrent(6) + pdp.getCurrent(7) + pdp.getCurrent(8) + pdp.getCurrent(9) + pdp.getCurrent(10) + pdp.getCurrent(11) + pdp.getCurrent(12) + pdp.getCurrent(13) + pdp.getCurrent(14) + pdp.getCurrent(15));\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n timestamp = event.timestamp;\n gyroX = event.values[0];\n gyroY = event.values[1];\n gyroZ = event.values[2];\n\n this.setChanged();\n this.notifyObservers(Sensor.TYPE_GYROSCOPE);\n }", "@Override\n public void loop() {\n telemetry.addData(\"Status\", \"Running: \" + runtime.toString());\n\n //zAccumulated = mrGyro.getIntegratedZValue(); //Set variables to gyro readings\n\n heading = 360 - mrGyro.getHeading(); //Reverse direction of heading to match the integrated value\n if (heading == 360)\n {\n heading = 0;\n }\n\n xVal = mrGyro.rawX() / 128; //Lowest 7 bits are noise\n yVal = mrGyro.rawY() / 128;\n zVal = mrGyro.rawZ() / 128;\n\n //The below two if() statements ensure that the mode of the color sensor is changed only once each time the touch sensor is pressed.\n //The mode of the color sensor is saved to the sensor's long term memory. Just like flash drives, the long term memory has a life time in the 10s or 100s of thousands of cycles.\n //This seems like a lot but if your program wrote to the long term memory every time though the main loop, it would shorten the life of your sensor.\n\n if (!buttonState && gamepad1.x) { //If the touch sensor is just now being pressed (was not pressed last time through the loop but now is)\n buttonState = true; //Change touch state to true because the touch sensor is now pressed\n LEDState = !LEDState; //Change the LEDState to the opposite of what it was\n if(LEDState)\n {\n BallSensorreader.write8(3, 0); //Set the mode of the color sensor using LEDState\n }\n else\n {\n BallSensorreader.write8(3, 1); //Set the mode of the color sensor using LEDState\n }\n }\n\n if (!gamepad1.x) //If the touch sensor is now pressed\n buttonState = false; //Set the buttonState to false to indicate that the touch sensor was released\n\n BallSensorcache = BallSensorreader.read(0x04, 1);\n\n if (gamepad2.a)\n liftSpeed = 1;\n if (gamepad2.b)\n liftSpeed = 0.5;\n\n driveSpeed = 1;\n\n if (gamepad1.right_bumper)\n driveSpeed = 0.5;\n\n if (gamepad1.left_bumper)\n driveSpeed = 0.25;\n\n // Run wheels in tank mode (note: The joystick goes negative when pushed forwards, so negate it)\n frontLeft = ( gamepad1.left_stick_x - gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Front right\n frontRight = ( gamepad1.left_stick_x + gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Front left\n backLeft = (-gamepad1.left_stick_x - gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Back right\n backRight = (-gamepad1.left_stick_x + gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Back left\n Lift = gamepad2.left_stick_y * liftSpeed;\n\n robot.FL_drive.setPower(frontLeft);\n robot.FR_drive.setPower(frontRight);\n robot.BL_drive.setPower(backLeft);\n robot.BR_drive.setPower(backRight);\n robot.Lift.setPower(Lift);\n\n // Left servo going in means more\n if (gamepad2.left_bumper)\n leftPosition += LEFT_SPEED;\n else if (gamepad2.y)\n leftPosition = LEFT_MIN_RANGE;\n\n // Right servo going in means less\n if (gamepad2.right_bumper)\n rightPosition -= RIGHT_SPEED;\n else if (gamepad2.y)\n rightPosition = RIGHT_MAX_RANGE;\n\n if (gamepad2.x)\n {\n rightPosition = 0.96;\n leftPosition = 0.44;\n }\n\n if (gamepad1.a)\n target = target + 45;\n if (gamepad1.b)\n target = target - 45;\n\n //turnAbsolute(target);\n\n // Move both servos to new position.\n leftPosition = Range.clip(leftPosition, robot.LEFT_MIN_RANGE, robot.LEFT_MAX_RANGE);\n robot.Left.setPosition(leftPosition);\n rightPosition = Range.clip(rightPosition, robot.RIGHT_MIN_RANGE, robot.RIGHT_MAX_RANGE);\n robot.Right.setPosition(rightPosition);\n\n // Send telemetry message to signify robot running;\n telemetry.addData(\"Left\", \"%.2f\", leftPosition);\n telemetry.addData(\"Right\", \"%.2f\", rightPosition);\n telemetry.addData(\"frontLeft\", \"%.2f\", frontLeft);\n telemetry.addData(\"frontRight\", \"%.2f\", frontRight);\n telemetry.addData(\"backLeft\", \"%.2f\", backLeft);\n telemetry.addData(\"backRight\", \"%.2f\", backRight);\n telemetry.addData(\"Lift\", \"%.2f\", Lift);\n\n //display values\n telemetry.addData(\"1 #A\", BallSensorcache[0] & 0xFF);\n\n telemetry.addData(\"3 A\", BallSensorreader.getI2cAddress().get8Bit());\n\n telemetry.addData(\"1. heading\", String.format(\"%03d\", heading)); //Display variables to Driver Station Screen\n telemetry.addData(\"2. target\", String.format(\"%03d\", target));\n telemetry.addData(\"3. X\", String.format(\"%03d\", xVal));\n telemetry.addData(\"4. Y\", String.format(\"%03d\", yVal));\n telemetry.addData(\"5. Z\", String.format(\"%03d\", zVal));\n\n telemetry.update(); //Limited to 100x per second\n\n }", "protected void initialize() {\n \t\n \n \t\n \tRobotMap.motorLeftTwo.setSelectedSensorPosition(0,0,0);\n\t\tRobotMap.motorRightTwo.setSelectedSensorPosition(0,0,0);\n \t\n \torientation.setSetPoint(desiredAngle);\n \tstartTime = Timer.getFPGATimestamp();\n }", "@Override\n public void gyroPitch(int value, int timestamp) {\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tif (state == \"auton\") {\n\t\t\tlastState = \"auton\";\n\t\t}\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Left encoder\", Actuators.getLeftDriveMotor().getEncPosition());\n\t\tSmartDashboard.putNumber(\"Right encoder\", Actuators.getRightDriveMotor().getEncPosition());\n\t\tSmartDashboard.putNumber(\"Left speed\", Actuators.getLeftDriveMotor().get());\n\t\tSmartDashboard.putNumber(\"Right speed\", Actuators.getRightDriveMotor().get());\n\t\t\n\t\t\n\t}", "public void gyroTurn ( double speed, double angle, double timeoutS) {\n\n eTime.reset();\n\n // keep looping while we are still active, and not on heading.\n while (opModeIsActive() && (eTime.seconds() < timeoutS) && !onHeading(speed, angle, P_TURN_COEFF)) {\n // Update telemetry & Allow time for other processes to run.\n telemetry.update();\n }\n }", "@Override\n\tpublic void robotInit() {\n\t\toi = new OI();\n\t\tdrivebase.calibrateGyro();\n\t\tSmartDashboard.putData(\"Zero Gyro\", new ZeroGyro());\n\t\tSmartDashboard.putData(\"Calibrate Gyro - WHILE ROBOT NOT MOVING\", new CalibrateGyro());\n\t\tchooser.addDefault(\"Default Prepare Gear Auto\", new PrepareGearManipulator());\n\t\t//shooterModeChooser.addDefault(\"Shooter at Nominal Preset when Pressed\", object);\n\t\t/*chooser.addObject(\"Left Gear Auto\", new LeftGearGroup());\n\t\tchooser.addObject(\"Center Gear Auto\", new CenterGearGroup());*/\n\t//\tchooser.addObject(\"Test Vision Auto\", new TurnTillPerpVision(true));\n\t//\tchooser.addObject(\"Testing turn gyro\", new RotateToGyroAngle(90,4));\n\t\t//chooser.addObject(\"DriveStraightTest\", new GoAndReturn());\n\t\t //UNNECESSARY AUTOS FOR TESTING ^\n\t\tchooser.addObject(\"Center Gear Encoder Auto (place)\", new DriveStraightCenter());\n\t\tchooser.addObject(\"Vision center TESTING!!!\", new TurnTillPerpVision());\n\t\tchooser.addObject(\"Boiler Auto RED\", new BoilerAuto(true));\n\t\tchooser.addObject(\"Boiler Auto BLUE\", new BoilerAuto(false));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t//\tchooser.addObject(\"Center Gear Encoder Auto (do not place )\", new DriveToFace(false, false, false));\n\t\tchooser.addObject(\"Baseline\", new DriveToLeftRightFace(false,false,false,false));\n\t\tchooser.addObject(\"TEST DRIVETANK AUTO\", new DriveTimedTank(0.7,0.7,5));\n\t\tchooser.addObject(\"Side Gear Auto RIGHT (manual straight lineup)(place)(TURN AFTER AND START CYCLE)\", new DriveStraightSide(true,false));\n\n\t\tchooser.addObject(\"Side Gear Auto LEFT (manual straight lineup)(place)(TURN AFTER AND START CYCLE)\", new DriveStraightSide(true,true));\n\t\t//chooser.addObject(\"Side Gear Auto (place)\", new DriveToLeftRightFace(true,false,false,false));\n\t\t//chooser.addObject(\"Test DriveStraight Auto\", new DriveStraightPosition(10,5));\n\t\t//chooser.addObject(\"Center Gear Encoder Auto (place)\", new DriveStraightCenter());\n\t\t/*InterpreterGroup interp = new InterpreterGroup();\n\t\t(interp.init()){\n\t\t\tchooser.addObject(\"Interpreter\",interp);\n\t\t}*/\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\tSmartDashboard.putData(\"Auto Chooser\", chooser);\n\n\t\tRobot.drivebase.leftDrive1.setPosition(0);\n \tRobot.drivebase.rightDrive1.setPosition(0);\n \t\n\t\t\n \tRobot.leds.initializei2cBus();\n \tbyte mode = 0;\n \tRobot.leds.setMode(mode);\n \tgearcamera = CameraServer.getInstance();\n\t\t\n \tUsbCamera gearUsb = gearcamera.startAutomaticCapture();\n \tgearUsb.setFPS(25);\n \tgearUsb.setResolution(256, 144);\n\n\t\t//NetworkTable.setClientMode();\n \t//NetworkTable.setIPAddress(\"raspberrypi.local\");\n\t\t\n\t\t\n\t\t/*\n\t\t * new Thread(() -> { UsbCamera goalcamera =\n\t\t * CameraServer.getInstance().startAutomaticCapture();\n\t\t * goalcamera.setResolution(320, 240); goalcamera.setFPS(30);\n\t\t * goalcamera.setBrightness(1); goalcamera.setExposureManual(1);\n\t\t * \n\t\t * CvSink goalCvSink = CameraServer.getInstance().getVideo();\n\t\t * \n\t\t * Mat source = new Mat();\n\t\t * \n\t\t * while(!Thread.interrupted()) { goalCvSink.grabFrame(source);\n\t\t * goaloutputmat = source; } }).start();\n\t\t * goalPipeline.process(goaloutputmat);\n\t\t * \n\t\t * new Thread(() -> { UsbCamera gearcamera =\n\t\t * CameraServer.getInstance().startAutomaticCapture();\n\t\t * gearcamera.setResolution(320, 240); gearcamera.setFPS(30);\n\t\t * gearcamera.setBrightness(1); gearcamera.setExposureManual(1);\n\t\t * \n\t\t * CvSink gearCvSink = CameraServer.getInstance().getVideo();\n\t\t * \n\t\t * Mat source = new Mat();\n\t\t * \n\t\t * while(!Thread.interrupted()) { gearCvSink.grabFrame(source);\n\t\t * gearoutputmat = source; } }).start();\n\t\t * gearPipeline.process(gearoutputmat);\n\t\t */\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tupdate();\n\t\t\n\t\t//dashboard outputs\n\t\tdashboardOutput();\n\t\t\n\t\t\n\t\t\n\t\tif (tankDriveBool) {\n\t\t\ttankDrive();\n\t\t} \n\t\telse {\n\t\t\ttankDrive();\n\t\t}\n\t\tif (buttonA) {\n\t\t\ttest = true;\n\t\t\twhile (test) {\n\t\t\t\tcalibrate(10);\n\t\t\t\ttest = false;\n\t\t\t}\n\t\t}\n\t\tif (buttonY) {\n\t\t\tclimbMode = !climbMode;\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kRightRumble, 0.5);\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kLeftRumble, 0.5);\n\t\t\tTimer.delay(0.5);\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kRightRumble, 0);\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kLeftRumble, 0);\n\t\t}\n\t\tverticalMovement();\n\t\tgrab();\n\t}", "protected void initialize() {\n \tSystem.out.println(\"Running: TurnXDegrees\");\n \tstartingAngle = Robot.gyro.getRawAngleDegrees();\n \tisFin = false;\n \tsetTimeout(5);\n \tif(angleTarget < 0) {\n \t\tSystem.out.println(\"Turning Left...\");\n \t\tisTurningLeft = true;\n \t}else {\n \t\tSystem.out.println(\"Turning Right...\");\n \t\tisTurningLeft = false;\n \t}\n \t\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n\n //the below lines set up the configuration file\n BallSensor = hardwareMap.i2cDevice.get(\"BallSensor\");\n\n BallSensorreader = new I2cDeviceSynchImpl(BallSensor, I2cAddr.create8bit(0x3a), false);\n\n BallSensorreader.engage();\n\n sensorGyro = hardwareMap.gyroSensor.get(\"gyro\"); //Point to the gyro in the configuration file\n mrGyro = (ModernRoboticsI2cGyro)sensorGyro; //ModernRoboticsI2cGyro allows us to .getIntegratedZValue()\n mrGyro.calibrate(); //Calibrate the sensor so it knows where 0 is and what still is. DO NOT MOVE SENSOR WHILE BLUE LIGHT IS SOLID\n\n //touch = hardwareMap.touchSensor.get(\"touch\");\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n telemetry.update();\n\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n// if (oi.driveStick.getRawButton(4)) {\n// System.out.println(\"Left Encoder Distance: \" + RobotMap.leftDriveEncoder.getDistance());\n// System.out.println(\"RightEncoder Distance: \" + RobotMap.rightDriveEncoder.getDistance());\n// }\n\n }", "public void gyroHold( double speed, double angle, double holdTime) {\n\n ElapsedTime holdTimer = new ElapsedTime();\n\n // keep looping while we have time remaining.\n holdTimer.reset();\n while (opModeIsActive() && (holdTimer.time() < holdTime)) {\n // Update telemetry & Allow time for other processes to run.\n onHeading(speed, angle, P_TURN_COEFF);\n telemetry.update();\n }\n\n // Stop all motion;\n leftMotor.setPower(0);\n rightMotor.setPower(0);\n }", "protected void initialize() {\n \tRobot.driveBase.resetEnc(2);\n \tRobot.gyro.reset();\n \t//stop extraneous moving parts\n }", "protected void initialize() {\n //drivetrain.initGyro();\n }", "public void gyroDrive ( double speed,\n double distance,\n double angle) {\n\n int newLeftTarget;\n int newRightTarget;\n int moveCounts;\n double max;\n double error;\n double steer;\n double leftSpeed;\n double rightSpeed;\n\n // Ensure that the opmode is still active\n if (opModeIsActive()) {\n\n // Determine new target position, and pass to motor controller\n moveCounts = (int)(distance * COUNTS_PER_INCH);\n newLeftTarget = robot.leftDrive.getCurrentPosition() + moveCounts;\n newRightTarget = robot.rightDrive.getCurrentPosition() + moveCounts;\n\n // Set Target and Turn On RUN_TO_POSITION\n robot.leftDrive.setTargetPosition(newLeftTarget);\n robot.rightDrive.setTargetPosition(newRightTarget);\n\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // start motion.\n speed = Range.clip(Math.abs(speed), 0.0, 1.0);\n robot.leftDrive.setPower(speed);\n robot.rightDrive.setPower(speed);\n\n // keep looping while we are still active, and BOTH motors are running.\n while (opModeIsActive() &&\n (robot.leftDrive.isBusy() && robot.rightDrive.isBusy())) {\n\n // adjust relative speed based on heading error.\n error = getError(angle);\n steer = getSteer(error, P_DRIVE_COEFF);\n\n // if driving in reverse, the motor correction also needs to be reversed\n if (distance < 0)\n steer *= -1.0;\n\n leftSpeed = speed - steer;\n rightSpeed = speed + steer;\n\n // Normalize speeds if either one exceeds +/- 1.0;\n max = Math.max(Math.abs(leftSpeed), Math.abs(rightSpeed));\n if (max > 1.0)\n {\n leftSpeed /= max;\n rightSpeed /= max;\n }\n\n robot.leftDrive.setPower(leftSpeed);\n robot.rightDrive.setPower(rightSpeed);\n\n // Display drive status for the driver.\n telemetry.addData(\"Err/St\", \"%5.1f/%5.1f\", error, steer);\n telemetry.addData(\"Target\", \"%7d:%7d\", newLeftTarget, newRightTarget);\n telemetry.addData(\"Actual\", \"%7d:%7d\", robot.leftDrive.getCurrentPosition(),\n robot.rightDrive.getCurrentPosition());\n telemetry.addData(\"Speed\", \"%5.2f:%5.2f\", leftSpeed, rightSpeed);\n telemetry.update();\n }\n\n // Stop all motion;\n robot.leftDrive.setPower(0);\n robot.rightDrive.setPower(0);\n\n // Turn off RUN_TO_POSITION\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n }", "protected void initialize() {\n\t\tRobot.resetSensors();\n\t}", "public static void wheelRadCheck() {\n\t\t// reset the motor\n\t\tfor (EV3LargeRegulatedMotor motor : new EV3LargeRegulatedMotor[] { leftMotor, rightMotor }) {\n\t\t\tmotor.stop();\n\t\t\tmotor.setAcceleration(2000);\n\t\t}\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// There is nothing to be done here\n\t\t}\n\t\t//move the robot forward until the Y asis is detected\n\t\tleftMotor.setSpeed(200);\n\t\trightMotor.setSpeed(200);\n\t\tleftMotor.rotate(Navigation_Test.convertDistance(Project_Test.WHEEL_RAD, 2*Project_Test.TILE_SIZE), true);\n\t\trightMotor.rotate(Navigation_Test.convertDistance(Project_Test.WHEEL_RAD, 2*Project_Test.TILE_SIZE), false);\n\t}", "public static Gyro getGyro() {\n return sGyro;\n }", "public void gyroDrive ( double speed,\n double distance,\n double angle) {\n\n\n // Ensure that the opmode is still activ\n\n // Determine new target position, and pass to motor controller\n moveCounts = (int)(distance * COUNTS_PER_INCH);\n newLeftTarget = leftmotor.getCurrentPosition() + moveCounts;\n newRightTarget = rightmotor.getCurrentPosition() + moveCounts;\n\n // Set Target and Turn On RUN_TO_POSITION\n leftmotor.setTargetPosition(newLeftTarget);\n rightmotor.setTargetPosition(newRightTarget);\n\n leftmotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n rightmotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // start motion.\n speed = Range.clip(Math.abs(speed), 0.0, 1.0);\n\n maxSpeed = speed;\n speed = INCREMENT;\n rampUp = true;\n\n leftmotor.setPower(speed);\n rightmotor.setPower(speed);\n\n // keep looping while we are still active, and BOTH motors are running.\n while ((leftmotor.isBusy() && rightmotor.isBusy())) {\n if (rampUp){\n speed += INCREMENT ;\n if (speed >= maxSpeed ) {\n speed = maxSpeed;\n }\n }\n\n // adjust relative speed based on heading error.\n error = getError(angle);\n steer = getSteer(error, P_DRIVE_COEFF);\n\n // if driving in reverse, the motor correction also needs to be reversed\n if (distance < 0)\n steer *= -1.0;\n\n leftSpeed = speed - steer;\n rightSpeed = speed + steer;\n\n // Normalize speeds if either one exceeds +/- 1.0;\n max = Math.max(Math.abs(leftSpeed), Math.abs(rightSpeed));\n if (max > 1.0)\n {\n leftSpeed /= max;\n rightSpeed /= max;\n }\n\n leftmotor.setPower(leftSpeed);\n rightmotor.setPower(rightSpeed);\n }\n\n // Stop all motion;\n leftmotor.setPower(0);\n rightmotor.setPower(0);\n\n // Turn off RUN_TO_POSITION\n leftmotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightmotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n gyroHold(TURN_SPEED,angle,0.166);\n\n }", "public final void GyroTurn (int degrees, double power)\n {\n //Define gyro angle\n float GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n\n //While the gyro is reading degrees that is not the desired, turn right or left\n while (GyroAngle != degrees)\n {\n //\n robot.DriveLeftBack.setPower(-.1);\n robot.DriveRightBack.setPower(.1);\n robot.DriveRightFront.setPower(.1);\n robot.DriveLeftFront.setPower(-.1);\n\n //Update gyro angle\n GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n }\n\n //Stop\n Stop();\n }", "@Override public void run()\n {\n robot.angles = robot.imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n robot.gravity = robot.imu.getGravity();\n }", "public void right90 () {\n saveHeading = 0; //modernRoboticsI2cGyro.getHeading();\n gyroTurn(TURN_SPEED, saveHeading - 90);\n gyroHold(HOLD_SPEED, saveHeading - 90, 0.5);\n }", "@Override\n\tpublic void robotInit() {\n\t\tfr = new Spark(HardwareMap.PWM.DRIVE_FR);\n\t\tfl = new Spark(HardwareMap.PWM.DRIVE_FL);\n\t\tbr = new Spark(HardwareMap.PWM.DRIVE_BR);\n\t\tbl = new Spark(HardwareMap.PWM.DRIVE_BL);\n\t\t\n\t\t// Create the side modules\n\t\tleftGroup = new SpeedControllerGroup(bl, fl);\n\t\trightGroup = new SpeedControllerGroup(br, fr);\n\n\t\t// Init the the drive train\n\t\tdrive = new DifferentialDrive(leftGroup, rightGroup);\n\t\t\n\t\t//Init the gyro\n\t\tgyro.calibrate();\n\t\tSmartDashboard.putData(\"Gyro\", gyro);\n\t\t\n\t\tdrive.setSafetyEnabled(false);\n\t\tthis.setName(Subsystems.DRIVE);\n\t}", "@Override\n\tpublic void robotInit() {\n\t\tleftDriveBack = new VictorSP(0); // PWM Port, madke sure this is set correctly.\n\t\tleftDriveFront = new VictorSP(1);\n\t\t\n\t\trightDriveFront = new VictorSP(2);\n\t\trightDriveBack = new VictorSP(3);\n\t\t\n\t\tleftIntake = new Spark(5);\n\t\trightIntake = new Spark(6);\n\t\t\n\t\tarmMotor = new TalonSRX(10);\n\t\tarmMotor.setNeutralMode(NeutralMode.Brake);\n\t\tarmMotor.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Absolute, 0, 0);\n\t\tarmMotor.configPeakCurrentLimit(30, 0);\n\t\tarmMotor.configPeakCurrentDuration(250, 0);\n\t\tarmMotor.configContinuousCurrentLimit(20, 0);\n\t\tarmMotor.configClosedloopRamp(0.25, 0);\n\t\tarmMotor.configOpenloopRamp(0.375, 0);\n\t\tarmMotor.enableCurrentLimit(true);\n\t\t\n\t\tarmMotor.configPeakOutputForward(1.0, 0);\n\t\tarmMotor.configPeakOutputReverse(-1.0, 0);\n\t\t\n\t\tarmMotor.config_kP(0, 0.0, 0);\n\t\t\n\t\tarmSetpoint = armMotor.getSelectedSensorPosition(0);\n\t\t\n\t\tstick = new Joystick(0);\n\t\tstickReversed = false;\n\t\txbox = new XboxController(1); // USB port, set in driverstation.\n\t\t\n\t\tdriveCamera = CameraServer.getInstance().startAutomaticCapture(0);\n\t}", "public double curSwing(){\r\n return swingGyro.getAngle();\r\n }" ]
[ "0.73169625", "0.70279145", "0.70232147", "0.6968319", "0.69308984", "0.6872243", "0.6769964", "0.67047054", "0.6591379", "0.6569881", "0.65215397", "0.6485305", "0.64503837", "0.6445929", "0.6421638", "0.64072275", "0.6390579", "0.63828295", "0.63510036", "0.62686527", "0.6263765", "0.62369674", "0.62269515", "0.62268215", "0.61853766", "0.6179892", "0.616982", "0.61668926", "0.6159961", "0.6159507", "0.6128403", "0.6123708", "0.6107625", "0.6084394", "0.6084275", "0.6061327", "0.6053219", "0.6047664", "0.6038198", "0.60381216", "0.6028045", "0.60242206", "0.5999913", "0.59914404", "0.5984944", "0.5984704", "0.5981599", "0.59795123", "0.59676975", "0.5966099", "0.59655774", "0.5964298", "0.5963333", "0.5951096", "0.5939759", "0.5931794", "0.59316444", "0.59315455", "0.5918228", "0.59071726", "0.59009945", "0.58953345", "0.5892202", "0.58894753", "0.586926", "0.5868566", "0.58677596", "0.5867527", "0.5863597", "0.5862677", "0.5859635", "0.58543724", "0.58541197", "0.5848625", "0.5846321", "0.5833136", "0.58326346", "0.58142316", "0.58115447", "0.5808514", "0.5804021", "0.5802905", "0.57960767", "0.57948554", "0.57910234", "0.57895786", "0.57793224", "0.57771534", "0.575078", "0.57472956", "0.5739574", "0.5738438", "0.5731134", "0.5722739", "0.5722561", "0.571553", "0.57150775", "0.5703828", "0.5702059", "0.5688797" ]
0.6411034
15
this polls the onboard gyro, which, when the robot boots, assumes and angle of zero
public double getGyroInDeg(){ return 0.0;//TODO:Pull gyro in radians and convert to degrees }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void initialize() {\n \tRobot.gyroSubsystem.reset();\n \tstartAngle = Robot.gyroSubsystem.gyroPosition();\n \ttargetAngle = startAngle + goal;\n }", "public void initGyro() {\r\n\t\tresult = new AccumulatorResult();\r\n\t\tif (m_analog1 == null || m_analog2 == null) {\r\n\t\t\tSystem.out.println(\"Null m_analog\");\r\n\t\t}\r\n\t\tm_voltsPerDegreePerSecond = kDefaultVoltsPerDegreePerSecond;\r\n\t\t\r\n\t\t\r\n\t\tm_analog1.setAverageBits(kAverageBits);\r\n\t\tm_analog1.setOversampleBits(kOversampleBits);\r\n\t\t\r\n\t\tm_analog2.setAverageBits(kAverageBits);\r\n\t\tm_analog2.setOversampleBits(kOversampleBits);\r\n\t\t\r\n\t\t\r\n\t\tdouble sampleRate = kSamplesPerSecond\r\n\t\t\t\t* (1 << (kAverageBits + kOversampleBits));\r\n\t\tAnalogInput.setGlobalSampleRate(sampleRate);\r\n\t\tTimer.delay(1.0);\r\n\r\n\t\tm_analog1.initAccumulator();\r\n\t\tm_analog1.resetAccumulator();\r\n\t\tm_analog2.initAccumulator();\r\n\t\tm_analog2.resetAccumulator();\r\n\r\n\t\tTimer.delay(kCalibrationSampleTime);\r\n\r\n\t\tfor(int i =0 ; i < mAnalogs.length; i++)\r\n\t\t{\r\n\t\t\tmAnalogs[i].getAccumulatorOutput(result);\r\n\t\r\n\t\t\tm_centers[i]= (int) ((double) result.value / (double) result.count + .5);\r\n\t\r\n\t\t\tm_offsets[i] = ((double) result.value / (double) result.count)\r\n\t\t\t\t\t- m_centers[i];\r\n\t\r\n\t\t\tmAnalogs[i].setAccumulatorCenter(m_centers[i]);\r\n\t\t\tmAnalogs[i].resetAccumulator();\r\n\t\r\n\t\t\t\r\n\t\t\t//LiveWindow.addSensor(\"Gyro\", m_analog.getChannel(), this);\r\n\t\t}\r\n\t\tif(mMode == TWO_CANCEL) setDeadband(kCancelDeadband);\r\n\t\telse if(mMode == TWO_DEADBAND) {\r\n\t\t\tsetDeadband1(0.0);\r\n\t\t\tmAccumulatedAngle = 0;\r\n\t\t}\r\n\t\t\r\n\t\tmOffset = 0;\r\n\t}", "public Gyro (){\n try {\n /* Communicate w/navX MXP via the MXP SPI Bus. */\n /* Alternatively: I2C.Port.kMXP, SerialPort.Port.kMXP or SerialPort.Port.kUSB */\n /* See http://navx-mxp.kauailabs.com/guidance/selecting-an-interface/ for details. */\n gyro_board = new AHRS(SPI.Port.kMXP);\n\n last_world_linear_accel_x = gyro_board.getWorldLinearAccelX();\n last_world_linear_accel_y = gyro_board.getWorldLinearAccelY();\n last_check_time = Timer.getFPGATimestamp();\n\n initial_offset = gyro_board.getYaw();\n } catch (RuntimeException ex ) {\n DriverStation.reportError(\"Error instantiating navX MXP: \" + ex.getMessage(), true);\n }\n\n\n }", "private void CalibrateGyro() {\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.mode = BNO055IMU.SensorMode.IMU;\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n imu.initialize(parameters);\n while (!imu.isGyroCalibrated()){}\n }", "public void calibrateGyro() {\n gyro.SetYaw(0);\n }", "protected void initialize() {\n if ( Math.abs( m_autorotateangle - Robot.drive.gyroGetAngle()) <= 45) {\n rampthreshold = 35;\n } else { // > 45 degrees}\n rampthreshold = Math.abs( m_autorotateangle - Robot.drive.gyroGetAngle()) / 2.5;\n }\n\n \tsetTimeout(m_timeout);\n\n }", "public void autonomous() {\n /*myRobot.setSafetyEnabled(false);\n myRobot.drive(-0.5, 0.0);\t// drive forwards half speed\n Timer.delay(2.0);\t\t// for 2 seconds\n myRobot.drive(0.0, 0.0);\t// stop robot\n */\n \t/*gyro.reset();\n \twhile(isAutonomous()){\n \t\tdouble angle = gyro.getAngle();\n \tmyRobot.drive(0, -angle * Kp);\t\n \tTimer.delay(.004);\n \t}\n \tmyRobot.drive(0.0, 0.0);\n \t*/\n }", "protected void initialize() {\n \tDrivetrain.gyro.reset();\n }", "public void resetGyroAngle() {\n\t\tgyro.reset();\n\t}", "public void resetGyro(){\n //TODO:Reset the gyro(zero it)\n }", "public void initialize() {\n\n Robot.driveSubsystem.resetGyro();\n\n }", "public void updateGyro() {\n\t\tangleToForward = gyro.getAngle();\n\t\tif (angleToForward >= 360) {\n\t\t\tangleToForward -= 360;\n\t\t} else if (angleToForward < 0) {\n\t\t\tangleToForward += 360;\n\t\t}\n\n\t}", "@Override\n public void teleopPeriodic() {\n double pi4 = (double)Math.PI/4;\n/*\n double deadzoneX = 0.1;\n double multiplierX = 1/deadzoneX;\n double deadzoneY = 0.1;\n double multiplierY = 1/deadzoneY;\n\n double maxSpeed = stick.getThrottle() * 1f;\nstick.getX()/Math.abs(stick.getX())\n double stickX;\n if (Math.abs(stick.getX())< deadzoneX){\n stickX = 0;\n }\n\n else {\n stickX = ((stick.getMagnitude() * Math.sin(stick.getDirectionRadians())) - deadzoneX)*multiplierX;\n }\n\n \n double stickY;\n if (Math.abs(stick.getY())< deadzoneY){\n stickY = 0;\n }\n\n else {\n stickY = (stick.getMagnitude() * Math.cos(stick.getDirectionRadians()) - deadzoneY)*multiplierY;\n }\n \n\n double stickTwist = stick.getTwist();\n\n double leftFrontForwardsPower = -stickY;\n double rightFrontForwardsPower = stickY;\n double leftBackForwardsPower = -stickY;\n double rightBackForwardsPower = stickY;\n\n double leftFrontSidePower = -stickX;\n double rightFrontSidePower = -stickX;\n double leftBackSidePower = +stickX;\n double rightBackSidePower = stickX;\n\n double leftFrontRotatePower = -stickTwist;\n double rightFrontRotatePower = -stickTwist;\n double leftBackRotatePower = -stickTwist;\n double rightBackRotatePower = -stickTwist;\n\n */\n\n /* get gyro from robot\n set gyro tto original gyro\n void()\n\n get X for joystick\n get Y for Joystick\n\n get gyro for robot\n\n if X = 0\n then Joystick angle pi/2\n else\n then Joystick angle = arctan(Y/X)\n\n newGyro = original gyro - gyro\n\n xfinal = cos(newGyro+joystickangle) * absolute(sqrt(x^2+y^2))\n yfinal = sin(newGyro+joystickangle) * absolute(sqrt(x^2+y^2))\n*/\n\n//Xbox COntroller\n \n double maxSpeed = stick.getThrottle() * 0.2f;\n double maxRot = 1f;\n\n double controllerX = -controller.getX(Hand.kRight);\n double controllerY = controller.getY(Hand.kRight);\n double joyAngle;\n boolean gyroRestart = controller.getAButtonPressed();\n\n if (gyroRestart){\n gyro.reset();\n origGyro = Math.toRadians(gyro.getAngle());\n }\n\n double mainGyro = Math.toRadians(gyro.getAngle());\n/*\n if (controllerX == 0 && controllerY > 0){\n joyAngle = (3*Math.PI)/2;\n }\n\n \n if (controllerX == 0 && controllerY < 0){\n joyAngle = Math.PI/2;\n }\n\n else{\n joyAngle = Math.atan(controllerY/controllerX);\n }\n\n if (controllerX > 0 && controllerY < 0){\n joyAngle = Math.abs(joyAngle + Math.toRadians(180));\n }\n if (controllerX > 0 && controllerY > 0){\n joyAngle -= Math.toRadians(180);\n }\n / * if (controllerX < 0 && controllerY > 0){\n joyAngle -= Math.toRadians(270);\n }* /\n*/\n joyAngle = Math.atan2(controllerY, controllerX);\n\n double newGyro = origGyro - mainGyro;\n //double newGyro = 0;\n\n double controllerTurn = -controller.getX(Hand.kLeft)*maxRot;\n\n double magnitude = Math.abs(Math.sqrt(Math.pow(controllerX,2) + Math.pow(controllerY, 2)));\n\n double xFinal = Math.cos(newGyro + joyAngle) * magnitude;\n double yFinal = Math.sin(newGyro + joyAngle) * magnitude;\n\n\n /* \n double leftFrontForwardsPower = -controllerY;\n double rightFrontForwardsPower = controllerY;\n double leftBackForwardsPower = -controllerY;\n double rightBackForwardsPower = controllerY;\n\n double leftFrontSidePower = -controllerX;\n double rightFrontSidePower = -controllerX;\n double leftBackSidePower = controllerX;\n double rightBackSidePower = controllerX;\n*/\n \n double leftFrontForwardsPower = -yFinal;\n double rightFrontForwardsPower = yFinal;\n double leftBackForwardsPower = -yFinal;\n double rightBackForwardsPower = yFinal;\n\n double leftFrontSidePower = -xFinal;\n double rightFrontSidePower = -xFinal;\n double leftBackSidePower = xFinal;\n double rightBackSidePower = xFinal;\n \n double leftFrontRotatePower = -controllerTurn;\n double rightFrontRotatePower = -controllerTurn;\n double leftBackRotatePower = -controllerTurn;\n double rightBackRotatePower = -controllerTurn;\n\n double forwardsWeight = 1;\n double sideWeight = 1;\n double rotateWeight = 1;\n\n double leftFrontPower = leftFrontForwardsPower * forwardsWeight + leftFrontSidePower * sideWeight + leftFrontRotatePower * rotateWeight;\n double rightFrontPower = rightFrontForwardsPower * forwardsWeight + rightFrontSidePower * sideWeight + rightFrontRotatePower * rotateWeight;\n double leftBackPower = leftBackForwardsPower * forwardsWeight + leftBackSidePower * sideWeight + leftBackRotatePower * rotateWeight;\n double rightBackPower = rightBackForwardsPower * forwardsWeight + rightBackSidePower * sideWeight + rightBackRotatePower * rotateWeight;\n\n leftFrontPower *= maxSpeed;\n rightFrontPower *= maxSpeed;\n leftBackPower *= maxSpeed;\n rightBackPower *= maxSpeed;\n\n\n double largest = Math.max( \n Math.max( Math.abs( leftFrontPower),\n Math.abs(rightFrontPower)),\n Math.max( Math.abs( leftBackPower), \n Math.abs( rightBackPower)));\n\n if (largest > 1) {\n leftFrontPower /= largest;\n rightFrontPower /= largest;\n leftBackPower /= largest;\n rightBackPower /= largest;\n }\n \n \n leftFrontMotor.set(leftFrontPower);\n rightFrontMotor.set(rightFrontPower); \n leftBackMotor.set(leftBackPower);\n rightBackMotor.set(rightBackPower);\n\n SmartDashboard.putNumber(\"Main Gyro\", mainGyro);\n SmartDashboard.putNumber(\"Original Gyro\", origGyro);\n SmartDashboard.putNumber(\"New Gyro\", newGyro);\n SmartDashboard.putNumber(\"Controller X\", controllerX);\n SmartDashboard.putNumber(\"Controller Y\", controllerY);\n SmartDashboard.putNumber(\"Magnitude \", magnitude);\n SmartDashboard.putNumber(\"Largest\", largest);\n SmartDashboard.putNumber(\"Joystick Angle\", Math.toDegrees(joyAngle));\n SmartDashboard.putNumber(\"X final\", xFinal);\n SmartDashboard.putNumber(\"Y final\", yFinal);\n SmartDashboard.putNumber(\"Left Front Power\", leftFrontPower);\n SmartDashboard.putNumber(\"Right Front Power\", rightFrontPower);\n SmartDashboard.putNumber(\"Left Back Power\", leftBackPower);\n SmartDashboard.putNumber(\"Right Back Power\", rightBackPower);\n }", "public void testGyroAngleCalibratedParameters() {\n // Get calibrated parameters to make new Gyro with parameters\n final double calibratedOffset = m_tpcam.getGyro().getOffset();\n final int calibratedCenter = m_tpcam.getGyro().getCenter();\n m_tpcam.freeGyro();\n m_tpcam.setupGyroParam(calibratedCenter, calibratedOffset);\n Timer.delay(TiltPanCameraFixture.RESET_TIME);\n // Repeat tests\n testInitial(m_tpcam.getGyroParam());\n testDeviationOverTime(m_tpcam.getGyroParam());\n testGyroAngle(m_tpcam.getGyroParam());\n }", "@Override\n public void robotInit() {\n\n // Motor controllers\n leftMotor = new CANSparkMax(1, MotorType.kBrushless);\n leftMotor.setInverted(false);\n leftMotor.setIdleMode(IdleMode.kBrake);\n\n CANSparkMax leftSlave1 = new CANSparkMax(2, MotorType.kBrushless);\n leftSlave1.setInverted(false);\n leftSlave1.setIdleMode(IdleMode.kBrake);\n leftSlave1.follow(leftMotor);\n\n CANSparkMax leftSlave2 = new CANSparkMax(3, MotorType.kBrushless);\n leftSlave2.setInverted(false);\n leftSlave2.setIdleMode(IdleMode.kBrake);\n leftSlave2.follow(leftMotor);\n\n rightMotor = new CANSparkMax(4, MotorType.kBrushless);\n rightMotor.setInverted(false);\n rightMotor.setIdleMode(IdleMode.kBrake);\n\n CANSparkMax rightSlave1 = new CANSparkMax(5, MotorType.kBrushless);\n rightSlave1.setInverted(false);\n rightSlave1.setIdleMode(IdleMode.kBrake);\n rightSlave1.follow(leftMotor);\n\n CANSparkMax rightSlave2 = new CANSparkMax(6, MotorType.kBrushless);\n rightSlave2.setInverted(false);\n rightSlave2.setIdleMode(IdleMode.kBrake);\n rightSlave2.follow(leftMotor);\n\n // Encoders\n leftEncoder = leftMotor.getEncoder();\n rightEncoder = rightMotor.getEncoder();\n\n // Gyro\n gyro = new ADXRS450_Gyro();\n\n }", "public double getGyroInRad(){\n return 0.0;//TODO:Pull and return gyro in radians\n }", "public interface Gyro {\n /**\n * Get the amount of time the gyro spends calibrating\n *\n * @return Length of gyro calibration period\n */\n double getCalibrationPeriod();\n\n /**\n * Set the amount of time the gyro will spend calibrating\n *\n * @param calibrationPeriod Desired length of gyro calibration period\n */\n void setCalibrationPeriod(double calibrationPeriod);\n\n /**\n * Reset calibration and angle monitoring\n */\n void fullReset();\n\n /**\n * Starts calibrating the gyro. Resets the calibration value and begins\n * sampling gyro values to get the average 0 value. Sample time determined\n * by calibrationTicks\n */\n void startCalibration();\n\n /**\n * Finishes calibration. Stops calibrating and sets the calibration value.\n */\n void finishCalibration();\n\n /**\n * Gets the zero point for rate measurement\n *\n * @return The offset found by calibration\n */\n double getCalibrationOffset();\n\n /**\n * Checks if the gyro is currently calibrating.\n * If it is, measured rate and angle values are not guaranteed to be accurate.\n *\n * @return Whether the gyro is currently calibrating\n */\n boolean isCalibrating();\n\n /**\n * Gets the rate of yaw change from the gyro\n *\n * @return The rate of yaw change in degrees per second, positive is clockwise\n */\n double getRate();\n\n /**\n * Gets the yaw of the gyro\n *\n * @return The yaw of the gyro in degrees\n */\n double getAngle();\n\n /**\n * Resets the current angle of the gyro to zero\n */\n void resetAngle();\n}", "@Override public void init_loop() {\n if (gyro.isCalibrated()) {\n telemetry.addData(\"Gyro\", \"Calibrated\");\n }\n\n /** Place any code that should repeatedly run after INIT is pressed but before the op mode starts here. **/\n }", "@Override\n public void run() {\n hdt.gyroTurn180Fast(1500);\n hdt.gyroTurn180(1100);\n //sleep(1300);\n }", "@Override\n public void teleopPeriodic() {\n double x = xcontroller2.getX(Hand.kLeft);\n //double y = xcontroller1.getTriggerAxis(Hand.kRight) - xcontroller1.getTriggerAxis(Hand.kLeft);\n // For testing just use left joystick. Use trigger axis code for GTA Drive/\n double y = -xcontroller2.getY(Hand.kLeft);\n double z = xcontroller2.getX(Hand.kRight);\n double yaw = imu.getAngleZ();\n RobotDT.driveCartesian(x, y, 0, 0);\n \n\n // After you spin joystick R3 press A button to reset gyro angle\n if (xcontroller1.getAButtonPressed()) {\n imu.reset();\n }\n \n if (xcontroller2.getBButtonPressed()){\n mGPM.goSpongeHatch();\n }\n\n if (xcontroller2.getXButtonPressed()){\n mGPM.goPineHome();\n \n }\n\n\n /** \n * If Bumpers are pressed then Cargo Intake Motor = -1 for Intake \n *if Triggers are pressed set value to 1 for Outtake\n *If triggers are released set value to 0*/\n if(xcontroller2.getBumperPressed(Hand.kLeft) && xcontroller2.getBumperPressed(Hand.kRight)) {\n mGPM.setCargoMotor(-1);\n } else if((xcontroller2.getTriggerAxis(Hand.kLeft) >0.75) && (xcontroller2.getTriggerAxis(Hand.kRight) >0.75)) {\n mGPM.setCargoMotor(1);\n } else{\n mGPM.setCargoMotor(0);\n }\n }", "@Override\n\tpublic void testPeriodic(){\n\t\t//Testing xbox buttons, joysticks and triggers\n\t\tOI.refreshAll();\n//\t\t//System.out.println(\"Left Y = \" + xbox.LeftStick.Y);\n//\t\t//System.out.println(\"Right Y = \" + xbox.RightStick.Y);\n//\t\t\n//\t\t\n//\t\tfinal double cpr = 360.0;\n//\t\tfinal double encoder_angular_distance_per_pulse = 2.0*Math.PI / cpr;\n//\t\tfinal double wheel_radius = 2.5; // .564 in (18T 5mm pitch)\n//\t\tfinal double encLinearDistancePerPulse = wheel_radius * encoder_angular_distance_per_pulse; //2.0 * Math.PI / cpr;\n//\t\t\n//\t\tSystem.out.println(enc.getRaw()*encLinearDistancePerPulse);\n//\t\t\n\t\t\n\t\t//System.out.println(gyro.getAngle(MPU6050.Axis.X));\n\n\t //PNEUMATICS\n\t //c.setClosedLoopControl(true);\n\t //c.setClosedLoopControl(false);\n\t}", "public void resetGyro () {\n gyro.reset();\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = true;\n\t\tisTeleoperated = false;\n\t\tisEnabled = true;\n\t\tvisionNetworkTable.getGearData();\n\t\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\t\n\t\tupdateLedState();\n\t\t//visionNetworkTable.getHighData();\n\t}", "@Override\n public void runOpMode() {\n androidGyroscope = new AndroidGyroscope();\n\n // Put initialization blocks here.\n if (androidGyroscope.isAvailable()) {\n telemetry.addData(\"Status\", \"GyroAvailable\");\n }\n waitForStart();\n if (opModeIsActive()) {\n // Put run blocks here.\n androidGyroscope.startListening();\n androidGyroscope.setAngleUnit(AngleUnit.DEGREES);\n while (opModeIsActive()) {\n telemetry.addData(\"X Axis\", androidGyroscope.getX());\n telemetry.update();\n }\n }\n }", "void gyroSafety(){\n }", "@Override\n public void init_loop() {\n\n\n if (robot.gyro.isCalibrating()) {\n telemetry.addData(\"we calibrating\", \"\");\n } else {\n telemetry.addData(\"Hell naw\", \"\");\n }\n telemetry.update();\n\n\n // Send telemetry message to signify robot waiting;\n // telemetry.addData(\"Say\", \"Dick\"); //\n // telemetry.update();\n\n // Wait for the game to start (driver presses PLAY)\n\n\n // run until the end of the match (driver presses STOP)\n }", "public void gyroTurn ( double speed, double angle) {\n\n // keep looping while we are still active, and not on heading.\n while (!onHeading(speed, angle, P_TURN_COEFF) ) {\n // Update telemetry & Allow time for other processes to run.\n try {\n sleep(50);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n }", "public void zeroGyroscope() {\n mGyroOffset = getGyroscopeRotation(false);\n }", "public double GyroPosition() {\n\t\tswitch (gyroToUse) {\n\t\tcase ANALOG:\n\t\t\tgyroAngle = gyro.getAngle();\n\t\t\tbreak;\n\n\t\tcase SPI:\n\t\t\tgyroAngle = spi.getAngle();\n\t\t\tbreak;\n\n\t\tcase IMU:\n\t\t\tgyroAngle = imu.getAngleZ();\n\t\t\tbreak;\n\t\t}\n\n\t\tgyroAngle = gyroAngle % 360;\n\n\t\t// SmartDashboard.putNumber(\"gyroAngle\", gyroAngle);\n\t\treturn gyroAngle;\n\n\t}", "protected void initialize() {\n \t starttime = Timer.getFPGATimestamp();\n \tthis.startAngle = RobotMap.navx.getAngle();\n \tangleorientation.setSetPoint(RobotMap.navx.getAngle());\n \t\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \n //settting talon control mode\n \tRobotMap.motorLeftTwo.changeControlMode(TalonControlMode.MotionMagic);\t\t\n\t\tRobotMap.motorLeftOne.changeControlMode(TalonControlMode.Follower);\t\n\t\tRobotMap.motorRightTwo.changeControlMode(TalonControlMode.MotionMagic);\t\n\t\tRobotMap.motorRightOne.changeControlMode(TalonControlMode.Follower);\n\t\t//setting peak and nominal output voltage for the motors\n\t\tRobotMap.motorLeftTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorLeftTwo.configNominalOutputVoltage(0.00f, 0.0f);\n\t\tRobotMap.motorRightTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorRightTwo.configNominalOutputVoltage(0.0f, 0.0f);\n\t\t//setting who is following whom\n\t\tRobotMap.motorLeftOne.set(4);\n\t\tRobotMap.motorRightOne.set(3);\n\t\t//setting pid value for both sides\n\t//\tRobotMap.motorLeftTwo.setCloseLoopRampRate(1);\n\t\tRobotMap.motorLeftTwo.setProfile(0);\n\t RobotMap.motorLeftTwo.setP(0.000014f);\n \tRobotMap.motorLeftTwo.setI(0.00000001);\n\t\tRobotMap.motorLeftTwo.setIZone(0);//325);\n\t\tRobotMap.motorLeftTwo.setD(1.0f);\n\t\tRobotMap.motorLeftTwo.setF(this.fGainLeft+0.014);//0.3625884);\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t RobotMap.motorRightTwo.setCloseLoopRampRate(1);\n\t RobotMap.motorRightTwo.setProfile(0);\n\t\tRobotMap.motorRightTwo.setP(0.000014f);\n\t\tRobotMap.motorRightTwo.setI(0.00000001);\n\t\tRobotMap.motorRightTwo.setIZone(0);//325);\n\t\tRobotMap.motorRightTwo.setD(1.0f);\n\t\tRobotMap.motorRightTwo.setF(this.fGainRight);// 0.3373206);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t\t//setting Acceleration and velocity for the left\n\t\tRobotMap.motorLeftTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorLeftTwo.setMotionMagicCruiseVelocity(250);\n\t\t//setting Acceleration and velocity for the right\n\t\tRobotMap.motorRightTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorRightTwo.setMotionMagicCruiseVelocity(250);\n\t\t//resets encoder position to 0\t\t\n\t\tRobotMap.motorLeftTwo.setEncPosition(0);\n\t\tRobotMap.motorRightTwo.setEncPosition(0);\n\t //Set Allowable error for the loop\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(300);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(300);\n\t\t\n\t\t//sets desired endpoint for the motors\n RobotMap.motorLeftTwo.set(motionMagicEndPoint);\n RobotMap.motorRightTwo.set(-motionMagicEndPoint );\n \t\n }", "public void gyroTurn(int degrees, double power) throws InterruptedException{\n //restart angle tracking\n resetAngle();\n\n if(degrees < 0){\n turnClockwise(power);\n }else if(degrees > 0){\n turnCounterClockwise(power);\n }else{\n return;\n }\n\n //Rotate until current angle is equal to the target angle\n if (degrees < 0){\n while (opMode.opModeIsActive() && getAngle() > degrees){\n composeAngleTelemetry();\n //display the target angle\n telemetry.addData(\"Target angle\", degrees);\n telemetry.update();\n }\n }else{\n while (opMode.opModeIsActive() && getAngle() < degrees) {\n composeAngleTelemetry();\n //display the target angle\n telemetry.addData(\"Target angle\", degrees);\n telemetry.update();\n }\n }\n\n completeStop();\n //Wait .5 seconds to ensure robot is stopped before continuing\n Thread.sleep(500);\n resetAngle();\n }", "@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n leftFrontMotor = new CANSparkMax(10, MotorType.kBrushless);\n leftBackMotor = new CANSparkMax(11, MotorType.kBrushless);\n rightFrontMotor = new CANSparkMax(12, MotorType.kBrushless);\n rightBackMotor = new CANSparkMax(13, MotorType.kBrushless);\n leftFrontMotor.setIdleMode(IdleMode.kCoast);\n leftBackMotor.setIdleMode(IdleMode.kCoast);\n rightFrontMotor.setIdleMode(IdleMode.kCoast);\n rightBackMotor.setIdleMode(IdleMode.kCoast);\n gyro = new ADXRS450_Gyro();\n gyro.calibrate();\n stick = new Joystick(1);\n controller = new XboxController(0);\n origGyro = 0;\n }", "@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n\n /* lets grab the 360 degree position of the MagEncoder's absolute position */\n /* mask out the bottom12 bits, we don't care about the wrap arounds */ \n\t\tint absolutePosition = elevator.getSelectedSensorPosition(0) & 0xFFF;\n \n /* use the low level API to set the quad encoder signal */\n elevator.setSelectedSensorPosition(absolutePosition, Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n\n /* choose the sensor and sensor direction */\n elevator.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, \n Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n\n /* Ensure sensor is positive when output is positive */\n elevator.setSensorPhase(false);\n\n /**\n * Set based on what direction you want forward/positive to be.\n * This does not affect sensor phase. \n */ \n //elevator.setInverted(Constants.kMotorInvert);\n \n /* Config the peak and nominal outputs, 12V means full */\n elevator.configNominalOutputForward(0, Constants.kTimeoutMs);\n elevator.configNominalOutputReverse(0, Constants.kTimeoutMs);\n //elevator.configPeakOutputForward(1, Constants.kTimeoutMs);\n elevator.configNominalOutputForward(0.5);\n //elevator.configPeakOutputForward(1, Constants.kTimeoutMs);\n elevator.configPeakOutputForward(0.5);\n elevator.configPeakOutputReverse(-1, Constants.kTimeoutMs);\n \n /**\n * Config the allowable closed-loop error, Closed-Loop output will be\n * neutral within this range. See Table in Section 17.2.1 for native\n * units per rotation.\n */\n //elevator.configAllowableClosedloopError(0, Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n \n /* Config Position Closed Loop gains in slot0, typically kF stays zero. */\n elevator.config_kF(Constants.kPIDLoopIdx, 0.0, Constants.kTimeoutMs);\n elevator.config_kP(Constants.kPIDLoopIdx, 0.5, Constants.kTimeoutMs);\n elevator.config_kI(Constants.kPIDLoopIdx, 0.0, Constants.kTimeoutMs);\n elevator.config_kD(Constants.kPIDLoopIdx, 0.0, Constants.kTimeoutMs);\n\n\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Arm Pot Value\", Robot.arm.getArmPot());\n\n\t\tScheduler.getInstance().run();\n\t\t\n\t\tif(!elevator.getBottomElevatorLimit()) {\n\t\t\televator.resetElevatorMag();\n\t\t}\n\t}", "protected float getGyroscopeAngle() {\n if (doGyro) {\n Orientation exangles = bosch.getAngularOrientation(AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES);\n float gyroAngle = exangles.thirdAngle;\n //exangles.\n //telemetry.addData(\"angle\", \"angle: \" + exangles.thirdAngle);\n float calculated = normalizeAngle(reverseAngle(gyroAngle));\n //telemetry.addData(\"angle2\",\"calculated:\" + calculated);\n return calculated;\n } else {\n return 0.0f;\n }\n }", "@Override\n public void periodic() {\n\t\t// myDrive.\n\n\t\t// System.out.println(Robot.m_oi.getSpeed());\n\t\t// SmartDashboard.putNumber(\"Dial Output: \", Robot.m_oi.getSpeed());\n\n\t\t// //Wheel Speed Limits\n\n\t\t// SmartDashboard.putNumber(\"Front Left Percent\", myDrive.getFLSpeed());\n\t\t// SmartDashboard.putNumber(\"Front Right Percent\", myDrive.getFRSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Left Percent\", myDrive.getRLSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Right Percent\", myDrive.getRRSpeed());\n\n\t\t//Test Code for Selecting Calibration Motor \n\t\t//***COMMENT OUT BEFORE REAL GAME USE***\n\t\t// if (Robot.m_oi.getArmDown()) {\n\t\t// \t// System.out.println(\"Front Left Wheel Selected\");\n\t\t// \tWheel = 1;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getArmUp()) {\n\t\t// \t// System.out.println(\"Back Left Wheel Selected\");\n\t\t// \tWheel = 2;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallIn()) {\n\t\t// \t// System.out.println(\"Front Right Wheel Selected\");\n\t\t// \tWheel = 3;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallOut()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 4;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBlueButton()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 0;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t// } \n\n\t\t// if (Wheel == 1) {\n\n\t\t// \tmyDrive.setFLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 2) {\n\n\t\t// \tmyDrive.setRLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 3) {\n\n\t\t// \tmyDrive.setFRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 4) {\n\n\t\t// \tmyDrive.setRRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// }\n\n\t\t// if (Robot.m_oi.getSafety()) {\n\n\t\t// \tspeedLimit = 1.0;\n\t\t// \tstrafeLimit = 1.0;\n\n\t\t// } else {\n\n\t\t// \tspeedLimit = 0.5; \n\t\t// \tstrafeLimit = 0.8;\n\t\t\t\t\n\t\t// }\n\n\n\n\t\t//System.out.print (\"strafeLimit: \" + strafeLimit);\n\t\t//System.out.println(Robot.m_oi.getX() * strafeLimit);\n\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY() * speedLimit), // set Y speed\n\t\t// \t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t// \t(Robot.m_oi.getRotate() * rotateLimit), // set rotation rate\n\t\t// \t0); // gyro angle \n\t\t\n\t\t//TODO: Rotate robot with vision tracking, set up curve to slow down as target approaches center.\n\t\t// if (Robot.m_oi.getStartButton()) {\n\t\t// \tmyDrive.driveCartesian(\n\t\t// \t\t (0.4), // set Rotation\n\t\t// \t\t (0.0), // set Strafe\n\t\t// \t\t (0.0), // set Forward/Back\n\t\t// \t\t 0);\n\t\t// } else {\n\t\tmyDrive.driveCartesian(\n\t\t\t(Robot.m_oi.getY() * rotateLimit), // set Y speed\n\t\t\t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t\t(Robot.m_oi.getRotate() * speedLimit), // set rotation rate\n\t\t\t0);\n\t\t// }\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY()), // set Y speed\n\t\t// \t(Robot.m_oi.getX()), // set X speed\n\t\t// \t(Robot.m_oi.getRotate()), // set rotation rate\n\t\t// \t0); \n\n }", "@Override\n public void initialize() {\n m_drive.resetGyro();// first call\n m_drive.resetEncoders();\n m_drive.lockMotors();\n }", "protected void initialize() {\n \t\n \ttimeStarted = System.currentTimeMillis();\n \tangle = driveTrain.gyro.getYaw();\n \tspeed = RobotMap.speedAtFullVoltage * power;\n \ttimeToGo = (long)(distance / speed) * 1000;\n }", "protected void initialize() {\n \tRobot.io.bottomGyro.reset();\n \tRobot.io.topGyro.reset();\n \tpid.reset();\n \tpid.setSetpoint(rotAngle);\n \tpid.enable();\n }", "public void robotInit() {\r\n\r\n shootstate = down;\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n initialpot = Components.ShooterPot.getAverageVoltage();\r\n //shootpotdown +=initialpot;\r\n //shootpotlow+= initialpot;\r\n //shootpotmiddle+= initialpot;\r\n //shootpothigh+=initialpot;\r\n\r\n }", "protected void execute() {\n \tSystem.out.println(\"Gyro: \" + Drivetrain.gyro.getAngle());\n\t\tif (degrees > 0) {\n\t\t\twhile (Drivetrain.gyro.getAngle() < degrees) {\n\t\t\t\tDrivetrain.frontRight.set(ControlMode.PercentOutput, 0.25);\n\t\t\t\tDrivetrain.rearRight.set(ControlMode.PercentOutput, 0.25);\n\t\t\t\tDrivetrain.frontLeft.set(ControlMode.PercentOutput, 0.25);\n\t\t\t\tDrivetrain.rearLeft.set(ControlMode.PercentOutput, 0.25);\n\t\t\t}\n\t\t} \n\t\telse {\n\t\t\twhile (Drivetrain.gyro.getAngle() > degrees) {\n\t\t\t\tDrivetrain.frontRight.set(ControlMode.PercentOutput, -0.25);\n\t\t\t\tDrivetrain.rearRight.set(ControlMode.PercentOutput, -0.25);\n\t\t\t\tDrivetrain.frontLeft.set(ControlMode.PercentOutput, -0.25);\n\t\t\t\tDrivetrain.rearLeft.set(ControlMode.PercentOutput, -0.25);\n\t\t\t}\n\t\t}\n }", "@Override\npublic void teleopPeriodic() {\nm_robotDrive.arcadeDrive(m_stick.getRawAxis(5)* (-0.5), m_stick.getRawAxis(4)*0.5);\n}", "void initialize() {\n setClockSource(MPU6050_CLOCK_PLL_INTERNAL);\n setFullScaleGyroRange(MPU6050_GYRO_FS_250);\n setFullScaleAccelRange(MPU6050_ACCEL_FS_2);\n }", "public void gyroHold(double speed, double angle, double holdTime) {\n\n ElapsedTime holdTimer = new ElapsedTime();\n\n // keep looping while we have time remaining.\n holdTimer.reset();\n while (opModeIsActive() && (holdTimer.time() < holdTime)) {\n // Update telemetry & Allow time for other processes to run.\n onHeading(speed, angle, P_TURN_COEFF);\n //telemetry.update();\n }\n\n // Stop all motion;\n robot.DriveLeft1.setPower(0);\n robot.DriveRight1.setPower(0);\n robot.DriveLeft2.setPower(0);\n robot.DriveRight2.setPower(0);\n }", "public double getGyroAngle() {\n double[] ypr = new double[3];\n gyro.GetYawPitchRoll(ypr);\n return ypr[0];\n }", "protected void initialize()\n {\n // Set the pid up for driving straight\n Robot.drivetrain.getAngleGyroController().setPID(Constants.DrivetrainAngleGyroControllerP, Constants.DrivetrainAngleGyroControllerI, Constants.DrivetrainAngleGyroControllerD);\n //Robot.drivetrain.resetGyro();\n if (setpointSpecified == true)\n {\n Robot.drivetrain.getAngleGyroController().setSetpoint(Robot.initialGyroAngle); \n }\n else\n {\n Robot.drivetrain.getAngleGyroController().setSetpoint(Robot.drivetrain.getGyroValue());\n }\n Robot.drivetrain.setDirection(driveDirection);\n Robot.drivetrain.setMagnitude(drivePower);\n Robot.drivetrain.getAngleGyroController().enable();\n timer.reset();\n timer.start();\n }", "public void init() {\n//\t\tint anglesToEncTicks = (int) ((90 - currentAngle) * encoderTicksPerRev);\n//\t\tarmMotor.setEncPosition(anglesToEncTicks);\n\t\twhile (armMotor.isFwdLimitSwitchClosed() != true) {\n\t\t\tarmMotor.set(.2);\n\t\t}\n\t\tSystem.out.println(\"Calibrated!\");\n\t\tarmMotor.setEncPosition(0);\n\t}", "public double[] getGyro();", "public Drive() {\r\n \tgyro.calibrate();\r\n \tgyro.reset();\r\n }", "public int getGyroAngle() {\r\n \treturn (int)Math.round(gyro.getAngle());\r\n }", "private void getSensorService() {\n mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n if (mSensorManager == null) {\n Log.e(TAG, \"----getSystemService failed\");\n\n } else {\n mWakeupUncalibratedGyro = mSensorManager.getDefaultSensor(\n Sensor.TYPE_GYROSCOPE_UNCALIBRATED, true);\n }\n\n if (mWakeupUncalibratedGyro != null) {\n mSensorManager.registerListener(mListener, mWakeupUncalibratedGyro,\n SensorManager.SENSOR_DELAY_UI);\n }\n }", "@Override\n public void teleopPeriodic() {\n CommandScheduler.getInstance().run();\n OI.getInstance().getPilot().run();\n SmartDashboard.putNumber(\"gyro\", getRobotContainer().getTecbotSensors().getYaw());\n SmartDashboard.putBoolean(\"isSpeed\", getRobotContainer().getDriveTrain().getTransmissionMode() == DriveTrain.TransmissionMode.speed);\n SmartDashboard.putString(\"DT_MODE\", getRobotContainer().getDriveTrain().getCurrentDrivingMode().toString());\n SmartDashboard.putNumber(\"x_count\", getRobotContainer().getClimber().getxWhenPressedCount());\n\n }", "public void zeroHeading() {\n m_gyro.reset();\n }", "@Override\n public void robotPeriodic() {\n\n boolean c = mGPM.haveCargo();\n \n // Need signal due to distance for assurance that cargo is obtained/\n if (c) {\n CargoLight.set(Value.kOn);\n } else{\n CargoLight.set(Value.kOff);\n }\n }", "private void initSensorManager() {\n\t\ttry {\n\t\t\tSensorManager sensorManage = (SensorManager) getSystemService(Context.SENSOR_SERVICE);\n\t\t\tList<Sensor> mySensors = sensorManage\n\t\t\t\t\t.getSensorList(Sensor.TYPE_ACCELEROMETER);\n\t\t\tmAccel = 0.00f;\n\t\t\tmAccelCurrent = SensorManager.GRAVITY_EARTH;\n\t\t\tmAccelLast = SensorManager.GRAVITY_EARTH;\n\t\t\tsensorManage.registerListener(new SensorEventListener() {\n\t\t\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n\t\t\t\t}\n\n\t\t\t\t@SuppressLint(\"FloatMath\")\n\t\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\n\t\t\t\t\tfloat x = event.values[0];// Get X-Coordinator\n\n\t\t\t\t\tfloat y = event.values[1];// Get Y-Coordinator\n\n\t\t\t\t\tfloat z = event.values[2];// Get Z-Coordinator\n\n\t\t\t\t\tmAccelLast = mAccelCurrent;\n\t\t\t\t\tmAccelCurrent = (float) Math\n\t\t\t\t\t\t\t.sqrt((double) (x * x + y * y + z * z));\n\t\t\t\t\tfloat delta = mAccelCurrent - mAccelLast;\n\t\t\t\t\tmAccel = mAccel * 0.9f + delta; // perform low-cut filter\n\n\t\t\t\t\tif (SHAKING_DELTA > mAccel\n\t\t\t\t\t\t\t&& CommonValues.getInstance().CameraMessage != CameraMessageStatus.Focused) {\n\t\t\t\t\t\t// BY SAM for start autofocusing\n\t\t\t\t\t\tif (!lock_autofocus) {\n\t\t\t\t\t\t\tif (autoFocusCounter > AUTO_FOCUS_START_INTERVAL\n\t\t\t\t\t\t\t\t\t&& CommonValues.getInstance().CameraMessage == CameraMessageStatus.Shacked) {\n//\t\t\t\t\t\t\t\tCameraManager.get().requestAutoFocus(handler,\n//\t\t\t\t\t\t\t\t\t\tR.id.auto_focus);\n\t\t\t\t\t\t\t\tautoFocusCounter = 0;\n\t\t\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\t\t\t\t\t\t\t} else if (autoFocusCounter > AUTO_FOCUS_START_INTERVAL) {\n\t\t\t\t\t\t\t\tautoFocusCounter = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!lock_autofocus\n\t\t\t\t\t\t\t\t&& Math.abs(z - old_z) > SHAKING_Z_DELTA) {\n\n\t\t\t\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n//\t\t\t\t\t\t\tCameraManager.get().requestAutoFocus(handler,\n//\t\t\t\t\t\t\t\t\tR.id.auto_focus);\n\t\t\t\t\t\t\tautoFocusCounter = 0;\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (!lock_autofocus) {\n\n\t\t\t\t\t\t\t\tstatusView\n\t\t\t\t\t\t\t\t\t\t.setText(getString(R.string.brcd_img_middle));\n\t\t\t\t\t\t\t\tautoFocusCounter++;\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstatusView\n\t\t\t\t\t\t\t\t\t\t.setText(getString(R.string.brcd_press_focus));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if (mAccel > SHAKING_DELTA)// Shaking\n\t\t\t\t\t{\n\n\t\t\t\t\t\tstatusView.setText(getString(R.string.phone_silent));\n\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Shacked;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\n\t\t\t\t\t}\n\t\t\t\t\told_z = z;\n\n\t\t\t\t}\n\t\t\t}, mySensors.get(0), SensorManager.SENSOR_DELAY_NORMAL);\n\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"Unable to detect SensorManager. \",\n\t\t\t\t\t\"Error data \" + e.toString());\n\t\t}\n\t}", "public void testGyroAngle(AnalogGyro gyro) {\n // Set angle\n for (int i = 0; i < 5; i++) {\n m_tpcam.getPan().set(0);\n Timer.delay(0.1);\n }\n\n Timer.delay(0.5);\n // Reset for setup\n gyro.reset();\n Timer.delay(0.5);\n\n // Perform test\n for (int i = 0; i < 53; i++) {\n m_tpcam.getPan().set(i / 100.0);\n Timer.delay(0.05);\n }\n Timer.delay(1.2);\n\n double angle = gyro.getAngle();\n\n double difference = TEST_ANGLE - angle;\n\n double diff = Math.abs(difference);\n\n assertEquals(errorMessage(diff, TEST_ANGLE), TEST_ANGLE, angle, 10);\n }", "public void autonomous() {\n robot.drive(0.5); //Drives in a square\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n }", "public void initialize() {\n // RobotContainer.drive.zeroAngle();\n this.angle = this.angle + RobotContainer.drive.getAngle();\n }", "@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n // ros_string = workingSerialCom.read();\n // yavuz = workingSerialCom.StringConverter(ros_string, 2);\n // Inverse.Inverse(yavuz);\n\n // JoystickDrive.execute();\n\n\n\n // ros_string = workingSerialCom.read();\n // alt_yurur = workingSerialCom.StringConverter(ros_string, 1);\n // robot_kol = workingSerialCom.StringConverter(ros_string, 2);\n Full.Full(yavuz);\n \n }", "@Override\n public void gyroYaw(int value, int timestamp) {\n }", "public void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\t\n shooterArm.updateSmartDashboard();\n\t\tdriveTrain.getDegrees();\n\n\t\tvision.findGoal();\n\t\tvision.getGoalXAngleError();\n\t\tvision.getGoalArmAngle();\n\n\t\t// Stop auto mode if the robot is tilted too much\n\t\tif (Math.abs(driveTrain.getRobotPitch())<=60 && Math.abs(driveTrain.getRobotRoll())<=60)\n\t\t\ttimerTilt.reset();\n\t\t\n\t\t// For some reason, robot did not move in last match in auto, so this code is suspect\n\t\t// Do the Pitch/Roll values need to be zeroed?\n//\t\tif ( autonomousCommand != null && timerTilt.get()>0.5)\n//\t\t\tautonomousCommand.cancel();\n\n\t}", "public void gyroHold( double speed, double angle, double holdTime) {\n\n ElapsedTime holdTimer = new ElapsedTime();\n\n // keep looping while we have time remaining.\n holdTimer.reset();\n while (opModeIsActive() && (holdTimer.time() < holdTime)) {\n // Update telemetry & Allow time for other processes to run.\n onHeading(speed, angle, P_TURN_COEFF);\n telemetry.update();\n }\n\n // Stop all motion;\n robot.leftDrive.setPower(0);\n robot.rightDrive.setPower(0);\n }", "@Override\n public void teleopPeriodic() {\n\n double l = left.calculate((int)rightEnc.get());\n double r = right.calculate((int)rightEnc.get());\n\n double gyro_heading = gyro.getYaw(); // Assuming the gyro is giving a value in degrees\n double desired_heading = Pathfinder.r2d(left.getHeading()); // Should also be in degrees\n\n double angleDifference = Pathfinder.boundHalfDegrees(desired_heading - gyro_heading);\n double turn = 0.8 * (-1.0/80.0) * angleDifference;\n\n //left1.set(l + turn);\n //right1.set(r - turn);\n left1.set(0);\n right1.set(0);\n System.out.println(\"Get: \" + rightEnc.get() + \" Raw: \" + rightEnc.getRaw());\n\n }", "@Override\n public void periodic() {\n double leftX = xboxController.getX(Hand.kLeft);\n double leftY = -xboxController.getY(Hand.kLeft);\n\n leftX = Math.pow(leftX, LEFT_STICK_EXPONENT);\n leftY = Math.pow(leftY, LEFT_STICK_EXPONENT);\n\n drive.driveManual(leftY, leftX);\n\n // Process Rotation control\n double rightX = xboxController.getX(Hand.kRight);\n double rightY = -xboxController.getY(Hand.kRight);\n\n rightX = Math.pow(rightX, RIGHT_STICK_EXPONENT);\n rightY = Math.pow(rightY, RIGHT_STICK_EXPONENT);\n\n double angle = rightX >= 0 ? Math.atan2(rightY, rightX) : -Math.atan2(rightY, rightX);\n double rotationSpeed = Math.sqrt(Math.pow(rightX, 2) + Math.pow(rightY, 2));\n\n if (rotationSpeed > ROTATION_SPEED_THRESHOLD) {\n drive.lookAt(angle, rotationSpeed);\n } else {\n drive.lookAt(angle, 0);\n }\n\n if (xboxController.getBumper(Hand.kLeft)) {\n roller.start();\n } else {\n roller.stop();\n }\n\n if (xboxController.getBumper(Hand.kRight) && storage.storageMode == StorageMode.FIRING) {\n launcher.start();\n storage.advance();\n } else {\n launcher.stop();\n }\n\n if (xboxController.getAButton()) {\n storage.unprime();\n }\n\n if (xboxController.getBButton()) {\n storage.prime();\n }\n\n data = DriverStation.getInstance().getGameSpecificMessage();\n if (xboxController.getAButton()) {\n if (data.length() > 0) {\n wheel.spinToColor(data.charAt(0));\n } else {\n wheel.spinRevolutions();\n }\n }\n\n }", "@Override\n public void loop() {\n gp1y = (-1 * gamepad1.left_stick_y);\n // calculations bloc\n // speed - while our technical value is within the range of [-1,1], we'll just keep it\n // positive.\n if (gamepad1.right_bumper) {\n speed = -1 * gamepad1.right_trigger;\n } else {\n speed = gamepad1.right_trigger;\n }\n // angle - this is calculated using the direction our stick is pointing. should be in a\n // range of [0,2pi] like a unit circle. terrible things, unit circles.\n // this means the stick held right should be 2pi.\n angle = Math.atan2(gp1y, gamepad1.left_stick_x);\n // corrections to ensure our angle is like a unit circle instead of delivering a coordinate\n if (angle <= 0) {\n angle += Math.PI * 2;\n }\n /*\n if (gamepad1.left_stick_x == 0 && gamepad1.left_stick_y == 0){\n angle = (Math.PI)/2;\n }\n */\n\n // rotation magnitude\n if (gamepad1.left_bumper){\n rotate = gamepad1.left_trigger * -1;\n } else {\n rotate = gamepad1.left_trigger;\n }\n // alternative rotation mag.\n if (gamepad1.right_stick_x != 0){\n rotate = gamepad1.right_stick_x;\n }\n\n\n //DEBUG: dump outputs\n /*\n telemetry.addData(\"REQUIRED INFORMATION\", \"\");\n telemetry.addData(\"speed:\", speed);\n telemetry.addData(\"angle:\", angle);\n telemetry.addData(\"angle (pi):\", angle/Math.PI);\n telemetry.addData(\"rot. magnitude:\", rotate);\n */\n // calc voltage multipliers\n if (gamepad1.left_stick_x == 0 && gamepad1.left_stick_y == 0) {\n speed = 0;\n }\n voltageMultiplier[0] = speed * Math.cos(angle - (Math.PI/4)) + rotate;\n voltageMultiplier[1] = speed * Math.sin(angle - (Math.PI/4)) - rotate;\n voltageMultiplier[2] = speed * Math.sin(angle - (Math.PI/4)) + rotate;\n voltageMultiplier[3] = speed * Math.cos(angle - (Math.PI/4)) - rotate;\n if (rotate == 0) {\n for (int i = 0; i < 4; i++) {\n voltageMultiplier[i] *= Math.sqrt(2);\n }\n }\n //DEBUG: voltage multiplier output\n /*\n telemetry.addData(\"VOLTAGE MULTIPLIERS (unnormalized)\", \"\");\n telemetry.addData(\"VM1\", voltageMultiplier[0]);\n telemetry.addData(\"VM2\", voltageMultiplier[1]);\n telemetry.addData(\"VM3\", voltageMultiplier[2]);\n telemetry.addData(\"VM4\", voltageMultiplier[3]);\n */\n // begin normalization process\n // store the biggest voltage multiplier\n double topStore = 1;\n for (int x = 0; x < 4; x++){\n if (Math.abs(voltageMultiplier[x]) > topStore) {\n topStore = Math.abs(voltageMultiplier[x]);\n }\n }\n // followed by dividing them all by the top one\n // additionally, do a sanity check that ensures we don't actually do this\n // if our top stored number is \"0\" because that would make NaN and do bad\n // things ;~\n for (int x = 0; x < 4; x++) {\n voltageMultiplier[x] /= topStore;\n }\n /*\n telemetry.addData(\"VOLTAGE MULTIPLIERS (normalized)\", \"\");\n telemetry.addData(\"VM1\", voltageMultiplier[0]);\n telemetry.addData(\"VM2\", voltageMultiplier[1]);\n telemetry.addData(\"VM3\", voltageMultiplier[2]);\n telemetry.addData(\"VM4\", voltageMultiplier[3]);\n */\n if (gamepad1.b) {\n for (int i = 0; i < 4; i++) {\n voltageMultiplier[i] = 0;\n }\n }\n\n if(gamepad1.y){\n robot.arm.setPosition(1); // outwards\n }\n if(gamepad1.x){\n robot.arm.setPosition(0.4); // back up towards robot\n }\n // TODO: gripper implementation and locking setup\n\n if (!(robot.limitTop.getState() && gamepad2.left_stick_y < 0)) {\n robot.lift.setPower(gamepad2.left_stick_y / 2);\n } else if (robot.limitTop.getState()) {\n robot.lift.setPower(0);\n }\n\n // hold a to open gripper to limit.\n // press b to unlock\n if (gamepad2.a){\n robot.gripper.setPower(-GRIPPER_POWER);\n robot.gripper.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n } else if (gamepad2.b){\n robot.gripper.setPower(GRIPPER_POWER);\n robot.gripper.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);\n } else {\n robot.gripper.setPower(0);\n }\n\n telemetry.addData(\"ZPB\", robot.gripper.getZeroPowerBehavior());\n telemetry.addData(\"gp2 y\", gamepad2.left_stick_y);\n telemetry.addData(\"top limiter\", robot.limitTop.getState());\n\n robot.flDrive.setPower(voltageMultiplier[0]);\n robot.frDrive.setPower(voltageMultiplier[1]);\n robot.rlDrive.setPower(voltageMultiplier[2]);\n robot.rrDrive.setPower(voltageMultiplier[3]);\n }", "@Override\n public void robotInit()\n {\n System.out.println(\"RoboRIO initializing...\");\n\n // initialize cameras\n camFront = CameraServer.getInstance().startAutomaticCapture(0);\n camBack = CameraServer.getInstance().startAutomaticCapture(1);\n camServForward = CameraServer.getInstance().getServer();\n camServReverse = CameraServer.getInstance().getServer();\n\n camServForward.setSource(camFront);\n //camServReverse.setSource(camBack);\n\n // init joysticks\n Joystick[] joysticks = getControllers();\n\n driveTrain = new DriveTrain();\n hatchArm = new HatchArm();\n cargoArm = new CargoArm();\n ramp = new Ramp();\n\n driver1 = new Buttons(joysticks[0]);\n driver2 = new Buttons(joysticks[1]);\n\n // init gyro\n // try\n // {\n // gyro = new AHRS(I2C.Port.kOnboard);\n // }\n // catch (RuntimeException ex)\n // {\n // // DriverStation.reportError(\"Error instantiating navX-MXP: \" + ex.getMessage(),\n // // true);\n // System.out.println(\"Error initializing gyro!\");\n // }\n\n // // update gyro info on smart dashboard\n // SmartDashboard.putNumber(\"X angle\", gyro.getYaw() + 180);\n // SmartDashboard.putNumber(\"Y angle\", gyro.getPitch() + 180);\n // SmartDashboard.putNumber(\"Z angle\", gyro.getRoll() + 180);\n \n // SmartDashboard.putNumber(\"X vel\", gyro.getVelocityX());\n // SmartDashboard.putNumber(\"Y vel\", gyro.getVelocityY());\n // SmartDashboard.putNumber(\"Z vel\", gyro.getVelocityZ());\n\n // SmartDashboard.putData(gyro);\n updateVars();\n updateShuffleboard();\n\n System.out.println(\"RoboRIO initialization complete.\");\n }", "@Override\n public void robotPeriodic() {\n double high = m_filter.calculate(m_photoHigh.getValue());// * kValueToInches;\n double low = m_filter.calculate(m_photoLow.getValue()); //* kValueToInches;\n if (low<=6){\n BallPresent = true;\n //stop motor if ultrasonic sensor median falls below 6 inches indicating a ball is blocking the sensor\n m_RightMotor.set(ControlMode.PercentOutput, 0);\n } else {\n BallPresent = false;\n //stop motor if ultrasonic sensor median falls below 6 inches indicating a ball is blocking the sensor\n m_RightMotor.set(ControlMode.PercentOutput, 0.5);\n }\n /*Shuffleboard.getTab(\"Shooter\").add(\"Ball Present\", BallPresent)\n .withWidget(BuiltInWidgets.kBooleanBox)\n .withPosition(0, 0)\n .withSize(1, 1)\n .withProperties(Map.of(\"colorWhenTrue\",\"green\",\"colorWhenFalse\",\"black\"));*/\n SmartDashboard.putNumber(\"High\", high);\n SmartDashboard.putNumber(\"Low\", low); \n /*Shuffleboard.getTab(\"Shooter\").add(\"Ultrasonic 1\", currentDistance)\n .withWidget(BuiltInWidgets.kGraph)\n .withPosition(0, 2)\n .withSize(4, 4);*/\n // convert distance error to a motor speed\n //double currentSpeed = (kHoldDistance - currentDistance) * kP;\n\n // drive robot\n //m_robotDrive.arcadeDrive(currentSpeed, 0);\n }", "public void gyroTurn(double speed, double angle) {\n while (opModeIsActive() && !onHeading(speed, angle, P_TURN_COEFF)) {\n // Update telemetry & Allow time for other processes to run.\n telemetry.update();\n }\n }", "@Override\n public void periodic() {\n m_odometry.update(\n Rotation2d.fromDegrees(m_gyro.getAngle()),\n new SwerveModulePosition[] {\n m_frontLeft.getPosition(),\n m_frontRight.getPosition(),\n m_rearLeft.getPosition(),\n m_rearRight.getPosition()\n });\n }", "public void gyroHold( double speed, double angle, double holdTime) {\n\n ElapsedTime holdTimer = new ElapsedTime();\n\n // keep looping while we have time remaining.\n holdTimer.reset();\n while ((holdTimer.time() < holdTime)) {\n // Update telemetry & Allow time for other processes to run.\n onHeading(speed, angle, P_TURN_COEFF);\n try {\n sleep(50);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n }\n\n // Stop all motion;\n leftmotor.setPower(0);\n rightmotor.setPower(0);\n }", "public double getGyroAngleX() {\n return m_gyro.getAngleX();\n }", "private void robotMovement()\n {\n\n /* If it will be rotating, don't drive */\n if (!joystick.rightShouldMove()) {\n\n if (joystick.leftShouldMove()) {\n\n /* Derive movement values from gamepad */\n Joystick.Direction direction = joystick.getLeftDirection();\n double power = joystick.getLeftPower();\n\n int[] modifier;\n\n if (direction == Joystick.Direction.UP) {\n modifier = modUP;\n } else if (direction == Joystick.Direction.DOWN) {\n modifier = modDOWN;\n } else if (direction == Joystick.Direction.RIGHT) {\n modifier = modRIGHT;\n } else {\n modifier = modLEFT;\n }\n\n motorLeftFront.setPower(modifier[0] * ((power * 0.8) + (0.01 * frontInc)));\n motorRightFront.setPower(modifier[1] * ((power * 0.8) + (0.01 * frontInc)));\n motorLeftBack.setPower(modifier[2] * ((power * 0.8) + (0.01 * backInc)));\n motorRightBack.setPower(modifier[3] * ((power * 0.8) + (0.01 * backInc)));\n\n } else {\n setMotorPowerToZero();\n }\n\n } else {\n\n /* Rotation modifiers for sides of bot */\n Joystick.Direction d = joystick.getRightDirection();\n double power = joystick.getRightPower();\n boolean left = d == Joystick.Direction.LEFT;\n double sideMod = left ? 1 : -1;\n\n /* Set motor power */\n motorLeftFront.setPower(sideMod * power);\n motorLeftBack.setPower(sideMod * power);\n motorRightFront.setPower(sideMod * power);\n motorRightBack.setPower(sideMod * power);\n\n }\n\n }", "@Override\n protected void initialize() {\n\n /* System clock starts */\n baseTime = System.currentTimeMillis();\n /* Determines time that robot has to timeout after */\n thresholdTime = baseTime + duration;\n\n /* Convert the starting angle */\n if (Robot.drivetrain.getGyroYaw() < 0.0f) {\n /* Negative turn to 180-360 */\n startingAngle = Robot.drivetrain.getGyroYaw() + 360.0f;\n } else {\n /* Positives stay 0-180 */\n startingAngle = Robot.drivetrain.getGyroYaw();\n }\n\n /* The total angle needed to turn */\n totalAngleTurn = startingAngle + inputAngle;\n\n /* Declare the turning direction of special cases when the angle passes over 0 or 360 */\n if (totalAngleTurn < 0.0f) { \n /* If the angle is negative, convert it */\n totalAngleTurn += 360.0f;\n /* Trigger special case */\n specialCase = true;\n /* Trigger counterclockwise */\n clockwise = false;\n }\n if (totalAngleTurn > 360.0f) {\n /* If the angle is above 360, subtract 360 */\n totalAngleTurn -= 360.0f;\n /* Trigger special case */\n specialCase = true;\n /* Trigger clockwise */\n clockwise = true;\n }\n /* Only run if the special cases do not already declare a turning direction */\n if (!specialCase) {\n /* If the input angle is bigger, turn clockwise */\n if (totalAngleTurn > startingAngle) {\n clockwise = true;\n }\n /* If the input angle is smaller, turn counterclockwise */\n if (totalAngleTurn < startingAngle) {\n clockwise = false;\n }\n }\n }", "public double getGyroAngleY() {\n return m_gyro.getAngleY();\n }", "@Override\n public void robotInit() {\n myRobot = new DifferentialDrive(leftfrontmotor, rightfrontmotor);\n leftrearmotor.follow(leftfrontmotor);\n rightrearmotor.follow(rightfrontmotor);\n leftfrontmotor.setInverted(true); // <<<<<< Adjust this until robot drives forward when stick is forward\n\t\trightfrontmotor.setInverted(true); // <<<<<< Adjust this until robot drives forward when stick is forward\n\t\tleftrearmotor.setInverted(InvertType.FollowMaster);\n rightrearmotor.setInverted(InvertType.FollowMaster);\n \n CameraServer.getInstance().startAutomaticCapture();\n\n \n\n comp.setClosedLoopControl(true);\n \n\n /* Set up Dashboard widgets */\n SmartDashboard.putNumber(\"L Stick\", gamepad.getRawAxis(1));\n\t\tSmartDashboard.putNumber(\"R Stick\", gamepad.getRawAxis(5));\n\t\tSmartDashboard.putBoolean(\"Back Button\", gamepad.getRawButton(5));\n\t\tSmartDashboard.putBoolean(\"Fwd Button\", gamepad.getRawButton(6));\n\t\t\n SmartDashboard.putNumber(\"LF\", pdp.getCurrent(leftfrontmotorid));\n\t\tSmartDashboard.putNumber(\"LR\", pdp.getCurrent(leftrearmotorid));\n\t\tSmartDashboard.putNumber(\"RF\", pdp.getCurrent(rightfrontmotorid));\n\t\tSmartDashboard.putNumber(\"RR\", pdp.getCurrent(rightrearmotorid));\n SmartDashboard.putNumber(\"Total\", pdp.getCurrent(0) + pdp.getCurrent(1) + pdp.getCurrent(2) + pdp.getCurrent(3) + pdp.getCurrent(4) + pdp.getCurrent(5) + pdp.getCurrent(6) + pdp.getCurrent(7) + pdp.getCurrent(8) + pdp.getCurrent(9) + pdp.getCurrent(10) + pdp.getCurrent(11) + pdp.getCurrent(12) + pdp.getCurrent(13) + pdp.getCurrent(14) + pdp.getCurrent(15));\n }", "@Override\n public void loop() {\n telemetry.addData(\"Status\", \"Running: \" + runtime.toString());\n\n //zAccumulated = mrGyro.getIntegratedZValue(); //Set variables to gyro readings\n\n heading = 360 - mrGyro.getHeading(); //Reverse direction of heading to match the integrated value\n if (heading == 360)\n {\n heading = 0;\n }\n\n xVal = mrGyro.rawX() / 128; //Lowest 7 bits are noise\n yVal = mrGyro.rawY() / 128;\n zVal = mrGyro.rawZ() / 128;\n\n //The below two if() statements ensure that the mode of the color sensor is changed only once each time the touch sensor is pressed.\n //The mode of the color sensor is saved to the sensor's long term memory. Just like flash drives, the long term memory has a life time in the 10s or 100s of thousands of cycles.\n //This seems like a lot but if your program wrote to the long term memory every time though the main loop, it would shorten the life of your sensor.\n\n if (!buttonState && gamepad1.x) { //If the touch sensor is just now being pressed (was not pressed last time through the loop but now is)\n buttonState = true; //Change touch state to true because the touch sensor is now pressed\n LEDState = !LEDState; //Change the LEDState to the opposite of what it was\n if(LEDState)\n {\n BallSensorreader.write8(3, 0); //Set the mode of the color sensor using LEDState\n }\n else\n {\n BallSensorreader.write8(3, 1); //Set the mode of the color sensor using LEDState\n }\n }\n\n if (!gamepad1.x) //If the touch sensor is now pressed\n buttonState = false; //Set the buttonState to false to indicate that the touch sensor was released\n\n BallSensorcache = BallSensorreader.read(0x04, 1);\n\n if (gamepad2.a)\n liftSpeed = 1;\n if (gamepad2.b)\n liftSpeed = 0.5;\n\n driveSpeed = 1;\n\n if (gamepad1.right_bumper)\n driveSpeed = 0.5;\n\n if (gamepad1.left_bumper)\n driveSpeed = 0.25;\n\n // Run wheels in tank mode (note: The joystick goes negative when pushed forwards, so negate it)\n frontLeft = ( gamepad1.left_stick_x - gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Front right\n frontRight = ( gamepad1.left_stick_x + gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Front left\n backLeft = (-gamepad1.left_stick_x - gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Back right\n backRight = (-gamepad1.left_stick_x + gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Back left\n Lift = gamepad2.left_stick_y * liftSpeed;\n\n robot.FL_drive.setPower(frontLeft);\n robot.FR_drive.setPower(frontRight);\n robot.BL_drive.setPower(backLeft);\n robot.BR_drive.setPower(backRight);\n robot.Lift.setPower(Lift);\n\n // Left servo going in means more\n if (gamepad2.left_bumper)\n leftPosition += LEFT_SPEED;\n else if (gamepad2.y)\n leftPosition = LEFT_MIN_RANGE;\n\n // Right servo going in means less\n if (gamepad2.right_bumper)\n rightPosition -= RIGHT_SPEED;\n else if (gamepad2.y)\n rightPosition = RIGHT_MAX_RANGE;\n\n if (gamepad2.x)\n {\n rightPosition = 0.96;\n leftPosition = 0.44;\n }\n\n if (gamepad1.a)\n target = target + 45;\n if (gamepad1.b)\n target = target - 45;\n\n //turnAbsolute(target);\n\n // Move both servos to new position.\n leftPosition = Range.clip(leftPosition, robot.LEFT_MIN_RANGE, robot.LEFT_MAX_RANGE);\n robot.Left.setPosition(leftPosition);\n rightPosition = Range.clip(rightPosition, robot.RIGHT_MIN_RANGE, robot.RIGHT_MAX_RANGE);\n robot.Right.setPosition(rightPosition);\n\n // Send telemetry message to signify robot running;\n telemetry.addData(\"Left\", \"%.2f\", leftPosition);\n telemetry.addData(\"Right\", \"%.2f\", rightPosition);\n telemetry.addData(\"frontLeft\", \"%.2f\", frontLeft);\n telemetry.addData(\"frontRight\", \"%.2f\", frontRight);\n telemetry.addData(\"backLeft\", \"%.2f\", backLeft);\n telemetry.addData(\"backRight\", \"%.2f\", backRight);\n telemetry.addData(\"Lift\", \"%.2f\", Lift);\n\n //display values\n telemetry.addData(\"1 #A\", BallSensorcache[0] & 0xFF);\n\n telemetry.addData(\"3 A\", BallSensorreader.getI2cAddress().get8Bit());\n\n telemetry.addData(\"1. heading\", String.format(\"%03d\", heading)); //Display variables to Driver Station Screen\n telemetry.addData(\"2. target\", String.format(\"%03d\", target));\n telemetry.addData(\"3. X\", String.format(\"%03d\", xVal));\n telemetry.addData(\"4. Y\", String.format(\"%03d\", yVal));\n telemetry.addData(\"5. Z\", String.format(\"%03d\", zVal));\n\n telemetry.update(); //Limited to 100x per second\n\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n timestamp = event.timestamp;\n gyroX = event.values[0];\n gyroY = event.values[1];\n gyroZ = event.values[2];\n\n this.setChanged();\n this.notifyObservers(Sensor.TYPE_GYROSCOPE);\n }", "protected void initialize() {\n \t\n \n \t\n \tRobotMap.motorLeftTwo.setSelectedSensorPosition(0,0,0);\n\t\tRobotMap.motorRightTwo.setSelectedSensorPosition(0,0,0);\n \t\n \torientation.setSetPoint(desiredAngle);\n \tstartTime = Timer.getFPGATimestamp();\n }", "@Override\n public void gyroPitch(int value, int timestamp) {\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tif (state == \"auton\") {\n\t\t\tlastState = \"auton\";\n\t\t}\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Left encoder\", Actuators.getLeftDriveMotor().getEncPosition());\n\t\tSmartDashboard.putNumber(\"Right encoder\", Actuators.getRightDriveMotor().getEncPosition());\n\t\tSmartDashboard.putNumber(\"Left speed\", Actuators.getLeftDriveMotor().get());\n\t\tSmartDashboard.putNumber(\"Right speed\", Actuators.getRightDriveMotor().get());\n\t\t\n\t\t\n\t}", "public void gyroTurn ( double speed, double angle, double timeoutS) {\n\n eTime.reset();\n\n // keep looping while we are still active, and not on heading.\n while (opModeIsActive() && (eTime.seconds() < timeoutS) && !onHeading(speed, angle, P_TURN_COEFF)) {\n // Update telemetry & Allow time for other processes to run.\n telemetry.update();\n }\n }", "@Override\n\tpublic void robotInit() {\n\t\toi = new OI();\n\t\tdrivebase.calibrateGyro();\n\t\tSmartDashboard.putData(\"Zero Gyro\", new ZeroGyro());\n\t\tSmartDashboard.putData(\"Calibrate Gyro - WHILE ROBOT NOT MOVING\", new CalibrateGyro());\n\t\tchooser.addDefault(\"Default Prepare Gear Auto\", new PrepareGearManipulator());\n\t\t//shooterModeChooser.addDefault(\"Shooter at Nominal Preset when Pressed\", object);\n\t\t/*chooser.addObject(\"Left Gear Auto\", new LeftGearGroup());\n\t\tchooser.addObject(\"Center Gear Auto\", new CenterGearGroup());*/\n\t//\tchooser.addObject(\"Test Vision Auto\", new TurnTillPerpVision(true));\n\t//\tchooser.addObject(\"Testing turn gyro\", new RotateToGyroAngle(90,4));\n\t\t//chooser.addObject(\"DriveStraightTest\", new GoAndReturn());\n\t\t //UNNECESSARY AUTOS FOR TESTING ^\n\t\tchooser.addObject(\"Center Gear Encoder Auto (place)\", new DriveStraightCenter());\n\t\tchooser.addObject(\"Vision center TESTING!!!\", new TurnTillPerpVision());\n\t\tchooser.addObject(\"Boiler Auto RED\", new BoilerAuto(true));\n\t\tchooser.addObject(\"Boiler Auto BLUE\", new BoilerAuto(false));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t//\tchooser.addObject(\"Center Gear Encoder Auto (do not place )\", new DriveToFace(false, false, false));\n\t\tchooser.addObject(\"Baseline\", new DriveToLeftRightFace(false,false,false,false));\n\t\tchooser.addObject(\"TEST DRIVETANK AUTO\", new DriveTimedTank(0.7,0.7,5));\n\t\tchooser.addObject(\"Side Gear Auto RIGHT (manual straight lineup)(place)(TURN AFTER AND START CYCLE)\", new DriveStraightSide(true,false));\n\n\t\tchooser.addObject(\"Side Gear Auto LEFT (manual straight lineup)(place)(TURN AFTER AND START CYCLE)\", new DriveStraightSide(true,true));\n\t\t//chooser.addObject(\"Side Gear Auto (place)\", new DriveToLeftRightFace(true,false,false,false));\n\t\t//chooser.addObject(\"Test DriveStraight Auto\", new DriveStraightPosition(10,5));\n\t\t//chooser.addObject(\"Center Gear Encoder Auto (place)\", new DriveStraightCenter());\n\t\t/*InterpreterGroup interp = new InterpreterGroup();\n\t\t(interp.init()){\n\t\t\tchooser.addObject(\"Interpreter\",interp);\n\t\t}*/\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\tSmartDashboard.putData(\"Auto Chooser\", chooser);\n\n\t\tRobot.drivebase.leftDrive1.setPosition(0);\n \tRobot.drivebase.rightDrive1.setPosition(0);\n \t\n\t\t\n \tRobot.leds.initializei2cBus();\n \tbyte mode = 0;\n \tRobot.leds.setMode(mode);\n \tgearcamera = CameraServer.getInstance();\n\t\t\n \tUsbCamera gearUsb = gearcamera.startAutomaticCapture();\n \tgearUsb.setFPS(25);\n \tgearUsb.setResolution(256, 144);\n\n\t\t//NetworkTable.setClientMode();\n \t//NetworkTable.setIPAddress(\"raspberrypi.local\");\n\t\t\n\t\t\n\t\t/*\n\t\t * new Thread(() -> { UsbCamera goalcamera =\n\t\t * CameraServer.getInstance().startAutomaticCapture();\n\t\t * goalcamera.setResolution(320, 240); goalcamera.setFPS(30);\n\t\t * goalcamera.setBrightness(1); goalcamera.setExposureManual(1);\n\t\t * \n\t\t * CvSink goalCvSink = CameraServer.getInstance().getVideo();\n\t\t * \n\t\t * Mat source = new Mat();\n\t\t * \n\t\t * while(!Thread.interrupted()) { goalCvSink.grabFrame(source);\n\t\t * goaloutputmat = source; } }).start();\n\t\t * goalPipeline.process(goaloutputmat);\n\t\t * \n\t\t * new Thread(() -> { UsbCamera gearcamera =\n\t\t * CameraServer.getInstance().startAutomaticCapture();\n\t\t * gearcamera.setResolution(320, 240); gearcamera.setFPS(30);\n\t\t * gearcamera.setBrightness(1); gearcamera.setExposureManual(1);\n\t\t * \n\t\t * CvSink gearCvSink = CameraServer.getInstance().getVideo();\n\t\t * \n\t\t * Mat source = new Mat();\n\t\t * \n\t\t * while(!Thread.interrupted()) { gearCvSink.grabFrame(source);\n\t\t * gearoutputmat = source; } }).start();\n\t\t * gearPipeline.process(gearoutputmat);\n\t\t */\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tupdate();\n\t\t\n\t\t//dashboard outputs\n\t\tdashboardOutput();\n\t\t\n\t\t\n\t\t\n\t\tif (tankDriveBool) {\n\t\t\ttankDrive();\n\t\t} \n\t\telse {\n\t\t\ttankDrive();\n\t\t}\n\t\tif (buttonA) {\n\t\t\ttest = true;\n\t\t\twhile (test) {\n\t\t\t\tcalibrate(10);\n\t\t\t\ttest = false;\n\t\t\t}\n\t\t}\n\t\tif (buttonY) {\n\t\t\tclimbMode = !climbMode;\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kRightRumble, 0.5);\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kLeftRumble, 0.5);\n\t\t\tTimer.delay(0.5);\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kRightRumble, 0);\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kLeftRumble, 0);\n\t\t}\n\t\tverticalMovement();\n\t\tgrab();\n\t}", "protected void initialize() {\n \tSystem.out.println(\"Running: TurnXDegrees\");\n \tstartingAngle = Robot.gyro.getRawAngleDegrees();\n \tisFin = false;\n \tsetTimeout(5);\n \tif(angleTarget < 0) {\n \t\tSystem.out.println(\"Turning Left...\");\n \t\tisTurningLeft = true;\n \t}else {\n \t\tSystem.out.println(\"Turning Right...\");\n \t\tisTurningLeft = false;\n \t}\n \t\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n\n //the below lines set up the configuration file\n BallSensor = hardwareMap.i2cDevice.get(\"BallSensor\");\n\n BallSensorreader = new I2cDeviceSynchImpl(BallSensor, I2cAddr.create8bit(0x3a), false);\n\n BallSensorreader.engage();\n\n sensorGyro = hardwareMap.gyroSensor.get(\"gyro\"); //Point to the gyro in the configuration file\n mrGyro = (ModernRoboticsI2cGyro)sensorGyro; //ModernRoboticsI2cGyro allows us to .getIntegratedZValue()\n mrGyro.calibrate(); //Calibrate the sensor so it knows where 0 is and what still is. DO NOT MOVE SENSOR WHILE BLUE LIGHT IS SOLID\n\n //touch = hardwareMap.touchSensor.get(\"touch\");\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n telemetry.update();\n\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n// if (oi.driveStick.getRawButton(4)) {\n// System.out.println(\"Left Encoder Distance: \" + RobotMap.leftDriveEncoder.getDistance());\n// System.out.println(\"RightEncoder Distance: \" + RobotMap.rightDriveEncoder.getDistance());\n// }\n\n }", "public void gyroHold( double speed, double angle, double holdTime) {\n\n ElapsedTime holdTimer = new ElapsedTime();\n\n // keep looping while we have time remaining.\n holdTimer.reset();\n while (opModeIsActive() && (holdTimer.time() < holdTime)) {\n // Update telemetry & Allow time for other processes to run.\n onHeading(speed, angle, P_TURN_COEFF);\n telemetry.update();\n }\n\n // Stop all motion;\n leftMotor.setPower(0);\n rightMotor.setPower(0);\n }", "protected void initialize() {\n \tRobot.driveBase.resetEnc(2);\n \tRobot.gyro.reset();\n \t//stop extraneous moving parts\n }", "protected void initialize() {\n //drivetrain.initGyro();\n }", "public void gyroDrive ( double speed,\n double distance,\n double angle) {\n\n int newLeftTarget;\n int newRightTarget;\n int moveCounts;\n double max;\n double error;\n double steer;\n double leftSpeed;\n double rightSpeed;\n\n // Ensure that the opmode is still active\n if (opModeIsActive()) {\n\n // Determine new target position, and pass to motor controller\n moveCounts = (int)(distance * COUNTS_PER_INCH);\n newLeftTarget = robot.leftDrive.getCurrentPosition() + moveCounts;\n newRightTarget = robot.rightDrive.getCurrentPosition() + moveCounts;\n\n // Set Target and Turn On RUN_TO_POSITION\n robot.leftDrive.setTargetPosition(newLeftTarget);\n robot.rightDrive.setTargetPosition(newRightTarget);\n\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // start motion.\n speed = Range.clip(Math.abs(speed), 0.0, 1.0);\n robot.leftDrive.setPower(speed);\n robot.rightDrive.setPower(speed);\n\n // keep looping while we are still active, and BOTH motors are running.\n while (opModeIsActive() &&\n (robot.leftDrive.isBusy() && robot.rightDrive.isBusy())) {\n\n // adjust relative speed based on heading error.\n error = getError(angle);\n steer = getSteer(error, P_DRIVE_COEFF);\n\n // if driving in reverse, the motor correction also needs to be reversed\n if (distance < 0)\n steer *= -1.0;\n\n leftSpeed = speed - steer;\n rightSpeed = speed + steer;\n\n // Normalize speeds if either one exceeds +/- 1.0;\n max = Math.max(Math.abs(leftSpeed), Math.abs(rightSpeed));\n if (max > 1.0)\n {\n leftSpeed /= max;\n rightSpeed /= max;\n }\n\n robot.leftDrive.setPower(leftSpeed);\n robot.rightDrive.setPower(rightSpeed);\n\n // Display drive status for the driver.\n telemetry.addData(\"Err/St\", \"%5.1f/%5.1f\", error, steer);\n telemetry.addData(\"Target\", \"%7d:%7d\", newLeftTarget, newRightTarget);\n telemetry.addData(\"Actual\", \"%7d:%7d\", robot.leftDrive.getCurrentPosition(),\n robot.rightDrive.getCurrentPosition());\n telemetry.addData(\"Speed\", \"%5.2f:%5.2f\", leftSpeed, rightSpeed);\n telemetry.update();\n }\n\n // Stop all motion;\n robot.leftDrive.setPower(0);\n robot.rightDrive.setPower(0);\n\n // Turn off RUN_TO_POSITION\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n }", "public static void wheelRadCheck() {\n\t\t// reset the motor\n\t\tfor (EV3LargeRegulatedMotor motor : new EV3LargeRegulatedMotor[] { leftMotor, rightMotor }) {\n\t\t\tmotor.stop();\n\t\t\tmotor.setAcceleration(2000);\n\t\t}\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// There is nothing to be done here\n\t\t}\n\t\t//move the robot forward until the Y asis is detected\n\t\tleftMotor.setSpeed(200);\n\t\trightMotor.setSpeed(200);\n\t\tleftMotor.rotate(Navigation_Test.convertDistance(Project_Test.WHEEL_RAD, 2*Project_Test.TILE_SIZE), true);\n\t\trightMotor.rotate(Navigation_Test.convertDistance(Project_Test.WHEEL_RAD, 2*Project_Test.TILE_SIZE), false);\n\t}", "protected void initialize() {\n\t\tRobot.resetSensors();\n\t}", "public static Gyro getGyro() {\n return sGyro;\n }", "public final void GyroTurn (int degrees, double power)\n {\n //Define gyro angle\n float GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n\n //While the gyro is reading degrees that is not the desired, turn right or left\n while (GyroAngle != degrees)\n {\n //\n robot.DriveLeftBack.setPower(-.1);\n robot.DriveRightBack.setPower(.1);\n robot.DriveRightFront.setPower(.1);\n robot.DriveLeftFront.setPower(-.1);\n\n //Update gyro angle\n GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n }\n\n //Stop\n Stop();\n }", "public void gyroDrive ( double speed,\n double distance,\n double angle) {\n\n\n // Ensure that the opmode is still activ\n\n // Determine new target position, and pass to motor controller\n moveCounts = (int)(distance * COUNTS_PER_INCH);\n newLeftTarget = leftmotor.getCurrentPosition() + moveCounts;\n newRightTarget = rightmotor.getCurrentPosition() + moveCounts;\n\n // Set Target and Turn On RUN_TO_POSITION\n leftmotor.setTargetPosition(newLeftTarget);\n rightmotor.setTargetPosition(newRightTarget);\n\n leftmotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n rightmotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // start motion.\n speed = Range.clip(Math.abs(speed), 0.0, 1.0);\n\n maxSpeed = speed;\n speed = INCREMENT;\n rampUp = true;\n\n leftmotor.setPower(speed);\n rightmotor.setPower(speed);\n\n // keep looping while we are still active, and BOTH motors are running.\n while ((leftmotor.isBusy() && rightmotor.isBusy())) {\n if (rampUp){\n speed += INCREMENT ;\n if (speed >= maxSpeed ) {\n speed = maxSpeed;\n }\n }\n\n // adjust relative speed based on heading error.\n error = getError(angle);\n steer = getSteer(error, P_DRIVE_COEFF);\n\n // if driving in reverse, the motor correction also needs to be reversed\n if (distance < 0)\n steer *= -1.0;\n\n leftSpeed = speed - steer;\n rightSpeed = speed + steer;\n\n // Normalize speeds if either one exceeds +/- 1.0;\n max = Math.max(Math.abs(leftSpeed), Math.abs(rightSpeed));\n if (max > 1.0)\n {\n leftSpeed /= max;\n rightSpeed /= max;\n }\n\n leftmotor.setPower(leftSpeed);\n rightmotor.setPower(rightSpeed);\n }\n\n // Stop all motion;\n leftmotor.setPower(0);\n rightmotor.setPower(0);\n\n // Turn off RUN_TO_POSITION\n leftmotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightmotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n gyroHold(TURN_SPEED,angle,0.166);\n\n }", "@Override public void run()\n {\n robot.angles = robot.imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n robot.gravity = robot.imu.getGravity();\n }", "public void right90 () {\n saveHeading = 0; //modernRoboticsI2cGyro.getHeading();\n gyroTurn(TURN_SPEED, saveHeading - 90);\n gyroHold(HOLD_SPEED, saveHeading - 90, 0.5);\n }", "@Override\n\tpublic void robotInit() {\n\t\tfr = new Spark(HardwareMap.PWM.DRIVE_FR);\n\t\tfl = new Spark(HardwareMap.PWM.DRIVE_FL);\n\t\tbr = new Spark(HardwareMap.PWM.DRIVE_BR);\n\t\tbl = new Spark(HardwareMap.PWM.DRIVE_BL);\n\t\t\n\t\t// Create the side modules\n\t\tleftGroup = new SpeedControllerGroup(bl, fl);\n\t\trightGroup = new SpeedControllerGroup(br, fr);\n\n\t\t// Init the the drive train\n\t\tdrive = new DifferentialDrive(leftGroup, rightGroup);\n\t\t\n\t\t//Init the gyro\n\t\tgyro.calibrate();\n\t\tSmartDashboard.putData(\"Gyro\", gyro);\n\t\t\n\t\tdrive.setSafetyEnabled(false);\n\t\tthis.setName(Subsystems.DRIVE);\n\t}", "@Override\n\tpublic void robotInit() {\n\t\tleftDriveBack = new VictorSP(0); // PWM Port, madke sure this is set correctly.\n\t\tleftDriveFront = new VictorSP(1);\n\t\t\n\t\trightDriveFront = new VictorSP(2);\n\t\trightDriveBack = new VictorSP(3);\n\t\t\n\t\tleftIntake = new Spark(5);\n\t\trightIntake = new Spark(6);\n\t\t\n\t\tarmMotor = new TalonSRX(10);\n\t\tarmMotor.setNeutralMode(NeutralMode.Brake);\n\t\tarmMotor.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Absolute, 0, 0);\n\t\tarmMotor.configPeakCurrentLimit(30, 0);\n\t\tarmMotor.configPeakCurrentDuration(250, 0);\n\t\tarmMotor.configContinuousCurrentLimit(20, 0);\n\t\tarmMotor.configClosedloopRamp(0.25, 0);\n\t\tarmMotor.configOpenloopRamp(0.375, 0);\n\t\tarmMotor.enableCurrentLimit(true);\n\t\t\n\t\tarmMotor.configPeakOutputForward(1.0, 0);\n\t\tarmMotor.configPeakOutputReverse(-1.0, 0);\n\t\t\n\t\tarmMotor.config_kP(0, 0.0, 0);\n\t\t\n\t\tarmSetpoint = armMotor.getSelectedSensorPosition(0);\n\t\t\n\t\tstick = new Joystick(0);\n\t\tstickReversed = false;\n\t\txbox = new XboxController(1); // USB port, set in driverstation.\n\t\t\n\t\tdriveCamera = CameraServer.getInstance().startAutomaticCapture(0);\n\t}", "public double curSwing(){\r\n return swingGyro.getAngle();\r\n }" ]
[ "0.7315133", "0.7028217", "0.7024087", "0.69689953", "0.69302315", "0.6870344", "0.6770375", "0.670442", "0.65907335", "0.656956", "0.65205926", "0.6484931", "0.64501923", "0.6444666", "0.6421202", "0.64113283", "0.6406699", "0.6389919", "0.63833505", "0.6351233", "0.62694734", "0.6263638", "0.62381154", "0.6227077", "0.6226774", "0.6180065", "0.6168906", "0.6165043", "0.6159288", "0.6158885", "0.6128387", "0.6123207", "0.6106195", "0.6084602", "0.6083821", "0.6061009", "0.60520434", "0.6046306", "0.6036739", "0.60363954", "0.6027291", "0.6023721", "0.5999103", "0.5990314", "0.59844923", "0.59837824", "0.5980698", "0.5980179", "0.5967451", "0.59661174", "0.596462", "0.596337", "0.5962617", "0.5950901", "0.5938629", "0.5931513", "0.59314966", "0.592878", "0.59188867", "0.5906246", "0.590046", "0.5894253", "0.58920014", "0.58902323", "0.5869751", "0.5868423", "0.58669776", "0.58664393", "0.5863383", "0.5861814", "0.585986", "0.5854427", "0.5852798", "0.58487016", "0.5845542", "0.58334243", "0.5833321", "0.58122027", "0.5810915", "0.58087593", "0.58023435", "0.58015263", "0.5796252", "0.57937837", "0.57909596", "0.57903504", "0.57783514", "0.5776428", "0.5750454", "0.5746553", "0.57390296", "0.5738515", "0.57318765", "0.5722856", "0.5721994", "0.571568", "0.5714119", "0.5703674", "0.5701739", "0.5687965" ]
0.61849415
25
/ renamed from: a
public int mo9867a() { return this.f2526a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: b
public A mo9868b() { return this.f2527b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "@Override\n\tpublic void b() {\n\n\t}", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public bb b() {\n return a(this.a);\n }", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "public void b() {\r\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public abstract void b(StringBuilder sb);", "public void b() {\n }", "public void b() {\n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }", "public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public void b() {\n ((a) this.a).b();\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public t b() {\n return a(this.a);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "public abstract T zzm(B b);", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public abstract void zzc(B b, int i, int i2);", "public interface b {\n}", "public interface b {\n}", "private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }", "BSubstitution createBSubstitution();", "public void b(ahd paramahd) {}", "void b();", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "B database(S database);", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public abstract C0631bt mo9227aB();", "public an b() {\n return a(this.a);\n }", "protected abstract void a(bru parambru);", "static void go(Base b) {\n\t\tb.add(8);\n\t}", "void mo46242a(bmc bmc);", "public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }", "public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public abstract BoundType b();", "public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }", "b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }", "private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }", "public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }", "interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}", "@Override\n\tpublic void visit(PartB partB) {\n\n\t}", "public abstract void zzb(B b, int i, long j);", "public abstract void zza(B b, int i, zzeh zzeh);", "int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }", "public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }", "public abstract void a(StringBuilder sb);", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public abstract void zzf(Object obj, B b);", "public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}", "@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }", "void mo83703a(C32456b<T> bVar);", "public void a(String str) {\n ((b.b) this.b).d(str);\n }", "public void selectB() { }", "BOperation createBOperation();", "void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}", "private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }", "public void b(String str) {\n ((b.b) this.b).e(str);\n }", "public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }", "public abstract void zza(B b, int i, T t);", "public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }", "public abstract void zza(B b, int i, long j);", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public abstract void mo9798a(byte b);", "public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }", "private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.5886636", "0.58828026", "0.5855491", "0.584618", "0.5842517", "0.5824137", "0.5824071", "0.58097327", "0.5802052", "0.58012927", "0.579443", "0.5792392", "0.57902914", "0.5785124", "0.57718205", "0.57589084", "0.5735892", "0.5735892", "0.5734873", "0.5727929", "0.5720821", "0.5712531", "0.5706813", "0.56896514", "0.56543154", "0.5651059", "0.5649904", "0.56496733", "0.5647035", "0.5640965", "0.5640109", "0.563993", "0.5631903", "0.5597427", "0.55843794", "0.5583287", "0.557783", "0.55734867", "0.55733293", "0.5572254", "0.55683887", "0.55624336", "0.55540246", "0.5553985", "0.55480546", "0.554261", "0.5535739", "0.5529958", "0.5519634", "0.5517503", "0.55160624", "0.5511545", "0.5505353", "0.5500533", "0.5491741", "0.5486198", "0.5481978", "0.547701", "0.54725856", "0.5471632", "0.5463497", "0.5460805", "0.5454913", "0.5454885", "0.54519916", "0.5441594", "0.5436747", "0.5432453", "0.5425923", "0.5424724", "0.54189867", "0.54162544", "0.54051477", "0.53998184", "0.53945845", "0.53887725", "0.5388146", "0.5387678", "0.53858143", "0.53850687", "0.5384439" ]
0.0
-1
servicio para enviar promociones a un cliente especificando su nombre
@Path("/Enviar") @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response SendPromotion(String query){ logger.debug("Promociones - Enviar - query: " + query); //obtenemos el nombre del cliente JSONObject jsonObjectRequest = new JSONObject(query); String nombre = jsonObjectRequest.get("nombre").toString(); String msg = MSG_PROCESS_NOT_STARTED; int cod = -1; JSONArray result = new JSONArray(); if(!nombre.equals("")){ //obtenemos la id del cliente a través del nombre ClienteDao clienteDao = new ClienteDao(); int idCliente = clienteDao.GetId(nombre); logger.debug("SendPromotion - idCustomer: "+idCliente); if(idCliente != -1){ //comprobamos que el cliente tenga al menos una reserva boolean existeReserva = clienteDao.ExisteReserva(idCliente); if(existeReserva){ //obtenemos las reservas del cliente ReservaDao reservaDao = new ReservaDao(); ArrayList<Reserva> reservas = reservaDao.GetReservasCliente(idCliente); if(reservas.size() > 0){ //obtenemos la preferencia de envío del cliente String preferencia = clienteDao.GetPreferencia(idCliente); if(!preferencia.equals("")){ //insertamos en el JSON el nombre del cliente y la preferencia de envío JSONObject client = new JSONObject(); if (preferencia.equals("email")){ client.put("metodoenvio","EMAIL"); }else{ client.put("metodoenvio","SMS"); } client.put("nombrecliente",nombre); result.put(client); HotelDao hotelDao = new HotelDao(); ArrayList<Promocion> hotelesPromocionables; //para todas las reservas del cliente for(Reserva reserva : reservas){ //obtenemos el id del hotel a través del id de la reserva int idHotel = reserva.getIdHotel(); if(idHotel != -1){ //obtenemos la ciudad del hotel a través la id String ciudad = hotelDao.GetCiudad(idHotel); if(!ciudad.equals("")){ //obtenemos los hoteles que se pueden promocionar al cliente en base a la ciudad de anteriores reservas hotelesPromocionables = hotelDao.GetHotelesPromocionables(idHotel,ciudad); JSONArray hoteles = new JSONArray(); if(hotelesPromocionables.size() > 0){ //obtenemos el nombre del hotel a través de su id String nombreHotel = hotelDao.GetNombre(idHotel); if(!nombreHotel.equals("")){ //insertamos en el JSON el nombre del hotel ya reservado y la ciudad JSONObject infoHotelReservado = new JSONObject(); infoHotelReservado.put("Hotel Ya Reservado",nombreHotel); infoHotelReservado.put("Ciudad",ciudad); hoteles.put(infoHotelReservado); JSONArray promociones = new JSONArray(); //para todos los hoteles promocionales for(Promocion hp : hotelesPromocionables){ //insertamos el nombre y plantilla del hotel a promocionar JSONObject p = new JSONObject(); p.put("Nombre Hotel", hp.getNombreHotel()); p.put("Asunto",hp.getAsunto()); p.put("Cuerpo",hp.getCuerpo()); promociones.put(p); } hoteles.put(promociones); }else{ cod = 10; msg = MSG_10; } }else{ cod = 9; msg = MSG_9; } result.put(hoteles); }else{ cod = 8; msg = MSG_8; } }else{ cod = 7; msg = MSG_7; } cod = 1; msg = MSG_1; } }else{ cod = 6; msg = MSG_6; } }else{ cod = 5; msg = MSG_5; } }else{ cod = 4; msg = MSG_4; } }else{ cod = 3; msg = MSG_3; } }else{ if(nombre.equals("")){ cod = 2; msg = MSG_2; } } JSONObject response = new JSONObject(); response.put("msg",msg); response.put("cod",cod); response.put("result",result); return Response.status(200).entity(response.toString()).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clienteSalio(String name, String cuarto) throws IOException {\n if (cuarto.equals(\"Reunion de clientes\")) {\n IntercambioDeUsuarios(name);\n } else {\n for (int c = 0; c < clientesEsperando.length; c++) { // Transforma cualquier usuario que escribio salir en la lista de espera a null\n if (clientesEsperando[c] != null) {\n if (name.equals(clientesEsperando[c].clientName)) {\n\n \n clientesEsperando[c] = null;\n try {\n clientesEsperando[c] = clientesEsperando[c + 1]; \n clientesEsperando[c + 1] = null;\n } catch (Exception e) {\n }\n clientesEsperando[c].actualizarCuartosReunion(clientesConectados);\n clientesEsperando[c].actualizarCuartosEspera(clientesEsperando);\n break;\n }\n }\n }\n }\n\n }", "private void peticionDeCliente() throws IOException, InterruptedException {\n\t\tString mensaje = null;\n\t\tboolean salir = false;\n\t\twhile(!salir) {\n\t\t\tmensaje = in.readLine();\n\t\t\tif(mensaje!=null && !mensaje.split(\";\")[0].equals(\"Comprobacion\")) {\n\t\t\t\tthis.tcpServidor.colaPeticion.put(mensaje); //ALMACENA SOLICITUD EN COLA_PETICIONES\n\t\t\t\tSystem.out.println(\"Peticion del cliente \"+this.idCliente+\": \"+ mensaje);\n\t\t\t}\n\t\t}\n\t}", "public Servicio(String servicio){\n nombreServicio = servicio;\n }", "public Cliente nuevoCliente (String nombre){\r\n\t\t//TODO Implementar metodo\r\n\t\treturn null;\r\n\t}", "void realizarSolicitud(Cliente cliente);", "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 }", "private void enviarPaqueteACliente(DatagramPacket recibirPaquete) throws IOException {\n try {\n\n mostrarMensaje(\"\\n\\nRepitiendo datos al cliente...\");\n byte datos[] = new byte[100];\n datos = mensaje.getBytes();\n //crea paquete a enviar\n DatagramPacket enviarPaquete = new DatagramPacket(\n datos, datos.length,\n recibirPaquete.getAddress(), recibirPaquete.getPort());\n\n socket.send(enviarPaquete);//enviar el paquete\n mostrarMensaje(\"Paquete enviado\\n\");\n } catch (NullPointerException e) {\n }\n\n }", "public Cliente(String nombre,int comensales){\n\t\tthis.nombre = nombre;\n\t\tthis.comensales =comensales;\n\t}", "@Override\n public DatosIntercambio subirFichero(String nombreFichero,int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\n\n \t//AQUI HACE FALTA CONOCER LA IP PUERTO DEL ALMACEN\n \t//Enviamos los datos para que el servicio Datos almacene los metadatos \n \tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \t\n \t//aqui deberiamos haber combropado un mensaje de error si idCliente < 0 podriamos saber que ha habido error\n int idCliente = datos.almacenarFichero(nombreFichero,idSesionCliente);\n int idSesionRepo = datos.dimeRepositorio(idCliente);//sesion del repositorio\n Interfaz.imprime(\"Se ha agregado el fichero \" + nombreFichero + \" en el almacen de Datos\"); \n \n //Devolvemos la URL del servicioClOperador con la carpeta donde se guardara el tema\n DatosIntercambio di = new DatosIntercambio(idCliente , \"rmi://\" + direccionServicioClOperador + \":\" + puertoServicioClOperador + \"/cloperador/\"+ idSesionRepo);\n return di;\n }", "public void enviaMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=4\";\r\n\t\tparams[1] = \"email=\" + usuario;\r\n\r\n\t\tcon.sendHTTP(params);\r\n\t}", "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\n\tpublic void cadastrar(Cliente o) {\n\t\t\n\t}", "public Sesion(String codigoCliente) {\n cliente = new Cliente(codigoCliente);\n estado = Estado.inicioBot;\n accion = Accion.registrar;\n valor = ValorAIngresar.nombre;\n mensajeRecibido = null;\n respuesta = new Respuesta();\n }", "private void enviarRequisicaoPerguntarNome() {\n try {\n String nome = NomeDialogo.nomeDialogo(null, \"Informe o nome do jogador\", \"Digite o nome do jogador:\", true);\n if (servidor.verificarNomeJogador(nome)) {\n nomeJogador = nome;\n comunicacaoServico.criandoNome(this, nome, \"text\");\n servidor.adicionarJogador(nome);\n servidor.atualizarLugares();\n } else {\n JanelaAlerta.janelaAlerta(null, \"Este nome já existe/inválido!\", null);\n enviarRequisicaoPerguntarNome();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void buscarCliente(String dato) {\n\t\tList<Cliente> listaEncontrados = clienteDao.buscarContrato(dato);\r\n\t\tvistaCliente.mostrarClientes(listaEncontrados);\r\n\t}", "private void enviarMensagem(String mensagem) {\n //Este for anda de acordo com o tamanho do array da mensagem\n for ( int a = 0; a < clientes.size(); a++ ) {\n //Enquanto o cliente estiver enviado ele pega a mensagem\n clientes.get(a).println(mensagem);\n clientes.get(a).flush();\n }\n }", "public void setTipo_servicio(java.lang.String tipo_servicio) {\n this.tipo_servicio = tipo_servicio;\n }", "public void Pedircarnet() {\n\t\tSystem.out.println(\"solicitar carnet para verificar si es cliente de ese consultorio\");\r\n\t}", "private void requestClientNameFromServer() {\n writeToServer(ServerAction.GET_NAME + \"\");\n }", "void grabarCliente(){\n RequestParams params = new RequestParams();\n params.put(\"nombre\",edtNombre.getText().toString().trim());\n params.put(\"apellido\",edtApellido.getText().toString().trim());\n params.put(\"correo\", edtCorreo.getText().toString().trim());\n String claveMD5 = edtClave.getText().toString().trim();\n try {\n params.put(\"clave\", ws.getMD5(claveMD5));\n } catch (Exception e) {\n e.printStackTrace();\n }\n params.put(\"id_cargo\",idCargo);\n params.put(\"autoriza\",validarCheckBoxAutoriza());\n crearUsuarioWS(params);\n }", "public TransmitirResponse transmitirNroExpediente(TransmitirNroExpedienteRequest tramiteSuceRequest) {\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"======================\");\r\n\t\t\tSystem.out.println(\"Inicio: transmitirNroExpediente\");\r\n\r\n\t\t\tMensajeType mensajeType = tramiteSuceRequest.getMensaje();\r\n\r\n\t\t\t//1: Se recupera la SUCE\r\n\t\t\tBeanSuce suce = new BeanSuce();\r\n\t\t\tsuce.setSuce(mensajeType.getSuce());\r\n\t\t\tsuce.setNroExpediente(mensajeType.getNumeroExpediente());\r\n\r\n\t\t\t//2: Se actualiza la SUCE\r\n\t\t\tServicioSuce servicioSuce = new ServicioSuce();\r\n\t\t\tservicioSuce.modificarSuce(suce);\r\n\r\n\t\t\t// 2.1: Registrar estado traza 6: Suce generada\r\n\t\t\tBeanTraza traza = new BeanTraza();\r\n\t\t\ttraza.setEstadoTraza(6);\r\n\t\t\ttraza.setDe(2);\r\n\t\t\ttraza.setPara(3);\r\n\r\n\t\t\tBeanFormato formato = new BeanFormato();\r\n\t\t\tformato.setFormato(mensajeType.getFormato());\r\n\r\n\t\t\tServicioOrden servicioOrden = new ServicioOrden();\r\n\t\t\tBeanOrden orden = servicioOrden.buscarOrdenPorSuce(suce.getSuce());\r\n\t\t\torden = servicioOrden.buscarOrdenPorOrdenId(orden.getOrdenId(), formato);\r\n\t\t\tBeanTce tce = servicioOrden.buscarTcePorOrdenId(orden.getOrdenId());\r\n\t\t\tBeanMto mto = servicioOrden.buscarMtoVigentePorOrdenId(orden.getOrdenId());\r\n\t\t\tservicioOrden.registrarTraza(tce, mto, null, null, traza);\r\n\r\n\t\t\t//3: Transmitir Nro de Expediente a Usuario\r\n\t\t\t//TODO Transmitir Nro de Expediente a Usuario\r\n\r\n\t\t\tSystem.out.println(\"Fin\");\r\n\t\t\tSystem.out.println(\"======================\");\r\n\r\n\t\t\tTransmitirResponse res = new TransmitirResponse();\r\n\t\t\tres.setCodigo(\"OK\");\r\n\t\t\tres.setTexto(\"Exito\");\r\n\t\t\treturn res;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t\tTransmitirResponse res = new TransmitirResponse();\r\n\t\t\tres.setCodigo(\"ERR\");\r\n\t\t\tres.setTexto(\"Error\");\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}", "public void makeClient() {\n try {\n clienteFacade.create(cliente);\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Cliente creado exitosamente\", null));\n } catch (Exception e) {\n System.err.println(\"Error en la creacion del usuario: \" + e.getMessage());\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_FATAL, e.getMessage(), null));\n }\n }", "public Cliente getCliente(String nombre) {\r\n\t\t//TODO Implementar metodo\r\n\t\tthrow new IllegalStateException();\r\n\t}", "public Sesion(Cliente cl) {\n this.cliente = cl;\n estado = Estado.inicioBot;\n accion = Accion.iniciarSesion;\n valor = ValorAIngresar.pin;\n mensajeRecibido = null;\n respuesta = new Respuesta();\n }", "public String comunicarServidor(String[][] parametros) {\n\n\t\tString xmlString = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\";\n\t\txmlString += \"<\" + parametros[0][0] + \" id=\\\"\" + parametros[0][1]\n\t\t\t\t+ \"\\\">\";\n\n\t\tfor (int i = 1; i < parametros.length; i++) {\n\t\t\txmlString += \"<\" + parametros[i][0] + \">\" + parametros[i][1] + \"</\"\n\t\t\t\t\t+ parametros[i][0] + \">\";\n\t\t}\n\t\txmlString += \"</\" + parametros[0][0] + \">\";\n\n\t\treturn clienteTCP(this.host, this.port, xmlString); // Retorna a mensagem de resposta do servidor \n\n\t}", "public static Servicio insertServicio(String nombre_servicio,\n String descripcion_servicio, \n String nombre_tipo_servicio){\n \n /*Se definen valores para servicio y se agrega a la base de datos*/\n Servicio miServicio = new Servicio(nombre_servicio, \n descripcion_servicio,\n nombre_tipo_servicio);\n try {\n miServicio.registrarServicio();\n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return miServicio;\n }", "public Cliente(String nombre, String nit, String direccion) {\n this.nombre = nombre;\n this.nit = nit;\n this.direccion = direccion;\n }", "Cliente(){}", "@Override\n\tpublic void send(Trino mensaje) throws RemoteException {\n\t\tbbdd.almacenTrinos(mensaje);\n\t\tString receptor = mensaje.getReceptor();\n\t\tif(bbdd.buscarUsuarioConectado(receptor)){\n\t\t\tif(memoria.isEmpty()){\n\t\t\t\tArrayList<Trino> lista = new ArrayList<Trino>();\n\t\t\t\tlista.add(mensaje);\n\t\t\t\tmemoria.put(receptor, lista);\n\t\t\t}else{\n\t\t\t\tif(memoria.get(receptor) == null){\n\t\t\t\t\tArrayList<Trino> lista = new ArrayList<Trino>();\n\t\t\t\t\tlista.add(mensaje);\n\t\t\t\t\tmemoria.put(receptor, lista);\n\t\t\t\t} else{\n\t\t\t\t\tList<Trino> list = memoria.get(receptor);\n\t\t\t\t\tlist.add(mensaje);\n\t\t\t\t\tmemoria.replace(receptor, (ArrayList<Trino>) list);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} else {\n\t\t\tbbdd.setMensajeOffline(mensaje.getReceptor(), mensaje.getTexto());\n\t\t}\n\t\t\n\t\t\n\t}", "public void run() {\n\t\ttry {\n\t\t\tin = new BufferedReader(new InputStreamReader(cliente.getInputStream()));\n\t\t\tmOut = new PrintWriter(new BufferedWriter(new OutputStreamWriter(cliente.getOutputStream())), true);\n\n\t\t\tint comparar = idCliente(); //recibe id del cliente\n\t\t\tif(comparar==0) { \n\t\t\t\t//ENVIA id PARA EL CLIENTE\n\t\t\t\tthis.tcpServidor.maxCliente++;\n\t\t\t\tenviarMensaje(\"ID;\"+this.tcpServidor.maxCliente);\n\t\t\t\t//ENVIA maxCliente A TODAS LAS REPLICAS\n\t\t\t\tfor (HiloReplica h : this.tcpServidor.hiloReplica) {\n\t\t\t\t\th.enviarMensaje(\"MAXCLIENTE;\"+this.tcpServidor.maxCliente);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.idCliente = comparar; //GUARDA id DEL CLIENTE\n\t\t\t}\n\t\n\t\t\tSystem.out.println(\"Cliente \"+this.idCliente+\" conectado a Balanceado \"+this.tcpServidor.id);\n\t\t\t\n\t\t\tpeticionDeCliente();\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t//System.out.println(\"HiloCliente\" + \": Error\" + e);\n\t\t}\n\t}", "private static void abrirPuerto() {\n try {\n serverSocket = new ServerSocket(PUERTO);\n System.out.println(\"Servidor escuchando por el puerto: \" + PUERTO);\n } catch (IOException ex) {\n Logger.getLogger(ServidorUnicauca.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static void main (String args[]) throws IOException{\n\t\tint PUERTO=4444;\n\t\tServerSocket servidor = new ServerSocket(PUERTO);\n\t\tSystem.out.println(\"Servidor iniciado...\");\n\t\t\n\t\tSocket tabla[] = new Socket[MAXIMO];\n\t\tComunHilos comun = new ComunHilos(MAXIMO, 0,0, tabla);\n\t\t\n\t\twhile(comun.getCONEXIONES()<MAXIMO) {\n\t\t\tSocket socket= new Socket();\n\t\t\tsocket= servidor.accept(); //esperando cliente\n\t\t\t\n\t\t\t//OBKETO COMPARTIDO POR LOS HILOS\n\t\t\t\n\t\t\tcomun.addtabla(socket, comun.getCONEXIONES());\n\t\t\tcomun.setACTUALES(comun.getACTUALES()+1);\n\t\t\tcomun.setCONEXIONES(comun.getCONEXIONES()+1);\n\t\t\t\n\t\t\tHiloservidorChat hilo = new HiloservidorChat(socket, comun);\n\t\t\thilo.start();\n\t\t}\n\t\tservidor.close();\n\t}", "public void novo() {\n cliente = new Cliente();\n }", "public void addServicio(String nombre_servicio, List<String> parametros){\n\t\t\n\t\tboolean exists = false;\n\t\t//Se comprueba si ya estaba registrado dicho servicio\n\t\tfor(InfoServicio is: infoServicios){\n\t\t\tif(is.getNombre_servicio().equalsIgnoreCase(\"nombre_servicio\")){\n\t\t\t\texists = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!exists){\n\t\t\t//Es un servicio nuevo, se registra.\n\t\t\tInfoServicio is = new InfoServicio(nombre_servicio,parametros);\n\t\t\tinfoServicios.add(is);\n\t\t}\n\t\telse{\n\t\t\t//Servicio ya registrado, no se hace nada.\n\t\t\tSystem.err.println(\"ERROR: Servicio \" + nombre_servicio + \" ya registrado para \" + this.getNombre_servidor());\n\t\t}\n\t\t\n\t}", "public void subeUsuario() {\n\t\tEditText nicknameText = (EditText) findViewById(R.id.nicknameEditText);\n\t\tstrNickname = nicknameText.getText().toString().trim();\n\t\t\n\t\tif (strNickname.equals(\"\")) {\n\t\t\tToast.makeText(this, \"Nickname no puede estar vacío\",Toast.LENGTH_LONG).show();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tguardarPreferences();\n\t\t\n\t\t//lanzamos un uploadService\n\t\tIntent uploadService = new Intent(getApplicationContext(),UploadUserService.class);\n\t\t\n\t\tuploadService.putExtra(\"id\", userId);\n\t\tuploadService.putExtra(\"nickname\", strNickname);\n\t\tuploadService.putExtra(\"mail\", strEmail);\n\t\tuploadService.putExtra(\"dob\", dayOfBirth);\n\t\tuploadService.putExtra(\"pass\", strPassword);\n\t\tuploadService.putExtra(\"genero\", gender);\n\t\tuploadService.putExtra(\"avatar\", strAvatar);\n\t\t\n\t\tstartService(uploadService);\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 void createNewClient(String nom, String prenom, String tel, String mail, String adresse) throws SQLException {\n\t\tint tmp = getLastClientId();\n\t\tSystem.out.println(tmp);\n\t\tif(tmp != 0) {\n\t\t\t//voir generated keys pour l'id\n\t\t\tClient tmpClient = new Client(tmp, nom, prenom, tel, mail, adresse);\n\t\t\tClient tmp2 = create(tmpClient);\n\t\t\tSystem.out.println(tmp2.getLogin());\n\t\t\tSystem.out.println(\"Succès lors de la création de l'utilisateur\");\n\t\t}else\n\t\t\tSystem.out.println(\"Erreur lors de la création de l'utilisateur\");\n\t}", "public Cliente(String nome) {\n super(nome);\n }", "public void emprestar(ClienteLivro cliente) {\n\t\tcliente.homem = 100;\n\n\t}", "public void conectarServicio(){\n\t\tIntent intent = new Intent(this,CalcularServicio.class);\n\t\tbindService(intent, mConexion, Context.BIND_AUTO_CREATE);\n\t\tmServicioUnido = true;\n\t}", "public void addClient() throws IOException {\n BufferedReader in;\n Socket clientSocket; //pour chaque nouveau client\n System.out.println(\"New Client connected.\");\n clientSocket = serverSocket.accept();\n out = new PrintWriter(clientSocket.getOutputStream());\n in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\n tabClientsout.addElement(out);\n Runnable r = new recevoir(out, in);\n // genere le Thread pour le nouveau client\n new Thread(r).start();\n }", "public void cadastrar(Cliente cliente){\n\t\tSystem.out.println(cliente.toString());\r\n\t\tint tamanho = this.clientes.length;\r\n\t\tthis.clientes = Arrays.copyOf(this.clientes, this.clientes.length + 1);\r\n\t\tthis.clientes[tamanho - 1] = cliente;\r\n\t}", "@Override\n\tpublic void altaCliente(Cliente cliente) {\n\t}", "@Override\n\tpublic void sendMessageSeul(Client cm, String Nomclient, String msg) throws RemoteException {\n\t\tif(!users.contains(cm)) {\n\t\t\tusers.add(cm); \n\t\t\t} \t\t\t\n\t\t//envoyes les message vers un utilisateur\n\t\ttry {\n\t\t\tfor (Client c : users) {\n\t\t\n\t\t\t // 回调远程客户端方法\n\t\t\t String user=cm.getName(); \n\t\t if(user==null || user==\"\") {\n\t\t \t user = \"anonymous\";\n\t\t }\t \n\t\t if (c.getName().equals(Nomclient)) {\n\t\t \t c.afficherMessage(user + \" : \" + msg);\n\t\t }\t\t \n\t\t //c.showDialog(msg); he colll\n\t\t\t}\n\t\t} catch (RemoteException ex) {\n\t\t\tusers.remove(cm);\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void persistir(Cliente cliente){\n }", "public AgregarClientes(Directorio directorio) {\n initComponents();\n this.directorio=directorio;\n \n \n }", "@PostMapping(\"/agregarCliente\")\r\n public @ResponseBody\r\n Map<String, Object> agregarCliente(\r\n @RequestParam(\"tipoDocumento\") String tipoDocumento,\r\n @RequestParam(\"documento\") String documento,\r\n @RequestParam(\"nombre\") String nombre,\r\n @RequestParam(\"pais\") String pais,\r\n @RequestParam(\"ciudad\") String ciudad,\r\n @RequestParam(\"direccion\") String direccion,\r\n @RequestParam(\"telefono\") String telefono,\r\n @RequestParam(\"correo\") String correo) {\r\n try {\r\n\r\n Cliente CL = new Cliente();\r\n\r\n CL.setTipoDocumento(tipoDocumento);\r\n CL.setDocumento(documento);\r\n CL.setNombre(nombre);\r\n CL.setPais(pais);\r\n CL.setCiudad(ciudad);\r\n CL.setDireccion(direccion);\r\n CL.setTelefono(telefono);\r\n CL.setCorreo(correo.toLowerCase());\r\n CL.setUser(usuario());\r\n\r\n clienteRepository.save(CL);\r\n\r\n return ResponseUtil.mapOK(CL);\r\n } catch (Exception e) {\r\n return ResponseUtil.mapError(\"Error en el proceso \" + e);\r\n }\r\n }", "public HiloCliente(TCPServidor tcpServidor, Socket cliente, int numeroDeCliente) {\n\t\tthis.tcpServidor = tcpServidor;\n\t\tthis.cliente = cliente;\n\t\tthis.idCliente = numeroDeCliente;\n\t}", "public Cliente buscarCliente(int codigo) {\n Cliente cliente =new Cliente();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, \"\n + \"idioma, categoria FROM clientes where codigo=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setInt(1, codigo);\n\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n cliente.setCodigo(rs.getInt(\"codigo\"));\n cliente.setNit(rs.getString(\"nit\"));\n cliente.setEmail(rs.getString(\"email\"));\n cliente.setPais(rs.getString(\"pais\"));\n cliente.setFechaRegistro(rs.getDate(\"fecharegistro\"));\n cliente.setRazonSocial(rs.getString(\"razonsocial\"));\n cliente.setIdioma(rs.getString(\"idioma\"));\n cliente.setCategoria(rs.getString(\"categoria\")); \n\t\t} \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return cliente;\n\t}", "public void Conectar(){\n Executors.newSingleThreadExecutor().execute(() -> {\n try {\n ws.connect();\n // se indica que el proposito del mensaje es identificar este nodo.\n // para lo cual se manda en el cuerpo que se trata de una tablet origin\n // y se envia la identificacion.\n String mensaje = buildMessage(this.PROPOSITO_ID, this.id, this.TABLET_ORIG);\n ws.sendText(mensaje);\n } catch (WebSocketException e) {\n e.printStackTrace();\n }\n });\n }", "public String enviarAServidor() {\n return \"\";\n }", "public synchronized void mensajeRecibido(int tipo, Serializable mensaje) {\n\n System.out.println(\"ControladorServidor : mensajeRecibido : tipo=\" + tipo + \" mensaje=\" + mensaje);\n log.info(\"ControladorServidor : mensajeRecibido : tipo=\" + tipo + \" mensaje=\" + mensaje);\n /*Tipos de mensajes:\n * 1- Mensaje de Chat\n * 2- Mensaje de Jugada o Informacion de Salas y mesas\n * 3- Mensaje de Entrada en mesa\n * 4- Mensaje de Salida de Mesa\n * 5- Cierre de conexión\n * 6- Mensaje de Entrada en Sala\n * 7- Mensaje de Salida de Sala\n *\n */\n if (tipo == TipoMensaje.MENSAJE_CHAT) {\n MensajeChat mensajeChat = ((MensajeChat) mensaje);\n System.out.println(\"server \" + mensajeChat.get_usuario());\n GestorChatServidor.getInstance(this).dejamensaje(mensajeChat);\n\n } else if (tipo == TipoMensaje.MENSAJE_JUGADA) {\n MensajeJugada mensajeJugada = ((MensajeJugada) mensaje);\n GestorJuegosServidor.getInstance(this).dejamensaje(mensajeJugada);\n //TODO Devolver la confirmacion de la jugada\n\n } else if (tipo == TipoMensaje.ENTRADA_MESA) {\n\n MensajeMesa m = (MensajeMesa) mensaje;\n if (GestorUsuarios.getInstancia(this).insertarJugadorEnMesa(m.getUsuario(), m.getMesa())) //Envio mensaje de confimacion de la entrada en la mesa\n {\n enviarMensajeMesa(m.getUsuario(), m);//necesito saber en qué mesa se ha insertado el cliente. Quito null y envio mensaje de vuelta\n } else {\n enviarMensajeMesa(m.getUsuario(), m);//TODO mirar porque devuelve false\n }\n } else if (tipo == TipoMensaje.SALIDA_MESA) {\n\n MensajeMesa m = (MensajeMesa) mensaje;\n GestorUsuarios.getInstancia(this).eliminarJugadorEnMesa(m.getUsuario());\n\n } else if (tipo == TipoMensaje.CERRAR_CONEXION) {\n //TODO cierre de conexion\n } else if (tipo == TipoMensaje.ENTRADA_SALA) {\n MensajeSala m = (MensajeSala) mensaje;\n GestorUsuarios.getInstancia(this).insertarJugadorEnSala(m.getUsuario(), m.getSala());\n\n //envío mensaje de vuelta para confirmarle al usuario que ha entrado en la sala\n enviarMensajeSala(m.getUsuario(), m);\n\n //envío la info de todas las mesas de la sala.\n enviarMesasDeUnaSala(m.getUsuario(), m.getSala());\n\n } else if (tipo == TipoMensaje.SALIDA_SALA) {\n\n MensajeSala m = (MensajeSala) mensaje;\n GestorUsuarios.getInstancia(this).eliminarJugadorEnSala(m.getUsuario());\n }\n\n\n\n }", "private static void menuCadastroCliente() throws Exception {\r\n String nome, email, cpf;\r\n int id;\r\n boolean erro = false;\r\n System.out.println(\"\\n\\t*** Cadastro ***\\n\");\r\n System.out.print(\"Nome completo: \");\r\n nome = read.nextLine();\r\n System.out.print(\"Email: \");\r\n email = read.next();\r\n do {\r\n System.out.print(\"CPF: \");\r\n cpf = read.next().replace(\".\", \"\").replace(\"-\", \"\");\r\n System.out.println(cpf);\r\n if (cpf.length() != 11) {\r\n System.out.println(\"CPF inválido!\\nDigite novamente!\");\r\n erro = true;\r\n }\r\n } while (erro);\r\n if (getCliente(email) == null) {\r\n\r\n id = arqClientes.inserir(new Cliente(nome, email, cpf));\r\n System.out.println(\"Guarde seu email, pois é através dele que você efetua o login em nossa plataforma\");\r\n System.out.println(\"Cadastro efetuado!\");\r\n gerenciadorSistema();\r\n } else {\r\n System.out.println(\"\\nJá existe Usuario com esse email!\\nCadastro cancelado!\");\r\n }\r\n }", "public void updateName() {\n try {\n userFound = clientefacadelocal.find(this.idcliente);\n if (userFound != null) {\n userFound.setNombre(objcliente.getNombre());\n clientefacadelocal.edit(userFound);\n objcliente = new Cliente();\n mensaje = \"sia\";\n } else {\n mensaje = \"noa\";\n System.out.println(\"Usuario No Encontrado\");\n }\n } catch (Exception e) {\n mensaje = \"noa\";\n System.out.println(\"El error al actualizar el nombre es \" + e);\n }\n }", "public void setIdPtoServicio(String idPtoServicio);", "public Client buscarClientePorId(String id){\n Client client = new Client();\n \n // Faltaaaa\n \n \n \n \n \n return client;\n }", "@Override\n\t@Transactional\n\tpublic List<Cliente> getPorNombre(String nombre) {\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Cliente> client =getCurrentSession().createQuery(\"from Cliente where nombre like '\"+nombre+\"%\"+\"'\"+\"and activo=1\").list();\n\t\treturn client;\n\t}", "@Override\n void create(Cliente cliente);", "public void carregarCliente() {\n\t\tgetConnection();\n\t\ttry {\n\t\t\tString sql = \"SELECT CLIENTE FROM CLIENTE ORDER BY CLIENTE\";\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(sql);\n\t\t\twhile(rs.next()) {\n\t\t\t\tcbCliente.addItem(rs.getString(\"CLIENTE\"));\n\t\t\t}\n\t\t}catch(SQLException e) {\n\t\t\tSystem.out.println(\"ERRO\" + e.toString());\n\t\t}\n\t}", "public Interfaz_RegistroClientes() {\n initComponents();\n limpiar();\n }", "public void ejecutar() throws IOException {\n ServerSocket serverSocket = null;\n\n try {\n serverSocket = new ServerSocket(4444);\n } catch (IOException e) {\n System.err.println(\"No se puede abrir el puerto: 4444.\");\n System.exit(1);\n }\n System.out.println(\"Puerto abierto: 4444.\");\n\n while (listening) {\n \t\n \tTCPServerHilo hilo = new TCPServerHilo(serverSocket.accept(), this);\n hilosClientes.add(hilo);\n hilo.start();\n }\n\n serverSocket.close();\n }", "private void enviarRequisicaoAdicionar() {\n servidor.adicionarPalito(nomeJogador);\n atualizarPalitos();\n }", "public Client lireClient(String nom, String prenom) {\n\t\tboolean dejaaffiche = false;\n\t\tfor (Client client : this.clients) {\n\n\t\t\tif (nom.equalsIgnoreCase(client.getNom()) && prenom.equalsIgnoreCase(client.getPrenom())) {\n\t\t\t\tSystem.out.println(\"Donnees du client \" + nom + \" \" + prenom + \" : Solde de Compte Courant = \" + client.getCompteCourant().getSolde() + \", solde de Compte Epargne = \" + client.getCompteEpargne().getSolde());\n\t\t\t\treturn client;\n\n\t\t\t}\n\n\t\t}\n\t\tif (dejaaffiche == false) {\n\t\t\tSystem.out.println(\"Le client n'existe pas\");\n\n\t\t}\n\t\treturn null;\n\t}", "@PostMapping(\"/relatorioporidclientenomecliente\")\n\tpublic ResponseEntity<List<Processos>> getProcessoIdclienteNomecliente(@RequestBody Processos objeto){\n\t\tList<Processos> lista = dao.findByClienteIdcliAndClienteNomecli(objeto.getCliente().getIdcli(), objeto.getCliente().getNomecli());\n\t\tif(lista.size()==0) return ResponseEntity.status(404).build();\n\t\treturn ResponseEntity.ok(lista);\n\t\t\n\t}", "private void teletransportar(Personaje p, Celda destino) {\n // TODO implement here\n }", "public void enviarMensajeInfoSalas(int idUsuario, MensajeInfoSalas mensaje) {\n comunicador.enviarMensaje(idUsuario, TipoMensaje.INFO_SALAS, mensaje);\n System.out.println(\"ControladorServidor: info de salas enviado\");\n }", "public void selecionarCliente() {\n int cod = tabCliente.getSelectionModel().getSelectedItem().getCodigo();\n cli = cli.buscar(cod);\n\n cxCPF.setText(cli.getCpf());\n cxNome.setText(cli.getNome());\n cxRua.setText(cli.getRua());\n cxNumero.setText(Integer.toString(cli.getNumero()));\n cxBairro.setText(cli.getBairro());\n cxComplemento.setText(cli.getComplemento());\n cxTelefone1.setText(cli.getTelefone1());\n cxTelefone2.setText(cli.getTelefone2());\n cxEmail.setText(cli.getEmail());\n btnSalvar.setText(\"Novo\");\n bloquear(false);\n }", "private void listaClient() {\n\t\t\r\n\t\tthis.listaClient.add(cliente);\r\n\t}", "public void enviarMensajeInfoMesas(int idUsuario, MensajeInfoMesas mensaje) {\n comunicador.enviarMensaje(idUsuario, TipoMensaje.INFO_MESAS, mensaje);\n System.out.println(\"ControladorServidor: info de mesas enviado\");\n\n }", "@Override\n\tpublic List<String> listarFicherosCliente(int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\t\t\n \tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tInterfaz.imprime(\"La lista de ficheros de la sesion: \" + idSesionCliente + \" ha sido enviada\");\n return datos.listarFicherosCliente(idSesionCliente);\n \n\t}", "@GET\r\n\t@Path(\"/{param}\")\r\n\t@Produces(MediaType.TEXT_HTML)\r\n\tpublic String cargoUsuario(@PathParam(\"param\") String nombre) {\n\t\tConnection conexion = Conexion.getConexion();\r\n\t\t// Comprobamos que la conexion no sea nula (es decir hay un error)\r\n\t\tif (conexion == null) {\r\n\t\t\tSystem.out.println(\"Error con la conexion a la BD!!\");\r\n\t\t} else {\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.println(\"Conexion a la BD correcta!!\");\r\n\t\t\t\t// Si la conexion es correta podemos usarla para hacer consultas\r\n\t\t\t\t// sobre la BD\r\n\t\t\t\t// CONSULTAS AQUI\r\n\t\t\t\tUsuario usu = new Usuario(nombre, \"serv\", \"1\");\r\n\t\t\t\t// REALIZO LA CONSULTA O INSTRUCCION SQL\r\n\t\t\t\ttry {\r\n\t\t\t\t\tStatement consulta = conexion.createStatement();\r\n\t\t\t\t\tString aEjecutar = \"INSERT INTO usuarios (usuario, nombre, id_perfil) VALUES ('\"\r\n\t\t\t\t\t\t\t+ usu.getUsuario()\r\n\t\t\t\t\t\t\t+ \"', '\"\r\n\t\t\t\t\t\t\t+ usu.getNombre()\r\n\t\t\t\t\t\t\t+ \"', '\" + usu.getId_perfil() + \"')\";\r\n\t\t\t\t\tconsulta.executeUpdate(aEjecutar);\r\n\t\t\t\t\tSystem.out.println(\"Se ha registrado Exitosamente\");\r\n\t\t\t\t\tconsulta.close();\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t\t\tSystem.out.println(\"No se Registro la persona\");\r\n\t\t\t\t}\r\n\t\t\t\t// Al terminar de hacer las consultas siempre debemos de cerrar\r\n\t\t\t\t// la conexion\r\n\t\t\t\tconexion.close();\r\n\t\t\t} catch (SQLException ex) {\r\n\t\t\t\tLogger.getLogger(Conexion.class.getName()).log(Level.SEVERE,\r\n\t\t\t\t\t\tnull, ex);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// //////////////////////////////////////////////////////\r\n\t\treturn \"<html> \" + \"<title>\" + \"Alta Usuario\" + \"</title>\"\r\n\t\t\t\t+ \"<body><h1>\" + \"Cargue el usuario : \" + nombre\r\n\t\t\t\t+ \"</body></h1>\" + \"</html> \";\r\n\t}", "@OnWebSocketConnect\n public void conectando(Session usuario){\n System.out.println(\"Conectando Usuario: \"+usuario.getLocalAddress().getAddress().toString());\n usuariosConectados.add(usuario);\n }", "public static void main(String[] args) {\r\n Restoran resto = new Restoran();\r\n int i = 0;\r\n for ( i = 0; i < 6; i++) {\r\n new Thread(new Cliente(resto,\"Cliente \" + i), \"Cliente \" + i).start();\r\n }\r\n new Thread(new Mozo(resto)).start();\r\n new Thread(new Cocinero(resto)).start();\r\n }", "public void envioMensajes(Rubik cuboRubik, String movimiento, int opcion, String ip) {\n try {\n// System.out.println(\"Entro\");\n Socket socketEnvio = new Socket(ip, puertoEnvio);\n DataOutputStream envio = new DataOutputStream(socketEnvio.getOutputStream());\n if (opcion == 1) {\n System.out.println(\"Envio Mensaje tipo 1.\");\n Mensaje mensaje = new Mensaje(cuboRubik, movimiento, opcion);\n envio.writeUTF(gson.toJson(mensaje));\n } else if (opcion == 3) {\n Mensaje mensaje = new Mensaje(opcion);\n envio.writeUTF(gson.toJson(mensaje));\n }\n } catch (IOException e) {\n System.out.println(\"Problema: \" + e.getMessage());\n }\n }", "public Cliente(String nombre, String nit, String direccion, String municipio, String departamento) {\n this.nombre = nombre;\n this.nit = nit;\n this.direccion = direccion;\n this.municipio = municipio;\n this.departamento = departamento;\n }", "@Override\r\n public Cliente buscarCliente(String cedula) throws Exception {\r\n return entity.find(Cliente.class, cedula);//busca el cliente\r\n }", "public Libro recupera(String nombre);", "public void recupera() {\n Cliente clienteActual;\n clienteActual=clienteDAO.buscaId(c.getId());\n if (clienteActual!=null) {\n c=clienteActual;\n } else {\n c=new Cliente();\n }\n }", "@Override\n\tpublic String bajarFichero(String URLdiscoCliente, int idFichero, int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\n\t\tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\" + direccion + \":\" + puerto + \"/almacen\");\n\t\t\n\t\t//se deberia comprobar si el fichero realmente es el del cliente\n\t\t\n\t\tMetadatos m = datos.descargarFichero(idFichero,idSesionCliente);\n\t\tint idCliente = datos.sesion2id(idSesionCliente);\n\t\tint idSesionRepo = datos.dimeRepositorio(idCliente);\n\t\tif (m != null){\n\t\t\t\n\t\t\tInterfaz.imprime(\"Se ha notificado que el fichero \" + m.getNombreFichero() + \" va a ser descargado\");\n\t\t\tString URLservicioSrOperador = \"rmi://\" + direccionServicioSrOperador + \":\" + puertoServicioSrOperador + \"/sroperador/\" + idSesionRepo;\n\t\t\n\t\t\t//ahora buscamos el Servicio SrOperador y le pasamos la URL del DiscoCliente y el id de cliente que es el nombre de la carpeta\n\t\t\tServicioSrOperadorInterface servicioSrOperador =(ServicioSrOperadorInterface)Naming.lookup(URLservicioSrOperador);\n\t\t\t//el tercer parametro es la carpeta donde esta el fichero real, en caso de compartido es la carpeta dequien comparte evidentemente.\n\t\t\tservicioSrOperador.bajarFichero(URLdiscoCliente,m.getNombreFichero(),m.getIdCliente());\n\t\t\treturn m.getNombreFichero();\n\t\t}else return null;\t\t\n\t}", "public PerfilCliente(Facade facade, String nome) {\n initComponents();\n this.facade = facade;\n LinkedList list = facade.buscarCliente(nome);\n Iterator it = list.iterator();\n c = (Cliente) it.next();\n iniciar();\n }", "@Override\r\n public void crearCliente(Cliente cliente) throws Exception {\r\n entity.getTransaction().begin();//inicia la creacion\r\n entity.persist(cliente);//se crea el cliente\r\n entity.getTransaction().commit();//finaliza la creacion\r\n }", "@Override\n\tpublic void notify(DelegateTask tareaDelegada) {\n\t\tString nombre = (String) tareaDelegada.getExecution().getVariable(\"IDNombreCliente\");\n\t\tString email = (String) tareaDelegada.getExecution().getVariable(\"IDEmail\");\n\t\tDate fechaAlta = (Date) tareaDelegada.getExecution().getVariable(\"IDFechaAlta\");\n\t\tString numTarjeta = (String) tareaDelegada.getExecution().getVariable(\"IDTarjeta\");\n\n\t\t// Acceso al tipo enumerado\n\t\tString emisor = (String) tareaDelegada.getExecution().getVariable(\"IDEmisor\");\n\t\tString direccion = (String) tareaDelegada.getExecution().getVariable(\"IDDireccion\");\n\n\t\tServicioClientes servicioClientes = new ServicioClientes();\n\t\tservicioClientes.insertar(new Cliente(nombre, direccion, fechaAlta, numTarjeta, emisor, email));\n\t}", "private static void crearPedidoGenerandoOPC() throws RemoteException {\n\n\t\tlong[] idVariedades = { 25, 29, 33 };\n\t\tint[] cantidades = { 6, 8, 11 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 3\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\t\t\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\n\t}", "public void Ingresar() {\nTipoCliente();\n\t\t\t\t\t\t\t\t\t\n}", "public void encerraServico(Servico servico) throws SQLException {\r\n\r\n servico.setStatus(0);\r\n servico.setDtEncerramento(LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\")));\r\n\r\n System.out.println(servico.toString());\r\n update(servico);\r\n String sql = \"UPDATE solicitacoes SET em_chamado=4 WHERE servico_id_servico= \" + servico.getCell(0).getValue();\r\n\r\n stmt = conn.createStatement();\r\n stmt.execute(sql);\r\n stmt.close();\r\n\r\n }", "public void createClient(String nam, String surnam, String id, String direction, String phone, String obs, int number) {\n\t\ttry {\n\t\t\trestaurant.addClient(nam, surnam, id, direction, phone, obs, number);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void acessarBuscaCep() throws InterruptedException {\n navegador.findElement(By.xpath(\"//*[@class='bt-link-ic bt-login link-btn-meu-correios']\")).click();\n\n // REALIZAR O LOGIN COM USUARIO E SENHA\n navegador.findElement(By.id(\"username\")).click();\n navegador.findElement(By.id(\"username\")).sendKeys(\"31403971862\");\n navegador.findElement(By.id(\"password\")).click();\n navegador.findElement(By.id(\"password\")).sendKeys(\"haenois001\");\n\n //CLICAR NO BOTÃO ENTRAR\n navegador.findElement(By.xpath(\"//button[@class='primario']\")).click();\n\n // ESPERAR OPÇÕES E CLICAR EM BUSCA CEP\n WebDriverWait wait = new WebDriverWait(navegador, 20);\n wait.until(ExpectedConditions.elementToBeClickable(By.id(\"opcoes\")));\n navegador.findElement(By.id(\"busca-cep\")).click();\n Thread.sleep(1000);\n\n }", "private void pararServicioPomodoro(){\n Intent pararServicio = new Intent(this,ServicioPomodoro.class);\n pararServicio.setAction(\"intentParar\");\n startService(pararServicio);\n tiempo.stop();\n tiempo.setBase(SystemClock.elapsedRealtime());\n }", "public FacturaCompra cashOnDelivery(String userName,TipoMoneda tipoMoneda);", "public frmPesquisaServico() {\n initComponents();\n listarServicos();\n }", "public alterarSenhaCliente() {\n }", "@Override\n\t@Transactional\n\tpublic List<Cliente> getClienteByAnyWord(String nombre, Long idcliente, Long idGrupo, Long idPunto) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<Cliente> cliente =getCurrentSession().createQuery(\"select clientes from Grupo g join g.clientes clientes where clientes.nombre like '\"+nombre+\"%\"+\"'\"+\"and g.id=\"+idGrupo+\" and clientes.activo=1\").list();\n\n\t\t\t\treturn cliente;\n\t}", "public void execute()\n\t {\n\t // espera a que se conecte cada cliente\n\t for ( int i = 0; i < jugadores.length; i++ ) //<-- dos por defecto o de 0 a 1\n\t {\n\t try // espera la conexión, crea el objeto Jugador, inicia objeto Runnable\n\t {\n\t \t//el metodo accept() es bloqueante hasta recibir una conexion\n\t jugadores[i] = new Jugador( servidor.accept(), i );\n\t //el constructor de jugador recibe un objeto socket crea los flujos E/S\n\t ejecutarJuego.execute(jugadores[i]); // ejecuta el objeto Runnable subproceso\n\t } // fin de try\n\t catch ( IOException excepcionES ) \n\t {\n\t excepcionES.printStackTrace();\n\t System.exit(1);\n\t } // fin de catch\n\t } // fin de for\n\n\t bloqueoJuego.lock(); // bloquea el juego para avisar al subproceso del jugador Uno\n\n\t try\n\t {\n\t jugadores[JUGADOR_1].establecerSuspendido(false); // continúa el jugador Uno\n\t otroJugadorConectado.signal(); // despierta el subproceso del jugador Uno\n\t } // fin de try\n\t finally\n\t {\n\t bloqueoJuego.unlock(); // desbloquea el juego después de avisar al jugador Uno\n\t } // fin de finally\n\t }", "@Quando(\"^insiro uma conta com nome \\\"(.*?)\\\" na rota \\\"(.*?)\\\"$\")\n\tpublic void insiro_uma_conta_com_nome(String nome, String rota) throws Throwable {\n\t\t\n\t\tvResponse = \n\t\tgiven()\n\t\t\t.header(\"Authorization\", \"JWT \" + BaseStep.token)\n\t\t\t.body(BaseStep.conta)\n\t\t\t.log().all()\n\t\t.when()\n\t\t\t.post(rota)\n\t\t.then()\n\t\t.log().all()\n\t\t;\n\t\t\n\t\tsetvResponse(vResponse);\n\t}", "@Override\n\tpublic void run() {\n\t\twhile(true) {\n\t\t\tCliente c = criaCliente();\n\t\t\tArrayList<Integer> t = new ArrayList<Integer>();\t\t\t\n\t\t\tt = geraTempoServicos(c.getServicosSolicitados().size());\n\n\t\t\t// Atribui o tempo aos serviços da forma especificada na descrição do projeto\n\t\t\t// Obs: getServico() da classe serviço não gasta um serviço\n\t\t\tfor(Servico s: c.getServicosSolicitados()) {\n\t\t\t\tif(s.getTipo() == TipoServico.PENTEADO) {\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t} else if(s.getTipo() == TipoServico.CORTE) {\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t} else if(s.getTipo() == TipoServico.DEPILACAO) {\t\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t} else if(s.getTipo() == TipoServico.PEDICURE) {\t\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t} else if(s.getTipo() == TipoServico.MASSAGEM) {\t\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfilas.insereEmFilaClientes(0, c);\n\t\t\t\n\t\t\ttry {\t\n\t\t\t\t// Tempo de geração de clientes: 1 ~ 5 segundos\n\t\t\t\tThread.sleep(500*(rand.nextInt(5)+1));\n\t\t\t} catch(InterruptedException ex) {\n\t\t\t\t Thread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t}", "public ControlMuestraServicios( ServicioConsulta servicioConsulta) {\r\n\t\tthis.servicioConsulta=servicioConsulta;\r\n\t\t\r\n\t}", "public void setNombreUsuario(String nombreUsuario) {\r\n this.nombreUsuario = nombreUsuario;\r\n }", "public FacturaCompra pagoPSE(String userName,TipoMoneda tipoMoneda);", "public void buscarController() {\n\t\tSystem.out.println(\"\\n*** Consultando Registros\\nCampo de Consulta Pesquisa: \"+selectPesquisa);\n\t\tif (selectPesquisa.equals(null) || selectPesquisa.equals(\"\")){\t\t\t\n\t\t\t\n\t\t\tatualizarTela(); \t\t\t\n\t\t}\n\t\t\n\t\tif (selectPesquisa.equals(\"nome\")){\n\t\t\t\n\t\t\tif(campoPesquisa.equals(null)){ // Evitar o Erro de passar parametro nulo para o metodo\n\t\t\t\tatualizarTela(); \t\n\t\t\t}\n\t\t\telse{\n\t\t\tSystem.out.println(\"\\n*** Buscando por Nome\\n\");\n\t\t\tString nome = campoPesquisa; // Inserindo o valor que vai passar como parametro para os metodos\n\t\t\tlistaPaciente = pacienteService.buscarPorNome(nome);\t\n\t\t\t}\n\t\t} //FECHANDO O IF SELECTPESQUISA(NOME)\n\t\t\n\t\tif (selectPesquisa.equals(\"idPaciente\")){\n\t\t\t\n\t\t\tif(campoPesquisa.equals(null)){ // Evitar o Erro de passar parametro nulo para o metodo\n\t\t\t\tatualizarTela(); \t\n\t\t\t}\t\t\n\t\t\t\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"\\n*** Buscando por ID\\n\");\n\t\t\t\ttry{ // Tratamento de Erro Caso o usuario Colocar Letras no campo\n\t\t\t\t\tSystem.out.println(\"** ID PACIENTE: \"+campoPesquisa);\n\t\t\t\t\tlong idPaciente = Long.parseLong(campoPesquisa); \n\t\t\t\t\tlistaPaciente = pacienteService.buscarPorId(idPaciente);\t\t\t\n\t\t\t\t}catch (Exception e) {\n\t\t\t\t\tSystem.err.println(\"\\n ** ID invalido\\n\"+e);\t\t\t\t\t\n\t\t\t\t\tlistaPaciente = null; // Lista vai ser vazia pois o ID foi invalido\n\t\t\t\t}\t\t\n\t\t\t} // FECHANDO O ELSE\n\t\t} //FECHANDO O IF SELECTPESQUISA(IDPROPRIETARIO)\n\t\t\n\t\tif (selectPesquisa.equals(\"cpf\")){\n\t\t\t\n\t\t\tif(campoPesquisa.equals(null)){ // Evitar o Erro de passar parametro nulo para o metodo\n\t\t\t\tatualizarTela(); \t\n\t\t\t}\t\t\n\t\t\telse{\n\t\t\tSystem.out.println(\"\\n*** Buscando por CPF\\n\");\t\t\t\n\t\t\tString cpf = campoPesquisa; // Inserindo o valor que vai passar como parametro para os metodos\n\t\t\tlistaPaciente = pacienteService.buscarPorCpf(cpf);\t\n\t\t\t}\n\t\t\n\t\t} // Fechando IF SELECTPESQUISA(CPF)\n\t\t\n\t\n\t}", "public void mostrarInformacion(String nombre, String correo) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }" ]
[ "0.6445941", "0.6391233", "0.63306904", "0.63095", "0.6305854", "0.6159399", "0.6094596", "0.60918784", "0.60638094", "0.6040894", "0.6033155", "0.6027252", "0.60197544", "0.5982803", "0.5881806", "0.58636856", "0.58459187", "0.5834631", "0.58180326", "0.5807226", "0.5805657", "0.5805072", "0.5773936", "0.5756817", "0.57266027", "0.5724624", "0.57237846", "0.57210225", "0.5651472", "0.5643392", "0.5641333", "0.56362134", "0.5627219", "0.56218755", "0.5604048", "0.5602324", "0.5599985", "0.55976564", "0.5582042", "0.5578246", "0.5571449", "0.55588305", "0.555622", "0.55555356", "0.55464363", "0.5539284", "0.5537707", "0.553575", "0.5533401", "0.55247164", "0.55235237", "0.5522735", "0.5510095", "0.55012006", "0.54974705", "0.5491241", "0.5490234", "0.5468327", "0.54664963", "0.5463602", "0.5455396", "0.54518425", "0.5448211", "0.5424774", "0.5423881", "0.54164284", "0.5411187", "0.54060143", "0.53987026", "0.53919053", "0.53852737", "0.53832686", "0.53809106", "0.53724754", "0.5369352", "0.5364487", "0.5362598", "0.5347555", "0.5342896", "0.534011", "0.53396314", "0.5337586", "0.5335324", "0.53349465", "0.53325194", "0.532948", "0.5311124", "0.53105086", "0.5309236", "0.53062", "0.530427", "0.5302696", "0.5302576", "0.5299775", "0.52871585", "0.52840805", "0.5283406", "0.5279931", "0.5274488", "0.52743477" ]
0.6181418
5
/ ????111114 05.cpp ?????? ?????20111114 ?????????????
public static int Main() { int n; //???? int k; int i = 1; int j; n = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); k = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); int[] f = new int[n + 1]; //???? while (i > 0) //?????????? { f[0] = (n - 1) * i; //????? for (j = 1;j < n + 1;j++) //???? { if (f[j - 1] % (n - 1) != 0) { break; } f[j] = f[j - 1] * n / (n - 1) + k; } if (j == n + 1) { break; //??????? } i = i + 1; } System.out.print(f[n]); System.out.print("\n"); return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "C2841w mo7234g();", "C1111j mo5881f(String str);", "String mo20731c();", "public int method_7084(String param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public static void main(String[] args) {\n String filePath=args[0];\n Parser parser = new Parser(filePath);\n Code code = new Code();\n SymbolTable symbol = new SymbolTable();\n initSymbol(filePath, parser, symbol);\n String fileOutputPath=filePath.replace(\".asm\",\".hack\");\n Parser parser1 = new Parser(filePath);\n\n try {\n BufferedWriter writer = new BufferedWriter(new FileWriter(fileOutputPath ,true));\n PrintWriter emptyFile = new PrintWriter(fileOutputPath);\n emptyFile.print(\"\");\n emptyFile.close();\n\n //count the num of var in the program\n int numVariables = 16;\n while (parser1.hasMoreCommands()) {\n parser1.advance();\n String type = parser1.commandType();\n StringBuilder binCommand=new StringBuilder();\n switch (type) {\n case \"A_COMMAND\":\n //get the symbol\n String commandSymbol= parser1.symbol();\n Integer address=0;\n if(isNumeric(commandSymbol)){\n address=Integer.parseInt(commandSymbol);\n }\n //check if the symbol don't exist in the symbol Table and add it\n else if (!symbol.contain(commandSymbol)) {\n symbol.addEntry(commandSymbol, numVariables);\n address=symbol.getAddress(commandSymbol);\n numVariables++;\n }\n //get the symbol value from the symbol table\n else if(symbol.contain((commandSymbol))){\n address=symbol.getAddress(commandSymbol);\n }\n\n binCommand.append(Integer.toBinaryString(address));\n int j=binCommand.length();\n for (int i = 0; i < 16 - j; i++) {\n binCommand.insert(0, \"0\");\n }\n writer.append(binCommand.toString());\n writer.append('\\n');\n binCommand.setLength(0);\n break;\n case \"C_COMMAND\":\n //write the c command\n binCommand.append(\"111\");\n binCommand.append(code.comp(parser1.comp()));\n binCommand.append(code.dest(parser1.dest()));\n binCommand.append(code.jump(parser1.jump()));\n writer.append(binCommand.toString());\n writer.append('\\n');\n binCommand.setLength(0);\n break;\n }\n }\n\n writer.close();\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n }", "public int captureCodeFragment03(int x) {\r\n return x + 1;\r\n }", "private java.lang.String c(java.lang.String r7) {\n /*\n r6 = this;\n r2 = \"\";\n r0 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n if (r0 == 0) goto L_0x0050;\n L_0x0006:\n r0 = new java.lang.StringBuilder;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = java.lang.String.valueOf(r7);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0.<init>(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = \".\";\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.toString();\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x001f:\n r1 = r6.d;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r1.openFileInput(r0);\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x0025:\n r3 = new java.io.BufferedReader;\n r4 = new java.io.InputStreamReader;\n r0 = r1;\n r0 = (java.io.InputStream) r0;\n r5 = \"UTF-8\";\n r5 = java.nio.charset.Charset.forName(r5);\n r4.<init>(r0, r5);\n r3.<init>(r4);\n r0 = new java.lang.StringBuffer;\n r0.<init>();\n L_0x003d:\n r4 = r3.readLine();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n if (r4 != 0) goto L_0x0061;\n L_0x0043:\n r0 = r0.toString();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007d }\n r1.close();\t Catch:{ IOException -> 0x007d }\n r3.close();\t Catch:{ IOException -> 0x007d }\n L_0x004f:\n return r0;\n L_0x0050:\n r0 = r7;\n goto L_0x001f;\n L_0x0052:\n r0 = move-exception;\n r0 = r6.d;\t Catch:{ IOException -> 0x005e }\n r0 = r0.getAssets();\t Catch:{ IOException -> 0x005e }\n r1 = r0.open(r7);\t Catch:{ IOException -> 0x005e }\n goto L_0x0025;\n L_0x005e:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0061:\n r0.append(r4);\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n goto L_0x003d;\n L_0x0065:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x0070 }\n r1.close();\t Catch:{ IOException -> 0x0070 }\n r3.close();\t Catch:{ IOException -> 0x0070 }\n r0 = r2;\n goto L_0x004f;\n L_0x0070:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0073:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007f }\n r1.close();\t Catch:{ IOException -> 0x007f }\n r3.close();\t Catch:{ IOException -> 0x007f }\n L_0x007c:\n throw r0;\n L_0x007d:\n r1 = move-exception;\n goto L_0x004f;\n L_0x007f:\n r1 = move-exception;\n goto L_0x007c;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.a.b.b.c(java.lang.String):java.lang.String\");\n }", "void mo303a(C0237a c0237a, String str, String str2, String str3);", "C3579d mo19708e(String str) throws IOException;", "C8325a mo21498a(String str);", "public void method_2111(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }", "private void b044904490449щ0449щ() {\n /*\n r7 = this;\n r0 = new rrrrrr.ccrcrc;\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = r7.bнн043Dннн;\n r2 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r2);\n r2 = r2.getFilesDir();\n r1 = r1.append(r2);\n r2 = java.io.File.separator;\n r1 = r1.append(r2);\n L_0x001b:\n r2 = 1;\n switch(r2) {\n case 0: goto L_0x001b;\n case 1: goto L_0x0024;\n default: goto L_0x001f;\n };\n L_0x001f:\n r2 = 0;\n switch(r2) {\n case 0: goto L_0x0024;\n case 1: goto L_0x001b;\n default: goto L_0x0023;\n };\n L_0x0023:\n goto L_0x001f;\n L_0x0024:\n r2 = \"3HC4C-01.txt\";\n r1 = r1.append(r2);\n r1 = r1.toString();\n r0.<init>(r1);\n r0.load();\n L_0x0034:\n r1 = r0.size();\n if (r1 <= 0) goto L_0x007a;\n L_0x003a:\n r1 = r0.peek();\n r2 = new rrrrrr.rcccrr;\n r2.<init>();\n r3 = r7.bнн043Dннн;\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044Cь044C044Cьь(r3);\n monitor-enter(r3);\n r4 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r4 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r4);\t Catch:{ all -> 0x0074 }\n r4 = r4.bЛ041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r5 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r5 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r5);\t Catch:{ all -> 0x0074 }\n r5 = r5.b041B041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r6 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r6 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r6);\t Catch:{ all -> 0x0074 }\n r6 = r6.bЛЛЛ041B041BЛ;\t Catch:{ all -> 0x0074 }\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n r1 = r2.sendHttpRequestFromCache(r4, r5, r6, r1);\n if (r1 == 0) goto L_0x0077;\n L_0x0069:\n if (r4 == 0) goto L_0x0077;\n L_0x006b:\n if (r5 == 0) goto L_0x0077;\n L_0x006d:\n r0.remove();\n r0.save();\n goto L_0x0034;\n L_0x0074:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n throw r0;\n L_0x0077:\n r0.save();\n L_0x007a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.b044904490449щ0449щ():void\");\n }", "public static void main (String[] args) {\n\tSystem.out.println (\"SourceCode3!\");\n\tSystem.out.println (\"SourceCode3889998!\");\n }", "void mo57278c();", "void mo5289a(C5102c c5102c);", "void mo1582a(String str, C1329do c1329do);", "void mo17021c();", "public void method_2112(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }", "void mo5290b(C5102c c5102c);", "String mo20730b();", "private static class_1205 method_6442(String param0, int param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "C12000e mo41087c(String str);", "int mo5882g(String str);", "void mo80457c();", "C45321i mo90380a();", "void mo23492a(C9072a0 a0Var);", "void mo72114c();", "String mo2801a(String str);", "C2451d mo3408a(C2457e c2457e);", "void mo41083a();", "C11998c mo41092g(String str);", "private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }", "String mo38971b();", "void mo57277b();", "void mo12638c();", "public static void main(String[] args) {\n\t\tSystem.out.println(\"20162891 ¹Ú¼º¹Î\");\r\n\t\tSystem.out.println(\"hotfix + \");\r\n\t}", "void mo41086b();", "static void method_7086() {\r\n // $FF: Couldn't be decompiled\r\n }", "int mo27483b();", "void mo12637b();", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+Y6{Tr P>D9wb\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 44, 21, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(22, javaCharStream0.getBeginColumn());\n assertEquals(74, token0.kind);\n }", "String mo38972c();", "void mo80452a();", "void mo3314b(String str);", "public static void main(String [] args){\n writeFile1(\"1234567890987654321\");\n }", "C20241o mo54456u(int i);", "void mo41089d(String str);", "@androidx.annotation.Nullable\n /* renamed from: j */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final p005b.p096l.p097a.p151d.p152a.p154b.C3474b mo14822j(java.lang.String r9) {\n /*\n r8 = this;\n java.io.File r0 = new java.io.File\n java.io.File r1 = r8.mo14820g()\n r0.<init>(r1, r9)\n boolean r1 = r0.exists()\n r2 = 3\n r3 = 6\n r4 = 1\n r5 = 0\n r6 = 0\n if (r1 != 0) goto L_0x0022\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s\"\n r0.mo14884b(r2, r9, r1)\n L_0x001f:\n r9 = r6\n goto L_0x0093\n L_0x0022:\n java.io.File r1 = new java.io.File\n b.l.a.d.a.b.o1 r7 = r8.f6567b\n int r7 = r7.mo14797a()\n java.lang.String r7 = java.lang.String.valueOf(r7)\n r1.<init>(r0, r7)\n boolean r0 = r1.exists()\n r7 = 2\n if (r0 != 0) goto L_0x0050\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0050:\n java.io.File[] r0 = r1.listFiles()\n if (r0 == 0) goto L_0x007b\n int r1 = r0.length\n if (r1 != 0) goto L_0x005a\n goto L_0x007b\n L_0x005a:\n if (r1 <= r4) goto L_0x0074\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Multiple pack versions found for pack name: %s app version: %s\"\n r0.mo14884b(r3, r9, r1)\n goto L_0x001f\n L_0x0074:\n r9 = r0[r5]\n java.lang.String r9 = r9.getCanonicalPath()\n goto L_0x0093\n L_0x007b:\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"No pack version found for pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0093:\n if (r9 != 0) goto L_0x0096\n return r6\n L_0x0096:\n java.io.File r0 = new java.io.File\n java.lang.String r1 = \"assets\"\n r0.<init>(r9, r1)\n boolean r1 = r0.isDirectory()\n if (r1 != 0) goto L_0x00af\n b.l.a.d.a.e.f r9 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r0\n java.lang.String r0 = \"Failed to find assets directory: %s\"\n r9.mo14884b(r3, r0, r1)\n return r6\n L_0x00af:\n java.lang.String r0 = r0.getCanonicalPath()\n b.l.a.d.a.b.w r1 = new b.l.a.d.a.b.w\n r1.<init>(r5, r9, r0)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p097a.p151d.p152a.p154b.C3544t.mo14822j(java.lang.String):b.l.a.d.a.b.b\");\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n StringReader stringReader0 = new StringReader(\"<?ep_cuW)AS/}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, (-1));\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(88, token0.kind);\n }", "public abstract void mo70710a(String str, C24343db c24343db);", "public void method_7081() {\r\n // $FF: Couldn't be decompiled\r\n }", "void mo12635a(String str);", "void mo1941j();", "String mo21078i();", "void mo21072c();", "void mo72113b();", "private static java.lang.String m25224a(java.lang.String r7, java.lang.String r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = \"\";\n r1 = \"\\\\?\";\n r7 = r7.split(r1);\n r1 = r7.length;\n r2 = 1;\n if (r1 <= r2) goto L_0x0033;\n L_0x000c:\n r7 = r7[r2];\n r1 = \"&\";\n r7 = r7.split(r1);\n r1 = r7.length;\n r3 = 0;\n r4 = r0;\n r0 = 0;\n L_0x0018:\n if (r0 >= r1) goto L_0x0032;\n L_0x001a:\n r5 = r7[r0];\n r6 = \"=\";\n r5 = r5.split(r6);\n r6 = r5.length;\n if (r6 <= r2) goto L_0x002f;\n L_0x0025:\n r6 = r5[r3];\n r6 = r6.equals(r8);\n if (r6 == 0) goto L_0x002f;\n L_0x002d:\n r4 = r5[r2];\n L_0x002f:\n r0 = r0 + 1;\n goto L_0x0018;\n L_0x0032:\n r0 = r4;\n L_0x0033:\n r7 = \"UTF-8\";\t Catch:{ Exception -> 0x003a }\n r7 = java.net.URLDecoder.decode(r0, r7);\t Catch:{ Exception -> 0x003a }\n goto L_0x003b;\n L_0x003a:\n r7 = r0;\n L_0x003b:\n return r7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.leanplum.messagetemplates.BaseMessageDialog.a(java.lang.String, java.lang.String):java.lang.String\");\n }", "C11996a mo41079a(String str);", "int mo5885j(String str);", "protected void method_2141() {\r\n // $FF: Couldn't be decompiled\r\n }", "C5727e mo33224a();", "void mo1935c(String str);", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n StringReader stringReader0 = new StringReader(\"ej.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-1076), 115);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }", "String mo20732d();", "public final synchronized java.lang.String m90f(java.lang.String r5) {\n /*\n r4 = this;\n r1 = 1;\n r0 = 0;\n monitor-enter(r4);\n if (r5 == 0) goto L_0x002c;\n L_0x0005:\n r2 = r5.trim();\t Catch:{ all -> 0x0037 }\n r2 = r2.length();\t Catch:{ all -> 0x0037 }\n if (r2 <= 0) goto L_0x002c;\n L_0x000f:\n if (r0 == 0) goto L_0x002e;\n L_0x0011:\n r0 = \"key should not be empty %s\";\n r1 = 1;\n r1 = new java.lang.Object[r1];\t Catch:{ all -> 0x0037 }\n r2 = 0;\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0037 }\n r3.<init>();\t Catch:{ all -> 0x0037 }\n r3 = r3.append(r5);\t Catch:{ all -> 0x0037 }\n r3 = r3.toString();\t Catch:{ all -> 0x0037 }\n r1[r2] = r3;\t Catch:{ all -> 0x0037 }\n com.tencent.bugly.legu.proguard.C0073w.m524d(r0, r1);\t Catch:{ all -> 0x0037 }\n r0 = 0;\n L_0x002a:\n monitor-exit(r4);\n return r0;\n L_0x002c:\n r0 = r1;\n goto L_0x000f;\n L_0x002e:\n r0 = r4.f112Y;\t Catch:{ all -> 0x0037 }\n r0 = r0.remove(r5);\t Catch:{ all -> 0x0037 }\n r0 = (java.lang.String) r0;\t Catch:{ all -> 0x0037 }\n goto L_0x002a;\n L_0x0037:\n r0 = move-exception;\n monitor-exit(r4);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.bugly.legu.crashreport.common.info.a.f(java.lang.String):java.lang.String\");\n }", "void mo20141a();", "public void method_2113() {\r\n // $FF: Couldn't be decompiled\r\n }", "void mo17012c();", "String mo42332a();", "void mo119582b();", "void mo119581a();", "public interface DefccConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int MODULE_TKN = 11;\n /** RegularExpression Id. */\n int CLASS_TKN = 12;\n /** RegularExpression Id. */\n int INCLUDE_TKN = 13;\n /** RegularExpression Id. */\n int BYTE_TKN = 14;\n /** RegularExpression Id. */\n int BOOLEAN_TKN = 15;\n /** RegularExpression Id. */\n int INT_TKN = 16;\n /** RegularExpression Id. */\n int LONG_TKN = 17;\n /** RegularExpression Id. */\n int FLOAT_TKN = 18;\n /** RegularExpression Id. */\n int DOUBLE_TKN = 19;\n /** RegularExpression Id. */\n int STRING_TKN = 20;\n /** RegularExpression Id. */\n int BUFFER_TKN = 21;\n /** RegularExpression Id. */\n int VECTOR_TKN = 22;\n /** RegularExpression Id. */\n int MAP_TKN = 23;\n /** RegularExpression Id. */\n int LBRACE_TKN = 24;\n /** RegularExpression Id. */\n int RBRACE_TKN = 25;\n /** RegularExpression Id. */\n int LT_TKN = 26;\n /** RegularExpression Id. */\n int GT_TKN = 27;\n /** RegularExpression Id. */\n int SEMICOLON_TKN = 28;\n /** RegularExpression Id. */\n int COMMA_TKN = 29;\n /** RegularExpression Id. */\n int DOT_TKN = 30;\n /** RegularExpression Id. */\n int CSTRING_TKN = 31;\n /** RegularExpression Id. */\n int IDENT_TKN = 32;\n /** RegularExpression Id. */\n int IDENT_TKN_W_DOT = 33;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int WithinOneLineComment = 1;\n /** Lexical state. */\n int WithinMultiLineComment = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"//\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"/*\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 10>\",\n \"\\\"module\\\"\",\n \"\\\"class\\\"\",\n \"\\\"include\\\"\",\n \"\\\"byte\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"int\\\"\",\n \"\\\"long\\\"\",\n \"\\\"float\\\"\",\n \"\\\"double\\\"\",\n \"\\\"string\\\"\",\n \"\\\"buffer\\\"\",\n \"\\\"vector\\\"\",\n \"\\\"map\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"<CSTRING_TKN>\",\n \"<IDENT_TKN>\",\n \"<IDENT_TKN_W_DOT>\",\n };\n\n}", "public static void main(String[] args) {\n PAT1005 pat = new PAT1005();\r\n\r\n }", "protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }", "int mo23351i(String str, String str2);", "@Test(timeout = 4000)\n public void test158() throws Throwable {\n StringReader stringReader0 = new StringReader(\".0*yBK7wQ\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1997, 1997);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(1998, javaCharStream0.getEndColumn());\n }", "void mo57275a();", "void mo12348a();", "void mo17023d();", "public abstract String mo41086i();", "include<stdio.h>\nint main()\n{\n printf(\"5103\");\n return 0;\n}", "C1114c mo5879d(String str);", "void mo5018b();", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n StringReader stringReader0 = new StringReader(\"^z{b>wblu8^IJ+?\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 47, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(47, javaCharStream0.getColumn());\n }", "void mo72111a();", "void mo8713dV(String str);", "void mo56163g();", "void mo1334i(String str, String str2);", "void mo9697a(String str);", "public abstract String mo11611b();", "private java.lang.String a(java.lang.String r6, com.google.b5 r7, com.google.e5 r8, java.lang.String r9) {\n /*\n r5 = this;\n r2 = F;\n r0 = r7.e();\n r1 = r5.o;\n r3 = r7.i();\n r1 = r1.a(r3);\n r3 = r1.matcher(r6);\n r1 = \"\";\n r1 = com.google.e5.NATIONAL;\t Catch:{ RuntimeException -> 0x0092 }\n if (r8 != r1) goto L_0x004b;\n L_0x001b:\n if (r9 == 0) goto L_0x004b;\n L_0x001d:\n r1 = r9.length();\t Catch:{ RuntimeException -> 0x0096 }\n if (r1 <= 0) goto L_0x004b;\n L_0x0023:\n r1 = r7.d();\t Catch:{ RuntimeException -> 0x0096 }\n r1 = r1.length();\t Catch:{ RuntimeException -> 0x0096 }\n if (r1 <= 0) goto L_0x004b;\n L_0x002d:\n r1 = r7.d();\n r4 = f;\n r1 = r4.matcher(r1);\n r1 = r1.replaceFirst(r9);\n r4 = z;\n r0 = r4.matcher(r0);\n r0 = r0.replaceFirst(r1);\n r1 = r3.replaceAll(r0);\n if (r2 == 0) goto L_0x009c;\n L_0x004b:\n r1 = r7.k();\n r4 = com.google.e5.NATIONAL;\t Catch:{ RuntimeException -> 0x0098 }\n if (r8 != r4) goto L_0x006b;\n L_0x0053:\n if (r1 == 0) goto L_0x006b;\n L_0x0055:\n r4 = r1.length();\t Catch:{ RuntimeException -> 0x009a }\n if (r4 <= 0) goto L_0x006b;\n L_0x005b:\n r4 = z;\n r4 = r4.matcher(r0);\n r1 = r4.replaceFirst(r1);\n r1 = r3.replaceAll(r1);\n if (r2 == 0) goto L_0x009c;\n L_0x006b:\n r0 = r3.replaceAll(r0);\n L_0x006f:\n r1 = com.google.e5.RFC3966;\n if (r8 != r1) goto L_0x0091;\n L_0x0073:\n r1 = p;\n r1 = r1.matcher(r0);\n r2 = r1.lookingAt();\n if (r2 == 0) goto L_0x0086;\n L_0x007f:\n r0 = \"\";\n r0 = r1.replaceFirst(r0);\n L_0x0086:\n r0 = r1.reset(r0);\n r1 = \"-\";\n r0 = r0.replaceAll(r1);\n L_0x0091:\n return r0;\n L_0x0092:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0094 }\n L_0x0094:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0096 }\n L_0x0096:\n r0 = move-exception;\n throw r0;\n L_0x0098:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x009a }\n L_0x009a:\n r0 = move-exception;\n throw r0;\n L_0x009c:\n r0 = r1;\n goto L_0x006f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, com.google.b5, com.google.e5, java.lang.String):java.lang.String\");\n }", "int mo33223a(C5889d dVar) throws IOException;", "public String CodeInterpreter() {\n\n\t\tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n\t\treturn \"DA\" + \"_\" + timeStamp;\n\t}", "public static void main(String[] args) {\n \n fillArrayList();\n getNextToken();\n parseProgram();\n\n //TODO output into file ID.java\n //This seems to work\n// File f = new File(programID+\".java\");\n// try {\n// PrintWriter write = new PrintWriter(f);\n// write.print(sb.toString());\n// write.flush();\n// write.close();\n// } catch (FileNotFoundException ex) {\n// Logger.getLogger(setTranslator.class.getName()).log(Level.SEVERE, null, ex);\n// }\n System.out.println(sb.toString());\n \n }", "public void method_2250() {\r\n // $FF: Couldn't be decompiled\r\n }", "public abstract CharSequence mo2161g();", "dkj mo4367a(dkk dkk);", "private void method_7082(class_1293 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndLine();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals((-2818), int0);\n }", "public void mo9233aH() {\n }" ]
[ "0.60438466", "0.5927876", "0.5847952", "0.57662916", "0.57238424", "0.57018095", "0.568211", "0.5658556", "0.5658421", "0.5637921", "0.56191826", "0.56103575", "0.5601764", "0.56006193", "0.5599813", "0.5573128", "0.55729604", "0.55578625", "0.55532193", "0.554977", "0.5542528", "0.55207235", "0.55139023", "0.5491851", "0.548809", "0.54787546", "0.5478451", "0.54763937", "0.54727", "0.54637176", "0.5462142", "0.5460115", "0.54588497", "0.54501057", "0.5448589", "0.5445856", "0.5426933", "0.54253113", "0.54232895", "0.5420363", "0.5413611", "0.54032207", "0.5391717", "0.53814495", "0.53749573", "0.53698146", "0.5363875", "0.53633493", "0.5353833", "0.53520113", "0.5348017", "0.5343225", "0.53325874", "0.5331651", "0.5327555", "0.5321816", "0.5316039", "0.53157336", "0.530985", "0.5304442", "0.53034526", "0.530329", "0.5297797", "0.5297228", "0.52971077", "0.5288079", "0.52879137", "0.5284464", "0.52843285", "0.52833515", "0.5282791", "0.5280978", "0.5278875", "0.5276241", "0.5275813", "0.52747065", "0.5274601", "0.527453", "0.527219", "0.52690053", "0.5268273", "0.52669525", "0.5265178", "0.526451", "0.5264342", "0.5263015", "0.5259053", "0.5257842", "0.52544284", "0.5246949", "0.5245428", "0.52426827", "0.52409816", "0.5233553", "0.5231351", "0.5229884", "0.52291346", "0.5227918", "0.5227725", "0.5225922", "0.5224469" ]
0.0
-1
/ / / /
@Nullable /* */ public V get(int key) { /* 51 */ V res = (V)super.get(key); /* 52 */ if (res == null) { /* 53 */ res = (V)this.loader.apply(Integer.valueOf(key)); /* 54 */ if (res != null) { /* 55 */ put(key, res); /* */ } /* */ } /* 58 */ return res; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public abstract String division();", "public void division() {\n\t\tx=1;\n\t\ty=0;\n\t\tz=x/y;\n\t\t\t\t\n\t}", "private boolean slash() {\r\n return MARK(OPERATOR) && CHAR('/') && gap();\r\n }", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "public void gored() {\n\t\t\n\t}", "public String toString(){ return \"DIV\";}", "private int parent(int i){return (i-1)/2;}", "public String ring();", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "private int leftChild(int i){return 2*i+1;}", "double passer();", "static void pyramid(){\n\t}", "public void stg() {\n\n\t}", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "void mo33732Px();", "Operations operations();", "private int rightChild(int i){return 2*i+2;}", "private void division()\n\t{\n\t\tFun = Function.DIVIDE; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "@Override\n\tpublic float dividir(float op1, float op2) {\n\t\treturn op1 / op2;\n\t}", "void sharpen();", "void sharpen();", "double defendre();", "public int generateRoshambo(){\n ;]\n\n }", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "String divideAtWhite()[]{ return null; }", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "double volume(){\n return width*height*depth;\n }", "public void skystonePos4() {\n }", "void ringBell() {\n\n }", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\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}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "public static void method1(){\n System.out.println(\"*****\");\n System.out.println(\"*****\");\n System.out.println(\" * *\");\n System.out.println(\" *\");\n System.out.println(\" * *\");\n }", "public int division(int x,int y){\n System.out.println(\"division methods\");\n int d=x/y;\n return d;\n\n }", "void mo21076g();", "private boolean dividingByZero(String operator){\n if (numStack.peek() == 0 && operator.equals(\"/\")){\n return true;\n }\n return false;\n }", "@Override\n public void bfs() {\n\n }", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "Parallelogram(){\n length = width = height = 0;\n }", "public Divide(){\n }", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "@Override\r\n\tpublic void div(int x, int y) {\n\t\t\r\n\t}", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "@Override\npublic void div(int a, int b) {\n\t\n}", "private double triangleBase() {\n return cellWidth() / BASE_WIDTH;\n }", "double volume() {\n\treturn width*height*depth;\n}", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "int getWidth() {return width;}", "int width();", "public void divide(int dirOp1, int dirOp2, int dirRes) {\n //traduce casos de direccionamiento indirecto\n dirOp1 = traduceDirIndirecto(dirOp1);\n dirOp2 = traduceDirIndirecto(dirOp2);\n if (ManejadorMemoria.isConstante(dirOp1)) { // OPERANDO 1 CTE\n String valor1 = this.directorioProcedimientos.getConstantes().get(dirOp1).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { //RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n }\n } else if (ManejadorMemoria.isGlobal(dirOp1)) { // OPERANDO 1 GLOBAL\n String valor1 = this.registroGlobal.getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n }\n } else { // OPERANDO 1 LOCAL\n String valor1 = this.pilaRegistros.peek().getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES 2 LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else { //OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n }\n }\n }", "public static void main(String[] args) {\n\n\n\n System.out.println(4 * (1.0 - (1 / 3) + (1 / 5) - (1 / 7) + (1 / 9) - (1 / 11)));\n\n System.out.println(4 * (1.0 - (1/3) + (1/5) - (1/7)\n + (1 / 9) - (1/11) + (1/13)));\n }", "public static void topHalf() {\n \t\n for( int i = 1; i <= SIZE; i++){\n for(int spaces = 1; spaces <= 3*SIZE - 3*i; spaces++) {\n System.out.print(\" \"); \n }\n \n for(int j = 1; j <= 1; j++) {\n System.out.print(\"__/\");\n }\n \n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\":::\");\n }\n \n System.out.print(\"||\");\n \n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\":::\");\n }\n \n for(int j = 1; j <= 1; j++) {\n System.out.print(\"\\\\__\");\n }\n \n System.out.println();\n }\n \n System.out.print(\"|\");\n \n for(int i = 1; i <= 6 * SIZE; i++) {\n System.out.print(\"\\\"\");\n }\n \n System.out.println(\"|\");\n }", "@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "public double getWidth() { return _width<0? -_width : _width; }", "double getPerimeter(){\n return 2*height+width;\n }", "public void mo3376r() {\n }", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic double divide(double in1, double in2) {\n\t\treturn 0;\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "public static void main (String[] args){\n Scanner s=new Scanner(System.in);\n int n=s.nextInt();\n if(n%2==1)\n {\n n=n/2;\n n++;\n }\n else\n {\n n=n/2;\n }\n for(int i=1;i<=n;i++)\n {\n for(int k=1;k<=i-1;k++)\n {\n System.out.print(\" \");\n }\n for(int j=1;j<=((2*n-1)-2*(i-1));j++)\n {\n if(j==1||j==((2*n-1)-2*(i-1)))\n System.out.print(\"*\");\n else\n System.out.print(\" \");\n }\n System.out.println();\n }\n for(int i=2;i<=n;i++)\n {\n for(int k=1;k<=n-i;k++)\n {\n System.out.print(\" \");\n }\n for(int j=1;j<i*2;j++)\n {\n if(j==1||j==(i*2-1))\n System.out.print(\"*\");\n else\n System.out.print(\" \");\n }\n System.out.println();\n }\n\t}", "public RMPath getPath() { return RMPath.unitRectPath; }", "void walk() {\n\t\t\n\t}", "public static void giant() {\n System.out.println(\" --------- \");\n System.out.println(\" | / \\\\| \");\n System.out.println(\" ZZZZZH | O | HZZZZZ \");\n System.out.println(\" H ----------- H \");\n System.out.println(\" ZZZZZHHHHHHHHHHHHHHHHHHHHHZZZZZ \");\n System.out.println(\" H HHHHHHHHHHH H \");\n System.out.println(\" ZZZZZH HHHHHHHHHHH HZZZZZ \");\n System.out.println(\" HHHHHHHHHHH \");\n System.out.println(\" HHH HHH \");\n System.out.println(\" HHH HHH \");\n }", "public void title ()\n {\n\tprintSlow (\" _ __\");\n\tprintSlow (\" ___ | ' \\\\\");\n\tprintSlow (\" ___ \\\\ / ___ ,'\\\\_ | .-. \\\\ /|\");\n\tprintSlow (\" \\\\ / | |,'__ \\\\ ,'\\\\_ | \\\\ | | | | ,' |_ /|\");\n\tprintSlow (\" _ | | | |\\\\/ \\\\ \\\\ | \\\\ | |\\\\_| _ | |_| | _ '-. .-',' |_ _\");\n\tprintSlow (\" // | | | |____| | | |\\\\_|| |__ // | | ,'_`. | | '-. .-',' `. ,'\\\\_\");\n\tprintSlow (\" \\\\\\\\_| |_,' .-, _ | | | | |\\\\ \\\\ // .| |\\\\_/ | / \\\\ || | | | / |\\\\ \\\\| \\\\\");\n\tprintSlow (\" `-. .-'| |/ / | | | | | | \\\\ \\\\// | | | | | || | | | | |_\\\\ || |\\\\_|\");\n\tprintSlow (\" | | | || \\\\_| | | | /_\\\\ \\\\ / | |` | | | || | | | | .---'| |\");\n\tprintSlow (\" | | | |\\\\___,_\\\\ /_\\\\ _ // | | | \\\\_/ || | | | | | /\\\\| |\");\n\tprintSlow (\" /_\\\\ | | //_____// .||` `._,' | | | | \\\\ `-' /| |\");\n\tprintSlow (\" /_\\\\ `------' \\\\ | AND `.\\\\ | | `._,' /_\\\\\");\n\tprintSlow (\" \\\\| HIS `.\\\\\");\n\tprintSlow (\" __ __ _ _ _ _ \");\n\tprintSlow (\" | \\\\/ | (_) | | /\\\\ | | | | \");\n\tprintSlow (\" | \\\\ / | __ _ __ _ _ ___ __ _| | / \\\\ __| |_ _____ _ __ | |_ _ _ _ __ ___ \");\n\tprintSlow (\" | |\\\\/| |/ _` |/ _` | |/ __/ _` | | / /\\\\ \\\\ / _` \\\\ \\\\ / / _ \\\\ '_ \\\\| __| | | | '__/ _ \\\\\");\n\tprintSlow (\" | | | | (_| | (_| | | (_| (_| | | / ____ \\\\ (_| |\\\\ V / __/ | | | |_| |_| | | | __/\");\n\tprintSlow (\" |_| |_|\\\\__,_|\\\\__, |_|\\\\___\\\\__,_|_| /_/ \\\\_\\\\__,_| \\\\_/ \\\\___|_| |_|\\\\__|\\\\__,_|_| \\\\___|\");\n\tprintSlow (\" __/ | \");\n\tprintSlow (\" |___/ \\n\\n\\n\");\n\n\n }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "double area() {\nSystem.out.println(\"Inside Area for Triangle.\");\nreturn dim1 * dim2 / 2;\n}", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public int mo9774x() {\n /*\n r5 = this;\n int r0 = r5.f9082i\n int r1 = r5.f9080g\n if (r1 != r0) goto L_0x0007\n goto L_0x006a\n L_0x0007:\n byte[] r2 = r5.f9079f\n int r3 = r0 + 1\n byte r0 = r2[r0]\n if (r0 < 0) goto L_0x0012\n r5.f9082i = r3\n return r0\n L_0x0012:\n int r1 = r1 - r3\n r4 = 9\n if (r1 >= r4) goto L_0x0018\n goto L_0x006a\n L_0x0018:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 7\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x0024\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n goto L_0x0070\n L_0x0024:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x0031\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n L_0x002f:\n r1 = r3\n goto L_0x0070\n L_0x0031:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 21\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x003f\n r2 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r2\n goto L_0x0070\n L_0x003f:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r4 = r1 << 28\n r0 = r0 ^ r4\n r4 = 266354560(0xfe03f80, float:2.2112565E-29)\n r0 = r0 ^ r4\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r2 = r2[r3]\n if (r2 >= 0) goto L_0x0070\n L_0x006a:\n long r0 = r5.mo9776z()\n int r0 = (int) r0\n return r0\n L_0x0070:\n r5.f9082i = r1\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3659c.mo9774x():int\");\n }", "public SoNode \ngetCurPathTail() \n{\n//#ifdef DEBUG\n if (currentpath.getTail() != (SoFullPath.cast(getCurPath())).getTail()){\n SoDebugError.post(\"SoAction::getCurPathTail\\n\", \n \"Inconsistent path tail. Did you change the scene graph\\n\"+\n \"During traversal?\\n\");\n }\n//#endif /*DEBUG*/\n return(currentpath.getTail());\n}", "@Override\n\tpublic void breath() {\n\n\t}", "public static void main(String[] args) {\nint i,j,k;\r\nint num=5;\r\nfor(i=0;i<num;i++){\r\n\tfor(j=0;j<i;j++){\r\n\t\tSystem.out.print(\" \");\r\n\t}\r\n\tfor(k=num; k>=2*i-1; k--){\r\n\t\tSystem.out.print(\"*\");\r\n\t}\r\n\t\r\n\tSystem.out.println();\r\n}\r\n\t}", "@Override\n\tpublic void div(double dx, double dy) {\n\t\t\n\t}", "public PathCode getCurPathCode() { return /*appliedTo.curPathCode*/currentpathcode;}", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "static String division (String s1, String s2) {\r\n if (s2==null || s2.length()==0) return s1;\r\n return product (s1, invert(s2));\r\n }", "public static void body() {\n \tfor(int i = 1; i <= SIZE*SIZE; i++) {\n for(int j = 1; j <= 3*SIZE-(SIZE-1); j++) {\n System.out.print(\" \");\n }\n \n System.out.print(\"|\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"||\");\n for(int j = 1; j <= SIZE-2; j++) {\n \tSystem.out.print(\"%\");\n }\n System.out.print(\"|\");\n \n System.out.println();\n }\n }", "private int uniquePaths(int x, int y, int[][] dp) {\n \t\tif (x == 0 || y == 0) return 1;\n \t\tif (dp[x][y] == 0)\n \t\t\tdp[x][y] = uniquePaths(x - 1, y, dp) + uniquePaths(x, y - 1, dp);\n \t\treturn dp[x][y];\n \t}", "public void star(float x, float y, float r, float R) {\n float angle = TWO_PI / 5;\n float halfAngle = angle/2.0f;\n beginShape();\n noStroke();\n for (float a = 0; a < TWO_PI; a += angle) {\n float sx = x + cos(a) * r;\n float sy = y + sin(a) * r;\n vertex(sx, sy);\n sx = x + cos(a+halfAngle) * R;\n sy = y + sin(a+halfAngle) * R;\n vertex(sx, sy);\n }\n endShape(CLOSE);\n}", "@Override\r\n\tpublic void CalcPeri() {\n\t\tSystem.out.println(4*side);\t\r\n\t}", "public int upright();", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tint n = 7;\r\n\t\tfor (int i = n; i >= 0; i--) {\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t for(int j=0; j<n-i; j++) {\r\n\t\t\t \r\n\t\t\t System.out.print(\" \");\r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\r\n\t\t\tfor (int j = n; j >= n-i; j--) {\r\n\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t}\r\n\r\n\t\t\r\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public void backSlash() {\n text.append(\"\\\\\");\n }", "public static void main(String[] args){\t\n\t\tchar op = '/';\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"첫번째 정수입니다.\");\n\t\tint num1 = scan.nextInt();\n\t\t\n\t\tSystem.out.println(\"두번째 정수입니다.\");\n\t\tint num2 = scan.nextInt();\n\t\tint num3=0;\n\t\tif(op=='+'){\n\t\t\tnum3 = num1+num2;\n\t\t}\n\t\telse if(op=='-'){\n\t\t\tnum3 = num1-num2;\n\t\t}\n\t\telse if(op=='*'){\n\t\t\tnum3 = num1*num2;\n\t\t}\n\t\telse if(op=='/'){\n\t\t\tif(num2==0){\n\t\t\tSystem.out.println(\"오류입니다.\");\n\t\t}\n\t\t\t\n\t\t\tnum3 = num1/num2;\n\t\t}\n\t\tSystem.out.printf(\"%d%c%d=%d\" ,num1,op,num2,num3);\n\t\t\n\t\t\n\t}", "public final void testSlash() \n\t\t\tthrows ParserConfigurationException, IOException, SAXException \n\t{\n//\t\tassertSingleDocWithValue(\"8\", fldName, \"nnðýþnn\");\n//\t\tassertSingleDocWithValue(\"8\", fldName, \"nnønn\");\n\t\tassertSingleResult(\"8\", fldName, \"nnunn\");\n\t}", "AngleResource inclination();", "public abstract void squareRootThis();", "public UniquePathsII() {\n\t\t// Initialization here. \n\t\t//\t\tcount = 0;\n\t}", "@Override\n\tpublic void space() {\n\t\t\n\t}" ]
[ "0.5906264", "0.55749613", "0.5428019", "0.53241616", "0.5294036", "0.527193", "0.52582306", "0.5256754", "0.51585066", "0.5141374", "0.51100975", "0.5097357", "0.5026707", "0.50235814", "0.50100124", "0.49757177", "0.4967908", "0.49668512", "0.4931213", "0.49272057", "0.49150687", "0.4878608", "0.4873821", "0.4873821", "0.48564616", "0.48415148", "0.4840844", "0.48408422", "0.48392275", "0.48380315", "0.48342562", "0.48335755", "0.48189583", "0.4816532", "0.4803844", "0.47991633", "0.4790358", "0.4785782", "0.47707185", "0.47659388", "0.47607136", "0.4756167", "0.47525582", "0.4750556", "0.47465262", "0.47439283", "0.47427607", "0.47368544", "0.47283906", "0.4719052", "0.4715935", "0.4711951", "0.47046372", "0.47023433", "0.46957722", "0.46894073", "0.46882662", "0.46872112", "0.46870187", "0.46838596", "0.46826214", "0.46721044", "0.4671648", "0.46691796", "0.46658975", "0.46658975", "0.46634644", "0.46593347", "0.46569487", "0.46532407", "0.46484405", "0.46472803", "0.4647124", "0.46426368", "0.46379653", "0.4635675", "0.46356165", "0.46343538", "0.46343073", "0.46324328", "0.46307802", "0.46292034", "0.46249497", "0.46220893", "0.46138567", "0.46130696", "0.46125302", "0.4608751", "0.46084386", "0.4605762", "0.46052104", "0.4602023", "0.46015334", "0.45995793", "0.45948967", "0.459342", "0.45930445", "0.45923406", "0.45910415", "0.45878932", "0.45863274" ]
0.0
-1
A function that creates a histogram from a set of values in a double[] on a fixed xaxis
public static void plotHistogramWithFixedRange(double[] x, String titleName, String fileName, double min, double max) { try{ HistogramDataset series = new HistogramDataset(); series.addSeries("default", x, 15); NumberAxis yaxis = new NumberAxis("Frequency"); NumberAxis xaxis = new NumberAxis("Risk Index Value"); xaxis.setRange(min, max); xaxis.setLabelFont(new Font("Arial", Font.PLAIN, 24)); xaxis.setTickLabelFont(new Font("Arial", Font.PLAIN, 18)); XYBarRenderer rend = new XYBarRenderer(); rend.setSeriesPaint(0, Color.black); rend.setSeriesVisibleInLegend(0, false); rend.setBaseItemLabelFont(new Font("Arial", Font.PLAIN, 40)); XYPlot p = new XYPlot(series, xaxis, yaxis, rend); p.setOrientation(PlotOrientation.VERTICAL); p.setRangeGridlinesVisible(false); p.setDomainGridlinesVisible(false); JFreeChart chart = new JFreeChart(titleName, new Font("Arial", Font.PLAIN, 24), p, false); FileOutputStream fo = new FileOutputStream(fileName); EncoderUtil.writeBufferedImage(chart.createBufferedImage(1280, 1024), ImageFormat.PNG, fo); fo.close(); } catch(Exception e){ e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "JFreeChart generateHist();", "public ArrayHistogram1D(int numValues)\n\t{\n\t\tif (numValues < 1)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"Must have at least one entry; numValues=\" + numValues);\n\t\t}\n\t\tdata = new int[numValues];\n\t}", "public void recalcHistogram();", "public static void main(String[] args)\n {\n ArrayList<DataPoint> sampleData = new ArrayList<DataPoint>();\n Histogram hist = new Histogram(sampleData, \"title\", \"idependant\", \"independant\");\n\n hist.addData(new DataPoint(1));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(3));\n hist.addData(new DataPoint(4));\n hist.addData(new DataPoint(5));\n hist.addData(new DataPoint(6));\n hist.addData(new DataPoint(7));\n hist.addData(new DataPoint(8));\n hist.addData(new DataPoint(9));\n hist.addData(new DataPoint(50));\n\n\n JFrame frame = new JFrame(\"Histogram\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\n\n\n frame.add(hist);\n frame.setSize(475,475);\n frame.setVisible(true);\n\n\n }", "public static Histogram createFrequencyTable(List<Double> values, double classWidth, double start,\r\n double stop) {\r\n Histogram histogram = new Histogram(start, stop, (int) ((stop - start) / classWidth));\r\n for (Double value : values) {\r\n histogram.add(value);\r\n }\r\n assert histogram.getSumFreq() == values.size() : \"Number of items in bins does not correspond with total number of items\";\r\n \r\n return histogram;\r\n }", "int xBins();", "public static void plotHistogram(double[] x, String titleName, String fileName) { \n try{\n \n \n HistogramDataset series = new HistogramDataset(); \n \n series.addSeries(\"default\", x, 15);\n\n JFreeChart chart = ChartFactory.createHistogram(titleName, \"Risk Index Values\", null, series, PlotOrientation.VERTICAL, false, false, false);\n \n \n FileOutputStream fo = new FileOutputStream(fileName);\n EncoderUtil.writeBufferedImage(chart.createBufferedImage(1280, 1024), ImageFormat.PNG, fo);\n fo.close();\n\n \n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "public double[] histogram() {\n int[][] data = toArray();\n double[] ans = new double[256];\n int totalSize = data.length * data[0].length;\n\n for (int i = 0; i < data.length; i++) {\n for (int j = 0; j < data[i].length; j++) {\n ans[data[i][j]]++;\n }\n }\n for (int i = 0; i < ans.length; i++) {\n ans[i] = ans[i] / totalSize;\n }\n return ans;\n }", "int yBins();", "private Histogram(int[] bins, double minValue, double maxValue) {\n this(bins.length - 2, minValue, maxValue);\n System.arraycopy(bins, 0, this.bins, 0, bins.length);\n }", "private void computeHistogramBins() {\r\n int nBins = (int) Math.ceil(hismax / binWidth);\r\n histoBins = new double[nBins];\r\n for (int i = 0; i < nBins; i++) {\r\n histoBins[i] = binWidth * (double) i + binWidth;\r\n }\r\n }", "public HistogramTest(String title) {\r\n super(title);\r\n IntervalXYDataset dataset = createDataset();\r\n JFreeChart chart = createChart(dataset);\r\n ChartPanel chartPanel = new ChartPanel(chart);\r\n chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));\r\n chartPanel.setMouseZoomable(true, false);\r\n setContentPane(chartPanel);\r\n }", "public void computeHistogram() {\n\t}", "public static void graph(){\n\t\t double[][] valuepairs = new double[2][];\n\t\t valuepairs[0] = mutTotal; //x values\n\t\t valuepairs[1] = frequency; //y values\n\t\t DefaultXYDataset set = new DefaultXYDataset();\n\t\t set.addSeries(\"Occurances\",valuepairs); \n\t\t XYBarDataset barset = new XYBarDataset(set, .8);\n\t\t JFreeChart chart = ChartFactory.createXYBarChart(\n\t\t \"Mutation Analysis\",\"Number of Mutations\",false,\"Frequency\",\n\t\t barset,PlotOrientation.VERTICAL,true, true, false);\n\t\t JFrame frame = new JFrame(\"Mutation Analysis\");\n\t\t frame.setContentPane(new ChartPanel(chart));\n\t\t frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t frame.pack();\n\t\t frame.setVisible(true);\n\t\t }", "public HistogramDataSet getData();", "HistogramInterface createHistogram(String name);", "private double[] computeHistrogram(ArrayList<Feature> freature, String keyID) {\r\n\r\n int nBins = (int) Math.ceil(hismax / binWidth);\r\n ArrayList<Double> values = FeatureOps.getSpecifiedFeatureNumericalPropertyAsArrayList(freature, keyID);\r\n double[] d1 = List2Prims.doubleFromDouble(values);\r\n\r\n double[] hist = new double[nBins];\r\n\r\n int bin;\r\n for (int i = 0; i < d1.length; i++) {\r\n bin = (int) Math.floor((double) nBins * (d1[i] / hismax));// \r\n bin = Math.min(nBins - 1, bin);\r\n hist[bin]++;\r\n }\r\n return hist;\r\n }", "public Histogram makeIntegratedHistogram() {\n int[] inBins = new int[bins.length];\n inBins[0] = bins[0];\n for (int i = 1; i < inBins.length; i++) {\n inBins[i] = inBins[i - 1] + bins[i];\n }\n return new IntegratedHistogram(inBins, minValue, maxValue);\n }", "private ArrayList<String> setXAxisValues(){\n ArrayList<String> xVals = new ArrayList<String>();\n for (int z = 0; z < 235; z++) {\n xVals.add(Integer.toString(waveArray[z]));\n }\n return xVals;\n }", "Series<double[]> makeSeries(int dimension);", "public void generateChart(int[] dataValues) {\n\t\t/*\n\t\t * The XYSeriesCollection object is a set XYSeries series (dataset) that\n\t\t * can be visualized in the same chart\n\t\t */\n\t\tXYSeriesCollection dataset = new XYSeriesCollection();\n\t\t/*\n\t\t * The XYSeries that are loaded in the dataset. There might be many\n\t\t * series in one dataset.\n\t\t */\n\t\tXYSeries data = new XYSeries(\"random values\");\n\n\t\t/*\n\t\t * Populating the XYSeries data object from the input Integer array\n\t\t * values.\n\t\t */\n\t\tfor (int i = 0; i < dataValues.length; i++) {\n\t\t\tdata.add(i, dataValues[i]);\n\t\t}\n\n\t\t// add the series to the dataset\n\t\tdataset.addSeries(data);\n\n\t\tboolean legend = false; // do not visualize a legend\n\t\tboolean tooltips = false; // do not visualize tooltips\n\t\tboolean urls = false; // do not visualize urls\n\n\t\t// Declare and initialize a createXYLineChart JFreeChart\n\t\tJFreeChart chart = ChartFactory.createXYLineChart(\"Grades Histogram\", \"Grades\", \"Frequency\", dataset,\n\t\t\t\tPlotOrientation.VERTICAL, legend, tooltips, urls);\n\n\t\t/*\n\t\t * Initialize a frame for visualizing the chart and attach the\n\t\t * previously created chart.\n\t\t */\n\t\tChartFrame frame = new ChartFrame(\"First\", chart);\n\t\tframe.pack();\n\t\t// makes the previously created frame visible\n\t\tframe.setVisible(true);\n\t}", "public HistogramDataGroup getHistogramData();", "public HistogramBuilder nBinsX(int bins) {\n this.nBinsX = bins;\n return this;\n }", "private double[] extractHistogram(int[] imagePixels){\n\t\tdouble[] histogram=new double[LEVELS_NUMBER];\n\t\tfor (int j = 0; j < imagePixels.length&&start; j++) {\n\t\t\thistogram[imagePixels[j]]++;\n\t\t}\n\t\treturn histogram;\n\t}", "private void drawHistogram(int n, double left, double right, double[] inputStream) {\n prepareCanvas(left, right);\n doDraw(n, left, right, inputStream);\n drawGrid(left, right);\n }", "public int[] getHistogram()\r\n {\r\n\treturn histogram;\r\n }", "public int alphaBinNum(float[] values) {\n\n /* Check if histogram sampling is possible. */\n if (values == null || values.length == 0) {\n\n return currentBinNum;\n }\n\n float minBin = 10;\n float minLbl = 10;\n\n /* Show a depiction of the weights being used. */\n int i, j, n, n2;\n\n /*\n * Histogram case, the most complex, start by gathering the values. If\n * none are toggled on, we will base this on all inputs which exist.\n */\n\n float minVal, maxVal;\n minVal = maxVal = 0;\n n = values.length;\n n2 = 2 * n;\n\n for (i = j = 0; i < n2; i++) {\n j = i % n;\n if (i == j) {\n n2 = n;\n }\n\n float oneval = values[j];\n\n if (oneval == Float.NaN) {\n continue;\n }\n\n if (minVal == maxVal && maxVal == 0) {\n minVal = maxVal = oneval;\n } else if (oneval < minVal) {\n minVal = oneval;\n } else if (oneval > maxVal) {\n maxVal = oneval;\n }\n }\n\n /*\n * Compute the best size to use for the value bins (dv). This responds\n * to density by using smaller increments along the x-axis when density\n * is larger.\n */\n\n if (minVal >= maxVal) {\n\n return currentBinNum;\n }\n float dv = minBin;\n\n dv = (float) .5;\n float delLbl = minLbl * dv / minBin;\n if (dv == 0.5) {\n delLbl = 1;\n } else if (dv == 0 || (maxVal - minVal) > dv * 25) {\n float minDv = (maxVal > -minVal ? maxVal : -minVal) / 5000;\n if (dv < minDv) {\n dv = minDv;\n }\n computeBinDelta(dv, delLbl);\n } else if (dv != minBin) {\n computeBinDelta(dv, delLbl);\n }\n\n int nbMax = 20;\n if ((maxVal - minVal) / dv > nbMax) {\n float dvSeed, dvPrev;\n for (dvSeed = dvPrev = dv, i = 0; i < 100; i++) {\n dvSeed *= 1.4;\n dv = dvSeed;\n computeBinDelta(dv, delLbl);\n if (dv == dvPrev) {\n continue;\n }\n if ((maxVal - minVal) / dv < nbMax) {\n break;\n }\n dvPrev = dvSeed = dv;\n }\n }\n\n /*\n * We want edge of the bins to be at half the bin size, containing at\n * least two even values of del2.\n */\n\n float del2 = delLbl * 2;\n float edge = dv * (((int) (minVal / dv)) - (float) 0.5);\n while (minVal - edge > dv) {\n edge += dv;\n }\n while (edge > minVal) {\n edge -= dv;\n }\n minVal = edge;\n edge = dv * (((int) (maxVal / dv)) + (float) 0.5);\n while (edge - maxVal > dv) {\n edge -= dv;\n }\n while (edge < maxVal) {\n edge += dv;\n }\n maxVal = edge;\n int nbins = (int) (0.5 + (maxVal - minVal) / dv);\n float mean2 = (minVal + maxVal) / 2;\n mean2 = mean2 > 0 ? del2 * (int) (0.5 + mean2 / del2) : -del2\n * (int) (0.5 - mean2 / del2);\n while (minVal > mean2 - del2 && maxVal < mean2 + del2) {\n nbins += 2;\n minVal -= dv;\n maxVal += dv;\n }\n\n return nbins;\n }", "public static <B> Histogram<B> withBins(Iterable<B> bins) {\n Histogram<B> hist = new Histogram<>();\n hist.addBins(bins);\n return hist;\n }", "private void setupHistogram() {\n\n // Create chart using the ChartFactory.\n chart = MimsChartFactory.createMimsHistogram(\"\", \"Pixel Value\", \"\", null, PlotOrientation.VERTICAL, true, true, false);\n chart.setBackgroundPaint(this.getBackground());\n chart.removeLegend();\n\n // Set the renderer.\n MimsXYPlot plot = (MimsXYPlot) chart.getPlot();\n XYBarRenderer renderer = (XYBarRenderer) plot.getRenderer();\n renderer.setDrawBarOutline(false);\n renderer.setShadowVisible(false);\n renderer.setBarPainter(new StandardXYBarPainter());\n\n // Listen for key pressed events.\n KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new KeyEventDispatcher() {\n public boolean dispatchKeyEvent(KeyEvent e) {\n if (e.getID() == KeyEvent.KEY_PRESSED && thisIsVisible() && ui.isActive()) {\n chartPanel.keyPressed(e);\n }\n return false;\n }\n });\n\n // Movable range and domain.\n plot.setDomainPannable(true);\n plot.setRangePannable(true);\n\n chartPanel = new MimsChartPanel(chart);\n chartPanel.setSize(350, 225);\n jPanel1.add(chartPanel);\n }", "private String histogram() {\n\t\tStringBuilder sb = new StringBuilder(\"[\");\n\t\t\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tint size = 0;\n\t\t\tfor (int j = 0; j < myBuckets.size(); j++) {\n\t\t\t\tif (myBuckets.get(j).size() == i) size++;\n\t\t\t}\n\t\t\tsb.append(size + \", \");\n\t\t}\n\t\tsb.replace(sb.length() - 2, sb.length(), \"]\");\n\t\treturn sb.toString();\n\t}", "public Histogram(int bins, double minValue, double maxValue) {\n this.bins = new int[bins + 2];//Two additional bins for out-of-bounds values.\n this.minValue = minValue;\n this.maxValue = maxValue;\n binDiff = (maxValue - minValue) / bins;\n }", "private double[] normalizeHistogram(double[] inputHistogram, int totalPixels) {\n\t\tdouble[] normalized=new double[inputHistogram.length];\n\t\tfor(int i=0;i<inputHistogram.length&&start;i++){\n\t\t\tnormalized[i]=inputHistogram[i]/totalPixels;\n\t\t}\n\t\treturn normalized;\n\t}", "public double[] areaHistogram(double x, double y, double width,\n double height) {\n int[] data = areaToVector(x, y, width, height);\n double[] ans = new double[256];\n int totalSize = data.length;\n\n for (int i = 0; i < data.length; i++) {\n ans[data[i]] += 1.0 / totalSize;\n }\n return ans;\n }", "public void createHistogramItem(String name, List list, BinDataSource source,\n int maxIntegerDigits, int maxFractionDigits) {\n stats.createHistogramItem(name, list, source, maxIntegerDigits,\n maxFractionDigits);\n plot.addLegend(dataset++, name);\n }", "public static Histogram readFrequencyTable(String fileName) {\r\n List<String[]> data = FileUtils.readCSVFile(fileName, \";\", -1);\r\n \r\n double classWidth = Double.parseDouble(data.get(1)[0]) - Double.parseDouble(data.get(0)[0]);\r\n double start = Double.parseDouble(data.get(0)[0]) - classWidth / 2.0;\r\n double stop = Double.parseDouble(data.get(data.size() - 1)[0]) + classWidth / 2.0;\r\n \r\n Histogram table = new Histogram(start, stop, (int) ((stop - start) / classWidth));\r\n for (String[] row : data) {\r\n int frequency = (int) Double.parseDouble(row[1]);\r\n double value = Double.parseDouble(row[0]);\r\n for (int i = 0; i < frequency; i++) {\r\n table.add(value);\r\n }\r\n }\r\n return table;\r\n }", "public double[] calcNormHistogram()\r\n {\r\n\tdouble [] normHistogram = new double[histogram.length];\r\n\t\r\n\t//Find the normalized histogram by dividing each element of\r\n\t//the histogram by sum\r\n\tfor( int n = 0; n < histogram.length; n++ )\r\n\t normHistogram[n] = (double)histogram[n]/sum;\r\n\t\r\n\treturn normHistogram;\r\n }", "public void drawHistograms(Graphics2D g, int x0, int y0, int w, int h)\n{\n double ymax = alldefs.histogram.yaxisMax;\n double ymin = alldefs.histogram.yaxisMin;\n\n for (int i = 0; i < histograms.length; i+=alldefs.histogram.barStack)\n {\n double v0 = 0;\n double v2 = 0;\n for (int j = 0; j < alldefs.histogram.barStack; j++)\n { \n double v = histograms[i + j]; \n if (v > 0)\n v0 += v;\n else\n v2 += v;\n }\n\n if (v0 > ymax) ymax = v0;\n if (v2 < ymin) ymin = v2;\n }\n\n if (alldefs.histogram.yaxisIncrement > 0)\n {\n double y = 0;\n if (ymax >= 0)\n {\n while (ymax > y)\n { y += alldefs.histogram.yaxisIncrement; }\n }\n else\n {\n while (ymax < y - alldefs.histogram.yaxisIncrement)\n { y -= alldefs.histogram.yaxisIncrement; }\n }\n ymax = y;\n\n y = 0;\n if (ymin >= 0)\n {\n while (ymin > y)\n { y += alldefs.histogram.yaxisIncrement; }\n }\n else\n {\n while (ymin < y)\n { y -= alldefs.histogram.yaxisIncrement; }\n }\n ymin = y;\n }\n\n FontMetrics fm = getFontMetrics(getFont());\n int ascent = fm.getAscent(); \n\n int yTop = 1 //space\n + ascent //font\n + 1; //space\n\n int yBottom = 4 //tic and overlapping line\n + ascent //font\n + 1 //space\n + ascent //font\n + 1; //space\n\n int xLeft = 1 //space\n + ascent //font\n + 1 //space\n + 0 //stringwidth placeholder\n + 4; //tic and overlapping line\n\n int xRight = 4; //spacing only\n\n int sw1 = \n fm.stringWidth(format.doublewithdecimals(ymin, alldefs.histogram.yaxisDecimals));\n int sw2 = \n fm.stringWidth(format.doublewithdecimals(ymax, alldefs.histogram.yaxisDecimals));\n\n xLeft += sw1 > sw2 ? sw1 : sw2;\n\n double ypix = 0;\n if (ymax > ymin)\n {\n g.setColor(Color.black);\n\n if (yTop + yBottom < h)\n {\n ypix = Math.abs(ymax - ymin) / (double)(h - yTop - yBottom);\n\n g.drawLine(xLeft, h - yBottom, xLeft, yTop);\n g.drawLine(xLeft + 1, h - yBottom, xLeft + 1, yTop);\n }\n else\n { ypix = Math.abs(ymax - ymin) / (double)1; }\n\n if (alldefs.histogram.yaxisIncrement > 0 && ypix > 0)\n {\n int j0 = yTop;\n int jn = h - yBottom - 1;\n\n int factor = 0;\n {\n int total;\n int size = jn - j0 + 1 - ascent;\n do\n {\n total = 0;\n factor++;\n\n double y = ymax - factor * alldefs.histogram.yaxisIncrement;\n while (y > ymin)\n {\n total += ascent;\n y -= factor * alldefs.histogram.yaxisIncrement;\n }\n } while (total > size);\n }\n\n double y = ymax;\n while (j0 <= jn)\n {\n String s = format.doublewithdecimals(y, alldefs.histogram.yaxisDecimals);\n int sw = fm.stringWidth(s);\n\n g.drawString(s, xLeft - sw - 4, j0 + ascent / 2 + 1);\n g.drawLine(xLeft, j0, xLeft - 4, j0);\n \n y -= factor * alldefs.histogram.yaxisIncrement;\n j0 = yTop + (int)((ymax - y) / ypix);\n }\n }\n else\n {\n String s = \n format.doublewithdecimals(ymax, alldefs.histogram.yaxisDecimals);\n int sw = fm.stringWidth(s);\n\n g.drawString(s, xLeft - sw - 4, yTop + ascent / 2 - 1);\n g.drawLine(xLeft, yTop, xLeft - 4, yTop);\n }\n\n if (alldefs.histogram.barTotal > 0)\n {\n int spacing = alldefs.histogram.barSpacing;\n int width = alldefs.histogram.barWidth;\n\n if (width <= 0)\n {\n width = (w - xLeft - xRight - alldefs.histogram.barTotal * spacing * 2) / alldefs.histogram.barTotal;\n }\n\n if (width <= 0)\n width = 1;\n\n int total = spacing * 2 + width;\n\n int xa = xLeft + 2;\n int xb = xa + alldefs.histogram.barTotal * total;\n int yb = h - yBottom;\n g.drawLine(xa - 2, yb, xb, yb);\n g.drawLine(xa - 2, yb - 1, xb, yb - 1);\n\n int yc = yTop + (int)(ymax / ypix);\n g.drawLine(xa - 2, yc, xb, yc);\n\n int idx = 0;\n for (int i = 0; i < alldefs.histogram.barTotal; i++)\n {\n int yT = yc;\n int yB = yc;\n for (int j = 0; j < alldefs.histogram.barStack; j++)\n {\n double v = histograms[idx++];\n int j2 = Math.abs((int)(v / ypix));\n if (j2 > 1)\n {\n g.setColor(alldefs.histogram.barColors[j]);\n\n if (v > 0)\n {\n yT -= j2;\n\n g.fillRect(xa + spacing, yT, width, j2);\n \n g.setColor(Color.black);\n g.drawRect(xa + spacing, yT, width, j2);\n }\n else\n {\n g.fillRect(xa + spacing, yB, width, j2);\n \n g.setColor(Color.black);\n g.drawRect(xa + spacing, yB, width, j2);\n\n yB += j2;\n }\n }\n } \n\n if (alldefs.histogram.barLabels != null \n && alldefs.histogram.barLabels.length \n == alldefs.histogram.barTotal)\n {\n String s = alldefs.histogram.barLabels[i];\n if (s != null)\n {\n g.drawLine(xa + total / 2, yb, xa + total / 2, yb + 4);\n \n int sw0 = fm.stringWidth(s) / 2;\n g.drawString(s, xa + total / 2 - sw0, yb + 4 + 1 + ascent);\n }\n }\n xa += total;\n }\n }\n }\n\n g.setColor(Color.black);\n\n //draw Titles\n if (alldefs.histogram.title != null)\n g.drawString(alldefs.histogram.title, xLeft, yTop - 1);\n\n if (alldefs.histogram.barTitle != null)\n g.drawString(alldefs.histogram.barTitle,\n w / 2,\n h - 1);\n\n if (alldefs.histogram.yaxisTitle != null)\n {\n g.rotate(Math.PI / -2.0, 1 + ascent, h / 2);\n g.drawString(alldefs.histogram.yaxisTitle, \n 1 + ascent, \n h / 2);\n g.rotate(Math.PI / 2.0, 1 + ascent, h / 2);\n }\n}", "private void histogramScore() {\r\n View.histogram(score, 0, this.getSize().width + 15, 0);\r\n }", "public HistogramDataSetAdapter(Histogram histogram, Locale locale){\n\t\tsuper();\n\t\tthis.locale\t\t\t\t= locale;\n\t\tthis.accumulateTimeUnit\t= null;\n\t\tthis.histogramTally\t\t= histogram;\n\t\tthis.histogramAccumulate= null;\n \tboolean showTimeSpans \t= histogram.getShowTimeSpansInReport();\n \tif(showTimeSpans) this.setTimeSpanFormat(histogram);\n \tint\t\tminCell = 0;\n \tfor(int i=0; i< histogram.getCells()+2; i++){\n \t\tif(histogram.getObservationsInCell(i) > 0.0){\n \t\t\tminCell = i; break;\n \t\t}\n \t}\n \tint\t\tmaxCell = histogram.getCells()+1;\n \tfor(int i=histogram.getCells()+1; i> -1; i--){\n \t\tif(histogram.getObservationsInCell(i) > 0.0){\n \t\t\tmaxCell = i; break;\n \t\t}\n \t}\n \t//System.out.println(\"minCell: \"+minCell+\" maxCell: \"+maxCell);\n \t\n \tlong \tvalue;\n \tdouble \tfrom, to;\n \tString yKey = \"\", xKey;\n for (int i = minCell; i <= maxCell; i++) {\n \tvalue \t= Math.round(histogram.getObservationsInCell(i));\n from\t= histogram.getLowerLimit(i);\n to\t\t= Double.POSITIVE_INFINITY;\n if(i+1 < histogram.getCells()+2) to\t= histogram.getLowerLimit(i+1);\n \txKey = \"[\" + this.format(showTimeSpans, from) + \" .. \" + this.format(showTimeSpans, to) + \")\";\n \tthis.addValue(value, yKey, xKey);\n //System.out.println(\"added: \" + value+\" \"+xKey+\" \"+yKey);\n }\n\t}", "public static void generateHistogram(int primeArray[]){\n int i, j;\n int occurrences = 0;\n \n int scale = determineScale(primeArray);\n \n System.out.println(\"\\n\\nPrime Sequence Histogram\\n\");\n for(i = 0; i < MAX_DIGIT; i++){\n System.out.format(\"%d%1s\", i, \" | \");\n for(j = 0; j < primeArray.length; j++){\n if((primeArray[j] % MAX_DIGIT) == i)\n occurrences++; \n }\n for(j = 0; j < (occurrences / scale); j++)\n System.out.format(\"%-5s\", \"* \");\n occurrences = 0;\n System.out.println();\n }\n System.out.print(\" ___________________________________________\\n \");\n for(i = 1; i < MAX_DIGIT; i++)\n System.out.format(\"%-5d\", (i * scale) );\n \n }", "private void initializeChartPanel() {\n\n Rectangle region = new Rectangle(0, 0, clip.getFrameCount(), clip.getFrameFreqSamples());\n\n //toClipCoords(region);\n region.y = clip.getFrameFreqSamples() - (region.y + region.height);\n\n final int endCol = region.x + region.width;\n final int endRow = region.y + region.height;\n\n //System.out.println(\"endCol = \" + endCol + \" endRow = \" + endRow);\n\n XYSeries xy = new XYSeries(\"data\");\n XYSeries xySpline = new XYSeries(\"spline\");\n\n // Displays the single MAX or STRONGEST Frequency for each column\n // captures every x'th element for fitting spline\n int maxItensity = 0;\n int[] rows = new int[endCol];\n int[] intensities = new int[endCol];\n\n// int SPLINEPRECISION = chartPrefJSlider2.getValue(); // 1 is highest precision; default = 40\n int SPLINEPRECISION = 40; // 1 is highest precision; default = 40\n int splineCounter = 0;\n\n for (int col = region.x; col < endCol; col++) {\n Frame fr = clip.getFrame(col);\n int strongestFreq = 0;\n int strongestFreqStrength = 0;\n for (int row = region.y; row < endRow; row++) {\n // the following is a MUCH faster equivalent to: img.setRGB(col, row, greyVal);\n //int greyVal = (int) (brightness + (contrast * Math.log1p(Math.abs(preMult * val))));\n int greyVal = (int) (0 + (625.0 * Math.log1p(Math.abs(11.2 * fr.getReal(row)))));\n greyVal = Math.min(255, Math.max(0, greyVal));\n int thisFreqStrength = (greyVal << 16) | (greyVal << 8) | (greyVal);\n\n if (thisFreqStrength > strongestFreqStrength) {\n strongestFreqStrength = thisFreqStrength;\n strongestFreq = row;\n }\n if (thisFreqStrength > maxItensity) {\n maxItensity = thisFreqStrength;\n }\n }\n rows[col] = strongestFreq;\n intensities[col] = strongestFreqStrength;\n }\n System.out.println(\"maxItensity = \" + maxItensity);\n\n // Average neighboring data values\n // Use minIntensity amoung neighbors for averaged row\n // Use threshold to exclude weak signals\n //int NUMPOINTSAVERAGED = 20;\n int NUMPOINTSAVERAGED = jSlider1.getValue(); // default = 20\n double INTENSITYTHRESHOLD = 0.95;\n int[] data = new int[endCol - NUMPOINTSAVERAGED];\n int[] dataAveraged = new int[endCol - NUMPOINTSAVERAGED];\n int[] minIntensities = new int[endCol - NUMPOINTSAVERAGED];\n for (int col = region.x; col < endCol - NUMPOINTSAVERAGED; col++) {\n int sumRows = 0;\n int minIntensity = maxItensity;\n for (int i = col; i < col + NUMPOINTSAVERAGED; i++) {\n sumRows += rows[i];\n minIntensity = java.lang.Math.min(minIntensity, intensities[i]);\n }\n data[col] = rows[col];\n dataAveraged[col] = java.lang.Math.round(sumRows / NUMPOINTSAVERAGED);\n minIntensities[col] = minIntensity;\n }\n\n for (int col = region.x; col < endCol - 2 * NUMPOINTSAVERAGED; col++) {\n splineCounter++;\n for (int row = region.y; row < endRow; row++) {\n if (row == data[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds actual data\n xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n }\n\n if (row == dataAveraged[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds averaged data\n //xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n if (splineCounter % SPLINEPRECISION == 0) {\n xySpline.add((double) (col + NUMPOINTSAVERAGED / 2), (double) convertYCoordToFreq(row));\n }\n }\n }\n }\n\n dataset.removeAllSeries();\n dataset.addSeries(xy);\n\n //XYSeriesCollection splineDataset = new XYSeriesCollection();\n dataset.addSeries(xySpline);\n\n JFreeChart chart = ChartFactory.createXYLineChart(\n //JFreeChart chart = ChartFactory.createScatterPlot(\n clip.getFileName(), \"Time (ms)\", \"Frequency (Hz)\", dataset, PlotOrientation.VERTICAL, true, true, false);\n XYPlot xyplot = (XYPlot) chart.getPlot();\n xyplot.setRenderer(new XYSplineRenderer());\n XYLineAndShapeRenderer xylineandshaperenderer = (XYLineAndShapeRenderer) xyplot.getRenderer();\n xylineandshaperenderer.setSeriesShape(0, new java.awt.Rectangle(1, 1, 1, 1));\n xylineandshaperenderer.setSeriesLinesVisible(0, false);\n xylineandshaperenderer.setSeriesShapesVisible(0, true);\n xylineandshaperenderer.setSeriesLinesVisible(1, false);\n xylineandshaperenderer.setSeriesShapesVisible(1, false);\n\n// ChartFrame frame = new ChartFrame(\"First\", chart);\n// frame.pack();\n// frame.setVisible(true);\n\n\n jCheckBox1.setEnabled(true);\n jCheckBox1.setSelected(true);\n\n jCheckBox2.setEnabled(true);\n jCheckBox2.setSelected(false);\n\n jSlider1.setEnabled(true);\n jSlider2.setEnabled(true);\n\n jTextField9.setText(clip.getFileName());\n\n chartPanel = new ChartPanel(chart);\n }", "public static int[] histogram(int[] scores, int numCounters)\n {\n int[] hist = new int[numCounters];\n for(int score:scores)\n {\n hist[score]++;\n }\n return hist;\n }", "public static boolean histogram(CLIJ2 clij2, ClearCLBuffer src, ClearCLBuffer histogram, Integer numberOfBins, Float minimumGreyValue, Float maximumGreyValue, Boolean determineMinMax, boolean showTable) {\n if (determineMinMax) {\n minimumGreyValue = new Double(clij2.minimumOfAllPixels(src)).floatValue();\n maximumGreyValue = new Double(clij2.maximumOfAllPixels(src)).floatValue();\n }\n\n // determine histogram\n boolean result = fillHistogram(clij2, src, histogram, minimumGreyValue, maximumGreyValue);\n\n // the histogram is written in args[1] which is supposed to be a one-dimensional image\n ImagePlus histogramImp = clij2.convert(histogram, ImagePlus.class);\n\n // plot without first eleement\n //histogramImp.setRoi(new Line(1,0.5, histogramImp.getWidth(), 0.5));\n //IJ.run(histogramImp, \"Plot Profile\", \"\");\n\n // plot properly\n float[] determinedHistogram = (float[])(histogramImp.getProcessor().getPixels());\n float[] xAxis = new float[numberOfBins];\n xAxis[0] = minimumGreyValue;\n float step = (maximumGreyValue - minimumGreyValue) / (numberOfBins - 1);\n\n for (int i = 1 ; i < xAxis.length; i ++) {\n xAxis[i] = xAxis[i-1] + step;\n }\n //new Plot(\"Histogram\", \"grey value\", \"log(number of pixels)\", xAxis, determinedHistogram, 0).show();\n\n // send result to results table\n if (showTable) {\n ResultsTable table = ResultsTable.getResultsTable();\n for (int i = 0; i < xAxis.length; i++) {\n table.incrementCounter();\n table.addValue(\"Grey value\", xAxis[i]);\n table.addValue(\"Number of pixels\", determinedHistogram[i]);\n }\n table.show(table.getTitle());\n }\n return result;\n }", "public static <B> Histogram<B> withBins(Iterable<B> bins, Iterable<String> series) {\n Histogram<B> hist = new Histogram<>();\n hist.addBins(bins);\n hist.addSeries(series);\n return hist;\n }", "public static Stats of(double... values) {\n/* 122 */ StatsAccumulator acummulator = new StatsAccumulator();\n/* 123 */ acummulator.addAll(values);\n/* 124 */ return acummulator.snapshot();\n/* */ }", "public void loadData(HistogramDataSet dataSet);", "public float histogramMethod(Slice slice) \n\t{\n\t\tHistogram hh = new Histogram();\n\t\tint ii = 0;\n\n\t\t//\n\t\t// Compute the thresholded histogram.\n\t\t//\n\t\tfloat lower_threshold = (float)0.01;\n\t\tfloat upper_threshold = (float)0.3 * (float)Statistics.max(slice);\n\t\thh.histogram( slice, lower_threshold, upper_threshold );\n\n\t\t//\n\t\t// Get the counts and bins.\n\t\t//\n\t\tfloat[] bins = hh.getBins();\n\t\tfloat[] counts = hh.getCounts();\n\n\t\t//\n\t\t// Find the maximum count.\n\t\t//\n\t\tfloat max = (float)0.0; int max_index = 0;\n\t\tfor(ii=0; ii<counts.length; ii++) {\n\t\t\tif( counts[ii] > max ) {\n\t\t\t\tmax_index = ii;\n\t\t\t\tmax = counts[ii];\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t// Find the first minimum after the maximum\n\t\t//\n\t\tii = max_index + 1;\n\t\tdo {\n\t\t\tii++;\n\t\t} while( counts[ii] < counts[ii-1] && ( ii < bins.length ) );\n\n\t\tfloat sigma = (float)0.0;\n\t\tif( ii >= bins.length-1 ) {\n\t\t\tSystem.out.println(\"Gack...could not find the first minimum.\");\n\t\t}\n\t\telse {\n\t\t\tsigma = bins[ii];\n\t\t}\n\n\t\treturn sigma;\n\t}", "private static void drawHistogram(HashMap<String, Double> map) {\n\tdouble maximumRelativeFrequency = 0;\n\n\t//Find maximum relative frequency.\n\tfor (Entry<String, Double> entry : map.entrySet()) {\n\t if (maximumRelativeFrequency < entry.getValue()) {\n\t\tmaximumRelativeFrequency = entry.getValue();\n\t }\n\t}\n\n\tfor (Entry<String, Double> entry : map.entrySet()) {\n\t System.out.print(entry.getKey() + \": \");\n\t \n\t System.out.printf(\"%5.2f%% : \", entry.getValue()*100);\n\t \n\t //Scale histogram to largest relative frequency.\n\t int stars = (int)((entry.getValue() / maximumRelativeFrequency) * 70.0);\n\t for (int i = 0; i < stars; i++)\n\t {\n\t\tSystem.out.print(\"*\");\n\t }\n\t System.out.println();\n\t}\n }", "public NumericalDistributionModel( Integer binCount, Double span ){\n\t\tinterval = span / binCount.doubleValue();\n\t\tlog.info( \"bin-interval is {}\", interval );\n\t\thistogram = new Integer[ binCount ];\n\t\t\n\t\tfor( int i = 0; i < histogram.length; i++ )\n\t\t\thistogram[i] = 0;\n\t}", "private void calcXSize(ArrayList<BarEntry> xValues) {\n for (int i = 0; i < xValues.size(); i++) {\n int xValue = xValues.get(i).getX();\n mMaxX = Math.max(mMaxX, xValue);\n mMinX = Math.min(mMinX, xValue);\n }\n }", "public void fillBins() {\n\t\t// grab our current data and then transpose it\n\t\tList<List<String>> currentData = dc.getDataFold().get(currentFold);\n\t\tList<List<String>> tranData = dc.transposeList(currentData);\n\t\tfor (int row = 0; row < tranData.size(); row++) {\n\t\t\t// for each row of attribute values, discretize it\n\t\t\tList<Double> procData = new ArrayList<>();\n\t\t\t// for each String of raw data, convert it into a value to place into a bin\n\t\t\tfor (String rawData : tranData.get(row)) {\n\t\t\t\tif (rawData.chars().allMatch(Character::isDigit) || rawData.contains(\".\")) {\n\t\t\t\t\tprocData.add(Double.parseDouble(rawData));\n\t\t\t\t} else {\n\t\t\t\t\t// not perfect, but useable in the small domain of values we use for data\n\t\t\t\t\tprocData.add((double) rawData.hashCode());\n\t\t\t\t} // end if-else\n\t\t\t} // end for\n\n\t\t\t// for each value we have, place it into a corresponding bin\n\t\t\tfor (double value : procData) {\n\t\t\t\tfor (Bin bin : attribBins.get(row)) {\n\t\t\t\t\tif (bin.binContains(value)) {\n\t\t\t\t\t\tbin.incrementFreq();\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\t}", "public double[][] normalisedHistogram(BufferedImage image) {\r\n double[][] rgbCount = getHistogram(image);\r\n int size = image.getHeight() * image.getWidth();\r\n for (int i = 0; i < 3; i++) {\r\n for (int j = 0; j <= 255; j++) {\r\n rgbCount[i][j] /= size; //normalise\r\n }\r\n }\r\n return rgbCount;\r\n }", "HistogramInterface registerHistogram(HistogramInterface histogram);", "private void updateChartPanel() {\n\n Rectangle region = new Rectangle(0, 0, clip.getFrameCount(), clip.getFrameFreqSamples());\n\n //toClipCoords(region);\n region.y = clip.getFrameFreqSamples() - (region.y + region.height);\n\n final int endCol = region.x + region.width;\n final int endRow = region.y + region.height;\n\n //System.out.println(\"endCol = \" + endCol + \" endRow = \" + endRow);\n\n XYSeries xy = new XYSeries(\"data\");\n XYSeries xySpline = new XYSeries(\"spline\");\n\n // Displays the single MAX or STRONGEST Frequency for each column\n // captures every x'th element for fitting spline\n int maxItensity = 0;\n int[] rows = new int[endCol];\n int[] intensities = new int[endCol];\n\n int SPLINEPRECISION = jSlider2.getValue(); // 1 is highest precision; default = 40\n// int SPLINEPRECISION = 40; // 1 is highest precision; default = 40\n int splineCounter = 0;\n\n for (int col = region.x; col < endCol; col++) {\n Frame fr = clip.getFrame(col);\n int strongestFreq = 0;\n int strongestFreqStrength = 0;\n for (int row = region.y; row < endRow; row++) {\n // the following is a MUCH faster equivalent to: img.setRGB(col, row, greyVal);\n //int greyVal = (int) (brightness + (contrast * Math.log1p(Math.abs(preMult * val))));\n int greyVal = (int) (0 + (625.0 * Math.log1p(Math.abs(11.2 * fr.getReal(row)))));\n greyVal = Math.min(255, Math.max(0, greyVal));\n int thisFreqStrength = (greyVal << 16) | (greyVal << 8) | (greyVal);\n\n if (thisFreqStrength > strongestFreqStrength) {\n strongestFreqStrength = thisFreqStrength;\n strongestFreq = row;\n }\n if (thisFreqStrength > maxItensity) {\n maxItensity = thisFreqStrength;\n }\n }\n rows[col] = strongestFreq;\n intensities[col] = strongestFreqStrength;\n }\n //System.out.println(\"maxItensity = \" + maxItensity);\n\n // Average neighboring data values\n // Use minIntensity amoung neighbors for averaged row\n // Use threshold to exclude weak signals\n //int NUMPOINTSAVERAGED = 20;\n int NUMPOINTSAVERAGED = jSlider1.getValue(); // default = 20\n double INTENSITYTHRESHOLD = 0.95;\n int[] data = new int[endCol - NUMPOINTSAVERAGED];\n int[] dataAveraged = new int[endCol - NUMPOINTSAVERAGED];\n int[] minIntensities = new int[endCol - NUMPOINTSAVERAGED];\n for (int col = region.x; col < endCol - NUMPOINTSAVERAGED; col++) {\n int sumRows = 0;\n int minIntensity = maxItensity;\n for (int i = col; i < col + NUMPOINTSAVERAGED; i++) {\n sumRows += rows[i];\n minIntensity = java.lang.Math.min(minIntensity, intensities[i]);\n }\n data[col] = rows[col];\n dataAveraged[col] = java.lang.Math.round(sumRows / NUMPOINTSAVERAGED);\n minIntensities[col] = minIntensity;\n }\n\n for (int col = region.x; col < endCol - 2 * NUMPOINTSAVERAGED; col++) {\n splineCounter++;\n for (int row = region.y; row < endRow; row++) {\n if (row == data[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds actual data\n xy.add((double) col, calibrate((double) convertYCoordToFreq(row)));\n System.out.println(\"adding data point (\" + col + \",\" + calibrate((double) convertYCoordToFreq(row)) + \")\");\n }\n if (row == dataAveraged[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds averaged data\n //xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n if (splineCounter % SPLINEPRECISION == 0) {\n xySpline.add((double) (col + NUMPOINTSAVERAGED / 2), calibrate((double) convertYCoordToFreq(row)));\n }\n }\n }\n }\n //replace Data with new series\n dataset.removeSeries(1);\n dataset.removeSeries(0);\n dataset.addSeries(xy);\n dataset.addSeries(xySpline);\n\n XYPlot xyplot = (XYPlot) chartPanel.getChart().getPlot();\n XYLineAndShapeRenderer xylineandshaperenderer = (XYLineAndShapeRenderer) xyplot.getRenderer();\n xylineandshaperenderer.setSeriesShapesVisible(0, jCheckBox1.isSelected());\n xylineandshaperenderer.setSeriesLinesVisible(1, jCheckBox2.isSelected());\n\n if (jCheckBox3.isSelected()) {\n xyplot.getRangeAxis().setLabel(jTextField8.getText() + \" (\" + jTextField3.getText() + \")\");\n } else {\n xyplot.getRangeAxis().setLabel(\"Frequency (Hz)\");\n }\n\n // Show Crosshairs\n chartPanel.setVerticalAxisTrace(true);\n\n chartPanel.repaint();\n }", "private String printHistogram(double tokenValue) {\n double histogramValue = maximumSize;\n double totalHistograms = Math.round(tokenValue / histogramValue);\n if (totalHistograms == 0) { \n totalHistograms = 1; \n }\n\n String histograms = \"\";\n for (int i = 0; i < totalHistograms; i++) {\n histograms += \"*\";\n }\n return histograms;\n }", "public HistogramDataSetAdapter(HistogramAccumulate histogram, Locale locale){\n\t\tsuper();\n\t\tthis.locale\t\t\t\t= locale;\n\t\tthis.histogramTally\t\t= null;\n\t\tthis.histogramAccumulate= histogram;\n\t\tthis.accumulateTimeUnit\t= this.chooseTimeUnit(histogram, 3);\n\t\tboolean showTimeSpans \t= histogram.getShowTimeSpansInReport();\n\t\tif(showTimeSpans) this.setTimeSpanFormat(histogram);\n \tint\t\tminCell = 0;\n \tfor(int i=0; i< histogram.getCells()+2; i++){\n \t\tif(TimeSpan.isLonger(histogram.getObservationsInCell(i), TimeSpan.ZERO)){\n \t\t\tminCell = i; break;\n \t\t}\n \t}\n \tint\t\tmaxCell = histogram.getCells()+1;\n \tfor(int i=histogram.getCells()+1; i> -1; i--){\n \t\tif(TimeSpan.isLonger(histogram.getObservationsInCell(i), TimeSpan.ZERO)){\n \t\t\tmaxCell = i; break;\n \t\t}\n \t}\n \t//System.out.println(\"minCell: \"+minCell+\" maxCell: \"+maxCell);\n\n \tdouble \tvalue;\n \tdouble \tfrom, to;\n \tString yKey = \"\", xKey;\n for (int i = minCell; i <= maxCell; i++) {\n \tvalue \t= histogram.getObservationsInCell(i).getTimeAsDouble(this.accumulateTimeUnit);\n from\t= histogram.getLowerLimit(i);\n to\t\t= Double.POSITIVE_INFINITY;\n if(i+1 < histogram.getCells()+2) to\t= histogram.getLowerLimit(i+1);\n \txKey = \"[\" + this.format(showTimeSpans, from) + \" .. \" + this.format(showTimeSpans, to) + \")\";\n \tthis.addValue(value, yKey, xKey);\n //System.out.println(\"added: \" + value+\" \"+xKey+\" \"+yKey);\n }\n\t}", "public IntHistogram(int buckets, int min, int max) {\n \t// some code goes here\n this.min = min;\n this.max = max;\n this.buckets = new int[buckets];\n for(int i=0;i<buckets;++i){\n this.buckets[i] = 0;\n }\n totalCount = 0;\n int range = max - min + 1;\n\n capacity = range % buckets == 0 ? range / buckets : range / buckets + 1;\n }", "public static void main(String args[]) {\n int a = 0;\r\n int b = 0;\r\n int u = 0;\r\n\r\n //Declaring scanner object\r\n Scanner capture = new Scanner(System.in);\r\n System.out.println(\"How many input values [MAX: 30]?\");\r\n\r\n //Taking input\r\n int x = capture.nextInt();\r\n ArrayList<Integer> Digits = new ArrayList<>();\r\n System.out.println(\"Enter \" + x + \" numbers.\");\r\n\r\n //Declaring and initializing HashMap object\r\n HashMap<Integer, Integer> Occur = new HashMap<>();\r\n\r\n // Initialize Hashmap\r\n for(int i=0;i<10;i++){\r\n Occur.put(i,0);\r\n }\r\n\r\n\r\n\r\n\r\n int tmp = x;\r\n // Initialize ArrayList\r\n while(tmp>0){\r\n Digits.add(capture.nextInt());\r\n tmp--;\r\n }\r\n\r\n\r\n\r\n // ----------------------------\r\n while (b < x) {\r\n if (Occur.get(Digits.get(b)) != null) {\r\n int cnt = Occur.get(Digits.get(b)) + 1;\r\n Occur.put(Digits.get(b), cnt);\r\n }\r\n else {\r\n Occur.put(Digits.get(b), 1);\r\n }\r\n b++;\r\n }\r\n\r\n int height = 0;\r\n System.out.println(\"\\nNumber Occurrence\");\r\n\r\n height = 0;\r\n for(Map.Entry<Integer,Integer> entry : Occur.entrySet()){\r\n if(entry.getValue()>0){\r\n System.out.println(entry.getKey() + \" \" + entry.getValue());\r\n }\r\n if(entry.getValue()>height){\r\n height = entry.getValue();\r\n }\r\n }\r\n\r\n System.out.println(\"================= Vertical bar =================\");\r\n\r\n //Printing histogram\r\n int h = height;\r\n while ( h > 0) {\r\n\r\n System.out.print(\"| \"+h+\" | \");\r\n\r\n int g = 0;\r\n while (g < 10) {\r\n if(Occur.get(g) != null) {\r\n int kallen = Occur.get(g);\r\n if(kallen >= h)\r\n {\r\n System.out.print(\"* \");\r\n }\r\n else\r\n {\r\n System.out.print(\" \");\r\n }\r\n }\r\n else\r\n {\r\n System.out.print(\" \");\r\n }\r\n g++;\r\n }\r\n System.out.print(\"\\n\");\r\n h--;\r\n }\r\n System.out.println(\"================================================\");\r\n System.out.print(\"| N |\");\r\n while ( u < 10 ) {\r\n System.out.print(\" \"+ u );\r\n u++;\r\n }\r\n System.out.println(\"\\n================================================\");\r\n }", "private static void insertTimeSeriesOneDim(final ScriptEngine engine,\r\n final DataArray data) throws Exception {\r\n List<DataEntry> time = data.getDate();\r\n int freq = TimeUtils.getFrequency(time);\r\n List<Double> doubleList = data.getDouble();\r\n double[] doubleArray = new double[doubleList.size()];\r\n for (int i = 0; i < doubleList.size(); i++) {\r\n doubleArray[i] = doubleList.get(i);\r\n }\r\n engine.put(\"my_double_vector\", doubleArray);\r\n engine.eval(\"ts_0 <- ts(my_double_vector, frequency = \"\r\n + freq + \")\");\r\n }", "public CanvasHistogramDouble(String canvasName, int canvasHeight, int canvasWidth, ChartDataHistogramDouble textHistData, String xText) {\r\n\t\tsuper(canvasName, canvasHeight, canvasWidth, textHistData);\r\n\t\t_xAxisTitle = xText;\r\n\t}", "public static void main(String[] args) {\n String charArray = \"aBbCccDdddeFfGggHhhhXYZ\";\n System.out.println(\"Histogram for the word entered.\");\n System.out.println(Arrays.toString(letterHist(charArray)));\n\n String numberArray = \"0123456789\";\n System.out.println(\"\\nHistogram for the number entered.\");\n System.out.println(Arrays.toString(numberHeist(numberArray)));\n }", "public void createHistogramItem(String name, List list, BinDataSource source) {\n stats.createHistogramItem(name, list, source);\n plot.addLegend(dataset++, name);\n }", "public double[] percentiles() {\n return values;\n }", "public OpenHistogram(String title, int numBins, long lowerBound) {\n super(title);\n stats = new OpenHistogramStat(numBins, lowerBound);\n this.setBars(.5, .2);\n this.setXRange(0, numBins - 1);\n }", "public static String histogram(ArrayList<Integer> frequency)\r\n {\r\n int maxFrequency;\r\n int starRepresent;\r\n maxFrequency = 0;\r\n \r\n for (int i = 0; i < frequency.size() -1; i++)\r\n {\r\n if (frequency.get(i) > maxFrequency)\r\n maxFrequency = frequency.get(i);\r\n }\r\n \r\n starRepresent = maxFrequency / 10;\r\n \r\n System.out.printf(\"%10s\", \"Frequency Distrubution\");\r\n System.out.println();\r\n System.out.printf(\"%10s\", \"( max freq is \" + maxFrequency + \")\");\r\n System.out.println();\r\n \r\n for (int i = 10; i > 0; i--)\r\n {\r\n for (int index = 0; index <= frequency.size() - 1; index++)\r\n {\r\n if (frequency.get(index) / starRepresent >= i)\r\n System.out.print(\"* \");\r\n else\r\n System.out.print(\" \");\r\n }\r\n System.out.print(\"\\n\");\r\n }\r\n return \"\";\r\n }", "private ArrayList<Entry> setYAxisValues(){\n ArrayList<Entry> yVals = new ArrayList<Entry>();\n for (int z = 0; z < 235; z++) {\n yVals.add(new Entry((float)graphArray[z], z));\n }\n return yVals;\n }", "public void transform(double[] x) {\r\n int i,j;\r\n double sumWindow=nn*nn;\r\n\r\n System.arraycopy(x,0,data,1,n);\r\n if(winNum>0) {\r\n for(i=0,j=1;i<nn;i++) {\r\n data[j]=data[j]*winMult[i];\r\n j++;\r\n data[j]=data[j]*winMult[i];\r\n j++;\r\n sumWindow=sumWindow+winMult[i]*winMult[i];\r\n }\r\n }\r\n/* Test to plot windowed function\r\n nSpectrum++;\r\n for(i=0,j=0;i<nn;i++) {\r\n x[j]=i;\r\n j++;\r\n x[j]=data[j];\r\n j++;\r\n }\r\n if(ncurve>=0) ncurve = graph.deleteAllCurves();\r\n ncurve = graph.addCurve(x,nn,Color.blue);\r\n graph.paintAll=true;\r\n graph.repaint();\r\n*/\r\n four1(data,nn,1);\r\n nSpectrum++;\r\n x[0]=0;\r\n spectrum[0]+=(data[0]*data[0]+data[1]*data[1])/sumWindow;\r\n for(i=1,j=2;i<nn/2;i++) {\r\n x[j]=i*scale;\r\n j++;\r\n spectrum[i]+=2.*(data[j]*data[j]+data[j+1]*data[j+1])/sumWindow;\r\n j++;\r\n }\r\n x[j]=(nn/2)*scale;\r\n j++;\r\n spectrum[nn/2]+=(data[j]*data[j]+data[j+1]*data[j+1])/sumWindow;\r\n for(i=0,j=1;i<=nn/2;i++) {\r\n x[j]=0.434*Math.log(floor+spectrum[i]/nSpectrum);\r\n j+=2;\r\n }\r\n }", "private CounterDistribution distribution(long... values) {\n CounterDistribution dist = CounterDistribution.empty();\n for (long value : values) {\n dist = dist.addValue(value);\n }\n\n return dist;\n }", "public UniqueDataPoint(double value) {\r\n\t\tsuper(value);\r\n\t\tthis.uniqueId = uniqueIdCount++;\r\n\t}", "public double[] getRange();", "public void generateBarChart(float[] act, float[] act1)\n {\n\n HorizontalBarChart barChart= (HorizontalBarChart) findViewById(R.id.chart);\n /*\n ArrayList<BarEntry> entries = new ArrayList<>();\n entries.add(new BarEntry(4f, 0));\n entries.add(new BarEntry(8f, 1));\n entries.add(new BarEntry(6f, 2));\n entries.add(new BarEntry(12f, 3));\n entries.add(new BarEntry(18f, 4));\n entries.add(new BarEntry(10f, 6));\n entries.add(new BarEntry(14f, 7));\n entries.add(new BarEntry(2f, 5));\n\n BarDataSet dataset1 = new BarDataSet(entries, \"# of Calls\");\n */\n\n ArrayList<String> labels = new ArrayList<String>();\n labels.add(\"Food\");\n labels.add(\"Cloth\");\n labels.add(\"Travelling\");\n labels.add(\"Stationary\");\n labels.add(\"Furniture\");\n labels.add(\"Medicine\");\n labels.add(\"Bill\");\n labels.add(\"Utensils\");\n\n\n /* for create Grouped Bar chart*/\n ArrayList<BarEntry> group1 = new ArrayList<>();\n group1.add(new BarEntry(act1[0], 0));\n group1.add(new BarEntry(act1[1], 1));\n group1.add(new BarEntry(act1[2], 2));\n group1.add(new BarEntry(act1[3], 3));\n group1.add(new BarEntry(act1[4], 4));\n group1.add(new BarEntry(act1[5], 5));\n group1.add(new BarEntry(act1[6], 6));\n group1.add(new BarEntry(act1[7], 7));\n\n ArrayList<BarEntry> group2 = new ArrayList<>();\n group2.add(new BarEntry(act[0], 0));\n group2.add(new BarEntry(act[1], 1));\n group2.add(new BarEntry(act[2], 2));\n group2.add(new BarEntry(act[3], 3));\n group2.add(new BarEntry(act[4], 4));\n group2.add(new BarEntry(act[5], 5));\n group2.add(new BarEntry(act[6], 6));\n group2.add(new BarEntry(act[7], 7));\n\n BarDataSet barDataSet1 = new BarDataSet(group1, \"Planned Amount\");\n //barDataSet1.setColor(Color.rgb(0, 155, 0));\n barDataSet1.setColor(getResources().getColor(R.color.darkgreen));\n\n BarDataSet barDataSet2 = new BarDataSet(group2, \"Actual Amount\");\n barDataSet2.setColor(getResources().getColor(R.color.purered));\n\n\n ArrayList<IBarDataSet> dataset = new ArrayList<>();\n dataset.add(barDataSet1);\n dataset.add(barDataSet2);\n /**/\n\n BarData data = new BarData(labels,dataset);\n// // dataset.setColors(ColorTemplate.COLORFUL_COLORS); //\n barChart.setData(data);\n barChart.animateY(5000);\n barChart.setDescription(\"Expense Graph\");\n barChart.setDescriptionPosition(2f, 2f);\n\n }", "public ProbabilityChart(int nEWords, int nFWords){\r\n\t\tthis.chart = new double[nEWords][nFWords];\r\n\t}", "public void initHistogram() {\n\t\th1.setString(Utilities.hist1String);\r\n\t\th2.setString(Utilities.hist2String);\r\n\t\th1.setData(results);\r\n\t\th2.setData(results);\r\n\r\n\t\t\r\n\r\n\t}", "Histogram() {\n type = name = \"\";\n feature_index = -1;\n histogram_features = null;\n histogram_proportions = null;\n histogram_counts = null;\n }", "public void createHistogramItem(String name, List list,\n String listObjMethodName,\n int maxIntegerDigits, int maxFractionDigits) {\n stats.createHistogramItem(name, list, listObjMethodName, maxIntegerDigits,\n maxFractionDigits);\n plot.addLegend(dataset++, name);\n }", "public ArrayList<ArrayList<Double>> getXValues(){\n\t\treturn totalIncrements;\n\t}", "public static int[] histogram (int[] ages)\n {\n \t// If ages array has no elements, return an array that has one element of 0 to show that no ages were contained in the ages array\n \t\n \tif(ages.length == 0)\n \t{\n \t\tint[] agesCount = new int[1];\n \t\tagesCount[0] = 0;\n \t\treturn agesCount;\n \t}\n \t\n \t// Find maximum age in the ages array to then determine size of the list that will be returned\n \t\n \tint maxAge = ages[0];\n \t\n \tfor(int i = 1; i < ages.length; i++)\n \t\tif(ages[i] > maxAge)\n \t\t\tmaxAge = ages[i];\n \t\n \tint arraySize = maxAge + 1;\n \t\n \t// Create the array that will be returned based on the size determined above\n \t\n \tint[] agesCount = new int[arraySize];\n \t\n \t// Loop through the ages array and increment the agesCount array depending on the values taken from the ages array\n \t\n \tfor (int temp : ages)\n\t\t\tagesCount[temp] += 1;\n \t\n return agesCount; // You will write this method as part of programming assignment #7. \n }", "private static JFreeChart createChart(CategoryDataset dataset) {\n\t\t//the title of the chart depending of the attributes chosen by the user\n\t\tif (queryNumber==0) {domainLabel=\"Per day\";}\n\t\telse if (queryNumber==1) {domainLabel=\"Per hour\";}\n\t\telse if (queryNumber==2) {domainLabel=\"Per minute\";}\n\t\t\n\t\t// setting the title \n\t\tString rangeLabel=\"Average (ms)\";\n\t\t// create the chart...\n\t\tJFreeChart chart = ChartFactory.createBarChart(\n\t\t\t\t\"Static\", // chart title\n\t\t\t\tdomainLabel, // domain axis label\n\t\t\t\trangeLabel, // range axis label\n\t\t\t\tdataset, // data\n\t\t\t\tPlotOrientation.VERTICAL, // orientation\n\t\t\t\tfalse, // include legend\n\t\t\t\ttrue, // tooltips\n\t\t\t\tfalse // URLs\n\t\t\t\t);\n\t\t\n\t\t//setting the title preferences and format\n\t\tchart.getTitle().setFont(fontStatic);\n\t\tchart.getTitle().setPaint(Color.red);\n\t\tchart.setBackgroundPaint(Color.white);\n\t\tCategoryPlot plot = chart.getCategoryPlot();\n\t\tplot.setBackgroundPaint(Color.lightGray);\n\t\tplot.setDomainGridlinePaint(Color.white);\n\t\tplot.setDomainGridlinesVisible(true);\n\t\tplot.setRangeGridlinePaint(Color.white);\n\t\tfinal NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();\n\t\tchart.getCategoryPlot().getRangeAxis().setLabelPaint(Color.RED);\n\t\tchart.getCategoryPlot().getDomainAxis().setLabelPaint(Color.RED);\n\t\trangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n\t\tBarRenderer renderer = (BarRenderer) plot.getRenderer();\n\t\trenderer.setDrawBarOutline(false);\n\t\tfor (int i =0;i<25;i++) renderer.setSeriesPaint(i, Color.BLUE);\n\t\treturn chart;\n\t}", "public HistogramValuesSourceBuilder interval(double interval) {\n if (interval <= 0) {\n throw new IllegalArgumentException(\"[interval] must be greater than 0 for [histogram] source\");\n }\n this.interval = interval;\n return this;\n }", "public XYData(double x[], float y[], double resolution)\n\t{\n\t\tthis.resolution = resolution;\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tincreasingX = true;\n\t\tnSamples = (x.length < y.length) ? x.length : y.length;\n\t\tif (nSamples > 0)\n\t\t{\n\t\t\txMin = xMax = x[0];\n\t\t\tfor (int i = 1; i < x.length; i++)\n\t\t\t{\n\t\t\t\tif (x[i - 1] > x[i])\n\t\t\t\t{\n\t\t\t\t\tincreasingX = false;\n\t\t\t\t}\n\t\t\t\tif (x[i] > xMax)\n\t\t\t\t\txMax = x[i];\n\t\t\t\tif (x[i] < xMin)\n\t\t\t\t\txMin = x[i];\n\t\t\t}\n\t\t}\n\t}", "public void put(double value) {\n int k = (int) ((value - minValue) / binDiff + 1);\n if (k < 0) k = 0;\n if (k >= bins.length) k = bins.length - 1;\n bins[k]++;\n }", "public ScatterPlotChart(float[][] data, \n ValueAxis domainAxis, ValueAxis rangeAxis) {\n\t\t \n\t\tsuper(data,domainAxis,rangeAxis);\n\t\tsetPaint(Color.BLACK);\n\t\t\n }", "public static void main(String[] args) {\n HistogramGenerator h = new HistogramGenerator();\n if (args.length != 1) {\n System.err.println(\"Invalid number of arguments given!\\n\" +\n \"Expected only one: the filepath of the grades file \");\n System.exit(1);\n }\n int[] grades = h.scanGrades(args[0]);\n int[] frequencies = h.countGrades(grades);\n h.generateChart(frequencies);\n }", "public void histNormalize() {\n\n double max = max();\n double min = min();\n max = max - min;\n for (int i = 0; i < pixelData.length; i++) {\n double value = pixelData[i] & 0xff;\n pixelData[i] = (byte) Math.floor((value - min) * 255 / max);\n }\n }", "@Test\n public void test75() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n DatasetRenderingOrder datasetRenderingOrder0 = combinedRangeCategoryPlot0.getDatasetRenderingOrder();\n boolean boolean0 = combinedRangeCategoryPlot0.isRangeCrosshairLockedOnData();\n Line2D.Double line2D_Double0 = new Line2D.Double(5.0E9, 5.0E9, 5.0E9, 5.0E9);\n combinedRangeCategoryPlot0.clearRangeAxes();\n boolean boolean1 = combinedRangeCategoryPlot0.isDomainGridlinesVisible();\n combinedRangeCategoryPlot0.setDomainAxis(1, (CategoryAxis) null, false);\n PlotOrientation plotOrientation0 = PlotOrientation.VERTICAL;\n combinedRangeCategoryPlot0.setOrientation(plotOrientation0);\n CategoryItemRenderer categoryItemRenderer0 = combinedRangeCategoryPlot0.getRenderer();\n combinedRangeCategoryPlot0.clearAnnotations();\n StyleConstants styleConstants0 = (StyleConstants)AttributeSet.NameAttribute;\n HistogramDataset histogramDataset0 = new HistogramDataset();\n int[] intArray0 = new int[7];\n intArray0[0] = 1;\n intArray0[1] = 1;\n intArray0[2] = 1;\n intArray0[3] = 1;\n intArray0[4] = 1;\n intArray0[5] = 1;\n intArray0[6] = 1;\n SubSeriesDataset subSeriesDataset0 = new SubSeriesDataset((SeriesDataset) histogramDataset0, intArray0);\n DatasetChangeEvent datasetChangeEvent0 = new DatasetChangeEvent((Object) styleConstants0, (Dataset) subSeriesDataset0);\n combinedRangeCategoryPlot0.datasetChanged(datasetChangeEvent0);\n }", "public static void sort(int[] v) {\n\t\tint biggest_value=v[0];\n\t\tint lowest_value =v[0];\n\t\t\n\t\tfor(int i=0;i<v.length;i++) {\n\t\t\tif(v[i]>biggest_value) {\n\t\t\t\tbiggest_value = v[i];\n\t\t\t}\n\t\t\tif(v[i]<lowest_value) {\n\t\t\t\tlowest_value = v[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Define a amplitude dos valores existentes no vetor\n\t\tint range = biggest_value - lowest_value;\n\t\t\n\t\t//Cria o vetor de frequência com o tamanho da amplitude+1, para que contenha todos os\n\t\t//valores existentes no vetor\n\t\tint[] frequency = new int[range+1];\n\t\t\n\t\t//Cria um normalizador, que será responsável por normalizar o posicionamento dos valores\n\t\t//no vetor de frequência\n\t\tint normalizer = lowest_value*(-1);\n\t\t\n\t\t//Faz a contagem de elementos existentes no vetor de entrada, salvando suas ocorrências\n\t\t//no vetor de frequência\n\t\tfor(int i=0;i<v.length;i++) {\n\t\t\tfrequency[normalizer+v[i]] += 1;\n\t\t}\n\t\t\n\t\t//Torna o vetor de frequência em cumulativo\n\t\tfor(int i=1;i<frequency.length;i++) {\n\t\t\tfrequency[i]+=frequency[i-1];\n\t\t}\n\t\t\n\t\t//Cria o vetor que será o ordenado\n\t\tint[] ordered_array = new int[v.length];\n\t\t\n\t\t//Distribui valores de frequência no array ordenado\n\t\tfor(int i=v.length-1;i>-1;i--) {\n\t\t\tordered_array[frequency[v[i]+normalizer]-1] = v[i];\n\t\t\tfrequency[v[i]+normalizer]-=1;\n\t\t}\n\t\t\n\t\t//Redefine v pelo vetor ordenado\n\t\tfor(int i=0;i<v.length;i++) {\n\t\t\tv[i]=ordered_array[i];\n\t\t}\n\t}", "public abstract double[] getLowerBound();", "@Test\n public void test28() throws Throwable {\n double[][] doubleArray0 = new double[4][3];\n double[] doubleArray1 = new double[0];\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[1];\n doubleArray2[0] = 4394.831255689545;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[5];\n doubleArray3[0] = 4394.831255689545;\n doubleArray3[1] = 4394.831255689545;\n doubleArray3[2] = 4394.831255689545;\n doubleArray3[3] = 4394.831255689545;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[3];\n doubleArray4[0] = 4394.831255689545;\n doubleArray4[1] = 4394.831255689545;\n doubleArray0[3] = doubleArray4;\n DefaultIntervalCategoryDataset defaultIntervalCategoryDataset0 = new DefaultIntervalCategoryDataset(doubleArray0, doubleArray0);\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D(\"org.jfree.data.xy.DefaultWindDataset\");\n Month month0 = new Month();\n ZoneOffset zoneOffset0 = ZoneOffset.MAX;\n ZoneInfo zoneInfo0 = (ZoneInfo)TimeZone.getTimeZone((ZoneId) zoneOffset0);\n PeriodAxis periodAxis0 = new PeriodAxis(\"'Ypi)?q\", (RegularTimePeriod) month0, (RegularTimePeriod) month0, (TimeZone) zoneInfo0);\n LayeredBarRenderer layeredBarRenderer0 = new LayeredBarRenderer();\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) defaultIntervalCategoryDataset0, (CategoryAxis) categoryAxis3D0, (ValueAxis) periodAxis0, (CategoryItemRenderer) layeredBarRenderer0);\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo();\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo(chartRenderingInfo0);\n CategoryItemRendererState categoryItemRendererState0 = new CategoryItemRendererState(plotRenderingInfo0);\n StandardEntityCollection standardEntityCollection0 = (StandardEntityCollection)categoryItemRendererState0.getEntityCollection();\n ChartRenderingInfo chartRenderingInfo1 = new ChartRenderingInfo((EntityCollection) standardEntityCollection0);\n PlotRenderingInfo plotRenderingInfo1 = chartRenderingInfo1.getPlotInfo();\n categoryPlot0.zoomRangeAxes(4394.831255689545, plotRenderingInfo1, (Point2D) null, false);\n }", "private void plotEntries() {\n\t\tfor (int i = 0; i < entries.size(); i++) {\n\t\t\tdrawLine(i);\n\t\t}\n\t}", "ArrayList<JFreeChart> generateAll();", "public static void barChart(String title, int[] arr) \n {\n CategoryChartBuilder builder = new CategoryChartBuilder();\n builder.width(800);\n builder.height(600);\n builder.title(\"Int array values\");\n builder.xAxisTitle(\"Index\");\n builder.yAxisTitle(\"Number\");\n\n // Add data and title to the chart\n CategoryChart chart = builder.build();\n chart.addSeries(title, null, arr);\n\n // display the chart:\n new SwingWrapper(chart).displayChart();\n }", "@Override\r\n\tpublic void setDataSeries(List<Double> factValues) {\n\r\n\t}", "public void createHistogramItem(String name, List list, Object target,\n String methodName, int maxIntegerDigits,\n int maxFractionDigits) {\n BinDataSource bds = createBinDataSource(target, methodName);\n createHistogramItem(name, list, bds, maxIntegerDigits, maxFractionDigits);\n }", "public static void main(String[] args) {\n\r\n\t\tint arr[]={2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12};\r\n\t\tMap<Integer,Data> map = new HashMap<>();\r\n\t\tfor(int a :arr)\r\n\t\t{\r\n\t\t\tif(map.containsKey(a))\r\n\t\t\t{\r\n\t\t\t\tmap.get(a).incrementFrequency();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmap.put(a, new Data(a));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSet<Data> sortedData = new TreeSet<>(map.values());\r\n\t\tList<Integer> result = new ArrayList<>();\r\n\t\tfor(Data d : sortedData)\r\n\t\t{\r\n\t\t\tfor(int i=0;i<d.frequency;i++)\r\n\t\t\t\tresult.add(d.number);\r\n\t\t}\r\n\t\tSystem.out.println(result);\r\n\t}", "private void writeHistograms(PrintWriter writer) {\n Set set = tokenSizes.entrySet();\n String delimiter = \"\\t\";\n double amount = 0;\n\t\tdouble histogramAmount = 0;\n\n // Use of Iterator for the while loop that is no longer being used.\n // Iterator iterator = set.iterator();\n\n // Implement the calculateMaximumAmount method for PROJECT 3 CORRECTION\n for(Map.Entry<Integer, Integer> entry : tokenSizes.entrySet()) {\n amount = calculateMaximumAmount();\n\t\t\thistogramAmount = (double) entry.getValue() * amount;\n writer.println(entry.getKey() + delimiter + printHistogram(histogramAmount));\n } \n\n /**\n * This is a while loop I used in project 1 but Paula told me to use an \n * enhanced for loop instead. \n *\n * while (iterator.hasNext()) {\n * Map.Entry me = (Map.Entry) iterator.next();\n * int tokenValue = (int) me.getValue();\n * writer.println(me.getKey() + \"\\t\" + printHistogram(tokenValue));\n * }\n */\n }", "public void value(double value) {\n client.histogram(name, value, tags);\n }", "public LinearGaussian(double[] values) {\n\t\tsuper();\n\t\tthis.values = values;\n\t\t\n\t\t/*calculate mean*/\n\t\tmean = Utilities.averageValueOfArray(values);\n\t\tvariance = Utilities.averageValueOfArray(varianceArray());\n\t}", "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 }", "private void generateIntervalArray(){\n BigDecimal maximumValue = this.getTfMaximumInterval();\n BigDecimal minimumValue = this.getTfMinimumInterval();\n BigDecimal stepValue = this.getTfStepInterval();\n \n intervalArray = new ArrayList<BigDecimal>();\n BigDecimal step = maximumValue;\n \n //Adiciona os valores \"inteiros\"\n while(step.doubleValue() >= minimumValue.doubleValue()){\n intervalArray.add(step);\n step = step.subtract(stepValue);\n }\n }", "public static void arrayAttributes(){\n int[] x= {1, 5, 10, -2};\n int[] y={0,0,0};\n int sum=0;\n int avg=0;\n int max=x[0];\n int min=x[0];\n for (int i =0; i<x.length; i++){\n sum=sum+x[i];\n if (x[i]>max){\n max=x[i];\n }\n if (x[i]<min){\n min=x[i];\n }\n }\n avg=sum/x.length;\n y[0]=max;\n y[1]=min;\n y[2]=avg;\n for (int j=0; j<y.length; j++){\n System.out.println(y[j]); \n }\n}" ]
[ "0.68253255", "0.61540514", "0.6126238", "0.61153966", "0.60644364", "0.60301936", "0.60136616", "0.59655106", "0.5911255", "0.58851117", "0.5883047", "0.57694525", "0.56178945", "0.5563282", "0.55259347", "0.5500827", "0.5488281", "0.5448269", "0.53946877", "0.5379927", "0.53755176", "0.53686273", "0.5357915", "0.5356308", "0.5356043", "0.53245854", "0.5321885", "0.5296699", "0.5291941", "0.5281918", "0.525696", "0.5247037", "0.5230829", "0.51349556", "0.5100074", "0.5092589", "0.50794286", "0.5061298", "0.50396013", "0.5027228", "0.5012284", "0.5001627", "0.4955886", "0.49521905", "0.4949235", "0.4949121", "0.49312955", "0.4903978", "0.4900039", "0.4896505", "0.48888022", "0.488725", "0.48832953", "0.48765212", "0.4855426", "0.48319757", "0.4831703", "0.4828268", "0.48157766", "0.48030508", "0.4802909", "0.478354", "0.47743794", "0.47683403", "0.47584045", "0.47494796", "0.4748578", "0.4747434", "0.47451904", "0.47310737", "0.4730297", "0.47211915", "0.47103366", "0.47049057", "0.469601", "0.4695546", "0.46811548", "0.4677525", "0.46732298", "0.46674392", "0.46650594", "0.4664608", "0.4664445", "0.46528745", "0.46526605", "0.4651034", "0.46465433", "0.46445504", "0.4643132", "0.46189243", "0.46154362", "0.46113282", "0.4603669", "0.45865533", "0.45824888", "0.45818228", "0.4577354", "0.45752287", "0.45555198", "0.45555055" ]
0.65920216
1
A function that creates a histogram from a set of values in a double[] on a dynamically sized xaxis
public static void plotHistogram(double[] x, String titleName, String fileName) { try{ HistogramDataset series = new HistogramDataset(); series.addSeries("default", x, 15); JFreeChart chart = ChartFactory.createHistogram(titleName, "Risk Index Values", null, series, PlotOrientation.VERTICAL, false, false, false); FileOutputStream fo = new FileOutputStream(fileName); EncoderUtil.writeBufferedImage(chart.createBufferedImage(1280, 1024), ImageFormat.PNG, fo); fo.close(); } catch(Exception e){ e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "JFreeChart generateHist();", "public static void plotHistogramWithFixedRange(double[] x, String titleName, String fileName, double min, double max) { \n try{\n \n \n HistogramDataset series = new HistogramDataset(); \n \n series.addSeries(\"default\", x, 15);\n \n \n NumberAxis yaxis = new NumberAxis(\"Frequency\");\n \n NumberAxis xaxis = new NumberAxis(\"Risk Index Value\");\n xaxis.setRange(min, max);\n xaxis.setLabelFont(new Font(\"Arial\", Font.PLAIN, 24));\n xaxis.setTickLabelFont(new Font(\"Arial\", Font.PLAIN, 18));\n \n XYBarRenderer rend = new XYBarRenderer();\n rend.setSeriesPaint(0, Color.black);\n rend.setSeriesVisibleInLegend(0, false);\n rend.setBaseItemLabelFont(new Font(\"Arial\", Font.PLAIN, 40));\n \n XYPlot p = new XYPlot(series, xaxis, yaxis, rend);\n p.setOrientation(PlotOrientation.VERTICAL);\n p.setRangeGridlinesVisible(false);\n p.setDomainGridlinesVisible(false);\n \n \n JFreeChart chart = new JFreeChart(titleName, new Font(\"Arial\", Font.PLAIN, 24), p, false);\n \n \n FileOutputStream fo = new FileOutputStream(fileName);\n EncoderUtil.writeBufferedImage(chart.createBufferedImage(1280, 1024), ImageFormat.PNG, fo);\n fo.close();\n \n \n \n \n \n \n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "public ArrayHistogram1D(int numValues)\n\t{\n\t\tif (numValues < 1)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"Must have at least one entry; numValues=\" + numValues);\n\t\t}\n\t\tdata = new int[numValues];\n\t}", "public void recalcHistogram();", "public static void main(String[] args)\n {\n ArrayList<DataPoint> sampleData = new ArrayList<DataPoint>();\n Histogram hist = new Histogram(sampleData, \"title\", \"idependant\", \"independant\");\n\n hist.addData(new DataPoint(1));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(3));\n hist.addData(new DataPoint(4));\n hist.addData(new DataPoint(5));\n hist.addData(new DataPoint(6));\n hist.addData(new DataPoint(7));\n hist.addData(new DataPoint(8));\n hist.addData(new DataPoint(9));\n hist.addData(new DataPoint(50));\n\n\n JFrame frame = new JFrame(\"Histogram\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\n\n\n frame.add(hist);\n frame.setSize(475,475);\n frame.setVisible(true);\n\n\n }", "public static Histogram createFrequencyTable(List<Double> values, double classWidth, double start,\r\n double stop) {\r\n Histogram histogram = new Histogram(start, stop, (int) ((stop - start) / classWidth));\r\n for (Double value : values) {\r\n histogram.add(value);\r\n }\r\n assert histogram.getSumFreq() == values.size() : \"Number of items in bins does not correspond with total number of items\";\r\n \r\n return histogram;\r\n }", "private void computeHistogramBins() {\r\n int nBins = (int) Math.ceil(hismax / binWidth);\r\n histoBins = new double[nBins];\r\n for (int i = 0; i < nBins; i++) {\r\n histoBins[i] = binWidth * (double) i + binWidth;\r\n }\r\n }", "public double[] histogram() {\n int[][] data = toArray();\n double[] ans = new double[256];\n int totalSize = data.length * data[0].length;\n\n for (int i = 0; i < data.length; i++) {\n for (int j = 0; j < data[i].length; j++) {\n ans[data[i][j]]++;\n }\n }\n for (int i = 0; i < ans.length; i++) {\n ans[i] = ans[i] / totalSize;\n }\n return ans;\n }", "int xBins();", "public HistogramTest(String title) {\r\n super(title);\r\n IntervalXYDataset dataset = createDataset();\r\n JFreeChart chart = createChart(dataset);\r\n ChartPanel chartPanel = new ChartPanel(chart);\r\n chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));\r\n chartPanel.setMouseZoomable(true, false);\r\n setContentPane(chartPanel);\r\n }", "int yBins();", "private Histogram(int[] bins, double minValue, double maxValue) {\n this(bins.length - 2, minValue, maxValue);\n System.arraycopy(bins, 0, this.bins, 0, bins.length);\n }", "public static void graph(){\n\t\t double[][] valuepairs = new double[2][];\n\t\t valuepairs[0] = mutTotal; //x values\n\t\t valuepairs[1] = frequency; //y values\n\t\t DefaultXYDataset set = new DefaultXYDataset();\n\t\t set.addSeries(\"Occurances\",valuepairs); \n\t\t XYBarDataset barset = new XYBarDataset(set, .8);\n\t\t JFreeChart chart = ChartFactory.createXYBarChart(\n\t\t \"Mutation Analysis\",\"Number of Mutations\",false,\"Frequency\",\n\t\t barset,PlotOrientation.VERTICAL,true, true, false);\n\t\t JFrame frame = new JFrame(\"Mutation Analysis\");\n\t\t frame.setContentPane(new ChartPanel(chart));\n\t\t frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t frame.pack();\n\t\t frame.setVisible(true);\n\t\t }", "public void computeHistogram() {\n\t}", "HistogramInterface createHistogram(String name);", "Series<double[]> makeSeries(int dimension);", "public HistogramDataSet getData();", "private void drawHistogram(int n, double left, double right, double[] inputStream) {\n prepareCanvas(left, right);\n doDraw(n, left, right, inputStream);\n drawGrid(left, right);\n }", "private void setupHistogram() {\n\n // Create chart using the ChartFactory.\n chart = MimsChartFactory.createMimsHistogram(\"\", \"Pixel Value\", \"\", null, PlotOrientation.VERTICAL, true, true, false);\n chart.setBackgroundPaint(this.getBackground());\n chart.removeLegend();\n\n // Set the renderer.\n MimsXYPlot plot = (MimsXYPlot) chart.getPlot();\n XYBarRenderer renderer = (XYBarRenderer) plot.getRenderer();\n renderer.setDrawBarOutline(false);\n renderer.setShadowVisible(false);\n renderer.setBarPainter(new StandardXYBarPainter());\n\n // Listen for key pressed events.\n KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new KeyEventDispatcher() {\n public boolean dispatchKeyEvent(KeyEvent e) {\n if (e.getID() == KeyEvent.KEY_PRESSED && thisIsVisible() && ui.isActive()) {\n chartPanel.keyPressed(e);\n }\n return false;\n }\n });\n\n // Movable range and domain.\n plot.setDomainPannable(true);\n plot.setRangePannable(true);\n\n chartPanel = new MimsChartPanel(chart);\n chartPanel.setSize(350, 225);\n jPanel1.add(chartPanel);\n }", "public void generateChart(int[] dataValues) {\n\t\t/*\n\t\t * The XYSeriesCollection object is a set XYSeries series (dataset) that\n\t\t * can be visualized in the same chart\n\t\t */\n\t\tXYSeriesCollection dataset = new XYSeriesCollection();\n\t\t/*\n\t\t * The XYSeries that are loaded in the dataset. There might be many\n\t\t * series in one dataset.\n\t\t */\n\t\tXYSeries data = new XYSeries(\"random values\");\n\n\t\t/*\n\t\t * Populating the XYSeries data object from the input Integer array\n\t\t * values.\n\t\t */\n\t\tfor (int i = 0; i < dataValues.length; i++) {\n\t\t\tdata.add(i, dataValues[i]);\n\t\t}\n\n\t\t// add the series to the dataset\n\t\tdataset.addSeries(data);\n\n\t\tboolean legend = false; // do not visualize a legend\n\t\tboolean tooltips = false; // do not visualize tooltips\n\t\tboolean urls = false; // do not visualize urls\n\n\t\t// Declare and initialize a createXYLineChart JFreeChart\n\t\tJFreeChart chart = ChartFactory.createXYLineChart(\"Grades Histogram\", \"Grades\", \"Frequency\", dataset,\n\t\t\t\tPlotOrientation.VERTICAL, legend, tooltips, urls);\n\n\t\t/*\n\t\t * Initialize a frame for visualizing the chart and attach the\n\t\t * previously created chart.\n\t\t */\n\t\tChartFrame frame = new ChartFrame(\"First\", chart);\n\t\tframe.pack();\n\t\t// makes the previously created frame visible\n\t\tframe.setVisible(true);\n\t}", "private ArrayList<String> setXAxisValues(){\n ArrayList<String> xVals = new ArrayList<String>();\n for (int z = 0; z < 235; z++) {\n xVals.add(Integer.toString(waveArray[z]));\n }\n return xVals;\n }", "private String histogram() {\n\t\tStringBuilder sb = new StringBuilder(\"[\");\n\t\t\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tint size = 0;\n\t\t\tfor (int j = 0; j < myBuckets.size(); j++) {\n\t\t\t\tif (myBuckets.get(j).size() == i) size++;\n\t\t\t}\n\t\t\tsb.append(size + \", \");\n\t\t}\n\t\tsb.replace(sb.length() - 2, sb.length(), \"]\");\n\t\treturn sb.toString();\n\t}", "private double[] computeHistrogram(ArrayList<Feature> freature, String keyID) {\r\n\r\n int nBins = (int) Math.ceil(hismax / binWidth);\r\n ArrayList<Double> values = FeatureOps.getSpecifiedFeatureNumericalPropertyAsArrayList(freature, keyID);\r\n double[] d1 = List2Prims.doubleFromDouble(values);\r\n\r\n double[] hist = new double[nBins];\r\n\r\n int bin;\r\n for (int i = 0; i < d1.length; i++) {\r\n bin = (int) Math.floor((double) nBins * (d1[i] / hismax));// \r\n bin = Math.min(nBins - 1, bin);\r\n hist[bin]++;\r\n }\r\n return hist;\r\n }", "public HistogramBuilder nBinsX(int bins) {\n this.nBinsX = bins;\n return this;\n }", "public HistogramDataGroup getHistogramData();", "public Histogram makeIntegratedHistogram() {\n int[] inBins = new int[bins.length];\n inBins[0] = bins[0];\n for (int i = 1; i < inBins.length; i++) {\n inBins[i] = inBins[i - 1] + bins[i];\n }\n return new IntegratedHistogram(inBins, minValue, maxValue);\n }", "private double[] extractHistogram(int[] imagePixels){\n\t\tdouble[] histogram=new double[LEVELS_NUMBER];\n\t\tfor (int j = 0; j < imagePixels.length&&start; j++) {\n\t\t\thistogram[imagePixels[j]]++;\n\t\t}\n\t\treturn histogram;\n\t}", "public int[] getHistogram()\r\n {\r\n\treturn histogram;\r\n }", "public void drawHistograms(Graphics2D g, int x0, int y0, int w, int h)\n{\n double ymax = alldefs.histogram.yaxisMax;\n double ymin = alldefs.histogram.yaxisMin;\n\n for (int i = 0; i < histograms.length; i+=alldefs.histogram.barStack)\n {\n double v0 = 0;\n double v2 = 0;\n for (int j = 0; j < alldefs.histogram.barStack; j++)\n { \n double v = histograms[i + j]; \n if (v > 0)\n v0 += v;\n else\n v2 += v;\n }\n\n if (v0 > ymax) ymax = v0;\n if (v2 < ymin) ymin = v2;\n }\n\n if (alldefs.histogram.yaxisIncrement > 0)\n {\n double y = 0;\n if (ymax >= 0)\n {\n while (ymax > y)\n { y += alldefs.histogram.yaxisIncrement; }\n }\n else\n {\n while (ymax < y - alldefs.histogram.yaxisIncrement)\n { y -= alldefs.histogram.yaxisIncrement; }\n }\n ymax = y;\n\n y = 0;\n if (ymin >= 0)\n {\n while (ymin > y)\n { y += alldefs.histogram.yaxisIncrement; }\n }\n else\n {\n while (ymin < y)\n { y -= alldefs.histogram.yaxisIncrement; }\n }\n ymin = y;\n }\n\n FontMetrics fm = getFontMetrics(getFont());\n int ascent = fm.getAscent(); \n\n int yTop = 1 //space\n + ascent //font\n + 1; //space\n\n int yBottom = 4 //tic and overlapping line\n + ascent //font\n + 1 //space\n + ascent //font\n + 1; //space\n\n int xLeft = 1 //space\n + ascent //font\n + 1 //space\n + 0 //stringwidth placeholder\n + 4; //tic and overlapping line\n\n int xRight = 4; //spacing only\n\n int sw1 = \n fm.stringWidth(format.doublewithdecimals(ymin, alldefs.histogram.yaxisDecimals));\n int sw2 = \n fm.stringWidth(format.doublewithdecimals(ymax, alldefs.histogram.yaxisDecimals));\n\n xLeft += sw1 > sw2 ? sw1 : sw2;\n\n double ypix = 0;\n if (ymax > ymin)\n {\n g.setColor(Color.black);\n\n if (yTop + yBottom < h)\n {\n ypix = Math.abs(ymax - ymin) / (double)(h - yTop - yBottom);\n\n g.drawLine(xLeft, h - yBottom, xLeft, yTop);\n g.drawLine(xLeft + 1, h - yBottom, xLeft + 1, yTop);\n }\n else\n { ypix = Math.abs(ymax - ymin) / (double)1; }\n\n if (alldefs.histogram.yaxisIncrement > 0 && ypix > 0)\n {\n int j0 = yTop;\n int jn = h - yBottom - 1;\n\n int factor = 0;\n {\n int total;\n int size = jn - j0 + 1 - ascent;\n do\n {\n total = 0;\n factor++;\n\n double y = ymax - factor * alldefs.histogram.yaxisIncrement;\n while (y > ymin)\n {\n total += ascent;\n y -= factor * alldefs.histogram.yaxisIncrement;\n }\n } while (total > size);\n }\n\n double y = ymax;\n while (j0 <= jn)\n {\n String s = format.doublewithdecimals(y, alldefs.histogram.yaxisDecimals);\n int sw = fm.stringWidth(s);\n\n g.drawString(s, xLeft - sw - 4, j0 + ascent / 2 + 1);\n g.drawLine(xLeft, j0, xLeft - 4, j0);\n \n y -= factor * alldefs.histogram.yaxisIncrement;\n j0 = yTop + (int)((ymax - y) / ypix);\n }\n }\n else\n {\n String s = \n format.doublewithdecimals(ymax, alldefs.histogram.yaxisDecimals);\n int sw = fm.stringWidth(s);\n\n g.drawString(s, xLeft - sw - 4, yTop + ascent / 2 - 1);\n g.drawLine(xLeft, yTop, xLeft - 4, yTop);\n }\n\n if (alldefs.histogram.barTotal > 0)\n {\n int spacing = alldefs.histogram.barSpacing;\n int width = alldefs.histogram.barWidth;\n\n if (width <= 0)\n {\n width = (w - xLeft - xRight - alldefs.histogram.barTotal * spacing * 2) / alldefs.histogram.barTotal;\n }\n\n if (width <= 0)\n width = 1;\n\n int total = spacing * 2 + width;\n\n int xa = xLeft + 2;\n int xb = xa + alldefs.histogram.barTotal * total;\n int yb = h - yBottom;\n g.drawLine(xa - 2, yb, xb, yb);\n g.drawLine(xa - 2, yb - 1, xb, yb - 1);\n\n int yc = yTop + (int)(ymax / ypix);\n g.drawLine(xa - 2, yc, xb, yc);\n\n int idx = 0;\n for (int i = 0; i < alldefs.histogram.barTotal; i++)\n {\n int yT = yc;\n int yB = yc;\n for (int j = 0; j < alldefs.histogram.barStack; j++)\n {\n double v = histograms[idx++];\n int j2 = Math.abs((int)(v / ypix));\n if (j2 > 1)\n {\n g.setColor(alldefs.histogram.barColors[j]);\n\n if (v > 0)\n {\n yT -= j2;\n\n g.fillRect(xa + spacing, yT, width, j2);\n \n g.setColor(Color.black);\n g.drawRect(xa + spacing, yT, width, j2);\n }\n else\n {\n g.fillRect(xa + spacing, yB, width, j2);\n \n g.setColor(Color.black);\n g.drawRect(xa + spacing, yB, width, j2);\n\n yB += j2;\n }\n }\n } \n\n if (alldefs.histogram.barLabels != null \n && alldefs.histogram.barLabels.length \n == alldefs.histogram.barTotal)\n {\n String s = alldefs.histogram.barLabels[i];\n if (s != null)\n {\n g.drawLine(xa + total / 2, yb, xa + total / 2, yb + 4);\n \n int sw0 = fm.stringWidth(s) / 2;\n g.drawString(s, xa + total / 2 - sw0, yb + 4 + 1 + ascent);\n }\n }\n xa += total;\n }\n }\n }\n\n g.setColor(Color.black);\n\n //draw Titles\n if (alldefs.histogram.title != null)\n g.drawString(alldefs.histogram.title, xLeft, yTop - 1);\n\n if (alldefs.histogram.barTitle != null)\n g.drawString(alldefs.histogram.barTitle,\n w / 2,\n h - 1);\n\n if (alldefs.histogram.yaxisTitle != null)\n {\n g.rotate(Math.PI / -2.0, 1 + ascent, h / 2);\n g.drawString(alldefs.histogram.yaxisTitle, \n 1 + ascent, \n h / 2);\n g.rotate(Math.PI / 2.0, 1 + ascent, h / 2);\n }\n}", "private void initializeChartPanel() {\n\n Rectangle region = new Rectangle(0, 0, clip.getFrameCount(), clip.getFrameFreqSamples());\n\n //toClipCoords(region);\n region.y = clip.getFrameFreqSamples() - (region.y + region.height);\n\n final int endCol = region.x + region.width;\n final int endRow = region.y + region.height;\n\n //System.out.println(\"endCol = \" + endCol + \" endRow = \" + endRow);\n\n XYSeries xy = new XYSeries(\"data\");\n XYSeries xySpline = new XYSeries(\"spline\");\n\n // Displays the single MAX or STRONGEST Frequency for each column\n // captures every x'th element for fitting spline\n int maxItensity = 0;\n int[] rows = new int[endCol];\n int[] intensities = new int[endCol];\n\n// int SPLINEPRECISION = chartPrefJSlider2.getValue(); // 1 is highest precision; default = 40\n int SPLINEPRECISION = 40; // 1 is highest precision; default = 40\n int splineCounter = 0;\n\n for (int col = region.x; col < endCol; col++) {\n Frame fr = clip.getFrame(col);\n int strongestFreq = 0;\n int strongestFreqStrength = 0;\n for (int row = region.y; row < endRow; row++) {\n // the following is a MUCH faster equivalent to: img.setRGB(col, row, greyVal);\n //int greyVal = (int) (brightness + (contrast * Math.log1p(Math.abs(preMult * val))));\n int greyVal = (int) (0 + (625.0 * Math.log1p(Math.abs(11.2 * fr.getReal(row)))));\n greyVal = Math.min(255, Math.max(0, greyVal));\n int thisFreqStrength = (greyVal << 16) | (greyVal << 8) | (greyVal);\n\n if (thisFreqStrength > strongestFreqStrength) {\n strongestFreqStrength = thisFreqStrength;\n strongestFreq = row;\n }\n if (thisFreqStrength > maxItensity) {\n maxItensity = thisFreqStrength;\n }\n }\n rows[col] = strongestFreq;\n intensities[col] = strongestFreqStrength;\n }\n System.out.println(\"maxItensity = \" + maxItensity);\n\n // Average neighboring data values\n // Use minIntensity amoung neighbors for averaged row\n // Use threshold to exclude weak signals\n //int NUMPOINTSAVERAGED = 20;\n int NUMPOINTSAVERAGED = jSlider1.getValue(); // default = 20\n double INTENSITYTHRESHOLD = 0.95;\n int[] data = new int[endCol - NUMPOINTSAVERAGED];\n int[] dataAveraged = new int[endCol - NUMPOINTSAVERAGED];\n int[] minIntensities = new int[endCol - NUMPOINTSAVERAGED];\n for (int col = region.x; col < endCol - NUMPOINTSAVERAGED; col++) {\n int sumRows = 0;\n int minIntensity = maxItensity;\n for (int i = col; i < col + NUMPOINTSAVERAGED; i++) {\n sumRows += rows[i];\n minIntensity = java.lang.Math.min(minIntensity, intensities[i]);\n }\n data[col] = rows[col];\n dataAveraged[col] = java.lang.Math.round(sumRows / NUMPOINTSAVERAGED);\n minIntensities[col] = minIntensity;\n }\n\n for (int col = region.x; col < endCol - 2 * NUMPOINTSAVERAGED; col++) {\n splineCounter++;\n for (int row = region.y; row < endRow; row++) {\n if (row == data[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds actual data\n xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n }\n\n if (row == dataAveraged[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds averaged data\n //xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n if (splineCounter % SPLINEPRECISION == 0) {\n xySpline.add((double) (col + NUMPOINTSAVERAGED / 2), (double) convertYCoordToFreq(row));\n }\n }\n }\n }\n\n dataset.removeAllSeries();\n dataset.addSeries(xy);\n\n //XYSeriesCollection splineDataset = new XYSeriesCollection();\n dataset.addSeries(xySpline);\n\n JFreeChart chart = ChartFactory.createXYLineChart(\n //JFreeChart chart = ChartFactory.createScatterPlot(\n clip.getFileName(), \"Time (ms)\", \"Frequency (Hz)\", dataset, PlotOrientation.VERTICAL, true, true, false);\n XYPlot xyplot = (XYPlot) chart.getPlot();\n xyplot.setRenderer(new XYSplineRenderer());\n XYLineAndShapeRenderer xylineandshaperenderer = (XYLineAndShapeRenderer) xyplot.getRenderer();\n xylineandshaperenderer.setSeriesShape(0, new java.awt.Rectangle(1, 1, 1, 1));\n xylineandshaperenderer.setSeriesLinesVisible(0, false);\n xylineandshaperenderer.setSeriesShapesVisible(0, true);\n xylineandshaperenderer.setSeriesLinesVisible(1, false);\n xylineandshaperenderer.setSeriesShapesVisible(1, false);\n\n// ChartFrame frame = new ChartFrame(\"First\", chart);\n// frame.pack();\n// frame.setVisible(true);\n\n\n jCheckBox1.setEnabled(true);\n jCheckBox1.setSelected(true);\n\n jCheckBox2.setEnabled(true);\n jCheckBox2.setSelected(false);\n\n jSlider1.setEnabled(true);\n jSlider2.setEnabled(true);\n\n jTextField9.setText(clip.getFileName());\n\n chartPanel = new ChartPanel(chart);\n }", "public void createHistogramItem(String name, List list, BinDataSource source,\n int maxIntegerDigits, int maxFractionDigits) {\n stats.createHistogramItem(name, list, source, maxIntegerDigits,\n maxFractionDigits);\n plot.addLegend(dataset++, name);\n }", "public int alphaBinNum(float[] values) {\n\n /* Check if histogram sampling is possible. */\n if (values == null || values.length == 0) {\n\n return currentBinNum;\n }\n\n float minBin = 10;\n float minLbl = 10;\n\n /* Show a depiction of the weights being used. */\n int i, j, n, n2;\n\n /*\n * Histogram case, the most complex, start by gathering the values. If\n * none are toggled on, we will base this on all inputs which exist.\n */\n\n float minVal, maxVal;\n minVal = maxVal = 0;\n n = values.length;\n n2 = 2 * n;\n\n for (i = j = 0; i < n2; i++) {\n j = i % n;\n if (i == j) {\n n2 = n;\n }\n\n float oneval = values[j];\n\n if (oneval == Float.NaN) {\n continue;\n }\n\n if (minVal == maxVal && maxVal == 0) {\n minVal = maxVal = oneval;\n } else if (oneval < minVal) {\n minVal = oneval;\n } else if (oneval > maxVal) {\n maxVal = oneval;\n }\n }\n\n /*\n * Compute the best size to use for the value bins (dv). This responds\n * to density by using smaller increments along the x-axis when density\n * is larger.\n */\n\n if (minVal >= maxVal) {\n\n return currentBinNum;\n }\n float dv = minBin;\n\n dv = (float) .5;\n float delLbl = minLbl * dv / minBin;\n if (dv == 0.5) {\n delLbl = 1;\n } else if (dv == 0 || (maxVal - minVal) > dv * 25) {\n float minDv = (maxVal > -minVal ? maxVal : -minVal) / 5000;\n if (dv < minDv) {\n dv = minDv;\n }\n computeBinDelta(dv, delLbl);\n } else if (dv != minBin) {\n computeBinDelta(dv, delLbl);\n }\n\n int nbMax = 20;\n if ((maxVal - minVal) / dv > nbMax) {\n float dvSeed, dvPrev;\n for (dvSeed = dvPrev = dv, i = 0; i < 100; i++) {\n dvSeed *= 1.4;\n dv = dvSeed;\n computeBinDelta(dv, delLbl);\n if (dv == dvPrev) {\n continue;\n }\n if ((maxVal - minVal) / dv < nbMax) {\n break;\n }\n dvPrev = dvSeed = dv;\n }\n }\n\n /*\n * We want edge of the bins to be at half the bin size, containing at\n * least two even values of del2.\n */\n\n float del2 = delLbl * 2;\n float edge = dv * (((int) (minVal / dv)) - (float) 0.5);\n while (minVal - edge > dv) {\n edge += dv;\n }\n while (edge > minVal) {\n edge -= dv;\n }\n minVal = edge;\n edge = dv * (((int) (maxVal / dv)) + (float) 0.5);\n while (edge - maxVal > dv) {\n edge -= dv;\n }\n while (edge < maxVal) {\n edge += dv;\n }\n maxVal = edge;\n int nbins = (int) (0.5 + (maxVal - minVal) / dv);\n float mean2 = (minVal + maxVal) / 2;\n mean2 = mean2 > 0 ? del2 * (int) (0.5 + mean2 / del2) : -del2\n * (int) (0.5 - mean2 / del2);\n while (minVal > mean2 - del2 && maxVal < mean2 + del2) {\n nbins += 2;\n minVal -= dv;\n maxVal += dv;\n }\n\n return nbins;\n }", "public static <B> Histogram<B> withBins(Iterable<B> bins) {\n Histogram<B> hist = new Histogram<>();\n hist.addBins(bins);\n return hist;\n }", "private void updateChartPanel() {\n\n Rectangle region = new Rectangle(0, 0, clip.getFrameCount(), clip.getFrameFreqSamples());\n\n //toClipCoords(region);\n region.y = clip.getFrameFreqSamples() - (region.y + region.height);\n\n final int endCol = region.x + region.width;\n final int endRow = region.y + region.height;\n\n //System.out.println(\"endCol = \" + endCol + \" endRow = \" + endRow);\n\n XYSeries xy = new XYSeries(\"data\");\n XYSeries xySpline = new XYSeries(\"spline\");\n\n // Displays the single MAX or STRONGEST Frequency for each column\n // captures every x'th element for fitting spline\n int maxItensity = 0;\n int[] rows = new int[endCol];\n int[] intensities = new int[endCol];\n\n int SPLINEPRECISION = jSlider2.getValue(); // 1 is highest precision; default = 40\n// int SPLINEPRECISION = 40; // 1 is highest precision; default = 40\n int splineCounter = 0;\n\n for (int col = region.x; col < endCol; col++) {\n Frame fr = clip.getFrame(col);\n int strongestFreq = 0;\n int strongestFreqStrength = 0;\n for (int row = region.y; row < endRow; row++) {\n // the following is a MUCH faster equivalent to: img.setRGB(col, row, greyVal);\n //int greyVal = (int) (brightness + (contrast * Math.log1p(Math.abs(preMult * val))));\n int greyVal = (int) (0 + (625.0 * Math.log1p(Math.abs(11.2 * fr.getReal(row)))));\n greyVal = Math.min(255, Math.max(0, greyVal));\n int thisFreqStrength = (greyVal << 16) | (greyVal << 8) | (greyVal);\n\n if (thisFreqStrength > strongestFreqStrength) {\n strongestFreqStrength = thisFreqStrength;\n strongestFreq = row;\n }\n if (thisFreqStrength > maxItensity) {\n maxItensity = thisFreqStrength;\n }\n }\n rows[col] = strongestFreq;\n intensities[col] = strongestFreqStrength;\n }\n //System.out.println(\"maxItensity = \" + maxItensity);\n\n // Average neighboring data values\n // Use minIntensity amoung neighbors for averaged row\n // Use threshold to exclude weak signals\n //int NUMPOINTSAVERAGED = 20;\n int NUMPOINTSAVERAGED = jSlider1.getValue(); // default = 20\n double INTENSITYTHRESHOLD = 0.95;\n int[] data = new int[endCol - NUMPOINTSAVERAGED];\n int[] dataAveraged = new int[endCol - NUMPOINTSAVERAGED];\n int[] minIntensities = new int[endCol - NUMPOINTSAVERAGED];\n for (int col = region.x; col < endCol - NUMPOINTSAVERAGED; col++) {\n int sumRows = 0;\n int minIntensity = maxItensity;\n for (int i = col; i < col + NUMPOINTSAVERAGED; i++) {\n sumRows += rows[i];\n minIntensity = java.lang.Math.min(minIntensity, intensities[i]);\n }\n data[col] = rows[col];\n dataAveraged[col] = java.lang.Math.round(sumRows / NUMPOINTSAVERAGED);\n minIntensities[col] = minIntensity;\n }\n\n for (int col = region.x; col < endCol - 2 * NUMPOINTSAVERAGED; col++) {\n splineCounter++;\n for (int row = region.y; row < endRow; row++) {\n if (row == data[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds actual data\n xy.add((double) col, calibrate((double) convertYCoordToFreq(row)));\n System.out.println(\"adding data point (\" + col + \",\" + calibrate((double) convertYCoordToFreq(row)) + \")\");\n }\n if (row == dataAveraged[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds averaged data\n //xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n if (splineCounter % SPLINEPRECISION == 0) {\n xySpline.add((double) (col + NUMPOINTSAVERAGED / 2), calibrate((double) convertYCoordToFreq(row)));\n }\n }\n }\n }\n //replace Data with new series\n dataset.removeSeries(1);\n dataset.removeSeries(0);\n dataset.addSeries(xy);\n dataset.addSeries(xySpline);\n\n XYPlot xyplot = (XYPlot) chartPanel.getChart().getPlot();\n XYLineAndShapeRenderer xylineandshaperenderer = (XYLineAndShapeRenderer) xyplot.getRenderer();\n xylineandshaperenderer.setSeriesShapesVisible(0, jCheckBox1.isSelected());\n xylineandshaperenderer.setSeriesLinesVisible(1, jCheckBox2.isSelected());\n\n if (jCheckBox3.isSelected()) {\n xyplot.getRangeAxis().setLabel(jTextField8.getText() + \" (\" + jTextField3.getText() + \")\");\n } else {\n xyplot.getRangeAxis().setLabel(\"Frequency (Hz)\");\n }\n\n // Show Crosshairs\n chartPanel.setVerticalAxisTrace(true);\n\n chartPanel.repaint();\n }", "public static void generateHistogram(int primeArray[]){\n int i, j;\n int occurrences = 0;\n \n int scale = determineScale(primeArray);\n \n System.out.println(\"\\n\\nPrime Sequence Histogram\\n\");\n for(i = 0; i < MAX_DIGIT; i++){\n System.out.format(\"%d%1s\", i, \" | \");\n for(j = 0; j < primeArray.length; j++){\n if((primeArray[j] % MAX_DIGIT) == i)\n occurrences++; \n }\n for(j = 0; j < (occurrences / scale); j++)\n System.out.format(\"%-5s\", \"* \");\n occurrences = 0;\n System.out.println();\n }\n System.out.print(\" ___________________________________________\\n \");\n for(i = 1; i < MAX_DIGIT; i++)\n System.out.format(\"%-5d\", (i * scale) );\n \n }", "private double[] normalizeHistogram(double[] inputHistogram, int totalPixels) {\n\t\tdouble[] normalized=new double[inputHistogram.length];\n\t\tfor(int i=0;i<inputHistogram.length&&start;i++){\n\t\t\tnormalized[i]=inputHistogram[i]/totalPixels;\n\t\t}\n\t\treturn normalized;\n\t}", "private void calcXSize(ArrayList<BarEntry> xValues) {\n for (int i = 0; i < xValues.size(); i++) {\n int xValue = xValues.get(i).getX();\n mMaxX = Math.max(mMaxX, xValue);\n mMinX = Math.min(mMinX, xValue);\n }\n }", "private void histogramScore() {\r\n View.histogram(score, 0, this.getSize().width + 15, 0);\r\n }", "public HistogramDataSetAdapter(Histogram histogram, Locale locale){\n\t\tsuper();\n\t\tthis.locale\t\t\t\t= locale;\n\t\tthis.accumulateTimeUnit\t= null;\n\t\tthis.histogramTally\t\t= histogram;\n\t\tthis.histogramAccumulate= null;\n \tboolean showTimeSpans \t= histogram.getShowTimeSpansInReport();\n \tif(showTimeSpans) this.setTimeSpanFormat(histogram);\n \tint\t\tminCell = 0;\n \tfor(int i=0; i< histogram.getCells()+2; i++){\n \t\tif(histogram.getObservationsInCell(i) > 0.0){\n \t\t\tminCell = i; break;\n \t\t}\n \t}\n \tint\t\tmaxCell = histogram.getCells()+1;\n \tfor(int i=histogram.getCells()+1; i> -1; i--){\n \t\tif(histogram.getObservationsInCell(i) > 0.0){\n \t\t\tmaxCell = i; break;\n \t\t}\n \t}\n \t//System.out.println(\"minCell: \"+minCell+\" maxCell: \"+maxCell);\n \t\n \tlong \tvalue;\n \tdouble \tfrom, to;\n \tString yKey = \"\", xKey;\n for (int i = minCell; i <= maxCell; i++) {\n \tvalue \t= Math.round(histogram.getObservationsInCell(i));\n from\t= histogram.getLowerLimit(i);\n to\t\t= Double.POSITIVE_INFINITY;\n if(i+1 < histogram.getCells()+2) to\t= histogram.getLowerLimit(i+1);\n \txKey = \"[\" + this.format(showTimeSpans, from) + \" .. \" + this.format(showTimeSpans, to) + \")\";\n \tthis.addValue(value, yKey, xKey);\n //System.out.println(\"added: \" + value+\" \"+xKey+\" \"+yKey);\n }\n\t}", "public Histogram(int bins, double minValue, double maxValue) {\n this.bins = new int[bins + 2];//Two additional bins for out-of-bounds values.\n this.minValue = minValue;\n this.maxValue = maxValue;\n binDiff = (maxValue - minValue) / bins;\n }", "public double[] areaHistogram(double x, double y, double width,\n double height) {\n int[] data = areaToVector(x, y, width, height);\n double[] ans = new double[256];\n int totalSize = data.length;\n\n for (int i = 0; i < data.length; i++) {\n ans[data[i]] += 1.0 / totalSize;\n }\n return ans;\n }", "public static Histogram readFrequencyTable(String fileName) {\r\n List<String[]> data = FileUtils.readCSVFile(fileName, \";\", -1);\r\n \r\n double classWidth = Double.parseDouble(data.get(1)[0]) - Double.parseDouble(data.get(0)[0]);\r\n double start = Double.parseDouble(data.get(0)[0]) - classWidth / 2.0;\r\n double stop = Double.parseDouble(data.get(data.size() - 1)[0]) + classWidth / 2.0;\r\n \r\n Histogram table = new Histogram(start, stop, (int) ((stop - start) / classWidth));\r\n for (String[] row : data) {\r\n int frequency = (int) Double.parseDouble(row[1]);\r\n double value = Double.parseDouble(row[0]);\r\n for (int i = 0; i < frequency; i++) {\r\n table.add(value);\r\n }\r\n }\r\n return table;\r\n }", "public void loadData(HistogramDataSet dataSet);", "public static boolean histogram(CLIJ2 clij2, ClearCLBuffer src, ClearCLBuffer histogram, Integer numberOfBins, Float minimumGreyValue, Float maximumGreyValue, Boolean determineMinMax, boolean showTable) {\n if (determineMinMax) {\n minimumGreyValue = new Double(clij2.minimumOfAllPixels(src)).floatValue();\n maximumGreyValue = new Double(clij2.maximumOfAllPixels(src)).floatValue();\n }\n\n // determine histogram\n boolean result = fillHistogram(clij2, src, histogram, minimumGreyValue, maximumGreyValue);\n\n // the histogram is written in args[1] which is supposed to be a one-dimensional image\n ImagePlus histogramImp = clij2.convert(histogram, ImagePlus.class);\n\n // plot without first eleement\n //histogramImp.setRoi(new Line(1,0.5, histogramImp.getWidth(), 0.5));\n //IJ.run(histogramImp, \"Plot Profile\", \"\");\n\n // plot properly\n float[] determinedHistogram = (float[])(histogramImp.getProcessor().getPixels());\n float[] xAxis = new float[numberOfBins];\n xAxis[0] = minimumGreyValue;\n float step = (maximumGreyValue - minimumGreyValue) / (numberOfBins - 1);\n\n for (int i = 1 ; i < xAxis.length; i ++) {\n xAxis[i] = xAxis[i-1] + step;\n }\n //new Plot(\"Histogram\", \"grey value\", \"log(number of pixels)\", xAxis, determinedHistogram, 0).show();\n\n // send result to results table\n if (showTable) {\n ResultsTable table = ResultsTable.getResultsTable();\n for (int i = 0; i < xAxis.length; i++) {\n table.incrementCounter();\n table.addValue(\"Grey value\", xAxis[i]);\n table.addValue(\"Number of pixels\", determinedHistogram[i]);\n }\n table.show(table.getTitle());\n }\n return result;\n }", "public CanvasHistogramDouble(String canvasName, int canvasHeight, int canvasWidth, ChartDataHistogramDouble textHistData, String xText) {\r\n\t\tsuper(canvasName, canvasHeight, canvasWidth, textHistData);\r\n\t\t_xAxisTitle = xText;\r\n\t}", "public void generateBarChart(float[] act, float[] act1)\n {\n\n HorizontalBarChart barChart= (HorizontalBarChart) findViewById(R.id.chart);\n /*\n ArrayList<BarEntry> entries = new ArrayList<>();\n entries.add(new BarEntry(4f, 0));\n entries.add(new BarEntry(8f, 1));\n entries.add(new BarEntry(6f, 2));\n entries.add(new BarEntry(12f, 3));\n entries.add(new BarEntry(18f, 4));\n entries.add(new BarEntry(10f, 6));\n entries.add(new BarEntry(14f, 7));\n entries.add(new BarEntry(2f, 5));\n\n BarDataSet dataset1 = new BarDataSet(entries, \"# of Calls\");\n */\n\n ArrayList<String> labels = new ArrayList<String>();\n labels.add(\"Food\");\n labels.add(\"Cloth\");\n labels.add(\"Travelling\");\n labels.add(\"Stationary\");\n labels.add(\"Furniture\");\n labels.add(\"Medicine\");\n labels.add(\"Bill\");\n labels.add(\"Utensils\");\n\n\n /* for create Grouped Bar chart*/\n ArrayList<BarEntry> group1 = new ArrayList<>();\n group1.add(new BarEntry(act1[0], 0));\n group1.add(new BarEntry(act1[1], 1));\n group1.add(new BarEntry(act1[2], 2));\n group1.add(new BarEntry(act1[3], 3));\n group1.add(new BarEntry(act1[4], 4));\n group1.add(new BarEntry(act1[5], 5));\n group1.add(new BarEntry(act1[6], 6));\n group1.add(new BarEntry(act1[7], 7));\n\n ArrayList<BarEntry> group2 = new ArrayList<>();\n group2.add(new BarEntry(act[0], 0));\n group2.add(new BarEntry(act[1], 1));\n group2.add(new BarEntry(act[2], 2));\n group2.add(new BarEntry(act[3], 3));\n group2.add(new BarEntry(act[4], 4));\n group2.add(new BarEntry(act[5], 5));\n group2.add(new BarEntry(act[6], 6));\n group2.add(new BarEntry(act[7], 7));\n\n BarDataSet barDataSet1 = new BarDataSet(group1, \"Planned Amount\");\n //barDataSet1.setColor(Color.rgb(0, 155, 0));\n barDataSet1.setColor(getResources().getColor(R.color.darkgreen));\n\n BarDataSet barDataSet2 = new BarDataSet(group2, \"Actual Amount\");\n barDataSet2.setColor(getResources().getColor(R.color.purered));\n\n\n ArrayList<IBarDataSet> dataset = new ArrayList<>();\n dataset.add(barDataSet1);\n dataset.add(barDataSet2);\n /**/\n\n BarData data = new BarData(labels,dataset);\n// // dataset.setColors(ColorTemplate.COLORFUL_COLORS); //\n barChart.setData(data);\n barChart.animateY(5000);\n barChart.setDescription(\"Expense Graph\");\n barChart.setDescriptionPosition(2f, 2f);\n\n }", "private static void insertTimeSeriesOneDim(final ScriptEngine engine,\r\n final DataArray data) throws Exception {\r\n List<DataEntry> time = data.getDate();\r\n int freq = TimeUtils.getFrequency(time);\r\n List<Double> doubleList = data.getDouble();\r\n double[] doubleArray = new double[doubleList.size()];\r\n for (int i = 0; i < doubleList.size(); i++) {\r\n doubleArray[i] = doubleList.get(i);\r\n }\r\n engine.put(\"my_double_vector\", doubleArray);\r\n engine.eval(\"ts_0 <- ts(my_double_vector, frequency = \"\r\n + freq + \")\");\r\n }", "public ProbabilityChart(int nEWords, int nFWords){\r\n\t\tthis.chart = new double[nEWords][nFWords];\r\n\t}", "public double[] calcNormHistogram()\r\n {\r\n\tdouble [] normHistogram = new double[histogram.length];\r\n\t\r\n\t//Find the normalized histogram by dividing each element of\r\n\t//the histogram by sum\r\n\tfor( int n = 0; n < histogram.length; n++ )\r\n\t normHistogram[n] = (double)histogram[n]/sum;\r\n\t\r\n\treturn normHistogram;\r\n }", "public static <B> Histogram<B> withBins(Iterable<B> bins, Iterable<String> series) {\n Histogram<B> hist = new Histogram<>();\n hist.addBins(bins);\n hist.addSeries(series);\n return hist;\n }", "HistogramInterface registerHistogram(HistogramInterface histogram);", "public void createHistogramItem(String name, List list, BinDataSource source) {\n stats.createHistogramItem(name, list, source);\n plot.addLegend(dataset++, name);\n }", "public static int[] histogram(int[] scores, int numCounters)\n {\n int[] hist = new int[numCounters];\n for(int score:scores)\n {\n hist[score]++;\n }\n return hist;\n }", "public void fillBins() {\n\t\t// grab our current data and then transpose it\n\t\tList<List<String>> currentData = dc.getDataFold().get(currentFold);\n\t\tList<List<String>> tranData = dc.transposeList(currentData);\n\t\tfor (int row = 0; row < tranData.size(); row++) {\n\t\t\t// for each row of attribute values, discretize it\n\t\t\tList<Double> procData = new ArrayList<>();\n\t\t\t// for each String of raw data, convert it into a value to place into a bin\n\t\t\tfor (String rawData : tranData.get(row)) {\n\t\t\t\tif (rawData.chars().allMatch(Character::isDigit) || rawData.contains(\".\")) {\n\t\t\t\t\tprocData.add(Double.parseDouble(rawData));\n\t\t\t\t} else {\n\t\t\t\t\t// not perfect, but useable in the small domain of values we use for data\n\t\t\t\t\tprocData.add((double) rawData.hashCode());\n\t\t\t\t} // end if-else\n\t\t\t} // end for\n\n\t\t\t// for each value we have, place it into a corresponding bin\n\t\t\tfor (double value : procData) {\n\t\t\t\tfor (Bin bin : attribBins.get(row)) {\n\t\t\t\t\tif (bin.binContains(value)) {\n\t\t\t\t\t\tbin.incrementFreq();\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\t}", "public static void main(String args[]) {\n int a = 0;\r\n int b = 0;\r\n int u = 0;\r\n\r\n //Declaring scanner object\r\n Scanner capture = new Scanner(System.in);\r\n System.out.println(\"How many input values [MAX: 30]?\");\r\n\r\n //Taking input\r\n int x = capture.nextInt();\r\n ArrayList<Integer> Digits = new ArrayList<>();\r\n System.out.println(\"Enter \" + x + \" numbers.\");\r\n\r\n //Declaring and initializing HashMap object\r\n HashMap<Integer, Integer> Occur = new HashMap<>();\r\n\r\n // Initialize Hashmap\r\n for(int i=0;i<10;i++){\r\n Occur.put(i,0);\r\n }\r\n\r\n\r\n\r\n\r\n int tmp = x;\r\n // Initialize ArrayList\r\n while(tmp>0){\r\n Digits.add(capture.nextInt());\r\n tmp--;\r\n }\r\n\r\n\r\n\r\n // ----------------------------\r\n while (b < x) {\r\n if (Occur.get(Digits.get(b)) != null) {\r\n int cnt = Occur.get(Digits.get(b)) + 1;\r\n Occur.put(Digits.get(b), cnt);\r\n }\r\n else {\r\n Occur.put(Digits.get(b), 1);\r\n }\r\n b++;\r\n }\r\n\r\n int height = 0;\r\n System.out.println(\"\\nNumber Occurrence\");\r\n\r\n height = 0;\r\n for(Map.Entry<Integer,Integer> entry : Occur.entrySet()){\r\n if(entry.getValue()>0){\r\n System.out.println(entry.getKey() + \" \" + entry.getValue());\r\n }\r\n if(entry.getValue()>height){\r\n height = entry.getValue();\r\n }\r\n }\r\n\r\n System.out.println(\"================= Vertical bar =================\");\r\n\r\n //Printing histogram\r\n int h = height;\r\n while ( h > 0) {\r\n\r\n System.out.print(\"| \"+h+\" | \");\r\n\r\n int g = 0;\r\n while (g < 10) {\r\n if(Occur.get(g) != null) {\r\n int kallen = Occur.get(g);\r\n if(kallen >= h)\r\n {\r\n System.out.print(\"* \");\r\n }\r\n else\r\n {\r\n System.out.print(\" \");\r\n }\r\n }\r\n else\r\n {\r\n System.out.print(\" \");\r\n }\r\n g++;\r\n }\r\n System.out.print(\"\\n\");\r\n h--;\r\n }\r\n System.out.println(\"================================================\");\r\n System.out.print(\"| N |\");\r\n while ( u < 10 ) {\r\n System.out.print(\" \"+ u );\r\n u++;\r\n }\r\n System.out.println(\"\\n================================================\");\r\n }", "private String printHistogram(double tokenValue) {\n double histogramValue = maximumSize;\n double totalHistograms = Math.round(tokenValue / histogramValue);\n if (totalHistograms == 0) { \n totalHistograms = 1; \n }\n\n String histograms = \"\";\n for (int i = 0; i < totalHistograms; i++) {\n histograms += \"*\";\n }\n return histograms;\n }", "public IntHistogram(int buckets, int min, int max) {\n \t// some code goes here\n this.min = min;\n this.max = max;\n this.buckets = new int[buckets];\n for(int i=0;i<buckets;++i){\n this.buckets[i] = 0;\n }\n totalCount = 0;\n int range = max - min + 1;\n\n capacity = range % buckets == 0 ? range / buckets : range / buckets + 1;\n }", "public void createHistogramItem(String name, List list,\n String listObjMethodName,\n int maxIntegerDigits, int maxFractionDigits) {\n stats.createHistogramItem(name, list, listObjMethodName, maxIntegerDigits,\n maxFractionDigits);\n plot.addLegend(dataset++, name);\n }", "public HistogramDataSetAdapter(HistogramAccumulate histogram, Locale locale){\n\t\tsuper();\n\t\tthis.locale\t\t\t\t= locale;\n\t\tthis.histogramTally\t\t= null;\n\t\tthis.histogramAccumulate= histogram;\n\t\tthis.accumulateTimeUnit\t= this.chooseTimeUnit(histogram, 3);\n\t\tboolean showTimeSpans \t= histogram.getShowTimeSpansInReport();\n\t\tif(showTimeSpans) this.setTimeSpanFormat(histogram);\n \tint\t\tminCell = 0;\n \tfor(int i=0; i< histogram.getCells()+2; i++){\n \t\tif(TimeSpan.isLonger(histogram.getObservationsInCell(i), TimeSpan.ZERO)){\n \t\t\tminCell = i; break;\n \t\t}\n \t}\n \tint\t\tmaxCell = histogram.getCells()+1;\n \tfor(int i=histogram.getCells()+1; i> -1; i--){\n \t\tif(TimeSpan.isLonger(histogram.getObservationsInCell(i), TimeSpan.ZERO)){\n \t\t\tmaxCell = i; break;\n \t\t}\n \t}\n \t//System.out.println(\"minCell: \"+minCell+\" maxCell: \"+maxCell);\n\n \tdouble \tvalue;\n \tdouble \tfrom, to;\n \tString yKey = \"\", xKey;\n for (int i = minCell; i <= maxCell; i++) {\n \tvalue \t= histogram.getObservationsInCell(i).getTimeAsDouble(this.accumulateTimeUnit);\n from\t= histogram.getLowerLimit(i);\n to\t\t= Double.POSITIVE_INFINITY;\n if(i+1 < histogram.getCells()+2) to\t= histogram.getLowerLimit(i+1);\n \txKey = \"[\" + this.format(showTimeSpans, from) + \" .. \" + this.format(showTimeSpans, to) + \")\";\n \tthis.addValue(value, yKey, xKey);\n //System.out.println(\"added: \" + value+\" \"+xKey+\" \"+yKey);\n }\n\t}", "public void initHistogram() {\n\t\th1.setString(Utilities.hist1String);\r\n\t\th2.setString(Utilities.hist2String);\r\n\t\th1.setData(results);\r\n\t\th2.setData(results);\r\n\r\n\t\t\r\n\r\n\t}", "private ArrayList<Entry> setYAxisValues(){\n ArrayList<Entry> yVals = new ArrayList<Entry>();\n for (int z = 0; z < 235; z++) {\n yVals.add(new Entry((float)graphArray[z], z));\n }\n return yVals;\n }", "private void plotEntries() {\n\t\tfor (int i = 0; i < entries.size(); i++) {\n\t\t\tdrawLine(i);\n\t\t}\n\t}", "private static void drawHistogram(HashMap<String, Double> map) {\n\tdouble maximumRelativeFrequency = 0;\n\n\t//Find maximum relative frequency.\n\tfor (Entry<String, Double> entry : map.entrySet()) {\n\t if (maximumRelativeFrequency < entry.getValue()) {\n\t\tmaximumRelativeFrequency = entry.getValue();\n\t }\n\t}\n\n\tfor (Entry<String, Double> entry : map.entrySet()) {\n\t System.out.print(entry.getKey() + \": \");\n\t \n\t System.out.printf(\"%5.2f%% : \", entry.getValue()*100);\n\t \n\t //Scale histogram to largest relative frequency.\n\t int stars = (int)((entry.getValue() / maximumRelativeFrequency) * 70.0);\n\t for (int i = 0; i < stars; i++)\n\t {\n\t\tSystem.out.print(\"*\");\n\t }\n\t System.out.println();\n\t}\n }", "public NumericalDistributionModel( Integer binCount, Double span ){\n\t\tinterval = span / binCount.doubleValue();\n\t\tlog.info( \"bin-interval is {}\", interval );\n\t\thistogram = new Integer[ binCount ];\n\t\t\n\t\tfor( int i = 0; i < histogram.length; i++ )\n\t\t\thistogram[i] = 0;\n\t}", "public static void main(String[] args) {\n String charArray = \"aBbCccDdddeFfGggHhhhXYZ\";\n System.out.println(\"Histogram for the word entered.\");\n System.out.println(Arrays.toString(letterHist(charArray)));\n\n String numberArray = \"0123456789\";\n System.out.println(\"\\nHistogram for the number entered.\");\n System.out.println(Arrays.toString(numberHeist(numberArray)));\n }", "ArrayList<JFreeChart> generateAll();", "protected NumberAxis createHAxis() {\n final NumberAxis xAxis = new NumberAxis();\n //xAxis.setLabel(\"Time\");\n xAxis.setTickMarkVisible(false);\n xAxis.setMinorTickVisible(false);\n xAxis.setMinorTickCount(0);\n xAxis.setTickLabelFormatter(new StringConverter<Number>() {\n @Override\n public String toString(Number number) {\n Date d = new Date(number.longValue());\n return d.getMinutes() + \":\" + d.getSeconds();\n }\n\n @Override\n public Number fromString(String s) {\n return null;\n }\n });\n return xAxis;\n }", "public void createBins(int arraySize)\n\t{\n\t\t//Check if any spectra from each polarity has been created\n\t\tif (librarySpectra.size()>0)\n\t\t{\n\t\t\tcountBin = new int[arraySize]; //Array to store number of positive spectra stored in each bin\n\t\t\taddedBin = new int[arraySize]; //Array to store number of positive spectra stored in each bin\n\n\t\t\t//Fill all positive bins with zeroes\n\t\t\tfor (int i=0; i<countBin.length; i++)\n\t\t\t{\n\t\t\t\tcountBin[i] = 0;\n\t\t\t\taddedBin[i] = 0;\n\t\t\t}\n\n\t\t\t//Create the array to store the actual spectra objects\n\t\t\tmassBin = new LibrarySpectrum[arraySize][];\n\t\t}\n\t}", "public void transform(double[] x) {\r\n int i,j;\r\n double sumWindow=nn*nn;\r\n\r\n System.arraycopy(x,0,data,1,n);\r\n if(winNum>0) {\r\n for(i=0,j=1;i<nn;i++) {\r\n data[j]=data[j]*winMult[i];\r\n j++;\r\n data[j]=data[j]*winMult[i];\r\n j++;\r\n sumWindow=sumWindow+winMult[i]*winMult[i];\r\n }\r\n }\r\n/* Test to plot windowed function\r\n nSpectrum++;\r\n for(i=0,j=0;i<nn;i++) {\r\n x[j]=i;\r\n j++;\r\n x[j]=data[j];\r\n j++;\r\n }\r\n if(ncurve>=0) ncurve = graph.deleteAllCurves();\r\n ncurve = graph.addCurve(x,nn,Color.blue);\r\n graph.paintAll=true;\r\n graph.repaint();\r\n*/\r\n four1(data,nn,1);\r\n nSpectrum++;\r\n x[0]=0;\r\n spectrum[0]+=(data[0]*data[0]+data[1]*data[1])/sumWindow;\r\n for(i=1,j=2;i<nn/2;i++) {\r\n x[j]=i*scale;\r\n j++;\r\n spectrum[i]+=2.*(data[j]*data[j]+data[j+1]*data[j+1])/sumWindow;\r\n j++;\r\n }\r\n x[j]=(nn/2)*scale;\r\n j++;\r\n spectrum[nn/2]+=(data[j]*data[j]+data[j+1]*data[j+1])/sumWindow;\r\n for(i=0,j=1;i<=nn/2;i++) {\r\n x[j]=0.434*Math.log(floor+spectrum[i]/nSpectrum);\r\n j+=2;\r\n }\r\n }", "Histogram() {\n type = name = \"\";\n feature_index = -1;\n histogram_features = null;\n histogram_proportions = null;\n histogram_counts = null;\n }", "JFreeChart generateBox();", "public void createHistogramItem(String name, List list, Object target,\n String methodName, int maxIntegerDigits,\n int maxFractionDigits) {\n BinDataSource bds = createBinDataSource(target, methodName);\n createHistogramItem(name, list, bds, maxIntegerDigits, maxFractionDigits);\n }", "public JFreeChart createChart(IntervalXYDataset paramIntervalXYDataset) {\n\n\n JFreeChart jfreechart = ChartFactory.createXYBarChart(\n \"Spread Example\", //title\n \"Resource\", //xAxisLabel\n false, //dateAxis\n \"Timing\", //yAxisLabel\n paramIntervalXYDataset, //dataset\n PlotOrientation.VERTICAL, //orientation\n true, //legend\n true, //tooltips\n false); //urls\n\n\n\n XYPlot xyplot = (XYPlot) jfreechart.getPlot();\n\n xyplot.setBackgroundPaint(Color.white);\n xyplot.setRangeGridlinePaint(Color.darkGray);//vertical\n xyplot.setDomainGridlinePaint(Color.LIGHT_GRAY);//horizontal\n\n// xyplot.setDomainAxis(createTimeAxis());\n xyplot.setDomainAxis(createSymbolAxis());\n\n xyplot.setFixedLegendItems(createLegend());\n\n MyXYBarRenderer xyBarRenderer = new MyXYBarRenderer();\n xyBarRenderer.setUseYInterval(true);\n\n xyBarRenderer.setShadowVisible(false);\n\n xyBarRenderer.setDrawBarOutline(true);\n xyBarRenderer.setBaseOutlinePaint(Color.DARK_GRAY);\n\n xyBarRenderer.setBaseItemLabelFont(new Font(\"Arial\", Font.PLAIN, 10));\n\n xyBarRenderer.setMargin(0.2);\n xyplot.setRenderer(0, xyBarRenderer, true);\n\n//xyBarRenderer.\n\n\n MyXYBarPainter barPainter = new MyXYBarPainter((XYTaskDataset) paramIntervalXYDataset);\n barPainter.setPainterType(MyXYBarPainter.PainterType.GRADIENT);\n xyBarRenderer.setBarPainter(barPainter);\n\n\n\n //Item-Label:\n xyBarRenderer.setBaseItemLabelsVisible(true);\n xyBarRenderer.setBaseItemLabelGenerator(createItemLabelGenerator());\n xyBarRenderer.setBasePositiveItemLabelPosition(createItemLabelPosition());\n\n\n\n xyBarRenderer.setBaseToolTipGenerator(createTooltipGenerator());\n\n\n\n//PeriodAxis xaxis= new PeriodAxis(\"kk\");\n\n xyplot.setRangeAxis(createTimeAxis());\n// xyplot.setRangeAxis(createSymbolAxis());\n\n\n\n// DateAxis xaxis = new DateAxis();\n// xaxis.setVerticalTickLabels(true);\n// xyplot.setRangeAxis(xaxis);\n xyplot.setRangeAxisLocation(AxisLocation.TOP_OR_LEFT);\n\n// ChartUtilities.applyCurrentTheme(jfreechart);\n\n return jfreechart;\n }", "public static void barChart(String title, int[] arr) \n {\n CategoryChartBuilder builder = new CategoryChartBuilder();\n builder.width(800);\n builder.height(600);\n builder.title(\"Int array values\");\n builder.xAxisTitle(\"Index\");\n builder.yAxisTitle(\"Number\");\n\n // Add data and title to the chart\n CategoryChart chart = builder.build();\n chart.addSeries(title, null, arr);\n\n // display the chart:\n new SwingWrapper(chart).displayChart();\n }", "@Test\n public void test28() throws Throwable {\n double[][] doubleArray0 = new double[4][3];\n double[] doubleArray1 = new double[0];\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[1];\n doubleArray2[0] = 4394.831255689545;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[5];\n doubleArray3[0] = 4394.831255689545;\n doubleArray3[1] = 4394.831255689545;\n doubleArray3[2] = 4394.831255689545;\n doubleArray3[3] = 4394.831255689545;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[3];\n doubleArray4[0] = 4394.831255689545;\n doubleArray4[1] = 4394.831255689545;\n doubleArray0[3] = doubleArray4;\n DefaultIntervalCategoryDataset defaultIntervalCategoryDataset0 = new DefaultIntervalCategoryDataset(doubleArray0, doubleArray0);\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D(\"org.jfree.data.xy.DefaultWindDataset\");\n Month month0 = new Month();\n ZoneOffset zoneOffset0 = ZoneOffset.MAX;\n ZoneInfo zoneInfo0 = (ZoneInfo)TimeZone.getTimeZone((ZoneId) zoneOffset0);\n PeriodAxis periodAxis0 = new PeriodAxis(\"'Ypi)?q\", (RegularTimePeriod) month0, (RegularTimePeriod) month0, (TimeZone) zoneInfo0);\n LayeredBarRenderer layeredBarRenderer0 = new LayeredBarRenderer();\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) defaultIntervalCategoryDataset0, (CategoryAxis) categoryAxis3D0, (ValueAxis) periodAxis0, (CategoryItemRenderer) layeredBarRenderer0);\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo();\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo(chartRenderingInfo0);\n CategoryItemRendererState categoryItemRendererState0 = new CategoryItemRendererState(plotRenderingInfo0);\n StandardEntityCollection standardEntityCollection0 = (StandardEntityCollection)categoryItemRendererState0.getEntityCollection();\n ChartRenderingInfo chartRenderingInfo1 = new ChartRenderingInfo((EntityCollection) standardEntityCollection0);\n PlotRenderingInfo plotRenderingInfo1 = chartRenderingInfo1.getPlotInfo();\n categoryPlot0.zoomRangeAxes(4394.831255689545, plotRenderingInfo1, (Point2D) null, false);\n }", "public double[][] normalisedHistogram(BufferedImage image) {\r\n double[][] rgbCount = getHistogram(image);\r\n int size = image.getHeight() * image.getWidth();\r\n for (int i = 0; i < 3; i++) {\r\n for (int j = 0; j <= 255; j++) {\r\n rgbCount[i][j] /= size; //normalise\r\n }\r\n }\r\n return rgbCount;\r\n }", "private static JFreeChart createChart(CategoryDataset dataset) {\n\t\t//the title of the chart depending of the attributes chosen by the user\n\t\tif (queryNumber==0) {domainLabel=\"Per day\";}\n\t\telse if (queryNumber==1) {domainLabel=\"Per hour\";}\n\t\telse if (queryNumber==2) {domainLabel=\"Per minute\";}\n\t\t\n\t\t// setting the title \n\t\tString rangeLabel=\"Average (ms)\";\n\t\t// create the chart...\n\t\tJFreeChart chart = ChartFactory.createBarChart(\n\t\t\t\t\"Static\", // chart title\n\t\t\t\tdomainLabel, // domain axis label\n\t\t\t\trangeLabel, // range axis label\n\t\t\t\tdataset, // data\n\t\t\t\tPlotOrientation.VERTICAL, // orientation\n\t\t\t\tfalse, // include legend\n\t\t\t\ttrue, // tooltips\n\t\t\t\tfalse // URLs\n\t\t\t\t);\n\t\t\n\t\t//setting the title preferences and format\n\t\tchart.getTitle().setFont(fontStatic);\n\t\tchart.getTitle().setPaint(Color.red);\n\t\tchart.setBackgroundPaint(Color.white);\n\t\tCategoryPlot plot = chart.getCategoryPlot();\n\t\tplot.setBackgroundPaint(Color.lightGray);\n\t\tplot.setDomainGridlinePaint(Color.white);\n\t\tplot.setDomainGridlinesVisible(true);\n\t\tplot.setRangeGridlinePaint(Color.white);\n\t\tfinal NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();\n\t\tchart.getCategoryPlot().getRangeAxis().setLabelPaint(Color.RED);\n\t\tchart.getCategoryPlot().getDomainAxis().setLabelPaint(Color.RED);\n\t\trangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n\t\tBarRenderer renderer = (BarRenderer) plot.getRenderer();\n\t\trenderer.setDrawBarOutline(false);\n\t\tfor (int i =0;i<25;i++) renderer.setSeriesPaint(i, Color.BLUE);\n\t\treturn chart;\n\t}", "public OpenHistogram(String title, int numBins, long lowerBound) {\n super(title);\n stats = new OpenHistogramStat(numBins, lowerBound);\n this.setBars(.5, .2);\n this.setXRange(0, numBins - 1);\n }", "public Histogram(short[][] matrix)\r\n {\r\n\tdepth = 256;\r\n\tcalcHistogram(matrix);\r\n\r\n\t// The sum of the elements in the histogram equals the number\r\n\t// of elements in the matrix\r\n\tsum = matrix.length * matrix[0].length;\r\n }", "public ScatterPlotChart(float[][] data, \n ValueAxis domainAxis, ValueAxis rangeAxis) {\n\t\t \n\t\tsuper(data,domainAxis,rangeAxis);\n\t\tsetPaint(Color.BLACK);\n\t\t\n }", "@Test\n public void test75() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n DatasetRenderingOrder datasetRenderingOrder0 = combinedRangeCategoryPlot0.getDatasetRenderingOrder();\n boolean boolean0 = combinedRangeCategoryPlot0.isRangeCrosshairLockedOnData();\n Line2D.Double line2D_Double0 = new Line2D.Double(5.0E9, 5.0E9, 5.0E9, 5.0E9);\n combinedRangeCategoryPlot0.clearRangeAxes();\n boolean boolean1 = combinedRangeCategoryPlot0.isDomainGridlinesVisible();\n combinedRangeCategoryPlot0.setDomainAxis(1, (CategoryAxis) null, false);\n PlotOrientation plotOrientation0 = PlotOrientation.VERTICAL;\n combinedRangeCategoryPlot0.setOrientation(plotOrientation0);\n CategoryItemRenderer categoryItemRenderer0 = combinedRangeCategoryPlot0.getRenderer();\n combinedRangeCategoryPlot0.clearAnnotations();\n StyleConstants styleConstants0 = (StyleConstants)AttributeSet.NameAttribute;\n HistogramDataset histogramDataset0 = new HistogramDataset();\n int[] intArray0 = new int[7];\n intArray0[0] = 1;\n intArray0[1] = 1;\n intArray0[2] = 1;\n intArray0[3] = 1;\n intArray0[4] = 1;\n intArray0[5] = 1;\n intArray0[6] = 1;\n SubSeriesDataset subSeriesDataset0 = new SubSeriesDataset((SeriesDataset) histogramDataset0, intArray0);\n DatasetChangeEvent datasetChangeEvent0 = new DatasetChangeEvent((Object) styleConstants0, (Dataset) subSeriesDataset0);\n combinedRangeCategoryPlot0.datasetChanged(datasetChangeEvent0);\n }", "public float histogramMethod(Slice slice) \n\t{\n\t\tHistogram hh = new Histogram();\n\t\tint ii = 0;\n\n\t\t//\n\t\t// Compute the thresholded histogram.\n\t\t//\n\t\tfloat lower_threshold = (float)0.01;\n\t\tfloat upper_threshold = (float)0.3 * (float)Statistics.max(slice);\n\t\thh.histogram( slice, lower_threshold, upper_threshold );\n\n\t\t//\n\t\t// Get the counts and bins.\n\t\t//\n\t\tfloat[] bins = hh.getBins();\n\t\tfloat[] counts = hh.getCounts();\n\n\t\t//\n\t\t// Find the maximum count.\n\t\t//\n\t\tfloat max = (float)0.0; int max_index = 0;\n\t\tfor(ii=0; ii<counts.length; ii++) {\n\t\t\tif( counts[ii] > max ) {\n\t\t\t\tmax_index = ii;\n\t\t\t\tmax = counts[ii];\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t// Find the first minimum after the maximum\n\t\t//\n\t\tii = max_index + 1;\n\t\tdo {\n\t\t\tii++;\n\t\t} while( counts[ii] < counts[ii-1] && ( ii < bins.length ) );\n\n\t\tfloat sigma = (float)0.0;\n\t\tif( ii >= bins.length-1 ) {\n\t\t\tSystem.out.println(\"Gack...could not find the first minimum.\");\n\t\t}\n\t\telse {\n\t\t\tsigma = bins[ii];\n\t\t}\n\n\t\treturn sigma;\n\t}", "public static String histogram(ArrayList<Integer> frequency)\r\n {\r\n int maxFrequency;\r\n int starRepresent;\r\n maxFrequency = 0;\r\n \r\n for (int i = 0; i < frequency.size() -1; i++)\r\n {\r\n if (frequency.get(i) > maxFrequency)\r\n maxFrequency = frequency.get(i);\r\n }\r\n \r\n starRepresent = maxFrequency / 10;\r\n \r\n System.out.printf(\"%10s\", \"Frequency Distrubution\");\r\n System.out.println();\r\n System.out.printf(\"%10s\", \"( max freq is \" + maxFrequency + \")\");\r\n System.out.println();\r\n \r\n for (int i = 10; i > 0; i--)\r\n {\r\n for (int index = 0; index <= frequency.size() - 1; index++)\r\n {\r\n if (frequency.get(index) / starRepresent >= i)\r\n System.out.print(\"* \");\r\n else\r\n System.out.print(\" \");\r\n }\r\n System.out.print(\"\\n\");\r\n }\r\n return \"\";\r\n }", "private void writeHistograms(PrintWriter writer) {\n Set set = tokenSizes.entrySet();\n String delimiter = \"\\t\";\n double amount = 0;\n\t\tdouble histogramAmount = 0;\n\n // Use of Iterator for the while loop that is no longer being used.\n // Iterator iterator = set.iterator();\n\n // Implement the calculateMaximumAmount method for PROJECT 3 CORRECTION\n for(Map.Entry<Integer, Integer> entry : tokenSizes.entrySet()) {\n amount = calculateMaximumAmount();\n\t\t\thistogramAmount = (double) entry.getValue() * amount;\n writer.println(entry.getKey() + delimiter + printHistogram(histogramAmount));\n } \n\n /**\n * This is a while loop I used in project 1 but Paula told me to use an \n * enhanced for loop instead. \n *\n * while (iterator.hasNext()) {\n * Map.Entry me = (Map.Entry) iterator.next();\n * int tokenValue = (int) me.getValue();\n * writer.println(me.getKey() + \"\\t\" + printHistogram(tokenValue));\n * }\n */\n }", "Bundle build_daily_plot(int[] log_ids, String plotTitle, int dataIndex) {\n\n Bundle bundle = new Bundle();\n bundle.putString(\"plotTitle\", plotTitle);\n bundle.putBoolean(\"singleParm\", true);\n buildDailyValues(bundle, log_ids[0], \"1\", dataIndex); // for left y axis\n buildDailyValues(bundle, log_ids[1], \"2\", dataIndex); // for right y axis\n return bundle;\n }", "@Override\r\n\tpublic void setDataSeries(List<Double> factValues) {\n\r\n\t}", "public static Stats of(double... values) {\n/* 122 */ StatsAccumulator acummulator = new StatsAccumulator();\n/* 123 */ acummulator.addAll(values);\n/* 124 */ return acummulator.snapshot();\n/* */ }", "public KernelHistogram(int index, int size) {\n\n this.size = size / 2;\n value = index == MIDDLE ? size * size / 2 : index;\n\n }", "public UniqueDataPoint(double value) {\r\n\t\tsuper(value);\r\n\t\tthis.uniqueId = uniqueIdCount++;\r\n\t}", "public double [] plot(double from, double to, int size) \n{\n\tdouble increment = Math.abs((to-from)/size);\n\t\n\tdouble [] temp = new double [size];\n\n\tfor(int i=0; i<size; i++)\n\t\ttemp[i]=this.fuzzify(from+increment*i);\n\t\n\treturn temp;\n}", "@NotifyChange(\"lineChartData\")\r\n\t@Command(\"charts$getLineBarData\")\r\n\tpublic void getLineBarData() {\r\n\t\tthis.lineChartData = new ArrayList<Collection<Integer>>();\r\n\t\tlineChartData.add(CalendarService.get().getCountEventsByYear(2016)\r\n\t\t\t\t.values());\r\n\t}", "public void generateChart(){\n String[][] contents = retrieveFields();\n\n// String msg = \"test - \";\n// printCells(contents);\n\n String[] houseDisplay = new String[12];\n houseDisplay = new String[]{\"6\",\"4\",\"2\",\"1\",\"4\",\"6\",\"3\",\"5\",\"7/8\",\"\",\"5\",\"3\"};\n display(houseDisplay);\n }", "private void createChart() {\n LineChart lineChart = (LineChart) findViewById(R.id.line_chart);\n\n // LineChart DataSet\n ArrayList<LineDataSet> dataSets = new ArrayList<>();\n\n // x-coordinate format value\n XAxis xAxis = lineChart.getXAxis();\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setGranularity(1f); // only intervals of 1 day\n// xAxis.setValueFormatter(new DayAxisValueFormatter(lineChart));\n\n\n // x-coordinate value\n ArrayList<String> xValues = new ArrayList<>();\n xValues.add(\"No.1\");\n xValues.add(\"No.2\");\n xValues.add(\"No.3\");\n xValues.add(\"No.4\");\n xValues.add(\"No.5\");\n\n // value\n ArrayList<Entry> value = new ArrayList<>();\n String measureItemName = \"\";\n value.add(new Entry(100, 0));\n value.add(new Entry(120, 1));\n value.add(new Entry(150, 2));\n value.add(new Entry(250, 3));\n value.add(new Entry(500, 4));\n\n\n // add value to LineChart's DataSet\n LineDataSet valueDataSet = new LineDataSet(value, measureItemName);\n dataSets.add(valueDataSet);\n\n // set LineChart's DataSet to LineChart\n// lineChart.setData(new LineData(xValues, dataSets));\n lineChart.setData(new LineData(valueDataSet));\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil.inflate(inflater,R.layout.fragment_home_fault, container, false);\n\n progressDialog = new ProgressDialog(getContext());\n listMonitoring = new ArrayList<>();\n\n listFaultHistogram = new ArrayList<>();\n listColors = new ArrayList<>();\n /*BarDataSet barDataSet1 = new BarDataSet(barEntries1(), \"DataSet 1\");\n barDataSet1.setColor(Color.RED);\n BarDataSet barDataSet2 = new BarDataSet(barEntries2(), \"DataSet 2\");\n barDataSet2.setColor(Color.BLUE);\n BarDataSet barDataSet3 = new BarDataSet(barEntries3(), \"DataSet 3\");\n barDataSet3.setColor(Color.GREEN);\n BarDataSet barDataSet4 = new BarDataSet(barEntries4(), \"DataSet 4\");\n barDataSet4.setColor(Color.YELLOW);\n\n BarData data = new BarData(barDataSet1, barDataSet2, barDataSet3, barDataSet4);\n binding.barFault.setData(data);\n\n String[] days = new String[]{\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"};\n XAxis xAxis = binding.barFault.getXAxis();\n\n xAxis.setValueFormatter(new IndexAxisValueFormatter(days));\n xAxis.setGranularityEnabled(true);\n xAxis.setCenterAxisLabels(true);\n xAxis.setGranularity(1f);\n xAxis.setTextSize(10f);\n xAxis.setTextColor(Color.RED);\n xAxis.setDrawAxisLine(true);\n xAxis.setDrawGridLines(false);\n\n binding.barFault.setDragEnabled(true);\n binding.barFault.setVisibleXRangeMaximum(3);\n\n float barSpace = 0.08f;\n float groupSpace = 0.44f;\n data.setBarWidth(0.10f);\n\n binding.barFault.getXAxis().setAxisMinimum(0);\n// binding.barFault.getXAxis().setAxisMinimum(0 +\n// binding.barFault.getBarData().getGroupWidth(groupSpace, barSpace)*7);\n binding.barFault.getAxisLeft().setAxisMinimum(0);\n\n binding.barFault.groupBars(0, groupSpace, barSpace);\n\n\n binding.barFault.invalidate();\n\n Legend l = binding.barFault.getLegend();\n l.setFormSize(10f);\n l.setForm(Legend.LegendForm.CIRCLE);\n l.setTextSize(12f);\n l.setTextColor(Color.BLACK);*/\n\n getFaultDaily();\n\n return binding.getRoot();\n }", "public void writeLengthHistogram(String fileName) {\n\t\tString contents = \"Length,Frequency\\n\";\n\t\tint literalLength = 0;\n\t\tint frequency = 0;\n\t\tfor(String literal : literalsList) {\n\n\t\t\tliteral = literal.substring(literal.indexOf(\"\\\"\")+1, literal.lastIndexOf(\"\\\"\"));\n\t\t\t\n\t\t\tif(literal.length() == literalLength) {\n\t\t\t\tfrequency++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcontents += Integer.toString(literalLength) + \",\" + \n\t\t\t\t\t\t\tInteger.toString(frequency) + \"\\n\";\n\t\t\t\tfrequency = 1;\n\t\t\t\tliteralLength = literal.length();\n\t\t\t}\n\t\t}\n\t\tFileManager.writeToFile(fileName, contents);\n\t}", "private void makeChart() {\n\n Log.d(\"Chart\",\"Start Chart\");\n\n ArrayList<Entry> speedList = new ArrayList<>();\n ArrayList<Entry> avgSpeedList = new ArrayList<>();\n ArrayList<Entry> avgAltList = new ArrayList<>();\n\n int numberOfValues = trackingList.size();\n\n //Fills the data in the Arrays Entry (xValue,yValue)\n for(int i = 0; i < numberOfValues;i++){\n float avgSpeed = (float)averageSpeed;\n float avgAlt = (float)averageAlt;\n float curSpeed = (float)trackingList.get(i).getSpeed();\n\n Log.d(\"Chart\",\"CurSpeed: \" +curSpeed);\n\n avgSpeedList.add(new Entry(i*3,avgSpeed));\n speedList.add(new Entry(i*3,curSpeed));\n avgAltList.add(new Entry(i*3,avgAlt));\n }\n\n ArrayList<String> xAXES = new ArrayList<>();\n\n\n String[] xaxes = new String[xAXES.size()];\n for(int i=0; i<xAXES.size();i++){\n xaxes[i] = xAXES.get(i);\n }\n\n // More than one Array (Line in the Graph)\n ArrayList<ILineDataSet> lineDataSets = new ArrayList<>();\n\n //Speed Graph setup\n LineDataSet lineDataSet1 = new LineDataSet(speedList,\"Speed\");\n lineDataSet1.setDrawCircles(false);\n lineDataSet1.setColor(Color.BLUE);\n lineDataSet1.setLineWidth(2);\n\n //AvgSpeed setup\n LineDataSet lineDataSet2 = new LineDataSet(avgSpeedList,\"AvgSpeedLine\");\n lineDataSet2.setDrawCircles(false);\n lineDataSet2.setColor(Color.RED);\n lineDataSet2.setLineWidth(3);\n\n //AvgAlt setup\n LineDataSet lineDataSet3 = new LineDataSet(avgAltList,\"AvgAltLine\");\n lineDataSet3.setDrawCircles(false);\n lineDataSet3.setColor(Color.MAGENTA);\n lineDataSet3.setLineWidth(3);\n\n //Add them to the List\n lineDataSets.add(lineDataSet1);\n lineDataSets.add(lineDataSet2);\n lineDataSets.add(lineDataSet3);\n\n //setup for the xAxis\n XAxis xAxis = lineChart.getXAxis();\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n\n //Puts the data in the Graph\n lineChart.setData(new LineData(lineDataSets));\n lineChart.setVisibleXRangeMaximum(65f);\n\n //Chart description\n lineChart.getDescription().setText(\"All Speed\");\n\n //Shows timer information when clicked\n lineChart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getApplicationContext(), \"Its measured every 3 seconds\",Toast.LENGTH_LONG).show();\n }\n });\n }", "private void prepareData(List<String[]> subset, Set<String> selections) {\n Bundle chartBundle = new Bundle();\n //Get the years and user selected data for the graph\n ArrayList<String> year = new ArrayList<>();\n ArrayList<ArrayList<Float>> data = new ArrayList<>();\n ArrayList<String> options = new ArrayList<>();\n float max=Float.MIN_VALUE;\n float min=Float.MAX_VALUE;\n boolean useLog = false;\n for (String option : selections) {\n //Loop over options\n ArrayList<Float> dataSeries = new ArrayList<>();\n int numOption = Integer.parseInt(option);\n //For every option get data required for the option\n options.add(OPTION_NAMES[numOption]);\n for (String[] line : subset) {\n dataSeries.add(Float.valueOf(line[numOption + CONSTANT]));\n }\n //Keep track of maximum of minimum values user has requested\n float tempMax = Collections.max(dataSeries);\n float tempMin = Collections.min(dataSeries);\n if (tempMax>max){\n max = tempMax;\n }\n if (tempMin<min && tempMin!=0){\n min=tempMin;\n }\n //Add user option to overall data they want to see\n data.add(dataSeries);\n }\n for (String[] line : subset) {\n //Loop preparing list of labels for X Axis\n year.add(line[2]);\n }\n if ((max/min)>50){\n //If the biggest and smallest values have a range bigger than factor of 50 then convert values to log scale\n useLog=true;\n for (int i=0;i<data.size();i++){\n //Loop which removes the data entries, converts them to log and then places them back to their original position in ArrayList\n ArrayList<Float> tempEntry = data.get(i);\n data.remove(i);\n ArrayList<Float> convertedValues = convertToLog(tempEntry);\n data.add(i,convertedValues);\n }\n }\n //Putting all the values in the Bundle in preparation for ChartActivity\n chartBundle.putSerializable(\"Data\", data);\n chartBundle.putString(\"country\", user_choice);\n chartBundle.putSerializable(\"Label\", options);\n chartBundle.putSerializable(\"year\", year);\n chartBundle.putBoolean(\"log\",useLog);\n Intent chart_intent = new Intent(this, ChartActivity.class);\n chart_intent.putExtra(\"Bundle\", chartBundle);\n startActivity(chart_intent);\n }", "public static int[] histogram (int[] ages)\n {\n \t// If ages array has no elements, return an array that has one element of 0 to show that no ages were contained in the ages array\n \t\n \tif(ages.length == 0)\n \t{\n \t\tint[] agesCount = new int[1];\n \t\tagesCount[0] = 0;\n \t\treturn agesCount;\n \t}\n \t\n \t// Find maximum age in the ages array to then determine size of the list that will be returned\n \t\n \tint maxAge = ages[0];\n \t\n \tfor(int i = 1; i < ages.length; i++)\n \t\tif(ages[i] > maxAge)\n \t\t\tmaxAge = ages[i];\n \t\n \tint arraySize = maxAge + 1;\n \t\n \t// Create the array that will be returned based on the size determined above\n \t\n \tint[] agesCount = new int[arraySize];\n \t\n \t// Loop through the ages array and increment the agesCount array depending on the values taken from the ages array\n \t\n \tfor (int temp : ages)\n\t\t\tagesCount[temp] += 1;\n \t\n return agesCount; // You will write this method as part of programming assignment #7. \n }", "private CounterDistribution distribution(long... values) {\n CounterDistribution dist = CounterDistribution.empty();\n for (long value : values) {\n dist = dist.addValue(value);\n }\n\n return dist;\n }", "public XYData(double x[], float y[], double resolution)\n\t{\n\t\tthis.resolution = resolution;\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tincreasingX = true;\n\t\tnSamples = (x.length < y.length) ? x.length : y.length;\n\t\tif (nSamples > 0)\n\t\t{\n\t\t\txMin = xMax = x[0];\n\t\t\tfor (int i = 1; i < x.length; i++)\n\t\t\t{\n\t\t\t\tif (x[i - 1] > x[i])\n\t\t\t\t{\n\t\t\t\t\tincreasingX = false;\n\t\t\t\t}\n\t\t\t\tif (x[i] > xMax)\n\t\t\t\t\txMax = x[i];\n\t\t\t\tif (x[i] < xMin)\n\t\t\t\t\txMin = x[i];\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6841636", "0.65286547", "0.6271459", "0.6192513", "0.6126548", "0.5985177", "0.59069556", "0.5880368", "0.5880117", "0.5828202", "0.5797747", "0.572876", "0.560326", "0.55921173", "0.55872256", "0.55803144", "0.5515927", "0.5491051", "0.5488826", "0.54663575", "0.54155624", "0.5401364", "0.53708076", "0.53579456", "0.5357283", "0.52901983", "0.52877533", "0.52787256", "0.5277434", "0.5276027", "0.52477074", "0.5246728", "0.52289236", "0.51326066", "0.5122347", "0.5112105", "0.5071497", "0.50539637", "0.50419426", "0.5041693", "0.50159943", "0.5010393", "0.5001604", "0.4970438", "0.494201", "0.4932763", "0.49230587", "0.4916456", "0.49128082", "0.4907293", "0.48919", "0.48913205", "0.4890518", "0.48853076", "0.48818538", "0.48784697", "0.48579022", "0.484318", "0.48374954", "0.48370034", "0.48140138", "0.47995365", "0.47910964", "0.47836483", "0.4777709", "0.4764666", "0.4762298", "0.47553915", "0.47502264", "0.47493544", "0.47407228", "0.47358462", "0.47267297", "0.47264227", "0.4720604", "0.4719102", "0.47127646", "0.46943364", "0.467983", "0.46766743", "0.46746033", "0.46710733", "0.46500772", "0.4649455", "0.46479988", "0.46469197", "0.46418226", "0.46358722", "0.46344876", "0.46343112", "0.46188", "0.4607367", "0.46068272", "0.46047306", "0.46026167", "0.45945075", "0.458821", "0.45731983", "0.45731077", "0.45653504" ]
0.5912219
6
Service Interface for Courier
@Service public interface CourierService { public Long saveCourier(Courier courier); public Courier searchCourierByCode(String code); // public boolean checkCourierByEmail(String email); // public void updateCourier(Courier courier); public List<String> getAllEnabledCourierCode(); public List<String> getAllCourierCode(); public List<Courier> getCourierByType(String type); public void enableCourier(Long id); public void disableCourier(Long id); public Courier findCourierByid(Long id); public List<Courier> getAllcourier(); public List<Courier> getEnabledCourier(); public boolean checkName(String courierName); public boolean checkCode(String courierCode); public Long getCourierIdByCode(String Code); // public AWBResult getAWB(String pincode, String shippingMode); // public void unSetAWB(String courierCode, String trackingNumber); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ControllcurveService extends Service<Controllcurve> {\n\n}", "public interface PrescriptionLineService {\n Prescriptionline create(Prescriptionline prescriptionline);\n Prescriptionline read(int prescriptionId);\n Prescriptionline update(Prescriptionline prescriptionline);\n double taxDue();\n double prescriptionTotal(int quantity);\n void delete(int prescriptionId);\n}", "public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}", "public interface EzService {\n}", "private FournisseurArboTraficService() {\r\n\t\tsuper();\r\n\t}", "public interface TearcherInfoService extends Service<TearcherInfo> {\n\n}", "public interface CloanUserRecordService {\n}", "public interface BusDistributorService extends Services<BusDistributor,Long> {\r\n}", "public interface CreditLineService {\n\n\t/**\n\t * Calcula o montante <i>amount</i> final que cada {@link Client} tem ja com o juros\n\t * calculados conforme regra.\n\t * \n\t * @param client - O client relativo.\n\t * @param venture - O tipo de Risco. Veja mais em {@link Venture}\n\t * @param value - O valor solicitado de emprestimo.\n\t * @return - O objeto contendo valor calculado mais os dados do cliente Veja mais em {@link Amount}.\n\t */\n\tAmount calculateAmount(Client client, Venture venture, BigDecimal value);\n\n\t/**\n\t * Calcula o valor do montante final que cada {@link Client} tem ja com o juros\n\t * calculados conforme regra.\n\t * \n\t * @param client - O client relativo.\n\t * @param venture - O tipo de Risco. Veja mais em {@link Venture}\n\t * @param value - O valor solicitado de emprestimo.\n\t * @return - O objeto contendo valor calculado mais os dados do cliente Veja mais em {@link Amount}.\n\t */\n\tBigDecimal calculateAmountValue(Venture venture, BigDecimal value);\n}", "public interface TicketService {\n\n public String getTicket();\n\n}", "public interface Service {\n // Service-specific methods go here\n }", "public interface PenaliteService {\n\n\t/**\n\t * Calcule de penalite est creation de {@link PenaliteBillingInfo}.\n\t * \n\t * @param referenceContrat\n\t * reference du contrat.\n\t * @param numEC\n\t * numero elementcontractuel.\n\t * @param version\n\t * version.\n\t * @param engagement\n\t * engagement.\n\t * @param periodicite\n\t * periodicite.\n\t * @param montant\n\t * montant.\n\t * @param derniereFactureDate\n\t * derniere date de facturation.\n\t * @param debutFacturationDate\n\t * date debut facturation.\n\t * @param finEngagementDate\n\t * date fin engagement.\n\t * @param finContratDate\n\t * date fin contrat.\n\t * @return {@link PenaliteBillingInfo}.\n\t * @throws TopazeException\n\t * {@link TopazeException}.\n\t */\n\tPenaliteBillingInfo getPenaliteBillingInfo(String referenceContrat, Integer numEC, Integer version,\n\t\t\tInteger engagement, Integer periodicite, Double montant, Date derniereFactureDate,\n\t\t\tDate debutFacturationDate, Date finEngagementDate, Date finContratDate) throws TopazeException;\n\n}", "public interface SubscriberService {\n\n /**\n * update Subscriber in database\n *\n * @param record Subscriber type object\n */\n void update(Subscriber record);\n\n /**\n * create new Subscriber record in database\n *\n * @param subscriber Subscriber type object\n */\n Subscriber create(Subscriber subscriber);\n\n /**\n * Delete all subscribers from database\n */\n void deleteAll();\n \n}", "public interface TransportService {\n\n /**\n * Create and persist a new transport.\n *\n * @param request the new transport data\n *\n * @return the new transport object, if successful\n */\n Transport storeTransport(@NotNull EezerStoreTransportRequest request);\n\n /**\n * Remove an existing transport by it's transportId.\n *\n * !!! NOTE: USUALLY WE DON'T DO THIS !!!\n *\n * @param transportId the transportId to remove\n */\n void removeTransport(@NotNull String transportId);\n\n /**\n * Fetch all existing transports in the system.\n * We don't return coordinates here, there is a\n * separate call for that.\n *\n * @return a list of all existing transports\n */\n List<Transport> getTransports();\n\n /**\n * Fetch all coordinates associated with a\n * specific transport.\n *\n * @param transportId the transportId\n *\n * @return a list of all coordinates\n */\n List<Coordinate> getCoordinates(@NotNull String transportId);\n\n}", "public interface ClientService {\n\n /**\n * This service adds the given client to the database.\n * Afterwards with the help of ClientEntity the Client will be persistent.\n *\n * @param client is the Client to add.\n * @return This service returns the persistent DB Client.\n * @throws BaseException as exception.\n */\n Client addClient(Client client) throws BaseException;\n\n /**\n * Update a client service.\n *\n * @param client the client to be updated.\n * @return updated client.\n * @throws BaseException as exception.\n */\n Client updateClient(Client client) throws BaseException;\n\n /**\n * Find client by ID.\n * @param id the ID of a client.\n * @return a client.\n * @throws BaseException as exception.\n */\n Client findClientById(Long id) throws BaseException;\n\n /**\n * It gives back a list of clients, belonging to a user.\n * @param user the employee.\n * @return list of clients.\n * @throws BaseException as exception.\n */\n List<ClientResponse> findUsersClient(User user) throws BaseException;\n}", "public interface CustomerService {\n\t/**\n\t * Metodo para insertar un cliente Customer en la base de datos PostgreSQL\n\t * \n\t * @param customer - Cliente de tipo Customer\n\t */\n\tvoid insert(Customer customer);\n\n\t/**\n\t * Metodo para insertar un bloque (coleccion) de cliente Customer en la base de\n\t * datos PostgreSQL\n\t * \n\t * @param customers - Lista de clientes de tipo List<Customer>\n\t */\n\tvoid insertBatch(List<Customer> customers);\n\n\t/**\n\t * Metodo que devuelve todos los clientes Customer de la base de datos\n\t * PostgreSQL\n\t * \n\t * @return Una Lista (java.utils) de tipo List<Customer> con todos los clientes\n\t * de la base de datos PostgreSQL\n\t */\n\tList<Customer> loadAllCustomer();\n\n\t/**\n\t * Metodo que devuelve un cliente Customer a partir de su identificador\n\t * customerId\n\t * \n\t * @param customerId - Identificador del cliente de tipo Integer\n\t * @return Cliente a devolver de tipo Customer\n\t */\n\tCustomer getCustomerById(int customerId);\n\n\t/**\n\t * Metodo que devuelve el nombre String de un cliente Customer a partir de su\n\t * identificador customerId\n\t * \n\t * @param customerId - Identificador de cliente de tipo Integer\n\t * @return String - Nombre del cliente de tipo String\n\t */\n\tString getCustomerNameById(int customerId);\n\n\t/**\n\t * Metodo que devuelve el numero Integer total de clientes en la base de datos\n\t * PostgreSQL\n\t * \n\t * @return El numero total de clientes de tipo Integer\n\t */\n\tvoid getTotalNumerCustomer();\n\n\t/**\n\t * Metodo que elimina un cliente Customer de la base de datos PostgreSQL a\n\t * partir de su identificador customerId\n\t * \n\t * @param customerId - Identificador del cliente Customer de tipo Integer\n\t */\n\tvoid deleteCustomerById(int customerId);\n\n\t/**\n\t * Metodo que actualiza la informacion un cliente Customer ya existente en la\n\t * base de datos PostgreSQL\n\t * \n\t * @param customer - Cliente con la informacion a ser actualizada de tipo\n\t * Customer\n\t */\n\tvoid updateCustomerById(Customer customer);\n}", "public interface MaDeductionItemService extends Service<MaDeductionItem> {\n public List<MaDeductionItems> getMark(String domainUnid);\n}", "public interface CustomerServiceI {\n\n /**\n * 查询所有客户信息\n * @param jsonStr\n * @return\n * @throws Exception\n */\n public String queryAllCustomer(String jsonStr) throws Exception;\n\n /**\n * 验证邮箱是否可用\n * @param jsonStr\n * @return\n * @throws Exception\n */\n public String validCustomerMailForAdd(String jsonStr) throws Exception;\n\n /**\n * 保存草稿状态客户信息\n * @param jsonStr\n * @return\n * @throws Exception\n */\n public String saveDraftCustomer(String jsonStr) throws Exception;\n\n /**\n * 保存确认状态客户信息\n * @param jsonStr\n * @return\n * @throws Exception\n */\n public String saveConfirmCustomer(String jsonStr) throws Exception;\n\n /**\n * 锁定客户信息\n * @param jsonStr\n * @return\n * @throws Exception\n */\n public String lockCustomerById(String jsonStr) throws Exception;\n\n /**\n * 解锁客户信息\n * @param jsonStr\n * @return\n * @throws Exception\n */\n public String unlockCustomerById(String jsonStr) throws Exception;\n\n /**\n * 重置客户密码\n * @param jsonStr\n * @return\n * @throws Exception\n */\n public String resetCustomerPasswd(String jsonStr) throws Exception;\n\n /**\n * 根据ID查询客户详细信息\n * @param jsonStr\n * @return\n * @throws Exception\n */\n public String queryCustomerById(String jsonStr) throws Exception;\n\n /**\n * 根据ID编辑客户信息\n * @param jsonStr\n * @return\n * @throws Exception\n */\n public String updateCustomerById(String jsonStr) throws Exception;\n}", "public interface PaTaskItemPointViewService extends Service<PaTaskItemPointView> {\n\n}", "public interface SponsorService {\n public Sponsor addSponsor(Sponsor sponsor) throws BaseException;\n\n public Integer updateSponsor(Sponsor sponsor) throws BaseException;\n\n public Integer updateSponsorStatusByID(Map<String,String> params) throws BaseException;\n\n public Sponsor findSponsorByID(Map<String,String> params) throws BaseException;\n\n public Page<Sponsor> findSponsorList(Map<String,String> params,PaginationParameters paginationParameters) throws BaseException;\n}", "public ServiceCompte() {\n\t\tsuper();\n\t}", "public interface ProcesoVENService extends Service {\n\n\t/**\n\t * Ejecuta procedimiento generico\n\t * @param nombreExecute\n\t * @param criteria\n\t */\n\tpublic void executeGenerico(String nombreExecute, Map criteria) ;\n\t\n\t/**Actualiza calensarios\n\t * @param calendario\n\t * @param usuario\n\t */\n\tpublic void updateCalendario(Calendario calendario, Usuario usuario);\n\t\n\t/**devuelve lista de calendarios\n\t * @param criteria\n\t * @return\n\t */\n\tpublic List getCalendarios(Map criteria);\n\t\n\t/**\n\t * devuelve el calendario\n\t * @param criteria\n\t * @return\n\t */\n\tpublic Calendario getCalendario(Map criteria);\n\t\n /**\n * devuelve los feriados d euna zona\n * @param criteria\n * @return\n */\n public List getFeriadoZona(Map criteria);\n\t\n\t/**\n\t * Actualiza feriados de una zona\n\t * @param feriadoZona\n\t * @param usuario\n\t */\n\tpublic void updateFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);\n\t\n\t/**\n\t * Inserta los feriados de una zona\n\t * @param feriadoZona\n\t * @param usuario\n\t */\n\tpublic void insertFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);\n\t\n\t/**\n\t * elimina los feriados d euna zona\n\t * @param feriadoZona\n\t * @param usuario\n\t */\n\tpublic void deleteFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);\n\n\t/**\n\t * Metodo que trae las zonas de una region\n\t * @param feriadoRegion\n\t * @return\n\t */\n\tpublic List getZonasRegion(String feriadoRegion);\n\n\t/**\n\t * Retorna el indicador de habilitacion RUV\n\t * @param criteria\n\t * @return\n\t */\n\tpublic String getIndicadorHabilitacionRuv(Map criteria);\n\n\t/**\n\t * Genera la informacion para el reporte RUV\n\t * @param map\n\t */\n\tpublic void executeGeneracionReporteRUV(Map map);\n\t\n\t/**\n\t * Genera los archivos de libro de ventas - detalles SII\n\t * @param map\n\t */\n\tpublic void executeGenerarArchivosLibroVentasDetalleSII(Map map);\n\t\n}", "public interface QuoteService {\n\n /**\n * Get quote of the day.\n *\n * @return quote\n */\n String getQuoteOfTheDay();\n}", "public interface Service {\n\n}", "public interface Service {\n\n}", "public interface TransacaoService {\n\n List<TransacaoDTO> getAll();\n List<TransacaoDTO> getByCliente(String cpf);\n TransacaoDTO salvarTransacao(CreateTransacaoDTO createTransacaoDTO);\n TransacaoDTO atualizarTransacao(Integer id, TransacaoDTO transacaoDTO);\n void deletarTransacao( Integer id);\n InputStreamResource getExtrato(String cpf) throws IOException;\n InputStreamResource getExtratoByCartao(Integer id) throws IOException;\n}", "public interface GrabTicketQueryService {\n\n\n /**\n * 抢票查询\n * @param method\n * @param train_date\n * @param from_station\n * @param to_station\n * @return\n */\n JSONObject grabTicketQuery(String uid, String partnerid, String method, String from_station, String to_station, String from_station_name, String to_station_name, String train_date, String purpose_codes);\n// JSONObject grabTicketQuery(String partnerid, String method, String from_station, String to_station, String train_date, String purpose_codes);\n}", "public interface Service {\r\n\t\r\n\t public Customer createAccount(Customer c) \r\n\t\t\t throws InvalidInputException; \r\n\t public Customer getBalance(String mobile) \r\n\t\t\t throws AccountNotFoundException, InvalidInputException;\r\n\t public Customer FundTransfer\r\n\t (String fromMobile, String toMobile, double amount)\r\n throws AccountNotFoundException,InvalidInputException, InsufficientBalanceException;\r\n\t \r\n\t public Customer deposit (String mobile, double amount)\r\n\t throws AccountNotFoundException,InvalidInputException, InsufficientBalanceException;\r\n\r\n}", "public interface SalesContractService extends BaseService<SalesContract> {\n int insertSalesContract(SalesContract salesContract) throws Exception;\n int deliver(SalesContract salesContract) throws Exception;\n}", "public interface RentToBuyService {\n}", "public interface OrderPrePayService {\n\n int add(OrderPrePayDO orderPrePayDO);\n\n int deleteByOrderNo(String orderNo);\n\n OrderPrePayDO queryByOrderNo(String orderNo);\n}", "public interface ClinicService {\n\n List<Client> getClientById(long id);\n List<Client> getClientByName(String name);\n List<Client> getAllClients();\n void deleteClientById(long id);\n void updateClient(Client client);\n void insertClientToDB(Client client);\n void updateClientById(long id);\n List<Map<String, String>> getAllClientsWithDoctors();\n List<Map<String, String>> getClientWithDoctorsById(long id);\n\n void insertDoctor(Doctor doctor);\n void deleteDoctorById(long id);\n void updateDoctor(Doctor doctor);\n List<Doctor> getDoctorByName(String firstname);\n List<Doctor> getDoctorById(long id);\n List<Doctor> getAllDoctors();\n\n}", "public interface SmartCultureFarmService extends Service<SmartCultureFarm> {\n\n}", "public interface TrakkerService {\n\tGeoTrak create(final GeoTrak trak);\n}", "public interface OrderService {\n\n /**\n * 司机发布信息\n *\n * @param idno\n * @param driverShareInfo\n * @return\n */\n DriverShareInfo shareDriverInfo(String idno, DriverShareInfo driverShareInfo);\n\n /**\n * 乘客预定校验\n *\n * @param idno\n * @param driverOrderId\n * @param passerOrderId\n * @param genToken\n * @return\n */\n Result passerReserveCheck(String idno, Long driverOrderId, Long passerOrderId, boolean genToken);\n\n /**\n * 乘客预定\n *\n * @param radomToken\n * @param idno\n * @param driverOrderId\n * @param passerOrderId\n * @return\n */\n Result passerReserve(String radomToken, String idno, Long driverOrderId, Long passerOrderId);\n\n\n}", "public interface RmrkXTeeService {\n /**\n * Send a document to the treasury.\n * \n * @param uniqueId A unique identifier for the document\n * @param type Type specified by their service analysis document\n * @param manus A signed digidoc container containing the document\n * @return\n * @throws XRoadServiceConsumptionException\n */\n String sendDocument(String uniqueId, String type, byte[] document) throws XRoadServiceConsumptionException;\n}", "Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}", "public interface ITicketService {\r\n\t/**\r\n\t * The number of seats in the venue that are neither held nor reserved\r\n\t *\r\n\t * @return the number of tickets available in the venue\r\n\t */\r\n\tint numSeatsAvailable();\r\n\r\n\t/**\r\n\t * Find and hold the best available seats for a customer\r\n\t *\r\n\t * @param numSeats\r\n\t * - the number of seats to find and hold\r\n\t * @param customerEmail\r\n\t * - unique identifier for the customer\r\n\t * @return a SeatHoldInterface interface identifying the object identifying\r\n\t * the specific seats and related information\r\n\t * @throws SeatsNotAvailableException\r\n\t * - if the requested seats are not available\r\n\t */\r\n\tList<ISeatHold> findAndHoldSeats(int numSeats, String customerEmail) throws SeatsNotAvailableException;\r\n\r\n\t/**\r\n\t * Commit seats held for a specific customer\r\n\t *\r\n\t * @param seatHoldId\r\n\t * - the seat hold identifier\r\n\t * @param customerEmail\r\n\t * - the email address of the customer to which the seat hold is\r\n\t * assigned\r\n\t * @return a reservation confirmation code\r\n\t * @throws SeatsNotAvailableException\r\n\t * - - if the requested seats are not available\r\n\t * @throws BookingNotAvailableException\r\n\t * - if the requested hold is not valid or not available\r\n\t */\r\n\tString reserveSeats(String seatHoldId, String customerEmail) throws BookingNotAvailableException;\r\n\r\n\t/**\r\n\t * Get Venue object\r\n\t * \r\n\t * @return the venue object\r\n\t */\r\n\tIVenue getVenue();\r\n\r\n\t/**\r\n\t * Commit seats held for a specific customer\r\n\t *\r\n\t * @param seatHoldId\r\n\t * - the seat hold identifier\r\n\t * @param customerEmail\r\n\t * - the email address of the customer to which the seat hold is\r\n\t * assigned\r\n\t * @return a reservation confirmation code\r\n\t * @throws BookingNotAvailableException\r\n\t * - if the requested hold is not valid or not available\r\n\t */\r\n\tIBooking getSeatonHold(String seatHoldId, String customerEmail) throws BookingNotAvailableException;\r\n\r\n}", "public interface IPaymentService {\r\n\r\n\r\n\r\n\t/**\r\n\t * Metodo que permite hacer le pago por PSE\r\n\t * @return factura de la factura generada\r\n\t */\r\n\tpublic FacturaCompra pagoPSE(String userName,TipoMoneda tipoMoneda);\r\n\t\r\n\t\r\n\t/**\r\n\t * Metodo que permite hacer le pago por PSE\r\n\t * @return factura de la factura generada\r\n\t */\r\n\tpublic FacturaCompra pagoCreditCard(String userName,TipoMoneda tipoMoneda);\r\n\t\r\n\t/**\r\n\t * Metodo que permite realizar el pago \r\n\t * mediante efectivo en un punto de pago\r\n\t * @return\r\n\t */\r\n\tpublic FacturaCompra cashOnDelivery(String userName,TipoMoneda tipoMoneda);\r\n\t\r\n}", "public interface CustomizationService {\n public int add(Customization customization);\n\n public int delete(int id);\n\n public Customization get(int id);\n\n public int update(Customization customization);\n\n public List<Customization> list();\n\n public List<Customization> listByUid(int uid);\n}", "public interface TicketService extends BaseService<Ticket, String>{\r\n\r\n}", "public interface PosWithdrawService extends GenericService<PosWithdrawRecord,String> {\n\n List<PosWithdrawRecord> selectByExampleAndPage(DataTablesPage<PosWithdrawRecord> page, BaseExample baseExample);\n\n PosWithdrawRecord getPosWithdrawRecordById(int id);\n\n void updateResult(PosWithdrawRecord posWithdrawRecord,\n String money,\n String orderLogNo,\n String lklMerchantCode,\n String lklTerminalCode);\n\n void deleteSend(int pid);\n\n void inserBatchPosWithdraw(List<PosWithdrawRecord> posWithdrawRecord);\n\n PosWithdrawRecord getCountWithdraw();\n\n List<PosWithdrawRecord> searchSendRecordList(PosWithdrawRecord posWithdrawRecord);\n\n}", "public interface OrderlineService {\n\n List<Orderline> getAllOrderline();\n\n void insertOrderLine(Orderline orderline);\n\n List<Order> selectAllOrder();\n\n List<Order> selectALlOrderByID(int orderid);\n\n Address selectAddressByID(int addressId);\n\n List<Orderline> selectALlOrderlineByID(int orderId);\n}", "public interface BookOnAppointmentService extends IService<BookOnAppointment> {\n BookOnAppointment book(ZegnaModel model);\n\n boolean isBooked(Integer memberId);\n\n void logMember(ZegnaModel model);\n}", "public interface ClientAccountService {\n /**\n * List all client accounts stored in the database.\n *\n * @return - a list containing all client accounts, null if no accounts exist\n * @throws ServiceException - thrown when a DaoException exception occurs\n */\n List<ClientAccount> getAllClientAccounts() throws ServiceException;\n\n /**\n * List all accounts of a specified client.\n *\n * @param clientId - id of client whose accounts will be listed\n * @return - a list containing all the account of a specified client, null if no accounts are\n * found\n * @throws ServiceException - thrown when a DaoException exception occurs\n */\n Set<ClientAccount> getClientAccounts(Integer clientId) throws ServiceException;\n\n /**\n * Retrieves an instance of a ClientAccount object with the specified id from the database.\n *\n * @param clientAccountId - the id of the client account to be retrieved\n * @return - an instance of client account which matches the given id, null if no match found\n * @throws ServiceException - thrown when a DaoException exception occurs\n */\n ClientAccount getClientAccountById(Integer clientAccountId) throws ServiceException;\n\n /**\n * Retrieves an initilialized instance of a ClientAccount object with the specified id from the database.\n *\n * @param clientAccountId - the id of the client account to be retrieved\n * @return - an instance of client account which matches the given id, null if no match found\n * @throws ServiceException - thrown when a DaoException exception occurs\n */\n ClientAccount getInitializedClientAccountById(Integer clientAccountId) throws ServiceException;\n\n /**\n * Inserts a client account into the database.\n *\n * @param account - account to be inserted\n * @return - a message about the result of the operation\n * @throws ServiceException - thrown when an DaoException exception occurs\n */\n String insertClientAccount(ClientAccount account) throws ServiceException;\n\n /**\n * Updates a client account based on a ClientAccount object.\n *\n * @param account - account to be updated\n * @return - a message about the result of the operation\n * @throws ServiceException - thrown when a DaoException exception occurs\n */\n String updateClientAccount(ClientAccount account) throws ServiceException;\n\n /**\n * Deletes a client account from the database.\n *\n * @param clientAccountId - id of the client account to be deleted\n * @return - a message about the operations result\n * @throws ServiceException - thrown when a DaoException exception occurs\n */\n String deleteClientAccount(Integer clientAccountId) throws ServiceException;\n\n /**\n * Adds balance to a specified client account id;\n *\n * @param clientAccountId - id of the client account\n * @param balance - balance to be added\n * @return - a message about the operation's result\n * @throws ServiceException - thrown when a DaoException occurs\n */\n String addBalance(Integer clientAccountId, Integer balance) throws ServiceException;\n}", "public interface CustomerService {\n List<Customer> findPubsea();\n\n List<Customer> findCustomer();\n\n void update(Customer customer);\n\n /**\n * 公海客户认领\n * @param customerId\n * @param loginUser\n */\n void claim(Long customerId, LoginUser loginUser);\n}", "public interface RecustomerTableService extends Service<RecustomerTable> {\n List<RecustomerTable> selectUsers();\n\n int insertByRebackUser(RecustomerTable recustomerTable);\n}", "public interface LearningSpaceServices {\n\n\n}", "public void service() {\n\t}", "public interface SerService {\n\n List<SService> findwithPageInfo(Integer pageNo, Integer pageSize);\n\n PageInfo<SService> getPageInfo(Integer pageSize);\n\n SService findById(Integer id);\n\n void modi(SService sService);\n\n void add(SService sService, String samePasswd);\n\n void setStateS(Integer id);\n\n void delS(Integer id);\n\n\n List<SService> findS(String osUsername, String unixHost, String status, Integer accountId);\n\n void updateCost(SService sService);\n}", "public interface EavropDocumentService {\n\t\n\n\t/**\n\t * Adds to the eavrop an externally received document, will potentially affect the start date of the eavrop assessment period \n\t *\n\t * @param aCommand\n\t */\n\tpublic boolean addReceivedExternalDocument(AddReceivedExternalDocumentsCommand aCommand);\n\n\t/**\n\t * Adds to the eavrop an internally received document \n\t *\n\t * @param aCommand\n\t */\n\tpublic void addReceivedInternalDocument(AddReceivedInternalDocumentCommand aCommand);\n\n\t/**\n\t * Adds to the eavrop a requested document\n\t * @param aCommand\n\t */\n\tpublic RequestedDocument addRequestedDocument(AddRequestedDocumentCommand aCommand);\n\n}", "public interface ClientService {\n\n void add(String name, String country);\n\n List<Client> findAll();\n\n Client findById(int i);\n}", "public interface FortuneService {\n\n public String getFortune();\n}", "public interface IInvoiceService {\r\n\r\n\t/**\r\n\t * Get a list of invoices from persistence layer\r\n\t * @return all items\r\n\t */\r\n\tList<InvoiceDTO> fetchAll();\r\n\r\n\t/**\r\n\t * Get invoice from persistence layer\r\n\t * @param id a unique lookup\r\n\t * @return an invoice with a matching ID\r\n\t */\r\n\tInvoiceDTO fetchByID(int id);\r\n\r\n\t/**\r\n\t * Add the given DTO\r\n\t * @param invoiceDTO an invoice dto without an ID\r\n\t * @return Success or failure\r\n\t */\r\n\tboolean add(InvoiceDTO invoiceDTO);\r\n\t\r\n\t/**\r\n\t * Edit the given DTO by ID\r\n\t * @param itemDTO an invoice dto with an ID\r\n\t * @return Success or failure\r\n\t */\r\n\tboolean edit(InvoiceDTO invoiceDTO);\r\n\r\n}", "public interface ISysDeptService extends IBaseService<SysDept> {\n\n /**\n * 校验部门名称是否唯一\n *\n * @param dept 部门信息\n * @return 结果\n */\n String checkDeptNameUnique(SysDept dept);\n\n /**\n * 查询部门是否存在用户\n *\n * @param deptId 部门ID\n * @return 结果 true 存在 false 不存在\n */\n Boolean checkDeptExistUser(Long deptId);\n\n /**\n * 查询部门管理树\n *\n * @param dept 部门信息\n * @return 所有部门信息\n */\n List<Ztree> selectDeptTree(SysDept dept);\n\n /**\n * 根据角色ID查询菜单\n *\n * @param role 角色对象\n * @return 菜单列表\n */\n List<Ztree> roleDeptTreeData(SysRole role);\n}", "public interface ConsultarExpedienteService {\n \n DyctContribuyenteDTO buscarNumcontrol(String numControl); \n \n DeclaracionConsultarExpedienteVO buscarOrigenSaldo(String numControl); \n \n ExpedienteDTO buscarExpedienteNumControl(String noControl);\n \n TramiteCortoDTO buscaNumeroControl(String noControl, String rfc);\n \n TramiteCortoDTO buscaNumeroControl(String noControl);\n \n List<DocumentoReqDTO> buscaDocumentoRequerido (String numControl);\n \n List<SolicitudAdministrarSolVO> selecXNumControlEstAprobado(String numControl);\n\n void actualizarFolioNYVFechaNoti(String numControlDoc, String numControl, String folio, String fecha) throws SIATException;\n \n}", "public interface TempusService extends Serializable {\n\n\t/**\n\t * Initialize the service \n\t * \n\t * @param rowanApp\n\t */\n\tpublic void init(TempusApp rowanApp) throws Exception;\n\n}", "public interface GigyaAuthService\n{\n\n\t/**\n\t * Method to assign authorisations to the customer after fetching it from SAP CDC.\n\t *\n\t * @param customer\n\t * The customer model \n\t */\n\tvoid assignAuthorisationsToCustomer(CustomerModel customer);\n\n\t/**\n\t * Method to remove authorisations from the customer.\n\t *\n\t * @param customer\n\t * The customer model \n\t */\n\tvoid removeAuthorisationsOfCustomer(CustomerModel customer);\n\n}", "public interface DubboOrderShippingService {\n}", "public interface CustomerService {\n\n List<Customer> getAllCustomer();\n\n //根据条件获得客户信息列表\n List<Customer> getCustomer(Customer customer);\n\n Customer getCustomerById(Integer id);\n\n int insertCustomer(Customer customer);\n\n int insertSelectiveCustomer(Customer customer);\n\n int deleteCustomer(Integer id );\n\n int updateCustomer(Customer customer );\n}", "@Service\npublic interface ClientService {\n List<ClientEntity> getClients();\n void addClient(ClientEntity clientEntity);\n List<ClientEntity> getClientsById(String id);\n boolean ipAllowed(String ip,LocalDateTime date);\n List<ClientEntity> deleteClient(String ip,String date);\n}", "public interface APIService {\n}", "public interface CoffeeProcessorDbService {\n void loadData();\n}", "public interface CreateStudentOrderFor15Service {\n public void create();\n}", "public interface MayCtaService {\r\n\r\n\t/**\r\n\t * Checks if is valid previous level.\r\n\t *\r\n\t * @param catalog the catalog\r\n\t * @param errorMsg the error msg\r\n\t * @return true, if is valid previous level\r\n\t */\r\n\tboolean isValidPreviousLevel(Maycta catalog, StringBuilder errorMsg);\r\n\r\n\t/**\r\n\t * Find first by cuenta.\r\n\t *\r\n\t * @param cuenta the cuenta\r\n\t * @return the maycta\r\n\t */\r\n\tMaycta findFirstByCuenta(String cuenta);\r\n\r\n}", "public interface CarService {\n //查询可预约车辆\n public String queryCars(CookieStore cookies);\n\n //查询可预约车辆 指定日期\n public String queryCarsByDate(CookieStore cookies,String date);\n\n //查询可预约车辆 指定时间 上午812 下午15\n public String queryCars(CookieStore cookies,String date,String time);\n\n public String queryCars(CookieStore cookies,BookCarBean bcb);\n\n public List<String> getCarList(String json);\n //预约车辆\n public String bookCars(CookieStore cookies);\n\n public String bookCars(CookieStore cookies,BookCarBean bcb);\n\n}", "public interface CustomerService {\n\n public void addCustomer(Customer customer);\n\n public Customer getCustomerById(int customerId);\n\n public List<Customer> getAllCustomers();\n\n Customer getCustomerByUsername(String username);\n}", "public interface IContractMgtService {\n\n}", "public interface CostService {\n\n void add(Cost cost);\n\n void update(Cost cost);\n\n void levelUp(Cost cost);\n\n List<Cost> list();\n\n List<Cost> listPage(Page page);\n\n List<Cost> list(String state);\n\n List<Cost> listNotInvalid();\n\n List<Cost> getByKeyword(String keyword);\n\n int count();\n\n Cost getById(String costId);\n\n void setStateDisabled(String costId);\n\n void changeEndDate(Cost cost);\n List<Cost> searchCost(Cost cost);\n}", "public interface ClienteService {\n\n\tvoid persiste(Cliente c);\n\t\n\tvoid remove(Cliente c);\n\t\n\tCliente findByNome(String nome);\n}", "private static interface Service {}", "public interface TicketCodeService {\r\n public JSONObject createCode(Map<String, Object> source);\r\n}", "public interface CustomerService extends BaseService<Customer,String> {\n\n Pager getCustomerListByPage(Integer pageNumber,Integer pageSize);\n\n boolean follow(String id);\n\n CustomerVO fromIdToCustomerVO(String id);\n\n CustomerVO followTrue(String id);\n\n CustomerVO followFalse(String id);\n\n List<CustomerVO> getAllData();\n\n}", "public interface CoordinatorService {\n\n\t/**\n\t * init li config\n\t *\n\t * @param tccConfig\n\t * @throws Exception\n\t */\n\tvoid start(TccConfig tccConfig) throws Exception;\n\n\t/**\n\t * save tccTransaction\n\t *\n\t * @param tccTransaction\n\t * @return id\n\t */\n\tString save(TccTransaction tccTransaction);\n\n\t/**\n\t * find by transId\n\t *\n\t * @param transId\n\t * @return TccTransaction\n\t */\n\tTccTransaction findByTransId(String transId);\n\n\t/**\n\t * remove transaction\n\t *\n\t * @param id\n\t * transaction pk\n\t * @return true success\n\t */\n\tboolean remove(String id);\n\n\t/**\n\t * update\n\t * \n\t * @param tccTransaction\n\t */\n\tvoid update(TccTransaction tccTransaction);\n\n\t/**\n\t * update TccTransaction, this is only update Participant field\n\t * \n\t * @param tccTransaction\n\t * @return rows\n\t */\n\tint updateParticipant(TccTransaction tccTransaction);\n\n\t/**\n\t * update TccTransaction status\n\t * \n\t * @param id\n\t * pk\n\t * @param status\n\t * TccActionEnum\n\t * @return rows\n\t */\n\tint updateStatus(String id, Integer status);\n\n}", "public interface JanDanApiService {\n\n\n}", "public interface CustomerServiceFacade {\n void getCustomerPersonalInfo();\n void getBillingInfo();\n void getShippingInfo();\n}", "@Override\r\n\t\t\tpublic String doService(String param) {\n\t\t\t\treturn null;\r\n\t\t\t}", "public interface SaludaService{\n public String saluda(String nombre);\n}", "public interface ITempSeatScheduleService extends IService<TssTempSeatSchedule> {\n\n boolean resetTepIdAndSeatNumInTemp(List<String> readyDelIds);\n\n boolean copyToMainTableByTeId(String mainExId);\n\n boolean removeByTeId(String mainExId);\n}", "public interface CemeteryService extends EntityService<Cemetery>{\n}", "public interface SKUsService {\r\n\r\n /**\r\n * 添加SKU\r\n * \r\n * @param credential\r\n * @param skuInfoEntity\r\n */\r\n Integer add(String appId, SKUInfoEntity skuInfoEntity) throws Exception;\r\n \r\n /**\r\n * 根据skuID删除SKU\r\n * \r\n * @param appId\r\n * @param skuId\r\n */\r\n void delete(String appId, String skuId) throws Exception;\r\n \r\n /**\r\n * 根据skuID 查询SKU\r\n * \r\n * @param credential\r\n * @param skuId\r\n * @return\r\n */\r\n SKUInfoEntity findById(CredentialEntity credential, String skuId) throws Exception;\r\n\r\n /**\r\n * 更新SKU\r\n * \r\n * @param appId\r\n * @param skuInfoEntity\r\n */\r\n void update(String appId, SKUInfoEntity skuInfoEntity) throws Exception;\r\n \r\n /**\r\n * 查询SKU库存所有信息\r\n * \r\n * @param credential\r\n * @param skuId\r\n * @return\r\n */\r\n SKUAllWarehouseInfoEntity findSKUALLWarehouseInfosById(CredentialEntity credential, String skuId) throws Exception;\r\n \r\n}", "public interface CartService {\n List<Cart> getCarts(String cid) throws MyException;\n List<Cart> report(String start,String end);\n void add(Cart cart);\n void delOne(String id);\n void delAll(String cid);\n void edit(String itemId, Double num);\n}", "public interface ImsTermActiveService {\n\n ImsTermActive selectByPrimaryKey(String posSn);\n\n}", "public RecordService() {\n super(\"RecordService\");\n }", "public interface PaycoreIntService {\n GetPaymentInstrumentsResponse getPaymentInstruments(String memberNo, int memberNoType);\n PaymentInstrumentBean getDCPPaymentInstrument(String memberNo, int memberNoType);\n}", "public interface CartService extends Service<Cart> {\n\n}", "public interface SeatYudingOrderService {\n\n\n void yudingOrder(String uid, String workday, String route, String time,String dateType);\n void yudingOrder(String uid, String workday, String route, String time,String startDate,String endDate);\n void yudingOrder(String uid, String route, String time, String bizDate, Integer dayNum);\n void addOrder();\n\n Map<String,Object> shikebiao(String route, String holiday, String uid,String dateType);\n\n void sendMsgBanci(String first,String yuanyin,String content,String url);\n\n void pingjia(String uid,String orderId,String content,Integer fuwu) throws Exception;\n}", "public interface ICompteService {\n\t/**\n\t * Declaration des methodes metier\n\t */\n\tpublic void createCompte(Compte compte);\n\n\tpublic List<Compte> getAllCompte();\n\n\tpublic void deleteCompte(Long numeroCompte);\n\n\tpublic void updateCompte(Compte compte);\n\n\tpublic Compte getCompteById(Long numeroCompte);\n\n\tpublic void virement(Long compteEmetteur, Long compteRecepteur, double montant);\n\n\tpublic void versement(long numeroCompte, double montant);\n\n}", "public interface CustomerService {\n\n public boolean saveCustomer(CustomerDTO customerDTO);\n\n public CustomerDTO getCustomer(String customerId);\n\n public boolean deleteCustomer(String customerId);\n\n public ArrayList<CustomerDTO> getAllCustomers();\n\n}", "public interface CtlService {\n\n\tList<Map<String, Object>> getCtlInfByEquNum(Map<String, Object> map) throws Exception;\n\n\n\n}", "public interface DiscountService extends ServiceInterface<DiscountEntity>{\n}", "public interface ClientService {\r\n\r\n String fpkj(String wsdlUrl);\r\n}", "public interface DataDictionaryService {\n}", "public interface TransferHospitalService extends ReadOnlyBaseService<HospitalReadOnly> {\n /**\n * 获取用户医院数据\n * @param hosId\n * @return\n * @throws InvocationTargetException\n * @throws IntrospectionException\n * @throws InstantiationException\n * @throws IllegalAccessException\n */\n HospitalReadOnly getHospital(Long hosId)throws InvocationTargetException, IntrospectionException, InstantiationException, IllegalAccessException ;\n\n}", "public interface TelIpManageService {\n\n public List<CallCenter> queryCallCenters();\n\n public void updateCallCenter(CallCenter callCenter);\n\n\tpublic void deleteCallCenters(List<Integer> callCenterIDs);\n\n\tpublic void addCallCenter(CallCenter callCenter);\n\n\tpublic CallCenter queryCallCenter(Integer callCenterID);\n}", "public interface SearchClientService {\r\n\t/**\r\n\t * Get Search engine client\r\n\t * \r\n\t * @return\r\n\t */\r\n\tClient getClient();\r\n\r\n\tvoid setup();\r\n\r\n\tvoid shutdown();\r\n}", "@Service\npublic interface TraderSubService {\n List<Trader_Subscribe> getTrader_SubscribeListByTId(int id);\n}", "public interface AccountInfoService extends IService<AccountInfo> {\n\n}", "public interface CorretorService {\n\n /**\n * Save a corretor.\n * \n * @param corretor the entity to save\n * @return the persisted entity\n */\n Corretor save(Corretor corretor);\n\n /**\n * Get all the corretors.\n * \n * @return the list of entities\n */\n List<Corretor> findAll();\n\n /**\n * Get the \"id\" corretor.\n * \n * @param id the id of the entity\n * @return the entity\n */\n Corretor findOne(Long id);\n\n /**\n * Delete the \"id\" corretor.\n * \n * @param id the id of the entity\n */\n void delete(Long id);\n\n /**\n * Search for the corretor corresponding to the query.\n * \n * @param query the query of the search\n * @return the list of entities\n */\n List<Corretor> search(String query);\n}", "public interface AshipService {\n\n public Statistics getStatistics(); // 获取统计信息\n\n public Account getAccount( String userIdentity); //获取Account表信息\n\n public int insertAccount( Account account); //增加一条记录到Account表\n\n public UserAccount getUserAccountBreakIf(Map<String,Object> map); // 查看用户是否有关联的公司\n\n public int insertUserAccount( UserAccount userAccount); //增加一条记录到UserAccount表\n\n public List<UserAccount> getUserAccountList(Map<String,Object> map); //获取员工列表\n\n public int updateByAccountUUIDSelective(UserAccount userAccount); //根据用户的AccountUUID 进行更新\n\n /*********以下是公告**********/\n public List<Public> getPublicList(Map<String,Object> map); //\n\n public int updateByPrimaryKeySelective(UserAccount userAccount);\n\n public int updateByPrimaryKeySelectiveAndBusiness(UserAccount userAccount);\n\n ///////////获取用户的充值记录///////////////////\n public List<PayMoney> getPayMoneyList(String useruuid);\n\n\n}" ]
[ "0.67042476", "0.656589", "0.6530163", "0.6405285", "0.63838965", "0.63797516", "0.63672453", "0.6346403", "0.63101125", "0.6298982", "0.6298867", "0.6295942", "0.6295863", "0.62309504", "0.6229431", "0.62087476", "0.61942303", "0.6191004", "0.61821455", "0.61820984", "0.6171934", "0.61672884", "0.6166081", "0.6163845", "0.6163845", "0.614859", "0.6138578", "0.61325204", "0.6116643", "0.6115906", "0.6106412", "0.61041915", "0.6093409", "0.60564965", "0.6054118", "0.6051069", "0.60453653", "0.6044972", "0.6040446", "0.6038934", "0.6031499", "0.602893", "0.60247916", "0.6023538", "0.60234517", "0.60196376", "0.601429", "0.6009335", "0.59778273", "0.59775424", "0.59750456", "0.5970759", "0.5966528", "0.59659475", "0.59651893", "0.5964292", "0.5959529", "0.5951422", "0.5945937", "0.5943425", "0.5943064", "0.59423363", "0.59383214", "0.5937164", "0.59358793", "0.59347844", "0.5932259", "0.5928061", "0.5919924", "0.59119004", "0.5911046", "0.59094447", "0.59084535", "0.5906565", "0.5902596", "0.5901536", "0.5896997", "0.5893095", "0.58894295", "0.5889298", "0.588795", "0.5883934", "0.5883166", "0.58771646", "0.5877054", "0.58659923", "0.5862228", "0.585861", "0.5853675", "0.5851431", "0.585141", "0.5849904", "0.5845505", "0.58397704", "0.5839601", "0.58390117", "0.58381885", "0.5837904", "0.58203596", "0.58186024" ]
0.84733045
0
public boolean checkCourierByEmail(String email); public void updateCourier(Courier courier);
public List<String> getAllEnabledCourierCode();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void updateEmail(Integer id, String email) {\n\t\t\r\n\t}", "void send(Email email);", "@Service\npublic interface CourierService {\n\tpublic Long saveCourier(Courier courier);\n\tpublic Courier searchCourierByCode(String code);\n//\tpublic boolean checkCourierByEmail(String email);\n//\tpublic void updateCourier(Courier courier);\n\tpublic List<String> getAllEnabledCourierCode();\n\tpublic List<String> getAllCourierCode();\n\tpublic List<Courier> getCourierByType(String type);\n\tpublic void enableCourier(Long id);\n\tpublic void disableCourier(Long id);\n\tpublic Courier findCourierByid(Long id);\n\tpublic List<Courier> getAllcourier();\n\tpublic List<Courier> getEnabledCourier();\n\tpublic boolean checkName(String courierName);\n\tpublic boolean checkCode(String courierCode);\n\tpublic Long getCourierIdByCode(String Code);\n//\tpublic AWBResult getAWB(String pincode, String shippingMode);\n//\tpublic void unSetAWB(String courierCode, String trackingNumber);\n}", "public boolean changeEmail(String email, Person g, Booking b)\r\n {\r\n if(b == null)\r\n return false;\r\n \r\n b.changeEmail(email, g);\r\n return true;\r\n }", "public abstract void arhivare(Email email);", "Boolean checkEmailAlready(String email);", "void setEmail(String email);", "void setEmail(String email);", "public int changePackageCourier(StoremanData data)\n {\n Courier courier = targetCourier(data);\n session.beginTransaction();\n \n Query q = session.createQuery(\"UPDATE StoremanData SET ID_courier = :c, DeliveredStatus =:s WHERE ID = :id\");\n q.setParameter(\"c\", courier.getId());\n q.setParameter(\"s\", DeliveryStatus.toDelivery.toString());\n q.setParameter(\"id\", data.getID());\n \n int result = q.executeUpdate(); //TODO: usunac inta albo zrobic return\n \n session.getTransaction().commit();\n return result;\n }", "public boolean approvePotentialDeliveryMan(final Parcel parcel, final String email);", "int updateByExample(ChronicCheck record, ChronicCheckExample example);", "public boolean findEmail(String email);", "@Override\r\n\tpublic int updateemail(Account account) {\n\t\tString email = String.valueOf(accountMapper.findByemail(account.getEmail()));\r\n\t\tif(email.equals(\"null\")) {\r\n\t\t\taccountMapper.updateemail(account);\r\n\t\t\treturn 1;\r\n\t\t}else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "boolean emailExistant(String email, int id) throws BusinessException;", "int updateByPrimaryKey(mailIdentify record);", "public void changeEmailOfCensus(String idCensus, String email) \n\t{\n\t\topen();\n\t\ttry\n\t\t{\n\t\t\tCensus temp=new Census();\n\t\t\ttemp.setId(idCensus);\n\t\t\tObjectSet result=DB.queryByExample(temp);\n\t\t\t\n\t\t\tif(result.hasNext())\n\t\t\t{\n\t\t\t\tCensus old=(Census)result.next();\n\t\t\t\tCensus updated=new Census(old);\n\t\t\t\tupdated.setEmail(email);\n\t\t\t\tDB.delete(old);\n\t\t\t\tDB.store(updated);\n\t\t\t\tSystem.out.println(\"[DB4O] Census was updated\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"[DB4]ERROR:Census could not be updated\");\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\t\n\t\t\n\t}", "public void updateEmail(String newEmailAddress)\r\n {\r\n emailAddress = newEmailAddress;\r\n }", "int updateByPrimaryKey(Email record);", "@Override\n\tpublic void updateEmployeEmailById(int empid, String email) {\n\t\t\n\t}", "public void setEmail(Email email) { this.email = email; }", "public void setEmailCom(String emailCom);", "@Override\r\n\tpublic int emailcheck(String email) {\n\t\treturn dao.idcheck(email);\r\n\t}", "public void setEmail(String email);", "@Override\n public void setEmail(String email) {\n\n }", "@Override\n\tpublic void activeAccount(String email) {\n\n\t\tUserModel userModel = findByEmail(email);\n\t\tuserModel.setActiveSwitch(\"Y\");\n\t\tsaveDtls(userModel);\n\n\t}", "Professor procurarEmail(String email)throws ProfessorEmailNExisteException;", "int updateContact(String email, String firstName, String lastName, String phone, String username);", "int updateByExample(@Param(\"record\") Email record, @Param(\"example\") EmailCriteria example);", "int updateByExample(@Param(\"record\") mailIdentify record, @Param(\"example\") mailIdentifyExample example);", "int updateByExampleSelective(@Param(\"record\") mailIdentify record, @Param(\"example\") mailIdentifyExample example);", "void validate(String email);", "public void changeEmailOfCensus(List<Census> censuses,String email)\n\t{\n\t\topen();\n\t\ttry\n\t\t{\n\t\t\tfor(Census current:censuses)\n\t\t\t{\n\t\t\t\tCensus temp=new Census();\n\t\t\t\ttemp.setId(current.getId());\n\t\t\t\tObjectSet result=DB.queryByExample(temp);\n\t\t\t\t\n\t\t\t\tif(result.hasNext())\n\t\t\t\t{\n\t\t\t\t\tCensus old=(Census)result.next();\n\t\t\t\t\tCensus updated=new Census(old);\n\t\t\t\t\tupdated.setEmail(email);\n\t\t\t\t\tDB.delete(old);\n\t\t\t\t\tDB.store(updated);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"[DB4O] Census was updated\");\n\t\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"[DB4]ERROR:Census could not be updated\");\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose();\n\t\t}\n\t}", "boolean checkEmailExistsForClient(String email) throws RuntimeException;", "void update(Subscriber record);", "public void setCourierId(String courierId) {\n _courierId = courierId;\n }", "int updateByPrimaryKeySelective(mailIdentify record);", "public void setEmail(String email)\r\n/* 36: */ {\r\n/* 37:50 */ this.email = email;\r\n/* 38: */ }", "void updateAspirantProfile(String email, AspirantProfile aspirantProfile)\n throws IllegalArgumentException, AspirantNotRegisteredException, AspirantProfileNotFoundException, ServiceException;", "void send(String emailName);", "@Override\r\n\tpublic boolean updateAccountSw(String accId, String activeSw) {\r\n\t\tlogger.debug(\"*** updateAccountSw() method started\");\r\n\t\tString fileName = null, mailSub = null, mailBody = null, password = null;\r\n\t\ttry {\r\n\t\t\t// load existing record using accId\r\n\t\t\tAppAccountEntity entity = appAccRepository.findById(Integer.parseInt(accId)).get();\r\n\t\t\tif (entity != null) {\r\n\t\t\t\t// Setting Account Active Sw (Y|N)\r\n\t\t\t\tentity.setActiveSw(activeSw);\r\n\t\t\t\t// Updating Account\r\n\t\t\t\tappAccRepository.save(entity);\r\n\t\t\t\tlogger.debug(\"*** updateAccountSw() method ended\");\r\n\r\n\t\t\t\tAppAccount accModel = new AppAccount();\r\n\t\t\t\tBeanUtils.copyProperties(entity, accModel);\r\n\r\n\t\t\t\t// TODO:Need to complete email functionality\r\n\t\t\t\tif (activeSw.equals(\"Y\")) {\r\n\t\t\t\t\t// send Email saying account activated\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t// get file name\r\n\t\t\t\t\t\tfileName = appProperties.getProperties().get(AppConstants.ACTIVATE_EMAIL_FILE);\r\n\t\t\t\t\t\t// get mail subject\r\n\t\t\t\t\t\tmailSub = appProperties.getProperties().get(AppConstants.ACTIVATE_EMAIL_SUB);\r\n\t\t\t\t\t\t// decrypt the password\r\n\t\t\t\t\t\tpassword = PasswordUtils.decrypt(accModel.getPassword());\r\n\t\t\t\t\t\t// set decrypted password to accModel object password field\r\n\t\t\t\t\t\taccModel.setPassword(password);\r\n\t\t\t\t\t\t// get email body\r\n\t\t\t\t\t\tmailBody = getEmailBodyContent(accModel, fileName);\r\n\t\t\t\t\t\t// send email to activate registered cw/admin\r\n\t\t\t\t\t\temailUtils.sendEmail(entity.getEmail(), mailSub, mailBody);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\tlogger.error(\"Email Sending is failed : \" + e.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t// send Email saying account de-activated\r\n\t\t\t\t\t\t// send account de-activation mail to registered case worker/admin\r\n\t\t\t\t\t\t// get file name\r\n\t\t\t\t\t\tfileName = appProperties.getProperties().get(AppConstants.DE_ACTIVATE_EMAIL_FILE);\r\n\t\t\t\t\t\t// get email subject\r\n\t\t\t\t\t\tmailSub = appProperties.getProperties().get(AppConstants.DE_ACTIVATE_EMAIL_SUB);\r\n\t\t\t\t\t\t// get email body content\r\n\t\t\t\t\t\tmailBody = getDeActivateAccountEmailBodyContent(fileName, accModel);\r\n\t\t\t\t\t\t// send email to registered cw/admin\r\n\t\t\t\t\t\temailUtils.sendEmail(entity.getEmail(), mailSub, mailBody);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\tlogger.error(\"Email Sending is failed : \" + e.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exception occured in updateAccountSw() method : \" + e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "void saveNewEmail(String userName, String eMail) throws DatabaseException;", "boolean updateUser(SchoolSubject schoolSubject);", "public void setEmailAddress(java.lang.String newEmailAddress);", "public void setEmail(String email) { this.email = email; }", "public boolean updateSuppEmail (java.lang.String emp_cde, \n java.lang.String emp_nme, \n java.lang.String dpt_cde, \n java.lang.String emp_type, \n java.lang.String emp_email, \n java.lang.String supp_no) throws com.mcip.orb.CoException {\n return this._delegate.updateSuppEmail(emp_cde, emp_nme, dpt_cde, emp_type, \n emp_email, supp_no);\n }", "int updateByPrimaryKeySelective(Email record);", "boolean existsByEmail(String email);", "@Override\n public void setEmail(java.lang.String email) {\n _entityCustomer.setEmail(email);\n }", "public void update(Customer myCust){\n }", "boolean isEmailExist(String email);", "int updateByExampleSelective(@Param(\"record\") Email record, @Param(\"example\") EmailCriteria example);", "public boolean setEmail(String email) {\n email = email.trim().replaceAll(\"\\\"\", \"\");\n\n if(EmailValidator.getInstance().isValid(email)) {\n if(this.email != null && this.email.equalsIgnoreCase(email)){\n return false;\n }\n this.email = email;\n return true;\n } else if (this.email == null) {\n this.email = \"INVALID\";\n } else {\n System.out.println(\"Person \" + name + \"'s email address will not be modified as the given email is invalid\");\n }\n return false;\n }", "public boolean existsByEmail(String email);", "public boolean existsByEmail(String email);", "public void setEmail( String email )\r\n {\r\n this.email = email;\r\n }", "void sendEmail(Job job, String email);", "public void setEmail(String email)\n {\n this.email = email;\n }", "public void setEmail(String email){\r\n this.email = email;\r\n }", "void addPotentialDeliveryMan(final Parcel parcel, final String email);", "public boolean isRegisteredEmail(String email);", "@Override\n\tpublic void updateEmail(Account a, String newEmail) throws SQLException, InvalidEmailException {\n\t\tif (!isValidAccount(a))\n\t\t\treturn;\n\t\t\n\t\t// Throw if email is syntactically invalid\n\t\tif (!Account.isValidEmail(newEmail))\n\t\t\tthrow new InvalidEmailException(\"The email \" + newEmail + \" is invalid\");\n\n\t\t// Create account, to test it follows proper syntax\n\t\t@SuppressWarnings(\"unused\")\n\t\tAccount tempAccount = new Account(a.getId(), a.getUsername(), a.getPassword(), newEmail);\n\t\t\n\t\t// Prepare SQL line\n\t\tString sqlQuery = \"UPDATE account \"\n\t\t\t\t+ \"SET email = ? \"\n\t\t\t\t+ \"WHERE id = ?\";\n\t\tPreparedStatement statement = dbConnection.prepareStatement(sqlQuery);\n\t\tstatement.setString(1, newEmail);\n\t\tstatement.setInt(2, a.getId());\n\n\t\t// Execute, throws error if failed\n\t\tstatement.executeUpdate();\n\t\tstatement.close();\n\t}", "public Boolean existsByEmail(String email);", "public void setEmailAddress(String emailAddress);", "int insert(Email record);", "int updateParticipant(TccTransaction tccTransaction);", "@Override\n @Transactional(readOnly = true)\n public Boolean existsByEmail(String email) {\n return this.pacienteRepository.existsByEmail(email);\n }", "@PutMapping(\"/updateAnAddress/{emailId}\")\n\tpublic ResponseEntity<Boolean> updateAnAddress(@PathVariable String emailId, @RequestBody Address address) throws ResourceNotFoundException\n\t{\n\t\tlogger.trace(\"Requested to update an existing address\");\t\n\t\tboolean returnedValue=service.UpdateAnAddress(emailId,address);\n\t\tlogger.trace(\"Completed request to update an existing address\");\t\n\t\treturn ResponseEntity.ok(returnedValue);\n\t}", "public boolean updateCustomer(String customerJSON);", "boolean markConfirmed(long billId);", "@Override\r\n\tpublic boolean register(String email, String id, String pw) {\n\t\treturn jdbcTemplate.update(\"insert into s_member values(?,?,?,\"\r\n\t\t\t\t+ \"'normal',sysdate)\",email,id,pw)>0;\r\n\t}", "int updateByExample(@Param(\"record\") PdfCodeTemporary record, @Param(\"example\") PdfCodeTemporaryExample example);", "int updateByExample(@Param(\"record\") CxBasStaff record, @Param(\"example\") CxBasStaffExample example);", "public void setEmail(String email)\n\t{\n\t\tthis._email=email;\n\t}", "public void setEmailAddress(String email) {\n this.email = email;\n }", "@Override\n public boolean update(EmailNotification entity) {\n return false;\n }", "@RequestMapping(value = \"/enquirys\",\n method = RequestMethod.PUT,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> update(@Valid @RequestBody Enquiry enquiry) throws URISyntaxException {\n log.debug(\"REST request to update Enquiry : {}\", enquiry);\n if (enquiry.getId() == null) {\n return create(enquiry);\n }\n enquiryRepository.save(enquiry);\n return ResponseEntity.ok().build();\n }", "public void setContact(String email){ contact = email; }", "@Override\n\tpublic int updateEmployeeMailById(int employeeId, String email) {\n\t\tif (getEmployeeById(employeeId) == null) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\treturn template.update(\"update employee set email = ? where empid = ?\", email, employeeId);\n\n\t\t}\n\t}", "public void setEmail(java.lang.String email) {\r\n this.email = email;\r\n }", "int updateByPrimaryKey(TbaDeliveryinfo record);", "int updateByPrimaryKey(SmsSendAndCheckPo record);", "void updateCustomerById(Customer customer);", "void updateCustomerDDPay(CustomerDDPay cddp);", "public void updateCustomer(String name, String dob, String gender, String number, String email, String address, String password, Boolean promo, Integer reward) throws SQLException {\n st.executeUpdate(\"UPDATE IOTBAY.CUSTOMER SET \"\n + \"NAME ='\" + name \n + \"DATEOFBIRTH ='\" + dob \n + \"GENDER ='\" + gender \n + \"CONTACTNUMBER ='\" + number \n + \"BILLINGADDRESS ='\" + address \n + \"PASSWORD ='\" + password \n + \"PROMOTIONALNEWSLETTER ='\" + promo \n + \"', REWARDPOINTS='\" + reward \n + \"' WHERE EMAIL='\" + email + \"'\" );\n\n }", "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "@Override\r\n\tpublic void sendInvoice(Invoice invoice, String email) {\n\t\tSystem.out.println(\"Invoice Sent email\");\r\n\t}", "public void setEmail(String email) {\r\n this.email = email;\r\n }", "public void setEmail(String email) {\r\n this.email = email;\r\n }", "public void setEmail(String email) {\r\n this.email = email;\r\n }", "public void setEmail(String email) {\r\n this.email = email;\r\n }", "public void setEmail(String email) {\r\n this.email = email;\r\n }", "public void setEmail(String email) {\r\n this.email = email;\r\n }", "@Override\n\tpublic boolean updateCustomer(Customer customer) {\n\t\treturn false;\n\t}", "private static void lookupAccount(String email) {\n\t\t\n\t}", "@Override\n\tpublic Contato buscaContatoEmail(String email) {\n\t\treturn this.dao.buscarPorEmail(email);\n\t}", "public void enviarEmail(String c, Ciudadano a){\n\t}", "boolean hasNewMailNum();" ]
[ "0.608538", "0.58431613", "0.57690907", "0.5759134", "0.5755457", "0.5740355", "0.5689035", "0.5689035", "0.5663987", "0.5663901", "0.5551653", "0.55474174", "0.55384016", "0.5537533", "0.55300534", "0.5525623", "0.55251104", "0.5522576", "0.55149764", "0.5512507", "0.54999506", "0.5457006", "0.54456544", "0.5444746", "0.54274946", "0.5427365", "0.5423886", "0.541343", "0.5412604", "0.5398977", "0.5389336", "0.5377517", "0.53563994", "0.535041", "0.5343358", "0.53308874", "0.5315261", "0.53051645", "0.52975756", "0.52896947", "0.5277589", "0.5273148", "0.5273091", "0.52694726", "0.5257459", "0.5233346", "0.522475", "0.5217245", "0.52143633", "0.5210137", "0.5203291", "0.52022064", "0.5201232", "0.5201232", "0.51986533", "0.51941663", "0.5184274", "0.51745087", "0.51618737", "0.516061", "0.5157148", "0.5154446", "0.5150195", "0.514176", "0.5139757", "0.51133305", "0.5108634", "0.5103594", "0.50938517", "0.50807804", "0.50784194", "0.50769037", "0.5076372", "0.5074942", "0.5063929", "0.5063546", "0.5058942", "0.5058794", "0.5052838", "0.505076", "0.5049716", "0.5049512", "0.5035709", "0.5032985", "0.5031525", "0.5031525", "0.5031525", "0.5031525", "0.5031525", "0.5030484", "0.50282526", "0.50282526", "0.50282526", "0.50282526", "0.50282526", "0.50282526", "0.50220937", "0.50166607", "0.5014851", "0.5010459", "0.5009603" ]
0.0
-1
Constructor: creation d'une nouvelle archive
public ZipFileWriter(String zipFile) throws FileNotFoundException { FileOutputStream fos = new FileOutputStream(zipFile); // ajout du checksum CheckedOutputStream checksum = new CheckedOutputStream(fos, new Adler32()); this.zos = new ZipOutputStream(new BufferedOutputStream(checksum)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArchiveInfo() {\n\t}", "public ServerResponseCreateArchive() {\n }", "public BackupFSArchiveCopy() {\n super();\n }", "public TarArchive( File folder )\n {\n this.folder = folder;\n }", "public Dossier(int id, String name, String archiveObject, String lastUse){\r\n this.id = id;\r\n this.name = name;\r\n this.archiveObject = archiveObject;\r\n this.lastUse = lastUse;\r\n\r\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\r\n Date today = new Date();\r\n this.createdOn = dateFormat.format(today);\r\n }", "private ZipCompressor(){}", "public void setArchiver(String sArchiver);", "public AnalogArchiveApp() {\n jsonWriter = new JsonWriter(\"./data/saveFile.json\");\n jsonReader = new JsonReader(\"./data/saveFile.json\");\n init();\n }", "public String getArchiver();", "@Override\r\n public void setArchive(String archive) {\n }", "public OutputArchive(ObjectOutput output) {\n this.output = output;\n }", "public JBIArchive(String pathName) throws Exception {\n this(new File(pathName));\n }", "public static void PackageArchive(File directoryName, File fileName) throws IOException\r\n {\r\n final String ARCHIVE_XML = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-16\\\"?>\\n<archive major_version=\\\"0\\\" minor_version=\\\"1\\\" />\";\r\n\r\n TarArchiveWriter archive = new TarArchiveWriter(new GZIPOutputStream(new FileOutputStream(fileName)));\r\n\r\n // Create the archive.xml file\r\n archive.writeFile(\"archive.xml\", ARCHIVE_XML);\r\n\r\n // Add the assets\r\n File dir = new File(directoryName, ArchiveConstants.ASSETS_PATH);\r\n String[] files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.ASSETS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the objects\r\n dir = new File(directoryName, ArchiveConstants.OBJECTS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.OBJECTS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the terrain(s)\r\n dir = new File(directoryName, ArchiveConstants.TERRAINS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.TERRAINS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the parcels(s)\r\n dir = new File(directoryName, ArchiveConstants.LANDDATA_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.LANDDATA_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the setting(s)\r\n dir = new File(directoryName, ArchiveConstants.SETTINGS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.SETTINGS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n archive.close();\r\n }", "public Archivo() {\n fos = null;\n oos = null;\n fis = null;\n ois = null;\n }", "public TarArchiveEntry() {\n this.version = VERSION_POSIX;\n this.name = \"\";\n this.linkName = \"\";\n this.linkFlag = LF_GNUTYPE_LONGNAME;\n String user = System.getProperty(\"user.name\", \"\");\n if (user.length() > MAX_NAMELEN) {\n user = user.substring(0, MAX_NAMELEN);\n }\n this.userName = user;\n this.groupName = \"\";\n this.userId = 0;\n this.groupId = 0;\n this.mode = DEFAULT_FILE_MODE;\n }", "public JBIArchive(File file) throws Exception {\n this(new JarFile(file));\n }", "DexArchive(BundleArchiveImpl ba, FileTree dir, int rev) {\n super(ba, dir, rev);\n }", "public Archive getArchive();", "public ArchivoClientes(){\n\t\t\n\t\tif(archivo.exists()){\n\t\t\t//System.out.println(\"El archivo ya existe\");\n\t\t}else{\n\t\t\ttry {\n\t\t\t\t//archivo.mkdir();\n\t\t\t\tarchivo.createNewFile();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Creación del archivo clientes: \" +e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public ZipLineStream() {\n\t\tarchType = ArchiveTypes.ZIP.name();\n\t}", "public InventarioFile(){\r\n \r\n }", "private CompressionTools() {}", "protected File createObjectArchive(String format, String jobId, JSONObject jobObject, String database, String collection, String query) throws IOException {\n\t\tFile archive = File.createTempFile(jobId, \".zip.tmp\");\n\t\tFileOutputStream fos = null;\n\t\tZipOutputStream zos = null;\n\n\t\t// try to add to the archive\n\t\ttry {\n\t\t\tfos = new FileOutputStream(archive);\n\t\t\tzos = new ZipOutputStream(fos);\n\t\t\tlogger.debug(String.format(\" [%s] Archive file: %s\", jobId, archive.getAbsolutePath()));\n\n\t\t\tint cursor = 0;\n\t\t\tint archived = 0;\n\n\t\t\tJSONObject initialJson = ObjectHelper.getInstance(authorizationHeader).search(query, database, collection, 0, 1);\n\t\t\tint total = initialJson.getInt(\"total\");\n\t\t\twhile(cursor < total) {\n\t\t\t\tJSONObject json = ObjectHelper.getInstance(authorizationHeader).search(query, database, collection, cursor, objectBatchSize);\n\t\t\t\tJSONArray items = json.getJSONArray(\"items\");\n\n\t\t\t\tfor (int i = 0; i < items.length(); i++) {\n\t\t\t\t\t// Get the item\n\t\t\t\t\tJSONObject item = items.getJSONObject(i);\n\t\t\t\t\t// Get the data to output\n\t\t\t\t\tString output = item.toString();\n\t\t\t\t\tif (\"xml\".equalsIgnoreCase(format))\n\t\t\t\t\toutput = XML.toString(new JSONObject(output.replaceAll(\"\\\\$\", \"\")), \"source\");\n\t\t\t\t\t// Define the filename\n\t\t\t\t\tString filename = item.getJSONObject(\"_id\").getString(\"$oid\") + \".\" + format;\n\t\t\t\t\t// Create a new entry in the zip file\n\t\t\t\t\tZipEntry ze = new ZipEntry(filename);\n\t\t\t\t\tzos.putNextEntry(ze);\n\t\t\t\t\tzos.write(output.getBytes());\n\t\t\t\t\tzos.closeEntry();\n\n\t\t\t\t\tarchived += 1;\n\t\t\t\t}\n\n\t\t\t\tlogger.debug(String.format(\" [%s] Archived items: %5d / %5d\", jobId, archived, total));\n\n\t\t\t\t// update the cursor\n\t\t\t\tcursor += objectBatchSize;\n\n\t\t\t\t// Update progress\n\t\t\t\tjobObject.put(\"progress\", PROGRESS_REQUESTINGDATA * cursor / total);\n\t\t\t\tObjectHelper.getInstance(authorizationHeader).updateObject(jobId, jobObject);\n\t\t\t}\n\n\t\t\tlogger.debug(String.format(\" [%s] ... Archiving completed: %s\", jobId, archive.getAbsolutePath()));\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e);\n\t\t} finally {\n\t\t\tif (zos != null)\n\t\t\t\tzos.close();\n\t\t\tif (fos != null)\n\t\t\t\tfos.close();\n\t\t}\n\n\t\treturn archive;\n\t}", "private FSArquivo(Construtor construtor) {\n nome = construtor.nome;\n tipoMedia = construtor.tipoMedia;\n base = construtor.base;\n prefixo = construtor.prefixo;\n sufixo = construtor.sufixo;\n }", "public FileObject() {\n\t}", "@attribute(value = \"\", required = false)\t\r\n\tpublic void setArchive(String archive) {\r\n\t\tthis.archive = archive;\r\n\t}", "public Dossier(int id, String name, String archiveObject, String lastUse, String createdOn, int cabinetRowID){\r\n this.id = id;\r\n this.name = name;\r\n this.archiveObject = archiveObject;\r\n this.lastUse = lastUse;\r\n this.createdOn = createdOn;\r\n this.cabinetRowID = cabinetRowID;\r\n }", "public BrihaspatiProFile() {\n }", "public TelaFazBackup() {\n initComponents();\n }", "public EnergyArchive(int maxSize) {\r\n this(maxSize, new ScalarizationWrapper(ScalarizationType.UNIFORM));\r\n }", "public FileCreator() {\r\n initComponents();\r\n }", "public TarArchiveEntry(String name) {\n this(name, false);\n }", "public VersionDownload() {\n }", "public void tozip() {\r\n\t\t//session.setAttribute(Constant.USER_SESSION_KEY, null);\r\n\t\tList<Netlog> result = null;\r\n\t\tInteger total = null;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t\tresult = (List<Netlog>)netlogDao.findNetlogByPage(1,10000);\r\n\t\t\t\ttotal= result.size();\r\n\t\t\t\t//total= netlogDao.findNetlogCount();\r\n\t\t\t\r\n\t\t} catch (SQLException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tNetlogs netlogs = new Netlogs(result);\r\n\t\tString path = this.getClass().getClassLoader().getResource(\"\").getPath();\r\n\t\tSystem.out.println(path);\r\n\t\tpath = path.replace(\"WEB-INF/classes/\", \"\");\r\n\t\tString path1 = path + \"netlog/\";\r\n\t\tLong time = System.currentTimeMillis()/1000;\r\n\t\tXml2Java.beanToXML(netlogs,path1+\"145-330000-\"+time.toString()+\"-00001-WA-SOURCE_NETLOG_0001-0.xml\");\r\n\r\n\t\tZipUtil.ZipMultiFile(path1, path+\"145-353030334-330300-330300-netlog-00001.zip\");\r\n\t}", "Archive(Package pkg, Os os, Arch arch, String url, long size, String checksum) {\n mPackage = pkg;\n mOs = os;\n mArch = arch;\n mUrl = url;\n mLocalOsPath = null;\n mSize = size;\n mChecksum = checksum;\n mIsLocal = false;\n }", "public GestorArchivos(String numeroArchivo)\r\n {\r\n this.rutaArchivoEntrada = new File(\"archivostexto/in/in\" + numeroArchivo + \".txt\").getAbsolutePath().replace(\"\\\\\", \"/\");\r\n this.rutaArchivoSalida = new File(\"archivostexto/out/out\" + numeroArchivo + \".txt\").getAbsolutePath().replace(\"\\\\\", \"/\");\r\n }", "private void grabarArchivo() {\n\t\tPrintWriter salida;\n\t\ttry {\n\t\t\tsalida = new PrintWriter(new FileWriter(super.salida));\n\t\t\tsalida.println(this.aDevolver);\n\t\t\tsalida.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public AncFile() {\n }", "public ServicioUjaPack() {\n }", "public TestStatus(ZipFile file)\n\t{\n\t\tfile_ = file;\n\t}", "public SourceFile(File file) throws Exception {\r\n\t\t// this.file = file;\r\n\t\tthis.zipFile = new ZipFile(file, \"UTF-8\");\r\n\t}", "public FilePlugin()\n {\n super();\n \n //create the data directory if it doesn't exist\n File dataDir = new File(FilenameUtils.dataDir);\n if(!dataDir.exists()) FilePersistenceUtils.makeDirs(dataDir);\n }", "private static void createZipArchiv(String xmlStream, String path, String name) {\r\n\t\ttry {\r\n\t\t\tFile file = new File(path, name + \".xml\");\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t}\r\n\t\t\t//XMLStream in Datei schreiben\r\n\t\t\tPrintWriter writer = new PrintWriter(file);\r\n\t\t\twriter.write(xmlStream);\r\n\t\t\twriter.close();\r\n\t\t\t\r\n\t\t\t//Commando für die Shell um ein Tgz zu erstellen.\r\n\t\t\tString[] str = new String[] {\r\n\t\t\t\t\t\"/bin/bash\",\r\n\t\t\t\t\t\"-c\",\r\n\t\t\t\t\t\"tar cfvz \" + path + \"/\" + name + \".tgz -C \" + path + \" \" + name\r\n\t\t\t\t\t\t\t+ \".xml -C \" + path + \" \" + name + \".pdf\" };\r\n\r\n\t\t\t//Shell Aufruf\r\n\t\t\tProcess p = Runtime.getRuntime().exec(str);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tint timeout = 10;\r\n\t\t\twhile (!new File(path + name + \".tgz\").exists() && timeout != 0) {\r\n\t\t\t\t//warten bis Datei erstellt wurde oder 10 sec vergangen sind\r\n\t\t\t\ttry {\r\n\t\t\t\t\ttimeout--;\r\n\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "protected File createIndexingArchive(String format, String jobId, JSONObject jobObject, String indexType, String query) throws IOException {\n\t\tFile archive = File.createTempFile(jobId, \".zip.tmp\");\n\t\tFileOutputStream fos = null;\n\t\tZipOutputStream zos = null;\n\n\t\t// try to add to the archive\n\t\ttry {\n\t\t\tfos = new FileOutputStream(archive);\n\t\t\tzos = new ZipOutputStream(fos);\n\t\t\tlogger.debug(String.format(\" [%s] Archive file: %s\", jobId, archive.getAbsolutePath()));\n\n\t\t\tJSONObject json = IndexingHelper.getInstance(authorizationHeader).search(indexType, query, true, 0, indexingBatchSize, indexingScroll);\n\t\t\tint totalHits = json.getJSONObject(\"hits\").getInt(\"total\");\n\t\t\tString scrollId = json.getString(\"_scroll_id\");\n\t\t\tlogger.debug(String.format(\" [%s] Number of hits: %d\", jobId, totalHits));\n\t\t\tlogger.debug(String.format(\" [%s] Scroll ID: %s\", jobId, scrollId));\n\t\t\tint currentStartIndex = 0;\n\t\t\twhile (currentStartIndex < totalHits) {\n\t\t\t\tJSONArray hits = json.getJSONObject(\"hits\").getJSONArray(\"hits\");\n\n\t\t\t\tfor (int i = 0; i < hits.length(); i++) {\n\t\t\t\t\t// Get the hit\n\t\t\t\t\tJSONObject hit = hits.getJSONObject(i);\n\t\t\t\t\t// Get the data to output\n\t\t\t\t\tString output = hit.getJSONObject(\"_source\").toString();\n\t\t\t\t\tif (\"xml\".equalsIgnoreCase(format))\n\t\t\t\t\t\toutput = XML.toString(new JSONObject(output.replaceAll(\"\\\\$\", \"\")), \"source\");\n\t\t\t\t\t// Define the filename\n\t\t\t\t\tString filename = hit.getString(\"_id\") + \".\" + format;\n\t\t\t\t\t// Create a new entry in the zip file\n\t\t\t\t\tZipEntry ze = new ZipEntry(filename);\n\t\t\t\t\tzos.putNextEntry(ze);\n\t\t\t\t\tzos.write(output.getBytes());\n\t\t\t\t\tzos.closeEntry();\n\t\t\t\t}\n\n\t\t\t\tlogger.debug(String.format(\" [%s] Archived items: [ %5d ~ %5d ] / %5d\", jobId, currentStartIndex, currentStartIndex + indexingBatchSize - 1, totalHits));\n\n\t\t\t\t// Update the start index\n\t\t\t\tcurrentStartIndex += indexingBatchSize;\n\n\t\t\t\t// Update progress\n\t\t\t\tjobObject.put(\"progress\", PROGRESS_REQUESTINGDATA * currentStartIndex / totalHits);\n\t\t\t\tObjectHelper.getInstance(authorizationHeader).updateObject(jobId, jobObject);\n\n\t\t\t\tif (currentStartIndex < totalHits)\n\t\t\t\t\tjson = IndexingHelper.getInstance(authorizationHeader).scroll(indexType, indexingScroll, scrollId, true);\n\t\t\t}\n\n\t\t\t// Delete the scroll\n\t\t\tlogger.debug(String.format(\" [%s] Deleting Scroll ID\", jobId));\n\t\t\tIndexingHelper.getInstance(authorizationHeader).deleteScrollIndex(scrollId);\n\t\t\tlogger.debug(String.format(\" [%s] ... Completed\", jobId));\n\n\t\t\tlogger.debug(String.format(\" [%s] ... Archiving completed: %s\", jobId, archive.getAbsolutePath()));\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e);\n\t\t} finally {\n\t\t\tif (zos != null)\n\t\t\t\tzos.close();\n\t\t\tif (fos != null)\n\t\t\t\tfos.close();\n\t\t}\n\n\t\treturn archive;\n\t}", "public static synchronized void initializeArchiveFiles() {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.initializeArchiveFiles\");\n File sourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"QVCSEnterpriseServer.kbwb\");\n String firstDestinationDirName = System.getProperty(USER_DIR)\n + File.separator\n + QVCSConstants.QVCS_PROJECTS_DIRECTORY\n + File.separator\n + getTestProjectName();\n File firstDestinationDirectory = new File(firstDestinationDirName);\n firstDestinationDirectory.mkdirs();\n File firstDestinationFile = new File(firstDestinationDirName + File.separator + \"QVCSEnterpriseServer.kbwb\");\n\n String secondDestinationDirName = firstDestinationDirName + File.separator + SUBPROJECT_DIR_NAME;\n File secondDestinationDirectory = new File(secondDestinationDirName);\n secondDestinationDirectory.mkdirs();\n File secondDestinationFile = new File(secondDestinationDirName + File.separator + \"QVCSEnterpriseServer.kbwb\");\n\n String thirdDestinationDirName = secondDestinationDirName + File.separator + SUBPROJECT2_DIR_NAME;\n File thirdDestinationDirectory = new File(thirdDestinationDirName);\n thirdDestinationDirectory.mkdirs();\n File thirdDestinationFile = new File(thirdDestinationDirName + File.separator + \"ThirdDirectoryFile.kbwb\");\n\n File fourthDestinationFile = new File(firstDestinationDirName + File.separator + \"Server.kbwb\");\n File fifthDestinationFile = new File(firstDestinationDirName + File.separator + \"AnotherServer.kbwb\");\n File sixthDestinationFile = new File(firstDestinationDirName + File.separator + \"ServerB.kbwb\");\n File seventhDestinationFile = new File(firstDestinationDirName + File.separator + \"ServerC.kbwb\");\n try {\n ServerUtility.copyFile(sourceFile, firstDestinationFile);\n ServerUtility.copyFile(sourceFile, secondDestinationFile);\n ServerUtility.copyFile(sourceFile, thirdDestinationFile);\n ServerUtility.copyFile(sourceFile, fourthDestinationFile);\n ServerUtility.copyFile(sourceFile, fifthDestinationFile);\n ServerUtility.copyFile(sourceFile, sixthDestinationFile);\n ServerUtility.copyFile(sourceFile, seventhDestinationFile);\n } catch (IOException ex) {\n Logger.getLogger(TestHelper.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "Archive(Package pkg, Properties props, Os os, Arch arch, String localOsPath) {\n mPackage = pkg;\n mOs = props == null ? os : Os.valueOf(props.getProperty(PROP_OS, os.toString()));\n mArch = props == null ? arch : Arch.valueOf(props.getProperty(PROP_ARCH, arch.toString()));\n mUrl = null;\n mLocalOsPath = localOsPath;\n mSize = 0;\n mChecksum = \"\";\n mIsLocal = true;\n }", "public CombineArchive (File zipFile)\n\t\tthrows IOException,\n\t\t\tJDOMException,\n\t\t\tParseException,\n\t\t\tCombineArchiveException\n\t{\n\t\tinit (zipFile, false);\n\t}", "@Test\n public void testConstructor_Custom_Store_File() {\n\n File file = new File(\n System.getProperty(\"java.io.tmpdir\") + File.separator + \"oasis-list-testConstructor_Custom_Store_File\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(file);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n File[] subDirs = file.listFiles();\n\n assertNotNull(subDirs);\n }", "void setArchiveInfo(ArchiveInfoInterface archInfo);", "public static OutputArchive fromOutputStream(OutputStream stream) throws IOException {\n if (stream instanceof ObjectOutput) {\n return new OutputArchive((ObjectOutput) stream);\n } else {\n return new OutputArchive(new ObjectOutputStream(stream));\n }\n }", "public FilesArchived(File rootDir, String zip) {\n this.root = rootDir;\n this.compression = (\"zstd\".equals(zip)) ? Compression.ZSTD : Compression.GZIP;\n rescan();\n Thread thread = new Thread(this::run);\n thread.setDaemon(true);\n thread.setName(\"FilesArchived-maintainer\");\n thread.start();\n }", "public EnergyArchive(int maxSize, ScalarizationWrapper scalWrapper) {\r\n super(maxSize);\r\n this.scalWrapper = scalWrapper;\r\n }", "public Principal() {\n initComponents();\n empresaControlador = new EmpresaControlador();\n clienteControlador = new ClienteControlador();\n vehiculoControlador = new VehiculoControlador();\n servicioControlador = new ServicioControlador();\n archivoObjeto = new ArchivoObjeto(\"/home/diego/UPS/56/ProgramacionAplicada/Parqueadero/src/archivo/ClienteArchivo.obj\");// Ruta Absolojuta\n archivosBinarios = new ArchivosBinarios();\n archivosBinariosAleatorio = new ArchivosBinariosAleatorio(\"ServicioArchivo.dat\");//Ruta relativa\n }", "public DozentPublikation(){}", "private ArchiveEntriesTree buildArchiveEntriesTree() {\n ArchiveEntriesTree tree = new ArchiveEntriesTree();\n String repoKey = getRepoKey();\n ArchiveInputStream archiveInputStream = null;\n try {\n ArchiveEntry archiveEntry;\n // create repo path\n RepoPath repositoryPath = InternalRepoPathFactory.create(repoKey, getPath());\n archiveInputStream = getRepoService().archiveInputStream(repositoryPath);\n while ((archiveEntry = archiveInputStream.getNextEntry()) != null) {\n tree.insert(InfoFactoryHolder.get().createArchiveEntry(archiveEntry), repoKey, getPath());\n }\n } catch (IOException e) {\n log.error(\"Failed to get zip Input Stream: \" + e.getMessage());\n } finally {\n if (archiveInputStream != null) {\n IOUtils.closeQuietly(archiveInputStream);\n }\n return tree;\n }\n }", "public ActionFile() {\n }", "public WorkDataFile()\n\t{\n\t\tsuper();\n\t}", "public Importer(File directory) {\r\n\t\tsuper();\r\n\t\t_headerObject = new HeaderObject();\r\n\t\t_headerObject._directory = directory;\r\n\t}", "private ZipUtils() {\n }", "public RecoveryJournal(String path, String filename)\n throws IOException {\n this.gzipFile = new File(path, filename + GZIP_SUFFIX);\n this.out = initialize(gzipFile);\n }", "public Tarifa() {\n ;\n }", "public ReportVersionArtefact() {\n this(\"report_version_artefact\", null);\n }", "public Backup() {\n initComponents();\n }", "public ZipArchiveEntry(final String name) {\n super(name);\n setName(name);\n }", "public EnviarArchivo(String ip) {\n initComponents();\n //iniciamos configuracion de la ventana\n iniciarVentana();\n //colocamos icono a la ventana\n this.setTitle(\"Enviar a todos los equipos dentro del grupo\");\n //guardamos en la variable global la direccion/hostname resivida\n this.ip=ip;\n \n \n }", "@Override\n public void Init() {\n strRemoteDownloadPath = strBasePath + (\"serialize/to/\");\n strRemoteUploadPath = strBasePath + (\"serialize/from/\");\n new File(strRemoteDownloadPath).mkdirs();\n new File(strRemoteUploadPath).mkdirs();\n }", "private FileEntry() {\n // intentionally empty\n }", "public AsociarArchivoSerializado(String nuevoMaest, String registro){\n try{\n salNuevoMaest = new ObjectOutputStream(\n Files.newOutputStream(Paths.get(nuevoMaest)));\n \n salRegistro = new ObjectOutputStream(\n Files.newOutputStream(Paths.get(registro)));\n }\n catch(IOException iOException){\n System.err.println(\"Error al abrir el archivo. Terminado.\");\n System.exit(1);\n }\n }", "private NewsWriter() {\n }", "private FileUtility() {\r\n\t}", "public Directory() {\n files = new ArrayList<VipeFile>();\n sectors = new int[600];\n }", "public void setArchiveName(String name) {\n customName = name;\n }", "public JBIArchive(JarFile jarFile) throws Exception {\n this.mJarFile = jarFile;\n validate();\n }", "private FileUtil() {\n \t\tsuper();\n \t}", "protected File createZipArchive(File directoryToZip, String modpackName, String workspace) throws Exception {\n zipName = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\")) + \"--\" + modpackName + \".zip\";\n uploadStatus = \"Creating Zipfile from Directory\";\n File zipFile = new File(workspace + \"\\\\\" + zipName);\n try {\n ProgressBarLogic progressBarLogic = new ProgressBarLogic(directoryToZip);\n ZipUtil.pack(directoryToZip, zipFile, name -> {\n uploadStatus = \"Adding file: \" + name + \" to the zip\";\n progressBarLogic.progressPercentage = 0;\n progressBarLogic.progress.add(name);\n progressBarLogic.calculateProgress(progressBarLogic.progress);\n notifyObserver();\n return name;\n });\n } catch (ZipException e) {\n throw e;\n } catch (Exception e) {\n System.out.println(e);\n }\n return zipFile;\n }", "private FileUtils() {\n }", "private FileUtils() {\n }", "public PemArchiveExporter(ArchiveBuilder archiveBuilder) {\n this.archiveBuilder = archiveBuilder;\n }", "public void preArchive() {\n // update version number\n setVersionNumber(CURRENT_VERSION_NO);\n }", "public static Archives jz(JSONObject jsonObject){\n Archives archives = new Archives();\n if (jsonObject.has(\"a_UID\")&&jsonObject.get(\"a_UID\")!=null&&jsonObject.get(\"a_UID\")!=\"\"){\n archives.setA_UID(jsonObject.get(\"a_UID\").toString());\n }\n if (jsonObject.has(\"unit_Name\")&&jsonObject.get(\"unit_Name\")!=null&&jsonObject.get(\"unit_Name\")!=\"\"){\n archives.setUnit_Name(jsonObject.get(\"unit_Name\").toString());\n }\n if (jsonObject.has(\"a_Address\")&&jsonObject.get(\"a_Address\")!=null&&jsonObject.get(\"a_Address\")!=\"\"){\n archives.setA_Address(jsonObject.get(\"a_Address\").toString());\n }\n if (jsonObject.has(\"a_Phone\")&&jsonObject.get(\"a_Phone\")!=null&&jsonObject.get(\"a_Phone\")!=\"\"){\n archives.setA_Phone(jsonObject.get(\"a_Phone\").toString());\n }\n if (jsonObject.has(\"cp_UID\")&&jsonObject.get(\"cp_UID\")!=null&&jsonObject.get(\"cp_UID\")!=\"\"){\n archives.setCp_UID(jsonObject.get(\"cp_UID\").toString());\n }\n if (jsonObject.has(\"delivery_Name\")&&jsonObject.get(\"delivery_Name\")!=null&&jsonObject.get(\"delivery_Name\")!=\"\"){\n archives.setDelivery_Name(jsonObject.get(\"delivery_Name\").toString());\n }\n if (jsonObject.has(\"a_Sex\")&&jsonObject.get(\"a_Sex\")!=null&&jsonObject.get(\"a_Sex\")!=\"\"){\n archives.setA_Sex(jsonObject.get(\"a_Sex\").toString());\n }\n if (jsonObject.has(\"a_Emil\")&&jsonObject.get(\"a_Emil\")!=null&&jsonObject.get(\"a_Emil\")!=\"\"){\n archives.setA_Emil(jsonObject.get(\"a_Emil\").toString());\n }\n if (jsonObject.has(\"dm_UID\")&&jsonObject.get(\"dm_UID\")!=null&&jsonObject.get(\"dm_UID\")!=\"\"){\n archives.setDm_UID(jsonObject.get(\"dm_UID\").toString());\n }\n if (jsonObject.has(\"dateTime\")&&jsonObject.get(\"dateTime\")!=null&&jsonObject.get(\"dateTime\")!=\"\"){\n archives.setDateTime(jsonObject.get(\"dateTime\").toString());\n }\n if (jsonObject.has(\"state\")&&jsonObject.get(\"state\")!=null&&jsonObject.get(\"state\")!=\"\"){\n archives.setState(jsonObject.get(\"state\").toString());\n }\n return archives;\n }", "public ArchillectSource() {\n super(SOURCE_NAME);\n }", "@Override\n public void construct() throws IOException {\n \n }", "private FileUtils()\n {\n // Nothing to do.\n }", "public EnviarArchivo(String nombre,String ip) {\n initComponents();\n //iniciamos configuracion de la ventana\n iniciarVentana();\n //Colocamos titulo a ventana\n this.setTitle(\"Enviar Archivo a \"+nombre);\n //guardamos datos recividos en las variables globales\n this.nombre=nombre;\n this.ip=ip;\n //ocultamos los botones de tipo de envio\n rbtnSecuencial.setVisible(false);\n rbtnSimultaneo.setVisible(false);\n }", "public Uploader() {\n super();\n }", "ArchiveInfoInterface getArchiveInfo();", "public Backup() {\n initComponents();\n selecionarOpcoesDeBackup();\n }", "public PersistFile() {\n\n }", "public void archiver(int numProfil) {\n\t\tcontrolArchiver.archiver(numProfil);\n\t}", "public DiskArtifactStore(File root) {\n this.root = root;\n }", "private StandardDeCompressors() {}", "public FileObjectFactory() {\n }", "public void saveArchive() throws FileNotFoundException {\n jsonWriter.open();\n Archive archive = new Archive(cameraCollection, filmCollection);\n jsonWriter.write(archive);\n jsonWriter.close();\n }", "Csar getArchive(String archiveName, String archiveVersion);", "public Content() {\n\t}", "public ManejadorArch(String Usuario) {\n initComponents();\n \n NombreUs = Usuario;\n vertical[ver]=\"\\\\\";\n ver++;\n //modelo.addRow();\n if (Usuario.equals(\"admin\")) {\n Rutax = \"\\\\\";\n Rutay =Ruta;\n }else{\n Rutax = \"\\\\\";\n Rutay =Ruta;\n }\n //path actual para crear archivos y crear carpetas\n \n if (Usuario.equals(\"admin\")) {\n // this.jFileChooser1.setCurrentDirectory(new java.io.File(Ruta));\n }else{\n // this.jFileChooser1.setCurrentDirectory(new java.io.File(Ruta+Usuario));\n }\n \n if (Usuario.equals(\"admin\")) {\n this.jb_cargausuarios.setVisible(true);\n this.jb_reporteusuarios.setVisible(true);\n }else{\n this.jb_cargausuarios.setVisible(false);\n this.jb_reporteusuarios.setVisible(false);\n }\n }", "public OriDestEOImpl() {\n }", "Active_Digital_Artifact createActive_Digital_Artifact();", "public FileInfo(FileInfo v)\n \t{\n \t\ttitle = v.title;\n \t\tauthors = v.authors;\n \t\tseries = v.series;\n \t\tseriesNumber = v.seriesNumber;\n \t\tpath = v.path;\n \t\tfilename = v.filename;\n \t\tpathname = v.pathname;\n \t\tarcname = v.arcname;\n \t\tformat = v.format;\n \t\tsize = v.size;\n \t\tarcsize = v.arcsize;\n \t\tisArchive = v.isArchive;\n \t\tisDirectory = v.isDirectory;\n \t\tcreateTime = v.createTime;\n \t\tlastAccessTime = v.lastAccessTime;\n \t}", "public File() {\n }", "@Override\r\n\tpublic String getArchivoZul() {\n\r\n\t\tif (archivoZul != null) {\r\n\t\t\treturn super.getArchivoZul();\r\n\t\t} else {\r\n\r\n\t\t\t// Resuelvo el nombre del Archivo que va a mostrarse para el objeto\r\n\t\t\tString objectZulFile = BASE_PATH + \"/viewNothing.zul\";\r\n\r\n\t\t\tif (objeto != null) {\r\n\t\t\t\t\r\n\t\t\t\tString className = objeto.getClass().getSimpleName();\r\n\t\t\t\tString numeroZulFile = \"\";\r\n\t\t\t\tif (numero > 0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tnumeroZulFile = numero.toString();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (OperacionHelper.getType(getOperacion()).equals(OperationType.INCLUIR) || OperacionHelper.getType(getOperacion()).equals(OperationType.MODIFICAR)) {\r\n\r\n\t\t\t\t\tobjectZulFile = BASE_PATH + \"/edit\" + \"/edit\" + className\r\n\t\t\t\t\t\t\t+ numeroZulFile + \".zul\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t} else if (OperacionHelper.getType(getOperacion()).equals(\r\n\t\t\t\t\t\tOperationType.BUSCAR)) {\r\n\r\n\t\t\t\t\tobjectZulFile = BASE_PATH + \"/views\" + \"/view\" + className\r\n\t\t\t\t\t\t\t+ numeroZulFile + \".zul\";\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\treturn objectZulFile;\r\n\r\n\t\t}\r\n\r\n\t}" ]
[ "0.7440212", "0.6959886", "0.6932257", "0.66313654", "0.65199775", "0.6476337", "0.6276092", "0.6188984", "0.6085345", "0.60803175", "0.6073153", "0.6060782", "0.5996297", "0.5995106", "0.5975719", "0.5969006", "0.59598756", "0.59221655", "0.5869898", "0.58524567", "0.58401716", "0.5766843", "0.57367516", "0.56755805", "0.5669017", "0.566569", "0.56648767", "0.5663509", "0.5657231", "0.56426036", "0.5625561", "0.561569", "0.56135666", "0.56068623", "0.5596855", "0.55903363", "0.5548586", "0.55484337", "0.55435", "0.5539393", "0.5535995", "0.5523074", "0.54921925", "0.54849565", "0.5483998", "0.54647505", "0.5464074", "0.54405546", "0.54405457", "0.54326415", "0.54244876", "0.5422684", "0.541119", "0.5405839", "0.53928816", "0.53847253", "0.5350941", "0.5350315", "0.5341637", "0.53369087", "0.5333778", "0.5331516", "0.5330317", "0.5329838", "0.5327505", "0.53252417", "0.5309124", "0.5301104", "0.52989167", "0.5297898", "0.5272883", "0.5251601", "0.52506405", "0.5246865", "0.5245254", "0.5243504", "0.5243504", "0.5242784", "0.5236326", "0.5223731", "0.52229315", "0.52166367", "0.52156234", "0.5202347", "0.5201028", "0.51987326", "0.5197089", "0.5192853", "0.51826435", "0.51767737", "0.5167364", "0.516439", "0.5161401", "0.51593333", "0.51535684", "0.5150808", "0.51435596", "0.5137949", "0.51368153", "0.51337093", "0.51305324" ]
0.0
-1
Ajouter un fichier au zip
public void addFile(String fileName) throws FileNotFoundException, IOException { FileInputStream fis = new FileInputStream(fileName); int size = 0; byte[] buffer = new byte[2048]; // Ajouter une entree à l'archive zip File file = new File(fileName); ZipEntry zipEntry = new ZipEntry(file.getName()); this.zos.putNextEntry(zipEntry); // copier et compresser les données while ((size = fis.read(buffer, 0, buffer.length)) > 0) { this.zos.write(buffer, 0, size); } this.zos.closeEntry(); fis.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createZipEntry(ZipOutputStream out, String fileName, byte[] content) throws IOException\n\t{\n\t\tZipEntry entry = new ZipEntry(fileName);\n\t\tentry.setMethod(ZipEntry.DEFLATED);\n\t\tout.putNextEntry(entry);\n\t\tout.write(content);\n\t}", "void addFileToZip(File file, Zipper z, SynchronizationRequest req) \n throws IOException {\n\n if (file.isFile()) {\n z.setBaseDirectory(req.getTargetDirectory());\n z.addFileToZip(file, _out);\n } else if (file.isDirectory()) {\n z.setBaseDirectory(req.getTargetDirectory());\n z.addDirectoryToZip(file, _out);\n } else {\n assert false;\n }\n }", "public void newZipEntry(ZipEntry zipEntry, InputStream inputStream);", "private static String createZipFile(String directory, String zipFilename, List<File> filesToAdd)\n throws IOException {\n String zipFilePath = String.format(\"%s/%s\", directory, zipFilename);\n File zipFile = new File(zipFilePath);\n if (zipFile.exists()) {\n if (zipFile.delete()) {\n log.info(\"Zipfile existed and was deleted: \" + zipFilePath);\n } else {\n log.warn(\"Zipfile exists but was not deleted: \" + zipFilePath);\n }\n }\n\n // Create and add files to zip file\n addFilesToZip(zipFile, filesToAdd);\n\n return zipFilePath;\n }", "private void addToZip(File directoryToZip, File file, ZipOutputStream zos) throws IOException {\r\n final int BUFFER_SIZE = 1024;\r\n FileInputStream fis = new FileInputStream(file);\r\n // we want the zipEntry's path to be a relative path that is relative\r\n // to the directory being zipped, so chop off the rest of the path\r\n String zipFilePath = file.getCanonicalPath().substring(\r\n (directoryToZip.getCanonicalPath().length() - directoryToZip.getName().length()),\r\n file.getCanonicalPath().length());\r\n ZipEntry zipEntry = new ZipEntry(zipFilePath);\r\n zos.putNextEntry(zipEntry);\r\n byte[] bytes = new byte[BUFFER_SIZE];\r\n int length;\r\n while ((length = fis.read(bytes)) >= 0) {\r\n zos.write(bytes, 0, length);\r\n }\r\n zos.closeEntry();\r\n fis.close();\r\n }", "private void addToZipStream(Path file, ZipOutputStream zipStream, String dirName)\r\n throws Exception {\r\n String inputFileName = file.toFile().getPath();\r\n try (FileInputStream inputStream = new FileInputStream(inputFileName)) {\r\n\r\n // create a new ZipEntry, which is basically another file\r\n // within the archive. We omit the path from the filename\r\n Path directory = Paths.get(dirName);\r\n ZipEntry entry = new ZipEntry(directory.relativize(file).toString());\r\n\r\n zipStream.putNextEntry(entry);\r\n\r\n // Now we copy the existing file into the zip archive. To do\r\n // this we write into the zip stream, the call to putNextEntry\r\n // above prepared the stream, we now write the bytes for this\r\n // entry. For another source such as an in memory array, you'd\r\n // just change where you read the information from.\r\n byte[] readBuffer = new byte[2048];\r\n int amountRead;\r\n int written = 0;\r\n\r\n while ((amountRead = inputStream.read(readBuffer)) > 0) {\r\n zipStream.write(readBuffer, 0, amountRead);\r\n written += amountRead;\r\n }\r\n } catch (IOException e) {\r\n throw new Exception(\"Unable to process \" + inputFileName, e);\r\n }\r\n }", "void makeZip(String zipFilePath, String srcFilePaths[],\n\t\t\tMessageDisplay msgDisplay) {\n\t\t...\n\t\tfor (int i = 0; i < srcFilePaths.length; i++) {\n\t\t\tmsgDisplay.showMessage(\"Zipping \"+srcFilePaths[i]);\n\t\t\t//add the file srcFilePaths[i] into the zip file.\n\t\t\t...\n\t\t}\n\t}", "void makeZip(String zipFilePath, String srcFilePaths[], ZipMainFrame f) {\n ...\n for (int i = 0; i < srcFilePaths.length; i++) {\n f.setStatusBarText(\"Zipping \"+srcFilePaths[i]);\n //add the file srcFilePaths[i] into the zip file.\n ...\n }\n }", "protected void getFile(ZipEntry e) throws IOException {\n String zipName = e.getName();\n switch (mode) {\n case EXTRACT:\n if (zipName.startsWith(\"/\")) {\n if (!warnedMkDir)\n System.out.println(\"Ignoring absolute paths\");\n warnedMkDir = true;\n zipName = zipName.substring(1);\n }\n // if a directory, just return. We mkdir for every file,\n // since some widely-used Zip creators don't put out\n // any directory entries, or put them in the wrong place.\n if (zipName.endsWith(\"/\")) {\n return;\n }\n // Else must be a file; open the file for output\n // Get the directory part.\n int ix = zipName.lastIndexOf('/');\n if (ix > 0) {\n //String dirName = zipName.substring(0, ix);\n String fileName = zipName.substring(ix + 1, zipName.length());\n zipName = fileName;\n\n }\n String targetFile = this.unzipFileTargetLocation;\n File file = new File(targetFile);\n if (!file.exists())\n file.createNewFile();\n FileOutputStream os = null;\n InputStream is = null;\n try {\n os = new FileOutputStream(targetFile);\n is = zippy.getInputStream(e);\n int n = 0;\n while ((n = is.read(b)) > 0)\n os.write(b, 0, n);\n\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n if (os != null) {\n try {\n os.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }\n break;\n case LIST:\n // Not extracting, just list\n if (e.isDirectory()) {\n System.out.println(\"Directory \" + zipName);\n } else {\n System.out.println(\"File \" + zipName);\n }\n break;\n default:\n throw new IllegalStateException(\"mode value (\" + mode + \") bad\");\n }\n }", "private static void createZipOrXmlFile(Document createdDocument) {\n if(attachmentList.size() > 0){\n File zipFile = new File(OUTPUT_ZIP_PATH);\n ZipOutputStream zipOutputStream = null;\n String fileName;\n byte[] decoded;\n\n try {\n zipOutputStream = new ZipOutputStream(new FileOutputStream(zipFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n for (Attachment attachment : attachmentList) {\n try {\n //create a new zip entry\n //add the zip entry and write the decoded data\n assert zipOutputStream != null;\n fileName = attachment.filename;\n decoded = attachment.data;\n ZipEntry imageOutputStream = new ZipEntry(ImportUtils.PHOTO_FILE_PATH + fileName);\n zipOutputStream.putNextEntry(imageOutputStream);\n zipOutputStream.write(decoded);\n\n } catch (IllegalArgumentException | IOException e) {\n e.printStackTrace();\n }\n }\n //add the xml after the attachments have been added\n ZipEntry xmlOutputStream = new ZipEntry(ImportUtils.GENERATED_XML_FILENAME);\n try {\n zipOutputStream.putNextEntry(xmlOutputStream);\n zipOutputStream.write(Entry.toBytes(createdDocument));\n //closing the stream\n //! not closing the stream can result in malformed zip files\n zipOutputStream.finish();\n zipOutputStream.flush();\n zipOutputStream.closeEntry();\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n }else{\n //if no attachments found\n // add the xml file only\n OutputFormat format = OutputFormat.createPrettyPrint();\n try {\n OutputStream outputStream = new FileOutputStream(OUTPUT_XML_PATH);\n XMLWriter writer = new XMLWriter(outputStream, format);\n writer.write(createdDocument);\n } catch (IOException e ) {\n e.printStackTrace();\n }\n }\n }", "protected void createFile (ZipFile file, ZipEntry entry, File target)\n {\n if (_buffer == null) {\n _buffer = new byte[COPY_BUFFER_SIZE];\n }\n\n // make sure the file's parent directory exists\n File pdir = target.getParentFile();\n if (!pdir.exists() && !pdir.mkdirs()) {\n log.warning(\"Failed to create parent for '\" + target + \"'.\");\n }\n\n try (InputStream in = file.getInputStream(entry);\n FileOutputStream fout = new FileOutputStream(target)) {\n\n int total = 0, read;\n while ((read = in.read(_buffer)) != -1) {\n total += read;\n fout.write(_buffer, 0, read);\n updateProgress(total);\n }\n\n } catch (IOException ioe) {\n log.warning(\"Error creating '\" + target + \"': \" + ioe);\n }\n }", "public static void generateZip(File file) {\r\n\t\t\r\n\t\tFile zipfile=new File(file.toString().replaceAll(\".xlsx\",\".zip\" ));\r\n\t\tFileOutputStream fos=null;\r\n\t\tZipOutputStream zos=null;\r\n\t\tFileInputStream fin=null;\r\n\t\tZipEntry ze=null; \r\n\t\t\t\r\n\t\tif(!zipfile.exists()){\r\n\t\t\ttry {\r\n\t\t\t\tzipfile.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//create ZipOutputStream to write to the zipfile\r\n fos=new FileOutputStream(zipfile);\r\n\t\t\t zos=new ZipOutputStream(fos);\r\n\t\t\t \r\n\t\t//add a new Zip Entry to the ZipOutPutStream \r\n\t\t\t ze=new ZipEntry(file.getName());\r\n\t\t\t zos.putNextEntry(ze);\r\n\t\t\t \r\n\t\t//read the file and write to the ZipOutPutStream\t \r\n\t\t\t fin=new FileInputStream(file);\r\n\t\t\t int i;\r\n\t\t\t \r\n\t\t\t while((i=fin.read())!=-1){\r\n\t\t\t\t zos.write(i);\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tif(zos!=null && fos!=null && fin!=null){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t //close the zip entry to write to to zip file\r\n\t\t\t\t\t\tzos.closeEntry();\r\n\t\t\t\t\t//close Resources.\t\r\n\t\t\t\t\t\tzos.close();\r\n\t\t\t\t\t\tfos.close();\r\n\t\t\t\t\t\tfin.close();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\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}\r\n\t\t}", "protected void attachFile(final File source, final String name) {\n try {\n final ZipEntry ze = new ZipEntry(name);\n _zip.putNextEntry(ze);\n final byte[] buffer = new byte[4096];\n try (FileInputStream in = new FileInputStream(source)) {\n int bytes;\n while ((bytes = in.read(buffer)) > 0) {\n _zip.write(buffer, 0, bytes);\n }\n }\n _zip.closeEntry();\n } catch (final IOException e) {\n throw new OpenGammaRuntimeException(\"Couldn't write \" + name + \" to ZIP file\", e);\n }\n }", "public ZipFileWriter(String zipFile) throws FileNotFoundException {\r\n\t\tFileOutputStream fos = new FileOutputStream(zipFile);\r\n\t\t// ajout du checksum\r\n\t\tCheckedOutputStream checksum = new CheckedOutputStream(fos,\r\n\t\t\t\tnew Adler32());\r\n\t\tthis.zos = new ZipOutputStream(new BufferedOutputStream(checksum));\r\n\t}", "public static ZipFile zip(File zip, File fileToAdd, String password)\r\n\t\t\tthrows ZipException {\n\t\tZipFile zipFile = new ZipFile(zip);\r\n\r\n\t\tZipParameters parameters = new ZipParameters();\r\n\t\tparameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);\r\n\t\tparameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);\r\n\t\tif (!StringUtil.isEmpty(password)) {\r\n\t\t\tparameters.setEncryptFiles(true);\r\n\t\t\tparameters.setEncryptionMethod(Zip4jConstants.ENC_METHOD_STANDARD);\r\n\t\t\tparameters.setPassword(password);\r\n\t\t}\r\n\t\tzipFile.addFile(fileToAdd, parameters);\r\n\t\treturn zipFile;\r\n\t}", "private void compress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tZipOutputStream rfoFile = new ZipOutputStream(new FileOutputStream(path + fileName)); \n\t\t\tFile dirToZip = new File(rfoDir); \n\t\t\tString[] fileList = dirToZip.list(); \n\t\t\tbyte[] buffer = new byte[4096]; \n\t\t\tint bytesIn = 0; \n\n\t\t\tfor(int i=0; i<fileList.length; i++) \n\t\t\t{ \n\t\t\t\tFile f = new File(dirToZip, fileList[i]); \n\t\t\t\tFileInputStream fis = new FileInputStream(f); \n\t\t\t\tString zEntry = f.getPath();\n\t\t\t\t//System.out.println(\"\\n\" + zEntry);\n\t\t\t\tint start = zEntry.indexOf(uniqueName);\n\t\t\t\tzEntry = zEntry.substring(start + uniqueName.length() + 1, zEntry.length());\n\t\t\t\t//System.out.println(tempDir);\n\t\t\t\t//System.out.println(zEntry + \"\\n\");\n\t\t\t\tZipEntry entry = new ZipEntry(zEntry); \n\t\t\t\trfoFile.putNextEntry(entry); \n\t\t\t\twhile((bytesIn = fis.read(buffer)) != -1) \n\t\t\t\t\trfoFile.write(buffer, 0, bytesIn); \n\t\t\t\tfis.close();\n\t\t\t}\n\t\t\trfoFile.close();\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.compress(): \" + e);\n\t\t}\n\t}", "public static void makeZip(String fileName)\r\n throws IOException, FileNotFoundException\r\n {\r\n File file = new File(fileName);\r\n zos = new ZipOutputStream(new FileOutputStream(file + \".zip\"));\r\n //Call recursion.\r\n\r\n\r\nrecurseFiles(file);\r\n //We are done adding entries to the zip archive,\r\n\r\n\r\n//so close the Zip output stream.\r\n\r\n\r\nzos.close();\r\n }", "public void zip(String directoryInZip, \n String filePath) throws Exception\n {\n File thisFile = new File(filePath);\n\n if (thisFile.exists()) {\n\n try {\n FileInputStream fi = new FileInputStream(thisFile);\n\n origin = new BufferedInputStream(fi, BUFFER);\n\n ZipEntry entry = new ZipEntry(directoryInZip + File.separator\n + thisFile.getName());\n out.putNextEntry(entry);\n\n int count;\n while ((count = origin.read(data, 0, BUFFER)) != -1) {\n out.write(data, 0, count);\n }\n origin.close();\n\n } catch (FileNotFoundException e) {\n logger.error(\"File \" + filePath + \" not found !!\", e);\n } catch (IOException e) {\n logger.error(\"Could not write to Zip File \", e);\n throw new Exception(\"Could not write to Zip File \", e);\n }\n\n } else {\n // Log message if file does not exist\n logger.info(\"File \" + thisFile.getName()\n + \" does not exist on file system\");\n\n } \t\t\n }", "private static FileSystem openZip(Path zipPath) throws IOException, URISyntaxException{\n\t Map<String, String> providerProps = new HashMap<>();\r\n\t\tproviderProps.put(\"create\", \"true\");\r\n\t\t\r\n\t\t// Um ZipFiles zu erstellen benötigt man URIs, deswegen werden sie hier erstellt\r\n\t\tURI zipUri = new URI(\"jar:file\", zipPath.toUri().getPath(), null);\r\n\t\tFileSystem zipFs = FileSystems.newFileSystem(zipUri, providerProps); // Statische Methode wird hier angewendet\r\n\t\t\r\n\t\treturn zipFs;\r\n\t}", "private static void createZipArchiv(String xmlStream, String path, String name) {\r\n\t\ttry {\r\n\t\t\tFile file = new File(path, name + \".xml\");\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t}\r\n\t\t\t//XMLStream in Datei schreiben\r\n\t\t\tPrintWriter writer = new PrintWriter(file);\r\n\t\t\twriter.write(xmlStream);\r\n\t\t\twriter.close();\r\n\t\t\t\r\n\t\t\t//Commando für die Shell um ein Tgz zu erstellen.\r\n\t\t\tString[] str = new String[] {\r\n\t\t\t\t\t\"/bin/bash\",\r\n\t\t\t\t\t\"-c\",\r\n\t\t\t\t\t\"tar cfvz \" + path + \"/\" + name + \".tgz -C \" + path + \" \" + name\r\n\t\t\t\t\t\t\t+ \".xml -C \" + path + \" \" + name + \".pdf\" };\r\n\r\n\t\t\t//Shell Aufruf\r\n\t\t\tProcess p = Runtime.getRuntime().exec(str);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tint timeout = 10;\r\n\t\t\twhile (!new File(path + name + \".tgz\").exists() && timeout != 0) {\r\n\t\t\t\t//warten bis Datei erstellt wurde oder 10 sec vergangen sind\r\n\t\t\t\ttry {\r\n\t\t\t\t\ttimeout--;\r\n\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void addLibrary(ZipOutputStream out, File file) throws IOException\n\t{\n\t\tString groupId = DEFAULT_LIBRARY_GROUPID; // FIXME\n\t\tString version = DEFAULT_LIBRARY_VERSION; // FIXME\n\t\tString artifactId = file.getName().substring(0, file.getName().lastIndexOf(\".\")); // remove file extension\n\t\t\n\t\tString fileName = \"/localrepo/\" + groupId + \"/\" + artifactId + \"/\" + version + \"/\" + artifactId + \"-\" + version + \".jar\";\n\n\t\tcreateZipEntry(out, fileName, Files.readAllBytes(Paths.get(file.getAbsolutePath())));\n\t}", "private void addFile( ZipOutputStream output, File file, String prefix, boolean compress) throws IOException {\n //Make sure file exists\n long checksum = 0;\n if ( ! file .exists() ) {\n return ;\n }\n ZipEntry entry = new ZipEntry( getEntryName( file, prefix ) );\n entry .setTime( file .lastModified() );\n entry .setSize( file .length() );\n if (! compress){\n entry.setCrc(calcChecksum(file));\n }\n FileInputStream input = new FileInputStream( file );\n addToOutputStream(output, input, entry);\n }", "public AddFileToZip add(final File source) {\n\t\treturn new AddFileToZip(source);\n\t}", "private static void writeToFileInZip2 (FileSystem zipFs, String[] data) throws IOException {\r\n\t\tFiles.write(zipFs.getPath(\"/newFile2.txt\"), Arrays.asList(data), Charset.defaultCharset(), StandardOpenOption.CREATE);\r\n\t}", "private void unzipDownloadedFile(String zipFile) throws ZipException, IOException{\n\t int BUFFER = 2048;\n\t \n\t // get zip file\n\t File file = new File(zipFile);\n\t ZipFile zip = new ZipFile(file);\n\t \n\t // unzip to directory of the same name\n\t // When sip is a directory, this gets two folders\n\t //String newPath = zipFile.substring(0, zipFile.length() - 4);\n\t //new File(newPath).mkdir();\n\t \n\t // unzip to parent directory of the zip file\n\t // This is assuming zip if of a directory\n\t String newPath = file.getParent();\n\t \n\t // Process each entry\n\t Enumeration<? extends ZipEntry> zipFileEntries = zip.entries();\n\t while (zipFileEntries.hasMoreElements())\n\t {\n\t // grab a zip file entry\n\t ZipEntry entry = (ZipEntry) zipFileEntries.nextElement();\n\t String currentEntry = entry.getName();\n\t File destFile = new File(newPath, currentEntry);\n\t File destinationParent = destFile.getParentFile();\n\n\t // create the parent directory structure if needed\n\t destinationParent.mkdirs();\n\n\t if (!entry.isDirectory())\n\t {\n\t BufferedInputStream is = new BufferedInputStream(zip.getInputStream(entry));\n\t int currentByte;\n\t // establish buffer for writing file\n\t byte data[] = new byte[BUFFER];\n\n\t // write the current file to disk\n\t FileOutputStream fos = new FileOutputStream(destFile);\n\t BufferedOutputStream dest = new BufferedOutputStream(fos,\n\t BUFFER);\n\n\t // read and write until last byte is encountered\n\t while ((currentByte = is.read(data, 0, BUFFER)) != -1) {\n\t dest.write(data, 0, currentByte);\n\t }\n\t dest.flush();\n\t dest.close();\n\t is.close();\n\t }\n\n\t if (currentEntry.endsWith(\".zip\"))\n\t {\n\t // found a zip file, try to open\n\t \tunzipDownloadedFile(destFile.getAbsolutePath());\n\t }\n\t }\n\t zip.close();\n\t}", "public void tozip() {\r\n\t\t//session.setAttribute(Constant.USER_SESSION_KEY, null);\r\n\t\tList<Netlog> result = null;\r\n\t\tInteger total = null;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t\tresult = (List<Netlog>)netlogDao.findNetlogByPage(1,10000);\r\n\t\t\t\ttotal= result.size();\r\n\t\t\t\t//total= netlogDao.findNetlogCount();\r\n\t\t\t\r\n\t\t} catch (SQLException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tNetlogs netlogs = new Netlogs(result);\r\n\t\tString path = this.getClass().getClassLoader().getResource(\"\").getPath();\r\n\t\tSystem.out.println(path);\r\n\t\tpath = path.replace(\"WEB-INF/classes/\", \"\");\r\n\t\tString path1 = path + \"netlog/\";\r\n\t\tLong time = System.currentTimeMillis()/1000;\r\n\t\tXml2Java.beanToXML(netlogs,path1+\"145-330000-\"+time.toString()+\"-00001-WA-SOURCE_NETLOG_0001-0.xml\");\r\n\r\n\t\tZipUtil.ZipMultiFile(path1, path+\"145-353030334-330300-330300-netlog-00001.zip\");\r\n\t}", "private ZipCompressor(){}", "private static JarFile createTempJar(File temp, JarFile parentJar, ZipEntry entry) throws IOException\n {\n InputStream inputStream = parentJar.getInputStream(entry);\n try\n {\n FileOutputStream outputStream = new FileOutputStream(temp);\n try\n {\n byte[] buffer = new byte[8096];\n int read = inputStream.read(buffer);\n while (read != -1)\n {\n outputStream.write(buffer, 0, read);\n read = inputStream.read(buffer);\n }\n }\n finally\n {\n outputStream.close();\n }\n }\n finally\n {\n try\n {\n inputStream.close();\n }\n catch (IOException ignored)\n {\n }\n }\n \n return new JarFile(temp);\n }", "protected File createZipArchive(File directoryToZip, String modpackName, String workspace) throws Exception {\n zipName = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\")) + \"--\" + modpackName + \".zip\";\n uploadStatus = \"Creating Zipfile from Directory\";\n File zipFile = new File(workspace + \"\\\\\" + zipName);\n try {\n ProgressBarLogic progressBarLogic = new ProgressBarLogic(directoryToZip);\n ZipUtil.pack(directoryToZip, zipFile, name -> {\n uploadStatus = \"Adding file: \" + name + \" to the zip\";\n progressBarLogic.progressPercentage = 0;\n progressBarLogic.progress.add(name);\n progressBarLogic.calculateProgress(progressBarLogic.progress);\n notifyObserver();\n return name;\n });\n } catch (ZipException e) {\n throw e;\n } catch (Exception e) {\n System.out.println(e);\n }\n return zipFile;\n }", "@Override\r\n\tpublic void zipFile(ZipFileDetails zipFileDetails) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\", null, Level.ERROR, null);\r\n\r\n\t}", "public void setupZipFile(String[] args) {\n\t\tif (args.length > 0) {\n\t\t\tif (!args[0].endsWith(\".zip\")) {\n\t\t\t\tthrow new IllegalArgumentException(\"zip file expected, but: \" + args[0]);\n\t\t\t}\n\t\t\tbuildDirectory = new File(\n\t\t\t\t\tgetBuildDirectory(),\n\t\t\t\t\tString.valueOf(System.currentTimeMillis()));\n\t\t\ttool_builddir = buildDirectory.toString();\n\t\t\tif (!buildDirectory.mkdirs()) {\n\t\t\t\tLoggedUtils.ignore(\"Unable to create directory \" + tool_builddir, null);\n\t\t\t}\n\t\t\tzipFile = args[0];\n\t\t} else if (requireZipArgument){\n\t\t\tthrow new IllegalArgumentException(\"zip file is expected as a first argument\");\n\t\t}\n\t}", "private static void writeFile(ZipInputStream zipIn, String filePath) throws IOException {\n\n String parent = filePath.replace(filePath.substring(filePath.lastIndexOf('/')), \"\");\n createParents(parent);\n\n BufferedOutputStream bos = null;\n\n try {\n bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n\n } catch (IOException e) {\n System.err.println(e.getMessage());\n Errors.setUnzipperError(true);\n\n } finally {\n if (bos != null) {\n bos.close();\n }\n }\n }", "private static void createFiles(String destDirectory, ZipInputStream zipIn, ZipEntry entry, boolean recursive) throws IOException {\n\n String filePath = destDirectory + File.separator + entry.getName();\n\n if (!entry.isDirectory()) {\n\n boolean isZipFile = filePath.endsWith(\".zip\");\n boolean isJavaFile = filePath.endsWith(\".java\");\n\n if (isZipFile || isJavaFile) {\n\n writeFile(zipIn, filePath);\n\n if (recursive) {\n File file = new File(filePath);\n\n String parts[] = entry.getName().split(\"/\");\n String studentName;\n\n if (parts.length > 1) {\n studentName = parts[1].split(\"_\")[0];\n } else {\n studentName = entry.getName().split(\"_\")[0];\n }\n\n String studentDir = file.getParentFile().getAbsolutePath() + \"/\" + studentName;\n File dir = new File(studentDir);\n dir.mkdir();\n\n students.add(new Student(studentName, studentDir));\n\n unzip(filePath, studentDir, false, false);\n }\n }\n\n } else {\n File dir = new File(filePath);\n dir.mkdir();\n }\n }", "public static void zip(BasicShell shell, File archive, List<File> filesToZip) {\n\t\ttry {\n\t\t\tshell.printOut(\"Creating archive '\" + archive.getPath() + \"'.\");\n\t\t\tfinal BufferedOutputStream archiveStream = new BufferedOutputStream(new FileOutputStream(archive));\n\t\t\tZipOutputStream zipStream = new ZipOutputStream(archiveStream);\n\t\t\tzipStream.setLevel(7);\n\t\t\t\n\t\t\tString pwd = shell.pwd().getPath();\n\t\t\tfor ( File file : filesToZip) {\n\t\t\t\tString name = file.getPath();\n\t\t\t\tif (name.equals(pwd)) continue;\n\t\t\t\t\n\t\t\t\tif ( name.startsWith(pwd) ) {\n\t\t\t\t\tname = name.substring(pwd.length()+1);\n\t\t\t\t}\n\t\t\t\tZipEntry entry = new ZipEntry(name);\n\t\t\t\tzipStream.putNextEntry(entry);\n\t\t\t\tif ( file.isFile() ) {\n\t\t\t\t\tBufferedInputStream fileStream = new BufferedInputStream(new FileInputStream(file));\n\t\t\t\t\tbyte[] buffer = new byte[2048];\n\t\t\t\t\tint count = fileStream.read(buffer);\n\t\t\t\t\twhile ( count > -1 ) {\n\t\t\t\t\t\tzipStream.write(buffer, 0, count);\n\t\t\t\t\t\tcount = fileStream.read(buffer);\n\t\t\t\t\t}\n\t\t\t\t\tfileStream.close();\n\t\t\t\t}\n\t\t\t\tshell.printOut(\"File '\" + entry.getName() + \"' added.\");\n\t\t\t}\n\t\t\tzipStream.close();\n\t\t} catch (Exception e) {\n\t\t\tshell.getErrorHandler().handleError(Diagnostic.ERROR, e.getClass().getSimpleName() + \": \"+ e.getMessage());\n\t\t}\n\t}", "private void createJarFile(File target, Map<String, String> jarEntries) throws IOException\n {\n if (!target.exists())\n {\n target.createNewFile();\n }\n\n // Create the ZIP file\n try (ZipOutputStream out = new ZipOutputStream(new FileOutputStream(target)))\n {\n for (String entryName : jarEntries.keySet())\n {\n // Add ZIP entry to output stream at the given location.\n out.putNextEntry(new ZipEntry(entryName));\n // Write the file contents to this entry and close\n out.write(jarEntries.get(entryName).getBytes(Charset.defaultCharset()));\n out.closeEntry();\n }\n }\n }", "private void addToOutputStream(ZipOutputStream output, InputStream input, ZipEntry ze) throws IOException{\n try {\n output.putNextEntry(ze); \n } catch (ZipException zipEx) {\n //This entry already exists. So, go with the first one.\n input.close();\n return;\n }\n int numBytes = -1;\n while((numBytes = input.read(buffer)) > 0){\n output.write(buffer, 0, numBytes);\n }\n output.closeEntry();\n input.close();\n }", "private void addFilesToZip(List<File> files,String outputPath) throws IOException \r\n\t{\r\n\t\t// create a zip output stream\r\n\t\tString zipFileName = outputPath + File.separator + Constants.name + zipIndex + Constants.zipExtension;\r\n\t\tOutputStreamWithLength chunkedFile = new OutputStreamWithLength(zipFileName);\r\n\t\tzipOutputStream = new ZipOutputStream(chunkedFile);\r\n\t\tdouble totalBytesRead = 0L;\r\n\t\tint count = 10; \r\n\t\tfor(File file:files)\r\n\t\t{\r\n\t\t\t// reset the file index\r\n\t\t\tfileIndex = 0;\r\n\t\t\tString zipEntryPath = file.getAbsolutePath().substring(basePath.length() + 0);\r\n\t\t\t\r\n\t\t\tif(file.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tZipEntry entry =new ZipEntry(zipEntryPath+\"/\");\r\n\t\t\t\tzipOutputStream.putNextEntry(entry);\r\n\t\t\t\tzipOutputStream.closeEntry();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tzipEntryPath = zipEntryPath + Constants.fragmentLabel + fileIndex++;\r\n\t\t\t}\t\t\t\r\n\r\n\t\t\t// add the current file to the zip\r\n\t\t\tZipEntry entry =new ZipEntry(zipEntryPath);\r\n\t\t\tzipOutputStream.putNextEntry(entry);\r\n\r\n\t\t\tbyte[] buffer = new byte[1024]; \t \r\n\r\n\t\t\tFileInputStream inputFileStream = new FileInputStream(file);\r\n\t\t\tint len; \r\n\t\t\twhile ((len = inputFileStream.read(buffer)) > 0) \r\n\t\t\t{ \r\n\t\t\t\tif((chunkedFile.getCurrentWriteLength() + len ) > maxSplitSize){\r\n\t\t\t\t\t// close current zip output stream\r\n\t\t\t\t\tzipOutputStream.closeEntry();\r\n\t\t\t\t\tzipOutputStream.finish();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// reset the write length\r\n\t\t\t\t\tchunkedFile.setCurrentWriteLength(0);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// create new zip output stream\r\n\t\t\t\t\tzipIndex += 1;\r\n\t\t\t\t\tzipFileName = outputPath+ File.separator + Constants.name + zipIndex + Constants.zipExtension;\r\n\t\t\t\t\tchunkedFile = new OutputStreamWithLength(zipFileName);\r\n\t\t\t\t\tzipOutputStream = new ZipOutputStream(chunkedFile);\r\n\r\n\t\t\t\t\t// add the current file to write remaining bytes\r\n\t\t\t\t\tzipEntryPath = file.getAbsolutePath().substring(basePath.length() + 0);\r\n\t\t\t\t\tzipEntryPath = zipEntryPath + Constants.fragmentLabel + fileIndex++;\r\n\t\t\t\t\tentry = new ZipEntry(zipEntryPath);\r\n\t\t\t\t\tzipOutputStream.putNextEntry(entry);\r\n\r\n\t\t\t\t\t// write the bytes to the zip output stream\r\n\t\t\t\t\tzipOutputStream.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// write the bytes to the zip output stream\r\n\t\t\t\t\tzipOutputStream.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//Show progress\r\n\t\t\t\ttotalBytesRead += len;\r\n\t\t\t\tdouble progress = totalBytesRead / totalBytes;\r\n\t\t\t\tif (progress*100 > 10)\r\n\t\t\t\t{\r\n\t\t\t\t\ttotalBytesRead = 0L;\r\n\t\t\t\t\tcount += 10;\r\n\t\t\t\t\tSystem.out.println(\"Finished \" + count +\"%\");\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t\tinputFileStream.close();\r\n\t\t}\r\n\r\n\t\tzipOutputStream.closeEntry();\r\n\t\tzipOutputStream.finish();\r\n\t}", "private static File createTempFile(final byte[] data) throws IOException {\r\n \t// Genera el archivo zip temporal a partir del InputStream de entrada\r\n final File zipFile = File.createTempFile(\"sign\", \".zip\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n final FileOutputStream fos = new FileOutputStream(zipFile);\r\n\r\n fos.write(data);\r\n fos.flush();\r\n fos.close();\r\n\r\n return zipFile;\r\n }", "public static void writeZipOneFile(File directoryToZip, String fileName) {\r\n\t\ttry {\r\n\t\t\t//FileOutputStream fos = new FileOutputStream(directoryToZip.getName() + \".zip\");\r\n\t\t\tFileOutputStream fos = new FileOutputStream(directoryToZip +\"\\\\\"+ fileName.replace(\".xls\", \"\")+\".zip\");\r\n\t\t\tZipOutputStream zos = new ZipOutputStream(fos);\r\n\r\n\t\t\tFile file = new File(directoryToZip + \"\\\\\"+ fileName);\r\n\t\t\taddToZip(directoryToZip, file, zos);\r\n\r\n\t\t\tzos.close();\r\n\t\t\tfos.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tlogger.error(e.getMessage());\t\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(e.getMessage());\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void createArchiveFile( final Configuration conf, final Path zipFile, final List<Path> files, int pathTrimCount, boolean isJar, Manifest jarManifest) throws IOException\r\n\t{\r\n\t\t\r\n\t\tFSDataOutputStream out = null;\r\n\t\tZipOutputStream zipOut = null;\r\n\t\t/** Did we actually write an entry to the zip file */\r\n\t\tboolean wroteOne = false;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tout = zipFile.getFileSystem(conf).create(zipFile);\r\n\t\t\tif (files.isEmpty()) {\r\n\t\t\t\treturn;\t/** Don't try to create a zip file with no entries it will throw. just return empty file. */\r\n\t\t\t}\r\n\t\t\tif (isJar) {\r\n\t\t\t\tif (jarManifest!=null) {\r\n\t\t\t\t\tzipOut = new JarOutputStream(out,jarManifest);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tzipOut = new JarOutputStream(out);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tzipOut = new ZipOutputStream(out);\r\n\t\t\t}\r\n\t\t\tfor ( Path file : files) {\r\n\t\t\t\tFSDataInputStream in = null;\r\n\t\t\t\t/** Try to complete the file even if a file fails. */\r\n\t\t\t\ttry {\r\n\t\t\t\t\tFileSystem fileSystem = file.getFileSystem(conf);\r\n\t\t\t\t\tin = fileSystem.open(file);\r\n\t\t\t\t\tZipEntry zipEntry = new ZipEntry(pathTrim(file, pathTrimCount));\r\n\t\t\t\t\tzipOut.putNextEntry(zipEntry);\r\n\t\t\t\t\tIOUtils.copyBytes(in, zipOut, (int) Math.min(32768, fileSystem.getFileStatus(file).getLen()), false);\r\n\t\t\t\t\twroteOne = true;\r\n\t\t\t\t} catch( IOException e) {\r\n\t\t\t\t\tLOG.error( \"Unable to store \" + file + \" in zip file \" + zipFile + \", skipping\", e);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tif (in!=null) {\r\n\t\t\t\t\t\ttry { in.close(); } catch( IOException ignore ) {}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} finally { /** Ensure everything is always closed before the function exits */\r\n\t\t\t\r\n\t\t\tif (zipOut!=null&&wroteOne) {\r\n\t\t\t\tzipOut.closeEntry();\r\n\t\t\t\tzipOut.flush();\r\n\t\t\t\tzipOut.close();\r\n\t\t\t\tout = null;\r\n\t\t\t}\r\n\t\t\tif (out!=null) {\r\n\t\t\t\tout.close();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void zip() {\n\t\tif (zipFile != null) {\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\ttry (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))) {\n\t\t\t\tzos.setLevel(ZipOutputStream.STORED);\n\t\t\t\tbyte[] buffer = new byte[4096];\n\t\t\t\tFiles.list(Paths.get(tool_builddir))\n\t\t\t\t\t\t.forEach(x -> {\n\t\t\t\t\t\t\tFile f = x.toFile();\n\t\t\t\t\t\t\tif (f.isFile() && !f.getName().contains(\".\")) {\n\t\t\t\t\t\t\t\ttry (FileInputStream fis = new FileInputStream(f)) {\n\t\t\t\t\t\t\t\t\tZipEntry zipEntry = new ZipEntry(f.getName());\n\t\t\t\t\t\t\t\t\tzos.putNextEntry(zipEntry);\n\t\t\t\t\t\t\t\t\tint count;\n\t\t\t\t\t\t\t\t\twhile ((count = fis.read(buffer)) >= 0) {\n\t\t\t\t\t\t\t\t\t\tzos.write(buffer, 0, count);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tzos.closeEntry();\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e);\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\tout.println(\"Zipped to '\" + zipFile + \"' - \" + Duration.ofMillis(System.currentTimeMillis() - start));\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t}", "public static void createFileToZip(BufferedImage image, String path, int name,ZipOutputStream zipOS) throws FileNotFoundException, IOException {\n //Create the jpeg image\n File f = new File(path+Integer.toString(name)+\".jpg\");\n //Create the inputstream\n FileInputStream fis = new FileInputStream(f);\n //Create a zipentry for the file we are gonna include to the zip\n ZipEntry zipEntry = new ZipEntry(path+Integer.toString(name)+\".jpg\");\n //Store the image into the zip as an array of bytes\n zipOS.putNextEntry(zipEntry);\n byte[] bytes = new byte[1024];\n int length;\n while ((length = fis.read(bytes)) >= 0) {\n zipOS.write(bytes, 0, length);\n }\n zipOS.closeEntry();\n fis.close();\n }", "public static boolean generateZipFile(ArrayList<String> sourcesFilenames, String destinationDir, String zipFilename){\n byte[] buf = new byte[1024]; \r\n\r\n try \r\n {\r\n // VER SI HAY QUE CREAR EL ROOT PATH\r\n boolean result = (new File(destinationDir)).mkdirs();\r\n\r\n String zipFullFilename = destinationDir + \"/\" + zipFilename;\r\n\r\n System.out.println(result);\r\n\r\n // Create the ZIP file \r\n ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipFullFilename)); \r\n \r\n // Compress the files \r\n for (String filename: sourcesFilenames) { \r\n FileInputStream in = new FileInputStream(filename); \r\n // Add ZIP entry to output stream. \r\n File file = new File(filename); //\"Users/you/image.jpg\"\r\n out.putNextEntry(new ZipEntry(file.getName())); //\"image.jpg\" \r\n // Transfer bytes from the file to the ZIP file \r\n int len; \r\n while ((len = in.read(buf)) > 0) { \r\n out.write(buf, 0, len); \r\n } \r\n // Complete the entry \r\n out.closeEntry(); \r\n in.close(); \r\n } // Complete the ZIP file \r\n out.close();\r\n\r\n return true;\r\n } \r\n catch (Exception e) \r\n { \r\n System.out.println(e);\r\n return false;\r\n } \r\n }", "protected static void zipDir(File zipDir, ZipOutputStream zos, String archiveSourceDir)\n throws IOException {\n String[] dirList = zipDir.list();\n byte[] readBuffer = new byte[40960];\n int bytesIn;\n //loop through dirList, and zip the files\n if (dirList != null) {\n for (String aDirList : dirList) {\n File f = new File(zipDir, aDirList);\n //place the zip entry in the ZipOutputStream object\n zos.putNextEntry(new ZipEntry(getZipEntryPath(f, archiveSourceDir)));\n if (f.isDirectory()) {\n //if the File object is a directory, call this\n //function again to add its content recursively\n zipDir(f, zos, archiveSourceDir);\n //loop again\n continue;\n }\n //if we reached here, the File object f was not a directory\n //create a FileInputStream on top of f\n try (FileInputStream fis = new FileInputStream(f)) {\n //now write the content of the file to the ZipOutputStream\n while ((bytesIn = fis.read(readBuffer)) != -1) {\n zos.write(readBuffer, 0, bytesIn);\n }\n }\n }\n }\n }", "private String writeZipFile(File directoryToZip, List<File> fileList, String zipName) throws IOException{\r\n // If the zip name is null then provide the name of the directory\r\n if(zipName == null){\r\n zipName = directoryToZip.getName();\r\n }\r\n // Store the file name\r\n String fileName = zipName;\r\n // Create the zip file\r\n FileOutputStream fos = new FileOutputStream(fileName);\r\n ZipOutputStream zos = new ZipOutputStream(fos);\r\n for (File file : fileList) {\r\n if (!file.isDirectory()) { // we only zip files, not directories\r\n // Add files that are not in the skip list\r\n if(!isFileToSkip(file.getName())) {\r\n addToZip(directoryToZip, file, zos);\r\n }\r\n }\r\n }\r\n zos.close();\r\n fos.close();\r\n // Return the full name of the file\r\n return fileName;\r\n }", "protected void zipFile(File file, ZipOutputStream zOut, String vPath)\n throws IOException\n {\n if (!vPath.equalsIgnoreCase(\"WEB-INF/web.xml\")) {\n super.zipFile(file, zOut, vPath);\n } else {\n log(\"Warning: selected \"+archiveType+\" files include a WEB-INF/web.xml which will be ignored \" +\n \"(please use webxml attribute to \"+archiveType+\" task)\", Project.MSG_WARN);\n }\n }", "public static void packToZip(String sourceDirPath, String zipFilePath) throws IOException {\n Path p;\n p = Files.createFile(Paths.get(zipFilePath));\n try (ZipOutputStream zs = new ZipOutputStream(Files.newOutputStream(p))) {\n Path pp = Paths.get(sourceDirPath);\n Files.walk(pp)\n .filter(path -> !Files.isDirectory(path))\n .forEach(path -> {\n if (!path.toString().endsWith(\".zip\")) {\n ZipEntry zipEntry = new ZipEntry(pp.relativize(path).toString());\n try {\n zs.putNextEntry(zipEntry);\n Files.copy(path, zs);\n zs.closeEntry();\n } catch (IOException e) {\n System.err.println(e);\n }\n }\n });\n }\n }", "public void startNewFile(String fileName, int sequenceNumber) throws Exception {\n\n try {\n \n \tif(sequenceNumber == 1)\n \t {\n \t // This is the first zip file for this data. \n \t // Just use the name passed in\n \t this.outputFileName = fileName;\n \t }\n \telse\n \t {\n \t\t// This is not the first zip file for this data\n \t\t// Append a number (e.g. _1 _2) to the file name\n \t\tint dotIndex = fileName.lastIndexOf('.');\n \t\tString beforeDot = fileName.substring(0, dotIndex);\n \t\toutputFileName=beforeDot+\"_part-\"+sequenceNumber+\".zip\";\n \t }\n \t\t\n \t// Add file to the list to be returned\n fileList.add(outputFileName); \t\n \t\n logger.debug(\"output file \" + outputFileName);\n\n FileOutputStream dest = new FileOutputStream(outputFileName);\n logger.debug(\"dest file \" + dest);\n this.out = new ZipOutputStream(new BufferedOutputStream(dest));\n\n\n // Set Default Compression level\n out.setLevel(ZipFiles.DEFAULT_COMPRESSION);\n out.setMethod(ZipOutputStream.DEFLATED);\n this.data = new byte[ZipFiles.BUFFER];\n } catch (FileNotFoundException e) {\n logger.error(\"File \" + outputFileName + \" not found !!\", e);\n throw new Exception(\"File \" + outputFileName + \" not found !!\", e);\n }\n\n }", "public CombineArchive (File zipFile)\n\t\tthrows IOException,\n\t\t\tJDOMException,\n\t\t\tParseException,\n\t\t\tCombineArchiveException\n\t{\n\t\tinit (zipFile, false);\n\t}", "public static void m97139a(File file, ZipOutputStream zipOutputStream, String str) throws IOException {\n if (file.exists()) {\n if (file.isDirectory()) {\n String name = file.getName();\n if (!name.endsWith(File.separator)) {\n name = name + File.separator;\n }\n if (!TextUtils.isEmpty(str)) {\n name = str + name;\n }\n File[] listFiles = file.listFiles();\n if (listFiles == null || listFiles.length <= 0) {\n zipOutputStream.putNextEntry(new ZipEntry(name));\n zipOutputStream.closeEntry();\n return;\n }\n for (File file2 : listFiles) {\n m97139a(file2, zipOutputStream, name);\n }\n return;\n }\n zipOutputStream.putNextEntry(new ZipEntry(TextUtils.isEmpty(str) ? file.getName() : str + file.getName()));\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[4096];\n while (true) {\n int read = fileInputStream.read(bArr);\n if (read != -1) {\n zipOutputStream.write(bArr, 0, read);\n } else {\n zipOutputStream.flush();\n fileInputStream.close();\n zipOutputStream.closeEntry();\n return;\n }\n }\n } else {\n return;\n }\n throw th;\n }", "public void unZip(String apkFile) throws Exception \r\n\t{\r\n\t\tLog.p(tag, apkFile);\r\n\t\tFile file = new File(apkFile);\r\n\t\r\n\t\t/*\r\n\t\t * Create the Base Directory, whose name should be same as Zip file name.\r\n\t\t * All decompressed contents will be placed under this folder.\r\n\t\t */\r\n\t\tString apkFileName = file.getName();\r\n\t\t\r\n\t\tif(apkFileName.indexOf('.') != -1)\r\n\t\t\tapkFileName = apkFileName.substring(0, apkFileName.indexOf('.'));\r\n\t\t\r\n\t\tLog.d(tag, \"Folder name: \"+ apkFileName);\r\n\t\t\r\n\t\tFile extractFolder = new File((file.getParent() == null ? \"\" : file.getParent() + File.separator) + apkFileName);\r\n\t\tif(!extractFolder.exists())\r\n\t\t\textractFolder.mkdir();\r\n\t\t\r\n\t\t/*\r\n\t\t * Read zip entries.\r\n\t\t */\r\n\t\tFileInputStream fin = new FileInputStream(apkFile);\r\n\t\tZipInputStream zin = new ZipInputStream(new BufferedInputStream(fin));\r\n\t\t\r\n\t\t/*\r\n\t\t * Zip InputStream shifts its index to every Zip entry when getNextEntry() is called.\r\n\t\t * If this method returns null, Zip InputStream reaches EOF.\r\n\t\t */\r\n\t\tZipEntry ze = null;\r\n\t\tBufferedOutputStream dest;\r\n\t\t\r\n\t\twhile((ze = zin.getNextEntry()) != null)\r\n\t\t{\r\n\t\t\tLog.d(tag, \"Zip entry: \" + ze.getName() + \" Size: \"+ ze.getSize());\r\n\t\t\t/*\r\n\t\t\t * Create decompressed file for each Zip entry. A Zip entry can be a file or directory.\r\n\t\t\t * ASSUMPTION: APK Zip entry uses Unix style File seperator- \"/\"\r\n\t\t\t * \r\n\t\t\t * 1. Create the prefix Zip Entry folder, if it is not yet available\r\n\t\t\t * 2. Create the individual Zip Entry file.\r\n\t\t\t */\r\n\t\t\tString zeName = ze.getName();\r\n\t\t\tString zeFolder = zeName;\r\n\t\t\t\r\n\t\t\tif(ze.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tzeName = null; // Don't create Zip Entry file\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(zeName.indexOf(\"/\") == -1) // Zip entry uses \"/\"\r\n\t\t\t\t\tzeFolder = null; // It is File. don't create Zip entry Folder\r\n\t\t\t\telse {\r\n\t\t\t\t\tzeFolder = zeName.substring(0, zeName.lastIndexOf(\"/\"));\r\n\t\t\t\t\tzeName = zeName.substring( zeName.lastIndexOf(\"/\") + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tLog.d(tag, \"zeFolder: \"+ zeFolder +\" zeName: \"+ zeName);\r\n\t\t\t\r\n\t\t\t// Create Zip Entry Folder\r\n\t\t\tFile zeFile = extractFolder;\r\n\t\t\tif(zeFolder != null)\r\n\t\t\t{\r\n\t\t\t\tzeFile = new File(extractFolder.getPath() + File.separator + zeFolder);\r\n\t\t\t\tif(!zeFile.exists())\r\n\t\t\t\t\tzeFile.mkdirs();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Create Zip Entry File\r\n\t\t\tif(zeName == null)\r\n\t\t\t\tcontinue;\r\n\t\t\t\r\n\t\t\t// Keep track of XML files, they are in Android Binary XML format\r\n\t\t\tif(zeName.endsWith(\".xml\"))\r\n\t\t\t\txmlFiles.add(zeFile.getPath() + File.separator + zeName);\r\n\t\t\t\r\n\t\t\t// Keep track of the Dex/ODex file. Need to convert to Jar\r\n\t\t\tif(zeName.endsWith(\".dex\") || zeName.endsWith(\".odex\"))\r\n\t\t\t\tdexFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Keep track of Resources.arsc file- resources.arsc\r\n\t\t\tif(zeName.endsWith(\".arsc\"))\r\n\t\t\t\tresFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Write Zip entry File to the disk\r\n\t\t\tint count;\r\n\t\t\tbyte data[] = new byte[BUFFER];\r\n\t\t\t\r\n\t\t\tFileOutputStream fos = new FileOutputStream(zeFile.getPath() + File.separator + zeName);\r\n\t\t\tdest = new BufferedOutputStream(fos, BUFFER);\r\n\r\n\t\t\twhile ((count = zin.read(data, 0, BUFFER)) != -1) \r\n\t\t\t{\r\n\t\t\t\tdest.write(data, 0, count);\r\n\t\t\t}\r\n\t\t\tdest.flush();\r\n\t\t\tdest.close();\r\n\t\t}\r\n\r\n\t\t// Close Zip InputStream\r\n\t\tzin.close();\r\n\t\tfin.close();\r\n\t}", "public static void zip(File destFile, File[] files) throws IOException {\n BufferedInputStream origin = null;\n FileOutputStream dest = new FileOutputStream(destFile);\n ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(dest));\n out.setMethod(ZipOutputStream.DEFLATED);\n byte[] data = new byte[BUFFER_SIZE];\n for (int i = 0; i < files.length; i++) {\n if (log.isDebugEnabled()) {\n log.debug(\"Adding: \" + files[i].getName());\n }\n if (files[i].isDirectory()) {\n if (log.isDebugEnabled()) {\n log.debug(\"Skipping directory: \" + files[i]);\n }\n continue;\n }\n FileInputStream fi = new FileInputStream(files[i]);\n origin = new BufferedInputStream(fi, BUFFER_SIZE);\n ZipEntry entry = new ZipEntry(files[i].getName());\n out.putNextEntry(entry);\n int count;\n while ((count = origin.read(data, 0, BUFFER_SIZE)) != -1) {\n out.write(data, 0, count);\n }\n origin.close();\n }\n out.flush();\n out.close();\n }", "public ZipBuilder save() throws IOException {\n\t\t\tZipUtil.addToZip(zos, bytes, path, comment);\n\t\t\treturn ZipBuilder.this;\n\t\t}", "public boolean ZipFile(String sSourceFilePath, String sDestinationZipFilePath, boolean bReplaceExisting) {\n byte[] buffer = new byte[30720];\n FileInputStream fin = null;\n FileOutputStream fout = null;\n ZipOutputStream zout = null;\n int length;\n String sZipEntryFileName = \"\";\n File objFile = null;\n try {\n //check for source file\n if (sSourceFilePath.trim().equalsIgnoreCase(\"\")) {\n throw new Exception(\"Invalid Source File : \" + sSourceFilePath);\n }\n objFile = new File(sSourceFilePath);\n if (!objFile.exists()) {\n throw new Exception(\"Source file not found : \" + sSourceFilePath);\n }\n\n //check for destination Zip file\n if (sDestinationZipFilePath.trim().equalsIgnoreCase(\"\") || sDestinationZipFilePath == null) {\n String stmp_Path = objFile.getAbsolutePath();\n String stmp_Name = objFile.getName();\n if (stmp_Name.contains(\".\")) { //check for removing extension\n int indx = 0;\n try {\n indx = stmp_Name.indexOf(\".\", stmp_Name.length() - 5);\n } catch (Exception e) {\n indx = 0;\n }\n if (indx <= 0) {\n indx = stmp_Name.length();\n }\n\n stmp_Name = stmp_Name.substring(0, indx);\n stmp_Name = stmp_Name + \".zip\";\n }\n sDestinationZipFilePath = stmp_Path + File.separator + stmp_Name;\n }\n\n objFile = new File(sDestinationZipFilePath);\n if (objFile.exists()) {\n if (bReplaceExisting) {\n objFile.delete();\n } else {\n throw new Exception(\"Destination ZipFile Already exists : \" + sDestinationZipFilePath);\n }\n }\n\n //Zipping File\n sZipEntryFileName = sSourceFilePath.substring(sSourceFilePath.lastIndexOf(\"\\\\\") + 1);\n fout = new FileOutputStream(sDestinationZipFilePath);\n zout = new ZipOutputStream(fout);\n fin = new FileInputStream(sSourceFilePath);\n zout.putNextEntry(new ZipEntry(sZipEntryFileName));\n while ((length = fin.read(buffer)) > 0) {\n zout.write(buffer, 0, length);\n }\n\n return true;\n\n } catch (Exception exp) {\n println(\"Src = \" + sSourceFilePath + \" : Dest = \" + sDestinationZipFilePath + \" : \" + exp.toString());\n return false;\n } finally {\n try {\n fin.close();\n } catch (Exception exp) {\n }\n try {\n zout.closeEntry();\n } catch (Exception exp) {\n }\n try {\n zout.close();\n } catch (Exception exp) {\n }\n }\n }", "void importDivision(Connection con, ZipFile zip) throws Exception;", "public void zipFiles() {\r\n byte[] buffer = new byte[1024];\r\n try {\r\n\r\n // On rare occasions, there will be a semi colon in the title name,\r\n // ruining everything while zipping the file.\r\n if (title.contains(\":\") || title.contains(\".\")) {\r\n String temp = \"\";\r\n for (int i = 0; i < title.length(); i++) {\r\n \r\n if (title.charAt(i) == ':' || title.charAt(i) == '.') {\r\n \r\n } else {\r\n temp += title.charAt(i);\r\n }\r\n }\r\n title = temp;\r\n }\r\n System.out.println(\"File name: \" + title);\r\n \r\n FileOutputStream fos = new FileOutputStream(savePath + \"\\\\\" + title + \".zip\");\r\n ZipOutputStream zos = new ZipOutputStream(fos);\r\n \r\n for (String fileName : fileNames) {\r\n \r\n System.out.println(\"zipping file: \" + fileName);\r\n \r\n fileName = savePath + \"\\\\\" + fileName;\r\n File srcFile = new File(fileName);\r\n FileInputStream fis;\r\n if (srcFile.exists()) {\r\n fis = new FileInputStream(srcFile);\r\n \r\n zos.putNextEntry(new ZipEntry(srcFile.getName()));\r\n int length;\r\n while ((length = fis.read(buffer)) > 0) {\r\n zos.write(buffer, 0, length);\r\n }\r\n zos.closeEntry();\r\n fis.close();\r\n \r\n boolean success = (new File(fileName)).delete();\r\n }\r\n }\r\n zos.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"File not found!\");\r\n } catch (IOException ex) {\r\n }\r\n }", "public void setZip(String zip);", "public static void main(String[] args) throws IOException {\n\t\tFile targetFile = new File(\"D:\\\\program\\\\360cse\\\\360Chrome\\\\test.zip\");\n\t\tFile sourceFiles = new File(\"D:\\\\temple\\\\sysMenu-add.html\");\n\t\tboolean flag = compressZip(false, targetFile, sourceFiles);\n\t\tSystem.out.println(flag);\n\t}", "public static void addToZip(String path, ZipOutputStream myZip, File f) throws FileNotFoundException, IOException{\n\t\tif(f.isDirectory()){\n\t\t\tfor(File subF : f.listFiles()){\n\t\t\t\taddToZip(path + File.separator + f.getName() , myZip, subF);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tZipEntry e = new ZipEntry(path + File.separator + f.getName());\n\t\t\tmyZip.putNextEntry(e);\n\t\t\ttry (InputStream is = new FileInputStream(f.getAbsolutePath())) {\n\t\t\t\tIOUtils.copyLarge(is, myZip);\n\t\t\t}\n\t\t}\n\t}", "public static Path setupArchiveFile( final Configuration conf, final int count, boolean isJar ) throws IOException {\r\n\t\tFile tmpDir = File.createTempFile(\"tmpDir\", \"\");\r\n\t\tif (!tmpDir.delete()) {\r\n\t\t\tthrow new IOException(\"Can not delete recently created tmpFile\");\r\n\t\t}\r\n\t\tif (!tmpDir.mkdirs()) {\r\n\t\t\tthrow new IOException(\"Can not create tmp directory \" + tmpDir);\r\n\t\t}\r\n\t\t\r\n\t\tfinal Path tmpDirPath = new Path(tmpDir.getName());\r\n\t\tList<Path> files = createSimpleDirectory(conf, tmpDirPath, count, null);\r\n\t\tfinal Path zipFile = tmpDirPath.suffix(isJar?\".jar\":\".zip\");\r\n\t\tcreateArchiveFile(conf, zipFile, files, 1, isJar, null);\r\n\t\t/** Now clean up the tmpDir. */\r\n\t\tFileSystem fs = tmpDirPath.getFileSystem(conf);\r\n\t\tfs.delete( tmpDirPath, true);\r\n\t\treturn zipFile;\r\n\t}", "public File getZip() {\r\n try {\r\n close(); // if the file is currently open close it\r\n Log.d(LOG_TAG, \"getZip()\");\r\n File zipFile = new File(mBaseFileName + \".zip\");\r\n zipFile.delete();\r\n ZipOutputStream zipStream = new ZipOutputStream(new FileOutputStream(zipFile));\r\n for (int i = 0; i < mNumSegments; i++) {\r\n File chunk = new File(getFileNameForIndex(i));\r\n if (chunk.exists()) {\r\n FileInputStream fis = new FileInputStream(chunk);\r\n writeToZipFile(zipStream, fis, chunk.getName());\r\n }\r\n }\r\n zipStream.close();\r\n return zipFile;\r\n } catch (Exception e) {\r\n Log.e(LOG_TAG, \"Failed to create zip file\", e);\r\n }\r\n\r\n return null;\r\n }", "private static void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "public OutputStream getOutputStream(String lumpName) {\n\t\t\t\t\tendEntry();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Get the next entry\r\n\t\t\t\t\tZipEntry dir = new ZipEntry(\"ohrrpgce/games/\" + newRPGName + \"/\" + lumpName);\r\n\t\t\t\t\t//System.out.println(\"Entry opened: \" + dir.getName());\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\ttempJar.putNextEntry(dir);\r\n\t\t\t\t\t} catch (IOException ex) {\r\n\t\t\t\t\t\tSystem.out.println(\"Error adding entry for \" + lumpName + \" : \" + ex.toString());\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn tempJar;\r\n\t\t\t\t}", "public void ImportNaimoZipFileByUser(){\n File mPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n final Manager_FileDialog managerFileDialog = new Manager_FileDialog(this, mPath, \".zip\");\n managerFileDialog.addFileListener(new Manager_FileDialog.FileSelectedListener() {\n public void fileSelected(File file) {\n managerFileDialog.removeFileListener(this);\n //ImportNaimoZipFile(file.getPath());\n new ImportNaimoZipFile(WordListActivity.this,file.getPath()).execute();\n }\n });\n managerFileDialog.showDialog();\n }", "public SourceFile(File file) throws Exception {\r\n\t\t// this.file = file;\r\n\t\tthis.zipFile = new ZipFile(file, \"UTF-8\");\r\n\t}", "public interface IZipStrategy {\n\n void zip();\n}", "private void unCompress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tint bytesIn;\n\t\t\tZipFile rfoFile = new ZipFile(path + fileName);\n\t\t\tEnumeration<? extends ZipEntry> allFiles = rfoFile.entries();\n\t\t\twhile(allFiles.hasMoreElements())\n\t\t\t{\n\t\t\t\tZipEntry ze = (ZipEntry)allFiles.nextElement();\n\t\t\t\tInputStream is = rfoFile.getInputStream(ze);\n\t\t\t\tString fName = processSeparators(ze.getName());\n\t\t\t\tFile element = new File(tempDir + fName);\n\t\t\t\torg.reprap.Main.ftd.add(element);\n\t\t\t\tFileOutputStream os = new FileOutputStream(element);\n\t\t\t\twhile((bytesIn = is.read(buffer)) != -1) \n\t\t\t\t\tos.write(buffer, 0, bytesIn);\n\t\t\t\tos.close();\n\t\t\t}\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.unCompress(): \" + e);\n\t\t}\n\t}", "public void addDir(File dirObj, ZipOutputStream out) throws IOException {\n\t\t File[] files = dirObj.listFiles();\n\t\t byte[] tmpBuf = new byte[1024];\n\t\t for (int i = 0; i < files.length; i++) {\n\t\t if (files[i].isDirectory()) {\n\t\t addDir(files[i], out);\n\t\t continue;\n\t\t }\n\t \t FileInputStream in = new FileInputStream(files[i].getAbsolutePath());\n\t\t System.out.println(\" Adding: \" + files[i].getAbsolutePath());\n\t\t out.putNextEntry(new ZipEntry(files[i].getAbsolutePath()));\n\t\t int len;\n\t\t while ((len = in.read(tmpBuf)) > 0) { out.write(tmpBuf, 0, len); }\n\t\t out.closeEntry();\n\t\t in.close();\n\t\t }\n\t\t }", "private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "public void convertToZip(String input, String output) throws ZipException {\n\t\tZipFile zip = new ZipFile(output); \n\t ZipParameters parameters = new ZipParameters();\n parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);\n parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL); \n\t zip.addFolder(input, parameters);\n\t}", "public void link() throws Exception {\n ZipOutputStream output = new ZipOutputStream( new FileOutputStream( outfile ) );\n if ( compression ) {\n output .setMethod( ZipOutputStream .DEFLATED );\n output .setLevel( Deflater .DEFAULT_COMPRESSION );\n } else {\n output .setMethod( ZipOutputStream .STORED );\n }\n Enumeration merges = mergefiles .elements();\n while ( merges .hasMoreElements() ) {\n String path = (String) merges .nextElement();\n File f = new File( path );\n if ( f.getName().endsWith( \".jar\" ) || f.getName().endsWith( \".zip\" ) ) {\n //Do the merge\n mergeZipJarContents( output, f );\n }\n else {\n //Add this file to the addfiles Vector and add it \n //later at the top level of the output file.\n addAddFile( path );\n }\n }\n Enumeration adds = addfiles .elements();\n while ( adds .hasMoreElements() ) {\n String name = (String) adds .nextElement();\n File f = new File( name );\n if ( f .isDirectory() ) {\n //System.out.println(\"in jlink: adding directory contents of \" + f.getPath());\n addDirContents( output, f, f.getName() + '/', compression );\n }\n else {\n addFile( output, f, \"\", compression );\n }\n }\n if ( output != null ) {\n try {\n output .close();\n } catch( IOException ioe ) {}\n }\n }", "public static void extractAndSaveFile(ZipInputStream zip,\n \t\t\tFileOutputStream destinationFile) throws IOException {\n \t\tByteArrayOutputStream out = readZipEntry(zip);\n \t\tdestinationFile.write(out.toByteArray());\n \t\tout.close();\n \t\tdestinationFile.close();\n \t}", "private static void addDirectory(ZipOutputStream zout, File fileSource, File sourceDir) {\n\n\t\t// get sub-folder/files list\n\t\tFile[] files = fileSource.listFiles();\n\n\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\ttry {\n\t\t\t\tString name = files[i].getAbsolutePath();\n\t\t\t\tname = name.substring((int) sourceDir.getAbsolutePath().length());\n\t\t\t\t// if the file is directory, call the function recursively\n\t\t\t\tif (files[i].isDirectory()) {\n\t\t\t\t\taddDirectory(zout, files[i], sourceDir);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * we are here means, its file and not directory, so\n\t\t\t\t * add it to the zip file\n\t\t\t\t */\n\n\n\t\t\t\t// create object of FileInputStream\n\t\t\t\tFileInputStream fin = new FileInputStream(files[i]);\n\n\t\t\t\tzout.putNextEntry(new ZipEntry(name));\n\n\t\t\t\tIOUtils.copy(fin, zout);\n\t\t\t\t\n\t\t\t\tzout.closeEntry();\n\n\t\t\t\t// close the InputStream\n\t\t\t\tfin.close();\n\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tioe.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "private void createTar() {\n File tgzFile = new File(\".\" + File.separator + Arguments.JRE_DEFAULT_NAME);\n File tgzMd5File = new File(tgzFile.getPath() + \".md5\");\n if (tgzFile.exists()) {\n tgzFile.delete();\n m_logger.debug(\"Removed the old tgz file\");\n }\n if (tgzMd5File.exists()) {\n tgzMd5File.delete();\n m_logger.debug(\"Removed the old md5 file\");\n }\n\n try {\n m_logger.debug(\"Starting zip\");\n tgzFile.createNewFile();\n TarArchiveOutputStream tgzStream = new TarArchiveOutputStream(new GZIPOutputStream(\n new BufferedOutputStream(new FileOutputStream(tgzFile))));\n addFileToTarGz(tgzStream, m_jreLocation, \"\");\n tgzStream.finish();\n tgzStream.close();\n m_logger.debug(\"Finished zip, starting md5 hash\");\n\n Platform.runLater(() -> fileLabel.setText(\"Generating md5 hash\"));\n String md5Hash = MainApp.hashFile(tgzFile);\n OutputStream md5Out = new BufferedOutputStream(new FileOutputStream(tgzMd5File));\n md5Out.write(md5Hash.getBytes());\n md5Out.flush();\n md5Out.close();\n m_logger.debug(\"Finished md5 hash, hash is \" + md5Hash);\n final boolean interrupted = Thread.interrupted();\n\n // Show the connect roboRio screen\n Platform.runLater(() -> {\n if (!interrupted) {\n m_args.setArgument(Arguments.Argument.JRE_TAR, tgzFile.getAbsolutePath());\n moveNext(Arguments.Controller.CONNECT_ROBORIO_CONTROLLER);\n }\n });\n } catch (IOException | NoSuchAlgorithmException e) {\n m_logger.error(\"Could not create the tar gz file. Do we have write permissions to the current working directory?\", e);\n showErrorScreen(e);\n }\n }", "private String generateZipEntry(String file) {\n return file.substring(srcFolder.length() + 1, file.length());\n }", "static void unzip(String zipFilePath, String destDirectory, boolean recursive, boolean teacherZip) throws IOException {\n\n if (students == null) {\n students = new ArrayList<Student>();\n }\n\n ZipInputStream zipIn = null;\n\n try {\n zipIn = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry entry = zipIn.getNextEntry();\n\n // iterates over entries in the zip file\n while (entry != null) {\n createFiles(destDirectory, zipIn, entry, recursive);\n\n zipIn.closeEntry();\n entry = zipIn.getNextEntry();\n }\n\n } catch (IOException e) {\n System.err.println(e.getMessage());\n Errors.setUnzipperError(true);\n\n } finally {\n if (zipIn != null) {\n zipIn.close();\n }\n }\n }", "public void toUnzip(String zipFile, String targetDir) {\n\n\t\tMessage message = new Message();\n\t\tmessage.what = SUCCESS;\n\n\t\tint SIZE = 4096; // buffer size: 4KB\n\t\tString strEntry; // each zip entry name\n\t\ttry {\n\t\t\tBufferedOutputStream dest = null; // buffer output stream\n\t\t\tFileInputStream fis = new FileInputStream(zipFile);\n\t\t\tZipInputStream zis = new ZipInputStream(\n\t\t\t\t\tnew BufferedInputStream(fis));\n\t\t\tZipEntry entry; // each zip entry\n\t\t\twhile ((entry = zis.getNextEntry()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tint count;\n\t\t\t\t\tbyte data[] = new byte[SIZE];\n\t\t\t\t\tstrEntry = entry.getName();\n\n\t\t\t\t\tFile entryFile = new File(targetDir + strEntry);\n\t\t\t\t\tFile entryDir = new File(entryFile.getParent());\n\t\t\t\t\tif (!entryDir.exists()) {\n\t\t\t\t\t\tentryDir.mkdirs();\n\t\t\t\t\t}\n\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(entryFile);\n\t\t\t\t\tdest = new BufferedOutputStream(fos, SIZE);\n\t\t\t\t\twhile ((count = zis.read(data, 0, SIZE)) != -1) {\n\t\t\t\t\t\tdest.write(data, 0, count);\n\n\t\t\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\t\t\tmsg.what = PROGRESS;\n\t\t\t\t\t\tmsg.obj = count;\n\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t}\n\t\t\t\t\tdest.flush();\n\t\t\t\t\tdest.close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tmessage.what = ERROR;\n\t\t\t\t\tmessage.obj = ex.getMessage();\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tzis.close();\n\t\t\tFile fileszipe = new File(zipFile);\n\t\t\tfileszipe.delete();\n\t\t} catch (Exception cwj) {\n\t\t\tmessage.what = ERROR;\n\t\t\tmessage.obj = cwj.getMessage();\n\t\t\tcwj.printStackTrace();\n\t\t}\n\t\thandler.sendMessage(message);\n\t}", "private static void recurseFiles(File file)\r\n throws IOException, FileNotFoundException\r\n {\r\n if (file.isDirectory()) {\r\n //Create an array with all of the files and subdirectories \r\n //of the current directory.\r\nString[] fileNames = file.list();\r\n if (fileNames != null) {\r\n //Recursively add each array entry to make sure that we get\r\n //subdirectories as well as normal files in the directory.\r\n for (int i=0; i<fileNames.length; i++){ \r\n \trecurseFiles(new File(file, fileNames[i]));\r\n }\r\n }\r\n }\r\n //Otherwise, a file so add it as an entry to the Zip file. \r\nelse {\r\n byte[] buf = new byte[1024];\r\n int len;\r\n //Create a new Zip entry with the file's name. \r\n\r\n\r\nZipEntry zipEntry = new ZipEntry(file.toString());\r\n //Create a buffered input stream out of the file \r\n\r\n\r\n//we're trying to add into the Zip archive. \r\n\r\n\r\nFileInputStream fin = new FileInputStream(file);\r\n BufferedInputStream in = new BufferedInputStream(fin);\r\n zos.putNextEntry(zipEntry);\r\n //Read bytes from the file and write into the Zip archive. \r\n\r\n\r\nwhile ((len = in.read(buf)) >= 0) {\r\n zos.write(buf, 0, len);\r\n }\r\n //Close the input stream. \r\n\r\n\r\n in.close();\r\n //Close this entry in the Zip stream. \r\n\r\n\r\n zos.closeEntry();\r\n }\r\n }", "public FilesArchived(File rootDir, String zip) {\n this.root = rootDir;\n this.compression = (\"zstd\".equals(zip)) ? Compression.ZSTD : Compression.GZIP;\n rescan();\n Thread thread = new Thread(this::run);\n thread.setDaemon(true);\n thread.setName(\"FilesArchived-maintainer\");\n thread.start();\n }", "public static DBMaker openZip(String zip) {\n DBMaker m = new DBMaker();\n m.location = \"$$ZIP$$://\"+zip;\n return m;\n }", "private void addFileToTarGz(TarArchiveOutputStream tOut, String path, String base) throws IOException {\n File f = new File(path);\n String entryName = base + f.getName();\n TarArchiveEntry tarEntry = new TarArchiveEntry(f, entryName);\n tOut.putArchiveEntry(tarEntry);\n Platform.runLater(() -> fileLabel.setText(\"Processing \" + f.getPath()));\n\n if (f.isFile()) {\n FileInputStream fin = new FileInputStream(f);\n IOUtils.copy(fin, tOut);\n fin.close();\n tOut.closeArchiveEntry();\n } else {\n tOut.closeArchiveEntry();\n File[] children = f.listFiles();\n if (children != null) {\n for (File child : children) {\n addFileToTarGz(tOut, child.getAbsolutePath(), entryName + \"/\");\n }\n }\n }\n }", "private void addModule(ZipOutputStream out, File file) throws IOException\n\t{\n\t\tif (file.isDirectory())\n\t\t{\n\t\t\tfor (File f : file.listFiles())\n\t\t\t{\n\t\t\t\t// FIXME: remove MainModule.java\n\t\t\t\tif (!f.getName().equals(\"MainModule.java\"))\n\t\t\t\t{\n\t\t\t\t\taddModule(out, f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tString fileName = \"/src/main/java/modules/\" + file.getName();\n\t\t\t\n\t\t\tcreateZipEntry(out, fileName, Files.readAllBytes(Paths.get(file.getAbsolutePath())));\t\t}\n\t}", "protected void initZipOutputStream(ZipOutputStream zOut)\n throws IOException, BuildException\n {\n // add deployment descriptor first\n if (deploymentDescriptor != null) {\n zipDir(new File(deploymentDescriptor.getParent()), zOut, \n \"WEB-INF/\");\n super.zipFile(deploymentDescriptor, zOut, \"WEB-INF/web.xml\");\n } else {\n throw new BuildException(\"webxml attribute is required\", location);\n }\n\n addFiles(libFileSets, zOut, \"WEB-INF/lib/\");\n addFiles(classesFileSets, zOut, \"WEB-INF/classes/\");\n addFiles(webInfFileSets, zOut, \"WEB-INF/\");\n addPrefixedFiles(locFileSets, zOut);\n\n super.initZipOutputStream(zOut);\n }", "public static void PackageArchive(File directoryName, File fileName) throws IOException\r\n {\r\n final String ARCHIVE_XML = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-16\\\"?>\\n<archive major_version=\\\"0\\\" minor_version=\\\"1\\\" />\";\r\n\r\n TarArchiveWriter archive = new TarArchiveWriter(new GZIPOutputStream(new FileOutputStream(fileName)));\r\n\r\n // Create the archive.xml file\r\n archive.writeFile(\"archive.xml\", ARCHIVE_XML);\r\n\r\n // Add the assets\r\n File dir = new File(directoryName, ArchiveConstants.ASSETS_PATH);\r\n String[] files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.ASSETS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the objects\r\n dir = new File(directoryName, ArchiveConstants.OBJECTS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.OBJECTS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the terrain(s)\r\n dir = new File(directoryName, ArchiveConstants.TERRAINS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.TERRAINS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the parcels(s)\r\n dir = new File(directoryName, ArchiveConstants.LANDDATA_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.LANDDATA_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the setting(s)\r\n dir = new File(directoryName, ArchiveConstants.SETTINGS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.SETTINGS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n archive.close();\r\n }", "private static void extractFile(ZipInputStream inStreamZip, FSDataOutputStream destDirectory) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(destDirectory);\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = inStreamZip.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "public void readZip(File f) {\r\n try {\r\n unzip(f);\r\n File file = new File(workplace + \"/temp/USQ_IMAGE\");\r\n File old = new File(workplace + \"/old\");\r\n if(!old.exists())old.mkdir();\r\n if(old.exists()&&old.isFile())old.mkdir();\r\n File files[] = file.listFiles();\r\n for(int i=0 ; i<files.length ; i++){\r\n readFile(files[i]);\r\n }\r\n //new session\r\n createSes(f);\r\n } catch (Exception ex) {\r\n JOptionPane.showMessageDialog(null, \"read zip file failed.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n ex.printStackTrace();\r\n }\r\n }", "public ZipBuilder save() throws IOException {\n\t\t\tZipUtil.addToZip(zos, file, path, comment, recursive);\n\t\t\treturn ZipBuilder.this;\n\t\t}", "public static void unzip(Context context, InputStream zipFile) {\n try (BufferedInputStream bis = new BufferedInputStream(zipFile)) {\n try (ZipInputStream zis = new ZipInputStream(bis)) {\n ZipEntry ze;\n int count;\n byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];\n while ((ze = zis.getNextEntry()) != null) {\n try (FileOutputStream fout = context.openFileOutput(ze.getName(), Context.MODE_PRIVATE)) {\n while ((count = zis.read(buffer)) != -1)\n fout.write(buffer, 0, count);\n }\n }\n }\n } catch (IOException | NullPointerException ex) {\n Log.v(MainActivity.TAG, \"Zip not opened.\\n\"+ex.getMessage());\n }\n }", "public void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n final int BUFFER_SIZE = (int) 1e8;\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "public static void main(String[] args) throws Exception {\n File file = new File(\"D:\\\\var\\\\log\\\\platform.zip\");\n FileUtil.writeFile(new FileInputStream(file), \"D:\\\\var\\\\log1\\\\platform1.zip\");\n }", "public void respaldo() {\n if (seleccionados != null && seleccionados.length > 0) {\n ZipOutputStream salidaZip; //Donde va a quedar el archivo zip\n\n File file = new File(FacesContext.getCurrentInstance()\n .getExternalContext()\n .getRealPath(\"/temporales/\") + archivoRespaldo + \".zip\");\n\n try {\n salidaZip\n = new ZipOutputStream(new FileOutputStream(file));\n ZipEntry entradaZip;\n\n for (String s : seleccionados) {\n if (s.contains(\"Paises\")) {\n\n entradaZip = new ZipEntry(\"paises.json\");\n salidaZip.putNextEntry(entradaZip);\n byte data[]\n = PaisGestion.generaJson().getBytes();\n salidaZip.write(data, 0, data.length);\n salidaZip.closeEntry();\n }\n }\n salidaZip.close();\n\n // Descargar el archivo zip\n //Se carga el zip en un arreglo de bytes...\n byte[] zip = Files.readAllBytes(file.toPath());\n\n //Generar la página de respuesta...\n HttpServletResponse respuesta\n = (HttpServletResponse) FacesContext\n .getCurrentInstance()\n .getExternalContext()\n .getResponse();\n\n ServletOutputStream salida\n = respuesta.getOutputStream();\n\n //Defino los encabezados de la página de respuesta\n respuesta.setContentType(\"application/zip\");\n respuesta.setHeader(\"Content-Disposition\",\n \"attachement; filename=\" + archivoRespaldo + \".zip\");\n\n salida.write(zip);\n salida.flush();\n\n //Todo listo\n FacesContext.getCurrentInstance().responseComplete();\n file.delete();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(RespaldoController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(RespaldoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n\n }", "public NestedZipFile(String name) throws IOException {\n this(new File(name));\n }", "TarEntry CreateEntryFromFile(String fileName);", "private static boolean loadFromZip(android.content.Context r8, java.io.File r9, java.io.File r10, java.lang.String r11) {\n /*\n r3 = 0;\n r0 = 1;\n r1 = 0;\n r4 = r9.listFiles();\t Catch:{ Exception -> 0x0013 }\n r5 = r4.length;\t Catch:{ Exception -> 0x0013 }\n r2 = r1;\n L_0x0009:\n if (r2 >= r5) goto L_0x0017;\n L_0x000b:\n r6 = r4[r2];\t Catch:{ Exception -> 0x0013 }\n r6.delete();\t Catch:{ Exception -> 0x0013 }\n r2 = r2 + 1;\n goto L_0x0009;\n L_0x0013:\n r2 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r2);\n L_0x0017:\n r4 = new java.util.zip.ZipFile;\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r2 = r8.getApplicationInfo();\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r2 = r2.sourceDir;\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r4.<init>(r2);\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2.<init>();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"lib/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.append(r11);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"libtmessages.27.so\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r4.getEntry(r2);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n if (r2 != 0) goto L_0x0084;\n L_0x004a:\n r0 = new java.lang.Exception;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2.<init>();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"Unable to find file in apk:lib/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.append(r11);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"tmessages.27\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r0.<init>(r2);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n throw r0;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n L_0x0072:\n r0 = move-exception;\n r2 = r3;\n r3 = r4;\n L_0x0075:\n org.telegram.messenger.FileLog.m13728e(r0);\t Catch:{ all -> 0x0102 }\n if (r2 == 0) goto L_0x007d;\n L_0x007a:\n r2.close();\t Catch:{ Exception -> 0x00eb }\n L_0x007d:\n if (r3 == 0) goto L_0x0082;\n L_0x007f:\n r3.close();\t Catch:{ Exception -> 0x00f0 }\n L_0x0082:\n r0 = r1;\n L_0x0083:\n return r0;\n L_0x0084:\n r3 = r4.getInputStream(r2);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = new java.io.FileOutputStream;\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2.<init>(r10);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r5 = 4096; // 0x1000 float:5.74E-42 double:2.0237E-320;\n r5 = new byte[r5];\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n L_0x0091:\n r6 = r3.read(r5);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n if (r6 <= 0) goto L_0x00a3;\n L_0x0097:\n java.lang.Thread.yield();\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r7 = 0;\n r2.write(r5, r7, r6);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n goto L_0x0091;\n L_0x009f:\n r0 = move-exception;\n r2 = r3;\n r3 = r4;\n goto L_0x0075;\n L_0x00a3:\n r2.close();\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = 1;\n r5 = 0;\n r10.setReadable(r2, r5);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = 1;\n r5 = 0;\n r10.setExecutable(r2, r5);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = 1;\n r10.setWritable(r2);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = r10.getAbsolutePath();\t Catch:{ Error -> 0x00d5 }\n java.lang.System.load(r2);\t Catch:{ Error -> 0x00d5 }\n r2 = net.hockeyapp.android.C2367a.f7955a;\t Catch:{ Error -> 0x00d5 }\n r5 = org.telegram.messenger.BuildVars.DEBUG_VERSION;\t Catch:{ Error -> 0x00d5 }\n init(r2, r5);\t Catch:{ Error -> 0x00d5 }\n r2 = 1;\n nativeLoaded = r2;\t Catch:{ Error -> 0x00d5 }\n L_0x00c5:\n if (r3 == 0) goto L_0x00ca;\n L_0x00c7:\n r3.close();\t Catch:{ Exception -> 0x00e6 }\n L_0x00ca:\n if (r4 == 0) goto L_0x0083;\n L_0x00cc:\n r4.close();\t Catch:{ Exception -> 0x00d0 }\n goto L_0x0083;\n L_0x00d0:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x0083;\n L_0x00d5:\n r2 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r2);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n goto L_0x00c5;\n L_0x00da:\n r0 = move-exception;\n L_0x00db:\n if (r3 == 0) goto L_0x00e0;\n L_0x00dd:\n r3.close();\t Catch:{ Exception -> 0x00f5 }\n L_0x00e0:\n if (r4 == 0) goto L_0x00e5;\n L_0x00e2:\n r4.close();\t Catch:{ Exception -> 0x00fa }\n L_0x00e5:\n throw r0;\n L_0x00e6:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x00ca;\n L_0x00eb:\n r0 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r0);\n goto L_0x007d;\n L_0x00f0:\n r0 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r0);\n goto L_0x0082;\n L_0x00f5:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x00e0;\n L_0x00fa:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x00e5;\n L_0x00ff:\n r0 = move-exception;\n r4 = r3;\n goto L_0x00db;\n L_0x0102:\n r0 = move-exception;\n r4 = r3;\n r3 = r2;\n goto L_0x00db;\n L_0x0106:\n r0 = move-exception;\n r2 = r3;\n goto L_0x0075;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.messenger.NativeLoader.loadFromZip(android.content.Context, java.io.File, java.io.File, java.lang.String):boolean\");\n }", "private void mergeZipJarContents( ZipOutputStream output, File f ) throws IOException {\n //Check to see that the file with name \"name\" exists.\n if ( ! f .exists() ) {\n return ;\n }\n ZipFile zipf = new ZipFile( f );\n Enumeration entries = zipf.entries();\n while (entries.hasMoreElements()){\n ZipEntry inputEntry = (ZipEntry) entries.nextElement();\n //Ignore manifest entries. They're bound to cause conflicts between\n //files that are being merged. User should supply their own\n //manifest file when doing the merge.\n String inputEntryName = inputEntry.getName();\n int index = inputEntryName.indexOf(\"META-INF\");\n if (index < 0){\n //META-INF not found in the name of the entry. Go ahead and process it.\n try {\n output.putNextEntry(processEntry(zipf, inputEntry));\n } catch (ZipException ex){\n //If we get here, it could be because we are trying to put a\n //directory entry that already exists.\n //For example, we're trying to write \"com\", but a previous\n //entry from another mergefile was called \"com\".\n //In that case, just ignore the error and go on to the\n //next entry.\n String mess = ex.getMessage();\n if (mess.indexOf(\"duplicate\") >= 0){\n //It was the duplicate entry.\n continue;\n } else {\n //I hate to admit it, but we don't know what happened here. Throw the Exception.\n throw ex;\n }\n }\n InputStream in = zipf.getInputStream(inputEntry);\n int len = buffer.length;\n int count = -1;\n while ((count = in.read(buffer, 0, len)) > 0){\n output.write(buffer, 0, count);\n }\n in.close();\n output.closeEntry();\n }\n }\n zipf .close();\n }", "public void connect() throws IOException {\r\n this.zipFile = new ZipFile(file);\r\n this.zipEntry = zipFile.getEntry(zipEntryName);\r\n if (zipEntry == null)\r\n throw new IOException(\"Entry \" + zipEntryName + \" not found in file \" + file);\r\n this.connected = true;\r\n }", "private void setDownloadButton() throws FileNotFoundException {\r\n Button downloadButton;\r\n if (parent.getParentUI().language.equals(\"Deutsch\")) {\r\n downloadButton = new Button(\"Paket Download\");\r\n } else {\r\n downloadButton = new Button(\"Download Package\");\r\n }\r\n downloadButton.setWidth(\"100%\");\r\n downloadButton.addStyleName(ValoTheme.BUTTON_SMALL);\r\n downloadButton.addStyleName(ValoTheme.LABEL_SMALL);\r\n buttonLayout.addComponent(downloadButton);\r\n buttonLayout.setComponentAlignment(downloadButton, Alignment.TOP_CENTER);\r\n\r\n // get base id of the object in question\r\n String sourceDirPath = valuesMapLocal.get(\"localpath\");\r\n\r\n // zip on the fly\r\n StreamResource myResource4 =\r\n new StreamResource(\r\n new StreamSource() {\r\n private static final long serialVersionUID = 1L;\r\n final ByteArrayOutputStream out = new ByteArrayOutputStream();\r\n\r\n @Override\r\n public InputStream getStream() {\r\n Path directory2 = Paths.get(sourceDirPath);\r\n try (ZipOutputStream zipStream = new ZipOutputStream(out)) {\r\n Files.walk(directory2)\r\n .filter(path -> !Files.isDirectory(path))\r\n .forEach(\r\n path -> {\r\n try {\r\n addToZipStream(\r\n path, zipStream, sourceDirPath);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n });\r\n } catch (IOException e) {\r\n System.out.println(\"Error while zipping.\" + e);\r\n }\r\n return new ByteArrayInputStream(out.toByteArray());\r\n }\r\n },\r\n valuesMapLocal.get(\"digitalObjectId\") + \".zip\");\r\n\r\n FileDownloader fileDownloader3 = new FileDownloader(myResource4);\r\n fileDownloader3.extend(downloadButton);\r\n\r\n downloadButton.addClickListener(\r\n new Button.ClickListener() {\r\n private static final long serialVersionUID = 1L;\r\n\r\n public void buttonClick(ClickEvent event) {\r\n parent.getParentUI().log(\"Click on package download button\");\r\n }\r\n });\r\n }", "private void renameFileInZip(final File zipFilePath, final String fileNameToRename,\n final String newFileName) throws IOException {\n Map<String, String> zip_properties = new HashMap<>();\n /* We want to read an existing ZIP File, so we set this to False */\n zip_properties.put(\"create\", \"false\");\n\n /* Specify the path to the ZIP File that you want to read as a File System */\n URI zip_disk = URI.create(\"jar:file:///\" + zipFilePath);\n\n /* Create ZIP file System */\n try (FileSystem zipfs = FileSystems.newFileSystem(zip_disk, zip_properties)) {\n /* Access file that needs to be renamed */\n Path pathInZipfile = zipfs.getPath(fileNameToRename);\n /* Specify new file name */\n Path renamedZipEntry = zipfs.getPath(newFileName);\n /* Execute rename */\n Files.move(pathInZipfile, renamedZipEntry, ATOMIC_MOVE);\n //System.out.println(pathInZipfile + \"File successfully renamed to \" + renamedZipEntry);\n }\n\n }", "public void unzip(File f) throws Exception {\r\n String destDir = workplace + \"/temp/\";\r\n File tmp = new File(destDir);\r\n if(!tmp.exists())tmp.mkdir();\r\n byte b[] = new byte [1024];\r\n int length;\r\n \r\n ZipFile zipFile;\r\n zipFile = new ZipFile(f);\r\n Enumeration enumeration = zipFile.entries();\r\n ZipEntry zipEntry = null ;\r\n OutputStream outputStream = null;\r\n InputStream inputStream = null;\r\n while (enumeration.hasMoreElements()) {\r\n zipEntry = (ZipEntry) enumeration.nextElement();\r\n File loadFile = new File(destDir + zipEntry.getName());\r\n if (zipEntry.isDirectory()) {\r\n // 这段都可以不要,因为每次都貌似从最底层开始遍历的\r\n loadFile.mkdirs();\r\n }else{\r\n if (!loadFile.getParentFile().exists())\r\n loadFile.getParentFile().mkdirs();\r\n outputStream = new FileOutputStream(loadFile);\r\n inputStream = zipFile.getInputStream(zipEntry);\r\n while ((length = inputStream.read(b)) > 0)\r\n outputStream.write(b, 0, length);\r\n }\r\n }\r\n outputStream.flush();\r\n outputStream.close();\r\n inputStream.close();\r\n }" ]
[ "0.68605465", "0.6795503", "0.672615", "0.67023456", "0.67007476", "0.66553724", "0.66377383", "0.652596", "0.6477446", "0.64556444", "0.6449718", "0.6397458", "0.63904643", "0.6364522", "0.63118273", "0.6233127", "0.6223512", "0.61819005", "0.6156028", "0.61383265", "0.6130427", "0.6121954", "0.60899854", "0.6089144", "0.60791373", "0.6070616", "0.6047513", "0.6043372", "0.6028952", "0.6028303", "0.6001088", "0.59999305", "0.5984214", "0.5979372", "0.5967993", "0.5940594", "0.59316933", "0.58736295", "0.5857781", "0.58534217", "0.58331627", "0.5819839", "0.58085394", "0.58021086", "0.5795033", "0.57620096", "0.57461405", "0.57437783", "0.5735193", "0.572055", "0.5711681", "0.5688727", "0.5665834", "0.564555", "0.5593825", "0.5591789", "0.55800253", "0.5563731", "0.5561594", "0.5554634", "0.553698", "0.5508118", "0.55024594", "0.549976", "0.5487734", "0.5472644", "0.5468487", "0.54639536", "0.54627365", "0.54627365", "0.54605633", "0.5453352", "0.5440282", "0.5431352", "0.5411364", "0.5410344", "0.53972185", "0.53686684", "0.5367164", "0.5354771", "0.53511214", "0.5347577", "0.534113", "0.5318903", "0.5315845", "0.5299231", "0.52894455", "0.5287047", "0.5277031", "0.5261606", "0.5255115", "0.5252934", "0.5233763", "0.52270675", "0.5218617", "0.52138954", "0.5210972", "0.52079916", "0.5198359", "0.51932234" ]
0.6151606
19
Fermer le fichier zip
public void close() throws IOException { this.zos.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void getFile(ZipEntry e) throws IOException {\n String zipName = e.getName();\n switch (mode) {\n case EXTRACT:\n if (zipName.startsWith(\"/\")) {\n if (!warnedMkDir)\n System.out.println(\"Ignoring absolute paths\");\n warnedMkDir = true;\n zipName = zipName.substring(1);\n }\n // if a directory, just return. We mkdir for every file,\n // since some widely-used Zip creators don't put out\n // any directory entries, or put them in the wrong place.\n if (zipName.endsWith(\"/\")) {\n return;\n }\n // Else must be a file; open the file for output\n // Get the directory part.\n int ix = zipName.lastIndexOf('/');\n if (ix > 0) {\n //String dirName = zipName.substring(0, ix);\n String fileName = zipName.substring(ix + 1, zipName.length());\n zipName = fileName;\n\n }\n String targetFile = this.unzipFileTargetLocation;\n File file = new File(targetFile);\n if (!file.exists())\n file.createNewFile();\n FileOutputStream os = null;\n InputStream is = null;\n try {\n os = new FileOutputStream(targetFile);\n is = zippy.getInputStream(e);\n int n = 0;\n while ((n = is.read(b)) > 0)\n os.write(b, 0, n);\n\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n if (os != null) {\n try {\n os.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }\n break;\n case LIST:\n // Not extracting, just list\n if (e.isDirectory()) {\n System.out.println(\"Directory \" + zipName);\n } else {\n System.out.println(\"File \" + zipName);\n }\n break;\n default:\n throw new IllegalStateException(\"mode value (\" + mode + \") bad\");\n }\n }", "private void unzipDownloadedFile(String zipFile) throws ZipException, IOException{\n\t int BUFFER = 2048;\n\t \n\t // get zip file\n\t File file = new File(zipFile);\n\t ZipFile zip = new ZipFile(file);\n\t \n\t // unzip to directory of the same name\n\t // When sip is a directory, this gets two folders\n\t //String newPath = zipFile.substring(0, zipFile.length() - 4);\n\t //new File(newPath).mkdir();\n\t \n\t // unzip to parent directory of the zip file\n\t // This is assuming zip if of a directory\n\t String newPath = file.getParent();\n\t \n\t // Process each entry\n\t Enumeration<? extends ZipEntry> zipFileEntries = zip.entries();\n\t while (zipFileEntries.hasMoreElements())\n\t {\n\t // grab a zip file entry\n\t ZipEntry entry = (ZipEntry) zipFileEntries.nextElement();\n\t String currentEntry = entry.getName();\n\t File destFile = new File(newPath, currentEntry);\n\t File destinationParent = destFile.getParentFile();\n\n\t // create the parent directory structure if needed\n\t destinationParent.mkdirs();\n\n\t if (!entry.isDirectory())\n\t {\n\t BufferedInputStream is = new BufferedInputStream(zip.getInputStream(entry));\n\t int currentByte;\n\t // establish buffer for writing file\n\t byte data[] = new byte[BUFFER];\n\n\t // write the current file to disk\n\t FileOutputStream fos = new FileOutputStream(destFile);\n\t BufferedOutputStream dest = new BufferedOutputStream(fos,\n\t BUFFER);\n\n\t // read and write until last byte is encountered\n\t while ((currentByte = is.read(data, 0, BUFFER)) != -1) {\n\t dest.write(data, 0, currentByte);\n\t }\n\t dest.flush();\n\t dest.close();\n\t is.close();\n\t }\n\n\t if (currentEntry.endsWith(\".zip\"))\n\t {\n\t // found a zip file, try to open\n\t \tunzipDownloadedFile(destFile.getAbsolutePath());\n\t }\n\t }\n\t zip.close();\n\t}", "public void tozip() {\r\n\t\t//session.setAttribute(Constant.USER_SESSION_KEY, null);\r\n\t\tList<Netlog> result = null;\r\n\t\tInteger total = null;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t\tresult = (List<Netlog>)netlogDao.findNetlogByPage(1,10000);\r\n\t\t\t\ttotal= result.size();\r\n\t\t\t\t//total= netlogDao.findNetlogCount();\r\n\t\t\t\r\n\t\t} catch (SQLException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tNetlogs netlogs = new Netlogs(result);\r\n\t\tString path = this.getClass().getClassLoader().getResource(\"\").getPath();\r\n\t\tSystem.out.println(path);\r\n\t\tpath = path.replace(\"WEB-INF/classes/\", \"\");\r\n\t\tString path1 = path + \"netlog/\";\r\n\t\tLong time = System.currentTimeMillis()/1000;\r\n\t\tXml2Java.beanToXML(netlogs,path1+\"145-330000-\"+time.toString()+\"-00001-WA-SOURCE_NETLOG_0001-0.xml\");\r\n\r\n\t\tZipUtil.ZipMultiFile(path1, path+\"145-353030334-330300-330300-netlog-00001.zip\");\r\n\t}", "public static void generateZip(File file) {\r\n\t\t\r\n\t\tFile zipfile=new File(file.toString().replaceAll(\".xlsx\",\".zip\" ));\r\n\t\tFileOutputStream fos=null;\r\n\t\tZipOutputStream zos=null;\r\n\t\tFileInputStream fin=null;\r\n\t\tZipEntry ze=null; \r\n\t\t\t\r\n\t\tif(!zipfile.exists()){\r\n\t\t\ttry {\r\n\t\t\t\tzipfile.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//create ZipOutputStream to write to the zipfile\r\n fos=new FileOutputStream(zipfile);\r\n\t\t\t zos=new ZipOutputStream(fos);\r\n\t\t\t \r\n\t\t//add a new Zip Entry to the ZipOutPutStream \r\n\t\t\t ze=new ZipEntry(file.getName());\r\n\t\t\t zos.putNextEntry(ze);\r\n\t\t\t \r\n\t\t//read the file and write to the ZipOutPutStream\t \r\n\t\t\t fin=new FileInputStream(file);\r\n\t\t\t int i;\r\n\t\t\t \r\n\t\t\t while((i=fin.read())!=-1){\r\n\t\t\t\t zos.write(i);\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tif(zos!=null && fos!=null && fin!=null){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t //close the zip entry to write to to zip file\r\n\t\t\t\t\t\tzos.closeEntry();\r\n\t\t\t\t\t//close Resources.\t\r\n\t\t\t\t\t\tzos.close();\r\n\t\t\t\t\t\tfos.close();\r\n\t\t\t\t\t\tfin.close();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\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}\r\n\t\t}", "private void compress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tZipOutputStream rfoFile = new ZipOutputStream(new FileOutputStream(path + fileName)); \n\t\t\tFile dirToZip = new File(rfoDir); \n\t\t\tString[] fileList = dirToZip.list(); \n\t\t\tbyte[] buffer = new byte[4096]; \n\t\t\tint bytesIn = 0; \n\n\t\t\tfor(int i=0; i<fileList.length; i++) \n\t\t\t{ \n\t\t\t\tFile f = new File(dirToZip, fileList[i]); \n\t\t\t\tFileInputStream fis = new FileInputStream(f); \n\t\t\t\tString zEntry = f.getPath();\n\t\t\t\t//System.out.println(\"\\n\" + zEntry);\n\t\t\t\tint start = zEntry.indexOf(uniqueName);\n\t\t\t\tzEntry = zEntry.substring(start + uniqueName.length() + 1, zEntry.length());\n\t\t\t\t//System.out.println(tempDir);\n\t\t\t\t//System.out.println(zEntry + \"\\n\");\n\t\t\t\tZipEntry entry = new ZipEntry(zEntry); \n\t\t\t\trfoFile.putNextEntry(entry); \n\t\t\t\twhile((bytesIn = fis.read(buffer)) != -1) \n\t\t\t\t\trfoFile.write(buffer, 0, bytesIn); \n\t\t\t\tfis.close();\n\t\t\t}\n\t\t\trfoFile.close();\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.compress(): \" + e);\n\t\t}\n\t}", "private void unCompress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tint bytesIn;\n\t\t\tZipFile rfoFile = new ZipFile(path + fileName);\n\t\t\tEnumeration<? extends ZipEntry> allFiles = rfoFile.entries();\n\t\t\twhile(allFiles.hasMoreElements())\n\t\t\t{\n\t\t\t\tZipEntry ze = (ZipEntry)allFiles.nextElement();\n\t\t\t\tInputStream is = rfoFile.getInputStream(ze);\n\t\t\t\tString fName = processSeparators(ze.getName());\n\t\t\t\tFile element = new File(tempDir + fName);\n\t\t\t\torg.reprap.Main.ftd.add(element);\n\t\t\t\tFileOutputStream os = new FileOutputStream(element);\n\t\t\t\twhile((bytesIn = is.read(buffer)) != -1) \n\t\t\t\t\tos.write(buffer, 0, bytesIn);\n\t\t\t\tos.close();\n\t\t\t}\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.unCompress(): \" + e);\n\t\t}\n\t}", "public void zip() {\n\t\tif (zipFile != null) {\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\ttry (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))) {\n\t\t\t\tzos.setLevel(ZipOutputStream.STORED);\n\t\t\t\tbyte[] buffer = new byte[4096];\n\t\t\t\tFiles.list(Paths.get(tool_builddir))\n\t\t\t\t\t\t.forEach(x -> {\n\t\t\t\t\t\t\tFile f = x.toFile();\n\t\t\t\t\t\t\tif (f.isFile() && !f.getName().contains(\".\")) {\n\t\t\t\t\t\t\t\ttry (FileInputStream fis = new FileInputStream(f)) {\n\t\t\t\t\t\t\t\t\tZipEntry zipEntry = new ZipEntry(f.getName());\n\t\t\t\t\t\t\t\t\tzos.putNextEntry(zipEntry);\n\t\t\t\t\t\t\t\t\tint count;\n\t\t\t\t\t\t\t\t\twhile ((count = fis.read(buffer)) >= 0) {\n\t\t\t\t\t\t\t\t\t\tzos.write(buffer, 0, count);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tzos.closeEntry();\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e);\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\tout.println(\"Zipped to '\" + zipFile + \"' - \" + Duration.ofMillis(System.currentTimeMillis() - start));\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t}", "public void unZip(String apkFile) throws Exception \r\n\t{\r\n\t\tLog.p(tag, apkFile);\r\n\t\tFile file = new File(apkFile);\r\n\t\r\n\t\t/*\r\n\t\t * Create the Base Directory, whose name should be same as Zip file name.\r\n\t\t * All decompressed contents will be placed under this folder.\r\n\t\t */\r\n\t\tString apkFileName = file.getName();\r\n\t\t\r\n\t\tif(apkFileName.indexOf('.') != -1)\r\n\t\t\tapkFileName = apkFileName.substring(0, apkFileName.indexOf('.'));\r\n\t\t\r\n\t\tLog.d(tag, \"Folder name: \"+ apkFileName);\r\n\t\t\r\n\t\tFile extractFolder = new File((file.getParent() == null ? \"\" : file.getParent() + File.separator) + apkFileName);\r\n\t\tif(!extractFolder.exists())\r\n\t\t\textractFolder.mkdir();\r\n\t\t\r\n\t\t/*\r\n\t\t * Read zip entries.\r\n\t\t */\r\n\t\tFileInputStream fin = new FileInputStream(apkFile);\r\n\t\tZipInputStream zin = new ZipInputStream(new BufferedInputStream(fin));\r\n\t\t\r\n\t\t/*\r\n\t\t * Zip InputStream shifts its index to every Zip entry when getNextEntry() is called.\r\n\t\t * If this method returns null, Zip InputStream reaches EOF.\r\n\t\t */\r\n\t\tZipEntry ze = null;\r\n\t\tBufferedOutputStream dest;\r\n\t\t\r\n\t\twhile((ze = zin.getNextEntry()) != null)\r\n\t\t{\r\n\t\t\tLog.d(tag, \"Zip entry: \" + ze.getName() + \" Size: \"+ ze.getSize());\r\n\t\t\t/*\r\n\t\t\t * Create decompressed file for each Zip entry. A Zip entry can be a file or directory.\r\n\t\t\t * ASSUMPTION: APK Zip entry uses Unix style File seperator- \"/\"\r\n\t\t\t * \r\n\t\t\t * 1. Create the prefix Zip Entry folder, if it is not yet available\r\n\t\t\t * 2. Create the individual Zip Entry file.\r\n\t\t\t */\r\n\t\t\tString zeName = ze.getName();\r\n\t\t\tString zeFolder = zeName;\r\n\t\t\t\r\n\t\t\tif(ze.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tzeName = null; // Don't create Zip Entry file\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(zeName.indexOf(\"/\") == -1) // Zip entry uses \"/\"\r\n\t\t\t\t\tzeFolder = null; // It is File. don't create Zip entry Folder\r\n\t\t\t\telse {\r\n\t\t\t\t\tzeFolder = zeName.substring(0, zeName.lastIndexOf(\"/\"));\r\n\t\t\t\t\tzeName = zeName.substring( zeName.lastIndexOf(\"/\") + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tLog.d(tag, \"zeFolder: \"+ zeFolder +\" zeName: \"+ zeName);\r\n\t\t\t\r\n\t\t\t// Create Zip Entry Folder\r\n\t\t\tFile zeFile = extractFolder;\r\n\t\t\tif(zeFolder != null)\r\n\t\t\t{\r\n\t\t\t\tzeFile = new File(extractFolder.getPath() + File.separator + zeFolder);\r\n\t\t\t\tif(!zeFile.exists())\r\n\t\t\t\t\tzeFile.mkdirs();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Create Zip Entry File\r\n\t\t\tif(zeName == null)\r\n\t\t\t\tcontinue;\r\n\t\t\t\r\n\t\t\t// Keep track of XML files, they are in Android Binary XML format\r\n\t\t\tif(zeName.endsWith(\".xml\"))\r\n\t\t\t\txmlFiles.add(zeFile.getPath() + File.separator + zeName);\r\n\t\t\t\r\n\t\t\t// Keep track of the Dex/ODex file. Need to convert to Jar\r\n\t\t\tif(zeName.endsWith(\".dex\") || zeName.endsWith(\".odex\"))\r\n\t\t\t\tdexFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Keep track of Resources.arsc file- resources.arsc\r\n\t\t\tif(zeName.endsWith(\".arsc\"))\r\n\t\t\t\tresFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Write Zip entry File to the disk\r\n\t\t\tint count;\r\n\t\t\tbyte data[] = new byte[BUFFER];\r\n\t\t\t\r\n\t\t\tFileOutputStream fos = new FileOutputStream(zeFile.getPath() + File.separator + zeName);\r\n\t\t\tdest = new BufferedOutputStream(fos, BUFFER);\r\n\r\n\t\t\twhile ((count = zin.read(data, 0, BUFFER)) != -1) \r\n\t\t\t{\r\n\t\t\t\tdest.write(data, 0, count);\r\n\t\t\t}\r\n\t\t\tdest.flush();\r\n\t\t\tdest.close();\r\n\t\t}\r\n\r\n\t\t// Close Zip InputStream\r\n\t\tzin.close();\r\n\t\tfin.close();\r\n\t}", "private static void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "public void zipFiles() {\r\n byte[] buffer = new byte[1024];\r\n try {\r\n\r\n // On rare occasions, there will be a semi colon in the title name,\r\n // ruining everything while zipping the file.\r\n if (title.contains(\":\") || title.contains(\".\")) {\r\n String temp = \"\";\r\n for (int i = 0; i < title.length(); i++) {\r\n \r\n if (title.charAt(i) == ':' || title.charAt(i) == '.') {\r\n \r\n } else {\r\n temp += title.charAt(i);\r\n }\r\n }\r\n title = temp;\r\n }\r\n System.out.println(\"File name: \" + title);\r\n \r\n FileOutputStream fos = new FileOutputStream(savePath + \"\\\\\" + title + \".zip\");\r\n ZipOutputStream zos = new ZipOutputStream(fos);\r\n \r\n for (String fileName : fileNames) {\r\n \r\n System.out.println(\"zipping file: \" + fileName);\r\n \r\n fileName = savePath + \"\\\\\" + fileName;\r\n File srcFile = new File(fileName);\r\n FileInputStream fis;\r\n if (srcFile.exists()) {\r\n fis = new FileInputStream(srcFile);\r\n \r\n zos.putNextEntry(new ZipEntry(srcFile.getName()));\r\n int length;\r\n while ((length = fis.read(buffer)) > 0) {\r\n zos.write(buffer, 0, length);\r\n }\r\n zos.closeEntry();\r\n fis.close();\r\n \r\n boolean success = (new File(fileName)).delete();\r\n }\r\n }\r\n zos.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"File not found!\");\r\n } catch (IOException ex) {\r\n }\r\n }", "public File getZip() {\r\n try {\r\n close(); // if the file is currently open close it\r\n Log.d(LOG_TAG, \"getZip()\");\r\n File zipFile = new File(mBaseFileName + \".zip\");\r\n zipFile.delete();\r\n ZipOutputStream zipStream = new ZipOutputStream(new FileOutputStream(zipFile));\r\n for (int i = 0; i < mNumSegments; i++) {\r\n File chunk = new File(getFileNameForIndex(i));\r\n if (chunk.exists()) {\r\n FileInputStream fis = new FileInputStream(chunk);\r\n writeToZipFile(zipStream, fis, chunk.getName());\r\n }\r\n }\r\n zipStream.close();\r\n return zipFile;\r\n } catch (Exception e) {\r\n Log.e(LOG_TAG, \"Failed to create zip file\", e);\r\n }\r\n\r\n return null;\r\n }", "private ZipCompressor(){}", "public void zip(String directoryInZip, \n String filePath) throws Exception\n {\n File thisFile = new File(filePath);\n\n if (thisFile.exists()) {\n\n try {\n FileInputStream fi = new FileInputStream(thisFile);\n\n origin = new BufferedInputStream(fi, BUFFER);\n\n ZipEntry entry = new ZipEntry(directoryInZip + File.separator\n + thisFile.getName());\n out.putNextEntry(entry);\n\n int count;\n while ((count = origin.read(data, 0, BUFFER)) != -1) {\n out.write(data, 0, count);\n }\n origin.close();\n\n } catch (FileNotFoundException e) {\n logger.error(\"File \" + filePath + \" not found !!\", e);\n } catch (IOException e) {\n logger.error(\"Could not write to Zip File \", e);\n throw new Exception(\"Could not write to Zip File \", e);\n }\n\n } else {\n // Log message if file does not exist\n logger.info(\"File \" + thisFile.getName()\n + \" does not exist on file system\");\n\n } \t\t\n }", "void makeZip(String zipFilePath, String srcFilePaths[],\n\t\t\tMessageDisplay msgDisplay) {\n\t\t...\n\t\tfor (int i = 0; i < srcFilePaths.length; i++) {\n\t\t\tmsgDisplay.showMessage(\"Zipping \"+srcFilePaths[i]);\n\t\t\t//add the file srcFilePaths[i] into the zip file.\n\t\t\t...\n\t\t}\n\t}", "public static void unzip(Context context, InputStream zipFile) {\n try (BufferedInputStream bis = new BufferedInputStream(zipFile)) {\n try (ZipInputStream zis = new ZipInputStream(bis)) {\n ZipEntry ze;\n int count;\n byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];\n while ((ze = zis.getNextEntry()) != null) {\n try (FileOutputStream fout = context.openFileOutput(ze.getName(), Context.MODE_PRIVATE)) {\n while ((count = zis.read(buffer)) != -1)\n fout.write(buffer, 0, count);\n }\n }\n }\n } catch (IOException | NullPointerException ex) {\n Log.v(MainActivity.TAG, \"Zip not opened.\\n\"+ex.getMessage());\n }\n }", "@Override\r\n\tpublic void zipFile(ZipFileDetails zipFileDetails) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\", null, Level.ERROR, null);\r\n\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tFile targetFile = new File(\"D:\\\\program\\\\360cse\\\\360Chrome\\\\test.zip\");\n\t\tFile sourceFiles = new File(\"D:\\\\temple\\\\sysMenu-add.html\");\n\t\tboolean flag = compressZip(false, targetFile, sourceFiles);\n\t\tSystem.out.println(flag);\n\t}", "public boolean ZipFile(String sSourceFilePath, String sDestinationZipFilePath, boolean bReplaceExisting) {\n byte[] buffer = new byte[30720];\n FileInputStream fin = null;\n FileOutputStream fout = null;\n ZipOutputStream zout = null;\n int length;\n String sZipEntryFileName = \"\";\n File objFile = null;\n try {\n //check for source file\n if (sSourceFilePath.trim().equalsIgnoreCase(\"\")) {\n throw new Exception(\"Invalid Source File : \" + sSourceFilePath);\n }\n objFile = new File(sSourceFilePath);\n if (!objFile.exists()) {\n throw new Exception(\"Source file not found : \" + sSourceFilePath);\n }\n\n //check for destination Zip file\n if (sDestinationZipFilePath.trim().equalsIgnoreCase(\"\") || sDestinationZipFilePath == null) {\n String stmp_Path = objFile.getAbsolutePath();\n String stmp_Name = objFile.getName();\n if (stmp_Name.contains(\".\")) { //check for removing extension\n int indx = 0;\n try {\n indx = stmp_Name.indexOf(\".\", stmp_Name.length() - 5);\n } catch (Exception e) {\n indx = 0;\n }\n if (indx <= 0) {\n indx = stmp_Name.length();\n }\n\n stmp_Name = stmp_Name.substring(0, indx);\n stmp_Name = stmp_Name + \".zip\";\n }\n sDestinationZipFilePath = stmp_Path + File.separator + stmp_Name;\n }\n\n objFile = new File(sDestinationZipFilePath);\n if (objFile.exists()) {\n if (bReplaceExisting) {\n objFile.delete();\n } else {\n throw new Exception(\"Destination ZipFile Already exists : \" + sDestinationZipFilePath);\n }\n }\n\n //Zipping File\n sZipEntryFileName = sSourceFilePath.substring(sSourceFilePath.lastIndexOf(\"\\\\\") + 1);\n fout = new FileOutputStream(sDestinationZipFilePath);\n zout = new ZipOutputStream(fout);\n fin = new FileInputStream(sSourceFilePath);\n zout.putNextEntry(new ZipEntry(sZipEntryFileName));\n while ((length = fin.read(buffer)) > 0) {\n zout.write(buffer, 0, length);\n }\n\n return true;\n\n } catch (Exception exp) {\n println(\"Src = \" + sSourceFilePath + \" : Dest = \" + sDestinationZipFilePath + \" : \" + exp.toString());\n return false;\n } finally {\n try {\n fin.close();\n } catch (Exception exp) {\n }\n try {\n zout.closeEntry();\n } catch (Exception exp) {\n }\n try {\n zout.close();\n } catch (Exception exp) {\n }\n }\n }", "public static boolean UnzipFile(ZipFile zf, String filepathinzip, File fileinfiledir) {\r\n BufferedOutputStream Output_fos = null;\r\n BufferedInputStream bufbr = null;\r\n try {\r\n ZipEntry ze = zf.getEntry(filepathinzip);\r\n if (ze != null) {\r\n BufferedOutputStream Output_fos2 = new BufferedOutputStream(new FileOutputStream(fileinfiledir));\r\n try {\r\n byte[] buf = new byte[65536];\r\n BufferedInputStream bufbr2 = new BufferedInputStream(zf.getInputStream(ze));\r\n while (true) {\r\n try {\r\n int readlen = bufbr2.read(buf);\r\n if (readlen < 0) {\r\n break;\r\n }\r\n Output_fos2.write(buf, 0, readlen);\r\n } catch (Exception e) {\r\n e = e;\r\n bufbr = bufbr2;\r\n Output_fos = Output_fos2;\r\n } catch (Throwable th) {\r\n th = th;\r\n bufbr = bufbr2;\r\n Output_fos = Output_fos2;\r\n if (Output_fos != null) {\r\n try {\r\n Output_fos.close();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e2) {\r\n e2.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e3) {\r\n e3.printStackTrace();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e4) {\r\n e4.printStackTrace();\r\n return false;\r\n }\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e5) {\r\n e5.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n throw th;\r\n }\r\n }\r\n if (Output_fos2 != null) {\r\n try {\r\n Output_fos2.close();\r\n if (bufbr2 != null) {\r\n try {\r\n bufbr2.close();\r\n } catch (IOException e6) {\r\n e6.printStackTrace();\r\n BufferedInputStream bufferedInputStream = bufbr2;\r\n BufferedOutputStream bufferedOutputStream = Output_fos2;\r\n return false;\r\n }\r\n }\r\n } catch (IOException e7) {\r\n e7.printStackTrace();\r\n if (bufbr2 != null) {\r\n try {\r\n bufbr2.close();\r\n } catch (IOException e8) {\r\n e8.printStackTrace();\r\n BufferedInputStream bufferedInputStream2 = bufbr2;\r\n BufferedOutputStream bufferedOutputStream2 = Output_fos2;\r\n return false;\r\n }\r\n }\r\n BufferedInputStream bufferedInputStream3 = bufbr2;\r\n BufferedOutputStream bufferedOutputStream3 = Output_fos2;\r\n return false;\r\n } finally {\r\n if (bufbr2 != null) {\r\n try {\r\n bufbr2.close();\r\n } catch (IOException e9) {\r\n e9.printStackTrace();\r\n BufferedInputStream bufferedInputStream4 = bufbr2;\r\n BufferedOutputStream bufferedOutputStream4 = Output_fos2;\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n BufferedInputStream bufferedInputStream5 = bufbr2;\r\n BufferedOutputStream bufferedOutputStream5 = Output_fos2;\r\n return true;\r\n } catch (Exception e10) {\r\n e = e10;\r\n Output_fos = Output_fos2;\r\n try {\r\n e.printStackTrace();\r\n if (Output_fos == null) {\r\n return false;\r\n }\r\n try {\r\n Output_fos.close();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e11) {\r\n e11.printStackTrace();\r\n return false;\r\n }\r\n } catch (IOException e12) {\r\n e12.printStackTrace();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e13) {\r\n e13.printStackTrace();\r\n return false;\r\n }\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e14) {\r\n e14.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n } catch (Throwable th2) {\r\n th = th2;\r\n if (Output_fos != null) {\r\n }\r\n throw th;\r\n }\r\n } catch (Throwable th3) {\r\n th = th3;\r\n Output_fos = Output_fos2;\r\n if (Output_fos != null) {\r\n }\r\n throw th;\r\n }\r\n } else if (Output_fos == null) {\r\n return false;\r\n } else {\r\n try {\r\n Output_fos.close();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e15) {\r\n e15.printStackTrace();\r\n return false;\r\n }\r\n } catch (IOException e16) {\r\n e16.printStackTrace();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e17) {\r\n e17.printStackTrace();\r\n return false;\r\n }\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e18) {\r\n e18.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n } catch (Exception e19) {\r\n e = e19;\r\n }\r\n }", "public void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n final int BUFFER_SIZE = (int) 1e8;\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "void importDivision(Connection con, ZipFile zip) throws Exception;", "private static void extractFile(ZipInputStream inStreamZip, FSDataOutputStream destDirectory) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(destDirectory);\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = inStreamZip.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "void makeZip(String zipFilePath, String srcFilePaths[], ZipMainFrame f) {\n ...\n for (int i = 0; i < srcFilePaths.length; i++) {\n f.setStatusBarText(\"Zipping \"+srcFilePaths[i]);\n //add the file srcFilePaths[i] into the zip file.\n ...\n }\n }", "public static void extractAndSaveFile(ZipInputStream zip,\n \t\t\tFileOutputStream destinationFile) throws IOException {\n \t\tByteArrayOutputStream out = readZipEntry(zip);\n \t\tdestinationFile.write(out.toByteArray());\n \t\tout.close();\n \t\tdestinationFile.close();\n \t}", "public static void makeZip(String fileName)\r\n throws IOException, FileNotFoundException\r\n {\r\n File file = new File(fileName);\r\n zos = new ZipOutputStream(new FileOutputStream(file + \".zip\"));\r\n //Call recursion.\r\n\r\n\r\nrecurseFiles(file);\r\n //We are done adding entries to the zip archive,\r\n\r\n\r\n//so close the Zip output stream.\r\n\r\n\r\nzos.close();\r\n }", "private static FileSystem openZip(Path zipPath) throws IOException, URISyntaxException{\n\t Map<String, String> providerProps = new HashMap<>();\r\n\t\tproviderProps.put(\"create\", \"true\");\r\n\t\t\r\n\t\t// Um ZipFiles zu erstellen benötigt man URIs, deswegen werden sie hier erstellt\r\n\t\tURI zipUri = new URI(\"jar:file\", zipPath.toUri().getPath(), null);\r\n\t\tFileSystem zipFs = FileSystems.newFileSystem(zipUri, providerProps); // Statische Methode wird hier angewendet\r\n\t\t\r\n\t\treturn zipFs;\r\n\t}", "private static void writeFile(ZipInputStream zipIn, String filePath) throws IOException {\n\n String parent = filePath.replace(filePath.substring(filePath.lastIndexOf('/')), \"\");\n createParents(parent);\n\n BufferedOutputStream bos = null;\n\n try {\n bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n\n } catch (IOException e) {\n System.err.println(e.getMessage());\n Errors.setUnzipperError(true);\n\n } finally {\n if (bos != null) {\n bos.close();\n }\n }\n }", "public void readZip(File f) {\r\n try {\r\n unzip(f);\r\n File file = new File(workplace + \"/temp/USQ_IMAGE\");\r\n File old = new File(workplace + \"/old\");\r\n if(!old.exists())old.mkdir();\r\n if(old.exists()&&old.isFile())old.mkdir();\r\n File files[] = file.listFiles();\r\n for(int i=0 ; i<files.length ; i++){\r\n readFile(files[i]);\r\n }\r\n //new session\r\n createSes(f);\r\n } catch (Exception ex) {\r\n JOptionPane.showMessageDialog(null, \"read zip file failed.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n ex.printStackTrace();\r\n }\r\n }", "public void setupZipFile(String[] args) {\n\t\tif (args.length > 0) {\n\t\t\tif (!args[0].endsWith(\".zip\")) {\n\t\t\t\tthrow new IllegalArgumentException(\"zip file expected, but: \" + args[0]);\n\t\t\t}\n\t\t\tbuildDirectory = new File(\n\t\t\t\t\tgetBuildDirectory(),\n\t\t\t\t\tString.valueOf(System.currentTimeMillis()));\n\t\t\ttool_builddir = buildDirectory.toString();\n\t\t\tif (!buildDirectory.mkdirs()) {\n\t\t\t\tLoggedUtils.ignore(\"Unable to create directory \" + tool_builddir, null);\n\t\t\t}\n\t\t\tzipFile = args[0];\n\t\t} else if (requireZipArgument){\n\t\t\tthrow new IllegalArgumentException(\"zip file is expected as a first argument\");\n\t\t}\n\t}", "public File getZipFile() {\n return distZip;\n }", "public void toUnzip(String zipFile, String targetDir) {\n\n\t\tMessage message = new Message();\n\t\tmessage.what = SUCCESS;\n\n\t\tint SIZE = 4096; // buffer size: 4KB\n\t\tString strEntry; // each zip entry name\n\t\ttry {\n\t\t\tBufferedOutputStream dest = null; // buffer output stream\n\t\t\tFileInputStream fis = new FileInputStream(zipFile);\n\t\t\tZipInputStream zis = new ZipInputStream(\n\t\t\t\t\tnew BufferedInputStream(fis));\n\t\t\tZipEntry entry; // each zip entry\n\t\t\twhile ((entry = zis.getNextEntry()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tint count;\n\t\t\t\t\tbyte data[] = new byte[SIZE];\n\t\t\t\t\tstrEntry = entry.getName();\n\n\t\t\t\t\tFile entryFile = new File(targetDir + strEntry);\n\t\t\t\t\tFile entryDir = new File(entryFile.getParent());\n\t\t\t\t\tif (!entryDir.exists()) {\n\t\t\t\t\t\tentryDir.mkdirs();\n\t\t\t\t\t}\n\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(entryFile);\n\t\t\t\t\tdest = new BufferedOutputStream(fos, SIZE);\n\t\t\t\t\twhile ((count = zis.read(data, 0, SIZE)) != -1) {\n\t\t\t\t\t\tdest.write(data, 0, count);\n\n\t\t\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\t\t\tmsg.what = PROGRESS;\n\t\t\t\t\t\tmsg.obj = count;\n\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t}\n\t\t\t\t\tdest.flush();\n\t\t\t\t\tdest.close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tmessage.what = ERROR;\n\t\t\t\t\tmessage.obj = ex.getMessage();\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tzis.close();\n\t\t\tFile fileszipe = new File(zipFile);\n\t\t\tfileszipe.delete();\n\t\t} catch (Exception cwj) {\n\t\t\tmessage.what = ERROR;\n\t\t\tmessage.obj = cwj.getMessage();\n\t\t\tcwj.printStackTrace();\n\t\t}\n\t\thandler.sendMessage(message);\n\t}", "private void compressArchive() throws Exception {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"Compressing archive: \" + path);\n\t\t}\n\n\t\tFileOutputStream fout = new FileOutputStream(path + \".gz\");\n\t\tGZIPOutputStream gout = new GZIPOutputStream(fout);\n\t\tFileInputStream fin = new FileInputStream(path);\n\t\tbyte[] buf = new byte[blockSize];\n\t\tint len;\n\t\twhile ((len = fin.read(buf)) > 0) {\n\t\t\tgout.write(buf, 0, len);\n\t\t}\n\t\tfin.close();\n\n\t\t// flush and close gzip file\n\t\tgout.finish();\n\t\tgout.close();\n\n\t\t// unlink original archive\n\t\tFile file = new File(path);\n\t\tfile.delete();\n\t}", "static void unzip(String zipFilePath, String destDirectory, boolean recursive, boolean teacherZip) throws IOException {\n\n if (students == null) {\n students = new ArrayList<Student>();\n }\n\n ZipInputStream zipIn = null;\n\n try {\n zipIn = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry entry = zipIn.getNextEntry();\n\n // iterates over entries in the zip file\n while (entry != null) {\n createFiles(destDirectory, zipIn, entry, recursive);\n\n zipIn.closeEntry();\n entry = zipIn.getNextEntry();\n }\n\n } catch (IOException e) {\n System.err.println(e.getMessage());\n Errors.setUnzipperError(true);\n\n } finally {\n if (zipIn != null) {\n zipIn.close();\n }\n }\n }", "public void unzip(File f) throws Exception {\r\n String destDir = workplace + \"/temp/\";\r\n File tmp = new File(destDir);\r\n if(!tmp.exists())tmp.mkdir();\r\n byte b[] = new byte [1024];\r\n int length;\r\n \r\n ZipFile zipFile;\r\n zipFile = new ZipFile(f);\r\n Enumeration enumeration = zipFile.entries();\r\n ZipEntry zipEntry = null ;\r\n OutputStream outputStream = null;\r\n InputStream inputStream = null;\r\n while (enumeration.hasMoreElements()) {\r\n zipEntry = (ZipEntry) enumeration.nextElement();\r\n File loadFile = new File(destDir + zipEntry.getName());\r\n if (zipEntry.isDirectory()) {\r\n // 这段都可以不要,因为每次都貌似从最底层开始遍历的\r\n loadFile.mkdirs();\r\n }else{\r\n if (!loadFile.getParentFile().exists())\r\n loadFile.getParentFile().mkdirs();\r\n outputStream = new FileOutputStream(loadFile);\r\n inputStream = zipFile.getInputStream(zipEntry);\r\n while ((length = inputStream.read(b)) > 0)\r\n outputStream.write(b, 0, length);\r\n }\r\n }\r\n outputStream.flush();\r\n outputStream.close();\r\n inputStream.close();\r\n }", "private void addFilesToZip(List<File> files,String outputPath) throws IOException \r\n\t{\r\n\t\t// create a zip output stream\r\n\t\tString zipFileName = outputPath + File.separator + Constants.name + zipIndex + Constants.zipExtension;\r\n\t\tOutputStreamWithLength chunkedFile = new OutputStreamWithLength(zipFileName);\r\n\t\tzipOutputStream = new ZipOutputStream(chunkedFile);\r\n\t\tdouble totalBytesRead = 0L;\r\n\t\tint count = 10; \r\n\t\tfor(File file:files)\r\n\t\t{\r\n\t\t\t// reset the file index\r\n\t\t\tfileIndex = 0;\r\n\t\t\tString zipEntryPath = file.getAbsolutePath().substring(basePath.length() + 0);\r\n\t\t\t\r\n\t\t\tif(file.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tZipEntry entry =new ZipEntry(zipEntryPath+\"/\");\r\n\t\t\t\tzipOutputStream.putNextEntry(entry);\r\n\t\t\t\tzipOutputStream.closeEntry();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tzipEntryPath = zipEntryPath + Constants.fragmentLabel + fileIndex++;\r\n\t\t\t}\t\t\t\r\n\r\n\t\t\t// add the current file to the zip\r\n\t\t\tZipEntry entry =new ZipEntry(zipEntryPath);\r\n\t\t\tzipOutputStream.putNextEntry(entry);\r\n\r\n\t\t\tbyte[] buffer = new byte[1024]; \t \r\n\r\n\t\t\tFileInputStream inputFileStream = new FileInputStream(file);\r\n\t\t\tint len; \r\n\t\t\twhile ((len = inputFileStream.read(buffer)) > 0) \r\n\t\t\t{ \r\n\t\t\t\tif((chunkedFile.getCurrentWriteLength() + len ) > maxSplitSize){\r\n\t\t\t\t\t// close current zip output stream\r\n\t\t\t\t\tzipOutputStream.closeEntry();\r\n\t\t\t\t\tzipOutputStream.finish();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// reset the write length\r\n\t\t\t\t\tchunkedFile.setCurrentWriteLength(0);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// create new zip output stream\r\n\t\t\t\t\tzipIndex += 1;\r\n\t\t\t\t\tzipFileName = outputPath+ File.separator + Constants.name + zipIndex + Constants.zipExtension;\r\n\t\t\t\t\tchunkedFile = new OutputStreamWithLength(zipFileName);\r\n\t\t\t\t\tzipOutputStream = new ZipOutputStream(chunkedFile);\r\n\r\n\t\t\t\t\t// add the current file to write remaining bytes\r\n\t\t\t\t\tzipEntryPath = file.getAbsolutePath().substring(basePath.length() + 0);\r\n\t\t\t\t\tzipEntryPath = zipEntryPath + Constants.fragmentLabel + fileIndex++;\r\n\t\t\t\t\tentry = new ZipEntry(zipEntryPath);\r\n\t\t\t\t\tzipOutputStream.putNextEntry(entry);\r\n\r\n\t\t\t\t\t// write the bytes to the zip output stream\r\n\t\t\t\t\tzipOutputStream.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// write the bytes to the zip output stream\r\n\t\t\t\t\tzipOutputStream.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//Show progress\r\n\t\t\t\ttotalBytesRead += len;\r\n\t\t\t\tdouble progress = totalBytesRead / totalBytes;\r\n\t\t\t\tif (progress*100 > 10)\r\n\t\t\t\t{\r\n\t\t\t\t\ttotalBytesRead = 0L;\r\n\t\t\t\t\tcount += 10;\r\n\t\t\t\t\tSystem.out.println(\"Finished \" + count +\"%\");\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t\tinputFileStream.close();\r\n\t\t}\r\n\r\n\t\tzipOutputStream.closeEntry();\r\n\t\tzipOutputStream.finish();\r\n\t}", "@AutoEscape\n\tpublic String getZip();", "protected void zipFile(File file, ZipOutputStream zOut, String vPath)\n throws IOException\n {\n if (!vPath.equalsIgnoreCase(\"WEB-INF/web.xml\")) {\n super.zipFile(file, zOut, vPath);\n } else {\n log(\"Warning: selected \"+archiveType+\" files include a WEB-INF/web.xml which will be ignored \" +\n \"(please use webxml attribute to \"+archiveType+\" task)\", Project.MSG_WARN);\n }\n }", "public ZipFileWriter(String zipFile) throws FileNotFoundException {\r\n\t\tFileOutputStream fos = new FileOutputStream(zipFile);\r\n\t\t// ajout du checksum\r\n\t\tCheckedOutputStream checksum = new CheckedOutputStream(fos,\r\n\t\t\t\tnew Adler32());\r\n\t\tthis.zos = new ZipOutputStream(new BufferedOutputStream(checksum));\r\n\t}", "public void respaldo() {\n if (seleccionados != null && seleccionados.length > 0) {\n ZipOutputStream salidaZip; //Donde va a quedar el archivo zip\n\n File file = new File(FacesContext.getCurrentInstance()\n .getExternalContext()\n .getRealPath(\"/temporales/\") + archivoRespaldo + \".zip\");\n\n try {\n salidaZip\n = new ZipOutputStream(new FileOutputStream(file));\n ZipEntry entradaZip;\n\n for (String s : seleccionados) {\n if (s.contains(\"Paises\")) {\n\n entradaZip = new ZipEntry(\"paises.json\");\n salidaZip.putNextEntry(entradaZip);\n byte data[]\n = PaisGestion.generaJson().getBytes();\n salidaZip.write(data, 0, data.length);\n salidaZip.closeEntry();\n }\n }\n salidaZip.close();\n\n // Descargar el archivo zip\n //Se carga el zip en un arreglo de bytes...\n byte[] zip = Files.readAllBytes(file.toPath());\n\n //Generar la página de respuesta...\n HttpServletResponse respuesta\n = (HttpServletResponse) FacesContext\n .getCurrentInstance()\n .getExternalContext()\n .getResponse();\n\n ServletOutputStream salida\n = respuesta.getOutputStream();\n\n //Defino los encabezados de la página de respuesta\n respuesta.setContentType(\"application/zip\");\n respuesta.setHeader(\"Content-Disposition\",\n \"attachement; filename=\" + archivoRespaldo + \".zip\");\n\n salida.write(zip);\n salida.flush();\n\n //Todo listo\n FacesContext.getCurrentInstance().responseComplete();\n file.delete();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(RespaldoController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(RespaldoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n\n }", "public void ImportNaimoZipFileByUser(){\n File mPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n final Manager_FileDialog managerFileDialog = new Manager_FileDialog(this, mPath, \".zip\");\n managerFileDialog.addFileListener(new Manager_FileDialog.FileSelectedListener() {\n public void fileSelected(File file) {\n managerFileDialog.removeFileListener(this);\n //ImportNaimoZipFile(file.getPath());\n new ImportNaimoZipFile(WordListActivity.this,file.getPath()).execute();\n }\n });\n managerFileDialog.showDialog();\n }", "private void createZipEntry(ZipOutputStream out, String fileName, byte[] content) throws IOException\n\t{\n\t\tZipEntry entry = new ZipEntry(fileName);\n\t\tentry.setMethod(ZipEntry.DEFLATED);\n\t\tout.putNextEntry(entry);\n\t\tout.write(content);\n\t}", "public static void main(String[] args) throws Exception {\n readZipFile(FILE_NAME);\n }", "public static ZipFile zip(File zip, File fileToAdd, String password)\r\n\t\t\tthrows ZipException {\n\t\tZipFile zipFile = new ZipFile(zip);\r\n\r\n\t\tZipParameters parameters = new ZipParameters();\r\n\t\tparameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);\r\n\t\tparameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);\r\n\t\tif (!StringUtil.isEmpty(password)) {\r\n\t\t\tparameters.setEncryptFiles(true);\r\n\t\t\tparameters.setEncryptionMethod(Zip4jConstants.ENC_METHOD_STANDARD);\r\n\t\t\tparameters.setPassword(password);\r\n\t\t}\r\n\t\tzipFile.addFile(fileToAdd, parameters);\r\n\t\treturn zipFile;\r\n\t}", "public void jieya() {\n\t\tlong startTime=System.currentTimeMillis();\n\t\ttry {\n\t\t\tZipInputStream Zin=new ZipInputStream(new FileInputStream(\n\t\t\t\t\tf1.getText()));//输入源zip路径\n\t\t\tBufferedInputStream Bin=new BufferedInputStream(Zin);\n\t\t\tString Parent=\"D:\\\\XM\\\\解压\"; //输出路径(文件夹目录)\n\t\t\tFile Fout=null;\n\t\t\tZipEntry entry;\n\t\t\ttry {\n\t\t\t\twhile((entry = Zin.getNextEntry())!=null && !entry.isDirectory()){\n\t\t\t\t\tFout=new File(Parent,entry.getName());\n\t\t\t\t\tif(!Fout.exists()){\n\t\t\t\t\t\t(new File(Fout.getParent())).mkdirs();\n\t\t\t\t\t}\n\t\t\t\t\tFileOutputStream out=new FileOutputStream(Fout);\n\t\t\t\t\tBufferedOutputStream Bout=new BufferedOutputStream(out);\n\t\t\t\t\tint b;\n\t\t\t\t\twhile((b=Bin.read())!=-1){\n\t\t\t\t\t\tBout.write(b);\n\t\t\t\t\t}\n\t\t\t\t\tBout.close();\n\t\t\t\t\tout.close();\n\t\t\t\t\tJOptionPane.showMessageDialog(null,Fout+\"解压成功\");\t\n\t\t\t\t}\n\t\t\t\tBin.close();\n\t\t\t\tZin.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tlong endTime=System.currentTimeMillis();\n\t}", "@Override\n public void run() {\n txt_Nombre.setVisible(false);\n //ocultamos el boton Enviar\n btnaceptar.setVisible(false);\n //ocultamos boton Eliminar archivo\n btnEliminarArchivo.setVisible(false);\n //Ocultamos boton Seleccionar archivo\n btnselecionar.setVisible(false);\n //preparamos la salida de datos del Zip\n ZipOutputStream zout;\n //preparamos la salida de datos para el archivo\n BufferedOutputStream bos;\n try {\n //creamos el archivo y lo guardamos \n ruta=nombreZip+\".zip\";\n //creamos el flujo de salida hacia el archivo Zip\n bos = new BufferedOutputStream(new FileOutputStream(ruta));\n zout = new ZipOutputStream(bos);\n int i=0;\n //Hacemos visibles todos los componentes de las barras de progreso\n lblGeneral.setVisible(true);\n barraGeneral.setVisible(true);\n barra.setVisible(true);\n barra.setStringPainted(true);\n //ponemosd de color verde la barra\n barraGeneral.setForeground(Color.GREEN);\n //habilitamos el String del porcentaje\n barraGeneral.setStringPainted(true);\n //ponemos el valor Maximo de la barra\n barraGeneral.setMaximum((int)(pesoTotal/100));\n //ponemos el valor Minimo\n barraGeneral.setMinimum(0);\n //variable para el progreso de la barra General\n long leidoTotal=0;\n lbInfo.setHorizontalAlignment(JLabel.LEFT);\n for (String documento : documentos) {\n //creamos una nueva entrada/ducumento para el Zip\n ZipEntry ze = new ZipEntry(nombres.get(i));\n //agregamos la entrada al Zip\n zout.putNextEntry(ze);\n //obtenemos el archivo \n File arch=new File(documentos.get(i));\n //Indicamos cual archivo se esta comprimiendo\n lbInfo.setText(\"comprimiendo: \"+arch.getName());\n //obtenemos el tamaño del archivo\n long tamañoArch=arch.length();\n //ponemos el valor maximo de a la barra individual\n barra.setMaximum((int)(tamañoArch/100));\n //ponemos el valor minimo\n barra.setMinimum(0);\n //cambiamos el color de la barra\n barra.setForeground(Color.GREEN);\n barra.setValue(0);\n //creamos el Stream de entrada del archivo\n BufferedInputStream bis=new BufferedInputStream(new FileInputStream(documentos.get(i)));\n //tamaño de buffer para lectura del archivo\n byte[] info=new byte[4096];\n //variable para el progreso de la barra individual\n long leido=0;\n //Ciclo para lectura del archivo\n while(leido<tamañoArch)\n {\n //Verifica que se puedan leer otros 4KB \n if((leido+4096)<tamañoArch)\n {\n //leemos 4KB del Archivo\n bis.read(info);\n //agregamos los 4KB a las variables de progreso\n leido+=4096;\n leidoTotal+=4096;\n }\n else\n {\n //si no se puede leer 4KB lee el resto del archivo\n int resto=(int)(tamañoArch-leido);\n //damos el tamaño al arreglo\n info=new byte[resto];\n //leemos el resto del archivo\n bis.read(info);\n //agregamos el resto del a las variables de progreso\n leido+=resto;\n leidoTotal+=resto;\n }\n //escribimos en el archivo Zip\n zout.write(info);\n //ponemos el valor en la barra individual\n barra.setValue((int)(leido/100));\n //ponemos el valor en la barra general\n barraGeneral.setValue((int)(leidoTotal/100));\n }\n //cerramos la escritura a la entradadel Zip\n zout.closeEntry();\n //aumentamos el valor del contador\n i++;\n }\n //cerramos la escritura al archivo Zip\n zout.close();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(EnviarArchivo.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(EnviarArchivo.class.getName()).log(Level.SEVERE, null, ex);\n } \n //verificamos que tipo de envio se selecciono\n if(rbtnSimultaneo.isSelected())\n {\n //orden para archivos simultaneos y envios individuales\n orden.enviarArchivoSimultaneo(ruta,ip);\n }\n else\n {\n //orden para envio Secuencial\n orden.envioArchivoSecuencial(ruta);\n }\n //llamamos el metodo cerrar para cerrar la ventana\n cerrar();\n }", "public void newZipEntry(ZipEntry zipEntry, InputStream inputStream);", "private static void createZipArchiv(String xmlStream, String path, String name) {\r\n\t\ttry {\r\n\t\t\tFile file = new File(path, name + \".xml\");\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t}\r\n\t\t\t//XMLStream in Datei schreiben\r\n\t\t\tPrintWriter writer = new PrintWriter(file);\r\n\t\t\twriter.write(xmlStream);\r\n\t\t\twriter.close();\r\n\t\t\t\r\n\t\t\t//Commando für die Shell um ein Tgz zu erstellen.\r\n\t\t\tString[] str = new String[] {\r\n\t\t\t\t\t\"/bin/bash\",\r\n\t\t\t\t\t\"-c\",\r\n\t\t\t\t\t\"tar cfvz \" + path + \"/\" + name + \".tgz -C \" + path + \" \" + name\r\n\t\t\t\t\t\t\t+ \".xml -C \" + path + \" \" + name + \".pdf\" };\r\n\r\n\t\t\t//Shell Aufruf\r\n\t\t\tProcess p = Runtime.getRuntime().exec(str);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tint timeout = 10;\r\n\t\t\twhile (!new File(path + name + \".tgz\").exists() && timeout != 0) {\r\n\t\t\t\t//warten bis Datei erstellt wurde oder 10 sec vergangen sind\r\n\t\t\t\ttry {\r\n\t\t\t\t\ttimeout--;\r\n\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private static void createZipOrXmlFile(Document createdDocument) {\n if(attachmentList.size() > 0){\n File zipFile = new File(OUTPUT_ZIP_PATH);\n ZipOutputStream zipOutputStream = null;\n String fileName;\n byte[] decoded;\n\n try {\n zipOutputStream = new ZipOutputStream(new FileOutputStream(zipFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n for (Attachment attachment : attachmentList) {\n try {\n //create a new zip entry\n //add the zip entry and write the decoded data\n assert zipOutputStream != null;\n fileName = attachment.filename;\n decoded = attachment.data;\n ZipEntry imageOutputStream = new ZipEntry(ImportUtils.PHOTO_FILE_PATH + fileName);\n zipOutputStream.putNextEntry(imageOutputStream);\n zipOutputStream.write(decoded);\n\n } catch (IllegalArgumentException | IOException e) {\n e.printStackTrace();\n }\n }\n //add the xml after the attachments have been added\n ZipEntry xmlOutputStream = new ZipEntry(ImportUtils.GENERATED_XML_FILENAME);\n try {\n zipOutputStream.putNextEntry(xmlOutputStream);\n zipOutputStream.write(Entry.toBytes(createdDocument));\n //closing the stream\n //! not closing the stream can result in malformed zip files\n zipOutputStream.finish();\n zipOutputStream.flush();\n zipOutputStream.closeEntry();\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n }else{\n //if no attachments found\n // add the xml file only\n OutputFormat format = OutputFormat.createPrettyPrint();\n try {\n OutputStream outputStream = new FileOutputStream(OUTPUT_XML_PATH);\n XMLWriter writer = new XMLWriter(outputStream, format);\n writer.write(createdDocument);\n } catch (IOException e ) {\n e.printStackTrace();\n }\n }\n }", "private void downloadZippedDirectory(String selectedFolder) {\n if (selectedFolder != null) {\n File file = getFile(selectedFolder);\n StreamSource zipSource = getZipSource(file);\n getMainWindow().open(new VaadinFileDownloadResource(zipSource, selectedFolder+\".zip\", 0, getMainWindow().getApplication()), \"_self\");\n }\n }", "void addFileToZip(File file, Zipper z, SynchronizationRequest req) \n throws IOException {\n\n if (file.isFile()) {\n z.setBaseDirectory(req.getTargetDirectory());\n z.addFileToZip(file, _out);\n } else if (file.isDirectory()) {\n z.setBaseDirectory(req.getTargetDirectory());\n z.addDirectoryToZip(file, _out);\n } else {\n assert false;\n }\n }", "public static void readZip(String zipPath, boolean sort) throws IOException {\n // Load zip and its entries\n ZipFile zip = new ZipFile(new File(zipPath));\n Enumeration<? extends ZipEntry> entries = zip.entries();\n // Read every entry and load it to the HashMap\n while(entries.hasMoreElements()) {\n ZipEntry zipEntry = entries.nextElement();\n InputStream entryStream = zip.getInputStream(zipEntry);\n //Used only for the decoding mode\n //Compressed file that contains the Coded Data\n if(\"codedData.gz\".equals(zipEntry.getName())){\n FileInputStream in = new FileInputStream(\"codedData.gz\");\n GZIPInputStream gis = new GZIPInputStream(in);\n ObjectInputStream ois = new ObjectInputStream(gis);\n try {\n dataList = (ArrayList<CodedData>) (ois.readObject());\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ProjectePractiques.class.getName()).log(Level.SEVERE, null, ex);\n }\n }else{\n BufferedImage image = ImageIO.read(entryStream);\n imageNames.add(zipEntry.getName()); \n imageDict.put(zipEntry.getName(), image);\n }\n }\n zip.close();\n // Sort the image names list\n if(sort){\n Collections.sort(imageNames, (String f1, String f2) -> f1.compareTo(f2)); \n }\n }", "public static void zip(BasicShell shell, File archive, List<File> filesToZip) {\n\t\ttry {\n\t\t\tshell.printOut(\"Creating archive '\" + archive.getPath() + \"'.\");\n\t\t\tfinal BufferedOutputStream archiveStream = new BufferedOutputStream(new FileOutputStream(archive));\n\t\t\tZipOutputStream zipStream = new ZipOutputStream(archiveStream);\n\t\t\tzipStream.setLevel(7);\n\t\t\t\n\t\t\tString pwd = shell.pwd().getPath();\n\t\t\tfor ( File file : filesToZip) {\n\t\t\t\tString name = file.getPath();\n\t\t\t\tif (name.equals(pwd)) continue;\n\t\t\t\t\n\t\t\t\tif ( name.startsWith(pwd) ) {\n\t\t\t\t\tname = name.substring(pwd.length()+1);\n\t\t\t\t}\n\t\t\t\tZipEntry entry = new ZipEntry(name);\n\t\t\t\tzipStream.putNextEntry(entry);\n\t\t\t\tif ( file.isFile() ) {\n\t\t\t\t\tBufferedInputStream fileStream = new BufferedInputStream(new FileInputStream(file));\n\t\t\t\t\tbyte[] buffer = new byte[2048];\n\t\t\t\t\tint count = fileStream.read(buffer);\n\t\t\t\t\twhile ( count > -1 ) {\n\t\t\t\t\t\tzipStream.write(buffer, 0, count);\n\t\t\t\t\t\tcount = fileStream.read(buffer);\n\t\t\t\t\t}\n\t\t\t\t\tfileStream.close();\n\t\t\t\t}\n\t\t\t\tshell.printOut(\"File '\" + entry.getName() + \"' added.\");\n\t\t\t}\n\t\t\tzipStream.close();\n\t\t} catch (Exception e) {\n\t\t\tshell.getErrorHandler().handleError(Diagnostic.ERROR, e.getClass().getSimpleName() + \": \"+ e.getMessage());\n\t\t}\n\t}", "private static String createZipFile(String directory, String zipFilename, List<File> filesToAdd)\n throws IOException {\n String zipFilePath = String.format(\"%s/%s\", directory, zipFilename);\n File zipFile = new File(zipFilePath);\n if (zipFile.exists()) {\n if (zipFile.delete()) {\n log.info(\"Zipfile existed and was deleted: \" + zipFilePath);\n } else {\n log.warn(\"Zipfile exists but was not deleted: \" + zipFilePath);\n }\n }\n\n // Create and add files to zip file\n addFilesToZip(zipFile, filesToAdd);\n\n return zipFilePath;\n }", "private static void zipFolder(ZipOutputStream out, File folder) throws IOException {\n\n final int BUFFER = 2048;\n\n File[] fileList = folder.listFiles();\n BufferedInputStream origin;\n\n for (File file : fileList) {\n if (file.isDirectory()) {\n zipFolder(out, file);\n } else {\n byte data[] = new byte[BUFFER];\n\n String unmodifiedFilePath = file.getPath();\n FileInputStream fi = new FileInputStream(unmodifiedFilePath);\n\n origin = new BufferedInputStream(fi, BUFFER);\n ZipEntry entry = new ZipEntry(file.getName());\n\n out.putNextEntry(entry);\n\n int count;\n while ((count = origin.read(data, 0, BUFFER)) != -1) {\n out.write(data, 0, count);\n }\n\n out.closeEntry();\n origin.close();\n }\n }\n\n // Finish the zip stream and close it\n out.finish();\n out.close();\n }", "void onUnzipCompleted(String output);", "public static void writeZipOneFile(File directoryToZip, String fileName) {\r\n\t\ttry {\r\n\t\t\t//FileOutputStream fos = new FileOutputStream(directoryToZip.getName() + \".zip\");\r\n\t\t\tFileOutputStream fos = new FileOutputStream(directoryToZip +\"\\\\\"+ fileName.replace(\".xls\", \"\")+\".zip\");\r\n\t\t\tZipOutputStream zos = new ZipOutputStream(fos);\r\n\r\n\t\t\tFile file = new File(directoryToZip + \"\\\\\"+ fileName);\r\n\t\t\taddToZip(directoryToZip, file, zos);\r\n\r\n\t\t\tzos.close();\r\n\t\t\tfos.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tlogger.error(e.getMessage());\t\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(e.getMessage());\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void createArchiveFile( final Configuration conf, final Path zipFile, final List<Path> files, int pathTrimCount, boolean isJar, Manifest jarManifest) throws IOException\r\n\t{\r\n\t\t\r\n\t\tFSDataOutputStream out = null;\r\n\t\tZipOutputStream zipOut = null;\r\n\t\t/** Did we actually write an entry to the zip file */\r\n\t\tboolean wroteOne = false;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tout = zipFile.getFileSystem(conf).create(zipFile);\r\n\t\t\tif (files.isEmpty()) {\r\n\t\t\t\treturn;\t/** Don't try to create a zip file with no entries it will throw. just return empty file. */\r\n\t\t\t}\r\n\t\t\tif (isJar) {\r\n\t\t\t\tif (jarManifest!=null) {\r\n\t\t\t\t\tzipOut = new JarOutputStream(out,jarManifest);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tzipOut = new JarOutputStream(out);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tzipOut = new ZipOutputStream(out);\r\n\t\t\t}\r\n\t\t\tfor ( Path file : files) {\r\n\t\t\t\tFSDataInputStream in = null;\r\n\t\t\t\t/** Try to complete the file even if a file fails. */\r\n\t\t\t\ttry {\r\n\t\t\t\t\tFileSystem fileSystem = file.getFileSystem(conf);\r\n\t\t\t\t\tin = fileSystem.open(file);\r\n\t\t\t\t\tZipEntry zipEntry = new ZipEntry(pathTrim(file, pathTrimCount));\r\n\t\t\t\t\tzipOut.putNextEntry(zipEntry);\r\n\t\t\t\t\tIOUtils.copyBytes(in, zipOut, (int) Math.min(32768, fileSystem.getFileStatus(file).getLen()), false);\r\n\t\t\t\t\twroteOne = true;\r\n\t\t\t\t} catch( IOException e) {\r\n\t\t\t\t\tLOG.error( \"Unable to store \" + file + \" in zip file \" + zipFile + \", skipping\", e);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tif (in!=null) {\r\n\t\t\t\t\t\ttry { in.close(); } catch( IOException ignore ) {}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} finally { /** Ensure everything is always closed before the function exits */\r\n\t\t\t\r\n\t\t\tif (zipOut!=null&&wroteOne) {\r\n\t\t\t\tzipOut.closeEntry();\r\n\t\t\t\tzipOut.flush();\r\n\t\t\t\tzipOut.close();\r\n\t\t\t\tout = null;\r\n\t\t\t}\r\n\t\t\tif (out!=null) {\r\n\t\t\t\tout.close();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static boolean loadFromZip(android.content.Context r8, java.io.File r9, java.io.File r10, java.lang.String r11) {\n /*\n r3 = 0;\n r0 = 1;\n r1 = 0;\n r4 = r9.listFiles();\t Catch:{ Exception -> 0x0013 }\n r5 = r4.length;\t Catch:{ Exception -> 0x0013 }\n r2 = r1;\n L_0x0009:\n if (r2 >= r5) goto L_0x0017;\n L_0x000b:\n r6 = r4[r2];\t Catch:{ Exception -> 0x0013 }\n r6.delete();\t Catch:{ Exception -> 0x0013 }\n r2 = r2 + 1;\n goto L_0x0009;\n L_0x0013:\n r2 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r2);\n L_0x0017:\n r4 = new java.util.zip.ZipFile;\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r2 = r8.getApplicationInfo();\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r2 = r2.sourceDir;\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r4.<init>(r2);\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2.<init>();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"lib/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.append(r11);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"libtmessages.27.so\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r4.getEntry(r2);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n if (r2 != 0) goto L_0x0084;\n L_0x004a:\n r0 = new java.lang.Exception;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2.<init>();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"Unable to find file in apk:lib/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.append(r11);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"tmessages.27\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r0.<init>(r2);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n throw r0;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n L_0x0072:\n r0 = move-exception;\n r2 = r3;\n r3 = r4;\n L_0x0075:\n org.telegram.messenger.FileLog.m13728e(r0);\t Catch:{ all -> 0x0102 }\n if (r2 == 0) goto L_0x007d;\n L_0x007a:\n r2.close();\t Catch:{ Exception -> 0x00eb }\n L_0x007d:\n if (r3 == 0) goto L_0x0082;\n L_0x007f:\n r3.close();\t Catch:{ Exception -> 0x00f0 }\n L_0x0082:\n r0 = r1;\n L_0x0083:\n return r0;\n L_0x0084:\n r3 = r4.getInputStream(r2);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = new java.io.FileOutputStream;\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2.<init>(r10);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r5 = 4096; // 0x1000 float:5.74E-42 double:2.0237E-320;\n r5 = new byte[r5];\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n L_0x0091:\n r6 = r3.read(r5);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n if (r6 <= 0) goto L_0x00a3;\n L_0x0097:\n java.lang.Thread.yield();\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r7 = 0;\n r2.write(r5, r7, r6);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n goto L_0x0091;\n L_0x009f:\n r0 = move-exception;\n r2 = r3;\n r3 = r4;\n goto L_0x0075;\n L_0x00a3:\n r2.close();\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = 1;\n r5 = 0;\n r10.setReadable(r2, r5);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = 1;\n r5 = 0;\n r10.setExecutable(r2, r5);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = 1;\n r10.setWritable(r2);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = r10.getAbsolutePath();\t Catch:{ Error -> 0x00d5 }\n java.lang.System.load(r2);\t Catch:{ Error -> 0x00d5 }\n r2 = net.hockeyapp.android.C2367a.f7955a;\t Catch:{ Error -> 0x00d5 }\n r5 = org.telegram.messenger.BuildVars.DEBUG_VERSION;\t Catch:{ Error -> 0x00d5 }\n init(r2, r5);\t Catch:{ Error -> 0x00d5 }\n r2 = 1;\n nativeLoaded = r2;\t Catch:{ Error -> 0x00d5 }\n L_0x00c5:\n if (r3 == 0) goto L_0x00ca;\n L_0x00c7:\n r3.close();\t Catch:{ Exception -> 0x00e6 }\n L_0x00ca:\n if (r4 == 0) goto L_0x0083;\n L_0x00cc:\n r4.close();\t Catch:{ Exception -> 0x00d0 }\n goto L_0x0083;\n L_0x00d0:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x0083;\n L_0x00d5:\n r2 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r2);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n goto L_0x00c5;\n L_0x00da:\n r0 = move-exception;\n L_0x00db:\n if (r3 == 0) goto L_0x00e0;\n L_0x00dd:\n r3.close();\t Catch:{ Exception -> 0x00f5 }\n L_0x00e0:\n if (r4 == 0) goto L_0x00e5;\n L_0x00e2:\n r4.close();\t Catch:{ Exception -> 0x00fa }\n L_0x00e5:\n throw r0;\n L_0x00e6:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x00ca;\n L_0x00eb:\n r0 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r0);\n goto L_0x007d;\n L_0x00f0:\n r0 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r0);\n goto L_0x0082;\n L_0x00f5:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x00e0;\n L_0x00fa:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x00e5;\n L_0x00ff:\n r0 = move-exception;\n r4 = r3;\n goto L_0x00db;\n L_0x0102:\n r0 = move-exception;\n r4 = r3;\n r3 = r2;\n goto L_0x00db;\n L_0x0106:\n r0 = move-exception;\n r2 = r3;\n goto L_0x0075;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.messenger.NativeLoader.loadFromZip(android.content.Context, java.io.File, java.io.File, java.lang.String):boolean\");\n }", "protected static void zipDir(File zipDir, ZipOutputStream zos, String archiveSourceDir)\n throws IOException {\n String[] dirList = zipDir.list();\n byte[] readBuffer = new byte[40960];\n int bytesIn;\n //loop through dirList, and zip the files\n if (dirList != null) {\n for (String aDirList : dirList) {\n File f = new File(zipDir, aDirList);\n //place the zip entry in the ZipOutputStream object\n zos.putNextEntry(new ZipEntry(getZipEntryPath(f, archiveSourceDir)));\n if (f.isDirectory()) {\n //if the File object is a directory, call this\n //function again to add its content recursively\n zipDir(f, zos, archiveSourceDir);\n //loop again\n continue;\n }\n //if we reached here, the File object f was not a directory\n //create a FileInputStream on top of f\n try (FileInputStream fis = new FileInputStream(f)) {\n //now write the content of the file to the ZipOutputStream\n while ((bytesIn = fis.read(readBuffer)) != -1) {\n zos.write(readBuffer, 0, bytesIn);\n }\n }\n }\n }\n }", "public interface IZipStrategy {\n\n void zip();\n}", "public static boolean unzip(String unZipFile, String saveFilePath) {\n boolean succeed = true;\n ZipInputStream zin = null;\n ZipEntry entry;\n try {\n // zip file path\n File olddirec = new File(unZipFile);\n zin = new ZipInputStream(new FileInputStream(unZipFile));\n // iterate ZipEntry in zip\n while ((entry = zin.getNextEntry()) != null) {\n // if folder,create it\n if (entry.isDirectory()) {\n File directory = new File(olddirec.getParent(),\n entry.getName());\n if (!directory.exists()) {\n if (!directory.mkdirs()) {\n System.out.println(\"Create foler in \"\n + directory.getAbsoluteFile() + \" failed\");\n }\n }\n zin.closeEntry();\n }\n // if file,unzip it\n if (!entry.isDirectory()) {\n File myFile = new File(saveFilePath);\n FileOutputStream fout = null;\n DataOutputStream dout = null;\n try {\n fout = new FileOutputStream(myFile);\n dout = new DataOutputStream(fout);\n byte[] b = new byte[1024];\n int len = 0;\n while ((len = zin.read(b)) != -1) {\n dout.write(b, 0, len);\n }\n } finally {\n if (dout != null) {\n try {\n dout.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n if (fout != null) {\n try {\n fout.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n zin.closeEntry();\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n succeed = false;\n System.out.println(e);\n } finally {\n if (null != zin) {\n try {\n zin.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n if (succeed)\n System.out.println(\"File unzipped successfully!\");\n else\n System.out.println(\"File unzipped with failure!\");\n return succeed;\n }", "public void extractPackage(String zipPath, String destPath) throws IOException {\n File destDir = new File(destPath);\n if(!destDir.exists()) {\n destDir.mkdir();\n }\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream((zipPath)));\n ZipEntry entry = zipIn.getNextEntry();\n while(entry != null) {\n String filePath = destPath+File.separator+entry.getName();\n //filePath = filePath.replaceAll(\" \",\"_\");\n if(!entry.isDirectory()) {\n Log.i(\"extract\",\"Package Name: \"+entry.getName());\n Log.i(\"extract\",filePath);\n String[] temp = entry.getName().split(\"\\\\.\");\n if(validExtension(temp[temp.length-1].toLowerCase())) {\n extractFile(zipIn,filePath);\n }\n //extractFile(zipIn,filePath);\n } else {\n File dir = new File(filePath);\n dir.mkdirs();\n }\n zipIn.closeEntry();;\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }", "@Test\r\n public void testUnzipArchive() throws Exception {\r\n\r\n\r\n (new ZipUtils(\"Cp866\")).unzipArchive(\r\n \"src/test/resources/archive/testfile.zip\",\r\n \"target/test-classes/import/archive\"\r\n );\r\n\r\n File [] files = (new File(\"target/test-classes/import/archive\")).listFiles();\r\n\r\n boolean found = false;\r\n \r\n for (File file : files) {\r\n if (file.getAbsolutePath().contains(\"Привет, я файло.txt\")) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n assertTrue(found);\r\n\r\n\r\n }", "public CombineArchive (File zipFile)\n\t\tthrows IOException,\n\t\t\tJDOMException,\n\t\t\tParseException,\n\t\t\tCombineArchiveException\n\t{\n\t\tinit (zipFile, false);\n\t}", "public static void Descomprimir(String ficheroZip, String directorioSalida) throws Exception {\n\t\t\n\t\tfinal int TAM_BUFFER = 4096;\n\t\tbyte[] buffer = new byte[TAM_BUFFER];\n\n\t\tZipInputStream flujo = null;\n\t\ttry {\n\t\t flujo = new ZipInputStream(new BufferedInputStream(new FileInputStream(ficheroZip)));\n\t\t \n\t\t ZipEntry entrada;\n\t\t while ((entrada = flujo.getNextEntry()) != null) {\n\t\t\tString nombreSalida = directorioSalida + File.separator + entrada.getName();\n\t\t\tif (entrada.isDirectory()) {\n\t\t\t File directorio = new File(nombreSalida);\n\t\t\t directorio.mkdir();\n\t\t\t} else {\n\t\t\t BufferedOutputStream salida = null;\n\t\t\t try {\n\t\t\t\tint leido;\n\t\t\t\tsalida = new BufferedOutputStream(new FileOutputStream(nombreSalida), TAM_BUFFER);\n\t\t\t\twhile ((leido = flujo.read(buffer, 0, TAM_BUFFER)) != -1) {\n\t\t\t\t salida.write(buffer, 0, leido);\n\t\t\t\t}\n\t\t\t } finally {\n\t\t\t\tif (salida != null) {\n\t\t\t\t salida.close();\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t} finally {\n\t\t if (flujo != null) {\n\t\t\tflujo.close();\n\t\t }\n\n\t\t}\n\t}", "private void addToZipStream(Path file, ZipOutputStream zipStream, String dirName)\r\n throws Exception {\r\n String inputFileName = file.toFile().getPath();\r\n try (FileInputStream inputStream = new FileInputStream(inputFileName)) {\r\n\r\n // create a new ZipEntry, which is basically another file\r\n // within the archive. We omit the path from the filename\r\n Path directory = Paths.get(dirName);\r\n ZipEntry entry = new ZipEntry(directory.relativize(file).toString());\r\n\r\n zipStream.putNextEntry(entry);\r\n\r\n // Now we copy the existing file into the zip archive. To do\r\n // this we write into the zip stream, the call to putNextEntry\r\n // above prepared the stream, we now write the bytes for this\r\n // entry. For another source such as an in memory array, you'd\r\n // just change where you read the information from.\r\n byte[] readBuffer = new byte[2048];\r\n int amountRead;\r\n int written = 0;\r\n\r\n while ((amountRead = inputStream.read(readBuffer)) > 0) {\r\n zipStream.write(readBuffer, 0, amountRead);\r\n written += amountRead;\r\n }\r\n } catch (IOException e) {\r\n throw new Exception(\"Unable to process \" + inputFileName, e);\r\n }\r\n }", "public FilesArchived(File rootDir, String zip) {\n this.root = rootDir;\n this.compression = (\"zstd\".equals(zip)) ? Compression.ZSTD : Compression.GZIP;\n rescan();\n Thread thread = new Thread(this::run);\n thread.setDaemon(true);\n thread.setName(\"FilesArchived-maintainer\");\n thread.start();\n }", "@Override\n\tpublic String getZip() {\n\t\treturn this.zip;\n\t}", "public Result unzip() {\n MultipartFormData<File> body = request().body().asMultipartFormData();\n MultipartFormData.FilePart<File> fileInput = body.getFile(\"inputFile\");\n String filename = fileInput.getFilename();\n if (fileInput != null) {\n File file = (File) fileInput.getFile();\n File nf = new File(ZIP_URL + filename);\n boolean rst = file.renameTo(nf);\n String destDir = ZipUtils.unZip(ZIP_URL + filename, ZIP_URL);\n File dir = new File(ZIP_URL);\n String[] dirList = dir.list();\n return ok(afterUpload.render(Arrays.asList(dirList)));\n } else {\n return badRequest(\"error\");\n }\n }", "protected File createZipArchive(File directoryToZip, String modpackName, String workspace) throws Exception {\n zipName = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\")) + \"--\" + modpackName + \".zip\";\n uploadStatus = \"Creating Zipfile from Directory\";\n File zipFile = new File(workspace + \"\\\\\" + zipName);\n try {\n ProgressBarLogic progressBarLogic = new ProgressBarLogic(directoryToZip);\n ZipUtil.pack(directoryToZip, zipFile, name -> {\n uploadStatus = \"Adding file: \" + name + \" to the zip\";\n progressBarLogic.progressPercentage = 0;\n progressBarLogic.progress.add(name);\n progressBarLogic.calculateProgress(progressBarLogic.progress);\n notifyObserver();\n return name;\n });\n } catch (ZipException e) {\n throw e;\n } catch (Exception e) {\n System.out.println(e);\n }\n return zipFile;\n }", "private String writeZipFile(File directoryToZip, List<File> fileList, String zipName) throws IOException{\r\n // If the zip name is null then provide the name of the directory\r\n if(zipName == null){\r\n zipName = directoryToZip.getName();\r\n }\r\n // Store the file name\r\n String fileName = zipName;\r\n // Create the zip file\r\n FileOutputStream fos = new FileOutputStream(fileName);\r\n ZipOutputStream zos = new ZipOutputStream(fos);\r\n for (File file : fileList) {\r\n if (!file.isDirectory()) { // we only zip files, not directories\r\n // Add files that are not in the skip list\r\n if(!isFileToSkip(file.getName())) {\r\n addToZip(directoryToZip, file, zos);\r\n }\r\n }\r\n }\r\n zos.close();\r\n fos.close();\r\n // Return the full name of the file\r\n return fileName;\r\n }", "private static void extract (Path zipPath, Path destination)\n\t\tthrows IOException\n\t{\n\t\tif (Files.isDirectory (zipPath))\n\t\t{\n\t\t\ttry (DirectoryStream<Path> directoryStream = Files\n\t\t\t\t.newDirectoryStream (zipPath);)\n\t\t\t{\n\t\t\t\tfor (Path file : directoryStream)\n\t\t\t\t{\n\t\t\t\t\textract (file, destination);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPath fileOutZip = destination\n\t\t\t\t.resolve (\"./\" + zipPath.normalize ().toString ()).normalize ();\n\t\t\tFiles.createDirectories (fileOutZip.getParent ());\n\t\t\tFiles.copy (zipPath, fileOutZip, Utils.COPY_OPTION);\n\t\t}\n\t}", "public void setZip(int zip) {\r\n\t\tthis.zip = zip;\r\n\t}", "public static void packToZip(String sourceDirPath, String zipFilePath) throws IOException {\n Path p;\n p = Files.createFile(Paths.get(zipFilePath));\n try (ZipOutputStream zs = new ZipOutputStream(Files.newOutputStream(p))) {\n Path pp = Paths.get(sourceDirPath);\n Files.walk(pp)\n .filter(path -> !Files.isDirectory(path))\n .forEach(path -> {\n if (!path.toString().endsWith(\".zip\")) {\n ZipEntry zipEntry = new ZipEntry(pp.relativize(path).toString());\n try {\n zs.putNextEntry(zipEntry);\n Files.copy(path, zs);\n zs.closeEntry();\n } catch (IOException e) {\n System.err.println(e);\n }\n }\n });\n }\n }", "public static final void unzip(String zipfileName, String baseOutputDir) {\r\n Enumeration entries;\r\n ZipFile zipFile;\r\n try {\r\n zipFile = new ZipFile(zipfileName);\r\n entries = zipFile.entries();\r\n while (entries.hasMoreElements()) {\r\n ZipEntry entry = (ZipEntry) entries.nextElement();\r\n String entryName = entry.getName();\r\n String theName = baseOutputDir + '/' + entryName;\r\n if (entry.isDirectory()) {\r\n // Assume directories are stored parents first then children.\r\n System.out.println(\"Extracting directory: \" + entry.getName());\r\n // This is not robust, just for demonstration purposes.\r\n (new File(theName)).mkdirs();\r\n continue;\r\n }\r\n //(new File(theName)).mkdirs();\r\n forceParentDirectories(theName);\r\n System.out.println(\"Extracting file: \" + theName);\r\n copyInputStream(zipFile.getInputStream(entry), new BufferedOutputStream(new FileOutputStream(theName)));\r\n }\r\n zipFile.close();\r\n } catch (Exception ioe) {\r\n System.err.println(\"Unhandled exception:\");\r\n ioe.printStackTrace();\r\n return;\r\n }\r\n }", "public static boolean generateZipFile(ArrayList<String> sourcesFilenames, String destinationDir, String zipFilename){\n byte[] buf = new byte[1024]; \r\n\r\n try \r\n {\r\n // VER SI HAY QUE CREAR EL ROOT PATH\r\n boolean result = (new File(destinationDir)).mkdirs();\r\n\r\n String zipFullFilename = destinationDir + \"/\" + zipFilename;\r\n\r\n System.out.println(result);\r\n\r\n // Create the ZIP file \r\n ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipFullFilename)); \r\n \r\n // Compress the files \r\n for (String filename: sourcesFilenames) { \r\n FileInputStream in = new FileInputStream(filename); \r\n // Add ZIP entry to output stream. \r\n File file = new File(filename); //\"Users/you/image.jpg\"\r\n out.putNextEntry(new ZipEntry(file.getName())); //\"image.jpg\" \r\n // Transfer bytes from the file to the ZIP file \r\n int len; \r\n while ((len = in.read(buf)) > 0) { \r\n out.write(buf, 0, len); \r\n } \r\n // Complete the entry \r\n out.closeEntry(); \r\n in.close(); \r\n } // Complete the ZIP file \r\n out.close();\r\n\r\n return true;\r\n } \r\n catch (Exception e) \r\n { \r\n System.out.println(e);\r\n return false;\r\n } \r\n }", "private static void processZip(File zip_name, final Histogram class_use, final Histogram method_use) {\n ZipFile zip_file;\n try {\n zip_file = new ZipFile(zip_name);\n } catch (Exception e) {\n throw new IllegalStateException(\"while reading archive '\"+zip_name+\"': \"+e);\n }\n final Enumeration< ? extends ZipEntry> en = zip_file.entries();\n while (en.hasMoreElements()) {\n final ZipEntry e = en.nextElement();\n final String e_name = e.getName();\n if (e.isDirectory()) continue;\n if (e_name.endsWith(\".class\")){\n try {\n final InputStream object_stream=zip_file.getInputStream(e);\n MethodCallEnumerator.analyzeClass(object_stream,class_use,method_use);\n object_stream.close();\n } catch (Exception ex) {\n throw new IllegalStateException(\"while processing: \"+ ex);\n }\n } \n }\n try {\n zip_file.close();\n } catch (Exception e) {\n throw new IllegalStateException(\"while reading archive: \" + e);\n }\n }", "public void run() {\n try {\n handleZipFiles(file);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private void loadZipFile(String zipFileName, String classIndex)\n {\n InputStream trainSource = null, testSource = null;\n //The instance file is a zipped file containing a file called 'train' and one called 'test'\n try {\n ZipFile zipFile = new ZipFile(zipFileName);\n Enumeration entries = zipFile.entries();\n while(entries.hasMoreElements()) {\n ZipEntry entry = (ZipEntry)entries.nextElement();\n\n String name = entry.getName();\n if (name.equals(\"train.arff\"))\n {\n trainSource = zipFile.getInputStream(entry);\n }\n else if(name.equals(\"test.arff\"))\n {\n testSource = zipFile.getInputStream(entry);\n }\n else\n {\n //What is this?\n throw new RuntimeException(\"Unknown file in zip dataset '\" + name + \"'\");\n }\n }\n } catch (java.io.IOException e) {\n throw new RuntimeException(\"IO Operation failed\", e);\n }\n\n //Get the training data\n try {\n mTraining = Util.loadDataSource(trainSource);\n if (mTraining.classIndex() == -1){\n if(classIndex.equals(\"last\"))\n mTraining.setClassIndex(mTraining.numAttributes() - 1);\n else\n mTraining.setClassIndex(Integer.parseInt(classIndex));\n }\n } catch(Exception e) {\n throw new RuntimeException(\"Failed to load training data provided in zip\", e);\n }\n\n //Get the testing data\n try {\n mTesting = Util.loadDataSource(testSource);\n if (mTesting.classIndex() == -1){\n if(classIndex.equals(\"last\"))\n mTesting.setClassIndex(mTesting.numAttributes() - 1);\n else\n mTesting.setClassIndex(Integer.parseInt(classIndex));\n }\n } catch(Exception e) {\n throw new RuntimeException(\"Failed to load testing data provided in zip\", e);\n }\n\n }", "public void setZip(String zip);", "private static void unzip(EmailTypes collection) {\n File dir = new File(destDir);\n // create output directory if it doesn't exist\n if(!dir.exists()) {\n dir.mkdirs();\n }\n FileInputStream fis;\n //buffer for read and write data to file\n byte[] buffer = new byte[1024];\n try {\n fis = new FileInputStream(sourceFiles.get(collection).getPath());\n ZipInputStream is = new ZipInputStream(fis);\n ZipEntry zipEntry = is.getNextEntry();\n System.out.println(\"Unzipping set: \" + collection.getCollection() + \".\");\n while(zipEntry != null){\n String fileName = zipEntry.getName();\n File newFile = new File(unpackedFiles.get(collection) + File.separator + fileName);\n new File(newFile.getParent()).mkdirs();\n FileOutputStream fos = new FileOutputStream(newFile);\n int len;\n while ((len = is.read(buffer)) > 0) {\n fos.write(buffer, 0, len);\n }\n fos.close();\n is.closeEntry();\n zipEntry = is.getNextEntry();\n }\n is.closeEntry();\n is.close();\n fis.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public ZipLineStream() {\n\t\tarchType = ArchiveTypes.ZIP.name();\n\t}", "public ZipFile mo305b() throws IOException {\n return new ZipFile(this.f340a);\n }", "public static void m97139a(File file, ZipOutputStream zipOutputStream, String str) throws IOException {\n if (file.exists()) {\n if (file.isDirectory()) {\n String name = file.getName();\n if (!name.endsWith(File.separator)) {\n name = name + File.separator;\n }\n if (!TextUtils.isEmpty(str)) {\n name = str + name;\n }\n File[] listFiles = file.listFiles();\n if (listFiles == null || listFiles.length <= 0) {\n zipOutputStream.putNextEntry(new ZipEntry(name));\n zipOutputStream.closeEntry();\n return;\n }\n for (File file2 : listFiles) {\n m97139a(file2, zipOutputStream, name);\n }\n return;\n }\n zipOutputStream.putNextEntry(new ZipEntry(TextUtils.isEmpty(str) ? file.getName() : str + file.getName()));\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[4096];\n while (true) {\n int read = fileInputStream.read(bArr);\n if (read != -1) {\n zipOutputStream.write(bArr, 0, read);\n } else {\n zipOutputStream.flush();\n fileInputStream.close();\n zipOutputStream.closeEntry();\n return;\n }\n }\n } else {\n return;\n }\n throw th;\n }", "public static boolean SafeUnzipFile(ZipFile zf, String filepathinzip, File fileinfiledir, long crc) {\r\n BufferedOutputStream Output_fos = null;\r\n BufferedInputStream bufbr = null;\r\n try {\r\n ZipEntry ze = zf.getEntry(filepathinzip);\r\n if (ze == null) {\r\n if (Output_fos != null) {\r\n try {\r\n Output_fos.close();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e2) {\r\n e2.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e3) {\r\n e3.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e4) {\r\n e4.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n if (crc != 0) {\r\n if (ze.getCrc() == crc) {\r\n if (Output_fos != null) {\r\n try {\r\n Output_fos.close();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e5) {\r\n e5.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e6) {\r\n e6.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e7) {\r\n e7.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e8) {\r\n e8.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n byte[] buf = UnzipFile(zf, ze);\r\n if (1 != 0) {\r\n BufferedOutputStream Output_fos2 = new BufferedOutputStream(new FileOutputStream(fileinfiledir));\r\n try {\r\n Output_fos2.write(buf, 0, buf.length);\r\n Output_fos = Output_fos2;\r\n } catch (Exception e9) {\r\n e = e9;\r\n Output_fos = Output_fos2;\r\n try {\r\n e.printStackTrace();\r\n if (Output_fos != null) {\r\n try {\r\n Output_fos.close();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e10) {\r\n e10.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e11) {\r\n e11.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e12) {\r\n e12.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e13) {\r\n e13.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n } catch (Throwable th) {\r\n th = th;\r\n if (Output_fos != null) {\r\n }\r\n throw th;\r\n }\r\n } catch (Throwable th2) {\r\n th = th2;\r\n Output_fos = Output_fos2;\r\n if (Output_fos != null) {\r\n try {\r\n Output_fos.close();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e14) {\r\n e14.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e15) {\r\n e15.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e16) {\r\n e16.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e17) {\r\n e17.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n throw th;\r\n }\r\n }\r\n if (Output_fos != null) {\r\n try {\r\n Output_fos.close();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e18) {\r\n e18.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e19) {\r\n e19.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e20) {\r\n e20.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e21) {\r\n e21.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n } catch (Exception e22) {\r\n e = e22;\r\n }\r\n }", "public String getZip() {\r\n return zip;\r\n }", "public String getZip() {\r\n return zip;\r\n }", "private File exportAndZip(String siteId, String webappDir) throws Exception {\r\n\tlog.info(\"user [\" + sessionManager.getCurrentSession().getUserEid()\r\n\t\t+ \"] exports site: [\" + siteId + \"]\");\r\n\r\n\t// opening a new temporary zipfile\r\n\tFile zipFile = File.createTempFile(\"osyl-package-export\", \".zip\");\r\n\tZipOutputStream zos =\r\n\t\tnew ZipOutputStream(new FileOutputStream(zipFile));\r\n\r\n\t// retrieving the xml file\r\n\tCOSerialized coSerialized =\r\n\t\tosylSiteService.getCourseOutlineForExport(siteId, webappDir);\r\n\r\n\tbyte[] xmlBytes = coSerialized.getContent().getBytes(\"UTF-8\");\r\n\twriteToZip(zos, OsylManagerService.CO_XML_FILENAME, xmlBytes);\r\n\r\n\t// retrieving other resources\r\n\tString resourceDir = contentHostingService.getSiteCollection(siteId);\r\n\r\n\ttry {\r\n\t ContentCollection workContent =\r\n\t\t contentHostingService.getCollection(resourceDir);\r\n\t // recursively retrieve all files\r\n\t retrieveFiles(zos, workContent, resourceDir);\r\n\t} catch (Exception e) {\r\n\t log.error(e);\r\n\t e.printStackTrace();\r\n\t throw new Exception(\"Cannot retrieve files in site for zipping\", e);\r\n\t}\r\n\tzos.close();\r\n\treturn zipFile;\r\n }", "protected void createFile (ZipFile file, ZipEntry entry, File target)\n {\n if (_buffer == null) {\n _buffer = new byte[COPY_BUFFER_SIZE];\n }\n\n // make sure the file's parent directory exists\n File pdir = target.getParentFile();\n if (!pdir.exists() && !pdir.mkdirs()) {\n log.warning(\"Failed to create parent for '\" + target + \"'.\");\n }\n\n try (InputStream in = file.getInputStream(entry);\n FileOutputStream fout = new FileOutputStream(target)) {\n\n int total = 0, read;\n while ((read = in.read(_buffer)) != -1) {\n total += read;\n fout.write(_buffer, 0, read);\n updateProgress(total);\n }\n\n } catch (IOException ioe) {\n log.warning(\"Error creating '\" + target + \"': \" + ioe);\n }\n }", "protected InputStream loadFile(String zipPath) throws Exception {\n\t\treturn Files.newInputStream(Paths.get(zipPath));\n\t}", "private String compactaOrdem(File ordem, String[] arquivosCaixa) throws IOException\n\t{\n\t\t/* Define referencias aos streams de arquivos a serem utilizados */\n\t\t/* Buffer a ser utilizado para leitura dos arquivos de caixa */\n\t\tBufferedInputStream buffOrigem \t= null;\n\t\t/* Esta referencia e do arquivo final (zip) do processo */\n\t\tFileOutputStream \tarqDestino \t= new FileOutputStream(getNomeArquivoCompactado(ordem));\n\t\tZipOutputStream \tarqSaida \t= new ZipOutputStream (new BufferedOutputStream(arqDestino));\n\n\t\t/* Define o buffer de dados com o tamanho sendo definido no\n\t\t * arquivo de configuracao\n\t\t */\n\t\tint sizeBuffer = Integer.parseInt(getPropriedade(\"ordemVoucher.tamanhoBufferArquivos\"));\n\t\tbyte data[] = new byte[sizeBuffer];\n\n\t\tString extArqCriptografado = getPropriedade(\"ordemVoucher.extensaoArquivoCriptografado\");\n\t\t\n\t\t/* Faz a varredura dos arquivos de caixa que serao utilizados\n\t\t * para a compactacao. Lembrando que o nome e o mesmo do arquivo da\n\t\t * ordem com a extensao pgp devido ao utilitario de criptografia\n\t\t */\n\t\tSystem.out.println(\"Iniciando compactacao para o arquivo:\"+getNomeArquivoCompactado(ordem));\n\t\tfor (int i=0; i<arquivosCaixa.length; i++) \n\t\t{\n\t\t\tString nomArqOrigem\t\t\t= arquivosCaixa[i] + extArqCriptografado;\n\t\t\tSystem.out.println(\"Incluindo arquivo de ordem \"+nomArqOrigem+\" no arquivo compactado...\");\n\n\t\t\tFile arquivoOrigem\t\t\t= new File(nomArqOrigem);\n\t\t\tFileInputStream fileInput \t= new FileInputStream(arquivoOrigem);\n\t\t \tbuffOrigem \t\t\t\t\t= new BufferedInputStream(fileInput, sizeBuffer);\n\t\t \tZipEntry entry \t\t\t\t= new ZipEntry(arquivoOrigem.getName());\n\t\t \tarqSaida.putNextEntry(entry);\n\t\t \tint count;\n\t\t\twhile((count = buffOrigem.read(data, 0, sizeBuffer)) != -1) \n\t\t\t arqSaida.write(data, 0, count);\n\t\t\t \n\t\t buffOrigem.close();\n\t\t}\n\t\tarqSaida.close();\n\t\tSystem.out.println(\"Termino da compactacao do arquivo.\");\t\n\t\treturn getNomeArquivoCompactado(ordem); \n\t}", "public void extractFile(ZipModel zipModel, String outputPath, ProgressMonitor progressMonitor,\r\n boolean runInThread, char[] password) throws ZipException {\r\n extractFile(zipModel, outputPath, null, progressMonitor, runInThread, password);\r\n }", "private static void writeToFileInZip2 (FileSystem zipFs, String[] data) throws IOException {\r\n\t\tFiles.write(zipFs.getPath(\"/newFile2.txt\"), Arrays.asList(data), Charset.defaultCharset(), StandardOpenOption.CREATE);\r\n\t}", "public void link() throws Exception {\n ZipOutputStream output = new ZipOutputStream( new FileOutputStream( outfile ) );\n if ( compression ) {\n output .setMethod( ZipOutputStream .DEFLATED );\n output .setLevel( Deflater .DEFAULT_COMPRESSION );\n } else {\n output .setMethod( ZipOutputStream .STORED );\n }\n Enumeration merges = mergefiles .elements();\n while ( merges .hasMoreElements() ) {\n String path = (String) merges .nextElement();\n File f = new File( path );\n if ( f.getName().endsWith( \".jar\" ) || f.getName().endsWith( \".zip\" ) ) {\n //Do the merge\n mergeZipJarContents( output, f );\n }\n else {\n //Add this file to the addfiles Vector and add it \n //later at the top level of the output file.\n addAddFile( path );\n }\n }\n Enumeration adds = addfiles .elements();\n while ( adds .hasMoreElements() ) {\n String name = (String) adds .nextElement();\n File f = new File( name );\n if ( f .isDirectory() ) {\n //System.out.println(\"in jlink: adding directory contents of \" + f.getPath());\n addDirContents( output, f, f.getName() + '/', compression );\n }\n else {\n addFile( output, f, \"\", compression );\n }\n }\n if ( output != null ) {\n try {\n output .close();\n } catch( IOException ioe ) {}\n }\n }", "private boolean extractSettingsZip(File fSettingsZip, String destDir, int index)\n {\n boolean result = false;\n try\n {\n //m_logWriter.write(\"Unzipping to destination: \"+destDir+\"\\n\");\n //m_logWriter.flush();\n \tboolean backFavFile = false;\n \tFile dest = new File(destDir);\n \tif (dest.exists()) {\n \t\tString userPath = destDir + \"/userdata/\";\n \t\tFile userFile = new File(userPath);\n \t\tString favDir = userPath + Update.FavouriteFile;\n \t\tFile favFile = new File(favDir);\n \t\tif (userFile.exists() && favFile.exists()) {\n \t\t\tCopyFile(userPath, Update.FavouriteFile, Update.pathSD);\n \t\t\tbackFavFile = true;\n \t\t}\n \t\t\n \t\tDeleteDir(destDir);\n \t}\n \telse\n \t\tdest.mkdirs();\n \t\n publishProgress(PROGRESS_EXTRACT, (int)(0.5 * index));\n // open the zip\n ZipFile zip = new ZipFile(fSettingsZip);\n int count=0;\n int zipSize = zip.size();\n Enumeration<? extends ZipEntry> entries = zip.entries();\n //while(entries.hasMoreElements())\n while (true)\n {\n if (isCancelled()) {\n \tresult = false;\n \tm_ErrorCode = 4;\n break;\n }\n\n if (m_DownloadStop)\n \tcontinue;\n \n if (!entries.hasMoreElements())\n \tbreak;\n \n // todo: update progress\n ZipEntry ze = (ZipEntry)entries.nextElement();\n count++;\n String entryName = ze.getName();\n String destFullpath = destDir+\"/\"+entryName;\n //m_logWriter.write(\"Extracting: \"+destFullpath+\"\\n\");\n File fDestPath = new File(destFullpath);\n if (ze.isDirectory())\n {\n fDestPath.mkdirs();\n publishProgress(PROGRESS_EXTRACT, (int)(0.5 * (index + count*100/zipSize)));\n continue;\n }\n fDestPath.getParentFile().mkdirs();\n\n // write file\n try {\n InputStream is = zip.getInputStream(ze);\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(destFullpath));\n int n=0;\n byte buf[] = new byte[4096];\n while((n = is.read(buf, 0, 4096)) > -1)\n {\n bos.write(buf, 0, n);\n }\n // close\n is.close();\n bos.close();\n } catch(IOException ioe) {\n \tm_ErrorCode = 5;\n //m_logWriter.write(\"Could not write, error: \"+ioe.toString());\n }\n\n // update progress\n //publishProgress(PROGRESS_EXTRACT, (count*100/zipSize));\n }\n\n // close zip and bail\n zip.close();\n //m_logWriter.write(\"Successfully extracted: \"+fSettingsZip.getName()+\"\\n\");\n //m_logWriter.flush();\n if (backFavFile) {\n \t\tString userPath = destDir + \"/userdata/\";\n \t\tFile userFile = new File(userPath);\n \t\tif (!userFile.exists())\n \t\t\tuserFile.mkdirs();\n \t\t\n \t\tFile inputFile = new File(Update.pathSD + Update.FavouriteFile);\n \t\tif (inputFile.exists())\n \t\t\tCopyFile(Update.pathSD, Update.FavouriteFile, userPath);\n }\n \n result = !isCancelled();\n }\n catch(Exception e)\n {\n //Log.e(\"SettingsDownloader\", \"Error: \"+e.toString());\n result = false;\n m_ErrorCode = 6;\n }\n\n return result;\n }", "public static boolean zipFile(String fileName) throws IOException {\r\n File targetFile = new File(fileName);\r\n if (targetFile == null || !targetFile.exists()) {\r\n throw new IOException(\"target [\"+fileName+\"] doesn't exist!\");\r\n }\r\n if (!targetFile.canRead()) {\r\n throw new IOException(\"target [\"+fileName+\"] can't be read!\");\r\n }\r\n boolean result = false;\r\n byte[] buf = new byte[1024];\r\n // validate some stuff\r\n File zipFile = new File(fileName+\".zip\");\r\n if (zipFile.exists()) {\r\n zipFile.delete();\r\n }\r\n zipFile.createNewFile();\r\n ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipFile));\r\n FileInputStream in = new FileInputStream(targetFile.getAbsolutePath());\r\n out.putNextEntry(new ZipEntry(targetFile.getName()));\r\n int len;\r\n while ((len = in.read(buf)) > 0) {\r\n out.write(buf, 0, len);\r\n }\r\n out.closeEntry();\r\n in.close();\r\n out.close();\r\n // delete the source\r\n if (targetFile.delete()) {\r\n // rename to the original file\r\n result = zipFile.renameTo(targetFile);\r\n } else {\r\n zipFile.delete();\r\n }\r\n return result;\r\n }", "public OutputStream getOutputStream(String lumpName) {\n\t\t\t\t\tendEntry();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Get the next entry\r\n\t\t\t\t\tZipEntry dir = new ZipEntry(\"ohrrpgce/games/\" + newRPGName + \"/\" + lumpName);\r\n\t\t\t\t\t//System.out.println(\"Entry opened: \" + dir.getName());\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\ttempJar.putNextEntry(dir);\r\n\t\t\t\t\t} catch (IOException ex) {\r\n\t\t\t\t\t\tSystem.out.println(\"Error adding entry for \" + lumpName + \" : \" + ex.toString());\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn tempJar;\r\n\t\t\t\t}", "public static void main(String[] args) throws Exception {\n File file = new File(\"D:\\\\var\\\\log\\\\platform.zip\");\n FileUtil.writeFile(new FileInputStream(file), \"D:\\\\var\\\\log1\\\\platform1.zip\");\n }", "public String getZip() {\r\n\t\treturn zip;\r\n\t}" ]
[ "0.6841551", "0.6657641", "0.6642138", "0.6593988", "0.657133", "0.6504348", "0.649215", "0.64380395", "0.63649815", "0.6355542", "0.6355542", "0.6321776", "0.6280825", "0.623616", "0.6209521", "0.61951274", "0.6188791", "0.6176354", "0.6154027", "0.6112033", "0.60973734", "0.60883397", "0.60855395", "0.6075008", "0.60643864", "0.6056141", "0.60554487", "0.60248214", "0.59955263", "0.59834373", "0.594358", "0.59135664", "0.5913257", "0.5912917", "0.58922917", "0.5875858", "0.5865332", "0.5854052", "0.5847674", "0.5845835", "0.5841695", "0.5830673", "0.57868654", "0.5786224", "0.57853115", "0.5770425", "0.57563525", "0.57553226", "0.57401496", "0.57242805", "0.57003385", "0.5699736", "0.56949013", "0.5693417", "0.56900483", "0.56876403", "0.5686153", "0.56839275", "0.56831735", "0.5677215", "0.5677186", "0.5675947", "0.56646574", "0.5664082", "0.56549037", "0.5645206", "0.5640396", "0.5626782", "0.5614753", "0.5605916", "0.56023824", "0.5594506", "0.5584401", "0.5577132", "0.55718803", "0.55672765", "0.5566014", "0.5564239", "0.5563049", "0.55584633", "0.5542184", "0.55104584", "0.5504126", "0.5500673", "0.5498251", "0.54938656", "0.5491814", "0.54913604", "0.54913604", "0.5481614", "0.5477505", "0.54720867", "0.5464158", "0.54521894", "0.5450869", "0.54502213", "0.5448902", "0.5436321", "0.5436099", "0.54347944", "0.5434582" ]
0.0
-1
Consente di scegliere fra la risorsa libro o film per effettuare la ricerca in base alla descrizione della categoria scelta
@Override public void prossimo_stato(Model_context model, ArrayList<String> dati_input) { switch(dati_input.get(0)) { case "1":{ model.set_stato_attuale(new Stato_inserisci_descrizione_libro_ricerca(get_attore())); break; } case "2":{ model.set_stato_attuale(new Stato_inserisci_descrizione_film_ricerca(get_attore())); break; } default:{ model.set_stato_attuale(new Stato_errore(new Stato_ricerca_visualizza(get_attore()), this, "inserisci un valore corretto", get_attore())); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCategoriaDescripcion();", "public void setCategoriaDescripcion(String descripcion);", "public void decideNature()\n {\n String nature = new String(\"\");\n Random rand = new Random();\n int i = rand.nextInt(100);\n if(i <= 25)\n {\n nature = \"Very mischievous. Enjoys hiding objects in plain sight\";\n }//ends the if\n else if(i > 25 && i <= 50)\n {\n nature = \"Loves to spend time sleeping on the clouds\";\n }//ends the else if\n else if(i > 50 && i <= 75)\n {\n nature = \"Is very playful\";\n }//ends the else if\n else\n {\n nature = \"Loves to perform dances in the air\";\n }\n \n setNature(nature);\n }", "public void setFiction() {\n if (super.getGenre() == null || super.getGenre().length() == 0) {\n super.setGenre(\"Fiction\");\n } else if (!super.getGenre().contains(\"FICTION\")) {\n super.setGenre(super.getGenre() + \", Fiction\");\n }\n super.setGenre(super.getGenre().toUpperCase());\n }", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "@Override\r\n protected void generateDescription ()\r\n {\r\n String[] descriptions = {\r\n \"Advice about the law!\", \"A financial master!\", \"Technologically amazing!\",\r\n \"People's savior!\", \"To serve for the people!\", \"A beast of a rider!\",\r\n \"All-sport mighty!\"\r\n };\r\n\r\n for (int j = 0; j < CAREERS.length; j++)\r\n if (CAREERS[j].equalsIgnoreCase (name))\r\n description = descriptions[j];\r\n }", "@Override\n\tpublic java.lang.String getDescription() {\n\t\treturn _lineaGastoCategoria.getDescription();\n\t}", "public String generateConclusion(ConclusionController objects) {\n\t\tpronoun = objects.getGender().getPronoun();\n\t\t\n\t\tArrayList<DocumentElement> list = new ArrayList<DocumentElement>();\n\t\t\n\t\tlist.add(LikesPhrase(objects.getLikes()));\n\t\tlist.add(EventGoingPhrase(objects.getGoingEvents()));\n\t\tlist.add(EventInterested(objects.getInterestedEvents()));\n\t\t\n\t\tDocumentElement par = nlgFactory.createParagraph(list);\n\t\t\n\t\treturn realiser.realise(par).getRealisation();\n\t}", "public String getCategory() {\n return \"论文\";\r\n }", "private String siguienteCategoria(String nombreActual) {\n\t\tswitch (nombreActual) {\n\t\tcase \"NOVATO\":\n\t\t\treturn \"CALIFICADO\";\n\t\tcase \"CALIFICADO\":\n\t\t\treturn \"EXPERTO\";\n\t\tcase \"EXPERTO\":\n\t\t\treturn \"MASTER\";\n\t\tdefault:\n\t\t\treturn \"MASTER\";\n\t\t}\n\t}", "private String elaboraAvvisoScrittura() {\n String testo = VUOTA;\n\n if (usaHeadNonScrivere) {\n testo += TAG_NON_SCRIVERE;\n testo += A_CAPO;\n }// end of if cycle\n\n return testo;\n }", "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "@Override\n public String toString() {\n return super.toString() + \"{\"\n + \"film=\" + film\n + \",category=\" + category\n + \"}\";\n }", "public String categoryDesc() { //to show the description of the category\n String desc = \"\";\n if (category.equals(\"H\")) {\n desc = \"Trump category: Hardness\";\n } else if (category.equals(\"S\")) {\n desc = \"Trump category: Specific Gravity\";\n } else if (category.equals(\"C\")) {\n desc = \"Trump category: Cleavage\";\n } else if (category.equals(\"CA\")) {\n desc = \"Trump category: Crustal Abundance\";\n } else if (category.equals(\"EV\")) {\n desc = \"Trump category: Economic Value\";\n }\n return desc;\n }", "private boolean getNeedTitle()\r\n\t{\n\t\tif (new EditionSpeService().ficheProducteurNeedEngagement()==false)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Si on interdit d'afficher un des deux blocs : pas de titre\r\n\t\tif ((peMesContrats.canPrintContrat==ImpressionContrat.JAMAIS) || (peMesContrats.canPrintContratEngagement==ImpressionContrat.JAMAIS))\r\n\t\t{\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Sinon, il faut un titre\r\n\t\treturn true;\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 protected String elaboraFooterCategorie() {\n String text = CostBio.VUOTO;\n\n text += A_CAPO;\n text += LibWiki.setRigaCat(\"Liste di persone per cognome| \");\n text += LibWiki.setRigaCat(\"Progetto Antroponimi|Cognomi\");\n\n return text;\n }", "public RichText getDescr();", "String getTitre();", "@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 }", "@Override\n public void onClick(View view) {\n\n String[] facts = {\n \"Ants stretch when they wake up in the morning.\",\n \"Ostriches can run faster than horses.\",\n \"Olympic gold medals are actually made mostly of silver.\",\n \"You are born with 300 bones; by the time you are an adult you will have 200.\",\n \"It takes about 8 minutes for light from the Sun to reach Earth.\",\n \"Some bamboo plants can grow almost a meter in just one day.\",\n \"The state of Florida is bigger than England.\",\n \"Some penguins can leap 2-3 meters out of the water.\",\n \"On average, it takes 56 days to form a new habit.\",\n \"Mammoths still walked the earth when the Great Pyramid was being built.\",\n \"There are more life forms living in your skin than there are people on the planet.\",\n \"Otters sleep holding hands.\",\n \"Caterpillars completely liquify as they transform into moths.\",\n \"An indoor vegetable factory in Japan produces up to 10,000 heads of lettuce per day and uses 1% of the amount of water needed for outdoor fields.\",\n \"When hippos are upset, their sweat turns red.\",\n \"“Facebook Addiction Disorder” is a mental disorder identified by Psychologists.\",\n \"The average woman uses her height in lipstick every 5 years.\",\n \"Human saliva has a boiling point three times that of regular water.\",\n \"During your lifetime, you will produce enough saliva to fill two swimming pools.\",\n \"Bikinis and tampons were invented by men.\",\n \"Heart attacks are more likely to happen on a Monday.\",\n \"Camels have three eyelids to protect themselves from blowing sand.\",\n \"Dolphins sleep with one eye open.\",\n \"Months that begin on a Sunday will always have a ‘Friday the 13th’.\",\n \"Fictional/horror writer Stephen King sleeps with a nearby light on to calm his fear of the dark.\",\n \"Americans travel 1,144,721,000 miles by air every day.\",\n \"38% of American men say they love their cars more than women.\",\n \"The U.S. military operates 234 golf courses.\",\n \"A cat has 32 muscles in each ear.\",\n \"A duck’s quack doesn’t echo, and no one knows why.\",\n \"The average lifespan of an eyelash is five months.\",\n \"A spider has transparent blood.\",\n \"Babies are most likely to be born on Tuesdays.\",\n \"The Minneapolis phone book has 21 pages of Andersons.\",\n \"A horse can look forward with one eye and back with the other.\",\n \"The word Pennsylvania is misspelled on the Liberty Bell.\",\n \"You spend 7 years of your life in the bathroom.\",\n \"Simplistic passwords contribute to over 80% of all computer password break-ins.\",\n \"Dentists have recommended that a toothbrush be kept at least 6 feet away from a toilet to avoid airborne particles resulting from the flush.\",\n \"Most dust particles in your house are made from dead skin.\",\n \"Venus is the only planet that rotates clockwise.\",\n \"Oak trees do not produce acorns until they are fifty years of age or older.\",\n \"The king of hearts is the only king without a mustache.\",\n \"Thirty-five percent of people who use personal ads for dating are already married.\",\n \"One out of 20 people have an extra rib.\",\n \"The longest distance a deepwater lobster has been recorded to travel is 225 miles.\",\n \"Orcas when traveling in groups, breathe in unison.\",\n \"Pucks hit by hockey sticks have reached speeds of up to 150 miles per hour\",\n \"Most lipstick contains fish scales.\",\n \"No piece of paper can be folded in half more than 7 times.\",\n \"More people are killed by donkeys annually than are killed in plane crashes.\",\n \"The fear of peanut butter sticking to the roof of the mouth is called Arachibutyrophobia.\",\n \"Serving ice cream on cherry pie was once illegal in Kansas.\",\n \"Emus cannot walk backwards.\",\n \"Infants spend more time dreaming than adults do.\",\n \"Over 200 varieties of watermelons are grown in the U.S.\",\n \"The most dangerous job in the United States is that of a fisherman, followed by logging and then an airline pilot.\",\n \"The youngest pope was 11 years old.\",\n \"You share your birthday with at least 9 other million people in the world.\",\n \"During the First World War, cigarettes were handed out to soldiers along with their rations.\",\n \"The USA bought Alaska from Russia for 2 cents an acre.\",\n \"Walmart sells more apparel a year than all the other competing department stores combined.\",\n \"Canada has more inland waters and lakes than any other country in the world.\",\n \"Ramses II, a pharaoh of Egypt died in 1225 B.C. At the time of his death, he had fathered 96 sons and 60 daughters.\",\n \"Women are twice as likely to be diagnosed with depression than men in the United States.\",\n \"An average city dog lives approximately three years longer than an average country dog.\",\n \"On average, falling asleep while driving results in 550 accidents per day in the United States.\",\n \"The average life span of a single red blood cell is 120 days.\",\n \"Over 250 million Slinky toys have been sold since its debut in 1946.\",\n \"The last thing Elvis Presley ate before he died was four scoops of ice cream and 6 chocolate chip cookies.\",\n \"Every year, Burger King restaurants prepare over 950,000 pounds of bacon for their breakfast customers.\",\n \"The cosmos is within us, we're made of star stuff. We are a way for the cosmos to know itself.\",\n \"There is a dog museum in St. Louis, Missouri.\",\n \"An average person laughs about 15 times a day.\",\n \"About 10% of the 100,000 thunderstorms that occur in the USA every year are classified as severe.\",\n \"A leech has 32 brains.\",\n \"There are about 6,800 languages in the world.\",\n \"By walking an extra 20 minutes every day, an average person will burn off seven pounds of body fat in an year.\",\n \"A slug has four noses.\",\n \"Camel is considered unclean meat in the Bible.\",\n \"Mosquitoes have teeth.\",\n \"Cats have over one hundred vocal sounds, dogs only have about ten.\",\n \"Lions cannot roar until they reach the age of two.\",\n \"In Las Vegas, casinos do not have any clocks.\",\n };\n\n String fact = \"\";\n\n Random rng = new Random();\n int random = rng.nextInt(facts.length);\n\n fact = facts[random];\n factLabel.setText(fact);\n didY.setText(\"Did you know?\");\n }", "public void setDescrizione (String descrizione) {\r\n\t\tthis.descrizione=descrizione;\r\n\t}", "boolean restrictCategory(){\n\n\n if((!top.isEmpty()||!bottom.isEmpty())&&!suit.isEmpty()){\n Toast.makeText(this, \"상의/하의와 한벌옷은 동시에 설정할 수 없습니다.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n\n\n detail_categories = new ArrayList<>(Arrays.asList(top_detail,bottom_detail,suit_detail,\n outer_detail,shoes_detail,bag_detail,accessory_detail));\n\n for (int kindNum=0; kindNum<7; kindNum++){\n String category = categories.get(kindNum); //해당 종류(ex.상의)에 설정된 카테고리명 받아옴\n String kind = Utils.getKey(Utils.Kind.kindNumMap,kindNum); //종류명 받아옴\n\n if(!category.isEmpty()){ //카테고리가 설정 되어있다면\n String detail_category = detail_categories.get(kindNum); //디테일 카테고리 받아옴\n Iterator<ClothesVO> cloListIter = clothesList.iterator();\n int remain_items=0;\n\n if(detail_category.isEmpty()){ //카테고리만 설정되어 있다면\n while (cloListIter.hasNext()) {\n ClothesVO clothes = cloListIter.next();\n String cloKind = clothes.getKind();\n if(cloKind.equals(kind)){\n if(!clothes.getCategory().equals(category))\n cloListIter.remove(); //해당 종류에 해당 카테고리가 아닌 옷들을 제거\n else\n remain_items+=1; //제거되지 않은 옷\n }\n\n if(kindNum == Utils.Kind.TOP || kindNum == Utils.Kind.BOTTOM){\n if(\"한벌옷\".equals(cloKind))\n cloListIter.remove();\n }else if(kindNum == Utils.Kind.SUIT){\n if(\"상의\".equals(cloKind) || \"하의\".equals(cloKind))\n cloListIter.remove(); //제거\n }\n }\n }else{ //디테일 카테고리도 설정되어 있다면\n while (cloListIter.hasNext()) {\n ClothesVO clothes = cloListIter.next();\n String cloKind = clothes.getKind();\n if(cloKind.equals(kind)){\n if(!clothes.getDetailCategory().equals(detail_category))\n cloListIter.remove();//해당 종류에 해당 세부 카테고리가 아닌 옷들을 제거\n else\n remain_items+=1; //제거되지 않은 옷\n }\n\n if(kindNum == Utils.Kind.TOP || kindNum == Utils.Kind.BOTTOM){\n if(\"한벌옷\".equals(cloKind))\n cloListIter.remove();\n }else if(kindNum == Utils.Kind.SUIT){\n if(\"상의\".equals(cloKind) || \"하의\".equals(cloKind))\n cloListIter.remove(); //제거\n }\n }\n }\n\n if(remain_items==0){\n if(!detail_category.isEmpty()){\n category = detail_category;\n }\n\n// if(recommendedDCate!=null ){\n// List<String>recommendedDCateArray = Arrays.asList(recommendedDCate);\n// if(!recommendedDCateArray.contains(category)){\n// Toast.makeText(this, \"해당 날씨에 맞지 않는 <\"+category+\"> 카테고리가 설정에 포함되어 있습니다.\", Toast.LENGTH_LONG).show();\n// return false;\n// }\n// }\n\n Toast.makeText(this, \"설정한 <\"+category+\"> 카테고리의 옷이 없거나 해당 날씨에 맞지 않습니다. \\n더 많은 옷을 추가해보세요.\", Toast.LENGTH_LONG).show();\n return false;\n }\n }\n }\n\n return true;\n }", "String getCategoria();", "@Test\n\tpublic void whenDoctorHealThenCorrectDescription() {\n\t\tTreatment treatment = new Treatment();\n\t\ttreatment.setDrug(\"Аспирин\", \"125-6\");\n\t\ttreatment.setProcedure(\"Массаж\", 10);\n\t\tDoctor doctor = new Doctor(\"Алексей Петрович\", \"СПбГУ\", 3650, treatment);\n\t\tPatient patient = new Patient();\n\t\tpatient.setName(\"Антон\");\n\t\tString result = doctor.heal(patient);\n\t\tString expectString = \"Алексей Петрович лечит Антон\";\n\t\tassertThat(result, is(expectString));\n\t\t}", "public void setCategory (String mode) { category = mode; }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "java.lang.String getMoodMessage();", "String getDisplay_description();", "public void Caracteristicas(){\n System.out.println(\"La resbaladilla tiene las siguientes caracteristicas: \");\r\n if (escaleras==true) {\r\n System.out.println(\"Tiene escaleras\");\r\n }else System.out.println(\"No tiene escaleras\");\r\n System.out.println(\"Esta hecho de \"+material);\r\n System.out.println(\"Tiene una altura de \"+altura);\r\n }", "String category();", "public String getResearchDescription() {\r\n return this.researchDescription;\r\n }", "@Override\n public String getDescription() {\n return \"Phasing vote casting\";\n }", "@Override\n public String getDescription() {\n return \"Vote casting\";\n }", "private void sendToCatFilm()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Film'\", Toast.LENGTH_SHORT).show();\n }", "public void setDescrizione(java.lang.String descrizione) {\r\n this.descrizione = descrizione;\r\n }", "public void setDescrizione(String descrizione) {\r\n\t\tthis.descrizione = descrizione;\r\n\t}", "public static void caso31(){\n\t FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso3.owl\",\"file:resources/caso3.repository\",fm);\n\t\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"response1\");\n\t\t\tif(map==null){\n\t\t\t\tSystem.out.println(\"El map es null\");\n\t\t\t}else{\n\t\t\t\tMapUtils.imprimirMap(map);\n\t\t\t}\n\t}", "public static void caso21(){\n\t\t\n FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso2.owl\",\"file:resources/caso2.repository\",fm);\n\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"response2\");\n\t\tif(map==null){\n\t\t\tSystem.out.println(\"El map es null\");\n\t\t}else{\n\t\t\tMapUtils.imprimirMap(map);\n\t\t}\n\t}", "java.lang.String getDesc();", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "public abstract java.lang.String getAcma_descripcion();", "public void setSummary(String summary){\n\t String text = this.text;\n\t String s = \"\";\n // The ontology file format is described here:\n // https://trac.nbic.nl/data-mining/wiki/ErasmusMC%20ontology%20file%20format\n //final String ontologyPath = \"C:/Users/Nasko/Desktop/School/Project/semweb-peregrine.txt\"; // EDIT HERE\n\t final String ontologyPath = System.getProperty(\"user.home\") + \"/peregrine/\" + vocab + \"-peregrine.txt\";\n final Ontology ontology = new SingleFileOntologyImpl(ontologyPath);\n\n //final String propertiesDirectory = \"C:/Users/Nasko/Desktop/School/Project/lvg2006lite/data/config/\"; // EDIT HERE\n final String propertiesDirectory = System.getProperty(\"user.home\") + \"/peregrine/lvg2006lite/data/config/\";\n final Peregrine peregrine = createPeregrine(ontology, propertiesDirectory + \"lvg.properties\");\n //final String text = \"This is a simple sentence with labels like earley, bielefeld, task model ontology, etc. \" +\n // \"and immunoglobulin production, elsevier, Christian Morbidoni, Austria, Swingly, many terms like r2rml.\";\n final List<IndexingResult> indexingResults = peregrine.indexAndDisambiguate(text, Language.EN);\n\n //System.out.println(\"Number of indexing results found: \" + indexingResults.size() + \".\");\n this.summary = \"\";\n for (final IndexingResult indexingResult : indexingResults) {\n final Serializable conceptId = indexingResult.getTermId().getConceptId();\n //System.out.println();\n //System.out.println(\"- Found concept with id: \" + conceptId + \", matched text: \\\"\"\n // + text.substring(indexingResult.getStartPos(), indexingResult.getEndPos() + 1) + \"\\\".\");\n String matchedText = text.substring(indexingResult.getStartPos(), indexingResult.getEndPos() + 1);\n \n /* \n * Get the Term context - but lock it within a sentance.\n */\n String termContext = \"\";\n int cStart;\n int cEnd;\n //Get Start position of \"context\" text\n if(indexingResult.getStartPos()-15 <= indexingResult.getSentenceStartPos()) cStart = indexingResult.getSentenceStartPos();\n else {\n \t int cS = indexingResult.getStartPos()-15;\n \t cStart = indexingResult.getStartPos() - (15-text.substring(cS, indexingResult.getStartPos() + 1).indexOf(\" \")) + 1;\n }\n \n //Get End position of \"context\" text\n if(indexingResult.getEndPos()+15 >= indexingResult.getSentenceEndPos()) cEnd = indexingResult.getSentenceEndPos();\n else {\n \t int cE = indexingResult.getEndPos()+15;\n \t cEnd = indexingResult.getEndPos() + text.substring(indexingResult.getEndPos(), cE).lastIndexOf(\" \") + 1; \n }\n \n termContext = text.substring(cStart, cEnd).trim();\n /*String[] toTrim = text.substring(cStart, cEnd + 1).split(\" \");\n String[] trimmed = Arrays.copyOfRange(toTrim, 1, toTrim.length-1);\n termContext = StringUtils.join(trimmed, \" \");*/\n \n s = \"- Found concept with id: \" + conceptId + \", matched text: \\\"\"\n + matchedText + \"\\\".\";\n final Concept concept = ontology.getConcept(conceptId);\n final String preferredLabelText = LabelTypeComparator.getPreferredLabel(concept.getLabels()).getText();\n //System.out.println(\" Preferred concept label is: \\\"\" + preferredLabelText + \"\\\".\");\n s += \" Preferred concept label is: \\\"\" + preferredLabelText + \"\\\".\";\n this.summary += s + Math.random()*10;\n TaggedTerm t = new TaggedTerm();\n t.setMatchedText(matchedText);\n t.setPrefLabel(preferredLabelText);\n \n \n //Set the label\n String definition = \"\";\n String hierarchy = \"\";\n \n for(Label d : concept.getLabels()){\n \t if(d.getText().contains(\"|DEFINITION|\")){\n \t\t definition = d.getText().replace(\"|DEFINITION|\", \"\");\n \t\t break;\n \t }\n }\n \n for(Label d : concept.getLabels()){\n \t if(d.getText().contains(\"|HIERARCHY|\")){\n \t\t if(!hierarchy.equals(\"\")) hierarchy += \";;\" + d.getText().replace(\"TM |HIERARCHY|\", \"\");\n \t\t else hierarchy += d.getText().replace(\"TM |HIERARCHY|\", \"\");\n \t\t break;\n \t }\n }\n \n \n \n \n \n t.setDefinition(definition);\n t.setHierarchy(hierarchy);\n t.setTermContext(termContext);\n this.taggedTerms.add(t);\n definition = \"\";\n hierarchy = \"\";\n }\n }", "public String getMood() {\n return \"Neutral\";\n }", "public static void caso11(){\n\t\t\n FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso1.owl\",\"file:resources/caso1.repository\",fm);\n\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"response\");\n\t\tMapUtils.imprimirMap(map);\n\t}", "String getDesc();", "@Override\r\n\tpublic void frases() {\n\t\t\r\n\t\tthis.frase.add(\"Não há que ser forte. Há que ser flexível.\");\r\n this.frase.add(\"Gente todo dia arruma os cabelos, por que não o coração?\");\r\n this.frase.add(\"Há três coisas que jamais voltam; a flecha lançada, a palavra dita e a oportunidade perdida.\");\r\n this.frase.add(\"Melhor pensar alto do que não pensar nada.\");\r\n this.frase.add(\"A juventude não é uma época da vida, é um estado de espírito.\");\r\n this.frase.add(\" Podemos escolher o que semear, mas somos obrigados a colher o que plantamos.\");\r\n this.frase.add(\"Dê toda a atenção para a formação dos teus filhos, sobretudo por exemplos de tua própria vida.\");\r\n \r\n\t\t\r\n\t}", "@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }", "public void setDescrizione(String descrizione) {\n\t\tthis.descrizione = descrizione;\n\t}", "public String toString(){\n\t\tif(categoria == 1)\n\t\t\treturn \"Profesor Ayudante\\n\" + super.toString() + \"\\n\" + \"Horario = \" + tutoria;\n\t\telse if(categoria == 2)\n\t\t\treturn \"Profesor Titular de Universidad\\n\" + super.toString() + \"\\n\" + \"Horario = \" + tutoria;\n\t\telse\n\t\t\treturn \"Profesor Catedrático de Universidad\\n\" + super.toString() + \"\\n\" + \"Horario = \" + tutoria;\n\t}", "private String encodeDocumentDescription(int iExposureID, int iClaimantID, String strDocId) {\n // Adding a '!' to avoid perpetual syncing. See the imageright-to-cc workflow.\n String strReason = \"*!\";\n\n if (iExposureID >= 0) {\n strReason += \"E\" + String.valueOf(iExposureID);\n } else if (iClaimantID > -0) {\n strReason += \"C\" + String.valueOf(iClaimantID);\n } else {\n strReason += \"entireclaim\";\n }\n\n return strReason + \":\" + strDocId;\n }", "@Override\n public void onItemClick(AdapterView<?> parent, final View view,\n int position, long id) {\n Categoria item = (Categoria) parent.getItemAtPosition(position);\n Toast.makeText(getApplicationContext(), \"SELECIONADO \" + item.getDescricao(), Toast.LENGTH_LONG).show();\n }", "public abstract CharSequence getSummary();", "public static String roleDescription(String role){\n if(role.equals(percival)){\n return \"You are Percival. Your goal is to try to protect the Merlin! \\n\"\n + \"Merlin will either be: \\n\";\n } else if(role.equals(morgana)){\n return \"You are Morgana. Pretend to be like Merlin to trick Percival onto your side! \\n\"\n + \"The villians this game will be: \\n\";\n } else if(role.equals(merlin)){\n return \"You are Merlin. Try to win the game without revealing yourself! \\n\"\n + \"The villians this game will be (minus Mordred if he is in): \\n\";\n } else if(role.equals(mordred)){\n return \"You are Mordred. Merlin doesn't know who you are, make use of that fact to make the villians win! \\n\"\n + \"The villians this game will be: \\n\";\n } else if(role.equals(assassin)){\n return \"You are Assassin. Try to assassinate Merlin! \\n\"\n + \"The villians this game will be: \\n\";\n } else if(role.equals(goodling)){\n return \"You are a Loyal Servant of Arthur. Use the power of democracy to make the good guys win! \\n\";\n } else if (role.equals(badling)){\n return \"You are a Minion of Mordred. Hide yourself amongst the Loyal Servants and make sure they lose! \\n\"\n + \"The villians this game will be: \\n\";\n } else {\n return \"This message should not be appearing. Sorry there seems to be a bug. D:\";\n }\n }", "@Override\n public void buildAspecto() {\n this.personaje.setAspecto(\"Se presenta con rasgos humanos, rodeado de circulos de agua.\");\n }", "@Override\n\tpublic String getDescription() {\n\t\treturn \"Transfereix vida a l'enemic\";\n\t}", "@Test\n public void obesityCategory() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"102.7\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"185\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Overweight\",\n \"actual text is not: Your category is Overweight\");\n }", "private void setcategoriaPrincipal(String categoriaPrincipal2) {\n\t\t\n\t}", "private String championRecommendation(LeagueOfLegendsAccount account, String difficultyLevel) {\r\n if (difficultyLevel.equals(\"Beginner\")) {\r\n account.myRecommended.addChampionName(\"Darius\");\r\n return \"For Beginner difficulty we recommend Darius\";\r\n } else if (difficultyLevel.equals(\"Novice\")) {\r\n account.myRecommended.addChampionName(\"Blitzcrank\");\r\n account.myRecommended.addChampionName(\"Lucian\");\r\n account.myRecommended.addChampionName(\"Sejuani\");\r\n return \"For Novice difficulty we recommend Blitzcrank, Lucian, and Sejuani\";\r\n } else if (difficultyLevel.equals(\"Advanced\")) {\r\n account.myRecommended.addChampionName(\"Syndra\");\r\n account.myRecommended.addChampionName(\"Akali\");\r\n account.myRecommended.addChampionName(\"Fiddlesticks\");\r\n return \"For Advanced difficulty we recommend Syndra, Akali, and Fiddlesticks\";\r\n } else {\r\n return \"Not an existing classification of difficulty (Beginner, Novice, Advanced)\";\r\n }\r\n }", "String partnerTopicFriendlyDescription();", "public String getDescription() {\n return \"repair terms from an ontology\";\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "private static void printnews(final Loot li, final int newspaper) {\r\n if (!i.freeSpeech()) {\r\n i.offended.put(CrimeSquad.FIREMEN, true);\r\n }\r\n setView(R.layout.generic);\r\n if (li.id().equals(\"LOOT_CEOPHOTOS\")) // Tmp -XML\r\n {\r\n ui().text(\"The Liberal Guardian runs a story featuring photos of a major CEO\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(10)) {\r\n default:\r\n ui().text(\"engaging in lewd behavior with animals.\").add();\r\n i.issue(Issue.ANIMALRESEARCH).changeOpinion(15, 1, 100);\r\n break;\r\n case 1:\r\n ui().text(\"digging up graves and sleeping with the dead.\").add();\r\n break;\r\n case 2:\r\n ui().text(\"participating in a murder.\").add();\r\n i.issue(Issue.POLICEBEHAVIOR).changeOpinion(15, 1, 100);\r\n i.issue(Issue.JUSTICES).changeOpinion(10, 1, 100);\r\n break;\r\n case 3:\r\n ui().text(\"engaging in heavy bondage. A cucumber was involved in some way.\").add();\r\n break;\r\n case 4:\r\n ui().text(\"tongue-kissing an infamous dictator.\").add();\r\n break;\r\n case 5:\r\n ui().text(\"making out with an FDA official overseeing the CEO's products.\").add();\r\n i.issue(Issue.GENETICS).changeOpinion(10, 1, 100);\r\n i.issue(Issue.POLLUTION).changeOpinion(10, 1, 100);\r\n break;\r\n case 6:\r\n ui().text(\"castrating himself.\").add();\r\n break;\r\n case 7:\r\n ui().text(\"waving a Nazi flag at a supremacist rally.\").add();\r\n break;\r\n case 8:\r\n ui().text(\"torturing an employee with a hot iron.\").add();\r\n i.issue(Issue.LABOR).changeOpinion(10, 1, 100);\r\n break;\r\n case 9:\r\n ui().text(\"playing with feces and urine.\").add();\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n ui().text(\"This is bound to get the Corporations a little riled up.\").add();\r\n i.issue(Issue.CEOSALARY).changeOpinion(50, 1, 100);\r\n i.issue(Issue.CORPORATECULTURE).changeOpinion(50, 1, 100);\r\n i.offended.put(CrimeSquad.CORPORATE, true);\r\n } else if (li.id().equals(\"LOOT_CEOLOVELETTERS\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring love letters from a major CEO\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(8)) {\r\n default:\r\n ui().text(\"addressed to his pet dog. Yikes.\").add();\r\n i.issue(Issue.ANIMALRESEARCH).changeOpinion(15, 1, 100);\r\n break;\r\n case 1:\r\n ui().text(\"to the judge that acquit him in a corruption trial.\").add();\r\n i.issue(Issue.JUSTICES).changeOpinion(15, 1, 100);\r\n break;\r\n case 2:\r\n ui().text(\"to an illicit gay lover.\").add();\r\n i.issue(Issue.GAY).changeOpinion(15, 1, 100);\r\n break;\r\n case 3:\r\n ui().text(\"to himself. They're very steamy.\").add();\r\n break;\r\n case 4:\r\n ui().text(\"implying that he has enslaved his houseservants.\").add();\r\n i.issue(Issue.LABOR).changeOpinion(10, 1, 100);\r\n break;\r\n case 5:\r\n ui().text(\"to the FDA official overseeing the CEO's products.\").add();\r\n i.issue(Issue.GENETICS).changeOpinion(10, 1, 100);\r\n i.issue(Issue.POLLUTION).changeOpinion(10, 1, 100);\r\n break;\r\n case 6:\r\n ui().text(\"that seem to touch on every fetish known to man.\").add();\r\n break;\r\n case 7:\r\n ui().text(\"promising someone company profits in exchange for sexual favors.\").add();\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n ui().text(\"This is bound to get the Corporations a little riled up.\").add();\r\n i.issue(Issue.CEOSALARY).changeOpinion(50, 1, 100);\r\n i.issue(Issue.CORPORATECULTURE).changeOpinion(50, 1, 100);\r\n i.offended.put(CrimeSquad.CORPORATE, true);\r\n } else if (li.id().equals(\"LOOT_CEOTAXPAPERS\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring a major CEO's tax papers\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(1)) {\r\n default:\r\n ui().text(\"showing that he has engaged in consistent tax evasion.\").add();\r\n i.issue(Issue.TAX).changeOpinion(25, 1, 100);\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n ui().text(\"This is bound to get the Corporations a little riled up.\").add();\r\n i.issue(Issue.CEOSALARY).changeOpinion(50, 1, 100);\r\n i.issue(Issue.CORPORATECULTURE).changeOpinion(50, 1, 100);\r\n i.offended.put(CrimeSquad.CORPORATE, true);\r\n } else if (li.id().equals(\"LOOT_CORPFILES\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring Corporate files\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(newspaper * 10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(newspaper * 10, 1, 100);\r\n switch (i.rng.nextInt(5)) {\r\n default:\r\n ui().text(\"describing a genetic monster created in a lab.\").add();\r\n i.issue(Issue.GENETICS).changeOpinion(50, 1, 100);\r\n break;\r\n case 1:\r\n ui().text(\"with a list of gay employees entitled \\\"Homo-workers\\\".\").add();\r\n i.issue(Issue.GAY).changeOpinion(50, 1, 100);\r\n break;\r\n case 2:\r\n ui().text(\"containing a memo: \\\"Terminate the pregnancy, I terminate you.\\\"\").add();\r\n i.issue(Issue.ABORTION).changeOpinion(50, 1, 100);\r\n break;\r\n case 3:\r\n ui().text(\"cheerfully describing foreign corporate sweatshops.\").add();\r\n i.issue(Issue.LABOR).changeOpinion(50, 1, 100);\r\n break;\r\n case 4:\r\n ui().text(\"describing an intricate tax scheme.\").add();\r\n i.issue(Issue.TAX).changeOpinion(50, 1, 100);\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n ui().text(\"This is bound to get the Corporations a little riled up.\").add();\r\n i.issue(Issue.CEOSALARY).changeOpinion(50, 1, 100);\r\n i.issue(Issue.CORPORATECULTURE).changeOpinion(50, 1, 100);\r\n i.offended.put(CrimeSquad.CORPORATE, true);\r\n } else if (li.id().equals(\"LOOT_INTHQDISK\") || li.id().equals(\"LOOT_SECRETDOCUMENTS\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring CIA and other intelligence files\")\r\n .add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(6)) {\r\n default:\r\n ui().text(\"documenting the overthrow of a government.\").add();\r\n break;\r\n case 1:\r\n ui().text(\"documenting the planned assassination of a Liberal federal judge.\").add();\r\n i.issue(Issue.JUSTICES).changeOpinion(50, 1, 100);\r\n break;\r\n case 2:\r\n ui().text(\"containing private information on innocent citizens.\").add();\r\n break;\r\n case 3:\r\n ui().text(\"documenting \\\"harmful speech\\\" made by innocent citizens.\").add();\r\n i.issue(Issue.FREESPEECH).changeOpinion(50, 1, 100);\r\n break;\r\n case 4:\r\n ui().text(\"used to keep tabs on gay citizens.\").add();\r\n i.issue(Issue.GAY).changeOpinion(50, 1, 100);\r\n break;\r\n case 5:\r\n ui().text(\"documenting the infiltration of a pro-choice group.\").add();\r\n i.issue(Issue.ABORTION).changeOpinion(50, 1, 100);\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n ui().text(\"This is bound to get the Government a little riled up.\").add();\r\n i.issue(Issue.PRIVACY).changeOpinion(50, 1, 100);\r\n i.offended.put(CrimeSquad.CIA, true);\r\n } else if (li.id().equals(\"LOOT_POLICERECORDS\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring police records\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(6)) {\r\n default:\r\n ui().text(\"documenting human rights abuses by the force.\").add();\r\n i.issue(Issue.TORTURE).changeOpinion(15, 1, 100);\r\n break;\r\n case 1:\r\n ui().text(\"documenting a police torture case.\").add();\r\n i.issue(Issue.TORTURE).changeOpinion(50, 1, 100);\r\n break;\r\n case 2:\r\n ui().text(\"documenting a systematic invasion of privacy by the force.\").add();\r\n i.issue(Issue.PRIVACY).changeOpinion(15, 1, 100);\r\n break;\r\n case 3:\r\n ui().text(\"documenting a forced confession.\").add();\r\n break;\r\n case 4:\r\n ui().text(\"documenting widespread corruption in the force.\").add();\r\n break;\r\n case 5:\r\n ui().text(\"documenting gladiatorial matches held between prisoners by guards.\").add();\r\n i.issue(Issue.DEATHPENALTY).changeOpinion(50, 1, 100);\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n i.issue(Issue.POLICEBEHAVIOR).changeOpinion(50, 1, 100);\r\n } else if (li.id().equals(\"LOOT_JUDGEFILES\")) {\r\n ui().text(\"The Liberal Guardian runs a story with evidence of a Conservative judge\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(2)) {\r\n default:\r\n ui().text(\"taking bribes to acquit murderers.\").add();\r\n break;\r\n case 1:\r\n ui().text(\"promising Conservative rulings in exchange for appointments.\").add();\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n i.issue(Issue.JUSTICES).changeOpinion(50, 1, 100);\r\n } else if (li.id().equals(\"LOOT_RESEARCHFILES\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring research papers\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(4)) {\r\n default:\r\n ui().text(\"documenting horrific animal rights abuses.\").add();\r\n i.issue(Issue.ANIMALRESEARCH).changeOpinion(50, 1, 100);\r\n break;\r\n case 1:\r\n ui().text(\"studying the effects of torture on cats.\").add();\r\n i.issue(Issue.ANIMALRESEARCH).changeOpinion(50, 1, 100);\r\n break;\r\n case 2:\r\n ui().text(\"covering up the accidental creation of a genetic monster.\").add();\r\n i.issue(Issue.GENETICS).changeOpinion(50, 1, 100);\r\n break;\r\n case 3:\r\n ui().text(\"showing human test subjects dying under genetic research.\").add();\r\n i.issue(Issue.GENETICS).changeOpinion(50, 1, 100);\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n } else if (li.id().equals(\"LOOT_PRISONFILES\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring prison documents\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(4)) {\r\n default:\r\n ui().text(\"documenting human rights abuses by prison guards.\").add();\r\n break;\r\n case 1:\r\n ui().text(\"documenting a prison torture case.\").add();\r\n i.issue(Issue.TORTURE).changeOpinion(50, 1, 100);\r\n break;\r\n case 2:\r\n ui().text(\"documenting widespread corruption among prison employees.\").add();\r\n break;\r\n case 3:\r\n ui().text(\"documenting gladiatorial matches held between prisoners by guards.\").add();\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n i.issue(Issue.DEATHPENALTY).changeOpinion(50, 1, 100);\r\n } else if (li.id().equals(\"LOOT_CABLENEWSFILES\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring cable news memos\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(4)) {\r\n default:\r\n ui().text(\"calling their news 'the vanguard of Conservative thought'.\").add();\r\n break;\r\n case 1:\r\n ui().text(\"mandating negative coverage of Liberal politicians.\").add();\r\n break;\r\n case 2:\r\n ui().text(\"planning to drum up a false scandal about a Liberal figure.\").add();\r\n break;\r\n case 3:\r\n ui().text(\"instructing a female anchor to 'get sexier or get a new job'.\").add();\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n ui().text(\"This is bound to get the Conservative masses a little riled up.\").add();\r\n i.issue(Issue.CABLENEWS).changeOpinion(50, 1, 100);\r\n i.offended.put(CrimeSquad.CABLENEWS, true);\r\n } else if (li.id().equals(\"LOOT_AMRADIOFILES\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring AM radio plans\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(3)) {\r\n default:\r\n ui().text(\"calling listeners 'sheep to be told what to think'.\").add();\r\n break;\r\n case 1:\r\n ui().text(\"saying 'it's okay to lie, they don't need the truth'.\").add();\r\n break;\r\n case 2:\r\n ui().text(\"planning to drum up a false scandal about a Liberal figure.\").add();\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n ui().text(\"This is bound to get the Conservative masses a little riled up.\").add();\r\n i.issue(Issue.AMRADIO).changeOpinion(50, 1, 100);\r\n i.offended.put(CrimeSquad.AMRADIO, true);\r\n }\r\n getch();\r\n }", "public abstract String getDescription();", "public abstract String getDescription();", "public abstract String getDescription();", "public abstract String getDescription();", "public abstract String getDescription();", "public abstract String getDescription();", "public abstract String getDescription();", "public abstract String getDescription();", "public abstract void description();", "String getSlingDescription();", "private void updateSubtitle() {\n String subtitle = getString(R.string.subtitle_new_chore);\n ChoreLab choreLab = ChoreLab.get(getActivity());\n int choreCount = choreLab.getChores().size();\n if(choreCount == 0) {\n mSubtitleVisible = true;\n } else {\n mSubtitleVisible = false;\n }\n\n if (!mSubtitleVisible) {\n subtitle = null;\n }\n\n AppCompatActivity activity = (AppCompatActivity) getActivity();\n activity.getSupportActionBar().setSubtitle(subtitle);\n }", "private void courseEffects() {\n\t\t\n\t}", "private boolean tieneCategorias(){\n String valor = \"\";\n try {\n ResultSet resultado = buscador.getResultSet(\"select conCategorias from JERARQUIA where correlativo = '\" + IDJerarquia + \"'\");\n if (resultado.next()) {\n valor += resultado.getObject(\"conCategorias\").toString(); //IDRaiz\n }\n } catch (SQLException e) {\n System.out.println(\"*SQL Exception: *\" + e.toString());\n }\n if(valor.equalsIgnoreCase(\"true\")) //Si utiliza categorias\n return true;\n return false;\n }", "public void setNomNiveles (String IdNivel, String Contador, String IdCategoria){\n nivelesId = getNivelId( IdNivel );\n if ( nivelesId.moveToFirst() ){//Muestra los valores encontrados en la consulta\n labelNivel.setText( nivelesId.getString(1) + \" - Preguntas : \" + Contador + \" / \" + getPreguntasTotal(IdCategoria, IdNivel ) );\n }\n\n }", "@Override\n\tpublic void tipoInteligencia() {\n\t\tSystem.out.println(super.getNome() + \" é um animal \" + ((super.isRacional() == true) ? \"racional.\" : \"irracional.\"));\n\t}", "String getDescripcion();", "String getDescripcion();", "public void setDescripcion(String s) { this.descripcion = s; }", "public String appearLike(){\n return \"Rund og helt uden kanter.\";\n }", "List<String> getFavoriteRecipeTitle();", "@Override\n\tpublic String getDescricao() {\n\t\treturn pasta.getDescricao() + \", Bacon\";\n\t}", "private static ImmutableSet<String> categorizeText(String text) throws IOException {\n ImmutableSet<String> categories = ImmutableSet.of();\n\n try (LanguageServiceClient client = LanguageServiceClient.create()) {\n Document document = Document.newBuilder().setContent(text).setType(Type.PLAIN_TEXT).build();\n ClassifyTextRequest request = ClassifyTextRequest.newBuilder().setDocument(document).build();\n\n ClassifyTextResponse response = client.classifyText(request);\n\n categories = response.getCategoriesList()\n .stream()\n .flatMap(ReceiptAnalysis::parseCategory)\n .collect(ImmutableSet.toImmutableSet());\n } catch (ApiException e) {\n // Return empty set if classification request failed.\n return categories;\n }\n\n return categories;\n }", "public void setNomCategoria (String IdCategoria){\n categoriaId = getCategoriaId( IdCategoria );\n if ( categoriaId.moveToFirst() ){//Muestra los valores encontrados en la consulta\n labelCategoria.setText( categoriaId.getString(1) );\n }\n }", "protected void firstStep() {\n if (!condition.equals(\"fm\") && !condition.equals(\"cfs\")) throw new RuntimeException(\"Unknown condition: \"\r\n + condition);\r\n if (rating.condition == null || rating.condition.length() == 0) ratingUpdateString(\"condition\", condition);\r\n\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n panel.add(new InlineHTML(\"Web site:\"));\r\n panel.add(textInput(\"webSite\"));\r\n panel.add(new HTML(\"If you know the web site of the \" + rating._doctor.firstName + \" \"\r\n + rating._doctor.lastName + \", please enter it here.\"));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n\r\n panel.add(new HTML(\"TYPE OF HEALTH PROFESSIONAL\"));\r\n panel.add(ratingBox(\"type\", \"Family Physician / Internist\",\r\n \"Family Physician / General Internal Medicine\"));\r\n// for (String title : Arrays.asList(\"Family Physician\", \"General Internal Medicine\")) {\r\n// panel.add(ratingBox(\"type\", title, null));\r\n// panel.add(new InlineHTML(\"<br/>\"));\r\n// }\r\n panel.add(h2(new HTML(\r\n \"<b>SPECIALISTS</b>: These doctors often require a physician's recommendation to be seen.\")));\r\n for (String title : Arrays.asList(\"Allergist\", \"Cardiologist\", \"Dentist\", \"Endocrinologist\",\r\n \"Gastroenterologist\", \"Gynecologist\", \"Immunologist\", \"Infectious Disease Specialist\", \"Neurologist\",\r\n \"Orthopedist\", \"Ear, Nose and Throat Physician\", \"Pain Management Specialist\", \"Pediatrician\",\r\n \"Physical Therapist and Rehabilitation Specialist\",\r\n \"Psychological Counselor (psychiatrist, psychologist, social worker, etc.)\", \"Rheumatologist\",\r\n \"Sleep Specialist\", \"Sports Medicine Doctor\", \"Not Sure\")) {\r\n panel.add(ratingBox(\"type\", title, null));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n }\r\n\r\n panel.add(new InlineHTML(\"Other \"));\r\n panel.add(textInput(\"typeSpecialistOther\"));\r\n\r\n panel.add(h2(new HTML(\"<b>ALTERNATIVE HEALTH PRACTITIONERS</b>\")));\r\n for (String title : Arrays.asList(\"MD with an Alternative Focus\", \"Acupressurist\", \"Acupuncturist\",\r\n \"Alexander Technique Practitioner\", \"Amygdala Retrainer\", \"Aromatherapist\", \"Aryuveda practitioner\",\r\n \"Bach Flower\", \"Chinese Medicine Specialist\", \"Chiropracter\", \"Colon/Hydrotherapist\",\r\n \"Cranio-sacral Therapist\", \"Emotional Freedom Technique (EFT) Practitioner\",\r\n \"Energy Healing Practitioner\", \"Environmental Medicine\", \"Feldenkrais Practitioner\", \"Herbalist\",\r\n \"Homeopathist\", \"Hypnotherapist\", \"Kinesiologist\", \"Lightning Process Practitioner\",\r\n \"Macrobiotic Practitioner\", \"Massage Therapist\",\r\n \"Mindfulness Based Stress Reduction (MBSR) Practitioner\", \"Naturopathist\",\r\n \"Nambudripad Allergy Technique (NAET) Practitioner\", \"Neuro-linguistic Programmer\", \"Nutritionist\",\r\n \"Orthomolecular Medicine\", \"Osteopath\", \"Qigong Practitioner\", \"Reiki Practitioner\", \"Reflexologist\",\r\n \"Spiritual Healer\", \"Rolfer\")) {\r\n panel.add(ratingBox(\"type\", title, null));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n }\r\n\r\n panel.add(new InlineHTML(\"Other \"));\r\n panel.add(textInput(\"typeAlternativeOther\"));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n\r\n panel.add(wizardNavigation(null));\r\n }", "public abstract int getGuideDescription();", "public final void readCategoria() {\n cmbCategoria.removeAllItems();\n cmbCategoria.addItem(\"\");\n categoryMapCategoria.clear();\n AtividadePreparoDAO atvprepDAO = new AtividadePreparoDAO();\n for (AtividadePreparo atvprep : atvprepDAO.readMotivoRetrabalho(\"Categoria\")) {\n Integer id = atvprep.getMotivo_retrabalho_id();\n String name = atvprep.getMotivo_retrabalho();\n cmbCategoria.addItem(name);\n categoryMapCategoria.put(id, name);\n }\n }", "@Override\n\tpublic void setDescription(java.lang.String description) {\n\t\t_lineaGastoCategoria.setDescription(description);\n\t}", "String getConcept();", "private static void alimenterAttributs() {\r\n\t\t\r\n\t\t/* alimente 'properties' avec la valeur \r\n\t\t * fournie par le gestionnaireProperties. */\r\n\t\tproperties = gestionnaireProperties.getProperties();\r\n\t\t\r\n\t\t/* alimente 'pathAbsoluFichierProperties' \r\n\t\t * avec la valeur fournie par le gestionnaireProperties. */\r\n\t\tpathAbsoluFichierProperties \r\n\t\t\t= gestionnaireProperties.getPathAbsoluFichierProperties();\r\n\t\t\r\n\t}" ]
[ "0.64741296", "0.6133539", "0.5824593", "0.5809856", "0.57989323", "0.57671946", "0.5730077", "0.571226", "0.5615371", "0.55556184", "0.552738", "0.54856193", "0.54786456", "0.54749995", "0.54671216", "0.5445528", "0.541156", "0.5388951", "0.5382282", "0.5345444", "0.53348196", "0.5329876", "0.5315499", "0.5313763", "0.53055894", "0.5302824", "0.5284902", "0.52800685", "0.5259767", "0.52535105", "0.52370477", "0.5223144", "0.5223046", "0.5214912", "0.5213172", "0.5200014", "0.5174633", "0.51694643", "0.5157347", "0.5156566", "0.51564085", "0.51564085", "0.5148062", "0.51463306", "0.51439786", "0.5142211", "0.5133852", "0.51307255", "0.51283216", "0.509807", "0.50971156", "0.5096222", "0.50936365", "0.5079423", "0.5078757", "0.50736207", "0.50633585", "0.50610894", "0.5055351", "0.50549066", "0.5048553", "0.5037373", "0.50369614", "0.50369614", "0.50369614", "0.50369614", "0.50369614", "0.50369614", "0.50369614", "0.50369614", "0.50369614", "0.50333744", "0.50247544", "0.50247544", "0.50247544", "0.50247544", "0.50247544", "0.50247544", "0.50247544", "0.50247544", "0.5021528", "0.50210714", "0.50163215", "0.5012991", "0.50092506", "0.50036013", "0.500267", "0.49983397", "0.49983397", "0.49930212", "0.49912623", "0.49882206", "0.49864784", "0.4985989", "0.49854702", "0.49844688", "0.4983411", "0.49833977", "0.49830574", "0.4982268", "0.49730396" ]
0.0
-1
call retrofit api service
private void createServerSideToken(TokenRequestBody tokenRequestBody, final Paystack.TokenCallback tokenCallback) throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException { ApiService apiService = new ApiClient().getApiService(); HashMap<String, String> params = new HashMap<>(); params.put(TokenRequestBody.FIELD_PUBLIC_KEY, tokenRequestBody.publicKey); params.put(TokenRequestBody.FIELD_CLIENT_DATA, tokenRequestBody.clientData); Call<TokenApiResponse> call = apiService.createToken(params); call.enqueue(new Callback<TokenApiResponse>() { /** * Invoked for a received HTTP response. * <p/> * @param call - the call enqueueing this callback * @param response - response from the server after call is made */ @Override public void onResponse(Call<TokenApiResponse> call, Response<TokenApiResponse> response) { TokenApiResponse tokenApiResponse = response.body(); if (tokenApiResponse != null) { //check for status...if 0 return an error with the message if (tokenApiResponse.status.equals("0")) { //throw an error tokenCallback.onError(new TokenException(tokenApiResponse.message)); } else { Token token = new Token(); token.token = tokenApiResponse.token; token.last4 = tokenApiResponse.last4; tokenCallback.onCreate(token); } } } /** * Invoked when a network exception occurred talking to the server or when an unexpected * exception occurred creating the request or processing the response. * * @param call - call that enqueued this callback * @param t - the error or exception that caused the failure */ @Override public void onFailure(Call<TokenApiResponse> call, Throwable t) { Log.e(LOG_TAG, t.getMessage()); tokenCallback.onError(t); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface TravelApiService {\n @GET(\"api/users/{userCode}/travels\")\n Call<List<Travel>> getTravel(@Path(value = \"userCode\") String userCode);\n\n @POST(\"api/users/{userCode}/travels\")\n Call<PostTravelGsonResponce> postTravel(@Path(value = \"userCode\") String userCode, @Field(\"travel_date\") String travelDate, @Field(\"latitude\") Double latitude, @Field(\"longitude\") Double longitude, @Field(\"area_name\") String areaName, @Field(\"contry_name\") String countryName, @Field(\"token\") String token);\n}", "public interface apiService {\n\n\n\n String base_url= \"http://192.168.43.154:8081/\";\n\n @GET(\"getprofile\")\n Call<Employee> getProfilehero(@Query(\"racf\") String id,@Query(\"password\") String pass);\n\n @GET(\"getpeopleonleave\")\n Call<Datesss> getdetailsondate(@Query(\"date\") String d);\n\n @GET(\"authentication\")\n Call<Auth> getAuth(@Query(\"racf\") String d,@Query(\"password\") String dd);\n\n @GET(\"getleavedates\")\n Call<leaves> getleavedates(@Query(\"racf\") String d);\n\n @GET(\"getwfhdates\")\n Call<WorkFromHome> getwfhdates(@Query(\"racf\") String dd);\n\n @GET(\"updateno\")\n Call<Auth> updating(@Query(\"racf\") String d,@Query(\"contacts\") String dd,@Query(\"contactnames\") String ddd);\n\n @GET(\"updateworkfromhome\")\n Call<Auth> updatingwfh(@Query(\"racf\") String d,@Query(\"dates\") String dd,@Query(\"reasons\") String ddd);\n\n @GET(\"updateonleave\")\n Call<Auth> updatingleave(@Query(\"racf\") String d,@Query(\"date\") String dd,@Query(\"reason\") String ddd);\n\n\n}", "interface RetrofitService {\n\n\n\n @GET(\"api/7453d2c751a72e01/hourly/lang:EN/pws:0/q/02301.json\")\n Call<ForeCastbyHour> responseback();\n //Call<ForeCastbyHour> responseback(@Path(\"zipcode\")int zipcode);\n }", "public interface ApiService {\n\n @GET(\"/iseAlim/league.json\")\n Call<Leagues> getLeague();\n\n\n}", "public interface PokeApiService {\n\n @GET(\"qvqk-dtmf.json\")\n Call<ArrayList<ViasRespuesta>> obtenerListaPokemon();\n}", "public interface Service {\n\n\n @GET(\"/3/search/movie\")\n Call<Lista> getSearch(@Query(\"api_key\") String apiKey, @Query(\"query\") String queryString);\n\n}", "public interface APIService {\n /**\n * 如果不需要转换成Json数据,可以用了ResponseBody;\n * @return call\n */\n @GET(\"apps?api_token={Your API Token}\")\n// Call<AppInfo> getAppInfo();\n Call<ResponseBody> getAppInfo();\n // you can add some other meathod\n}", "public interface LooksoftMainApi {\n @GET(\"main\")\n Call<Data> loadData();\n}", "public interface RetrofitService{\n\n @GET(\"api/data/Android/10/1\")\n Call<ResponseBody> getAndroidInfo();\n\n @GET(\"api/data/Android/10/1\")\n Observable<ArrayList<MeizhiModel>> getAndroidDate();\n}", "public interface ApiService {\n\n @GET(\"getallproducts.php\")\n Call<ResponseBody> getAllProduct ();\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(Constant.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n}", "public interface GateWay {\n @GET(\"retrofit-demo.php?company_no=123\")\n Call<EmployeeList> getEmployee();\n}", "public interface ApiService {\n @GET(\"questcms/floorplan\")\n Call<List<FloorPlan>> listFloorPlan();\n}", "public interface ApiService {\n\n @GET(\"products.json\")\n Call<Product> loadProduct();\n\n}", "public interface Api {\n\n// root url after add multiple servlets\n\n String BASE_URL = \"https://simplifiedcoding.net/demos/\";\n\n @GET(\"marvel\")\n Call<List<Modelclass>> getmodelclass();\n\n\n\n}", "public interface RetrofitClient\n{\n @GET(\"web\")\n Call<List<Model>> getAllModel();\n\n @GET(\"web/{id}\")\n Call<Model> getModel(@Body int id);\n\n @POST(\"web\")\n Call<Model> signup(@Body Model model);\n\n\n @GET(\"lost\")\n Call<List<LostModel>> getLostThings();\n @POST(\"found\")\n Call<FoundModel> postFoundThings(@Body FoundModel foundModel);\n @POST(\"lost\")\n Call<LostModel> postLostThings(@Body LostModel lostModel);\n\n}", "public interface ApiService {\n @GET(\"/lista_pokemons.php\")\n void getPokemons(Callback<List<PokemonEntity>> response);\n\n\n}", "public interface ApiService {\n\n// @FormUrlEncoded\n// @POST(\"tambah_data.php\")\n// Call<ResponseBody> tambahData(@Field(\"nama\") String nama, @Field(\"jenis\") String jenis, @Field(\"keterangan\") String keterangan);\n//\n// @FormUrlEncoded\n// @POST(\"edit_data.php\")\n// Call<ResponseBody> editData(@Field(\"id_barang\") String id, @Field(\"nama_barang\") String nama, @Field(\"jenis_barang\") String jenis, @Field(\"keterangan_barang\") String keterangan);\n//\n// @FormUrlEncoded\n// @POST(\"hapus_data.php\")\n// Call<ResponseBody> hapusData(@Field(\"id_barang\") String id_barang);\n\n @GET(\"api_notif.php\")\n Call<List<ModelDataNotif>> getAllSewa();\n\n// @GET(\"single_data.php\")\n// Call<List<ModelData>> getSingleData(@Query(\"id_barang\") String id);\n\n}", "public interface ApiService {\n\n @GET(\"/api/v1/rates/daily/\")\n Call<List<ExchangeRate>> getTodayExchangeRates();\n\n}", "public interface MovieService {\n @GET(\"/json/movies.json\")\n Call<List<MovieModel>> getDealModel();\n\n}", "public interface IPokeapiService {\n\n\n\n// @GET(\"lp_iem/result.json\")\n// Call<PokemonWs> listPokemon();\n\n @GET(\"?action=cardlist&\")\n Call<List<Pokemon>> listPokemon(@Query(\"user\")int user);\n //@Query(\"user\")int user\n\n @GET(\"?action=details&\")\n Call<Pokemon> getPokemon(@Query(\"card\")int id_card);\n\n @GET(\"?action=pokedex\")\n Call<List<Pokemon>> getPokedex();\n\n}", "public interface RetrofitService {\n\n @GET(ApiService.cx)\n Observable<gwc_Bean> getcall(@Query(\"uid\") String uid);\n @GET(ApiService.gx)\n Observable<XG_Bean> getcall1(@Query(\"uid\") String uid,@Query(\"sellerid\") String sellerid,@Query(\"pid\") String pid,@Query(\"selected\") String selected,@Query(\"num\") String num);\n @GET(ApiService.sc)\n Observable<CC_Bean> getcall2(@Query(\"uid\") String uid,@Query(\"pid\") String pid);\n}", "public interface VanilaiWeatherService {\n @GET(\"forecast/{appId}/{latlon}\")\n Call<Forecast> getForecast(@Path(\"appId\") String appId, @Path(\"latlon\") String latLon);\n}", "public interface BruceApi {\n\n\tString ENDPOINT = \"http://gank.avosapps.com/api\";\n\n\t@GET(\"/data/福利/\" + BruceFactory.pageSize + \"/{page}\")\n\tvoid getListData(@Path(\"page\") int page, Callback<FuliList> response);\n\n\t@GET(\"/day/{year}/{month}/{day}\")\n\tvoid getDataSet(@Path(\"year\") int year, @Path(\"month\") int month, @Path(\"day\") int day,Callback<DataSet> response);\n\n\t@GET(\"/day/{year}/{month}/{day}\")\n\tObservable<DataSet> getDataObservable(@Path(\"year\")int year,@Path(\"month\")int month,@Path(\"day\")int day);\n\n\t//但如果我们想获得JSON字符串,Callback的泛型里就不能写POJO类了,要写Response(retrofit.client包下)\n\t@GET(\"/data/福利/\" + BruceFactory.pageSize + \"/{page}\")\n\tvoid getResponseData(@Path(\"page\") int page, Callback<Response> response);\n\n\n}", "public interface RequestService {\n //http://gank.io/api/data/Android/10/1\n /*@GET(\"api/data/Android/10/1\")\n Call<ResponseBody> getAndroidInfo();*/\n @GET(\"api/data/Android/10/1\")\n Call<GankBean> getAndroidInfo();\n @GET(\"api/data/Android/10/{page}\")\n Call<GankBean> getAndroidInfo(@Path(\"page\") int page);\n @GET(\"api/data/query?cityname=深圳\")\n Call<ResponseBody> getWeather(@Query(\"key\") String key,@Query(\"area\") String area);\n @GET(\"group/{id}/users\")\n Call<List<User2>> groupList(@Field(\"id\") int groupId, @QueryMap Map<String,String> options);\n @GET\n Call<GankBean> getAndroid2Info(@Url String url);\n\n}", "public interface ApiService {\n @GET(\"get_currency_rates.php\")\n Call<List<Currency>> getRates();\n}", "public interface ApiService {\n\n /**\n * 问题列表\n * @param city\n * @return\n */\n @GET(URLs.QUESTIONS)\n Call<Result<ArrayList<Question>>> questions(@Query(\"city\") String city);\n\n /**\n * 用户登录\n * @param mobile\n * @param password\n * @return\n */\n @FormUrlEncoded\n @POST(URLs.LOGIN)\n Call<Result<User>> login(@Field(\"mobile\") String mobile,\n @Field(\"password\") String password);\n\n}", "public interface HttpService {\n//banner/query?type=1\n // public static final String BASE_URL=\"http://112.124.22.238:8081/course_api/\";\n @GET(\"banner/query\")\n Call<List<HeaderBean>> getHeaderData(@Query(\"type\") String type);\n @GET(\"campaign/recommend\")\n Call<List<RecommendBean>> getRecommendData();\n}", "public interface IRetrofitService {\n @GET(\"/v1/api/api/bank\")\n Call<ResponseBody> GetTestStr();\n\n\n /**\n * 请求奖励\n *\n * @param user_id\n * @param name\n * @param expand\n * @return\n */\n\n // @Path :路径参数\n// @Query?后面的参数,例如:?expand=\"dddddd\"\n @GET(\"users/{user_id}/activitis/{name}/reward\")\n Call<Response> GetReWard(\n @Path(\"user_id\") String user_id,\n @Path(\"name\") String name,\n @Query(\"expand\") String expand\n );\n// @Field:Post传递的参数\n// @FormUrlEncoded:如果POST请求,传递数据,必须要有\n\n /**\n * 请求post\n */\n @FormUrlEncoded\n @POST(\"user/{userid}/getls\")\n Call<Response> GetLs(\n @Path(\"userid\") String userid,\n @Field(\"code\") String code\n );\n\n}", "public interface baseApiService {\n\n @POST(\"login\")\n Call<FeedLogin> loginRequest(@Body LoginUser login);\n\n\n @GET(\"profile\")\n Call<FeedUser> getAllProfile(@Header(\"Content-Type\") String contenType,\n @Header(\"Accept\") String Accept,\n @Header(\"Authorization\") String authToken);\n\n @POST(\"register\")\n Call<DataRegister> registerReques(@Body registerUser registerUser);\n\n\n}", "public interface TvApi {\n\n /*\n 获取电视节目表\n */\n @POST(\"getProgram\")\n Call<TvShowData> getProgram(@Query(\"code\") String code, @Query(\"date\") String date, @Query(\"key\") String key);\n\n /*\n 获取频道类型列表\n */\n @POST(\"getCategory\")\n Call<TvTypeData> getCategory(@Query(\"key\") String key);\n\n /*\n\n */\n @POST(\"getChannel\")\n Call<TvChannelData> getChannel(@Query(\"pId\") String pId, @Query(\"key\") String key);\n}", "public interface ApiService {\n @GET(\"api/timelines/users/918753190470619136\")\n Call<HeadPOJO> pojoGetter();\n}", "public interface PokemonService {\r\n\r\n @GET(\"pokemon/\")\r\n Call<Pokemons> getPokemons(@Query(\"offset\") int offset, @Query(\"limit\") int limit);\r\n\r\n @GET(\"pokemon/{id}/\")\r\n Call<Pokemon> getDetailPokemon(@Path(\"id\") int id);\r\n\r\n public static final Retrofit retrofit = new Retrofit.Builder()\r\n .baseUrl(\"https://pokeapi.co/api/v2/\")\r\n .addConverterFactory(GsonConverterFactory.create())\r\n .build();\r\n}", "public interface iRetrofitTCU {\n\n //String ENDPOINT = \"http://mobile-aceite.tcu.gov.br/mapa-da-saude\";\n\n @GET(\"rest/emprego\")\n Call<List<Posto>> callListPostoSINE(); // getPosto(@Path(\"codPosto\") String codPosto\n\n @GET(\"rest/emprego/latitude/{latitude}/longitude/{long}/raio/{raio}\")\n Call<List<Posto>> listPosto(@Path(\"latitude\") String lat,@Path(\"long\") String lon,@Path(\"raio\") String raio);\n\n}", "public interface BookService {\n\n @GET(\"books.json\")\n Call<List<Book>> getBooks();\n\n}", "public interface RestaurantEndpoints {\n @GET(\"/restaurants\")\n Call<ArrayList<GETRestaurantResponse>> getRestaurants(@Query(\"priceeq\") String priceEquals,\n @Query(\"pricelte\") String priceLte,\n @Query(\"pricegte\") String priceGte,\n @Query(\"city\") String city,\n @Query(\"name\") String name,\n @Query(\"address\") String address);\n @GET(\"/restaurant_statistics\")\n Call<GETRestaurantStatisticsResponse> getRestaurantStatistics(@Query(\"name\") String name, @Query(\"address\") String address);\n\n @PUT(\"/restaurants\")\n Call<Void> updateRestaurantOwner(@Body PUTRestaurantRequest putRestaurantRequest);\n\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(\"http://youfood.ddns.net\")\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n RestaurantEndpoints restaurantEndpoints = retrofit.create(RestaurantEndpoints.class);\n}", "public interface ApiCall {\n\n @GET(\"news_feeds\")\n Call<NewsFeedResponse> getNewsFeed(@Query(\"city\") String city, @Query(\"page\") String page);\n\n @GET(\"news\")\n Call<FeedContent> getSingleNewsArticle(@Query(\"city\") String city, @Query(\"news_id\") String newsId);\n\n @GET(\"get_latest_app\")\n Call<FeedHeaderContentResponse> getFeedHeaderResponse(@Query(\"app_name\") String appName, @Query(\"installed_version\") String installedVersion);\n\n @GET(\"jokes\")\n Call<List<JokesResponse>> getAllJokes(@Query(\"page\") String page);\n\n @GET(\"single_joke\")\n Call<SingleJokeResponse> getSingleJoke(@Query(\"joke_id\") String jokeId);\n}", "public interface ApiService {\n @POST(\"/AutoComplete/autocomplete/json\")\n void placeAuto(@Query(\"input\") String input, @Query(\"key\") String key, Callback<AutoComplete> callback);\n\n @POST(\"/geocode/json\")\n void getLatLng(@Query(\"address\") String address, @Query(\"key\") String key, Callback<GeocodingMain> callback);\n\n @POST(\"/directions/json\")\n void getroute(@Query(\"origin\") String origin, @Query(\"destination\") String destination, @Query(\"key\") String key, Callback<Directions> callback);\n\n @POST(\"/geocode/json\")\n void reverseGeoCoding(@Query(\"latlng\") String latLng, @Query(\"key\") String key, Callback<RevGeocodingMain> callback);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n}", "public interface ApiService {\n\n /**\n * L\n * @param body\n * @return\n */\n @POST(\"/api2/signin\")\n Call<ResponseBase<SignInData>>\n login(@NonNull @Body SignInRequestBody body);\n\n\n}", "public interface APIInterface {\n// @GET(\"api/home/books\")\n// Call<BookListResponse> getBookList();\n//\n// @GET(\"api/home/tests\")\n// Call<BookListResponse> getTestList();\n//\n// @GET(\"api/home/banners\")\n// Call<BannerResponse> getBanners();\n//\n\n @GET\n Call<LectureResponse> loadLectures(@Url String url);\n\n @GET\n Call<HomeResponse> loadHomePageFromApi(@Url String url);\n\n @GET(\"api/root\")\n Call<RootApiResponse> loadApiList();\n\n @GET\n Call<BannerResponse> loadBanners(@Url String url);\n\n @GET\n Call<BookListResponse> loadBookList(@Url String url);\n\n @GET\n Call<PracticeDetailResponse> loadPracticeDetail(@Url String url);\n\n @GET\n Call<PracticeListResponse> loadPracticeList(@Url String url);\n\n @GET\n Call<SectionResponse> loadSections(@Url String url);\n\n @GET\n Call<QuestionResponse> loadQuestion(@Url String url);\n\n @GET\n Call<ReadingTestResponse> loadReadingTest(@Url String url);\n\n @GET\n Call<ReadingQuestionResponse> loadReadingAnswer(@Url String url);\n\n @GET\n Call<AudioListRespone> loadAudioList(@Url String url);\n\n @FormUrlEncoded\n @POST\n Call<LoginResponse> login(@Url String url,\n @Field(\"email\") String username,\n @Field(\"password\") String password,\n @Field(\"facebookId\") String facebookId,\n @Field(\"googlePlusId\") String googlePlusId);\n\n @FormUrlEncoded\n @POST\n Call<BaseResponse> logout(@Url String url,\n @Field(\"accessToken\") String accessToken);\n}", "public interface HeroesApi {\n String BASE_URL = \"https://www.simplifiedcoding.net/demos/\";\n\n @GET(\"marvel\")\n Call<List<Hero>> getAll();\n}", "public interface ApiInterFace {\n @GET(\"restaurants\")\n Call<Restaurant_model> getRestaurants();\n\n @POST(\"/profile\")\n @FormUrlEncoded\n Call<LoginFragment.UserSentResponse> sendUserData(@Field(\"name\") String name, @Field(\"picUrl\") String picUrl, @Field(\"email\") String email);\n\n\n @GET(\"/search/{keyword}\")\n Call<SearchModel> search(@Path(\"keyword\") String keyword);\n\n @GET(\"/profile/{id}\")\n Call<UserProfile_model> getUserInfo(@Path(\"id\") String id);\n\n @GET(\"/meal/{id}\")\n Call<RestaurantMealResponse> getRestaurantMeal(@Path(\"id\") int id);\n\n @GET(\"/restaurant/{id}\")\n Call<RestaurantDetailResponse> getRestaurantDetailResponse(@Path(\"id\") int id);\n}", "public interface RokyInfoService {\n\n @FormUrlEncoded\n @POST(\"SpiritServiceApp/v1/send/singleEbike\")\n Call<ResponseBody> singleEbike(@Field(\"ueSn\") String ueSn, @Field(\"data\") String data);\n\n @GET(\"SpiritServiceApp/v1/devices\")\n Call<DevicesMsg> devices(@Query(\"ue_sn_array\") String ueSnArray);\n\n\n @GET(\"SpiritServiceApp/stock/ccus\")\n Call<DevicesMsg> ccus(@Query(\"maxId\") String maxId);\n\n}", "public interface ApiService {\n\n\n // Upload Documents image\n @POST(\"document_upload\")\n Call<ResponseBody> uploadDocumentImage(@Body RequestBody RequestBody, @Query(\"token\") String token);\n\n // Upload Profile image\n @POST(\"upload_profile_image\")\n Call<ResponseBody> uploadProfileImage(@Body RequestBody RequestBody, @Query(\"token\") String token);\n\n\n //Login\n @GET(\"login\")\n Call<ResponseBody> login(@Query(\"mobile_number\") String mobilenumber, @Query(\"user_type\") String usertype, @Query(\"country_code\") String countrycode, @Query(\"password\") String password, @Query(\"device_id\") String deviceid, @Query(\"device_type\") String devicetype, @Query(\"language\") String language);\n\n\n //Login\n @GET(\"vehicle_details\")\n Call<ResponseBody> vehicleDetails(@Query(\"vehicle_id\") long vehicleid, @Query(\"vehicle_name\") String vehiclename, @Query(\"vehicle_type\") String vehicletype, @Query(\"vehicle_number\") String vehiclenumber, @Query(\"token\") String token);\n\n //Forgot password\n @GET(\"forgotpassword\")\n Call<ResponseBody> forgotpassword(@Query(\"mobile_number\") String mobile_number,@Query(\"user_type\") String user_type, @Query(\"country_code\") String country_code, @Query(\"password\") String password, @Query(\"device_type\") String device_type, @Query(\"device_id\") String device_id, @Query(\"language\") String language);\n\n\n @GET(\"add_payout\")\n Call<ResponseBody> addPayout(@Query(\"email_id\") String emailId, @Query(\"user_type\") String userType, @Query(\"token\") String token);\n\n\n //Cancel trip\n @GET(\"cancel_trip\")\n Call<ResponseBody> cancelTrip(@Query(\"user_type\") String type, @Query(\"cancel_reason\") String cancel_reason, @Query(\"cancel_comments\") String cancel_comments, @Query(\"trip_id\") String trip_id, @Query(\"token\") String token);\n\n //Forgot password\n @GET(\"accept_request\")\n Call<ResponseBody> acceptRequest(@Query(\"user_type\") String type, @Query(\"request_id\") String request_id, @Query(\"status\") String status, @Query(\"token\") String token);\n\n //Confirm Arrival\n @GET(\"cash_collected\")\n Call<ResponseBody> cashCollected(@Query(\"trip_id\") String trip_id, @Query(\"token\") String token);\n\n //Confirm Arrival\n @GET(\"arive_now\")\n Call<ResponseBody> ariveNow(@Query(\"trip_id\") String trip_id, @Query(\"token\") String token);\n\n //Begin Trip\n @GET(\"begin_trip\")\n Call<ResponseBody> beginTrip(@Query(\"trip_id\") String trip_id, @Query(\"begin_latitude\") String begin_latitude, @Query(\"begin_longitude\") String begin_longitude, @Query(\"token\") String token);\n\n //End Trip\n @POST(\"end_trip\")\n Call<ResponseBody> endTrip(@Body RequestBody RequestBody);\n\n /*//End Trip\n @GET(\"end_trip\")\n Call<ResponseBody> endTrip(@Query(\"trip_id\") String trip_id, @Query(\"end_latitude\") String begin_latitude, @Query(\"end_longitude\") String begin_longitude, @Query(\"token\") String token);*/\n\n //Trip Rating\n @GET(\"trip_rating\")\n Call<ResponseBody> tripRating(@Query(\"trip_id\") String trip_id, @Query(\"rating\") String rating,\n @Query(\"rating_comments\") String rating_comments, @Query(\"user_type\") String user_type, @Query(\"token\") String token);\n\n\n // Update location with lat,lng and driverStatus\n @GET(\"updatelocation\")\n Call<ResponseBody> updateLocation(@QueryMap HashMap<String, String> hashMap);\n\n\n @GET(\"update_device\")\n Call<ResponseBody> updateDevice(@QueryMap HashMap<String, String> hashMap);\n\n\n // driverStatus Check\n @GET(\"check_status\")\n Call<ResponseBody> updateCheckStatus(@QueryMap HashMap<String, String> hashMap);\n\n @GET(\"earning_chart\")\n Call<ResponseBody> updateEarningChart(@QueryMap HashMap<String, String> hashMap);\n\n @GET(\"driver_rating\")\n Call<ResponseBody> updateDriverRating(@QueryMap HashMap<String, String> hashMap);\n\n @GET(\"rider_feedback\")\n Call<ResponseBody> updateRiderFeedBack(@QueryMap HashMap<String, String> hashMap);\n\n @GET(\"get_rider_profile\")\n Call<ResponseBody> getRiderDetails(@QueryMap HashMap<String, String> hashMap);\n\n //Number Validation\n @GET(\"register\")\n Call<ResponseBody> registerOtp(@Query(\"user_type\") String type, @Query(\"mobile_number\") String mobilenumber, @Query(\"country_code\") String countrycode, @Query(\"email_id\") String emailid, @Query(\"first_name\") String first_name, @Query(\"last_name\") String last_name, @Query(\"password\") String password, @Query(\"city\") String city, @Query(\"device_id\") String device_id, @Query(\"device_type\") String device_type,@Query(\"language\") String languageCode);\n\n @GET(\"driver_trips_history\")\n Call<ResponseBody> driverTripsHistory(@QueryMap HashMap<String, String> hashMap);\n\n //Driver Profile\n @GET(\"get_driver_profile\")\n Call<ResponseBody> getDriverProfile(@Query(\"token\") String token);\n\n\n\n //Driver Profile\n @GET(\"driver_bank_details\")\n Call<ResponseBody> updateBankDetails(@QueryMap HashMap<String, String> hashMap);\n\n //Currency list\n @GET(\"currency_list\")\n Call<ResponseBody> getCurrency(@Query(\"token\") String token);\n\n //language Update\n @GET(\"language\")\n Call<ResponseBody> language(@Query(\"language\") String languageCode, @Query(\"token\") String token);\n\n // Update User Currency\n @GET(\"update_user_currency\")\n Call<ResponseBody> updateCurrency(@Query(\"currency_code\") String currencyCode, @Query(\"token\") String token);\n\n @GET(\"update_driver_profile\")\n Call<ResponseBody> updateDriverProfile(@QueryMap LinkedHashMap<String, String> hashMap);\n\n //Upload Profile Image\n @POST(\"upload_image\")\n Call<ResponseBody> uploadImage(@Body RequestBody RequestBody, @Query(\"token\") String token);\n\n //Sign out\n @GET(\"logout\")\n Call<ResponseBody> logout(@Query(\"user_type\") String type, @Query(\"token\") String token);\n\n //Add payout perference\n @FormUrlEncoded\n @POST(\"add_payout_preference\")\n Call<ResponseBody> addPayoutPreference(@Field(\"token\") String token, @Field(\"address1\") String address1, @Field(\"address2\") String address2, @Field(\"email\") String email, @Field(\"city\") String city, @Field(\"state\") String state, @Field(\"country\") String country, @Field(\"postal_code\") String postal_code, @Field(\"payout_method\") String payout_method);\n\n //Payout Details\n @GET(\"payout_details\")\n Call<ResponseBody> payoutDetails(@Query(\"token\") String token);\n\n //Get Country List\n @GET(\"country_list\")\n Call<ResponseBody> getCountryList(@Query(\"token\") String token);\n\n //List of Stripe Supported Countries\n @GET(\"stripe_supported_country_list\")\n Call<ResponseBody> stripeSupportedCountry(@Query(\"token\") String token);\n\n //Get pre_payment\n @GET(\"payout_changes\")\n Call<ResponseBody> payoutChanges(@Query(\"token\") String token, @Query(\"payout_id\") String payout_id, @Query(\"type\") String type);\n\n // Add stripe payout preference\n @POST(\"add_payout_preference\")\n Call<ResponseBody> uploadStripe(@Body RequestBody RequestBody, @Query(\"token\") String token);\n\n // this api called to resume the trip from MainActivity while Driver get-in to app\n @GET(\"incomplete_trip_details\")\n Call<ResponseBody> getInCompleteTripsDetails(@Query(\"token\") String token);\n\n // get Trip invoice Details Rider\n @GET(\"get_invoice\")\n Call<ResponseBody> getInvoice(@Query(\"token\") String token,@Query(\"trip_id\") String TripId,@Query(\"user_type\") String userType);\n\n //Force Update API\n @GET(\"check_version\")\n Call<ResponseBody> checkVersion(@Query(\"version\") String code, @Query(\"user_type\") String type, @Query(\"device_type\") String deviceType);\n\n //Check user Mobile Number\n @GET(\"numbervalidation\")\n Call<ResponseBody> numbervalidation(@Query(\"mobile_number\") String mobile_number, @Query(\"country_code\") String country_code, @Query(\"user_type\") String user_type, @Query(\"language\") String language, @Query(\"forgotpassword\") String forgotpassword);\n\n\n//Get Bank Details Prefernce\n /* @GET(\"driver_bank_details\")\n Call<ResponseBody> driver_bank_details(@Query(\"account_holder_name\") String account_holder_name, @Query(\"account_number\") String account_number, @Query(\"bank_location\") String bank_location, @Query(\"bank_name\") String bank_name, @Query(\"token\") String token,@Query(\"user_type\")String user_type);\n*/\n}", "public interface BaseModel {\r\n Retrofit retrofit = new Retrofit.Builder()\r\n .baseUrl(\"http://39.107.224.233/firstga/app/\")\r\n .addConverterFactory(GsonConverterFactory.create())\r\n .addCallAdapterFactory(RxJavaCallAdapterFactory.create())\r\n .build();\r\n}", "public interface TravelsService {\n\n /**\n * Get data list.\n *\n * @param query default \"\"\n * @param page default 1\n * @return\n * @throws Exception\n */\n @GET(App.SUFFIX_URL_TRAVELS)\n Call<TravelsMapObject> getData(@Query(\"query\") String query, @Query(\"page\") Integer page) throws Exception;\n\n}", "public interface ApiService {\n\n\n public static final String BASE_URL = \"http://112.124.22.238:8081/course_api/cniaoplay/\";\n\n// @GET(\"featured\")\n// public Call<PageBean<AppInfo>> getApps(@Query(\"p\") String jsonParam);\n\n @GET(\"featured\")\n public Observable<BaseBean<PageBean<AppInfo>>> getApps(@Query(\"p\") String jsonParam);\n\n}", "public interface InterfaceRetrofit {\n\n @GET(\"ligar\")\n Call<Object> liga();\n\n @GET(\"desligar\")\n Call<Object> desliga();\n\n}", "public interface ApiService {\n\n @GET(\"datacatalog?format=json\")\n Call<Catalog> getTopCatalog();\n\n\n/* @GET(\"item/{storyid}.json\")\n Call<StoryResponse> getStoryDetails(@Path(\"storyid\") String storyid);\n\n @GET(\"autocomplete/json\")\n Call<AutoCompleteGooglePlaces> getAutoCompleteResults(@Query(\"key\") String API_KEY,\n @Query(\"input\") String encode);\n\n @GET(\"nearbysearch/json\")\n Call<GetPlacesResponse> getPlaceDetails(@Query(\"location\") String location,\n @Query(\"radius\") int radius,\n @Query(\"key\") String key);*/\n}", "public interface CultureListApiService {\n @GET(Variable._CULTURE_LIST_SERVER_REQUEST_URL)\n Maybe<CultureTotalData> getCultureList(@QueryMap Map<String, String> map);\n\n class Factory extends Converter.Factory{\n public static CultureListApiService create(){\n return RetrofitFactory.initRetrofit().create(CultureListApiService.class);\n }\n }}", "public interface Api {\n @GET(\"topher/2017/May/59121517_baking/baking.json\")\n Call<List<Recipe>> getRecipes();\n}", "public interface Server {\n\n @GET\n Call<CalonModel> getCalon(@Url String url);\n\n}", "public interface Service {\n\n //String BASE_URL=\"https://newsapi.org/\";\n\n @GET(\"v2/everything?sortBy=popularity&apiKey=39dccf90039941938d17156338e5b9f8\")\n Call<Result> getNews(@Query(\"q\")String query, @Query(\"from\")String from, @Query(\"page\")int page,@Query(\"sources\")String orderBy);\n\n}", "public interface RetrofitService {\n\n //TODO.......Created By QiLi.........\n\n /**\n * 登录接口\n * @param userName\n * @param psw\n * @return\n */\n @FormUrlEncoded\n @POST(\"/base/user/login\")\n Observable<BaseResponse<TokenInfo>> doLogin(@Field(\"phone\") String userName, @Field(\"password\") String psw, @Field(\"clientId\") String clientId, @Field(\"imei\") String imei);\n\n /**\n * 用户退出接口\n * @return\n */\n @POST(\"/base/user/logout\")\n Observable<BaseResponse<Boolean>> doLogout();\n\n /**\n * 订单-获取订单\n * @param page 页码\n * @param pageSize 页数\n */\n @POST(\"/buyer/order/list\")\n Observable<BaseResponse<Pager<Order>>> getOrderList(@Query(\"page\") int page,\n @Query(\"pageSize\") int pageSize);\n\n /**\n * 订单-获取订单详情\n */\n @POST(\"/buyer/order/detail\")\n Observable<BaseResponse<Order>> getOrderDetail(@Query(\"orderId\") String orderId);\n\n /**\n * 用户 - 登陆 - QQ登陆\n *\n * @param accessToken\n * @param uid\n */\n @POST(\"/base/user/thirdparty\")\n Observable<BaseResponse<Boolean>> doLoginByQQ(@Query(\"accessToken\") String accessToken,\n @Query(\"authType\") int authType,\n @Query(\"clientId\") String clientId,\n @Query(\"imei\") String imei,\n @Query(\"uid\") String uid);\n\n /**\n * 用户 - 登陆 - 微信登陆\n *\n * @param accessToken\n * @param uid\n */\n @POST(\"callback/wechat/auth\")\n Observable<BaseResponse<Boolean>> doLoginByWeiChat(@Query(\"accessToken\") String accessToken, @Query(\"uid\") String uid);\n\n /**\n * 用户 - 登陆 - 微博登陆\n *\n * @param accessToken\n * @param uid\n */\n @POST(\"callback/weibo/auth\")\n Observable<BaseResponse<Boolean>> doLoginByWeiBo(@Query(\"accessToken\") String accessToken, @Query(\"uid\") String uid);\n\n /**\n * 获取广告Banner图片\n *\n * @param adType 广告位id(app首页轮播图列表id:9)\n */\n @GET(\"/base/ad\")\n Observable<BaseResponse<List<Adv>>> getAdvList(@Query(\"schoolId\")int schoolId, @Query(\"adType\") int adType);\n\n /**\n * 获取食堂配送楼栋\n */\n @POST(\"/buyer/shop/list\")\n Observable<BaseResponse<Pager<StoreStalls>>> getStalls(@Query(\"apartmentId\") int apartmentId,\n @Query(\"page\") int page,\n @Query(\"pageSize\") int pageSize,\n @Query(\"rangeCode\") String rangeCode,\n @Query(\"recomTag\") int recomTag);\n\n /**\n * 获取头条跑马灯\n */\n @POST(\"/buyer/order/marquee\")\n Observable<BaseResponse<List<Marquee>>> getMarquee(@Query(\"schoolId\") int schoolId);\n\n /**\n * 获取主营业务列表\n */\n @POST(\"/buyer/shop/rangelist\")\n Observable<BaseResponse<List<ChannelEntity>>> getRangelist();\n\n /**\n * 获取食堂配送楼栋\n * @param schoolId 配送学校Id\n */\n @POST(\"/buyer/school/apartmentlist\")\n Observable<BaseResponse<List<StoreDelivered>>> getStoreDistributionRange(@Query(\"schoolId\") int schoolId);\n\n /**\n * 选择学校 - 获取定位城市的学校\n * @param areaName 学校所在地区名字\n */\n @POST(\"/buyer/school/list\")\n Observable<BaseResponse<List<AreaCity>>> getSchoolOfLocalCity(@Query(\"areaName\") String areaName);\n\n /**\n * 学校 - LBS:附近学校\n */\n @FormUrlEncoded\n @POST(\"/buyer/school/nearschool\")\n Observable<BaseResponse<List<School>>> getNearSchools(@Field(\"lat\") double lat,\n @Field(\"lng\") double lng,\n @Field(\"distance\") int distance);\n /**\n * 学校 - 检索学校\n */\n @POST(\"/buyer/school/search\")\n Observable<BaseResponse<List<School>>> getSchoolSearchList(@Query(\"schoolName\") String schoolName);\n\n /**\n * 选择学校 - 获取热门城市列表\n */\n @POST(\"area/hotCity\")\n Observable<BaseResponse<List<City>>> getCityHotList();\n\n /**\n * 选择学校 - 获取所有城市列表\n */\n @POST(\"/buyer/area/list\")\n Observable<BaseResponse<CityData>> getCityList();\n\n /**\n * 获取APP信息\n */\n @GET(\"app/auth/androidVersion\")\n Observable<BaseResponse<AppInfoResult>> getAppInfo();\n\n /**\n * 用户-收集手机信息\n * @param userId\n * @param clientId\n * @param os\n * @param osVersion\n * @param deviceModel\n * @param appVersion\n */\n @POST(\"app/collectClientMsg\")\n Observable<BaseResponse<Boolean>> collectClientMsg(@Query(\"userId\") String userId,\n @Query(\"clientId\")String clientId,\n @Query(\"os\")int os,\n @Query(\"osVersion\")String osVersion,\n @Query(\"deviceModel\")String deviceModel,\n @Query(\"appVersion\")String appVersion);\n\n /**\n * 用户 - 信息\n */\n @GET(\"/base/user/current\")\n Observable<BaseResponse<User>> userDoGetInfor();\n\n /**\n * 根据档口获取菜品分类\n * @param shopId 商家id\n */\n @POST(\"/buyer/shop/detail\")\n Observable<BaseResponse<FoodClassList>> getStallsgoodsClass(@Query(\"shopId\") String shopId);\n\n /**\n * 获取档口菜品信息\n * @param shopId 档口Id\n * @param goodsClassId\n * @param page\n * @param pageSize\n */\n @POST(\"/buyer/goods/list\")\n Observable<BaseResponse<Pager<Goods>>> getStallsGoods(@Query(\"apartmentId\") int apartmentId,\n @Query(\"shopId\") String shopId,\n @Query(\"goodsClassId\") String goodsClassId,\n @Query(\"page\")int page,\n @Query(\"pageSize\")int pageSize,\n @Query(\"hotTag\") int hotTag);\n\n\n\n\n /**\n * 用户-下单获取可用红包\n */\n @GET(\"/base/activity/redpacket/queryuserredpacketlist\")\n Observable<BaseResponse<VoucherList>> getUserCoupon();\n\n /**\n * 点餐 - 预计到达时间\n * @param shopId\n */\n @POST(\"/buyer/shop/worktime\")\n Observable<BaseResponse<WorkTimeList>> getEstimatedTime(@Query(\"shopId\") String shopId);\n\n\n /**\n * 订单-获取备注标签\n */\n @GET(\"app/auth/showexplainlabel\")\n Observable<BaseResponse<String>> showexplainlabelReq();\n\n /**\n * 订单-确认下单\n */\n @POST(\"/buyer/order/placeorder\")\n Observable<BaseResponse<String>> placeorder(@Query(\"activityId\") Integer activityId,\n @Query(\"buyerRemark\") String buyerRemark,\n @Query(\"cartIds\") String cartIds,\n @Query(\"channel\") String channel,\n @Query(\"delyEndDate\") String delyEndDate,\n @Query(\"delyFast\") int delyFast,\n @Query(\"delyStartDate\") String delyStartDate,\n @Query(\"shopId\") String shopId,\n @Query(\"userAddressId\") int userAddressId,\n @Query(\"voucherId\") Integer voucherId);\n\n /**\n * 点餐 - 带走 - 绑定手机\n */\n @POST(\"bindPhone\")\n Observable<BaseResponse<Boolean>> doOrderBindPhone(@Query(\"phone\") String phone);\n\n /**\n * 获取下单价格 - 获取实际优惠后价格\n *\n * @param cart_ids 购物车所有商品\n * @param voucherId 优惠券id\n * @param stallsId 档口id\n */\n @POST(\"order/settlement\")\n Observable<BaseResponse<Order>> doPayOrderPrice(@Query(\"cart_ids\") String cart_ids,\n @Query(\"voucherId\")String voucherId,\n @Query(\"stallsId\")String stallsId);\n\n /**\n * 用户 - 钱包 - 支付密码 - 是否认证\n */\n @GET(\"/base/acct/info\")\n Observable<BaseResponse<ActiveInfo>> userWalletPayPswIsAuthReq();\n\n /**\n * 点餐 - 下单 直接下单\n *\n */\n @POST(\"/base/acct/payinfo\")\n Observable<BaseResponse<String>> doPayOrder(\n @Query(\"bizId\") String bizId,\n @Query(\"bizType\")int bizType,\n @Query(\"payPwd\")String payPwd,\n @Query(\"thdType\")int thdType);\n\n\n /**\n * 点餐 - 支付-微信,支付宝\n *\n */\n @POST(\"/base/acct/payinfo\")\n Observable<BaseResponse<Order>> doPayOrder(\n @Query(\"bizId\") String bizId,\n @Query(\"bizType\")int bizType,\n @Query(\"thdType\")int thdType);\n\n /**\n * 用户 - 钱包 - 支付密码 - 认证\n */\n @POST(\"pdauth/auth\")\n Observable<BaseResponse<Boolean>> userWalletPayPswAuthReq(@Query(\"pdPassword\")String pdPassword);\n\n\n\n //TODO.......Created By QiLi.........\n\n /**\n * 七牛 - 请求TOKEN\n * @return\n */\n @POST(\"getQiniuToken\")\n Observable<BaseResponse<String>> getQiNiuTokenRequest(@Query(\"bucketName\") String bucketName);\n\n /**\n * 用户 - 修改 - 头像\n * @param avatarOldKey\n * @param avatarNewKey\n * @return\n */\n @POST(\"modifyAvatar\")\n Observable<BaseResponse<String>> doModifyAvatar(@Query(\"avatarOldKey\") String avatarOldKey,@Query(\"avatarNewKey\") String avatarNewKey);\n\n\n /**\n * 用户 - 修改 - 头像\n * @return\n */\n @POST(\"/base/user/avatar\")\n Observable<BaseResponse<String>> upLoadUserIcon(@Body RequestBody Body);\n\n /**\n * 用户 - 消息列表\n * @return\n */\n @GET(\"/base/msg/user/list\")\n Observable<BaseResponse<Pager<Message>>> getMessageList(@Query(\"page\") int page, @Query(\"pageSize\") int pageSize);\n\n /**\n * 用户 - 修改 - 性别\n * @param sex\n * @return\n */\n @POST(\"modifySex\")\n Observable<BaseResponse<Boolean>> doModifySex(@Query(\"sex\") String sex);\n\n /**\n * 用户 - 修改 - 昵称\n * @param nikeName\n * @return\n */\n @POST(\"/base/user/nick\")\n Observable<BaseResponse<Boolean>> doModifyNickName(@Query(\"nickname\") String nikeName);\n\n\n /**\n * 用户 - 钱包 - 充值活动\n * @return\n */\n @GET(\"pdr/pdActivity\")\n Observable<BaseResponse<List<Action>>> userPDActivity();\n\n /**\n *用户 - 钱包 - 预存款日志记录\n * @param type\n * @param page\n * @param pagesize\n * @return\n */\n @GET(\"new/predeposit/logs\")\n Observable<BaseResponse<Pager<PredepositLog>>> userPredepositLogsReq(@Query(\"type\") Integer type,\n @Query(\"page\") Integer page,\n @Query(\"pagesize\") Integer pagesize);\n\n /**\n * 用户 - 钱包 - 支付密码 - 修改\n * @return\n */\n @POST(\"/base/acct/updatepwd\")\n Observable<BaseResponse<String>> userWalletPayPswModifly(@Query(\"oldPwd\") String oldPwd, @Query(\"newPwd\") String newPwd);\n\n /**\n * 用户 - 钱包 - 支付密码 - 创建\n * @param pdPassword\n * @return\n */\n @POST(\"/base/acct/setpwd\")\n Observable<BaseResponse<Boolean>> userWalletPayPswCreate(@Query(\"payPwd\") String pdPassword);\n\n /**\n *用户 - 钱包 - 支付密码 - 获取验证码\n * @param mobilePhone\n * @param post\n * @return\n */\n @POST(\"pdauth/verifyregcode\")\n Observable<BaseResponse<Boolean>> userWalletPayPswCode(@Query(\"mobilePhone\") String mobilePhone, @Query(\"regcode\") String post);\n\n /**\n * 用户 - 获取验证码\n * @param mobilePhone\n * @return\n */\n @POST(\"/base/msg/code\")\n Observable<BaseResponse<Boolean>> getRegisterCode(@Query(\"codeType\") String codeType, @Query(\"phone\") String mobilePhone);\n\n\n /**\n * 优惠券提现\n * @return\n */\n @GET(\"getCash\")\n Observable<BaseResponse<Integer>> rapGetUserCashCount();\n\n /**\n * 抢单 - 提现\n * @return\n */\n @GET(\"withdrawCash\")\n Observable<BaseResponse<Boolean>> rapDoUserCash();\n\n /**\n * 用户地址列表\n * @return\n */\n @GET(\"/base/user/address\")\n Observable<BaseResponse<UserAddressListEntity>> getAdressList(@Query(\"page\") int page, @Query(\"pageSize\") int pageSize);\n\n /**\n * 删除地址\n * @param addressId\n * @return\n */\n @DELETE(\"/base/user/address\")\n Observable<BaseResponse<Boolean>> userDoAdressDelete(@Query(\"addressId\") int addressId);\n\n /**\n * 用户-修改地址\n * @param addressId\n * @param sex\n * @param apartmentId\n * @param address\n * @param isDefault\n * @return\n */\n @PUT(\"/base/user/address\")\n Observable<BaseResponse<Boolean>> doModifyAdress(@Query(\"address\") String address,\n @Query(\"addressId\") int addressId,\n @Query(\"apartmentId\") int apartmentId,\n @Query(\"isDefault\") int isDefault,\n @Query(\"name\") String name,\n @Query(\"phone\") String phone,\n @Query(\"sex\") int sex);\n\n /**\n * 用户-设置默认地址\n * @param addressId\n * @return\n */\n @POST(\"/base/user/address/default\")\n Observable<BaseResponse<Boolean>> setAddressDefault(@Query(\"addressId\") int addressId);\n\n /**\n * 点餐 - 获取学校列表和宿舍列表\n * @param schoolId\n * @return\n */\n @GET(\"school/schoolApartmentZones\")\n Observable<BaseResponse<SchoolApartment>> getApartmentBySchoolId(@Query(\"schoolId\") int schoolId);\n\n /**\n * 用户-添加地址\n * @param sex\n * @param apartmentId\n * @param address\n * @param mobPhone\n * @param isDefault\n * @return\n */\n @POST(\"/base/user/address\")\n Observable<BaseResponse<UserAddress>> doAddAdress(@Query(\"name\") String name,\n @Query(\"sex\") String sex,\n @Query(\"apartmentId\") int apartmentId,\n @Query(\"address\") String address,\n @Query(\"phone\") String mobPhone,\n @Query(\"isDefault\") String isDefault);\n\n /**\n * 用户 - 邀请好友\n * @param userId\n * @return\n */\n @GET(\"invitefriends/invite\")\n Observable<BaseResponse<InviteInfo>> getUserInviteInfo(@Query(\"userId\") String userId);\n\n /**\n * 用户 - 提交反馈信息\n * @param content\n * @return\n */\n @POST(\"/base/user/feedback\")\n Observable<BaseResponse<Boolean>> doUserFeedBack(@Query(\"content\") String content);\n\n /**\n * 用户 - 修改密码\n * @param oldpassword\n * @param password\n * @return\n */\n @POST(\"/base/user/pwd/modify\")\n Observable<BaseResponse<Boolean>> doUserModifyPassword(@Query(\"oldPwd\") String oldpassword,\n @Query(\"newPwd\") String password);\n\n\n /**\n * 用户 - 钱包 - 充值\n */\n @POST(\"predeposit\")\n Observable<BaseResponse<PredepositOrder>> doWellatPredeposit(@Query(\"paymentId\") int paymentId,\n @Query(\"predeposit\") double predeposit);\n\n /**\n * 用户-修改密码\n */\n @POST(\"newsignup\")\n Observable<BaseResponse<Boolean>> SignUpReq(@Query(\"schoolId\") int schoolId,\n @Query(\"mobilePhone\") String mobilePhone,\n @Query(\"regcode\") String regcode,\n @Query(\"password\") String password,\n @Query(\"type\") int type,\n @Query(\"invitationCode\") String invitationCode);\n\n /**\n * 用户-注册\n */\n @POST(\"/base/user/register\")\n Observable<BaseResponse<Boolean>> doRegister(@Query(\"inviteCode\") String invitationCode, @Query(\"password\") String password, @Query(\"phone\") String phone,@Query(\"verificationCode\") String regcode);\n\n /**\n * 取消订单\n */\n @POST(\"/buyer/order/cancel\")\n Observable<BaseResponse<Boolean>> orderDoCancal(@Query(\"orderId\") String orderId);\n\n /**\n\n * 订单 - 确认收获\n * @param orderId\n */\n @POST(\"/buyer/order/complete\")\n Observable<BaseResponse<Boolean>> userOrderComplete(@Query(\"orderId\") String orderId);\n\n /**\n * 订单 - 催单\n */\n @POST(\"/buyer/order/reminder\")\n Observable<BaseResponse<Integer>> userOrderHurry(@Query(\"orderId\") String orderId);\n\n /**\n\n * 订单 - 获取结算订单详情\n */\n @POST(\"/buyer/order/settlement\")\n Observable<BaseResponse<VoucherList>> setTlement(@Query(\"cartIds\") String cartIds, @Query(\"shopId\") String shopId);\n\n /**\n * 订单 - 商品 - 评价\n */\n @POST(\"order/orderGoods/{goodId}\")\n Observable<BaseResponse<Boolean>> userOrderGoodEvaluate(@Path(\"orderId\") String goodId, @Query(\"scores\") int scores) ;\n\n /**\n * 订单 - 商品 - 评价\n */\n @POST(\"/buyer/order/evaluate\")\n Observable<BaseResponse<String>> evaluate(@Query(\"content\")String content,\n @Query(\"orderId\")String orderId,\n @Query(\"service\")int service,\n @Query(\"speed\")int speed,\n @Query(\"taste\")int taste) ;\n\n /**\n * 选择学校 - 获取学校通过城市Id\n */\n @GET(\"school/acquisitionAreaSchool\")\n Observable<BaseResponse<List<AreaCity>>> getSchoolByAreaId(@Query(\"areaId\") int areaId, @Query(\"areaName\") String areaName);\n\n /**\n * 点餐 - 指定学校的餐厅列表\n * @param schoolId 学校id\n */\n @GET(\"school/stores\")\n Observable<BaseResponse<List<Store>>> getSchoolStorList(@Query(\"schoolId\") int schoolId);\n\n /**\n * 抢单 - 用户 - 认证\n *\n * @param phone 电话\n * @param certificate 证件照片地址\n * @param apartmentId 宿舍id\n * @param address 详细地址\n */\n @POST(\"userjoinin\")\n Observable<BaseResponse<Boolean>> rapDoUserJoin(@Query(\"name\") String name,\n @Query(\"phone\") String phone,\n @Query(\"certificate\") String certificate,\n @Query(\"apartmentId\") int apartmentId,\n @Query(\"address\") String address);\n\n\n\n}", "public interface GetCountryDataService {\n\n\n\n @GET(\"country/get/all\")\n Call<Info> getResults();\n\n\n\n\n\n\n\n\n}", "public interface RetroiftService {\n @GET(\"catalog\")\n Call<CgBaseEntity> getCategories(@Query(\"key\") String key);\n\n @FormUrlEncoded\n @POST(\"query\")\n Call<BookBaseEntity> getBookList(@Field(\"catalog_id\") String id, @Field(\"pn\") String\n pn, @Field(\"rn\") String rn, @Field(\"key\") String key);\n\n}", "public interface AppAPI {\n\n @GET(\"weather\")\n Call<WeatherInfo> getCurrentWeather(@Query(\"id\") long cityId,\n @Query(\"units\") String units,\n @Query(\"appid\") String appId);\n\n @GET(\"forecast\")\n Call<Forecast> getForecast3hrs(@Query(\"id\") long cityId,\n @Query(\"units\") String units,\n @Query(\"appid\") String appId);\n\n @GET(\"find\")\n Call<CityResult> findCity(@Query(\"q\") String cityName,\n @Query(\"type\") String type,\n @Query(\"sort\") String sort,\n @Query(\"cnt\") int cnt,\n @Query(\"appid\") String appId);\n}", "public interface PokemonService {\n @GET(\"pokemon/?limit=151\")\n Call<ListResponse> listPokemon();\n}", "public interface CountryListAPI {\n\n //@POST(Constants.NewSessionURL)\n //Call<Session>createSession(@Body loginRequest loginRequest);\n\n @GET(Constants.CountriesListURL)\n Call<List<Country>> getAllCountries();\n\n\n\n}", "public interface ApiInterface {\n @GET(\"json/movies.json\")\n Call<List<Movie>> getStudentDetails();\n}", "public interface RetrofitTradeService {\n @FormUrlEncoded\n @POST(\"/api/trade/usertrades.json\")\n @ServiceMethod(\"userTrades\")\n Observable<DefResponse<List<PurchaseHistoryModel>>> userTrades(@Field(\"page\") int page);\n\n @FormUrlEncoded\n @POST(\"/api/butlerservice/info.json\")\n @ServiceMethod(\"butlerserviceInfo\")\n Observable<DefResponse<ButlerserviceInfo>> butlerserviceInfo(@Field(\"serviceNo\") String serviceNo);\n\n @FormUrlEncoded\n @POST(\"/api/butlerservice/pay.json\")\n @ServiceMethod(\"butlerservicePay\")\n Observable<DefResponse<PayInfo>> butlerservicePay(@Field(\"serviceNo\") String serviceNo, @Field(\"payType\") int payType, @Field(\"payPassword\") String payPassword);\n}", "public interface ApiInterface {\n\n\n @GET(\"articles/\")\n Call<NewsResponse> getTopNews(@Query(\"source\") String source, @Query(\"sortBy\") String sortby, @Query(\"apiKey\") String apiKey);\n\n\n @Headers(\"X-Auth-Token: 8899bb9e61d04e20b2de5ec3d26e5ecf\")\n @GET(\"competitions/{champion_id}/leagueTable\")\n Call<LeagueTableResponse> getLeagueTable(@Path(\"champion_id\") int championId);\n\n\n @Headers(\"X-Auth-Token: 8899bb9e61d04e20b2de5ec3d26e5ecf\")\n @GET(\"competitions/{champion_id}/fixtures?matchday=16\")\n Call<LeagueMatchesResponse> getLeagueMatches(@Path(\"champion_id\") int championId);\n\n @Headers(\"X-Auth-Token: 8899bb9e61d04e20b2de5ec3d26e5ecf\")\n @GET(\"teams/{team_id}/players\")\n Call<PlayerResponse> getTeamPlayers(@Path(\"team_id\") int teamId);\n\n class ApiClient {\n\n public static final String BASE_URL = \"https://newsapi.org/v1/\";\n private static Retrofit retrofit = null;\n\n\n public static Retrofit getClient() {\n if (retrofit == null) {\n retrofit = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n }\n return retrofit;\n }\n }\n\n class ApiClientFootBall {\n\n public static final String BASE_URL_FOOT_BALL = \"http://api.football-data.org/v1/\";\n private static Retrofit retrofit = null;\n\n\n public static Retrofit getClient() {\n if (retrofit == null) {\n retrofit = new Retrofit.Builder()\n .baseUrl(BASE_URL_FOOT_BALL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n }\n return retrofit;\n }\n }\n}", "public interface MainService {\n @FormUrlEncoded\n @POST(Constants.Url.LOOKUP_STEAMID)\n Call<ResponseBody> lookupSteamId(@Field(Constants.Key.ID) String id);\n\n @POST(Constants.Url.REQUEST_FETCH)\n Call<BaseResponse> requestFetch(@Path(Constants.Key.STEAM_ID_64) String steamId64);\n\n @GET(Constants.Url.GET_PROFILE)\n Call<Profile> getProfile(@Path(Constants.Key.STEAM_ID_64) String steamId64);\n\n @GET(Constants.Url.GET_FRIENDS)\n Call<ArrayList<Profile>> getFriends(@Path(Constants.Key.STEAM_ID_64) String steamId64);\n\n\n\n //Factory\n class Factory {\n public static MainService create() {\n HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();\n interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n OkHttpClient.Builder httpClient = new OkHttpClient.Builder();\n OkHttpClient client = httpClient\n .connectTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(30, TimeUnit.SECONDS)\n .readTimeout(30, TimeUnit.SECONDS)\n .addInterceptor(interceptor)\n .build();\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(Constants.Url.DOMAIN)\n .addConverterFactory(GsonConverterFactory.create())\n .client(client)\n .build();\n return retrofit.create(MainService.class);\n }\n }\n}", "public interface Api {\n @Headers({\"Content-Type: application/json\",\"Accept: application/json\"})\n @POST(\"anslogsave\")\n Call<ResponseBody> anslogsave(@Body RequestBody anslog);\n\n @Headers({\"Content-Type: application/json\",\"Accept: application/json\"})\n @POST(\"robotlogsave\")\n Call<ResponseBody> robotlogsave(@Body RequestBody robotlogsave);\n\n @Headers({\"Content-Type: application/json\",\"Accept: application/json\"})\n @POST(\"robotstatsave\")\n Call<ResponseBody> robotstatsave(@Body RequestBody robotstatsave);\n\n @FormUrlEncoded\n @POST(\"borr\")\n Call<String> borr(@Field(\"title\")String title,\n @Field(\"inflag\")int inflag);\n @FormUrlEncoded\n @POST(\"guide\")\n Call<String> guide(@Field(\"title\")String title);\n @FormUrlEncoded\n @POST(\"\")\n Call<String> baidu();\n\n @Headers({\"Content-Type: application/json\",\"Accept: application/json\"})\n @POST(\"data\")\n Call<ResponseBody> upCewen(@Body RequestBody upCewen);\n\n @GET(\"doc_list?\")\n Call<String> search(@Query(\"search_txt\")String search);\n}", "public interface WeatherApi {\n @GET(\"weather\")\n Observable<Weather> getWeather(@Query(\"q\") String cityName, @Query(\"units\") String units, @Query(\"APPID\") String openWeatherApiKey);\n\n @GET(\"weather\")\n Call<Weather> getWeather2(@Query(\"q\") String cityName, @Query(\"units\") String units, @Query(\"APPID\") String openWeatherApiKey);\n}", "public interface NeighborService {\n\n\n @FormUrlEncoded\n @POST(\"login/\")\n Call<TokenInfo> login(@Field(\"username\") String userName, @Field(\"password\") String password);\n\n @GET(\"{id}/user/\")\n Call<User> getUser(@Path(\"id\") String userId);\n\n @GET(\"{id}/user/\")\n Observable<User> getUserRx(@Path(\"id\") String userId);\n\n\n}", "public interface APIService {\n\n String baseUrl = \"http://api.zhuishushenqi.com\";\n\n /**\n */\n// @FormUrlEncoded\n// @POST(\"/cats/lv2/statistics/\")\n// Flowable<GetListRsp> login(@Field(\"username\") String username,\n// @Field(\"password\") String password);\n\n /**\n * GetListRsp\n */\n @GET(\"/cats/lv2/statistics/\")\n Observable<GetListRsp> login(@QueryMap Map<String, String> params);\n}", "public interface Service {\n @GET(\"/orama-media/json/fund_detail_full.json?limit=1000&offset=0&serializer=fund_detail_full\")\n Call<List<Example>> getExample();\n\n}", "public interface ConnectService {\n\n @GET(\"/api/v1/categories\")\n void getCategories(\n @Query(\"parent_id\") int parentId,\n @Query(\"page\") int page,\n @Query(\"page_size\") int pageSize,\n Callback<Response<ArrayList<Category>>> callback\n );\n\n @GET(\"/api/v1/products\")\n void getProducts(\n @Query(\"category_id\") int categoryId,\n @Query(\"page\") int page,\n @Query(\"page_size\") int pageSize,\n Callback<Response<ArrayList<Product>>> callback\n );\n\n @GET(\"/api/v1/product\")\n void getProduct(\n @Query(\"product_id\") int productId,\n Callback<Response<Product>> callback\n );\n\n @POST(\"/api/v1/system/feedback\")\n void sendFeedback(\n @Query(\"content\") String content,\n @Query(\"contact\") String contact,\n Callback<Response> callback\n );\n\n @POST(\"/api/v1/system/contribute\")\n void contribute(\n @Query(\"title\") String title,\n @Query(\"contact\") String contact,\n Callback<Response> callback\n );\n}", "public interface ServiceApi\n{\n @GET(\"{list}\")\n Call<ResponseBody> request(@Path(\"list\") String postfix, @QueryMap HashMap<String, Object> params);\n}", "public interface Weather {\n @GET(\"/data/2.5/forecast/daily?mode=json\")\n Call<Result> forecast(@Query(\"q\") String q, @Query(\"units\") String units, @Query(\"cnt\") int cnt, @Query(\"appid\") String appid);\n}", "public interface ApiService {\n //用户中心首页头像名称显示\n @GET(\"app/ucenter/profile/\")\n Observable<MeInfoBean> loadHeadInfo(@Query(\"uid\") int uid);\n //个人资料修改\n @FormUrlEncoded\n @POST(\"app/ucenter/profileSave/\")\n Observable<RequestStatusBean> changeUserInfo(@FieldMap Map<String, String> map);\n\n //修改用户头像\n @Multipart\n @POST(\"app/ajax/uploadAvatarPic/\")\n Observable<UserHeadBean> changeUserHead(@Part(\"uid\") RequestBody uid, @Part MultipartBody.Part file);\n\n //收货地址列表\n @GET(\"app/ucenter/address\")\n Observable<GoodsListBean> loadGoodsAddress(@Query(\"uid\") int uid);\n\n //收货地址保存\n @FormUrlEncoded\n @POST(\"app/ucenter/addressSave\")\n Observable<RequestStatusBean> savaGoodsAddress(@FieldMap Map<String,String> map);\n\n //修改默认地址\n @GET(\"app/ucenter/addressDefault\")\n Observable<RequestStatusBean> setDefaulsAddress(@QueryMap Map<String, String> param);\n\n //获得收藏列表\n @FormUrlEncoded\n @POST(\"app/ucenter/favoriteList/\")\n Observable<CollectListBean> getCollectList(@FieldMap Map<String, String> param);\n\n //添加收藏\n\n @GET(\"app/ucenter/favoriteAdd\")\n Observable<RequestStatusBean> addCollect(@QueryMap Map<String, String> param);\n\n //添加收藏\n @GET(\"app/goods/workshopFav/\")\n Observable<RequestStatusBean> workshopFav(@QueryMap Map<String, String> param);\n\n //取消收藏\n @GET(\"app/ucenter/favoriteDelete\")\n Observable<RequestStatusBean> cacheCollect(@QueryMap Map<String, String> param);\n\n //我的足迹\n @FormUrlEncoded\n @POST(\"app/ucenter/historyList\")\n Observable<FootpringBean> loadFootprint(@FieldMap Map<String,String> map);\n\n //删除足迹\n @FormUrlEncoded\n @POST(\"app/ucenter/historyDelete\")\n Observable<RequestStatusBean> clearFootPrint(@FieldMap Map<String,String> map);\n\n //购物车\n @GET(\"app/ucenter/shopcartList/\")\n Observable<ShopcartListBean> getShoppCartList(@Query(\"uid\") int id);\n\n //加载单个购物车\n @FormUrlEncoded\n @POST(\"app/ucenter/shopcartShow\")\n Observable<SingleShoppCartBean> loadSingleShpCart(@FieldMap Map<String, String> param);\n\n //修改购物车\n @FormUrlEncoded\n @POST(\"app/ucenter/shopcartEdit\")\n Observable<RequestStatusBean> changeShopCart(@FieldMap Map<String, String> param);\n\n //删除购物车商品\n @GET(\"app/ucenter/shopcartDelete\")\n Observable<RequestStatusBean> deleteShoppCart(@QueryMap Map<String, String> param);\n\n //购物车下单确认\n @FormUrlEncoded\n @POST(\"app/order/confirm_shopcart/\")\n Observable<ShopCartOrderSureBean> shopCartOrderSure(@FieldMap Map<String, String> param);\n\n //获得订单列表\n @FormUrlEncoded\n @POST(\"app/order/orderList\")\n Observable<MyOrderBean> getOrderList(@FieldMap Map<String, String> param);\n\n //查询订单\n @FormUrlEncoded\n @POST(\"app/order/orderSelect\")\n Observable<MyOrderBean> queryOrderList(@FieldMap Map<String,String> map);\n\n //获得订单详情\n @FormUrlEncoded\n @POST(\"app/order/orderDetail\")\n Observable<MyOrderBean> getOrderDetails(@FieldMap Map<String,String> map);\n\n //取消订单\n @FormUrlEncoded\n @POST(\"app/order/orderDelete\")\n Observable<RequestStatusBean> cancelOrder(@FieldMap Map<String,String> map);\n\n //确认收货\n @FormUrlEncoded\n @POST(\"app/order/order_receive/\")\n Observable<RequestStatusBean> sureGoods(@FieldMap Map<String,String> map);\n\n //退款申请\n\n //登录\n @FormUrlEncoded\n @POST(\"app/user/dologin/\")\n Observable<RequestStatusBean> Login(@FieldMap Map<String,String> map);\n\n //注册\n @FormUrlEncoded\n @POST(\"app/user/doreg/\")\n Observable<RequestStatusBean> Register(@FieldMap Map<String,String> map);\n\n // 找回密码\n @POST(\"ios/user/getpassword/\")\n Observable<RequestStatusBean> FindPwd(@QueryMap Map<String,String> map);\n\n // 获取验证码\n @GET(\"app/ajax/checkpost/\")\n Observable<RequestStatusBean> getCode(@QueryMap Map<String,String> map);\n\n // 手机快捷登录获取验证码\n @GET(\"app/ajax/logincheck/\")\n Observable<RequestStatusBean> getPhoneLoginCode(@QueryMap Map<String,String> map);\n\n //手机快捷登录\n @FormUrlEncoded\n @POST(\"app/user/quicklogin/\")\n Observable<LoginBean> phoneLogin(@FieldMap Map<String,String> map);\n\n //修改密码\n @FormUrlEncoded\n @POST(\"app/user/changepassword/\")\n Observable<RequestStatusBean> changePwd(@FieldMap Map<String,String> map);\n\n //手机号绑定\n @GET(\"app/ucenter/mobile_save/\")\n Observable<RequestStatusBean> bindPhone(@QueryMap Map<String,String> map);\n\n //获得绑定的手机号码\n @GET(\"app/ucenter/mobile_binding/\")\n Observable<RequestStatusBean> loadBindPhone(@Query(\"uid\") int uid);\n\n //获得微信登录的数据\n @GET()\n Observable<WechatBean> getWeChatLoginData(@Url String url);\n\n //微信登录\n @FormUrlEncoded\n @POST(\"app/user/wxlogin/\")\n Observable<RequestStatusBean> weChatLogin(@FieldMap Map<String,String> map);\n\n //绑定微信号\n @GET(\"app/user/wxreg/\")\n Observable<RequestStatusBean> bindWeChat(@QueryMap Map<String, String> param);\n\n //微信解除绑定\n @GET(\"app/user/wxunbind/\")\n Observable<RequestStatusBean> unBindWeChat(@Query(\"uid\") int uid);\n\n //微信绑定显示\n @GET(\"app/user/wxshow/\")\n Observable<RequestStatusBean> showBindWeChart(@Query(\"uid\") int uid);\n\n //加载微信用户信息\n @GET()\n Observable<WechatInfoBean> getWeChatInfo(@Url String url);\n\n //我的评论\n @GET(\"app/ucenter/commentList/\")\n Observable<MyCommentBean> loadMyComment(@Query(\"uid\") int uid);\n //发布评论\n @FormUrlEncoded\n @POST(\"app/ucenter/commentSave/\")\n Observable<RequestStatusBean> addComment(@FieldMap Map<String, String> param);\n\n //发布追评\n @FormUrlEncoded\n @POST(\"app/ucenter/commentAddSave/\")\n Observable<RequestStatusBean> addAddComment(@FieldMap Map<String, String> param);\n\n //上传评论图片\n @Multipart\n @POST(\"app/ajax/uploadCommentPic/\")\n Observable<CommentPicBean> addCommentPic(@Part MultipartBody.Part file);\n\n //退款列表\n @GET(\"app/order/refundList/\")\n Observable<RefundBean> loadRefundList(@Query(\"uid\") int uid);\n\n //退款详情\n @GET(\"app/order/refundOrder/\")\n Observable<RefundDetailBean> loadRefundDetail(@QueryMap Map<String, String> param);\n\n //撤销退款\n @GET(\"app/order/refundDel/\")\n Observable<RequestStatusBean> refundDel(@QueryMap Map<String, String> param);\n\n //退款物流信息\n @GET(\"app/order/expressviewrefund/\")\n Observable<ResponseBody> loadRefundExpress(@Query(\"refundno\") String refundno);\n\n //物流信息\n @GET(\"app/order/expressView/\")\n Observable<ResponseBody> loadExpress(@Query(\"orderno\") String orderno);\n\n\n //退款申请\n @FormUrlEncoded\n @POST(\"app/order/refundApply/\")\n Observable<RequestStatusBean> refundApply(@FieldMap Map<String, String> param);\n\n //退款图片上传\n @Multipart\n @POST(\"app/ajax/uploadRefundPic/\")\n Observable<CommentPicBean> uploadRefundPic(@Part MultipartBody.Part file);\n\n //提交退货\n @FormUrlEncoded\n @POST(\"app/order/refundExpress/\")\n Observable<RequestStatusBean> refundGood(@FieldMap Map<String, String> param);\n\n //首页今日专场轮播图\n @GET(\"app/dailyTopSlider/\")\n Observable<WeekTopListBean> getDailyTopSlider();\n\n //首页今日专场列表\n @GET(\"app/dailyList/\")\n Observable<ListBean<DailyBean>> getDailyList();\n\n //首页7日轮播图\n @GET(\"app/weekTop/\")\n Observable<WeekTopListBean> getWeekTop();\n //首页7日爆款列表\n @GET(\"app/weekList/\")\n Observable<WeekListBean> getWeekList(@QueryMap Map<String, String> param);\n\n //首页往期专场\n @GET(\"app/pastList/\")\n Observable<ListBean<DailyBean>> getPastList();\n\n //产品分类\n @GET(\"app/sorted/\")\n Observable<SortedListBean> getSorted();\n\n //专题详情列表\n @GET(\"app/goods/specialGoodsList/\")\n Observable<SpecialDetailBean> getSpecialGoodsList(@QueryMap Map<String, String> param);\n\n //商品详情\n @GET(\"app/goods/goodsDetail/\")\n Observable<GoodsDetailBean> getGoodsDetail(@QueryMap Map<String, String> param);\n //商品详情的同类推荐\n @GET(\"app/recommend/\")\n Observable<SimilarRecommenListBean> getSimilarRecommen(@Query(\"tid\") int tid);\n\n //工作室\n @GET(\"app/goods/workshopList/\")\n Observable<StudioBean> getStudio();\n\n //工作室\n @GET(\"app/goods/workshopGoods/\")\n Observable<StudioShopBean> getStudioShop(@QueryMap Map<String, String> param);\n\n //收藏工作室\n @GET(\"app/goods/workshopFav/\")\n Observable<RequestStatusBean> focusWork(@QueryMap Map<String, String> param);\n\n @FormUrlEncoded\n @POST(\"app/order/confirm\")\n Observable<OrderSureBean> orderSure(@FieldMap Map<String, String> param);\n\n //创建订单\n @FormUrlEncoded\n @POST(\"app/order/create\")\n Observable<RequestStatusBean> createOrder(@FieldMap Map<String, String> param);\n\n //创建购物车订单\n @FormUrlEncoded\n @POST(\"app/order/create_shopcart\")\n Observable<RequestStatusBean> createShopCartOrder(@FieldMap Map<String, String> param);\n\n //查询商品列表\n @GET(\"app/goods/goodsSorted\")\n Observable<SpecialDetailBean> goodsSorted(@QueryMap Map<String, String> param);\n\n //收入明细\n @FormUrlEncoded\n @POST(\"app/user/getFinance\")\n Observable<TuiguangItem1Bean> tuiguangItem1(@FieldMap Map<String, String> param);\n //人脉资源\n @FormUrlEncoded\n @POST(\"app/user/getUserSub\")\n Observable<TuiguangItem2Bean> tuiguangItem2(@FieldMap Map<String, String> param);\n}", "public interface ApiInterface {\n\n @GET(\"Articles/\")\n Call<List<Article>> getAllArticles();\n\n\n}", "public interface TypiCodeServices {\n @GET(\"/photos\")\n Call<ArrayList<Model>> data();\n}", "interface OpenWeatherMapService {\n @GET(\"forecast/daily\")\n Call<Forecast> dailyForecast(\n @Query(\"q\") String city,\n @Query(\"mode\") String format,\n @Query(\"units\") String units,\n @Query(\"cnt\") Integer num,\n @Query(\"appid\") String appid);\n}", "public interface RetrofitInterface {\n\n @GET(\"/login\")\n Call<LoginUser> getLoginUser(@Query(\"username\") String username, @Query(\"password\") String password );\n\n @GET(\"/userlists\")\n Call<UserList> getUserLists();\n\n @GET(\"/userdetail\")\n Call<UserDetail> getUserDetail(@Query(\"id\") String id);\n\n @PUT(\"/userupdate\")\n Call<UserDetail> updateUserDetail(@Query(\"id\") String id, @Query(\"phone\") String phone, @Query(\"address\") String address);\n\n}", "public interface Service {\n\n @GET(\"/search/users?q=language:android+location:india\")\n Call<ItemResponse> getItem();\n\n\n\n}", "public interface ApiService {\n @GET(\"MainQuize.json\")//list\n Call<MainQuizeDao> loadPhotoList();\n}", "public interface API {\n\n //Penyakit\n @GET(\"penyakitall/{page}/{count_page}\")\n Call<DiseaseResponse>\n getDiseaseList(@Path(\"page\") String page, @Path(\"count_page\") String count_page);\n\n @GET(\"penyakit/{page}/{count_page}\")\n Call<DiseaseResponse>\n getDiseaseListByLokasi(@Path(\"page\") String page, @Path(\"count_page\") String count_page, @Query(\"id_desa\") String id_desa);\n\n @POST(\"penyakit\")\n Call<DiseasePostResponse>\n postDisease(@Body DiseaseBody diseaseBody);\n @DELETE(\"penyakit\")\n Call<DeletePenyakitResponse> deletePenyakit(@Query(\"Id_penyakit\") String id_penyakit);\n\n @PUT(\"penyakit\")\n Call<PutPenyakitResponse> editPenyakit(@Query(\"Id_penyakit\") String id_penyakit,\n @Body PutPenyakitBody putPenyakitBody);\n\n @GET(\"tipepenyakit/{page}/{count_page}\")\n Call<TipePenyakitResponse>\n getTipePenyakitList(@Path(\"page\") String page, @Path(\"count_page\") String count_page);\n\n @POST(\"multimedia\")\n Call<MultimediaPostResponse>\n postMultimedia(@Body MultimediaBody multimediaBody);\n}", "public interface Service {\n @GET(Constants.URL_GET_USER)\n Call<JsonObject> getDataUser();\n\n}", "public interface LifeService {\n\n String URL = \"http://www.life.borombo.com/\";\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(LifeService.URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n LifeService service = retrofit.create(LifeService.class);\n\n @GET(\"/wp-json/wp/v2/posts\")\n Call<List<Post>> listPosts();\n\n @GET(\"/wp-json/wp/v2/users/{user}\")\n Call<User> getAuthor(@Path(\"user\") int user);\n\n @GET(\"/wp-json/wp/v2/media/{media}\")\n Call<Media> getMedia(@Path(\"media\") int media);\n\n @GET(\"/wp-json/wp/v2/categories/{categorie}\")\n Call<Categorie> getCategorie(@Path(\"categorie\") int categorie);\n\n @GET(\"/wp-json/wp/v2/tags/{tag}\")\n Call<Tag> getTag(@Path(\"tag\") int tag);\n}", "public interface ApiService {\n\n\n //--------------------------------------------Movies------------------------------------------------------------------------------\n\n @GET(\"discover/movie?\" + ApiConstants.ApiKey)\n Call<MovieModel> getMoviesByGenre(@Query(\"with_genres\") String genre,@Query(\"page\") int page);\n\n @GET(\"discover/movie?\" + ApiConstants.ApiKey)\n Call<MovieModel> getMoviesByYear(@Query(\"primary_release_year\") int year,@Query(\"page\") int page);\n\n @GET(\"movie/{popular}?\" + ApiConstants.ApiKey)\n Call<MovieModel> getMovies(@Path(\"popular\")String popular,@Query(\"page\") int page);\n\n @GET(\"movie/{movie_id}?\" + ApiConstants.ApiKey)\n Call<Movie> getMovie(@Path(\"movie_id\") int link,@Query(\"append_to_response\")String credits);\n\n @GET(\"movie/{movie_id}/credits?\" + ApiConstants.ApiKey)\n Call<CreditsModel> getMovieCredits(@Path(\"movie_id\") int link);\n\n @GET(\"genre/movie/list?\" + ApiConstants.ApiKey)\n Call<GenresModel> getGenres();\n\n @GET(\"movie/{movie_id}/\" + \"similar?\" + ApiConstants.ApiKey)\n Call<MovieModel> getSimilar(@Path(\"movie_id\") int link);\n\n @GET(\"movie/{movie_id}/\" + \"videos?\" + ApiConstants.ApiKey)\n Call<VideoModel> getVideo(@Path(\"movie_id\") int link);\n\n @GET(\"search/movie?\" + ApiConstants.ApiKey)\n Call<MovieModel> getSearchMovie(@Query(\"query\") String query);\n\n @GET(\"movie/{movie_id}/images?\" + ApiConstants.ApiKey)\n Call<ImageModel> getMovieImages(@Path(\"movie_id\") int link);\n\n @GET(\"movie/{movie_id}/reviews?\" + ApiConstants.ApiKey)\n Call<ReviewsModel> getMovieReviews(@Path(\"movie_id\") int link);\n\n //--------------------------------------------Shows------------------------------------------------------------------------------\n @GET(\"genre/tv/list?\" + ApiConstants.ApiKey)\n Call<GenresModel> getTVGenres();\n\n @GET(\"discover/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getTVByGenre(@Query(\"with_genres\") String genre,@Query(\"page\") int page);\n\n @GET(\"discover/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getTVByNetwork(@Query(\"with_networks\") int id,@Query(\"page\") int page);\n\n @GET(\"discover/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getTVByYear(@Query(\"primary_release_year\") int year,@Query(\"page\") int page);\n\n @GET(\"tv/{tv_id}?\" + ApiConstants.ApiKey)\n Call<Shows> getShows(@Path(\"tv_id\") int link ,@Query(\"append_to_response\")String credits);\n\n @GET(\"tv/{shows}?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getShows(@Path(\"shows\")String shows,@Query(\"page\") int page);\n\n @GET(\"search/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getSearchShows(@Query(\"query\") String query);\n\n @GET(\"tv/{tv_id}/\" + \"videos?\" + ApiConstants.ApiKey)\n Call<VideoModel> getShowVideo(@Path(\"tv_id\") int link);\n\n @GET(\"tv/{tv_id}/\" + \"similar?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getSimilarShows(@Path(\"tv_id\") int link);\n\n @GET(\"tv/{tv_id}/credits?\" + ApiConstants.ApiKey)\n Call<CreditsModel> getShowCredits(@Path(\"tv_id\") int link);\n\n @GET(\"tv/{tv_id}/images?\" + ApiConstants.ApiKey)\n Call<ImageModel> getShowsImages(@Path(\"tv_id\") int link);\n\n\n //--------------------------------------------Person------------------------------------------------------------------------------\n\n @GET(\"person/popular?\" + ApiConstants.ApiKey)\n Call<PersonModel> getPopularPeople(@Query(\"page\") int page);\n\n @GET(\"person/{person_id}/\" + \"movie_credits?\" + ApiConstants.ApiKey)\n Call<CreditsModel> getPersonCredits(@Path(\"person_id\") int link);\n\n @GET(\"person/{person_id}?\" + ApiConstants.ApiKey)\n Call<Person> getPerson(@Path(\"person_id\") int link);\n\n @GET(\"search/person?\" + ApiConstants.ApiKey)\n Call<PersonModel> getSearchPerson(@Query(\"query\") String query);\n\n //--------------------------------------------Login------------------------------------------------------------------------------\n\n @GET(\"authentication/{guest_session}/new?\" + ApiConstants.ApiKey)\n Call<User> getGuestUser(@Path(\"guest_session\")String guest);\n\n @GET(\"authentication/token/validate_with_login?\" + ApiConstants.ApiKey)\n Call<User> getValidateUser(@Query(\"username\") String username,@Query(\"password\") String password,@Query(\"request_token\")String request_token);\n\n @GET(\"authentication/session/new?\" + ApiConstants.ApiKey)\n Call<User> getUserSession(@Query(\"request_token\") String reques_token);\n\n @GET(\"account?\" + ApiConstants.ApiKey)\n Call<User> getUserDetails(@Query(\"session_id\") String session_id);\n\n //--------------------------------------------Favorites------------------------------------------------------------------------------\n\n @GET(\"account/{account_id}/favorite/movies?\" + ApiConstants.ApiKey)\n Call<MovieModel> getUserFavorites(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n @GET(\"movie/{movie_id}/\" + \"account_states?\" + ApiConstants.ApiKey)\n Call<Movie> getFavorites(@Path(\"movie_id\") int link,@Query(\"session_id\")String session_id);\n\n @POST(\"account/{account_id}/favorite?\" + ApiConstants.ApiKey)\n Call<Movie> postUserFavorites(@Path(\"account_id\") String account_id, @Query(\"session_id\") String session_id, @Body FavoriteMoviePost body);\n\n @POST(\"account/{account_id}/favorite?\" + ApiConstants.ApiKey)\n Call<Shows> postUserShowFavorites(@Path(\"account_id\") String account_id, @Query(\"session_id\") String session_id, @Body FavoriteMoviePost body);\n\n @GET(\"account/{account_id}/favorite/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getUserShowsFavorites(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n @GET(\"tv/{tv_id}/\" + \"account_states?\" + ApiConstants.ApiKey)\n Call<Shows> getShowFavorite(@Path(\"tv_id\") int link,@Query(\"session_id\")String session_id);\n\n //--------------------------------------------Watchlist------------------------------------------------------------------------------\n\n @GET(\"account/{account_id}/watchlist/movies?\" + ApiConstants.ApiKey)\n Call<MovieModel> getUserWatchlist(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n @GET(\"movie/{movie_id}/\" + \"account_states?\" + ApiConstants.ApiKey)\n Call<Movie> getWatchlist(@Path(\"movie_id\") int link,@Query(\"session_id\")String session_id);\n\n @POST(\"account/{account_id}/watchlist?\" + ApiConstants.ApiKey)\n Call<Movie> postUserWatchlist(@Path(\"account_id\") String account_id, @Query(\"session_id\") String session_id, @Body WatchlistMoviePost body);\n\n @POST(\"account/{account_id}/watchlist?\" + ApiConstants.ApiKey)\n Call<Shows> postUserShowWatchlist(@Path(\"account_id\") String account_id, @Query(\"session_id\") String session_id, @Body WatchlistMoviePost body);\n\n @GET(\"account/{account_id}/watchlist/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getUserShowsWatchlist(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n //--------------------------------------------Rated------------------------------------------------------------------------------\n\n @POST(\"movie/{movie_id}/rating?\" + ApiConstants.ApiKey)\n Call<Movie> postUserRating(@Path(\"movie_id\") int account_id, @Query(\"session_id\") String session_id,@Body Rated body);\n\n @POST(\"tv/{tv_id}/rating?\" + ApiConstants.ApiKey)\n Call<Shows> postUserShowRating(@Path(\"tv_id\") int account_id, @Query(\"session_id\") String session_id,@Body Rated body);\n\n @GET(\"account/{account_id}/rated/movies?\" + ApiConstants.ApiKey)\n Call<MovieModel> getUserRated(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n @GET(\"account/{account_id}/rated/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getUserRatedShows(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n}", "public interface WeatherService {\n\n @GET()\n Call<CurrentWeatherResponse> getCurrentWeatherResponse(@Url String urlString);\n\n @GET()\n Call<CityWeatherResponse> getCityWeatherResponse(@Url String urlString);\n\n @GET()\n Call<ForecastResponse> getForecastResponse(@Url String urlString);\n\n}", "public interface Service {\n\n @GET(\"movie/{sub_type}\")\n Call<MovieResponse> getMovie(@Path(\"sub_type\")String sub_type, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"tv/{sub_type}\")\n Call<TvShowResponse> getTvShow(@Path(\"sub_type\")String sub_type, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"movie/{movie_id}/recommendations\")\n Call<MovieResponse> getMovieRecommendations(@Path(\"movie_id\")int movie_id,@Query(\"api_key\")String api_key, @Query(\"language\")String language,@Query(\"page\")int page);\n\n @GET(\"tv/{tv_id}/recommendations\")\n Call<TvShowResponse> getTvShowRecommendations(@Path(\"tv_id\")int tv_id, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n @GET(\"search/movie\")\n Call<MovieResponse> getMovieSearch(@Query(\"query\")String query,@Query(\"api_key\")String api_key, @Query(\"language\")String language,@Query(\"page\")int page);\n\n @GET(\"search/tv\")\n Call<TvShowResponse> getTvShowSearch(@Query(\"query\")String query, @Query(\"api_key\")String api_key, @Query(\"language\")String language, @Query(\"page\")int page);\n\n}", "public interface APIService {\n\n @POST(\"login.php\")\n Call<ResponseLogin> iniciosesion(@Body Cuenta cuenta);\n\n @POST(\"registrarEmpresa.php\")\n Call<PostResponse> registerEmpresa(@Body Cuenta cuenta);\n\n @GET(\"mostrarProyecto.php\")\n Call<ResponseProyecto> getProyectos(@Query(\"id_empresa\") String id);\n\n @GET(\"InfoEmpresa.php\")\n Call<ResponseEmpresa> getEmpresa(@Query(\"id_empresa\") String id);\n\n @POST(\"registrarProyecto.php\")\n Call<ResponseRegistrarProyecto> registerProyecto(@Body Proyecto proyecto);\n\n @POST(\"registrarDocumento.php\")\n Call<ResponseEntregable> registerEntregable(@Body EntregableP entregableP);\n\n @GET(\"mostrarDoc.php\")\n Call<ResponseMostrarEntregable> getEntregables(@Query(\"id_proyecto\") int id);\n\n @POST(\"registrarPersonal.php\")\n Call<PostResponse> registerPersonal(@Body Personal personal);\n\n @GET(\"mostrarPersonal.php\")\n Call<ResponsePersonal> getPersonal(@Query(\"id_empresa\") String id);\n\n @POST(\"registrarHistorial.php\")\n Call<PostResponse> registerHistorial(@Body Historial historial);\n\n @GET(\"mostrarHistorial.php\")\n Call<ResponseHistorial> getHistorial(@Query(\"id_proyecto\") int id);\n\n @GET(\"mostrarPerLibres.php\")\n Call<ResponsePersonalFree> getPersonalFree(@Query(\"id_empresa\") String id);\n\n @POST(\"registrarEquipoP.php\")\n Call<PostResponse> registerEquipo(@Body RegisterEquipo equipo);\n\n @GET(\"mostrarEquipoP.php\")\n Call<ResponseMostrarEquipo> getEquipo(@Query(\"id_proyecto\") int id);\n\n @GET(\"{entregable}\")\n @Streaming\n Call<ResponseBody> downloadFile(@Path(\"entregable\")String entregable);\n\n @POST(\"asignarJefe.php\")\n Call<PostResponse> asignarJefe(@Body Jefe jefe);\n\n @POST(\"proyectoEndFake.php\")\n Call<PostResponse> finishProyecto(@Body Proyecto proyecto);\n\n @POST(\"ModidTipo.php\")\n Call<PostResponse> updateTipo(@Body Jefe jefe);\n\n @GET(\"reporteJson.php\")\n Call<ResponseReportes> getReportes(@Query(\"idEmpresa\") String id);\n\n @POST(\"LoginEmJefe.php\")\n Call<ResponseUser> signIn(@Body Cuenta cuenta);\n\n @GET(\"ProyectoMostrarID.php\")\n Call<ResponseProyecto> getProject(@Query(\"idProyecto\") String id);\n\n\n}", "public interface ApiInterface {\n\n @GET(\"android_task.php\")\n Call<JsonResponse> getRecepies();\n}", "public interface Api {\n\n @GET(\"index\")\n Call<String> getSimple();\n\n @GET(\"getxml\")\n Call<String> getXml(@Query(\"code\") int code);\n\n @FormUrlEncoded\n @POST(\"postme\")\n Call<String> postSimple(@Field(\"from\") String foo);\n\n @Headers({\"Content-Type: application/xml\", \"Accept: application/json\"})\n @POST(\"postxml\")\n Call<String> postXml(@Body RequestBody aRequestBody);\n\n\n}", "public interface ChatUserService {\n @GET(\"/api/user\")\n Call<ChatUserResponse> user();\n}", "public interface RetrofitService {\n\n @FormUrlEncoded\n @POST(\"/login\")\n Call<ResponseBody> PostLoginData(@FieldMap Map<String,String> map);\n\n @FormUrlEncoded\n @POST(\"/addUser\")\n Call<ResponseBody> PostSignUpData(@FieldMap Map<String,String> map);\n\n @FormUrlEncoded\n @POST(\"/addPetition\")\n Call<ResponseBody> PostPetition(@FieldMap Map<String,String> map);\n\n @FormUrlEncoded\n @POST(\"/showPetition\")\n Call<ListItemRepo> PostgetItem(@FieldMap Map<String,String> map);\n\n}", "public interface ApiService {\n public static final String Base_URL = \"http://ip.taobao.com/\";\n /**\n *普通写法\n */\n @GET(\"service/getIpInfo.php/\")\n Observable<ResponseBody> getData(@Query(\"ip\") String ip);\n\n\n @GET(\"{url}\")\n Observable<ResponseBody> executeGet(\n @Path(\"url\") String url,\n @QueryMap Map<String, String> maps);\n\n\n @POST(\"{url}\")\n Observable<ResponseBody> executePost(\n @Path(\"url\") String url,\n @FieldMap Map<String, String> maps);\n\n /* @Multipart\n @POST(\"{url}\")\n Observable<ResponseBody> upLoadFile(\n @Path(\"url\") String url,\n @Part(\"image\\\\\"; filename=\\\\\"image.jpg\") RequestBody avatar);\n\n @POST(\"{url}\")\n Call<ResponseBody> uploadFiles(\n @Url(\"url\") String url,\n @Part(\"filename\") String description,\n @PartMap() Map<String, RequestBody> maps);*/\n\n}", "public interface ApiService {\n @GET(\"AppServices/AppWebService.asmx/Catagory\")\n Call<Example> getAllCategory();\n\n @FormUrlEncoded\n @POST(\"AppServices/AppWebService.asmx/PhotoGallary\")\n Call<Example> getAllPhoto(@Field(\"CatagoryId\") String image_id);\n\n\n @GET(\"AppServices/AppWebService.asmx/Notice\")\n Call<Example> GetNotice();\n\n\n @GET(\"AppServices/AppWebService.asmx/GetStandard\")\n Call<Example> GetStandard();\n\n @GET(\"AppServices/AppWebService.asmx/GetSection\")\n Call<Example> GetSection();\n\n @GET(\"AppServices/AppWebService.asmx/News\")\n Call<Example> GetNews();\n\n @GET(\"AppServices/AppWebService.asmx/Assignment\")\n Call<Example> GetAssignment();\n\n @GET(\"AppServices/AppWebService.asmx/Event\")\n Call<Example> GetEvent();\n\n @GET(\"AppServices/AppWebService.asmx/Slider\")\n Call<Example> GetSlider();\n\n @GET(\"AppServices/AppWebService.asmx/Staff\")\n Call<Example> GetStaff();\n\n\n @GET(\"AppServices/AppWebService.asmx/Calander\")\n Call<Example> GetCalander();\n\n @GET(\"AppServices/AppWebService.asmx/Video\")\n Call<Example> GetVideo();\n\n @GET(\"AppServices/AppWebService.asmx/ToDayEvent\")\n Call<Example> GetTodayEvent();\n\n\n @GET(\"AppServices/AppWebService.asmx/ToDayNews\")\n Call<Example> Getodaynews();\n\n @GET(\"AppServices/AppWebService.asmx/RankerStudent\")\n Call<Example> GetSchoolRanker();\n\n\n @GET(\"AppServices/AppWebService.asmx/Medium\")\n Call<Example> GetMedium();\n\n @FormUrlEncoded\n @POST(\"AppServices/AppWebService.asmx/Standard_Div\")\n Call<Example> GetStandard(@Field(\"MediumId\") String stdid);\n\n @FormUrlEncoded\n @POST(\"AppServices/AppWebService.asmx/HomeWork\")\n Call<Example> GetHWork(@Field(\"StdId\") String Stdname);\n\n\n @GET(\"AppServices/AppWebService.asmx/Calander\")\n Call<Example> getcalnder();\n\n @FormUrlEncoded\n @POST(\"AppServices/AppWebService.asmx/TimeTable\")\n Call<Example> GetTimeTable(@Field(\"StdId\")String stdid);\n}", "public interface NewsWebService {\n\n\n @GET(\"v1/banner/2\")\n Call<ResponseBody> getBanner();\n\n @POST(\"v1/news/all\")\n Call<ResponseBody> getNews(@Body RequestBody body);\n\n @GET(\"v1/news/{newsId}\")\n Call<ResponseBody> getNewsDetail(@Path(\"newsId\") Long newsId);\n\n}", "public interface CategoryRestService {\n\n @GET(\"/category\")\n Call<List<SimpleCategoryDto>> listAllCategory();\n\n}", "public interface WeatherDataEndpointApi {\n\n @GET(\"{id}.json\")\n Call<WeatherData> getWeatherData(@Path(\"id\") String id);\n}", "public interface DemoApi {\n\n @GET(\"user/{id}\")\n Call<User> getUserInfoWithPath(@Path(\"id\") int user_id);\n\n @POST(\"login/json\")\n Call<BaseResult> login(@Body UserParam userParam);\n\n @POST(\"login/json\")\n Observable<BaseResult> login2(@Body UserParam userParam);\n\n}", "public interface ApiInterface {\n // TODO (6) buat class ApiInterface\n //class ini berfungsi untuk mendefinisikan interface untuk retrofit\n\n @GET(\"movie/top_rated\")\n Call<MovieResponse>getTopRatedMovies(@Query(\"api_key\") String apiKey);\n\n @GET(\"move/{id}\")\n Call<MovieResponse> getMovieDetails(@Path(\"id\")int id,@Query(\"api_key\")String apiKey);\n}", "public interface WeatherCurrentServiceAPI {\n /*@GET(\"data/2.5/weather?lat=52&lon=25&APPID=8e401c96e74d2f0c07da113eb27d51d0\")\n Call<WeatherCurentData>getWeatherResponse();*/\n\n @GET\n Call<WeatherCurentData> getWeatherResponse(\n @Url String url\n );\n\n}", "public interface RestService {\n\n @GET\n Call<String> get(@Url String url, @QueryMap Map<String, Object> params, @HeaderMap Map<String, String> headers);\n\n @FormUrlEncoded\n @POST\n Call<String> post(@Url String url, @FieldMap Map<String, Object> params);\n\n// @Multipart\n// @PUT\n// Call<String> put(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @PUT\n Call<String> put(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @DELETE\n Call<String> delete(@Url String url, @HeaderMap Map<String, String> headers, @QueryMap Map<String, Object> params);\n\n @Streaming\n @GET\n Call<ResponseBody> download(@Url String url, @QueryMap Map<String, Object> params);\n\n @Multipart\n @POST\n Call<String> upload(@Url String url, @Part MultipartBody.Part file);\n\n// @GET\n// Call<SongSearchEntity> getSongSearchList(@Url String url, @QueryMap Map<String, Object> params, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<User> signIn(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @GET\n Call<User> profile(@Url String url, @HeaderMap Map<String, String> headers);\n\n// @Multipart\n// @PUT\n// Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @Part(\"id\") RequestBody id, @Part(\"key\") RequestBody key, @Part(\"value\") RequestBody value);\n//\n// @PUT\n// Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @Multipart\n @PUT\n Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @GET\n Call<SongListEntity> musicbillList(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<SongListDetailEntity> musicbill(@Url String url, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<String> createMusicbill(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @DELETE\n Call<String> deleteMusicbill(@Url String url, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<String> addMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @Multipart\n @PUT\n Call<String> updateMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @DELETE\n Call<String> deleteMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @GET\n Call<SongSearchEntity> getMusic(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<LyricEntity> getLyric(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<String> getSinger(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<ZhiliaoEntity> getVerify(@Url String url, @HeaderMap Map<String, String> headers);\n}", "public interface RestApi {\n\n @GET(\"/ride.asp\")\n Call<List<Model>> getData (@Query(\"userid\") int userId,\n @Query(\"from_name\") String fromName,\n @Query(\"from_lat\") double lat,\n @Query(\"from_lng\") double lng,\n @Query(\"to_name\") String toName,\n @Query(\"to_lat\") double toLat,\n @Query(\"to_lng\") double toLng,\n @Query(\"time\") long time);\n}", "public interface Api {\n @GET(\"sites\") //Check urls here https://inthecheesefactory.com/blog/retrofit-2.0/en?fb_comment_id=885081521586565_886605554767495\n Single<List<Site>> sitesGet();\n\n @GET(\"sites/state\")\n Single<List<SiteState>> sitesStateGet(@QueryMap() Map<String, String> query);\n\n @POST(\"sites/state/connection/follow\")\n Single<SiteState> follow(@Body FollowCommand params);\n\n @POST(\"sites/state/connection/unfollow\")\n Completable unfollow(@Body UnfollowCommand params);\n }", "public interface RetrofitService {\n\n @GET(\"goto/{user}\")\n Observable<String> getCallWeb(@Path(\"user\") String user);\n\n @POST(\"users/new\")\n Observable<User> createUser(@Body User user);\n}", "public interface GoogleApiService {\n\n @GET\n Call<CurrentWeather> getLocationWeather(@Url String url);\n\n @GET\n Call<MyPlaces> getMyNearByPlaces(@Url String url);\n\n}" ]
[ "0.7647973", "0.7565714", "0.7528924", "0.750306", "0.7488578", "0.74023104", "0.7386854", "0.7370655", "0.7367525", "0.73555154", "0.7338737", "0.73119485", "0.7298827", "0.72912306", "0.7250131", "0.7230004", "0.72115314", "0.7211405", "0.71807647", "0.7177437", "0.7176946", "0.7172927", "0.71667165", "0.7158724", "0.7140948", "0.7122252", "0.7119543", "0.7119215", "0.71186644", "0.7114272", "0.7100952", "0.7097174", "0.70927906", "0.70909363", "0.70783997", "0.70773464", "0.70645005", "0.7059916", "0.7059865", "0.70450824", "0.70429784", "0.70333946", "0.70310515", "0.70254856", "0.70246464", "0.7020476", "0.70081645", "0.69993585", "0.6999077", "0.69923884", "0.69885725", "0.69872147", "0.6980772", "0.6970043", "0.69537055", "0.69534904", "0.69510114", "0.6945161", "0.6936818", "0.6934278", "0.6930352", "0.6926476", "0.69261783", "0.69258755", "0.6924179", "0.6923327", "0.69216216", "0.6911238", "0.68982077", "0.6898126", "0.68914616", "0.6891192", "0.6888585", "0.6886164", "0.68851006", "0.6878148", "0.6877225", "0.6876459", "0.68683225", "0.68660885", "0.6856754", "0.6851312", "0.68494093", "0.68465924", "0.6844251", "0.6842762", "0.68422663", "0.68385375", "0.6838455", "0.68373704", "0.68312913", "0.6827315", "0.6818204", "0.6811962", "0.68086", "0.68078923", "0.6806827", "0.68046767", "0.68038285", "0.67960423", "0.6796018" ]
0.0
-1
Invoked for a received HTTP response.
@Override public void onResponse(Call<TokenApiResponse> call, Response<TokenApiResponse> response) { TokenApiResponse tokenApiResponse = response.body(); if (tokenApiResponse != null) { //check for status...if 0 return an error with the message if (tokenApiResponse.status.equals("0")) { //throw an error tokenCallback.onError(new TokenException(tokenApiResponse.message)); } else { Token token = new Token(); token.token = tokenApiResponse.token; token.last4 = tokenApiResponse.last4; tokenCallback.onCreate(token); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void responseReceived(byte[] response);", "@Override\n\tpublic void handleResponse() {\n\t\t\n\t}", "void receiveResponse(String invocationId, HttpResponse response);", "public void onResponse(Response response) throws Exception;", "@Override\n\tpublic void processResponse(Response response)\n\t{\n\t\t\n\t}", "@Override\n public void onResponse(String response) {\n System.out.println(\"Recieved Response: \" + response);\n }", "@Override\n\t\t\t\t\tpublic void onResponse(String response) {\n\n\t\t\t\t\t}", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\r\n\t\t\t\t\tpublic void onResponse(HttpResponse resp) {\n\t\t\t\t\t\tLog.i(\"HttpPost\", \"Success\");\r\n\r\n\t\t\t\t\t}", "void onResponse(String response, int requestId);", "@Override\n public void onResponse(String response) {\n Utils.logApiResponseTime(calendar, tag + \" \" + url);\n mHandleSuccessResponse(tag, response);\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void processResult(HttpResponseMessage response) {\n }", "@Override\n\t\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t\tSystem.out.println(arg0);\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void onResponse(Response response) throws IOException {\n }", "public String receiveResponse()\n\t{\n\t\t\n\t}", "@Override\n public void onResponse(String response) {\n if(null != listener){\n listener.onComplete(mRespHandler.parse(response));\n }\n }", "@Override\n\t\t\t\t\t\tpublic void onResponse(String response) {\n\t\t\t\t\t\t\tparseRespense(response);\n\t\t\t\t\t\t}", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "@Override\n protected void deliverResponse(JSONObject response) {\n listener.onResponse(response);\n System.out.println(\"response \"+response);\n }", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n//\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "@Override\n public void onResponse(String response) {\n finalData(response);\n }", "@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\t\n\t\t\t\t}", "void onHTTPRequest(HTTPRequest request, HTTPResponse response);", "public void receivedHttpResponse(ProxyMessageContext context) {\n\t\ttry {\n\t\t\thttpOutQueue.put(context);\n\t\t\t\n synchronized (httpResponder) {\n \thttpResponder.notify();\n }\n \n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tprotected void deliverResponse(String response) {\n\n\t\t\t}", "@Override public void deliverResponse(T response) {\n if (listener != null) {\n listener.onResponse(response);\n }\n }", "@Override\n public void onResponse(Result appResponse, Invoker<?> invoker, Invocation invocation) {\n }", "@Override\r\n\t\tpublic void onComplete(String response, Object state) {\n\t\t\t\r\n\t\t}", "@Override\n public void onResponse(String response) {\n parseData(url, response);\n }", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "protected void handleSuccessMessage(Response response) {\n\t\tonRequestResponse(response);\n\t}", "public abstract void onReceiveResponse(ExchangeContext context);", "@Override\n public void onResponse(String response) {\n System.out.println(response.toString());\n }", "void httpResponse (HttpHeader response, BufferHandle bufferHandle, \n\t\t boolean keepalive, boolean isChunked, long dataSize);", "@Override\n\t\t\t\t\tpublic void onResponse(String s) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\tpublic T handleResponse(HttpResponse arg0) throws ClientProtocolException,\n\t\t\tIOException {\n\t\treturn (this.parser != null && this.processor != null) ? this.processor\n\t\t\t\t.process(this.parser.parse(arg0)) : null;\n\t}", "public void onRequestResponse(Response response) { }", "public void parseResponse();", "public abstract HTTPResponse finish();", "@Override\n public void onResponse(String response, int id) {\n processData(response);\n\n }", "void onCompleted(T response);", "@Override\n protected void deliverResponse(T response) {\n listener.onSuccessResponse(response);\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n Log.d(\"Text on webpage: \", \"\" + response);\n checkResponse(response);\n }", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t\tBundle bundle = new Bundle();\r\n\t\t\t\tbundle.putInt(HANDLER_DATA_APK_INDEX, this.getApkIndex());\r\n\t\t\t\tMessage msg =new Message();\r\n\t\t\t\tmsg.setData(bundle);\r\n\t\t\t\tmsg.what = HANDLER_MSG_APK_UPLOAD;\r\n\t\t\t\thandler.sendMessage(msg);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "@Override\n protected void deliverResponse(WeatherPOJO response) {\n this.listener.onResponse(response);\n }", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t\tBundle bundle = new Bundle();\r\n\t\t\t\tbundle.putInt(HANDLER_DATA_APK_INDEX, this.getApkIndex());\r\n\t\t\t\tMessage msg =new Message();\r\n\t\t\t\tmsg.setData(bundle);\r\n\t\t\t\tmsg.what = HANDLER_MSG_APK_ADD;\r\n\t\t\t\thandler.sendMessage(msg);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif (WebApi.isRespSuccess(response)){\r\n\t\t\t\tString str = WebApi.getRespMsg(response);\r\n\t\t\t\tif (str != WebApi.API_RESP_MSG_NULL){\r\n\t\t\t\t\tupdateApkState(str);\r\n\t\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_UPDATED);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "void sendResponseMessage(HttpResponse response) throws IOException;", "public static void recv( String response ) {\n\t\tLog.v(TAG,\"get response: \" + response );\n\t}", "void receiveResponse(V response);", "void faild_response();", "void responseReady(String response);", "private void mHandleSuccessResponse(String tag, String response) {\n if (mListener != null) {\n mListener.onDataLoaded(tag, response);\n }\n }", "public void handle(HttpExchange exch) {\n\n }", "@Override\r\n\t\t\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t\t\tlistonResponse(arg0);\r\n\t\t\t\t\t\trefreshView.onRefreshComplete();\r\n\t\t\t\t\t}", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n\t\tpublic void onComplete(String response, Object state) {\n\t\t\tLog.d(\"arvi\", \"arvi1111\");\n\t\t}", "@Override\n public void onCompleted() {\n responseObserver.onCompleted();\n }", "@Override\n\t\t\tpublic void handle(Response response) throws Exception\n\t\t\t{\n\t\t\t\tif(response ==null){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(response.getStatusCode()==200){\n\t\t\t\t\tSystem.out.println(\"push seccuess\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "@Override\n \t\t\t\tpublic void finished(Response response) {\n \t\t\t\t\tLog.w(\"myApp\", response.getResult() + \" \" + response.getError());\n \t\t\t\t}", "@Override\n \t\t\t\tpublic void finished(Response response) {\n \t\t\t\t\tLog.w(\"myApp\", response.getResult() + \" \" + response.getError());\n \t\t\t\t}", "@Override\n\t\t\t\tpublic void finished(Response response) {\n\t\t\t\t\tLog.w(\"myApp\", response.getResult() + \" \" + response.getError());\n\t\t\t\t}", "void onResponseTaskCompleted(Request request, Response response, OHException ohex, Object data);", "public int accept(HttpResponseProlog prolog, HttpHeaders headers);", "@Override\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\t getResponse();\n\t\t\t\t\t\t }", "@SuppressLint(\"CallbackMethodName\")\n void reply(@NonNull byte[] response);", "public int getResponse() {return response;}", "public void postInvoke(InvocationContext ic) throws Exception {\n ic.setResponse(response);\n }", "public interface HttpResponseListener extends AsyncListener {\n /** The http header has been sent. \n * @param response the HttpHeader that was read\n * @param bufferHandle the BufferHandle that may or may not hold unread data.\n * @param keepalive if the sender want to use keepalive.\n * @param isChunked if false content is not chunked, \n * if true content is chunked.\n * @param dataSize the contents size or -1 if size is unknown.\n */\n void httpResponse (HttpHeader response, BufferHandle bufferHandle, \n\t\t boolean keepalive, boolean isChunked, long dataSize);\n \n}", "@Override\n public void channelRead0(ChannelHandlerContext ctx, HttpObject msg) {\n if (msg instanceof HttpResponse) {\n //clear the buffer.\n _responseBodyBuf.clear();\n //\n HttpResponse response = (HttpResponse) msg;\n //get HTTP Response code.\n this._hcr._responseStatus = response.getStatus();\n //\n //print header.\n Set<String> headers = response.headers().names();\n for (Iterator<String> keyIter = headers.iterator(); keyIter.hasNext();) {\n String keyName = keyIter.next();\n //System.out.println(keyName + \":\" + response.headers().get(keyName));\n this._hcr._responseHeaderMap.put(keyName, response.headers().get(keyName));\n }\n }\n //content or lastContent\n if (msg instanceof HttpContent) {\n HttpContent content = (HttpContent) msg;\n _responseBodyBuf.writeBytes(content.content());\n //if is last content fire done.\n if (content instanceof LastHttpContent) {\n try {\n fireDone(_responseBodyBuf.toString(this._hcr._responseBodyCharset));\n } finally {\n ctx.close();\n releaseResource();\n }\n }\n }\n }", "@Override\n public void onResponseSuccess(final String resp) {\n }", "public interface OnResponseReceivedListener {\r\n void onResponseReceived(String response);\r\n }", "public interface ResponseListener {\n\tpublic void onResponse(String[] response);\n}", "public void handle(HttpExchange t) throws IOException {\n\t\tString response = \"This is the output from MyStringHandler class\";\n\t\t\n\t\tGlobals.HttpRequest(t, response);\n\t}", "private void handleRefreshResponse(Intent intent) {\n String responseId = intent.getStringExtra(EXTRA_RESPONSE_ID);\n String[] responseIdSplit = responseId.split(COLON);\n String type = responseIdSplit[0];\n PublisherManager pubMgr = PublisherManager.getPublisherManager(this, type);\n pubMgr.handleRefreshResponse(intent);\n }", "public Object handleCommandResponse(Object response) throws RayoProtocolException;", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "private void updateHandler(Bundle bundle, Message msg_response,\tString mGetResponse) {\r\n\t\tbundle.putString(\"returnResponse\", mGetResponse);\r\n\t\tmsg_response.setData(bundle);\r\n\t\thandler_response.sendMessage(msg_response);\r\n\t}", "@Override\n public void onResponse(String response) {\n loadSentMessages();\n }", "@Override\n public void onResponse(String response) {\n Log.d(DEBUG_TAG, \"Response is: \"+ response);\n }", "public void readResponse()\n\t{\n\t\tDataObject rec = null;\n\t\tsynchronized(receive)\n\t\t{\n\t\t\trec = receive.get();\n\t\t}\n\t\tAssertArgument.assertNotNull(rec, \"Received packet\");\n\t\tpublishResponse(rec);\n\t}", "public abstract void handle(Request request, Response response) throws Exception;", "public void onBachReqComplete(String[] response, Object state);", "public void handleResponseInternal(long connection, Object obj) {\n JResponse response = (JResponse) obj;\n Logger.m1416d(TAG, \"Action - handleResponse - connection:\" + connection + \", response:\" + response.toString());\n if (connection != NetworkingClient.sConnection.get()) {\n Logger.m1432w(TAG, \"Response connection is out-dated. \");\n }\n Long rid = response.getHead().getRid();\n Requesting origin = dequeSentQueue(rid);\n if (origin == null) {\n Logger.m1432w(TAG, \"Not found the request in SentQueue when response.\");\n } else {\n rid = origin.request.getHead().getRid();\n endSentTimeout(rid);\n }\n Requesting requesting = (Requesting) this.mRequestingCache.get(rid);\n if (requesting != null) {\n endRequestTimeout(requesting);\n } else {\n Logger.m1432w(TAG, \"Not found requesting in RequestingCache when response.\");\n }\n }", "public static void handleResponse(HttpCarbonMessage requestMsg, HttpCarbonMessage responseMsg) {\n try {\n requestMsg.respond(responseMsg);\n } catch (ServerConnectorException e) {\n throw new HttpSourceAdaptorRuntimeException(\"Error occurred during response\", e);\n }\n }", "public void handleResponse(byte[] result, Command originalCommand);", "private void getResponse() {\n response = new Response();\n\n getResponseCode();\n getResponseMessage();\n getResponseBody();\n\n LOG.info(\"--- RESPONSE ---\");\n LOG.info(\"Code: \" + response.getResponseCode());\n LOG.info(\"Message: \" + response.getResponseMessage());\n LOG.info(\"Body: \" + response.getResponseBody());\n LOG.info(\"*************************************\");\n }", "interface ResponseDataListener {\n public void Response(String response, int sectionId);\n}", "@Override\n public void onResponse(String response) {\n mTextView.setText(\"Response is: \" + response);\n }", "public Response callback() throws Exception;", "public void setResponse(final String response) {\n\t\thandler.response = response;\n\t}", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "void onReceive( String response );", "@Override\n\tpublic void onRuning(TAResponse response) {\n\n\t}" ]
[ "0.7525639", "0.73365784", "0.71270823", "0.7099652", "0.705005", "0.7011628", "0.6898035", "0.687672", "0.68381476", "0.6813215", "0.68000793", "0.67497635", "0.6745987", "0.6745987", "0.6745987", "0.67244077", "0.6701781", "0.668709", "0.6684314", "0.668331", "0.66728634", "0.66691196", "0.66613495", "0.6621657", "0.66119933", "0.6608188", "0.6596773", "0.6588232", "0.65839916", "0.6564772", "0.6553887", "0.6551911", "0.6546647", "0.6536712", "0.6524928", "0.65218014", "0.6519471", "0.6509663", "0.65019476", "0.64994866", "0.64833504", "0.64740527", "0.6468011", "0.6461221", "0.6457579", "0.6451969", "0.64416987", "0.64393455", "0.6412018", "0.64076984", "0.6406026", "0.64007", "0.63750833", "0.6352121", "0.63506144", "0.6344315", "0.6323499", "0.6289965", "0.6287397", "0.62835515", "0.62777907", "0.6272782", "0.62676907", "0.6260025", "0.62314844", "0.62297845", "0.62297845", "0.6217732", "0.6214431", "0.62114006", "0.6208787", "0.62077487", "0.6200766", "0.6184342", "0.61816853", "0.6170591", "0.6145973", "0.61381644", "0.6121498", "0.6104163", "0.60974526", "0.6079211", "0.6078917", "0.6078917", "0.6061655", "0.6054645", "0.60521424", "0.60517657", "0.60517097", "0.60456634", "0.60435826", "0.6042656", "0.60330284", "0.60316986", "0.60042214", "0.5996986", "0.5983278", "0.59816116", "0.59702885", "0.5962359", "0.5961281" ]
0.0
-1
Invoked when a network exception occurred talking to the server or when an unexpected exception occurred creating the request or processing the response.
@Override public void onFailure(Call<TokenApiResponse> call, Throwable t) { Log.e(LOG_TAG, t.getMessage()); tokenCallback.onError(t); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void onNetworkError() {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onNetworkError(Request request, IOException e) {\n\n\t\t\t}", "@Override\n\t\t\t\tpublic void onNetworkError(Request request, IOException e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void onNetworkError(NetworkError networkError) {\n\r\n\t\t\t}", "public void handleNetworkException(WorkerChore chore, CallNetworkException e);", "protected void connectionException(Exception exception) {}", "protected void onConnectionError() {\n\t}", "public void onConnectionError()\n\t\t{\n\t\t}", "@Override\n\t\t\t\tpublic void onNetworkError(Request request, IOException e) {\n\t\n\t\t\t\t\tscrollView.onRefreshComplete();\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void exception(NHttpServerConnection conn, Exception ex) {\n this.handler.exception(conn, ex);\n }", "@Override\n\tpublic void onNetWorkError() {\n\t\t\n\t}", "public void onError(Request request, Throwable exception) {\n\t\t\t logger.severe(\"HTTP error occurred\");\n\t\t\t \tdeliveryPoint.onDeliveryProblem(letterBox, 0);\n\t\t\t }", "public void socketException(PacketChannel pc, Exception ex);", "private void handleServiceException(PortletRequest request,\n PortletResponse response, Application application, Throwable e)\n throws IOException, PortletException {\n if (getRequestType(request) == RequestType.UIDL) {\n Application.SystemMessages ci = getSystemMessages();\n criticalNotification(request, (ResourceResponse) response,\n ci.getInternalErrorCaption(), ci.getInternalErrorMessage(),\n null, ci.getInternalErrorURL());\n if (application != null) {\n application.getErrorHandler()\n .terminalError(new RequestError(e));\n } else {\n throw new PortletException(e);\n }\n } else {\n // Re-throw other exceptions\n throw new PortletException(e);\n }\n \n }", "public NetworkException() {\n\t\tsuper();\n\t}", "@Override\r\n\t\t\t\t\tpublic void onError(Exception e) {\n\t\t\t\t\t\tLog.e(\"HttpPost\", \"LIES \" + e.getMessage());\r\n\r\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onError(Request request, Throwable exception) {\n\n\t\t\t\t\t}", "public void socketError(Exception arg0) {\n\t\t\r\n\t}", "public void onException(RequestException e);", "@Override\n public void onFailure(@NonNull Exception e) {\n Discoverer.this.eventListener.trigger(EVENT_LOG, \"Fail to request connection: \" + e.getMessage());\n }", "public void onError(Request request, Throwable exception) {\n com.google.gwt.user.client.Window.alert(\"error 1002\");\n Utils.setErrorPrincipal(\"Ocurrio un error al conectar con el servidor\", \"error\");\n }", "@Override\n\t\t\tpublic void onError(Request request, Throwable exception) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}", "protected void handleFailMessage(Request request, IOException e) {\n\t\tonRequestFailure(request, e);\n\t}", "public void onRequestFailure(Request request, IOException e) { }", "void sendError(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, Throwable ex) throws IOException;", "protected void onBadServer(Throwable e) {\n log.warn(\"Caught exception (maybe server is bad)\", e);\n }", "@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onRequestFail() {\n\n\t\t\t\t\t\t\t\t\t\t}", "public void OnConnectionError();", "@ExceptionHandler(value = {NullPointerException.class, \n \t\t\t\t\t\t RuntimeException.class, \n \t\t\t\t\t\t IOException.class})\n public ResponseEntity<Object> handleInternalServerErr(RuntimeException exception, WebRequest request) {\n return handleExceptionInternal(exception, \n \t\t\t\t\t\t\t \"Error interno en el servidor\", \n \t\t\t\t\t\t\t new HttpHeaders(), \n \t\t\t\t\t\t\t HttpStatus.INTERNAL_SERVER_ERROR, \n \t\t\t\t\t\t\t request);\n }", "public void onError(Request request, Throwable exception) {\n Utils.setErrorPrincipal(\"Ocurrio un error al conectar con el servidor\", \"error\");\n }", "public void onError(Request request, Throwable exception) {\n Utils.setErrorPrincipal(\"Ocurrio un error al conectar con el servidor\", \"error\");\n }", "@Override\n\t\t\t\tpublic void onException(Exception e) {\n\t\t\t\t\tLog.d(\"SD_TRACE\", \"load api exception\" + e.toString());\n\t\t\t\t\tmLoadSuccess = false;\n\t\t\t\t}", "public void onError(Request request, Throwable exception) {\n Utils.setErrorPrincipal(\"Ocurrio un error al conectar con el servidor\", \"error\");\n }", "public void onError(final Request request, final Throwable exception) {\n \t\t}", "private void sendInvocationException(HttpRequest request,\n\t\t\tHttpResponse response, ServiceInvocationException e) {\n\t\t// internal exception in service method\n\t\tresponse.clearContent();\n\t\tresponse.setStatus( HttpResponse.STATUS_INTERNAL_SERVER_ERROR );\n\t\tresponse.setContentType( \"text/xml\" );\n\t\tconnector.logError(\"Exception while processing RMI: \" + request.getPath());\n\t\t\n\t\tObject[] ret = new Object[4];\n\t\tret[0] = \"Exception during RMI invocation!\";\n\t\t\n\t\tret[1] = e.getCause().getCause().getClass().getCanonicalName();\n\t\tret[2] = e.getCause().getCause().getMessage();\n\t\tret[3] = e.getCause().getCause();\n\t\tString code = ret[0]+\"\\n\"+ret[1]+\"\\n\"+ret[2]+\"\\n\"+ret[3];\n\t\tresponse.println ( code );\n\t}", "@Override\n public void errorReceived(Exception ex) {\n }", "@Override\n public void errorReceived(Exception ex) {\n }", "void onFetchDataError(Throwable e);", "private void sendOldError(Exception e) {\n }", "protected void serverError() throws IOException {\n cleanup();\n throw new IOException(\"Recieved error message from server:\\n\" + new String(_text_buffer));\n }", "@Override\r\n\tpublic void networkErrorHappened() {\r\n\t\t//Tracker\r\n\t\tTracker.getInstance().trackPageView(\"directory/searchView/network_error\");\r\n\t\t\r\n\t\tInputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\r\n\t\timm.hideSoftInputFromWindow(mInputBar.getWindowToken(), 0);\r\n\t\t\r\n\t\tmLayout.setText(getString(R.string.directory_network_error));\r\n\t\t\r\n\t\tmAdapter = new ArrayAdapter<String>(getApplicationContext(), R.layout.sdk_list_entry, R.id.sdk_list_entry_text, new ArrayList<String>());\r\n\r\n\t\tmListView.setAdapter(mAdapter);\r\n\t\tmListView.invalidate();\r\n\t}", "public void handleInvokerException(HttpRequest request, HttpResponse response, Exception e)\n {\n handleException(request, response, e);\n }", "private void sendConnectorProblems(HttpRequest request,\n\t\t\tHttpResponse response, Exception e) {\n\t\tresponse.clearContent();\n\t\tresponse.setStatus( HttpResponse.STATUS_NOT_ACCEPTABLE );\n\t\tresponse.setContentType( \"text/plain\" );\n\t\tresponse.println ( \"The invocation parameters could not be read!\" );\n\t\tresponse.println ( \"Exception-Message: \" + e.getMessage() );\n\t\tconnector.logError(\"Request coding exception in invocation request \" + request.getPath());\n\t}", "@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\tLog.e(\"ee\", \"失败:\" + arg1);\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}", "protected abstract void onException(final Exception exception);", "protected void onBadClient(Throwable e) {\n log.warn(\"Caught exception (maybe client is bad)\", e);\n }", "public synchronized void onExceptionSend(HttpPipelineRequest p_onExceptionSend_1_, Exception p_onExceptionSend_2_) {\n/* 339 */ terminate(p_onExceptionSend_2_);\n/* */ }", "@Override\r\n public void onFailure(@NotNull Call call, @NotNull IOException e) {\r\n Log.e(TAG, \"internet error\");\r\n Log.e(TAG, e.getMessage());\r\n }", "public abstract void onException(Exception e);", "@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\tLog.e(\"ee\", \"失败:\" + arg1);\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t\t// handler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void onException(Exception arg0) {\n\n\t\t\t}", "public void networkError() {\n Context context = getActivity();\n if (context == null) {\n return;\n }\n\n showToast(context.getString(R.string.status_network_error), Toast.LENGTH_LONG);\n }", "@Override\n\tpublic void onException(Exception e) {\n\n\t}", "@Override\r\n\tpublic void handleServerException(Exception e, String commandReceived) {\r\n\t\tLoggingUtils.logError(logger, e, \"Error from the TCPServerHandler\");\r\n\r\n\t}", "@Override\n\t\tpublic void onException(Exception arg0) {\n\t\t\t\n\t\t}", "void onException(Exception e);", "@Override\n\t\t\tpublic void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) {\n\t\t\t\tToastTool.showNetworkError(context);\n\t\t\t}", "protected void raiseRequestError(Exception e) {\n\t\tmThrowedExceptions.add(e);\n\t}", "@Override\r\n public void onException(Exception arg0) {\n\r\n }", "@Override\n\t\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\t\tnew Tus(AddIncomeActivity.this)\n\t\t\t\t\t\t\t\t\t.toast(\"网络异常,请稍后······\");\n\t\t\t\t\t\t}", "@Override\n\tpublic void onRequestError(String reqID, Exception error) {\n\t\temptyView.showException((ZcdhException)error, this);\n\t}", "@Override\n\t\t\tpublic void onFailure(int arg0, Header[] arg1, byte[] arg2,\n\t\t\t\t\tThrowable arg3) {\n\t\t\t\tToast.makeText(MyApplication.getContext(), \"网络通讯错误\",\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n \tpublic void reconnectionFailed(Exception arg0) {\n \t}", "@Override\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {\n if (isQuiteException(cause)) {\n if (logger.isDebugEnabled()) {\n logger.debug(String.format(\"Channel:%s Error\", ctx.channel()), cause);\n }\n } else {\n logger.warn(PROTOCOL_FAILED_RESPONSE, \"\", \"\", String.format(\"Channel:%s Error\", ctx.channel()), cause);\n }\n ctx.close();\n }", "private void handleExceptions(Exception e,String uri) throws ServiceProxyException {\n \n //Step 1: Is error AdfInvocationRuntimeException, AdfInvocationException or AdfException? \n String exceptionPrimaryMessage = e.getLocalizedMessage();\n String exceptionSecondaryMessage = e.getCause() != null? e.getCause().getLocalizedMessage() : null;\n String combinedExceptionMessage = \"primary message:\"+exceptionPrimaryMessage+(exceptionSecondaryMessage!=null?(\"; secondary message: \"+exceptionSecondaryMessage):(\"\"));\n \n //chances are this is the Oracle MCS erro message. If so then ths message has a JSON format. A simple JSON parsing \n //test will show if our assumption is true. If JSONObject parsing fails then apparently the message is not the MCS\n //error message\n //{\n // \"type\":\".....\",\n // * \"status\": <error_code>,\n // * \"title\": \"<short description of the error>\",\n // * \"detail\": \"<long description of the error>\",\n // * \"o:ecid\": \"...\",\n // * \"o:errorCode\": \"MOBILE-<MCS error number here>\",\n // * \"o:errorPath\": \"<URI of the request>\"\n // }\n if(exceptionSecondaryMessage!=null){\n try {\n JSONObject jsonErrorObject = new JSONObject(exceptionSecondaryMessage);\n //if we get here, then its a Oracle MCS error JSON Object. Get the \n //status code or set it to 0 (means none is found)\n int statusCode = jsonErrorObject.optInt(\"status\", 0);\n throw new ServiceProxyException(statusCode, exceptionSecondaryMessage);\n \n } catch (JSONException jse) {\n //if parsing fails, the this is proof enough that the error message is not \n //an Oracle MCS message and we need to continue our analysis\n \n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Exception message is not a Oracle MCS error JSONObject\", this.getClass().getSimpleName(), \"getCurrentUserInformation\");\n } \n }\n \n //continue message analysis and check for known error codes for the references MCS API\n \n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Rest invocation failed with following message\"+exceptionPrimaryMessage, this.getClass().getSimpleName(), \"getCurrentUserInformation\");\n \n int httpErrorCode = -1; \n String restoredOracleMcsErrorMessage = null;\n \n /*\n * Try to identify an MCS failure from the exception message.\n */\n if(combinedExceptionMessage.contains(\"400\")){\n httpErrorCode = 400; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(400, \"Invalid JSON payload\", \"One of the following problems occurred: \" +\n \"the user does not exist, the JSON is invalid, or a property was not found.\", uri);\n }\n else if(combinedExceptionMessage.contains(\"401\")){\n httpErrorCode = 401; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(401, \"Authorization failure\", \"The user is not authorized to retrieve the information for another user.\",uri); \n }\n else if(combinedExceptionMessage.contains(\"403\")){\n httpErrorCode = 404; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(403, \"Functionality is not supported\", \"Functionality is not supported.\",uri); \n }\n else if(combinedExceptionMessage.contains(\"403\")){\n httpErrorCode = 404; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(404, \"User not found\", \"The user with the specified ID does not exist.\",uri);\n }\n \n else{\n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Request failed with Exception: \"+e.getClass().getSimpleName()+\"; message: \"+e.getLocalizedMessage(), this.getClass().getSimpleName(), \"handleExcpetion\");\n throw new ServiceProxyException(e.getLocalizedMessage(), ServiceProxyException.ERROR);\n }\n //if we get here then again its an Oracle MCS error, though one we found by inspecting the exception message\n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Request succeeded successful but failed with MCS application error. HTTP response: \"+httpErrorCode+\", Error message: \"+restoredOracleMcsErrorMessage, this.getClass().getSimpleName(), \"handleExcpetion\");\n throw new ServiceProxyException(httpErrorCode, restoredOracleMcsErrorMessage);\n }", "@Override\n\tpublic void netErrorReLoad() {\n\t\t\n\t}", "@Override\n\tpublic void netErrorReLoad() {\n\t\t\n\t}", "private void failWithExceptionOnExecutor(CronetException e) {\n mException = e;\n // Do not call into mCallback if request is complete.\n synchronized (mNativeStreamLock) {\n if (isDoneLocked()) {\n return;\n }\n mReadState = mWriteState = State.ERROR;\n destroyNativeStreamLocked(false);\n }\n try {\n mCallback.onFailed(this, mResponseInfo, e);\n } catch (Exception failException) {\n Log.e(CronetUrlRequestContext.LOG_TAG, \"Exception notifying of failed request\",\n failException);\n }\n mInflightDoneCallbackCount.decrement();\n }", "@Override\n public void onFailure(Call<VehicleDetailModel> call, Throwable t) {\n Toast.makeText(getApplicationContext(), \"Network issue\", Toast.LENGTH_SHORT).show();\n }", "default void onConnectException(SessionID sessionID, Exception exception) {\n }", "private Object logError(WebClientResponseException e, String string) {\n\t\treturn null;\n\t}", "@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tSC.say(\"服务器连接已中断,请重新登录!\");\n\t\t\t}", "@Override\n public void onException(Exception arg0) {\n }", "@Override\n public void onRequestFailure(SpiceException spiceException) {\n }", "@Override\n\tpublic void onFailure(Request request, Exception e) {\n\t\ttry {\n\t\t\tT t = clazz.newInstance();\n\t\t\tt.setMessage(\"网络访问失败\");\n\t\t\tonComplete(null, t);\n\t\t\treturn ;\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}", "public void handleError(ClientHttpResponse response) throws IOException {\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n Log.d(\"recon\", \"error \" + statusCode + \" \" + throwable);\n\n Toast.makeText(getApplicationContext(), \"Error: \" + statusCode + \" Verify your Internet Connection is stable or working.\", Toast.LENGTH_LONG).show();\n }", "private void errorProcess(CallbackContext callbackContext, Exception ex) {\n // Convierte el payLoad a JSON.\n Gson gson = new Gson();\n Map<String, String> exc_map = new HashMap<String, String>();\n exc_map.put(\"message\", ex.toString());\n exc_map.put(\"stacktrace\", getStackTrace(ex));\n // Convierte el payLoad a JSON.\n String jsonError = new Gson().toJson(exc_map);\n\n sendResultError(callbackContext, jsonError);\n ex.printStackTrace();\n if (callbackContext != null) {\n callbackContext.error(jsonError);\n }\n }", "public boolean isCausedByNetworkIssue() {\n return getCause() instanceof java.io.IOException;\n }", "@Override\n public void connectionLost(Throwable thrwbl) {\n System.out.println(\"服务器的连接丢失\");\n }", "@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t}", "@Override\n\tpublic void exceptionCaught(ChannelHandlerContext ctx, Throwable cause)\n\t\t\tthrows Exception {\n\t\tsuper.exceptionCaught(ctx, cause);\n\t}", "@Override\n public void exceptionCaught(final ChannelHandlerContext context, final Throwable cause) {\n log.debug(\"{} caught an exception.\", this.apnsConnection.name, cause);\n }", "@Override\n\tpublic void onRequestDataError(Exception error) {\n\t\tLog.e(\"Jrv Activity jrv\", error.getMessage());\n\t}", "protected void handleReaderException(HttpRequest request, HttpResponse response, ReaderException e)\n {\n if (e.getResponse() != null || e.getErrorCode() > -1)\n {\n handleFailure(request, response, e);\n return;\n }\n else if (e.getCause() != null)\n {\n if (executeExceptionMapper(response, e.getCause()))\n {\n return;\n }\n if (e.getCause() instanceof WebApplicationException)\n {\n handleWebApplicationException(response, (WebApplicationException) e.getCause());\n return;\n }\n if (e.getCause() instanceof Failure)\n {\n handleFailure(request, response, (Failure) e.getCause());\n return;\n }\n }\n e.setErrorCode(HttpResponseCodes.SC_BAD_REQUEST);\n handleFailure(request, response, e);\n }", "public void onException(Exception ex) {\n \t\t\t}", "@Override\r\n\t\t\tpublic void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n\t\t\t\tsuper.onFailure(statusCode, headers, throwable, errorResponse);\r\n\t\t\t\tToast.makeText(context, \"网络异常,请稍后重试\", Toast.LENGTH_LONG).show();\r\n\t\t\t}", "public void onFailure(Throwable caught) {\n Window.alert(SERVER_ERROR);\n }", "public void onFailure(Throwable caught) {\n Window.alert(SERVER_ERROR);\n }", "@Override\n public void onFailure(int statusCode, Headers headers, String response, Throwable throwable) {\n Log.i(\"doRequest\", \"doRequest failed\");\n\n }", "@Override\n public void onError(final Request request, final Throwable exception) {\n LOGGER.severe(\"Server part (poptavka-core) doesn't respond during user logging, exception=\"\n + exception.getMessage());\n eventBus.setErrorMessage(Storage.MSGS.loginUnknownError());\n }", "@Override\n\t\t\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\t\t\tToast.makeText(GetPersonalInfoActivity.this, \"网络连接异常!\",\n\t\t\t\t\t\t\t\t1000).show();\n\t\t\t\t\t}", "void onConnectToNetByIPFailure();", "public synchronized void onRequestFailed(String message, Throwable ex) {\r\n\t\tString reason = message + \": \" + ex.getClass().getName() + \": \" + ex.getMessage();\r\n\t\tallRequestsTracker.onRequestFailed(reason);\r\n\t\trecentRequestsTracker.onRequestFailed(reason);\r\n\t\tmeter.mark();\r\n\t}", "@Override\n\t\t\tpublic void handleError(ClientHttpResponse response) throws IOException {\n\t\t\t\t\n\t\t\t}", "private void handleException(final Exception e) throws OsgpException {\n LOGGER.error(\"Exception occurred: \", e);\n if (e instanceof OsgpException) {\n throw (OsgpException) e;\n } else {\n throw new TechnicalException(COMPONENT_WS_PUBLIC_LIGHTING, e);\n }\n }", "public CommunicationException() {\r\n\t\tsuper();\r\n\t}", "@Override\n\tpublic void processIOException(IOExceptionEvent exceptionEvent) {\n\t}", "public NetworkException(final Throwable cause) {\n\t\tsuper(cause);\n\t}" ]
[ "0.76656926", "0.761227", "0.7570521", "0.71830845", "0.7169454", "0.67670196", "0.67004067", "0.66333824", "0.65422964", "0.6526372", "0.64991194", "0.64615434", "0.63892066", "0.6374671", "0.6352326", "0.63458014", "0.63177246", "0.6294074", "0.62892616", "0.6264117", "0.6232946", "0.62164503", "0.61987257", "0.61987257", "0.6175347", "0.6144482", "0.6097419", "0.60875034", "0.6085626", "0.60793734", "0.6073444", "0.60722214", "0.60722214", "0.6072034", "0.6061849", "0.60583085", "0.60258716", "0.60113305", "0.60113305", "0.60104424", "0.6000874", "0.59994733", "0.59577906", "0.59560287", "0.595347", "0.5938599", "0.59140486", "0.58983153", "0.58881086", "0.5880839", "0.58796054", "0.5878608", "0.58730245", "0.5867259", "0.5865506", "0.586384", "0.5853862", "0.58337784", "0.58315957", "0.58155316", "0.58139485", "0.5796871", "0.57929647", "0.57891023", "0.57861674", "0.5778983", "0.57679796", "0.57641196", "0.57641196", "0.575229", "0.57390875", "0.57267576", "0.57247907", "0.57114244", "0.5689336", "0.56825495", "0.5675451", "0.5675411", "0.56745416", "0.5674176", "0.5672294", "0.56696427", "0.56647414", "0.56645995", "0.5658046", "0.565731", "0.565673", "0.56537855", "0.5648927", "0.56483", "0.56483", "0.5646877", "0.56468", "0.5643613", "0.5639853", "0.5623287", "0.5617749", "0.56070817", "0.5599629", "0.55972344", "0.5593848" ]
0.0
-1
public static native void setDpnLog(int logSwitch);
public static native int initDevice(int fd);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private native void Df1_Set_Log_Filter_Level(int level);", "public static final void ccSetDoseLog(boolean pxVal){\n cmLogOn=pxVal;\n }", "void setDebugPort(Integer debugPort);", "public void setLog(Log log) {\r\n this.delegate.setLog(log);\r\n }", "public void setLOG(Logger newLog)\r\n\t{\r\n\t\tlog = newLog;\r\n\t}", "public void setClLog(String clLog) {\r\n this.clLog = clLog;\r\n }", "public static void setLog(Log log) {\n DatasourceProxy.log = log;\n }", "public void setLog(boolean log)\n {\n this.log = log;\n }", "void libusb_set_debug(Context ctx, int level);", "public void setLog (Logger log) {\n this.log = log;\n }", "void k2h_set_debug_level_message();", "public Logger(int loglv) {\r\n LOGLV = loglv;\r\n }", "public void setLog(XLog log) {\n\n\t}", "@Deprecated\n public void setLogLevelMask(int mask);", "public void setLog(String logName) {\r\n this.delegate.setLog(logName);\r\n }", "public void log(boolean log) {\n this.log = log;\n }", "void log(Log log);", "public void setPoolLog(String poolLog) { this.poolLog = poolLog; }", "public static void setLogNode(LogNode node) {\n mLogNode = node;\n }", "public void setLog(Logger newLog) {\r\n\t\tm_Log = newLog;\r\n\t}", "int lcmaps_init_and_logfile(String logfile, com.sun.jna.Pointer fp,\n\t\tshort logtype);", "@Deprecated\n public void LOG(String log) {\n }", "public void setLog(boolean log) {\n this.log = log;\n }", "protected void setLogLevel(int logLevel) \n\t{\n\t\tthis.logLevel = logLevel;\n\t}", "public static void setLog(java.io.OutputStream out)\n {\n logNull = (out == null);\n UnicastServerRef.callLog.setOutputStream(out);\n }", "public void setLogObject(Log logObject_) {\n\t\tlogObject = logObject_;\n\t\tlog( \"deviceId \" + deviceId, Log.Level.Information );\n\t\tlog( \"location \" + location, Log.Level.Information );\n\t}", "public void setLog(LogService log) {\n\tthis.log = log;\n }", "public void setLogid(Integer logid) {\n this.logid = logid;\n }", "public abstract void setLOD(int lod);", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 496,\n FQN=\"llvm::Module::setPICLevel\", NM=\"_ZN4llvm6Module11setPICLevelENS_8PICLevel5LevelE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module11setPICLevelENS_8PICLevel5LevelE\")\n //</editor-fold>\n public void setPICLevel(PICLevel.Level PL) {\n addModuleFlag(ModFlagBehavior.Error, new StringRef(/*KEEP_STR*/\"PIC Level\"), PL.getValue());\n }", "public void setLogging(boolean logging);", "@Override\n public void setLogTracer(LogTracer log) {\n\n }", "private void changeLogLevel(String level){\n\n }", "public void enableSDKLog() {\r\n\t\tString path = null;\r\n\t\tpath = Environment.getExternalStorageDirectory().toString() + \"/IcatchWifiCamera_SDK_Log\";\r\n\t\tEnvironment.getExternalStorageDirectory();\r\n\t\tICatchWificamLog.getInstance().setFileLogPath(path);\r\n\t\tLog.d(\"AppStart\", \"path: \" + path);\r\n\t\tif (path != null) {\r\n\t\t\tFile file = new File(path);\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tfile.mkdirs();\r\n\t\t\t}\r\n\t\t}\r\n\t\tICatchWificamLog.getInstance().setSystemLogOutput(true);\r\n\t\tICatchWificamLog.getInstance().setFileLogOutput(true);\r\n\t\tICatchWificamLog.getInstance().setRtpLog(true);\r\n\t\tICatchWificamLog.getInstance().setPtpLog(true);\r\n\t\tICatchWificamLog.getInstance().setRtpLogLevel(ICatchLogLevel.ICH_LOG_LEVEL_INFO);\r\n\t\tICatchWificamLog.getInstance().setPtpLogLevel(ICatchLogLevel.ICH_LOG_LEVEL_INFO);\r\n\t}", "public void logMonitor(String strLog)\r\n\t{\r\n\t\tlogMonitor(strLog, false);\r\n\t}", "public interface ILog {\n /**\n * 打印日志\n * @param L 虚拟机地址,可通过 {@link org.luaj.vm2.Globals#getGlobalsByLState(long)}获取\n */\n void l(long L, String tag, String log);\n\n /**\n * 打印错误日志\n * @param L 虚拟机地址,可通过 {@link org.luaj.vm2.Globals#getGlobalsByLState(long)}获取\n */\n void e(long L, String tag, String log);\n}", "static public final void ccLogln(String pxTag, Object pxValue){\n if(cmLogOn){\n ccPrintln(pxTag, pxValue);\n }//..?\n }", "public native void debugStateCapture();", "private native void initialiseLoggerReference(Logger logger);", "private native void initialiseLoggerReference(Logger logger);", "void setDeltaPInfo(String dpLoadcase, Double refDP);", "void k2h_bump_debug_level();", "@SuppressWarnings({\"UNUSED_SYMBOL\"})\r\n private void plog(String m) {\n }", "@Override\n\tpublic void switchPortChanged(Long switchId) \n\t{\n\n\t}", "@Override\n public void updateLogData(LogDataBE logData) \n {\n\t\t//logData.AddData(\"Carriage: LimitSwitch\", String.valueOf(get_isCubeInCarriage()));\n }", "void k2h_set_debug_level_error();", "public void setLogService(LogService logService) {\r\n this.logService = logService;\r\n }", "private static native void setLEDColor(long pointer, long controllerHandle,\n byte colorR, byte colorG, byte colorB, int flags);", "static public void setLevel( byte level ) {\n Debug.level=level;\n }", "public DuckSourceRemote setDuckLog(DuckLog duckLog);", "public abstract void logd(String str);", "void k2h_set_debug_level_silent();", "void k2h_set_debug_level_warning();", "static public final void ccLogls(String pxTag, List pxList){\n if(cmLogOn){return;}//..?\n ccPrintln(pxTag);\n ccPrintls(pxList);\n }", "public void setLogUtilities(LogUtilities log) { this.log = log; }", "public void setLogdate(long newVal) {\n setLogdate(new java.sql.Timestamp(newVal));\n }", "private void logDeviceSettingTabField() {\n\n\t\tDeviceSettingsController.logVendorID(vendorId);\n\t\tDeviceSettingsController.logProductID(productId);\n\t\tDeviceSettingsController.logManufacture(manufacture);\n\t\tDeviceSettingsController.logProductString(productString);\n\t\tDeviceSettingsController.logSerialNumber(serialNumber);\n\t\tDeviceSettingsController.logFifoClockFrequency(fifoClockFrequency);\n\t\tDeviceSettingsController.logFPGAI2CSlaveAddress(i2cSlaveAddress);\n\t\tDeviceSettingsController.logDeviceSettingFirmware(deviceSttingFirmWare);\n\t\tDeviceSettingsController.logDeviceSettingI2CFrequency(deviceSttingI2CFrequency);\n\t}", "public void set_infos_log_src(int value) {\n setUIntBEElement(offsetBits_infos_log_src(), 16, value);\n }", "abstract void initiateLog();", "protected static void setDebugLevel(int debugLevel) {\n Program.debugLevel = debugLevel;\n }", "void log();", "private static void writeLog(String log) {\n\t\twriteLog(log, true);\n\t}", "public void setSyncToMachineHistory(final long lngPvLogId) throws SynchronizationException {\n\t \n PVLoggerDataSource srcPvLog = new PVLoggerDataSource(lngPvLogId);\n this.mdlBeamline = srcPvLog.setModelSource(this.smfSeq, this.mdlBeamline);\n this.mdlBeamline.resync();\n\t}", "public final void log() throws ArithmeticException {\n\t\tif ((mksa&_LOG) != 0) throw new ArithmeticException\n\t\t(\"****Unit: log(\" + symbol + \")\") ;\n\t\tvalue = AstroMath.log(value);\n\t\tmksa |= _log;\n\t\tif (symbol != null) \n\t\t\tsymbol = \"[\" + symbol + \"]\";\t// Enough to indicate log\n\t}", "public void logDebug(String str) {\n }", "private static void logd(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.logd(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.logd(java.lang.String):void\");\n }", "public static void setLogTarget(final String logTarget)\n {\n BaseBoot.getConfiguration().setConfigProperty (LOGTARGET, logTarget);\n }", "public void setLogging(boolean logging){\n this.logging=logging;\n }", "public void setLogModel(LogModel[] param) {\n validateLogModel(param);\n\n localLogModelTracker = true;\n\n this.localLogModel = param;\n }", "public abstract void logLap(int currentLap);", "private void logDeviceInfo() {\n logDeviceLevel();\n }", "private void logDeviceInfo() {\n logDeviceLevel();\n }", "public native void setRTOConstant (int RTOconstant);", "public void setLogLabel(String newLabel)\n\t{\n\t\t_logLabel = newLabel;\n\t}", "public void setLogStr(String logStr) {\n\t\tthis.logStr = logStr;\n\t}", "public void setLogWriter(java.io.PrintWriter pwLogWriter) {\n SecurityManager sec = System.getSecurityManager();\n if (sec != null) {\n sec.checkPermission(new SQLPermission(\"setLog\"));\n }\n \n\tif (tracer == null) {\n tracer = new JdbcOdbcTracer();\n }\n\ttracer.setWriter(pwLogWriter);\n }", "final public static void setLogDestination(LogDestination logDestination) {\n\t\tlogger.setLogDestinationImpl(logDestination);\n\t}", "public void setX_Log(boolean xLog){\n this.xLog = xLog;\n drawGraph();\n }", "void setLogAbandoned(boolean logAbandoned);", "public void setDataLogging (boolean dataLogging) {\n this.dataLogging = dataLogging;\n }", "public void mo55571a(MDLogLevel mDLogLevel) {\n if (mDLogLevel != null) {\n try {\n if (!mDLogLevel.equals(MDLogLevel.OFF)) {\n Log.w(\"com.medallia.digital\", \"setLogLevel method is to be used in integration stages only. Remove in app production rollout!\");\n }\n C3490e3.m657a().mo55333a(mDLogLevel);\n C3490e3.m665e(\"Log level was set to \" + mDLogLevel);\n } catch (Exception e) {\n C3490e3.m663c(e.getMessage());\n return;\n }\n }\n AnalyticsBridge.getInstance().reportLoggerEvent(mDLogLevel);\n }", "public static native void OpenMM_AmoebaVdwForce_setSoftcorePower(PointerByReference target, int n);", "void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }", "public static void setLevel(int level){\n\tlogLevel = level;\n }", "public void setLogGroup(int aNewGroup) {\n mLogGroup = aNewGroup;\n }", "public void setLogDiskSpaceLimit(int logDiskSpaceLimit) {\n agentConfig.setLogDiskSpaceLimit(logDiskSpaceLimit);\n logConfigChanged();\n }", "public void enableLogging();", "static public final void ccLogln(String pxLine){\n ccLogln(pxLine, null);\n }", "@Override\n public void forceMlog() {\n }", "public void setLogGroup(String value)\n {\n logGroup = value;\n }", "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 static void logSettings(final String reClass) {\n if (SETTINGS_LOGGED) {\n return;\n }\n SETTINGS_LOGGED = true;\n\n String refType;\n switch (REF_TYPE) {\n default:\n case ReentrantContextProvider.REF_HARD:\n refType = \"hard\";\n break;\n case ReentrantContextProvider.REF_SOFT:\n refType = \"soft\";\n break;\n case ReentrantContextProvider.REF_WEAK:\n refType = \"weak\";\n break;\n }\n\n logInfo(\"==========================================================\"\n + \"=====================\");\n\n logInfo(\"Marlin software rasterizer = ENABLED\");\n logInfo(\"Version = [\"\n + Version.getVersion() + \"]\");\n logInfo(\"prism.marlin = \"\n + reClass);\n logInfo(\"prism.marlin.useThreadLocal = \"\n + USE_THREAD_LOCAL);\n logInfo(\"prism.marlin.useRef = \"\n + refType);\n\n logInfo(\"prism.marlin.edges = \"\n + MarlinConst.INITIAL_EDGES_COUNT);\n logInfo(\"prism.marlin.pixelsize = \"\n + MarlinConst.INITIAL_PIXEL_DIM);\n\n logInfo(\"prism.marlin.subPixel_log2_X = \"\n + MarlinConst.SUBPIXEL_LG_POSITIONS_X);\n logInfo(\"prism.marlin.subPixel_log2_Y = \"\n + MarlinConst.SUBPIXEL_LG_POSITIONS_Y);\n\n logInfo(\"prism.marlin.blockSize_log2 = \"\n + MarlinConst.BLOCK_SIZE_LG);\n\n // RLE / blockFlags settings\n\n logInfo(\"prism.marlin.forceRLE = \"\n + MarlinProperties.isForceRLE());\n logInfo(\"prism.marlin.forceNoRLE = \"\n + MarlinProperties.isForceNoRLE());\n logInfo(\"prism.marlin.useTileFlags = \"\n + MarlinProperties.isUseTileFlags());\n logInfo(\"prism.marlin.useTileFlags.useHeuristics = \"\n + MarlinProperties.isUseTileFlagsWithHeuristics());\n logInfo(\"prism.marlin.rleMinWidth = \"\n + MarlinConst.RLE_MIN_WIDTH);\n\n // optimisation parameters\n logInfo(\"prism.marlin.useSimplifier = \"\n + MarlinConst.USE_SIMPLIFIER);\n logInfo(\"prism.marlin.clip = \"\n + MarlinProperties.isDoClip());\n logInfo(\"prism.marlin.clip.runtime.enable = \"\n + MarlinProperties.isDoClipRuntimeFlag());\n\n // debugging parameters\n logInfo(\"prism.marlin.doStats = \"\n + MarlinConst.DO_STATS);\n logInfo(\"prism.marlin.doMonitors = \"\n + MarlinConst.DO_MONITORS);\n logInfo(\"prism.marlin.doChecks = \"\n + MarlinConst.DO_CHECKS);\n\n // logging parameters\n logInfo(\"prism.marlin.log = \"\n + MarlinConst.ENABLE_LOGS);\n logInfo(\"prism.marlin.useLogger = \"\n + MarlinConst.USE_LOGGER);\n logInfo(\"prism.marlin.logCreateContext = \"\n + MarlinConst.LOG_CREATE_CONTEXT);\n logInfo(\"prism.marlin.logUnsafeMalloc = \"\n + MarlinConst.LOG_UNSAFE_MALLOC);\n\n // quality settings\n logInfo(\"prism.marlin.cubic_dec_d2 = \"\n + MarlinProperties.getCubicDecD2());\n logInfo(\"prism.marlin.cubic_inc_d1 = \"\n + MarlinProperties.getCubicIncD1());\n logInfo(\"prism.marlin.quad_dec_d2 = \"\n + MarlinProperties.getQuadDecD2());\n\n logInfo(\"Renderer settings:\");\n logInfo(\"CUB_DEC_BND = \" + DRenderer.CUB_DEC_BND);\n logInfo(\"CUB_INC_BND = \" + DRenderer.CUB_INC_BND);\n logInfo(\"QUAD_DEC_BND = \" + DRenderer.QUAD_DEC_BND);\n\n logInfo(\"INITIAL_EDGES_CAPACITY = \"\n + MarlinConst.INITIAL_EDGES_CAPACITY);\n logInfo(\"INITIAL_CROSSING_COUNT = \"\n + DRenderer.INITIAL_CROSSING_COUNT);\n\n logInfo(\"==========================================================\"\n + \"=====================\");\n }", "public void setLogtime(Date logtime)\r\n {\r\n this.logtime = logtime;\r\n }", "public void setSwitch(String Switch) {\n this.Switch = Switch;\n }", "public void setSwitch(String Switch) {\n this.Switch = Switch;\n }", "public void setLogLevel(int logLevel) {\n\t\tif(logLevel > 5 || logLevel < 0) \n\t\t\tthrow new IllegalArgumentException(\"invalid parameter logLevel, please use Logger's static level constant.\");\n\t\tmLogLevel = logLevel;\n\t}", "public static native void consoleLog(String text)\n\t/*-{\n\t\t$wnd.console.log(text);\n\t}-*/;", "private static native void setMode_0(long nativeObj, int mode);", "abstract protected void _log(Source src, OpLevel sev, String msg, Object... args) throws Exception;", "void initializeLogging();", "private void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }" ]
[ "0.62485087", "0.611905", "0.579667", "0.57274485", "0.5701365", "0.56681764", "0.5660566", "0.5546083", "0.553521", "0.5528387", "0.5482345", "0.544925", "0.543123", "0.5428225", "0.54265857", "0.5418784", "0.5400084", "0.53774595", "0.53740084", "0.5368956", "0.536881", "0.53431195", "0.5339757", "0.5335901", "0.5307756", "0.5299163", "0.5292076", "0.52882266", "0.52530795", "0.52371484", "0.5236079", "0.5221029", "0.52197945", "0.52086383", "0.52016586", "0.5200953", "0.5199641", "0.5191652", "0.51742285", "0.51742285", "0.51669043", "0.5166068", "0.51631635", "0.51419187", "0.51223904", "0.509208", "0.5081094", "0.50379455", "0.5033828", "0.50205034", "0.50137734", "0.50075275", "0.4996914", "0.49957374", "0.49650997", "0.49610665", "0.49172574", "0.4913815", "0.49040836", "0.4900083", "0.489979", "0.48897848", "0.48821664", "0.48713422", "0.48711672", "0.48660514", "0.486507", "0.486063", "0.48549584", "0.48535907", "0.4850583", "0.4850583", "0.48456824", "0.48391744", "0.48317626", "0.48263702", "0.4818221", "0.4816827", "0.48064816", "0.48063603", "0.48037428", "0.48013556", "0.4798314", "0.47971693", "0.47889322", "0.47847867", "0.47821668", "0.47814536", "0.47730944", "0.47606528", "0.47596553", "0.47577384", "0.47565383", "0.47561678", "0.47561678", "0.47523096", "0.4750482", "0.47465715", "0.47403154", "0.47394106", "0.47313392" ]
0.0
-1
before all we check if position is within range
public void insert(int position, E o) { if (position >= 0 && position <= size) { // first resize the storage array E[] newData = (E[]) new Object[size + 1]; // copy the data prior to the insertion for (int i = 0; i < position; i++) newData[i] = data[i]; // insert the new element newData[position] = o; // move the data after the insertion for (int i = position; i < size; i++) newData[i + 1] = data[i]; // replace the storage with the new array data = newData; size = size + 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkPosition(int position) {\r\n\t\treturn position>size||position < 0;\r\n\t}", "private boolean isValidPosition(Point pos){\r\n return (0 <= pos.getFirst() && pos.getFirst() < 8 && \r\n 0 <= pos.getSecond() && pos.getSecond() < 8);\r\n }", "public static boolean inRange (Position defPos, Position atkPos, int range) {\n\t\tint defX = defPos.getX();\n\t\tint defY = defPos.getY();\n\t\t\n\t\tint atkX = atkPos.getX();\n\t\tint atkY = atkPos.getY();\n\t\t\n\t\tif (defX -range <= atkX &&\n\t\t\t\tdefX + range >= atkX)\n\t\t{\n\t\t\tif (defY -range <= atkY &&\n\t\t\t\t\tdefY+range >= atkY)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean inRange(){\n //System.out.println(\"inRange\");\n return Math.abs(GameView.instance.player.position.x - creationPoint.x) < GameView.instance.cameraSize * attackRange;\n }", "public boolean contains(Index position) { // TODO rename: adjoinsOrContains\n return position != null && position.getX() + 1 >= start.getX() && position.getY() + 1 >= start.getY() && position.getX() <= end.getX() && position.getY() <= end.getY();\n }", "private boolean isLegalPositon(Position checkPosition){\n if (checkPosition.equalPosition(start)||checkPosition.equalPosition(end))\n return true;\n if(checkPosition.getRow()<0 || checkPosition.getCol()<0 || checkPosition.getRow()>=this.rows || checkPosition.getCol() >= this.cols){\n return false;\n }\n\n if(maze[checkPosition.getRow()][checkPosition.getCol()]== WallType.wall){\n return false;\n }\n return true;\n }", "private boolean inBounds(int row, int col){\n if (row > -1 && row < 120 && col > -1 && col < 160)\n return true;\n return false;\n }", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "private boolean isLegalPos(int row, int col){\r\n return !(row < 0 || row > 7 || col < 0 || col > 7);\r\n }", "public boolean contains2(DecimalPosition position) { // TODO rename: ???\n return position != null && position.getX() >= start.getX() && position.getY() >= start.getY() && position.getX() <= end.getX() && position.getY() <= end.getY();\n }", "public boolean containsExclusive(DecimalPosition position) { // TODO rename: contains\n if (position.getX() < start.getX() || position.getY() < start.getY()) {\n return false;\n }\n if (width() > 0) {\n if (position.getX() >= end.getX()) {\n return false;\n }\n } else {\n if (position.getX() > end.getX()) {\n return false;\n }\n }\n\n if (height() > 0) {\n if (position.getY() >= end.getY()) {\n return false;\n }\n } else {\n if (position.getY() > end.getY()) {\n return false;\n }\n }\n return true;\n }", "public Position trouverHeros(Position pos, int range);", "private boolean rangeCheck(int i){\n return i >= 0 && i < size;\n }", "private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }", "private int inRange(int x, int y) {\n\t\tif (x > 3 && y > 3 && x < max_x - 3 && y < max_y - 3) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "@Override\n\tpublic boolean outOfBounds() {\n\t\treturn this.getY() < 0;\n\t}", "private boolean inBounds(int row, int col)\n {\n return ((row >= 0) && (row < NUM_ROWS) &&\n (col >= 0) && (col < NUM_COLS)); \n }", "public abstract boolean checkMoveRange(String destination);", "public boolean atPosition() {\n return m_X.getClosedLoopError() < Constants.k_ToleranceX;\n }", "private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }", "private boolean cell_in_bounds(int row, int col) {\n return row >= 0\n && row < rowsCount\n && col >= 0\n && col < colsCount;\n }", "private boolean withinRange(Enemy e) {\n \t\tRect r = e.r; //Get the collision box from the \n \t\tPoint rectCenter = new Point((int) r.exactCenterX(), (int) r.exactCenterY());\n \t\tif (Math.abs(center.x - rectCenter.x) <= (e.getSize()/2 + range)) {\n \t\t\tif (Math.abs(center.y - rectCenter.y) <= (e.getSize()/2 + range)) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n \t\treturn false;\t\n \t}", "boolean inBoundingBox(Coord pos) {\n\t\treturn min(from.x, to.x) <= pos.x && pos.x <= max(from.x, to.x)\n\t\t\t\t&& min(from.y, to.y) <= pos.y && pos.y <= max(from.y, to.y);\n\t}", "private static void checkFromToBounds(int paramInt1, int paramInt2, int paramInt3) {\n/* 386 */ if (paramInt2 > paramInt3) {\n/* 387 */ throw new ArrayIndexOutOfBoundsException(\"origin(\" + paramInt2 + \") > fence(\" + paramInt3 + \")\");\n/* */ }\n/* */ \n/* 390 */ if (paramInt2 < 0) {\n/* 391 */ throw new ArrayIndexOutOfBoundsException(paramInt2);\n/* */ }\n/* 393 */ if (paramInt3 > paramInt1) {\n/* 394 */ throw new ArrayIndexOutOfBoundsException(paramInt3);\n/* */ }\n/* */ }", "private boolean isNearToEndPosition() {\n switch (direction) {\n case UP:\n return posY <= endPosition;\n case DOWN:\n return posY >= endPosition;\n case LEFT:\n return posX <= endPosition;\n case RIGHT:\n return posX >= endPosition;\n }\n throw new RuntimeException(\"Unknown position\");\n }", "boolean hasDestRange();", "private boolean reachableGap(int a_xmin, int a_xmax, int pos)\n {\n boolean reachableGap = false;\n int destinationY = GEBT_MarioAgent.MARIO_Y;\n if(pos-1 > m_cellsRun)\n {\n destinationY = GEBT_MarioAgent.MARIO_Y + (pos - 1 - m_cellsRun);\n reachableGap = !isObstacle(GEBT_MarioAgent.MARIO_X-1, GEBT_MarioAgent.MARIO_X,GEBT_MarioAgent.MARIO_Y, destinationY);\n }\n else if(pos-1 < m_cellsRun)\n {\n destinationY = GEBT_MarioAgent.MARIO_Y + (pos - 1 - m_cellsRun);\n reachableGap = !isObstacle(GEBT_MarioAgent.MARIO_X-1, GEBT_MarioAgent.MARIO_X, destinationY, GEBT_MarioAgent.MARIO_Y);\n }\n else reachableGap = true;\n\n //2nd check, there must be space for me over the gap\n if(reachableGap)\n {\n boolean obsInTop = isObstacle(a_xmin, a_xmin, destinationY+1, destinationY+1); //Identify where the obstacle is.\n boolean obsInDown = isObstacle(a_xmax, a_xmax, destinationY+1, destinationY+1);\n int hMin = a_xmin, hMax = a_xmax;\n if(obsInTop && !obsInDown)\n {\n//hMin = a_xmax;//THIS IS BAD\n//hMax = a_xmax + 1;//THIS IS BAD\n\n hMin = a_xmin-2; //THIS IS GOOD\n hMax = a_xmax-2; //THIS IS GOOD\n }else if(obsInDown)\n {\n//hMin = a_xmin + 2;//THIS IS BAD\n//hMax = a_xmax + 2;//THIS IS BAD\n hMin = a_xmin-1;//THIS IS GOOD\n hMax = a_xmax-1;//THIS IS GOOD\n }\n\n boolean marioSmall = marioMode == 0;\n if(marioSmall) hMax = hMin;\n reachableGap = !isObstacle(hMin, hMax, destinationY+1, destinationY+1); //Check if there is space enough for Mario to jump.\n }\n\n return reachableGap;\n }", "private boolean contains(int from1, int to1, int from2, int to2) {\n\t\treturn from2 >= from1 && to2 <= to1;\n\t}", "boolean checkIfValidToCreate(int start, int end) {\n return myMarkerTree.processOverlappingWith(start, end, region->{\n int rStart = region.getStartOffset();\n int rEnd = region.getEndOffset();\n if (rStart < start) {\n if (region.isValid() && start < rEnd && rEnd < end) {\n return false;\n }\n }\n else if (rStart == start) {\n if (rEnd == end) {\n return false;\n }\n }\n else {\n if (rStart > end) {\n return true;\n }\n if (region.isValid() && rStart < end && end < rEnd) {\n return false;\n }\n }\n return true;\n });\n }", "public boolean detectBound(){\n if(posX < 0 || posX > width || posY < 0 || posY > height){\n return true;\n }\n else{\n return false;\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n range0.getEnd(range_CoordinateSystem0);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = null;\n try {\n range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 248L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "private boolean checkRange(final int index) {\n if ((index > size) || (index < 0)) {\n return false;\n }\n return true;\n }", "private boolean checkInBounds(int startX, int startY, int finalX, int finalY) {\r\n\t\treturn startX < 0 || startX >= this.SIZE || startY < 0 || startY >= this.SIZE\r\n\t\t\t\t|| finalX < 0 || finalX >= this.SIZE || finalY < 0 || finalY >= this.SIZE;\r\n\t}", "private boolean validate(int position) {\n return ((position >= 0) && (position < this.values.length));\n }", "@Override\n public boolean isInBounds(int row, int col) {\n return row >= 0 && row < grid.length && col >= 0 && col < grid[0].length;\n }", "public isWithin() {\n\t\tsuper();\n\t}", "private boolean verifyBounds() {\r\n\t if((x>RobotController.BOUNDS_X || y>RobotController.BOUNDS_Y)\r\n\t || x<0 || y<0){\r\n\t return false;\r\n\t }\r\n\t return true;\r\n\t }", "public void checkPosition(){\n int absPos = mArm.getSensorCollection().getPulseWidthPosition();\n // mArm.configSelectedFeedbackSensor(FeedbackDevice.QuadEncoder);\n mArm.setSelectedSensorPosition(absPos - offset);\n }", "private boolean checkRange(int rowIndex, int columnIndex) {\n return rowIndex >= 0 && rowIndex < matrix.length\n && columnIndex >= 0 && columnIndex < matrix[rowIndex].length;\n\n }", "private boolean isInBound(int current, int bound){\n return (current >= 0 && current < bound);\n }", "@Test(timeout = 4000)\n public void test42() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-2147483648L), 1146L);\n long long0 = range0.getBegin();\n assertEquals((-2147483648L), long0);\n \n Range range1 = Range.of(1146L);\n boolean boolean0 = range1.endsBefore(range0);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n List<Range> list0 = range1.complementFrom(linkedList0);\n range0.complementFrom(list0);\n Range range2 = Range.ofLength(1146L);\n Range range3 = range2.intersection(range1);\n long long1 = range1.getEnd();\n assertEquals(1146L, long1);\n \n boolean boolean1 = range0.intersects(range2);\n boolean boolean2 = range1.equals(range2);\n assertFalse(boolean2 == boolean1);\n \n range0.getEnd();\n Range.of(2641L);\n List<Range> list1 = range0.complement(range2);\n assertEquals(1, list1.size());\n \n boolean boolean3 = range3.startsBefore(range1);\n assertTrue(boolean3 == boolean0);\n assertTrue(range3.isEmpty());\n assertFalse(boolean3);\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n Range range0 = Range.of((-81L));\n Range range1 = Range.of((-1L));\n boolean boolean0 = range0.intersects(range1);\n assertFalse(boolean0);\n assertFalse(range1.isEmpty());\n \n Range.Comparators.values();\n long long0 = range0.getBegin();\n assertEquals((-81L), long0);\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n Range range1 = Range.of(1845L);\n boolean boolean0 = range0.isSubRangeOf(range1);\n assertFalse(boolean0);\n \n range0.getBegin();\n assertTrue(range0.isEmpty());\n }", "private Vector2d checkOutOfBounds(Vector2d position) {\n\t\t//Check for x\n\t\tif (position.x < 0) position.x = 0;\n\t\tif (position.x > course.TERRAIN_SIZE) position.x = course.TERRAIN_SIZE;\n\t\t//Check for y\n\t\tif (position.y < 0) position.y = 0;\n\t\tif (position.y > course.TERRAIN_SIZE) position.y = course.TERRAIN_SIZE;\n\n\t\treturn new Vector2d(position.x,position.y);\n\t}", "boolean hasTargetPos();", "void checkPositions() {\n //check if any bullets have hit any asteroids\n for (int i = 0; i < bullets.size(); i++) {\n for (int j = 0; j < asteroids.size(); j++) {\n if (asteroids.get(j).checkIfHit(bullets.get(i).pos)) {\n shotsHit++;\n bullets.remove(i);//remove bullet\n score +=1;\n break;\n }\n }\n }\n //check if player has been hit\n if (immortalityTimer <=0) {\n for (int j = 0; j < asteroids.size(); j++) {\n if (asteroids.get(j).checkIfHitPlayer(position)) {\n playerHit();\n }\n }\n }\n }", "@Override\n\tpublic void CheckBounds() {\n\t\t\n\t}", "public boolean detectBound(){\n if(posX < 10){\n posX = 10;\n velX = 0;\n accX = 0;\n return true;\n }\n else if(posX > width - 10){\n posX = width - 10;\n velX = 0;\n accX = 0;\n return true;\n }\n if(posY < 10){\n posY = 10;\n velY = 0;\n accY = 0;\n return true;\n }\n else if(posY > height - 10){\n posY = height - 10;\n velY = 0;\n accY = 0;\n return true;\n }\n return false;\n }", "@Test\n public void testIsPositionValid() {\n assertFalse(this.board.isPositionValid(new Position(-1, -1)));\n assertFalse(this.board.isPositionValid(new Position(11, 11)));\n for (int line = 0; line < 11; line++) {\n for (int column = 0; column < 11; column++) {\n assertTrue(this.board.isPositionValid(new Position(line, column)));\n }\n }\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 9223372036854775806L, 9223372036854775806L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem1, 9223372032559808516L, 9223372032559808516L);\n Range range1 = Range.of(9223372036854775806L, 9223372036854775806L);\n range1.split(9223372032559808516L);\n boolean boolean0 = range1.endsBefore(range0);\n assertFalse(boolean0);\n \n boolean boolean1 = range0.equals(range1);\n assertFalse(boolean1);\n }", "public void testMovToPos() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertTrue(test1.moveToPos(5));\n assertTrue(test1.getValue().inRange(5));\n assertFalse(test1.moveToPos(-5));\n assertFalse(test1.getValue().inRange(-5));\n assertFalse(test1.moveToPos(50));\n assertFalse(test1.getValue().inRange(50));\n }", "@Override\n public boolean isRange() {\n return false;\n }", "boolean hasPositionX();", "boolean hasPositionX();", "boolean hasPositionX();", "private boolean isInsideValidRange (int value)\r\n\t{\r\n\t\treturn (value > m_lowerBounds && value <= m_upperBounds);\r\n\t}", "private boolean positionExists(int row, int column) {\n\t\treturn row >= 0 && row < rows && column >= 0 && column < columns;\n\t}", "public boolean outOfBounds()\n {\n if((lastpowerUp.equals(\"BLUE\") || lastpowerUp.equals(\"RAINBOW\")) && powerupTimer > 0)\n {\n return false;\n }\n \n if(head.getA() < 150 || head.getA() >= 1260)\n return true;\n else if(head.getB() <150 || head.getB() >=630)\n return true;\n else \n return false;\n \n \n }", "private boolean isBetweenBounds(int x, int y, int[] bounds) {\n return x >= bounds[0] && x <= bounds[2] && y >= bounds[1] && y <= bounds[3];\n }", "public boolean contains(int position) {\n return position >= startPosition.getOffset() || position <= endPosition.getOffset();\n }", "@Test(timeout = 4000)\n public void test31() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n String string0 = range0.toString(range_CoordinateSystem0);\n assertEquals(\"[ -1259 .. 256 ]/SB\", string0);\n \n Range range1 = Range.of((-1259L));\n range1.getEnd();\n long long0 = range1.getEnd();\n assertEquals((-1259L), long0);\n \n Range range2 = Range.of((-1259L), 255L);\n List<Range> list0 = range2.split(255L);\n List<Range> list1 = range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.forEach(consumer0);\n range2.complementFrom(list1);\n assertFalse(list0.contains(range0));\n assertEquals(0, list1.size());\n assertFalse(list0.isEmpty());\n \n Range range4 = Range.ofLength(0L);\n Range range5 = range4.intersection(range0);\n long long1 = range5.getEnd();\n assertEquals((-1L), long1);\n \n range0.intersects(range4);\n range3.equals(\"[ -1259 .. 256 ]/SB\");\n Range.of(333L);\n List<Range> list2 = range2.complement(range3);\n assertTrue(list2.contains(range0));\n }", "protected boolean validCoord(int row, int col) {\n\t\treturn (row >= 0 && row < b.size() && col >= 0 && col < b.size());\n\t}", "boolean hasEndPosition();", "boolean hasEndPosition();", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = range0.intersection(range1);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range3);\n List<Range> list1 = range2.complementFrom(list0);\n Range range4 = Range.of(1207L);\n assertFalse(range4.isEmpty());\n \n boolean boolean0 = range2.isSubRangeOf(range3);\n assertTrue(boolean0);\n \n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range2.forEach(consumer0);\n Range.CoordinateSystem range_CoordinateSystem3 = Range.CoordinateSystem.ZERO_BASED;\n range_CoordinateSystem3.toString();\n range0.equals(list1);\n assertSame(range2, range1);\n assertEquals(0, list1.size());\n \n range_CoordinateSystem1.toString();\n long long0 = range0.getEnd();\n assertEquals(255L, long0);\n }", "public boolean isLegal(int x_pos, int y_pos){\n //TODO\n //if the color is black,\n if(color==\"black\" || color.equals(\"black\")){\n for(int i=1; i<8; i++){\n if(this.x_pos-i==x_pos && y_pos==this.y_pos) return true;\n if(this.x_pos==x_pos && this.y_pos-i==y_pos) return true;\n }\n }\n //if the color is white, then its going up the board (you add the position)\n else{\n for(int i=1; i<8; i++){\n if(this.x_pos+i==x_pos && y_pos==this.y_pos) return true;\n if(this.x_pos==x_pos && this.y_pos+i==y_pos) return true;\n }\n }\n return false;\n }", "public boolean overlapsRange(Range range) {\n/* 334 */ if (range == null) {\n/* 335 */ return false;\n/* */ }\n/* 337 */ return (range.containsLong(this.min) || range.containsLong(this.max) || containsLong(range.getMinimumLong()));\n/* */ }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n long long0 = (-1259L);\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = range0.intersection(range1);\n List<Range> list0 = range2.split(255L);\n List<Range> list1 = range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.forEach(consumer0);\n range2.complementFrom(list1);\n // Undeclared exception!\n try { \n Range.of(0L, (-1259L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public boolean canReach(BE be, Vec3 pos) {\n\t\tAABB testRange = new AABB(be.getBlockPos()).inflate(this.range.apply(be));\n\n\t\treturn testRange.minX <= pos.x && testRange.minY <= pos.y && testRange.minZ <= pos.z && testRange.maxX >= pos.x && testRange.maxY >= pos.y && testRange.maxZ >= pos.z;\n\t}", "private boolean inProcessRange(ProcessorDistributionKey key, ActiveTimeSpans active)\n {\n if (checkTime(active, key.getTimeSpan(), key.getConstraintKey()))\n {\n return true;\n }\n\n final AnimationPlan animationPlan = myAnimationPlan;\n final AnimationState currentAnimationState = myCurrentAnimationState;\n if (animationPlan == null || currentAnimationState == null)\n {\n return false;\n }\n\n final int loadAhead = myProcessorBuilder.getProcessorFactory().getLoadAhead(key.getGeometryType());\n\n final AnimationState state = animationPlan.findState(key.getTimeSpan(), currentAnimationState.getDirection());\n if (state == null)\n {\n return false;\n }\n animationPlan.getTimeSpanForState(state);\n boolean inRange = false;\n try\n {\n final int distance = animationPlan.calculateDistance(currentAnimationState, state);\n inRange = distance <= loadAhead;\n }\n catch (final RuntimeException e)\n {\n // If this test fails just fail the in range test as this always\n // happens during a plan\n // change where the distributor has yet to receive the updated\n // plan and ends up in\n // a race condition with the animation manager adjusting to the\n // new plan.\n inRange = false;\n }\n return inRange;\n }", "private boolean isPositionIndex(final long index) {\r\n\t\treturn index >= 0 && index <= size;\r\n\t}", "private boolean correctPlacement(int[] pos) {\n for (int i = 0; i < crtStep; ++i) {\n for (int j = i + 1; j <= crtStep; ++j) {\n if (pos[i] == pos[j] || i - pos[i] == j - pos[j] || i + pos[i] == j + pos[j]) {\n return false;\n }\n }\n }\n \n return true;\n }", "public boolean allInRange(int start, int end) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tint a=data[i];\n \t\t\tif ((a<start)||(a>=end)) return false;\n \t\t}\n \t\treturn true;\n \t}", "private boolean tileIsInbounds(int row, int col){\n\t\treturn row >= 0 && col >= 0\n\t\t\t\t&& row < board.length && col < board[0].length;\n\t}", "@Override\r\n\tpublic boolean results(Element element)\r\n\t{\r\n\t\t// checks whether the x coordinate of the given element lies between the x coordinates of the two positions of this inPartOfBoard-condition\r\n\t\tif(((element.getPosition().getCoordX() >= this.getPosition1().getCoordX()) && (element.getPosition().getCoordX() <= this.getPosition2().getCoordX()))\r\n\t\t\t\t|| ((element.getPosition().getCoordX() <= this.getPosition1().getCoordX()) && (element.getPosition().getCoordX() >= this.getPosition2().getCoordX())))\r\n\t\t{\r\n\t\t\t// checks whether the y coordinate of the given element lies between the y coordinates of the two positions of this inPartOfBoard-condition\r\n\t\t\tif(((element.getPosition().getCoordY() >= this.getPosition1().getCoordY()) && (element.getPosition().getCoordY() <= this.getPosition2().getCoordY()))\r\n\t\t\t\t\t|| ((element.getPosition().getCoordY() <= this.getPosition1().getCoordY()) && (element.getPosition().getCoordY() >= this.getPosition2().getCoordY())))\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean checkIndexBounds(int idx) {\n return (idx >= 0) && (idx <= this.length);\n }", "private boolean leftBoundsReached(float delta) {\n return (textureRegionBounds2.x - (delta * speed)) <= 0;\n }", "public boolean outOfRange(){\r\n\t\t\treturn (shape.x <=0 ? true : false);\r\n\t\t}", "private boolean rangeHasChanged() {\n\t\tboolean tester = true;\n\t\t\n\t\ttester &= plotSheet.getxRange()[0] == this.xrange[0];\n\t\ttester &= plotSheet.getxRange()[1] == this.xrange[1];\n\t\ttester &= plotSheet.getyRange()[0] == this.yrange[0];\n\t\ttester &= plotSheet.getyRange()[1] == this.yrange[1];\n\t\t\n\t\tif(!tester) {\n\t\t\tthis.xrange = plotSheet.getxRange().clone();\n\t\t\tthis.yrange = plotSheet.getyRange().clone();\n\t\t}\n\t\t\n\t\treturn !tester || this.depthSearchAborted;\n\t}", "private static boolean checkOccurrenceRange(int min1, int max1, int min2, int max2) {\n/* 1159 */ if (min1 >= min2 && (max2 == -1 || (max1 != -1 && max1 <= max2)))\n/* */ {\n/* */ \n/* 1162 */ return true;\n/* */ }\n/* 1164 */ return false;\n/* */ }", "@Override\n public boolean contain(int x, int y) {\n return(x>=this.x && y>=this.y && x<=this.x+(int)a && y<=this.y+(int)b);\n }", "boolean HasRange() {\r\n\t\treturn hasRange;\r\n\t}", "private int checkRange(int number,int range){\n return (number+range)%range;\n }", "private boolean outOfBounds(int nidx1){\n\t\treturn (nidx1 < 0 || nidx1 >= numofvert);\n\t}", "private static boolean hasVisibleRegion(int begin,int end,int first,int last) {\n return (end > first && begin < last);\n }", "public abstract boolean isOutOfBounds(int x, int y);", "private boolean isOutOfBounds(int row, int col) {\n if (row < 0 || row >= this.getRows()) {\n return true;\n }\n else if (col < 0 || col >= this.getColumns()) {\n return true;\n }\n else {\n return false; // the placement is valid\n }\n }", "private boolean hasValidBounds() {\n\n\n\n return false;\n }", "private boolean reachX(Position target) {\n return position.x == target.x;\n }", "private boolean checkOverlap(int row, int col, int length){\n \tif(!inBounds(row,col)){\n \t\treturn false;\n \t}\n \tfor(int i = row; i < row + length; i++ ){\n\t\t\tfor(int j = col; j < col + length; j++){\n\t\t\t\tif(grid[i][col] == 1 || row + length >= 10)\n\t\t\t\t\treturn false;\n\t\t\t\tif(grid[row][j] == 1 || col + length >= 10)\n\t\t\t\t\treturn false;\n\t\t\t}\n \t\t\n \t}\n \treturn true;\n }", "public boolean inRange(int row, int col) {\n\t /*if the given row and col is less than 0 or greater than the maximum number, return false*/\n\t if(row < 0 || row >= this.row || col < 0 || col >= this.col) {\n\t\t return false;\n\t }\n\t /*return true if it's valid*/\n\t else {\n\t\t return true;\n\t }\n }", "@Override\n public boolean inBounds(int x, int y) {\n return x >= 0 && y >= 0 && x < this.bounds.width\n && y < this.bounds.height;\n }", "private boolean inRange(final int left, final int right, final int target) {\n if (left <= target && target <= right)\n return true;\n\n // 2. If this is a reverted array\n //\n // e.g. [6, 7, 8, 9, 1, 2, 3]\n if (left > right &&\n (target >= left || target <= right)) // NOTE the \"OR\" here.\n return true;\n\n return false;\n }", "@Test(timeout = 4000)\n public void test38() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 0L, 4294967295L);\n long long0 = new Long(0L);\n Range range1 = Range.of(4294967295L);\n long long1 = range1.getBegin();\n assertEquals(4294967295L, long1);\n \n Consumer<Long> consumer0 = (Consumer<Long>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n List<Range> list0 = range0.complement(range1);\n List<Range> list1 = range0.complementFrom(list0);\n Range range2 = Range.ofLength(2147483647L);\n range1.intersection(range0);\n Range range3 = Range.of(range_CoordinateSystem0, 0L, 4294967295L);\n range3.getEnd();\n boolean boolean0 = range2.intersects(range0);\n boolean boolean1 = range2.equals(\"numbeg of entries must be <= Integer.MAX_VALUE\");\n assertFalse(boolean1 == boolean0);\n \n Range range4 = Range.of(0L);\n assertFalse(range4.isEmpty());\n \n Range range5 = Range.of(1566L);\n List<Range> list2 = range5.complement(range2);\n assertFalse(list2.equals((Object)list0));\n assertTrue(list2.equals((Object)list1));\n }", "private int rangeCheck(int rowIndex) {\n\t\tif (rowIndex < 0) {\n\t\t\treturn 0;\n\t\t}\n\t\t// FIXME What about undefined container size ??\n\t\tint containerSize = container.size();\n\t\tif (rowIndex >= containerSize) {\n\t\t\treturn containerSize;\n\t\t}\n\t\treturn rowIndex;\n\t}", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n long long0 = new Long(0L);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 259L);\n Range range3 = Range.of(1L);\n Range range4 = Range.of((-32768L), 0L);\n range4.equals(range2);\n range0.complement(range3);\n Range range5 = range_Builder1.build();\n assertFalse(range5.equals((Object)range4));\n }", "@Test(timeout = 4000)\n public void test045() throws Throwable {\n Range range0 = Range.of((-32768L));\n Range range1 = Range.of((-32768L));\n boolean boolean0 = range0.endsBefore(range1);\n assertFalse(boolean0);\n \n long long0 = range0.getEnd();\n assertEquals((-32768L), long0);\n assertSame(range0, range1);\n }", "public Location inRange()\n\t{\n\t\tboolean equals = false;\n\t\tif(getGrid() == null)\n\t\t\treturn null;\n\t\tfor(int i = -5; i < 6; i++)\n\t\t{\n\t\t\tfor(int j = -5; j < 6; j++)\n\t\t\t{\t\t\t\t\n\t\t\t\tif(getGrid().isValid(new Location(getLocation().getRow() + i, getLocation().getCol() + j)))\n\t\t\t\t{\n\t\t\t\t\tif(getGrid().get(new Location(getLocation().getRow() + i, getLocation().getCol() + j)) instanceof User)\n\t\t\t\t\t{\n\t\t\t\t\t\tequals = true;\n\t\t\t\t\t\tbreak;\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\tif(!equals)\n\t\t{\n\t\t\tArrayList<Location> locs = getGrid().getEmptyAdjacentLocations(getLocation());\n\t\t\tif(locs.size() != 0)\n\t\t\t\t return locs.get( (int) (Math.random() * locs.size()));\n\t\t\telse\n\t\t\t\treturn getLocation();\n\t\t}\n\t\t\t\n\t\tLocation moveLocation;\n\t\t\n\t\t\n\t\tif(getGrid().getNeighbors(getLocation()).contains(getGrid().getUser()))\n\t\t{\n\t\t\tmoveLocation = getGrid().getUser().getLocation();\n\t\t}\n\t\telse\n {\n PathFinder a = new PathFinder(getGrid(),20);\n Path path = a.findPath(this, this.getGrid().getUser().getLocation().getRow(), this.getGrid().getUser().getLocation().getCol(),true);\n if(path.getLength() != 0)\n moveLocation = a.findPath(this, this.getGrid().getUser().getLocation().getRow(), this.getGrid().getUser().getLocation().getCol(),true).getStep(0);\n else\n moveLocation = null;\n\n }\n\n\t\tif(moveLocation == null)\n\t\t{\n\t\t\tArrayList<Location> locs = getGrid().getEmptyAdjacentLocations(getLocation());\n\t\t\tif(locs.size() != 0)\n\t\t\t\tmoveLocation = locs.get( (int) (Math.random() * locs.size()));\n\t\t\telse\n\t\t\t\tmoveLocation = getLocation();\n\t\t}\n\t\t\n\t\treturn moveLocation;\n\t}" ]
[ "0.7046293", "0.6943512", "0.6870864", "0.67629766", "0.6671402", "0.65768456", "0.65373206", "0.65082824", "0.65082824", "0.65082824", "0.65082824", "0.647779", "0.64605933", "0.64587545", "0.64344716", "0.6367099", "0.6348689", "0.63053", "0.6301723", "0.6290325", "0.6283873", "0.62774295", "0.62773323", "0.6274396", "0.6274337", "0.6265688", "0.62370795", "0.6223705", "0.62105846", "0.6200891", "0.6200409", "0.6199499", "0.6193687", "0.61933416", "0.6177538", "0.6162174", "0.61549014", "0.61541784", "0.6150232", "0.6137311", "0.6133778", "0.6126241", "0.61232305", "0.6121596", "0.6092515", "0.6082565", "0.6079195", "0.6073534", "0.60722315", "0.6067135", "0.6055487", "0.60477084", "0.60475117", "0.60239077", "0.60208666", "0.60195374", "0.60195374", "0.60195374", "0.6009378", "0.60086346", "0.600788", "0.600044", "0.59883934", "0.5981942", "0.59792763", "0.5969491", "0.5969491", "0.5958214", "0.5956242", "0.59547126", "0.5941943", "0.59215045", "0.5918844", "0.5917834", "0.5912013", "0.5910905", "0.5908689", "0.5907463", "0.59063196", "0.5901747", "0.5901711", "0.58946127", "0.5893536", "0.5892801", "0.5890543", "0.5890328", "0.5890189", "0.5889749", "0.5889714", "0.58830947", "0.5870932", "0.5870891", "0.58700603", "0.58689374", "0.5861729", "0.58598", "0.58454335", "0.5843756", "0.58400476", "0.5835329", "0.5832424" ]
0.0
-1
before all we check if position is within range
public void delete(int position) { if (position >= 0 && position < size) { // first resize the storage array E[] newData = (E[]) new Object[size - 1]; // copy the data prior to the delition for (int i = 0; i < position; i++) newData[i] = data[i]; // move the data after the deletion for (int i = position + 1; i < size; i++) newData[i - 1] = data[i]; // replace the storage with the new array data = newData; size = size - 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkPosition(int position) {\r\n\t\treturn position>size||position < 0;\r\n\t}", "private boolean isValidPosition(Point pos){\r\n return (0 <= pos.getFirst() && pos.getFirst() < 8 && \r\n 0 <= pos.getSecond() && pos.getSecond() < 8);\r\n }", "public static boolean inRange (Position defPos, Position atkPos, int range) {\n\t\tint defX = defPos.getX();\n\t\tint defY = defPos.getY();\n\t\t\n\t\tint atkX = atkPos.getX();\n\t\tint atkY = atkPos.getY();\n\t\t\n\t\tif (defX -range <= atkX &&\n\t\t\t\tdefX + range >= atkX)\n\t\t{\n\t\t\tif (defY -range <= atkY &&\n\t\t\t\t\tdefY+range >= atkY)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean inRange(){\n //System.out.println(\"inRange\");\n return Math.abs(GameView.instance.player.position.x - creationPoint.x) < GameView.instance.cameraSize * attackRange;\n }", "public boolean contains(Index position) { // TODO rename: adjoinsOrContains\n return position != null && position.getX() + 1 >= start.getX() && position.getY() + 1 >= start.getY() && position.getX() <= end.getX() && position.getY() <= end.getY();\n }", "private boolean isLegalPositon(Position checkPosition){\n if (checkPosition.equalPosition(start)||checkPosition.equalPosition(end))\n return true;\n if(checkPosition.getRow()<0 || checkPosition.getCol()<0 || checkPosition.getRow()>=this.rows || checkPosition.getCol() >= this.cols){\n return false;\n }\n\n if(maze[checkPosition.getRow()][checkPosition.getCol()]== WallType.wall){\n return false;\n }\n return true;\n }", "private boolean inBounds(int row, int col){\n if (row > -1 && row < 120 && col > -1 && col < 160)\n return true;\n return false;\n }", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "private boolean isLegalPos(int row, int col){\r\n return !(row < 0 || row > 7 || col < 0 || col > 7);\r\n }", "public boolean contains2(DecimalPosition position) { // TODO rename: ???\n return position != null && position.getX() >= start.getX() && position.getY() >= start.getY() && position.getX() <= end.getX() && position.getY() <= end.getY();\n }", "public boolean containsExclusive(DecimalPosition position) { // TODO rename: contains\n if (position.getX() < start.getX() || position.getY() < start.getY()) {\n return false;\n }\n if (width() > 0) {\n if (position.getX() >= end.getX()) {\n return false;\n }\n } else {\n if (position.getX() > end.getX()) {\n return false;\n }\n }\n\n if (height() > 0) {\n if (position.getY() >= end.getY()) {\n return false;\n }\n } else {\n if (position.getY() > end.getY()) {\n return false;\n }\n }\n return true;\n }", "public Position trouverHeros(Position pos, int range);", "private boolean rangeCheck(int i){\n return i >= 0 && i < size;\n }", "private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }", "private int inRange(int x, int y) {\n\t\tif (x > 3 && y > 3 && x < max_x - 3 && y < max_y - 3) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "@Override\n\tpublic boolean outOfBounds() {\n\t\treturn this.getY() < 0;\n\t}", "private boolean inBounds(int row, int col)\n {\n return ((row >= 0) && (row < NUM_ROWS) &&\n (col >= 0) && (col < NUM_COLS)); \n }", "public abstract boolean checkMoveRange(String destination);", "public boolean atPosition() {\n return m_X.getClosedLoopError() < Constants.k_ToleranceX;\n }", "private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }", "private boolean cell_in_bounds(int row, int col) {\n return row >= 0\n && row < rowsCount\n && col >= 0\n && col < colsCount;\n }", "private boolean withinRange(Enemy e) {\n \t\tRect r = e.r; //Get the collision box from the \n \t\tPoint rectCenter = new Point((int) r.exactCenterX(), (int) r.exactCenterY());\n \t\tif (Math.abs(center.x - rectCenter.x) <= (e.getSize()/2 + range)) {\n \t\t\tif (Math.abs(center.y - rectCenter.y) <= (e.getSize()/2 + range)) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n \t\treturn false;\t\n \t}", "boolean inBoundingBox(Coord pos) {\n\t\treturn min(from.x, to.x) <= pos.x && pos.x <= max(from.x, to.x)\n\t\t\t\t&& min(from.y, to.y) <= pos.y && pos.y <= max(from.y, to.y);\n\t}", "private static void checkFromToBounds(int paramInt1, int paramInt2, int paramInt3) {\n/* 386 */ if (paramInt2 > paramInt3) {\n/* 387 */ throw new ArrayIndexOutOfBoundsException(\"origin(\" + paramInt2 + \") > fence(\" + paramInt3 + \")\");\n/* */ }\n/* */ \n/* 390 */ if (paramInt2 < 0) {\n/* 391 */ throw new ArrayIndexOutOfBoundsException(paramInt2);\n/* */ }\n/* 393 */ if (paramInt3 > paramInt1) {\n/* 394 */ throw new ArrayIndexOutOfBoundsException(paramInt3);\n/* */ }\n/* */ }", "private boolean isNearToEndPosition() {\n switch (direction) {\n case UP:\n return posY <= endPosition;\n case DOWN:\n return posY >= endPosition;\n case LEFT:\n return posX <= endPosition;\n case RIGHT:\n return posX >= endPosition;\n }\n throw new RuntimeException(\"Unknown position\");\n }", "boolean hasDestRange();", "private boolean reachableGap(int a_xmin, int a_xmax, int pos)\n {\n boolean reachableGap = false;\n int destinationY = GEBT_MarioAgent.MARIO_Y;\n if(pos-1 > m_cellsRun)\n {\n destinationY = GEBT_MarioAgent.MARIO_Y + (pos - 1 - m_cellsRun);\n reachableGap = !isObstacle(GEBT_MarioAgent.MARIO_X-1, GEBT_MarioAgent.MARIO_X,GEBT_MarioAgent.MARIO_Y, destinationY);\n }\n else if(pos-1 < m_cellsRun)\n {\n destinationY = GEBT_MarioAgent.MARIO_Y + (pos - 1 - m_cellsRun);\n reachableGap = !isObstacle(GEBT_MarioAgent.MARIO_X-1, GEBT_MarioAgent.MARIO_X, destinationY, GEBT_MarioAgent.MARIO_Y);\n }\n else reachableGap = true;\n\n //2nd check, there must be space for me over the gap\n if(reachableGap)\n {\n boolean obsInTop = isObstacle(a_xmin, a_xmin, destinationY+1, destinationY+1); //Identify where the obstacle is.\n boolean obsInDown = isObstacle(a_xmax, a_xmax, destinationY+1, destinationY+1);\n int hMin = a_xmin, hMax = a_xmax;\n if(obsInTop && !obsInDown)\n {\n//hMin = a_xmax;//THIS IS BAD\n//hMax = a_xmax + 1;//THIS IS BAD\n\n hMin = a_xmin-2; //THIS IS GOOD\n hMax = a_xmax-2; //THIS IS GOOD\n }else if(obsInDown)\n {\n//hMin = a_xmin + 2;//THIS IS BAD\n//hMax = a_xmax + 2;//THIS IS BAD\n hMin = a_xmin-1;//THIS IS GOOD\n hMax = a_xmax-1;//THIS IS GOOD\n }\n\n boolean marioSmall = marioMode == 0;\n if(marioSmall) hMax = hMin;\n reachableGap = !isObstacle(hMin, hMax, destinationY+1, destinationY+1); //Check if there is space enough for Mario to jump.\n }\n\n return reachableGap;\n }", "private boolean contains(int from1, int to1, int from2, int to2) {\n\t\treturn from2 >= from1 && to2 <= to1;\n\t}", "boolean checkIfValidToCreate(int start, int end) {\n return myMarkerTree.processOverlappingWith(start, end, region->{\n int rStart = region.getStartOffset();\n int rEnd = region.getEndOffset();\n if (rStart < start) {\n if (region.isValid() && start < rEnd && rEnd < end) {\n return false;\n }\n }\n else if (rStart == start) {\n if (rEnd == end) {\n return false;\n }\n }\n else {\n if (rStart > end) {\n return true;\n }\n if (region.isValid() && rStart < end && end < rEnd) {\n return false;\n }\n }\n return true;\n });\n }", "public boolean detectBound(){\n if(posX < 0 || posX > width || posY < 0 || posY > height){\n return true;\n }\n else{\n return false;\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n range0.getEnd(range_CoordinateSystem0);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = null;\n try {\n range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 248L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "private boolean checkRange(final int index) {\n if ((index > size) || (index < 0)) {\n return false;\n }\n return true;\n }", "private boolean checkInBounds(int startX, int startY, int finalX, int finalY) {\r\n\t\treturn startX < 0 || startX >= this.SIZE || startY < 0 || startY >= this.SIZE\r\n\t\t\t\t|| finalX < 0 || finalX >= this.SIZE || finalY < 0 || finalY >= this.SIZE;\r\n\t}", "private boolean validate(int position) {\n return ((position >= 0) && (position < this.values.length));\n }", "@Override\n public boolean isInBounds(int row, int col) {\n return row >= 0 && row < grid.length && col >= 0 && col < grid[0].length;\n }", "public isWithin() {\n\t\tsuper();\n\t}", "private boolean verifyBounds() {\r\n\t if((x>RobotController.BOUNDS_X || y>RobotController.BOUNDS_Y)\r\n\t || x<0 || y<0){\r\n\t return false;\r\n\t }\r\n\t return true;\r\n\t }", "public void checkPosition(){\n int absPos = mArm.getSensorCollection().getPulseWidthPosition();\n // mArm.configSelectedFeedbackSensor(FeedbackDevice.QuadEncoder);\n mArm.setSelectedSensorPosition(absPos - offset);\n }", "private boolean checkRange(int rowIndex, int columnIndex) {\n return rowIndex >= 0 && rowIndex < matrix.length\n && columnIndex >= 0 && columnIndex < matrix[rowIndex].length;\n\n }", "private boolean isInBound(int current, int bound){\n return (current >= 0 && current < bound);\n }", "@Test(timeout = 4000)\n public void test42() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-2147483648L), 1146L);\n long long0 = range0.getBegin();\n assertEquals((-2147483648L), long0);\n \n Range range1 = Range.of(1146L);\n boolean boolean0 = range1.endsBefore(range0);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n List<Range> list0 = range1.complementFrom(linkedList0);\n range0.complementFrom(list0);\n Range range2 = Range.ofLength(1146L);\n Range range3 = range2.intersection(range1);\n long long1 = range1.getEnd();\n assertEquals(1146L, long1);\n \n boolean boolean1 = range0.intersects(range2);\n boolean boolean2 = range1.equals(range2);\n assertFalse(boolean2 == boolean1);\n \n range0.getEnd();\n Range.of(2641L);\n List<Range> list1 = range0.complement(range2);\n assertEquals(1, list1.size());\n \n boolean boolean3 = range3.startsBefore(range1);\n assertTrue(boolean3 == boolean0);\n assertTrue(range3.isEmpty());\n assertFalse(boolean3);\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n Range range0 = Range.of((-81L));\n Range range1 = Range.of((-1L));\n boolean boolean0 = range0.intersects(range1);\n assertFalse(boolean0);\n assertFalse(range1.isEmpty());\n \n Range.Comparators.values();\n long long0 = range0.getBegin();\n assertEquals((-81L), long0);\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n Range range1 = Range.of(1845L);\n boolean boolean0 = range0.isSubRangeOf(range1);\n assertFalse(boolean0);\n \n range0.getBegin();\n assertTrue(range0.isEmpty());\n }", "private Vector2d checkOutOfBounds(Vector2d position) {\n\t\t//Check for x\n\t\tif (position.x < 0) position.x = 0;\n\t\tif (position.x > course.TERRAIN_SIZE) position.x = course.TERRAIN_SIZE;\n\t\t//Check for y\n\t\tif (position.y < 0) position.y = 0;\n\t\tif (position.y > course.TERRAIN_SIZE) position.y = course.TERRAIN_SIZE;\n\n\t\treturn new Vector2d(position.x,position.y);\n\t}", "boolean hasTargetPos();", "void checkPositions() {\n //check if any bullets have hit any asteroids\n for (int i = 0; i < bullets.size(); i++) {\n for (int j = 0; j < asteroids.size(); j++) {\n if (asteroids.get(j).checkIfHit(bullets.get(i).pos)) {\n shotsHit++;\n bullets.remove(i);//remove bullet\n score +=1;\n break;\n }\n }\n }\n //check if player has been hit\n if (immortalityTimer <=0) {\n for (int j = 0; j < asteroids.size(); j++) {\n if (asteroids.get(j).checkIfHitPlayer(position)) {\n playerHit();\n }\n }\n }\n }", "@Override\n\tpublic void CheckBounds() {\n\t\t\n\t}", "public boolean detectBound(){\n if(posX < 10){\n posX = 10;\n velX = 0;\n accX = 0;\n return true;\n }\n else if(posX > width - 10){\n posX = width - 10;\n velX = 0;\n accX = 0;\n return true;\n }\n if(posY < 10){\n posY = 10;\n velY = 0;\n accY = 0;\n return true;\n }\n else if(posY > height - 10){\n posY = height - 10;\n velY = 0;\n accY = 0;\n return true;\n }\n return false;\n }", "@Test\n public void testIsPositionValid() {\n assertFalse(this.board.isPositionValid(new Position(-1, -1)));\n assertFalse(this.board.isPositionValid(new Position(11, 11)));\n for (int line = 0; line < 11; line++) {\n for (int column = 0; column < 11; column++) {\n assertTrue(this.board.isPositionValid(new Position(line, column)));\n }\n }\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 9223372036854775806L, 9223372036854775806L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem1, 9223372032559808516L, 9223372032559808516L);\n Range range1 = Range.of(9223372036854775806L, 9223372036854775806L);\n range1.split(9223372032559808516L);\n boolean boolean0 = range1.endsBefore(range0);\n assertFalse(boolean0);\n \n boolean boolean1 = range0.equals(range1);\n assertFalse(boolean1);\n }", "public void testMovToPos() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertTrue(test1.moveToPos(5));\n assertTrue(test1.getValue().inRange(5));\n assertFalse(test1.moveToPos(-5));\n assertFalse(test1.getValue().inRange(-5));\n assertFalse(test1.moveToPos(50));\n assertFalse(test1.getValue().inRange(50));\n }", "@Override\n public boolean isRange() {\n return false;\n }", "boolean hasPositionX();", "boolean hasPositionX();", "boolean hasPositionX();", "private boolean isInsideValidRange (int value)\r\n\t{\r\n\t\treturn (value > m_lowerBounds && value <= m_upperBounds);\r\n\t}", "private boolean positionExists(int row, int column) {\n\t\treturn row >= 0 && row < rows && column >= 0 && column < columns;\n\t}", "public boolean outOfBounds()\n {\n if((lastpowerUp.equals(\"BLUE\") || lastpowerUp.equals(\"RAINBOW\")) && powerupTimer > 0)\n {\n return false;\n }\n \n if(head.getA() < 150 || head.getA() >= 1260)\n return true;\n else if(head.getB() <150 || head.getB() >=630)\n return true;\n else \n return false;\n \n \n }", "private boolean isBetweenBounds(int x, int y, int[] bounds) {\n return x >= bounds[0] && x <= bounds[2] && y >= bounds[1] && y <= bounds[3];\n }", "public boolean contains(int position) {\n return position >= startPosition.getOffset() || position <= endPosition.getOffset();\n }", "@Test(timeout = 4000)\n public void test31() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n String string0 = range0.toString(range_CoordinateSystem0);\n assertEquals(\"[ -1259 .. 256 ]/SB\", string0);\n \n Range range1 = Range.of((-1259L));\n range1.getEnd();\n long long0 = range1.getEnd();\n assertEquals((-1259L), long0);\n \n Range range2 = Range.of((-1259L), 255L);\n List<Range> list0 = range2.split(255L);\n List<Range> list1 = range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.forEach(consumer0);\n range2.complementFrom(list1);\n assertFalse(list0.contains(range0));\n assertEquals(0, list1.size());\n assertFalse(list0.isEmpty());\n \n Range range4 = Range.ofLength(0L);\n Range range5 = range4.intersection(range0);\n long long1 = range5.getEnd();\n assertEquals((-1L), long1);\n \n range0.intersects(range4);\n range3.equals(\"[ -1259 .. 256 ]/SB\");\n Range.of(333L);\n List<Range> list2 = range2.complement(range3);\n assertTrue(list2.contains(range0));\n }", "protected boolean validCoord(int row, int col) {\n\t\treturn (row >= 0 && row < b.size() && col >= 0 && col < b.size());\n\t}", "boolean hasEndPosition();", "boolean hasEndPosition();", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = range0.intersection(range1);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range3);\n List<Range> list1 = range2.complementFrom(list0);\n Range range4 = Range.of(1207L);\n assertFalse(range4.isEmpty());\n \n boolean boolean0 = range2.isSubRangeOf(range3);\n assertTrue(boolean0);\n \n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range2.forEach(consumer0);\n Range.CoordinateSystem range_CoordinateSystem3 = Range.CoordinateSystem.ZERO_BASED;\n range_CoordinateSystem3.toString();\n range0.equals(list1);\n assertSame(range2, range1);\n assertEquals(0, list1.size());\n \n range_CoordinateSystem1.toString();\n long long0 = range0.getEnd();\n assertEquals(255L, long0);\n }", "public boolean isLegal(int x_pos, int y_pos){\n //TODO\n //if the color is black,\n if(color==\"black\" || color.equals(\"black\")){\n for(int i=1; i<8; i++){\n if(this.x_pos-i==x_pos && y_pos==this.y_pos) return true;\n if(this.x_pos==x_pos && this.y_pos-i==y_pos) return true;\n }\n }\n //if the color is white, then its going up the board (you add the position)\n else{\n for(int i=1; i<8; i++){\n if(this.x_pos+i==x_pos && y_pos==this.y_pos) return true;\n if(this.x_pos==x_pos && this.y_pos+i==y_pos) return true;\n }\n }\n return false;\n }", "public boolean overlapsRange(Range range) {\n/* 334 */ if (range == null) {\n/* 335 */ return false;\n/* */ }\n/* 337 */ return (range.containsLong(this.min) || range.containsLong(this.max) || containsLong(range.getMinimumLong()));\n/* */ }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n long long0 = (-1259L);\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = range0.intersection(range1);\n List<Range> list0 = range2.split(255L);\n List<Range> list1 = range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.forEach(consumer0);\n range2.complementFrom(list1);\n // Undeclared exception!\n try { \n Range.of(0L, (-1259L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public boolean canReach(BE be, Vec3 pos) {\n\t\tAABB testRange = new AABB(be.getBlockPos()).inflate(this.range.apply(be));\n\n\t\treturn testRange.minX <= pos.x && testRange.minY <= pos.y && testRange.minZ <= pos.z && testRange.maxX >= pos.x && testRange.maxY >= pos.y && testRange.maxZ >= pos.z;\n\t}", "private boolean inProcessRange(ProcessorDistributionKey key, ActiveTimeSpans active)\n {\n if (checkTime(active, key.getTimeSpan(), key.getConstraintKey()))\n {\n return true;\n }\n\n final AnimationPlan animationPlan = myAnimationPlan;\n final AnimationState currentAnimationState = myCurrentAnimationState;\n if (animationPlan == null || currentAnimationState == null)\n {\n return false;\n }\n\n final int loadAhead = myProcessorBuilder.getProcessorFactory().getLoadAhead(key.getGeometryType());\n\n final AnimationState state = animationPlan.findState(key.getTimeSpan(), currentAnimationState.getDirection());\n if (state == null)\n {\n return false;\n }\n animationPlan.getTimeSpanForState(state);\n boolean inRange = false;\n try\n {\n final int distance = animationPlan.calculateDistance(currentAnimationState, state);\n inRange = distance <= loadAhead;\n }\n catch (final RuntimeException e)\n {\n // If this test fails just fail the in range test as this always\n // happens during a plan\n // change where the distributor has yet to receive the updated\n // plan and ends up in\n // a race condition with the animation manager adjusting to the\n // new plan.\n inRange = false;\n }\n return inRange;\n }", "private boolean isPositionIndex(final long index) {\r\n\t\treturn index >= 0 && index <= size;\r\n\t}", "private boolean correctPlacement(int[] pos) {\n for (int i = 0; i < crtStep; ++i) {\n for (int j = i + 1; j <= crtStep; ++j) {\n if (pos[i] == pos[j] || i - pos[i] == j - pos[j] || i + pos[i] == j + pos[j]) {\n return false;\n }\n }\n }\n \n return true;\n }", "public boolean allInRange(int start, int end) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tint a=data[i];\n \t\t\tif ((a<start)||(a>=end)) return false;\n \t\t}\n \t\treturn true;\n \t}", "private boolean tileIsInbounds(int row, int col){\n\t\treturn row >= 0 && col >= 0\n\t\t\t\t&& row < board.length && col < board[0].length;\n\t}", "@Override\r\n\tpublic boolean results(Element element)\r\n\t{\r\n\t\t// checks whether the x coordinate of the given element lies between the x coordinates of the two positions of this inPartOfBoard-condition\r\n\t\tif(((element.getPosition().getCoordX() >= this.getPosition1().getCoordX()) && (element.getPosition().getCoordX() <= this.getPosition2().getCoordX()))\r\n\t\t\t\t|| ((element.getPosition().getCoordX() <= this.getPosition1().getCoordX()) && (element.getPosition().getCoordX() >= this.getPosition2().getCoordX())))\r\n\t\t{\r\n\t\t\t// checks whether the y coordinate of the given element lies between the y coordinates of the two positions of this inPartOfBoard-condition\r\n\t\t\tif(((element.getPosition().getCoordY() >= this.getPosition1().getCoordY()) && (element.getPosition().getCoordY() <= this.getPosition2().getCoordY()))\r\n\t\t\t\t\t|| ((element.getPosition().getCoordY() <= this.getPosition1().getCoordY()) && (element.getPosition().getCoordY() >= this.getPosition2().getCoordY())))\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean checkIndexBounds(int idx) {\n return (idx >= 0) && (idx <= this.length);\n }", "private boolean leftBoundsReached(float delta) {\n return (textureRegionBounds2.x - (delta * speed)) <= 0;\n }", "public boolean outOfRange(){\r\n\t\t\treturn (shape.x <=0 ? true : false);\r\n\t\t}", "private boolean rangeHasChanged() {\n\t\tboolean tester = true;\n\t\t\n\t\ttester &= plotSheet.getxRange()[0] == this.xrange[0];\n\t\ttester &= plotSheet.getxRange()[1] == this.xrange[1];\n\t\ttester &= plotSheet.getyRange()[0] == this.yrange[0];\n\t\ttester &= plotSheet.getyRange()[1] == this.yrange[1];\n\t\t\n\t\tif(!tester) {\n\t\t\tthis.xrange = plotSheet.getxRange().clone();\n\t\t\tthis.yrange = plotSheet.getyRange().clone();\n\t\t}\n\t\t\n\t\treturn !tester || this.depthSearchAborted;\n\t}", "private static boolean checkOccurrenceRange(int min1, int max1, int min2, int max2) {\n/* 1159 */ if (min1 >= min2 && (max2 == -1 || (max1 != -1 && max1 <= max2)))\n/* */ {\n/* */ \n/* 1162 */ return true;\n/* */ }\n/* 1164 */ return false;\n/* */ }", "@Override\n public boolean contain(int x, int y) {\n return(x>=this.x && y>=this.y && x<=this.x+(int)a && y<=this.y+(int)b);\n }", "boolean HasRange() {\r\n\t\treturn hasRange;\r\n\t}", "private int checkRange(int number,int range){\n return (number+range)%range;\n }", "private boolean outOfBounds(int nidx1){\n\t\treturn (nidx1 < 0 || nidx1 >= numofvert);\n\t}", "private static boolean hasVisibleRegion(int begin,int end,int first,int last) {\n return (end > first && begin < last);\n }", "public abstract boolean isOutOfBounds(int x, int y);", "private boolean isOutOfBounds(int row, int col) {\n if (row < 0 || row >= this.getRows()) {\n return true;\n }\n else if (col < 0 || col >= this.getColumns()) {\n return true;\n }\n else {\n return false; // the placement is valid\n }\n }", "private boolean hasValidBounds() {\n\n\n\n return false;\n }", "private boolean reachX(Position target) {\n return position.x == target.x;\n }", "private boolean checkOverlap(int row, int col, int length){\n \tif(!inBounds(row,col)){\n \t\treturn false;\n \t}\n \tfor(int i = row; i < row + length; i++ ){\n\t\t\tfor(int j = col; j < col + length; j++){\n\t\t\t\tif(grid[i][col] == 1 || row + length >= 10)\n\t\t\t\t\treturn false;\n\t\t\t\tif(grid[row][j] == 1 || col + length >= 10)\n\t\t\t\t\treturn false;\n\t\t\t}\n \t\t\n \t}\n \treturn true;\n }", "public boolean inRange(int row, int col) {\n\t /*if the given row and col is less than 0 or greater than the maximum number, return false*/\n\t if(row < 0 || row >= this.row || col < 0 || col >= this.col) {\n\t\t return false;\n\t }\n\t /*return true if it's valid*/\n\t else {\n\t\t return true;\n\t }\n }", "@Override\n public boolean inBounds(int x, int y) {\n return x >= 0 && y >= 0 && x < this.bounds.width\n && y < this.bounds.height;\n }", "private boolean inRange(final int left, final int right, final int target) {\n if (left <= target && target <= right)\n return true;\n\n // 2. If this is a reverted array\n //\n // e.g. [6, 7, 8, 9, 1, 2, 3]\n if (left > right &&\n (target >= left || target <= right)) // NOTE the \"OR\" here.\n return true;\n\n return false;\n }", "@Test(timeout = 4000)\n public void test38() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 0L, 4294967295L);\n long long0 = new Long(0L);\n Range range1 = Range.of(4294967295L);\n long long1 = range1.getBegin();\n assertEquals(4294967295L, long1);\n \n Consumer<Long> consumer0 = (Consumer<Long>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n List<Range> list0 = range0.complement(range1);\n List<Range> list1 = range0.complementFrom(list0);\n Range range2 = Range.ofLength(2147483647L);\n range1.intersection(range0);\n Range range3 = Range.of(range_CoordinateSystem0, 0L, 4294967295L);\n range3.getEnd();\n boolean boolean0 = range2.intersects(range0);\n boolean boolean1 = range2.equals(\"numbeg of entries must be <= Integer.MAX_VALUE\");\n assertFalse(boolean1 == boolean0);\n \n Range range4 = Range.of(0L);\n assertFalse(range4.isEmpty());\n \n Range range5 = Range.of(1566L);\n List<Range> list2 = range5.complement(range2);\n assertFalse(list2.equals((Object)list0));\n assertTrue(list2.equals((Object)list1));\n }", "private int rangeCheck(int rowIndex) {\n\t\tif (rowIndex < 0) {\n\t\t\treturn 0;\n\t\t}\n\t\t// FIXME What about undefined container size ??\n\t\tint containerSize = container.size();\n\t\tif (rowIndex >= containerSize) {\n\t\t\treturn containerSize;\n\t\t}\n\t\treturn rowIndex;\n\t}", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n long long0 = new Long(0L);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 259L);\n Range range3 = Range.of(1L);\n Range range4 = Range.of((-32768L), 0L);\n range4.equals(range2);\n range0.complement(range3);\n Range range5 = range_Builder1.build();\n assertFalse(range5.equals((Object)range4));\n }", "@Test(timeout = 4000)\n public void test045() throws Throwable {\n Range range0 = Range.of((-32768L));\n Range range1 = Range.of((-32768L));\n boolean boolean0 = range0.endsBefore(range1);\n assertFalse(boolean0);\n \n long long0 = range0.getEnd();\n assertEquals((-32768L), long0);\n assertSame(range0, range1);\n }", "public Location inRange()\n\t{\n\t\tboolean equals = false;\n\t\tif(getGrid() == null)\n\t\t\treturn null;\n\t\tfor(int i = -5; i < 6; i++)\n\t\t{\n\t\t\tfor(int j = -5; j < 6; j++)\n\t\t\t{\t\t\t\t\n\t\t\t\tif(getGrid().isValid(new Location(getLocation().getRow() + i, getLocation().getCol() + j)))\n\t\t\t\t{\n\t\t\t\t\tif(getGrid().get(new Location(getLocation().getRow() + i, getLocation().getCol() + j)) instanceof User)\n\t\t\t\t\t{\n\t\t\t\t\t\tequals = true;\n\t\t\t\t\t\tbreak;\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\tif(!equals)\n\t\t{\n\t\t\tArrayList<Location> locs = getGrid().getEmptyAdjacentLocations(getLocation());\n\t\t\tif(locs.size() != 0)\n\t\t\t\t return locs.get( (int) (Math.random() * locs.size()));\n\t\t\telse\n\t\t\t\treturn getLocation();\n\t\t}\n\t\t\t\n\t\tLocation moveLocation;\n\t\t\n\t\t\n\t\tif(getGrid().getNeighbors(getLocation()).contains(getGrid().getUser()))\n\t\t{\n\t\t\tmoveLocation = getGrid().getUser().getLocation();\n\t\t}\n\t\telse\n {\n PathFinder a = new PathFinder(getGrid(),20);\n Path path = a.findPath(this, this.getGrid().getUser().getLocation().getRow(), this.getGrid().getUser().getLocation().getCol(),true);\n if(path.getLength() != 0)\n moveLocation = a.findPath(this, this.getGrid().getUser().getLocation().getRow(), this.getGrid().getUser().getLocation().getCol(),true).getStep(0);\n else\n moveLocation = null;\n\n }\n\n\t\tif(moveLocation == null)\n\t\t{\n\t\t\tArrayList<Location> locs = getGrid().getEmptyAdjacentLocations(getLocation());\n\t\t\tif(locs.size() != 0)\n\t\t\t\tmoveLocation = locs.get( (int) (Math.random() * locs.size()));\n\t\t\telse\n\t\t\t\tmoveLocation = getLocation();\n\t\t}\n\t\t\n\t\treturn moveLocation;\n\t}" ]
[ "0.7046293", "0.6943512", "0.6870864", "0.67629766", "0.6671402", "0.65768456", "0.65373206", "0.65082824", "0.65082824", "0.65082824", "0.65082824", "0.647779", "0.64605933", "0.64587545", "0.64344716", "0.6367099", "0.6348689", "0.63053", "0.6301723", "0.6290325", "0.6283873", "0.62774295", "0.62773323", "0.6274396", "0.6274337", "0.6265688", "0.62370795", "0.6223705", "0.62105846", "0.6200891", "0.6200409", "0.6199499", "0.6193687", "0.61933416", "0.6177538", "0.6162174", "0.61549014", "0.61541784", "0.6150232", "0.6137311", "0.6133778", "0.6126241", "0.61232305", "0.6121596", "0.6092515", "0.6082565", "0.6079195", "0.6073534", "0.60722315", "0.6067135", "0.6055487", "0.60477084", "0.60475117", "0.60239077", "0.60208666", "0.60195374", "0.60195374", "0.60195374", "0.6009378", "0.60086346", "0.600788", "0.600044", "0.59883934", "0.5981942", "0.59792763", "0.5969491", "0.5969491", "0.5958214", "0.5956242", "0.59547126", "0.5941943", "0.59215045", "0.5918844", "0.5917834", "0.5912013", "0.5910905", "0.5908689", "0.5907463", "0.59063196", "0.5901747", "0.5901711", "0.58946127", "0.5893536", "0.5892801", "0.5890543", "0.5890328", "0.5890189", "0.5889749", "0.5889714", "0.58830947", "0.5870932", "0.5870891", "0.58700603", "0.58689374", "0.5861729", "0.58598", "0.58454335", "0.5843756", "0.58400476", "0.5835329", "0.5832424" ]
0.0
-1
first resize the storage array
public void resize(int newSize) { E[] newData = (E[]) new Object[newSize]; // copy the data int copySize = size; if (newSize < size) copySize = newSize; for (int i = 0; i < copySize; i++) newData[i] = data[i]; // replace the storage with the new array data = newData; size = newSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n\tprivate void resize(int newSize){\n\t\tif(newSize > max){\n\t\t\tnewSize = max;\n\t\t}\n\t\tT[] newData = (T[])new Object[newSize];\n\t\tfor(int i = 0; i < size; i++){\n\t\t\tnewData[i] = data[i];\n\t\t}\n\t\tdata = newData;\n\t}", "void resize() {\n capacity = array.size();\n }", "private void grow() {\n int growSize = size + (size<<1);\n array = Arrays.copyOf(array, growSize);\n }", "public void reSize() {\n int newSize = arr.length * 2;\n arr = Arrays.copyOf(arr, newSize);\n }", "private void resize(int newSize){\n Item[] temp = (Item[]) new Object[newSize]; //newsize\n for(int i=0; i<itemCount; i++){\n temp[i] = array[i]; // fill temp with array's stuff\n }\n array = temp; // reset array to temp\n }", "private void resize() {\n contents = Arrays.copyOf(contents, top*2);\r\n }", "private void resize(int newCapacity) {\n\n E[] temp = (E[]) new Object[newCapacity];\n for(int i = 0; i < size(); i++)\n temp[i] = data[calculate(i)];\n data = temp;\n head = 0;\n tail = size()-1;\n\n\n }", "void resize() {\n Comparable[] temp = new Comparable[size * 2];\n for (int i = 0; i < pq.length; i++) {\n temp[i] = pq[i];\n }\n pq = temp;\n }", "protected void resize(int capacity){\n E[] temp = (E[]) new Object[capacity];\n for (int i = 0; i < size; i++) {\n temp[i] = data[i];\n }\n data = temp;\n }", "private void resize(int capacity) {\n // create a new array, and copy the original array items to the new array\n T[] newArray = (T[]) new Object[capacity];\n int position = plusOne(nextFirst);\n for (int i = 0; i < size; i += 1) {\n newArray[i] = array[position];\n position = plusOne(position);\n }\n nextFirst = newArray.length - 1;\n nextLast = size;\n array = newArray;\n }", "private void resize() {\n Object[] newQueue = new Object[(int) (queue.length * 1.75)];\n System.arraycopy(queue, startPos, newQueue, 0, queue.length - startPos);\n\n currentPos = queue.length - startPos;\n startPos = 0;\n queue = newQueue;\n\n }", "private void increaseSize() {\n data = Arrays.copyOf(data, size * 3 / 2);\n }", "private void resizeUp() \n\t {\n\t\t int newSize = myArray.length * 2;\n\t\t myArray = Arrays.copyOf(myArray, newSize);\n\t }", "private void resize() {\n }", "private void reallocate(){\n capacity = 2 * capacity;\n theData = Arrays.copyOf(theData, capacity);\n }", "private void enlargeCapacity() {\n Object[] tmp = this.container;\n this.container = new Object[this.container.length + this.capacity];\n System.arraycopy(tmp, 0, this.container, 0, tmp.length);\n }", "private void resize() {\n if (ifFull() || ifTooEmpty()) {\n int capacity = items.length;\n if (ifFull()) {\n capacity *= 2;\n } else if (ifTooEmpty()) {\n capacity /= 2;\n }\n Item[] newArray = (Item[]) new Object[capacity];\n int lastIndex = moveBack(nextLast, 1);\n int firstIndex = moveForward(nextFirst, 1);\n System.arraycopy(items, 0, newArray, 0, lastIndex + 1);\n int numOfReminder = size - (lastIndex + 1);\n int newFirstIndex = newArray.length - numOfReminder;\n System.arraycopy(items, firstIndex, newArray, newFirstIndex, numOfReminder);\n items = newArray;\n nextFirst = moveBack(newFirstIndex, 1);\n nextLast = moveForward(lastIndex, 1);\n return;\n }\n return;\n }", "private void reallocate() {\n capacity = 2 * capacity;\n ElementType[] newData = (ElementType[]) new Object[DEFAULT_INIT_LENGTH];\n System.arraycopy(elements, 0, newData, 0, size);\n elements = newData;\n }", "private void grow() {\n T[] arr_temp = (T[]) new Object[arr.length*2];\n for (int i=0; i<arr.length; i++){\n arr_temp[i] = arr[i];\n }\n arr = arr_temp;\n }", "public void resize()\r\n\t{\r\n\t\tif(nItems >= arraySize/2)\t\t\t\t\t\t\t\t\t\t\t\t//If array is half full, the array becomes twice as large.\r\n\t\t{\t\t\t\r\n\t\t\tItem[] tempArray = (Item[]) new Object[2*arraySize];\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < nItems; i++)\r\n\t\t\t{\r\n\t\t\t\ttempArray[i] = q[i];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tq = tempArray;\t\t\t\t\t\t\t\t\t\t\t\t//Re-initialization of q array.\r\n\t\t\tarraySize = 2*arraySize;\t\t\t\t\t\t\t\t\t\t\t//Array size is doubled.\r\n\t\t}\r\n\t\telse if(nItems <= arraySize/4)\t\t\t\t\t\t\t\t\t\t\t//If array is a quarter full, the array size is halved.\r\n\t\t{\r\n\t\t\tItem[] tempArray = (Item[]) new Object[arraySize/2];\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < nItems; i++)\r\n\t\t\t{\r\n\t\t\t\ttempArray[i] = q[i];\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tq = tempArray;\t\t\t\t\t\t\t\t\t\t\t\t//Re-initialization of q array.\r\n\t\t\tarraySize = arraySize/2;\t\t\t\t\t\t\t\t\t\t\t//Array size is halved.\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn;\r\n\t}", "private void shrink() {\n int shrinkSize = array.length>>1;\n array = Arrays.copyOf(array, shrinkSize);\n }", "@SuppressWarnings(\"unchecked\")\n private void resize() {\n // Create a temporary array of the old capacity of the heap and store all of the heaps\n // elements in it\n int size = heap.length;\n T[] temp = (T[]) new Comparable[size];\n System.arraycopy(heap, 0, temp, 0, size);\n\n // Double the capacity of the heap array and copy the values of the temp array back into\n // the heap\n heap = (T[]) new Comparable[size * DOUBLE];\n System.arraycopy(temp, 0, heap, 0, size);\n }", "private void resize(int newSize) {\n Item[] resized = (Item[]) new Object[newSize];\n\n for (int i = 0; i < elements; i++)\n resized[i] = values[i];\n\n values = resized;\n }", "private void resize() {\n Couple[] tmp = new Couple[2 * associations.length];\n System.arraycopy(associations, 0, tmp, 0, associations.length);\n associations = tmp;\n }", "private void resizeArray() {\n stackArray = Arrays.copyOf(stackArray, stackArray.length * 2 + 1);\n }", "private void resize(int cap) {\n Item[] temp = (Item[]) new Object[cap];\n for(int i = 0; i < size; i++)\n temp[i] = rqArrays[i];\n rqArrays = temp;\n }", "private void ensureCapacity() {\n if(size() >= (0.75 * data.length)) // size() == curSize\n resize(2 * size());\n }", "@SuppressWarnings(\"unchecked\")\n private void resize() {\n int newCap = Math.max(capacity*2, DEFAULT_CAP);\n if(size < list.length) return;\n \n Object[] temp = new Object[newCap];\n for(int i = 0; i < list.length; i++) {\n temp[i] = list[i];\n }\n list = (E[])temp;\n capacity = newCap;\n }", "public ResizingArray() {\r\n super();\r\n this.aObjects = new Object[ResizingArray.DEFAULT_SIZE];\r\n this.aFreeElements = new int[ResizingArray.DEFAULT_SIZE];\r\n }", "private void resize(int c) {\n int[] temp = new int[c];\n for (int k=0; k<size; k++)\n temp[k] = data[k];\n data = temp;\n }", "private void ensureCapacity() {\n if ( top + 1 < storage.length ) {\n return;\n }\n storage = Arrays.copyOf( storage, storage.length * 2 );\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void resize(int capacity) {\r\n\t\tItem[] copy = (Item[]) new Object[capacity];\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t\tcopy[i] = arr[i];\r\n\t\tarr = copy;\r\n\t}", "private void reallocate() {\n\t\tthis.capacity *= 2;\n\t\tObject[] newElements = new Object[this.capacity];\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tnewElements[i] = this.elements[i];\n\t\t}\n\n\t\tthis.elements = newElements;\n\t}", "private void resize(int capacity) {\n TypeHere[] a = (TypeHere[]) new Object[capacity];\n System.arraycopy(items, 0, a, 0, size);\n items = a;\n }", "private void resizeDown()\n\t{\n\t\tint newSize = myArray.length/2;\n\t\tmyArray = Arrays.copyOf(myArray, newSize);\n\t}", "private void queueResize() {\n queue = Arrays.copyOf(queue, queue.length + 1);\n }", "private void reallocateIfOverfilled() {\r\n\t\tif ((size * 1.0 / table.length) > MAX_FULLNESS_PERCENTAGE) {\r\n\t\t\treallocateArray();\r\n\t\t}\r\n\t}", "private void resizeArray()\n {\n int[] temp = new int[integerList.length * 2];//Create new array with twice the size.\n for(int i = 0; i < integerList.length; i++)//Populate new array with data from old array\n {\n temp[i] = integerList[i];\n }\n integerList = temp;//Set the integerList to point to the new array.\n }", "@Override\r\n\tpublic void resize() {\n\t\t\r\n\t}", "protected abstract void resize();", "private void reallocate() {\r\n //elem = java.util.Arrays.copyOf(elem, elem.length * 2);\r\n E[] temp = (E[]) new Object[elem.length * 2];\r\n int i = 0;\r\n while (elem[i] != null) {\r\n temp[i] = elem[i];\r\n i++;\r\n }\r\n int j = elem.length - 1;\r\n int k = temp.length - 1;\r\n while (elem[i] != null) {\r\n temp[k] = elem[j];\r\n j--;\r\n k--;\r\n }\r\n front = k;\r\n elem = temp;\r\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tint tempSize = size * 2;\n\t\tE[] tempList = (E[]) new Object[tempSize];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\ttempList[i] = list[i];\n\t\t}\n\t\tlist = tempList;\n\t}", "private void resize(int newCap) {\n\t\tE[] newArray = (E[]) new Object[newCap];\n\t\tfor(int x = 0; x < newCap && x < capacity; x++) {\n\t\t\tnewArray[x] = elements[x];\n\t\t}\n\t\telements = newArray;\n\t\tcapacity = newCap;\n\t}", "private void resize(int max) {\n Item[] temp = (Item[]) new Object[max];\n for (int i = 0; i < N; i++)\n temp[i] = s[i+first];\n first = 0;\n s = temp;\n }", "private void grow() {\n int oldCapacity = this.values.length;\n int newCapacity = oldCapacity + (oldCapacity >> 1);\n Object[] newValues = new Object[newCapacity];\n System.arraycopy(this.values, 0, newValues, 0, oldCapacity);\n this.values = newValues;\n }", "void resize(int newSize);", "private void checkAndModifySize() {\r\n if (size == data.length * LOAD_FACTOR) {\r\n resizeAndTransfer();\r\n }\r\n }", "private synchronized void resize() {\n tableSize = 2 * tableSize;\n tableSize = nextPrime(tableSize);\n FlightDetails[] old = HT;\n\n HT = new FlightDetails[tableSize];\n count.set(0);\n\n for (FlightDetails oldFlightDetails : old) {\n if (oldFlightDetails != null) {\n FlightDetails flightDetails = oldFlightDetails;\n put(flightDetails);\n\n while (flightDetails.getNext() != null) {\n flightDetails = flightDetails.getNext();\n put(flightDetails);\n }\n }\n }\n }", "private void resize(int capacity) {// O(N)\r\n\t\tthis.capacity=capacity;\r\n\t\tE[] temp=(E[])list;\t//temporary list that stores old array\r\n\t\t//array of new required length initialized\r\n\t\tlist=new Object[this.capacity];\r\n\t\t//loop executes until all elements are copied from temp to list array\r\n\t\tfor (int i=0;i<size;i++) {\r\n\t\t\tlist[i]=temp[i];\r\n\t\t}\r\n\t}", "public void resize(){\n Object[] old = myCustomStack;\n //resize array to be twice the size when the Stack is more than 3/4 full\n if(numElements > old.length * .75){\n Object[] resizedArr = new Object[old.length * 2];\n for(int i = 0; i < numElements; i++){\n resizedArr[i] = old[i];\n }\n myCustomStack = resizedArr;\n System.out.println(\"Array has been resized to twice the size. Array length: \" + myCustomStack.length);\n }\n //resize array to be half the size when the Stack is more than 1/4 empty\n else if(numElements < old.length * .25){\n Object[] resizedArr = new Object[old.length / 2];\n for(int i = 0; i < numElements; i++){\n resizedArr[i] = old[i];\n }\n myCustomStack = resizedArr;\n System.out.println(\"Array has been resized to half the size. Array length: \" + myCustomStack.length);\n }\n else{\n return;\n }\n }", "@SuppressWarnings(\"unchecked\")\n private void upSize()\n {\n T[] newArray = (T[]) new Object [theArray.length * 2];\n for (int i =0; i < theArray.length; i++){\n newArray[i] = theArray[i];\n }\n theArray = newArray;\n }", "@SuppressWarnings(\"unchecked\")\n\t private boolean grow() {\n\n\t /* \n\t * Add code here \n\t * Expand capacity (double it) and copy old array contents to the\n\t * new one. \n\t */\n\t\t \n\t\t capacity = (capacity*2);\n\t\t E[] new_elements = elements;\n\t\t elements = (E[])new Object[capacity];\n\t\t for(int i=0; i<new_elements.length;i++){\n\t\t\t elements[i] = new_elements[i];\n\t\t }\n\t System.out.println(\"Capacity reached. Increasing storage...\");\n\t System.out.println(\"New capacity is \" + capacity + \" elements\");\n\n\t return true;\n\t }", "@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tObject[] newList = new Object[size * 2];\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tnewList[i] = get(i);\n\t\t}\n\t\tlist = (E[]) newList;\n\t\tsize *= 2;\n\t}", "private void grow() {\n capacity *= 2;\n Object[] temp = new Object[capacity];\n for (int i = 0; i < values.length; i++) temp[i] = values[i];\n values = temp;\n }", "@Override\n\t\tpublic void resize(int arg0, int arg1) {\n\t\t \n\t\t}", "private void addSizeArray() {\n int doubleSize = this.container.length * 2;\n Object[] newArray = new Object[doubleSize];\n System.arraycopy(this.container, 0, newArray, 0, this.container.length);\n this.container = new Object[doubleSize];\n System.arraycopy(newArray, 0, this.container, 0, doubleSize);\n }", "@Override\n\tpublic void resize() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprotected void grow(){\n\t\t// makes new arraylist\n\t\tT[] temp = (T[]) new Object[data.length *2];\n\t\tfor(int i = 0; i < data.length; i++ ){\n\t\t\ttemp[i] = data[i];\n\t\t}\n\t\tdata = temp;\n\t}", "@Override\n public void resize(int arg0, int arg1) {\n \n }", "private void resize(int campacity) {\n Item[] a = (Item[]) new Object[campacity];\n System.arraycopy(items,0,a,0,size);\n items = a;\n }", "private void resize() {\r\n capacity = capacity*2;\r\n IDictionary<K, V>[] temp = chains;\r\n chains = makeArrayOfChains(capacity);\r\n for (int i = 0; i < capacity/2; i++) {\r\n if (temp[i]!=null) {\r\n IDictionary<K, V> each = temp[i];\r\n for (KVPair<K, V> element: each) {\r\n putKV(element);\r\n load--;\r\n }\r\n }\r\n }\r\n \r\n }", "@SuppressWarnings(\"unchecked\")\r\n private void resize(int capacity) {\r\n \r\n T[] array = (T[]) new Object[capacity];\r\n for (int i = 0; i < size(); i++) {\r\n array[i] = elements[i];\r\n }\r\n elements = array;\r\n }", "public Object[] resize(int newSize){\n Object[] newArray = new Object[newSize];\n for( int i = 0 ; i < this.array.length ; i++ ){\n newArray[i] = this.array[i];\n }\n return newArray;\n }", "public void reallocate()\r\n\t{\r\n\t\tE[] newArray = (E[]) new Object[capacity * 2];\r\n\t\tint i = 0;\r\n\t\tfor(i = 0; i < this.size(); i++)\r\n\t\t{\r\n\t\t\tnewArray[i] = innerArray[(front + i) % capacity];\r\n\t\t\tSystem.out.println((front + i) % capacity);\r\n\t\t}\r\n\t\tfront = 0;\r\n\t\trear = this.size() - 1;\r\n\t\tcapacity = capacity * 2;\r\n\t\tinnerArray = newArray;\r\n\t}", "private void grow() {\n final int new_size = Math.min(size * 2, Const.MAX_TIMESPAN);\n if (new_size == size) {\n throw new AssertionError(\"Can't grow \" + this + \" larger than \" + size);\n }\n values = Arrays.copyOf(values, new_size);\n qualifiers = Arrays.copyOf(qualifiers, new_size);\n }", "@Override\r\n\tpublic void resize(int arg0, int arg1) {\n\t}", "private void ensureCapacity() {\n\t\n\t\tif (elements.length == size) {\n\t\t\tT[] oldElements = elements;\n\t\t\t\n\t\t\telements = (T[]) new Object[2 * elements.length + 1];\n\t\t\t\n\t\t\tSystem.arraycopy(oldElements, 0, elements, 0, size);\n\t\t\n\t\t}\n\t\n\t}", "private static Object resizeArray(Object oldArray, int newSize) {\n\t\tint oldSize = java.lang.reflect.Array.getLength(oldArray);\n\t\tClass elementType = oldArray.getClass().getComponentType();\n\t\tObject newArray = java.lang.reflect.Array.newInstance(elementType,\n\t\t\t\tnewSize);\n\t\tint preserveLength = Math.min(oldSize, newSize);\n\t\tif (preserveLength > 0) {\n\t\t\tSystem.arraycopy(oldArray, 0, newArray, 0, preserveLength);\n\t\t}\n\t\treturn newArray;\n\t}", "private Object[] resize(E[] elems, int newsize){\n if(newsize < 0){\n throw new IllegalArgumentException();\n // UP FOR CHANGE\n }\n E[] newelems = (E[])(new Comparable[newsize]);\n if (elems == null){\n return newelems;\n }\n // Add elements back in\n System.arraycopy(elems, 0, newelems, 0, Math.min(elems.length, newsize));\n\n return newelems;\n }", "void resize() {\n }", "private void expandCapacity() {\n heap = Arrays.copyOf(heap, heap.length * 2);\n }", "synchronized protected void enlargeArrays() {\n \t\tenlargeArrays(5);\n \t}", "private void ensureCapacity() {\n int newSize = elements.length * 2;\n Object[] newElements = new Object[newSize];\n for (int i = 0; i < elements.length; i++) {\n newElements[i] = elements[i];\n }\n elements = newElements;\n }", "private T[] resize(T[] arr, double factor) {\n int nSize = (int) (arr.length * factor) + 1;\n // initialize the new array with a new size\n T[] nArr = (T[]) (new Object[nSize]);\n // always take the smallest length to make sure the index is in bound\n int size = Math.min(nArr.length, arr.length);\n // copy all values from the old array into the new array\n for (int i = 0; i < size; i++) {\n nArr[i] = arr[i];\n }\n return nArr;\n }", "public void resizeByLinearize(int newcapacity){\n Object []lin=new Object[newcapacity];\n int k=start;\n for(int i=0;i<size;i++){\n lin[i]=cir[k];\n k=(k+1)%cir.length;\n }\n cir=new Object[newcapacity];\n for(int i=0;i<size;i++){\n cir[i]=lin[i];\n }\n \n }", "@Override\n\tpublic void resize(int arg0, int arg1) {\n\t}", "private void expand(){\n \n int newSize = size + expand;\n E[] tempArray = (E[]) new Object[newSize];\n for(int n = 0; n < size; n++){\n tempArray[n] = stackArray[n]; \n }\n stackArray = tempArray;\n size = newSize;\n }", "private void resizeArray(int length) {\n Item[] newItems = (Item[]) new Object[length];\n\n for (int x=0; x<size; x++) {\n newItems[x] = items[x];\n }\n\n items = newItems;\n }", "private void maybeResize() {\n\t\tif ( this.size <= this.table.length / 2) return;\r\n\t\t\r\n\t\t//store the current entries\r\n\t\tList<Entry<K,V>> temp = new ArrayList<>();\r\n\t\tfor (Entry<K,V> entry : this.entrySet())\r\n\t\t\ttemp.add(temp.size(), entry);\r\n\t\t\r\n\t\t//create new table\r\n\t\tthis.createTable(this.table.length * 2);\r\n\t\t\r\n\t\t//reinsert the old entries (since the capacity has changed, indices will be different)\r\n\t\tfor (Entry<K,V> entry : temp ) \r\n\t\t\tthis.put(entry.getKey(), entry.getValue());\r\n\t\t\r\n\t}", "public void increaseSize() {\n Estimate[] newQueue = new Estimate[queue.length * 2];\n\n for (int i = 0; i < queue.length; i++) {\n newQueue[i] = queue[i];\n }\n\n queue = newQueue;\n }", "private void resize(int capacity) {\n assert capacity >= n;\n\n Item[] temp = (Item[]) new Object[capacity];\n for (int i = 0; i < n; i++) {\n temp[i] = a[i];\n }\n a = temp;\n }", "private void increaseSize() {\r\n\t\tE[] biggerE = (E[]) new Object[this.capacity * 2];\r\n\t\tdouble[] biggerC = new double[this.capacity * 2];\r\n\t\tfor (int i = 0; i < this.size; i++) {\r\n\t\t\tbiggerE[i] = this.objectHeap[i];\r\n\t\t\tbiggerC[i] = this.costHeap[i];\r\n\t\t}\r\n\t\tthis.costHeap = biggerC;\r\n\t\tthis.objectHeap = biggerE;\r\n\t\tthis.capacity = this.capacity * 2;\r\n\t}", "private void resize() {\n Point[] temp = new Point[2*N+1];\n for (int i = 0; i <= N; i++) temp[i] = a[i];\n a = temp;\n }", "public void resize(final int size)\n\t{\n\t\t// get the difference\n\t\tint intDifference = size - bytes.length;\n\t\t\n\t\t// check to see if the difference is positive\n\t\tif (intDifference > 0)\n\t\t{\n\t\t\t// add to the size of this byte array\n\t\t\tappend(new byte[intDifference]);\n\t\t}\n\t\t// check to see if the difference is negative\n\t\telse if (intDifference < 0)\n\t\t{\n\t\t\tbytes = subArray(0, size).getBytes();\n\t\t}\n\t}", "@Override\n\tpublic void resize(int arg0, int arg1) {\n\t\t\n\t}", "@Override\n\tpublic void resize(int arg0, int arg1) {\n\t\t\n\t}", "private void resize(int capacity) {\n// assert capacity >= N;\n// StdOut.println(\"resize capacity:\"+ capacity);\n// StdOut.println(\"resize count:\"+ count);\n \n Item[] temp = (Item[]) new Object[capacity];\n int index = 0;\n for (int i = 0; i < N; i++) {\n if (randomizedQueue[i] != null){\n// StdOut.println(\"resize index :\"+ index);\n// StdOut.println(\"resize i :\"+ i);\n// StdOut.println(\"resize N :\"+ N);\n// StdOut.println(\"resize randomizedQueue[i] :\"+ randomizedQueue[i]);\n// StdOut.println(\"--------------------------------------------------\");\n temp[index] = randomizedQueue[i];\n index++;\n }\n }\n randomizedQueue = temp;\n }", "private void ensureCapacity()\n\t{\n\t\tif (elements.length == size)\n\t\t\telements = Arrays.copyOf(elements, 2 * size + 1);\n\t}", "public void reAllocate() {\n\t\tmat_ = new double[n_][hbw_ + 1];\n\t}", "private void reallocateDoubleCapacity() {\n\t\tObject oldElements[] = elements;\n\t\tcapacity *= reallocateFactor;\n\t\tsize = 0;\n\t\telements = new Object[capacity];\n\n\t\tfor (Object object : oldElements) {\n\t\t\tthis.add(object);\n\t\t}\n\t}", "private void grow()\r\n\t{\r\n\t\tint [] temp = new int[count * 2]; // new array to hold the data\r\n\r\n\t\t// copy old data in new array\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t\ttemp[i] = array[i];\r\n\r\n\t\tarray = temp; // update the new array\r\n\t}", "protected void checkSize(){\n if (size == data.length){\n resize( 2 * data.length);\n }\n }", "private void resize(int newCapacity){\n ArrayList<ArrayList<Entry>> newBuckets = new ArrayList<>();\n for (int i = 0; i < newCapacity; i++) {\n newBuckets.add(new ArrayList<>());\n }\n\n for(K key:this){\n int newIndex=reduce(key,newCapacity);\n newBuckets.get(newIndex).add(new Entry(key,get(key)));\n\n }\n\n buckets=newBuckets;\n numBuckets=newCapacity;\n\n }", "private void resizeArray(int capacity){\n //take temporary array to copy elements\n String[] copy = new String[capacity];\n for(int i=0;i<N;i++){\n copy[i]=stackArray[i];\n }\n //point the temp array to main array\n stackArray=copy;\n }", "public void resizeByLinearize(int newCapacity) {\r\n Object[] temp = new Object[newCapacity];\r\n int k = start;\r\n for (int i = 0; i < size; i++) {\r\n temp[i] = cir[k];\r\n k = (k + 1) % cir.length;\r\n }\r\n cir = temp;\r\n start = 0;\r\n }", "@Test(timeout=1000)\n\tpublic void testResize(){\n\t\tStudent[] array = new Student[7];\n\t\tarray[5] = s2; // This is the correct hash position of this student\n\t\tarray[6] = s4;\n\t\tarray[0] = s5;\n\t\tarray[3] = s1;\n\t\tarray[4] = s3;\n\t\thashmap.setArray(array);\n\t\thashmap.resize();\n\t\tint newsize = hashmap.getArray().length;\n\t\tassertEquals(\"resize() failed; length of new hash table is not the double of the old one\", 14, newsize);\n\t\tassertEquals(\"resize() failed; Student 2 is not at the correct index\", 12, getIndexOfStudent(hashmap, s2));\n\t\tassertEquals(\"resize() failed; Student 4 is not at the correct index\", 6, getIndexOfStudent(hashmap, s4));\n\t\tassertEquals(\"resize() failed; Student 5 is not at the correct index\", 5, getIndexOfStudent(hashmap, s5));\n\t\tassertEquals(\"resize() failed; Student 1 is not at the correct index\", 10, getIndexOfStudent(hashmap, s1));\n\t\tassertEquals(\"resize() failed; Student 3 is not at the correct index\", 11, getIndexOfStudent(hashmap, s3));\n\t}", "private void resize(int capacity)\r\n {\r\n assert capacity >= n;\r\n Item[] temp = (Item[]) new Object[capacity];\r\n for (int i = 0; i < n; i++)\r\n temp[i] = a[i];\r\n a = temp;\r\n }", "private void ensureCapacity() {\n int newLength = (this.values.length * 3) / 2 + 1;\n Object[] newValues = new Object[newLength];\n System.arraycopy(this.values, 0, newValues, 0, this.values.length);\n this.values = newValues;\n }", "private void reallocateArray() {\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tTableEntry<K, V>[] newTable = new TableEntry[table.length * 2];\r\n\t\tTableEntry<K, V> currentElement = null, nextElement = null;\r\n\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tif (table[i] == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcurrentElement = table[i];\r\n\t\t\tnextElement = currentElement.next;\r\n\r\n\t\t\twhile (currentElement != null) {\r\n\t\t\t\tcurrentElement.next = null;\r\n\t\t\t\taddTableEntry(currentElement, newTable);\r\n\r\n\t\t\t\tcurrentElement = nextElement;\r\n\t\t\t\tnextElement = currentElement == null ? null : currentElement.next;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttable = newTable;\r\n\t}", "public ResizingArray(int defaultSize) {\r\n super();\r\n\r\n this.aObjects = new Object[defaultSize];\r\n this.aFreeElements = new int[defaultSize];\r\n this.iMaxSize = defaultSize;\r\n }" ]
[ "0.7504208", "0.7447479", "0.74466354", "0.7442521", "0.7338517", "0.7336046", "0.7331799", "0.7281352", "0.7234867", "0.72282535", "0.7223546", "0.7200325", "0.71738225", "0.7128884", "0.71176285", "0.71102786", "0.70919824", "0.70703745", "0.7067705", "0.70615876", "0.7061376", "0.70584005", "0.70547366", "0.7035255", "0.6990969", "0.6984988", "0.6962807", "0.6953989", "0.6942513", "0.69417393", "0.69314855", "0.69236547", "0.69097114", "0.68572843", "0.6832406", "0.68241495", "0.68103075", "0.67914003", "0.6766934", "0.6760999", "0.6751536", "0.67323905", "0.67087936", "0.6689957", "0.66786957", "0.66772366", "0.66566604", "0.66539216", "0.6649532", "0.664334", "0.66364413", "0.66339374", "0.663215", "0.65866125", "0.65831035", "0.65794915", "0.6567694", "0.656455", "0.6561482", "0.65510243", "0.65438277", "0.65286994", "0.6524404", "0.6511619", "0.6509318", "0.6507572", "0.6506528", "0.6493744", "0.6493492", "0.64881605", "0.6485369", "0.6477855", "0.64721733", "0.6470448", "0.64619195", "0.64453566", "0.6444403", "0.6442446", "0.6435834", "0.64318573", "0.64280736", "0.6427716", "0.64221925", "0.64166445", "0.641015", "0.641015", "0.64025974", "0.63997704", "0.63995373", "0.639452", "0.63922536", "0.63890505", "0.63889545", "0.6381431", "0.63697183", "0.6350017", "0.63466793", "0.6331011", "0.6327159", "0.6318655" ]
0.70100635
24
Method used to display the Score for Team A
public void displayScoreA (int score){ TextView scoreA = (TextView)findViewById(R.id.team_a_score); scoreA.setText(String.valueOf(score)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayForTeamA(int scoreA) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(scoreA));\r\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayScoreForTeamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "private void displayTeamA_score(int score) {\n TextView teamA_scoreView = findViewById(R.id.teamA_score_textView);\n teamA_scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "public void displayForTeamA2(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score2);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "public void teamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.teamA);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void ScoreTeamA(View view) {\n scoreteamA = scoreteamA +1;\n displayScoreA(scoreteamA);\n }", "public void displayScoreB (int score){\n\n TextView scoreA = (TextView)findViewById(R.id.team_b_score);\n scoreA.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayScoreForTeamB(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void displayForTeamV(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_v_score);\n scoreView.setText(String.valueOf(score));\n }", "private void printScore() {\r\n View.print(score);\r\n }", "private void displayTeamB_score(int score) {\n TextView teamB_scoreView = findViewById(R.id.teamB_score_textView);\n teamB_scoreView.setText(String.valueOf(score));\n }", "private String getScore(){\n return whiteName + \" : \" + blackName + \" - \" + whiteScore + \" : \" + blackScore;\n }", "private void showGameScore() {\n System.out.println(messageProvider.provideMessage(\"score\"));\n System.out.println(settings.getPlayers().get(0).getScore()\n + \" vs \" + settings.getPlayers().get(1).getScore());\n }", "public void displayForTeamK(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_k_score);\n scoreView.setText(String.valueOf(score));\n }", "private void displayTeamAScore(int num)\n {\n TextView scoreTextView = (TextView) findViewById(R.id.teamAScore);\n scoreTextView.setText(num +\"\");\n }", "public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}", "@Override\n\tpublic void printScore() {\n\n\t}", "public void displayForpoint_one(View view){\n score = score + 1;\n displayForTeamA(score);\n }", "public void showScore()\n {\n showText(\"Score:\" + score,550,50);\n }", "public String toString () {\n return team1 + \" vs. \" + team2 + \": \" + score1 + \" to \" + score2;\n }", "public void addScoreForTeamA(View v) {\n scoreTeamA += 1;\n updateText(scoreTeamA, v);\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_bb_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForPlayerA(int score) {\n scoreViewPlayerA.setText(String.valueOf(score));\n }", "public static List<String> getScoreDetails(final Match match){\n\t\tArrayList<String> scoreList = new ArrayList<String>(2);\n\t\tString scoreDisplay = \"\";\n\t\t\t\t\n\t\t// If a game has been played, get the card information\n\t\tif(match.getCurrentStatus() == MatchStatus.PLAYED){\n\t\t\tString strScoreDetails = \"\";\n\t\t\t// Check if the match went to penalties\n\t\t\tif(match.isPenalties()){\n\t\t\t\tstrScoreDetails = \"<b>(</b>\" + Escaper.htmlEscape(match.getHomeTeamPenalties()) + \"<b>)</b>\" +\n\t\t\t\tEscaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) +\n\t\t\t\t\"<b>(</b>\" + Escaper.htmlEscape(match.getAwayTeamPenalties()) + \"<b>)</b>\";\n\t\t\t}else{\n\t\t\t\tstrScoreDetails = Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore());\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Writing the actual score\n\t\tif(match.getCurrentStatus() == MatchStatus.NOT_YET_PLAYED)\n\t\t{\t\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\"> Vs </td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.PLAYED){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">\";\n\t\t\n\t\t\t// If the match went to penalties, then display it in the score\n\t\t\tif(match.isPenalties()){\n\t\t\t\tscoreDisplay = scoreDisplay + \"<b>(</b>\" + Escaper.htmlEscape(match.getHomeTeamPenalties()) + \"<b>)</b>\" + \n\t\t\t\tEscaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) + \"<b>(</b>\" +\n\t\t\t\tEscaper.htmlEscape(match.getAwayTeamPenalties()) + \"<b>)</b></td>\";\n\t\t\t}else{\n\t\t\t\tscoreDisplay = scoreDisplay + Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) +\"</td>\";\t\t\n\t\t\t}\n\t\t}else if (match.getCurrentStatus() == MatchStatus.CANCELLED){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">CANCELLED</td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.POSTPONED){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">POSTPONED</td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.FORFEIT){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">\" + Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) + \"*</td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.DOUBLE_FORFEIT){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">\" + Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) + \"**</td>\";\n\t\t}\n\t\t\n\t\t// Populate the array with the tooltip and the score\n\t\tscoreList.add(scoreDisplay);\n\t\treturn scoreList;\n\t}", "public void displayForpoint_two(View view){\n score = score + 2;\n displayForTeamA(score);\n }", "public void displayForpoint_one2(View view){\n score2 = score2 + 1;\n displayForTeamA2(score2);\n }", "private void displayTeamBScore(int num)\n {\n TextView scoreTextView = (TextView) findViewById(R.id.teamBScore);\n scoreTextView.setText(num +\"\");\n }", "private void showScore() {\r\n View.show(score, this.getSize().width + 15, 0);\r\n }", "private void updateResultOnScreen() {\n teamAScoreTv.setText(Integer.toString(teamAScoreInt));\n teamBScoreTv.setText(Integer.toString(teamBScoreInt));\n\n if (teamAFoulScoreInt > 1)\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" fouls\");\n else\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" foul\");\n\n if (teamBFoulScoreInt > 1)\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" fouls\");\n else\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" foul\");\n }", "float getScore();", "float getScore();", "private void setResultsDisplay(double score) {\n TextView resultsTextView = (TextView) findViewById(R.id.results_text_view);\n String letterGrade = getLetterGrade(score);\n resultsTextView.setText(\"Your Grade: \" + letterGrade);\n }", "public void displayYelowCardA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yelowCardAtext);\n scoreView.setText(String.valueOf(score));\n }", "void displayScore(){\n\t\tTextView yourScore = (TextView) findViewById (R.id.yourscore); \n String currentScoreText;\n currentScoreText = Integer.toString(currentScore);\n\t\tyourScore.setText(currentScoreText);\n\t\t\n\t}", "private void showScores() {\n levelNumber.setText(String.format(\"%s%d\", getResources().getString(R.string.level), level));\n Level l = Level.getLevel(level);\n for (int i = 0; i < Level.MAX_SCORES; i++) {\n Level.Player p = l.getPlayer(i);\n if (p != null) new ScoreTextView(i + 1, p.toString());\n }\n }", "public void displayForpoint_three2(View view){\n score2 = score2 + 3;\n displayForTeamA2(score2);\n }", "int getScore();", "public void displayForpoint_three(View view){\n score = score + 3;\n displayForTeamA(score);\n }", "public void statistics(){\n System.out.println(this.scoreboard.toString());\n }", "@Override\n\tpublic void homeTeamScored(int points) {\n\t\t\n\t}", "public static String getScoreboard(List<Player> players) {\n // Team Rock Adam Points: 20\n // Team Paper Eve Points: 10\n // Team Scissors Abel Points: 5 DEAD\n\n throw new RuntimeException(\"Method not implemented!\");\n }", "public static void displayScore(final Quiz quiz) {\n // write your code here\n // to display the score\n // report using quiz object.\n if (getflag()) {\n return;\n }\n System.out.println(quiz.showReport());\n }", "public String getScoreBoardText() {\n putListInPointOrder();\n String scoreText;\n StringBuilder sb = new StringBuilder();\n\n for (Player player : players)\n sb.append(player.toString() + \"\\n\");\n\n scoreText = sb.toString();\n return scoreText;\n }", "long getScore();", "long getScore();", "long getScore();", "long getScore();", "@SuppressLint(\"SetTextI18n\")\r\n private void displayScore() {\r\n\r\n\r\n mFinalScore.setText(\"Final score: \" + mScore);\r\n mQuestionView.setVisibility(View.GONE);\r\n mOption1.setVisibility(View.GONE);\r\n mOption2.setVisibility(View.GONE);\r\n mOption3.setVisibility(View.GONE);\r\n mNext.setVisibility(View.GONE);\r\n mTimer.setVisibility(View.GONE);\r\n mScoreView.setVisibility(View.GONE);\r\n mTimerLabel.setVisibility(View.GONE);\r\n mBackToStart.setVisibility(View.VISIBLE);\r\n\r\n }", "private void displayScore(int score) {\n // Set a text view to show the score.\n TextView scoreView = findViewById(R.id.score_text_view);\n scoreView.setText(format(\" %d\", score));\n }", "public void displayTriesForPlayerA(int score) {\n triesViewPlayerA.setText(String.valueOf(score));\n }", "void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }", "private void printOverallScore(\n Properties battleData, ScoringStyle scoringStyle) {\n double totalScore = 0;\n int totalBattles = 0;\n int scoredBotLists = 0;\n for (String botList : battleData.stringPropertyNames()) {\n String[] scores = battleData.getProperty(botList).split(\":\");\n double score = Double.parseDouble(scores[0]);\n totalScore += score;\n scoredBotLists++;\n totalBattles += Integer.parseInt(scores[5]);\n }\n int challengeBotLists = _config.challenge.referenceBots.size();\n System.out.println(\"Overall score: \" + round(totalScore / scoredBotLists, 2)\n + \", \" + round(((double) totalBattles) / challengeBotLists, 2)\n + \" seasons\");\n }", "Float getScore();", "public void plusOneTeamA (View view) {\r\n scoreA++;\r\n displayScoreForTeamA(scoreA);\r\n }", "public void displayRedCardA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.redcardAtext);\n scoreView.setText(String.valueOf(score));\n }", "public void updateScoreboard() {\r\n \tif(parentActivity instanceof GameActivity) {\r\n \t\t((TextView)(((GameActivity)parentActivity).getScoreboard())).setText(\"\"+score);\r\n \t}\r\n }", "public String currentScore(){\n return points[player1Score] + \"-\" + points[player2Score];\n }", "public static void displayScoreCard(){\r\n\t\t\r\n\t\t try {\r\n\t\t\t \r\n\t\t\t //getting the connection\r\n\t\t\tstatement = connection.createStatement();\r\n\t\t\t\r\n\t\t\t//retriving the data from the database\r\n\t\t\t ResultSet results = statement.executeQuery(\"select * from \" + tableName);\r\n\t\t\t \r\n\t\t\t //Retrieves the Players_Name, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE and OUT_FRONT of this ResultSet object's columns. \r\n\t\t\t ResultSetMetaData rsmd = results.getMetaData();\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t System.out.println(\"\\t\\t\\t\\t Fort Cherry Golf Course\");\r\n\t\t\t // print the names of the above the table\r\n\t\t\t int numberCols = rsmd.getColumnCount();\r\n\t\t\t for (int i=1; i<=numberCols; i++) \r\n\t\t\t {\r\n\t\t\t // extract each column name from the meta data and print them\r\n\t\t\t System.out.print(rsmd.getColumnLabel(i)+\"\\t\"); \r\n\t\t\t }\r\n\r\n\t\t\t //simply printing the line\r\n\t\t\t System.out.println(\"\\n--------------------------------------------------------------------------------------------------\");\r\n\t\t\t \r\n\t\t\t // Reteriving all data one by one from the data base\r\n\t\t\t while(results.next())\r\n\t\t\t {\r\n\t\t\t String players_Name = results.getString(1);\r\n\t\t\t int ONE = results.getInt(2);\r\n\t\t\t int TWO = results.getInt(3);\r\n\t\t\t int THREE = results.getInt(4);\r\n\t\t\t int FOUR = results.getInt(5);\r\n\t\t\t int FIVE = results.getInt(6);\r\n\t\t\t int SIX = results.getInt(7);\r\n\t\t\t int SEVEN = results.getInt(8);\r\n\t\t\t int EIGHT = results.getInt(9);\r\n\t\t\t int NINE = results.getInt(10);\r\n\t\t\t int OUT_FRONT = results.getInt(11);\r\n\t\t\t \r\n\t\t\t //printing the retrive data to the console\r\n\t\t\t System.out.println(players_Name + \"\\t\" + ONE + \"\\t\" + TWO + \"\\t\" + THREE + \"\\t\" + FOUR + \"\\t\" + FIVE + \"\\t\" + SIX + \"\\t\" + SEVEN + \"\\t\" + EIGHT + \"\\t\" + NINE + \"\\t\" + OUT_FRONT);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t //closing the resultset and the statement\r\n\t\t\t results.close();\r\n\t\t\t statement.close();\r\n\t\t\t \r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void addTwoPointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 2;\n displayTeamAScore(scoreTeamA);\n }", "public void displayRoundScore() {\n\n System.out.println(\"Round stats: \");\n System.out.println(\"Par: \" + parTotal);\n System.out.println(\"Strokes: \" + strokesTotal);\n\n if(strokesTotal > parTotal) {\n System.out.println(strokesTotal-parTotal + \" over par\\n\");\n } \n else if (strokesTotal < parTotal) {\n System.out.println(parTotal-strokesTotal + \" under par\\n\");\n }\n else {\n System.out.println(\"Making par\\n\");\n }\n }", "public int getPlayerScore();", "public int getScore() { return score; }", "public int getScore() {return score;}", "public void winner() {\n\t\tList<String> authors = new ArrayList<String>(scores_authors.keySet());\n\t\tCollections.sort(authors, new Comparator<String>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\treturn scores_authors.get(o1).compareTo(scores_authors.get(o2));\n\t\t\t}\n\t\t});\n\t\tSystem.out.println(\"Score des auteurs :\");\n\t\tfor(String a :authors) {\n\t\t\tSystem.out.println(a.substring(0,5)+\" : \"+scores_authors.get(a));\n\t\t}\n\t\t\n\t\tList<String> politicians = new ArrayList<String>(scores_politicians.keySet());\n\t\tCollections.sort(politicians, new Comparator<String>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\treturn scores_politicians.get(o1).compareTo(scores_politicians.get(o2));\n\t\t\t}\n\t\t});\n\t\tSystem.out.println(\"Score des politiciens :\");\n\t\tfor(String p :politicians) {\n\t\t\tSystem.out.println(p.substring(0,5)+\" : \"+scores_politicians.get(p));\n\t\t}\n\t}", "public void displayForpoint_two2(View view){\n score2 = score2 + 2;\n displayForTeamA2(score2);\n }", "public String toString()\n { \n \treturn (\"Score: \" + score);\n }", "public void addOnePointToTeamA(View view)\n {\n scoreTeamA++;\n displayTeamAScore(scoreTeamA);\n }", "@OnClick(R.id.team_a_1_button)\n public void add1TeamA() {\n addToScore(scoreATextView, 1);\n }", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }", "public void Team_A_2_Points(View v) {\n teamAScore = teamAScore + 2;\n displayForTeamA(teamAScore);\n }", "private void drawScore() {\n\t\tString score = myWorld.getScore() + \"\";\n\n\t\t// Draw shadow first\n\t\tAssetLoader.shadow.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length()), 12);\n\t\t// Draw text\n\t\tAssetLoader.font.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length() - 1), 11);\n\n\t}", "public String getScore(){\n return score;\n }", "public void printScores() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Players \\t\" + \"Score\");\n\t\tSystem.out.println(\"---------------------\");\n\t\tfor (Player p : players) {\n\t\t\tSystem.out.println(p.name + \" \\t\\t\" + p.updateScores());\n\t\t}\n\t}", "public void ScoreTeamB(View view) {\n scoreteamB = scoreteamB +1;\n displayScoreB(scoreteamB);\n }", "public int getScore()\n {\n // put your code here\n return score;\n }", "private void show() {\n System.out.println(team.toString());\n }", "public double getTotalScore(){\n // System.out.print(\"\\nQUIZZ TOTAL \" + quizTotal);\n return quizTotal;\n}", "public void printScore(PrintWriter out) {\n out.format(\"SCORE OF %d PLAYERS%n\", players.size());\n out.println(\"ID\\tCASH\\tTYPE\");\n \t\n // Cria uma lista com os jogadores\n \tList<Competitor> score = new ArrayList<Competitor>(players.keySet());\n\n \t// Ordena os jogadores com base no total de cash\n \tCollections.sort(score, new PlayerComparator());\n\n \t// Imprime os resultados\n \tfor(Competitor c : score) {\n \t\tout.format(\"%d.%d\\t%.2f\\t(%s)%n\", players.get(c).Type,\n players.get(c).Id, c.getTotalCash(),\n c.getClass().getSimpleName());\n \t}\n out.flush();\n }", "public String getStatsOfTeams(){\n\n String res = \"\";\n\n if (teams.size() <= 0){\n return \"No team registered in tournament\";\n }\n\n for(int num=0; num<teams.size(); num++)\n {\n SoccerTeam team = teams.get(num);\n res += team.toString() + \"\\n\";\n }\n return res;\n }", "public void bonusForTeamA(View v) {\n\n if (questionNumber <= 19) {\n\n scoreTeamA = scoreTeamA + 5;\n displayForTeamA(scoreTeamA);\n }\n\n\n if (questionNumber == 20) {\n endOfRound = \"true\";\n }\n }", "private void refreshScore(){\n String info = players[0] + \" \"+playerScores[0]+\":\" +playerScores[1]+ \" \"+players[1];\n scoreInfo.setText(info);\n }", "@Override\n\tpublic void printStudent() {\n\t\tSystem.out.print(\"학번\\t국어\\t영어\\t수학\\n\");\n\t\tSystem.out.println(\"=\".repeat(60));\n\t\tint nSize = scoreList.size();\n\t\tfor(int i = 0 ; i < nSize ; i++) {\n\t\t\tScoreVO vo = new ScoreVO();\n\t\t\tSystem.out.print(vo.getNum() + \"\\t\");\n\t\t\tSystem.out.print(vo.getKor() + \"\\t\");\n\t\t\tSystem.out.print(vo.getEng() + \"\\t\");\n\t\t\tSystem.out.print(vo.getMath() + \"\\n\");\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "private void displayTeams() {\n SwapTeamMembersController.calculateTeamConstraints();\n System.out.println(\"\\nTeams formed are:\");\n for (Team team: Team.allTeams) {\n System.out.println(Constraint.ANSI_GREEN + \"\\nThe team ID\\t\\t\\t\\t: \" + team.getTeamID() + Constraint.ANSI_RESET +\n \"\\nThe Project Assigned\\t: \" + team.getProjectAssigned().getProjectId() + \": \" + team.getProjectAssigned().getProjectTitle() +\n \"\\nThe team's fitness is\\t: \" + team.getTeamFitness());\n System.out.print(\"\\nThe Students IDs of students in this team are: \\n\");\n for (Student student: team.getStudentsInTeam()) {\n System.out.print(student.getId() + \"\\tName: \" + student.getFirstName() + \"\\t\\tGender : \" + student.getGender() + \"\\t\\tExperience : \" + student.getExperience() + \" years\\n\");\n }\n int j = 1;\n System.out.println(\"\\nConstraints met are (with weightage):\");\n for (Constraint c: team.getConstraintsMet()) {\n System.out.println(j + \". \" + c.getConstraintDescription() + \"\\t: \" + c.getWeightAge());\n j++;\n }\n }\n }", "@Override\n public int getScore() {\n return totalScore;\n }", "public void testScoreboardCaseOneA() throws Exception{\n \n String [] runsData = {\n \"2,8,C,1,No\",\n \"15,8,D,1,Yes\",\n \"23,8,D,1,No\",\n \"29,8,D,1,No\",\n \"43,8,C,1,No\",\n \"44,8,A,1,Yes\",\n \"52,8,C,1,Yes\",\n \"65,8,B,2,Yes\",\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team8,4,45\",\n \"2,team1,0,0\",\n \"2,team2,0,0\",\n \"2,team3,0,0\",\n \"2,team4,0,0\",\n \"2,team5,0,0\",\n \"2,team6,0,0\",\n \"2,team7,0,0\",\n };\n \n scoreboardTest (8, runsData, rankData);\n }", "public void updateScores() {\n\t\tscoreText.setText(\"Score: \" + ultraland.getScore());\n\t}" ]
[ "0.81465554", "0.81346595", "0.81346595", "0.8106641", "0.8106641", "0.8106641", "0.8106641", "0.8106641", "0.8089548", "0.80122024", "0.79835904", "0.7789251", "0.7779817", "0.7517404", "0.7431696", "0.73507625", "0.73507625", "0.7330012", "0.7330012", "0.7330012", "0.7330012", "0.7328803", "0.7318631", "0.7297595", "0.7287066", "0.7271771", "0.725336", "0.7243324", "0.7236471", "0.72350395", "0.72301954", "0.7219291", "0.7202725", "0.7200688", "0.7117148", "0.71140194", "0.7079737", "0.7060872", "0.70246994", "0.69954705", "0.6989956", "0.6929041", "0.68951064", "0.6886552", "0.6886552", "0.6872324", "0.6853864", "0.68353486", "0.683496", "0.6802885", "0.678391", "0.67789185", "0.6773546", "0.6742576", "0.6723186", "0.6703819", "0.67026424", "0.66943747", "0.66943747", "0.66943747", "0.66943747", "0.6684014", "0.66582644", "0.6651446", "0.6626738", "0.66164243", "0.6614514", "0.6610289", "0.6606507", "0.6601227", "0.65903777", "0.65791637", "0.6573248", "0.6572139", "0.6568451", "0.656784", "0.6566869", "0.65666854", "0.6566208", "0.6540635", "0.6540339", "0.6532967", "0.65219164", "0.6510522", "0.64943063", "0.64896035", "0.6488691", "0.6487298", "0.6472383", "0.6465432", "0.64641386", "0.64420915", "0.64414203", "0.64408314", "0.64305085", "0.64264137", "0.6421357", "0.6420966", "0.6418638", "0.6413416" ]
0.7988779
10
Method used to display the Foul for Team A
public void displayFoulA (int foul){ TextView foulA = (TextView)findViewById(R.id.team_a_foul); foulA.setText(String.valueOf(foul)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayFoulsForTeamA(int foul) {\n TextView foulsView = findViewById(R.id.team_a_fouls);\n foulsView.setText(String.valueOf(foul));\n }", "public void displayFoulsForTeamA(int fouls) {\r\n TextView foulsView = (TextView) findViewById(R.id.team_a_fouls);\r\n foulsView.setText(String.valueOf(fouls));\r\n }", "public void displayFoulb (int foul){\n\n TextView foulA = (TextView)findViewById(R.id.team_b_foul);\n foulA.setText(String.valueOf(foul));\n }", "private void show() {\n System.out.println(team.toString());\n }", "public static void displayTeams(Team t)\n {\n String teams = t.name + \":\\n\" + t + \"\\n\";\n teams += \"\\n\" + t.enemyTeam.name + \":\\n\" + t.enemyTeam + \"\\n\";\n teams += \"\\nSelect OK when you are ready to choose a Fighter.\";\n JOptionPane.showMessageDialog(null, teams);\n }", "private void displayTeams() {\n SwapTeamMembersController.calculateTeamConstraints();\n System.out.println(\"\\nTeams formed are:\");\n for (Team team: Team.allTeams) {\n System.out.println(Constraint.ANSI_GREEN + \"\\nThe team ID\\t\\t\\t\\t: \" + team.getTeamID() + Constraint.ANSI_RESET +\n \"\\nThe Project Assigned\\t: \" + team.getProjectAssigned().getProjectId() + \": \" + team.getProjectAssigned().getProjectTitle() +\n \"\\nThe team's fitness is\\t: \" + team.getTeamFitness());\n System.out.print(\"\\nThe Students IDs of students in this team are: \\n\");\n for (Student student: team.getStudentsInTeam()) {\n System.out.print(student.getId() + \"\\tName: \" + student.getFirstName() + \"\\t\\tGender : \" + student.getGender() + \"\\t\\tExperience : \" + student.getExperience() + \" years\\n\");\n }\n int j = 1;\n System.out.println(\"\\nConstraints met are (with weightage):\");\n for (Constraint c: team.getConstraintsMet()) {\n System.out.println(j + \". \" + c.getConstraintDescription() + \"\\t: \" + c.getWeightAge());\n j++;\n }\n }\n }", "public void displayFoulsForTeamB(int fouls) {\n TextView foulsView = findViewById(R.id.team_b_fouls);\n foulsView.setText(String.valueOf(fouls));\n }", "public void displayFoulsForTeamB(int fouls) {\r\n TextView foulsView = (TextView) findViewById(R.id.team_b_fouls);\r\n foulsView.setText(String.valueOf(fouls));\r\n }", "private static void displayUserTeam() {\n\t\tif (game.getCurrentRound()==1) {\n\t\t\tfor (int i = 0; i<11; i++) {\n\t\t\t\tplayerNameArray[i].setText(\"Name\");\n\t\t\t\timageArray[i].setIcon(MainGui.getShirt(\"noTeam\"));\n\t\t\t\tbuttonArray[i].setText(\"+\");\n\t\t\t}\n\t\t}\n\t}", "public void FoulTeamA(View view) {\n foulteamA = foulteamA + 1;\n displayFoulA(foulteamA);\n }", "public void cmdShowTeam(User teller, Team team) {\n Formatter msg = new Formatter();\n msg.format(\" Team %s:\\\\n\", team.getTeamCode());\n msg.format(\" %4s: %s\\\\n\", \"Name\", team.getRealName());\n msg.format(\" %4s: %s\\\\n\", \"Loc.\", team.getLocation());\n msg.format(\" %4s: %s\\\\n\", \"Web \", team.getWebsite());\n msg.format(\" %4s: %s\\\\n\", \"Div \", team.getDivision());\n msg.format(\" Team Members:\\\\n\");\n int indent = 0;\n for (Player player : team.getPlayers()) {\n int len = player.getHandle().length();\n if (len > indent) {\n indent = len;\n }\n }\n String fmt = \" %s\\\\n\";\n for (Player player : team.getPlayers()) {\n msg.format(fmt, player);\n }\n command.qtell(teller, msg);\n }", "public void plusFoulTeamA (View view) {\r\n foulsA++;\r\n displayFoulsForTeamA(foulsA);\r\n }", "public void printTeamsInLeague(){\n for (T i : teams){\n System.out.println(i.getTeamName());\n }\n }", "public static void printTeamInfo(Team team) {\n String leftAlignFormat = \"| %-20s | %-20s | %-20s | %-20s |%n\";\n System.out.println(CYAN + \"\\n\\tTeam: \" + team.getName() + RESET);\n printTeamTableHeader(leftAlignFormat, team.getHeroes());\n printTeamMemberInfo(leftAlignFormat, team.getHeroes());\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"[\" + teamNo + \"] \" + name;\r\n\t}", "@Override\n protected void display() {\n System.out.println(\"Welcome to team builder tool!\");\n System.out.println(\"Current team: \" + team.getName());\n }", "public void displayForTeamA(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "public void addFaltasTeamA(View view) {\n faltasTeamA = faltasTeamA + 1;\n displayFaltasTeamA(faltasTeamA);\n }", "public FightTeam team();", "public void displayForTeamA(int scoreA) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(scoreA));\r\n }", "private void showMatch() {\n System.out.println(\"Player 1\");\n game.getOne().getField().showField();\n System.out.println(\"Player 2\");\n game.getTwo().getField().showField();\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"View all teams\");\n\t\tSystem.out.println(teamData.viewTeams());\n\t\t\n\t\tSystem.out.println(\"Search by conference\");\n\t\tSystem.out.println(teamData.searchConference(\"AFC\"));\n\t\tSystem.out.println(teamData.searchConference(\"NFC\"));\n\t\t\n\t\tSystem.out.println(\"Search by division\");\n\t\tSystem.out.println(teamData.searchDivision(\"NFC\", \"West\"));\n\t\tSystem.out.println(teamData.searchDivision(\"NFC\", \"East\"));\n\t\t\n\t\tSystem.out.println(\"View team roster\");\n\t\tSystem.out.println(teamData.viewTeamRoster(\"Bears\"));\n\t\tSystem.out.println(teamData.viewTeamRoster(\"Cowboys\"));\n\t\t\n\t\tSystem.out.println(\"List player data\");\n\t\tSystem.out.println(teamData.listPlayer(\"Romo\", \"Cowboys\"));\n\t\tSystem.out.println(teamData.listPlayer(\"Brady\", \"Patriots\"));\n\t\t\n\t\tSystem.out.println(\"List all match results\");\n\t\t//System.out.println(teamData.readMatchData()); //lists all match results for all weeks\n\t\t\n\t\tSystem.out.println(\"List match results by week\");\n\t\tSystem.out.println(teamData.viewMatchWeek(\"Week 5\"));\n\t\t\n\t\tSystem.out.println(\"View single team's match data\");\n\t\tSystem.out.println(teamData.viewMatchByTeam(\"Falcons\"));\n\t\tSystem.out.println(teamData.viewMatchByTeam(\"Cowboys\"));\n\t\t\n\t\tSystem.out.println(\"View Head to Head (team vs team)\");\n\t\tSystem.out.println(teamData.viewH2H(\"Patriots\", \"Dolphins\"));\n\t\tSystem.out.println(teamData.viewH2H(\"Panthers\", \"Eagles\"));\n\t\t\n\t\tSystem.out.println(\"View specific team wins\");\n\t\tSystem.out.println(teamData.viewTeamWins(\"Panthers\"));\n\t\t\n\t\tSystem.out.println(\"View specific team loses\");\n\t\tSystem.out.println(teamData.viewTeamLoses(\"Titans\"));\n\t\t\n\t\t//Haven't tested this fully\n\t\t//System.out.println(teamData.getTeamImage(\"Cowboys\"));\n\t}", "public void displayForTeamA2(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score2);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "public String getProjectTeamName(){\n return \"The name of the project of this researcher is \"+\n name_of_project_team +\n \"\\n*******\\n\";\n }", "@Override\n\tpublic String toString() {\n\t\treturn teamName;\n\t}", "public String getHomeTeam();", "private void printMatch(){\n nameHomelbl.setText(match.getHomeTeam().getName());\n cittaHomelbl.setText(match.getHomeTeam().getCity());\n nameGuestlbl.setText(match.getGuestTeam().getName());\n cittaGuestlbl.setText(match.getGuestTeam().getCity());\n if(match.getPlayed()) {\n pointsHometxt.setText(String.valueOf(match.getPointsHome()));\n pointsGuesttxt.setText(String.valueOf(match.getPointsGuest()));\n } else {\n pointsHometxt.setText(\"-\");\n pointsGuesttxt.setText(\"-\");\n }\n \n try{\n logoGuestlbl.setIcon(new ImageIcon(ImageIO.read(new File(match.getGuestTeam().getLogo())).getScaledInstance(200, 200, Image.SCALE_SMOOTH)));\n logoHomelbl.setIcon(new ImageIcon(ImageIO.read(new File(match.getHomeTeam().getLogo())).getScaledInstance(200, 200, Image.SCALE_SMOOTH)));\n \n } catch (IOException ex){\n System.out.println(\"immagine non esistente\");\n JOptionPane.showMessageDialog(null, \"immagine non esistente\");\n }\n }", "public String toString () {\n return team1 + \" vs. \" + team2 + \": \" + score1 + \" to \" + score2;\n }", "public void showFitaMT(List<Simbolo> fitaMT) { \r\n final int tamFita = fitaMT.size();\r\n pLabels.removeAll();\r\n //pLabels.setLayout(new java.awt.GridLayout(1, tamFita));\r\n pLabels.setLayout(new java.awt.GridLayout(1, 1));\r\n \r\n pLabels.add(createLabel('<'));\r\n for(Simbolo s : fitaMT)\r\n if(Character.isLetterOrDigit(s.getNome()))\r\n pLabels.add(createLabel(s.getNome())); \r\n pLabels.add(createLabel('\\u03B2'));\r\n pLabels.add(createLabel('\\u03B2'));\r\n pLabels.add(createLabel('\\u03B2'));\r\n \r\n setVisible(true); \r\n \r\n }", "public void printSummary(Team team){\r\n\t\tfor(Player player : team.getPlayers()){\r\n\t\t\tif(player.isOut() == true){\r\n\t\t\t\tthis.addCommentary(player.getName()+\" : \"+player.getRuns()+\" (\"+player.getBalls()+\" Balls)\\n\");\r\n\t\t\t}else if(player.isY2B() == true){\r\n\t\t\t\tthis.addCommentary(player.getName()+\" : DNB\\n\");\r\n\t\t\t}else{\r\n\t\t\t\tthis.addCommentary(player.getName()+\" : \"+player.getRuns()+\"* (\"+player.getBalls()+\" Balls)\\n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tthis.addCommentary(\"\\n\");\r\n\t}", "public void show()\n {\n System.out.println( getFullName() + \", \" +\n String.format(Locale.ENGLISH, \"%.1f\", getAcademicPerformance()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getSocialActivity()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getCommunicability()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getInitiative()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getOrganizationalAbilities())\n );\n }", "public String getStatsOfTeams(){\n\n String res = \"\";\n\n if (teams.size() <= 0){\n return \"No team registered in tournament\";\n }\n\n for(int num=0; num<teams.size(); num++)\n {\n SoccerTeam team = teams.get(num);\n res += team.toString() + \"\\n\";\n }\n return res;\n }", "public void display() {\r\n String kind;\r\n if (profit == true) {\r\n kind = \"profit\";\r\n }\r\n\r\n else kind = \"non-profit\";\r\n System.out.println(name + \" is a \" + kind + \" organization that has\" + \" \" + revenue + \" dollars in revenue\" );\r\n }", "public void display(){\r\n System.out.println(\"The Vacancy Number is : \" + getVacancyNumber());\r\n System.out.println(\"The Designation is : \" + getDesignation());\r\n System.out.println(\"The Job Type is : \" + getJobType());\r\n }", "public String displayFamilyMembers() {\n int i = 1;\n StringBuilder ret = new StringBuilder();\n for (FamilyMember fam : this.famMemberList) {\n ret.append(i + \".\" + \" \" + fam.getSkinColour() + \" -> \" + fam.getActionValue());\n ret.append(\" | \");\n i++;\n }\n return ret.toString();\n }", "public static void facultyText(){\n\t\tSystem.out.println(\"Enter: 1.'EXIT' 2.'ADD' 3.'REMOVE' 4.'FIND' 5.'SCHEDULE' 6.'GRANTS' 7.'MORE' -for more detail about options\");\n\t}", "public void FoulTeamB(View view) {\n foulteamB = foulteamB + 1;\n displayFoulb(foulteamB);\n }", "public static void oneTeam(String[] name, int[] team)\n {\n int a=0;\n System.out.println(\"The following players played with one team for their entire NHL careers:\");\n for(int i=0;i<team.length;i++)\n { \n if(team[i]==1)\n {\n System.out.println(name[i]);\n }//end of if statement\n }//end of for loop\n }", "private void displayOneFilm(Movie film)\n {\n String head = film.getTitle();\n String director = film.getDirector();\n String actor1 = film.getActor1();\n String actor2 = film.getActor2();\n String actor3 = film.getActor3();\n int rating = film.getRating();\n \n System.out.println(\"\\n\\t\\t **::::::::::::::::::::::::::MOVIE DETAILS::::::::::::::::::::::::::::**\");\n System.out.println();\n System.out.println(\"\\t\\t\\t Movies' Title : \" + head);\n System.out.println(\"\\t\\t\\t Movies' Director : \" + director);\n \n if (actor2.length() == 0)\n System.out.println(\"\\t\\t\\t Movies' Actors : \" + actor1);\n else\n if (actor3.length() == 0)\n System.out.println(\"\\t\\t\\t Movies' Actors : \" + actor1 + \", \" + actor2);\n else\n if (actor3.length() != 0)\n System.out.println(\"\\t\\t\\t Movies' Actors : \" + actor1 + \", \" + actor2 + \", \" + actor3);\n\n System.out.println(\"\\t\\t\\t Movies' Rating : \" + rating);\n System.out.println(\"\\t\\t **:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::**\");\n }", "public void displayGame()\n { \n System.out.println(\"\\n-------------------------------------------\\n\");\n for(int i=3;i>=0;i--)\n {\n if(foundationPile[i].isEmpty())\n System.out.println(\"[ ]\");\n else System.out.println(foundationPile[i].peek());\n }\n System.out.println();\n for(int i=6;i>=0;i--)\n {\n for(int j=0;j<tableauHidden[i].size();j++)\n System.out.print(\"X\");\n System.out.println(tableauVisible[i]);\n }\n System.out.println();\n if(waste.isEmpty())\n System.out.println(\"[ ]\");\n else System.out.println(waste.peek());\n if(deck.isEmpty())\n System.out.println(\"[O]\");\n else System.out.println(\"[X]\");\n }", "public static void main(String[] args) {\n\t\tteam t = new team(\"빵그래\",20,17);\n\t\tt.showCur();\n\t\t/*\n\t\t * 객체배열\n\t\t * 1. 객체배열 크기선언\n\t\t * \t객체[] 객체배열 =new person[5]; //5개 person객체가 들어갈 수 있는 배열\n\t\t * 2. 객체배열 선언, 할당\n\t\t * ex)person[] p = {new person(\"하이맨\"),new person(\"하이맨2\"),new person(\"하이맨3\")}\n\t\t * 3. 객체배열의 통한 메서드 활용\n\t\t * for(int idx=0; idx<p.lenght;idx++){\n\t\t * \tp[idx].printAll(); //특정 배열 객체 내부에 있는 객체한개의 메서드 활용\n\t\t * }\n\t\t * for(person ps:p){\n\t\t * \tp.printAll();\n\t\t * \t}\n\t\t */\n\t\tteam[] tArray01 = new team[3];\n\t\ttArray01[0] = new team(\"두산베어즈\",21,18);\n\t\ttArray01[1] = new team(\"넥센자이언트\",19,18);\n\t\ttArray01[2] = new team(\"기아타이거\",17,14);\n\t\tfor(team tm:tArray01){\n\t\t\ttm.showCur();\n\t\t}\n\t\tteam[] tArray02 = {new team(\"LA다져스\",30,10),\n\t\t\t\t\t\t new team(\"요미우리 자이언츠\",5,27),\n\t\t\t\t\t\t new team(\"삼성라이온즈\",12,16),\t\t\t\n\t\t\t\t\t\t\t};\n\t\tfor(int idx=0; idx<tArray02.length;idx++){\n\t\t\ttArray02[idx].showCur();\n\t\t}\n\t\t\n\n}", "public String getAwayTeam();", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "@Override\r\n\tpublic String falar() {\r\n\t\treturn \"[ \"+getNome()+\" ] Sou Um Professor\";\r\n\t}", "@Override //TODO\n public String toString() {\n String s = \"\";\n s += name + \" \";\n for(Pokemon p : team)\n s += p + \"\\n\";\n return s;\n }", "public String getTeamStatus(){\n int i;\n StringBuilder s = new StringBuilder();\n\n s.append(employeeStatus());\n if(this.curHeadCount <= 0)\n s.append(\" and no direct reports yet\");\n else {\n s.append(\" and is managing:\");\n for(i=0;i<this.curHeadCount;i++){\n s.append(\"\\n\");\n s.append(this.employee[i].employeeStatus());\n }\n }\n\n return s.toString();\n }", "public void printAllResults(){\n String round = \"Rounds: \\t\\t\";\n String team1 = fight_list.get(0).t1.name + \"\\t\\t\"; //note: We assume that all the FightResults in 1 DataBag all have the same 2 teams. Gotta write that better later.\n String team2 = fight_list.get(0).t2.name + \"\\t\\t\";\n\n for(FightResult fig : this.fight_list){\n round += fig.final_round + \"\\t\";\n team1 += fig.t1_deaths + \"\\t\";\n team2 += fig.t2_deaths + \"\\t\";\n }\n\n System.out.println(round);\n System.out.println(team1);\n System.out.println(team2);\n\n //System.out.println(\"\\n--------\\n\");\n }", "public void displayForpoint_one(View view){\n score = score + 1;\n displayForTeamA(score);\n }", "public void showPortfolio(){\n System.out.println(\"PORTFOLIO CONTENTS\");\n for(int i = 0; i < this.projects.size(); i++){\n System.out.println(this.projects.get(i).elevatorPitch());\n }\n System.out.println(\"Total Portfolio Cost: $\" + this.getPortfolioCost());\n }", "private void showResult() {\n int i = 0;\n matchList.forEach(match -> match.proceed());\n for (Match match : matchList) {\n setTextInlabels(match.showTeamWithResult(), i);\n i++;\n }\n }", "private void displayChampionshipDetails()\n {\n displayLine();\n System.out.println(\"########Formula 9131 Championship Details########\");\n displayLine();\n System.out.println(getDrivers().getChampionshipDetails());\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "@Override\n public String toString() {\n return \"I am a footballer. I play for \" + team +\n \", and my position is \" + position + \".\";\n }", "private static String formatFamily (FamilyCard fc) {\n\t\tString res = \"\";\n\n\t\tFamilyHeadGuest fhg = fc.getCapoFamiglia();\n\t\tres += FamilyHeadGuest.CODICE;\n\t\tres += DateUtils.format(fc.getDate());\n\t\tres += String.format(\"%02d\", fc.getPermanenza());\n\t\tres += padRight(fhg.getSurname().trim().toUpperCase(),50);\n\t\tres += padRight(fhg.getName().trim().toUpperCase(),30);\n\t\tres += fhg.getSex().equals(\"M\") ? 1 : 2;\n\t\tres += DateUtils.format(fhg.getBirthDate());\n\n\t\t//Setting luogo et other balles is a bit more 'na rottura\n\t\tres += formatPlaceOfBirth(fhg.getPlaceOfBirth());\n\n\t\tPlace cita = fhg.getCittadinanza(); //banana, box\n\t\tres += cita.getId();\n\n\t\tres += fhg.getDocumento().getDocType().getCode();\n\t\tres += padRight(fhg.getDocumento().getCodice(),20);\n\t\tres += fhg.getDocumento().getLuogoRilascio().getId();\n\t\t//Assert.assertEquals(168,res.length()); //if string lenght is 168 we are ok\n\t\tres += \"\\r\\n\";\n\n\t\tfor (FamilyMemberGuest fmg : fc.getFamiliari()){\n\t\t\tres += formatFamilyMember(fmg, fc.getDate(), fc.getPermanenza());\n\t\t\t//res += \"\\r\\n\";\n\t\t}\n\n\t\treturn res;\n\t}", "public void showFacilities() {\r\n\t\tfor(Facility f: facilities.values()) {\r\n\t\t\tSystem.out.println(f.toString());\r\n\t\t}\r\n\t}", "public void display () {\n super.display ();\n if (joined == true) {\n System.out.println(\"Staff name: \"+staffName+\n \"\\nSalary: \"+salary+\n \"\\nWorking hour: \"+workingHour+\n \"\\nJoining date: \"+joiningDate+\n \"\\nQualification: \"+qualification+\n \"\\nAppointed by: \"+appointedBy);\n }\n }", "@Override\r\n public String toString() {\r\n StringBuilder stringBuilder = new StringBuilder();\r\n for (Hero hero: team) {\r\n stringBuilder.append(\"Hero name: \").append(hero.getName());\r\n stringBuilder.append(\", health: \").append(hero.getHealth());\r\n stringBuilder.append(\", power: \").append(hero.getAttackPower());\r\n stringBuilder.append(\";\");\r\n stringBuilder.append(\"\\n\");\r\n }\r\n return stringBuilder.toString();\r\n }", "public String display(){\n StringBuilder str = new StringBuilder();\n\n for(int i = 0; i < 3; ++i){\n if( Array[i] != null ) {\n str.append('\\n' + Names[i] + '\\n');\n str.append(Array[i].display());\n }\n }\n return str.toString();\n }", "@Override\r\n//displays the property of defensive players to console\r\npublic String toString() {\r\n\t\r\n\tdouble feet = getHeight()/12;\r\n\tdouble inches = getHeight()%12;\r\n\t\r\n\treturn \"\\n\" + \"\\nDefensive Player: \\n\" + getName() \r\n\t+ \"\\nCollege: \" + getCollege() \r\n\t+ \"\\nHighschool: \" + getHighschool() \r\n\t+ \"\\nAge: \" + getAge() \r\n\t+ \"\\nWeight: \" + getWeight() \r\n\t+ \"\\nHeight: \" + feet + \" ft\" + \" \" + inches + \" in\" \r\n\t+ \"\\nTeam Number: \" + getNumber() \r\n\t+ \"\\nExperience: \" + getExperience()\r\n\t+ \"\\nTeam: \" + getTeam() \r\n\t+ \"\\nPosition: \" +getPosition() \r\n\t+ \"\\nTackles : \" + getTackles() \r\n\t+ \"\\nSacks: \" +getSacks() \r\n\t+ \"\\nInterceptions: \" + getInterceptions();\r\n}", "protected abstract void gatherTeam();", "int getTeam();", "public void show() {\r\n\t\tshowMembers();\r\n\t\tshowFacilities();\r\n\t}", "public void display() {\n String box = \"\\n+--------------------------------------------+\\n\";\n String header = \"| \" + name;\n String lvlStat = \"Lv\" + level;\n for (int i=0; i<42-name.length()-lvlStat.length(); i++) {\n header += \" \";\n }\n header += lvlStat + \" |\\n\";\n System.out.println(box + header + \"| \" + getHealthBar() + \" |\" + box);\n }", "public String getName() {\r\n\t\treturn \"[\" + teamNo + \"] \" + name;\r\n\t}", "public String toString()\r\n\t{\r\n\t\tString teamRoster = \"\";\r\n\t\t\r\n\t\tfor(int i = 0; i < teams.size(); i ++)\r\n\t\t{\r\n\t\t\tteamRoster += teams.get(i) + \" \";\r\n\t\t}\t\r\n\t\treturn teamRoster;\r\n\t}", "public void addOnePointToTeamA(View view)\n {\n scoreTeamA++;\n displayTeamAScore(scoreTeamA);\n }", "private void displayTeamAScore(int num)\n {\n TextView scoreTextView = (TextView) findViewById(R.id.teamAScore);\n scoreTextView.setText(num +\"\");\n }", "public void displayLeaderCards() {\n int i = 1;\n for (LeaderCard card : leaderCards) {\n String toDisplay = i + \" \" + card.getName() + \" -> cost: \" +\n card.getActivationCost() +\" : \" + card.getCardCostType();\n if (card.isActivated()) {\n toDisplay += \" activated\";\n }\n this.sOut(toDisplay);\n i++;\n }\n }", "public void aFieldGoal(View view) {\n scoreTeamA = scoreTeamA + 3;\n displayForTeamA(scoreTeamA);\n }", "@Override\n public String getTeam(){\n return this.team;\n }", "public List<PlayerTeam> display6() {\n List<PlayerTeam> l = new List<PlayerTeam>();\n List<PlayerTeam> all = build();\n int max = 0;\n PlayerTeam curr = all.first();\n while (curr != null) {\n int c = curr.getWinninggoals();\n if (c > max) {// if is a new maximum value, empty the list\n l.clear();\n l.add(curr);\n max = c;\n } else if (c == max) { // if there are more than one maximum value,\n // add it\n l.add(curr);\n }\n curr = all.next();\n }\n return l;\n }", "public void plusFoulTeamB (View view) {\r\n foulsB++;\r\n displayFoulsForTeamB(foulsB);\r\n }", "public void fight(Team otherteam) {\n\t\tString aTeamCaptainName = this.captain.getName();\t//호출한 메서드\n\t\tString bTeamCaptainName = otherteam.captain.getName();\n\t\tSystem.out.println(aTeamCaptainName+\"과 \"+ bTeamCaptainName+\"이 싸운다\");\n\t\t\n\t}", "public void display()\n {\n System.out.println(name);\n System.out.println(status);\n if (friendslist.size ==0){\n System.out.println(\"User has no friends :(\");\n for(String i: friendslist.size){\n System.out.println(friendslist.get(i));\n }\n }\n }", "public void recuperarFactura(){\n int id = datosFactura.recuperarFacturaID();\n Factura factura = almacen.getFactura(id);\n System.out.println(\"\\n\");\n if(factura != null)\n System.out.print(factura.toString());\n System.out.println(\"\\n\");\n }", "public String getTeam() {\n return team;\n }", "public static void displayStats2(ArrayList<String> standings){\n\t\t\tString[] parts;\n\t\t\tdouble avg;\n\t\t\tSystem.out.println(\"-----------------------------\");\n\t\t\tSystem.out.println(\"Teams: Pct:\" );\n\t\t\tSystem.out.println(\"-----------------------------\");\n\t\t\tfor(String standing : standings){\n\t\t\t\tparts = standing.split(\"\\t\");\n\t\t\t\tavg = getAvg(standing);\n\t\t\t\tSystem.out.printf(\"%-15s%6.2f\\n \", parts[0], avg);\n\t\t\t\t//System.out.println(parts[1]);\n\t\t\t\t//System.out.println(parts[2]);\n\t\t\t\t\n\t\t\t}//end for \n\t//\t\tSystem.out.println(standings);\n\t\t}", "void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }", "public static void viewFutureFixtures() throws IOException\n\t{\n\t\tString leagueName = getInputFromEndUser(\"Enter the name of the league/division/tournament (case sensitive) to display its upcoming fixtures.\",\n\t\t\t\"View fixtures that have yet to be played.\");\n\t\tif (leagueName.equals(\"\"))\n\t\t\treturn;\n\t\telse\n\t\t{\n\t\t\tFile allLeaguesFile = new File(\"AllDivisionsTournamentsLeagues.txt\");\n\t\t\tif (!allLeaguesFile.exists())\n\t\t\t\tJOptionPane.showMessageDialog(null, \"There are no divisions/tournaments/leagues to load.\", \"Error\", 2);\n\t\t\telse\n\t\t\t{\n\t\t\t\tFileReader allLeaguesReader = new FileReader(\"AllDivisionsTournamentsLeagues.txt\");\n\t\t\t\tScanner allLeaguesScanner = new Scanner(allLeaguesReader);\n\t\t\t\tString lineFromAllLeagues = \"\";\n\t\t\t\twhile (allLeaguesScanner.hasNext() && !lineFromAllLeagues.contains(leagueName))\n\t\t\t\t\tlineFromAllLeagues = allLeaguesScanner.nextLine();\n\t\t\t\tallLeaguesScanner.close();\tallLeaguesReader.close();\n\t\t\t\tif (!lineFromAllLeagues.contains(leagueName))\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Division/Tournament/League \\\"\"+leagueName+\"\\\" not found.\" +\n\t\t\t\t\t\t\"\\n\\nPlease check that you typed the name correctly.\", \"Error\", 2);\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tFile aFile1 = new File(leagueName+\"Results.txt\");\n\t\t\t\t\tFileReader aFileRead = new FileReader(leagueName+\"Fixtures.txt\");\n\t\t\t\t\tint lineCount = 0, count = 0;\n\t\t\t\t\tint fixtureNumber, homeTeamNumber, awayTeamNumber;\n\t\t\t\t\tString homeTeamName = \"\", awayTeamName = \"\";\n\t\t\t\t\tString aLineFromFile = \"\";\n\t\t\t\t\tString[] fixtures;\n\t\t\n\t\t\t\t\tScanner in = new Scanner(aFile1);\n\t\t\t\t\twhile (in.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tin.nextLine();\n\t\t\t\t\t\tlineCount++;\n\t\t\t\t\t}\n\t\t\t\t\tin.close();\n\t\t\t\t\t\n\t\t\t\t\tin = new Scanner(aFileRead);\n\t\t\t\t\twhile (in.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\taLineFromFile = in.nextLine();\n\t\t\t\t\t\tif(count > lineCount)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfixtures = aLineFromFile.split(\",\");\n\t\t\t\t\t\t\tfixtureNumber = Integer.parseInt(fixtures[0]);\n\t\t\t\t\t\t\thomeTeamNumber = Integer.parseInt(fixtures[1]);\n\t\t\t\t\t\t\tawayTeamNumber = Integer.parseInt(fixtures[2]);\n\t\t\t\t\t\t\thomeTeamName = getTeamName(homeTeamNumber, leagueName);\n\t\t\t\t\t\t\tawayTeamName = getTeamName(awayTeamNumber, leagueName);\n\t\t\t\t\t\t\tSystem.out.println(fixtureNumber+\". \" + homeTeamName+\" v \"+awayTeamName);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tin.close();\n\t\t\t\t\taFileRead.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void viewOutcomeOfPlayedFixtures() throws IOException\n\t{\n\t\tString leagueName = getInputFromEndUser(\"Enter the name of the league/division/tournament (case sensitive) to display its current results.\",\n\t\t\t\"View results of played fixtures.\");\n\t\tif (leagueName.equals(\"\"))\n\t\t\treturn;\n\t\telse\n\t\t{\n\t\t\tFile allLeaguesFile = new File(\"AllDivisionsTournamentsLeagues.txt\");\n\t\t\tif (!allLeaguesFile.exists())\n\t\t\t\tJOptionPane.showMessageDialog(null, \"There are no divisions/tournaments/leagues to load.\", \"Error\", 2);\n\t\t\telse\n\t\t\t{\n\t\t\t\tFileReader allLeaguesReader = new FileReader(\"AllDivisionsTournamentsLeagues.txt\");\n\t\t\t\tScanner allLeaguesScanner = new Scanner(allLeaguesReader);\n\t\t\t\tString lineFromAllLeagues = \"\";\n\t\t\t\twhile (allLeaguesScanner.hasNext() && !lineFromAllLeagues.contains(leagueName))\n\t\t\t\t\tlineFromAllLeagues = allLeaguesScanner.nextLine();\n\t\t\t\tallLeaguesScanner.close();\tallLeaguesReader.close();\n\t\t\t\tif (!lineFromAllLeagues.contains(leagueName))\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Division/Tournament/League \\\"\"+leagueName+\"\\\" not found.\" +\n\t\t\t\t\t\t\"\\n\\nPlease check that you typed the name correctly.\", \"Error\", 2);\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tFileReader resultsReader = new FileReader(leagueName+\"Results.txt\");\n\t\t\t\t\tScanner resultsScanner = new Scanner(resultsReader);\n\t\t\t\t\tString lineFromResults = \"\";\n\t\t\t\t\tString[] results;\n\t\t\t\t\tFileReader fixturesReader = new FileReader(leagueName+\"Fixtures.txt\");\n\t\t\t\t\tScanner fixturesScanner = new Scanner(fixturesReader);\n\t\t\t\t\tString lineFromFixtures = \"\";\n\t\t\t\t\tString[] fixtures;\n\t\t\t\t\tint fixtureNumber, homeTeamNumber, awayTeamNumber, homeTeamScore, awayTeamScore;\n\t\t\t\t\tString homeTeamName = \"\", awayTeamName = \"\";\n\t\t\t\t\twhile (resultsScanner.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tlineFromResults = resultsScanner.nextLine();\n\t\t\t\t\t\tresults = lineFromResults.split(\",\");\n\t\t\t\t\t\tlineFromFixtures = fixturesScanner.nextLine();\n\t\t\t\t\t\tfixtures = lineFromFixtures.split(\",\");\n\t\t\t\t\t\tfixtureNumber = Integer.parseInt(results[0]);\n\t\t\t\t\t\thomeTeamNumber = Integer.parseInt(fixtures[1]);\n\t\t\t\t\t\tawayTeamNumber = Integer.parseInt(fixtures[2]);\n\t\t\t\t\t\thomeTeamName = getTeamName(homeTeamNumber, leagueName);\n\t\t\t\t\t\tawayTeamName = getTeamName(awayTeamNumber, leagueName);\n\t\t\t\t\t\thomeTeamScore = Integer.parseInt(results[1]);\n\t\t\t\t\t\tawayTeamScore = Integer.parseInt(results[2]);\n\t\t\t\t\t\tSystem.out.printf(\"%-5s%20s\", fixtureNumber+\".\", homeTeamName+\" \"+homeTeamScore+\" v \"+awayTeamScore+\" \"+awayTeamName+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tfixturesScanner.close();\tfixturesReader.close();\n\t\t\t\t\tresultsScanner.close();\t\tresultsReader.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public String display(){\n return \"\\tId: \" + id + \"\\n\" +\n \"\\tName: \" + name + \"\\n\" +\n \"\\tDescription: \" + description + \"\\n\" +\n \"\\tTeacher(s): \" + teacherString() + \"\\n\";\n }", "public String getHomeLine(String team) {\n\n String homeLine;\n // if the game status is preview or postponed\n if (team.equals(\"\") || getGameStatus(team).equals(\"Preview\") || getGameStatus(team).equals(\"Postponed\") ||\n getGameStatus(team).equals(\"No game scheduled for the \" + uppercaseFirstLetters(team)) ||\n getGameStatus(team).equals(\"ERROR: Please enter current MLB team name.\")) {\n homeLine = \"\";\n }\n else {\n homeLine = \"H E\\n\" + getHomeH(team) + \" \" + getHomeE(team);\n }\n\n return homeLine;\n }", "@Override\r\n\tpublic String getTeam() {\n\t\treturn null;\r\n\t}", "public void printOut(){\n\t\tSystem.out.println(\"iD: \" + this.getiD());\n\t\tSystem.out.println(\"Titel: \" + this.getTitel());\n\t\tSystem.out.println(\"Produktionsland: \" + this.getProduktionsLand());\n\t\tSystem.out.println(\"Filmlaenge: \" + this.getFilmLaenge());\n\t\tSystem.out.println(\"Originalsprache: \" + this.getOriginalSprache());\n\t\tSystem.out.println(\"Erscheinungsjahr: \" + this.getErscheinungsJahr());\n\t\tSystem.out.println(\"Altersfreigabe: \" + this.getAltersFreigabe());\n\t\tif(this.kameraHauptperson != null) {\n\t\t\tSystem.out.println( \"Kameraperson: \" + this.getKameraHauptperson().toString() );\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println( \"Keine Kameraperson vorhanden \");\n\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tif ( this.listFilmGenre != null) {\n\t\t\tfor( FilmGenre filmGenre: this.listFilmGenre ){\n\t\t\t\tSystem.out.println(\"Filmgenre: \" + filmGenre);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person darsteller: this.listDarsteller ){\n\t\t\tSystem.out.println(\"Darsteller: \" + darsteller);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person synchronSpr: this.listSynchronsprecher ){\n\t\t\tSystem.out.println(\"synchro: \" + synchronSpr);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person regi: this.listRegisseure ){\n\t\t\tSystem.out.println(\"regi: \" + regi);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Musikstueck mstk: this.listMusickstuecke ){\n\t\t\tSystem.out.println(\"Musikstueck: \" + mstk);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tSystem.out.println(\"Datentraeger: \" + this.getDatentraeger());\n\t\tSystem.out.println(\"----------------------------\");\n\t}", "@Override\r\n public void display() { //implements abstract display() method from Division.java\r\n System.out.println(\"Division Name: \" + getDivisionName());\r\n System.out.println(\"Account Number: \" + getAccountNumber());\r\n\r\n System.out.println(\"Country: \" + getCountry());\r\n System.out.println(\"Language Spoken: \" + getLanguageSpoken() + \"\\n\");\r\n\r\n }", "public void displayScoreForTeamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "protected void DisplayVenueAndPitchNames()\n {\n TextView venueName = (TextView) findViewById(R.id.venueName);\n TextView pitchName = (TextView) findViewById(R.id.pitchName);\n venueName.setText(venueNameTitle);\n pitchName.setText(pitch.getPitchName());\n }", "public void Blueprint(){\r\n System.out.println(\"House features:\\nSquare Footage - \" + footage + \r\n \"\\nStories - \" + stories + \"\\nBedrooms - \" + bedrooms + \r\n \"\\nBathrooms - \" + bathrooms + \"\\n\");\r\n }", "@Override\n public String showPlan() {\n if (lunch != null && dinner != null) {\n String plan = \"Lunch ---- \" + this.lunch.getDetails() + \"\\n\" + \"Dinner ---- \" + this.dinner.getDetails() + \"\\n\" + this.dayOfWeek;\n return plan;\n }\n return \"Can't show plan!\";\n }", "@Override\n\tpublic int getTeam() {\n\t\treturn 0;\n\t}", "public void display () {\n System.out.println(rollNo + \" \" + name + \" \" + college );\n }", "public void displayForpoint_two(View view){\n score = score + 2;\n displayForTeamA(score);\n }", "public void printBattleField(boolean isThisAttacker, BattleField battleField) {\n BattleShipHelper helper = new BattleShipHelper();\n Shot[] shots = battleField.getShots();\n int k = 0;\n\n for (int i = 0; i < 10; i++) {\n if (i == 0)\n System.out.print(\" \");\n System.out.print(i + \".\\t\");\n }\n\n System.out.println(\"\\n ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\");\n for (int i = 0; i < 10; i++) {\n System.out.print(i + \". \");\n for (int j = 0; j < 10; j++) {\n k = battleField.getIndexOfShot(j, i);\n if(((battleField.getIndexOfShip(j, i) != -1) && shots[k].getHit() && helper.isThisDestroyedShip(battleField.getIndexOfShip(j, i), battleField)) ||\n (isThisAttacker && (battleField.getIndexOfShip(j, i) != -1) && shots[k].getHit())) {\n System.out.print(\"\\u2588\\t\");\n } else if(battleField.getIndexOfShip(j, i) != -1){\n if(shots[k].getHit() || isThisAttacker) {\n System.out.print(\"\\u2592\\t\");\n } else {\n System.out.print(\"\\u25AB\\t\");\n }\n } else if((shots[k].getHit()) && (battleField.getIndexOfShip(j, i) == -1)) {\n System.out.print(\"\\u25AA\\t\");\n } else {\n System.out.print(\"\\u25AB\\t\");\n }\n }\n System.out.println(\"\\n ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\");\n }\n }", "public void print() {\r\n System.out.print( getPlayer1Id() + \", \" );\r\n System.out.print( getPlayer2Id() + \", \");\r\n System.out.print(getDateYear() + \"-\" + getDateMonth() + \"-\" + getDateDay() + \", \");\r\n System.out.print( getTournament() + \", \");\r\n System.out.print(score + \", \");\r\n System.out.print(\"Winner: \" + winner);\r\n System.out.println();\r\n }", "public void Team_A_2_Points(View v) {\n teamAScore = teamAScore + 2;\n displayForTeamA(teamAScore);\n }" ]
[ "0.771816", "0.74191046", "0.7174507", "0.7125838", "0.7021386", "0.6891922", "0.6832105", "0.6810716", "0.67874867", "0.6742033", "0.65318716", "0.6530981", "0.645306", "0.6407832", "0.6374243", "0.63644737", "0.6345937", "0.6325391", "0.6235174", "0.6154103", "0.61455727", "0.6142886", "0.6142618", "0.6096916", "0.6070566", "0.60482204", "0.59600765", "0.59386724", "0.59349656", "0.59342086", "0.59253937", "0.59186745", "0.59182674", "0.5883439", "0.5866386", "0.586149", "0.58423567", "0.58371454", "0.582136", "0.58203626", "0.5799353", "0.57902175", "0.578587", "0.578587", "0.5780672", "0.5769093", "0.57672876", "0.57653224", "0.57635784", "0.5763136", "0.5756306", "0.5755223", "0.5750453", "0.5750453", "0.5750453", "0.5750453", "0.5750453", "0.57402563", "0.5721929", "0.57215416", "0.5717189", "0.57159615", "0.57154715", "0.5698945", "0.5696985", "0.5690786", "0.56817204", "0.5677665", "0.56440425", "0.56411374", "0.5626822", "0.5624632", "0.5620331", "0.5620306", "0.5614022", "0.56110805", "0.5589682", "0.55871385", "0.5576165", "0.5573025", "0.55678463", "0.556577", "0.55652195", "0.5559288", "0.5538948", "0.55303305", "0.55301535", "0.55200803", "0.55169964", "0.55142456", "0.55056024", "0.55047", "0.55043364", "0.5503331", "0.5502544", "0.54902774", "0.5490054", "0.5489299", "0.5488389", "0.5482114" ]
0.73742193
2
Method used to display the Score for Team B
public void displayScoreB (int score){ TextView scoreA = (TextView)findViewById(R.id.team_b_score); scoreA.setText(String.valueOf(score)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayForTeamB(int score) {\n TextView scoreView = findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayScoreForTeamB(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "private void displayTeamB_score(int score) {\n TextView teamB_scoreView = findViewById(R.id.teamB_score_textView);\n teamB_scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_bb_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int scoreA) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(scoreA));\r\n }", "public void displayScoreForTeamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "private void displayTeamA_score(int score) {\n TextView teamA_scoreView = findViewById(R.id.teamA_score_textView);\n teamA_scoreView.setText(String.valueOf(score));\n }", "public void displayScoreA (int score){\n\n TextView scoreA = (TextView)findViewById(R.id.team_a_score);\n scoreA.setText(String.valueOf(score));\n }", "public void displayForTeamA(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "public void displayForTeamA2(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score2);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "private void displayTeamBScore(int num)\n {\n TextView scoreTextView = (TextView) findViewById(R.id.teamBScore);\n scoreTextView.setText(num +\"\");\n }", "public void teamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.teamA);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void ScoreTeamB(View view) {\n scoreteamB = scoreteamB +1;\n displayScoreB(scoreteamB);\n }", "public void displayForTeamK(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_k_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamV(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_v_score);\n scoreView.setText(String.valueOf(score));\n }", "private String getScore(){\n return whiteName + \" : \" + blackName + \" - \" + whiteScore + \" : \" + blackScore;\n }", "public void displayForPlayerB(int score) {\n scoreViewPlayerB.setText(String.valueOf(score));\n }", "public String toString () {\n return team1 + \" vs. \" + team2 + \": \" + score1 + \" to \" + score2;\n }", "private void showGameScore() {\n System.out.println(messageProvider.provideMessage(\"score\"));\n System.out.println(settings.getPlayers().get(0).getScore()\n + \" vs \" + settings.getPlayers().get(1).getScore());\n }", "private void displayTeamAScore(int num)\n {\n TextView scoreTextView = (TextView) findViewById(R.id.teamAScore);\n scoreTextView.setText(num +\"\");\n }", "private void printScore() {\r\n View.print(score);\r\n }", "public void displayForpoint_two(View view){\n score = score + 2;\n displayForTeamA(score);\n }", "public void ScoreTeamA(View view) {\n scoreteamA = scoreteamA +1;\n displayScoreA(scoreteamA);\n }", "@Override\n\tpublic void printScore() {\n\n\t}", "public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}", "public void showScore()\n {\n showText(\"Score:\" + score,550,50);\n }", "private void updateResultOnScreen() {\n teamAScoreTv.setText(Integer.toString(teamAScoreInt));\n teamBScoreTv.setText(Integer.toString(teamBScoreInt));\n\n if (teamAFoulScoreInt > 1)\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" fouls\");\n else\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" foul\");\n\n if (teamBFoulScoreInt > 1)\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" fouls\");\n else\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" foul\");\n }", "public void displayForPlayerA(int score) {\n scoreViewPlayerA.setText(String.valueOf(score));\n }", "public void addScoreForTeamB(View v) {\n scoreTeamB += 1;\n updateText(scoreTeamB, v);\n }", "public void Team_B_2_Points(View v) {\n teamBScore = teamBScore + 2;\n displayForTeamB(teamBScore);\n }", "public static List<String> getScoreDetails(final Match match){\n\t\tArrayList<String> scoreList = new ArrayList<String>(2);\n\t\tString scoreDisplay = \"\";\n\t\t\t\t\n\t\t// If a game has been played, get the card information\n\t\tif(match.getCurrentStatus() == MatchStatus.PLAYED){\n\t\t\tString strScoreDetails = \"\";\n\t\t\t// Check if the match went to penalties\n\t\t\tif(match.isPenalties()){\n\t\t\t\tstrScoreDetails = \"<b>(</b>\" + Escaper.htmlEscape(match.getHomeTeamPenalties()) + \"<b>)</b>\" +\n\t\t\t\tEscaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) +\n\t\t\t\t\"<b>(</b>\" + Escaper.htmlEscape(match.getAwayTeamPenalties()) + \"<b>)</b>\";\n\t\t\t}else{\n\t\t\t\tstrScoreDetails = Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore());\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Writing the actual score\n\t\tif(match.getCurrentStatus() == MatchStatus.NOT_YET_PLAYED)\n\t\t{\t\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\"> Vs </td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.PLAYED){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">\";\n\t\t\n\t\t\t// If the match went to penalties, then display it in the score\n\t\t\tif(match.isPenalties()){\n\t\t\t\tscoreDisplay = scoreDisplay + \"<b>(</b>\" + Escaper.htmlEscape(match.getHomeTeamPenalties()) + \"<b>)</b>\" + \n\t\t\t\tEscaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) + \"<b>(</b>\" +\n\t\t\t\tEscaper.htmlEscape(match.getAwayTeamPenalties()) + \"<b>)</b></td>\";\n\t\t\t}else{\n\t\t\t\tscoreDisplay = scoreDisplay + Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) +\"</td>\";\t\t\n\t\t\t}\n\t\t}else if (match.getCurrentStatus() == MatchStatus.CANCELLED){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">CANCELLED</td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.POSTPONED){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">POSTPONED</td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.FORFEIT){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">\" + Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) + \"*</td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.DOUBLE_FORFEIT){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">\" + Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) + \"**</td>\";\n\t\t}\n\t\t\n\t\t// Populate the array with the tooltip and the score\n\t\tscoreList.add(scoreDisplay);\n\t\treturn scoreList;\n\t}", "public void displayForpoint_one2(View view){\n score2 = score2 + 1;\n displayForTeamA2(score2);\n }", "public void bonusForTeamB(View v) {\n\n if (questionNumber <= 19) {\n\n scoreTeamB = scoreTeamB + 5;\n displayForTeamB(scoreTeamB);\n }\n\n\n }", "public void statistics(){\n System.out.println(this.scoreboard.toString());\n }", "public void displayYelowCardB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yelowcardBtext);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForpoint_one(View view){\n score = score + 1;\n displayForTeamA(score);\n }", "public void displayTriesForPlayerB(int score) {\n triesViewPlayerB.setText(String.valueOf(score));\n }", "float getScore();", "float getScore();", "void displayScore(){\n\t\tTextView yourScore = (TextView) findViewById (R.id.yourscore); \n String currentScoreText;\n currentScoreText = Integer.toString(currentScore);\n\t\tyourScore.setText(currentScoreText);\n\t\t\n\t}", "public void addScoreForTeamA(View v) {\n scoreTeamA += 1;\n updateText(scoreTeamA, v);\n }", "public void displayRedCardB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.redcardBtext);\n scoreView.setText(String.valueOf(score));\n }", "public void updateScoreboard() {\r\n \tif(parentActivity instanceof GameActivity) {\r\n \t\t((TextView)(((GameActivity)parentActivity).getScoreboard())).setText(\"\"+score);\r\n \t}\r\n }", "private void showScore() {\r\n View.show(score, this.getSize().width + 15, 0);\r\n }", "public String getScoreBoardText() {\n putListInPointOrder();\n String scoreText;\n StringBuilder sb = new StringBuilder();\n\n for (Player player : players)\n sb.append(player.toString() + \"\\n\");\n\n scoreText = sb.toString();\n return scoreText;\n }", "private void setResultsDisplay(double score) {\n TextView resultsTextView = (TextView) findViewById(R.id.results_text_view);\n String letterGrade = getLetterGrade(score);\n resultsTextView.setText(\"Your Grade: \" + letterGrade);\n }", "public void displayForpoint_two2(View view){\n score2 = score2 + 2;\n displayForTeamA2(score2);\n }", "public static String getScoreboard(List<Player> players) {\n // Team Rock Adam Points: 20\n // Team Paper Eve Points: 10\n // Team Scissors Abel Points: 5 DEAD\n\n throw new RuntimeException(\"Method not implemented!\");\n }", "void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }", "private void printOverallScore(\n Properties battleData, ScoringStyle scoringStyle) {\n double totalScore = 0;\n int totalBattles = 0;\n int scoredBotLists = 0;\n for (String botList : battleData.stringPropertyNames()) {\n String[] scores = battleData.getProperty(botList).split(\":\");\n double score = Double.parseDouble(scores[0]);\n totalScore += score;\n scoredBotLists++;\n totalBattles += Integer.parseInt(scores[5]);\n }\n int challengeBotLists = _config.challenge.referenceBots.size();\n System.out.println(\"Overall score: \" + round(totalScore / scoredBotLists, 2)\n + \", \" + round(((double) totalBattles) / challengeBotLists, 2)\n + \" seasons\");\n }", "public void displayYelowCardA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yelowCardAtext);\n scoreView.setText(String.valueOf(score));\n }", "@Override\n\tpublic void homeTeamScored(int points) {\n\t\t\n\t}", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }", "int getScore();", "private void showSpecificWobblyScore(MessageChannel channel) {\n int index = 0;\n try {\n index = Integer.parseInt(matchId) - 1;\n }\n catch(NumberFormatException e) {\n e.printStackTrace();\n }\n if(index < 0 || index > leaderboard.size() - 1) {\n channel.sendMessage(\"That's not a rank!\").queue();\n return;\n }\n WobblyScore score = leaderboard.get(index);\n Map map = score.getMap();\n\n EmbedBuilder entryEmbedBuilder = new EmbedBuilder()\n .setTitle(codManager.getGameName() + \" Wobbly Rank #\" + (index + 1))\n .setThumbnail(thumbnail)\n .setDescription(\"Use **\" + getTrigger() + \" wobblies** to view the full leaderboard.\")\n .addField(\"Name\", score.getPlayerName(), true)\n .addField(\"Date\", score.getDateString(), true)\n .addBlankField(true)\n .addField(\"Wobblies\", MatchPlayer.formatDistance(score.getWobblies(), \"wobblies\"), true)\n .addField(\"Metres\", MatchPlayer.formatDistance(score.getMetres(), \"metres\"), true)\n .addBlankField(true)\n .addField(\"Map\", score.getMap().getName(), true)\n .addField(\"Mode\", score.getMode().getName(), true)\n .addBlankField(true)\n .addField(\"Match ID\", score.getMatchId(), true)\n .setColor(EmbedHelper.PURPLE);\n\n if(map.hasImageUrl()) {\n entryEmbedBuilder.setImage(map.getImageUrl());\n }\n channel.sendMessage(entryEmbedBuilder.build()).queue();\n }", "public void displayForpoint_three2(View view){\n score2 = score2 + 3;\n displayForTeamA2(score2);\n }", "private void showScores() {\n levelNumber.setText(String.format(\"%s%d\", getResources().getString(R.string.level), level));\n Level l = Level.getLevel(level);\n for (int i = 0; i < Level.MAX_SCORES; i++) {\n Level.Player p = l.getPlayer(i);\n if (p != null) new ScoreTextView(i + 1, p.toString());\n }\n }", "Float getScore();", "public void displayRoundScore() {\n\n System.out.println(\"Round stats: \");\n System.out.println(\"Par: \" + parTotal);\n System.out.println(\"Strokes: \" + strokesTotal);\n\n if(strokesTotal > parTotal) {\n System.out.println(strokesTotal-parTotal + \" over par\\n\");\n } \n else if (strokesTotal < parTotal) {\n System.out.println(parTotal-strokesTotal + \" under par\\n\");\n }\n else {\n System.out.println(\"Making par\\n\");\n }\n }", "public static void update_scoreboard2(){\n\t\t//Update score\n\tif(check_if_wicket2){\n\t\t\n\t\twicket_2++;\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\telse{\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\ttempshot2=PlayArena2.usershot2;\n\t\tteam_score_2=team_score_2+PlayArena2.usershot2;\n\t\treq=req-tempshot2;\n\t\t}\n\t\telse{\n\t\t\ttempshot2=PlayArena2.compshot2;\n\t\t\tteam_score_2=team_score_2+PlayArena2.compshot2;\n\t\t\treq=req-tempshot2;\n\t\t\t}\n\t\tif(req<0)\n\t\t{\treq=0;}\n\t\t\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\t// Overs update\n\tif(over_ball_2==5){\n\t\tover_ball_2=0;\n\t\tover_overs_2++;\n\t\tover_totalballs_2--;\n\t}\n\telse{\n\t\tover_ball_2++;\n\tover_totalballs_2--;}\n\tupdate_overs2.setText(\"\"+over_overs_2+\".\"+over_ball_2+\" (\"+PlayMode.overs+\")\");\n\t\n\t//Check if_first_inning_over\n\tif(over_overs_2==Integer.parseInt(PlayMode.overs) || wicket_2==3 || PlayBrain1.team_score_1<team_score_2)\n\t\t\t{\n\t\tif_second_inning_over=true;\n\t\treference2.add(PlayArena2.viewscore2);\n\t\t\t}\n\t\n\t\n\t//Needed update\n\t\t\tupdate_runrate2.setText(\"<html>NEED<br>\"+req+\"<br>OFF<br>\"+over_totalballs_2+\" <br>BALLS</html>\");\n\t\t}", "long getScore();", "long getScore();", "long getScore();", "long getScore();", "private void displayScore(int score) {\n // Set a text view to show the score.\n TextView scoreView = findViewById(R.id.score_text_view);\n scoreView.setText(format(\" %d\", score));\n }", "public void winner() {\n\t\tList<String> authors = new ArrayList<String>(scores_authors.keySet());\n\t\tCollections.sort(authors, new Comparator<String>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\treturn scores_authors.get(o1).compareTo(scores_authors.get(o2));\n\t\t\t}\n\t\t});\n\t\tSystem.out.println(\"Score des auteurs :\");\n\t\tfor(String a :authors) {\n\t\t\tSystem.out.println(a.substring(0,5)+\" : \"+scores_authors.get(a));\n\t\t}\n\t\t\n\t\tList<String> politicians = new ArrayList<String>(scores_politicians.keySet());\n\t\tCollections.sort(politicians, new Comparator<String>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\treturn scores_politicians.get(o1).compareTo(scores_politicians.get(o2));\n\t\t\t}\n\t\t});\n\t\tSystem.out.println(\"Score des politiciens :\");\n\t\tfor(String p :politicians) {\n\t\t\tSystem.out.println(p.substring(0,5)+\" : \"+scores_politicians.get(p));\n\t\t}\n\t}", "public void plusOneTeamB (View view) {\r\n scoreB++;\r\n displayScoreForTeamB(scoreB);\r\n }", "@SuppressLint(\"SetTextI18n\")\r\n private void displayScore() {\r\n\r\n\r\n mFinalScore.setText(\"Final score: \" + mScore);\r\n mQuestionView.setVisibility(View.GONE);\r\n mOption1.setVisibility(View.GONE);\r\n mOption2.setVisibility(View.GONE);\r\n mOption3.setVisibility(View.GONE);\r\n mNext.setVisibility(View.GONE);\r\n mTimer.setVisibility(View.GONE);\r\n mScoreView.setVisibility(View.GONE);\r\n mTimerLabel.setVisibility(View.GONE);\r\n mBackToStart.setVisibility(View.VISIBLE);\r\n\r\n }", "public void addTwoPointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 2;\n displayTeamAScore(scoreTeamA);\n }", "public void addTwoPointsToTeamB(View view)\n {\n scoreTeamB = scoreTeamB + 2;\n displayTeamBScore(scoreTeamB);\n }", "public void updateScoreUI() {\n\t\tMap<Integer, Integer> scoreMap = gameLogic.getScoreboard().getTotalScore();\n\n\t\tlblScoreA.setText(String.valueOf(scoreMap.get(0)));\n lblScoreB.setText(String.valueOf(scoreMap.get(1)));\n lblScoreC.setText(String.valueOf(scoreMap.get(2)));\n lblScoreD.setText(String.valueOf(scoreMap.get(3)));\n\t}", "public void displayRedCardA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.redcardAtext);\n scoreView.setText(String.valueOf(score));\n }", "public String currentScore(){\n return points[player1Score] + \"-\" + points[player2Score];\n }", "private void drawScore() {\n\t\tString score = myWorld.getScore() + \"\";\n\n\t\t// Draw shadow first\n\t\tAssetLoader.shadow.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length()), 12);\n\t\t// Draw text\n\t\tAssetLoader.font.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length() - 1), 11);\n\n\t}", "public String countScore() {\n String str =\"\";\n System.out.println(\"Game has ended\");\n int playerOneCount = 0;\n int playerTwoCount = 0;\n System.out.println(\"this is size of computer board\" + player2.playerTwoDomino.size());\n System.out.println(\"this is size of boneyard \" + allElements.size());\n System.out.println(\"this is size of human board \" + human1.playerOneDomino.size());\n System.out.println(\"this is size of game board \" + gameBoard.size());\n for (int i = 0; i < human1.playerOneDomino.size(); i++) {\n playerOneCount = playerOneCount + human1.playerOneDomino.get(i).getX() + human1.playerOneDomino.get(i).getX();\n }\n for (int j = 0; j < player2.playerTwoDomino.size(); j++) {\n playerTwoCount = playerTwoCount + player2.playerTwoDomino.get(j).getX() + player2.playerTwoDomino.get(j).getY();\n }\n\n if (playerOneCount < playerTwoCount) {\n str = \"Winner is Human by \" + (playerTwoCount - playerOneCount) + \" points\";\n\n\n } else {\n str = \"Winner is Computer by \" + (playerOneCount - playerTwoCount) + \" points\";\n\n }\n\n return str;\n }", "public void Team_B_3_Points(View v) {\n teamBScore = teamBScore + 3;\n displayForTeamB(teamBScore);\n }", "public void testScoreboardCaseOneA() throws Exception{\n \n String [] runsData = {\n \"2,8,C,1,No\",\n \"15,8,D,1,Yes\",\n \"23,8,D,1,No\",\n \"29,8,D,1,No\",\n \"43,8,C,1,No\",\n \"44,8,A,1,Yes\",\n \"52,8,C,1,Yes\",\n \"65,8,B,2,Yes\",\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team8,4,45\",\n \"2,team1,0,0\",\n \"2,team2,0,0\",\n \"2,team3,0,0\",\n \"2,team4,0,0\",\n \"2,team5,0,0\",\n \"2,team6,0,0\",\n \"2,team7,0,0\",\n };\n \n scoreboardTest (8, runsData, rankData);\n }", "public void displayForpoint_three(View view){\n score = score + 3;\n displayForTeamA(score);\n }", "public static void scoreBoard(int scoreP1, int scoreP2)\n { \n System.out.println(\" ______________\");\n System.out.println(\"| *Scores* |\");\n System.out.println(\"|Player 1: \"+scoreP1+\" |\");\n System.out.println(\"|--------------|\"); \n System.out.println(\"|Player 2: \"+scoreP2+\" |\");\n System.out.println(\"|______________|\");\n \n }", "public void displayDBScores(){\n\t\tCursor c = db.getScores();\n\t\tif(c!=null) {\n\t\t\tc.moveToFirst();\n\t\t\twhile(!c.isAfterLast()){\n\t\t\t\tdisplayScore(c.getString(0),c.getInt(1));\n\t\t\t\tc.moveToNext();\n\t\t\t}\n\t\t\tc.close();\n\t\t}\n\t}", "public void printScore(PrintWriter out) {\n out.format(\"SCORE OF %d PLAYERS%n\", players.size());\n out.println(\"ID\\tCASH\\tTYPE\");\n \t\n // Cria uma lista com os jogadores\n \tList<Competitor> score = new ArrayList<Competitor>(players.keySet());\n\n \t// Ordena os jogadores com base no total de cash\n \tCollections.sort(score, new PlayerComparator());\n\n \t// Imprime os resultados\n \tfor(Competitor c : score) {\n \t\tout.format(\"%d.%d\\t%.2f\\t(%s)%n\", players.get(c).Type,\n players.get(c).Id, c.getTotalCash(),\n c.getClass().getSimpleName());\n \t}\n out.flush();\n }", "public int getScore() {return score;}", "public static void displayScore(final Quiz quiz) {\n // write your code here\n // to display the score\n // report using quiz object.\n if (getflag()) {\n return;\n }\n System.out.println(quiz.showReport());\n }", "public void updateScores() {\n\t\tscoreText.setText(\"Score: \" + ultraland.getScore());\n\t}", "public void showScore(int points) {\n sb.replace(0, sb.length() - 1, \"Score: \" + points);\n score.setText(sb.toString());\n }", "public void testScoreboardCaseTwo () throws Exception{\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"1,1,A,1,No\", // 20\n \"2,1,A,3,Yes\", // 3 (Minute points for 1st Yes count)\n \"3,1,A,5,No\", // 20 (a No on a solved problem)\n \"4,1,A,7,Yes\", // zero (only \"No's\" count)\n \"5,1,A,9,No\", // 20 (another No on the solved problem)\n \n \"6,1,B,11,No\", // zero (problem has not been solved)\n \"7,1,B,13,No\", // zero (problem has not been solved)\n \n \"8,2,A,30,Yes\", // 30 (Minute points for 1st Yes)\n \n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n\n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,1,23\",\n \"2,team2,1,30\",\n };\n \n // TODO when SA supports count all runs, replace rankData\n \n /**\n * Case 2 tests when all no runs are counted, the current SA\n * does not support this scoring method. The commented\n * rankData is the proper results\n */\n\n// Team 2 -- 30 <-- Team 2 is now winning with a lower score \n// Team 1 -- 63 (same database; different scoring method)\n \n// String [] rankData = {\n// \"1,team2,1,30\",\n// \"2,team1,1,63\",\n// };\n \n \n scoreboardTest (2, runsData, rankData);\n \n }", "public static void displayScoreCard(){\r\n\t\t\r\n\t\t try {\r\n\t\t\t \r\n\t\t\t //getting the connection\r\n\t\t\tstatement = connection.createStatement();\r\n\t\t\t\r\n\t\t\t//retriving the data from the database\r\n\t\t\t ResultSet results = statement.executeQuery(\"select * from \" + tableName);\r\n\t\t\t \r\n\t\t\t //Retrieves the Players_Name, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE and OUT_FRONT of this ResultSet object's columns. \r\n\t\t\t ResultSetMetaData rsmd = results.getMetaData();\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t System.out.println(\"\\t\\t\\t\\t Fort Cherry Golf Course\");\r\n\t\t\t // print the names of the above the table\r\n\t\t\t int numberCols = rsmd.getColumnCount();\r\n\t\t\t for (int i=1; i<=numberCols; i++) \r\n\t\t\t {\r\n\t\t\t // extract each column name from the meta data and print them\r\n\t\t\t System.out.print(rsmd.getColumnLabel(i)+\"\\t\"); \r\n\t\t\t }\r\n\r\n\t\t\t //simply printing the line\r\n\t\t\t System.out.println(\"\\n--------------------------------------------------------------------------------------------------\");\r\n\t\t\t \r\n\t\t\t // Reteriving all data one by one from the data base\r\n\t\t\t while(results.next())\r\n\t\t\t {\r\n\t\t\t String players_Name = results.getString(1);\r\n\t\t\t int ONE = results.getInt(2);\r\n\t\t\t int TWO = results.getInt(3);\r\n\t\t\t int THREE = results.getInt(4);\r\n\t\t\t int FOUR = results.getInt(5);\r\n\t\t\t int FIVE = results.getInt(6);\r\n\t\t\t int SIX = results.getInt(7);\r\n\t\t\t int SEVEN = results.getInt(8);\r\n\t\t\t int EIGHT = results.getInt(9);\r\n\t\t\t int NINE = results.getInt(10);\r\n\t\t\t int OUT_FRONT = results.getInt(11);\r\n\t\t\t \r\n\t\t\t //printing the retrive data to the console\r\n\t\t\t System.out.println(players_Name + \"\\t\" + ONE + \"\\t\" + TWO + \"\\t\" + THREE + \"\\t\" + FOUR + \"\\t\" + FIVE + \"\\t\" + SIX + \"\\t\" + SEVEN + \"\\t\" + EIGHT + \"\\t\" + NINE + \"\\t\" + OUT_FRONT);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t //closing the resultset and the statement\r\n\t\t\t results.close();\r\n\t\t\t statement.close();\r\n\t\t\t \r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public int getScore() { return score; }" ]
[ "0.8044295", "0.8044295", "0.8019222", "0.8010914", "0.8010914", "0.8010914", "0.8010914", "0.79035956", "0.78289497", "0.7810733", "0.7810733", "0.7798979", "0.7794662", "0.7775178", "0.7775178", "0.7775178", "0.7775178", "0.7775178", "0.76960033", "0.76955616", "0.7633819", "0.7584595", "0.75546974", "0.75476736", "0.7288481", "0.72092193", "0.7204382", "0.7097968", "0.7088078", "0.70825666", "0.7079185", "0.70638347", "0.7035481", "0.7003307", "0.6997892", "0.6957532", "0.69477457", "0.69183445", "0.6841408", "0.6803934", "0.67702746", "0.6764485", "0.6761248", "0.67488134", "0.674725", "0.67418194", "0.6733116", "0.6726474", "0.6718391", "0.6709654", "0.6709654", "0.66484106", "0.6626283", "0.66209865", "0.66140014", "0.6609955", "0.6601646", "0.6577236", "0.6562075", "0.6550674", "0.6538819", "0.6524335", "0.6520471", "0.65037555", "0.6498938", "0.6494634", "0.64888704", "0.64840364", "0.64590967", "0.6453829", "0.6453516", "0.6440002", "0.643582", "0.643582", "0.643582", "0.643582", "0.64323694", "0.6419577", "0.63994324", "0.6395587", "0.6387319", "0.63791007", "0.6365071", "0.63576984", "0.63501", "0.63480324", "0.63451093", "0.63438", "0.6338724", "0.63326585", "0.63301367", "0.6328392", "0.6307559", "0.6304679", "0.6303971", "0.62959576", "0.629457", "0.6294365", "0.62939304", "0.6293127" ]
0.79700243
7
Method used to display the Foul for Team B
public void displayFoulb (int foul){ TextView foulA = (TextView)findViewById(R.id.team_b_foul); foulA.setText(String.valueOf(foul)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayFoulsForTeamB(int fouls) {\n TextView foulsView = findViewById(R.id.team_b_fouls);\n foulsView.setText(String.valueOf(fouls));\n }", "public void displayFoulsForTeamB(int fouls) {\r\n TextView foulsView = (TextView) findViewById(R.id.team_b_fouls);\r\n foulsView.setText(String.valueOf(fouls));\r\n }", "public void displayFoulsForTeamA(int foul) {\n TextView foulsView = findViewById(R.id.team_a_fouls);\n foulsView.setText(String.valueOf(foul));\n }", "public void displayFoulsForTeamA(int fouls) {\r\n TextView foulsView = (TextView) findViewById(R.id.team_a_fouls);\r\n foulsView.setText(String.valueOf(fouls));\r\n }", "public void displayFoulA (int foul){\n\n TextView foulA = (TextView)findViewById(R.id.team_a_foul);\n foulA.setText(String.valueOf(foul));\n }", "private void show() {\n System.out.println(team.toString());\n }", "public void FoulTeamB(View view) {\n foulteamB = foulteamB + 1;\n displayFoulb(foulteamB);\n }", "private void displayTeams() {\n SwapTeamMembersController.calculateTeamConstraints();\n System.out.println(\"\\nTeams formed are:\");\n for (Team team: Team.allTeams) {\n System.out.println(Constraint.ANSI_GREEN + \"\\nThe team ID\\t\\t\\t\\t: \" + team.getTeamID() + Constraint.ANSI_RESET +\n \"\\nThe Project Assigned\\t: \" + team.getProjectAssigned().getProjectId() + \": \" + team.getProjectAssigned().getProjectTitle() +\n \"\\nThe team's fitness is\\t: \" + team.getTeamFitness());\n System.out.print(\"\\nThe Students IDs of students in this team are: \\n\");\n for (Student student: team.getStudentsInTeam()) {\n System.out.print(student.getId() + \"\\tName: \" + student.getFirstName() + \"\\t\\tGender : \" + student.getGender() + \"\\t\\tExperience : \" + student.getExperience() + \" years\\n\");\n }\n int j = 1;\n System.out.println(\"\\nConstraints met are (with weightage):\");\n for (Constraint c: team.getConstraintsMet()) {\n System.out.println(j + \". \" + c.getConstraintDescription() + \"\\t: \" + c.getWeightAge());\n j++;\n }\n }\n }", "private static void displayUserTeam() {\n\t\tif (game.getCurrentRound()==1) {\n\t\t\tfor (int i = 0; i<11; i++) {\n\t\t\t\tplayerNameArray[i].setText(\"Name\");\n\t\t\t\timageArray[i].setIcon(MainGui.getShirt(\"noTeam\"));\n\t\t\t\tbuttonArray[i].setText(\"+\");\n\t\t\t}\n\t\t}\n\t}", "public static void displayTeams(Team t)\n {\n String teams = t.name + \":\\n\" + t + \"\\n\";\n teams += \"\\n\" + t.enemyTeam.name + \":\\n\" + t.enemyTeam + \"\\n\";\n teams += \"\\nSelect OK when you are ready to choose a Fighter.\";\n JOptionPane.showMessageDialog(null, teams);\n }", "public void plusFoulTeamB (View view) {\r\n foulsB++;\r\n displayFoulsForTeamB(foulsB);\r\n }", "public void cmdShowTeam(User teller, Team team) {\n Formatter msg = new Formatter();\n msg.format(\" Team %s:\\\\n\", team.getTeamCode());\n msg.format(\" %4s: %s\\\\n\", \"Name\", team.getRealName());\n msg.format(\" %4s: %s\\\\n\", \"Loc.\", team.getLocation());\n msg.format(\" %4s: %s\\\\n\", \"Web \", team.getWebsite());\n msg.format(\" %4s: %s\\\\n\", \"Div \", team.getDivision());\n msg.format(\" Team Members:\\\\n\");\n int indent = 0;\n for (Player player : team.getPlayers()) {\n int len = player.getHandle().length();\n if (len > indent) {\n indent = len;\n }\n }\n String fmt = \" %s\\\\n\";\n for (Player player : team.getPlayers()) {\n msg.format(fmt, player);\n }\n command.qtell(teller, msg);\n }", "@Override\n protected void display() {\n System.out.println(\"Welcome to team builder tool!\");\n System.out.println(\"Current team: \" + team.getName());\n }", "public void addFaltasTeamB(View view) {\n faltasTeamB = faltasTeamB + 1;\n displayFaltasTeamB(faltasTeamB);\n }", "public void printTeamsInLeague(){\n for (T i : teams){\n System.out.println(i.getTeamName());\n }\n }", "public static void printTeamInfo(Team team) {\n String leftAlignFormat = \"| %-20s | %-20s | %-20s | %-20s |%n\";\n System.out.println(CYAN + \"\\n\\tTeam: \" + team.getName() + RESET);\n printTeamTableHeader(leftAlignFormat, team.getHeroes());\n printTeamMemberInfo(leftAlignFormat, team.getHeroes());\n }", "public FightTeam team();", "public void printSummary(Team team){\r\n\t\tfor(Player player : team.getPlayers()){\r\n\t\t\tif(player.isOut() == true){\r\n\t\t\t\tthis.addCommentary(player.getName()+\" : \"+player.getRuns()+\" (\"+player.getBalls()+\" Balls)\\n\");\r\n\t\t\t}else if(player.isY2B() == true){\r\n\t\t\t\tthis.addCommentary(player.getName()+\" : DNB\\n\");\r\n\t\t\t}else{\r\n\t\t\t\tthis.addCommentary(player.getName()+\" : \"+player.getRuns()+\"* (\"+player.getBalls()+\" Balls)\\n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tthis.addCommentary(\"\\n\");\r\n\t}", "public void FoulTeamA(View view) {\n foulteamA = foulteamA + 1;\n displayFoulA(foulteamA);\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"[\" + teamNo + \"] \" + name;\r\n\t}", "private void displayTeamBScore(int num)\n {\n TextView scoreTextView = (TextView) findViewById(R.id.teamBScore);\n scoreTextView.setText(num +\"\");\n }", "private void showMatch() {\n System.out.println(\"Player 1\");\n game.getOne().getField().showField();\n System.out.println(\"Player 2\");\n game.getTwo().getField().showField();\n }", "public String getProjectTeamName(){\n return \"The name of the project of this researcher is \"+\n name_of_project_team +\n \"\\n*******\\n\";\n }", "public void displayForTeamA2(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score2);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "public void plusFoulTeamA (View view) {\r\n foulsA++;\r\n displayFoulsForTeamA(foulsA);\r\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"View all teams\");\n\t\tSystem.out.println(teamData.viewTeams());\n\t\t\n\t\tSystem.out.println(\"Search by conference\");\n\t\tSystem.out.println(teamData.searchConference(\"AFC\"));\n\t\tSystem.out.println(teamData.searchConference(\"NFC\"));\n\t\t\n\t\tSystem.out.println(\"Search by division\");\n\t\tSystem.out.println(teamData.searchDivision(\"NFC\", \"West\"));\n\t\tSystem.out.println(teamData.searchDivision(\"NFC\", \"East\"));\n\t\t\n\t\tSystem.out.println(\"View team roster\");\n\t\tSystem.out.println(teamData.viewTeamRoster(\"Bears\"));\n\t\tSystem.out.println(teamData.viewTeamRoster(\"Cowboys\"));\n\t\t\n\t\tSystem.out.println(\"List player data\");\n\t\tSystem.out.println(teamData.listPlayer(\"Romo\", \"Cowboys\"));\n\t\tSystem.out.println(teamData.listPlayer(\"Brady\", \"Patriots\"));\n\t\t\n\t\tSystem.out.println(\"List all match results\");\n\t\t//System.out.println(teamData.readMatchData()); //lists all match results for all weeks\n\t\t\n\t\tSystem.out.println(\"List match results by week\");\n\t\tSystem.out.println(teamData.viewMatchWeek(\"Week 5\"));\n\t\t\n\t\tSystem.out.println(\"View single team's match data\");\n\t\tSystem.out.println(teamData.viewMatchByTeam(\"Falcons\"));\n\t\tSystem.out.println(teamData.viewMatchByTeam(\"Cowboys\"));\n\t\t\n\t\tSystem.out.println(\"View Head to Head (team vs team)\");\n\t\tSystem.out.println(teamData.viewH2H(\"Patriots\", \"Dolphins\"));\n\t\tSystem.out.println(teamData.viewH2H(\"Panthers\", \"Eagles\"));\n\t\t\n\t\tSystem.out.println(\"View specific team wins\");\n\t\tSystem.out.println(teamData.viewTeamWins(\"Panthers\"));\n\t\t\n\t\tSystem.out.println(\"View specific team loses\");\n\t\tSystem.out.println(teamData.viewTeamLoses(\"Titans\"));\n\t\t\n\t\t//Haven't tested this fully\n\t\t//System.out.println(teamData.getTeamImage(\"Cowboys\"));\n\t}", "public void printAllResults(){\n String round = \"Rounds: \\t\\t\";\n String team1 = fight_list.get(0).t1.name + \"\\t\\t\"; //note: We assume that all the FightResults in 1 DataBag all have the same 2 teams. Gotta write that better later.\n String team2 = fight_list.get(0).t2.name + \"\\t\\t\";\n\n for(FightResult fig : this.fight_list){\n round += fig.final_round + \"\\t\";\n team1 += fig.t1_deaths + \"\\t\";\n team2 += fig.t2_deaths + \"\\t\";\n }\n\n System.out.println(round);\n System.out.println(team1);\n System.out.println(team2);\n\n //System.out.println(\"\\n--------\\n\");\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "@Override\n\tpublic String toString() {\n\t\treturn teamName;\n\t}", "public String toString () {\n return team1 + \" vs. \" + team2 + \": \" + score1 + \" to \" + score2;\n }", "private static String formatFamily (FamilyCard fc) {\n\t\tString res = \"\";\n\n\t\tFamilyHeadGuest fhg = fc.getCapoFamiglia();\n\t\tres += FamilyHeadGuest.CODICE;\n\t\tres += DateUtils.format(fc.getDate());\n\t\tres += String.format(\"%02d\", fc.getPermanenza());\n\t\tres += padRight(fhg.getSurname().trim().toUpperCase(),50);\n\t\tres += padRight(fhg.getName().trim().toUpperCase(),30);\n\t\tres += fhg.getSex().equals(\"M\") ? 1 : 2;\n\t\tres += DateUtils.format(fhg.getBirthDate());\n\n\t\t//Setting luogo et other balles is a bit more 'na rottura\n\t\tres += formatPlaceOfBirth(fhg.getPlaceOfBirth());\n\n\t\tPlace cita = fhg.getCittadinanza(); //banana, box\n\t\tres += cita.getId();\n\n\t\tres += fhg.getDocumento().getDocType().getCode();\n\t\tres += padRight(fhg.getDocumento().getCodice(),20);\n\t\tres += fhg.getDocumento().getLuogoRilascio().getId();\n\t\t//Assert.assertEquals(168,res.length()); //if string lenght is 168 we are ok\n\t\tres += \"\\r\\n\";\n\n\t\tfor (FamilyMemberGuest fmg : fc.getFamiliari()){\n\t\t\tres += formatFamilyMember(fmg, fc.getDate(), fc.getPermanenza());\n\t\t\t//res += \"\\r\\n\";\n\t\t}\n\n\t\treturn res;\n\t}", "@Override\n public String toString() {\n return \"I am a footballer. I play for \" + team +\n \", and my position is \" + position + \".\";\n }", "public void showFitaMT(List<Simbolo> fitaMT) { \r\n final int tamFita = fitaMT.size();\r\n pLabels.removeAll();\r\n //pLabels.setLayout(new java.awt.GridLayout(1, tamFita));\r\n pLabels.setLayout(new java.awt.GridLayout(1, 1));\r\n \r\n pLabels.add(createLabel('<'));\r\n for(Simbolo s : fitaMT)\r\n if(Character.isLetterOrDigit(s.getNome()))\r\n pLabels.add(createLabel(s.getNome())); \r\n pLabels.add(createLabel('\\u03B2'));\r\n pLabels.add(createLabel('\\u03B2'));\r\n pLabels.add(createLabel('\\u03B2'));\r\n \r\n setVisible(true); \r\n \r\n }", "public void fight(Team otherteam) {\n\t\tString aTeamCaptainName = this.captain.getName();\t//호출한 메서드\n\t\tString bTeamCaptainName = otherteam.captain.getName();\n\t\tSystem.out.println(aTeamCaptainName+\"과 \"+ bTeamCaptainName+\"이 싸운다\");\n\t\t\n\t}", "public String displayFamilyMembers() {\n int i = 1;\n StringBuilder ret = new StringBuilder();\n for (FamilyMember fam : this.famMemberList) {\n ret.append(i + \".\" + \" \" + fam.getSkinColour() + \" -> \" + fam.getActionValue());\n ret.append(\" | \");\n i++;\n }\n return ret.toString();\n }", "public void Blueprint(){\r\n System.out.println(\"House features:\\nSquare Footage - \" + footage + \r\n \"\\nStories - \" + stories + \"\\nBedrooms - \" + bedrooms + \r\n \"\\nBathrooms - \" + bathrooms + \"\\n\");\r\n }", "private void printMatch(){\n nameHomelbl.setText(match.getHomeTeam().getName());\n cittaHomelbl.setText(match.getHomeTeam().getCity());\n nameGuestlbl.setText(match.getGuestTeam().getName());\n cittaGuestlbl.setText(match.getGuestTeam().getCity());\n if(match.getPlayed()) {\n pointsHometxt.setText(String.valueOf(match.getPointsHome()));\n pointsGuesttxt.setText(String.valueOf(match.getPointsGuest()));\n } else {\n pointsHometxt.setText(\"-\");\n pointsGuesttxt.setText(\"-\");\n }\n \n try{\n logoGuestlbl.setIcon(new ImageIcon(ImageIO.read(new File(match.getGuestTeam().getLogo())).getScaledInstance(200, 200, Image.SCALE_SMOOTH)));\n logoHomelbl.setIcon(new ImageIcon(ImageIO.read(new File(match.getHomeTeam().getLogo())).getScaledInstance(200, 200, Image.SCALE_SMOOTH)));\n \n } catch (IOException ex){\n System.out.println(\"immagine non esistente\");\n JOptionPane.showMessageDialog(null, \"immagine non esistente\");\n }\n }", "public void displayGame()\n { \n System.out.println(\"\\n-------------------------------------------\\n\");\n for(int i=3;i>=0;i--)\n {\n if(foundationPile[i].isEmpty())\n System.out.println(\"[ ]\");\n else System.out.println(foundationPile[i].peek());\n }\n System.out.println();\n for(int i=6;i>=0;i--)\n {\n for(int j=0;j<tableauHidden[i].size();j++)\n System.out.print(\"X\");\n System.out.println(tableauVisible[i]);\n }\n System.out.println();\n if(waste.isEmpty())\n System.out.println(\"[ ]\");\n else System.out.println(waste.peek());\n if(deck.isEmpty())\n System.out.println(\"[O]\");\n else System.out.println(\"[X]\");\n }", "public void vsTeamCarRaceMem1(Team aTeam, Team bteam) {\n\t\tString at = aTeam.member1.getK7().getModelName();\n\t\tString bt = bteam.member1.getK7().getModelName();\n\t\tSystem.out.println(at +\" vs \"+ bt);\n\t\t\n\t}", "public void display() {\r\n String kind;\r\n if (profit == true) {\r\n kind = \"profit\";\r\n }\r\n\r\n else kind = \"non-profit\";\r\n System.out.println(name + \" is a \" + kind + \" organization that has\" + \" \" + revenue + \" dollars in revenue\" );\r\n }", "public String getStatsOfTeams(){\n\n String res = \"\";\n\n if (teams.size() <= 0){\n return \"No team registered in tournament\";\n }\n\n for(int num=0; num<teams.size(); num++)\n {\n SoccerTeam team = teams.get(num);\n res += team.toString() + \"\\n\";\n }\n return res;\n }", "public void fightMem1(Team otherTeam) {\n\t\tString aTeamMember1 = this.member1.getName();\n\t\tString bTeamMember1 = otherTeam.member1.getName();\n\t\tSystem.out.println(aTeamMember1+ \"과 \"+ bTeamMember1+ \"이 싸웁니다.\");\n\t\t\n\t}", "public String getHomeTeam();", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_bb_score);\n scoreView.setText(String.valueOf(score));\n }", "public void bFieldGoal(View view) {\n scoreTeamB = scoreTeamB + 3;\n displayForTeamB(scoreTeamB);\n }", "public String getAwayTeam();", "public String getTeamStatus(){\n int i;\n StringBuilder s = new StringBuilder();\n\n s.append(employeeStatus());\n if(this.curHeadCount <= 0)\n s.append(\" and no direct reports yet\");\n else {\n s.append(\" and is managing:\");\n for(i=0;i<this.curHeadCount;i++){\n s.append(\"\\n\");\n s.append(this.employee[i].employeeStatus());\n }\n }\n\n return s.toString();\n }", "public void addFaltasTeamA(View view) {\n faltasTeamA = faltasTeamA + 1;\n displayFaltasTeamA(faltasTeamA);\n }", "public static void main(String[] args) {\n\t\tteam t = new team(\"빵그래\",20,17);\n\t\tt.showCur();\n\t\t/*\n\t\t * 객체배열\n\t\t * 1. 객체배열 크기선언\n\t\t * \t객체[] 객체배열 =new person[5]; //5개 person객체가 들어갈 수 있는 배열\n\t\t * 2. 객체배열 선언, 할당\n\t\t * ex)person[] p = {new person(\"하이맨\"),new person(\"하이맨2\"),new person(\"하이맨3\")}\n\t\t * 3. 객체배열의 통한 메서드 활용\n\t\t * for(int idx=0; idx<p.lenght;idx++){\n\t\t * \tp[idx].printAll(); //특정 배열 객체 내부에 있는 객체한개의 메서드 활용\n\t\t * }\n\t\t * for(person ps:p){\n\t\t * \tp.printAll();\n\t\t * \t}\n\t\t */\n\t\tteam[] tArray01 = new team[3];\n\t\ttArray01[0] = new team(\"두산베어즈\",21,18);\n\t\ttArray01[1] = new team(\"넥센자이언트\",19,18);\n\t\ttArray01[2] = new team(\"기아타이거\",17,14);\n\t\tfor(team tm:tArray01){\n\t\t\ttm.showCur();\n\t\t}\n\t\tteam[] tArray02 = {new team(\"LA다져스\",30,10),\n\t\t\t\t\t\t new team(\"요미우리 자이언츠\",5,27),\n\t\t\t\t\t\t new team(\"삼성라이온즈\",12,16),\t\t\t\n\t\t\t\t\t\t\t};\n\t\tfor(int idx=0; idx<tArray02.length;idx++){\n\t\t\ttArray02[idx].showCur();\n\t\t}\n\t\t\n\n}", "public void displayForTeamA(int scoreA) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(scoreA));\r\n }", "public void displayScoreForTeamB(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void display(){\r\n System.out.println(\"The Vacancy Number is : \" + getVacancyNumber());\r\n System.out.println(\"The Designation is : \" + getDesignation());\r\n System.out.println(\"The Job Type is : \" + getJobType());\r\n }", "private void showResult() {\n int i = 0;\n matchList.forEach(match -> match.proceed());\n for (Match match : matchList) {\n setTextInlabels(match.showTeamWithResult(), i);\n i++;\n }\n }", "public void display()\n {\n System.out.println(name);\n System.out.println(status);\n if (friendslist.size ==0){\n System.out.println(\"User has no friends :(\");\n for(String i: friendslist.size){\n System.out.println(friendslist.get(i));\n }\n }\n }", "public void showStatus(Character fighter1, Character fighter2, int health1, int health2) {\n System.out.println();\n System.out.println(\"------------------------------\");\n System.out.println(String.format(\"%-15s%15s\\n%-15d%15d\", fighter1.getName(), fighter2.getName(), health1, health2));\n System.out.println(\"------------------------------\");\n System.out.println();\n }", "protected abstract void gatherTeam();", "public void printBattleField(boolean isThisAttacker, BattleField battleField) {\n BattleShipHelper helper = new BattleShipHelper();\n Shot[] shots = battleField.getShots();\n int k = 0;\n\n for (int i = 0; i < 10; i++) {\n if (i == 0)\n System.out.print(\" \");\n System.out.print(i + \".\\t\");\n }\n\n System.out.println(\"\\n ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\");\n for (int i = 0; i < 10; i++) {\n System.out.print(i + \". \");\n for (int j = 0; j < 10; j++) {\n k = battleField.getIndexOfShot(j, i);\n if(((battleField.getIndexOfShip(j, i) != -1) && shots[k].getHit() && helper.isThisDestroyedShip(battleField.getIndexOfShip(j, i), battleField)) ||\n (isThisAttacker && (battleField.getIndexOfShip(j, i) != -1) && shots[k].getHit())) {\n System.out.print(\"\\u2588\\t\");\n } else if(battleField.getIndexOfShip(j, i) != -1){\n if(shots[k].getHit() || isThisAttacker) {\n System.out.print(\"\\u2592\\t\");\n } else {\n System.out.print(\"\\u25AB\\t\");\n }\n } else if((shots[k].getHit()) && (battleField.getIndexOfShip(j, i) == -1)) {\n System.out.print(\"\\u25AA\\t\");\n } else {\n System.out.print(\"\\u25AB\\t\");\n }\n }\n System.out.println(\"\\n ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\");\n }\n }", "private void displayBedrijf(){\n if (this.geselecteerdeStageplaats.getBedrijfID() != null){\n this.jTextFieldBedrijfsnaam.setText(this.geselecteerdeStageplaats.getBedrijfID().getNaam());\n this.jTextFieldContactpersoon.setText(this.geselecteerdeStageplaats.getBedrijfID().getContactNaam());\n this.jTextFieldEmail.setText(this.geselecteerdeStageplaats.getBedrijfID().getContactEmail());\n this.jTextAreaActiviteiten.setText(this.geselecteerdeStageplaats.getBedrijfID().getActiviteiten());\n this.jTextAreaAanwervend.setText(this.geselecteerdeStageplaats.getBedrijfID().getAanwervend());\n \n this.jTextFieldStraat.setText(this.geselecteerdeStageplaats.getBedrijfID().getStraat());\n this.jTextFieldNummer.setText(this.geselecteerdeStageplaats.getBedrijfID().getNummer());\n this.jTextFieldPostcode.setText(this.geselecteerdeStageplaats.getBedrijfID().getPostcode());\n this.jTextFieldStad.setText(this.geselecteerdeStageplaats.getBedrijfID().getStad());\n this.jTextFieldLand.setText(this.geselecteerdeStageplaats.getBedrijfID().getLand());\n }\n }", "public void printCurrentBattlers() {\n //System.out.println(\"Char hp: \" + character.getCurrHP());\n System.out.printf(\"battle Allies: \");\n for (MovingEntity e: battleAllies) {\n System.out.printf(\"%s \",e.getID());\n }\n System.out.printf(\"\\n\");\n\n System.out.printf(\"battle Enemies: \");\n for (MovingEntity e: battleEnemies) {\n if (e.getBattleBehaviour() instanceof ZombieBattleBehaviour) {\n System.out.printf(\"Z\");\n }\n System.out.printf(\"%s \",e.getID());\n }\n System.out.printf(\"\\n\");\n }", "public void display() {\n String box = \"\\n+--------------------------------------------+\\n\";\n String header = \"| \" + name;\n String lvlStat = \"Lv\" + level;\n for (int i=0; i<42-name.length()-lvlStat.length(); i++) {\n header += \" \";\n }\n header += lvlStat + \" |\\n\";\n System.out.println(box + header + \"| \" + getHealthBar() + \" |\" + box);\n }", "public void addSixForTeamB(View v) {\n scoreTeamB = scoreTeamB + 6;\n displayForTeamB(scoreTeamB);\n }", "public void Team_B_Freethrow(View v) {\n teamBScore = teamBScore + 1;\n displayForTeamB(teamBScore);\n }", "@Override //TODO\n public String toString() {\n String s = \"\";\n s += name + \" \";\n for(Pokemon p : team)\n s += p + \"\\n\";\n return s;\n }", "@Override\n public String getTeam(){\n return this.team;\n }", "private void displayChampionshipDetails()\n {\n displayLine();\n System.out.println(\"########Formula 9131 Championship Details########\");\n displayLine();\n System.out.println(getDrivers().getChampionshipDetails());\n }", "public void displayForpoint_two(View view){\n score = score + 2;\n displayForTeamA(score);\n }", "public List<PlayerTeam> display6() {\n List<PlayerTeam> l = new List<PlayerTeam>();\n List<PlayerTeam> all = build();\n int max = 0;\n PlayerTeam curr = all.first();\n while (curr != null) {\n int c = curr.getWinninggoals();\n if (c > max) {// if is a new maximum value, empty the list\n l.clear();\n l.add(curr);\n max = c;\n } else if (c == max) { // if there are more than one maximum value,\n // add it\n l.add(curr);\n }\n curr = all.next();\n }\n return l;\n }", "public void showPortfolio(){\n System.out.println(\"PORTFOLIO CONTENTS\");\n for(int i = 0; i < this.projects.size(); i++){\n System.out.println(this.projects.get(i).elevatorPitch());\n }\n System.out.println(\"Total Portfolio Cost: $\" + this.getPortfolioCost());\n }", "public void addOnePointToTeamB(View view)\n {\n scoreTeamB++;\n displayTeamBScore(scoreTeamB);\n }", "private void displayTeamB_score(int score) {\n TextView teamB_scoreView = findViewById(R.id.teamB_score_textView);\n teamB_scoreView.setText(String.valueOf(score));\n }", "public void teamChange() {\n if (teamCombobox.getValue().getTeamLogo() != null) {\n teamPhoto.setImage(teamCombobox.getValue().getTeamLogo().getImage());\n }\n teamCode.setText(\"Team code : \" + teamCombobox.getValue().getTeamCode());\n }", "@Override\r\n//displays the property of defensive players to console\r\npublic String toString() {\r\n\t\r\n\tdouble feet = getHeight()/12;\r\n\tdouble inches = getHeight()%12;\r\n\t\r\n\treturn \"\\n\" + \"\\nDefensive Player: \\n\" + getName() \r\n\t+ \"\\nCollege: \" + getCollege() \r\n\t+ \"\\nHighschool: \" + getHighschool() \r\n\t+ \"\\nAge: \" + getAge() \r\n\t+ \"\\nWeight: \" + getWeight() \r\n\t+ \"\\nHeight: \" + feet + \" ft\" + \" \" + inches + \" in\" \r\n\t+ \"\\nTeam Number: \" + getNumber() \r\n\t+ \"\\nExperience: \" + getExperience()\r\n\t+ \"\\nTeam: \" + getTeam() \r\n\t+ \"\\nPosition: \" +getPosition() \r\n\t+ \"\\nTackles : \" + getTackles() \r\n\t+ \"\\nSacks: \" +getSacks() \r\n\t+ \"\\nInterceptions: \" + getInterceptions();\r\n}", "public static void updateTeamPanels(Team team1, Team team2){\n team1Panel.clear();\n team2Panel.clear();\n tournament.clearPendingWinningTeam();\n\n // Set titles equal to team names\n team1Panel.setTitle(team1.teamName);\n team2Panel.setTitle(team2.teamName);\n\n // Start with team name\n Label team1Label = new Label(team1.teamName);\n team1Label.addStyleName(\"big-text\");\n\n Label team2Label = new Label(team2.teamName);\n team2Label.addStyleName(\"big-text\");\n\n team1Panel.add(team1Label);\n team2Panel.add(team2Label);\n\n StringBuilder team1HTML = new StringBuilder();\n StringBuilder team2HTML = new StringBuilder();\n\n team1HTML.append(\"<ul class=\\\"list-group\\\">\");\n team2HTML.append(\"<ul class=\\\"list-group\\\">\");\n\n // Iterate through players on each team and list them below the team name\n for (Player player : team1.values()){\n team1HTML.append(\"<li class=\\\"list-group-item\\\">\").append(player.getSummonerName()).append(\"</li>\");\n }\n for (Player player : team2.values()){\n team2HTML.append(\"<li class=\\\"list-group-item\\\">\").append(player.getSummonerName()).append(\"</li>\");\n }\n\n team1HTML.append(\"</ul>\");\n team2HTML.append(\"</ul>\");\n\n HTMLPanel team1HTMLPanel = new HTMLPanel(team1HTML.toString());\n HTMLPanel team2HTMLPanel = new HTMLPanel(team2HTML.toString());\n\n team1Panel.add(team1HTMLPanel);\n team2Panel.add(team2HTMLPanel);\n\n Button team1button = new Button(\"Select team as winner\", team1SelectorHandler);\n Button team2button = new Button(\"Select team as winner\", team2SelectorHandler);\n\n team1button.addStyleName(\"btn btn-default\");\n team2button.addStyleName(\"btn btn-default\");\n\n team1Panel.add(team1button);\n team2Panel.add(team2button);\n\n }", "int getTeam();", "public void Team_B_2_Points(View v) {\n teamBScore = teamBScore + 2;\n displayForTeamB(teamBScore);\n }", "private void updateResultOnScreen() {\n teamAScoreTv.setText(Integer.toString(teamAScoreInt));\n teamBScoreTv.setText(Integer.toString(teamBScoreInt));\n\n if (teamAFoulScoreInt > 1)\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" fouls\");\n else\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" foul\");\n\n if (teamBFoulScoreInt > 1)\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" fouls\");\n else\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" foul\");\n }", "public void bonusForTeamB(View v) {\n\n if (questionNumber <= 19) {\n\n scoreTeamB = scoreTeamB + 5;\n displayForTeamB(scoreTeamB);\n }\n\n\n }", "public void displayLeaderCards() {\n int i = 1;\n for (LeaderCard card : leaderCards) {\n String toDisplay = i + \" \" + card.getName() + \" -> cost: \" +\n card.getActivationCost() +\" : \" + card.getCardCostType();\n if (card.isActivated()) {\n toDisplay += \" activated\";\n }\n this.sOut(toDisplay);\n i++;\n }\n }", "public String getTeam() {\n return team;\n }", "void display()\r\n\t{\r\n\t\tSystem.out.println(\"bikeid=\"+bikeid+\" bike name==\"+bikename);\r\n\t}", "private void setTeamInfo_Blue2() {\n blueTeamNumber2.setText(fixNumTeam(blueTeamNumber2.getText(), \"Blue 2\"));\n\n blueTeamNumber2.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.BLUE, FieldAndRobots.TWO,\n Integer.parseInt(blueTeamNumber2.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.TWO, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }", "public static List<String> getDefenders() throws URISyntaxException, IOException {\n HttpClient httpClient = HttpClientBuilder.create().build();\n URIBuilder uriBuilder = new URIBuilder();\n //http://api.football-data.org/v2/teams/\n uriBuilder.setScheme(\"http\").setHost(\"api.football-data.org\").setPath(\"v2/teams/66\");\n HttpGet httpGet = new HttpGet(uriBuilder.build());\n httpGet.setHeader(\"X-Auth-Token\",\"7cf82ca9d95e498793ac0d3179e1ec9f\");\n httpGet.setHeader(\"Accept\",\"application/json\");\n HttpResponse response = httpClient.execute(httpGet);\n ObjectMapper objectMapper = new ObjectMapper();\n Map<String,Object> stringObjectMap=objectMapper.readValue(response.getEntity().getContent(),new TypeReference<Map<String,Object>>(){});\n List<Map<String,Object>> squad = (List<Map<String, Object>>) stringObjectMap.get(\"squad\");\n List<String> defenderName= new ArrayList<>();\n for (int i = 0; i <squad.size(); i++) {\n try {\n if(squad.get(i).get(\"position\").equals(\"Defender\")){\n\n defenderName.add((String)squad.get(i).get(\"name\"));\n }\n }catch (NullPointerException e){\n continue;\n }\n\n }\n return defenderName;\n\n }", "public void show()\n {\n System.out.println( getFullName() + \", \" +\n String.format(Locale.ENGLISH, \"%.1f\", getAcademicPerformance()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getSocialActivity()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getCommunicability()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getInitiative()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getOrganizationalAbilities())\n );\n }", "@Override\r\n public String toString() {\r\n StringBuilder stringBuilder = new StringBuilder();\r\n for (Hero hero: team) {\r\n stringBuilder.append(\"Hero name: \").append(hero.getName());\r\n stringBuilder.append(\", health: \").append(hero.getHealth());\r\n stringBuilder.append(\", power: \").append(hero.getAttackPower());\r\n stringBuilder.append(\";\");\r\n stringBuilder.append(\"\\n\");\r\n }\r\n return stringBuilder.toString();\r\n }", "private void setTeamInfo_Blue1() {\n blueTeamNumber1.setText(fixNumTeam(blueTeamNumber1.getText(), \"Blue 1\"));\n\n blueTeamNumber1.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.BLUE, FieldAndRobots.ONE,\n Integer.parseInt(blueTeamNumber1.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.ONE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }", "private void displayTeamAScore(int num)\n {\n TextView scoreTextView = (TextView) findViewById(R.id.teamAScore);\n scoreTextView.setText(num +\"\");\n }", "public static void oneTeam(String[] name, int[] team)\n {\n int a=0;\n System.out.println(\"The following players played with one team for their entire NHL careers:\");\n for(int i=0;i<team.length;i++)\n { \n if(team[i]==1)\n {\n System.out.println(name[i]);\n }//end of if statement\n }//end of for loop\n }", "public String vsTeamCarPrice(Team bteam) {\n\t\tint a = this.captain.getK7().getPrice() + this.member1.getK7().getPrice() + this.member2.getK7().getPrice();\n\t\tint b = bteam.captain.getK7().getPrice() + bteam.member1.getK7().getPrice() + bteam.member2.getK7().getPrice();\n\t\tString c = \"a팀의 총 자동차 가격은 \"+ a+\"이고, \"+\"b팀의 총 자동차 가격은 \"+b+\"입니다.\" ;\n\t\t\n\t\treturn c;\n\t\t\n\t}", "private static void printTeamTableDivider() {\n System.out.format(\"+----------------------+----------------------+----------------------\" +\n \"+----------------------+%n\");\n }", "public void fightMem2Dog(Team otherTeam) {\n\t\tString aTeamMem2Dog = this.member2.getHappy().getName();\n\t\tString otherTeamMem2Dog = otherTeam.getMember2().getHappy().getName();\n\t\tSystem.out.println(aTeamMem2Dog+ \"와 \"+ otherTeamMem2Dog+ \"가 개싸웁니다.\");\n\t\t\n\t}", "public void displayScoreB (int score){\n\n TextView scoreA = (TextView)findViewById(R.id.team_b_score);\n scoreA.setText(String.valueOf(score));\n }", "public String getGameStatus(String team) {\n\n String gameStatus = \"\";\n\n String[] mlbTeam = {\"D-backs\", \"Braves\", \"Orioles\", \"Red Sox\", \"Cubs\", \"White Sox\", \"Reds\", \"Indians\", \"Rockies\",\n \"Tigers\", \"Astros\", \"Royals\", \"Angels\", \"Dodgers\", \"Marlins\", \"Brewers\", \"Twins\", \"Mets\",\n \"Yankees\", \"Athletics\", \"Phillies\", \"Pirates\", \"Cardinals\", \"Padres\", \"Giants\", \"Mariners\",\n \"Rays\", \"Rangers\", \"Blue Jays\", \"Nationals\"};\n\n search:\n for (int i = 0; i < 1; i++) {\n\n for (int j = 0; j < mlbTeam.length; j++) {\n if (mlbTeam[j].equals(team)) {\n break search;\n }\n }\n\n team = \"No team\";\n i++;\n }\n try {\n // indicate if today is an off day for the team selected\n if (getPlayerInfo(team, \"status\", \"status\").equals(\"\")) {\n gameStatus = \"No game scheduled for the \" + uppercaseFirstLetters(team);\n }\n }\n catch (NullPointerException npe) {\n gameStatus = \"No game scheduled for the \" + uppercaseFirstLetters(team);\n }\n\n // display error message if there is no match to the team name inputted\n if (team.equals(\"No team\")) {\n gameStatus = \"ERROR: Please enter current MLB team name.\";\n }\n // indicate if today is an off day for the team selected\n else if (getPlayerInfo(team, \"status\", \"status\").equals(\"\")) {\n gameStatus = \"No game scheduled for the \" + team;\n }\n else {\n gameStatus = getPlayerInfo(team, \"status\", \"status\");\n }\n\n return gameStatus;\n }", "public void display () {\n super.display ();\n if (joined == true) {\n System.out.println(\"Staff name: \"+staffName+\n \"\\nSalary: \"+salary+\n \"\\nWorking hour: \"+workingHour+\n \"\\nJoining date: \"+joiningDate+\n \"\\nQualification: \"+qualification+\n \"\\nAppointed by: \"+appointedBy);\n }\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }" ]
[ "0.7512193", "0.75037766", "0.7243807", "0.70004445", "0.6861853", "0.67481047", "0.6737908", "0.66398585", "0.66132903", "0.6584766", "0.649995", "0.6311662", "0.62116355", "0.6167087", "0.61014134", "0.6094318", "0.6038768", "0.60255426", "0.6022588", "0.59709835", "0.59479004", "0.5917034", "0.5885761", "0.583894", "0.5834736", "0.5834736", "0.5834676", "0.581702", "0.5809099", "0.5806345", "0.57940984", "0.57940984", "0.57940984", "0.57940984", "0.57798964", "0.5779574", "0.57779735", "0.5763643", "0.57519853", "0.5750229", "0.57172877", "0.5712719", "0.5708939", "0.5683075", "0.56750774", "0.5674948", "0.5673867", "0.56692344", "0.5661156", "0.5652968", "0.5639442", "0.5624862", "0.5615549", "0.5602229", "0.559317", "0.55847424", "0.55821395", "0.5557158", "0.55406827", "0.55402446", "0.5526555", "0.5525249", "0.5515976", "0.55140233", "0.5513227", "0.5502647", "0.54934645", "0.5491996", "0.5477194", "0.5472677", "0.5467323", "0.54446346", "0.5439522", "0.5438838", "0.5424459", "0.5423868", "0.5418412", "0.5415428", "0.5405689", "0.54034173", "0.54006386", "0.5397477", "0.53950375", "0.5388118", "0.53872", "0.53838617", "0.53793985", "0.53793913", "0.5377064", "0.53639895", "0.53617674", "0.535095", "0.53470224", "0.5346026", "0.53380466", "0.5330767", "0.53240365", "0.53177035", "0.53136784", "0.53114736" ]
0.7310943
2
Method used to update the Score for Team A
public void ScoreTeamA(View view) { scoreteamA = scoreteamA +1; displayScoreA(scoreteamA); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateScore(int score){ bot.updateScore(score); }", "public void addScoreForTeamA(View v) {\n scoreTeamA += 1;\n updateText(scoreTeamA, v);\n }", "public void teamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.teamA);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "public void updateScoreBoard() {\n Player player1 = playerManager.getPlayer(1);\n Player player2 = playerManager.getPlayer(2);\n MainActivity mainActivity = (MainActivity) this.getContext();\n\n mainActivity.updateScoreBoard(player1, player2);\n }", "public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }", "private void updateScore() {\n\t\tscoreString.updateString(Integer.toString(score));\n\t}", "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "public void displayScoreForTeamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void updateScore() {\n\n Main.rw.readFile();\n setScore(Main.rw.getStackInfo());\n\n\n }", "public void setAwayScore(int a);", "public static void incrementScore() {\n\t\tscore++;\n\t}", "public void updateScoreboard() {\r\n \tif(parentActivity instanceof GameActivity) {\r\n \t\t((TextView)(((GameActivity)parentActivity).getScoreboard())).setText(\"\"+score);\r\n \t}\r\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int scoreA) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(scoreA));\r\n }", "public void setScore(int score) {this.score = score;}", "private void displayTeamA_score(int score) {\n TextView teamA_scoreView = findViewById(R.id.teamA_score_textView);\n teamA_scoreView.setText(String.valueOf(score));\n }", "public void setScore(int score) { this.score = score; }", "public void addTwoPointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 2;\n displayTeamAScore(scoreTeamA);\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayScoreA (int score){\n\n TextView scoreA = (TextView)findViewById(R.id.team_a_score);\n scoreA.setText(String.valueOf(score));\n }", "public void updateScores() {\n\t\tscoreText.setText(\"Score: \" + ultraland.getScore());\n\t}", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "public static void update_scoreboard2(){\n\t\t//Update score\n\tif(check_if_wicket2){\n\t\t\n\t\twicket_2++;\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\telse{\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\ttempshot2=PlayArena2.usershot2;\n\t\tteam_score_2=team_score_2+PlayArena2.usershot2;\n\t\treq=req-tempshot2;\n\t\t}\n\t\telse{\n\t\t\ttempshot2=PlayArena2.compshot2;\n\t\t\tteam_score_2=team_score_2+PlayArena2.compshot2;\n\t\t\treq=req-tempshot2;\n\t\t\t}\n\t\tif(req<0)\n\t\t{\treq=0;}\n\t\t\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\t// Overs update\n\tif(over_ball_2==5){\n\t\tover_ball_2=0;\n\t\tover_overs_2++;\n\t\tover_totalballs_2--;\n\t}\n\telse{\n\t\tover_ball_2++;\n\tover_totalballs_2--;}\n\tupdate_overs2.setText(\"\"+over_overs_2+\".\"+over_ball_2+\" (\"+PlayMode.overs+\")\");\n\t\n\t//Check if_first_inning_over\n\tif(over_overs_2==Integer.parseInt(PlayMode.overs) || wicket_2==3 || PlayBrain1.team_score_1<team_score_2)\n\t\t\t{\n\t\tif_second_inning_over=true;\n\t\treference2.add(PlayArena2.viewscore2);\n\t\t\t}\n\t\n\t\n\t//Needed update\n\t\t\tupdate_runrate2.setText(\"<html>NEED<br>\"+req+\"<br>OFF<br>\"+over_totalballs_2+\" <br>BALLS</html>\");\n\t\t}", "public void setScore(int paScore) {\n this.score = paScore;\n }", "void setScore(long score);", "void update(Team team);", "public void updateTeamFromResults(Match m){\r\n \r\n //Update team1\r\n m.getTeam1().setGoalsFor(m.getTeam1().getGoalsFor() + m.getScore1());\r\n m.getTeam1().setGoalsAgainst(m.getTeam1().getGoalsAgainst() + m.getScore2());\r\n \r\n //Update team2\r\n m.getTeam2().setGoalsFor(m.getTeam2().getGoalsFor() + m.getScore2());\r\n m.getTeam2().setGoalsAgainst(m.getTeam2().getGoalsAgainst() + m.getScore1());\r\n \r\n //Add points\r\n if (m.getScore1() < m.getScore2()){\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 3);\r\n m.getTeam1().setMatchLost(m.getTeam1().getMatchLost() + 1);\r\n m.getTeam2().setMatchWon(m.getTeam2().getMatchWon() + 1);\r\n }\r\n else if (m.getScore1() > m.getScore2()){\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 3);\r\n m.getTeam2().setMatchLost(m.getTeam2().getMatchLost() + 1);\r\n m.getTeam1().setMatchWon(m.getTeam1().getMatchWon() + 1);\r\n }\r\n else {\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 1);\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 1);\r\n m.getTeam1().setMatchDrawn(m.getTeam1().getMatchDrawn() + 1);\r\n m.getTeam2().setMatchDrawn(m.getTeam2().getMatchDrawn() + 1);\r\n }\r\n \r\n //Update the rankings\r\n this.updateTeamRank();\r\n }", "@Override\n\tpublic void homeTeamScored(int points) {\n\t\t\n\t}", "public static void editScores(League theLeague, Scanner keyboard) {\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"---Edit Scores---\");\r\n\t\tfor (int x = 0; x < theLeague.getNumTeams(); x++) {\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\ttheLeague.getTeam(x).teamManNameToString();\r\n\t\t\tSystem.out.println(\"Current score: \" + theLeague.getTeam(x).getScore());\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\tSystem.out.println(\"Enter a score for \" + theLeague.getTeam(x).getTeamName() + \": (max 512)\");\r\n\t\t\tSystem.out.println(\"0 - Return to Team Menu\");\r\n\t\t\t\r\n\t\t\tint newScore = Input.validInt(0, 512, keyboard);\r\n\t\t\tif (newScore == 0) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\ttheLeague.getTeam(x).setScore(newScore);\r\n\t\t}\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"***Scores Updated***\");\r\n\t}", "public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}", "public void updateScores(double attempt) {\r\n \tif(previousScore == 0){\r\n \t\tpreviousScore = currentScore;\r\n \t}else{\r\n \t\tbeforePreviousScore = previousScore;\r\n \t\tpreviousScore = currentScore;\r\n \t}\r\n this.currentScore = 100*(attempt \r\n\t\t\t\t- (benchmark - (maximumMark - benchmark)/NUMBEROFLEVEL))\r\n\t\t\t\t/(((maximumMark - benchmark)/NUMBEROFLEVEL)*2);\r\n }", "public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "public abstract Scoreboard update(Player player);", "@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "void setScoreValue(int scoreValue);", "public void updateScore(){\n scoreChange++;\n if(scoreChange % 2 == 0){\n if(score_val < 999999999)\n score_val += 1;\n if(score_val > 999999999)\n score_val = 999999999;\n score.setText(\"Score:\" + String.format(\"%09d\", score_val));\n if(scoreChange == 10000)\n scoreChange = 0;\n }\n }", "public void ScoreTeamB(View view) {\n scoreteamB = scoreteamB +1;\n displayScoreB(scoreteamB);\n }", "@Override\npublic void update(int score) {\n\t\n}", "public void plusOneTeamA (View view) {\r\n scoreA++;\r\n displayScoreForTeamA(scoreA);\r\n }", "public void addOneToScore() {\r\n score++;\r\n }", "void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }", "public void setScore(int score)\n {\n this.score = score;\n }", "public void addScore()\n {\n score += 1;\n }", "public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }", "public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}", "public void updateScore()\n {\n nextPipe = pipes.get(score);\n if(CHARACTER_X > nextPipe.getPipeCapX() + 35)\n {\n score++;\n }\n if(score > highScore)\n {\n highScore = score;\n }\n }", "public void addPointForTeamA(View view) {\n teamA_score = teamA_score + 1;\n if (ADVANTAGE == 1) {\n advantageMode(teamA_score, teamB_score);\n } else\n checkScore(teamA_score, teamB_score);\n }", "public void addOnePointToTeamA(View view)\n {\n scoreTeamA++;\n displayTeamAScore(scoreTeamA);\n }", "@Override\n public void updateScore(String currentScore) {\n if (currentScore == null){\n this.notifyObservers(\"Error while fetching score\");\n }\n else {\n this.currentScore = currentScore;\n this.notifyObservers();\n }\n }", "@Override\n\tpublic void updateScoreAfterTest(Score score2) {\n\t\tscoreDao.updateScoreAfterTest(score2);\n\t}", "public void addScore(int score);", "public void resetScoreA(View v) {\n scoreTeamA = 0;\n\n displayForTeamA(scoreTeamA);\n\n\n }", "@OnClick(R.id.team_a_1_button)\n public void add1TeamA() {\n addToScore(scoreATextView, 1);\n }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "public void setScore(int score) {\n this.score = score;\n }", "private void updateScore(int point){\n sScore.setText(\"\" + mScore + \"/\" + mQuizLibrary.getLength());\n\n }", "private void updateScore(int point){\n mScoreView.setText(\"\" + mScore);\n }", "private void updateScore(int point) {\n SharedPreferences preferences = getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putInt(SCORE_KEY, mScore);\n\n }", "public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }", "@Override\n\tpublic void update() {\n\t\tif(isSaveScore()){\n\t\t\tsaveScore();\n\t\t\tmanager.reconstruct();\n\t\t}\n\t\tmanager.move();\n\t}", "public void Team_A_2_Points(View v) {\n teamAScore = teamAScore + 2;\n displayForTeamA(teamAScore);\n }", "public void setScoreOfTeam(Team team, int newScore) {\n\t\tteamScore.put(team.getTeamId(), newScore);\n\t}", "protected void addScoreToLeaderboard() {\n\n\t\tif (onlineLeaderboard) {\n\t\t jsonFunctions = new JSONFunctions();\n\t\t jsonFunctions.setUploadScore(score);\n\t\t \n\t\t Handler handler = new Handler() {\n\t\t\t @Override\n\t\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\t @SuppressWarnings(\"unchecked\")\n\t\t\t\t ArrayList<Score> s = (ArrayList<Score>) msg.obj;\n\t\t\t\t globalScores = helper.sortScores(s);\n\t\t\t }\n\t\t };\n\t\t \n\t\t jsonFunctions.setHandler(handler);\n\t\t jsonFunctions\n\t\t\t .execute(\"http://brockcoscbrickbreakerleaderboard.web44.net/\");\n\t\t}\n\t\tsaveHighScore();\n }", "public void addThreePointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 3;\n displayTeamAScore(scoreTeamA);\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void updateScoreUI() {\n\t\tMap<Integer, Integer> scoreMap = gameLogic.getScoreboard().getTotalScore();\n\n\t\tlblScoreA.setText(String.valueOf(scoreMap.get(0)));\n lblScoreB.setText(String.valueOf(scoreMap.get(1)));\n lblScoreC.setText(String.valueOf(scoreMap.get(2)));\n lblScoreD.setText(String.valueOf(scoreMap.get(3)));\n\t}", "public void updateScore() {\n\t\tif (pellet.overlapsWith(avatar)) {\n\t\t\tavatar.addScore(1);\n\t\t\tpellet.removePellet(avatar.getLocation());\n\t\t\tSystem.out.println(\"collected pellet\");\n\t\t}\n\t}", "public void changeScore(String score) {\n typeScore(score);\n saveChanges();\n }", "public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}", "public synchronized void setScore(Integer score) {\n this.score += score;\n }", "@Override\n\tpublic void saveScore() {\n\n\t}", "private void updateScore(int changeScore) {\n score += changeScore;\n scoreText = \"Score: \" + score + \"\\t\\tHigh Score: \" + highScore;\n scoreView.setText(scoreText);\n }", "private void updateResultOnScreen() {\n teamAScoreTv.setText(Integer.toString(teamAScoreInt));\n teamBScoreTv.setText(Integer.toString(teamBScoreInt));\n\n if (teamAFoulScoreInt > 1)\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" fouls\");\n else\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" foul\");\n\n if (teamBFoulScoreInt > 1)\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" fouls\");\n else\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" foul\");\n }", "public void update()\n {\n scorecard.update();\n scorer.update();\n }", "@Override\n\tpublic void saveScore() {\n\t\t\n\t}", "@Test\r\n public void calculateScore() {\r\n board3.swapTiles(0,0,1,1);\r\n board3.getSlidingScoreBoard().setTime(2);\r\n board3.getSlidingScoreBoard().calculateScore();\r\n assertEquals(496, board3.getSlidingScoreBoard().getScore());\r\n }", "public void setScore(int score)\n\t{\n\t\tthis.score=score;\n\t}", "public void setScore(int score){\n\t\tthis.score = score;\n\t}", "public void addTwoForTeamA(View v) {\n scoreTeamA = scoreTeamA + 2;\n displayForTeamA(scoreTeamA);\n }", "protected abstract void calcScores();", "public void displayScoreB (int score){\n\n TextView scoreA = (TextView)findViewById(R.id.team_b_score);\n scoreA.setText(String.valueOf(score));\n }", "private void increaseScore() {\n this.game.getPlayers().values().forEach(ship -> {\n ship.increaseScore();\n if (ship.getScore() % 5 == 0) {\n this.asteroidsLimit++;\n }\n });\n }", "public synchronized void updateScore(PlayerHandler playerHandler) {\n\n int points = teams.length * Server.TEAM_SCORE / numMaxPlayers;\n playerHandler.increaseCorrectAnswers();\n\n if(points < 3){\n points = 3;\n }\n\n if (playerHandler.getTeam() == teams[0]) {\n score -= points;\n System.out.println(score);\n return;\n }\n score += points;\n }", "public void addOneForTeamA(View v) {\n scoreTeamA = scoreTeamA + 1;\n displayForTeamA(scoreTeamA);\n }", "public void addOneForTeamA(View v) {\n scoreTeamA = scoreTeamA + 1;\n displayForTeamA(scoreTeamA);\n }", "public void displayForTeamA(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "@RequestMapping(method = RequestMethod.PUT, value = \"/{facebookId}\")\n public long updateScore(@PathVariable(value = \"facebookId\") String id, @RequestParam(value = \"score\") long score) {\n long currentScore = getUserScore(id);\n User user = usersRepository.findById(id);\n user.setScore(currentScore + score);\n usersRepository.save(user);\n return usersRepository.findById(id).getScore();\n }" ]
[ "0.76385933", "0.7474093", "0.73610497", "0.72621626", "0.7233533", "0.7231407", "0.72092265", "0.71824837", "0.7173767", "0.7157794", "0.71499723", "0.7148383", "0.71440256", "0.7108897", "0.7095243", "0.7095243", "0.70887154", "0.70807403", "0.70742196", "0.7064293", "0.705832", "0.7042273", "0.7042273", "0.7042273", "0.7042273", "0.7042273", "0.7034898", "0.70343816", "0.7032079", "0.7009102", "0.6999416", "0.69944674", "0.6925147", "0.68788624", "0.687323", "0.6866007", "0.68535376", "0.6852161", "0.68520194", "0.6848467", "0.6839035", "0.6831224", "0.6826584", "0.6819065", "0.6788155", "0.6788076", "0.6780187", "0.6778849", "0.6748491", "0.67403823", "0.673988", "0.6738543", "0.6730383", "0.6727719", "0.66901", "0.66850734", "0.6680059", "0.66762257", "0.667226", "0.6669669", "0.6666172", "0.66590047", "0.6658256", "0.6658256", "0.66575974", "0.66573524", "0.6652284", "0.66518503", "0.66517884", "0.6648723", "0.6640463", "0.66227883", "0.6622608", "0.6616005", "0.6614721", "0.6614721", "0.6614721", "0.6614721", "0.6612176", "0.6607214", "0.6599424", "0.6588291", "0.65865076", "0.65781534", "0.65659535", "0.65654117", "0.6564314", "0.6558894", "0.6551867", "0.6551321", "0.65478545", "0.65381384", "0.65326947", "0.6524506", "0.6514421", "0.65114033", "0.6505841", "0.6505841", "0.6505464", "0.6502705" ]
0.77375156
0
Method used to update the Foul for Team A
public void FoulTeamA(View view) { foulteamA = foulteamA + 1; displayFoulA(foulteamA); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void update(Team team);", "public void addFaltasTeamA(View view) {\n faltasTeamA = faltasTeamA + 1;\n displayFaltasTeamA(faltasTeamA);\n }", "public void updateAirForceTeam(Collection<Unit> airunits) {\n\t\t\n\t\t// remove airunit of invalid team \n\t\tList<Integer> invalidUnitIds = new ArrayList<>();\n\t\t\n\t\tfor (Integer airunitId : airForceTeamMap.keySet()) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tif (!UnitUtils.isCompleteValidUnit(airunit)) {\n\t\t\t\tinvalidUnitIds.add(airunitId);\n\t\t\t} else if (airForceTeamMap.get(airunitId).leaderUnit == null) {\n\t\t\t\tinvalidUnitIds.add(airunitId);\n\t\t\t}\n\t\t}\n\t\tfor (Integer invalidUnitId : invalidUnitIds) {\n\t\t\tairForceTeamMap.remove(invalidUnitId);\n\t\t}\n\t\t\n\t\t// new team\n\t\tfor (Unit airunit : airunits) {\n\t\t\tAirForceTeam teamOfAirunit = airForceTeamMap.get(airunit.getID());\n\t\t\tif (teamOfAirunit == null) {\n\t\t\t\tairForceTeamMap.put(airunit.getID(), new AirForceTeam(airunit));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 리더의 위치를 비교하여 합칠 그룹인지 체크한다.\n\t\t// - 클로킹모드 상태가 다른 그룹은 합치지 않는다.\n\t\t// - 수리 상태의 그룹은 합치지 않는다.\n\t\tList<AirForceTeam> airForceTeamList = new ArrayList<>(new HashSet<>(airForceTeamMap.values()));\n\t\tMap<Integer, Integer> airForceTeamMergeMap = new HashMap<>(); // key:merge될 그룹 leaderID, value:merge할 그룹 leaderID\n\t\t\n\t\tint mergeDistance = AIR_FORCE_TEAM_MERGE_DISTANCE;\n\t\tif (InfoUtils.enemyRace() == Race.Terran) {\n\t\t\tmergeDistance += 120;\n\t\t}\n\t\tfor (int i = 0; i < airForceTeamList.size(); i++) {\n\t\t\tAirForceTeam airForceTeam = airForceTeamList.get(i);\n\t\t\tif (airForceTeam.repairCenter != null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tboolean cloakingMode = airForceTeam.cloakingMode;\n\t\t\tfor (int j = i + 1; j < airForceTeamList.size(); j++) {\n\t\t\t\tAirForceTeam compareForceUnit = airForceTeamList.get(j);\n\t\t\t\tif (compareForceUnit.repairCenter != null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (cloakingMode != compareForceUnit.cloakingMode) { // 클로킹상태가 다른 레이쓰부대는 합쳐질 수 없다.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tUnit airForceLeader = airForceTeam.leaderUnit;\n\t\t\t\tUnit compareForceLeader = compareForceUnit.leaderUnit;\n\t\t\t\tif (airForceLeader.getID() == compareForceLeader.getID()) {\n//\t\t\t\t\tSystem.out.println(\"no sense. the same id = \" + airForceLeader.getID());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (airForceLeader.getDistance(compareForceLeader) <= mergeDistance) {\n\t\t\t\t\tairForceTeamMergeMap.put(compareForceLeader.getID(), airForceLeader.getID());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// 합쳐지는 에어포스팀의 airForceTeamMap을 재설정한다.\n\t\tfor (Unit airunit : airunits) {\n\t\t\tInteger fromForceUnitLeaderId = airForceTeamMap.get(airunit.getID()).leaderUnit.getID();\n\t\t\tInteger toForceUnitLeaderId = airForceTeamMergeMap.get(fromForceUnitLeaderId);\n\t\t\tif (toForceUnitLeaderId != null) {\n\t\t\t\tairForceTeamMap.put(airunit.getID(), airForceTeamMap.get(toForceUnitLeaderId));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// team 멤버 세팅\n\t\tSet<AirForceTeam> airForceTeamSet = new HashSet<>(airForceTeamMap.values());\n\t\tfor (AirForceTeam airForceTeam : airForceTeamSet) {\n\t\t\tairForceTeam.memberList.clear();\n\t\t}\n\t\t\n\t\tList<Integer> needRepairAirunitList = new ArrayList<>(); // 치료가 필요한 유닛\n\t\tMap<Integer, Unit> airunitRepairCenterMap = new HashMap<>(); // 치료받을 커맨드센터\n\t\tList<Integer> uncloakedAirunitList = new ArrayList<>(); // 언클락 유닛\n\t\t\n\t\tfor (Integer airunitId : airForceTeamMap.keySet()) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tif (airunit.getHitPoints() <= 50) { // repair hit points\n\t\t\t\tAirForceTeam repairTeam = airForceTeamMap.get(airunitId);\n\t\t\t\tif (repairTeam == null || repairTeam.repairCenter == null) {\n\t\t\t\t\tUnit repairCenter = UnitUtils.getClosestActivatedCommandCenter(airunit.getPosition());\n\t\t\t\t\tif (repairCenter != null) {\n\t\t\t\t\t\tneedRepairAirunitList.add(airunitId);\n\t\t\t\t\t\tairunitRepairCenterMap.put(airunitId, repairCenter);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tAirForceTeam airForceTeam = airForceTeamMap.get(airunit.getID());\n\t\t\tif (airForceTeam.cloakingMode && (airunit.getType() != UnitType.Terran_Wraith || airunit.getEnergy() < 15)) {\n\t\t\t\tuncloakedAirunitList.add(airunitId);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tairForceTeam.memberList.add(airunit);\n\t\t}\n\t\t\n\t\t// create separated team for no energy airunit\n\t\tfor (Integer airunitId : uncloakedAirunitList) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tAirForceTeam uncloackedForceTeam = new AirForceTeam(airunit);\n\t\t\tuncloackedForceTeam.memberList.add(airunit);\n\t\t\t\n\t\t\tairForceTeamMap.put(airunitId, uncloackedForceTeam);\n\t\t}\n\t\t\n\t\t// create repair airforce team\n\t\tfor (Integer airunitId : needRepairAirunitList) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tAirForceTeam needRepairTeam = new AirForceTeam(airunit);\n\t\t\tneedRepairTeam.memberList.add(airunit);\n\t\t\tneedRepairTeam.repairCenter = airunitRepairCenterMap.get(airunit.getID());\n\t\t\t\n\t\t\tairForceTeamMap.put(airunitId, needRepairTeam);\n\t\t}\n\t\t\n\t\t// etc (changing leader, finishing repair, achievement) \n\t\tSet<AirForceTeam> reorganizedSet = new HashSet<>(airForceTeamMap.values());\n\t\tachievementEffectiveFrame = 0;\n\t\tfor (AirForceTeam airForceTeam : reorganizedSet) {\n\t\t\t// leader 교체\n\t\t\tUnit newLeader = UnitUtils.getClosestUnitToPosition(airForceTeam.memberList, airForceTeam.getTargetPosition());\n\t\t\tairForceTeam.leaderUnit = newLeader;\n\t\t\t\n\t\t\t// repair 완료처리\n\t\t\tif (airForceTeam.repairCenter != null) {\n\t\t\t\tif (!UnitUtils.isValidUnit(airForceTeam.repairCenter) || WorkerManager.Instance().getWorkerData().getNumAssignedWorkers(airForceTeam.repairCenter) < 3) {\n\t\t\t\t\tUnit repairCenter = UnitUtils.getClosestActivatedCommandCenter(airForceTeam.leaderUnit.getPosition());\n\t\t\t\t\tif (repairCenter != null) {\n\t\t\t\t\t\tairForceTeam.repairCenter = repairCenter;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tboolean repairComplete = true;\n\t\t\t\tfor (Unit airunit : airForceTeam.memberList) {\n\t\t\t\t\tif (airunit.getHitPoints() < airunit.getType().maxHitPoints() * 0.95) { // repair complete hit points\n\t\t\t\t\t\trepairComplete = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (repairComplete) {\n\t\t\t\t\tairForceTeam.repairCenter = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// achievement\n\t\t\tint achievement = airForceTeam.achievement();\n\t\t\taccumulatedAchievement += achievement;\n\t\t\tachievementEffectiveFrame = achievementEffectiveFrame + airForceTeam.killedEffectiveFrame * 100 - airForceTeam.damagedEffectiveFrame;\n\t\t}\n\t}", "@Override\r\n\tpublic ResultMessage updateTeam(TeamPO oneTeam) {\n\t\treturn teams.updateTeam(oneTeam);\r\n\t}", "public static void updateAFlight() {\n \n \n\n int flightOptions;\n String flightId;\n String flightDestination;\n String flightOrigin;\n String airline;\n\n Flights myFlights;\n\n myFlights = new Flights();\n\n \n flightOptions = determineNumber(\"Please enter flight option: \");\n \n myFlights = (Flights) Flights.displayFlight(flightOptions);\n\n if (myFlights == null) {\n System.out.println(\"Flight not available.\");\n updateAFlight();\n\n } else {\n flightId = enterText(\"Please enter new flightID: \");\n myFlights.setFlightId(flightId);\n\n flightDestination = enterText(\"Please enter new flight destination: \");\n myFlights.setFlightDestination(flightDestination);\n\n flightOrigin = enterText(\"Please enter new flight origin: \");\n myFlights.setFlightOrigin(flightOrigin);\n\n airline = enterText(\"Please enter new airline: \");\n myFlights.setAirline(airline);\n flightManager();\n }\n\n }", "public void plusFoulTeamA (View view) {\r\n foulsA++;\r\n displayFoulsForTeamA(foulsA);\r\n }", "@Override\n\tpublic void updateTeam(ProjectTeamBean projectTeamBean) {\n\t\t\n\t}", "@Override\n\tpublic void updateTeam(String name, SuperHuman superHuman) {\n\n\t}", "public void updateUserTeam() {\n\t\tUser user = users.get(userTurn);\n\t\tSystem.out.println(user.getName());\n\t\tSystem.out.println(tmpTeam.size());\n\t\tUserTeam roundTeam = new UserTeam();\n\t\troundTeam.putAll(tmpTeam.getPlayers());\n\t\tSystem.out.println(roundNumber);\n\t\tSystem.out.println(roundTeam.size());\n\t\tSystem.out.println(\"dfdfdfd\");\n\t\tuser.setUserTeam(roundTeam, roundNumber);\n\t\tSystem.out.println(\"dfdfdfd\");\n\t\ttmpTeam = new UserTeam();\n\t}", "private static void updateRecords() {\n for (Team t: Main.getTeams()){\n //If the team already exists\n if (SqlUtil.doesTeamRecordExist(c,TABLE_NAME,t.getIntValue(Team.NUMBER_KEY))){\n //Update team record\n updateTeamRecord(t);\n } else {\n //Create a new row in database\n addNewTeam(t);\n\n }\n }\n\n }", "public void updateTeam(int team, GameData gameData) {\n currentTeam = gameData.getTeamDataList().get(team);\n passButton.setVisible(false);\n answerField.setText(\"\");\n //if the current team is this client\n if (team == teamIndex) {\n AppearanceSettings.setEnabled(true, submitAnswerButton, answerField);\n announcementsLabel.setText(\"It's your turn to try to answer the question!\");\n }\n //if the current team is an opponent\n else {\n AppearanceSettings.setEnabled(false, submitAnswerButton, answerField);\n announcementsLabel.setText(\"It's \" + currentTeam.getTeamName() + \"'s turn to try to answer the question.\");\n }\n //mark down that this team has had a chance to answer\n teamHasAnswered.replace(team, true);\n hadSecondChance = false;\n teamLabel.setText(currentTeam.getTeamName());\n }", "@Override\n\tpublic void updateProjectTeam(ProjectTeamBean bean) {\n\t\t\n\t}", "public Team update(TeamDTO teamForm) throws TeamNotFoundException;", "public void displayFoulsForTeamA(int foul) {\n TextView foulsView = findViewById(R.id.team_a_fouls);\n foulsView.setText(String.valueOf(foul));\n }", "public boolean festivalUpdateAf(FestivalDto dto);", "public static String updateFouls(String token, boolean isPositive, int teamId, int totalFouls) throws IOException {\n String SCORE_URI= String.format(isPositive?RestURI.INC_FOULS.getValue():RestURI.DEC_FOULS.getValue(), Server.getIp(), teamId, totalFouls, token);\n return executePut(SCORE_URI);\n }", "public void update() {\n\n dbWork.cleanAll();\n\n List<DataFromServiceKudaGo> list = requestDataFromService();\n\n List<Film> films = new ArrayList<>();\n for (DataFromServiceKudaGo data : list) {\n Film film = new Film(list.indexOf(data), data.getNameMovie(), data.getPosterMoviePath(),\n data.getRunning_time(), data.getPrice(), data.getImax(),\n data.getCountryFilm(), data.getYearFilm(), data.getTrailerFilm(),\n data.getAgeFilm(), data.getDirectorFilm(), data.getNameCinema(),\n data.getAddressCinema(), data.getPhone(), data.getStationAboutCinema(),\n data.getPosterCinemaPath(), data.getBeginning_time(), data.getDescription());\n films.add(film);\n }\n\n dbWork.setFilms(films);\n\n fillShows();\n }", "private void updateVslaInformation() {\n VslaInfo vslaInfo = new VslaInfo();\n vslaInfo.setGroupName(vslaName);\n vslaInfo.setMemberName(representativeName);\n vslaInfo.setMemberPost(representativePost);\n vslaInfo.setMemberPhoneNumber(repPhoneNumber);\n vslaInfo.setGroupAccountNumber(grpBankAccount);\n vslaInfo.setPhysicalAddress(physAddress);\n vslaInfo.setRegionName(regionName);\n vslaInfo.setLocationCordinates(locCoordinates);\n vslaInfo.setIssuedPhoneNumber(grpPhoneNumber);\n vslaInfo.setIsDataSent(\"1\");\n vslaInfo.setSupportType(grpSupportType);\n vslaInfo.setNumberOfCycles(numberOfCycles);\n databaseHandler.upDateGroupData(vslaInfo, currentDatabaseId);\n }", "public void updateTeamFromResults(Match m){\r\n \r\n //Update team1\r\n m.getTeam1().setGoalsFor(m.getTeam1().getGoalsFor() + m.getScore1());\r\n m.getTeam1().setGoalsAgainst(m.getTeam1().getGoalsAgainst() + m.getScore2());\r\n \r\n //Update team2\r\n m.getTeam2().setGoalsFor(m.getTeam2().getGoalsFor() + m.getScore2());\r\n m.getTeam2().setGoalsAgainst(m.getTeam2().getGoalsAgainst() + m.getScore1());\r\n \r\n //Add points\r\n if (m.getScore1() < m.getScore2()){\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 3);\r\n m.getTeam1().setMatchLost(m.getTeam1().getMatchLost() + 1);\r\n m.getTeam2().setMatchWon(m.getTeam2().getMatchWon() + 1);\r\n }\r\n else if (m.getScore1() > m.getScore2()){\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 3);\r\n m.getTeam2().setMatchLost(m.getTeam2().getMatchLost() + 1);\r\n m.getTeam1().setMatchWon(m.getTeam1().getMatchWon() + 1);\r\n }\r\n else {\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 1);\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 1);\r\n m.getTeam1().setMatchDrawn(m.getTeam1().getMatchDrawn() + 1);\r\n m.getTeam2().setMatchDrawn(m.getTeam2().getMatchDrawn() + 1);\r\n }\r\n \r\n //Update the rankings\r\n this.updateTeamRank();\r\n }", "public void updateUf() {\n ArrayList<FunctionalUnit> updateList = new ArrayList<>();\n updateList = FU.get(typeFU.GENERIC);\n for (int i = 0; i < updateList.size(); i++) {\n if (updateList.get(i).isExecFinish() == true) {\n updateList.get(i).setActive(true); \n }\n }\n updateList = FU.get(typeFU.ADD);\n for (int i = 0; i < updateList.size(); i++) {\n if (updateList.get(i).isExecFinish() == true) {\n updateList.get(i).setActive(true); \n }\n }\n updateList = FU.get(typeFU.MULT);\n for (int i = 0; i < updateList.size(); i++) {\n if (updateList.get(i).isExecFinish() == true) {\n updateList.get(i).setActive(true); \n }\n }\n }", "public void FoulTeamB(View view) {\n foulteamB = foulteamB + 1;\n displayFoulb(foulteamB);\n }", "public void updateFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);", "public static void updateFlight() {\n\n String flightId;\n String flightDestination;\n String flightOrigin;\n String airline;\n\n Flights myFlights = new Flights();\n\n if (myFlights == null) {\n System.out.println(\"Flight not available.\");\n updateFlight();\n\n } else {\n flightId = writeText(\"Please enter new flight ID: \");\n myFlights.setFlightId(flightId);\n\n flightDestination = writeText(\"Please enter new destination: \");\n myFlights.setFlightDestination(flightDestination);\n\n flightOrigin = writeText(\"Please enter new flight origin: \");\n myFlights.setFlightOrigin(flightOrigin);\n\n airline = writeText(\"Please enter new airline: \");\n myFlights.setAirline(airline);\n\n }\n\n }", "public void displayFoulsForTeamA(int fouls) {\r\n TextView foulsView = (TextView) findViewById(R.id.team_a_fouls);\r\n foulsView.setText(String.valueOf(fouls));\r\n }", "public void update(TheatreMashup todo) {\n\t\t\n\t}", "public void updateFlightTeamStatus(List<Flight> flights) throws LogicException {\n\n try (ProxyConnection connection = ConnectionPool.getInstance().getConnection()) {\n FlightTeamDAO flightteamDao = new FlightTeamDAO(connection);\n for (Object flight : flights) {\n if (!flightteamDao.findFlightTeamByFlightId(((Flight) flight).getFlightId()).isEmpty()) {\n ((Flight) flight).setFlightTeam(true);\n } else {\n ((Flight) flight).setFlightTeam(false);\n }\n }\n } catch (DAOException e) {\n throw new LogicException(e);\n }\n }", "public void addOnePointToTeamA(View view)\n {\n scoreTeamA++;\n displayTeamAScore(scoreTeamA);\n }", "public void addVermelhosTeamA(View view) {\n vermelhosTeamA = vermelhosTeamA + 1;\n displayVermelhosTeamA(vermelhosTeamA);\n }", "public void updateAFDetail(VBAFDetail vbAFDetail)\r\n\t{\n\t\tAffiliateDAOUtil.updateAFDetail(vbAFDetail);\r\n\t}", "void resetMyTeam();", "public void addTwoPointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 2;\n displayTeamAScore(scoreTeamA);\n }", "public void Team_A_2_Points(View v) {\n teamAScore = teamAScore + 2;\n displayForTeamA(teamAScore);\n }", "@Override\n\tpublic void update(Aula a) {\n\t\tif (this.findById(a.getId())!=null) {\n\t\t\taulaRepository.save(a);\n\t\t}\n\t\telse {\n\t\t\t//TODO GESTIONAR ERROR NO EXISTE NO SE PUEDE ACTUALIZAR.. CREARIA UNO NUEVO\n\t\t}\n\t\t\n\t}", "Flight updateFlight(Flight flight);", "public FightTeam team();", "private static void updateTeamRecord(Team t) {\n ArrayList<Object> records = new ArrayList<>();\n //Get existing team data\n ResultSet teamSet = SqlUtil.getTeamRecord(c, TABLE_NAME, t.getIntValue(Team.NUMBER_KEY));\n try {\n ArrayList<String> matches;\n if (teamSet != null) {\n matches = new ArrayList<>(Arrays.asList(SqlUtil.getArrayFromString(teamSet.getString(\"match_nums\"))));\n } else {\n Main.sendError(\"Cannoy read team data: \" + t.getValue(Team.NUMBER_KEY),false);\n return;\n }\n for (String m: matches) {\n //If the match number already exists\n System.out.println(m);\n if (t.getStringValue(Team.MATCH_KEY).equalsIgnoreCase(m.trim())) {\n return;\n }\n }\n records.add(t.getIntValue(Team.NUMBER_KEY));\n records.add(t.getValue(Team.COLOR_KEY));\n records.add(1+teamSet.getInt(\"num_matches\"));\n matches.add(t.getStringValue(Team.MATCH_KEY));\n records.add(matches.toArray(new String[matches.size()]));\n for(Element e: Main.getElements()){\n switch (e.getType()){\n\n case SEGMENTED_CONTROL:\n for (int i = 0; i<e.getArguments().length;i++){\n if (t.getStringValue(e.getKeys()[0]).equalsIgnoreCase(e.getArguments()[i])){\n records.add(1+teamSet.getInt(e.getColumnValues()[i]));\n } else {\n records.add(teamSet.getInt(e.getColumnValues()[i]));\n }\n }\n break;\n case TEXTFIELD:\n if (e.getArguments()[0].equalsIgnoreCase(\"number\")) {\n records.add(t.getIntValue(e.getKeys()[0]) + teamSet.getInt(e.getColumnValues()[0]));\n\n } else if (e.getArguments()[0].equalsIgnoreCase(\"decimal\")){\n records.add(t.getDoubleValue(e.getKeys()[0]) + teamSet.getInt(e.getColumnValues()[0]));\n }\n break;\n case STEPPER:\n records.add(t.getIntValue(e.getKeys()[0]) + teamSet.getInt(e.getColumnValues()[0]));\n break;\n case LABEL:\n break;\n case SWITCH:\n for (int i = 0; i<e.getKeys().length;i++){\n if (t.getStringValue(e.getKeys()[i]).equalsIgnoreCase(\"yes\")){\n records.add(1 + teamSet.getInt(e.getColumnValues()[i*2]));\n records.add(teamSet.getInt(e.getColumnValues()[i*2+1]));\n } else {\n records.add(teamSet.getInt(e.getColumnValues()[i*2]));\n records.add(1 + teamSet.getInt(e.getColumnValues()[i*2+1]));\n }\n }\n break;\n case SPACE:\n break;\n case SLIDER:\n records.add(t.getDoubleValue(e.getKeys()[0]) + teamSet.getDouble(e.getColumnValues()[0]));\n break;\n }\n }\n double total = 0.0;\n\n for (Equation e: Main.getEquations()){\n double value = e.evaluate(t) + teamSet.getDouble(e.getColumnValue());\n records.add(value);\n total +=value;\n }\n\n records.add(total);\n\n SqlUtil.updateTeamRecord(c,TABLE_NAME, records.toArray(new Object[records.size()]),t.getStringValue(Team.NUMBER_KEY));\n\n } catch (SQLException e) {\n Main.sendError(\"Problem updating team records\", false, e);\n } catch (NullPointerException e){\n Main.sendError(\"Cannot read team data for team \" + t.getValue(Team.NUMBER_KEY),false,e);\n }\n }", "public void aFieldGoal(View view) {\n scoreTeamA = scoreTeamA + 3;\n displayForTeamA(scoreTeamA);\n }", "public void addOneForTeamA(View v) {\n scoreTeamA = scoreTeamA + 1;\n displayForTeamA(scoreTeamA);\n }", "public void addOneForTeamA(View v) {\n scoreTeamA = scoreTeamA + 1;\n displayForTeamA(scoreTeamA);\n }", "public void displayFoulA (int foul){\n\n TextView foulA = (TextView)findViewById(R.id.team_a_foul);\n foulA.setText(String.valueOf(foul));\n }", "public void addFaltasTeamB(View view) {\n faltasTeamB = faltasTeamB + 1;\n displayFaltasTeamB(faltasTeamB);\n }", "public void updateTeamTables() {\n ArrayList<Player> tempTeam = new ArrayList<>();\n ArrayList<Player> tempTaxi = new ArrayList<>();\n teamTable.getItems().clear();\n for (Team tt : dataManager.getDraft().getFantasyTeams()) {\n if (tt.getTeamName().equals(selectTeam.getSelectionModel().getSelectedItem())) {\n tempTeam = tt.getTeamList();\n tempTaxi = tt.getTaxiList();\n }\n }\n teamTable = resetTeamTable(tempTeam);\n teamTaxiTable = resetTaxiTable(tempTaxi);\n \n teamTable.getSortOrder().add(posCol);\n posCol.setComparator(positionCompare);\n posCol.setSortType(SortType.ASCENDING);\n posCol.setSortable(true);\n posCol.setSortable(false);\n }", "public void plusFoulTeamB (View view) {\r\n foulsB++;\r\n displayFoulsForTeamB(foulsB);\r\n }", "protected abstract void gatherTeam();", "public void update() {\n\n if (!isSelected){\n goalManagement();\n }\n\n if (chair != null){ // si une chaise lui est désigné\n if (!hasAGoal && !isSelected){ // et qu'il n'a pas d'objectif\n setSit(true);\n position.setX(chair.getX());\n }\n\n if (isSit){\n chair.setChairState(Chair.ChairState.OCCUPIED);\n }else {\n chair.setChairState(Chair.ChairState.RESERVED);\n }\n }\n\n if (tired > 0 ){\n tired -= Constants.TIRED_LOSE;\n }\n\n if (isSit && comfort>0){\n comfort -= Constants.COMFORT_LOSE;\n }\n\n if (isSitOnSofa && comfort<100){\n comfort += Constants.COMFORT_WIN;\n }\n\n if (!hasAGoal && moveToCoffee && coffeeMachine!=null){\n moveToCoffee = false;\n tired=100;\n\n coffeeMachine.setCoffeeTimer(new GameTimer()) ;\n coffeeMachine.getCoffeeTimer().setTimeLimit(Constants.COFFEE_TIME_TO_AVAILABLE);\n coffeeMachine = null;\n backToSpawn();\n }\n\n if (!hasAGoal && moveToSofa){\n moveToSofa = false;\n isSitOnSofa = true;\n dir = 0 ;\n position.setY(position.getY()-Constants.TILE_SIZE);\n }\n\n if (isSelected){\n flashingColor ++;\n if (flashingColor > 2 * flashingSpeed){\n flashingColor = 0;\n }\n }\n\n }", "void updateFavor(HouseFavor houseFavor);", "@Override\n\tpublic void setTeam(int i) {\n\t\t\n\t}", "public void setFA(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localFATracker = true;\r\n } else {\r\n localFATracker = false;\r\n \r\n }\r\n \r\n this.localFA=param;\r\n \r\n\r\n }", "public void updatePlayersAFKState()\n {\n // Iterate through all players\n for (Map.Entry<UUID, PlayerAFKModel> entry : players.entrySet())\n {\n PlayerAFKModel playerAFKModel = entry.getValue();\n\n // Check if player has moved\n if( playerAFKModel.hasMoved() )\n {\n // Moved\n\n // Check if AFK\n if( playerAFKModel.isAFK() )\n {\n // Is AFK. Then player left AFK\n playerAFKModel.markAsNotAFK();\n this.playerLeftAFK(Bukkit.getPlayer(playerAFKModel.getPlayer().getUniqueId()));\n }\n\n // Restart AFK timer\n playerAFKModel.timerStartOrRestart();\n } else {\n // Player hasn't moved\n\n // Check if player is AFK\n if ( !playerAFKModel.isAFK() )\n {\n // Not AFK. Check for how long\n if( playerAFKModel.hasBeenAFKFor(this.timeItTakesToGoAFK) )\n {\n // AFK for too long. Mark them as AFK\n this.playerWentAFK( playerAFKModel.getPlayer() );\n }\n } else {\n // Player is AFK already. Increase timer\n this.updatePlayerAFKTimer( playerAFKModel.getPlayer() );\n }\n }\n }\n }", "public static String updateTurno (Turno trn, Personale dir, Personale sound,\n MyDate giorno, Room sala, TypeTurno type,\n Coppia coppia, ArrayList <Anello> anelli,\n ArrayList <Turno> turni) {\n int righe = 0;\n for (Anello a : anelli) {\n righe += a.getRighe();\n }\n //turno.setTurnoId(\"sh\"+ RandomStringUtils.random(9, true, true)+\"\");\n //turno.setRighe(righe);\n for (Anello anello:anelli) {\n anello.setStatus(Status.WIP);\n }\n\n\n for (Turno tu : turni) {\n\n\n if ( !trn.getTurnoId().equals(tu.getTurnoId()) &&\n giorno.compare(tu.getGiorno()) &&\n type.name().equals(tu.getType().name()) &&\n sala.getName().equals(tu.getSala().getName()) &&\n dir.compareTo(tu.getDir()) &&\n sound.compareTo(tu.getSound()) &&\n coppia.getDopp().compareTo(tu.getCoppia().getDopp()) )\n {\n\n return \"Attenzione!\\n\" +\n \"Un altro turno è già prenotato per questa combinazione di data, orario e\" +\n \" \" +\n \"studio\";\n }\n }\n\n if (!DbShift.update(trn, type, giorno, dir, sound, sala, coppia, righe)) {\n return \"Errore\";\n } else {\n if (!DbShift.deleteShiftAnello(trn)) {\n return \"Errore\";\n } else {\n for (Anello a: trn.getAnelli()) {\n DbAnello.singleEditAnello(a, \"New\", \"status\");\n }\n if (!DbShift.insertAnelli(trn, anelli)) {\n return \"Errore\";\n } else {\n for (Anello a : anelli) {\n if (!DbAnello.singleEditAnello(a, a.getStatus().toString(), \"status\")) {\n return \"Errore\";\n }\n }\n\n trn.setDir(dir);\n trn.setSound(sound);\n trn.setGiorno(giorno);\n trn.setSala(sala);\n trn.setType(type);\n trn.setCoppia(coppia);\n trn.setAnelli(anelli);\n return \"Turno aggiornato correttamente\";\n\n }\n }\n\n }\n }", "public boolean updateTeam(Team t, int id) {\n\t\tboolean update = false;\n\t\ttry {\n\t\t\tPreparedStatement statement = null;\n\t\t\tjava.sql.Date tDate = new java.sql.Date(t.getDateFoundation().getTime());\n\t\t\tString updateRecords_sql = \"UPDATE \" + team_table + \" SET name='\" + t.getName() + \"', coach='\"\n\t\t\t\t\t+ t.getCoach() + \"', city='\" + t.getCity() + \"', dateFoundation='\" + tDate + \"' WHERE id='\" + id\n\t\t\t\t\t+ \"'\";\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.prepareStatement(updateRecords_sql);\n\t\t\tstatement.executeUpdate();\n\t\t\tupdate = true;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn update;\n\t}", "public void addAmarelosTeamA(View view) {\n amarelosTeamA = amarelosTeamA + 1;\n displayAmarelosTeamA(amarelosTeamA);\n }", "public static void update() {\n\t\tfor (int index = matches.length - 1; index >= 0; index--) {\n\t\t\tMatch left = null, right = null;\n\t\t\ttry {\n\t\t\t\tleft = matches[getLeft(index)];\n\t\t\t\tright = matches[getRight(index)];\n\t\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (left.getWinner() != null)\n\t\t\t\tmatches[index].setTeam1(left.getWinner());\n\t\t\telse\n\t\t\t\tmatches[index].setTeam1(null);\n\t\t\tif (right.getWinner() != null)\n\t\t\t\tmatches[index].setTeam2(right.getWinner());\n\t\t\telse\n\t\t\t\tmatches[index].setTeam2(null);\n\t\t}\n\t}", "public void addTwoForTeamA(View v) {\n scoreTeamA = scoreTeamA + 2;\n displayForTeamA(scoreTeamA);\n }", "@Override\r\n\tpublic void updateWorklow(Appointment a) throws DBAccessException {\n\t\tsteps = cr.getWorkflowSteps();\r\n\t\t\r\n\t\t// TODO Anhand des Termins die Objekte aus steps aktualisieren \r\n\t\t\r\n\t\t// da es bei Updates der App passieren kann, dass der Ablaufplan sich ändert, müssen vorherige Ablaufpläne gelöscht werden\r\n\t\tdb.deleteWorkflow();\r\n\t\t\r\n\t\tfor (Step step : steps) {\r\n\t\t\tint seperator = step.getTime().indexOf(\":\");\r\n\t\t\tString s = step.getTime().substring(0, seperator-1); // -1, damit das \":\" nicht dabei ist\r\n\t\t\tint hour = Integer.parseInt(s);\r\n\t\t\ts = step.getTime().substring(seperator+1); // +1, damit das \":\" nicht dabei ist\r\n\t\t\tint min = Integer.parseInt(s);\r\n\t\t\t// dieser Konstruktor ist zwar veraltet, aber für unseren Zweck perfekt\r\n\t\t\tstep.setTimestamp(new Timestamp(a.getYear(), a.getMonth(), a.getDay()-step.getDaysBefore(), hour, min, 0, 0));\r\n\t\t}\r\n\t\t\r\n\t\tdb.saveWorkflow(steps);\r\n\t\t\r\n\t}", "public void GiveBackAp(String faction)\r\n/* 273: */ {\r\n/* 274:308 */ for (AgentModel model : this.agentModels.values()) {\r\n/* 275:310 */ if (model.getFaction().equals(faction)) {\r\n/* 276:312 */ model.setAp(model.getMaxAP());\r\n/* 277: */ }\r\n/* 278: */ }\r\n/* 279: */ }", "void updateFaithTrack(String username, LightFaithTrack faithTrack);", "@Test(dependsOnMethods = {\"testAddTeam\"})\n\tpublic void testUpdateTeam() {\n\t}", "private void save() {\n Saver.saveTeam(team);\n }", "@Override\r\n\tpublic void updateFilm(Film film) {\n\r\n\t}", "public void teamChange() {\n if (teamCombobox.getValue().getTeamLogo() != null) {\n teamPhoto.setImage(teamCombobox.getValue().getTeamLogo().getImage());\n }\n teamCode.setText(\"Team code : \" + teamCombobox.getValue().getTeamCode());\n }", "private void update() {\n ambianceModel.ambiance.uniq_id = ambianceModel._id.$oid;\n\n RestAdapter restAdapter = new RestAdapter.Builder().setLogLevel(RestAdapter.LogLevel.FULL).setEndpoint(getResources().getString(R.string.api)).build();\n final GsonBuilder builder = new GsonBuilder();\n builder.excludeFieldsWithoutExposeAnnotation();\n builder.disableHtmlEscaping();\n final Gson gson = builder.create();\n Request r = new Request(Singleton.token, ambianceModel._id.$oid, ambianceModel);\n String json = gson.toJson(r);\n Log.v(\"Ambiance activity\", json);\n\n final Lumhueapi lumhueapi = restAdapter.create(Lumhueapi.class);\n lumhueapi.updateAmbiance(r, new Callback<AmbianceApplyResponse>() {\n @Override\n public void success(AmbianceApplyResponse ambianceApplyResponse, Response response) {\n Log.v(\"Ambiance activity\", \"It worked\");\n }\n\n @Override\n public void failure(RetrofitError error) {\n String tv = error.getMessage();\n Log.v(\"Ambiance activity\", tv + \"\");\n }\n });\n }", "public void displayFoulb (int foul){\n\n TextView foulA = (TextView)findViewById(R.id.team_b_foul);\n foulA.setText(String.valueOf(foul));\n }", "public void ScoreTeamA(View view) {\n scoreteamA = scoreteamA +1;\n displayScoreA(scoreteamA);\n }", "private void almacenarFallos() {\n BaseDatos bd = new BaseDatos(this);\n// Log.i(\"FALLOS\",\"Nmero de fallos final: \"+fallos);\n bd.updatePalabra(palabraActual.getId(),fallos);\n\n bd.close();\n }", "public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}", "public static void setTeam(UserTeam team) {\n\t\tgame.setTmpTeam(team);\n\t\tint i=0;\n\t\tfor (Iterator<FootballPlayer> iterator = team.getPlayers().values().iterator(); iterator\n\t\t\t\t.hasNext();) {\n\t\t\tFootballPlayer player = iterator.next();\n\t\t\tnamesLabels.get(i).setText(game.getLastName(player.getName()));\n\t\t\tshirtLabels.get(i).setIcon(MainGui.getShirt(player.getTeamName()));\n\t\t\tbuttonArray[i].setText(\"X\");\n\t\t\ti++;\n\t\t}\n\t}", "public void newTeam(Team team);", "int updateByPrimaryKey(SysTeam record);", "public void Team_A_3_Points(View v) {\n teamAScore = teamAScore + 3;\n displayForTeamA(teamAScore);\n }", "@Override\n public void update(ArrayList<League> leagues) {\n\n }", "public void addThreePointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 3;\n displayTeamAScore(scoreTeamA);\n }", "void updateAveria(Averia averia) throws BusinessException;", "int updateByPrimaryKeySelective(SysTeam record);", "@Override\n\tpublic void update(Unidade obj) {\n\n\t}", "public void addCantosTeamA(View view) {\n cantosTeamA = cantosTeamA + 1;\n displayCantosTeamA(cantosTeamA);\n }", "public void displayFoulsForTeamB(int fouls) {\n TextView foulsView = findViewById(R.id.team_b_fouls);\n foulsView.setText(String.valueOf(fouls));\n }", "@Override\n\tpublic void updateAgence(Agence a) {\n\t\t\n\t}", "public void setTeam(Team team) {\r\n\t\tthis.team = team;\r\n\t}", "public void plusOneTeamA (View view) {\r\n scoreA++;\r\n displayScoreForTeamA(scoreA);\r\n }", "@Override\n public void simpleUpdate(float tpf) {\n moveCamera(tpf);\n updateEnemies(tpf);\n updatePlayer();\n }", "@Override\n\tpublic void setHomeTeam() {\n\t\t\n\t}", "public Fighter[] update(Fighter[] fs, Platform plat, boolean[][] inputs)\r\n {\r\n //check if the player is starting a block\r\n setBlocking(fs[0],inputs[0]);\r\n setBlocking(fs[1],inputs[1]);\r\n\r\n //increase the timers and change the state of the block\r\n incrementBlock(fs[0]);\r\n incrementBlock(fs[1]);\r\n\r\n //check if the player is starting an attack and set the attack\r\n setAttacking(fs[0],plat,inputs[0]);\r\n setAttacking(fs[1],plat,inputs[1]);\r\n\r\n //increase the timers, change the state of the attack, and deal damage/knockback to the other fighter\r\n incrementAttack(fs[0],fs[1]);\r\n incrementAttack(fs[1],fs[0]);\r\n \r\n //if they aren't currently attacking, change their velocity and move the fighter\r\n if(fs[0].getAttacking() != 1)\r\n {\r\n setVels(fs[0],inputs[0],plat);\r\n }\r\n if(fs[1].getAttacking() != 1)\r\n {\r\n setVels(fs[1],inputs[1],plat);\r\n }\r\n\r\n //moves them based on knockback\r\n fs[0].setPos(fs[0].getPos()[0] + fs[0].getKnockBackVel()[0],fs[0].getPos()[1] + fs[0].getKnockBackVel()[1]);\r\n fs[1].setPos(fs[1].getPos()[0] + fs[1].getKnockBackVel()[0],fs[1].getPos()[1] + fs[1].getKnockBackVel()[1]);\r\n\r\n //decreases knockback\r\n fs[0].setKnockBackVel(fs[0].getKnockBackVel()[0]/kf, fs[0].getKnockBackVel()[1]/kf);\r\n fs[1].setKnockBackVel(fs[1].getKnockBackVel()[0]/kf, fs[1].getKnockBackVel()[1]/kf);\r\n\r\n //brings the fighters above the platform\r\n bringAbove(fs[0], plat);\r\n bringAbove(fs[1], plat);\r\n\r\n //brings the fighters back onto the screen\r\n bringBack(fs[0]);\r\n bringBack(fs[1]);\r\n \r\n return fs; \r\n }", "void resetMyTeam(Team team);", "private void actualizarFondo() {\n actualizaEstadoMapa();\n if (modificacionFondoBase == true && estadoJuego != EstadoJuego.PAUSADO && estadoJuego != EstadoJuego.PIERDE){\n moverFondo();\n } else if (modificacionFondoBase == false && estadoJuego != EstadoJuego.PAUSADO && estadoJuego != EstadoJuego.PIERDE ){\n texturaFondoBase= texturaFondo1_1;\n texturaFondoApoyo= texturaFondo1_2;\n moverFondo();\n }\n }", "@Override\n\tpublic void update(Factura t) {\n\t\tfacturaRepository.save(t);\n\t\t\n\t}", "public void displayFoulsForTeamB(int fouls) {\r\n TextView foulsView = (TextView) findViewById(R.id.team_b_fouls);\r\n foulsView.setText(String.valueOf(fouls));\r\n }", "public static void UpdateFlight(Flight flight){\n \n //java.sql.Date sqlDate = new java.sql.Date(flight.getDatetime());\n \n try (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM flight WHERE FlightNumber = '\" + flight.getFlightNumber() + \"'\")){\n \n resultSet.absolute(1);\n resultSet.updateString(\"FlightNumber\", flight.getFlightNumber());\n resultSet.updateString(\"DepartureAirport\", flight.getDepartureAirport());\n resultSet.updateString(\"DestinationAirport\", flight.getDestinationAirport());\n resultSet.updateDouble(\"Price\", flight.getPrice());\n\n //Ask Andrew\n// java.sql.Date sqlDate = new java.sql.Date();\n// resultSet.updateDate(\"datetime\", flight.getDatetime());\n resultSet.updateString(\"Plane\", flight.getPlane());\n resultSet.updateInt(\"SeatsTaken\", flight.getSeatsTaken());\n \n resultSet.updateRow();\n \n \n \n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n \n \n }", "void updateAccount();", "@OnClick(R.id.team_a_1_button)\n public void add1TeamA() {\n addToScore(scoreATextView, 1);\n }", "public void setUpdateData() {\n positionFenceToUpdateinController = Controller.getPositionFenceInArrayById(this.idFenceToUpdate);\n if(positionFenceToUpdateinController >= 0) {\n Fence fence = Controller.fences.get(positionFenceToUpdateinController);\n ((MainActivity)getActivity()).getSupportActionBar().setTitle(Constant.TITLE_VIEW_UPDATE_FENCE + \": \" + fence.getName());\n this.nameFence.setText(fence.getName());\n this.addressFence.setText(fence.getAddress());\n this.cityFence.setText(fence.getCity());\n this.provinceFence.setText(fence.getProvince());\n this.numberFence.setText(fence.getNumber());\n this.textSMSFence.setText(fence.getTextSMS());\n int index = (int)Constant.SPINNER_RANGE_POSITIONS.get(fence.getRange());\n this.spinnerRange.setSelection(index);\n this.spinnerEvent.setSelection(fence.getEvent());\n }\n }", "public void addPenaltiTeamA(View view) {\n penaltiTeamA = penaltiTeamA + 1;\n displayPenaltiTeamA(penaltiTeamA);\n }", "public void addGoloTeamA(View view) {\n goloTeamA = goloTeamA + 1;\n displayGoloTeamA(goloTeamA);\n }", "public static FlightInfo AssignAFlightData() {\n\n FlightInfo flight = new FlightInfo();\n\n flight.setDeparts(new Date(2017 - 1900, 04, 21));\n\n Person person = new Person();\n\n person.setFirstName(\"Tim\");\n person.setLastName(\"John\");\n\n Ticket ticket = new Ticket();\n\n ticket.setPrice(200);\n\n ticket.setPassenger(person);\n\n flight.setTickets(ticket);\n\n return flight;\n\n }", "@Override\r\n\tpublic int updateFilm(Film film) {\n\t\treturn 0;\r\n\t}", "public static void AutoTransferForTeam(Team t, Team playersTeam, Library library) {\n\t\t\n\t\tArrayList<Player> allplayers = new ArrayList<Player>();\n\t\tfor (int i=0;i<library.getLibrary().size();i++) {\n\t\t\tTeam team = library.getLibrary().get(i);\n\t\t\tfor (int j=0;j<team.getTeam().size();j++) {\n\t\t\t\tallplayers.add(team.getTeam().get(j));\n\t\t\t}\n\t\t}\n\t\t\n\t\tString type=\"\";\n\t\tTeamRating tr = TeamRating.calculateTeamRating(t);\n\t\tif (tr.getFinishing()<=tr.getDribbling() && tr.getFinishing()<=tr.getDefending() && tr.getFinishing()<=tr.getStamina() && tr.getFinishing() <=tr.getGoalkeeping()) {\n\t\t\ttype=\"Attacker\";\n\t\t}\n\t\telse if (tr.getDefending()<=tr.getFinishing() && tr.getDefending()<=tr.getStamina() && tr.getDefending()<=tr.getDribbling() && tr.getDefending()<=tr.getGoalkeeping()) {\n\t\t\ttype=\"Defender\";\n\t\t}\n\t\telse if (tr.getGoalkeeping()<=tr.getFinishing() && tr.getGoalkeeping()<=tr.getDribbling() && tr.getGoalkeeping()<=tr.getStamina() && tr.getGoalkeeping()<=tr.getDefending()) {\n\t\t\ttype=\"Goalkeeper\";\n\t\t} else {\n\t\t\ttype = \"Midfielder\";\n\t\t}\n\t\t\n\t\tArrayList<Player> options = new ArrayList<Player>();\n\t\tfor (Player p:allplayers) {\n\t\t\tif ((!(playersTeam.getTeam().contains(p) || t.getTeam().contains(p)) && p.getPlayerType().equals(type) && p.getPrice().doubleValue()*1.1<=t.getBudget())) {\n\t\t\t\toptions.add(p);\n\t\t\t}\n\t\t}\n\t\t\n\t\tPlayer[] players = new Player[options.size()];\n\t\tfor (int i=0;i<players.length;i++) {\n\t\t\tplayers[i]=options.get(i);\n\t\t}\n\t\t\n\t\tPlayer temp;\n\t\tif(players.length==0) {\n\t\t\t\n\t\t}\n\t\tfor (int j=0;j<players.length;j++) {\n\t\t\tfor (int i=1;i<players.length;i++) {\n\t\t\t\tif (players[i-1].getPrice().doubleValue()>players[i].getPrice().doubleValue()) {\n\t\t\t\t\ttemp=players[i];\n\t\t\t\t\tplayers[i]=players[i-1];\n\t\t\t\t\tplayers[i-1]=temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tPlayer[] players2 = new Player[players.length];\n\t\tfor (int i=0;i<players2.length;i++) {\n\t\t\tplayers2[i]=players[players.length-1-i];\n\t\t}\n\t\t\n\t\tif (players2.length!=0) {\n\t\t\n\t\t\tPlayer theplayer = null;\n\t\t\tint random = GameLogic.randomGenerator(1, 1000);\n\t\t\tint random2=0;\n\t\t\tif (random<=500) {\n\t\t\t\trandom2=GameLogic.randomGenerator(0,(int) (players2.length*0.2));\n\t\t\t\tif (random2<0) {\n\t\t\t\t\trandom2=0;\n\t\t\t\t}\n\t\t\t\tif (random2>=players2.length){\n\t\t\t\t\trandom2=players2.length-1;\n\t\t\t\t}\n\t\t\t\ttheplayer = players2[random2];\n\t\t\t} if (random >500 && random <=750) {\n\t\t\t\trandom2=GameLogic.randomGenerator((int) (players2.length*0.2), (int) (players2.length*0.4));\n\t\t\t\tif (random2<0) {\n\t\t\t\t\trandom2=0;\n\t\t\t\t}\n\t\t\t\tif (random2>=players2.length){\n\t\t\t\t\trandom2=players2.length-1;\n\t\t\t\t}\n\t\t\t\ttheplayer=players2[random2];\n\t\t\t} if (random>750 && random<=875) {\n\t\t\t\trandom2=GameLogic.randomGenerator((int) (players2.length*0.4), (int) (players2.length*0.7));\n\t\t\t\tif (random2<0) {\n\t\t\t\t\trandom2=0;\n\t\t\t\t}\n\t\t\t\tif (random2>=players2.length){\n\t\t\t\t\trandom2=players2.length-1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttheplayer=players2[random2];\n\t\t\t} if (random>875) {\n\t\t\t\trandom2=GameLogic.randomGenerator((int) (players2.length*0.7), (int) (players2.length-1));\n\t\t\t\tif (random2<0) {\n\t\t\t\t\trandom2=0;\n\t\t\t\t}\n\t\t\t\tif (random2>=players2.length){\n\t\t\t\t\trandom2=players2.length-1;\n\t\t\t\t}\n\t\t\t\ttheplayer=players2[random2];\n\t\t\t}\n\t\t\t\n\t\t\tTeam t2 = library.getTeamForName(theplayer.getTeam());\n\t\t\tTransferLogic.requestTransfer(theplayer, t, 1.1*theplayer.getPrice().doubleValue(), library, new TransferList());\n\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic void updateFlashcard(Flashcard f) {\n\t\t\n\t}", "@LogMethod\r\n private void editResults()\r\n {\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1);\r\n clickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n waitAndClickAndWait(Locator.linkWithText(\"view results\"));\r\n DataRegionTable table = new DataRegionTable(\"Data\", getDriver());\r\n assertEquals(\"No rows should be editable\", 0, DataRegionTable.updateLinkLocator().findElements(table.getComponentElement()).size());\r\n assertElementNotPresent(Locator.button(\"Delete\"));\r\n\r\n // Edit the design to make them editable\r\n ReactAssayDesignerPage assayDesignerPage = _assayHelper.clickEditAssayDesign(true);\r\n assayDesignerPage.setEditableResults(true);\r\n assayDesignerPage.clickFinish();\r\n\r\n // Try an edit\r\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1);\r\n clickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n clickAndWait(Locator.linkWithText(\"view results\"));\r\n DataRegionTable dataTable = new DataRegionTable(\"Data\", getDriver());\r\n assertEquals(\"Incorrect number of results shown.\", 10, table.getDataRowCount());\r\n doAndWaitForPageToLoad(() -> dataTable.updateLink(dataTable.getRowIndex(\"Specimen ID\", \"AAA07XK5-05\")).click());\r\n setFormElement(Locator.name(\"quf_SpecimenID\"), \"EditedSpecimenID\");\r\n setFormElement(Locator.name(\"quf_VisitID\"), \"601.5\");\r\n setFormElement(Locator.name(\"quf_testAssayDataProp5\"), \"notAnumber\");\r\n clickButton(\"Submit\");\r\n assertTextPresent(\"Could not convert value: \" + \"notAnumber\");\r\n setFormElement(Locator.name(\"quf_testAssayDataProp5\"), \"514801\");\r\n setFormElement(Locator.name(\"quf_Flags\"), \"This Flag Has Been Edited\");\r\n clickButton(\"Submit\");\r\n assertTextPresent(\"EditedSpecimenID\", \"601.5\", \"514801\");\r\n assertElementPresent(Locator.xpath(\"//img[@src='/labkey/Experiment/flagDefault.gif'][@title='This Flag Has Been Edited']\"), 1);\r\n assertElementPresent(Locator.xpath(\"//img[@src='/labkey/Experiment/unflagDefault.gif'][@title='Flag for review']\"), 9);\r\n\r\n // Try a delete\r\n dataTable.checkCheckbox(table.getRowIndex(\"Specimen ID\", \"EditedSpecimenID\"));\r\n doAndWaitForPageToLoad(() ->\r\n {\r\n dataTable.clickHeaderButton(\"Delete\");\r\n assertAlert(\"Are you sure you want to delete the selected row?\");\r\n });\r\n\r\n // Verify that the edit was audited\r\n goToSchemaBrowser();\r\n viewQueryData(\"auditLog\", \"ExperimentAuditEvent\");\r\n assertTextPresent(\r\n \"Data row, id \",\r\n \", edited in \" + TEST_ASSAY + \".\",\r\n \"Specimen ID changed from 'AAA07XK5-05' to 'EditedSpecimenID'\",\r\n \"Visit ID changed from '601.0' to '601.5\",\r\n \"testAssayDataProp5 changed from blank to '514801'\",\r\n \"Deleted data row.\");\r\n }", "@Override\n\tpublic AjaxReturnMsg upDateAgencyData(Ee15 ee15) {\n\t\tint updateNum = recruitDataEntryEe15Mapper.updateByPrimaryKeySelective(ee15);\n\t\tif(updateNum==1 ){\n\t\t\treturn this.success(\"您好,修改人力资源招聘数据成功!\");\n\t\t}else{\n\t\t\treturn this.error(\"您好,修改人力资源招聘数据失败!\");\n\t\t}\n\t}", "public void addThreeForTeamA(View v) {\n scoreTeamA = scoreTeamA + 3;\n displayForTeamA(scoreTeamA);\n }" ]
[ "0.69605637", "0.6513352", "0.6472879", "0.64676654", "0.6446981", "0.6400691", "0.6369755", "0.6196468", "0.61947924", "0.61714005", "0.61355287", "0.6108541", "0.6062083", "0.604354", "0.6038654", "0.59652513", "0.5947629", "0.5912089", "0.5788352", "0.57882136", "0.57725036", "0.57583886", "0.5736916", "0.5717305", "0.5709025", "0.5706943", "0.5681276", "0.5675577", "0.56736106", "0.56578815", "0.5654498", "0.56542736", "0.56500655", "0.5649743", "0.56389946", "0.5631712", "0.5631673", "0.56307596", "0.56307596", "0.5623389", "0.5610614", "0.5602975", "0.5584497", "0.5583138", "0.55584264", "0.5544488", "0.5540328", "0.54939705", "0.5492315", "0.5488575", "0.54884464", "0.5480083", "0.5478028", "0.5477996", "0.5468721", "0.5456934", "0.54516786", "0.54515517", "0.54408085", "0.54371244", "0.5436652", "0.5431971", "0.5431929", "0.54293674", "0.5428906", "0.5421641", "0.5406264", "0.54054123", "0.53994894", "0.5390393", "0.5388679", "0.5379603", "0.5370806", "0.5367861", "0.5366227", "0.5352618", "0.5346735", "0.5344793", "0.5338353", "0.5329677", "0.5323947", "0.53110164", "0.53032666", "0.53013575", "0.52963555", "0.52665937", "0.52580464", "0.52557015", "0.52537966", "0.52455646", "0.52394485", "0.52349657", "0.523408", "0.5228173", "0.5227401", "0.52254236", "0.5222328", "0.522078", "0.52160096", "0.52051634" ]
0.6509969
2
Method used to update the Score for Team B
public void ScoreTeamB(View view) { scoreteamB = scoreteamB +1; displayScoreB(scoreteamB); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateScore(int score){ bot.updateScore(score); }", "public static void update_scoreboard2(){\n\t\t//Update score\n\tif(check_if_wicket2){\n\t\t\n\t\twicket_2++;\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\telse{\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\ttempshot2=PlayArena2.usershot2;\n\t\tteam_score_2=team_score_2+PlayArena2.usershot2;\n\t\treq=req-tempshot2;\n\t\t}\n\t\telse{\n\t\t\ttempshot2=PlayArena2.compshot2;\n\t\t\tteam_score_2=team_score_2+PlayArena2.compshot2;\n\t\t\treq=req-tempshot2;\n\t\t\t}\n\t\tif(req<0)\n\t\t{\treq=0;}\n\t\t\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\t// Overs update\n\tif(over_ball_2==5){\n\t\tover_ball_2=0;\n\t\tover_overs_2++;\n\t\tover_totalballs_2--;\n\t}\n\telse{\n\t\tover_ball_2++;\n\tover_totalballs_2--;}\n\tupdate_overs2.setText(\"\"+over_overs_2+\".\"+over_ball_2+\" (\"+PlayMode.overs+\")\");\n\t\n\t//Check if_first_inning_over\n\tif(over_overs_2==Integer.parseInt(PlayMode.overs) || wicket_2==3 || PlayBrain1.team_score_1<team_score_2)\n\t\t\t{\n\t\tif_second_inning_over=true;\n\t\treference2.add(PlayArena2.viewscore2);\n\t\t\t}\n\t\n\t\n\t//Needed update\n\t\t\tupdate_runrate2.setText(\"<html>NEED<br>\"+req+\"<br>OFF<br>\"+over_totalballs_2+\" <br>BALLS</html>\");\n\t\t}", "public void addScoreForTeamB(View v) {\n scoreTeamB += 1;\n updateText(scoreTeamB, v);\n }", "public void ScoreTeamA(View view) {\n scoreteamA = scoreteamA +1;\n displayScoreA(scoreteamA);\n }", "public void updateScoreBoard() {\n Player player1 = playerManager.getPlayer(1);\n Player player2 = playerManager.getPlayer(2);\n MainActivity mainActivity = (MainActivity) this.getContext();\n\n mainActivity.updateScoreBoard(player1, player2);\n }", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "public void displayScoreForTeamB(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void updateScore() {\n\n Main.rw.readFile();\n setScore(Main.rw.getStackInfo());\n\n\n }", "public void updateScoreboard() {\r\n \tif(parentActivity instanceof GameActivity) {\r\n \t\t((TextView)(((GameActivity)parentActivity).getScoreboard())).setText(\"\"+score);\r\n \t}\r\n }", "public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }", "public void teamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.teamA);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void displayForTeamB(int score) {\n TextView scoreView = findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "private void updateScore() {\n\t\tscoreString.updateString(Integer.toString(score));\n\t}", "public void displayScoreB (int score){\n\n TextView scoreA = (TextView)findViewById(R.id.team_b_score);\n scoreA.setText(String.valueOf(score));\n }", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "private void displayTeamB_score(int score) {\n TextView teamB_scoreView = findViewById(R.id.teamB_score_textView);\n teamB_scoreView.setText(String.valueOf(score));\n }", "@Override\n\tpublic void updateScoreAfterTest(Score score2) {\n\t\tscoreDao.updateScoreAfterTest(score2);\n\t}", "public void updateScores() {\n\t\tscoreText.setText(\"Score: \" + ultraland.getScore());\n\t}", "public void addScoreForTeamA(View v) {\n scoreTeamA += 1;\n updateText(scoreTeamA, v);\n }", "public void addTwoPointsToTeamB(View view)\n {\n scoreTeamB = scoreTeamB + 2;\n displayTeamBScore(scoreTeamB);\n }", "public void setScore(int score) {this.score = score;}", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_bb_score);\n scoreView.setText(String.valueOf(score));\n }", "public void setScore(int score) { this.score = score; }", "void update(Team team);", "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "public abstract Scoreboard update(Player player);", "void setScore(long score);", "void setScoreValue(int scoreValue);", "public void setAwayScore(int a);", "public void displayScoreForTeamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "public void Team_B_2_Points(View v) {\n teamBScore = teamBScore + 2;\n displayForTeamB(teamBScore);\n }", "public void updateScore(){\n scoreChange++;\n if(scoreChange % 2 == 0){\n if(score_val < 999999999)\n score_val += 1;\n if(score_val > 999999999)\n score_val = 999999999;\n score.setText(\"Score:\" + String.format(\"%09d\", score_val));\n if(scoreChange == 10000)\n scoreChange = 0;\n }\n }", "public void updateScores(double attempt) {\r\n \tif(previousScore == 0){\r\n \t\tpreviousScore = currentScore;\r\n \t}else{\r\n \t\tbeforePreviousScore = previousScore;\r\n \t\tpreviousScore = currentScore;\r\n \t}\r\n this.currentScore = 100*(attempt \r\n\t\t\t\t- (benchmark - (maximumMark - benchmark)/NUMBEROFLEVEL))\r\n\t\t\t\t/(((maximumMark - benchmark)/NUMBEROFLEVEL)*2);\r\n }", "@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }", "public void addTwoPointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 2;\n displayTeamAScore(scoreTeamA);\n }", "public void updateTeamFromResults(Match m){\r\n \r\n //Update team1\r\n m.getTeam1().setGoalsFor(m.getTeam1().getGoalsFor() + m.getScore1());\r\n m.getTeam1().setGoalsAgainst(m.getTeam1().getGoalsAgainst() + m.getScore2());\r\n \r\n //Update team2\r\n m.getTeam2().setGoalsFor(m.getTeam2().getGoalsFor() + m.getScore2());\r\n m.getTeam2().setGoalsAgainst(m.getTeam2().getGoalsAgainst() + m.getScore1());\r\n \r\n //Add points\r\n if (m.getScore1() < m.getScore2()){\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 3);\r\n m.getTeam1().setMatchLost(m.getTeam1().getMatchLost() + 1);\r\n m.getTeam2().setMatchWon(m.getTeam2().getMatchWon() + 1);\r\n }\r\n else if (m.getScore1() > m.getScore2()){\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 3);\r\n m.getTeam2().setMatchLost(m.getTeam2().getMatchLost() + 1);\r\n m.getTeam1().setMatchWon(m.getTeam1().getMatchWon() + 1);\r\n }\r\n else {\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 1);\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 1);\r\n m.getTeam1().setMatchDrawn(m.getTeam1().getMatchDrawn() + 1);\r\n m.getTeam2().setMatchDrawn(m.getTeam2().getMatchDrawn() + 1);\r\n }\r\n \r\n //Update the rankings\r\n this.updateTeamRank();\r\n }", "public static void incrementScore() {\n\t\tscore++;\n\t}", "@Override\npublic void update(int score) {\n\t\n}", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "private void displayTeamA_score(int score) {\n TextView teamA_scoreView = findViewById(R.id.teamA_score_textView);\n teamA_scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }", "public void displayScoreA (int score){\n\n TextView scoreA = (TextView)findViewById(R.id.team_a_score);\n scoreA.setText(String.valueOf(score));\n }", "public void updateScore()\n {\n nextPipe = pipes.get(score);\n if(CHARACTER_X > nextPipe.getPipeCapX() + 35)\n {\n score++;\n }\n if(score > highScore)\n {\n highScore = score;\n }\n }", "protected void addScoreToLeaderboard() {\n\n\t\tif (onlineLeaderboard) {\n\t\t jsonFunctions = new JSONFunctions();\n\t\t jsonFunctions.setUploadScore(score);\n\t\t \n\t\t Handler handler = new Handler() {\n\t\t\t @Override\n\t\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\t @SuppressWarnings(\"unchecked\")\n\t\t\t\t ArrayList<Score> s = (ArrayList<Score>) msg.obj;\n\t\t\t\t globalScores = helper.sortScores(s);\n\t\t\t }\n\t\t };\n\t\t \n\t\t jsonFunctions.setHandler(handler);\n\t\t jsonFunctions\n\t\t\t .execute(\"http://brockcoscbrickbreakerleaderboard.web44.net/\");\n\t\t}\n\t\tsaveHighScore();\n }", "public void plusOneTeamB (View view) {\r\n scoreB++;\r\n displayScoreForTeamB(scoreB);\r\n }", "void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }", "public void displayForTeamA(int scoreA) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(scoreA));\r\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "@Override\n public void updateScore(String currentScore) {\n if (currentScore == null){\n this.notifyObservers(\"Error while fetching score\");\n }\n else {\n this.currentScore = currentScore;\n this.notifyObservers();\n }\n }", "@Override\n\tpublic void homeTeamScored(int points) {\n\t\t\n\t}", "public static void editScores(League theLeague, Scanner keyboard) {\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"---Edit Scores---\");\r\n\t\tfor (int x = 0; x < theLeague.getNumTeams(); x++) {\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\ttheLeague.getTeam(x).teamManNameToString();\r\n\t\t\tSystem.out.println(\"Current score: \" + theLeague.getTeam(x).getScore());\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\tSystem.out.println(\"Enter a score for \" + theLeague.getTeam(x).getTeamName() + \": (max 512)\");\r\n\t\t\tSystem.out.println(\"0 - Return to Team Menu\");\r\n\t\t\t\r\n\t\t\tint newScore = Input.validInt(0, 512, keyboard);\r\n\t\t\tif (newScore == 0) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\ttheLeague.getTeam(x).setScore(newScore);\r\n\t\t}\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"***Scores Updated***\");\r\n\t}", "public void update()\n {\n scorecard.update();\n scorer.update();\n }", "@Override\n\tpublic void update() {\n\t\tif(isSaveScore()){\n\t\t\tsaveScore();\n\t\t\tmanager.reconstruct();\n\t\t}\n\t\tmanager.move();\n\t}", "public void setScoreOfTeam(Team team, int newScore) {\n\t\tteamScore.put(team.getTeamId(), newScore);\n\t}", "private void updateScore(int changeScore) {\n score += changeScore;\n scoreText = \"Score: \" + score + \"\\t\\tHigh Score: \" + highScore;\n scoreView.setText(scoreText);\n }", "private void updateHighscore() {\n if(getScore() > highscore)\n highscore = getScore();\n }", "public void updateScoreUI() {\n\t\tMap<Integer, Integer> scoreMap = gameLogic.getScoreboard().getTotalScore();\n\n\t\tlblScoreA.setText(String.valueOf(scoreMap.get(0)));\n lblScoreB.setText(String.valueOf(scoreMap.get(1)));\n lblScoreC.setText(String.valueOf(scoreMap.get(2)));\n lblScoreD.setText(String.valueOf(scoreMap.get(3)));\n\t}", "public void setScore(int paScore) {\n this.score = paScore;\n }", "public void setScore(int score)\n {\n this.score = score;\n }", "public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}", "public void bonusForTeamB(View v) {\n\n if (questionNumber <= 19) {\n\n scoreTeamB = scoreTeamB + 5;\n displayForTeamB(scoreTeamB);\n }\n\n\n }", "@Test\r\n public void calculateScore() {\r\n board3.swapTiles(0,0,1,1);\r\n board3.getSlidingScoreBoard().setTime(2);\r\n board3.getSlidingScoreBoard().calculateScore();\r\n assertEquals(496, board3.getSlidingScoreBoard().getScore());\r\n }", "public void addThreePointsToTeamB(View view)\n {\n scoreTeamB = scoreTeamB + 3;\n displayTeamBScore(scoreTeamB);\n }", "public void resetScoreB(View v) {\n scoreTeamB = 0;\n\n displayForTeamB(scoreTeamB);\n\n\n }", "private void updateResultOnScreen() {\n teamAScoreTv.setText(Integer.toString(teamAScoreInt));\n teamBScoreTv.setText(Integer.toString(teamBScoreInt));\n\n if (teamAFoulScoreInt > 1)\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" fouls\");\n else\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" foul\");\n\n if (teamBFoulScoreInt > 1)\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" fouls\");\n else\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" foul\");\n }", "public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }", "private void updateScore(int point){\n mScoreView.setText(\"\" + mScore);\n }", "public void addPointForTeamB(View view) {\n teamB_score = teamB_score + 1;\n if (ADVANTAGE == 1) {\n advantageMode(teamA_score, teamB_score);\n } else\n checkScore(teamA_score, teamB_score);\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "@Override\n\tpublic void saveScore() {\n\n\t}", "public void changeScore(String score) {\n typeScore(score);\n saveChanges();\n }", "public void addOnePointToTeamB(View view)\n {\n scoreTeamB++;\n displayTeamBScore(scoreTeamB);\n }", "private void updateScore(int point){\n sScore.setText(\"\" + mScore + \"/\" + mQuizLibrary.getLength());\n\n }", "@Override\n\tpublic void saveScore() {\n\t\t\n\t}", "private void updateScore(int point) {\n SharedPreferences preferences = getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putInt(SCORE_KEY, mScore);\n\n }", "public void displayForPlayerB(int score) {\n scoreViewPlayerB.setText(String.valueOf(score));\n }", "public void updateScore() {\n\t\tif (pellet.overlapsWith(avatar)) {\n\t\t\tavatar.addScore(1);\n\t\t\tpellet.removePellet(avatar.getLocation());\n\t\t\tSystem.out.println(\"collected pellet\");\n\t\t}\n\t}", "public synchronized void setScore(Integer score) {\n this.score += score;\n }", "public void addScore()\n {\n score += 1;\n }", "@Override\r\n\tpublic void updateDriverRate(int score, String driverID) {\n\t\t\r\n\t}", "public void Team_B_3_Points(View v) {\n teamBScore = teamBScore + 3;\n displayForTeamB(teamBScore);\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }" ]
[ "0.7563624", "0.7305597", "0.71204054", "0.7096149", "0.7082102", "0.7081971", "0.70668507", "0.70658976", "0.7051962", "0.7019214", "0.6994387", "0.69863886", "0.69863886", "0.6958818", "0.69459", "0.69448066", "0.69272494", "0.69272494", "0.69272494", "0.69272494", "0.69215405", "0.68738544", "0.68596685", "0.6848155", "0.6836595", "0.6828016", "0.6801815", "0.6801599", "0.6799462", "0.6781029", "0.6776334", "0.67642117", "0.6759704", "0.67453766", "0.6736941", "0.67348945", "0.6734074", "0.6717167", "0.67085195", "0.6703269", "0.6698789", "0.66744304", "0.66734505", "0.6663602", "0.66598386", "0.6657329", "0.6655883", "0.6645418", "0.6643101", "0.6643101", "0.66348785", "0.6622311", "0.6610379", "0.6595631", "0.65941095", "0.65940285", "0.6586273", "0.6585575", "0.6585575", "0.6585575", "0.6585575", "0.6585575", "0.65810025", "0.6562242", "0.6555791", "0.65487957", "0.65335333", "0.65309083", "0.653087", "0.65174603", "0.6516187", "0.64907885", "0.64831316", "0.6480075", "0.6477823", "0.6475469", "0.6450358", "0.6441276", "0.6406292", "0.63996035", "0.63979816", "0.6396228", "0.6391399", "0.63909847", "0.63909847", "0.6386632", "0.638174", "0.63732857", "0.636637", "0.6362262", "0.63583744", "0.6357346", "0.6353561", "0.6353369", "0.63531667", "0.6345938", "0.63450336", "0.6342911", "0.6342911", "0.6342911" ]
0.7517513
1
Method used to update the Foul for Team B
public void FoulTeamB(View view) { foulteamB = foulteamB + 1; displayFoulb(foulteamB); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void update(Team team);", "@Override\n\tpublic void updateTeam(ProjectTeamBean projectTeamBean) {\n\t\t\n\t}", "@Override\n\tpublic void updateProjectTeam(ProjectTeamBean bean) {\n\t\t\n\t}", "public void plusFoulTeamB (View view) {\r\n foulsB++;\r\n displayFoulsForTeamB(foulsB);\r\n }", "public void addFaltasTeamB(View view) {\n faltasTeamB = faltasTeamB + 1;\n displayFaltasTeamB(faltasTeamB);\n }", "@Override\r\n\tpublic ResultMessage updateTeam(TeamPO oneTeam) {\n\t\treturn teams.updateTeam(oneTeam);\r\n\t}", "public void updateUserTeam() {\n\t\tUser user = users.get(userTurn);\n\t\tSystem.out.println(user.getName());\n\t\tSystem.out.println(tmpTeam.size());\n\t\tUserTeam roundTeam = new UserTeam();\n\t\troundTeam.putAll(tmpTeam.getPlayers());\n\t\tSystem.out.println(roundNumber);\n\t\tSystem.out.println(roundTeam.size());\n\t\tSystem.out.println(\"dfdfdfd\");\n\t\tuser.setUserTeam(roundTeam, roundNumber);\n\t\tSystem.out.println(\"dfdfdfd\");\n\t\ttmpTeam = new UserTeam();\n\t}", "@Override\n\tpublic void updateTeam(String name, SuperHuman superHuman) {\n\n\t}", "public void updateAirForceTeam(Collection<Unit> airunits) {\n\t\t\n\t\t// remove airunit of invalid team \n\t\tList<Integer> invalidUnitIds = new ArrayList<>();\n\t\t\n\t\tfor (Integer airunitId : airForceTeamMap.keySet()) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tif (!UnitUtils.isCompleteValidUnit(airunit)) {\n\t\t\t\tinvalidUnitIds.add(airunitId);\n\t\t\t} else if (airForceTeamMap.get(airunitId).leaderUnit == null) {\n\t\t\t\tinvalidUnitIds.add(airunitId);\n\t\t\t}\n\t\t}\n\t\tfor (Integer invalidUnitId : invalidUnitIds) {\n\t\t\tairForceTeamMap.remove(invalidUnitId);\n\t\t}\n\t\t\n\t\t// new team\n\t\tfor (Unit airunit : airunits) {\n\t\t\tAirForceTeam teamOfAirunit = airForceTeamMap.get(airunit.getID());\n\t\t\tif (teamOfAirunit == null) {\n\t\t\t\tairForceTeamMap.put(airunit.getID(), new AirForceTeam(airunit));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 리더의 위치를 비교하여 합칠 그룹인지 체크한다.\n\t\t// - 클로킹모드 상태가 다른 그룹은 합치지 않는다.\n\t\t// - 수리 상태의 그룹은 합치지 않는다.\n\t\tList<AirForceTeam> airForceTeamList = new ArrayList<>(new HashSet<>(airForceTeamMap.values()));\n\t\tMap<Integer, Integer> airForceTeamMergeMap = new HashMap<>(); // key:merge될 그룹 leaderID, value:merge할 그룹 leaderID\n\t\t\n\t\tint mergeDistance = AIR_FORCE_TEAM_MERGE_DISTANCE;\n\t\tif (InfoUtils.enemyRace() == Race.Terran) {\n\t\t\tmergeDistance += 120;\n\t\t}\n\t\tfor (int i = 0; i < airForceTeamList.size(); i++) {\n\t\t\tAirForceTeam airForceTeam = airForceTeamList.get(i);\n\t\t\tif (airForceTeam.repairCenter != null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tboolean cloakingMode = airForceTeam.cloakingMode;\n\t\t\tfor (int j = i + 1; j < airForceTeamList.size(); j++) {\n\t\t\t\tAirForceTeam compareForceUnit = airForceTeamList.get(j);\n\t\t\t\tif (compareForceUnit.repairCenter != null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (cloakingMode != compareForceUnit.cloakingMode) { // 클로킹상태가 다른 레이쓰부대는 합쳐질 수 없다.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tUnit airForceLeader = airForceTeam.leaderUnit;\n\t\t\t\tUnit compareForceLeader = compareForceUnit.leaderUnit;\n\t\t\t\tif (airForceLeader.getID() == compareForceLeader.getID()) {\n//\t\t\t\t\tSystem.out.println(\"no sense. the same id = \" + airForceLeader.getID());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (airForceLeader.getDistance(compareForceLeader) <= mergeDistance) {\n\t\t\t\t\tairForceTeamMergeMap.put(compareForceLeader.getID(), airForceLeader.getID());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// 합쳐지는 에어포스팀의 airForceTeamMap을 재설정한다.\n\t\tfor (Unit airunit : airunits) {\n\t\t\tInteger fromForceUnitLeaderId = airForceTeamMap.get(airunit.getID()).leaderUnit.getID();\n\t\t\tInteger toForceUnitLeaderId = airForceTeamMergeMap.get(fromForceUnitLeaderId);\n\t\t\tif (toForceUnitLeaderId != null) {\n\t\t\t\tairForceTeamMap.put(airunit.getID(), airForceTeamMap.get(toForceUnitLeaderId));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// team 멤버 세팅\n\t\tSet<AirForceTeam> airForceTeamSet = new HashSet<>(airForceTeamMap.values());\n\t\tfor (AirForceTeam airForceTeam : airForceTeamSet) {\n\t\t\tairForceTeam.memberList.clear();\n\t\t}\n\t\t\n\t\tList<Integer> needRepairAirunitList = new ArrayList<>(); // 치료가 필요한 유닛\n\t\tMap<Integer, Unit> airunitRepairCenterMap = new HashMap<>(); // 치료받을 커맨드센터\n\t\tList<Integer> uncloakedAirunitList = new ArrayList<>(); // 언클락 유닛\n\t\t\n\t\tfor (Integer airunitId : airForceTeamMap.keySet()) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tif (airunit.getHitPoints() <= 50) { // repair hit points\n\t\t\t\tAirForceTeam repairTeam = airForceTeamMap.get(airunitId);\n\t\t\t\tif (repairTeam == null || repairTeam.repairCenter == null) {\n\t\t\t\t\tUnit repairCenter = UnitUtils.getClosestActivatedCommandCenter(airunit.getPosition());\n\t\t\t\t\tif (repairCenter != null) {\n\t\t\t\t\t\tneedRepairAirunitList.add(airunitId);\n\t\t\t\t\t\tairunitRepairCenterMap.put(airunitId, repairCenter);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tAirForceTeam airForceTeam = airForceTeamMap.get(airunit.getID());\n\t\t\tif (airForceTeam.cloakingMode && (airunit.getType() != UnitType.Terran_Wraith || airunit.getEnergy() < 15)) {\n\t\t\t\tuncloakedAirunitList.add(airunitId);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tairForceTeam.memberList.add(airunit);\n\t\t}\n\t\t\n\t\t// create separated team for no energy airunit\n\t\tfor (Integer airunitId : uncloakedAirunitList) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tAirForceTeam uncloackedForceTeam = new AirForceTeam(airunit);\n\t\t\tuncloackedForceTeam.memberList.add(airunit);\n\t\t\t\n\t\t\tairForceTeamMap.put(airunitId, uncloackedForceTeam);\n\t\t}\n\t\t\n\t\t// create repair airforce team\n\t\tfor (Integer airunitId : needRepairAirunitList) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tAirForceTeam needRepairTeam = new AirForceTeam(airunit);\n\t\t\tneedRepairTeam.memberList.add(airunit);\n\t\t\tneedRepairTeam.repairCenter = airunitRepairCenterMap.get(airunit.getID());\n\t\t\t\n\t\t\tairForceTeamMap.put(airunitId, needRepairTeam);\n\t\t}\n\t\t\n\t\t// etc (changing leader, finishing repair, achievement) \n\t\tSet<AirForceTeam> reorganizedSet = new HashSet<>(airForceTeamMap.values());\n\t\tachievementEffectiveFrame = 0;\n\t\tfor (AirForceTeam airForceTeam : reorganizedSet) {\n\t\t\t// leader 교체\n\t\t\tUnit newLeader = UnitUtils.getClosestUnitToPosition(airForceTeam.memberList, airForceTeam.getTargetPosition());\n\t\t\tairForceTeam.leaderUnit = newLeader;\n\t\t\t\n\t\t\t// repair 완료처리\n\t\t\tif (airForceTeam.repairCenter != null) {\n\t\t\t\tif (!UnitUtils.isValidUnit(airForceTeam.repairCenter) || WorkerManager.Instance().getWorkerData().getNumAssignedWorkers(airForceTeam.repairCenter) < 3) {\n\t\t\t\t\tUnit repairCenter = UnitUtils.getClosestActivatedCommandCenter(airForceTeam.leaderUnit.getPosition());\n\t\t\t\t\tif (repairCenter != null) {\n\t\t\t\t\t\tairForceTeam.repairCenter = repairCenter;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tboolean repairComplete = true;\n\t\t\t\tfor (Unit airunit : airForceTeam.memberList) {\n\t\t\t\t\tif (airunit.getHitPoints() < airunit.getType().maxHitPoints() * 0.95) { // repair complete hit points\n\t\t\t\t\t\trepairComplete = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (repairComplete) {\n\t\t\t\t\tairForceTeam.repairCenter = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// achievement\n\t\t\tint achievement = airForceTeam.achievement();\n\t\t\taccumulatedAchievement += achievement;\n\t\t\tachievementEffectiveFrame = achievementEffectiveFrame + airForceTeam.killedEffectiveFrame * 100 - airForceTeam.damagedEffectiveFrame;\n\t\t}\n\t}", "public Team update(TeamDTO teamForm) throws TeamNotFoundException;", "public void displayFoulsForTeamB(int fouls) {\n TextView foulsView = findViewById(R.id.team_b_fouls);\n foulsView.setText(String.valueOf(fouls));\n }", "public void updateTeam(int team, GameData gameData) {\n currentTeam = gameData.getTeamDataList().get(team);\n passButton.setVisible(false);\n answerField.setText(\"\");\n //if the current team is this client\n if (team == teamIndex) {\n AppearanceSettings.setEnabled(true, submitAnswerButton, answerField);\n announcementsLabel.setText(\"It's your turn to try to answer the question!\");\n }\n //if the current team is an opponent\n else {\n AppearanceSettings.setEnabled(false, submitAnswerButton, answerField);\n announcementsLabel.setText(\"It's \" + currentTeam.getTeamName() + \"'s turn to try to answer the question.\");\n }\n //mark down that this team has had a chance to answer\n teamHasAnswered.replace(team, true);\n hadSecondChance = false;\n teamLabel.setText(currentTeam.getTeamName());\n }", "private static void updateRecords() {\n for (Team t: Main.getTeams()){\n //If the team already exists\n if (SqlUtil.doesTeamRecordExist(c,TABLE_NAME,t.getIntValue(Team.NUMBER_KEY))){\n //Update team record\n updateTeamRecord(t);\n } else {\n //Create a new row in database\n addNewTeam(t);\n\n }\n }\n\n }", "public void displayFoulsForTeamB(int fouls) {\r\n TextView foulsView = (TextView) findViewById(R.id.team_b_fouls);\r\n foulsView.setText(String.valueOf(fouls));\r\n }", "public void updateAFDetail(VBAFDetail vbAFDetail)\r\n\t{\n\t\tAffiliateDAOUtil.updateAFDetail(vbAFDetail);\r\n\t}", "public static void updateAFlight() {\n \n \n\n int flightOptions;\n String flightId;\n String flightDestination;\n String flightOrigin;\n String airline;\n\n Flights myFlights;\n\n myFlights = new Flights();\n\n \n flightOptions = determineNumber(\"Please enter flight option: \");\n \n myFlights = (Flights) Flights.displayFlight(flightOptions);\n\n if (myFlights == null) {\n System.out.println(\"Flight not available.\");\n updateAFlight();\n\n } else {\n flightId = enterText(\"Please enter new flightID: \");\n myFlights.setFlightId(flightId);\n\n flightDestination = enterText(\"Please enter new flight destination: \");\n myFlights.setFlightDestination(flightDestination);\n\n flightOrigin = enterText(\"Please enter new flight origin: \");\n myFlights.setFlightOrigin(flightOrigin);\n\n airline = enterText(\"Please enter new airline: \");\n myFlights.setAirline(airline);\n flightManager();\n }\n\n }", "public void update() {\n\n dbWork.cleanAll();\n\n List<DataFromServiceKudaGo> list = requestDataFromService();\n\n List<Film> films = new ArrayList<>();\n for (DataFromServiceKudaGo data : list) {\n Film film = new Film(list.indexOf(data), data.getNameMovie(), data.getPosterMoviePath(),\n data.getRunning_time(), data.getPrice(), data.getImax(),\n data.getCountryFilm(), data.getYearFilm(), data.getTrailerFilm(),\n data.getAgeFilm(), data.getDirectorFilm(), data.getNameCinema(),\n data.getAddressCinema(), data.getPhone(), data.getStationAboutCinema(),\n data.getPosterCinemaPath(), data.getBeginning_time(), data.getDescription());\n films.add(film);\n }\n\n dbWork.setFilms(films);\n\n fillShows();\n }", "public static String updateFouls(String token, boolean isPositive, int teamId, int totalFouls) throws IOException {\n String SCORE_URI= String.format(isPositive?RestURI.INC_FOULS.getValue():RestURI.DEC_FOULS.getValue(), Server.getIp(), teamId, totalFouls, token);\n return executePut(SCORE_URI);\n }", "public boolean festivalUpdateAf(FestivalDto dto);", "public void updateFlightTeamStatus(List<Flight> flights) throws LogicException {\n\n try (ProxyConnection connection = ConnectionPool.getInstance().getConnection()) {\n FlightTeamDAO flightteamDao = new FlightTeamDAO(connection);\n for (Object flight : flights) {\n if (!flightteamDao.findFlightTeamByFlightId(((Flight) flight).getFlightId()).isEmpty()) {\n ((Flight) flight).setFlightTeam(true);\n } else {\n ((Flight) flight).setFlightTeam(false);\n }\n }\n } catch (DAOException e) {\n throw new LogicException(e);\n }\n }", "public ResultMessage updateCenterFreightBills(CFBVO vo) {\n\t\tResultMessage message=null;\n\t\ttry {\n\t\t\tBillsDataService billsData=RMIHelper.getDataFactory().getBillsDataFactory().getNewCenterFreightBillsData();\n\t\t\tmessage=billsData.updateBills(vo.FreightNum, new CenterFreightBills(vo.date,vo.FreightNum,\n\t\t\t\t\tvo.tramNum, vo.StartPlace, vo.EndPlace, vo.caseNum,\n\t\t\t\t\tvo.Scoutername, vo.price, vo.send, vo.po));\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn message;\n\t}", "public void addSixForTeamB(View v) {\n scoreTeamB = scoreTeamB + 6;\n displayForTeamB(scoreTeamB);\n }", "public void bFieldGoal(View view) {\n scoreTeamB = scoreTeamB + 3;\n displayForTeamB(scoreTeamB);\n }", "public void addTwoPointsToTeamB(View view)\n {\n scoreTeamB = scoreTeamB + 2;\n displayTeamBScore(scoreTeamB);\n }", "@Override\n public void updateBudgetPassed() {\n }", "public void updateUf() {\n ArrayList<FunctionalUnit> updateList = new ArrayList<>();\n updateList = FU.get(typeFU.GENERIC);\n for (int i = 0; i < updateList.size(); i++) {\n if (updateList.get(i).isExecFinish() == true) {\n updateList.get(i).setActive(true); \n }\n }\n updateList = FU.get(typeFU.ADD);\n for (int i = 0; i < updateList.size(); i++) {\n if (updateList.get(i).isExecFinish() == true) {\n updateList.get(i).setActive(true); \n }\n }\n updateList = FU.get(typeFU.MULT);\n for (int i = 0; i < updateList.size(); i++) {\n if (updateList.get(i).isExecFinish() == true) {\n updateList.get(i).setActive(true); \n }\n }\n }", "public void FoulTeamA(View view) {\n foulteamA = foulteamA + 1;\n displayFoulA(foulteamA);\n }", "private void setTeamInfo_Blue2() {\n blueTeamNumber2.setText(fixNumTeam(blueTeamNumber2.getText(), \"Blue 2\"));\n\n blueTeamNumber2.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.BLUE, FieldAndRobots.TWO,\n Integer.parseInt(blueTeamNumber2.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.TWO, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }", "public void addFaltasTeamA(View view) {\n faltasTeamA = faltasTeamA + 1;\n displayFaltasTeamA(faltasTeamA);\n }", "public void teamChange() {\n if (teamCombobox.getValue().getTeamLogo() != null) {\n teamPhoto.setImage(teamCombobox.getValue().getTeamLogo().getImage());\n }\n teamCode.setText(\"Team code : \" + teamCombobox.getValue().getTeamCode());\n }", "public void addOneForTeamB(View v) {\n scoreTeamB = scoreTeamB + 1;\n displayForTeamB(scoreTeamB);\n }", "public void addOneForTeamB(View v) {\n scoreTeamB = scoreTeamB + 1;\n displayForTeamB(scoreTeamB);\n }", "public void updateFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);", "public void addOnePointToTeamB(View view)\n {\n scoreTeamB++;\n displayTeamBScore(scoreTeamB);\n }", "@Override\r\n\tpublic void update(BbsDto dto) {\n\t\t\r\n\t}", "public void addTwoForTeamB(View v) {\n scoreTeamB = scoreTeamB + 2;\n displayForTeamB(scoreTeamB);\n }", "public void addVermelhosTeamB(View view) {\n vermelhosTeamB = vermelhosTeamB + 1;\n displayVermelhosTeamB(vermelhosTeamB);\n }", "public void plusFoulTeamA (View view) {\r\n foulsA++;\r\n displayFoulsForTeamA(foulsA);\r\n }", "public void ScoreTeamB(View view) {\n scoreteamB = scoreteamB +1;\n displayScoreB(scoreteamB);\n }", "public void updateTeamFromResults(Match m){\r\n \r\n //Update team1\r\n m.getTeam1().setGoalsFor(m.getTeam1().getGoalsFor() + m.getScore1());\r\n m.getTeam1().setGoalsAgainst(m.getTeam1().getGoalsAgainst() + m.getScore2());\r\n \r\n //Update team2\r\n m.getTeam2().setGoalsFor(m.getTeam2().getGoalsFor() + m.getScore2());\r\n m.getTeam2().setGoalsAgainst(m.getTeam2().getGoalsAgainst() + m.getScore1());\r\n \r\n //Add points\r\n if (m.getScore1() < m.getScore2()){\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 3);\r\n m.getTeam1().setMatchLost(m.getTeam1().getMatchLost() + 1);\r\n m.getTeam2().setMatchWon(m.getTeam2().getMatchWon() + 1);\r\n }\r\n else if (m.getScore1() > m.getScore2()){\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 3);\r\n m.getTeam2().setMatchLost(m.getTeam2().getMatchLost() + 1);\r\n m.getTeam1().setMatchWon(m.getTeam1().getMatchWon() + 1);\r\n }\r\n else {\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 1);\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 1);\r\n m.getTeam1().setMatchDrawn(m.getTeam1().getMatchDrawn() + 1);\r\n m.getTeam2().setMatchDrawn(m.getTeam2().getMatchDrawn() + 1);\r\n }\r\n \r\n //Update the rankings\r\n this.updateTeamRank();\r\n }", "public void displayFoulb (int foul){\n\n TextView foulA = (TextView)findViewById(R.id.team_b_foul);\n foulA.setText(String.valueOf(foul));\n }", "public Fighter[] update(Fighter[] fs, Platform plat, boolean[][] inputs)\r\n {\r\n //check if the player is starting a block\r\n setBlocking(fs[0],inputs[0]);\r\n setBlocking(fs[1],inputs[1]);\r\n\r\n //increase the timers and change the state of the block\r\n incrementBlock(fs[0]);\r\n incrementBlock(fs[1]);\r\n\r\n //check if the player is starting an attack and set the attack\r\n setAttacking(fs[0],plat,inputs[0]);\r\n setAttacking(fs[1],plat,inputs[1]);\r\n\r\n //increase the timers, change the state of the attack, and deal damage/knockback to the other fighter\r\n incrementAttack(fs[0],fs[1]);\r\n incrementAttack(fs[1],fs[0]);\r\n \r\n //if they aren't currently attacking, change their velocity and move the fighter\r\n if(fs[0].getAttacking() != 1)\r\n {\r\n setVels(fs[0],inputs[0],plat);\r\n }\r\n if(fs[1].getAttacking() != 1)\r\n {\r\n setVels(fs[1],inputs[1],plat);\r\n }\r\n\r\n //moves them based on knockback\r\n fs[0].setPos(fs[0].getPos()[0] + fs[0].getKnockBackVel()[0],fs[0].getPos()[1] + fs[0].getKnockBackVel()[1]);\r\n fs[1].setPos(fs[1].getPos()[0] + fs[1].getKnockBackVel()[0],fs[1].getPos()[1] + fs[1].getKnockBackVel()[1]);\r\n\r\n //decreases knockback\r\n fs[0].setKnockBackVel(fs[0].getKnockBackVel()[0]/kf, fs[0].getKnockBackVel()[1]/kf);\r\n fs[1].setKnockBackVel(fs[1].getKnockBackVel()[0]/kf, fs[1].getKnockBackVel()[1]/kf);\r\n\r\n //brings the fighters above the platform\r\n bringAbove(fs[0], plat);\r\n bringAbove(fs[1], plat);\r\n\r\n //brings the fighters back onto the screen\r\n bringBack(fs[0]);\r\n bringBack(fs[1]);\r\n \r\n return fs; \r\n }", "@Override\n\tpublic int updateTicket(Booking_ticket bt) {\n\t\treturn 0;\n\t}", "private void setTeamInfo_Blue1() {\n blueTeamNumber1.setText(fixNumTeam(blueTeamNumber1.getText(), \"Blue 1\"));\n\n blueTeamNumber1.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.BLUE, FieldAndRobots.ONE,\n Integer.parseInt(blueTeamNumber1.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.ONE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }", "public void frageFreischalten(int frageId) {\r\n dataStore.updateStatusOfFrage(frageId, Frage.STATUS_OFFEN);\r\n }", "public void displayFoulsForTeamA(int foul) {\n TextView foulsView = findViewById(R.id.team_a_fouls);\n foulsView.setText(String.valueOf(foul));\n }", "@Override\n\tpublic void updateWaybill(WaybillEntity waybill) {\n\t\t\n\t}", "private void setTeamInfo_Blue3() {\n blueTeamNumber3.setText(fixNumTeam(blueTeamNumber3.getText(), \"Blue 3\"));\n\n blueTeamNumber3.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.BLUE, FieldAndRobots.THREE,\n Integer.parseInt(blueTeamNumber3.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.THREE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }", "public abstract boolean updateBlackboard(Furniture c);", "@Test(dependsOnMethods = {\"testAddTeam\"})\n\tpublic void testUpdateTeam() {\n\t}", "@Override\n\tpublic void updateBourse(Bourse brs) {\n\t\t\n\t}", "public void updatePlayersAFKState()\n {\n // Iterate through all players\n for (Map.Entry<UUID, PlayerAFKModel> entry : players.entrySet())\n {\n PlayerAFKModel playerAFKModel = entry.getValue();\n\n // Check if player has moved\n if( playerAFKModel.hasMoved() )\n {\n // Moved\n\n // Check if AFK\n if( playerAFKModel.isAFK() )\n {\n // Is AFK. Then player left AFK\n playerAFKModel.markAsNotAFK();\n this.playerLeftAFK(Bukkit.getPlayer(playerAFKModel.getPlayer().getUniqueId()));\n }\n\n // Restart AFK timer\n playerAFKModel.timerStartOrRestart();\n } else {\n // Player hasn't moved\n\n // Check if player is AFK\n if ( !playerAFKModel.isAFK() )\n {\n // Not AFK. Check for how long\n if( playerAFKModel.hasBeenAFKFor(this.timeItTakesToGoAFK) )\n {\n // AFK for too long. Mark them as AFK\n this.playerWentAFK( playerAFKModel.getPlayer() );\n }\n } else {\n // Player is AFK already. Increase timer\n this.updatePlayerAFKTimer( playerAFKModel.getPlayer() );\n }\n }\n }\n }", "private void updateDBFrage(Frage frage) {\r\n FrageDTO dto = new FrageDTO(frage.getId(), frage.getText(), frage.getStatus());\r\n dataStore.updateFrage(dto);\r\n for (int i = 0; i < frage.getAntworten().size(); i++) {\r\n dataStore.updateStimmen(frage.getId(), i, frage.getStimmen().get(i));\r\n }\r\n }", "public void plusOneTeamB (View view) {\r\n scoreB++;\r\n displayScoreForTeamB(scoreB);\r\n }", "public void addThreePointsToTeamB(View view)\n {\n scoreTeamB = scoreTeamB + 3;\n displayTeamBScore(scoreTeamB);\n }", "public void addCantosTeamB(View view) {\n cantosTeamB = cantosTeamB + 1;\n displayCantosTeamB(cantosTeamB);\n }", "@Override\n\tpublic void updateBanque(Banque b) {\n\t\t\n\t}", "public static void update() {\n\t\tfor (int index = matches.length - 1; index >= 0; index--) {\n\t\t\tMatch left = null, right = null;\n\t\t\ttry {\n\t\t\t\tleft = matches[getLeft(index)];\n\t\t\t\tright = matches[getRight(index)];\n\t\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (left.getWinner() != null)\n\t\t\t\tmatches[index].setTeam1(left.getWinner());\n\t\t\telse\n\t\t\t\tmatches[index].setTeam1(null);\n\t\t\tif (right.getWinner() != null)\n\t\t\t\tmatches[index].setTeam2(right.getWinner());\n\t\t\telse\n\t\t\t\tmatches[index].setTeam2(null);\n\t\t}\n\t}", "public void addAmarelosTeamB(View view) {\n amarelosTeamB = amarelosTeamB + 1;\n displayAmarelosTeamB(amarelosTeamB);\n }", "public static void update_scoreboard2(){\n\t\t//Update score\n\tif(check_if_wicket2){\n\t\t\n\t\twicket_2++;\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\telse{\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\ttempshot2=PlayArena2.usershot2;\n\t\tteam_score_2=team_score_2+PlayArena2.usershot2;\n\t\treq=req-tempshot2;\n\t\t}\n\t\telse{\n\t\t\ttempshot2=PlayArena2.compshot2;\n\t\t\tteam_score_2=team_score_2+PlayArena2.compshot2;\n\t\t\treq=req-tempshot2;\n\t\t\t}\n\t\tif(req<0)\n\t\t{\treq=0;}\n\t\t\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\t// Overs update\n\tif(over_ball_2==5){\n\t\tover_ball_2=0;\n\t\tover_overs_2++;\n\t\tover_totalballs_2--;\n\t}\n\telse{\n\t\tover_ball_2++;\n\tover_totalballs_2--;}\n\tupdate_overs2.setText(\"\"+over_overs_2+\".\"+over_ball_2+\" (\"+PlayMode.overs+\")\");\n\t\n\t//Check if_first_inning_over\n\tif(over_overs_2==Integer.parseInt(PlayMode.overs) || wicket_2==3 || PlayBrain1.team_score_1<team_score_2)\n\t\t\t{\n\t\tif_second_inning_over=true;\n\t\treference2.add(PlayArena2.viewscore2);\n\t\t\t}\n\t\n\t\n\t//Needed update\n\t\t\tupdate_runrate2.setText(\"<html>NEED<br>\"+req+\"<br>OFF<br>\"+over_totalballs_2+\" <br>BALLS</html>\");\n\t\t}", "public void updateTeamTables() {\n ArrayList<Player> tempTeam = new ArrayList<>();\n ArrayList<Player> tempTaxi = new ArrayList<>();\n teamTable.getItems().clear();\n for (Team tt : dataManager.getDraft().getFantasyTeams()) {\n if (tt.getTeamName().equals(selectTeam.getSelectionModel().getSelectedItem())) {\n tempTeam = tt.getTeamList();\n tempTaxi = tt.getTaxiList();\n }\n }\n teamTable = resetTeamTable(tempTeam);\n teamTaxiTable = resetTaxiTable(tempTaxi);\n \n teamTable.getSortOrder().add(posCol);\n posCol.setComparator(positionCompare);\n posCol.setSortType(SortType.ASCENDING);\n posCol.setSortable(true);\n posCol.setSortable(false);\n }", "public void Team_B_2_Points(View v) {\n teamBScore = teamBScore + 2;\n displayForTeamB(teamBScore);\n }", "public static void setTeam(UserTeam team) {\n\t\tgame.setTmpTeam(team);\n\t\tint i=0;\n\t\tfor (Iterator<FootballPlayer> iterator = team.getPlayers().values().iterator(); iterator\n\t\t\t\t.hasNext();) {\n\t\t\tFootballPlayer player = iterator.next();\n\t\t\tnamesLabels.get(i).setText(game.getLastName(player.getName()));\n\t\t\tshirtLabels.get(i).setIcon(MainGui.getShirt(player.getTeamName()));\n\t\t\tbuttonArray[i].setText(\"X\");\n\t\t\ti++;\n\t\t}\n\t}", "void updateFavor(HouseFavor houseFavor);", "private static void updateTeamRecord(Team t) {\n ArrayList<Object> records = new ArrayList<>();\n //Get existing team data\n ResultSet teamSet = SqlUtil.getTeamRecord(c, TABLE_NAME, t.getIntValue(Team.NUMBER_KEY));\n try {\n ArrayList<String> matches;\n if (teamSet != null) {\n matches = new ArrayList<>(Arrays.asList(SqlUtil.getArrayFromString(teamSet.getString(\"match_nums\"))));\n } else {\n Main.sendError(\"Cannoy read team data: \" + t.getValue(Team.NUMBER_KEY),false);\n return;\n }\n for (String m: matches) {\n //If the match number already exists\n System.out.println(m);\n if (t.getStringValue(Team.MATCH_KEY).equalsIgnoreCase(m.trim())) {\n return;\n }\n }\n records.add(t.getIntValue(Team.NUMBER_KEY));\n records.add(t.getValue(Team.COLOR_KEY));\n records.add(1+teamSet.getInt(\"num_matches\"));\n matches.add(t.getStringValue(Team.MATCH_KEY));\n records.add(matches.toArray(new String[matches.size()]));\n for(Element e: Main.getElements()){\n switch (e.getType()){\n\n case SEGMENTED_CONTROL:\n for (int i = 0; i<e.getArguments().length;i++){\n if (t.getStringValue(e.getKeys()[0]).equalsIgnoreCase(e.getArguments()[i])){\n records.add(1+teamSet.getInt(e.getColumnValues()[i]));\n } else {\n records.add(teamSet.getInt(e.getColumnValues()[i]));\n }\n }\n break;\n case TEXTFIELD:\n if (e.getArguments()[0].equalsIgnoreCase(\"number\")) {\n records.add(t.getIntValue(e.getKeys()[0]) + teamSet.getInt(e.getColumnValues()[0]));\n\n } else if (e.getArguments()[0].equalsIgnoreCase(\"decimal\")){\n records.add(t.getDoubleValue(e.getKeys()[0]) + teamSet.getInt(e.getColumnValues()[0]));\n }\n break;\n case STEPPER:\n records.add(t.getIntValue(e.getKeys()[0]) + teamSet.getInt(e.getColumnValues()[0]));\n break;\n case LABEL:\n break;\n case SWITCH:\n for (int i = 0; i<e.getKeys().length;i++){\n if (t.getStringValue(e.getKeys()[i]).equalsIgnoreCase(\"yes\")){\n records.add(1 + teamSet.getInt(e.getColumnValues()[i*2]));\n records.add(teamSet.getInt(e.getColumnValues()[i*2+1]));\n } else {\n records.add(teamSet.getInt(e.getColumnValues()[i*2]));\n records.add(1 + teamSet.getInt(e.getColumnValues()[i*2+1]));\n }\n }\n break;\n case SPACE:\n break;\n case SLIDER:\n records.add(t.getDoubleValue(e.getKeys()[0]) + teamSet.getDouble(e.getColumnValues()[0]));\n break;\n }\n }\n double total = 0.0;\n\n for (Equation e: Main.getEquations()){\n double value = e.evaluate(t) + teamSet.getDouble(e.getColumnValue());\n records.add(value);\n total +=value;\n }\n\n records.add(total);\n\n SqlUtil.updateTeamRecord(c,TABLE_NAME, records.toArray(new Object[records.size()]),t.getStringValue(Team.NUMBER_KEY));\n\n } catch (SQLException e) {\n Main.sendError(\"Problem updating team records\", false, e);\n } catch (NullPointerException e){\n Main.sendError(\"Cannot read team data for team \" + t.getValue(Team.NUMBER_KEY),false,e);\n }\n }", "public void setUpdateData() {\n positionFenceToUpdateinController = Controller.getPositionFenceInArrayById(this.idFenceToUpdate);\n if(positionFenceToUpdateinController >= 0) {\n Fence fence = Controller.fences.get(positionFenceToUpdateinController);\n ((MainActivity)getActivity()).getSupportActionBar().setTitle(Constant.TITLE_VIEW_UPDATE_FENCE + \": \" + fence.getName());\n this.nameFence.setText(fence.getName());\n this.addressFence.setText(fence.getAddress());\n this.cityFence.setText(fence.getCity());\n this.provinceFence.setText(fence.getProvince());\n this.numberFence.setText(fence.getNumber());\n this.textSMSFence.setText(fence.getTextSMS());\n int index = (int)Constant.SPINNER_RANGE_POSITIONS.get(fence.getRange());\n this.spinnerRange.setSelection(index);\n this.spinnerEvent.setSelection(fence.getEvent());\n }\n }", "protected abstract void gatherTeam();", "public static void updateFlight() {\n\n String flightId;\n String flightDestination;\n String flightOrigin;\n String airline;\n\n Flights myFlights = new Flights();\n\n if (myFlights == null) {\n System.out.println(\"Flight not available.\");\n updateFlight();\n\n } else {\n flightId = writeText(\"Please enter new flight ID: \");\n myFlights.setFlightId(flightId);\n\n flightDestination = writeText(\"Please enter new destination: \");\n myFlights.setFlightDestination(flightDestination);\n\n flightOrigin = writeText(\"Please enter new flight origin: \");\n myFlights.setFlightOrigin(flightOrigin);\n\n airline = writeText(\"Please enter new airline: \");\n myFlights.setAirline(airline);\n\n }\n\n }", "private void update() {\n ambianceModel.ambiance.uniq_id = ambianceModel._id.$oid;\n\n RestAdapter restAdapter = new RestAdapter.Builder().setLogLevel(RestAdapter.LogLevel.FULL).setEndpoint(getResources().getString(R.string.api)).build();\n final GsonBuilder builder = new GsonBuilder();\n builder.excludeFieldsWithoutExposeAnnotation();\n builder.disableHtmlEscaping();\n final Gson gson = builder.create();\n Request r = new Request(Singleton.token, ambianceModel._id.$oid, ambianceModel);\n String json = gson.toJson(r);\n Log.v(\"Ambiance activity\", json);\n\n final Lumhueapi lumhueapi = restAdapter.create(Lumhueapi.class);\n lumhueapi.updateAmbiance(r, new Callback<AmbianceApplyResponse>() {\n @Override\n public void success(AmbianceApplyResponse ambianceApplyResponse, Response response) {\n Log.v(\"Ambiance activity\", \"It worked\");\n }\n\n @Override\n public void failure(RetrofitError error) {\n String tv = error.getMessage();\n Log.v(\"Ambiance activity\", tv + \"\");\n }\n });\n }", "public FightTeam team();", "@Override\r\n\tpublic boolean updateScheduledFlights(ScheduledFlights sflight) {\r\n\t\tentityManager.getTransaction().begin();\r\n\t\tentityManager.merge(sflight);\r\n\t\tentityManager.getTransaction().commit();\r\n\t\treturn true;\r\n\t}", "Flight updateFlight(Flight flight);", "private void almacenarFallos() {\n BaseDatos bd = new BaseDatos(this);\n// Log.i(\"FALLOS\",\"Nmero de fallos final: \"+fallos);\n bd.updatePalabra(palabraActual.getId(),fallos);\n\n bd.close();\n }", "public void update() {\n\n if (!isSelected){\n goalManagement();\n }\n\n if (chair != null){ // si une chaise lui est désigné\n if (!hasAGoal && !isSelected){ // et qu'il n'a pas d'objectif\n setSit(true);\n position.setX(chair.getX());\n }\n\n if (isSit){\n chair.setChairState(Chair.ChairState.OCCUPIED);\n }else {\n chair.setChairState(Chair.ChairState.RESERVED);\n }\n }\n\n if (tired > 0 ){\n tired -= Constants.TIRED_LOSE;\n }\n\n if (isSit && comfort>0){\n comfort -= Constants.COMFORT_LOSE;\n }\n\n if (isSitOnSofa && comfort<100){\n comfort += Constants.COMFORT_WIN;\n }\n\n if (!hasAGoal && moveToCoffee && coffeeMachine!=null){\n moveToCoffee = false;\n tired=100;\n\n coffeeMachine.setCoffeeTimer(new GameTimer()) ;\n coffeeMachine.getCoffeeTimer().setTimeLimit(Constants.COFFEE_TIME_TO_AVAILABLE);\n coffeeMachine = null;\n backToSpawn();\n }\n\n if (!hasAGoal && moveToSofa){\n moveToSofa = false;\n isSitOnSofa = true;\n dir = 0 ;\n position.setY(position.getY()-Constants.TILE_SIZE);\n }\n\n if (isSelected){\n flashingColor ++;\n if (flashingColor > 2 * flashingSpeed){\n flashingColor = 0;\n }\n }\n\n }", "public void acheter(){\n\t\t\n\t\t// Achete un billet si il reste des place\n\t\ttry {\n\t\t\tthis.maBilleterie.vendre();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tthis.status.put('B', System.currentTimeMillis());\n\t\tSystem.out.println(\"STATE B - Le festivalier \" + this.numFestivalier + \" a acheté sa place\");\n\t}", "private void upToFireBase(Bill _bill)\n {\n Log.d(\"RECORD\", \"Up to firebase\"+_fbfs);\n String _number_room = _bill.getRoom().getPhase()+String.valueOf(_bill.getRoom().getFloor())+_bill.getRoom().getNumber_room();\n _fbfs.collection(\"Resident\")\n .document(\"USER\")\n .collection(_number_room)\n .document(_bill.getMonth()+_bill.getYear())\n .set(_bill)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(\"RECORD\", \"SUCCESS\");\n PHASE_CHOOSE = _room.getPhase();\n FLOOR_CHOOSE = String.valueOf(_room.getFloor());\n goToNextPage();\n Toast.makeText(getActivity(), \"Success\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"RECORD\", \"FAILED\");\n Toast.makeText(getActivity(), \"Not found\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void updateStudentFees(double fees){\n feesPaid+=fees;\n school.updateMoneyEarned(feesPaid);\n }", "void resetMyTeam();", "public void updateForum(Forum forum);", "public void updateItem(IItem schedulerValueObject, IPersistenceObjectsFactory factory) {\n try {\n\n OpicsNettingSchedulerItem opicsDaemonValueObject = (OpicsNettingSchedulerItem) schedulerValueObject;\n int itemStatus = opicsDaemonValueObject.getItemStatus();\n\n IBOUB_OPX_NettingScheduler opicsBalancesHandoffItem = (IBOUB_OPX_NettingScheduler) factory.findByPrimaryKey(\n IBOUB_OPX_NettingScheduler.BONAME, opicsDaemonValueObject.getItemID(), false);\n\n if (updateParameters) {\n opicsBalancesHandoffItem.setF_NOSTROUPDATEFREQUENCY(nostroUpdateFrequency);\n opicsBalancesHandoffItem.setF_POSITIONUPDATEFREQUENCY(positionUpdateFrequency);\n opicsBalancesHandoffItem.setF_ISNOSTROHANDOFFENABLE(isNostroUpdateEnabled);\n opicsBalancesHandoffItem.setF_ISPOSITIONHANDOFFENABLE(isPositionUpdateEnabled);\n updateParameters = false;\n }\n\n // Update the static variables from the database\n nostroUpdateFrequency = opicsBalancesHandoffItem.getF_NOSTROUPDATEFREQUENCY();\n positionUpdateFrequency = opicsBalancesHandoffItem.getF_POSITIONUPDATEFREQUENCY();\n isNostroUpdateEnabled = opicsBalancesHandoffItem.isF_ISNOSTROHANDOFFENABLE();\n isPositionUpdateEnabled = opicsBalancesHandoffItem.isF_ISPOSITIONHANDOFFENABLE();\n\n updateOpicsNettedBalancesSchedulerStatus(itemStatus, opicsBalancesHandoffItem, schedulerValueObject, factory);\n if (itemStatus == IItemStatusCodes.FAILED) {\n logger.error(\"A Bankfusion exception has occured which has stopped the daemon\");\n }\n if (itemStatus == IItemStatusCodes.PROCESSED) {\n Timestamp now = SystemInformationManager.getInstance().getBFBusinessDateTime();\n if (opicsDaemonValueObject.isProcessNostros() && opicsBalancesHandoffItem.isF_ISNOSTROHANDOFFENABLE()) {\n long nostroOffset = (opicsBalancesHandoffItem.getF_NOSTROUPDATEFREQUENCY() * oneMinute) - 1000;\n opicsBalancesHandoffItem.setF_NEXTNOSTROUPDTTM(new Timestamp(now.getTime() + nostroOffset));\n }\n if (opicsDaemonValueObject.isProcessPositions() && opicsBalancesHandoffItem.isF_ISPOSITIONHANDOFFENABLE()) {\n long positionOffset = (opicsBalancesHandoffItem.getF_POSITIONUPDATEFREQUENCY() * oneMinute) - 1000;\n opicsBalancesHandoffItem.setF_NEXTPOSITIONUPDTTM(new Timestamp(now.getTime() + positionOffset));\n }\n }\n }\n catch (BankFusionException exception) {\n logger.error(\"A Bankfusion exception has occured\", exception);\n return;\n }\n catch (Exception exception) {\n logger.error(\"An unknown exception has occured\", exception);\n return;\n }\n }", "protected abstract void assignTeam(boolean playerR, boolean playerB);", "@Override\r\n\tpublic void updateFamille(Famille C) {\n\t\r\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n\t \tsession.beginTransaction();\r\n\t \tsession.update(C);\r\n\t \tsession.getTransaction().commit();\r\n\t}", "@Override\n\tpublic void update(Factura t) {\n\t\tfacturaRepository.save(t);\n\t\t\n\t}", "private void coins_fB(){\n\t\tthis.cube[22] = this.cube[18]; \n\t\tthis.cube[18] = this.cube[24];\n\t\tthis.cube[24] = this.cube[26];\n\t\tthis.cube[26] = this.cube[20];\n\t\tthis.cube[20] = this.cube[22];\n\t}", "public void addThreeForTeamB(View v) {\n scoreTeamB = scoreTeamB + 3;\n displayForTeamB(scoreTeamB);\n }", "public void update(BaseDataDataIteamIB p) {\n\t\tif(p.getPks_id() != mPacketID)\n\t\t\treturn;\n\t\t\n\t\tmPacketVer = p.getPks_ver();\n\t\thasChannelList.clear();\n\n\t\tif(p.getChannel() != null) {\n\t\t\tfor(BaseDataDataChannelIB c : p.getChannel()) {\n\t\t\t\thasChannelList.add(c.getChannel_id());\n\t\t\t}\n\t\t\tif(mCurChannelID == -1 && hasChannelList.size() > 0) {\n\t\t\t\tmCurChannelID = hasChannelList.get(0);\n\t\t\t}\n\t\t}\n\n if(hasChannelList.size() == 0)\n mCurChannelID = -1;\n\t}", "@Override\n\tpublic void updateFlashcard(Flashcard f) {\n\t\t\n\t}", "@Override\n\tpublic void update(DhtmlxGridForm f) throws Exception {\n\t\t\n\t}", "@Override\r\n\tpublic boolean updateFeback(Feedback f) {\n\t\tString sql = \"UPDATE user SET userId = ?,feedbackInfo = ? where feedbackId = ? \";\r\n\t\treturn BaseDao.execute(sql, f.getUserId(), f.getFeedbackInfo(), f.getFeedbackId()) > 0;\r\n\t}", "public boolean ModificarFutbolista(Futbolistas fut) {\n //LLamamos previamente a los validadores\n if ((validarNif(fut.getNif())\n && (validarFecha(fut.getFecha_nacimiento())))) {\n try {\n CallableStatement call = this.getConnection().prepareCall(\"{call updateFutbolista (?,?,?,?,?,?)}\");\n call.setInt(1, fut.getId_futbolista());\n call.setString(2, fut.getNif());\n call.setString(3, fut.getNombre());\n call.setString(4, fut.getApellidos());\n call.setDate(5, Date.valueOf(fut.getFecha_nacimiento()));\n call.setString(6, fut.getNacionalidad());\n call.execute();\n close(call);\n return true;\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n }\n return false;\n } else {\n return false;\n }\n }", "public static void updateTeamPanels(Team team1, Team team2){\n team1Panel.clear();\n team2Panel.clear();\n tournament.clearPendingWinningTeam();\n\n // Set titles equal to team names\n team1Panel.setTitle(team1.teamName);\n team2Panel.setTitle(team2.teamName);\n\n // Start with team name\n Label team1Label = new Label(team1.teamName);\n team1Label.addStyleName(\"big-text\");\n\n Label team2Label = new Label(team2.teamName);\n team2Label.addStyleName(\"big-text\");\n\n team1Panel.add(team1Label);\n team2Panel.add(team2Label);\n\n StringBuilder team1HTML = new StringBuilder();\n StringBuilder team2HTML = new StringBuilder();\n\n team1HTML.append(\"<ul class=\\\"list-group\\\">\");\n team2HTML.append(\"<ul class=\\\"list-group\\\">\");\n\n // Iterate through players on each team and list them below the team name\n for (Player player : team1.values()){\n team1HTML.append(\"<li class=\\\"list-group-item\\\">\").append(player.getSummonerName()).append(\"</li>\");\n }\n for (Player player : team2.values()){\n team2HTML.append(\"<li class=\\\"list-group-item\\\">\").append(player.getSummonerName()).append(\"</li>\");\n }\n\n team1HTML.append(\"</ul>\");\n team2HTML.append(\"</ul>\");\n\n HTMLPanel team1HTMLPanel = new HTMLPanel(team1HTML.toString());\n HTMLPanel team2HTMLPanel = new HTMLPanel(team2HTML.toString());\n\n team1Panel.add(team1HTMLPanel);\n team2Panel.add(team2HTMLPanel);\n\n Button team1button = new Button(\"Select team as winner\", team1SelectorHandler);\n Button team2button = new Button(\"Select team as winner\", team2SelectorHandler);\n\n team1button.addStyleName(\"btn btn-default\");\n team2button.addStyleName(\"btn btn-default\");\n\n team1Panel.add(team1button);\n team2Panel.add(team2button);\n\n }", "@OnClick(R.id.team_b_1_button)\n public void add1TeamB() {\n addToScore(scoreBTextView, 1);\n }", "private void actualizarFondo() {\n actualizaEstadoMapa();\n if (modificacionFondoBase == true && estadoJuego != EstadoJuego.PAUSADO && estadoJuego != EstadoJuego.PIERDE){\n moverFondo();\n } else if (modificacionFondoBase == false && estadoJuego != EstadoJuego.PAUSADO && estadoJuego != EstadoJuego.PIERDE ){\n texturaFondoBase= texturaFondo1_1;\n texturaFondoApoyo= texturaFondo1_2;\n moverFondo();\n }\n }", "private void update() {\n\n\t\tfloat shopping = Float.parseFloat(label_2.getText());\n\t\tfloat giveing = Float.parseFloat(label_5.getText());\n\t\tfloat companyDemand = Float.parseFloat(label_7.getText());\n\n\t\ttry {\n\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t.prepareStatement(\"update customer_list set Shopping_Account = \"\n\t\t\t\t\t\t\t+ shopping\n\t\t\t\t\t\t\t+ \" , Giving_Money_Account = \"\n\t\t\t\t\t\t\t+ giveing\n\t\t\t\t\t\t\t+ \", Company_demand = \"\n\t\t\t\t\t\t\t+ companyDemand\n\t\t\t\t\t\t\t+ \" where Name = '\"\n\t\t\t\t\t\t\t+ name\n\t\t\t\t\t\t\t+ \"' And Last_Name = '\"\n\t\t\t\t\t\t\t+ lastName + \"' \");\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t}", "private void update() {\n\t\t\n\t\tlinkID.setText(\"\"+workingLink.ID);\n\t\t\n\t\troomIDA.setText(\"\"+this.workingLink.targetRooms[0].ID);\n\t\t\n\t\t//Falls bisher nur ein Link-Part gesetzt wurde\n\t\tif(workingLink.targetRooms[1] == null)\n\t\t\troomIDB.setText(\"nicht gesetzt\");\n\t\telse\n\t\t\troomIDB.setText(\"\"+this.workingLink.targetRooms[1].ID);\n\t\t\n\t\t\n\t\tfieldPosA.setText(\"\"+this.workingLink.targetFields[0].pos);\n\t\t\n\t\t//Falls bisher nur ein Link-Part gesetzt wurde\n\t\tif(workingLink.targetFields[1] == null)\n\t\t\tfieldPosB.setText(\"nicht gesetzt\");\n\t\telse\n\t\t\tfieldPosB.setText(\"\"+this.workingLink.targetFields[1].pos);\n\t}", "@Override\r\n\tpublic void update(FollowUp followup) {\n\t\t\r\n\t}", "public void update(TheatreMashup todo) {\n\t\t\n\t}", "void updateAccount();", "public void payFees(int fees) {\n feesPaid += fees;\n School.updateTotalMoneyEarned(feesPaid);\n }", "@Test\n\tpublic void Teams_26076_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\n\t\tsugar().documents.navToListView();\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\n\t\t// search the record to update team \n\t\t// TODO: VOOD-975\n\t\tsearchBtnCtrl = new VoodooControl(\"input\", \"id\", \"search_form_submit\");\n\t\tVoodooControl nameBasic = new VoodooControl(\"input\", \"id\", \"document_name_basic\");\n\t\tnameBasic.set(documentData.get(0).get(\"documentName\"));\n\t\tsearchBtnCtrl.click();\n\t\tVoodooUtils.focusDefault();\n\n\t\t// update the team for the searched record\n\t\tsugar().documents.listView.checkRecord(1);\n\t\tsugar().documents.listView.openActionDropdown();\n\t\tsugar().documents.listView.massUpdate();\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\t\t// TODO: VOOD-768, VOOD-1160\n\t\tnew VoodooControl(\"button\", \"css\", \"#MassUpdate_team_name_table button.button.firstChild\").click();\n\t\tVoodooUtils.waitForReady();\n\t\tVoodooUtils.focusWindow(1);\n\t\tnew VoodooControl(\"input\", \"id\", \"massall\").click();\n\t\tnew VoodooControl(\"input\", \"id\", \"search_form_select\").click();\n\t\tVoodooUtils.focusWindow(0);\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\t\tnew VoodooControl(\"input\", \"id\", \"update_button\").click();\n\t\tVoodooUtils.acceptDialog();\n\t\tVoodooUtils.waitForReady();\n\t\tVoodooUtils.focusDefault();\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\n\t\t// clear the search\n\t\tnameBasic.set(\"\");\n\t\tsearchBtnCtrl.click();\n\n\t\t// TODO: VOOD-975\n\t\t// Go to advance search \n\t\tnew VoodooControl(\"a\", \"id\", \"advanced_search_link\").click();\n\t\tVoodooUtils.waitForReady();\n\n\t\t// TODO: VOOD-1162\n\t\tVoodooControl teamCtrl= new VoodooControl(\"input\", \"css\", \"#search_form_team_name_advanced_table .yui-ac-input\");\n\t\tVoodooControl selectCtrl= new VoodooControl(\"li\", \"css\", \"#search_form_team_name_advanced_table ul li:nth-child(1)\");\n\t\tVoodooControl searchTypeCtrl = new VoodooControl(\"input\", \"css\", \"#team_name_advanced_type[value='all']\");\n\t\tsearchCtrl = new VoodooControl(\"input\", \"id\", \"search_form_submit_advanced\");\n\t\tVoodooControl docListCtrl = new VoodooControl(\"td\", \"css\", \"#MassUpdate > table\");\n\n\t\t// input team i.e East\n\t\tFieldSet teamData = testData.get(testName).get(0);\n\t\tteamCtrl.set(teamData.get(\"teamName\"));\n\t\t// search and select team \n\t\tselectCtrl.click();\n\t\tVoodooUtils.waitForReady();\n\n\t\t// Select a radio button below the team id (i.e. At least)\n\t\tsearchTypeCtrl.click();\n\n\t\t// click search\n\t\tsearchCtrl.click();\n\n\t\t// Assert record with searched team id (team1) in the list \n\t\tdocListCtrl.assertContains(documentData.get(0).get(\"documentName\"), true);\n\n\t\t// search record for default team i.e Global\n\t\tteamCtrl.set(teamData.get(\"defaultTeam\"));\n\t\t// select team\n\t\tselectCtrl.click();\n\t\tVoodooUtils.waitForReady();\n\n\t\t// click the search button\n\t\tsearchCtrl.click();\n\n\t\t// Assert list record for searched team id \n\t\tfor (int i = 0 ; i < documentData.size() ; i++) {\n\t\t\tdocListCtrl.assertContains(documentData.get(i).get(\"documentName\"), true);\n\t\t}\n\n\t\t// Add Team\n\t\tnew VoodooControl(\"button\", \"css\", \"#search_form_team_name_advanced_table button[name='teamAdd']\").click();\n\t\tVoodooUtils.waitForReady();\n\t\tnew VoodooControl(\"input\", \"css\", \"#search_form_team_name_advanced_table tr:nth-child(3) td .yui-ac-input\").set(teamData.get(\"teamName\"));\n\t\tVoodooUtils.waitForReady();\n\t\tnew VoodooControl(\"li\", \"css\", \"#search_form_team_name_advanced_table tbody tr:nth-child(3) ul li:nth-child(1)\").click();\n\n\t\t// click the search button\n\t\tsearchCtrl.click();\n\n\t\t// Assert record with searched teams i.e. Global, East in the list \n\t\tdocListCtrl.assertContains(documentData.get(0).get(\"documentName\"), true);\n\t\tVoodooUtils.focusDefault();\n\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}" ]
[ "0.6709867", "0.669145", "0.6406332", "0.63781613", "0.63032985", "0.61150706", "0.60518694", "0.603191", "0.5995035", "0.5917629", "0.58902484", "0.58618236", "0.5859779", "0.5817429", "0.5807577", "0.5792117", "0.57638556", "0.57179624", "0.5716268", "0.571527", "0.56785494", "0.5677536", "0.565257", "0.56251043", "0.5597671", "0.55882525", "0.5579488", "0.5560347", "0.55507374", "0.55423933", "0.55410415", "0.55410415", "0.5520854", "0.55205244", "0.55127525", "0.5501965", "0.5484894", "0.5480944", "0.54725254", "0.5452033", "0.5437027", "0.5436003", "0.5433233", "0.5403227", "0.54008603", "0.54006195", "0.5399341", "0.5385846", "0.53638697", "0.5361436", "0.53604126", "0.5354999", "0.5341042", "0.53321755", "0.532269", "0.53221476", "0.5321593", "0.53213525", "0.53114676", "0.5309606", "0.53066134", "0.5303101", "0.5297911", "0.5297794", "0.5294206", "0.52824074", "0.5281895", "0.5279954", "0.52727246", "0.52682203", "0.5267837", "0.5262412", "0.5261285", "0.52604884", "0.5259925", "0.52564865", "0.5249759", "0.5240086", "0.52292573", "0.52170783", "0.5216576", "0.5214696", "0.52003986", "0.51982117", "0.5195471", "0.51863486", "0.518598", "0.51852864", "0.51757026", "0.5172485", "0.51705605", "0.516913", "0.51688004", "0.51641417", "0.5158193", "0.5153032", "0.51507926", "0.5150277", "0.51499027", "0.51476824" ]
0.65480834
2
Method used to Reset all the scores and fouls to 0
public void Reset(View view) { displayFoulA(0); displayScoreA(0); displayScoreB(0); displayFoulb(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reset() {\n\t\tscore = 0;\n\t}", "public void reset()\n {\n currentScore = 0;\n }", "public void resetScore() {\n\t\tthis.score = 0;\n\t}", "public void resetScore(){\n Set<String> keys = CalcScore.keySet();\n for(String key: keys){\n CalcScore.replace(key,0.0);\n }\n\n\n\n }", "public void resetScore();", "private void resetValues() {\n teamAScoreInt = 0;\n teamBScoreInt = 0;\n teamAFoulScoreInt = 0;\n teamBFoulScoreInt = 0;\n }", "public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}", "public synchronized void resetScore() {\n score = 0;\n char2Type = -1;\n setScore();\n }", "public void reset() {\n\tthis.pinguins = new ArrayList<>();\n\tthis.pinguinCourant = null;\n\tthis.pret = false;\n\tthis.scoreGlacons = 0;\n\tthis.scorePoissons = 0;\n }", "@Override\n public void reset() {\n updateDice(1, 1);\n playerCurrentScore = 0;\n playerScore = 0;\n updateScore();\n notifyPlayer(\"\");\n game.init();\n }", "private void reset() {\n\t\tsnake.setStart();\n\n\t\tfruits.clear();\n\t\tscore = fruitsEaten = 0;\n\n\t}", "public void resetScore() {\n this.myCurrentScoreInt = 0;\n this.myScoreLabel.setText(Integer.toString(this.myCurrentScoreInt));\n }", "public void reset() {\r\n active.clear();\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n rolled = 0;\r\n phase = 0;\r\n round = 0;\r\n action = 0;\r\n }", "void reset() {\n myManager.reset();\n myScore = 0;\n myGameOver = false;\n myGameTicks = myInitialGameTicks;\n myOldGameTicks = myInitialGameTicks;\n repaint();\n }", "public void resetAllScores(View view) {\n teamA_score = 0;\n teamB_score = 0;\n ADVANTAGE = 0;\n enableScoreView();\n unSetWinnerImage();\n displayTeamA_score(teamA_score);\n displayTeamB_score(teamB_score);\n\n }", "public void resetTheGame(){\n\t\tfjCount = 0;\n\t\tquestionAnsweredCount = 0;\n\t\tfor(int i = 0 ; i< 5; i++){\n\t\t\tfor(int j = 0 ; j < 5 ; j++){\n\t\t\t\tboard[i][j].reset();\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0 ; i < teamNum; i ++){\n\t\t\tteams[i].reset();\n\t\t\tbets[i] = 0; \n\t\t}\n\t}", "public void reset() {\n\t\tfor (int i = 0; i < stats.size(); i++) {\n\t\t\tstats.get(i).reset();\n\t\t}\n\t}", "public void resetAllScores(View v) {\n scorePlayerB = 0;\n scorePlayerA = 0;\n triesPlayerA = 0;\n triesPlayerB = 0;\n displayForPlayerA(scorePlayerA);\n displayForPlayerB(scorePlayerB);\n displayTriesForPlayerA(triesPlayerA);\n displayTriesForPlayerB(triesPlayerB);\n }", "private void reset(){\n getPrefs().setEasyHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n getPrefs().setMediumHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n getPrefs().setHardHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n easyData.setText(formatHighScore(getPrefs().getEasyHighScore()));\n mediumData.setText(formatHighScore(getPrefs().getMediumHighScore()));\n hardData.setText(formatHighScore(getPrefs().getHardHighScore()));\n }", "public void reset() {\n this.count = 0;\n this.average = 0.0;\n }", "public void deleteScore() {\n\t\tthis.score = 0;\n\t}", "@Override\n\tpublic void reset() {\n\t\tfor(int i=0; i<mRemainedCounters; i++){\n\t\t\tfinal ICounter counter = this.mCounters.getFirst();\n\t\t\tcounter.reset();\n\t\t\tthis.mCounters.removeFirst();\n\t\t\tthis.mCounters.addLast(counter);\n\t\t}\n\t\tthis.mRemainedCounters = this.mCounters.size();\n\t}", "public void newScore()\n {\n score.clear();\n }", "protected void clearUpdateScores() {\n\t\tupdateScore.clear();\n\t}", "private void resetStats() {\n }", "public void resetScore(View view) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n displayForTeamA(0);\n displayForTeamB(0);\n }", "public void reset(View view) {\r\n scoreA = 0;\r\n scoreB = 0;\r\n foulsA = 0;\r\n foulsB = 0;\r\n displayScoreForTeamA(scoreA);\r\n displayFoulsForTeamA(foulsA);\r\n displayScoreForTeamB(scoreB);\r\n displayFoulsForTeamB(foulsB);\r\n }", "@Override\n public void clear() {\n GameObject.clearAll();\n Scene.score = 0;\n\n }", "public void resetScore(View v) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n displayForTeamA(scoreTeamA);\n displayForTeamB(scoreTeamB);\n }", "public void resetScore(View v) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n displayForTeamA(scoreTeamA);\n displayForTeamB(scoreTeamB);\n }", "public void reset ()\n\t{\n\t\t//The PaperAirplane and the walls (both types) use their reconstruct ()\n\t\t//method to set themselves back to their starting points.\n\t\tp.reconstruct ();\n\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i].reconstruct ();\n\t\t\n\t\tfor (int i = 0; i < sW.length; i++)\n\t\t\tsW[i].reconstruct ();\n\t\t\t\n\t\t//the time is reset using the resetTime () method from the Timer class.\n\t\ttime.resetTime ();\n\t\t\n\t\t//the score is reset using the reconstruct method from the Score class.\n\t\tscore.reconstruct ();\n\t\t\n\t\t//The following variables are set back to their original values set in\n\t\t//the driver class.\n\t\ttimePassed = 0;\t\n\t\tnumClicks = 0;\n\t\teventFrame = 0;\n\t\tlevel = 1;\n\t\txClouds1 = 0;\n\t\txClouds2 = -500;\n\t\tyBkg1 = 0;\n\t\tyBkg2 = 600;\t\t\n\t}", "public void reset() {\n\n\t\tazDiff = 0.0;\n\t\taltDiff = 0.0;\n\t\trotDiff = 0.0;\n\n\t\tazMax = 0.0;\n\t\taltMax = 0.0;\n\t\trotMax = 0.0;\n\n\t\tazInt = 0.0;\n\t\taltInt = 0.0;\n\t\trotInt = 0.0;\n\n\t\tazSqInt = 0.0;\n\t\taltSqInt = 0.0;\n\t\trotSqInt = 0.0;\n\n\t\tazSum = 0.0;\n\t\taltSum = 0.0;\n\t\trotSum = 0.0;\n\n\t\tcount = 0;\n\n\t\tstartTime = System.currentTimeMillis();\n\t\ttimeStamp = startTime;\n\n\t\trotTrkIsLost = false;\n\t\tsetEnableAlerts(true);\n\n\t}", "public void reset() {\n sum1 = 0;\n sum2 = 0;\n }", "final void reset() {\r\n\t\t\tsp = 0;\r\n\t\t\thp = 0;\r\n\t\t}", "private void resetGame() {\r\n SCORE = 0;\r\n defaultState();\r\n System.arraycopy(WordCollection.WORD, 0, tempWord, 0, WordCollection.WORD.length);\r\n }", "public void reset(){\r\n \ttablero.clear();\r\n \tfalling = null;\r\n \tgameOver = false;\r\n \tlevel = 0;\r\n \ttotalRows = 0;\r\n \tLevelHelper.setLevelSpeed(level, this);\r\n }", "public void resetScore (View v) {\n vScore = 0;\n kScore = 0;\n displayForTeamK(kScore);\n displayForTeamV(vScore);\n }", "public void resetCounters() {\n\t\t//RobotMap.leftEncoder.reset();\n\t\t//RobotMap.rightEncoder.reset();\n\t\tRobotMap.ahrs.zeroYaw();\n\t\tRobotMap.talonLeft.setSelectedSensorPosition(0, 0, 10);\n\t\tRobotMap.talonRight.setSelectedSensorPosition(0, 0, 10);\n\t\tbearing = 0;\n\t}", "public void reset() {\n tpsAttentePerso = 0;\n tpsAttentePerso2 =0;\n \ttotalTime = 0;\n\tnbVisited = 0;\n moyenne =0;\n }", "public static void Reset(){\n\t\ttstr = 0;\n\t\ttluc = 0;\n\t\ttmag = 0; \n\t\ttacc = 0;\n\t\ttdef = 0; \n\t\ttspe = 0;\n\t\ttHP = 10;\n\t\ttMP = 0;\n\t\tstatPoints = 13;\n\t}", "public void resetCounters()\n {\n cacheHits = 0;\n cacheMisses = 0;\n }", "public void reset() {\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tfor (int j = 0; j<DIVISIONS; j++){\n\t\t\t\tgameArray[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\tgameWon = false;\n\t\twinningPlayer = NEITHER;\n\t\tgameTie = false;\n\t\tcurrentPlayer = USER;\n\t}", "public void reset() {\r\n\t\tplayAgain = false;\r\n\t\tmainMenu = false;\r\n\t\tachievement = 0;\r\n\t}", "public void resetHighscoreTable()\r\n\t{\r\n\t\tcreateArray();\r\n\t\twriteFile();\r\n\t}", "public void resetScoreA(View v) {\n scoreTeamA = 0;\n\n displayForTeamA(scoreTeamA);\n\n\n }", "private void resetBoard() {\n\t\tGameScores.ResetScores();\n\t\tgameTime = SystemClock.elapsedRealtime();\n\t\t\n\t}", "public void resetValues() {\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(CUREDIFFICULTY, null);\n editor.putInt(CURETARGETSCORE, 0);\n editor.putInt(CURRSCOREFINDCURE, 0);\n editor.apply();\n System.out.println(sharedPreferences.getAll());\n\n }", "void unsetScoreAnalysis();", "public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }", "public void reset(){\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm -r data/games_module\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"0\"+\" /\\\" data/winnings\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"175\"+\" /\\\" data/tts_speed\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/answered_questions\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/five_random_categories\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/current_player\");\n\t\t_currentPlayer = null;\n\t\t_internationalUnlocked = false;\n\t\t_gamesData.clear();\n\t\t_fiveRandomCategories.clear();\n\t\tfor (int i= 0; i<5;i++) {\n\t\t\t_answeredQuestions[i]=0;\n\t\t}\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\t\tinitialiseCategories();\n\t\ttry {\n\t\t\treadCategories();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsetFiveRandomCategories();\n\t}", "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}", "public void reset()\r\n {\r\n gameBoard.reset();\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard.reset();\r\n }", "public void resetStats(){\n curA = attack;\n curD = defense;\n curSpA = spAttack;\n curSpD = spDefense;\n curS = speed;\n }", "public void resetAll(View v) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n faultsTeamA = 0;\n faultsTeamB = 0;\n\n teamAScoreTextView.setText(getString(R.string.zero));\n teamBScoreTextView.setText(getString(R.string.zero));\n teamAFaultTextView.setText(getString(R.string.zero));\n teamBFaultTextView.setText(getString(R.string.zero));\n }", "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}", "public void reset(){\n value = 0;\n }", "public void reset(){\n\t\tfrogReposition();\n\t\tlives = 5;\n\t\tend = 0;\n\t}", "void reset()\n {\n reset(values);\n }", "public void reset()\n {\n cantidad = 0;\n suma = 0;\n maximo = 0; \n minimo = 0; \n \n }", "public void setScoreZero() {\n this.points = 10000;\n }", "public void resetGameRoom() {\n gameCounter++;\n score = MAX_SCORE / 2;\n activePlayers = 0;\n Arrays.fill(players, null);\n }", "public void reset() {\n\t\tthis.count = 0;\n\t}", "public synchronized void resetScore() {\n\t\twhile (true) {\n\t\t\tint existingValueW = getCaught();\n\t\t\tint existingValueG = getScore();\n\t\t\tint existingValueM = getMissed();\n\t\t\tint newValueW = 0;\n\t\t\tint newValueG = 0;\n\t\t\tint newValueM = 0;\n\t\t\tif (caughtWords.compareAndSet(existingValueW, newValueW)\n\t\t\t\t\t&& gameScore.compareAndSet(existingValueG, newValueG)\n\t\t\t\t\t&& missedWords.compareAndSet(existingValueM, newValueM)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "private void reset() // reset the game so another game can be played.\n\t{\n\t\tenableControls(); // enable the controls again..\n\n\t\tfor (MutablePocket thisMutPocket: playerPockets) // Reset the pockets to their initial values.\n\t\t{\n\t\t\tthisMutPocket.setDiamondCount(3);\n\t\t}\n\n\t\tfor(ImmutablePocket thisImmPocket: goalPockets)\n\t\t{\n\t\t\tthisImmPocket.setDiamondCount(0);\n\t\t}\n\n\t\tfor(Player thisPlayer: players) // Same for the player..\n\t\t{\n\t\t\tthisPlayer.resetPlayer();\n\t\t}\n\n\t\tupdatePlayerList(); // Update the player list.\n\n\t}", "public void reset() {\n\t\tArrays.fill(distance,0);\n\t\tused.clear();\n\t}", "public static void resetDieScore()\n {\n value_from_die = 0;\n }", "public void reset() {\n\t\tcount = 0;\n\t}", "public void reset()\n {\n // put your code here\n position = 0;\n order = \"\";\n set[0] = 0;\n set[1] = 0;\n set[2] = 0;\n }", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "public void reset(View view) {\r\n homeScore = 0;\r\n visitorScore = 0;\r\n displayHomeScore(homeScore);\r\n displayVisitorScore(visitorScore);\r\n }", "public void reset() \n {\n cumulativeTrials = 0;\n\t numTwoHeads = 0;\n\t numTwoTails = 0;\n\t numHeadTails = 0;\n }", "public void reset() {\n\t\tpos.tijd = 0;\r\n\t\tpos.xposbal = xposstruct;\r\n\t\tpos.yposbal = yposstruct;\r\n\t\tpos.hoek = Math.PI/2;\r\n\t\tpos.start = 0;\r\n\t\topgespannen = 0;\r\n\t\tpos.snelh = 0.2;\r\n\t\tbooghoek = 0;\r\n\t\tpos.geraakt = 0;\r\n\t\tgeraakt = 0;\r\n\t\t\r\n\t}", "private void resetGame() {\n game.resetGame();\n round_score = 0;\n\n // Reset values in views\n player_tot_view.setText(String.valueOf(game.getPlayer_total()));\n bank_tot_view.setText(String.valueOf(game.getBank_total()));\n round_score_view.setText(String.valueOf(round_score));\n String begin_label = \"Round \" + game.getRound() + \" - Player's Turn\";\n round_label.setText(begin_label);\n\n getTargetScore();\n }", "@Override\n public void reset() {\n mMoveButtonActive = true;\n mMoveButtonPressed = false;\n mFireButtonPressed = false;\n droidHitPoints = 0;\n totalKillCollectPoints = 0;\n totalCollectNum = 0;\n// mCoinCount = 0;\n// mRubyCount = 0;\n mTotalKillCollectPointsDigits[0] = 0;\n mTotalKillCollectPointsDigits[1] = -1;\n mTotalCollectNumDigits[0] = 0;\n mTotalCollectNumDigits[1] = -1;\n totalKillCollectPointsDigitsChanged = true;\n totalCollectNumDigitsChanged = true;\n// mCoinDigits[0] = 0;\n// mCoinDigits[1] = -1;\n// mRubyDigits[0] = 0;\n// mRubyDigits[1] = -1;\n// mCoinDigitsChanged = true;\n// mRubyDigitsChanged = true;\n \n levelIntro = false;\n// mLevelIntro = false;\n \n mFPS = 0;\n mFPSDigits[0] = 0;\n mFPSDigits[1] = -1;\n mFPSDigitsChanged = true;\n mShowFPS = false;\n for (int x = 0; x < mDigitDrawables.length; x++) {\n mDigitDrawables[x] = null;\n }\n// mXDrawable = null;\n mFadePendingEventType = GameFlowEvent.EVENT_INVALID;\n mFadePendingEventIndex = 0;\n }", "public synchronized void reset()\n\t{\n\t\tthis.snapshots.clear();\n\t\tthis.selfPositions.clear();\n\t}", "protected void reset() {\n speed = 2.0;\n max_bomb = 1;\n flame = false;\n }", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "public void reset() {\n delta = 0.0;\n solucionActual = null;\n mejorSolucion = null;\n solucionVecina = null;\n iteracionesDiferenteTemperatura = 0;\n iteracionesMismaTemperatura = 0;\n esquemaReduccion = 0;\n vecindad = null;\n temperatura = 0.0;\n temperaturaInicial = 0.0;\n tipoProblema = 0;\n alfa = 0;\n beta = 0;\n }", "public void reset() {\n/* 54 */ this.count = 0;\n/* 55 */ this.totalTime = 0L;\n/* */ }", "@Override\n public void resetAllValues() {\n }", "public void reset() {\n solving = false;\n length = 0;\n checks = 0;\n }", "public void resetGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tthis.round = 0;\r\n\t\tthis.phase = 0;\r\n\t\tthis.prices = Share.generate();\r\n\t\tint i = 0;\r\n\t\twhile(i < this.prices.size())\r\n\t\t{\r\n\t\t\tthis.prices.get(i).addShares(Config.StartingStockPrice);\r\n\t\t\t++i;\r\n\t\t}\r\n\t\tint p = 0;\r\n\t\twhile(p < Config.PlayerLimit)\r\n\t\t{\r\n\t\t\tif(this.players[p] != null)\r\n\t\t\t{\r\n\t\t\t\tthis.players[p].reset();\r\n\t\t\t}\r\n\t\t\t++p;\r\n\t\t}\r\n\t\tthis.deck = Card.createDeck();\r\n\t\tthis.onTable = new LinkedList<>();\r\n\t\tCollections.shuffle(this.deck);\r\n\t\tthis.dealToTable();\r\n\t}", "public void reset() {\n deadBlackCount = 0;\n deadWhiteCount = 0;\n deadRedCount = 0;\n deadBlueCount = 0;\n\n for (int i = 0; i < DIMENSION; i++) {\n for (int j = 0; j < DIMENSION; j++) {\n fields[i][j].reset();\n }\n }\n }", "public void reset() {\n monster.setHealth(10);\n player.setHealth(10);\n\n }", "public void displayReset(View view) {\r\n\r\n scoreA = 0;\r\n scoreB = 0;\r\n displayForTeamA(scoreA);\r\n displayForTeamB(scoreB);\r\n }", "private void resetValues() {\n\t\ttotalNet = Money.of(Double.valueOf(0.0), currencyCode);\n\t\ttotalVat = Money.of(Double.valueOf(0.0), currencyCode);\n\t\ttotalGross = Money.of(Double.valueOf(0.0), currencyCode);\n\t}", "public static void resetStatistics()\r\n {\r\n \t//System.out.println ( \"Resetting statistics\");\r\n count_ = 0; \r\n }", "protected void reset() {\n leftSkier.reset();\n rightSkier.reset();\n }", "public ScoreManager() {\n\t\tscore = 0;\n\t}", "void reset() {\n count = 0;\n\n }", "public void reset(View v) {\n scoreTeamB = 0;\n displayForTeamB(scoreTeamB);\n scoreTeamA = 0;\n displayForTeamA(scoreTeamA);\n questionNumber = 0;\n displayQuestionNumber(questionNumber);\n }", "public void resetZealotCounter() {\n persistentValues.summoningEyeCount = 0;\n persistentValues.totalKills = 0;\n persistentValues.kills = 0;\n saveValues();\n }", "@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 reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }", "public void set_AllSpreadIndexToZero(){\r\n\tGRASS=0; \r\n\tTIMBER=0;\r\n}", "public void reset()\n\t{\n\t\tassociations = new Vector<Association>();\n\t\tif(hotspots != null)\n\t\t{\n\t\t\tfor(int i=0; i < hotspots.size(); i++)\n\t\t\t{\n\t\t\t\thotspots.elementAt(i).bound = null;\n\t\t\t\thotspots.elementAt(i).setHighlighted(false);\n\t\t\t}\n\t\t}\n\n\t\tif(movableObjects != null)\n\t\t{\n\t\t\tfor(int i=0; i < movableObjects.size(); i++)\n\t\t\t{\n\t\t\t\tmovableObjects.elementAt(i).resetPos();\n\t\t\t\tmovableObjects.elementAt(i).bound = null;\n\t\t\t}\n\t\t}\n\t\tuser_responses=0;\n\t\tmov = null;\n\t\tstart = null;\n\t\tmpos = null;\n\t\tsetFeedback();\n\t\trepaint();\n\t}", "public void reset () {\n lastSave = count;\n count = 0;\n }", "public void reset() {\n\t board = new int[]{1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,\n 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0,\n 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 2};\n\t currentPlayer = 1;\n\t turnCount = 0;\n\t for (int i=0; i<81; i++) {\n\t \n\t\t hash ^= rand[3*i+board[i]]; //row-major order\n\t \n\t }\n }", "public void resetCount() {\n\t\tcount = 0;\n\t}", "public void reset() {\n state = SearchState.NEW;\n objectiveOptimal = false;\n solutionCount = 0;\n timeCount = 0;\n stopStopwatch();\n nodeCount = 0;\n backtrackCount = 0;\n failCount = 0;\n restartCount = 0;\n depth = 0;\n maxDepth = 0;\n }" ]
[ "0.8726388", "0.8672671", "0.8606545", "0.85427254", "0.84374565", "0.8352605", "0.8293519", "0.7963471", "0.78661215", "0.78433084", "0.76025456", "0.75744134", "0.75722873", "0.7568165", "0.75458676", "0.7476293", "0.74521166", "0.74273884", "0.7385495", "0.7375387", "0.7370392", "0.73297095", "0.73105854", "0.7298958", "0.72720003", "0.7261785", "0.725398", "0.725046", "0.7222099", "0.7222099", "0.71873325", "0.7176212", "0.7169472", "0.7151549", "0.71514696", "0.7136246", "0.713244", "0.7122491", "0.7116046", "0.7114714", "0.711089", "0.7110737", "0.7109156", "0.70946187", "0.70752186", "0.7062065", "0.7056689", "0.70535654", "0.70501685", "0.7037967", "0.7025214", "0.7017023", "0.7011243", "0.699927", "0.6998754", "0.6985604", "0.6982131", "0.69811344", "0.6976201", "0.69681597", "0.6966892", "0.6958276", "0.6952804", "0.69504535", "0.6941661", "0.6937315", "0.6935798", "0.6934868", "0.6933668", "0.69208133", "0.69184834", "0.69100314", "0.69092655", "0.6907975", "0.6899501", "0.6893362", "0.68875796", "0.685983", "0.68376356", "0.68363434", "0.68185043", "0.6812472", "0.681096", "0.680768", "0.6803451", "0.68032324", "0.6800613", "0.67964834", "0.6785428", "0.6779331", "0.67723536", "0.6767772", "0.67643523", "0.6759903", "0.67398673", "0.6735741", "0.6731031", "0.6727469", "0.67104715", "0.670345" ]
0.7237723
28
String constantString = scanner.currentToken(); constantString = constantString.substring("CONST[".length(), constantString.length()1); constantInt = Integer.parseInt(constantString);
@Override public void printCode(StringBuilder builder, int indentation) { for(String id: idList){ builder.append(id.substring("ID[".length(), id.length()-1)); builder.append(","); } builder.deleteCharAt(builder.length() -1);//delete last comma }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int intVal(){\n\n if(currentTokenType == TYPE.INT_CONST){\n\n return Integer.parseInt(currentToken);\n }else {\n throw new IllegalStateException(\"Current token is not an integer constant!\");\n }\n }", "public interface ParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int IMPLIES = 1;\n /** RegularExpression Id. */\n int EQUIVALENT = 2;\n /** RegularExpression Id. */\n int AND = 3;\n /** RegularExpression Id. */\n int OR = 4;\n /** RegularExpression Id. */\n int LBRACKET = 5;\n /** RegularExpression Id. */\n int RBRACKET = 6;\n /** RegularExpression Id. */\n int NOT = 7;\n /** RegularExpression Id. */\n int EQUALS = 8;\n /** RegularExpression Id. */\n int FORALL = 9;\n /** RegularExpression Id. */\n int THEREEXISTS = 10;\n /** RegularExpression Id. */\n int VARIABLE = 11;\n /** RegularExpression Id. */\n int PREDICATE = 12;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<IMPLIES>\",\n \"<EQUIVALENT>\",\n \"<AND>\",\n \"<OR>\",\n \"<LBRACKET>\",\n \"<RBRACKET>\",\n \"<NOT>\",\n \"<EQUALS>\",\n \"<FORALL>\",\n \"<THEREEXISTS>\",\n \"<VARIABLE>\",\n \"<PREDICATE>\",\n };\n\n}", "private int tokenVal()\n\t{\n\t\t//check that token is keyword or special\n\t\tif( core.containsKey(token))\t\t\t\n\t\t{ \n\t\t\t//return the value\n\t\t\treturn core.get(token); \n\t\t}\n\t\telse\n\t\t{\n\t\t\t try{ //see if token is integer\n\t\t\t\t Integer.parseInt(token);\n\t\t\t return INTEGER;\n\t\t\t }\n\t\t\t catch(NumberFormatException e){\n\t\t\t \t //token must be an identifier\n\t\t\t \t return IDENTIFIER;\t \n\t\t\t }\n\t\t}\t\n\t}", "private void parseConstDecl() {\n check(Token.FINAL);\n\n Struct type = parseType();\n\n check(Token.IDENT);\n\n String constName = token.string;\n\n check(Token.ASSIGN);\n\n if (nextToken.kind != Token.NUMBER\n && nextToken.kind != Token.CHAR_CONST) {\n error(\"Expected number or char constant\");\n }\n\n if ((nextToken.kind == Token.NUMBER\n && type != SymbolTable.STRUCT_INT)\n || (nextToken.kind == Token.CHAR_CONST\n && type != SymbolTable.STRUCT_CHAR)) {\n error(\"Incompatible types in constant declaration\");\n }\n\n scan();\n\n int value = token.value;\n\n insert(new SymObject(type, constName, value));\n\n check(Token.SEMICOLON);\n }", "public ValueWrapper parseConstant(String t) {\n \tthrow new UnsupportedOperationException();\n }", "public interface InputParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int TRUE = 5;\n /** RegularExpression Id. */\n int FALSE = 6;\n /** RegularExpression Id. */\n int NOT = 7;\n /** RegularExpression Id. */\n int INTEGER = 8;\n /** RegularExpression Id. */\n int STRING = 9;\n /** RegularExpression Id. */\n int CHARACTER = 10;\n /** RegularExpression Id. */\n int BOOLEAN = 11;\n /** RegularExpression Id. */\n int ASTERIX = 12;\n /** RegularExpression Id. */\n int COLON = 13;\n /** RegularExpression Id. */\n int ADT = 14;\n /** RegularExpression Id. */\n int SIGNATURES = 15;\n /** RegularExpression Id. */\n int EQUATIONS = 16;\n /** RegularExpression Id. */\n int PLUS = 17;\n /** RegularExpression Id. */\n int MINUS = 18;\n /** RegularExpression Id. */\n int ARROW = 19;\n /** RegularExpression Id. */\n int LESS_THAN = 20;\n /** RegularExpression Id. */\n int EQUALS = 21;\n /** RegularExpression Id. */\n int GREATER_THAN = 22;\n /** RegularExpression Id. */\n int HEX_ESCAPE = 23;\n /** RegularExpression Id. */\n int LEFT_PAREN = 24;\n /** RegularExpression Id. */\n int RIGHT_PAREN = 25;\n /** RegularExpression Id. */\n int UINT10 = 26;\n /** RegularExpression Id. */\n int ND = 27;\n /** RegularExpression Id. */\n int MC = 28;\n /** RegularExpression Id. */\n int ME = 29;\n /** RegularExpression Id. */\n int LU = 30;\n /** RegularExpression Id. */\n int LL = 31;\n /** RegularExpression Id. */\n int LT = 32;\n /** RegularExpression Id. */\n int LM = 33;\n /** RegularExpression Id. */\n int LO = 34;\n /** RegularExpression Id. */\n int MN = 35;\n /** RegularExpression Id. */\n int NL = 36;\n /** RegularExpression Id. */\n int NO = 37;\n /** RegularExpression Id. */\n int PD = 38;\n /** RegularExpression Id. */\n int PC = 39;\n /** RegularExpression Id. */\n int PO = 40;\n /** RegularExpression Id. */\n int SC = 41;\n /** RegularExpression Id. */\n int SM = 42;\n /** RegularExpression Id. */\n int SK = 43;\n /** RegularExpression Id. */\n int SO = 44;\n /** RegularExpression Id. */\n int CO = 45;\n /** RegularExpression Id. */\n int ID = 46;\n /** RegularExpression Id. */\n int PECULIAR_ID = 47;\n /** RegularExpression Id. */\n int INITIAL = 48;\n /** RegularExpression Id. */\n int SPECIAL_INITIAL = 49;\n /** RegularExpression Id. */\n int CONSTITUENT = 50;\n /** RegularExpression Id. */\n int SUBSEQUENT = 51;\n /** RegularExpression Id. */\n int SPECIAL_SUBSEQUENT = 52;\n /** RegularExpression Id. */\n int INLINE_HEX_ESCAPE = 53;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"#t\\\"\",\n \"\\\"#f\\\"\",\n \"\\\"not\\\"\",\n \"\\\"int\\\"\",\n \"\\\"string\\\"\",\n \"\\\"character\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"*\\\"\",\n \"\\\":\\\"\",\n \"\\\"ADT:\\\"\",\n \"\\\"Signatures:\\\"\",\n \"\\\"Equations:\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"->\\\"\",\n \"\\\"<\\\"\",\n \"\\\"=\\\"\",\n \"\\\">\\\"\",\n \"\\\"\\\\\\\\x\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"<UINT10>\",\n \"<ND>\",\n \"<MC>\",\n \"<ME>\",\n \"<LU>\",\n \"<LL>\",\n \"<LT>\",\n \"<LM>\",\n \"<LO>\",\n \"<MN>\",\n \"<NL>\",\n \"<NO>\",\n \"<PD>\",\n \"<PC>\",\n \"<PO>\",\n \"<SC>\",\n \"<SM>\",\n \"<SK>\",\n \"<SO>\",\n \"<CO>\",\n \"<ID>\",\n \"<PECULIAR_ID>\",\n \"<INITIAL>\",\n \"<SPECIAL_INITIAL>\",\n \"<CONSTITUENT>\",\n \"<SUBSEQUENT>\",\n \"<SPECIAL_SUBSEQUENT>\",\n \"<INLINE_HEX_ESCAPE>\",\n };\n\n}", "public int readInt(){\n\t\ttry{\n\t\t\treturn scanner.nextInt();\n\t\t}catch (InputMismatchException e){\n\t\t\tString token=scanner.next();\n\t\t\tthrow new InputMismatchException(\"the next token is\\\"\"+token+\"\\\"\");\n\t\t}\n\t\tcatch (NoSuchElementException e){\n\t\t\tthrow new NoSuchElementException(\"no more tokens are available\");\n\t\t}\n\t}", "public interface ParserMASConstants {\r\n\r\n /** End of File. */\r\n int EOF = 0;\r\n /** RegularExpression Id. */\r\n int SINGLE_LINE_COMMENT = 9;\r\n /** RegularExpression Id. */\r\n int FORMAL_COMMENT = 10;\r\n /** RegularExpression Id. */\r\n int MULTI_LINE_COMMENT = 11;\r\n /** RegularExpression Id. */\r\n int COLON = 13;\r\n /** RegularExpression Id. */\r\n int AT = 14;\r\n /** RegularExpression Id. */\r\n int COMMA = 15;\r\n /** RegularExpression Id. */\r\n int NRAGENTS = 16;\r\n /** RegularExpression Id. */\r\n int IDENTIFIER = 17;\r\n /** RegularExpression Id. */\r\n int FILENAME = 18;\r\n\r\n /** Lexical state. */\r\n int DEFAULT = 0;\r\n /** Lexical state. */\r\n int IN_SINGLE_LINE_COMMENT = 1;\r\n /** Lexical state. */\r\n int IN_FORMAL_COMMENT = 2;\r\n /** Lexical state. */\r\n int IN_MULTI_LINE_COMMENT = 3;\r\n\r\n /** Literal token values. */\r\n String[] tokenImage = {\r\n \"<EOF>\",\r\n \"\\\" \\\"\",\r\n \"\\\"\\\\t\\\"\",\r\n \"\\\"\\\\n\\\"\",\r\n \"\\\"\\\\r\\\"\",\r\n \"\\\"%\\\"\",\r\n \"\\\"//\\\"\",\r\n \"<token of kind 7>\",\r\n \"\\\"/*\\\"\",\r\n \"<SINGLE_LINE_COMMENT>\",\r\n \"\\\"*/\\\"\",\r\n \"\\\"*/\\\"\",\r\n \"<token of kind 12>\",\r\n \"\\\":\\\"\",\r\n \"\\\"@\\\"\",\r\n \"\\\",\\\"\",\r\n \"<NRAGENTS>\",\r\n \"<IDENTIFIER>\",\r\n \"<FILENAME>\",\r\n };\r\n\r\n}", "public int getInt() throws NoSuchElementException,\n\t NumberFormatException\n {\n\tString s = tokenizer.nextToken();\n\treturn Integer.parseInt(s);\n }", "public interface LTLParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int SINGLE_LINE_COMMENT = 7;\n /** RegularExpression Id. */\n int KAS = 9;\n /** RegularExpression Id. */\n int KATE = 10;\n /** RegularExpression Id. */\n int KDATE = 11;\n /** RegularExpression Id. */\n int KEXISTS = 12;\n /** RegularExpression Id. */\n int KFORALL = 13;\n /** RegularExpression Id. */\n int KFORMULA = 14;\n /** RegularExpression Id. */\n int KIN = 15;\n /** RegularExpression Id. */\n int KNUMBER = 16;\n /** RegularExpression Id. */\n int KPI = 17;\n /** RegularExpression Id. */\n int KRENAME = 18;\n /** RegularExpression Id. */\n int KSET = 19;\n /** RegularExpression Id. */\n int KSTRING = 20;\n /** RegularExpression Id. */\n int KSUBFORMULA = 21;\n /** RegularExpression Id. */\n int INTEGER_LITERAL = 22;\n /** RegularExpression Id. */\n int REAL_LITERAL = 23;\n /** RegularExpression Id. */\n int EXPONENT = 24;\n /** RegularExpression Id. */\n int STRING_LITERAL = 25;\n /** RegularExpression Id. */\n int DESC_LITERAL = 26;\n /** RegularExpression Id. */\n int PIID = 27;\n /** RegularExpression Id. */\n int ATEID = 28;\n /** RegularExpression Id. */\n int ID = 29;\n /** RegularExpression Id. */\n int IDENTIFIER = 30;\n /** RegularExpression Id. */\n int STARTLETTER = 31;\n /** RegularExpression Id. */\n int LETTER = 32;\n /** RegularExpression Id. */\n int DIGIT = 33;\n /** RegularExpression Id. */\n int LPAREN = 34;\n /** RegularExpression Id. */\n int RPAREN = 35;\n /** RegularExpression Id. */\n int LBRACE = 36;\n /** RegularExpression Id. */\n int RBRACE = 37;\n /** RegularExpression Id. */\n int LBRACKET = 38;\n /** RegularExpression Id. */\n int RBRACKET = 39;\n /** RegularExpression Id. */\n int BAR = 40;\n /** RegularExpression Id. */\n int SEMICOLON = 41;\n /** RegularExpression Id. */\n int COMMA = 42;\n /** RegularExpression Id. */\n int DOT = 43;\n /** RegularExpression Id. */\n int COLON = 44;\n /** RegularExpression Id. */\n int ASSIGN = 45;\n /** RegularExpression Id. */\n int GT = 46;\n /** RegularExpression Id. */\n int LT = 47;\n /** RegularExpression Id. */\n int PNOT = 48;\n /** RegularExpression Id. */\n int SLASH = 49;\n /** RegularExpression Id. */\n int PLUS = 50;\n /** RegularExpression Id. */\n int MINUS = 51;\n /** RegularExpression Id. */\n int STAR = 52;\n /** RegularExpression Id. */\n int EQ = 53;\n /** RegularExpression Id. */\n int LE = 54;\n /** RegularExpression Id. */\n int GE = 55;\n /** RegularExpression Id. */\n int NE = 56;\n /** RegularExpression Id. */\n int REQ = 57;\n /** RegularExpression Id. */\n int POR = 58;\n /** RegularExpression Id. */\n int PAND = 59;\n /** RegularExpression Id. */\n int PIMPLIES = 60;\n /** RegularExpression Id. */\n int PBIIMPLIES = 61;\n /** RegularExpression Id. */\n int LALWAYS = 62;\n /** RegularExpression Id. */\n int LEVENTUALLY = 63;\n /** RegularExpression Id. */\n int LNEXTTIME = 64;\n /** RegularExpression Id. */\n int LUNTIL = 65;\n /** RegularExpression Id. */\n int URI = 66;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int IN_SINGLE_LINE_COMMENT = 1;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"#\\\"\",\n \"<SINGLE_LINE_COMMENT>\",\n \"<token of kind 8>\",\n \"\\\"as\\\"\",\n \"\\\"ate\\\"\",\n \"\\\"date\\\"\",\n \"\\\"exists\\\"\",\n \"\\\"forall\\\"\",\n \"\\\"formula\\\"\",\n \"\\\"in\\\"\",\n \"\\\"number\\\"\",\n \"\\\"pi\\\"\",\n \"\\\"rename\\\"\",\n \"\\\"set\\\"\",\n \"\\\"string\\\"\",\n \"\\\"subformula\\\"\",\n \"<INTEGER_LITERAL>\",\n \"<REAL_LITERAL>\",\n \"<EXPONENT>\",\n \"<STRING_LITERAL>\",\n \"<DESC_LITERAL>\",\n \"<PIID>\",\n \"<ATEID>\",\n \"<ID>\",\n \"<IDENTIFIER>\",\n \"<STARTLETTER>\",\n \"<LETTER>\",\n \"<DIGIT>\",\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 \"\\\"_O\\\"\",\n \"\\\"_U\\\"\",\n \"<URI>\",\n };\n\n}", "public String stringVal(){\n\n if (currentTokenType == TYPE.STRING_CONST){\n\n return currentToken.substring(1, currentToken.length() - 1);\n\n }else {\n throw new IllegalStateException(\"Current token is not a string constant!\");\n }\n }", "private static int getVal(String s) {\n int val = Integer.parseInt(s.split(\" \")[0]);\r\n return val;\r\n }", "private Token scanRealOrIntegerLiteral() {\n Token tok;\n Pair<Integer, Integer> pos = new Pair<>(in.line(), in.pos());\n while (Character.isDigit(c) && c != '.' && c != -1) {\n buffer.add(c);\n c = in.read();\n }\n\n if (c == '.') {\n int nextChar = in.read();\n if (nextChar == '.') { // which means '..' operator was encountered\n tok = new Token(buffer.toString(),\n TokenType.INTEGER, pos);\n enqueuedToken = new Token(\"..\", TokenType.RANGE, pos);\n buffer.flush();\n c = in.read(); // reading in the next unprocessed character\n } else if (Character.isDigit(nextChar)) { // which means a real literal was encountered\n buffer.add(c);\n while (Character.isDigit(nextChar)) {\n buffer.add(nextChar);\n nextChar = in.read();\n }\n tok = new Token(buffer.toString(), TokenType.REAL_LITERAL, pos);\n buffer.flush();\n c = nextChar;\n\n } else { // which means a real literal without digits after dot (like 1. <=> 1.0)\n\n buffer.add(c);\n tok = new Token(buffer.toString(), TokenType.REAL_LITERAL, pos);\n buffer.flush();\n c = nextChar;\n\n }\n } else {\n tok = new Token(buffer.toString(), TokenType.INTEGER_LITERAL, pos);\n buffer.flush();\n }\n return tok;\n }", "public static int parseT1(String in){\n Scanner s = new Scanner(in);\n return s.nextInt();\n }", "public interface LogoParserConstants {\r\n\r\n /** End of File. */\r\n int EOF = 0;\r\n /** RegularExpression Id. */\r\n int PROC = 6;\r\n /** RegularExpression Id. */\r\n int END = 7;\r\n /** RegularExpression Id. */\r\n int MAKE = 8;\r\n /** RegularExpression Id. */\r\n int VARNAME = 9;\r\n /** RegularExpression Id. */\r\n int RPT = 10;\r\n /** RegularExpression Id. */\r\n int RT = 11;\r\n /** RegularExpression Id. */\r\n int FD = 12;\r\n /** RegularExpression Id. */\r\n int ID = 13;\r\n /** RegularExpression Id. */\r\n int DECPOINT = 14;\r\n /** RegularExpression Id. */\r\n int PLUS = 15;\r\n /** RegularExpression Id. */\r\n int MINUS = 16;\r\n /** RegularExpression Id. */\r\n int TIMES = 17;\r\n /** RegularExpression Id. */\r\n int DIVIDE = 18;\r\n /** RegularExpression Id. */\r\n int COLON = 19;\r\n /** RegularExpression Id. */\r\n int COMMA = 20;\r\n /** RegularExpression Id. */\r\n int LBRACKET = 21;\r\n /** RegularExpression Id. */\r\n int RBRACKET = 22;\r\n /** RegularExpression Id. */\r\n int LSQR = 23;\r\n /** RegularExpression Id. */\r\n int RSQR = 24;\r\n /** RegularExpression Id. */\r\n int NUMBER = 25;\r\n /** RegularExpression Id. */\r\n int DIGIT = 26;\r\n /** RegularExpression Id. */\r\n int ALPHA = 27;\r\n\r\n /** Lexical state. */\r\n int DEFAULT = 0;\r\n\r\n /** Literal token values. */\r\n String[] tokenImage = {\r\n \"<EOF>\",\r\n \"\\\" \\\"\",\r\n \"\\\"\\\\t\\\"\",\r\n \"\\\"\\\\n\\\"\",\r\n \"\\\"\\\\r\\\"\",\r\n \"\\\"\\\\r\\\\n\\\"\",\r\n \"\\\"proc\\\"\",\r\n \"\\\"end\\\"\",\r\n \"\\\"make\\\"\",\r\n \"<VARNAME>\",\r\n \"\\\"rpt\\\"\",\r\n \"\\\"rt\\\"\",\r\n \"\\\"fd\\\"\",\r\n \"<ID>\",\r\n \"\\\".\\\"\",\r\n \"\\\"+\\\"\",\r\n \"\\\"-\\\"\",\r\n \"\\\"*\\\"\",\r\n \"\\\"/\\\"\",\r\n \"\\\":\\\"\",\r\n \"\\\",\\\"\",\r\n \"\\\"(\\\"\",\r\n \"\\\")\\\"\",\r\n \"\\\"[\\\"\",\r\n \"\\\"]\\\"\",\r\n \"<NUMBER>\",\r\n \"<DIGIT>\",\r\n \"<ALPHA>\",\r\n };\r\n\r\n}", "public interface DefccConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int MODULE_TKN = 11;\n /** RegularExpression Id. */\n int CLASS_TKN = 12;\n /** RegularExpression Id. */\n int INCLUDE_TKN = 13;\n /** RegularExpression Id. */\n int BYTE_TKN = 14;\n /** RegularExpression Id. */\n int BOOLEAN_TKN = 15;\n /** RegularExpression Id. */\n int INT_TKN = 16;\n /** RegularExpression Id. */\n int LONG_TKN = 17;\n /** RegularExpression Id. */\n int FLOAT_TKN = 18;\n /** RegularExpression Id. */\n int DOUBLE_TKN = 19;\n /** RegularExpression Id. */\n int STRING_TKN = 20;\n /** RegularExpression Id. */\n int BUFFER_TKN = 21;\n /** RegularExpression Id. */\n int VECTOR_TKN = 22;\n /** RegularExpression Id. */\n int MAP_TKN = 23;\n /** RegularExpression Id. */\n int LBRACE_TKN = 24;\n /** RegularExpression Id. */\n int RBRACE_TKN = 25;\n /** RegularExpression Id. */\n int LT_TKN = 26;\n /** RegularExpression Id. */\n int GT_TKN = 27;\n /** RegularExpression Id. */\n int SEMICOLON_TKN = 28;\n /** RegularExpression Id. */\n int COMMA_TKN = 29;\n /** RegularExpression Id. */\n int DOT_TKN = 30;\n /** RegularExpression Id. */\n int CSTRING_TKN = 31;\n /** RegularExpression Id. */\n int IDENT_TKN = 32;\n /** RegularExpression Id. */\n int IDENT_TKN_W_DOT = 33;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int WithinOneLineComment = 1;\n /** Lexical state. */\n int WithinMultiLineComment = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"//\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"/*\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 10>\",\n \"\\\"module\\\"\",\n \"\\\"class\\\"\",\n \"\\\"include\\\"\",\n \"\\\"byte\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"int\\\"\",\n \"\\\"long\\\"\",\n \"\\\"float\\\"\",\n \"\\\"double\\\"\",\n \"\\\"string\\\"\",\n \"\\\"buffer\\\"\",\n \"\\\"vector\\\"\",\n \"\\\"map\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"<CSTRING_TKN>\",\n \"<IDENT_TKN>\",\n \"<IDENT_TKN_W_DOT>\",\n };\n\n}", "public interface SimpleGrParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int NumberLit = 6;\n /** RegularExpression Id. */\n int BooleanLit = 7;\n /** RegularExpression Id. */\n int StringLit = 8;\n /** RegularExpression Id. */\n int Null = 9;\n /** RegularExpression Id. */\n int And = 10;\n /** RegularExpression Id. */\n int Or = 11;\n /** RegularExpression Id. */\n int Not = 12;\n /** RegularExpression Id. */\n int Identifier = 13;\n /** RegularExpression Id. */\n int Equal = 14;\n /** RegularExpression Id. */\n int NotEqual = 15;\n /** RegularExpression Id. */\n int LessThan = 16;\n /** RegularExpression Id. */\n int LessEqualThan = 17;\n /** RegularExpression Id. */\n int GreaterThan = 18;\n /** RegularExpression Id. */\n int GreaterEqualThan = 19;\n /** RegularExpression Id. */\n int Plus = 20;\n /** RegularExpression Id. */\n int Minus = 21;\n /** RegularExpression Id. */\n int Div = 22;\n /** RegularExpression Id. */\n int Mult = 23;\n /** RegularExpression Id. */\n int Open = 24;\n /** RegularExpression Id. */\n int Close = 25;\n /** RegularExpression Id. */\n int Comma = 26;\n /** RegularExpression Id. */\n int Letter = 27;\n /** RegularExpression Id. */\n int Digit = 28;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"<NumberLit>\",\n \"<BooleanLit>\",\n \"<StringLit>\",\n \"\\\"NULL\\\"\",\n \"\\\"AND\\\"\",\n \"\\\"OR\\\"\",\n \"\\\"NOT\\\"\",\n \"<Identifier>\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"<\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">\\\"\",\n \"\\\">=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"/\\\"\",\n \"\\\"*\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\",\\\"\",\n \"<Letter>\",\n \"<Digit>\",\n };\n\n}", "public interface TypeScriptParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int DIGIT = 6;\n /** RegularExpression Id. */\n int ONE_TO_NINE = 7;\n /** RegularExpression Id. */\n int LETTER = 8;\n /** RegularExpression Id. */\n int SPACE = 9;\n /** RegularExpression Id. */\n int VAR = 10;\n /** RegularExpression Id. */\n int IF = 11;\n /** RegularExpression Id. */\n int ELSE_IF = 12;\n /** RegularExpression Id. */\n int ELSE = 13;\n /** RegularExpression Id. */\n int FUNCTION = 14;\n /** RegularExpression Id. */\n int BOOLEAN = 15;\n /** RegularExpression Id. */\n int NUMBER = 16;\n /** RegularExpression Id. */\n int STRING = 17;\n /** RegularExpression Id. */\n int ENUM = 18;\n /** RegularExpression Id. */\n int INTERFACE = 19;\n /** RegularExpression Id. */\n int RETURN = 20;\n /** RegularExpression Id. */\n int VOID = 21;\n /** RegularExpression Id. */\n int WHILE = 22;\n /** RegularExpression Id. */\n int PRINTLN = 23;\n /** RegularExpression Id. */\n int TRUE = 24;\n /** RegularExpression Id. */\n int FALSE = 25;\n /** RegularExpression Id. */\n int NOT = 26;\n /** RegularExpression Id. */\n int AMPRSAND = 27;\n /** RegularExpression Id. */\n int MUL = 28;\n /** RegularExpression Id. */\n int MINUS = 29;\n /** RegularExpression Id. */\n int PLUS = 30;\n /** RegularExpression Id. */\n int EQ = 31;\n /** RegularExpression Id. */\n int BAR = 32;\n /** RegularExpression Id. */\n int DIV = 33;\n /** RegularExpression Id. */\n int COLON = 34;\n /** RegularExpression Id. */\n int SEMICOLON = 35;\n /** RegularExpression Id. */\n int QM = 36;\n /** RegularExpression Id. */\n int COMMA = 37;\n /** RegularExpression Id. */\n int DOT = 38;\n /** RegularExpression Id. */\n int SINGLE_QUOTE = 39;\n /** RegularExpression Id. */\n int QUOTE = 40;\n /** RegularExpression Id. */\n int LEFT_PARAN = 41;\n /** RegularExpression Id. */\n int RIGHT_PARAN = 42;\n /** RegularExpression Id. */\n int LEFT_BRAKET = 43;\n /** RegularExpression Id. */\n int RIGHT_BRAKET = 44;\n /** RegularExpression Id. */\n int LEFT_BRACE = 45;\n /** RegularExpression Id. */\n int RIGHT_BRACE = 46;\n /** RegularExpression Id. */\n int UNDER_SCORE = 47;\n /** RegularExpression Id. */\n int LT = 48;\n /** RegularExpression Id. */\n int GT = 49;\n /** RegularExpression Id. */\n int LE = 50;\n /** RegularExpression Id. */\n int GE = 51;\n /** RegularExpression Id. */\n int DOUBLE_EQ = 52;\n /** RegularExpression Id. */\n int OR = 53;\n /** RegularExpression Id. */\n int AND = 54;\n /** RegularExpression Id. */\n int NOT_EQ = 55;\n /** RegularExpression Id. */\n int MATH_OP = 56;\n /** RegularExpression Id. */\n int STRING_LITERAL = 57;\n /** RegularExpression Id. */\n int IDENTIFIER = 58;\n /** RegularExpression Id. */\n int NUM = 59;\n /** RegularExpression Id. */\n int INTEGER = 60;\n /** RegularExpression Id. */\n int REAL = 61;\n /** RegularExpression Id. */\n int SIGN = 62;\n /** RegularExpression Id. */\n int ERROR = 63;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 5>\",\n \"<DIGIT>\",\n \"<ONE_TO_NINE>\",\n \"<LETTER>\",\n \"<SPACE>\",\n \"\\\"var\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"function\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"number\\\"\",\n \"\\\"char\\\"\",\n \"\\\"enum\\\"\",\n \"\\\"interface\\\"\",\n \"\\\"return\\\"\",\n \"\\\"void\\\"\",\n \"\\\"while\\\"\",\n \"\\\"println\\\"\",\n \"\\\"true\\\"\",\n \"\\\"false\\\"\",\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 \"<MATH_OP>\",\n \"<STRING_LITERAL>\",\n \"<IDENTIFIER>\",\n \"<NUM>\",\n \"<INTEGER>\",\n \"<REAL>\",\n \"\\\"\\\"\",\n \"<ERROR>\",\n };\n\n}", "abstract void read(ConstantParser cp) throws ClassException;", "public interface UATokenizerConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int WHITESPACE = 1;\n /** RegularExpression Id. */\n int CHAR = 5;\n /** RegularExpression Id. */\n int PICTURES = 6;\n /** RegularExpression Id. */\n int FILLERWORDS = 7;\n /** RegularExpression Id. */\n int THREELETTERWORDS = 8;\n /** RegularExpression Id. */\n int EMAIL = 9;\n /** RegularExpression Id. */\n int PRICES = 10;\n /** RegularExpression Id. */\n int DOMAIN = 11;\n /** RegularExpression Id. */\n int PHONE = 12;\n /** RegularExpression Id. */\n int PHONE2 = 13;\n /** RegularExpression Id. */\n int PHONE3 = 14;\n /** RegularExpression Id. */\n int WORD = 15;\n /** RegularExpression Id. */\n int HTML = 16;\n /** RegularExpression Id. */\n int HTML2 = 17;\n /** RegularExpression Id. */\n int HTMLCOMMENTS = 18;\n /** RegularExpression Id. */\n int NUMBER = 19;\n /** RegularExpression Id. */\n int TOPLEVELDOMAINS = 20;\n /** RegularExpression Id. */\n int SYMBOLS = 21;\n /** RegularExpression Id. */\n int OTHER = 22;\n /** RegularExpression Id. */\n int CHARACTERS = 23;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<CHAR>\",\n \"<PICTURES>\",\n \"<FILLERWORDS>\",\n \"<THREELETTERWORDS>\",\n \"<EMAIL>\",\n \"<PRICES>\",\n \"<DOMAIN>\",\n \"<PHONE>\",\n \"<PHONE2>\",\n \"<PHONE3>\",\n \"<WORD>\",\n \"<HTML>\",\n \"<HTML2>\",\n \"<HTMLCOMMENTS>\",\n \"<NUMBER>\",\n \"<TOPLEVELDOMAINS>\",\n \"<SYMBOLS>\",\n \"<OTHER>\",\n \"<CHARACTERS>\",\n };\n\n}", "private LiteralToken nextRegularExpressionLiteralToken() {\n LiteralToken token = scanner.nextRegularExpressionLiteralToken();\n lastSourcePosition = token.location.end;\n return token;\n }", "public interface ParserConstants {\r\n\r\n /** End of File. */\r\n int EOF = 0;\r\n /** RegularExpression Id. */\r\n int LINE_COMMENT = 6;\r\n /** RegularExpression Id. */\r\n int FORMAL_COMMENT = 7;\r\n /** RegularExpression Id. */\r\n int MULTILINE_COMMENT = 8;\r\n /** RegularExpression Id. */\r\n int INT = 9;\r\n /** RegularExpression Id. */\r\n int VOID = 10;\r\n /** RegularExpression Id. */\r\n int STRING = 11;\r\n /** RegularExpression Id. */\r\n int BOOLEAN = 12;\r\n /** RegularExpression Id. */\r\n int NULL = 13;\r\n /** RegularExpression Id. */\r\n int THIS = 14;\r\n /** RegularExpression Id. */\r\n int TRUE = 15;\r\n /** RegularExpression Id. */\r\n int FALSE = 16;\r\n /** RegularExpression Id. */\r\n int MAIN = 17;\r\n /** RegularExpression Id. */\r\n int LENGTH = 18;\r\n /** RegularExpression Id. */\r\n int PRINT = 19;\r\n /** RegularExpression Id. */\r\n int IF = 20;\r\n /** RegularExpression Id. */\r\n int NEW = 21;\r\n /** RegularExpression Id. */\r\n int ELSE = 22;\r\n /** RegularExpression Id. */\r\n int CLASS = 23;\r\n /** RegularExpression Id. */\r\n int WHILE = 24;\r\n /** RegularExpression Id. */\r\n int PUBLIC = 25;\r\n /** RegularExpression Id. */\r\n int RETURN = 26;\r\n /** RegularExpression Id. */\r\n int STATIC = 27;\r\n /** RegularExpression Id. */\r\n int EXTENDS = 28;\r\n /** RegularExpression Id. */\r\n int INTERFACE = 29;\r\n /** RegularExpression Id. */\r\n int ADD = 30;\r\n /** RegularExpression Id. */\r\n int SUB = 31;\r\n /** RegularExpression Id. */\r\n int MULT = 32;\r\n /** RegularExpression Id. */\r\n int AND = 33;\r\n /** RegularExpression Id. */\r\n int NOT = 34;\r\n /** RegularExpression Id. */\r\n int LESS = 35;\r\n /** RegularExpression Id. */\r\n int ASSIGN = 36;\r\n /** RegularExpression Id. */\r\n int LPARENS = 37;\r\n /** RegularExpression Id. */\r\n int RPARENS = 38;\r\n /** RegularExpression Id. */\r\n int LBRACKET = 39;\r\n /** RegularExpression Id. */\r\n int RBRACKET = 40;\r\n /** RegularExpression Id. */\r\n int LBRACE = 41;\r\n /** RegularExpression Id. */\r\n int RBRACE = 42;\r\n /** RegularExpression Id. */\r\n int COMMA = 43;\r\n /** RegularExpression Id. */\r\n int DOT = 44;\r\n /** RegularExpression Id. */\r\n int SEMI = 45;\r\n /** RegularExpression Id. */\r\n int NUM = 46;\r\n /** RegularExpression Id. */\r\n int ID = 47;\r\n /** RegularExpression Id. */\r\n int LETTER = 48;\r\n\r\n /** Lexical state. */\r\n int DEFAULT = 0;\r\n\r\n /** Literal token values. */\r\n String[] tokenImage = {\r\n \"<EOF>\",\r\n \"\\\" \\\"\",\r\n \"\\\"\\\\t\\\"\",\r\n \"\\\"\\\\n\\\"\",\r\n \"\\\"\\\\r\\\"\",\r\n \"\\\"\\\\f\\\"\",\r\n \"<LINE_COMMENT>\",\r\n \"<FORMAL_COMMENT>\",\r\n \"<MULTILINE_COMMENT>\",\r\n \"\\\"int\\\"\",\r\n \"\\\"void\\\"\",\r\n \"\\\"String\\\"\",\r\n \"\\\"boolean\\\"\",\r\n \"\\\"null\\\"\",\r\n \"\\\"this\\\"\",\r\n \"\\\"true\\\"\",\r\n \"\\\"false\\\"\",\r\n \"\\\"main\\\"\",\r\n \"\\\"length\\\"\",\r\n \"\\\"System.out.println\\\"\",\r\n \"\\\"if\\\"\",\r\n \"\\\"new\\\"\",\r\n \"\\\"else\\\"\",\r\n \"\\\"class\\\"\",\r\n \"\\\"while\\\"\",\r\n \"\\\"public\\\"\",\r\n \"\\\"return\\\"\",\r\n \"\\\"static\\\"\",\r\n \"\\\"extends\\\"\",\r\n \"\\\"interface\\\"\",\r\n \"\\\"+\\\"\",\r\n \"\\\"-\\\"\",\r\n \"\\\"*\\\"\",\r\n \"\\\"&&\\\"\",\r\n \"\\\"!\\\"\",\r\n \"\\\"<\\\"\",\r\n \"\\\"=\\\"\",\r\n \"\\\"(\\\"\",\r\n \"\\\")\\\"\",\r\n \"\\\"[\\\"\",\r\n \"\\\"]\\\"\",\r\n \"\\\"{\\\"\",\r\n \"\\\"}\\\"\",\r\n \"\\\",\\\"\",\r\n \"\\\".\\\"\",\r\n \"\\\";\\\"\",\r\n \"<NUM>\",\r\n \"<ID>\",\r\n \"<LETTER>\",\r\n };\r\n\r\n}", "private int getInt(String next) {\n\t\ttry {\n\t\t\tint a = Integer.parseInt(next);\n\t\t\tif (a > 10) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn a;\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn 0;\n\t\t}\n\t}", "String getInt_lit();", "public interface SalsaParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int SINGLE_LINE_COMMENT = 9;\n /** RegularExpression Id. */\n int FORMAL_COMMENT = 10;\n /** RegularExpression Id. */\n int MULTI_LINE_COMMENT = 11;\n /** RegularExpression Id. */\n int ABSTRACT = 13;\n /** RegularExpression Id. */\n int ACK = 14;\n /** RegularExpression Id. */\n int AT = 15;\n /** RegularExpression Id. */\n int BEHAVIOR = 16;\n /** RegularExpression Id. */\n int BOOLEAN = 17;\n /** RegularExpression Id. */\n int BREAK = 18;\n /** RegularExpression Id. */\n int BYTE = 19;\n /** RegularExpression Id. */\n int CALLED = 20;\n /** RegularExpression Id. */\n int CASE = 21;\n /** RegularExpression Id. */\n int CATCH = 22;\n /** RegularExpression Id. */\n int CHAR = 23;\n /** RegularExpression Id. */\n int CONST = 24;\n /** RegularExpression Id. */\n int CONTINUE = 25;\n /** RegularExpression Id. */\n int _DEFAULT = 26;\n /** RegularExpression Id. */\n int DELAY = 27;\n /** RegularExpression Id. */\n int DOUBLE = 28;\n /** RegularExpression Id. */\n int ENUM = 29;\n /** RegularExpression Id. */\n int ELSE = 30;\n /** RegularExpression Id. */\n int ENDIF = 31;\n /** RegularExpression Id. */\n int EXTENDS = 32;\n /** RegularExpression Id. */\n int FALSE = 33;\n /** RegularExpression Id. */\n int FLOAT = 34;\n /** RegularExpression Id. */\n int FOR = 35;\n /** RegularExpression Id. */\n int IF = 36;\n /** RegularExpression Id. */\n int IMPLEMENTS = 37;\n /** RegularExpression Id. */\n int IMPORT = 38;\n /** RegularExpression Id. */\n int INSTANCEOF = 39;\n /** RegularExpression Id. */\n int INT = 40;\n /** RegularExpression Id. */\n int INTERFACE = 41;\n /** RegularExpression Id. */\n int LATER = 42;\n /** RegularExpression Id. */\n int LONG = 43;\n /** RegularExpression Id. */\n int LOOP = 44;\n /** RegularExpression Id. */\n int MODULE = 45;\n /** RegularExpression Id. */\n int NEW = 46;\n /** RegularExpression Id. */\n int NULL = 47;\n /** RegularExpression Id. */\n int OBJECT = 48;\n /** RegularExpression Id. */\n int ON = 49;\n /** RegularExpression Id. */\n int PASS = 50;\n /** RegularExpression Id. */\n int PARENT = 51;\n /** RegularExpression Id. */\n int PUBLIC = 52;\n /** RegularExpression Id. */\n int REFERENCE = 53;\n /** RegularExpression Id. */\n int SELF = 54;\n /** RegularExpression Id. */\n int SHORT = 55;\n /** RegularExpression Id. */\n int SUPER = 56;\n /** RegularExpression Id. */\n int SYNCHRONIZED = 57;\n /** RegularExpression Id. */\n int SWITCH = 58;\n /** RegularExpression Id. */\n int _TOKEN = 59;\n /** RegularExpression Id. */\n int TRUE = 60;\n /** RegularExpression Id. */\n int TRY = 61;\n /** RegularExpression Id. */\n int USING = 62;\n /** RegularExpression Id. */\n int WAITFOR = 63;\n /** RegularExpression Id. */\n int WHILE = 64;\n /** RegularExpression Id. */\n int INTEGER_LITERAL = 65;\n /** RegularExpression Id. */\n int DECIMAL_LITERAL = 66;\n /** RegularExpression Id. */\n int HEX_LITERAL = 67;\n /** RegularExpression Id. */\n int OCTAL_LITERAL = 68;\n /** RegularExpression Id. */\n int FLOATING_POINT_LITERAL = 69;\n /** RegularExpression Id. */\n int EXPONENT = 70;\n /** RegularExpression Id. */\n int CHARACTER_LITERAL = 71;\n /** RegularExpression Id. */\n int STRING_LITERAL = 72;\n /** RegularExpression Id. */\n int IDENTIFIER = 73;\n /** RegularExpression Id. */\n int LETTER = 74;\n /** RegularExpression Id. */\n int DIGIT = 75;\n /** RegularExpression Id. */\n int LPAREN = 76;\n /** RegularExpression Id. */\n int RPAREN = 77;\n /** RegularExpression Id. */\n int LBRACE = 78;\n /** RegularExpression Id. */\n int RBRACE = 79;\n /** RegularExpression Id. */\n int LBRACKET = 80;\n /** RegularExpression Id. */\n int RBRACKET = 81;\n /** RegularExpression Id. */\n int SEMICOLON = 82;\n /** RegularExpression Id. */\n int COMMA = 83;\n /** RegularExpression Id. */\n int DOT = 84;\n /** RegularExpression Id. */\n int MSG = 85;\n /** RegularExpression Id. */\n int ASSIGN = 86;\n /** RegularExpression Id. */\n int GT = 87;\n /** RegularExpression Id. */\n int LT = 88;\n /** RegularExpression Id. */\n int BANG = 89;\n /** RegularExpression Id. */\n int TILDE = 90;\n /** RegularExpression Id. */\n int COLON = 91;\n /** RegularExpression Id. */\n int EQ = 92;\n /** RegularExpression Id. */\n int LE = 93;\n /** RegularExpression Id. */\n int GE = 94;\n /** RegularExpression Id. */\n int NE = 95;\n /** RegularExpression Id. */\n int SC_OR = 96;\n /** RegularExpression Id. */\n int SC_AND = 97;\n /** RegularExpression Id. */\n int INCR = 98;\n /** RegularExpression Id. */\n int DECR = 99;\n /** RegularExpression Id. */\n int PLUS = 100;\n /** RegularExpression Id. */\n int MINUS = 101;\n /** RegularExpression Id. */\n int STAR = 102;\n /** RegularExpression Id. */\n int SLASH = 103;\n /** RegularExpression Id. */\n int BIT_AND = 104;\n /** RegularExpression Id. */\n int BIT_OR = 105;\n /** RegularExpression Id. */\n int XOR = 106;\n /** RegularExpression Id. */\n int REM = 107;\n /** RegularExpression Id. */\n int LSHIFT = 108;\n /** RegularExpression Id. */\n int RSIGNEDSHIFT = 109;\n /** RegularExpression Id. */\n int RUNSIGNEDSHIFT = 110;\n /** RegularExpression Id. */\n int PLUSASSIGN = 111;\n /** RegularExpression Id. */\n int MINUSASSIGN = 112;\n /** RegularExpression Id. */\n int STARASSIGN = 113;\n /** RegularExpression Id. */\n int SLASHASSIGN = 114;\n /** RegularExpression Id. */\n int ANDASSIGN = 115;\n /** RegularExpression Id. */\n int ORASSIGN = 116;\n /** RegularExpression Id. */\n int XORASSIGN = 117;\n /** RegularExpression Id. */\n int REMASSIGN = 118;\n /** RegularExpression Id. */\n int LSHIFTASSIGN = 119;\n /** RegularExpression Id. */\n int RSIGNEDSHIFTASSIGN = 120;\n /** RegularExpression Id. */\n int RUNSIGNEDSHIFTASSIGN = 121;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int IN_SINGLE_LINE_COMMENT = 1;\n /** Lexical state. */\n int IN_FORMAL_COMMENT = 2;\n /** Lexical state. */\n int IN_MULTI_LINE_COMMENT = 3;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"//\\\"\",\n \"<token of kind 7>\",\n \"\\\"/*\\\"\",\n \"<SINGLE_LINE_COMMENT>\",\n \"\\\"*/\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 12>\",\n \"\\\"abstract\\\"\",\n \"\\\"ack\\\"\",\n \"\\\"at\\\"\",\n \"\\\"behavior\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"break\\\"\",\n \"\\\"byte\\\"\",\n \"\\\"called\\\"\",\n \"\\\"case\\\"\",\n \"\\\"catch\\\"\",\n \"\\\"char\\\"\",\n \"\\\"const\\\"\",\n \"\\\"continue\\\"\",\n \"\\\"default\\\"\",\n \"\\\"delay\\\"\",\n \"\\\"double\\\"\",\n \"\\\"enum\\\"\",\n \"\\\"else\\\"\",\n \"\\\"endif\\\"\",\n \"\\\"extends\\\"\",\n \"\\\"false\\\"\",\n \"\\\"float\\\"\",\n \"\\\"for\\\"\",\n \"\\\"if\\\"\",\n \"\\\"implements\\\"\",\n \"\\\"import\\\"\",\n \"\\\"instanceof\\\"\",\n \"\\\"int\\\"\",\n \"\\\"interface\\\"\",\n \"\\\"later\\\"\",\n \"\\\"long\\\"\",\n \"\\\"loop\\\"\",\n \"\\\"module\\\"\",\n \"\\\"new\\\"\",\n \"\\\"null\\\"\",\n \"\\\"object\\\"\",\n \"\\\"on\\\"\",\n \"\\\"pass\\\"\",\n \"\\\"parent\\\"\",\n \"\\\"public\\\"\",\n \"\\\"reference\\\"\",\n \"\\\"self\\\"\",\n \"\\\"short\\\"\",\n \"\\\"super\\\"\",\n \"\\\"synchronized\\\"\",\n \"\\\"switch\\\"\",\n \"\\\"token\\\"\",\n \"\\\"true\\\"\",\n \"\\\"try\\\"\",\n \"\\\"using\\\"\",\n \"\\\"waitfor\\\"\",\n \"\\\"while\\\"\",\n \"<INTEGER_LITERAL>\",\n \"<DECIMAL_LITERAL>\",\n \"<HEX_LITERAL>\",\n \"<OCTAL_LITERAL>\",\n \"<FLOATING_POINT_LITERAL>\",\n \"<EXPONENT>\",\n \"<CHARACTER_LITERAL>\",\n \"<STRING_LITERAL>\",\n \"<IDENTIFIER>\",\n \"<LETTER>\",\n \"<DIGIT>\",\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}", "private void processNumber() {\r\n\t\tString number = extractNumber();\r\n\r\n\t\tif ((!number.equals(\"1\")) && (!number.equals(\"0\"))) {\r\n\t\t\tthrow new LexerException(String.format(\"Unexpected number: %s.\", number));\r\n\t\t}\r\n\r\n\t\ttoken = new Token(TokenType.CONSTANT, number.equals(\"1\"));\r\n\t}", "public void processOperand(StreamTokenizer st) {\n\t\tif (constantCaseB){\r\n\t\t\tif (cfound){\r\n\t\t\t\tif (hexDigitCount == 60 || hexDigitCount >= (61 - (st.sval.substring(2, st.sval.length()-1).length() * 2))){\r\n\t\t\t\t\tnewTHandle();\r\n\t\t\t\t}\r\n\t\t\t\thexDigitCount += (st.sval.substring(2, st.sval.length()-1).length() * 2);\r\n\t\t\t}\r\n\t\t\telse if (xfound){\r\n\t\t\t\tif (hexDigitCount == 60 || hexDigitCount >= (61 - st.sval.substring(2, st.sval.length()-1).length())){\r\n\t\t\t\t\tnewTHandle();\r\n\t\t\t\t}\r\n\t\t\t\thexDigitCount += (st.sval.substring(2, st.sval.length()-1).length());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test145() throws Throwable {\n StringReader stringReader0 = new StringReader(\")0\\\":rw.f=QJ{Y+>$7\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"0\", token0.toString());\n }", "@Test\n public void parseToken() {\n }", "private String getIntToken(char[] characters) {\n\t\tString currentToken = \"\";\n\t\t//look at each character\n\t\tfor (char ch: characters)\n\t\t{\n\t\t\t//check if whitespace\n\t\t\tboolean ws = Character.isWhitespace(ch);\n\t\t\t//check type\n\t\t\tString type = getType(ch);\n\t\t\t\n\t\t\t//not whitespace and new ch is an integer.\n\t\t\tif (!ws && Objects.equals(type, \"int\"))\n\t\t\t{\n\t\t\t\tcurrentToken = currentToken.concat(String.valueOf(ch));\n\t\t\t}\n\t\t\t//not whitespace and special ch\n\t\t\telse if (!ws && Objects.equals(type, \"special\"))\n\t\t\t{\n\t\t\t\treturn currentToken;\n\t\t\t}\n\t\t\telse if ( ws )\n\t\t\t{\n\t\t\t\treturn currentToken;\n\t\t\t}\n\t\t\telse //ch type cannot follow integer \n\t\t\t{\n\t\t\t\tSystem.out.println(\"invalid type follows int\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\t//ran out of tokens to process\n\t\treturn currentToken;\n\t}", "static void constant(String code, String expected) {\n\t\tLexer lexer = new Lexer(code);\n\t\tAstGenerator generator = new AstGenerator();\n\t\tParseConstant<AstNode, Generator<AstNode>> pc =\n\t\t\t\tnew ParseConstant<>(lexer, generator);\n\t\tAstNode ast = pc.parse(null);\n\t\tString actual = ast.toString().replace(\"\\n\", \" \").replaceAll(\" +\", \" \");\n\t\tactual = actual.replaceAll(\"Class[0-9]+\", \"Class#\");\n//System.out.println(\"\\t\\t\\\"\" + actual.substring(23, actual.length() - 2) + \"\\\");\");\n\t\tassertEquals(expected, actual);\n\t}", "java.lang.String getConstantValue();", "private int extractInt() {\n\t\tint startIndex = index;\n\t\tfor (; index < exprLen; index++) {\n\t\t\tchar c = expr.charAt(index);\n\t\t\tif (!Character.isDigit(c)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tint endIndex = index;\n\t\tint value;\n\t\ttry {\n\t\t\tvalue = Integer.parseInt(expr.substring(startIndex, endIndex));\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalArgumentException(e.getMessage());\n\t\t}\n\n\t\treturn value;\n\t}", "public interface JavaGrammarConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int PLUS = 5;\n /** RegularExpression Id. */\n int MINUS = 6;\n /** RegularExpression Id. */\n int MULTIPLY = 7;\n /** RegularExpression Id. */\n int DIVIDE = 8;\n /** RegularExpression Id. */\n int OPEN_PARENTHESIS = 9;\n /** RegularExpression Id. */\n int CLOSED_PARENTHESIS = 10;\n /** RegularExpression Id. */\n int OPEN_BRACKET = 11;\n /** RegularExpression Id. */\n int CLOSED_BRACKET = 12;\n /** RegularExpression Id. */\n int OPEN_BRACE = 13;\n /** RegularExpression Id. */\n int CLOSED_BRACE = 14;\n /** RegularExpression Id. */\n int SEMICOLON = 15;\n /** RegularExpression Id. */\n int EQUALS = 16;\n /** RegularExpression Id. */\n int COMPARISON = 17;\n /** RegularExpression Id. */\n int LESS = 18;\n /** RegularExpression Id. */\n int GREATER = 19;\n /** RegularExpression Id. */\n int NUMBER = 20;\n /** RegularExpression Id. */\n int DIGIT = 21;\n /** RegularExpression Id. */\n int LETTER = 22;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\"=\\\"\",\n \"<COMPARISON>\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"<NUMBER>\",\n \"<DIGIT>\",\n \"<LETTER>\",\n \"\\\"new\\\"\",\n \"\\\",\\\"\",\n \"\\\"System.out.println\\\"\",\n \"\\\"\\\\\\\"\\\"\",\n \"\\\"for\\\"\",\n \"\\\"int\\\"\",\n \"\\\"++\\\"\",\n \"\\\"--\\\"\",\n };\n\n}", "public void parse(Scanner S) {\n if (!S.expectedToken(Core.INPUT)) {\n Utility.expectedhelper(Core.INPUT, S.currentToken());\n System.exit(-1);\n }\n if (S.currentToken() == Core.ID) {\n id = S.getID();\n S.nextToken();\n } else {\n Utility.expectedhelper(Core.ID, S.currentToken());\n System.exit(-1);\n }\n if (!S.expectedToken(Core.SEMICOLON)) {\n Utility.expectedhelper(Core.SEMICOLON, S.currentToken());\n System.exit(-1);\n }\n }", "private void getToken(){\n\t\tboolean primaryFirst=false;\t\t\t// determines whether the current token is a primary (true) or an operator (false)\n\t\tboolean primaryIsReal=false;\t\t// determines whether the current primary is a numerical number (true) or a name (false)\n\t\tboolean checkedPrimaryType=false;\t// determine whether the primary type has already been checked (true) or not (false)\n\t\t\n\t\twhile(true){\n\t\t\tcurr_pos++;\n\t\t\tif(curr_pos>input.length()-1){\n\t\t\t\tcurr_tok=token_value.END;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(\n\t\t\t\tinput.charAt(curr_pos)=='+' ||\n\t\t\t\tinput.charAt(curr_pos)=='-' ||\n\t\t\t\tinput.charAt(curr_pos)=='*'\t||\t\n\t\t\t\tinput.charAt(curr_pos)=='/'\t||\n\t\t\t\tinput.charAt(curr_pos)=='('\t||\n\t\t\t\tinput.charAt(curr_pos)==')'\t||\n\t\t\t\tinput.charAt(curr_pos)=='^'\t||\n\t\t\t\tinput.charAt(curr_pos)=='_'\t||\n\t\t\t\tinput.charAt(curr_pos)=='='\n\t\t\t){\n\t\t\t\tif(!primaryFirst){\n\t\t\t\t\tfor(int i=0; i<charToEnum.length; i++){\n\t\t\t\t\t\tif(input.charAt(curr_pos) == charToEnum[i]){\n\t\t\t\t\t\t\tcurr_tok=token_value.values()[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tcurr_pos--;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(!checkedPrimaryType){\n\t\t\t\t\tcheckedPrimaryType=true;\n\t\t\t\t\tint num = (int)input.charAt(curr_pos);\n\t\t\t\t\tif(num > 47 && num < 58){ // number case\n\t\t\t\t\t\tprimaryIsReal=true;\n\t\t\t\t\t}\n\t\t\t\t\tstring_value=\"\";\n\t\t\t\t}\n\t\t\t\tprimaryFirst=true;\n\t\t\t\tstring_value+=input.charAt(curr_pos);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(primaryFirst){\n\t\t\tif(primaryIsReal){\n\t\t\t\tnumber_value = Double.parseDouble(string_value);\n\t\t\t\tcurr_tok=token_value.NUMBER;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcurr_tok=token_value.NAME;\n\t\t\t}\n\t\t}\n\t}", "String getConstant();", "public static int parseT2(String in){\n Scanner s = new Scanner(in);\n int out = -1;\n if(s.hasNext()){\n out = s.nextInt();\n }\n return out;\n }", "public interface GrammarConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int SINGLE_LINE_COMMENT = 7;\n /** RegularExpression Id. */\n int FORMAL_COMMENT = 8;\n /** RegularExpression Id. */\n int MULTI_LINE_COMMENT = 9;\n /** RegularExpression Id. */\n int PLUS = 11;\n /** RegularExpression Id. */\n int MINUS = 12;\n /** RegularExpression Id. */\n int MULTIPLY = 13;\n /** RegularExpression Id. */\n int DIVIDE = 14;\n /** RegularExpression Id. */\n int MOD = 15;\n /** RegularExpression Id. */\n int UBANG = 16;\n /** RegularExpression Id. */\n int LESS_OP = 17;\n /** RegularExpression Id. */\n int MORE_OP = 18;\n /** RegularExpression Id. */\n int WHILE = 19;\n /** RegularExpression Id. */\n int IF = 20;\n /** RegularExpression Id. */\n int ELSE = 21;\n /** RegularExpression Id. */\n int BREAK = 22;\n /** RegularExpression Id. */\n int RETURN = 23;\n /** RegularExpression Id. */\n int CONTINUE = 24;\n /** RegularExpression Id. */\n int ID = 25;\n /** RegularExpression Id. */\n int LETTER = 26;\n /** RegularExpression Id. */\n int INT = 27;\n /** RegularExpression Id. */\n int SEMICOLON = 28;\n /** RegularExpression Id. */\n int LPAREN = 29;\n /** RegularExpression Id. */\n int RPAREN = 30;\n /** RegularExpression Id. */\n int LBRACKET = 31;\n /** RegularExpression Id. */\n int RBRACKET = 32;\n /** RegularExpression Id. */\n int EQUAL = 33;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int IN_FORMAL_COMMENT = 1;\n /** Lexical state. */\n int IN_MULTI_LINE_COMMENT = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 5>\",\n \"\\\"/*\\\"\",\n \"<SINGLE_LINE_COMMENT>\",\n \"\\\"*/\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 10>\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"\\\"while\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"break\\\"\",\n \"\\\"return\\\"\",\n \"\\\"continue\\\"\",\n \"<ID>\",\n \"<LETTER>\",\n \"<INT>\",\n \"\\\";\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"=\\\"\",\n \"\\\"?\\\"\",\n \"\\\":\\\"\",\n \"\\\"|\\\"\",\n \"\\\"&\\\"\",\n \"\\\"==\\\"\",\n \"\\\">=\\\"\",\n \"\\\"<=\\\"\",\n };\n\n}", "private int numberOfConstants() {\n return (int) Stream.of(this.template.split(\"\\\\.\"))\n .filter(s -> !s.equals(\"*\")).count();\n }", "Syntax.Node ParseConstFactor(Token t) throws Exception{\n if(t.type==TokenType.INTEGER){\n return new Syntax.NodeInteger((int)t.token);\n }\n if(t.type==TokenType.DOUBLE){\n return new Syntax.NodeDouble((double)t.token);\n }\n if(t.type==TokenType.IDENTIFIER){\n return new Syntax.NodeVar((String)t.token);\n }\n if(t.token.equals(\"nil\")){\n //lexer.next();\n return new Syntax.NodeNil(\"nil\");\n }\n if (t.type==TokenType.BOOLEAN){\n return new Syntax.Nodeboolean((String) t.token);\n }\n\n throw new Exception(\"Error in ParseConstFactor !!! \");\n }", "private ArrayList<Constant> importConstants(File f) throws FileNotFoundException, IOException\r\n\t{\r\n\t\tArrayList<Constant> constants = new ArrayList<>();\r\n\t\tPattern equPattern = Pattern.compile(\"\\\\s+EQU\\\\s+\");\r\n\t\tPattern constdefPattern = Pattern.compile(\"^\\\\tconst_def\\\\s*\");\r\n\t\tPattern constPattern = Pattern.compile(\"^\\\\tconst\\\\s+\");\r\n\t\tPattern constskipPattern = Pattern.compile(\"^\\\\tconst_skip\\\\s*\");\r\n\t\tPattern constnextPattern = Pattern.compile(\"^\\\\tconst_next\\\\s+\");\r\n\t\t\r\n\t\tint count = -1;\r\n\t\tint step = 1;\r\n\t\ttry (BufferedReader reader = new BufferedReader(new FileReader(f)))\r\n\t\t{\r\n\t\t\twhile (reader.ready())\r\n\t\t\t{\r\n\t\t\t\tString line = reader.readLine();\r\n\t\t\t\tString backup = line;\r\n\t\t\t\tline = this.commentPattern.matcher(line).replaceFirst(\"\");\r\n\t\t\t\tline = this.trailingWhitespacePattern.matcher(line).replaceFirst(\"\");\r\n\t\t\t\t\r\n\t\t\t\tif (equPattern.matcher(line).find())\r\n\t\t\t\t{\r\n\t\t\t\t\tString[] args = equPattern.split(line, 2);\r\n\t\t\t\t\tif (args.length != 2) continue; //throw new IllegalArgumentException(\"The line \\\"\" + line + \"\\\" does not compile\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tint value;\r\n\t\t\t\t\tif (args[1].startsWith(\"$\")) value = Integer.parseInt(args[1].substring(1), 16);\r\n\t\t\t\t\telse if (args[1].equals(\"const_value\")) value = count;\r\n\t\t\t\t\telse value = Integer.parseInt(args[1]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tconstants.add(new Constant(args[0], value));\r\n\t\t\t\t}\r\n\t\t\t\telse if (constdefPattern.matcher(line).find())\r\n\t\t\t\t{\r\n\t\t\t\t\tline = constdefPattern.matcher(line).replaceFirst(\"\");\r\n\t\t\t\t\tif (line.equals(\"\")) count = 0;\r\n\t\t\t\t\telse if (this.commaSeparatorPattern.matcher(line).find())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString[] args = this.commaSeparatorPattern.split(line);\r\n\t\t\t\t\t\tif (args.length > 2) throw new IOException(\"Too many arguments provided to const_def: \" + backup);\r\n\t\t\t\t\t\tcount = Integer.parseInt(args[0]);\r\n\t\t\t\t\t\tstep = Integer.parseInt(args[1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse count = Integer.parseInt(line);\r\n\t\t\t\t}\r\n\t\t\t\telse if (constPattern.matcher(line).find())\r\n\t\t\t\t{\r\n\t\t\t\t\tif (count == -1) throw new IllegalStateException();\r\n\t\t\t\t\tline = constPattern.matcher(line).replaceFirst(\"\");\r\n\t\t\t\t\tconstants.add(new Constant(line, count));\r\n\t\t\t\t\tcount += step;\r\n\t\t\t\t}\r\n\t\t\t\telse if (constskipPattern.matcher(line).find()) count += step;\r\n\t\t\t\telse if (constnextPattern.matcher(line).find())\r\n\t\t\t\t{\r\n\t\t\t\t\tline = constnextPattern.matcher(line).replaceFirst(\"\");\r\n\t\t\t\t\tint newCount = Integer.parseInt(line);\r\n\t\t\t\t\tif (newCount < count) throw new IOException(\"const value cannot decrease: \" + backup);\r\n\t\t\t\t\tcount = newCount;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn constants;\r\n\t}", "public GenToken scan(ParseString ps, GenToken token) throws ParserException {\n if (token != null) {\n //a token is already found, so handle it here\n GenToken result = token;\n if (token.getType().equals(\"id\")) {\n //token is an identifier\n String name = (String)token.get(\"name\");\n if ((name.equals(\"true\")) || (name.equals(\"false\"))) {\n //token is a boolean constant\n result = new GenToken(\"const\");\n result.add(\"value\", new Boolean(name));\n }\n if (name.equals(\"hash\")) {\n //token is a hash operator\n result = opToken(\"~\");\n }\n }\n return result;\n }\n //no token is found yet\n char ch = ps.nextChar();\n GenToken result = null;\n if (ch == ';') {\n result = new GenToken(\"semicol\");\n } else if (ch == ',') {\n result = new GenToken(\"comma\");\n } else if (ch == '(') {\n result = new GenToken(\"lbrack\");\n } else if (ch == ')') {\n result = new GenToken(\"rbrack\");\n } else if (ch == '{') {\n result = new GenToken(\"lacc\");\n } else if (ch == '}') {\n result = new GenToken(\"racc\");\n } else if (ch == '+') {\n char ach = ps.nextChar();\n if (ach=='=') result = new GenToken(\"plusassign\"); else {\n ps.returnChar(ach);\n result = opToken(\"+\");\n }\n } else if (ch == '-') {\n char ach = ps.nextChar();\n if (ach=='=') result = new GenToken(\"minusassign\"); else {\n ps.returnChar(ach);\n result = opToken(\"-\");\n }\n } else if (ch == '*') {\n result = opToken(\"*\");\n } else if (ch == '/') {\n result = opToken(\"/\");\n } else if (ch == '%') {\n result = opToken(\"%\");\n } else if (ch == '~') {\n result = opToken(\"~\");\n } else if (ch == '|') {\n char ach = ps.nextChar();\n if (ach == '|') result = opToken(\"||\"); else ps.returnChar(ach);\n } else if (ch == '&') {\n char ach = ps.nextChar();\n if (ach == '&') result = opToken(\"&&\"); else ps.returnChar(ach);\n } else if (ch == '=') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\"==\"); else\n if (ach == '>') result = opToken(\"=>\"); else {\n ps.returnChar(ach);\n result = new GenToken(\"assign\");\n }\n } else if (ch == '!') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\"!=\"); else {\n ps.returnChar(ach);\n result = opToken(\"!\");\n }\n } else if (ch == '<') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\"<=\"); else {\n ps.returnChar(ach);\n result = opToken(\"<\");\n }\n } else if (ch == '>') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\">=\"); else {\n ps.returnChar(ach);\n result = opToken(\">\");\n }\n } else if (ch == '\"') {\n StringBuffer aconst = new StringBuffer();\n char ach = ps.nextChar();\n while ( ach != '\"' ) {aconst.append(ach); ach = ps.nextChar();}\n result = new GenToken(\"const\");\n result.add(\"value\", aconst.toString());\n } else if (Character.isDigit(ch)) {\n StringBuffer aconst = new StringBuffer();\n aconst.append(ch);\n char ach = ps.nextChar();\n while ( (Character.isDigit(ach)) || (ch == '.') ) {aconst.append(ach); ach = ps.nextChar();}\n ps.returnChar(ach);\n\n float f = Float.parseFloat(aconst.toString());\n result = new GenToken(\"const\");\n result.add(\"value\", new Float(f));\n } else {\n ps.returnChar(ch);\n }\n return result;\n }", "@Test(timeout = 4000)\n public void test157() throws Throwable {\n StringReader stringReader0 = new StringReader(\"gR39:};Az,EeQ2PLmLM\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 84, 84, 84);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(\"gR39\", token0.toString());\n }", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return s.next_token(); \n }", "public interface PreprocessorConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int PEDAGOGICALMARKUP2 = 1;\n /** RegularExpression Id. */\n int PEDAGOGICALMARKUP3 = 2;\n /** RegularExpression Id. */\n int PEDAGOGICALMARKUP4 = 3;\n /** RegularExpression Id. */\n int PEDAGOGICALMARKUP_INVISIBLE_ALL = 4;\n /** RegularExpression Id. */\n int KEEP_SPACE = 9;\n /** RegularExpression Id. */\n int CSTYLECOMMENTSTART = 10;\n /** RegularExpression Id. */\n int NEWLINE = 11;\n /** RegularExpression Id. */\n int LINECOMMENTSTART = 12;\n /** RegularExpression Id. */\n int STARTDIRECTIVE = 13;\n /** RegularExpression Id. */\n int PPINCLUDE = 19;\n /** RegularExpression Id. */\n int PPIF = 20;\n /** RegularExpression Id. */\n int PPIFDEF = 21;\n /** RegularExpression Id. */\n int PPIFNDEF = 22;\n /** RegularExpression Id. */\n int PPELIF = 23;\n /** RegularExpression Id. */\n int PPELSE = 24;\n /** RegularExpression Id. */\n int PPENDIF = 25;\n /** RegularExpression Id. */\n int PPDEFINE = 26;\n /** RegularExpression Id. */\n int PPUNDEF = 27;\n /** RegularExpression Id. */\n int PPLINE = 28;\n /** RegularExpression Id. */\n int PPERROR = 29;\n /** RegularExpression Id. */\n int PPPRAGMA = 30;\n /** RegularExpression Id. */\n int UNEXPECTED = 31;\n /** RegularExpression Id. */\n int DQFILENAME = 32;\n /** RegularExpression Id. */\n int AQFILENAME = 33;\n /** RegularExpression Id. */\n int KEEP_KEYWORD = 34;\n /** RegularExpression Id. */\n int KEEP_NCONST = 35;\n /** RegularExpression Id. */\n int INT = 36;\n /** RegularExpression Id. */\n int INTSUFFIX = 37;\n /** RegularExpression Id. */\n int FLOATCONST = 38;\n /** RegularExpression Id. */\n int LOCAL_FLOATCONST = 39;\n /** RegularExpression Id. */\n int DIGITS = 40;\n /** RegularExpression Id. */\n int EXPPART = 41;\n /** RegularExpression Id. */\n int KEEP_ACONST = 42;\n /** RegularExpression Id. */\n int CHARACTER = 43;\n /** RegularExpression Id. */\n int STRING = 44;\n /** RegularExpression Id. */\n int SIMPLEESCAPESEQ = 45;\n /** RegularExpression Id. */\n int OCTALESCAPESEQ = 46;\n /** RegularExpression Id. */\n int HEXESCAPESEQ = 47;\n /** RegularExpression Id. */\n int UCODENAME = 48;\n /** RegularExpression Id. */\n int HEXQUAD = 49;\n /** RegularExpression Id. */\n int HEXDIG = 50;\n /** RegularExpression Id. */\n int KEEP_ID = 51;\n /** RegularExpression Id. */\n int KEEP_REST = 52;\n\n /** Lexical state. */\n int AFTERINCLUDE = 0;\n /** Lexical state. */\n int DIRECTIVE0 = 1;\n /** Lexical state. */\n int IN_C_COMMENT = 2;\n /** Lexical state. */\n int IN_LINE_COMMENT = 3;\n /** Lexical state. */\n int IN_PEDAGOGICAL_COMMENT = 4;\n /** Lexical state. */\n int MIDLINE = 5;\n /** Lexical state. */\n int DEFAULT = 6;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<PEDAGOGICALMARKUP2>\",\n \"<PEDAGOGICALMARKUP3>\",\n \"\\\"/*#\\\"\",\n \"\\\"/*#I\\\"\",\n \"\\\"*/\\\"\",\n \"\\\"*/\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 8>\",\n \"<KEEP_SPACE>\",\n \"\\\"/*\\\"\",\n \"<NEWLINE>\",\n \"\\\"//\\\"\",\n \"\\\"#\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 15>\",\n \"\\\"*/\\\"\",\n \"<token of kind 17>\",\n \"<token of kind 18>\",\n \"\\\"include\\\"\",\n \"\\\"if\\\"\",\n \"\\\"ifdef\\\"\",\n \"\\\"ifndef\\\"\",\n \"\\\"elif\\\"\",\n \"\\\"else\\\"\",\n \"\\\"endif\\\"\",\n \"\\\"define\\\"\",\n \"\\\"undef\\\"\",\n \"\\\"line\\\"\",\n \"\\\"error\\\"\",\n \"\\\"pragma\\\"\",\n \"<UNEXPECTED>\",\n \"<DQFILENAME>\",\n \"<AQFILENAME>\",\n \"<KEEP_KEYWORD>\",\n \"<KEEP_NCONST>\",\n \"<INT>\",\n \"<INTSUFFIX>\",\n \"<FLOATCONST>\",\n \"<LOCAL_FLOATCONST>\",\n \"<DIGITS>\",\n \"<EXPPART>\",\n \"<KEEP_ACONST>\",\n \"<CHARACTER>\",\n \"<STRING>\",\n \"<SIMPLEESCAPESEQ>\",\n \"<OCTALESCAPESEQ>\",\n \"<HEXESCAPESEQ>\",\n \"<UCODENAME>\",\n \"<HEXQUAD>\",\n \"<HEXDIG>\",\n \"<KEEP_ID>\",\n \"<KEEP_REST>\",\n };\n\n}", "public interface AssignmentConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int AND = 1;\n /** RegularExpression Id. */\n int OR = 2;\n /** RegularExpression Id. */\n int IMPLIES = 3;\n /** RegularExpression Id. */\n int EQUIVALENT = 4;\n /** RegularExpression Id. */\n int PREDICATE = 5;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<AND>\",\n \"<OR>\",\n \"<IMPLIES>\",\n \"<EQUIVALENT>\",\n \"<PREDICATE>\",\n };\n\n}", "public static Token getNextToken() {\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop:\n for (; ; ) {\n try {\n curChar = input_stream.BeginToken();\n } catch (java.io.IOException e) {\n jjmatchedKind = 0;\n jjmatchedPos = -1;\n matchedToken = jjFillToken();\n return matchedToken;\n }\n\n for (; ; ) {\n switch (curLexState) {\n case 0:\n try {\n input_stream.backup(0);\n while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)\n curChar = input_stream.BeginToken();\n } catch (java.io.IOException e1) {\n continue EOFLoop;\n }\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n if (jjmatchedPos == 0 && jjmatchedKind > 10) {\n jjmatchedKind = 10;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff) {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {\n matchedToken = jjFillToken();\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n } else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n curPos = 0;\n jjmatchedKind = 0x7fffffff;\n try {\n curChar = input_stream.readChar();\n continue;\n } catch (java.io.IOException e1) {\n }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try {\n input_stream.readChar();\n input_stream.backup(1);\n } catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n } else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n }\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n StringReader stringReader0 = new StringReader(\"[dfm,AL#MUTe;f\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"L\", token0.toString());\n assertEquals(74, token0.kind);\n }", "IntConstant createIntConstant();", "private Token scanString(LocatedChar firstChar) {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tappendSubsequentString(buffer);\n\t\tLocatedChar ch = input.peek();\n\t\tif(ch.matchChar('\"')) {\n\t\t\tinput.next();\n\t\t\treturn StringToken.make(firstChar, buffer.toString());\n\t\t} else {\n\t\t\tlexicalError(ch, \"malformed string\");\n\t\t\treturn findNextToken();\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test164() throws Throwable {\n StringReader stringReader0 = new StringReader(\"4+i\\\"{\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 47, 47, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(47, javaCharStream0.getColumn());\n }", "public static Token getNextToken() \n{\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n matchedToken = jjFillToken();\n return matchedToken;\n }\n\n for (;;)\n {\n switch(curLexState)\n {\n case 0:\n try { input_stream.backup(0);\n while (curChar <= 32 && (0x100002200L & (1L << curChar)) != 0L)\n curChar = input_stream.BeginToken();\n }\n catch (java.io.IOException e1) { continue EOFLoop; }\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n if (jjmatchedPos == 0 && jjmatchedKind > 6)\n {\n jjmatchedKind = 6;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n }\n else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n curPos = 0;\n jjmatchedKind = 0x7fffffff;\n try {\n curChar = input_stream.readChar();\n continue;\n }\n catch (java.io.IOException e1) { }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n }\n}", "public int inputIntValueWithScanner(Scanner sc, String enterConstant, int maxBarrier) {\r\n int res = 0;\r\n view.printMessage(enterConstant);\r\n\r\n while (true) {\r\n // check int - value\r\n while (!sc.hasNextInt()) {\r\n view.printMessage(View.WRONG_INPUT_INT_DATA\r\n + enterConstant);\r\n sc.next();\r\n }\r\n // check value in range\r\n if ((res = sc.nextInt()) < GlobalConstants.PRIMARY_MIN_BARRIER ||\r\n res > maxBarrier) {\r\n view.printMessage(View.WRONG_INPUT_INT_DATA\r\n + enterConstant);\r\n continue;\r\n }\r\n break;\r\n }\r\n return res;\r\n }", "private static int parseConstant(String value, int min, int max, String msg) {\n\t\t\ttry {\n\t\t\t\tfinal int val = Integer.parseInt(value);\n\t\t\t\tif (min <= val && val <= max) {\n\t\t\t\t\treturn val;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException nfe) {}\n\t\t\tthrow new IllegalArgumentException(msg);\n\t\t}", "@Override\n public void visit(IntConstantNode intConstantNode) {\n }", "@Test(timeout = 4000)\n public void test124() throws Throwable {\n StringReader stringReader0 = new StringReader(\"J..!IK9I\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"J\", token0.toString());\n assertEquals(74, token0.kind);\n }", "Rule IntConstant() {\n // Push 1 IntConstNode onto the value stack\n return Sequence(\n Sequence(\n Optional(NumericSign()),\n OneOrMore(Digit())),\n actions.pushIntConstNode());\n }", "private Token scanNumber(LocatedChar firstChar) {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(firstChar.getCharacter());\n\t\tappendSubsequentDigits(buffer);\n\t\tif(input.peek().getCharacter() == DECIMAL_POINT) {\n\t\t\tLocatedChar c = input.next();\n\t\t\tif(input.peek().getCharacter() == DECIMAL_POINT) {\n\t\t\t\tinput.pushback(c);\n\t\t\t\treturn IntToken.make(firstChar, buffer.toString());\n\t\t\t}\n\t\t\tbuffer.append(c.getCharacter());\n\t\t\tif(input.peek().isDigit()) {\n\t\t\t\tappendSubsequentDigits(buffer);\n\t\t\t\tif(input.peek().getCharacter() == CAPITAL_E) {\n\t\t\t\t\tLocatedChar expChar = input.next();\n\t\t\t\t\tbuffer.append(expChar.getCharacter());\n\t\t\t\t\tif(input.peek().getCharacter() == '+' || input.peek().getCharacter() == '-') {\n\t\t\t\t\t\tbuffer.append(input.next().getCharacter());\n\t\t\t\t\t}\n\t\t\t\t\tif(input.peek().isDigit()) {\n\t\t\t\t\t\tappendSubsequentDigits(buffer);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlexicalError(expChar, \"malformed floating exponent literal\");\n\t\t\t\t\t\treturn findNextToken();\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\treturn FloatToken.make(firstChar, buffer.toString());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlexicalError(firstChar, \"malformed floating literal\");\n\t\t\t\treturn findNextToken();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn IntToken.make(firstChar, buffer.toString());\n\t\t}\n\t}", "@NotNull\n private SyntaxToken<?> maybeConstant() {\n final SyntaxToken<?> token = peek();\n final SyntaxToken<?> t;\n if (token.getValue().equals(Keyword.CONSTANT)) {\n tokens.add(next());\n t = parseDefinitionBody(SyntaxColor.CONSTANT);\n constants.add(t.getValue().toString());\n } else {\n t = parseDefinitionBody(SyntaxColor.REFERENCE);\n references.add(t.getValue().toString());\n }\n return t;\n }", "public int nextInt()\r\n\t{\r\n\t\tif(st == null || !st.hasMoreTokens())\r\n\t\t\tnewst();\r\n\t\treturn Integer.parseInt(st.nextToken());\r\n\t}", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n StringReader stringReader0 = new StringReader(\"RaLz,<NBG_}Q[P4}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 20, 0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }", "public interface RedisConstant {\n\n String TOKEN_PREFIX = \"TOKEN_%s\";\n Integer EXPIRE = 7200;//SECOND\n\n}", "public interface GoConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int integer_literal = 8;\n /** RegularExpression Id. */\n int floating_literal = 9;\n /** RegularExpression Id. */\n int boolean_literal = 10;\n /** RegularExpression Id. */\n int string_literal = 11;\n /** RegularExpression Id. */\n int numbers = 12;\n /** RegularExpression Id. */\n int valid_characters = 13;\n /** RegularExpression Id. */\n int double_quotes_in_string = 14;\n /** RegularExpression Id. */\n int back_slash = 15;\n /** RegularExpression Id. */\n int tabulations = 16;\n /** RegularExpression Id. */\n int addition = 17;\n /** RegularExpression Id. */\n int subtraction = 18;\n /** RegularExpression Id. */\n int multiplication = 19;\n /** RegularExpression Id. */\n int division = 20;\n /** RegularExpression Id. */\n int remainder = 21;\n /** RegularExpression Id. */\n int increment = 22;\n /** RegularExpression Id. */\n int decrement = 23;\n /** RegularExpression Id. */\n int equal = 24;\n /** RegularExpression Id. */\n int not_equal = 25;\n /** RegularExpression Id. */\n int greater_than = 26;\n /** RegularExpression Id. */\n int less_than = 27;\n /** RegularExpression Id. */\n int greater_than_or_equal = 28;\n /** RegularExpression Id. */\n int less_than_or_equal = 29;\n /** RegularExpression Id. */\n int bitwise_and = 30;\n /** RegularExpression Id. */\n int bitwise_inclusive_or = 31;\n /** RegularExpression Id. */\n int bitwise_exclusive_or = 32;\n /** RegularExpression Id. */\n int left_shift = 33;\n /** RegularExpression Id. */\n int right_shift = 34;\n /** RegularExpression Id. */\n int and = 35;\n /** RegularExpression Id. */\n int or = 36;\n /** RegularExpression Id. */\n int not = 37;\n /** RegularExpression Id. */\n int assignment = 38;\n /** RegularExpression Id. */\n int dynamic_assignment = 39;\n /** RegularExpression Id. */\n int addition_assignment = 40;\n /** RegularExpression Id. */\n int subtraction_assignment = 41;\n /** RegularExpression Id. */\n int multiplication_assignment = 42;\n /** RegularExpression Id. */\n int division_assignment = 43;\n /** RegularExpression Id. */\n int remainder_assignment = 44;\n /** RegularExpression Id. */\n int bitwise_and_assignment = 45;\n /** RegularExpression Id. */\n int bitwise_inclusive_or_assignment = 46;\n /** RegularExpression Id. */\n int bitwise_exclusive_or_assignment = 47;\n /** RegularExpression Id. */\n int left_shift_assignment = 48;\n /** RegularExpression Id. */\n int right_shift_assignment = 49;\n /** RegularExpression Id. */\n int opening_round_brackets = 50;\n /** RegularExpression Id. */\n int closing_round_brackets = 51;\n /** RegularExpression Id. */\n int opening_curly_brackets = 52;\n /** RegularExpression Id. */\n int closing_curly_brackets = 53;\n /** RegularExpression Id. */\n int opening_square_brackets = 54;\n /** RegularExpression Id. */\n int closing_square_brackets = 55;\n /** RegularExpression Id. */\n int semicolon = 56;\n /** RegularExpression Id. */\n int colon = 57;\n /** RegularExpression Id. */\n int dot = 58;\n /** RegularExpression Id. */\n int comma = 59;\n /** RegularExpression Id. */\n int double_quotes = 60;\n /** RegularExpression Id. */\n int quotes = 61;\n /** RegularExpression Id. */\n int rw_break = 62;\n /** RegularExpression Id. */\n int rw_default = 63;\n /** RegularExpression Id. */\n int rw_func = 64;\n /** RegularExpression Id. */\n int rw_interface = 65;\n /** RegularExpression Id. */\n int rw_select = 66;\n /** RegularExpression Id. */\n int rw_case = 67;\n /** RegularExpression Id. */\n int rw_defer = 68;\n /** RegularExpression Id. */\n int rw_go = 69;\n /** RegularExpression Id. */\n int rw_map = 70;\n /** RegularExpression Id. */\n int rw_struct = 71;\n /** RegularExpression Id. */\n int rw_chan = 72;\n /** RegularExpression Id. */\n int rw_else = 73;\n /** RegularExpression Id. */\n int rw_goto = 74;\n /** RegularExpression Id. */\n int rw_package = 75;\n /** RegularExpression Id. */\n int rw_switch = 76;\n /** RegularExpression Id. */\n int rw_const = 77;\n /** RegularExpression Id. */\n int rw_fallthrough = 78;\n /** RegularExpression Id. */\n int rw_if = 79;\n /** RegularExpression Id. */\n int rw_range = 80;\n /** RegularExpression Id. */\n int rw_type = 81;\n /** RegularExpression Id. */\n int rw_continue = 82;\n /** RegularExpression Id. */\n int rw_for = 83;\n /** RegularExpression Id. */\n int rw_import = 84;\n /** RegularExpression Id. */\n int rw_return = 85;\n /** RegularExpression Id. */\n int rw_var = 86;\n /** RegularExpression Id. */\n int dt_uint8 = 87;\n /** RegularExpression Id. */\n int dt_uint16 = 88;\n /** RegularExpression Id. */\n int dt_uint32 = 89;\n /** RegularExpression Id. */\n int dt_uint64 = 90;\n /** RegularExpression Id. */\n int dt_int8 = 91;\n /** RegularExpression Id. */\n int dt_int16 = 92;\n /** RegularExpression Id. */\n int dt_int32 = 93;\n /** RegularExpression Id. */\n int dt_int64 = 94;\n /** RegularExpression Id. */\n int dt_float32 = 95;\n /** RegularExpression Id. */\n int dt_float64 = 96;\n /** RegularExpression Id. */\n int dt_complex64 = 97;\n /** RegularExpression Id. */\n int dt_complex128 = 98;\n /** RegularExpression Id. */\n int dt_byte = 99;\n /** RegularExpression Id. */\n int dt_rune = 100;\n /** RegularExpression Id. */\n int dt_uint = 101;\n /** RegularExpression Id. */\n int dt_int = 102;\n /** RegularExpression Id. */\n int dt_uintptr = 103;\n /** RegularExpression Id. */\n int dt_string = 104;\n /** RegularExpression Id. */\n int dt_bool = 105;\n /** RegularExpression Id. */\n int main = 106;\n /** RegularExpression Id. */\n int library_fmt = 107;\n /** RegularExpression Id. */\n int rw_printf = 108;\n /** RegularExpression Id. */\n int rw_scanf = 109;\n /** RegularExpression Id. */\n int id = 110;\n /** RegularExpression Id. */\n int invalid_string = 111;\n /** RegularExpression Id. */\n int invalid_string_import = 112;\n /** RegularExpression Id. */\n int invalid_string_import_1 = 113;\n /** RegularExpression Id. */\n int invalid_string_import_2 = 114;\n /** RegularExpression Id. */\n int is_not_id = 115;\n /** RegularExpression Id. */\n int invalid_character = 116;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\r\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"<integer_literal>\",\n \"<floating_literal>\",\n \"<boolean_literal>\",\n \"<string_literal>\",\n \"<numbers>\",\n \"<valid_characters>\",\n \"\\\"\\\\\\\\\\\\\\\"\\\"\",\n \"\\\"\\\\\\\\\\\"\",\n \"<tabulations>\",\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 \"\\\"break\\\"\",\n \"\\\"default\\\"\",\n \"\\\"func\\\"\",\n \"\\\"interface\\\"\",\n \"\\\"select\\\"\",\n \"\\\"case\\\"\",\n \"\\\"defer\\\"\",\n \"\\\"go\\\"\",\n \"\\\"map\\\"\",\n \"\\\"struct\\\"\",\n \"\\\"chan\\\"\",\n \"\\\"else\\\"\",\n \"\\\"goto\\\"\",\n \"\\\"package\\\"\",\n \"\\\"switch\\\"\",\n \"\\\"const\\\"\",\n \"\\\"fallthrough\\\"\",\n \"\\\"if\\\"\",\n \"\\\"range\\\"\",\n \"\\\"type\\\"\",\n \"\\\"continue\\\"\",\n \"\\\"for\\\"\",\n \"\\\"import\\\"\",\n \"\\\"return\\\"\",\n \"\\\"var\\\"\",\n \"\\\"uint8\\\"\",\n \"\\\"uint16\\\"\",\n \"\\\"uint32\\\"\",\n \"\\\"uint64\\\"\",\n \"\\\"int8\\\"\",\n \"\\\"int16\\\"\",\n \"\\\"int32\\\"\",\n \"\\\"int64\\\"\",\n \"\\\"float32\\\"\",\n \"\\\"float64\\\"\",\n \"\\\"complex64\\\"\",\n \"\\\"complex128\\\"\",\n \"\\\"byte\\\"\",\n \"\\\"rune\\\"\",\n \"\\\"uint\\\"\",\n \"\\\"int\\\"\",\n \"\\\"uintptr\\\"\",\n \"\\\"string\\\"\",\n \"\\\"bool\\\"\",\n \"\\\"main\\\"\",\n \"\\\"fmt\\\"\",\n \"\\\"Printf\\\"\",\n \"\\\"Scanf\\\"\",\n \"<id>\",\n \"<invalid_string>\",\n \"<invalid_string_import>\",\n \"<invalid_string_import_1>\",\n \"<invalid_string_import_2>\",\n \"<is_not_id>\",\n \"<invalid_character>\",\n };\n\n}", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return getScanner().next_token(); \n }", "@Test(timeout = 4000)\n public void test152() throws Throwable {\n StringReader stringReader0 = new StringReader(\"pZhZ$;yY23j:\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 121, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[4];\n stringReader0.read(charArray0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"$\", token0.toString());\n assertEquals(74, token0.kind);\n }", "public interface ForteLangConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int COMPARATOR_OP = 1;\n /** RegularExpression Id. */\n int BOOLEAN_OP = 2;\n /** RegularExpression Id. */\n int SET_OP = 3;\n /** RegularExpression Id. */\n int OP = 4;\n /** RegularExpression Id. */\n int CONCAT = 5;\n /** RegularExpression Id. */\n int SELECT = 6;\n /** RegularExpression Id. */\n int CONTAINS = 7;\n /** RegularExpression Id. */\n int NUMBER = 8;\n /** RegularExpression Id. */\n int FLOATING_POINT_NUMBER = 9;\n /** RegularExpression Id. */\n int BOOLEAN = 10;\n /** RegularExpression Id. */\n int STRING = 11;\n /** RegularExpression Id. */\n int REGEX_STRING = 12;\n /** RegularExpression Id. */\n int INCLUDE = 13;\n /** RegularExpression Id. */\n int IN = 14;\n /** RegularExpression Id. */\n int MATCH = 15;\n /** RegularExpression Id. */\n int OPENBRACKET = 16;\n /** RegularExpression Id. */\n int CLOSEBRACKET = 17;\n /** RegularExpression Id. */\n int OPENSBRACKET = 18;\n /** RegularExpression Id. */\n int CLOSESBRACKET = 19;\n /** RegularExpression Id. */\n int COMMA = 20;\n /** RegularExpression Id. */\n int EQUALS = 21;\n /** RegularExpression Id. */\n int SEMICOLON = 22;\n /** RegularExpression Id. */\n int OPENCBRACKET = 23;\n /** RegularExpression Id. */\n int CLOSECBRACKET = 24;\n /** RegularExpression Id. */\n int NUM = 25;\n /** RegularExpression Id. */\n int LST = 26;\n /** RegularExpression Id. */\n int SET = 27;\n /** RegularExpression Id. */\n int FUN = 28;\n /** RegularExpression Id. */\n int BOO = 29;\n /** RegularExpression Id. */\n int STR = 30;\n /** RegularExpression Id. */\n int COLON = 31;\n /** RegularExpression Id. */\n int VAR_NAME = 32;\n /** RegularExpression Id. */\n int FUNCTION_ARROW = 33;\n /** RegularExpression Id. */\n int GUARD_START = 34;\n /** RegularExpression Id. */\n int GUARD = 35;\n /** RegularExpression Id. */\n int GUARD_ARROW = 36;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int BlockComment = 1;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<COMPARATOR_OP>\",\n \"<BOOLEAN_OP>\",\n \"<SET_OP>\",\n \"<OP>\",\n \"\\\"++\\\"\",\n \"\\\".\\\"\",\n \"\\\"?\\\"\",\n \"<NUMBER>\",\n \"<FLOATING_POINT_NUMBER>\",\n \"<BOOLEAN>\",\n \"<STRING>\",\n \"<REGEX_STRING>\",\n \"\\\"include\\\"\",\n \"\\\"in\\\"\",\n \"\\\"match\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\",\\\"\",\n \"\\\"=\\\"\",\n \"\\\";\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"num\\\"\",\n \"\\\"list\\\"\",\n \"\\\"set\\\"\",\n \"\\\"func\\\"\",\n \"\\\"bool\\\"\",\n \"\\\"str\\\"\",\n \"\\\":\\\"\",\n \"<VAR_NAME>\",\n \"\\\"->\\\"\",\n \"\\\"|>\\\"\",\n \"\\\"|\\\"\",\n \"\\\"->>\\\"\",\n \"<token of kind 37>\",\n \"<token of kind 38>\",\n \"\\\"#[\\\"\",\n \"\\\"#[\\\"\",\n \"<token of kind 41>\",\n \"\\\"]#\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n };\n\n}", "private int scanInt() {\n String word = scan();\n if (word.length() == 0) {\n return Integer.MAX_VALUE;\n }\n\n try {\n return Integer.parseInt(word);\n } catch (NumberFormatException e) {\n return Integer.MAX_VALUE;\n }\n }", "public void processOperandN(StreamTokenizer st) {\n\t\tif (constantCaseB){\r\n\t\t\tif (cfound){\r\n\t\t\t\thexDigitCount += (NtoString(st.nval).substring(2, NtoString(st.nval).length()-1).length() * 2);\r\n\t\t\t}\r\n\t\t\telse if (xfound){\r\n\t\t\t\thexDigitCount += (NtoString(st.nval).substring(2, NtoString(st.nval).length()-1).length());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void scanToken() {\n char c = advance();\n switch (c) {\n case '(':\n addToken(LEFT_PAREN);\n break;\n case ')':\n addToken(RIGHT_PAREN);\n break;\n case '{':\n addToken(LEFT_BRACE);\n break;\n case '}':\n addToken(RIGHT_BRACE);\n break;\n case ',':\n addToken(COMMA);\n break;\n case '.':\n addToken(DOT);\n break;\n case '-':\n addToken(MINUS);\n break;\n case '+':\n addToken(PLUS);\n break;\n case ';':\n addToken(SEMICOLON);\n break;\n case '*':\n addToken(STAR);\n break;\n case '?':\n addToken(QUERY);\n break;\n case ':':\n addToken(COLON);\n break;\n\n case '!': // These characters could be part of a 2-char lexeme, so must check the second char.\n addToken(secondCharIs('=') ? BANG_EQUAL : BANG);\n break;\n case '=':\n addToken(secondCharIs('=') ? EQUAL_EQUAL : EQUAL);\n break;\n case '<':\n addToken(secondCharIs('=') ? LESS_EQUAL : LESS);\n break;\n case '>':\n addToken(secondCharIs('=') ? GREATER_EQUAL : GREATER);\n break;\n\n case '/': // The / char could be the beginning of a comment\n handleSlash();\n break;\n\n case ' ': // Ignore whitespace\n case '\\r':\n case '\\t':\n break;\n\n case '\\n': // Ignore newline but increase line count\n line++;\n break;\n\n case '\"': // Beginning of a string\n handleString();\n break;\n\n default:\n if (isDigit(c)) {\n handleNumber();\n } else if (isAlpha(c)) {\n handleIdentifier();\n } else {\n Rune.error(line, \"Unexpected character.\");\n }\n break;\n }\n }", "public interface ParserASTConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int KW_CLASS = 8;\n /** RegularExpression Id. */\n int KW_PUBLIC = 9;\n /** RegularExpression Id. */\n int KW_STATIC = 10;\n /** RegularExpression Id. */\n int KW_VOID = 11;\n /** RegularExpression Id. */\n int KW_MAIN = 12;\n /** RegularExpression Id. */\n int KW_STRING = 13;\n /** RegularExpression Id. */\n int KW_EXTENDS = 14;\n /** RegularExpression Id. */\n int KW_RETURN = 15;\n /** RegularExpression Id. */\n int KW_INT = 16;\n /** RegularExpression Id. */\n int KW_BOOLEAN = 17;\n /** RegularExpression Id. */\n int KW_IF = 18;\n /** RegularExpression Id. */\n int KW_ELSE = 19;\n /** RegularExpression Id. */\n int KW_WHILE = 20;\n /** RegularExpression Id. */\n int KW_TRUE = 21;\n /** RegularExpression Id. */\n int KW_FALSE = 22;\n /** RegularExpression Id. */\n int KW_THIS = 23;\n /** RegularExpression Id. */\n int KW_NEW = 24;\n /** RegularExpression Id. */\n int KW_PRINT = 25;\n /** RegularExpression Id. */\n int SYM_LBRACE = 26;\n /** RegularExpression Id. */\n int SYM_RBRACE = 27;\n /** RegularExpression Id. */\n int SYM_LPAREN = 28;\n /** RegularExpression Id. */\n int SYM_RPAREN = 29;\n /** RegularExpression Id. */\n int SYM_LSQPAREN = 30;\n /** RegularExpression Id. */\n int SYM_RSQPAREN = 31;\n /** RegularExpression Id. */\n int SYM_SEMICOLON = 32;\n /** RegularExpression Id. */\n int SYM_EQUAL = 33;\n /** RegularExpression Id. */\n int SYM_AMPAMP = 34;\n /** RegularExpression Id. */\n int SYM_BARBAR = 35;\n /** RegularExpression Id. */\n int SYM_LESS = 36;\n /** RegularExpression Id. */\n int SYM_LESSEQUAL = 37;\n /** RegularExpression Id. */\n int SYM_EQUALEQUAL = 38;\n /** RegularExpression Id. */\n int SYM_EXCLEQUAL = 39;\n /** RegularExpression Id. */\n int SYM_MORE = 40;\n /** RegularExpression Id. */\n int SYM_MOREEQUAL = 41;\n /** RegularExpression Id. */\n int SYM_PLUS = 42;\n /** RegularExpression Id. */\n int SYM_MINUS = 43;\n /** RegularExpression Id. */\n int SYM_STAR = 44;\n /** RegularExpression Id. */\n int SYM_SLASH = 45;\n /** RegularExpression Id. */\n int SYM_PERCENT = 46;\n /** RegularExpression Id. */\n int SYM_EXCL = 47;\n /** RegularExpression Id. */\n int SYM_DOT = 48;\n /** RegularExpression Id. */\n int SYM_COMMA = 49;\n /** RegularExpression Id. */\n int IDENTIFIER = 50;\n /** RegularExpression Id. */\n int INT_LITERAL = 51;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"\\\\r\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"class\\\"\",\n \"\\\"public\\\"\",\n \"\\\"static\\\"\",\n \"\\\"void\\\"\",\n \"\\\"main\\\"\",\n \"\\\"String\\\"\",\n \"\\\"extends\\\"\",\n \"\\\"return\\\"\",\n \"\\\"int\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"while\\\"\",\n \"\\\"true\\\"\",\n \"\\\"false\\\"\",\n \"\\\"this\\\"\",\n \"\\\"new\\\"\",\n \"\\\"System.out.println\\\"\",\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 \"<IDENTIFIER>\",\n \"<INT_LITERAL>\",\n };\n\n}", "Constant getStartOffsetConstant();", "private Token consume() throws SyntaxException {\n\t\tToken tmp = t;\n\t\tt = scanner.nextToken();\n\t\treturn tmp;\n\t}", "@Test(timeout = 4000)\n public void test016() throws Throwable {\n StringReader stringReader0 = new StringReader(\")0\\\":rw.f=QJ{Y+>$7\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0, 3);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 1, column 2. Encountered: \\\"0\\\" (48), after : \\\"\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "public static int getInt() throws IOException {\n\t\nString s = getString();\nreturn Integer.parseInt(s);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Returns the integer in the string as an Int.\n\t\n}", "private int[] getLHSIntFromString(String token) {\n\n if (token == null) {\n return null;\n }\n\n if (token.length() < 1) {\n return null;\n }\n\n Vector<String> lhsInt = new Vector<>();\n\n try (Scanner colonScanner = new Scanner(token)) {\n colonScanner.useDelimiter(\";\");\n\n while (colonScanner.hasNext()) {\n String next = colonScanner.next();\n if (next.equals(\"0\")) {\n return null;\n }\n\n lhsInt.add(next);\n }\n }\n\n //Convert to array of int\n int[] lhsIntArr = new int[lhsInt.size()];\n for(int i = 0; i < lhsIntArr.length; ++i) {\n lhsIntArr[i] = Integer.parseInt(lhsInt.get(i));\n }\n\n //If these rules are being reloaded, the LHS int values need to be adjusted\n if (this.ruleIdOffset > 0) {\n for(int i = 0; i < lhsIntArr.length; ++i) {\n lhsIntArr[i] += this.ruleIdOffset;\n }\n }\n\n return lhsIntArr;\n }", "@Test(timeout = 4000)\n public void test123() throws Throwable {\n StringReader stringReader0 = new StringReader(\"[KXX]J]NmN+<TJ,w1_\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 2897, 2897);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(2898, javaCharStream0.getBeginColumn());\n assertEquals(74, token0.kind);\n }", "@Test(timeout = 4000)\n public void test160() throws Throwable {\n StringReader stringReader0 = new StringReader(\"interuace\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(8, javaCharStream0.bufpos);\n assertEquals(\"interuace\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n StringReader stringReader0 = new StringReader(\"U3kE.1/hk@Tuvel]`L\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }", "private static void testBadIntLiterals() throws IOException {\n\t// say what output is expected\n\tSystem.err.println(\"TEST BAD INTS: BAD INTS ON LINES 2 AND 3\");\n\n\t// open input file\n\tFileReader inFile = null;\n\ttry {\n\t inFile = new FileReader(\"inBadIntLiterals\");\n\t} catch (FileNotFoundException ex) {\n\t System.err.println(\"File inBadIntLiterals not found.\");\n\t System.exit(-1);\n\t}\n\n\t// create and call the scanner\n\tYylex scanner = new Yylex(inFile);\n\tSymbol token = scanner.next_token();\n\twhile (token.sym != sym.EOF) {\n\t if (token.sym != sym.INTLITERAL) {\n\t\tSystem.err.println(\"ERROR TESTING BAD INT LITERALS: bad token: \" +\n\t\t\t\t token.sym);\n\t }\n\t token = scanner.next_token();\n\t}\n }", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return lexer.nextToken(); \n }", "@Test(timeout = 4000)\n public void test081() throws Throwable {\n StringReader stringReader0 = new StringReader(\";{\\\"9n/s(2C'#tQX*\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[4];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n StringReader stringReader0 = new StringReader(\"XlJO@=TH|\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 124, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(\"XlJO\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test153() throws Throwable {\n StringReader stringReader0 = new StringReader(\"#crIx\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 2897, 32);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 2897, column 32. Encountered: \\\"#\\\" (35), after : \\\"\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "@Test(timeout = 4000)\n public void test147() throws Throwable {\n StringReader stringReader0 = new StringReader(\"*22Wt+'F\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-1142), 109);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"*\", token0.toString());\n }", "public static void countTokens(Scanner in) {\n }", "public java_cup.runtime.Symbol scan()\r\n throws java.lang.Exception\r\n {\r\n\r\n\tSymbol s = this.getScanner().next_token();\r\n\tif (s != null && s.value != null) \r\n\t\tlog.info(s.toString() + \" \" + s.value.toString());\r\n\treturn s;\r\n\r\n }", "public Object visitIntegerConstant(GNode n) {\n xtc.type.Type result;\n \n result = cops.typeInteger(n.getString(0));\n \n return result.getConstant().bigIntValue().longValue();\n }", "public interface EG1Constants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int INT = 6;\n /** RegularExpression Id. */\n int REAL = 7;\n /** RegularExpression Id. */\n int BOOL = 8;\n /** RegularExpression Id. */\n int LIST = 9;\n /** RegularExpression Id. */\n int STR = 10;\n /** RegularExpression Id. */\n int CARACT = 11;\n /** RegularExpression Id. */\n int SE = 12;\n /** RegularExpression Id. */\n int SENAO = 13;\n /** RegularExpression Id. */\n int SENAOSE = 14;\n /** RegularExpression Id. */\n int ENQUANTO = 15;\n /** RegularExpression Id. */\n int PARA = 16;\n /** RegularExpression Id. */\n int VERDADEIRO = 17;\n /** RegularExpression Id. */\n int FALSO = 18;\n /** RegularExpression Id. */\n int IMPRIMIR = 19;\n /** RegularExpression Id. */\n int MAIS = 20;\n /** RegularExpression Id. */\n int MENOS = 21;\n /** RegularExpression Id. */\n int MULTIPLICAR = 22;\n /** RegularExpression Id. */\n int DIVIDIR = 23;\n /** RegularExpression Id. */\n int ATRIBUICAO = 24;\n /** RegularExpression Id. */\n int MAIOR = 25;\n /** RegularExpression Id. */\n int MENOR = 26;\n /** RegularExpression Id. */\n int MAIOR_IGUAL = 27;\n /** RegularExpression Id. */\n int MENOR_IGUAL = 28;\n /** RegularExpression Id. */\n int IGUAL = 29;\n /** RegularExpression Id. */\n int DIFERENTE = 30;\n /** RegularExpression Id. */\n int ABRE_PARENTESES = 31;\n /** RegularExpression Id. */\n int FECHA_PARENTESES = 32;\n /** RegularExpression Id. */\n int ABRE_CHAVES = 33;\n /** RegularExpression Id. */\n int FECHA_CHAVES = 34;\n /** RegularExpression Id. */\n int ABRE_COLCHETE = 35;\n /** RegularExpression Id. */\n int FECHA_COLCHETE = 36;\n /** RegularExpression Id. */\n int PONTO_VIRGULA = 37;\n /** RegularExpression Id. */\n int VIRGULA = 38;\n /** RegularExpression Id. */\n int PONTO = 39;\n /** RegularExpression Id. */\n int CONSTANTE_INT = 40;\n /** RegularExpression Id. */\n int CONSTANTE_REAL = 41;\n /** RegularExpression Id. */\n int DIGITO = 42;\n /** RegularExpression Id. */\n int VARIAVEL = 43;\n /** RegularExpression Id. */\n int CARACTERE = 44;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"INT\\\"\",\n \"\\\"REAL\\\"\",\n \"\\\"BOOL\\\"\",\n \"\\\"LIST\\\"\",\n \"\\\"STR\\\"\",\n \"\\\"CARACT\\\"\",\n \"\\\"SE\\\"\",\n \"\\\"SENAO\\\"\",\n \"\\\"SENAOSE\\\"\",\n \"\\\"ENQUANTO\\\"\",\n \"\\\"PARA\\\"\",\n \"\\\"VERDADEIRO\\\"\",\n \"\\\"FALSO\\\"\",\n \"\\\"IMPRIMIR\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"=\\\"\",\n \"\\\">\\\"\",\n \"\\\"<\\\"\",\n \"\\\" >=\\\"\",\n \"\\\"<=\\\"\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"<CONSTANTE_INT>\",\n \"<CONSTANTE_REAL>\",\n \"<DIGITO>\",\n \"<VARIAVEL>\",\n \"<CARACTERE>\",\n };\n\n}", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n StringReader stringReader0 = new StringReader(\"a\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 17);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(74, token0.kind);\n assertEquals(\"a\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test156() throws Throwable {\n StringReader stringReader0 = new StringReader(\"w\\\"[\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-3472), 1634);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"w\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n StringReader stringReader0 = new StringReader(\"m51)\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }", "private AddressLiteralTagToken.Kind scanToken() throws ParseException {\n if (ALPHA.isSatisfiedBy(currentChar)) {\n scanStandardizedTag();\n return Kind.STANDARDIZED_TAG;\n } else if (CharClasses.DIGIT.isSatisfiedBy(currentChar)) {\n return Kind.DIGIT;\n } else {\n throw currentCharToken.syntaxException(\"The first digit of an \"\n + \"IPv4 address, or an address type tag, like 'IPv6'\");\n }\n }", "public TermConstant(int indexIn)\n {\n index = indexIn;\n }", "private Token scanKeywordOrIdentifier() {\n Token tok;\n Pair<Integer, Integer> pos = new Pair<>(in.line(), in.pos());\n while ((Character.isLetterOrDigit(c) || c == '_') && c != -1) {\n buffer.add(c);\n c = in.read();\n }\n\n String st = buffer.toString();\n TokenType type;\n buffer.flush();\n\n if ((type = Token.KEYWORD_TABLE.get(st)) != null) {\n tok = new Token(st, type, pos);\n } else {\n tok = new Token(st, TokenType.IDENTIFIER, pos);\n }\n return tok;\n }", "public interface langBConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int BREAK = 12;\n /** RegularExpression Id. */\n int CLASS = 13;\n /** RegularExpression Id. */\n int CONSTRUCTOR = 14;\n /** RegularExpression Id. */\n int ELSE = 15;\n /** RegularExpression Id. */\n int EXTENDS = 16;\n /** RegularExpression Id. */\n int FOR = 17;\n /** RegularExpression Id. */\n int IF = 18;\n /** RegularExpression Id. */\n int THEN = 19;\n /** RegularExpression Id. */\n int INT = 20;\n /** RegularExpression Id. */\n int NEW = 21;\n /** RegularExpression Id. */\n int PRINT = 22;\n /** RegularExpression Id. */\n int READ = 23;\n /** RegularExpression Id. */\n int RETURN = 24;\n /** RegularExpression Id. */\n int STRING = 25;\n /** RegularExpression Id. */\n int SUPER = 26;\n /** RegularExpression Id. */\n int BOOLEAN = 27;\n /** RegularExpression Id. */\n int TRUE = 28;\n /** RegularExpression Id. */\n int FALSE = 29;\n /** RegularExpression Id. */\n int WHILE = 30;\n /** RegularExpression Id. */\n int SWITCH = 31;\n /** RegularExpression Id. */\n int CASE = 32;\n /** RegularExpression Id. */\n int int_constant = 33;\n /** RegularExpression Id. */\n int string_constant = 34;\n /** RegularExpression Id. */\n int null_constant = 35;\n /** RegularExpression Id. */\n int IDENT = 36;\n /** RegularExpression Id. */\n int LETTER = 37;\n /** RegularExpression Id. */\n int DIGIT = 38;\n /** RegularExpression Id. */\n int UNDERSCORE = 39;\n /** RegularExpression Id. */\n int LPAREN = 40;\n /** RegularExpression Id. */\n int RPAREN = 41;\n /** RegularExpression Id. */\n int LBRACE = 42;\n /** RegularExpression Id. */\n int RBRACE = 43;\n /** RegularExpression Id. */\n int LBRACKET = 44;\n /** RegularExpression Id. */\n int RBRACKET = 45;\n /** RegularExpression Id. */\n int SEMICOLON = 46;\n /** RegularExpression Id. */\n int COMMA = 47;\n /** RegularExpression Id. */\n int DOT = 48;\n /** RegularExpression Id. */\n int DDOT = 49;\n /** RegularExpression Id. */\n int QUESTIONMARK = 50;\n /** RegularExpression Id. */\n int ASSIGN = 51;\n /** RegularExpression Id. */\n int GT = 52;\n /** RegularExpression Id. */\n int LT = 53;\n /** RegularExpression Id. */\n int EQ = 54;\n /** RegularExpression Id. */\n int LE = 55;\n /** RegularExpression Id. */\n int GE = 56;\n /** RegularExpression Id. */\n int NEQ = 57;\n /** RegularExpression Id. */\n int PLUS = 58;\n /** RegularExpression Id. */\n int MINUS = 59;\n /** RegularExpression Id. */\n int STAR = 60;\n /** RegularExpression Id. */\n int SLASH = 61;\n /** RegularExpression Id. */\n int REM = 62;\n /** RegularExpression Id. */\n int OR = 63;\n /** RegularExpression Id. */\n int AND = 64;\n /** RegularExpression Id. */\n int INVALID_LEXICAL = 65;\n /** RegularExpression Id. */\n int INVALID_CONST = 66;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int multilinecomment = 1;\n /** Lexical state. */\n int singlelinecomment = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"/*\\\"\",\n \"\\\"//\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 9>\",\n \"<token of kind 10>\",\n \"<token of kind 11>\",\n \"\\\"parar\\\"\",\n \"\\\"classe\\\"\",\n \"\\\"construtor\\\"\",\n \"\\\"senao\\\"\",\n \"\\\"herda\\\"\",\n \"\\\"para\\\"\",\n \"\\\"se\\\"\",\n \"\\\"entao\\\"\",\n \"\\\"inteiro\\\"\",\n \"\\\"novo\\\"\",\n \"\\\"imprimir\\\"\",\n \"\\\"ler\\\"\",\n \"\\\"retornar\\\"\",\n \"\\\"texto\\\"\",\n \"\\\"super\\\"\",\n \"\\\"cara_coroa\\\"\",\n \"\\\"cara\\\"\",\n \"\\\"coroa\\\"\",\n \"\\\"enquanto\\\"\",\n \"\\\"trocar\\\"\",\n \"\\\"caso\\\"\",\n \"<int_constant>\",\n \"<string_constant>\",\n \"\\\"nulo\\\"\",\n \"<IDENT>\",\n \"<LETTER>\",\n \"<DIGIT>\",\n \"<UNDERSCORE>\",\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 \"<INVALID_LEXICAL>\",\n \"<INVALID_CONST>\",\n };\n\n}", "public Scanner(String program) {\n\t\tthis.program=program;\n\t\tpos=0;\n\t\ttoken=null;\n\t\tinitWhitespace(whitespace);\n\t\tinitDigits(digits);\n\t\tinitLetters(letters);\n\t\tinitLegits(legits);\n\t\tinitKeywords(keywords);\n\t\tinitOperators(operators);\n }", "String constant();", "private Token nextToken() {\n Token token = scanner.nextToken();\n lastSourcePosition = token.location.end;\n return token;\n }", "public interface Token extends Serializable {\r\n\r\n\t/**\r\n\t * The \"const\" keyword\r\n\t */\r\n\tToken CONST = new Token(){\r\n\t\tprivate static final long serialVersionUID = -3891676043565611933L;\r\n\t};\r\n\t//TODO\r\n}", "private Token scanChar(LocatedChar firstChar) {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tif(input.peek().matchChar('#')) {\n\t\t\tbuffer.append(input.next().getCharacter());\n\t\t\tLocatedChar next = input.peek();\n\t\t\tif(next.matchChar('#') || Character.isDigit(next.getCharacter())) {\n\t\t\t\tbuffer.append(input.next().getCharacter());\n\t\t\t\treturn CharToken.make(firstChar, buffer.toString(),next.getCharacter());\n\t\t\t} \n\t\t\telse {\n\t\t\t\tlexicalError(firstChar, \"malformed char of form ##[0..9#]\");\n\t\t\t\treturn findNextToken();\n\t\t\t}\n\t\t} \n\t\telse if(input.peek().isOctal()) {\n\t\t\tappendSubsequentOctals(buffer);\n\t\t\tint val;\n\t\t\ttry {\n\t\t\t\tval = Integer.parseInt(buffer.toString(), 8);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tlexicalError(firstChar, \"char value out of integer bounds\");\n\t\t\t\treturn findNextToken();\n\t\t\t}\n\t\t\tif(isPrintableChar((char)val)) {\n\t\t\t\treturn CharToken.make(firstChar, buffer.toString(), (char)val);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlexicalError(firstChar, \"char value not printable\");\n\t\t\t\treturn findNextToken();\n\t\t\t}\n\t\t}\n\t\telse if(isPrintableChar(input.peek().getCharacter())){\n\t\t\tLocatedChar next = input.next();\n\t\t\tbuffer.append(next.getCharacter());\n\t\t\treturn CharToken.make(firstChar, buffer.toString(), next.getCharacter());\n\t\t}\n\t\telse {\n\t\t\tlexicalError(firstChar, \"malformed char of form #@\");\n\t\t\treturn findNextToken();\n\t\t}\n\t}" ]
[ "0.6577766", "0.61073905", "0.59856856", "0.5948641", "0.58495605", "0.58203745", "0.58122796", "0.57821935", "0.57197833", "0.5715574", "0.5662873", "0.5660428", "0.56474453", "0.56223905", "0.5593728", "0.5573415", "0.55374724", "0.5534269", "0.5530309", "0.5513093", "0.5500017", "0.5480888", "0.5469805", "0.54578686", "0.5411404", "0.54089534", "0.5408597", "0.5408144", "0.5382447", "0.537308", "0.5367117", "0.53377485", "0.5336428", "0.53332245", "0.5324646", "0.5323236", "0.5312624", "0.53080106", "0.5294771", "0.52937084", "0.52857506", "0.52745295", "0.5269615", "0.5267971", "0.52662706", "0.526376", "0.5255503", "0.5241801", "0.52381206", "0.5216699", "0.5200815", "0.5198172", "0.51934713", "0.5192548", "0.5187173", "0.51865256", "0.51851004", "0.5183197", "0.51808876", "0.5178702", "0.5174702", "0.5157561", "0.51568615", "0.5154208", "0.5143612", "0.5142597", "0.5140113", "0.51315767", "0.5124185", "0.5121172", "0.5117637", "0.51168007", "0.5106318", "0.51033443", "0.5090978", "0.50900024", "0.50873053", "0.5085822", "0.5084451", "0.50811017", "0.50745165", "0.50686896", "0.50682175", "0.50667965", "0.5063222", "0.5061417", "0.5061282", "0.50612354", "0.5058602", "0.5053374", "0.5051698", "0.50452936", "0.50419474", "0.50365764", "0.50335574", "0.5033433", "0.50332683", "0.50240153", "0.5022177", "0.50066125", "0.5006604" ]
0.0
-1
load from 'cache' TODO: disable or enable modules?
@Override public List<String> getAllAuditedEntitiesNames() { if (this.allAuditedEntititesNames != null) { // return this.allAuditedEntititesNames; } // List<String> result = new ArrayList<>(); Set<EntityType<?>> entities = entityManager.getMetamodel().getEntities(); for (EntityType<?> entityType : entities) { if (entityType.getJavaType() == null) { continue; } // get entities methods and search annotation Audited in fields. if (getAuditedField(entityType.getJavaType().getDeclaredFields())) { result.add(entityType.getJavaType().getCanonicalName()); continue; } // // TODO: add some better get of all class annotations Annotation[] annotations = null; try { annotations = entityType.getJavaType().newInstance().getClass().getAnnotations(); } catch (InstantiationException | IllegalAccessException e) { // class is not accessible continue; } // entity can be annotated for all class if (getAuditedAnnotation(annotations)) { result.add(entityType.getJavaType().getCanonicalName()); continue; } } // sort entities by name Collections.sort(result); // this.allAuditedEntititesNames = result; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void load(){\n }", "public static void load() {\n load(false);\n }", "public void loadCache() {\n if (!directory.exists()) {\n directory.mkdirs();\n }\n File[] files = this.directory.listFiles();\n if (files == null) {\n return;\n }\n for (File file : files) {\n if (file.getName().endsWith(\".json\")) {\n cache.put(file.getName().split(\".json\")[0], new JsonDocument(file));\n }\n }\n }", "public static void load() {\n }", "public void setLoadCache(final boolean argLoadCache) {\n mLoadCache = argLoadCache;\n }", "private CacheHelper loadCacheHelper(String className)\n throws Exception {\n\n // use the context class loader to load class so that any\n // user-defined classes in WEB-INF can also be loaded.\n ClassLoader cl = Thread.currentThread().getContextClassLoader();\n Class helperClass = cl.loadClass(className);\n\n CacheHelper helper = (CacheHelper) helperClass.newInstance();\n\n return helper;\n }", "public static void loadCache() {\n\t\t // it is the temporary replacement to database. We should use DB instead\n\t Circle circle = new Circle();\n\t circle.setId(\"1\");\n\t shapeMap.put(circle.getId(),circle);\n\n\t Square square = new Square();\n\t square.setId(\"2\");\n\t shapeMap.put(square.getId(),square);\n\n\t Rectangle rectangle = new Rectangle();\n\t rectangle.setId(\"3\");\n\t \n\t Circle circle2 = new Circle();\n\t circle2.setId(\"4\");\n\t circle2.setType(\"Big Circle\");\n\t shapeMap.put(circle2.getId(),circle2);\n\t shapeMap.put(rectangle.getId(), rectangle);\n\t }", "private ProviderLoader loadFileProvider(final cacheItem cached) {\n final File file = cached.getFirst();\n final PluginScanner second = cached.getSecond();\n return filecache.get(file, second);\n }", "public abstract Source load(ModuleName name);", "public void load() {\n\t}", "public void load() {\n }", "boolean isCachingEnabled();", "public boolean isLoadCache() {\n return mLoadCache;\n }", "@Override\n public boolean isCaching() {\n return false;\n }", "public void load();", "public void load();", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "private void loadCache(Context ctx, ImageLoader img) {\r\n RequestOptions options = getCommonOptions(img);\r\n options.diskCacheStrategy(DiskCacheStrategy.ALL);\r\n\r\n Glide.with(ctx).load(img.getUrl()).apply(options).into(img.getImgView());\r\n }", "@Override\r\n\tpublic void load() {\n\t}", "public interface ILoader {\n\n void init(Context context,int cacheSizeInM);\n\n void request(SingleConfig config);\n\n void pause();\n\n void resume();\n\n void clearDiskCache();\n\n void clearMomoryCache();\n\n long getCacheSize();\n\n void clearCacheByUrl(String url);\n\n void clearMomoryCache(View view);\n void clearMomoryCache(String url);\n\n File getFileFromDiskCache(String url);\n\n void getFileFromDiskCache(String url,FileGetter getter);\n\n\n\n\n\n boolean isCached(String url);\n\n void trimMemory(int level);\n\n void onLowMemory();\n\n\n /**\n * 如果有缓存,就直接从缓存里拿,如果没有,就从网上下载\n * 返回的file在图片框架的缓存中,非常规文件名,需要自己拷贝出来.\n * @param url\n * @param getter\n */\n void download(String url,FileGetter getter);\n\n}", "private void putInCache(Module module){\n\t\tString key = getKey(module);\n\t\tcache.put(key, module);\n\t}", "@Override\n\tpublic void load() {\n\t\tModLoader.setInGameHook(this, true, false);\n\t\tModLoader.setInGUIHook(this, true, false);\n\t}", "public static void initPackage() {\n\t\t(new Branch()).getCache();\n\t\t(new Change()).getCache();\n\t\t(new Client()).getCache();\n\t\t(new DirEntry()).getCache();\n\t\t(new FileEntry()).getCache();\n\t\t(new Job()).getCache();\n\t\t(new Label()).getCache();\n\t\t(new User()).getCache();\n\t\tProperties props = System.getProperties();\n\t}", "public void load() ;", "@Override\n\tpublic boolean isCaching() {\n\t\treturn false;\n\t}", "public void load() throws ClassNotFoundException, IOException;", "@Override\r\n\tpublic void load() {\n\r\n\t}", "public void load() {\r\n\t\t\r\n\t\t//-- Clean\r\n\t\tthis.repositories.clear();\r\n\t\t\r\n\t\tloadInternal();\r\n\t\tloadExternalRepositories();\r\n\t\t\r\n\t}", "void load();", "void load();", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "public abstract void load();", "@Override\n public void load() {\n }", "public static void enableCache(boolean useCache) {\n OntologyTextProvider.useCache = useCache;\n }", "public boolean useCache() {\n return !pathRepositoryCache.isEmpty();\n }", "public void setInMemory(boolean load);", "protected abstract Collection<Cache> loadCaches();", "public void setCached() {\n }", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "void load (CacheEntry entry) throws IOException;", "public void load() {\n handleLoad(false, false);\n }", "public static void startCaching() {\n\t\t/*\n\t\t * component caching happens if the collection exists\n\t\t */\n\t\tfor (ComponentType aType : ComponentType.values()) {\n\t\t\tif (aType.preLoaded == false) {\n\t\t\t\taType.cachedOnes = new HashMap<String, Object>();\n\t\t\t}\n\t\t}\n\t}", "private ArrayList<Object> loadCache() {\n if (cachedLabTest == null)\n {\n cachedLabTest = getOrderedTestCollection();\n return cachedLabTest;\n }\n else\n {\n return cachedLabTest;\n }\n }", "public void init() {\n\t\tif (cache != null) {\n\t\t\tcache.dispose();\n\t\t\tcache = null;\n\t\t}\n\t\tcache = cacheFactory.create(CacheFactoryDirective.NoDCE, \"test\");\n\t}", "public void setClassCaching( boolean cc )\r\n {\r\n useClassCaching = cc;\r\n }", "@Override\n public void load() throws IOException, ClassNotFoundException {\n \n }", "@Cacheable(CacheConfig.CACHE_TWO)\n public File getFile() {\n ClassLoader classLoader = Utility.class.getClassLoader();\n File file = new File(classLoader.getResource(path1).getFile());\n logger.info(\"Cache is not used .... \");\n return file;\n }", "protected void initCacheIfNeeded(@Nullable Level world) {\n if (!initialized) {\n initialized = true;\n initCache(recipeType.getRecipes(world));\n }\n }", "boolean isCacheInitialized();", "private static void loadCache(IgniteCache<Long, Person> cache) {\n long start = System.currentTimeMillis();\n\n // Start loading cache from persistent store on all caching nodes.\n cache.loadCache(null, ENTRY_COUNT);\n\n long end = System.currentTimeMillis();\n\n System.out.println(\">>> Loaded \" + cache.size() + \" keys with backups in \" + (end - start) + \"ms.\");\n }", "public void setUseCache(final boolean argUseCache) {\n mUseCache = argUseCache;\n }", "private interface LoadStrategy {\n /**\n * Perform loading on the specified module.\n * \n * @param logger logs the process\n * @param moduleName the name of the process\n * @param moduleDef a module\n * @throws UnableToCompleteException\n */\n void load(TreeLogger logger, String moduleName, ModuleDef moduleDef)\n throws UnableToCompleteException;\n }", "private void loadGameFiles(){\n\t}", "public void regenView() {\r\n\t\ttry { \r\n\r\n\t\t\tFileInputStream fis = new FileInputStream(Preferences.cacheDataFile);\r\n\t\t\tLoadModelTask task = new LoadModelTask(timeRange.getMinTs(), timeRange.getMaxTs(), timeRange.getIniTs(), timeRange.getEndTs(), true, fis, Preferences.RecursivityLevel, this);\r\n\t\t\ttask.execute();\r\n\t\t\tthis.setEnabled(false);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tCommonForms.showError(this, \"Error reading cache\");\r\n\t\t}\r\n\t}", "public void load() {\n loadDisabledWorlds();\n chunks.clear();\n for (World world : ObsidianDestroyer.getInstance().getServer().getWorlds()) {\n for (Chunk chunk : world.getLoadedChunks()) {\n loadChunk(chunk);\n }\n }\n }", "private static void loadSoFromInternalStorage(String fileName) throws UnsatisfiedLinkError {\n String path = System.getProperties().get(\"java.io.tmpdir\").toString().replace(\"/cache\", \"/files/\" + fileName);\n File file = new File(path);\n SecurityManager security = System.getSecurityManager();\n if (security != null) {\n security.checkLink(file.getAbsolutePath());\n }\n System.load(file.getAbsolutePath());\n }", "@Override\n public void load() {\n }", "public interface Caching {\n\t\n\t/**\n\t * ititialize resources for a cache\n\t *\n\t */\n\tvoid init();\n\t\n\t/**\n\t * clear cache\n\t *\n\t */\n\tvoid clear();\n\n}", "private Source getCacheSource() {\n if (useCache) {\n if (ProfileCache.hasUserBeenCached(userId))\n return Source.CACHE;\n else\n return Source.SERVER;\n } else {\n return Source.SERVER;\n }\n }", "public boolean isUseCache() {\n return mUseCache;\n }", "public void createOrReadCache() {\n\t\tList<String> cachedDirectoryPaths = new ArrayList<>();\n\t\tFile file = new File(LevelEditor.SAVED_PATH_DATA);\n\t\tif (!file.exists()) {\n\t\t\t// Set the default paths first\n\t\t\tFileControl.lastSavedDirectory = new File(LevelEditor.defaultPath);\n\t\t\tScriptEditor.lastSavedDirectory = FileControl.lastSavedDirectory;\n\n\t\t\tcachedDirectoryPaths.add(FileControl.lastSavedDirectory.getAbsolutePath());\n\n\t\t\ttry (RandomAccessFile raf = new RandomAccessFile(file, \"rw\")) {\n\t\t\t\tthis.storeCachedDirectories(raf, cachedDirectoryPaths);\n\t\t\t}\n\t\t\tcatch (IOException e) {\n\t\t\t\tDebug.exception(e);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\ttry (RandomAccessFile raf = new RandomAccessFile(file, \"r\")) {\n\t\t\t\tthis.fetchCachedDirectories(raf, cachedDirectoryPaths);\n\t\t\t}\n\t\t\tcatch (IOException e) {\n\t\t\t\tDebug.exception(e);\n\t\t\t}\n\n\t\t\tFileControl.lastSavedDirectory = new File(cachedDirectoryPaths.get(LevelEditor.FileControlIndex));\n\t\t\tScriptEditor.lastSavedDirectory = FileControl.lastSavedDirectory;\n\t\t}\n\t}", "public CacheStrategy getCacheStrategy();", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "static private void populateCache() {\n if (cacheIsPopulated) {\n return;\n }\n cacheIsPopulated = true;\n\n /* Schema:\n *\n * units{\n * duration{\n * day{\n * one{\"{0} ден\"}\n * other{\"{0} дена\"}\n * }\n */\n\n // Load the unit types. Use English, since we know that that is a superset.\n ICUResourceBundle rb1 = (ICUResourceBundle) UResourceBundle.getBundleInstance(\n ICUData.ICU_UNIT_BASE_NAME,\n \"en\");\n rb1.getAllItemsWithFallback(\"units\", new MeasureUnitSink());\n\n // Load the currencies\n ICUResourceBundle rb2 = (ICUResourceBundle) UResourceBundle.getBundleInstance(\n ICUData.ICU_BASE_NAME,\n \"currencyNumericCodes\",\n ICUResourceBundle.ICU_DATA_CLASS_LOADER);\n rb2.getAllItemsWithFallback(\"codeMap\", new CurrencyNumericCodeSink());\n }", "void injectorClassLoader() {\n\t\t//To get the package name\n\t\tString pkgName = context.getPackageName();\n\t\t//To get the context\n\t\tContext contextImpl = ((ContextWrapper) context).getBaseContext();\n\t\t//Access to the Activity of the main thread\n\t\tObject activityThread = null;\n\t\ttry {\n\t\t\tactivityThread = Reflection.getField(contextImpl, \"mMainThread\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Get package container\n\t\tMap mPackages = null;\n\t\ttry {\n\t\t\tmPackages = (Map) Reflection.getField(activityThread, \"mPackages\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//To obtain a weak reference object, the standard reflection\n\t\tWeakReference weakReference = (WeakReference) mPackages.get(pkgName);\n\t\tif (weakReference == null) {\n\t\t\tlog.e(\"loadedApk is null\");\n\t\t} else {\n\t\t\t//Get apk need to be loaded\n\t\t\tObject loadedApk = weakReference.get();\n\t\t\t\n\t\t\tif (loadedApk == null) {\n\t\t\t\tlog.e(\"loadedApk is null\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (appClassLoader == null) {\n\t\t\t\t//Access to the original class loader\n\t\t\t\tClassLoader old = null;\n\t\t\t\ttry {\n\t\t\t\t\told = (ClassLoader) Reflection.getField(loadedApk,\n\t\t\t\t\t\t\t\"mClassLoader\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//According to the default class loader instantiate a plug-in class loader\n\t\t\t\tappClassLoader = new SyknetAppClassLoader(old, this);\n\t\t\t}\n\t\t\t//Replace the new plug-in loader loader by default\n\t\t\ttry {\n\t\t\t\tReflection.setField(loadedApk, \"mClassLoader\", appClassLoader);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void setCaching(boolean caching) {\n\t\t\n\t}", "private HttpCache(@NonNull Context context) {\n mCache = new Cache(new File(context.getExternalCacheDir(), CacheConfig.FILE_DIR),\n CacheConfig.FILE_SIZE);\n }", "void massiveModeLoading( File dataPath );", "private void init() {\n clearCaches();\n }", "public abstract boolean Load();", "private static synchronized String readFromCache(String baseUrl, String params) {\n // baseUrl + params hashCode makes file unique, in case host runs invocations for different\n // device builds and/or test suites using business logic\n File cachedFile = getCachedFile(baseUrl, params);\n if (!cachedFile.exists()) {\n CLog.i(\"No cached business logic found\");\n return null;\n }\n try {\n BusinessLogic cachedLogic = BusinessLogicFactory.createFromFile(cachedFile);\n Date cachedDate = cachedLogic.getTimestamp();\n if (System.currentTimeMillis() - cachedDate.getTime() < BL_CACHE_MILLIS) {\n CLog.i(\"Using cached business logic from: %s\", cachedDate.toString());\n return FileUtil.readStringFromFile(cachedFile);\n } else {\n CLog.i(\"Cached business logic out-of-date, deleting cached file\");\n FileUtil.deleteFile(cachedFile);\n }\n } catch (IOException e) {\n CLog.w(\"Failed to read cached business logic, deleting cached file\");\n FileUtil.deleteFile(cachedFile);\n }\n return null;\n }", "public boolean isCachedFile() {\n return true;\n }", "protected boolean getStravaUseCache()\n {\n return true;\n }", "private void testAllFile(String ehCacheFile) throws Exception {\n ClassLoader existingCl = currentThread().getContextClassLoader();\n DefaultCacheManager dcm = null;\n Cache<Object, Object> sampleDistributedCache2 = null;\n try {\n ClassLoader delegatingCl = new Jbc2InfinispanTransformerTest.TestClassLoader(existingCl);\n currentThread().setContextClassLoader(delegatingCl);\n String fileName = getFileName(ehCacheFile);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n convertor.parse(fileName, baos, ConfigFilesConvertor.TRANSFORMATIONS.get(ConfigFilesConvertor.EHCACHE_CACHE1X), Thread.currentThread().getContextClassLoader());\n\n dcm = (DefaultCacheManager) TestCacheManagerFactory.fromStream(new ByteArrayInputStream(baos.toByteArray()));\n Cache<Object,Object> defaultCache = dcm.getCache();\n defaultCache.put(\"key\", \"value\");\n Configuration configuration = defaultCache.getCacheConfiguration();\n\n assertEquals(configuration.eviction().maxEntries(),10000);\n assertEquals(configuration.expiration().maxIdle(), 121);\n assertEquals(configuration.expiration().lifespan(), 122);\n LoadersConfiguration loaders = configuration.loaders();\n assert loaders.cacheLoaders().get(0) instanceof FileCacheStoreConfiguration;\n\n assertEquals(configuration.expiration().wakeUpInterval(), 119000);\n assertEquals(configuration.eviction().strategy(), EvictionStrategy.LRU);\n\n String definedCacheNames = dcm.getDefinedCacheNames();\n assert definedCacheNames.contains(\"sampleCache1\");\n assert definedCacheNames.contains(\"sampleCache2\");\n assert definedCacheNames.contains(\"sampleCache3\");\n assert definedCacheNames.contains(\"sampleDistributedCache1\");\n assert definedCacheNames.contains(\"sampleDistributedCache2\");\n assert definedCacheNames.contains(\"sampleDistributedCache3\");\n\n sampleDistributedCache2 = dcm.getCache(\"sampleDistributedCache2\");\n Configuration configuration2 = sampleDistributedCache2.getCacheConfiguration();\n assert configuration2.loaders().cacheLoaders().size() == 1;\n assert configuration2.expiration().lifespan() == 101;\n assert configuration2.expiration().maxIdle() == 102;\n assertEquals(configuration2.clustering().cacheMode(), CacheMode.INVALIDATION_SYNC);\n\n } finally {\n currentThread().setContextClassLoader(existingCl);\n TestingUtil.killCaches(sampleDistributedCache2);\n TestingUtil.killCacheManagers(dcm);\n }\n }", "private void reloadData() throws IOException\n {\n /* Reload data from file, if it is modified after last scan */\n long mtime = loader.getModificationTime();\n if (mtime < lastKnownMtime) {\n return;\n }\n lastKnownMtime = mtime;\n\n InputStream in = loader.getInputStream();\n BufferedReader bin = new BufferedReader(new InputStreamReader(in));\n cache.clear();\n String line;\n while ((line = bin.readLine()) != null) {\n try {\n Map<String, Object> tuple = reader.readValue(line);\n updateLookupCache(tuple);\n } catch (JsonProcessingException parseExp) {\n logger.info(\"Unable to parse line {}\", line);\n }\n }\n IOUtils.closeQuietly(bin);\n IOUtils.closeQuietly(in);\n }", "interface Cache {\n\n /** @return A cache entry for given path string or <code>null</code> (if file cannot be read or too large to cache).\n * This method increments CacheEntry reference counter, caller must call {@link #checkIn(CacheEntry)} to release returned entry (when not null). */\n CacheEntry checkOut(CacheEntryLoader cacheEntryLoader);\n\n /**\n * Method to release cache entry previously obtained from {@link #checkOut(CacheEntryLoader)} call.\n * This method decrements CacheEntry reference counter.\n */\n void checkIn(CacheEntry key);\n\n /** Invalidates cached entry for given path string (if it is cached) */\n void invalidate(String pathString);\n\n void rename(String fromPathString, String toPathString);\n\n// /** Preload given file path in cache (if cache has vacant spot). Preloading happens in background. Preloaded pages initially have zero reference counter. */\n// void preload (String pathString);\n\n /** Clears the cache of all entries (even if some entries are checked out) */\n void clear();\n\n /** Allocates entry of given size for writing.\n * It will not be visible to others until caller calls {@link #update(String, CacheEntry)}.*/\n CacheEntry alloc(long size);\n\n /** Registers recently writtien cache entry as available for reading */\n void update(String pathString, CacheEntry cacheEntry);\n}", "public static void loadFromFile() {\n\t\tloadFromFile(Main.getConfigFile(), Main.instance.getServer());\n\t}", "AgentPolicyBuilder setBypassCache(boolean bypassCache);", "protected void setPluginCache(OwPluginStatusCachingUtility newCache)\r\n {\r\n this.pluginCache = newCache;\r\n }", "public void load() {\n updater.load(-1); // -1 because Guest ID doesn't matter.\n }", "private Object loadObjectFromFile(String filename) {\n //engine.logMessage(\"Loading cache data from: \"+filename);\n ObjectInputStream inputStream = null;\n try { \n inputStream = new ObjectInputStream(new BufferedInputStream(new FileInputStream(filename)));\n Object value=inputStream.readObject();\n inputStream.close(); \n return value;\n } catch (InvalidClassException e) {\n // this can happen if a data class has been updated in a never version compared to \n // the version of the data object stored in the cache\n try {if (inputStream!=null) inputStream.close();} catch (Exception x){}\n File file=new File(filename);\n file.delete();\n return null;\n } catch (Exception e) {\n engine.logMessage(\"WARNING: Unable to load data from cache: \"+e.getMessage());\n return null;\n } finally {\n try {if (inputStream!=null) inputStream.close();} catch (Exception x) {engine.logMessage(\"SYSTEM WARNING: Unable to close ObjectInputStream in cache: \"+x.getMessage());}\n } \n }", "public void cache() {\n cache.clear();\n for (String s : getConfig().getKeys(true)) {\n if (getConfig().get(s) instanceof String)\n cache.put(s, getConfig().getString(s));\n }\n }", "public LibraryCache() {\n\t }", "private UtilsCache() {\n\t\tsuper();\n\t}", "public boolean isCached() {\n return true;\n }", "public void loadCache() {\r\n\t\tint rango = getEmpleadoActual().getRango();\r\n\t\tArrayList<String> idsDptos = getEmpleadoActual().getDepartamentosId();\r\n\t\t\r\n\t\t// Para todos los departamentos a los que pertenezca el empleado\r\n\t\tfor (int nd=0; nd<idsDptos.size(); nd++){\r\n\t\t\tString dep = idsDptos.get(nd);\r\n\t\t\tint numvendedor = getEmpleadoActual().getEmplId();\r\n\r\n\t\t\tif (!alive) return;\r\n\t\t\tsetProgreso(\"Cargando contratos dpto \"+dep, 50);\r\n\t\t\tcontratos = controlador.getListaContratosDpto(dep);\r\n\t\t\tsetProgreso(\"Cargando contratos dpto \"+dep, 100);\r\n\r\n\t\t\tif (!alive) return;\r\n\t\t\tsetProgreso(\"Cargando empleados dpto \"+dep, 25);\r\n\t\t\templeados = controlador.getEmpleadosDepartamento(getEmpleadoActual().getEmplId(),dep);\r\n\t\t\tsetProgreso(\"Cargando empleados dpto \"+dep, 100);\r\n\t\t\t\r\n\t\t\t//Prueba ordenación empleados\r\n//\t\t\tfor (int i = 0; i < empleados.size(); i++) {\r\n//\t\t\t\tSystem.out.println(empleados.get(i).getPosicion());\r\n//\t\t\t}\r\n\t\t\tordenaEmpleados();\r\n//\t\t\tfor (int i = 0; i < empleados.size(); i++) {\r\n//\t\t\t\tSystem.out.println(empleados.get(i).getPosicion());\r\n//\t\t\t}\r\n\t\t\t//Fin PRueba\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (!alive) return;\r\n\t\t\tif (rango == 1) { // Si es un empleado, coger turnos de su departamento\r\n\t\t\t\tsetProgreso(\"Cargando turnos dpto \"+dep, 70);\r\n\t\t\t\tturnos = controlador.getListaTurnosEmpleadosDpto(dep);\r\n\t\t\t\tsetProgreso(\"Cargando turnos dpto \"+dep, 100);\r\n\t\t\t} else if (rango == 2) { // Si es un jefe, coger turnos de todos los departamentos\r\n\t\t\t\tArrayList<String> temp = new ArrayList<String>();\r\n\t\t\t\ttemp = controlador.getDepartamentosJefe(numvendedor);\r\n\t\t\t\tfor (int i=0; i<temp.size(); i++)\r\n\t\t\t\t\tdepartamentosJefe.add(controlador.getDepartamento(temp.get(i)));\r\n\t\t\t\t//TODO borrar si al final no se usa\r\n\t//\t\t\tsetProgreso(\"Cargando jefes de departamento\", 60);\r\n\t//\t\t\tnumeroJefesDepartamento = controlador.getNumVendedorTodosJefes();\r\n\t//\t\t\tnombreJefesDepartamento = controlador.getNombreTodosJefes();\r\n\t\t\t\tsetProgreso(\"Cargando turnos dpto \"+dep, 70);\r\n\t\t\t\tArrayList<Turno> turnosDep = new ArrayList<Turno>();\r\n\t\t\t\tfor (int i=0; i<departamentosJefe.size(); i++) {\r\n\t\t\t\t\tturnosDep = controlador.getListaTurnosEmpleadosDpto(departamentosJefe.get(i).getNombreDepartamento());\r\n\t\t\t\t\tfor (int j=0; j<turnosDep.size(); j++) {\r\n\t\t\t\t\t\tturnos.add(turnosDep.get(j));\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tsetProgreso(\"Cargando turnos dpto \"+dep, 100);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tSystem.err.println(\"Vista\\t:: Tipo de empleado inválido para cargar la cache.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(rango==1){//si es un empleado guardamos las ventas que éste ha hecho en un año\r\n\t\t\tjava.util.Date fecha = new java.util.Date();//cogemos la fecha del sistema\r\n\t\t\tvector_ventas=controlador.getVentas(this.getEmpleadoActual().getEmplId(),fecha.getYear()+1900);\r\n\t\t}else if(rango==2){//si es un jefe almacenamos la suma de las ventas de todos los empleados de este departamento durante un año\r\n\t\t\tjava.util.Date fecha = new java.util.Date();//cogemos la fecha del sistema\r\n\t\t\tvector_ventas=controlador.getVentasJefe(this.empleados,fecha.getYear()+1900);\r\n\t\t}\r\n\t\tSystem.out.println(\"Cache cargada\");\r\n\t}", "public static void loadService() {\n Optional<EconomyService> optService = Sponge.getServiceManager().provide(EconomyService.class);\n if(optService.isPresent()) {\n service = optService.get();\n isLoaded = true;\n } else {\n isLoaded = false;\n }\n }", "private static void initializeCache() {\n\t\t// prepare cache folder for this application instance\n\t\tFile cacheRoot = getApplicationCache();\n\n\t\ttry {\n\t\t\tfor (int i = 0; true; i++) {\n\t\t\t\tFile cache = new File(cacheRoot, String.format(\"%d\", i));\n\t\t\t\tif (!cache.isDirectory() && !cache.mkdirs()) {\n\t\t\t\t\tthrow new IOException(\"Failed to create cache dir: \" + cache);\n\t\t\t\t}\n\n\t\t\t\tfinal File lockFile = new File(cache, \".lock\");\n\t\t\t\tboolean isNewCache = !lockFile.exists();\n\n\t\t\t\tfinal RandomAccessFile handle = new RandomAccessFile(lockFile, \"rw\");\n\t\t\t\tfinal FileChannel channel = handle.getChannel();\n\t\t\t\tfinal FileLock lock = channel.tryLock();\n\n\t\t\t\tif (lock != null) {\n\t\t\t\t\t// setup cache dir for ehcache\n\t\t\t\t\tSystem.setProperty(\"ehcache.disk.store.dir\", cache.getAbsolutePath());\n\n\t\t\t\t\tint applicationRevision = getApplicationRevisionNumber();\n\t\t\t\t\tint cacheRevision = 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcacheRevision = new Scanner(channel, \"UTF-8\").nextInt();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\n\t\t\t\t\tif (cacheRevision != applicationRevision && applicationRevision > 0 && !isNewCache) {\n\t\t\t\t\t\tLogger.getLogger(Main.class.getName()).log(Level.WARNING, String.format(\"App version (r%d) does not match cache version (r%d): reset cache\", applicationRevision, cacheRevision));\n\n\t\t\t\t\t\t// tag cache with new revision number\n\t\t\t\t\t\tisNewCache = true;\n\n\t\t\t\t\t\t// delete all files related to previous cache instances\n\t\t\t\t\t\tfor (File it : getChildren(cache)) {\n\t\t\t\t\t\t\tif (!it.equals(lockFile)) {\n\t\t\t\t\t\t\t\tdelete(cache);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isNewCache) {\n\t\t\t\t\t\t// set new cache revision\n\t\t\t\t\t\tchannel.position(0);\n\t\t\t\t\t\tchannel.write(Charset.forName(\"UTF-8\").encode(String.valueOf(applicationRevision)));\n\t\t\t\t\t\tchannel.truncate(channel.position());\n\t\t\t\t\t}\n\n\t\t\t\t\t// make sure to orderly shutdown cache\n\t\t\t\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tCacheManager.getInstance().shutdown();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// ignore, shutting down anyway\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tlock.release();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// ignore, shutting down anyway\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\thandle.close();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// ignore, shutting down anyway\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t// cache for this application instance is successfully set up and locked\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// try next lock file\n\t\t\t\thandle.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLogger.getLogger(Main.class.getName()).log(Level.WARNING, e.toString(), e);\n\t\t}\n\n\t\t// use cache root itself as fail-safe fallback\n\t\tSystem.setProperty(\"ehcache.disk.store.dir\", new File(cacheRoot, \"default\").getAbsolutePath());\n\t}", "default void loadRevisionFileDataIntoMemory(AsyncCache<Integer, RevisionFileData> cache) {\n if (!cache.asMap().isEmpty()) {\n return;\n }\n\n final UberPage uberPage;\n if (exists()) {\n final Reader reader = createReader();\n final PageReference firstRef = reader.readUberPageReference();\n uberPage = (UberPage) firstRef.getPage();\n\n final var revisionNumber = uberPage.getRevisionNumber();\n final var revisionNumbers = new ArrayList<Integer>(revisionNumber);\n\n for (int i = 1; i <= revisionNumber; i++) {\n revisionNumbers.add(i);\n }\n\n cache.getAll(revisionNumbers, keys -> {\n final Map<Integer, RevisionFileData> result = new HashMap<>();\n keys.forEach(key -> result.put(key, reader.getRevisionFileData(key)));\n reader.close();\n return result;\n });\n }\n }", "public void reload() {\n\n\t\tPlayerCache.reloadFile(); // load /save playercache.dat\n\n\t\t// next, update all playercaches\n\n\t\tupdatePlayerCaches();\n\n\n\t}", "public final boolean isUseCache() {\n\t\treturn useCache;\n\t}", "public StaticScript cache(boolean shouldCache) {\n this.shouldCache = shouldCache;\n return this;\n }", "private static void loadMemo() {\n\t\t\n\t}", "static public void readRepository(){\n File cache_file = getCacheFile();\n if (cache_file.exists()) {\n try {\n // Read the cache acutally\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n Document document = builder.parse(cache_file);\n NodeList images_nodes = document.getElementsByTagName(\"image\");\n for (int i = 0; i < images_nodes.getLength(); i++) {\n Node item = images_nodes.item(i);\n String image_path = item.getTextContent();\n File image_file = new File(image_path);\n if (image_file.exists()){\n AppImage image = Resources.loadAppImage(image_path);\n images.add(image);\n }\n }\n }\n catch (Exception e) {\n throw new RuntimeException(e);\n }\n }\n }", "private <T> T lazy(Supplier<T> loader) {\n return null;\n }", "public boolean existCache() {\n return false;\n }", "boolean isForceLoaded();", "public abstract void loaded();" ]
[ "0.64625937", "0.64103067", "0.6372339", "0.6319406", "0.6141199", "0.613748", "0.610742", "0.6026526", "0.59738195", "0.5914546", "0.58779824", "0.5866973", "0.5842794", "0.5838616", "0.5786241", "0.5786241", "0.5771239", "0.5752468", "0.5748459", "0.57255614", "0.57124335", "0.5705248", "0.57026255", "0.5695119", "0.5670401", "0.5643181", "0.56407964", "0.5637444", "0.562353", "0.562353", "0.5621505", "0.5621505", "0.5618721", "0.56120735", "0.56099755", "0.55924785", "0.5591659", "0.55820143", "0.55800015", "0.55798596", "0.55798596", "0.55798596", "0.55733705", "0.55621916", "0.5558605", "0.55421495", "0.5513816", "0.5493309", "0.5491806", "0.5488939", "0.54852843", "0.5483002", "0.54821193", "0.54753405", "0.547131", "0.54651475", "0.5434402", "0.54268384", "0.54218656", "0.54184276", "0.5412352", "0.53902364", "0.5377318", "0.53582036", "0.5353075", "0.535167", "0.53507525", "0.53500575", "0.5347075", "0.53466356", "0.5332963", "0.53293437", "0.53008735", "0.5297924", "0.5297407", "0.5293783", "0.5288902", "0.5284761", "0.5281012", "0.5279575", "0.52795136", "0.527515", "0.5273776", "0.5271234", "0.5270254", "0.52645767", "0.52487475", "0.52468073", "0.5242535", "0.52423304", "0.5223317", "0.5222768", "0.5222401", "0.52192634", "0.5213319", "0.5210295", "0.520897", "0.52076125", "0.5202879", "0.5202786", "0.52008367" ]
0.0
-1
Is necessary to override method get, because old get transform id to UUID and audits have Long ID.
@Override public IdmAuditDto get(Serializable id, BasePermission... permission) { // TODO: add permission, now can't be use find, because Authentication object is null when call from IdmAuditLisener Assert.notNull(id, "Id is required"); IdmAudit audit = this.auditRepository.findOneById(Long.valueOf(id.toString())); if (audit == null) { throw new ResultCodeException(CoreResultCode.NOT_FOUND, ImmutableMap.of("audit", id)); } // return only one element return this.toDto(audit); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Integer getId() { return this.id; }", "public String getId(){ return id.get(); }", "public long getId(){return this.id;}", "public long getId() { return this.id; }", "public long getId() { return id; }", "public long getId() { return id; }", "public long getId() { return _id; }", "public Long getId() {\n return super.getId();\n }", "public abstract Long getId();", "public abstract UUID getId();", "@Override\n public long getUUID() {\n return endpointHandler.getUUID();\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return super.getId();\n }", "public String getId(){ return ID; }", "public int getId(){ return id; }", "@Override\n public long getId() {\n return this.id;\n }", "public Long getId() {\n return id;\n }", "public int getId() {return Id;}", "public abstract String getUuid();", "public long getId(){\n return this.id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public abstract long getId();", "public abstract long getId();", "public Integer getId(){return id;}", "public String getId(){return id;}", "V get(UniqueId uniqueId);", "public int getId(){return id;}", "public UUID getUuid() { return uuid; }", "protected abstract String getId();", "public int getAuditId();", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "long getId() {\n return id;\n }", "public UUID getUuid();", "public Integer getId() { return this.id; }", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId()\r\n/* 14: */ {\r\n/* 15:14 */ return this.id;\r\n/* 16: */ }", "public abstract Long getIdHistoricalWrapper();", "public Long getId() \n {\n return id;\n }", "public Integer getId() { return id; }", "public abstract String getId();", "public abstract String getId();", "public abstract String getId();", "public abstract String getId();", "public abstract String getId();", "public abstract String getId();", "@Override\n public long getID()\n {\n return this.id;\n }", "public Long getId() {\n\treturn id;\n}", "public Long getId() {\n\treturn id;\n}", "@java.lang.Override\n public long getId() {\n return id_;\n }", "public String getId ();", "public String getId ();", "public IAuditID getAuditID() {\n return this.auditID;\n }", "@java.lang.Override\n public long getId() {\n return id_;\n }", "public Long getId() {\n return this.id;\n }", "public Long getId() {\n return this.id;\n }", "public Long getId() {\n return this.id;\n }", "@Override public String getID() { return id;}", "public String getId(){\n return id;\n }", "public String getId(){\n return id;\n }", "public long getId();", "public long getId();", "public long getId();", "public long getId();", "public long getId();", "public long getId();", "public int getId() {return id;}", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "public String getID(){\n return Id;\n }", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "public long getId() {\n return id_;\n }", "int getId() throws UnsupportedOperationException;", "@Override\n public String getId() {\n return id;\n }", "public int getId(){\r\n return this.id;\r\n }" ]
[ "0.67068493", "0.66439396", "0.6635553", "0.6538312", "0.6505508", "0.6505508", "0.65034705", "0.6460246", "0.6455556", "0.64547324", "0.64417803", "0.6432098", "0.64253217", "0.6409297", "0.64036155", "0.63839686", "0.63751984", "0.63746583", "0.63669735", "0.63648635", "0.63369685", "0.6334653", "0.6334653", "0.63345855", "0.63345855", "0.6333501", "0.632899", "0.63155794", "0.6307839", "0.6307707", "0.6299972", "0.62990654", "0.6298288", "0.6298288", "0.6298288", "0.6298288", "0.6298288", "0.6298288", "0.62929153", "0.628968", "0.6278972", "0.6257735", "0.6257735", "0.6257735", "0.62552154", "0.62534666", "0.6249319", "0.62447464", "0.6244038", "0.6244038", "0.6244038", "0.6244038", "0.6244038", "0.6244038", "0.6237412", "0.62349427", "0.62349427", "0.6231055", "0.6222587", "0.6222587", "0.621273", "0.62118745", "0.6196822", "0.6196822", "0.6196822", "0.6192655", "0.6189363", "0.6189363", "0.61886925", "0.61886925", "0.61886925", "0.61886925", "0.61886925", "0.61886925", "0.6187858", "0.6159347", "0.6159347", "0.6153275", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.61467105", "0.6138511", "0.61359257", "0.6133113", "0.61205465" ]
0.0
-1
Method working with envers, find is realized in audited tables
private <T> T find(Class<T> entityClass, UUID entityId, Long revisionId) { AuditReader reader = this.getAuditReader(); return reader.find(entityClass, entityId, revisionId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public default E onFind(E entity) {\n\t\treturn entity;\n\t}", "@Test\r\n public void testFind() throws Exception {\r\n MonitoriaEntity entity = data.get(0);\r\n MonitoriaEntity nuevaEntity = persistence.find(entity.getId());\r\n Assert.assertNotNull(nuevaEntity);\r\n Assert.assertEquals(entity.getId(), nuevaEntity.getId());\r\n Assert.assertEquals(entity.getIdMonitor(), nuevaEntity.getIdMonitor());\r\n Assert.assertEquals(entity.getTipo(), nuevaEntity.getTipo());\r\n \r\n }", "public abstract T findEntityById(int id);", "public Employee findEmployee(IncomingReport incoming_report) throws IllegalArgumentException, DAOException;", "private Criteria createFindByEntity(int type, int id) {\n return null;\t\n }", "protected abstract String getEntityExistanceSQL(E entity);", "@Override\n\tpublic Evento find(Evento entity) throws HibernateException {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void find(Integer id) {\n\r\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyEmployee4SA(String search_key) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listcust = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N' and emp_name LIKE '%\" + search_key + \"%'\").list();\r\n\t\treturn listcust;\r\n\t\t\r\n\t}", "public List<EspecieEntity> encontrarTodos(){\r\n Query todos =em.createQuery(\"select p from EspecieEntity p\");\r\n return todos.getResultList();\r\n }", "AuditoriaUsuario find(Object id);", "public List<Record> executeNativeFinder(String queryName, Object context);", "public Employee findEmployee(Long id);", "public E findById(Serializable pk) ;", "@Override\n\tpublic List<IdName> findEnterpriseByPy(String py) {\n\t\treturn enterpriseDAO.findEnterpriseByPy(py);\n\t}", "@Override\n\tpublic void find() {\n\n\t}", "private void run(AuthordDao dao, EntityManager entityManager) {\n Author een = new Author(\"Bakker\");\n dao.save(een);\n Author twee = new Author(\"Smit\");\n dao.save(twee);\n Author drie = new Author(\"Meijer\");\n dao.save(drie);\n Author vier = new Author(\"Mulder\");\n dao.save(vier);\n Author vijf = new Author(\"de Boer\");\n dao.save(vijf);\n Author zes = new Author(\"Pieters\");\n dao.save(zes);\n\n /////////////////////////////////////////// --> delete author 2\n dao.delete(twee);\n\n /////////////////////////////////////////// --> update naam author 1\n dao.updateName(1, \"Hendriks\");\n dao.save(een);\n\n ////////////////////////////////////////// --> try setters\n drie.setHasDebuted(Boolean.TRUE);\n vijf.setHasDebuted(Boolean.TRUE);\n zes.setHasDebuted(Boolean.TRUE);\n dao.update(drie);\n dao.update(vijf);\n dao.update(zes);\n\n /////////////////////////////////////////// --> find by lastname\n log(dao.findBy(\"Meijer\"));\n\n /////////////////////////////////////////// --> enum\n een.setGenre(Genre.FICTION);\n dao.save(een);\n\n drie.setGenre(Genre.CHILDREN);\n dao.save(drie);\n\n vier.setGenre(Genre.BIOGRAPHY);\n dao.save(vier);\n\n vijf.setGenre(Genre.ROMANCE);\n dao.save(vijf);\n\n zes.setGenre(Genre.FICTION);\n dao.save(zes);\n\n ///////////////////////////////////////////////// --> unidirectional\n Publisher theBestPublisher = new Publisher(\"the Best Publisher\");\n Publisher eenAnderePublisher = new Publisher(\"een Andere Publisher\");\n Publisher deLaaststePublisher = new Publisher(\"de Laatste Publisher\");\n\n Dao<Publisher> publisherDao = new Dao<>(entityManager);\n publisherDao.save(theBestPublisher);\n publisherDao.save(eenAnderePublisher);\n publisherDao.save(deLaaststePublisher);\n\n een.setSignedBy(theBestPublisher);\n drie.setSignedBy(deLaaststePublisher);\n vier.setSignedBy(eenAnderePublisher);\n vijf.setSignedBy(theBestPublisher);\n zes.setSignedBy(deLaaststePublisher);\n\n dao.update(een);\n dao.update(drie);\n dao.update(vier);\n dao.update(vijf);\n dao.update(zes);\n\n List<Author> soft = dao.findByPublisher(\"best\");\n soft.forEach(this::log);\n\n ////////////////////////////////////////////////// --> bidirectional\n Dao assistantDao = new Dao(entityManager);\n\n Assistant assistant1 = new Assistant(\"Assistent 1\");\n Assistant assistant2 = new Assistant(\"Assistent 2\");\n Assistant assistant3 = new Assistant(\"Assistent 3\");\n assistantDao.save(assistant1);\n assistantDao.save(assistant2);\n assistantDao.save(assistant3);\n\n een.setAssistant(assistant3);\n drie.setAssistant(assistant2);\n vier.setAssistant(assistant2);\n vijf.setAssistant(assistant1);\n zes.setAssistant(assistant1);\n\n dao.update(een);\n dao.update(drie);\n dao.update(vier);\n dao.update(vijf);\n dao.update(zes);\n\n ////////////////////////////////////////////////// --> test one-to-many (Book testen)\n\n }", "public interface AlertsRepository extends CrudRepository<Alert, Long> {\n Alert findByAlertsUuidAndTenantUuid(String alertsUuid, String tenantUuid);\n Page<Alert> findByTenantUuid(String tenantUuid,Pageable pageable);\n}", "Appliance[] find(Criteria[] criteria);", "@SelectProvider(type = ServeInfoSqlProvider.class, method = \"findById\")\n ServeInfoDO findById(@Param(\"id\") Long id);", "BehaveLog selectByPrimaryKey(Integer id);", "FK findFrom(ENTITY entity);", "@Test(expected = NullPointerException.class)\r\n public void fetchPostUsingFind() {\r\n //sunny day assert\r\n Post post = entityManager.find(Post.class, 2l);\r\n\r\n LOGGER.info(post.toString());\r\n //sunny day asserts\r\n assertNotNull(post);\r\n assertSame(\"Likes are same\", 15, post.getLikes());\r\n\r\n //rainy day test\r\n post = entityManager.find(Post.class, 25l);\r\n LOGGER.info(post.toString());\r\n }", "@Test\r\n public void testFindAll() throws Exception {\r\n List<MonitoriaEntity> totalEntidades = persistence.findAll();\r\n Assert.assertEquals(data.size(), totalEntidades.size());\r\n for(MonitoriaEntity ent: totalEntidades){\r\n boolean encontro = false;\r\n for(MonitoriaEntity entity: data){\r\n if(ent.equals(entity)){\r\n encontro = true;\r\n }\r\n }\r\n Assert.assertTrue(true);\r\n }\r\n }", "java.util.List<AuditoriaUsuario> findAll();", "List<ProductInfo> findUpAll();", "public static void main(String[] args) {\n\r\n\t\tEntityManager em = PersistanceManager.INSTANCE.getEntityManager();\r\n\t\tSystem.out.println(\"Print ALL\");\r\n\t\tQuery query = em.createQuery(\"FROM Employee e\");\r\n\t\tArrayList<Employee> result = (ArrayList<Employee>) query.getResultList();\r\n\t\tfor (Employee current : result)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t\tSystem.out.println(\"Print id = 3\");\r\n\t\tQuery query1 = em.createQuery(\"FROM Employee e where e.id=3\");\r\n\t\tArrayList<Employee> result1 = (ArrayList<Employee>) query1.getResultList();\r\n\t\tfor (Employee current : result1)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t\tSystem.out.println(\"Print Named Query \");\r\n\t\tArrayList<Employee> result2 = (ArrayList<Employee>) em.createNamedQuery(\"Employee.searchAll\").setParameter(\"empName\", \"D%\")\r\n\t\t\t\t.getResultList();\r\n\t\tfor (Employee current : result2)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t}", "@Override\n\tpublic List<T> find(T t) {\n try { \n if (logger.isDebugEnabled()) { \n logger.debug(\"开始删除实体:\" + t.getClass().getName()); \n } \n return hibernateTemplate.find( \"from \" + t.getClass().getName()); \n } catch (RuntimeException e) { \n logger.error(\"查找指定实体集合异常,实体:\" + t.getClass().getName(), e); \n throw e; \n } \n\t}", "@Override\n\tpublic Enterprise findEnterpriseByUserName(String userName) {\n\t\treturn enterpriseDao.findEnterpriseByUserName(userName);\n\t}", "@Override\n\tpublic Emp findbyId(int eid) {\n\t\treturn eb.findbyId(eid);\n\t}", "@Repository\npublic interface PersistenceAuditEventRepository extends MongoRepository<PersistentAuditEvent, String> {\n\n List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfterAndAuditEventType(String principle, Instant after, String type);\n\n Page<PersistentAuditEvent> findByAuditEventDateBetween(Pageable pageable, LocalDate fromDate, LocalDate toDate);\n}", "@Override\r\n\t@Transactional\r\n\tpublic eventuales findById(Integer id) {\n\t\treturn dao.findById(id).get();\r\n\t}", "@Override\r\n\tpublic T findEntity(String hql, Object[] obj) throws Exception {\n\t\tList<T> list = this.find(hql, obj);\r\n\t\tif (list != null && list.size() > 0) {\r\n\t\t\treturn list.get(0);\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public interface AuditService {\n\n List<Audit> findAll();\n\n}", "public Service findById(int theId);", "public Invoice findById(long id);", "Averia findAveriaById(Long id) throws BusinessException;", "@Override\n\tpublic FieldViewSet searchEntityByPk(final FieldViewSet fieldViewSet) throws DatabaseException {\n\t\ttry {\n\t\t\tfinal Iterator<IFieldLogic> iteradorPKs = fieldViewSet.getEntityDef().getFieldKey().getPkFieldSet().iterator();\n\t\t\twhile (iteradorPKs.hasNext()) {\n\t\t\t\tif (fieldViewSet.getFieldvalue(iteradorPKs.next()).isNull()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (fieldViewSet.getEntityDef().isInCache()\n\t\t\t\t\t&& !LogicDataCacheFactory.getFactoryInstance().getDictionaryCache(this.dictionaryName).getAllItems(fieldViewSet)\n\t\t\t\t\t\t\t.isEmpty()) {\n\t\t\t\treturn LogicDataCacheFactory.getFactoryInstance().getDictionaryCache(this.dictionaryName).getItem(fieldViewSet);\n\t\t\t}\n\t\t\treturn this.getDaoRef().getRecordByPrimaryKey(fieldViewSet, this.conn);\n\t\t}\n\t\tcatch (final DatabaseException exc1) {\n\t\t\tthrow exc1;\n\t\t} catch (ParseException e) {\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new DatabaseException(\"Error parseando un dato: \" + e.getMessage());\n\t\t}\n\t}", "public Entity[] queryEntityInfo() throws UnifyException, SQLException {\n Bookmark bookmark = visual.getSelectBookmark();\n if (bookmark == null)\n return null;\n\n String catalogName= visual.getQueryCatalog();\n String schemaName = visual.getQuerySchema();\n\n String entityName = visual.getQueryEntity(); //ʵ��\n\n if(bookmark.getDbInfoProvider().getDatabaseMetaData().storesLowerCaseIdentifiers())\n {\n \tif(catalogName!=null)\n \t\tcatalogName = catalogName.toLowerCase();\n \tif(schemaName!=null)\n \t\tschemaName = schemaName.toLowerCase();\n \tif(entityName!=null)\n \t\tentityName = entityName.toLowerCase();\n }else if(bookmark.getDbInfoProvider().getDatabaseMetaData().storesUpperCaseIdentifiers())\n {\n \tif(catalogName!=null)\n \t\tcatalogName = catalogName.toUpperCase();\n \tif(schemaName!=null)\n \t\tschemaName = schemaName.toUpperCase();\n \tif(entityName!=null)\n \t\tentityName = entityName.toUpperCase();\n }\n// �����mysql��ݿ⣬����ѯ���������ݵ���Ϊ��д\n// if (catalogName != null&&!(bookmark.isMysql()))\n// \tcatalogName = catalogName.toUpperCase();\n// if (schemaName != null&&!(bookmark.isMysql()))\n// schemaName = schemaName.toUpperCase();\n// if (entityName != null&&!(bookmark.isMysql()))\n// entityName = entityName.toUpperCase();\n return queryEntityInfo(bookmark,catalogName, schemaName, entityName);\n }", "public interface VideoDataRepository extends CrudRepository<VideoData, Long> {\n\n /**\n * find videos\n * @param recorderInfo\n * @return\n */\n public List<VideoData> findByRecorderInfo(RecorderInfo recorderInfo);\n}", "Iterable<Entry<K, V>> find(LegacyFindByCondition find);", "@Override\n\tpublic List<UsuariosEntity> findAdmin(){\n\t\treturn (List<UsuariosEntity>) iUsuarios.findAdmin();\n\t}", "@Override\n\tpublic List<Entrust> select() {\n\t\treturn entrustServiceImpl.select();\n\t}", "@Override\r\n\tpublic snstatus queryByDocId(String sn) {\n\t\treturn (snstatus)super.getHibernateTemplate().get(snstatus.class, sn); \r\n\t}", "public Collection<LogModel> selectLogByEmployee(EmployeeModel employee);", "public abstract V getEntity();", "public java.util.Collection allRetrieveAETs() \n throws javax.ejb.FinderException;", "public SfJdDocAudit selectByPrimaryKey(BigDecimal id, RequestMeta requestMeta) {\n SfJdDocAudit rtn=jdDocAuditMapper.selectByPrimaryKey(id);\r\n if(rtn==null)return null;\r\n SfEntrust e=sfEntrustService.selectByPrimaryKey(rtn.getEntrustId(), requestMeta);\r\n if(e!=null){\r\n rtn.setEntrust(e);\r\n } \r\n SfJdReport report=(SfJdReport)zcEbBaseService.queryObject(\"com.ufgov.zc.server.sf.dao.SfJdReportMapper.selectByEntrustId\", rtn.getEntrustId());\r\n// SfJdReport report=sfJdReportService.selectByPrimaryKey(id, requestMeta)\r\n rtn.setReport(report==null?new SfJdReport():report);\r\n rtn.setDetailLst(jdDocAuditDetailMapper.selectByPrimaryKey(id));\r\n List mlst=materialsTransferDetailMapper.selectByPrimaryKey(id);\r\n rtn.setMaterialLst(mlst==null?new ArrayList():mlst);\r\n rtn.setDbDigest(rtn.digest());\r\n return rtn;\r\n }", "@Test\r\n public void testFind() throws Exception {\r\n Map props = new HashMap();\r\n// props.put(\"org.glassfish.ejb.embedded.glassfish.instance.root\",\r\n// \"/Applications/GlassFish/glassfishv3-webprofile/glassfish/domains/domain1\");\r\n props.put(EJBContainer.MODULES, new File[]{\r\n new File(\"web/WEB-INF/classes\"),\r\n new File(\"test/conf/\")\r\n });\r\n\r\n \r\n System.out.println(\"find\");\r\n String key = \"\";\r\n// EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\r\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer(props);\r\n LoginSessionBean instance = (LoginSessionBean)container.getContext().lookup(\"java:global/classes/LoginSessionBean\");\r\n Users expResult = null;\r\n Users result = instance.find(key);\r\n assertEquals(expResult, result);\r\n container.close();\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 }", "Miss_control_log selectByPrimaryKey(String loginuuid);", "public static void findByIn() {\n\t\tFindIterable<Document> findIterable = collection.find(in(\"status\", \"A\", \"D\"));\r\n\t\tprint(findIterable);\r\n\t}", "@Override\n public void loadEntityDetails() {\n \tsuper.loadEntityDetails();\n }", "@Override\n\tpublic TransferResultInfo<?> find() {\n\t\ttry {\n\t\t\tgradeDao.init();\n\t\t\tList<Grade> list_grade = gradeDao.select(transferDbData);\n\t\t\tList<TransferGradeInfo> finalList = new ArrayList<TransferGradeInfo>();\n\t\t\tfor (Grade grade : list_grade) {\n\t\t\t\tTransferGradeInfo g = new TransferGradeInfo();\n\t\t\t\tg.setUid(grade.getUid());\n\t\t\t\tg.setName(grade.getName());\n\t\t\t\tg.setAdmissiontime(grade.getAdmissiontime());\n\t\t\t\tg.setGraduationtime(grade.getGraduationtime());\n\t\t\t\tg.setCreatetime(grade.getCreatetime());\n\t\t\t\tg.setCreateip(grade.getCreateip());\n\t\t\t\tif (grade.getAdmin() != null) {\n\t\t\t\t\tTransferAdminInfo createuser = new TransferAdminInfo();\n\t\t\t\t\tcreateuser.setUid(grade.getAdmin().getUid());\n\t\t\t\t\tcreateuser.setName(grade.getAdmin().getName());\n\t\t\t\t\tg.setCreateuser(createuser);\n\t\t\t\t}\n\t\t\t\tfinalList.add(g);\n\t\t\t}\n\t\t\tTransferResultInfo<List<TransferGradeInfo>> rs = new TransferResultInfo<List<TransferGradeInfo>>();\n\t\t\trs.setMsgType(ResultCodeStorage.type_success);\n\t\t\trs.setMsgCode(ResultCodeStorage.code_success);\n\t\t\trs.setMsgContent(finalList);\n\t\t\treturn rs;\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tTransferResultInfo<String> rs = new TransferResultInfo<String>();\n\t\t\trs.setMsgType(ResultCodeStorage.type_error);\n\t\t\trs.setMsgCode(ResultCodeStorage.code_err_dao_hibernate_query);\n\t\t\trs.setMsgContent(StringUtil.formatResultInfoMessage(ResultCodeStorage.code_err_dao_hibernate_query, e.getMessage()));\n\t\t\treturn rs;\n\t\t} catch (HibernateSessionNotInitializedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tTransferResultInfo<String> rs = new TransferResultInfo<String>();\n\t\t\trs.setMsgType(ResultCodeStorage.type_error);\n\t\t\trs.setMsgCode(ResultCodeStorage.code_err_session_hibernate_empty);\n\t\t\trs.setMsgContent(StringUtil.formatResultInfoMessage(ResultCodeStorage.code_err_session_hibernate_empty, e.getMessage()));\n\t\t\treturn rs;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tTransferResultInfo<String> rs = new TransferResultInfo<String>();\n\t\t\trs.setMsgType(ResultCodeStorage.type_error);\n\t\t\trs.setMsgCode(ResultCodeStorage.code_err_generic_server_internal_exception);\n\t\t\trs.setMsgContent(StringUtil.formatResultInfoMessage(ResultCodeStorage.code_err_generic_server_internal_exception, e.getMessage()));\n\t\t\treturn rs;\n\t\t} finally {\n\t\t\tgradeDao.close();\n\t\t}\n\t}", "EbayLmsLog selectByPrimaryKey(Integer id);", "@Override\r\n\tpublic T findEntity(String hql, List<Object> params) throws Exception {\n\t\tList<T> list = this.find(hql, params);\r\n\t\tif (list != null && list.size() > 0) {\r\n\t\t\treturn list.get(0);\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public interface ContentUpgradeDao extends EntityObjectDao{\r\n\t/**\r\n\t * 新建时检测是否名字重复\r\n\t * @param name\r\n\t * @return\r\n\t */\r\n\tboolean obtainNameExists(String name);\r\n\t\r\n\t/**\r\n\t * 更新时检测是否有重复\r\n\t * @param name\r\n\t * @param uuid\r\n\t * @return\r\n\t */\r\n\tboolean obtainNameExists(String name, String uuid);\r\n\r\n\t/**\r\n\t * 获取指定关键词和分页信息的内容升级列表\r\n\t * @param keyword 查找的关键词\r\n\t * @param startPosition 起始位置\r\n\t * @param size 获取大小\r\n\t * @return\r\n\t */\r\n\tList<ContentUpgrade> loadContentUpgrades(String keyword, int startPosition, int size);\r\n\t\r\n\t/**\r\n\t * 获取指定关键词的数量\r\n\t * @param keyword 指定关键词\r\n\t * @return\r\n\t */\r\n\tint loadAmount(String keyword);\r\n\t\r\n\t\r\n\tList<ContentUpgrade> loadAllContentUpgrades();\r\n}", "private static List<ArticleBean> transactionSearchSuggestedArticles(Transaction tx, String username, int limit)\n {\n List<ArticleBean> articles = new ArrayList<>();\n HashMap<String,Object> parameters = new HashMap<>();\n int quantiInflu = 0;\n parameters.put(\"username\", username);\n parameters.put(\"role\", \"influencer\");\n parameters.put(\"limit\", limit);\n\n String conInflu = \"MATCH (u:User{username:$username})-[f:FOLLOW]->(i:User{role:$role})-[p:PUBLISHED]-(a:Article) \" +\n \" RETURN a, i, p ORDER BY p.timestamp LIMIT $limit\";\n\n String nienteInflu = \"MATCH (i:User)-[p:PUBLISHED]->(a:Article)-[r:REFERRED]->(g:Game), (u:User) \" +\n \" WHERE NOT(i.username = u.username) AND \" +\n \" u.username=$username AND ((g.category1 = u.category1 OR g.category1 = u.category2) \" +\n \" OR (g.category2 = u.category1 OR g.category2 = u.category2))\" +\n \" RETURN distinct(a),i,p ORDER BY p.timestamp LIMIT $limit \";\n\n Result result;\n quantiInflu = UsersDBManager.transactionCountUsers(tx,username,\"influencer\");\n if(quantiInflu < 3)\n {\n result = tx.run(nienteInflu, parameters);\n }\n else\n {\n result = tx.run(conInflu, parameters);\n }\n while(result.hasNext())\n {\n Record record = result.next();\n List<Pair<String, Value>> values = record.fields();\n ArticleBean article = new ArticleBean();\n String author;\n String title;\n for (Pair<String,Value> nameValue: values) {\n if (\"a\".equals(nameValue.key())) {\n Value value = nameValue.value();\n title = value.get(\"title\").asString();\n article.setTitle(title);\n article.setId(value.get(\"idArt\").asInt());\n\n }\n if (\"i\".equals(nameValue.key())) {\n Value value = nameValue.value();\n author = value.get(\"username\").asString();\n article.setAuthor(author);\n\n }\n if (\"p\".equals(nameValue.key())) {\n Value value = nameValue.value();\n String timestamp = value.get(\"timestamp\").asString();\n article.setTimestamp(Timestamp.valueOf(timestamp));\n\n }\n }\n articles.add(article);\n }\n\n return articles;\n\n }", "@Override\r\n\tpublic Vtype findById(int id) {\n\t\tVtype v=null;\r\n\t\tHibernateUtil.getCurrentSession().beginTransaction();\r\n\t\ttry{\r\n\t\t\tv=this.vdao.findById(id);\r\n\t\t\tHibernateUtil.getCurrentSession().getTransaction().commit();\r\n\t\t}catch(Exception e){\r\n\t\t\ttry{\r\n\t\t\t\tHibernateUtil.getCurrentSession().getTransaction().rollback();\r\n\t\t\t}catch(Exception e1){\r\n\t\t\t\tthrow e1;\r\n\t\t\t}\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn v;\r\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchDriver(String search_key) {\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listemp = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N'\"\r\n\t\t\t\t+ \" AND empcategory LIKE '%Driver%'\"\t\r\n\t\t\t\t+ \"and emp_name LIKE '%\"+search_key+\"%'\").list();\r\n\t\treturn listemp;\r\n\t\t\r\n\t}", "public Entity2 findEntity2ById(String id) throws DaoException;", "Alimento loadAlimentoById(Long id) throws EntityNotFoundException;", "E findById(K id);", "public static void findByEquility() {\n\t\t\r\n\t\tFindIterable<Document> findIterable = collection.find(eq(\"status\", \"D\"));\r\n\t\tprint(findIterable);\r\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyeyEmployeeforSA(String search_key) {\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listemp = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N' and emp_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR empcategory LIKE '%\" + search_key + \"%' OR emp_code LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR branchModel.branch_name LIKE '%\" + search_key + \"%' OR emp_address1 LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR emp_address2 LIKE '%\" + search_key + \"%' OR location.location_name LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR location.address.city LIKE '%\" + search_key + \"%' OR location.address.district LIKE '%\" + search_key + \"%'\"\r\n\t\t\t\t+ \" OR location.address.state LIKE '%\" + search_key + \"%' OR emp_phoneno LIKE '%\" + search_key + \"%' OR emp_email LIKE '%\" + search_key + \"%' OR dob LIKE '%\"+ search_key + \"%'\"\r\n\t\t\t\t+ \" OR doj LIKE '%\" + search_key + \"%'\").list();\r\n\t\treturn listemp;\r\n\t\t\r\n\t}", "public E find(MongoDBCritera critera);", "@Override\r\n\t@Transactional\r\n\tpublic List<EmployeeMaster> searchbyEmployee(String search_key) {\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\r\n\t\tList<EmployeeMaster> listcust = (List<EmployeeMaster>) sessionFactory.getCurrentSession()\r\n\t\t.createQuery(\"from EmployeeMaster WHERE obsolete ='N' \"\r\n\t\t\t\t+ \" AND user.role.role_Name <>'\" + constantVal.ROLE_SADMIN + \"' \"\r\n\t\t\t\t+ \" and emp_name LIKE '%\" + search_key + \"%'\").list();\r\n\t\treturn listcust;\r\n\t\t\r\n\t}", "public IncomingReport find(Integer id) throws DAOException;", "public find() {\n initComponents();\n loadTBL(\"select * from before_production order by date\");\n loadSupp();\n }", "public List<EntityPropertyLocation> find();", "@Override\r\n\tpublic T findEntity(Class<T> c, Serializable id) throws Exception {\n\t\treturn (T) this.getcurrentSession().get(c, id);\r\n\t}", "protected void checkFindByPrimaryKey(DetailAST aAST)\n {\n if (!Utils.hasPublicMethod(aAST, \"findByPrimaryKey\", false, 1))\n {\n final DetailAST nameAST = aAST.findFirstToken(TokenTypes.IDENT);\n log(\n aAST.getLineNo(),\n nameAST.getColumnNo(),\n \"missingmethod.bean\",\n new Object[] {\"Home interface\", \"findByPrimaryKey\"});\n }\n }", "@Repository\n@Transactional\npublic interface UserAnswerRepository extends MongoRepository<UserAnswer, String> {\n UserAnswer findByAid(long aid);\n\n List<UserAnswer> findUserAnswerByUidAndEid(long uid, long eid);\n}", "public void testFindByEstado() {\n// Iterable<Servico> servicos = repo.findByEstado(EstadoEspecificacao.INCOMPLETO, NrMecanografico.valueOf(\"1001\"));\n// servicos.forEach(s -> System.out.println(s.identity()));\n }", "@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\t//doing lazy-load\r\n\t\t\t\tmasterAEnt.getDetailAEntCol().size();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest.this\r\n\t\t\t\t\t.manager\r\n\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tSignatureBean signatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQUVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoiZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> detailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\tArrayList<DetailAEnt> detailAEntCuttedCol = new ArrayList<>();\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(1));\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(2));\r\n\t\t\t\tPlayerSnapshot<Collection<DetailAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailAEntCuttedCol);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}", "public interface RenLogEntityRepository extends JpaRepository<RenLogEntity, String> {\n\n List<RenLogEntity> findRenLogEntitiesByRtid(String rtid);\n\n}", "public interface XiaoShouContactDao extends EntityObjectDao {\n \n List<XiaoShouContact> findOverviewXiaoShouContact(String keyWords, String userUuid, String startTime, String endTime, String sortBy, String sortWay, String contactStatus, int startPosition, int pageSize);\n\n int findOverviewXiaoShouSize(String keyWords, String userUuid, String startTime, String endTime, String sortBy, String sortWay, String contactStatus);\n\n //查找重复的编号\n boolean findXiaoShouOrderDuplicate(String temp);\n\n //未付账单用户\n List<Object[]> obtainAllCompanyWithOnCreateBillOnLoginUser();\n\n //特定用户所有未付款history\n List<XiaoShouContactRentingFeeHistory> findSpecUserOnCreateBill(String selectCarrierUuid);\n\n /*******************************************扣款历史*******************************************/\n List<XiaoShouContactRentingFeeHistory> findXiaoShouHistory(List<String> historyUuids);\n\n List<XiaoShouContactRentingFeeHistory> obtainXiaoShouHistoryByVehicleNumber(String contactUuid, String vehicleNumber);\n}", "public interface alertRepo {\n\n List<alerts> findAll();\n\n List<alerts> findAlertsFromVehicle(String vin);\n\n alerts create(alerts alert);\n}", "public Student findById(int theStudent_id);", "@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\t//doing lazy-load\r\n\t\t\t\tmasterAEnt.getDetailAEntCol().size();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest.this\r\n\t\t\t\t\t.manager\r\n\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tSignatureBean signatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQUVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoiZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> detailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\tArrayList<DetailAEnt> detailAEntCuttedCol = new ArrayList<>();\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(0));\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(1));\r\n\t\t\t\tPlayerSnapshot<Collection<DetailAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailAEntCuttedCol);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}", "public List<E> findAll() ;", "public Singer find(int singerId);", "@Override\n public SideDishEntity find(Long id) throws ObjectNotFoundUserException {\n return null;\n }", "@Override\n\tpublic Paciente find(Paciente entity) throws SQLException {\n\t\treturn null;\n\t}", "int updateByPrimaryKeySelective(Engine record);", "public Poentity poentity_search_for_update(String id ) throws Exception {\n\n \t\t log.setLevel(Level.INFO);\n\t log.info(\"poentity_search_for_update service operation started !\");\n\n\t\ttry{\n\t\t\tPoentity the_Poentity;\n\n\t\t\tthe_Poentity = Poentity_Activity_dao.poentity_search_for_update(id);\n\n \t\t\tlog.info(\" Object returned from poentity_search_for_update service method !\");\n\t\t\treturn the_Poentity;\n\n\t\t}catch(Exception e){\n\n\t\t\tSystem.out.println(\"ServiceException: \" + e.toString());\n\t\t\tlog.error(\"poentity_search_for_update service throws exception : \"+ e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\n\t}", "@Override\n public DriverDO find(Long driverId) throws EntityNotFoundException {\n return findDriverChecked(driverId);\n }", "@Override\n\tpublic List<String> getAllAuditedEntitiesNames() {\n\t\tif (this.allAuditedEntititesNames != null) {\n\t\t\t// return this.allAuditedEntititesNames;\n\t\t}\n\t\t//\n\t\tList<String> result = new ArrayList<>();\n\t\tSet<EntityType<?>> entities = entityManager.getMetamodel().getEntities();\n\t\tfor (EntityType<?> entityType : entities) {\n\t\t\tif (entityType.getJavaType() == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// get entities methods and search annotation Audited in fields.\n\t\t\tif (getAuditedField(entityType.getJavaType().getDeclaredFields())) {\n\t\t\t\tresult.add(entityType.getJavaType().getCanonicalName());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//\n\t\t\t// TODO: add some better get of all class annotations\n\t\t\tAnnotation[] annotations = null;\n\t\t\ttry {\n\t\t\t\tannotations = entityType.getJavaType().newInstance().getClass().getAnnotations();\n\t\t\t} catch (InstantiationException | IllegalAccessException e) {\n\t\t\t\t// class is not accessible\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// entity can be annotated for all class\n\t\t\tif (getAuditedAnnotation(annotations)) {\n\t\t\t\tresult.add(entityType.getJavaType().getCanonicalName());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\t// sort entities by name\n\t\tCollections.sort(result);\n\t\t//\n\t\tthis.allAuditedEntititesNames = result;\n\t\treturn result;\n\t}", "public abstract T findById(K id, Boolean isAdmin) throws ServiceException;", "public IPATestStage ipateststage_search_for_update(long id, IPUser user) throws Exception {\n\t\t log.setLevel(Level.INFO);\n\t log.info(\"ipateststage_search_for_update Dao started operation!\");\n\n\t\ttry{\n\n\t\t\tQuery result = entityManager.\n\t\t\tcreateNativeQuery(search_for_update_IPATestStage,IPATestStage.class)\n\n\t\t\t.setParameter(\"id\", id);;\n\n\t\t\tArrayList<IPATestStage> IPATestStage_list =\t(ArrayList<IPATestStage>)result.getResultList();\n\n\t\t\tif(IPATestStage_list == null){\n\n\t\t\tlog.error(\"ipateststage_search_for_update Dao throws exception :\" + \"no IPATestStage found\" );\n\t\t\tthrow new Exception(\"no IPATestStage found\");\n\t\t\t}\n\t\t\tlog.info(\"Object returned from ipateststage_search_for_update Dao method !\");\n\t\t\treturn (IPATestStage) IPATestStage_list.get(0);\n\n\t\t}catch(Exception e){\n\n\t\t\t//new Exception(e.toString()); // this needs to be changed\n\t\t\tlog.error(\"ipateststage_search_for_update Dao throws exception : \"+e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\t}", "Expertise findByName(String name);", "List<Event> findAllBy();", "public interface CaseRepo extends MongoRepository<Case, String> {\n // Case findById(String id);\n List<Case> findByInternalId(String internalId);\n}", "Employee findById(int id);", "public static List<Book> searchEBookByName(String name) throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n\r\n Query query = session.getNamedQuery(\"INVENTORY_searchBookByName\").setString(\"name\", name);\r\n\r\n List<Book> resultList = query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return resultList;\r\n \r\n }", "public static void main(String[] args) {\n\t\tEntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(\"pu_essai\");\r\n\t\tEntityManager em = entityManagerFactory.createEntityManager();\r\n\t\t/*\r\n\t\t * Livre l = em.find(Livre.class, 1); if (l != null){\r\n\t\t * System.out.println(l.getId() + \" \" + l.getTitre() + \" \" +\r\n\t\t * l.getAuteur()); } TypedQuery<Livre> query2 =\r\n\t\t * em.createQuery(\"select l from Livre l where l.titre='Germinal'\",\r\n\t\t * Livre.class); Livre l2 = query2.getResultList().get(0);\r\n\t\t * System.out.println(l2.getId() + \" \" + l2.getTitre() + \" \" +\r\n\t\t * l2.getAuteur());\r\n\t\t */\r\n\t\tQuery query3 = em.createQuery(\"select e.livres from Emprunt e where e.id=1\");\r\n\t\tList<Livre> result = query3.getResultList();\r\n\t\tfor (Livre l : result) {\r\n\t\t\tSystem.out.println(l.getId() + \" \" + l.getTitre() + \" \" + l.getAuteur());\r\n\t\t}\r\n\t\tTypedQuery<Emprunt> query4 = em.createQuery(\"select e from Emprunt e where e.client=3\", Emprunt.class);\r\n\t\tquery4.getResultList().forEach(e -> System.out.println(e.getId() + \" \" + e.getDate_debut() + \" \" + e.getDate_fin()));\r\n\t\tem.close();\r\n\t\tentityManagerFactory.close();\r\n\t}", "@Repository\npublic interface EnterprisesRepository extends JpaRepository<Enterprises, Long> {\n\n Enterprises findById(Long id);\n\n/* @Query(\"SELECT e.id,e.entpName,e.contactPerson,e.createdDate FROM Enterprises e\")\n List<Enterprises> findAllEnterprises();*/\n\n @Query(\"SELECT e FROM Enterprises e where e.id = :id\")\n Enterprises findEnterprise(@Param(\"id\") Long id);\n}", "static void searchProductDB() {\n\n int productID = Validate.readInt(ASK_PRODUCTID); // store product ID of user entry\n\n\n productDB.findProduct(productID); // use user entry as parameter for the findProduct method and if found will print details of product\n\n }", "ProEmployee selectByPrimaryKey(String id);", "Getter<ENTITY, FK> finder();", "@Repository\npublic interface EventRepository extends JpaRepository<Event, Integer> {\n\n @Query(\"select e from Event e where lower(e.title) like lower(concat('%',:search,'%'))\"\n + \" or e.author in (select u.userId from User u \"\n + \" where lower(u.firstName) like lower(concat('%',:search,'%')) \"\n + \" or lower(u.lastName) like lower(concat('%',:search,'%')))\"\n + \" or lower(e.description) like lower(concat('%',:search,'%'))\")\n List<Event> findByTitleOrAuthorOrDescription(\n @Param(\"search\") String search);\n\n @Query(\"select e from Event e where e.startTime between :startTime and :endTime\"\n + \" or e.endTime between :startTime and :endTime\")\n List<Event> findBetweenStartTimeAndEndTime(\n @Param(\"startTime\") Timestamp startTime,\n @Param(\"endTime\") Timestamp endTime);\n\n @Query(\"select e from Event e where e.author = (select u.userId from User u where u.email = :email)\")\n List<Event> findByAuthorEmail(@Param(\"email\") String email);\n \n}", "@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<DetailAEnt> detailAEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, DetailAEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.masterA.id\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.subId\")).list();\r\n\t\t\t\t\r\n\t\t\t\tList<DetailACompId> detailACompIdList = new ArrayList<>();\r\n\t\t\t\tfor (DetailAEnt detailAEnt : detailAEntList) {\r\n\t\t\t\t\tdetailACompIdList.add(detailAEnt.getCompId());\r\n\t\t\t\t\tPlayerManagerTest.this.manager.registerComponentOwner(DetailAEnt.class, detailAEnt.getCompId(), d -> d.getCompId());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<DetailACompId>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailACompIdList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}" ]
[ "0.5781019", "0.5476415", "0.5450874", "0.54100484", "0.5312251", "0.5300446", "0.5282227", "0.523874", "0.52136105", "0.51738685", "0.51726973", "0.51479685", "0.514569", "0.5132783", "0.5131197", "0.5131087", "0.51211435", "0.51111424", "0.5066577", "0.5052679", "0.504925", "0.5040681", "0.50381875", "0.5028127", "0.501909", "0.5017387", "0.50134027", "0.50115186", "0.50058335", "0.5004964", "0.50020427", "0.49969307", "0.49813142", "0.49798054", "0.49778843", "0.49765143", "0.49694252", "0.4952304", "0.4946322", "0.49443826", "0.49436128", "0.49421903", "0.49409962", "0.49409702", "0.4939509", "0.49390683", "0.4938093", "0.49329388", "0.49218696", "0.49212465", "0.4920871", "0.4911899", "0.49113834", "0.49103436", "0.4907274", "0.49061912", "0.49044067", "0.4902764", "0.48867676", "0.48853645", "0.4881787", "0.48805538", "0.48798594", "0.48795584", "0.48768517", "0.4872021", "0.48688895", "0.48667756", "0.48609823", "0.48530415", "0.48527738", "0.4850795", "0.48492602", "0.4849047", "0.4848928", "0.48467472", "0.48460987", "0.4845593", "0.48454875", "0.48452625", "0.48403734", "0.483808", "0.48359337", "0.4835728", "0.48337314", "0.4832937", "0.48180667", "0.48176923", "0.48166808", "0.48158085", "0.48087174", "0.48080355", "0.48047453", "0.48045772", "0.4804544", "0.48045105", "0.4802092", "0.48015916", "0.4800173", "0.47987115", "0.47984892" ]
0.0
-1
If the value of 'a' is of nonstatic type then it cannnot be reference from the main function
public void Display(){ System.out.println(a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void m1(int a){\n\t\ta=Static11.a;\nSystem.out.println(a);\n\t}", "public static void a() {\n\n }", "public static void test(){\n\t\tSystem.out.println(a);\n\t}", "public static aa a() {\n }", "private void m140522a(C11585f fVar, A a) {\n C7573i.m23587b(fVar, \"$receiver\");\n if (a != null) {\n this.f114667a.invoke(a);\n }\n }", "public static a c() {\n }", "public static void main(String[] args) {\n\tThree4 t4 = new Three4();\n\tSystem.out.println(t4.i); //static var can be accessed by ref var but warn, when run <t4> is replaced by <class-name>\n\tSystem.out.println(i);\n\tSystem.out.println(Three4.i);\n\t\n}", "public void a() {\n ((a) this.a).a();\n }", "public void a(Object obj) {\n }", "public static void main(String[] args)\n\t\n\t{\n\t\tNonStaticPracticeDemo nonobj=new NonStaticPracticeDemo();\n\t\t\n\t\t//using hash code method and print objref address\n\t\t//fetch the nonobj address using hashcode()of object calss\n\t\tint nonobjAddressVal=nonobj.hashCode();\n\t\tSystem.out.println(\"HASH CODE ADDRESS IS\"+ nonobjAddressVal);\n\t\t//creating another object\n\t\tNonStaticPracticeDemo nonobj2=new NonStaticPracticeDemo();\n\t\tint nonobj2AddressVal=nonobj2.hashCode();\n\t\tSystem.out.println(\"HASH CODE OF ADDRESS nonobj2 :\"+nonobj2AddressVal);\n\t\tboolean b=(nonobj==nonobj2);\n\t\tSystem.out.println(\"Comparing nonobj with nonobj2 using==operator:\"+b);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//calling non static variavles\n\t\tSystem.out.println(\"NON STATIC VARIABLE IS:\"+nonobj.s);\n\t\tSystem.out.println(\"NON STATIC VARIABLE IS :\"+nonobj.f);\n\t\t//calling non staticvoid method\n\t\t\t\tnonobj.charDemo();\n\t\t\t\t//calling non static void with parameterised method\n\t\tnonobj.swapMethod(17,34);\n\t\t//calling non static reaturn type with peremeterised method\n\t\tSystem.out.println(\"getmaxvalue of non static return type method:\"+nonobj.getMaxValue(34, 23));\n\t\tSystem.out.println(\"GET MAX DOUBLE RETURN TYPE VALUE:\"+nonobj.getMaxValue1(170, 230));\n\t\tSystem.out.println(\"GET MAX FLOAT RETURN TYPE VALUE:\"+nonobj.getMaxValue2(4.5f, 3.5f));\n\t\t//calling non staic return type without parameterised method\n\t\tSystem.out.println(\"AFTER TRIMMING STRING VALUE IS\"+ nonobj.stringMethod());\n\t\tSystem.out.println(\"getminvalue of non static return type method:\"+nonobj.getMinValue(45, 67));\n\t\t//calling non staic return type without parameterised method\n\t\tSystem.out.println(\"non staic return type without parameterised method convert celcius to farenheat:\"+nonobj.convertCelciusToFarenheattTemp(55));\n\t\t\n\t\t//calling non staic return type without parameterised method\n\t\t\tSystem.out.println(\"non staic return type without parameterised method convert farenheat to celcius:\"+nonobj.convertFarenheatToCelciusTemp(131));\n\t\t\t\n\t\t\t//calling non static reaturn type with peremeterised method\n\t\t\tSystem.out.println(\"GET MIN INT VALUE RETURN TYPE METHOD:\"+nonobj.getMinValue(345, 567));\n\t\t\tSystem.out.println(\"GET MIN LONG RTURN TYPE VALUE:\"+nonobj.getMinValue2(100, 200));\n\t\t\tSystem.out.println(\"GET MIN FLOAT RETURN TYPE VALUE:\"+nonobj.getMinValue3(4.5f, 9.8f));\n\t\t\t\n\t\t\tint a21=(int) (nonobj.a-nonobj.c+nonobj.f);\n\t\t\tSystem.out.println(\"THE VALUE OF a21 is:\"+a21);\n\t\t\tSystem.out.println(\"THE MULTIPLY BETWEEN TWO NON STATIC VARIABLE IS:\"+nonobj.a*nonobj.c/nonobj.f);\n\t\t\t\n\t\t\t}", "public static void main(String[] args) {\n\t\tcallingstatic obj = new callingstatic(); //object to call nonstatic func or var. \n\t\t\n\tsum(); //Direct calling static method.\n\tcallingstatic.sum(); //indirect calling static method through class name.\n\t//obj.sum(); //nonstatic way to call static method. \n\t\n\tobj.divide(); //calling nonstatic func though obj\n\tSystem.out.println(obj.name); //calling nonstatic var though obj\n\t}", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "private void m140524a(A a) {\n C7563m mVar = this.f114670a.f114669b;\n C11592h hVar = this.f114670a.f114668a;\n if (hVar != null) {\n mVar.invoke((C44396a) hVar, a);\n return;\n }\n throw new TypeCastException(\"null cannot be cast to non-null type com.ss.android.ugc.gamora.jedi.BaseJediView\");\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public void a() {\r\n }", "void test(int a){\n System.out.println(\"a: \"+a);\n }", "@Override\n\tpublic boolean isStatic() {\n\t\treturn false;\n\t}", "public void a(i iVar) {\n }", "private static void staticFun()\n {\n }", "public void addition(CallByReference a){\n x = a.x+5; //extract the value from the new \"a\" object\n //System.out.println(x);\n }", "@Override\n public final boolean isReferenceType() {\n return true;\n }", "private void tryCallWithReferenceType() {\n\n StringBuilder builder = new StringBuilder(\"My content will \");\n // the method call will take the original value\n callMethod(builder);\n // the builder content has changed\n System.out.println(builder);\n }", "public void a() {\n }", "public void a() {\n }", "public static void main(String[] args) {\n NonStaticFunctions objRef= new NonStaticFunctions(); \n \n int add=objRef.sum(10, 20);\n System.out.println(objRef.age);\n \n message();\n System.out.println(name);\n\t}", "@Override\n\t/**\n\t * does nothing because a class cannot be static\n\t */\n\tpublic void setStatic(boolean b) {\n\n\t}", "public abstract BoundType a();", "public abstract void mo56919a(@NonNull C4125a aVar);", "public static void main(String[] args) {\n\t\tSystem.out.println(b);\n\t\tVariablesStaticInstace obj = new VariablesStaticInstace();\n\t\tobj.method1();\n\t}", "public static void main(String[] args) {\n System.out.println(\"main method of class static block \");//1 main method executed in overloaded class in jvm\r\n\t\tA a = new A();\r\n\t\ta.m1();\r\n\t\tB b = new B(12);\r\n\t\tb.m1();\r\n\t\tSystem.out.println(\"value of var from B class\"+b.var);\r\n\t\tA aa = new B();\r\n\t\t\r\n\t}", "public BoundType a() {\n throw new AssertionError(\"this statement should be unreachable\");\n }", "public static void isStatic() {\n\n }", "boolean isStatic();", "boolean isStatic();", "public static void main(int a) {\n\t\t\n\t\tSystem.out.println(\"main method \"+a);\n\t\t\n\t}", "public void mo1554b(ac acVar) {\n }", "public static void main(String[] args) {\n\n System.out.println(a);// by default is STATIC als it is FINAL (which mean doesn't reassign)\n\n // a = 200; ==> Cannot assign a value to final variable 'a'\n\n System.out.println( Interface2.a );\n Interface2.method4();\n\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public abstract void mo56922b(@NonNull C4125a aVar);", "boolean getIsStatic();", "public static void main(String[] args) {\n\t\tMain12 b = new Main12();\r\n\t\tSub s = new Sub();\r\n\t\t\r\n\t\tSystem.out.println(Main12.FOO);\r\n\t\tSystem.out.println(Sub.FOO);\r\n\t\tSystem.out.println(b.FOO);\r\n\t\tSystem.out.println(s.FOO);\r\n\t\tSystem.out.println(((Main12)s).FOO);\r\n\t\t//System.out.println(((Sub)b).FOO);\r\n\t\t\r\n\t\t//14\r\n\t\ttest(null);\r\n\t}", "public static void main(String[] args) {\n\n\t\tSystem.out.println(myStaticVar);\n\t\t//System.out.println(myInstensVar);// will not work because it is not static\n\n\t\tVaribleAcces acc= new VaribleAcces();\n\t\tSystem.out.println(acc.myInstensVar);\n\t\tSystem.out.println(acc.myStaticVar);\n\t\tSystem.out.println(VaribleAcces.myStaticVar);\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\tA1 a=new A1();\n//\t//a.m1();\n//\t//B1 a=new B1();\n//\tA1 a=new C();\n\ta.m1();\n\t//int x=20;\n\tString x=\"20\";\n\tSystem.out.println(x);\n\t\n\tint in =1;\n\tInteger obj =in;\n\t\nf\n\n}", "public void a(Integer num) {\n ((b.b) this.b).a(num);\n }", "public static void main(String[] args) {\n\r\n\t\tA a1=new A(123);\r\n\t\tint x=a1.getValue();\r\n\t\tSystem.out.println(x);\r\n\t}", "public default boolean isStatic() {\n\t\treturn false;\n\t}", "public boolean a()\r\n {\r\n return false;\r\n }", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "protected void a(bug parambug)\r\n/* 35: */ {\r\n/* 36:36 */ this.j.a((bxf)null);\r\n/* 37: */ }", "public static void main(String[] args) {\n// System.out.println(Parent2.str);//public static String str = \"hello world\";\n\n// hello world\n System.out.println(Parent2.a);//public static final String str = \"hello world\";\n }", "public bcm a(World paramaqu, int paramInt)\r\n/* 17: */ {\r\n/* 18: 37 */ return null;\r\n/* 19: */ }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public static void main(String[] args) {\n String s=\"\";\n //call the static method from the main method\n s=Singleton.Initialize(s);\n //create an object PrintVal to print the values from a non static method\n PrintVal a=new PrintVal(s);\n\n\n\n\n }", "public abstract T a();", "public void m51745d() {\n this.f42403b.a();\n }", "public void mo1327d(ac acVar) {\n }", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public final boolean isReference() {\n \treturn !isPrimitive();\n }", "@Override\n public void func_104112_b() {\n \n }", "public static void main(String[] args) {\n\t\tint a=Sum (10,20);\r\n\t\tint b=Sum (20,50);\r\n\t\tSystem.out.println(a+b);\r\n\r\n\t\tNonStaticFunction obj= new NonStaticFunction();\r\n\t\tSystem.out.println(obj.sum(10, 20));\r\n\t}", "public void a(ik paramik)\r\n/* 59: */ {\r\n/* 60:66 */ paramik.a(this);\r\n/* 61: */ }", "public String i() {\n/* 44 */ return this.a.toString();\n/* */ }", "private static Parameter asInitializationReference(\n\t\t\tString staticId,\n\t\t\tString declarationId,\n\t\t\tModelicaArgument a)\n\t{\n\t\tString var = a.getName();\n\t\tString componentId1 = declarationId;\n\t\tif (staticId != null) componentId1 = componentId1.replace(\"_\".concat(staticId), \"\");\n\t\tSimInput simInput = new SimInput(componentId1, var);\n\t\tInitResult initResult = initResults2SimInputs.getInitResultFromSimInput(simInput);\n\t\tif (initResult != null)\n\t\t{\n\t\t\t// Now build a reference to an initialization component that contains the staticId\n\t\t\tString initResultsReference = String.format(\"%s_%s.%s\",\n\t\t\t\t\tinitResult.component,\n\t\t\t\t\tstaticId,\n\t\t\t\t\tinitResult.var);\n\n\t\t\tString defaultUnit = null;\n\t\t\treturn new ParameterReference(a.getName(), defaultUnit, \"INIT\", initResultsReference);\n\t\t}\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n int a = 0;\n new Constr(a);\n\n\n\n }", "private static class <init> extends <init>\n{\n\n public void a(Object obj, StringBuilder stringbuilder)\n {\n au au1 = (au)obj;\n y y1 = new y();\n y1.a(\"$ts\", Integer.valueOf(au1.a()));\n y1.a(\"$inc\", Integer.valueOf(au1.b()));\n a.a(y1, stringbuilder);\n }", "public BoundType a() {\n throw new IllegalStateException();\n }", "public static void main(String[] args) {\n \r\n A a1 =new A(5);\r\n \r\n\tSystem.out.println(\"\"+ a1.getA());\r\n\t}", "public static void main(String[] args) {\nA a=new A();\r\na.m();\r\n\t}", "public abstract String a();", "public static void main(String[] args){\n // isveda teksta i konsole\n // sout - greitai atspausdina\n System.out.println(\"Hello world\");\n // metodo kvietimas maine\n\n int a = 10;\n\n // sukurtas objektas\n // tipas pavadinimas = new tipas\n MyFirstClass myFirstClass = new MyFirstClass();\n\n // per objekta kvieciamas metodas\n // ne statinis kvieciamas statiniame per klases objekta\n myFirstClass.myNotStaticMethod(a);\n\n // tiesiogiai per varda toje pacioje klaseje\n myStaticMethod();\n\n // float visada su f\n float b = 4.6f;\n\n // galima pridet d, bet nebutina\n double c = 2.4;\n\n // saugo true arba false(1 bito)\n boolean d = true;\n\n // viena raide, simbolis\n char e = 'A';\n\n // Javoj string neturi atskiro tipo, todel naudoja klase ir rasomas is didziosios(nes klase)\n String f = \"This is string!!!\";\n }", "public void method(int a) {\r\n\t\tint tot = 7;\r\n\t\tSystem.out.println(\"localvariable a: \"+a);\r\n\t\tint b = a + 4;\r\n\t\tSystem.out.println(\"localvariable b: \"+b);\r\n\t\t\r\n\t}", "public static void t(){\n\n\n }", "public final /* synthetic */ Object a() {\r\n return c.a(this.a, b.d());\r\n }", "public no(np paramnp)\r\n/* 13: */ {\r\n/* 14:30 */ this.b = paramnp;\r\n/* 15: */ }", "public abstract boolean a();", "public static void main (String ...a){\n\t\n\t\tSingleObject singleton = SingleObject.getInstance();\n\t\tsingleton.showMessage();\n\t}", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "public abstract Object mo1771a();", "public abstract int a();", "void add1() {\n\t\tStatic_Demo s=new Static_Demo();\r\n\t\ts.add();\r\n\t\t\r\n\t\t//calling static method of one class inside another non static of different class via classname\r\n\t\tStatic_Demo.sub();\r\n\t}", "public int nonStatic( int x ) {\n return x * 3;\n }", "public static void main(String[] args) {\n\t\t\n\t\tObject a = new ClassObj();\n\t\t ((A) a).Calling();\n\t\t \n\n\t}", "public void m612a() {\n try {\n w.a(this.f919a, w.a(this.a.b(), this.a.a()));\n } catch (fx e) {\n b.a((Throwable) e);\n this.f919a.a(10, (Exception) e);\n }\n }", "static void test(){\n\t }", "public void b() {\n ((a) this.a).b();\n }", "public static void main(String[] args) {\r\n\t\t//A obj = new A(); //A cannot be resolved to a type...try to access the class A method in thz class -- error \r\n\t // obj.i = 80; //here..The field A.i is not visible...it, allow as to create the object, but still it is not allow as to access thev & m, bcoz if we dont specify anything-- default(V & M) so it only accessible within the package.\r\n\t\r\n\t // obj.j = 90; //The field A.j is not visible -- error, cant access since it is protected.\r\n\t // obj.flow(); //The method flow() from the type A is not visible, cant access since it is protected.\r\n\t \r\n\t B obj1 = new B(); //extended class A, so we can access its V and M here.\r\n\t obj1.j = 70;\r\n\t obj1.flow();\r\n\t \r\n\t A obj3 = new A(); // here no need to extend class A , just create obj for A class and access it, bcoz it is \"public\".\r\n\t obj3.D = 100;\r\n\t obj3.sub();\r\n\t}", "private void tryCallWithPrimitives() {\n int primitiveType = 10;\n // the method call will take a copy of primitiveType variable value, the original value will not changed\n callMethod(primitiveType);\n // the value is just 100\n System.out.println(primitiveType);\n }", "public static int main(int[] a){\n return 0;\n }", "public void l0() {\n b bVar = (b) this.c0.get();\n if (bVar != null) {\n bVar.a();\n }\n }", "public static interface _cls1\n{\n\n public static final _cls1 a = new aky.f() {\n\n public alb a(alb alb)\n {\n return alb;\n }\n\n };\n\n public abstract alb a(alb alb);\n\n}", "public static void main(String a[]) {\n\t\tBound<A> bea = new Bound<A>(new A());\n\t\tbea.doRunTest();\n\n\t}", "private static void a(Object param0, Class<?> param1) {\n }", "final void a(boolean paramBoolean) {\n/* 14387 */ this.d = true;\n/* */ }", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "static void q7(){\n\t}", "public void a(MinecraftKey var0) {\n/* 98 */ this.a = var0;\n/* */ }", "public void a(a<e> parama) {\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tPrivateAb ob=new PrivateAb(); \r\n\t\t ob.mydata;\r\n\t\t\r\n\t\t//System.out.println(obj.data);\t//Compile Time Error \r\n\t\t obj.msg();\t//Compile Time Error \r\n\t\t \r\n\t\t\r\n\t\t }", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public vx i()\r\n/* 185: */ {\r\n/* 186:212 */ return vx.a;\r\n/* 187: */ }", "protected abstract void a(bru parambru);" ]
[ "0.6585455", "0.61961544", "0.6160215", "0.6065983", "0.603441", "0.58787566", "0.57997245", "0.5638713", "0.5552168", "0.5517932", "0.5509965", "0.5472874", "0.5431123", "0.5387162", "0.53860223", "0.5379786", "0.53618234", "0.53578943", "0.5352298", "0.53429264", "0.5324021", "0.5307864", "0.52912", "0.52912", "0.52830267", "0.52706933", "0.5261122", "0.52463114", "0.5236929", "0.52090997", "0.520149", "0.51706135", "0.5168246", "0.5168246", "0.51566875", "0.51468575", "0.51376307", "0.5133939", "0.51150995", "0.5097867", "0.50864977", "0.50812787", "0.50755477", "0.5056826", "0.5050336", "0.5046409", "0.50449514", "0.5037139", "0.503697", "0.503444", "0.50067544", "0.50050944", "0.5000753", "0.4999961", "0.49939796", "0.49920365", "0.49899074", "0.49895293", "0.498681", "0.49848825", "0.49785194", "0.496692", "0.49668783", "0.49641472", "0.49555588", "0.49539435", "0.4951431", "0.49384642", "0.49377602", "0.49271962", "0.49253452", "0.49244425", "0.49083415", "0.48986018", "0.48967433", "0.48952556", "0.48923555", "0.4890596", "0.4883402", "0.48779613", "0.48776093", "0.48730204", "0.48659337", "0.48629034", "0.4859614", "0.4859419", "0.48588625", "0.48579696", "0.48561466", "0.4855821", "0.48503062", "0.48493874", "0.48468745", "0.48440176", "0.48438874", "0.48430035", "0.48250058", "0.48227853", "0.4822764", "0.48221433", "0.4812794" ]
0.0
-1
Instead of passing an int[] to a web service, pass a List. This method converts an array of int to a List of Integer. When a web service publishes a method that receives an int[] as parameter, the type gets converted to a "sequence" in XML, and the client should therefore submit, as parameter, a List instead of an int[]. The web service will still receive an int[] on the server side.
static List<Integer> arrayToList(int[] array) { List<Integer> list = new ArrayList<Integer>(); for(int i : array) list.add(i); return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[] getIntList();", "public void setArray(int[] paramArrayOfInt)\n/* */ {\n/* 758 */ if (paramArrayOfInt == null) {\n/* 759 */ setNullArray();\n/* */ }\n/* */ else {\n/* 762 */ setArrayGeneric(paramArrayOfInt.length);\n/* */ \n/* 764 */ this.elements = new Object[this.length];\n/* */ \n/* 766 */ for (int i = 0; i < this.length; i++) {\n/* 767 */ this.elements[i] = Integer.valueOf(paramArrayOfInt[i]);\n/* */ }\n/* */ }\n/* */ }", "@RequestMapping(value = { \"/getAddressArray\" }, method = RequestMethod.GET)\r\n\tpublic @ResponseBody Integer[] getAddressArray(Integer[] idList) {\r\n\t\treturn idList;\r\n\t}", "private void intListToArrayList(int[] list, ArrayList<Integer> arrayList){\n for(int integer: list){\n arrayList.add(integer);\n }\n }", "private List<Integer> toList(int[] array) {\n List<Integer> list = new LinkedList<Integer>();\n for (int item : array) {\n list.add(item);\n }\n return list;\n }", "private int[] arrayListToIntList(ArrayList<Integer> arrayList){\n int[] list=new int[arrayList.size()];\n for(Integer integer:arrayList){\n list[arrayList.indexOf(integer)]=integer;\n }\n return list;\n }", "public static int[] convertIntegers(ArrayList<Integer> Y_list) {\r\n\t int[] Y = new int[Y_list.size()];\r\n\t Iterator<Integer> iterator = Y_list.iterator();\r\n\t for (int i = 0; i < Y.length; i++)\r\n\t {\r\n\t Y[i] = iterator.next().intValue();\r\n\t }\r\n\t return Y;\r\n\t}", "int[] getInts();", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default int[] asIntArray() {\n \n return notSupportedCast(\"int[]\");\n }", "public static int[] convertIntegersToArray(List<Integer> integers){\n \n \tint[] newArray = new int[integers.size()]; \n \tIterator<Integer> iterator = integers.iterator(); // Declare and create iterator on integers arraylist.\n \n for (int i = 0; i < newArray.length; i++){\n newArray[i] = iterator.next().intValue(); // add elements to newArray \n }\n \n return newArray;\n }", "java.util.List<java.lang.Integer> getItemsList();", "public static List<Integer> asList(int[] array) {\n\t\treturn new IntList(array);\n\t}", "public static void convertIntArrayToList() {\n\t\tint[] inputArray = { 0, 3, 7, 1, 7, 9, 11, 6, 3, 5, 2, 13, 14 };\n\n\t\t// ********** 1 *************\n\t\tList<Integer> list = Arrays.stream(inputArray) // IntStream\n\t\t\t\t.boxed() // Stream<Integer>\n\t\t\t\t.collect(Collectors.toList());\n\t\tSystem.out.println(list);\n\n\t\t// ********** 2 *************\n\t\tList<Integer> list_2 = IntStream.of(inputArray) // returns IntStream\n\t\t\t\t.boxed().collect(Collectors.toList());\n\t\tSystem.out.println(list_2);\n\t}", "public abstract ArrayList<Object> calculateTransform(ArrayList<Integer> arr);", "public abstract ArrayList<Integer> getIdList();", "java.util.List<java.lang.Integer> getRequestedValuesList();", "public MutableArray(int[] paramArrayOfInt, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 202 */ this.sqlType = paramInt;\n/* 203 */ this.old_factory = paramCustomDatumFactory;\n/* 204 */ this.isNChar = false;\n/* */ \n/* 206 */ setArray(paramArrayOfInt);\n/* */ }", "public static List<Integer> asList(int[] a) {\n assert (a != null);\n List<Integer> ret = new ArrayList<>(a.length);\n for (int e : a)\n ret.add(e);\n return ret;\n }", "private int[] convertDoubleListToIntArray(List<Double> doubleList){\r\n\t\t\tint[] intArray = new int[doubleList.size()];\r\n\t\t\tfor(int i =0; i<doubleList.size(); i++){\r\n\t\t\t\t//intArray[i] = Integer.parseInt(String.valueOf(intList.get(i)));\r\n\t\t\t\tintArray[i] = doubleList.get(i).intValue();\r\n\t\t\t}\r\n\t\t\treturn intArray;\r\n\t\t}", "public List<Integer> convert (List<int[]> list) {\r\n\r\n List<Integer> result = new ArrayList<>();\r\n for(int[] array : list) {\r\n for (int i = 0; i < array.length; i++) {\r\n result.add(array[i]);\r\n }\r\n }\r\n return result;\r\n }", "public void genericIntegerArray() {\n\t\tArrayList<Integer> a1 = new ArrayList<Integer>();\n\t\ta1.add(20);\n\t\ta1.add(11);\n\t\tSystem.out.println(\"Integer generic ArrayList a1: \" + a1);\n\n\t}", "public List<BigInteger> convertIntegerList(List<Integer> alist){\n\t\tList<BigInteger> blist = new ArrayList<BigInteger>(alist.size());\n\t\tfor(int i=0; i < alist.size(); i++){\n\t\t\tblist.add( BigInteger.valueOf( alist.get(i).intValue() ) );\n\t\t}\n\t\t\n\t\treturn blist;\n\t}", "public abstract int[] toIntArray();", "public List<Integer> getAsIntegerList(String itemName, List<Integer> defaultValue);", "public abstract int[] getInts(int paramInt1, int paramInt2, int paramInt3, int paramInt4);", "private static int[] toIntArray(List<Integer> shorts) {\n int[] array = new int[shorts.size()];\n for (int i = 0; i < shorts.size(); i++)\n array[i] = shorts.get(i).shortValue();\n return array;\n }", "public void setList(List<Integer> list) {\n this.list = list;\n }", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default List<IData> asList() {\n \n return notSupportedCast(\"IData[]\");\n }", "public void sendInts(ArrayList<Integer> list) {\r\n\t\tltpSend(list, LiteServer.INT_CONST);\r\n\t}", "public MutableArray(int paramInt, int[] paramArrayOfInt, ORADataFactory paramORADataFactory)\n/* */ {\n/* 122 */ this.sqlType = paramInt;\n/* 123 */ this.factory = paramORADataFactory;\n/* 124 */ this.isNChar = false;\n/* */ \n/* 126 */ setArray(paramArrayOfInt);\n/* */ }", "private static ArrayList<Integer> makeListOfInts() {\n ArrayList<Integer> listOfInts = new ArrayList<>(Arrays.asList(7096, 3, 3924, 2404, 4502,\n 4800, 74, 91, 9, 7, 9, 6790, 5, 59, 9, 48, 6345, 88, 73, 88, 956, 94, 665, 7,\n 797, 3978, 1, 3922, 511, 344, 6, 10, 743, 36, 9289, 7117, 1446, 10, 7466, 9,\n 223, 2, 6, 528, 37, 33, 1616, 619, 494, 48, 9, 5106, 144, 12, 12, 2, 759, 813,\n 5156, 9779, 969, 3, 257, 3, 4910, 65, 1, 907, 4464, 15, 8685, 54, 48, 762, 7952,\n 639, 3, 4, 8239, 4, 21, 306, 667, 1, 2, 90, 42, 6, 1, 3337, 6, 803, 3912, 85,\n 31, 30, 502, 876, 8686, 813, 880, 5309, 20, 27, 2523, 266, 101, 8, 3058, 7,\n 56, 6961, 46, 199, 866, 4, 184, 4, 9675, 92));\n\n return listOfInts;\n }", "java.util.List<java.lang.Integer> getListSnIdList();", "@Repository\npublic interface ITagMapper extends IBaseMapper<Tag>{\n\n List<Tag> queryByIds(@Param(\"array\")Integer[] ids)throws Exception;\n\n}", "void mo9148a(int i, ArrayList<C0889x> arrayList);", "public static ArrayList<Integer> ArraytoArrayList(int [] arr){\n ArrayList<Integer> list = new ArrayList<>();\n return list;\n }", "void mo100444b(List<C40429b> list);", "java.util.List<java.lang.Integer> getOtherIdsList();", "@JsonSetter(\"didIds\")\r\n public void setDidIds (List<Integer> value) { \r\n this.didIds = value;\r\n }", "public native int[] __intArrayMethod( long __swiftObject, int[] arg );", "public void setListProperty(List<Integer> t) {\n\n\t\t}", "public List<Integer> convertBigIntegerList(List<BigInteger> alist){\n\t\tList<Integer> blist = new ArrayList<Integer>(alist.size());\n\t\tfor(int i=0; i < alist.size(); i++){\n\t\t\tif(alist.get(i)!=null)\n\t\t\t{\n\t\t\tblist.add( new Integer( alist.get(i).intValue() ) );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn blist;\n\t}", "public int[] getAsInts() {\n if (data instanceof int[]) {\n return (int[])data;\n } else if (data instanceof char[]){\n char[] cdata = (char[])data;\n int[] idata = new int[cdata.length];\n for (int i = 0; i < cdata.length; i++) {\n idata[i] = (int)(cdata[i] & 0xffff);\n }\n return idata;\n } else if (data instanceof short[]){\n short[] sdata = (short[])data;\n int[] idata = new int[sdata.length];\n for (int i = 0; i < sdata.length; i++) {\n idata[i] = (int)sdata[i];\n }\n return idata;\n } else {\n throw new ClassCastException(\n \"Data not char[], short[], or int[]!\");\n }\n }", "java.util.List<java.lang.Long> getIdsList();", "public int getSumofElements(ArrayList<Integer> input)\n\t\t\tthrows RemoteException;", "private void setIntArr(int[] intArr) {\r\n this.intArr = intArr;\r\n\r\n }", "public void bar(java.util.List<java.lang.Integer> foo) { return; }", "public static void main(String[] args) {\n\n Integer[] integers = new Integer[] {1,2,3,4,5};\n List<Integer>list = new ArrayList<>(Arrays.asList(integers)); // correct one\n System.out.println(\"Converted from Array to List = \" + list);\n\n // this will be a fixed-size list- you can not use add method.\n List<Integer>fixedSizeList = Arrays.asList(integers); // bunu da yapabiliriz ama element ekleme yapamayiz.\n //fixedSizeList.add(6); bunda hata verecek. cunku fixedsize olarak convert ettik. \"unsupported operation exception\" uyarisi verir\n\n\n //Converting list to Array\n Integer[] convertedFromList =list.toArray(new Integer[0]); // sifir yerine herhangi bi sey yazilabilir. ama 0 yazmada fayda var.\n System.out.println(\"Converted from List to Array = \"+ Arrays.toString(convertedFromList));\n\n //Converting an Array to set\n Set<Integer>set = new HashSet<>(Arrays.asList(integers));\n System.out.println(\"Converted from Array to Set = \" + set);\n\n // Converting Set to Array\n Integer[] convertedFromSet = set.toArray(new Integer[0]);\n System.out.println(\"Converted from Set to Array = \" + Arrays.toString(convertedFromSet));\n\n // converting List to Set\n Set<Integer>setFromList = new HashSet<>(list); // bu en cok , ayni value varsa isimize yarar. cunku set'de duplicate yok\n System.out.println(\"Converted list to Set = \" + setFromList);\n\n // Converting Set to List\n List<Integer>listFromSet = new ArrayList<>(setFromList);\n listFromSet.add(9); // en sona ekler\n System.out.println(\"Converted Set to List = \" + listFromSet);\n\n }", "int[] toArray();", "public ArrayListInt(int cantidadDeNumerosDelArray)\n {\n numerosEnteros = new int[cantidadDeNumerosDelArray];\n tamañoDelArray = cantidadDeNumerosDelArray;\n }", "public interface IntegerArray {\n\t\n\tInteger[] convertIntToIntegerArray(int[] array);\t\n\t\n\t/**\n\t * Concatenates array1 and array2\n\t * @param array1 Array of Integers\n\t * @param array2 Array of Integers\n\t * @return Integer[] New array of Integers containing the elements of array1 plus the elements of array2\n\t */\n\tInteger[] concatArrays(Integer[] array1, Integer[] array2);\n\t\n\t/**\n\t * Returns a new array with no null elements\n\t * @param array Array of Integers with null values\n\t * @return Integer[] New array of Integers with no null values. If the original array contains x\n\t * null values, the new array dimension is reference.length-x. If the original array does not contain\n\t * null values, the new array returned contains the same values as the original one.\n\t */\n\tInteger[] removeNullElements(Integer[] array);\n\n}", "public void setArr(int[] arr){ this.arr = arr; }", "public List<Integer> getIds(int conId, int type, int state) throws AppException;", "public List<Integer> toList (int[][] twoDarray) {\r\n\r\n List<Integer> list = new ArrayList<>();\r\n\r\n// for(Integer[] array : twoDarray) {\r\n// list.addAll(Arrays.asList(array));\r\n// }\r\n\r\n for (int i = 0; i < twoDarray.length; i++) {\r\n for (int j = 0; j < twoDarray.length; j++) {\r\n list.add(twoDarray[i][j]);\r\n }\r\n }\r\n return list;\r\n }", "@RequestMapping(value = \"api/increment/{param}\", method = RequestMethod.GET)\n public\n @ResponseBody\n JSONObject incrementList(@PathVariable Integer param) {\n\n return iteratorIncrementService.changeIterator(param);\n// return iteratorIncrementService.writeBack(increment);\n//\n// JSONObject increment = iteratorIncrementService.changeIterator(param);\n// return iteratorIncrementService.writeBack(increment);\n }", "java.util.List<java.lang.Integer> getStatusList();", "private ImmutableIntList(int... ints) {\n this.ints = ints;\n }", "@WebService(name = \"SafeImpl\", targetNamespace = \"http://webservices.safe.woolpert.com/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface SafeImpl {\n\n\n /**\n * \n * @return\n * returns java.util.List<com.woolpert.safe.webservices.Collection>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getCollections\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetCollections\")\n @ResponseWrapper(localName = \"getCollectionsResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetCollectionsResponse\")\n public List<Collection> getCollections();\n\n /**\n * \n * @param arg5\n * @param arg4\n * @param arg3\n * @param arg2\n * @param arg1\n * @param arg0\n * @param arg6\n * @param arg7\n * @param arg8\n * @param arg9\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"insertCollection\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertCollection\")\n @ResponseWrapper(localName = \"insertCollectionResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertCollectionResponse\")\n public ReturnStatus insertCollection(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n double arg2,\n @WebParam(name = \"arg3\", targetNamespace = \"\")\n double arg3,\n @WebParam(name = \"arg4\", targetNamespace = \"\")\n double arg4,\n @WebParam(name = \"arg5\", targetNamespace = \"\")\n double arg5,\n @WebParam(name = \"arg6\", targetNamespace = \"\")\n long arg6,\n @WebParam(name = \"arg7\", targetNamespace = \"\")\n long arg7,\n @WebParam(name = \"arg8\", targetNamespace = \"\")\n int arg8,\n @WebParam(name = \"arg9\", targetNamespace = \"\")\n int arg9);\n\n /**\n * \n * @param arg5\n * @param arg4\n * @param arg3\n * @param arg2\n * @param arg1\n * @param arg0\n * @param arg10\n * @param arg6\n * @param arg7\n * @param arg8\n * @param arg9\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"updateCollection\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdateCollection\")\n @ResponseWrapper(localName = \"updateCollectionResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdateCollectionResponse\")\n public ReturnStatus updateCollection(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n String arg2,\n @WebParam(name = \"arg3\", targetNamespace = \"\")\n double arg3,\n @WebParam(name = \"arg4\", targetNamespace = \"\")\n double arg4,\n @WebParam(name = \"arg5\", targetNamespace = \"\")\n double arg5,\n @WebParam(name = \"arg6\", targetNamespace = \"\")\n double arg6,\n @WebParam(name = \"arg7\", targetNamespace = \"\")\n long arg7,\n @WebParam(name = \"arg8\", targetNamespace = \"\")\n long arg8,\n @WebParam(name = \"arg9\", targetNamespace = \"\")\n int arg9,\n @WebParam(name = \"arg10\", targetNamespace = \"\")\n int arg10);\n\n /**\n * \n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"deleteCollections\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeleteCollections\")\n @ResponseWrapper(localName = \"deleteCollectionsResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeleteCollectionsResponse\")\n public ReturnStatus deleteCollections(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0);\n\n /**\n * \n * @return\n * returns java.util.List<com.woolpert.safe.webservices.Asset>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getAssets\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetAssets\")\n @ResponseWrapper(localName = \"getAssetsResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetAssetsResponse\")\n public List<Asset> getAssets();\n\n /**\n * \n * @param arg5\n * @param arg4\n * @param arg3\n * @param arg2\n * @param arg1\n * @param arg0\n * @param arg6\n * @param arg7\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"insertAsset\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertAsset\")\n @ResponseWrapper(localName = \"insertAssetResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertAssetResponse\")\n public ReturnStatus insertAsset(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n int arg2,\n @WebParam(name = \"arg3\", targetNamespace = \"\")\n double arg3,\n @WebParam(name = \"arg4\", targetNamespace = \"\")\n double arg4,\n @WebParam(name = \"arg5\", targetNamespace = \"\")\n double arg5,\n @WebParam(name = \"arg6\", targetNamespace = \"\")\n int arg6,\n @WebParam(name = \"arg7\", targetNamespace = \"\")\n long arg7);\n\n /**\n * \n * @param arg5\n * @param arg4\n * @param arg3\n * @param arg2\n * @param arg1\n * @param arg0\n * @param arg6\n * @param arg7\n * @param arg8\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"updateAsset\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdateAsset\")\n @ResponseWrapper(localName = \"updateAssetResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdateAssetResponse\")\n public ReturnStatus updateAsset(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n String arg2,\n @WebParam(name = \"arg3\", targetNamespace = \"\")\n int arg3,\n @WebParam(name = \"arg4\", targetNamespace = \"\")\n double arg4,\n @WebParam(name = \"arg5\", targetNamespace = \"\")\n double arg5,\n @WebParam(name = \"arg6\", targetNamespace = \"\")\n double arg6,\n @WebParam(name = \"arg7\", targetNamespace = \"\")\n int arg7,\n @WebParam(name = \"arg8\", targetNamespace = \"\")\n long arg8);\n\n /**\n * \n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"deleteAsset\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeleteAsset\")\n @ResponseWrapper(localName = \"deleteAssetResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeleteAssetResponse\")\n public ReturnStatus deleteAsset(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0);\n\n /**\n * \n * @return\n * returns java.util.List<com.woolpert.safe.webservices.Platform>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPlatforms\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetPlatforms\")\n @ResponseWrapper(localName = \"getPlatformsResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetPlatformsResponse\")\n public List<Platform> getPlatforms();\n\n /**\n * \n * @param arg3\n * @param arg2\n * @param arg1\n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"updatePlatform\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdatePlatform\")\n @ResponseWrapper(localName = \"updatePlatformResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdatePlatformResponse\")\n public ReturnStatus updatePlatform(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n String arg2,\n @WebParam(name = \"arg3\", targetNamespace = \"\")\n Boolean arg3);\n\n /**\n * \n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"deletePlatform\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeletePlatform\")\n @ResponseWrapper(localName = \"deletePlatformResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeletePlatformResponse\")\n public ReturnStatus deletePlatform(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0);\n\n /**\n * \n * @param arg2\n * @param arg1\n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"insertPlatform\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertPlatform\")\n @ResponseWrapper(localName = \"insertPlatformResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertPlatformResponse\")\n public ReturnStatus insertPlatform(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n Boolean arg2);\n\n /**\n * \n * @return\n * returns java.util.List<com.woolpert.safe.webservices.Poc>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPOCs\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetPOCs\")\n @ResponseWrapper(localName = \"getPOCsResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetPOCsResponse\")\n public List<Poc> getPOCs();\n\n /**\n * \n * @param arg5\n * @param arg4\n * @param arg3\n * @param arg2\n * @param arg1\n * @param arg0\n * @param arg6\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"insertPOC\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertPOC\")\n @ResponseWrapper(localName = \"insertPOCResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertPOCResponse\")\n public ReturnStatus insertPOC(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n int arg2,\n @WebParam(name = \"arg3\", targetNamespace = \"\")\n String arg3,\n @WebParam(name = \"arg4\", targetNamespace = \"\")\n String arg4,\n @WebParam(name = \"arg5\", targetNamespace = \"\")\n String arg5,\n @WebParam(name = \"arg6\", targetNamespace = \"\")\n String arg6);\n\n /**\n * \n * @param arg5\n * @param arg4\n * @param arg3\n * @param arg2\n * @param arg1\n * @param arg0\n * @param arg6\n * @param arg7\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"updatePOC\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdatePOC\")\n @ResponseWrapper(localName = \"updatePOCResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdatePOCResponse\")\n public ReturnStatus updatePOC(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n String arg2,\n @WebParam(name = \"arg3\", targetNamespace = \"\")\n int arg3,\n @WebParam(name = \"arg4\", targetNamespace = \"\")\n String arg4,\n @WebParam(name = \"arg5\", targetNamespace = \"\")\n String arg5,\n @WebParam(name = \"arg6\", targetNamespace = \"\")\n String arg6,\n @WebParam(name = \"arg7\", targetNamespace = \"\")\n String arg7);\n\n /**\n * \n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"deletePOC\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeletePOC\")\n @ResponseWrapper(localName = \"deletePOCResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeletePOCResponse\")\n public ReturnStatus deletePOC(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0);\n\n /**\n * \n * @return\n * returns java.util.List<com.woolpert.safe.webservices.Organization>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getOrganizations\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetOrganizations\")\n @ResponseWrapper(localName = \"getOrganizationsResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetOrganizationsResponse\")\n public List<Organization> getOrganizations();\n\n /**\n * \n * @param arg2\n * @param arg1\n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"insertOrganization\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertOrganization\")\n @ResponseWrapper(localName = \"insertOrganizationResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertOrganizationResponse\")\n public ReturnStatus insertOrganization(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n String arg2);\n\n /**\n * \n * @param arg3\n * @param arg2\n * @param arg1\n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"updateOrganization\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdateOrganization\")\n @ResponseWrapper(localName = \"updateOrganizationResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdateOrganizationResponse\")\n public ReturnStatus updateOrganization(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n String arg2,\n @WebParam(name = \"arg3\", targetNamespace = \"\")\n String arg3);\n\n /**\n * \n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"deleteOrganization\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeleteOrganization\")\n @ResponseWrapper(localName = \"deleteOrganizationResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeleteOrganizationResponse\")\n public ReturnStatus deleteOrganization(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0);\n\n /**\n * \n * @return\n * returns java.util.List<com.woolpert.safe.webservices.SensorMFR>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getSensorMFRs\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetSensorMFRs\")\n @ResponseWrapper(localName = \"getSensorMFRsResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetSensorMFRsResponse\")\n public List<SensorMFR> getSensorMFRs();\n\n /**\n * \n * @param arg1\n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"insertSensorMFR\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertSensorMFR\")\n @ResponseWrapper(localName = \"insertSensorMFRResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertSensorMFRResponse\")\n public ReturnStatus insertSensorMFR(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1);\n\n /**\n * \n * @param arg2\n * @param arg1\n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"updateSensorMFR\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdateSensorMFR\")\n @ResponseWrapper(localName = \"updateSensorMFRResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdateSensorMFRResponse\")\n public ReturnStatus updateSensorMFR(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n String arg2);\n\n /**\n * \n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"deleteSensorMFR\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeleteSensorMFR\")\n @ResponseWrapper(localName = \"deleteSensorMFRResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeleteSensorMFRResponse\")\n public ReturnStatus deleteSensorMFR(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0);\n\n /**\n * \n * @return\n * returns java.util.List<com.woolpert.safe.webservices.Sensor>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getSensors\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetSensors\")\n @ResponseWrapper(localName = \"getSensorsResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetSensorsResponse\")\n public List<Sensor> getSensors();\n\n /**\n * \n * @param arg5\n * @param arg4\n * @param arg3\n * @param arg2\n * @param arg1\n * @param arg0\n * @param arg6\n * @param arg7\n * @param arg8\n * @param arg9\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"insertSensor\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertSensor\")\n @ResponseWrapper(localName = \"insertSensorResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertSensorResponse\")\n public ReturnStatus insertSensor(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n String arg2,\n @WebParam(name = \"arg3\", targetNamespace = \"\")\n int arg3,\n @WebParam(name = \"arg4\", targetNamespace = \"\")\n int arg4,\n @WebParam(name = \"arg5\", targetNamespace = \"\")\n double arg5,\n @WebParam(name = \"arg6\", targetNamespace = \"\")\n double arg6,\n @WebParam(name = \"arg7\", targetNamespace = \"\")\n double arg7,\n @WebParam(name = \"arg8\", targetNamespace = \"\")\n int arg8,\n @WebParam(name = \"arg9\", targetNamespace = \"\")\n long arg9);\n\n /**\n * \n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"deleteSensor\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeleteSensor\")\n @ResponseWrapper(localName = \"deleteSensorResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeleteSensorResponse\")\n public ReturnStatus deleteSensor(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0);\n\n /**\n * \n * @param arg5\n * @param arg4\n * @param arg3\n * @param arg2\n * @param arg1\n * @param arg0\n * @param arg10\n * @param arg6\n * @param arg7\n * @param arg8\n * @param arg9\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"updateSensor\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdateSensor\")\n @ResponseWrapper(localName = \"updateSensorResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdateSensorResponse\")\n public ReturnStatus updateSensor(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n int arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n String arg2,\n @WebParam(name = \"arg3\", targetNamespace = \"\")\n String arg3,\n @WebParam(name = \"arg4\", targetNamespace = \"\")\n int arg4,\n @WebParam(name = \"arg5\", targetNamespace = \"\")\n int arg5,\n @WebParam(name = \"arg6\", targetNamespace = \"\")\n double arg6,\n @WebParam(name = \"arg7\", targetNamespace = \"\")\n double arg7,\n @WebParam(name = \"arg8\", targetNamespace = \"\")\n double arg8,\n @WebParam(name = \"arg9\", targetNamespace = \"\")\n int arg9,\n @WebParam(name = \"arg10\", targetNamespace = \"\")\n long arg10);\n\n /**\n * \n * @return\n * returns java.util.List<com.woolpert.safe.webservices.Spectrum>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getSpectrums\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetSpectrums\")\n @ResponseWrapper(localName = \"getSpectrumsResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetSpectrumsResponse\")\n public List<Spectrum> getSpectrums();\n\n /**\n * \n * @param arg1\n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"insertSpectrum\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertSpectrum\")\n @ResponseWrapper(localName = \"insertSpectrumResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertSpectrumResponse\")\n public ReturnStatus insertSpectrum(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1);\n\n /**\n * \n * @param arg2\n * @param arg1\n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"updateSpectrum\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdateSpectrum\")\n @ResponseWrapper(localName = \"updateSpectrumResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdateSpectrumResponse\")\n public ReturnStatus updateSpectrum(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n String arg2);\n\n /**\n * \n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"deleteSpectrum\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeleteSpectrum\")\n @ResponseWrapper(localName = \"deleteSpectrumResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeleteSpectrumResponse\")\n public ReturnStatus deleteSpectrum(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0);\n\n /**\n * \n * @return\n * returns java.util.List<com.woolpert.safe.webservices.SensorMetadata>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getAllSensorMetadata\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetAllSensorMetadata\")\n @ResponseWrapper(localName = \"getAllSensorMetadataResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetAllSensorMetadataResponse\")\n public List<SensorMetadata> getAllSensorMetadata();\n\n /**\n * \n * @param arg1\n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"insertSensorMetadata\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertSensorMetadata\")\n @ResponseWrapper(localName = \"insertSensorMetadataResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.InsertSensorMetadataResponse\")\n public ReturnStatus insertSensorMetadata(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1);\n\n /**\n * \n * @param arg2\n * @param arg1\n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"updateSensorMetadata\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdateSensorMetadata\")\n @ResponseWrapper(localName = \"updateSensorMetadataResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.UpdateSensorMetadataResponse\")\n public ReturnStatus updateSensorMetadata(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n String arg2);\n\n /**\n * \n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"deleteSensorMetadata\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeleteSensorMetadata\")\n @ResponseWrapper(localName = \"deleteSensorMetadataResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.DeleteSensorMetadataResponse\")\n public ReturnStatus deleteSensorMetadata(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0);\n\n /**\n * \n * @param arg1\n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"addSensorToAsset\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.AddSensorToAsset\")\n @ResponseWrapper(localName = \"addSensorToAssetResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.AddSensorToAssetResponse\")\n public ReturnStatus addSensorToAsset(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n int arg1);\n\n /**\n * \n * @param arg0\n * @return\n * returns java.util.List<com.woolpert.safe.webservices.Sensor>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getSensorsForAsset\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetSensorsForAsset\")\n @ResponseWrapper(localName = \"getSensorsForAssetResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetSensorsForAssetResponse\")\n public List<Sensor> getSensorsForAsset(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0);\n\n /**\n * \n * @param arg1\n * @param arg0\n * @return\n * returns com.woolpert.safe.webservices.ReturnStatus\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"addAssetToSensor\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.AddAssetToSensor\")\n @ResponseWrapper(localName = \"addAssetToSensorResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.AddAssetToSensorResponse\")\n public ReturnStatus addAssetToSensor(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n int arg1);\n\n /**\n * \n * @param arg0\n * @return\n * returns java.util.List<com.woolpert.safe.webservices.Asset>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getAssetsForSensor\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetAssetsForSensor\")\n @ResponseWrapper(localName = \"getAssetsForSensorResponse\", targetNamespace = \"http://webservices.safe.woolpert.com/\", className = \"com.woolpert.safe.webservices.GetAssetsForSensorResponse\")\n public List<Asset> getAssetsForSensor(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0);\n\n}", "@NonNull\n static IntConsList<Integer> intList(@NonNull int... elements) {\n IntConsList<Integer> cons = nil();\n for (int i = elements.length - 1; i >= 0; i--) {\n cons = new IntConsListImpl(elements[i], cons);\n }\n return cons;\n }", "public int[] numbers();", "public static void convert (int arr[])\r\n\t{\n\t\tArrayList l = new ArrayList ();\r\n\t\t//loop and add element \r\n\t\tfor (int i = 0 ;i<arr.length ; i++) \r\n\t\t{\r\n\t\t\t// index element\r\n\t\t\t// | |\r\n\t\t\tl.add( i , arr[i] );\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// ouput l element \r\n\t\tSystem.out.println(l);\r\n\t}", "void mo12207a(int[] iArr);", "public E decode(ArrayList<Integer> individual);", "public IntegerList(int size)\n {\n list = new int[size];\n }", "public IntArrayProcessor(int[] array)\n {\n integers = array;\n }", "public static <U> int[] mapToInt(U[] list, Mapper<? super U> mapper) {\n int[] mappedValues = new int[list.length];\n\n for (int i = 0; i < list.length; i++) {\n // Map the object to an int\n mappedValues[i] = mapper.map(list[i]);\n }\n\n return mappedValues;\n }", "int[] retrieveAllData();", "public IntArraySpliterator(int[] param1ArrayOfint, int param1Int1, int param1Int2, int param1Int3) {\n/* 1011 */ this.array = param1ArrayOfint;\n/* 1012 */ this.index = param1Int1;\n/* 1013 */ this.fence = param1Int2;\n/* 1014 */ this.characteristics = param1Int3 | 0x40 | 0x4000;\n/* */ }", "@SuppressWarnings( \"rawtypes\" )\n private XmlElement toXmlArray(List list)\n {\n XmlElement array = new XmlElement(\"array\");\n for (Object o : list)\n {\n array.add(objectToXml(o));\n }\n return array;\n }", "public static int[] readIntegerVector(DataInputStream input) throws IOException {\n int length = input.readInt();\n\n int[] ret = new int[length];\n\n for (int i = 0; i < length; i++) {\n int value = input.readInt();\n ret[i] = value;\n }\n\n return ret;\n }", "@Override\n\tpublic Integer[] getData() {\n\t\treturn data;\n\t}", "public List<Integer> flatten(List<NestedInteger> nestedList) {\n\t\tList<Integer> list = new ArrayList<>();\r\n\t\tfor(NestedInteger i : nestedList){\r\n\t\t\tif(i.isInteger()){\r\n\t\t\t\tlist.add(i.getInteger());\r\n\t\t\t}else{\r\n\t\t\t\tlist.addAll(flatten(i.getList()));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list;\r\n }", "public static void main(String[] args) {\n List<Integer> sourceList = Arrays.asList(0, 1, 2, 3, 4, 5);\n Integer[] targetArray = sourceList.toArray(new Integer[sourceList.size()]);\n Arrays.stream(targetArray).forEach(System.out::println);\n\n // convert array to list\n Integer[] sourceArray = { 0, 1, 2, 3, 4, 5 };\n List<Integer> targetList = Arrays.asList(sourceArray);\n targetList.stream().forEach(System.out::println);\n\n }", "public byte[] process(int[] data) throws Exception {\r\n\t\t\treturn this.process(toBytes(data));\r\n\t\t}", "public interface BatchStatusDataService {\n List<BatchStatusDataResParam> getBatchStatusData(List<BatchStatusDataParam> param,Integer type);\n}", "java.util.List<java.lang.Integer> getItemList();", "public static List<Integer> getIntegerList(){\n List<Integer> nums = new ArrayList<>();//ArrayList<Integer> list = new ArrayList<>();\n for(int i=0;i<=1_000_000;i++) {\n nums.add(i);\n }\n return nums;\n }", "public int[] getIntArray(String property, int[] defaultValue)\n\tthrows PropertiesPlusException\n\t{\n\t\tString value = getProperty(property);\n\t\tif (value == null)\n\t\t{\n\t\t\tif (defaultValue == null)\n\t\t\t{\n\t\t\t\taddRequestedProperty(property, \"null\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\taddRequestedProperty(property, Arrays.toString(defaultValue));\n\t\t\treturn defaultValue;\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\tScanner in = new Scanner(value.trim().replaceAll(\",\", \" \"));\n\t\t\tArrayListInt ints = new ArrayListInt();\n\t\t\twhile (in.hasNext())\n\t\t\t\tints.add(in.nextInt());\n\t\t\tin.close();\n\n\t\t\treturn ints.toArray();\n\t\t}\n\t\tcatch (NumberFormatException ex)\n\t\t{\n\t\t\tthrow new PropertiesPlusException(String.format(\n\t\t\t\t\t\"%s = %s cannot be converted to type int[]\", property, value));\n\t\t}\n\t}", "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}", "ArrayProxyValue createArrayProxyValue();", "public ArrayListOfIntsWritable(int[] arr)\n {\n super(arr);\n }", "public java.util.List<java.lang.Integer>\n getDataList() {\n return data_;\n }", "public void SetVector(int[] v){ this.vector=v;}", "@Test\n public void testToArray_GenericType() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Integer[] result = instance.toArray(new Integer[] {});\n assertArrayEquals(expResult, result);\n }", "public List<Integer> getIntegerList(final String key, final List<Integer> defaultValue) {\n return getList(Integer.class, key, defaultValue);\n }", "@Test\r\n public void testPrimitiveArray()\r\n {\r\n test(int[].class);\r\n }", "private void testIntArray() {\n\t\tMessage message = Message.createMessage(getId(), \"Triggers\");\n\n\t\tint array[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };\n\t\tmessage.setPayload(array);\n\t\tsend(message);\n\t}", "@WebService(name = \"NumberGeneratorServiceSoap\", targetNamespace = \"NS_NumGen\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface NumberGeneratorServiceSoap {\n\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/primeRange\")\n @WebResult(name = \"primeRangeResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"primeRange\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PrimeRange\")\n @ResponseWrapper(localName = \"primeRangeResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PrimeRangeResponse\")\n public String primeRange(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/compositeRange\")\n @WebResult(name = \"compositeRangeResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"compositeRange\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.CompositeRange\")\n @ResponseWrapper(localName = \"compositeRangeResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.CompositeRangeResponse\")\n public String compositeRange(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/perfectSquaresRange\")\n @WebResult(name = \"perfectSquaresRangeResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"perfectSquaresRange\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PerfectSquaresRange\")\n @ResponseWrapper(localName = \"perfectSquaresRangeResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PerfectSquaresRangeResponse\")\n public String perfectSquaresRange(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/fibonacciRange\")\n @WebResult(name = \"fibonacciRangeResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"fibonacciRange\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.FibonacciRange\")\n @ResponseWrapper(localName = \"fibonacciRangeResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.FibonacciRangeResponse\")\n public String fibonacciRange(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n /**\n * \n * @param high\n * @param low\n * @param n\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/randomNumbers\")\n @WebResult(name = \"randomNumbersResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"randomNumbers\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.RandomNumbers\")\n @ResponseWrapper(localName = \"randomNumbersResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.RandomNumbersResponse\")\n public String randomNumbers(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high,\n @WebParam(name = \"n\", targetNamespace = \"NS_NumGen\")\n int n);\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/powersofTwo\")\n @WebResult(name = \"powersofTwoResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"powersofTwo\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PowersofTwo\")\n @ResponseWrapper(localName = \"powersofTwoResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PowersofTwoResponse\")\n public String powersofTwo(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/evenRange\")\n @WebResult(name = \"evenRangeResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"evenRange\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.EvenRange\")\n @ResponseWrapper(localName = \"evenRangeResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.EvenRangeResponse\")\n public String evenRange(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/oddRange\")\n @WebResult(name = \"oddRangeResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"oddRange\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.OddRange\")\n @ResponseWrapper(localName = \"oddRangeResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.OddRangeResponse\")\n public String oddRange(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/palindromeRange\")\n @WebResult(name = \"palindromeRangeResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"palindromeRange\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PalindromeRange\")\n @ResponseWrapper(localName = \"palindromeRangeResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PalindromeRangeResponse\")\n public String palindromeRange(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n}", "public List<Integer> getIntegerList(final String key) {\n return getIntegerList(key, new ArrayList<>());\n }", "public static int[] getPositionalIntegers(List<Integer> IntegersList)\n\t{\n\t int[] returnintarray = new int[IntegersList.size()];\n\t for (int i=0; i < returnintarray.length; i++)\n\t {\n\t \treturnintarray[i] = i;\n\t }\n\t return returnintarray;\n\t}", "void setArrayGeneric(int paramInt)\n/* */ {\n/* 1062 */ this.length = paramInt;\n/* 1063 */ this.datums = new Datum[paramInt];\n/* 1064 */ this.pickled = null;\n/* 1065 */ this.pickledCorrect = false;\n/* */ }", "public IntegerList(int size)\n {\n list = new int[size];\n }", "public static Spliterator.OfInt spliterator(int[] paramArrayOfint, int paramInt1, int paramInt2, int paramInt3) {\n/* 239 */ checkFromToBounds(((int[])Objects.requireNonNull((T)paramArrayOfint)).length, paramInt1, paramInt2);\n/* 240 */ return new IntArraySpliterator(paramArrayOfint, paramInt1, paramInt2, paramInt3);\n/* */ }", "public java.util.List<java.lang.Integer>\n getDataList() {\n return java.util.Collections.unmodifiableList(data_);\n }", "public IntArrayList(int expectedElements) {\n this(expectedElements, new BoundedProportionalArraySizingStrategy());\n }", "public int[] getIntArray() {\r\n\t\t\r\n\t\treturn (value.getIntArray());\r\n\t}", "@RequestMapping(value = \"/GET_MUNICIPIO\", method = RequestMethod.POST)\n\tpublic @ResponseBody ArrayList GET_MUNICIPIO(@RequestParam String OID_ESTADO) {\n\t\t\n\t\treturn dependencia.GET_MUNICIPIO(OID_ESTADO);\n\t}", "@WebService(targetNamespace = \"http://publicar.uytubeLogica/\", name = \"WebServices\")\r\n@XmlSeeAlso({ObjectFactory.class, net.java.dev.jaxb.array.ObjectFactory.class})\r\n@SOAPBinding(style = SOAPBinding.Style.RPC)\r\npublic interface WebServices {\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/cambiarPrivLDRRequest\", output = \"http://publicar.uytubeLogica/WebServices/cambiarPrivLDRResponse\")\r\n public void cambiarPrivLDR(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n Privacidad arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/operacionPruebaRequest\", output = \"http://publicar.uytubeLogica/WebServices/operacionPruebaResponse\")\r\n public void operacionPrueba();\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarLDRPublicasPorNombreRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarLDRPublicasPorNombreResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtListaReproduccionArray listarLDRPublicasPorNombre(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarLDRPorCategoriaRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarLDRPorCategoriaResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtListaReproduccionArray listarLDRPorCategoria(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n Privacidad arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n java.lang.String arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/verificarDispUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/verificarDispUsuarioResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public boolean verificarDispUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarUsuariosQueSigueRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarUsuariosQueSigueResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public net.java.dev.jaxb.array.StringArray listarUsuariosQueSigue(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarCanalesPublicosPorNombreRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarCanalesPublicosPorNombreResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtCanalArray listarCanalesPublicosPorNombre(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarDatosUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarDatosUsuarioResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtUsuario listarDatosUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/seguirUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/seguirUsuarioResponse\")\r\n public void seguirUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/valorarVideoRequest\", output = \"http://publicar.uytubeLogica/WebServices/valorarVideoResponse\")\r\n public void valorarVideo(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n boolean arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/infoLDRdeUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/infoLDRdeUsuarioResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtListaReproduccionArray infoLDRdeUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n Privacidad arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/mostrarInfoCanalRequest\", output = \"http://publicar.uytubeLogica/WebServices/mostrarInfoCanalResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtCanal mostrarInfoCanal(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/agregarVideoListaRequest\", output = \"http://publicar.uytubeLogica/WebServices/agregarVideoListaResponse\")\r\n public void agregarVideoLista(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n int arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n java.lang.String arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/verDetallesVideoExtRequest\", output = \"http://publicar.uytubeLogica/WebServices/verDetallesVideoExtResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtInfoVideo verDetallesVideoExt(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/responderComentarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/responderComentarioResponse\")\r\n public void responderComentario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n int arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n java.lang.String arg2,\r\n @WebParam(partName = \"arg3\", name = \"arg3\")\r\n DtFecha arg3,\r\n @WebParam(partName = \"arg4\", name = \"arg4\")\r\n java.lang.String arg4\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/memberVideoRequest\", output = \"http://publicar.uytubeLogica/WebServices/memberVideoResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public boolean memberVideo(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0\r\n );\r\n\r\n\t@WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/agregarVisitaRequest\", output = \"http://publicar.uytubeLogica/WebServices/agregarVisitaResponse\")\r\n public void agregarVisita(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n\t@WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarVideosPorCategoriaRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarVideosPorCategoriaResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtVideoArray listarVideosPorCategoria(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n Privacidad arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n java.lang.String arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/nuevoUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/nuevoUsuarioResponse\")\r\n public void nuevoUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n java.lang.String arg2,\r\n @WebParam(partName = \"arg3\", name = \"arg3\")\r\n java.lang.String arg3,\r\n @WebParam(partName = \"arg4\", name = \"arg4\")\r\n java.lang.String arg4,\r\n @WebParam(partName = \"arg5\", name = \"arg5\")\r\n DtFecha arg5,\r\n @WebParam(partName = \"arg6\", name = \"arg6\")\r\n byte[] arg6,\r\n @WebParam(partName = \"arg7\", name = \"arg7\")\r\n java.lang.String arg7,\r\n @WebParam(partName = \"arg8\", name = \"arg8\")\r\n java.lang.String arg8,\r\n @WebParam(partName = \"arg9\", name = \"arg9\")\r\n Privacidad arg9,\r\n @WebParam(partName = \"arg10\", name = \"arg10\")\r\n java.lang.String arg10\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/verificarLoginRequest\", output = \"http://publicar.uytubeLogica/WebServices/verificarLoginResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public boolean verificarLogin(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/nuevaListaParticularRequest\", output = \"http://publicar.uytubeLogica/WebServices/nuevaListaParticularResponse\")\r\n public void nuevaListaParticular(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n Privacidad arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/nuevoComentarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/nuevoComentarioResponse\")\r\n public void nuevoComentario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n DtFecha arg2,\r\n @WebParam(partName = \"arg3\", name = \"arg3\")\r\n java.lang.String arg3\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/eliminarVideoListaRequest\", output = \"http://publicar.uytubeLogica/WebServices/eliminarVideoListaResponse\")\r\n public void eliminarVideoLista(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n int arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n java.lang.String arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarVideoListaReproduccionRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarVideoListaReproduccionResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtVideoArray listarVideoListaReproduccion(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/getEstadoValoracionRequest\", output = \"http://publicar.uytubeLogica/WebServices/getEstadoValoracionResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public java.lang.String getEstadoValoracion(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarCategoriasRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarCategoriasResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtCategoriaArray listarCategorias();\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarVideoHistorialRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarVideoHistorialResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtVideoHistorialArray listarVideoHistorial(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n\t@WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/memberListaReproduccionPropiaRequest\", output = \"http://publicar.uytubeLogica/WebServices/memberListaReproduccionPropiaResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public boolean memberListaReproduccionPropia(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarComentariosRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarComentariosResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtComentarioArray listarComentarios(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/obtenerDtsVideosListaReproduccionUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/obtenerDtsVideosListaReproduccionUsuarioResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtVideoArray obtenerDtsVideosListaReproduccionUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/infoListaReproduccionRequest\", output = \"http://publicar.uytubeLogica/WebServices/infoListaReproduccionResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtListaReproduccion infoListaReproduccion(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/aniadirVideoRequest\", output = \"http://publicar.uytubeLogica/WebServices/aniadirVideoResponse\")\r\n public void aniadirVideo(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n java.lang.String arg2,\r\n @WebParam(partName = \"arg3\", name = \"arg3\")\r\n int arg3,\r\n @WebParam(partName = \"arg4\", name = \"arg4\")\r\n DtFecha arg4,\r\n @WebParam(partName = \"arg5\", name = \"arg5\")\r\n java.lang.String arg5,\r\n @WebParam(partName = \"arg6\", name = \"arg6\")\r\n DtCategoria arg6,\r\n @WebParam(partName = \"arg7\", name = \"arg7\")\r\n Privacidad arg7\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarUsuariosQueLeSigueRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarUsuariosQueLeSigueResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public net.java.dev.jaxb.array.StringArray listarUsuariosQueLeSigue(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/infoVideosCanalRequest\", output = \"http://publicar.uytubeLogica/WebServices/infoVideosCanalResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtVideoArray infoVideosCanal(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n Privacidad arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarLDRdeUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarLDRdeUsuarioResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public net.java.dev.jaxb.array.StringArray listarLDRdeUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/bajaUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/bajaUsuarioResponse\")\r\n public void bajaUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n\t@WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/infoAddVideoRequest\", output = \"http://publicar.uytubeLogica/WebServices/infoAddVideoResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtVideo infoAddVideo(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/cargarDatosRequest\", output = \"http://publicar.uytubeLogica/WebServices/cargarDatosResponse\")\r\n public void cargarDatos();\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarVideosPublicosPorNombreRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarVideosPublicosPorNombreResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtVideoArray listarVideosPublicosPorNombre(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/dejarUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/dejarUsuarioResponse\")\r\n public void dejarUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n}", "public static ListUtilities arrayToList(int[] array){\n\t\tListUtilities startNode = new ListUtilities();\n\t\tif (array.length != 0){\n\t\t\tstartNode.setInt(array[0]);\n\t\t\tfor (int i = 1; i < array.length; i++){\n\t\t\t\tstartNode.addNum(array[i]);\n\t\t\t}\n\t\t}\n\t\treturn startNode;\n\t}", "public int[] toIntArray()\r\n {\r\n int[] a = new int[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = (Integer) vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }", "@Test\n @IncludeIn(POSTGRESQL)\n public void array() {\n Expression<Integer[]> expr = Expressions.template(Integer[].class, \"'{1,2,3}'::int[]\");\n Integer[] result = firstResult(expr);\n Assert.assertEquals(3, result.length);\n Assert.assertEquals(1, result[0].intValue());\n Assert.assertEquals(2, result[1].intValue());\n Assert.assertEquals(3, result[2].intValue());\n }" ]
[ "0.6539186", "0.6528186", "0.6238791", "0.6234999", "0.62142897", "0.62047565", "0.6172654", "0.6013912", "0.5984843", "0.59411585", "0.59035116", "0.589507", "0.58651584", "0.5831745", "0.58194244", "0.58183885", "0.5815728", "0.57971436", "0.5789212", "0.577066", "0.57632744", "0.5729175", "0.56241536", "0.5621425", "0.561209", "0.560958", "0.5585759", "0.5558235", "0.553199", "0.55306244", "0.5491499", "0.5469952", "0.5448663", "0.5407276", "0.5406393", "0.5405997", "0.5398809", "0.5395672", "0.537763", "0.5364237", "0.5362731", "0.5355019", "0.53345126", "0.53279984", "0.5325845", "0.53144747", "0.53077", "0.5294996", "0.5293532", "0.52913076", "0.5286247", "0.5282256", "0.52809", "0.5276114", "0.5249849", "0.5243866", "0.5228242", "0.5204627", "0.52018577", "0.5201115", "0.5201106", "0.5192628", "0.5188798", "0.51867896", "0.51808465", "0.51735896", "0.5169028", "0.5156889", "0.51563925", "0.5152376", "0.5147666", "0.51457405", "0.51258576", "0.512458", "0.5122289", "0.51063806", "0.5104005", "0.5102727", "0.5100731", "0.50940305", "0.50897956", "0.5089458", "0.50884306", "0.5083189", "0.50831544", "0.5072623", "0.5072459", "0.5069763", "0.50690126", "0.50608253", "0.50536865", "0.5037321", "0.503632", "0.50240946", "0.50240695", "0.5015167", "0.5012068", "0.5009639", "0.500416", "0.49963668" ]
0.5772209
19
// End of the developed code to test the Insulin Dose Calculator Web Service //
public static void main(String[] argv) { //Fazer isto depois para múltiplos web services InsulinDoseCalculator service = null; try { //service = new InsulinDoseCalculatorService(new URL("http://liis-lab.dei.uc.pt:8080/Server?wsdl")).getInsulinDoseCalculatorPort(); //service = new InsulinDoseCalculatorService(new URL("http://qcs12.dei.uc.pt:8080/insulin?wsdl")).getInsulinDoseCalculatorPort(); //service = new InsulinDoseCalculatorService(new URL("http://qcs18.dei.uc.pt:8080/insulin?wsdl")).getInsulinDoseCalculatorPort();14 service = new InsulinDoseCalculatorService(new URL("http://localhost:9000/InsulinDoseCalculator?wsdl")).getInsulinDoseCalculatorPort(); //service = new InsulinDoseCalculatorService(new URL("http://vm-sgd17.dei.uc.pt:80/InsulinDoseCalculator?wsdl")).getInsulinDoseCalculatorPort(); } catch (MalformedURLException e) { e.printStackTrace(); } //InsulinDoseCalculator service = new InsulinDoseCalculatorService().getInsulinDoseCalculatorPort(); menu(service); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void testMain(){\n\t\ttry {\n\t\t\t/**\n\t\t\t * 调用接口获得返回字符串\n\t\t\t */\n\t\t\t// 创建调用对象\n\t\t \n\t\t\tURL url = new URL(\"http://10.1.13.146:30014/service/fundquery.ws?wsdl\"); \n\t\t\tQName qName = new QName(\"http://service.hundsun.com\", \"FundQueryService\");\n\t\t\tService service = Service.create(url, qName); \n\t\t\t\n\t\t\tFundQueryServicePortType fundQueryServicePortType = service.getPort(FundQueryServicePortType.class); \n\t\t\tQueryPayResponse r= fundQueryServicePortType.queryPay(getQueryPay());\n System.out.println(r.getTotalAmount());\n \n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@WebService(name = \"Calculator\", targetNamespace = \"http://unique.com/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface Calculator {\n\n\n /**\n * \n * @param num1\n * @param num2\n * @return\n * returns int\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getNumber\", targetNamespace = \"http://unique.com/\", className = \"com.unique.GetNumber\")\n @ResponseWrapper(localName = \"getNumberResponse\", targetNamespace = \"http://unique.com/\", className = \"com.unique.GetNumberResponse\")\n @Action(input = \"http://unique.com/Calculator/getNumberRequest\", output = \"http://unique.com/Calculator/getNumberResponse\")\n public int getNumber(\n @WebParam(name = \"num1\", targetNamespace = \"\")\n int num1,\n @WebParam(name = \"num2\", targetNamespace = \"\")\n int num2);\n\n /**\n * \n * @param num1\n * @param num2\n * @return\n * returns float\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getSubtraction\", targetNamespace = \"http://unique.com/\", className = \"com.unique.GetSubtraction\")\n @ResponseWrapper(localName = \"getSubtractionResponse\", targetNamespace = \"http://unique.com/\", className = \"com.unique.GetSubtractionResponse\")\n @Action(input = \"http://unique.com/Calculator/getSubtractionRequest\", output = \"http://unique.com/Calculator/getSubtractionResponse\")\n public float getSubtraction(\n @WebParam(name = \"num1\", targetNamespace = \"\")\n float num1,\n @WebParam(name = \"num2\", targetNamespace = \"\")\n float num2);\n\n /**\n * \n * @param num1\n * @param num2\n * @return\n * returns float\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getDivision\", targetNamespace = \"http://unique.com/\", className = \"com.unique.GetDivision\")\n @ResponseWrapper(localName = \"getDivisionResponse\", targetNamespace = \"http://unique.com/\", className = \"com.unique.GetDivisionResponse\")\n @Action(input = \"http://unique.com/Calculator/getDivisionRequest\", output = \"http://unique.com/Calculator/getDivisionResponse\")\n public float getDivision(\n @WebParam(name = \"num1\", targetNamespace = \"\")\n float num1,\n @WebParam(name = \"num2\", targetNamespace = \"\")\n float num2);\n\n /**\n * \n * @param num1\n * @param num2\n * @return\n * returns float\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getMultiplication\", targetNamespace = \"http://unique.com/\", className = \"com.unique.GetMultiplication\")\n @ResponseWrapper(localName = \"getMultiplicationResponse\", targetNamespace = \"http://unique.com/\", className = \"com.unique.GetMultiplicationResponse\")\n @Action(input = \"http://unique.com/Calculator/getMultiplicationRequest\", output = \"http://unique.com/Calculator/getMultiplicationResponse\")\n public float getMultiplication(\n @WebParam(name = \"num1\", targetNamespace = \"\")\n float num1,\n @WebParam(name = \"num2\", targetNamespace = \"\")\n float num2);\n\n}", "@WebService(name = \"CalculatorService\", targetNamespace = \"http://com/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface CalculatorService {\n\n\n /**\n * \n * @param number1\n * @param number2\n * @return\n * returns int\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"multiply\", targetNamespace = \"http://com/\", className = \"app.Multiply\")\n @ResponseWrapper(localName = \"multiplyResponse\", targetNamespace = \"http://com/\", className = \"app.MultiplyResponse\")\n @Action(input = \"http://com/CalculatorService/multiplyRequest\", output = \"http://com/CalculatorService/multiplyResponse\")\n public int multiply(\n @WebParam(name = \"number1\", targetNamespace = \"\")\n int number1,\n @WebParam(name = \"number2\", targetNamespace = \"\")\n int number2);\n\n /**\n * \n * @param number1\n * @param number2\n * @return\n * returns int\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"sum\", targetNamespace = \"http://com/\", className = \"app.Sum\")\n @ResponseWrapper(localName = \"sumResponse\", targetNamespace = \"http://com/\", className = \"app.SumResponse\")\n @Action(input = \"http://com/CalculatorService/sumRequest\", output = \"http://com/CalculatorService/sumResponse\")\n public int sum(\n @WebParam(name = \"number1\", targetNamespace = \"\")\n int number1,\n @WebParam(name = \"number2\", targetNamespace = \"\")\n int number2);\n\n /**\n * \n * @param number1\n * @param number2\n * @return\n * returns int\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"divide\", targetNamespace = \"http://com/\", className = \"app.Divide\")\n @ResponseWrapper(localName = \"divideResponse\", targetNamespace = \"http://com/\", className = \"app.DivideResponse\")\n @Action(input = \"http://com/CalculatorService/divideRequest\", output = \"http://com/CalculatorService/divideResponse\")\n public int divide(\n @WebParam(name = \"number1\", targetNamespace = \"\")\n int number1,\n @WebParam(name = \"number2\", targetNamespace = \"\")\n int number2);\n\n /**\n * \n * @param number1\n * @param number2\n * @return\n * returns int\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"substract\", targetNamespace = \"http://com/\", className = \"app.Substract\")\n @ResponseWrapper(localName = \"substractResponse\", targetNamespace = \"http://com/\", className = \"app.SubstractResponse\")\n @Action(input = \"http://com/CalculatorService/substractRequest\", output = \"http://com/CalculatorService/substractResponse\")\n public int substract(\n @WebParam(name = \"number1\", targetNamespace = \"\")\n int number1,\n @WebParam(name = \"number2\", targetNamespace = \"\")\n int number2);\n\n}", "@WebService(name = \"InterestCalculator\", targetNamespace = \"http://webserviceprovider.easylearnjava.com/\")\n@SOAPBinding(style = SOAPBinding.Style.RPC)\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface InterestCalculator {\n\n\n /**\n * \n * @param arg0\n * @return\n * returns double\n * @throws InterestException_Exception\n */\n @WebMethod\n @WebResult(partName = \"return\")\n @Action(input = \"http://webserviceprovider.easylearnjava.com/InterestCalculator/calculateInterestFromObjectRequest\", output = \"http://webserviceprovider.easylearnjava.com/InterestCalculator/calculateInterestFromObjectResponse\", fault = {\n @FaultAction(className = InterestException_Exception.class, value = \"http://webserviceprovider.easylearnjava.com/InterestCalculator/calculateInterestFromObject/Fault/InterestException\")\n })\n public double calculateInterestFromObject(\n @WebParam(name = \"arg0\", partName = \"arg0\")\n Purchase arg0)\n throws InterestException_Exception\n ;\n\n /**\n * \n * @param arg1\n * @param arg0\n * @return\n * returns double\n * @throws InterestException_Exception\n */\n @WebMethod\n @WebResult(partName = \"return\")\n @Action(input = \"http://webserviceprovider.easylearnjava.com/InterestCalculator/calculateSimpleInterestRequest\", output = \"http://webserviceprovider.easylearnjava.com/InterestCalculator/calculateSimpleInterestResponse\", fault = {\n @FaultAction(className = InterestException_Exception.class, value = \"http://webserviceprovider.easylearnjava.com/InterestCalculator/calculateSimpleInterest/Fault/InterestException\")\n })\n public double calculateSimpleInterest(\n @WebParam(name = \"arg0\", partName = \"arg0\")\n double arg0,\n @WebParam(name = \"arg1\", partName = \"arg1\")\n double arg1)\n throws InterestException_Exception\n ;\n\n}", "@WebService(name = \"Calculator\", targetNamespace = \"http://webservice.javacourse.ru/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface Calculator {\n\n\n /**\n * \n * @param arg1\n * @param arg0\n * @return\n * returns int\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"sub\", targetNamespace = \"http://webservice.javacourse.ru/\", className = \"ru.javacourse.webservice.Sub\")\n @ResponseWrapper(localName = \"subResponse\", targetNamespace = \"http://webservice.javacourse.ru/\", className = \"ru.javacourse.webservice.SubResponse\")\n @Action(input = \"http://webservice.javacourse.ru/Calculator/subRequest\", output = \"http://webservice.javacourse.ru/Calculator/subResponse\")\n public int sub(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n int arg1);\n\n /**\n * \n * @param arg1\n * @param arg0\n * @return\n * returns int\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"mult\", targetNamespace = \"http://webservice.javacourse.ru/\", className = \"ru.javacourse.webservice.Mult\")\n @ResponseWrapper(localName = \"multResponse\", targetNamespace = \"http://webservice.javacourse.ru/\", className = \"ru.javacourse.webservice.MultResponse\")\n @Action(input = \"http://webservice.javacourse.ru/Calculator/multRequest\", output = \"http://webservice.javacourse.ru/Calculator/multResponse\")\n public int mult(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n int arg1);\n\n /**\n * \n * @param arg1\n * @param arg0\n * @return\n * returns int\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"sun\", targetNamespace = \"http://webservice.javacourse.ru/\", className = \"ru.javacourse.webservice.Sun\")\n @ResponseWrapper(localName = \"sunResponse\", targetNamespace = \"http://webservice.javacourse.ru/\", className = \"ru.javacourse.webservice.SunResponse\")\n @Action(input = \"http://webservice.javacourse.ru/Calculator/sunRequest\", output = \"http://webservice.javacourse.ru/Calculator/sunResponse\")\n public int sun(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n int arg1);\n\n /**\n * \n * @param arg1\n * @param arg0\n * @return\n * returns int\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"div\", targetNamespace = \"http://webservice.javacourse.ru/\", className = \"ru.javacourse.webservice.Div\")\n @ResponseWrapper(localName = \"divResponse\", targetNamespace = \"http://webservice.javacourse.ru/\", className = \"ru.javacourse.webservice.DivResponse\")\n @Action(input = \"http://webservice.javacourse.ru/Calculator/divRequest\", output = \"http://webservice.javacourse.ru/Calculator/divResponse\")\n public int div(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n int arg1);\n\n}", "@Test(description = \"Test to validate the EMI feature with different tenure and interest rate\", priority = 0)\n\tpublic void UserStory2() throws HeadlessException, AWTException, IOException, InterruptedException\n\t{\n\t\tLoanCalculatorPage loan_cal = new LoanCalculatorPage();\n\t\tloan_cal.validateCalHomePage();\n\t\t//testLog.log(Status.INFO, \"Loan calculator page launched\");\n\n\t\t\n\t\tint testCaseID = 3;\n\t\t\n\t\t//Enter the values in calculator and validate output\n\t\tloan_cal.ValidateDetails(loan_cal.GetEMI(testCaseID));\n\t\t\n\t}", "public static void main(String[] args) {\n\n System.setProperty(\"webdriver.gecko.driver\", \"C:\\\\Training\\\\Drivers\\\\geckodriver.exe\");\n FirefoxDriver driver = new FirefoxDriver();\n\n driver.get(\"https://www.unionbankofindia.co.in/english/emicalculator.aspx\");\n String amount = \"200000\";\n\n// Where to find them (Element locating - first step of selenium)\n\n// a. ID - attribute of tag\n// b. Name - attribute of tag\n// c. Class Name - attribute of tag\n// d. Tag Name - name of tag\n// e. Link Text - text of link\n// f. Partial Link Text - text of link\n// g. X path - path of element in DOM\n// h. CSS - path of element in DOM\n\n// Enter loan amount\n driver.findElement(By.xpath(\"//table[@id='tblinput']//tr[2]//td[3]/input\")).sendKeys(amount);\n\n\n// Enter the loan interest\n driver.findElement(By.xpath(\"//table[@id='tblinput']//tr[3]//td[3]/input\")).sendKeys(\"10\");\n\n// Enter the tenure\n driver.findElement(By.xpath(\"//table[@id='tblinput']//tr[4]//td[3]/input\")).sendKeys(\"120\");\n\n\n// Click on calculate\n driver.findElement(By.xpath(\"//table[@id='Table1']//td/input\")).click();\n\n // Extract the value\n String output = driver.findElement(By.xpath(\"//table[@id='tbldata']//td[2]/input[@name='EMI']\")).getAttribute(\"value\");\n System.out.println(output);\n\n System.exit(0);\n }", "@WebService(name = \"Iinsurance\", targetNamespace = \"http://tempuri.org/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface Iinsurance {\n\n\n /**\n * \n * @param plateNo\n * @return\n * returns java.lang.Boolean\n */\n @WebMethod(operationName = \"IsInsured\", action = \"http://tempuri.org/Iinsurance/IsInsured\")\n @WebResult(name = \"IsInsuredResult\", targetNamespace = \"http://tempuri.org/\")\n @RequestWrapper(localName = \"IsInsured\", targetNamespace = \"http://tempuri.org/\", className = \"n9244255sales.insurance.IsInsured\")\n @ResponseWrapper(localName = \"IsInsuredResponse\", targetNamespace = \"http://tempuri.org/\", className = \"n9244255sales.insurance.IsInsuredResponse\")\n public Boolean isInsured(\n @WebParam(name = \"plateNo\", targetNamespace = \"http://tempuri.org/\")\n String plateNo);\n\n /**\n * \n * @param plateNo\n * @return\n * returns java.lang.Integer\n */\n @WebMethod(operationName = \"GetDiscount\", action = \"http://tempuri.org/Iinsurance/GetDiscount\")\n @WebResult(name = \"GetDiscountResult\", targetNamespace = \"http://tempuri.org/\")\n @RequestWrapper(localName = \"GetDiscount\", targetNamespace = \"http://tempuri.org/\", className = \"n9244255sales.insurance.GetDiscount\")\n @ResponseWrapper(localName = \"GetDiscountResponse\", targetNamespace = \"http://tempuri.org/\", className = \"n9244255sales.insurance.GetDiscountResponse\")\n public Integer getDiscount(\n @WebParam(name = \"plateNo\", targetNamespace = \"http://tempuri.org/\")\n String plateNo);\n\n}", "@Test\n void testDoPaymentInitiationRequest() {\n String PIS_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/payments/payment-initiation/pis/v1\";\n raboUtilUnderTest.doPaymentInitiationRequest(PIS_BASE, \"/payments/sepa-credit-transfers\", \"token\", \"payload\", \"redirect\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }", "@WebService(name = \"WSSimWebService\", targetNamespace = \"http://webservice.bis.edu/\")\r\n@XmlSeeAlso({\r\n ObjectFactory.class\r\n})\r\npublic interface WSSimWebService {\r\n\r\n\r\n /**\r\n * \r\n * @param firstOperationName\r\n * @param firstServiceURI\r\n * @param secondOperationName\r\n * @param secondServiceURI\r\n * @return\r\n * returns edu.bis.webservice_client.OperationPairSimilarity\r\n */\r\n @WebMethod(operationName = \"GetOperationPairInfo\")\r\n @WebResult(targetNamespace = \"\")\r\n @RequestWrapper(localName = \"GetOperationPairInfo\", targetNamespace = \"http://webservice.bis.edu/\", className = \"edu.bis.webservice_client.GetOperationPairInfo\")\r\n @ResponseWrapper(localName = \"GetOperationPairInfoResponse\", targetNamespace = \"http://webservice.bis.edu/\", className = \"edu.bis.webservice_client.GetOperationPairInfoResponse\")\r\n @Action(input = \"http://webservice.bis.edu/WSSimWebService/GetOperationPairInfoRequest\", output = \"http://webservice.bis.edu/WSSimWebService/GetOperationPairInfoResponse\")\r\n public OperationPairSimilarity getOperationPairInfo(\r\n @WebParam(name = \"firstServiceURI\", targetNamespace = \"\")\r\n String firstServiceURI,\r\n @WebParam(name = \"firstOperationName\", targetNamespace = \"\")\r\n String firstOperationName,\r\n @WebParam(name = \"secondServiceURI\", targetNamespace = \"\")\r\n String secondServiceURI,\r\n @WebParam(name = \"secondOperationName\", targetNamespace = \"\")\r\n String secondOperationName);\r\n\r\n /**\r\n * \r\n * @param firstServiceURI\r\n * @param secondServiceURI\r\n * @return\r\n * returns java.lang.Float\r\n */\r\n @WebMethod\r\n @WebResult(targetNamespace = \"\")\r\n @RequestWrapper(localName = \"getServiceSimilarity\", targetNamespace = \"http://webservice.bis.edu/\", className = \"edu.bis.webservice_client.GetServiceSimilarity\")\r\n @ResponseWrapper(localName = \"getServiceSimilarityResponse\", targetNamespace = \"http://webservice.bis.edu/\", className = \"edu.bis.webservice_client.GetServiceSimilarityResponse\")\r\n @Action(input = \"http://webservice.bis.edu/WSSimWebService/getServiceSimilarityRequest\", output = \"http://webservice.bis.edu/WSSimWebService/getServiceSimilarityResponse\")\r\n public Float getServiceSimilarity(\r\n @WebParam(name = \"firstServiceURI\", targetNamespace = \"\")\r\n String firstServiceURI,\r\n @WebParam(name = \"secondServiceURI\", targetNamespace = \"\")\r\n String secondServiceURI);\r\n\r\n /**\r\n * \r\n * @param firstServiceURI\r\n * @param secondServiceURI\r\n * @return\r\n * returns java.util.List<java.lang.String>\r\n */\r\n @WebMethod\r\n @WebResult(targetNamespace = \"\")\r\n @RequestWrapper(localName = \"getSubstitutableOperations\", targetNamespace = \"http://webservice.bis.edu/\", className = \"edu.bis.webservice_client.GetSubstitutableOperations\")\r\n @ResponseWrapper(localName = \"getSubstitutableOperationsResponse\", targetNamespace = \"http://webservice.bis.edu/\", className = \"edu.bis.webservice_client.GetSubstitutableOperationsResponse\")\r\n @Action(input = \"http://webservice.bis.edu/WSSimWebService/getSubstitutableOperationsRequest\", output = \"http://webservice.bis.edu/WSSimWebService/getSubstitutableOperationsResponse\")\r\n public List<String> getSubstitutableOperations(\r\n @WebParam(name = \"firstServiceURI\", targetNamespace = \"\")\r\n String firstServiceURI,\r\n @WebParam(name = \"secondServiceURI\", targetNamespace = \"\")\r\n String secondServiceURI);\r\n\r\n}", "@WebService(name = \"DomesticRemittanceByPartnerService\", targetNamespace = \"http://www.quantiguous.com/services\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface DomesticRemittanceByPartnerService {\n\n\n /**\n * \n * @param beneficiaryAccountNo\n * @param remitterToBeneficiaryInfo\n * @param remitterAddress\n * @param remitterIFSC\n * @param partnerCode\n * @param transactionStatus\n * @param transferAmount\n * @param remitterName\n * @param beneficiaryAddress\n * @param uniqueResponseNo\n * @param version\n * @param requestReferenceNo\n * @param beneficiaryIFSC\n * @param debitAccountNo\n * @param uniqueRequestNo\n * @param beneficiaryName\n * @param customerID\n * @param beneficiaryContact\n * @param transferType\n * @param attemptNo\n * @param transferCurrencyCode\n * @param remitterContact\n * @param remitterAccountNo\n * @param lowBalanceAlert\n */\n @WebMethod(action = \"http://www.quantiguous.com/services/DomesticRemittanceByPartnerService/remit\")\n @RequestWrapper(localName = \"remit\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.Remit\")\n @ResponseWrapper(localName = \"remitResponse\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.RemitResponse\")\n public void remit(\n @WebParam(name = \"version\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.INOUT)\n Holder<String> version,\n @WebParam(name = \"uniqueRequestNo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String uniqueRequestNo,\n @WebParam(name = \"partnerCode\", targetNamespace = \"http://www.quantiguous.com/services\")\n String partnerCode,\n @WebParam(name = \"customerID\", targetNamespace = \"http://www.quantiguous.com/services\")\n String customerID,\n @WebParam(name = \"debitAccountNo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String debitAccountNo,\n @WebParam(name = \"remitterAccountNo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String remitterAccountNo,\n @WebParam(name = \"remitterIFSC\", targetNamespace = \"http://www.quantiguous.com/services\")\n String remitterIFSC,\n @WebParam(name = \"remitterName\", targetNamespace = \"http://www.quantiguous.com/services\")\n String remitterName,\n @WebParam(name = \"remitterAddress\", targetNamespace = \"http://www.quantiguous.com/services\")\n AddressType remitterAddress,\n @WebParam(name = \"remitterContact\", targetNamespace = \"http://www.quantiguous.com/services\")\n ContactType remitterContact,\n @WebParam(name = \"beneficiaryName\", targetNamespace = \"http://www.quantiguous.com/services\")\n String beneficiaryName,\n @WebParam(name = \"beneficiaryAddress\", targetNamespace = \"http://www.quantiguous.com/services\")\n AddressType beneficiaryAddress,\n @WebParam(name = \"beneficiaryContact\", targetNamespace = \"http://www.quantiguous.com/services\")\n ContactType beneficiaryContact,\n @WebParam(name = \"beneficiaryAccountNo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String beneficiaryAccountNo,\n @WebParam(name = \"beneficiaryIFSC\", targetNamespace = \"http://www.quantiguous.com/services\")\n String beneficiaryIFSC,\n @WebParam(name = \"transferType\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.INOUT)\n Holder<TransferTypeType> transferType,\n @WebParam(name = \"transferCurrencyCode\", targetNamespace = \"http://www.quantiguous.com/services\")\n CurrencyCodeType transferCurrencyCode,\n @WebParam(name = \"transferAmount\", targetNamespace = \"http://www.quantiguous.com/services\")\n BigDecimal transferAmount,\n @WebParam(name = \"remitterToBeneficiaryInfo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String remitterToBeneficiaryInfo,\n @WebParam(name = \"uniqueResponseNo\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<String> uniqueResponseNo,\n @WebParam(name = \"attemptNo\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigInteger> attemptNo,\n @WebParam(name = \"requestReferenceNo\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<String> requestReferenceNo,\n @WebParam(name = \"lowBalanceAlert\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<Boolean> lowBalanceAlert,\n @WebParam(name = \"transactionStatus\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<TransactionStatusType> transactionStatus);\n\n /**\n * \n * @param accountCurrencyCode\n * @param partnerCode\n * @param accountNo\n * @param accountBalanceAmount\n * @param customerID\n * @param version\n * @param lowBalanceAlert\n */\n @WebMethod(action = \"http://www.quantiguous.com/services/DomesticRemittanceByPartnerService/getBalance\")\n @RequestWrapper(localName = \"getBalance\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.GetBalance\")\n @ResponseWrapper(localName = \"getBalanceResponse\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.GetBalanceResponse\")\n public void getBalance(\n @WebParam(name = \"version\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.INOUT)\n Holder<String> version,\n @WebParam(name = \"partnerCode\", targetNamespace = \"http://www.quantiguous.com/services\")\n String partnerCode,\n @WebParam(name = \"customerID\", targetNamespace = \"http://www.quantiguous.com/services\")\n String customerID,\n @WebParam(name = \"accountNo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String accountNo,\n @WebParam(name = \"accountCurrencyCode\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<CurrencyCodeType> accountCurrencyCode,\n @WebParam(name = \"accountBalanceAmount\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigDecimal> accountBalanceAmount,\n @WebParam(name = \"lowBalanceAlert\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<Boolean> lowBalanceAlert);\n\n /**\n * \n * @param reqTransferType\n * @param partnerCode\n * @param transactionStatus\n * @param transferAmount\n * @param transferType\n * @param transactionDate\n * @param version\n * @param transferCurrencyCode\n * @param requestReferenceNo\n */\n @WebMethod(action = \"http://www.quantiguous.com/services/DomesticRemittanceByPartnerService/getRemittanceStatus\")\n @RequestWrapper(localName = \"getRemittanceStatus\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.GetRemittanceStatus\")\n @ResponseWrapper(localName = \"getRemittanceStatusResponse\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.GetRemittanceStatusResponse\")\n public void getRemittanceStatus(\n @WebParam(name = \"version\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.INOUT)\n Holder<String> version,\n @WebParam(name = \"partnerCode\", targetNamespace = \"http://www.quantiguous.com/services\")\n String partnerCode,\n @WebParam(name = \"requestReferenceNo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String requestReferenceNo,\n @WebParam(name = \"transferType\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<TransferTypeType> transferType,\n @WebParam(name = \"reqTransferType\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<TransferTypeType> reqTransferType,\n @WebParam(name = \"transactionDate\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<XMLGregorianCalendar> transactionDate,\n @WebParam(name = \"transferAmount\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigDecimal> transferAmount,\n @WebParam(name = \"transferCurrencyCode\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<CurrencyCodeType> transferCurrencyCode,\n @WebParam(name = \"transactionStatus\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<TransactionStatusType> transactionStatus);\n\n /**\n * \n * @param numDebits\n * @param partnerCode\n * @param dateRange\n * @param accountNo\n * @param customerID\n * @param closingBalance\n * @param numTransactions\n * @param numCredits\n * @param version\n * @param openingBalance\n * @param transactionsArray\n */\n @WebMethod(action = \"http://www.quantiguous.com/services/DomesticRemittanceByPartnerService/getTransactions\")\n @RequestWrapper(localName = \"getTransactions\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.GetTransactions\")\n @ResponseWrapper(localName = \"getTransactionsResponse\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.GetTransactionsResponse\")\n public void getTransactions(\n @WebParam(name = \"version\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.INOUT)\n Holder<String> version,\n @WebParam(name = \"partnerCode\", targetNamespace = \"http://www.quantiguous.com/services\")\n String partnerCode,\n @WebParam(name = \"customerID\", targetNamespace = \"http://www.quantiguous.com/services\")\n String customerID,\n @WebParam(name = \"accountNo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String accountNo,\n @WebParam(name = \"dateRange\", targetNamespace = \"http://www.quantiguous.com/services\")\n DateRangeType dateRange,\n @WebParam(name = \"openingBalance\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigDecimal> openingBalance,\n @WebParam(name = \"numDebits\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigInteger> numDebits,\n @WebParam(name = \"numCredits\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigInteger> numCredits,\n @WebParam(name = \"closingBalance\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigDecimal> closingBalance,\n @WebParam(name = \"numTransactions\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigInteger> numTransactions,\n @WebParam(name = \"transactionsArray\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<TransactionsArrayType> transactionsArray);\n\n}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tSystem.setProperty(\"webdriver.ie.driver\", \"E:\\\\drivers\\\\IEDriverServer.exe\");\n\t\tWebDriver ff = new InternetExplorerDriver();\n\t\t\n\t\t\n//\t\tFirefoxDriver ff =new FirefoxDriver();\n\t\tff.get(\"https://www.allahabadbank.in/english/emi_calculator.aspx\");\n\t\t\n//\t\tenter amount\n\t\tff.findElement(By.xpath(\"/html/body/form/div[3]/div[1]/div[2]/span/div/div[2]/div[1]/div[3]/input\")).sendKeys(\"100000\");\t\t\n//\t\tenter rate\n\t\tff.findElement(By.id(\"two\")).sendKeys(\"10\");\t\t\n//\t\tenter tenure\n\t\tff.findElement(By.name(\"instalment\")).sendKeys(\"120\");\t\n//\t\tclick on calculate\n\t\tff.findElement(By.name(\"B1\")).click();\n\t\t\n//\t\textract EMI\n\t\tString act_output = ff.findElement(By.id(\"four\")).getAttribute(\"value\");\n\t\tSystem.out.println(act_output);\n//\t\tclose app\n\t\tff.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@WebService(name = \"NewWebService\", targetNamespace = \"http://controller/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface NewWebService {\n\n\n /**\n * \n * @param pass\n * @param user\n * @return\n * returns java.lang.Boolean\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"login\", targetNamespace = \"http://controller/\", className = \"WSMateo.Login\")\n @ResponseWrapper(localName = \"loginResponse\", targetNamespace = \"http://controller/\", className = \"WSMateo.LoginResponse\")\n @Action(input = \"http://controller/NewWebService/loginRequest\", output = \"http://controller/NewWebService/loginResponse\")\n public Boolean login(\n @WebParam(name = \"user\", targetNamespace = \"\")\n String user,\n @WebParam(name = \"pass\", targetNamespace = \"\")\n String pass);\n\n /**\n * \n * @param nombre\n * @return\n * returns java.lang.String\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"helloPatri\", targetNamespace = \"http://controller/\", className = \"WSMateo.HelloPatri\")\n @ResponseWrapper(localName = \"helloPatriResponse\", targetNamespace = \"http://controller/\", className = \"WSMateo.HelloPatriResponse\")\n @Action(input = \"http://controller/NewWebService/helloPatriRequest\", output = \"http://controller/NewWebService/helloPatriResponse\")\n public String helloPatri(\n @WebParam(name = \"nombre\", targetNamespace = \"\")\n String nombre);\n\n /**\n * \n * @param numer1\n * @param numer2\n * @return\n * returns java.lang.Double\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"multi\", targetNamespace = \"http://controller/\", className = \"WSMateo.Multi\")\n @ResponseWrapper(localName = \"multiResponse\", targetNamespace = \"http://controller/\", className = \"WSMateo.MultiResponse\")\n @Action(input = \"http://controller/NewWebService/multiRequest\", output = \"http://controller/NewWebService/multiResponse\")\n public Double multi(\n @WebParam(name = \"numer1\", targetNamespace = \"\")\n double numer1,\n @WebParam(name = \"numer2\", targetNamespace = \"\")\n double numer2);\n\n /**\n * \n * @param numer1\n * @param numer2\n * @return\n * returns java.lang.Double\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"division\", targetNamespace = \"http://controller/\", className = \"WSMateo.Division\")\n @ResponseWrapper(localName = \"divisionResponse\", targetNamespace = \"http://controller/\", className = \"WSMateo.DivisionResponse\")\n @Action(input = \"http://controller/NewWebService/divisionRequest\", output = \"http://controller/NewWebService/divisionResponse\")\n public Double division(\n @WebParam(name = \"numer1\", targetNamespace = \"\")\n double numer1,\n @WebParam(name = \"numer2\", targetNamespace = \"\")\n double numer2);\n\n /**\n * \n * @param numer1\n * @param numer2\n * @return\n * returns java.lang.Double\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"suma\", targetNamespace = \"http://controller/\", className = \"WSMateo.Suma\")\n @ResponseWrapper(localName = \"sumaResponse\", targetNamespace = \"http://controller/\", className = \"WSMateo.SumaResponse\")\n @Action(input = \"http://controller/NewWebService/sumaRequest\", output = \"http://controller/NewWebService/sumaResponse\")\n public Double suma(\n @WebParam(name = \"numer1\", targetNamespace = \"\")\n double numer1,\n @WebParam(name = \"numer2\", targetNamespace = \"\")\n double numer2);\n\n /**\n * \n * @return\n * returns java.lang.Integer\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"randnumber\", targetNamespace = \"http://controller/\", className = \"WSMateo.Randnumber\")\n @ResponseWrapper(localName = \"randnumberResponse\", targetNamespace = \"http://controller/\", className = \"WSMateo.RandnumberResponse\")\n @Action(input = \"http://controller/NewWebService/randnumberRequest\", output = \"http://controller/NewWebService/randnumberResponse\")\n public Integer randnumber();\n\n /**\n * \n * @param numero1\n * @param numero2\n * @return\n * returns java.lang.Double\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"resta\", targetNamespace = \"http://controller/\", className = \"WSMateo.Resta\")\n @ResponseWrapper(localName = \"restaResponse\", targetNamespace = \"http://controller/\", className = \"WSMateo.RestaResponse\")\n @Action(input = \"http://controller/NewWebService/restaRequest\", output = \"http://controller/NewWebService/restaResponse\")\n public Double resta(\n @WebParam(name = \"numero1\", targetNamespace = \"\")\n double numero1,\n @WebParam(name = \"numero2\", targetNamespace = \"\")\n double numero2);\n\n /**\n * \n * @param name\n * @return\n * returns java.lang.String\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"hello\", targetNamespace = \"http://controller/\", className = \"WSMateo.Hello\")\n @ResponseWrapper(localName = \"helloResponse\", targetNamespace = \"http://controller/\", className = \"WSMateo.HelloResponse\")\n @Action(input = \"http://controller/NewWebService/helloRequest\", output = \"http://controller/NewWebService/helloResponse\")\n public String hello(\n @WebParam(name = \"name\", targetNamespace = \"\")\n String name);\n\n /**\n * \n * @param asunto\n * @param cuerpo\n * @param destinatario\n */\n @WebMethod\n @RequestWrapper(localName = \"mail\", targetNamespace = \"http://controller/\", className = \"WSMateo.Mail\")\n @ResponseWrapper(localName = \"mailResponse\", targetNamespace = \"http://controller/\", className = \"WSMateo.MailResponse\")\n @Action(input = \"http://controller/NewWebService/mailRequest\", output = \"http://controller/NewWebService/mailResponse\")\n public void mail(\n @WebParam(name = \"destinatario\", targetNamespace = \"\")\n String destinatario,\n @WebParam(name = \"asunto\", targetNamespace = \"\")\n String asunto,\n @WebParam(name = \"cuerpo\", targetNamespace = \"\")\n String cuerpo);\n\n}", "@WebService(name = \"NumberGeneratorServiceSoap\", targetNamespace = \"NS_NumGen\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface NumberGeneratorServiceSoap {\n\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/primeRange\")\n @WebResult(name = \"primeRangeResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"primeRange\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PrimeRange\")\n @ResponseWrapper(localName = \"primeRangeResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PrimeRangeResponse\")\n public String primeRange(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/compositeRange\")\n @WebResult(name = \"compositeRangeResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"compositeRange\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.CompositeRange\")\n @ResponseWrapper(localName = \"compositeRangeResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.CompositeRangeResponse\")\n public String compositeRange(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/perfectSquaresRange\")\n @WebResult(name = \"perfectSquaresRangeResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"perfectSquaresRange\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PerfectSquaresRange\")\n @ResponseWrapper(localName = \"perfectSquaresRangeResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PerfectSquaresRangeResponse\")\n public String perfectSquaresRange(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/fibonacciRange\")\n @WebResult(name = \"fibonacciRangeResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"fibonacciRange\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.FibonacciRange\")\n @ResponseWrapper(localName = \"fibonacciRangeResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.FibonacciRangeResponse\")\n public String fibonacciRange(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n /**\n * \n * @param high\n * @param low\n * @param n\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/randomNumbers\")\n @WebResult(name = \"randomNumbersResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"randomNumbers\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.RandomNumbers\")\n @ResponseWrapper(localName = \"randomNumbersResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.RandomNumbersResponse\")\n public String randomNumbers(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high,\n @WebParam(name = \"n\", targetNamespace = \"NS_NumGen\")\n int n);\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/powersofTwo\")\n @WebResult(name = \"powersofTwoResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"powersofTwo\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PowersofTwo\")\n @ResponseWrapper(localName = \"powersofTwoResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PowersofTwoResponse\")\n public String powersofTwo(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/evenRange\")\n @WebResult(name = \"evenRangeResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"evenRange\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.EvenRange\")\n @ResponseWrapper(localName = \"evenRangeResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.EvenRangeResponse\")\n public String evenRange(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/oddRange\")\n @WebResult(name = \"oddRangeResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"oddRange\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.OddRange\")\n @ResponseWrapper(localName = \"oddRangeResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.OddRangeResponse\")\n public String oddRange(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n /**\n * \n * @param high\n * @param low\n * @return\n * returns java.lang.String\n */\n @WebMethod(action = \"NS_NumGen/palindromeRange\")\n @WebResult(name = \"palindromeRangeResult\", targetNamespace = \"NS_NumGen\")\n @RequestWrapper(localName = \"palindromeRange\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PalindromeRange\")\n @ResponseWrapper(localName = \"palindromeRangeResponse\", targetNamespace = \"NS_NumGen\", className = \"ns_numgen.PalindromeRangeResponse\")\n public String palindromeRange(\n @WebParam(name = \"low\", targetNamespace = \"NS_NumGen\")\n int low,\n @WebParam(name = \"high\", targetNamespace = \"NS_NumGen\")\n int high);\n\n}", "public static void main(String args[]) throws java.lang.Exception {\n \tURL wsdlURL = CalculatorService.WSDL_LOCATION;\r\n if (args.length > 0 && args[0] != null && !\"\".equals(args[0])) { \r\n File wsdlFile = new File(args[0]);\r\n try {\r\n if (wsdlFile.exists()) {\r\n wsdlURL = wsdlFile.toURI().toURL();\r\n } else {\r\n wsdlURL = new URL(args[0]);\r\n }\r\n } catch (MalformedURLException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n \r\n //RatingEngineWebserviceSFService ss = new RatingEngineWebserviceSFService(wsdlURL, SERVICE_NAME);\r\n \r\n ClientProxyFactoryBean factory = new ClientProxyFactoryBean();\r\n factory.setServiceClass(CalculatorWs.class);\r\n \r\n \r\n \r\n HashMap p = new HashMap();\r\n p.put(\"set-jaxb-validation-event-handler\", new String(\"false\"));\r\n factory.setProperties(p);\r\n \r\n //factory.getBus().setProperty(\"set-jaxb-validation-event-handler\", \"false\");\r\n \r\n factory.setAddress(\"http://localhost:9080/RouterWebProject/CalculatorService\");\r\n CalculatorWs client = (CalculatorWs) factory.create();\r\n \r\n System.out.println(\" ========== SERVICE ========= 1 \" + client.multiply(33, 33));\r\n \r\n \r\n //CalculateCPRatingsInWSDTO inDTO = new CalculateCPRatingsInWSDTO();\r\n \r\n System.out.println(\" ========== SERVICE ========= 2\");\r\n // System.out.println(\" ========== SERVICE ========= 3 \" + (CalculateCPRatingsOutWSDTO)client.calculateCPRatings(inDTO)); \r\n \r\n \r\n }", "@Test\n public void testCalculerMontantService() {\n double expResult = 0.0;\n double result = CalculAgricole.calculerMontantServices();\n assertEquals(\"Montant pour las droits du passage n'était pas correct.\", expResult, result, 0);\n }", "public static void main(String[] args) throws Exception {\n yeepayCallBack();\n// refund();\n// URLConnectionTool.readContentFromPost(\"http://117.78.45.101:8083/pay/lycheepay/reconfileDownload\",\"startDate=20170210&endDate=20170224\",\"60000\",\"60000\");\n// testWhiteListUpload();\n// testWhiteListOneQuery();\n// testWhiteListBatcheQuery();\n// onePayRequest();\n// callBack();\n// onePayCheckBookQuery();\n// payWithRouter();\n// batchPayRequest();\n// batchPayStatQuery();\n// batchPayDetailQuery();\n }", "@WebService(name = \"ZBC_EVENT_RAISE_WEB\", targetNamespace = \"urn:sap-com:document:sap:rfc:functions\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface ZBCEVENTRAISEWEB {\n\n\n /**\n * \n * @param eventparm\n * @param eventid\n * @param targetINSTANCE\n * @return\n * returns java.lang.String\n * @throws ZBCEVENTRAISEException\n */\n @WebMethod(operationName = \"ZBC_EVENT_RAISE\", action = \"urn:sap-com:document:sap:rfc:functions:ZBC_EVENT_RAISE_WEB:ZBC_EVENT_RAISERequest\")\n @WebResult(name = \"EV_SUCCESS\", targetNamespace = \"\")\n @RequestWrapper(localName = \"ZBC_EVENT_RAISE\", targetNamespace = \"urn:sap-com:document:sap:rfc:functions\", className = \"com.sap.document.sap.rfc.functions.ZBCEVENTRAISE\")\n @ResponseWrapper(localName = \"ZBC_EVENT_RAISEResponse\", targetNamespace = \"urn:sap-com:document:sap:rfc:functions\", className = \"com.sap.document.sap.rfc.functions.ZBCEVENTRAISEResponse\")\n public String zbcEVENTRAISE(\n @WebParam(name = \"EVENTID\", targetNamespace = \"\")\n String eventid,\n @WebParam(name = \"EVENTPARM\", targetNamespace = \"\")\n String eventparm,\n @WebParam(name = \"TARGET_INSTANCE\", targetNamespace = \"\")\n String targetINSTANCE)\n throws ZBCEVENTRAISEException\n ;\n\n}", "public void testService() {\n\n\t\ttry {\n\t\t\tString nextAction = \"next action\";\n\t\t\trequest.setAttribute(\"NEXT_ACTION\", nextAction);\n\t\t\tString nextPublisher = \"next publisher\";\n\t\t\trequest.setAttribute(\"NEXT_PUBLISHER\", nextPublisher);\n\t\t\tString expertQueryDisplayed = \"expert query displayed\";\n\t\t\trequest.setAttribute(\"expertDisplayedForUpdate\", expertQueryDisplayed);\n\t\t\tupdateFieldsForResumeAction.service(request, response);\n\t\t\tassertEquals(nextAction, response.getAttribute(\"NEXT_ACTION\"));\t\t\n\t\t\tassertEquals(nextPublisher, response.getAttribute(\"NEXT_PUBLISHER\"));\n\t\t\tassertEquals(expertQueryDisplayed, singleDataMartWizardObj.getExpertQueryDisplayed());\n\t\t\t\n\t\t} catch (SourceBeanException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Unaspected exception occurred!\");\n\t\t}\n\t\t\n\t}", "@Test\n public void testCreateMedecin() throws Exception {\n System.out.println(\"createMedecin\");\n String wscaller = \"\";\n String nom = \"\";\n Integer num_secu = null;\n String adresse = \"\";\n String email = \"\";\n String telephone = \"\";\n String code_postal = \"\";\n String cabinet = \"\";\n String specialite = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MonWebService instance = (MonWebService)container.getContext().lookup(\"java:global/classes/MonWebService\");\n String expResult = \"\";\n String result = instance.createMedecin(wscaller, nom, num_secu, adresse, email, telephone, code_postal, cabinet, specialite);\n assertEquals(expResult, result);\n container.close();\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 void executeMoneyTransfer() throws ParseException, JsonProcessingException {\n\n String idAccount = \"14537780\";\n String receiverName = \"Receiver Name\";\n String description = \"description text\";\n String currency = \"EUR\";\n String amount = \"100\";\n String executionDate = \"2020-12-12\";\n MoneyTransfer moneyTransfer = Utils.fillMoneyTransfer(idAccount, receiverName, description, currency, amount, executionDate);\n\n Response response = greetingWebClient.executeMoneyTransfer(moneyTransfer, idAccount);\n assertTrue(response.getStatus().equals(\"KO\"));\n\n\n }", "@Test\n\tpublic void returnDebitSEPA() throws Exception {\n\t\ttry {\n\t\t\t// Launch the browser and load the default URL\n\t\t\tUtility.initConfiguration();\n\t\t\tThread.sleep(3000);\n\t\t\t// Login to back end and check payment method is enabled or disabled\n\t\t\tUtility.wooCommerceBackEndLogin();\n\t\t\tThread.sleep(3000);\n\t\t\tElementLocators element = PageFactory.initElements(driver, ElementLocators.class);\n\t\t\t// Title for HTML report\n\t\t\ttest = extend.createTest(\"Vendor script execution for SEPA 'RETURN_DEBIT_SEPA'\");\n\t\t\t// Steps\n\t\t\tActions actions = new Actions(driver);\n\t\t\tactions.moveToElement(element.WooCommerce).perform();\n\t\t\tThread.sleep(3000);\n\t\t\telement.WooCommerce_Settings.click();\n\t\t\telement.Payment_Tab.click();\n\t\t\tThread.sleep(2000);\n\t\t\telement.Sepa_Payment_Display.click();\n\t\t\t// Checking payment method enabled or disabled\n\t\t\tif (!element.Sepa_Enable_Payment_Method_Checkbox.isSelected()) {\n\t\t\t\telement.Sepa_Enable_Payment_Method_Checkbox.click();\n\t\t\t\tThread.sleep(3000);\n\t\t\t}\n\t\t\t// Checking Guarantee payment enabled or disabled\n\t\t\tif (element.Sepa_Enable_Payment_Guarantee_CheckBox.isSelected()) {\n\t\t\t\telement.Sepa_Enable_Payment_Guarantee_CheckBox.click();\n\t\t\t\tThread.sleep(3000);\n\t\t\t}\n\t\t\telement.Sepa_Payment_Save_Changes.click();\n\t\t\tThread.sleep(3000);\n\t\t\tdriver.navigate().to(Constant.shopfrontendurl);\n\t\t\tThread.sleep(3000);\n\t\t\tUtility.wooCommerceCheckOutProcess();\n\t\t\tThread.sleep(4000);\n\t\t\t// Read the data from excel sheet\n\t\t\tMap<String, String> UserData = new HashMap<String, String>();\n\t\t\tUserData = Data.ExcelReader_PaymentMethods();\n\t\t\t// Check whether payment method is displayed in checkout page\n\t\t\tif (element.Sepa_Label.isDisplayed()) {\n\t\t\t\tif (element.Sepa_Radio_button.isDisplayed() == true) {\n\t\t\t\t\telement.Sepa_Radio_button.click();\n\t\t\t\t}\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\t\telement.Sepa_Iban_TextBox.sendKeys(UserData.get(\"SEPAIBAN\"));\n\t\t\t\telement.Place_Order.click();\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(25, TimeUnit.SECONDS);\n\t\t\t\t// After order placed successfully verify Thank you message displayed\n\t\t\t\tString thankyoumessage = element.FE_Thank_You_Page_Text.getText();\n\t\t\t\tif (thankyoumessage.equals(\"Thank you. Your order has been received.\")) {\n\t\t\t\t\tSystem.out.println(\"Order placed successfully using Direct Debit SEPA\");\n\t\t\t\t\ttest.log(Status.INFO, \"Order placed successfully using Direct Debit SEPA\");\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t// Get the amount from order success page front end\n\t\t\t\t\tString totalOrderAmount = element.OrderDetails_TotalAmount.getText().replaceAll(\"[^0-9]\", \"\");\n\t\t\t\t\t// Get the TID from order success page front end\n\t\t\t\t\tString TID = element.OrderDetails_Note_TID.getText().replaceAll(\"[^0-9]\", \"\");\n\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\t\t\t// Go to callback execution site and enter vendor script URL\n\t\t\t\t\tdriver.navigate().to(Constant.vendorscripturl);\n\t\t\t\t\tThread.sleep(4000);\n\t\t\t\t\telement.Vendor_Script_Url.sendKeys((Constant.shopfrontendurl) + \"?wc-api=novalnet_callback\");\n\t\t\t\t\t// Enter required parameter\n\t\t\t\t\telement.Vendor_Id.clear();\n\t\t\t\t\telement.Vendor_Id.sendKeys(\"4\");\n\t\t\t\t\telement.Vendor_Auth_Code.clear();\n\t\t\t\t\telement.Vendor_Auth_Code.sendKeys(\"JyEtHUjjbHNJwVztW6JrafIMHQvici\");\n\t\t\t\t\telement.Product_Id.clear();\n\t\t\t\t\telement.Product_Id.sendKeys(\"14\");\n\t\t\t\t\telement.Tariff_Id.clear();\n\t\t\t\t\telement.Tariff_Id.sendKeys(\"30\");\n\t\t\t\t\telement.Payment_Type_Edit_Button.click();\n\t\t\t\t\tSelect selectpaymenttype = new Select(element.Payment_Type_Selectbox);\n\t\t\t\t\tselectpaymenttype.selectByVisibleText(\"RETURN_DEBIT_SEPA\");\n\t\t\t\t\telement.Test_Mode.clear();\n\t\t\t\t\telement.Test_Mode.sendKeys(\"1\");\n\t\t\t\t\telement.Tid_Payment.clear();\n\t\t\t\t\telement.Tid_Payment.sendKeys(TID);\n\t\t\t\t\telement.Amount.clear();\n\t\t\t\t\telement.Amount.sendKeys(totalOrderAmount);\n\t\t\t\t\telement.Currency.clear();\n\t\t\t\t\telement.Currency.sendKeys(\"EUR\");\n\t\t\t\t\telement.Status.clear();\n\t\t\t\t\telement.Status.sendKeys(\"100\");\n\t\t\t\t\telement.Tid_Status.clear();\n\t\t\t\t\telement.Tid_Status.sendKeys(\"100\");\n\t\t\t\t\telement.Tid.clear();\n\t\t\t\t\telement.Tid.sendKeys(\"13245678945612345\");\n\t\t\t\t\telement.Execute_Button.click();\n\t\t\t\t\tString callback_message = element.callback_message.getText();\n\t\t\t\t\tString callback_message_updated = callback_message.substring(9, callback_message.length());\n\t\t\t\t\tSystem.out.println(\"Callback execution message: \" + callback_message_updated);\n\t\t\t\t\tif (callback_message\n\t\t\t\t\t\t\t.contains(\"Novalnet callback received. Chargeback executed successfully for the TID:\")) {\n\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t\tdriver.navigate().to(Constant.shopbackendurl);\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\tactions.moveToElement(element.WooCommerce).perform();\n\t\t\t\t\t\tThread.sleep(1500);\n\t\t\t\t\t\telement.WooCommerce_Orders.click();\n\t\t\t\t\t\telement.Backend_Order_Number.click();\n\t\t\t\t\t\tString BEOrderNotesMessage = element.BE_OrderNotes_Message.getText();\n\t\t\t\t\t\tSystem.out.println(\"Backend order note: \" + BEOrderNotesMessage);\n\t\t\t\t\t\tif (callback_message_updated.equals(BEOrderNotesMessage)) {\n\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\"TC PASSED: RETURN_DEBIT_SEPA execution message and back end order note message text was matched successfully.\");\n\t\t\t\t\t\t\ttest.log(Status.PASS,\n\t\t\t\t\t\t\t\t\t\"TC PASSED: RETURN_DEBIT_SEPA execution message and back end order note message text was matched successfully.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\"TC FAILED: RETURN_DEBIT_SEPA execution message and back end order note message text was not matched.\");\n\t\t\t\t\t\t\ttest.log(Status.FAIL,\n\t\t\t\t\t\t\t\t\t\"TC FAILED: RETURN_DEBIT_SEPA execution messageA and back end order note message text was not matched.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"ERROR: Callback response message is displayed wrongly\");\n\t\t\t\t\t\ttest.log(Status.ERROR, \"ERROR: Callback response message is displayed wrongly\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"TC FAILED: Order was not placed successfully using Direct Debit SEPA\");\n\t\t\t\t\ttest.log(Status.FAIL, \"TC FAILED: Order was not placed successfully using Direct Debit SEPA\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Close browser\n\t\t\tUtility.closeBrowser();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"ERROR: Unexpected error from 'returnDebitSEPA' method\");\n\t\t\ttest.log(Status.ERROR, \"ERROR: Unexpected error from 'returnDebitSEPA' method\");\n\t\t}\n\t}", "public void run() throws Exception {\n\t\tweb.window(2,\n\t\t\t\t\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").navigate(\n\t\t\t\t\t\t\"http://riyoramgbm02.maaden.com:8050/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE\");\n\t\tweb.window(4,\n\t\t\t\t\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").waitForPage(180, true);\n\t\t\n\t\tweb.textBox(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_input_text_unamebean}}\").click();\n\t\t\n\t\tweb.textBox(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_input_text_unamebean}}\").setText(\"PEETHAMBARANS\");\n\t\t\t\t\n\t\tweb.textBox(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_input_password_pwdbean}}\")\n\t\t\t\t.setPassword(deobfuscate(\"vWeMH+MT9Gy3Y8SojsL+Mg==\"));\n\t\n\t\tweb.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_button_SubmitButton}}\").click();\n\t\tweb.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").waitForPage(180, true);\n\t\t\n\t\tweb.link(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.MWSPC_PURCHASING_SUPERUSE}}\").click();\n\t\tweb.window(17,\n\t\t\t\t\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").waitForPage(180, true);\n\t\n\t\n\t\tweb.link(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Purchase_Order}}\").click();\n\t\tweb.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window}}\").waitForPage(180, true);\n\t\t\n\t\tweb.link(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Purchase_Order_Summary}}\").click();\n\t\tweb.window(28,\n\t\t\t\t\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.web_window_1}}\")\n\t\t\t\t.waitForPage(180,true);\n\t\tforms.captureScreenshot(33);\n\t\t\n\t\t//forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_OPERATING_UNIT_0}}\").setFocus();\n\t\tif(forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_PO_NUM_0}}\").exists(60, TimeUnit.SECONDS)){\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_PO_NUM_0}}\").setText(\"741903172\");\n\t\t}\n\t\t\n\t\tString PO_Number = forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_PO_NUM_0}}\").getText();\n\t\tinfo(\"PO_Number ->\"+PO_Number);\n\t\t\n\t\tforms.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_button_FIND_FIND_0}}\").click();\n\t\tforms.captureScreenshot(38);\n\t\n\t\tforms.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Lines}}\").click();\n\t\tforms.captureScreenshot(41);\n\t\t\n\t\tforms.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Shipment}}\").click();\n\t\tforms.captureScreenshot(44);\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_PO_NUM_0}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_RELEASE_}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_LINE_NUM}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_SHIPMENT}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_ITEM_NUM}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_UNIT_MEA}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_SHIP_TO_}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_SHIPMENT_1}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_START_DA}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_END_DATE}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY}}\").setFocus();\n\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_1}}\").invokeSoftKey(\"NEXT_FIELD\");\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_1}}\").setFocus();\n\t\tinfo(\"Quantity Due is : \"+forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_1}}\").getText() );\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_2}}\").setFocus();\n\t\tinfo(\"Quantity Received is : \"+forms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_SHIPMENTS_FOLDER_QUANTITY_2}}\").getText());\n\t\tforms.captureScreenshot();\n\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_SHIPMENTS_FOLDER}}\").close();\n\t\tforms.captureScreenshot(63);\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_LINES_FOLDER_PURCHASING_O}}\").setFocus();\n\t\t\n//\t\tforms.button(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.Shipment}}\").click();\n//\t\t\n//\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_SHIPMENTS_FOLDER}}\").activate(true);\n//\t\tforms.captureScreenshot(68);\n//\t\t\n//\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_SHIPMENTS_FOLDER}}\").close();\n//\t\tforms.captureScreenshot(71);\n//\t\t\n\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_LINES_FOLDER}}\").close();\n\t\tforms.captureScreenshot(74);\n\t\t\n\t\tforms.window(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_window_HEADERS_FOLDER}}\").close();\n\t\tforms.captureScreenshot(77);\n\t\t\n\t\tforms.textField(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_textField_FIND_OPERATING_UNIT_0}}\").setFocus();\n\t\tforms.captureScreenshot(80);\n\t\t\n\t\tforms.close(81);\n\t\tforms.captureScreenshot(83);\n\t\t\n\t\tforms.choiceBox(\"{{obj.PO_QtyReceived_QtyDue_EligibilityVerification_00122.forms_choiceBox}}\").clickButton(\"OK\");\n\t\t\n\t\t\n\n\t}", "@WebService(name = \"OPERACIONES\", targetNamespace = \"http://UDDI/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface OPERACIONES {\n\n\n /**\n * \n * @param a\n * @param b\n * @return\n * returns double\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"horas\", targetNamespace = \"http://UDDI/\", className = \"uddi.Horas\")\n @ResponseWrapper(localName = \"horasResponse\", targetNamespace = \"http://UDDI/\", className = \"uddi.HorasResponse\")\n @Action(input = \"http://UDDI/OPERACIONES/horasRequest\", output = \"http://UDDI/OPERACIONES/horasResponse\")\n public double horas(\n @WebParam(name = \"a\", targetNamespace = \"\")\n double a,\n @WebParam(name = \"b\", targetNamespace = \"\")\n double b);\n\n}", "@WebService(name = \"PaymentMgmtService\",\n targetNamespace = \"http://assessor.lacounty.gov/amp/wsdl/ao/PaymentMgmtService\")\n@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)\n@XmlSeeAlso({ ObjectFactory.class })\npublic interface PaymentMgmtService {\n\n\n /**\n *\n * @param request\n * @return\n * returns gov.laca.amp.proxy.soap.pmtmgmtservice.client.gen.RetrievePaymentHistoryResponse\n * @throws FaultMessage\n */\n @WebMethod(operationName = \"RetrievePaymentHistory\", action = \"RetrievePaymentHistory\")\n @WebResult(name = \"RetrievePaymentHistoryResponse\",\n targetNamespace = \"http://assessor.lacounty.gov/amp/xsd/ao/RetrievePaymentHistory\", partName = \"reply\")\n public RetrievePaymentHistoryResponse retrievePaymentHistory(@WebParam(name = \"RetrievePaymentHistoryRequest\",\n targetNamespace =\n \"http://assessor.lacounty.gov/amp/xsd/ao/RetrievePaymentHistory\",\n partName = \"request\")\n RetrievePaymentHistoryRequest request) throws FaultMessage;\n\n /**\n *\n * @param request\n * @return\n * returns gov.laca.amp.proxy.soap.pmtmgmtservice.client.gen.RetrieveSTRSummaryResponse\n * @throws FaultMessage\n */\n @WebMethod(operationName = \"RetrieveSTRSummary\", action = \"RetrieveSTRSummary\")\n @WebResult(name = \"RetrieveSTRSummaryResponse\",\n targetNamespace = \"http://assessor.lacounty.gov/amp/xsd/ao/RetrieveSTRSummary\", partName = \"reply\")\n public RetrieveSTRSummaryResponse retrieveSTRSummary(@WebParam(name = \"RetrieveSTRSummaryRequest\",\n targetNamespace =\n \"http://assessor.lacounty.gov/amp/xsd/ao/RetrieveSTRSummary\",\n partName = \"request\")\n RetrieveSTRSummaryRequest request) throws FaultMessage;\n\n /**\n *\n * @param request\n * @return\n * returns gov.laca.amp.proxy.soap.pmtmgmtservice.client.gen.RetrieveSTRChangeHistoryResponse\n * @throws FaultMessage\n */\n @WebMethod(operationName = \"RetrieveSTRChangeHistory\", action = \"RetrieveSTRChangeHistory\")\n @WebResult(name = \"RetrieveSTRChangeHistoryResponse\",\n targetNamespace = \"http://assessor.lacounty.gov/amp/xsd/ao/RetrieveSTRChangeHistory\", partName = \"reply\")\n public RetrieveSTRChangeHistoryResponse retrieveSTRChangeHistory(@WebParam(name = \"RetrieveSTRChangeHistoryRequest\",\n targetNamespace =\n \"http://assessor.lacounty.gov/amp/xsd/ao/RetrieveSTRChangeHistory\",\n partName = \"request\")\n RetrieveSTRChangeHistoryRequest request) throws FaultMessage;\n\n}", "public static void main(String[] args) {\n\t\tHashMap responseMap;\n\t\ttry {\n\t\t HashMap reqparams = new HashMap(0);\n reqparams.put(\"msisdn\", \"94777335365\");\n \n responseMap = HttpPosterCommons.getInstance().executeGetRequestAsStream(\"http://192.168.71.225/interimbillpdfext.php\", reqparams, false);\n\t\t \n byte[] buf = (byte[])responseMap.get(\"response\");\n String statusCode = (String)responseMap.get(\"statusCode\");\n\t\t \n System.out.println(statusCode);\n System.out.println();\n System.out.println(buf);\n \n\t\t /*HashMap reqparams = new HashMap(0);\n\t\t reqparams.put(\"xml\", reqXML);*/\n\t\t //HashMap headerParams = new HashMap(0);\n\t\t //headerParams.put(\"SOAPAction\", \"http://tempuri.org/Sell_Product\");\n\t\t /*HashMap paraMap = new HashMap();\n\t\t paraMap.put(\"xml\", reqXML);*/\n\t\t\t/*responseMap = HttpPosterCommons.getInstance().executeAsWebService(XML_API_PATH, null, reqXML, \n\t\t\t HttpPosterCommons.REQUEST_CONTENT_TYPE, HttpPosterCommons.REQUEST_CHAR_SET,\n\t\t\t headerParams);*/\t \n\t\t //HttpPosterCommons.getInstance().setProxySettings(\"192.168.95.2\", \"8080\", \"charith_02380\", \"m1n1st1r1th\");\n\t\t //HttpPosterCommons.getInstance().setHttpConnectionSettings(30, 10000, 30, true, null);\n\t\t //responseMap = HttpPosterCommons.getInstance().executeAsHttpRequest(XML_API_PATH, null, reqXML, null);\n\t\t \n\t\t /*HashMap loginPara = new HashMap();\n\t\t loginPara.put(\"action\", \"login\");\n\t\t loginPara.put(\"username\", \"test\");\n\t\t loginPara.put(\"password\", \"test\");\n\t\t loginPara.put(\"fmt\", \"xml\");\n\t\t responseMap = HttpPosterCommons.getInstance().executeAsHttpRequest(\n\t\t \"http://172.22.6.64:7070/corporate/ctrl/mylogin/login.jsp\", \n\t\t loginPara, null, null);\t\t \n\t\t\tString res = (String)responseMap.get(\"response\");\n\t\t\tSystem.out.println(\"respXML : \"+res);*/\n\t\t \n\t\t /*HttpPosterCommons.updateProxySettings(\"192.168.95.2\", \"8080\", \"charith_02380\", \"xxx\");\n\t\t HashMap response = HttpPosterCommons.getInstance().executeAsHttpRequest(\"http://www.defence.lk/news/rss20.xml\", null, HttpPosterCommons.GET_METHOD);\n\t\t if(response.get(HttpPosterCommons.GET_RESPONSE_STATUS_CODE).toString().trim().equalsIgnoreCase(\"200\")) {\n\t\t System.out.println(response.get(HttpPosterCommons.GET_RESPONSE_ERR_CONTENT).toString());\n\t\t } else {\n\t\t System.out.println(response.get(HttpPosterCommons.GET_RESPONSE_CONTENT).toString());\n\t\t }*/\n\t\t \n\t\t /*String reqXML = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\"+\n \"<soap:Envelope xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\" xmlns:soap=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">\"+\n \"<soap:Body>\"+\n \"<Sell_Product xmlns=\\\"http://tempuri.org/\\\">\"+\n \"<ezMARTUserName>princess_leia</ezMARTUserName>\"+\n \"<encryptedKey>string</encryptedKey>\"+\n \"<itemID>TEST0001</itemID>\"+\n \"<Price>10</Price>\"+\n \"<PriceRange>10</PriceRange>\"+\n \"<QuantityMin>1</QuantityMin>\"+\n \"<QuantityMax>10</QuantityMax>\"+\n \"<ValidityFrom>20100924</ValidityFrom>\"+\n \"<ValidityTo>20100930</ValidityTo>\"+\n \"<SpecialTerms>Testing</SpecialTerms>\"+\n \"<SendAlerts>0</SendAlerts>\"+\n \"</Sell_Product>\"+\n \"</soap:Body>\"+\n \"</soap:Envelope>\";\n\t\t \n\t\t HttpPosterCommons.updateProxySettings(\"proxy.dialog.dialoggsm.com\", \"8080\", \"charith_02380\", \"m1n1st1r1th!\");*/\n\t\t //HashMap response = HttpPosterCommons.getInstance().executeGetRequest(\"http://www.dinamani.com/edition/rssSectionXml.aspx?SectionId=164\", null, true, \"UTF-8\", null);\n\t\t //HashMap response = HttpPosterCommons.getInstance().executeGetRequest(\"http://www.jasminenews.com/lankanews/sinhala/feed\", null, true, \"UTF-8\");\n\t\t //HashMap response = HttpPosterCommons.getInstance().executeGetRequest(\"http://www.jasminenews.com/lankanews/sinhala/feed\", null, true);\n\t\t //HashMap response = HttpPosterCommons.getInstance().executeGetRequest(\"http://www.vimasuma.com/rss/dialog_rss_vimasuma.xml\", null, true);\n\t\t /*HashMap response = HttpPosterCommons.getInstance().executeAsWebService(\n\t\t \"http://172.26.66.30/Ws_eZMART_Upload/WS_eZMARTUpload.asmx\", \n\t\t null, reqXML, \n HttpPosterCommons.REQUEST_CONTENT_TYPE, HttpPosterCommons.REQUEST_CHAR_SET,\n headerParams);\n\t\t if(response.get(HttpPosterCommons.GET_RESPONSE_STATUS_CODE).toString().trim().equalsIgnoreCase(\"200\")) {\n\t\t String str = response.get(HttpPosterCommons.GET_RESPONSE_ERR_CONTENT).toString();\n\t\t Document doc = Utility.convertXMLStr2DOMDoc(str, \"UTF-8\");\n System.out.println(doc.getRootElement().getChildren());\n\t\t System.out.println(str);\n } else {\n System.out.println(response.get(HttpPosterCommons.GET_RESPONSE_CONTENT).toString());\n }*/\n\t\t\t\n\t\t\t/*HashMap addPara = new HashMap();\n loginPara.put(\"action\", \"AddNewDistCont\");\n loginPara.put(\"distID\", \"85\");\n loginPara.put(\"distContNo\", \"777335372\");\n loginPara.put(\"distContDesc\", \"Praveen Dangalla\");\n loginPara.put(\"fmt\", \"xml\");\n\t\t\tresponseMap = HttpPosterCommons.getInstance().executeAsHttpRequest(\n\t\t\t \"http://172.22.6.64:7070/corporate/ctrl/distributions/corpDistCtrl.jsp\", \n\t\t\t loginPara, null, null); \n res = (String)responseMap.get(\"response\");\n System.out.println(\"respXML : \"+res);*/\n\t\t\t//GenericResponse genRes = ResponseParser.parse2GenericResponse(res);\n\t\t\t//System.out.println(genRes);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public static void testISPIssuesPlanMetrics(){\r\n\t\ttry {\r\n\t\t\tLogFunctions.generateLogsDirectory();\t\r\n\t\t\t\r\n\t\t\tGlobalVariables.steps = 0;\r\n\t\t\tGlobalVariables.testCaseId = \"REST004_ISPIssuesPlanMetrics\";\r\n\t\t\t\r\n\t\t\t// Create Log Files\r\n\t\t\tGlobalVariables.testResultLogFile = LogFunctions.generateLogFile(GlobalVariables.logFile + \"_\"+ GlobalVariables.testCaseId + \".log\");\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Test Case : REST004_ISPIssuesPlanMetrics Execution Started\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") REST004_ISPIssuesPlanMetrics Execution Started\");\r\n\t\t\t\r\n\t\t\t// For managing SSL connections\r\n\t\t\tConfigurations.validateTrustManager();\r\n\t\t\t\r\n\t\t\t// Reading input data from CSV File\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tConfigurations.getTestData(\"REST004_ISPIssues.csv\");\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Reading Data From CSV File\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Reading Data From CSV File\");\r\n\r\n\t\t\t// Send Request\r\n\t\t\tString data =GlobalVariables.testData.get(\"api\")+\"/version/\"+GlobalVariables.testData.get(\"versionNumber\")+\"/issues\";\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tConfigurations.sendRequest(data);\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Sending Request\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Request Sent\");\r\n\t\t\t\r\n\t\t\t// Receive Response in XML File (response.xml)\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tConfigurations.getResponse();\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Getting Response\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Response Received\");\r\n\t\t\t\r\n\t\t\t// Assertion: Verify that Plan Metrics\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tboolean planAgentResult;\r\n\t\t\t// Verify Count Name\r\n\t\t\tplanAgentResult=Configurations.parseResponse(\"count\",\"type\",GlobalVariables.testData.get(\"countType\"));\t\r\n\t\t\tAssert.assertEquals(\"Count type is\",true,planAgentResult);\r\n\t\t\t// Verify Count Value\r\n\t\t\tplanAgentResult=Configurations.parseResponse(\"count\",\"value\",GlobalVariables.testData.get(\"countValue\"));\t\r\n\t\t\tAssert.assertEquals(\"Count Value is\",true,planAgentResult);\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Plan Summary Assertion Pass\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Assertion Pass\");\r\n\t\t\t\r\n\t\t\t// Execution Completed\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Test Case : REST004_ISPIssuesPlanMetrics Execution Completed\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps+ \") Test Case : REST004_ISPIssuesPlanMetrics Execution Completed\");\r\n\t\t\t\r\n\t\t}catch (AssertionError ar) {\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\")Assertion Failed : \");\r\n\t\t\tar.printStackTrace();\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Assertion Failed\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogFunctions.logException(e.getMessage());\r\n\t\t}\r\n\t}", "@Test\r\n public void testCalculateNet() {\r\n int hours = 30;\r\n int rate = 15;\r\n int tax = 58;\r\n CalculateNet test = new CalculateNet();\r\n int result = CalculateNet.calculateNet(hours, rate, tax);\r\n assertEquals(392, result);\r\n }", "@Test\r\n\tpublic void smr142() {\r\n\t\ttry{\r\n\t\t\tfinal String firstName=testDataOR.get(\"superuser_first_name\"),lastName=testDataOR.get(\"superuser_last_name\");\r\n\t\t\tlogin(\"URLEverest\",testDataOR.get(\"superuser\"),firstName,lastName);\r\n\t\t\tlogger.info(\"SMR142 execution started\");\r\n\t\t\tfinal String numComm=testDataOR.get(\"num_comm\"),cust=testDataOR.get(\"customer\")\r\n\t\t\t\t\t,posNum=testDataOR.get(\"pos_number\"),dbEportal=testDataOR.get(\"databaseEportal\"),dbAxis=testDataOR.get(\"databaseAxis\")\r\n\t\t\t\t\t,pos,numptv,numcom;\r\n\t\t\tfinal String[] posLoc={\"posrefund_xpath\",\"posforcing_xpath\",\"posvoid_xpath\",\"posnumcomm_xpath\"},\r\n\t\t\t\t\tposVal={testDataOR.get(\"refund_option\"),testDataOR.get(\"forcing_option\"),testDataOR.get(\"void_option\"),numComm};\r\n\t\t\t\r\n\t\t\t//Access Everest with the Everest superuser\r\n\t\t\t//Navigate to Card Payment-Customer Provisioning and select the \r\n\t\t\t//customer\r\n\t\t\taddProfToCust(cust);\r\n\r\n\t\t\t//Select 'Manual localization',pos and click Next\t\r\n\t\t\tlogger.info(\"Step 6:\");\r\n\t\t\tselUtils.selectItem(selUtils.getObject(\"operationorder_id\"), MANUALLOCALZTION);\r\n\t\t\tlogger.info(\"Selected \"+MANUALLOCALZTION);\r\n\t\t\tselUtils.clickOnWebElement(selUtils.getObject(\"pos_radiobttn_xpath\"));\r\n\t\t\tselUtils.clickOnWebElement(selUtils.getObject(\"orderopenext_id\"));\r\n\r\n\t\t\t//Select a lowest level zone and click Next\r\n\t\t\tlogger.info(\"Step 7:\");\r\n\t\t\tselUtils.selectItem(selUtils.getObject(\"localization_id\"), testDataOR.get(\"lowest_level_zone_a\"));\r\n\t\t\tselUtils.clickOnWebElement(selUtils.getObject(\"localizationnext_xpath\"));\r\n\t\t\tlogger.info(\"Selected a lowest level zone and next button\");\r\n\t\t\t\r\n\t\t\t//Select the <num_comm> from the dropdown list,click 'Next' button\r\n\t\t\tlogger.info(\"Step 8:\");\r\n\t\t\tselUtils.selectItem(selUtils.getObject(\"numcomm_selection_id\"), numComm);\r\n\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].click();\", selUtils.getObject(\"locnext_id\"));\r\n\t\t\tlogger.info(\"Selected numcomm zone and next button\");\r\n\r\n\t\t\t\r\n\t\t\t//select manual pos,and add pos details\r\n\t\t\tlogger.info(\"Step 9:\");\r\n\t\t\tselUtils.slctChkBoxOrRadio(selUtils.getObject(\"enterposanual_xpath\"));\r\n\t\t\tselUtils.clickOnWebElement(selUtils.getObject(\"addpos_xpath\"));\r\n\t\t\tselUtils.getObject(\"posnumber_id\").sendKeys(posNum);\r\n\t\t\taddPOSval(posLoc, posVal);\r\n\t\t\t\r\n\t\t\t//Edit projectname and deploy\r\n\t\t\teditPNameNDeply();\r\n\t\t\t\r\n\t\t\tif(dbCheck){\r\n\t\t\t\t//validating data with database,validate data in Eportal database\r\n\t\t\t\tsqlQuery = \"SELECT * FROM pos WHERE pos='\"+posNum+\"'\";\r\n\t\t\t\tresSet = dbMethods.getDataBaseVal(dbEportal,sqlQuery,CommonConstants.ONEMIN);\r\n\t\t\t\tpos=resSet.getString(\"pos\");\r\n\t\t\t\tAssert.assertTrue(pos.equals(posNum), \"Table data does not exist \");\r\n\t\t\t\tlogger.info(\"pos number \"+posNum+ \" exists in table\");\r\n\r\n\t\t\t\t//Validating the results in Axis database\r\n\t\t\t\tsqlQuery=\"SELECT numtpv,numcomm FROM emv.tpvemv WHERE numtpv='\"+posNum+\"' AND numcomm='\"+numComm+\"';\";\r\n\t\t\t\tresSet = dbMethods.getDataBaseVal(dbAxis,sqlQuery,CommonConstants.ONEMIN);\r\n\t\t\t\tnumptv=resSet.getString(\"numtpv\");\r\n\t\t\t\tnumcom=resSet.getString(\"numcomm\");\r\n\t\t\t\tAssert.assertTrue(numptv.equals(posNum)&&numcom.equals(numComm), \"Table data does not exist \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlogger.info(\"SMR142 executed successfully\");\r\n\t\t}\r\n\t\tcatch (Throwable t) {\r\n\t\t\thandleException(t);\r\n\t\t}\r\n\t}", "@WebMethod(operationName = \"CalcularPP\")\n public String CalcularPP(@WebParam(name = \"xml\")String xml)\n {\n try\n {\n if(xml == null)\n return xmlVacioExpt;\n ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes());\n DocumentBuilderFactory dbfacIN = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilderIN = dbfacIN.newDocumentBuilder();\n Document docIN = docBuilderIN.parse(bais);\n if( docIN.getDocumentElement().getNodeName().equals(\"EntradaCalculadoraPP\"))\n {\n int cliId = GetValueInt(docIN, \"CLI_ID\");\n int cliSap = GetValueInt(docIN, \"CLI_SAP\");\n String cliApePat = GetValue(docIN, \"CLI_APE_PAT\");\n String cliApeMat = GetValue(docIN, \"CLI_APE_MAT\");\n String cliNom = GetValue(docIN, \"CLI_NOM\");\n String cliFecNac = GetValue(docIN, \"CLI_FEC_NAC\");\n String cliDomCal = GetValue(docIN,\"CLI_DOM_CAL\");\n String cliDomNumExt = GetValue(docIN,\"CLI_DOM_NUM_EXT\");\n String cliDomNumInt = GetValue(docIN,\"CLI_DOM_NUM_INT\");\n String cliDomCol = GetValue(docIN,\"CLI_DOM_COL\");\n String codPosId = GetValue(docIN,\"COD_POS_ID\");\n\n int estado = GetValueInt(docIN, \"ESTADO\");\n int edad = GetValueInt(docIN, \"EDAD\");\n int ocupacion = GetValueInt(docIN, \"OCUPACION\");\n String fecha = GetValue(docIN, \"FECHA\");\n float mensualidad = GetValueInt(docIN, \"CUOTA\");\n float valor_vivienda = GetValueInt(docIN, \"VALOR_VIVIENDA\");\n\n if(estado<1 || ocupacion<1)\n return datosErrorExpt+\"ESTADO,OCUPACION\";\n if(edad<18 && edad>65)\n return ErrorEdadExpt;\n\n\n\n //Crear un XML vacio\n DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = dbfac.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n //Crear el Arbol XML\n\n //Añadir la raiz\n Element raiz = doc.createElement(\"SalidaCalculadoraPP\");\n doc.appendChild(raiz);\n\n //Crear hijs y adicionarlos a la raiz\n AgregarNodo(raiz,doc,\"CLI_ID\",Integer.toString(cliId));\n AgregarNodo(raiz,doc,\"CLI_SAP\",Integer.toString(cliSap));\n\n Session s = objetos.HibernateUtil.getSessionFactory().getCurrentSession();\n \n Transaction tx = s.beginTransaction();\n Query q = s.createQuery(\"from Edo as edo where edo.cal.calId = '6'\");\n List lista = (List) q.list();\n double estado_woe = ((Edo)lista.get(estado-1)).getEdoWoe();\n double recargo = ((Edo)lista.get(estado-1)).getEdoRcg();\n\n q = s.createQuery(\"from RngEda as eda where eda.calId='6' and eda.rngEdaLimInf<=\"+edad+\" and eda.rngEdaLimSup>=\"+edad);\n lista = (List) q.list();\n double edad_woe = ((RngEda)lista.get(0)).getRngEdaWoe();\n\n q = s.createQuery(\"from Ocp as ocp where ocp.cal.calId = '6' and ocp.ocpOrdPre=\"+ocupacion);\n lista = (List) q.list();\n double ocupacion_woe = ((Ocp)lista.get(0)).getOcpWoe();\n\n // double zeta = 0.018-(0.01)*estado_woe-(0.017)*edad_woe-(0.008)*ocupacion_woe;\n double zeta = 0.018146691102274-(0.00993013369427481)* estado_woe -(0.017366941566975)* edad_woe -(0.00838465419451784)* ocupacion_woe;\n double pi = Math.exp(zeta)/(1+Math.exp(zeta));\n\n q = s.createQuery(\"from IntPi as intPi where intPi.cal.calId='6' and intPi.intPiLimInf<=\"+pi+\" and intPi.intPiLimSup>=\"+pi);\n lista = (List) q.list();\n String clasificacion = ((IntPi)lista.get(0)).getIntPiDes();\n\n q = s.createQuery(\"from FtrPpr as fp where fp.ftrPprCls='\"+clasificacion+\"' and fp.ftrPprMes=\"+fecha);\n lista = (List) q.list();\n double cuota = ((FtrPpr)lista.get(0)).getFtrPprFtr();\n\n double ppr = valor_vivienda*cuota;\n double cuota_pprr = cuota * (1 + recargo);\n double pprr = valor_vivienda *cuota_pprr;\n\n\n System.out.println(estado_woe);\n System.out.println(recargo);\n System.out.println(edad_woe);\n System.out.println(ocupacion_woe);\n System.out.println(zeta);\n System.out.println(pi);\n System.out.println(clasificacion);\n System.out.println(cuota);\n System.out.println(ppr);\n System.out.println(cuota_pprr);\n System.out.println(pprr);\n\n\n AgregarNodo(raiz,doc,\"CUOTA_PURA_RIESGO\",Double.toString(cuota*100)+\"%\");\n AgregarNodo(raiz,doc,\"CUOTA_RECARGADAD\",Double.toString(cuota_pprr*100)+\"%\");\n AgregarNodo(raiz,doc,\"PRIMA_PURA_RIESGO\",\"$\"+Double.toString(ppr));\n AgregarNodo(raiz,doc,\"PRIMA_PURA_RIESO_RECARGADA\",\"$\"+Double.toString(pprr));\n //Salida del XML\n TransformerFactory transfac = TransformerFactory.newInstance();\n Transformer trans = transfac.newTransformer();\n trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n trans.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\n StringWriter sw = new StringWriter();\n StreamResult result = new StreamResult(sw);\n DOMSource source = new DOMSource(doc);\n trans.transform(source, result);\n String xmlString = sw.toString();\n\n return xmlString;\n }else\n return tabNoEncontradoExpt+\"EntradaCalculadoraPP\";\n } catch (ParserConfigurationException parE) {\n return xmlExpt;\n } catch (SAXException saxE) {\n return xmlExpt;\n } catch (IOException ioE) {\n return xmlExpt;\n } catch (Exception e) {\n return e.getMessage();\n }\n }", "@Test\n public void testGetPatientByNumeroSecu() throws Exception {\n System.out.println(\"getPatientByNumeroSecu\");\n String wscaller = \"\";\n Integer num_secu = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MonWebService instance = (MonWebService)container.getContext().lookup(\"java:global/classes/MonWebService\");\n PatientByNumeroSecuResponse expResult = null;\n PatientByNumeroSecuResponse result = instance.getPatientByNumeroSecu(wscaller, num_secu);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@WebService(name = \"TrainPortType\", targetNamespace = \"http://mohamed.nl/treinservice/\")\n@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface TrainPortType {\n\n\n /**\n * \n * @param station\n * @return\n * returns int\n * @throws GetTotalRidesError\n */\n @WebMethod(action = \"getTotalRides\")\n @WebResult(name = \"totalrides\", targetNamespace = \"http://mohamed.nl/treinservice/response/\", partName = \"total\")\n public int getTotalRides(\n @WebParam(name = \"station\", targetNamespace = \"http://mohamed.nl/treinservice/request/\", partName = \"station\")\n String station)\n throws GetTotalRidesError\n ;\n\n /**\n * \n * @param station\n * @return\n * returns int\n * @throws GetTotalEnergyConsumptionError\n */\n @WebMethod(action = \"getTotalEnergyConsumption\")\n @WebResult(name = \"energy\", targetNamespace = \"http://mohamed.nl/treinservice/response/\", partName = \"total-energy\")\n public int getTotalEnergyConsumption(\n @WebParam(name = \"station\", targetNamespace = \"http://mohamed.nl/treinservice/request/\", partName = \"station\")\n String station)\n throws GetTotalEnergyConsumptionError\n ;\n\n /**\n * \n * @param station\n * @return\n * returns int\n * @throws GetTotalEnergyConsumptionPerHourError\n */\n @WebMethod(action = \"getTotalEnergyConsumptionPerHour\")\n @WebResult(name = \"energy\", targetNamespace = \"http://mohamed.nl/treinservice/response/\", partName = \"energy-per-hour\")\n public int getTotalEnergyConsumptionPerHour(\n @WebParam(name = \"station\", targetNamespace = \"http://mohamed.nl/treinservice/request/\", partName = \"station\")\n String station)\n throws GetTotalEnergyConsumptionPerHourError\n ;\n\n /**\n * \n * @param station\n * @return\n * returns int\n * @throws GetTotalEnergyConsumptionHourError\n */\n @WebMethod(action = \"getTotalEnergyConsumptionHour\")\n @WebResult(name = \"energy\", targetNamespace = \"http://mohamed.nl/treinservice/response/\", partName = \"energy-per-hour\")\n public int getTotalEnergyConsumptionHour(\n @WebParam(name = \"station-hours\", targetNamespace = \"http://mohamed.nl/treinservice/request/\", partName = \"station\")\n StationHours station)\n throws GetTotalEnergyConsumptionHourError\n ;\n\n /**\n * \n * @param station\n * @return\n * returns java.lang.String\n * @throws GetAllRidesError\n */\n @WebMethod(action = \"getAllRides\")\n @WebResult(name = \"rides\", targetNamespace = \"http://mohamed.nl/treinservice/response/\", partName = \"stations\")\n public String getAllRides(\n @WebParam(name = \"station\", targetNamespace = \"http://mohamed.nl/treinservice/request/\", partName = \"station\")\n String station)\n throws GetAllRidesError\n ;\n\n /**\n * \n * @param station\n * @return\n * returns java.lang.String\n * @throws GetStationedTrainsError\n */\n @WebMethod(action = \"getStationedTrains\")\n @WebResult(name = \"stationed-trains\", targetNamespace = \"http://mohamed.nl/treinservice/response/\", partName = \"stationed-trains\")\n public String getStationedTrains(\n @WebParam(name = \"station\", targetNamespace = \"http://mohamed.nl/treinservice/request/\", partName = \"station\")\n String station)\n throws GetStationedTrainsError\n ;\n\n}", "@Test\n public void testStoreSaleAdjSale1() {\n String responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"0\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"1\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"ocurrence\", \"2\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"2\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"operator\", \"1\").request().get(String.class);\n assertEquals(\"SUCCESS\", responseMsg);\n }", "@WebService(name = \"IPartnerIntegrationService\", targetNamespace = \"http://tempuri.org/\")\r\n@XmlSeeAlso({\r\n ObjectFactory.class\r\n})\r\npublic interface IPartnerIntegrationService {\r\n\r\n\r\n /**\r\n * \r\n * @param partnerIntegrationXML\r\n * @return\r\n * returns java.lang.String\r\n */\r\n @WebMethod(operationName = \"SavePartner_integration\", action = \"http://tempuri.org/IPartnerIntegrationService/SavePartner_integration\")\r\n @WebResult(name = \"SavePartner_integrationResult\", targetNamespace = \"http://tempuri.org/\")\r\n @RequestWrapper(localName = \"SavePartner_integration\", targetNamespace = \"http://tempuri.org/\", className = \"com.kotak.SavePartnerIntegration\")\r\n @ResponseWrapper(localName = \"SavePartner_integrationResponse\", targetNamespace = \"http://tempuri.org/\", className = \"com.kotak.SavePartnerIntegrationResponse\")\r\n public String savePartnerIntegration(\r\n @WebParam(name = \"Partner_integrationXML\", targetNamespace = \"http://tempuri.org/\")\r\n String partnerIntegrationXML);\r\n\r\n /**\r\n * \r\n * @param strPolicyIssueTime\r\n * @param strTransactionID\r\n * @param strCustomerName\r\n * @param strTransactionRef\r\n * @param strProdType\r\n * @param strPolicyNo\r\n * @param strPassword\r\n * @param strUserId\r\n * @param strPolicyPDF\r\n * @return\r\n * returns com.kotak.ClsSignPDF\r\n */\r\n @WebMethod(operationName = \"GetSignPolicyPDF\", action = \"http://tempuri.org/IPartnerIntegrationService/GetSignPolicyPDF\")\r\n @WebResult(name = \"GetSignPolicyPDFResult\", targetNamespace = \"http://tempuri.org/\")\r\n @RequestWrapper(localName = \"GetSignPolicyPDF\", targetNamespace = \"http://tempuri.org/\", className = \"com.kotak.GetSignPolicyPDF\")\r\n @ResponseWrapper(localName = \"GetSignPolicyPDFResponse\", targetNamespace = \"http://tempuri.org/\", className = \"com.kotak.GetSignPolicyPDFResponse\")\r\n public ClsSignPDF getSignPolicyPDF(\r\n @WebParam(name = \"strUserId\", targetNamespace = \"http://tempuri.org/\")\r\n String strUserId,\r\n @WebParam(name = \"strPassword\", targetNamespace = \"http://tempuri.org/\")\r\n String strPassword,\r\n @WebParam(name = \"strProdType\", targetNamespace = \"http://tempuri.org/\")\r\n String strProdType,\r\n @WebParam(name = \"strPolicyNo\", targetNamespace = \"http://tempuri.org/\")\r\n String strPolicyNo,\r\n @WebParam(name = \"strPolicyIssueTime\", targetNamespace = \"http://tempuri.org/\")\r\n String strPolicyIssueTime,\r\n @WebParam(name = \"strTransactionID\", targetNamespace = \"http://tempuri.org/\")\r\n String strTransactionID,\r\n @WebParam(name = \"strTransactionRef\", targetNamespace = \"http://tempuri.org/\")\r\n String strTransactionRef,\r\n @WebParam(name = \"strCustomerName\", targetNamespace = \"http://tempuri.org/\")\r\n String strCustomerName,\r\n @WebParam(name = \"strPolicyPDF\", targetNamespace = \"http://tempuri.org/\")\r\n byte[] strPolicyPDF);\r\n\r\n}", "public static void main(String[] args){\n int months = 48;\n double principal = 25000.0;\n double intrate = 3.85;\n PICalcJson myCalc = new PICalcJson();\n String result = myCalc.calculatePayment(months,principal,intrate);\n System.out.format(\"%s\", result);\n}", "@Test\n\t\tpublic void debitCollectionSEPA() throws Exception {\n\t\t\ttry {\n\t\t\t\t// Launch the browser and load the default URL\n\t\t\t\tUtility.initConfiguration();\n\t\t\t\tThread.sleep(3000);\n\t\t\t\t// Login to back end and check payment method is enabled or disabled\n\t\t\t\tUtility.wooCommerceBackEndLogin();\n\t\t\t\tThread.sleep(3000);\n\t\t\t\tElementLocators element = PageFactory.initElements(driver, ElementLocators.class);\n\t\t\t\t// Title for HTML report\n\t\t\t\ttest = extend.createTest(\"Vendor script execution for SEPA 'DEBT_COLLECTION_SEPA'\");\n\t\t\t\t// Steps\n\t\t\t\tActions actions = new Actions(driver);\n\t\t\t\tactions.moveToElement(element.WooCommerce).perform();\n\t\t\t\tThread.sleep(3000);\n\t\t\t\telement.WooCommerce_Settings.click();\n\t\t\t\telement.Payment_Tab.click();\n\t\t\t\tThread.sleep(2000);\n\t\t\t\telement.Sepa_Payment_Display.click();\n\t\t\t\t// Checking payment method enabled or disabled\n\t\t\t\tif (!element.Sepa_Enable_Payment_Method_Checkbox.isSelected()) {\n\t\t\t\t\telement.Sepa_Enable_Payment_Method_Checkbox.click();\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t}\n\t\t\t\t// Checking Guarantee payment enabled or disabled\n\t\t\t\tif (element.Sepa_Enable_Payment_Guarantee_CheckBox.isSelected()) {\n\t\t\t\t\telement.Sepa_Enable_Payment_Guarantee_CheckBox.click();\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t}\n\t\t\t\telement.Sepa_Payment_Save_Changes.click();\n\t\t\t\tThread.sleep(3000);\n\t\t\t\tdriver.navigate().to(Constant.shopfrontendurl);\n\t\t\t\tThread.sleep(3000);\n\t\t\t\tUtility.wooCommerceCheckOutProcess();\n\t\t\t\tThread.sleep(4000);\n\t\t\t\t// Read the data from excel sheet\n\t\t\t\tMap<String, String> UserData = new HashMap<String, String>();\n\t\t\t\tUserData = Data.ExcelReader_PaymentMethods();\n\t\t\t\t// Check whether payment method is displayed in checkout page\n\t\t\t\tif (element.Sepa_Label.isDisplayed()) {\n\t\t\t\t\tif (element.Sepa_Radio_button.isDisplayed() == true) {\n\t\t\t\t\t\telement.Sepa_Radio_button.click();\n\t\t\t\t\t}\n\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\t\t\telement.Sepa_Iban_TextBox.sendKeys(UserData.get(\"SEPAIBAN\"));\n\t\t\t\t\telement.Place_Order.click();\n\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(25, TimeUnit.SECONDS);\n\t\t\t\t\t// After order placed successfully verify Thank you message displayed\n\t\t\t\t\tString thankyoumessage = element.FE_Thank_You_Page_Text.getText();\n\t\t\t\t\tif (thankyoumessage.equals(\"Thank you. Your order has been received.\")) {\n\t\t\t\t\t\tSystem.out.println(\"Order placed successfully using Direct Debit SEPA\");\n\t\t\t\t\t\ttest.log(Status.INFO, \"Order placed successfully using Direct Debit SEPA\");\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t\t// Get the amount from order success page front end\n\t\t\t\t\t\tString totalOrderAmount = element.OrderDetails_TotalAmount.getText().replaceAll(\"[^0-9]\", \"\");\n\t\t\t\t\t\t// Get the TID from order success page front end\n\t\t\t\t\t\tString TID = element.OrderDetails_Note_TID.getText().replaceAll(\"[^0-9]\", \"\");\n\t\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\t\t\t\t// Go to callback execution site and enter vendor script URL\n\t\t\t\t\t\tdriver.navigate().to(Constant.vendorscripturl);\n\t\t\t\t\t\tThread.sleep(4000);\n\t\t\t\t\t\telement.Vendor_Script_Url.sendKeys((Constant.shopfrontendurl) + \"?wc-api=novalnet_callback\");\n\t\t\t\t\t\t// Enter required parameter\n\t\t\t\t\t\telement.Vendor_Id.clear();\n\t\t\t\t\t\telement.Vendor_Id.sendKeys(\"4\");\n\t\t\t\t\t\telement.Vendor_Auth_Code.clear();\n\t\t\t\t\t\telement.Vendor_Auth_Code.sendKeys(\"JyEtHUjjbHNJwVztW6JrafIMHQvici\");\n\t\t\t\t\t\telement.Product_Id.clear();\n\t\t\t\t\t\telement.Product_Id.sendKeys(\"14\");\n\t\t\t\t\t\telement.Tariff_Id.clear();\n\t\t\t\t\t\telement.Tariff_Id.sendKeys(\"30\");\n\t\t\t\t\t\telement.Payment_Type_Edit_Button.click();\n\t\t\t\t\t\tSelect selectpaymenttype = new Select(element.Payment_Type_Selectbox);\n\t\t\t\t\t\tselectpaymenttype.selectByVisibleText(\"DEBT_COLLECTION_SEPA\");\n\t\t\t\t\t\telement.Test_Mode.clear();\n\t\t\t\t\t\telement.Test_Mode.sendKeys(\"1\");\n\t\t\t\t\t\telement.Tid_Payment.clear();\n\t\t\t\t\t\telement.Tid_Payment.sendKeys(TID);\n\t\t\t\t\t\telement.Amount.clear();\n\t\t\t\t\t\telement.Amount.sendKeys(totalOrderAmount);\n\t\t\t\t\t\telement.Currency.clear();\n\t\t\t\t\t\telement.Currency.sendKeys(\"EUR\");\n\t\t\t\t\t\telement.Status.clear();\n\t\t\t\t\t\telement.Status.sendKeys(\"100\");\n\t\t\t\t\t\telement.Tid_Status.clear();\n\t\t\t\t\t\telement.Tid_Status.sendKeys(\"100\");\n\t\t\t\t\t\telement.Tid.clear();\n\t\t\t\t\t\telement.Tid.sendKeys(\"13245678945612345\");\n\t\t\t\t\t\telement.Execute_Button.click();\n\t\t\t\t\t\tString callback_message = element.callback_message.getText();\n\t\t\t\t\t\tString callback_message_updated = callback_message.substring(9, callback_message.length());\n\t\t\t\t\t\tSystem.out.println(\"Callback execution message: \" + callback_message_updated);\n\t\t\t\t\t\tif (callback_message.contains(\"Novalnet Callback Script executed successfully for the TID:\")) {\n\t\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t\t\tdriver.navigate().to(Constant.shopbackendurl);\n\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\tactions.moveToElement(element.WooCommerce).perform();\n\t\t\t\t\t\t\tThread.sleep(1500);\n\t\t\t\t\t\t\telement.WooCommerce_Orders.click();\n\t\t\t\t\t\t\telement.Backend_Order_Number.click();\n\t\t\t\t\t\t\tString BEOrderNotesMessage = element.BE_OrderNotes_Message.getText();\n\t\t\t\t\t\t\tSystem.out.println(\"Back end order note: \" + BEOrderNotesMessage);\n\t\t\t\t\t\t\tif (callback_message_updated.equals(BEOrderNotesMessage)) {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: DEBT_COLLECTION_SEPA execution message and back end order note message text was matched successfully\");\n\t\t\t\t\t\t\t\ttest.log(Status.PASS,\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: DEBT_COLLECTION_SEPA execution message and back end order note message text was matched successfully\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: DEBT_COLLECTION_SEPA execution message and back end order note message text was not matched\");\n\t\t\t\t\t\t\t\ttest.log(Status.FAIL,\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: DEBT_COLLECTION_SEPA execution message and back end order note message text was not matched\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"ERROR: Callback response message is displayed wrongly\");\n\t\t\t\t\t\t\ttest.log(Status.ERROR, \"ERROR: Callback response message is displayed wrongly\");\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"TC FAILED: Order was not placed successfully using Direct Debit SEPA\");\n\t\t\t\t\ttest.log(Status.FAIL, \"TC FAILED: Order was not placed successfully using Direct Debit SEPA\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Close browser\n\t\t\tUtility.closeBrowser();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"ERROR: Unexpected error from 'debitCollectionSEPA' method\");\n\t\t\ttest.log(Status.ERROR, \"ERROR: Unexpected error from 'debitCollectionSEPA' method\");\n\t\t}\n\t}", "@Test\n public void testSumEstimatedProxySizeActualDevelopmentTime()\n {\n assertEquals(this.linealRegressionCalculator.sumEstimatedProxySizeActualDevelopmentTime(), 411628.6, 0.01); \n }", "@Test\n public void test1() throws Exception {\n System.out.printf(\"\\n%s\\n\", Marshall\n .getInstance()\n .marshal(\n new MobilePayRequest()\n .setSystemId(16)\n .setDate(new Date())\n .setPayId(12414L)\n .setCard(\"5577 2127 0898 5646\")\n .setPhone(\"+380937103721\")\n .setAmount(10.1)\n .setUserId(4234L)\n .setUserLogin(\"+380937103721\")\n .setIp(\"127.0.0.1\"),\n MarshallProperties.FORMATTED_OUTPUT));\n }", "public static void main(String[] args) throws MalformedURLException {\n QName name=new QName(\"urn:com.seo\", \"TestWebService\");\n TestClient t=new TestClient(new URL(\"http://www.ramthoughts.com/TestWS/TestWebService?wsdl\"), name);\n// ((BindingProvider)t.getTestWSPort()).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,\"https://localhost:8080/TestWS/TestWebService\");\n System.out.println(t.getTestWSPort().test(\"hiii\"));\n }", "@Test\r\n void shouldReturnOneRiskPoint() {\r\n InsuranceRiskService insuranceRiskService = new DisabilityInsuranceRiskService();\r\n InsuranceRiskRequest insuranceRiskRequest = new InsuranceRiskRequest();\r\n insuranceRiskRequest.setAge(25);\r\n HouseRequest houseRequest = new HouseRequest();\r\n houseRequest.setOwnershipStatus(\"mortgaged\");\r\n insuranceRiskRequest.setHouse(houseRequest);\r\n insuranceRiskRequest.setIncome(BigDecimal.valueOf(999999));\r\n insuranceRiskRequest.setDependents(2);\r\n insuranceRiskRequest.setMaritalStatus(\"married\");\r\n Assertions.assertEquals(1, insuranceRiskService.calculate(3, insuranceRiskRequest));\r\n }", "@Test\n public void testStoreSaleAdjSale2() {\n String responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"0\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"1\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"ocurrence\", \"2\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"2\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"operator\", \"2\").request().get(String.class);\n assertEquals(\"SUCCESS\", responseMsg);\n }", "@Test\n public void testStoreSaleAdjSale0() {\n String responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"0\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"1\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"ocurrence\", \"2\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"2\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"operator\", \"0\").request().get(String.class);\n assertEquals(\"SUCCESS\", responseMsg);\n }", "@WebService\r\n\r\npublic interface QuotationService {\r\n\t@WebMethod public Quotation generateQuotation(ClientInfo info);\r\n\t\r\n\t\r\n\t}", "@WebService(targetNamespace = \"urn:sap-com:document:sap:rfc:functions\", name = \"ZSDRFC_AMC_CONTRACT_VALIDATION\")\n@XmlSeeAlso({ObjectFactory.class})\npublic interface ZSDRFCAMCCONTRACTVALIDATION {\n\n @WebMethod(operationName = \"ZSDRFC_AMC_CONTRACT_VALIDATION\", action = \"urn:sap-com:document:sap:rfc:functions:ZSDRFC_AMC_CONTRACT_VALIDATION:ZSDRFC_AMC_CONTRACT_VALIDATIONRequest\")\n @RequestWrapper(localName = \"ZSDRFC_AMC_CONTRACT_VALIDATION\", targetNamespace = \"urn:sap-com:document:sap:rfc:functions\", className = \"com.sap.document.sap.rfc.functions.ZSDRFCAMCCONTRACTVALIDATION_Type\")\n @ResponseWrapper(localName = \"ZSDRFC_AMC_CONTRACT_VALIDATIONResponse\", targetNamespace = \"urn:sap-com:document:sap:rfc:functions\", className = \"com.sap.document.sap.rfc.functions.ZSDRFCAMCCONTRACTVALIDATIONResponse\")\n public void zsdrfcAMCCONTRACTVALIDATION(\n @WebParam(name = \"CHASSIS_NO\", targetNamespace = \"\")\n java.lang.String chassisNO,\n @WebParam(name = \"CHASSIS_PL\", targetNamespace = \"\")\n java.lang.String chassisPL,\n @WebParam(name = \"CONTRACT_NO\", targetNamespace = \"\")\n java.lang.String contractNO,\n @WebParam(name = \"CRM_SALE_DATE\", targetNamespace = \"\")\n java.lang.String crmSALEDATE,\n @WebParam(mode = WebParam.Mode.INOUT, name = \"IT_AMC\", targetNamespace = \"\")\n javax.xml.ws.Holder<TABLEOFZSDAMCLINEITEM> itAMC,\n @WebParam(name = \"KMS\", targetNamespace = \"\")\n int kms,\n @WebParam(mode = WebParam.Mode.OUT, name = \"REMARKS\", targetNamespace = \"\")\n javax.xml.ws.Holder<java.lang.String> remarks\n );\n}", "@WebService(name = \"JMeadowsData\", targetNamespace = \"http://webservice.jmeadows.DNS /\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface JMeadowsData {\n\n\n /**\n * \n * @param siteCode\n * @param verifyCode\n * @param accessCode\n * @param requestingApp\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.User\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"login\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.Login\")\n @ResponseWrapper(localName = \"loginResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.LoginResponse\")\n public User login(\n @WebParam(name = \"siteCode\", targetNamespace = \"\")\n String siteCode,\n @WebParam(name = \"accessCode\", targetNamespace = \"\")\n String accessCode,\n @WebParam(name = \"verifyCode\", targetNamespace = \"\")\n String verifyCode,\n @WebParam(name = \"requestingApp\", targetNamespace = \"\")\n String requestingApp)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param authUserInfoQuery\n * @return\n * returns boolean\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"updateUserSubjectDN\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.UpdateUserSubjectDN\")\n @ResponseWrapper(localName = \"updateUserSubjectDNResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.UpdateUserSubjectDNResponse\")\n public boolean updateUserSubjectDN(\n @WebParam(name = \"authUserInfoQuery\", targetNamespace = \"\")\n AuthUserInfo authUserInfoQuery)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param siteCode\n * @param verifyCode\n * @param cardID\n * @param accessCode\n * @param ipAddress\n * @param requestingApp\n * @param subjectDN\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.User\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"loginEnterprise\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.LoginEnterprise\")\n @ResponseWrapper(localName = \"loginEnterpriseResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.LoginEnterpriseResponse\")\n public User loginEnterprise(\n @WebParam(name = \"cardID\", targetNamespace = \"\")\n String cardID,\n @WebParam(name = \"siteCode\", targetNamespace = \"\")\n String siteCode,\n @WebParam(name = \"accessCode\", targetNamespace = \"\")\n String accessCode,\n @WebParam(name = \"verifyCode\", targetNamespace = \"\")\n String verifyCode,\n @WebParam(name = \"requestingApp\", targetNamespace = \"\")\n String requestingApp,\n @WebParam(name = \"ipAddress\", targetNamespace = \"\")\n String ipAddress,\n @WebParam(name = \"subjectDN\", targetNamespace = \"\")\n String subjectDN)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Patient>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"lookupPatient\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.LookupPatient\")\n @ResponseWrapper(localName = \"lookupPatientResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.LookupPatientResponse\")\n public List<Patient> lookupPatient(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.ResponsePatientQuery\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"lookupPatientPDWS\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.LookupPatientPDWS\")\n @ResponseWrapper(localName = \"lookupPatientPDWSResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.LookupPatientPDWSResponse\")\n public ResponsePatientQuery lookupPatientPDWS(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n PdwsQueryBean queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.Patient\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"selectPatient\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.SelectPatient\")\n @ResponseWrapper(localName = \"selectPatientResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.SelectPatientResponse\")\n public Patient selectPatient(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.ResponsePatientSelect\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"selectPatientMVI\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.SelectPatientMVI\")\n @ResponseWrapper(localName = \"selectPatientMVIResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.SelectPatientMVIResponse\")\n public ResponsePatientSelect selectPatientMVI(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @RequestWrapper(localName = \"selectPatientForVASensitive\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.SelectPatientForVASensitive\")\n @ResponseWrapper(localName = \"selectPatientForVASensitiveResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.SelectPatientForVASensitiveResponse\")\n public void selectPatientForVASensitive(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @RequestWrapper(localName = \"auditVARestrictedAccess\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.AuditVARestrictedAccess\")\n @ResponseWrapper(localName = \"auditVARestrictedAccessResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.AuditVARestrictedAccessResponse\")\n public void auditVARestrictedAccess(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @RequestWrapper(localName = \"auditSensitiveRecordAccess\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.AuditSensitiveRecordAccess\")\n @ResponseWrapper(localName = \"auditSensitiveRecordAccessResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.AuditSensitiveRecordAccessResponse\")\n public void auditSensitiveRecordAccess(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.PatientAdmission>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientAdmissions\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientAdmissions\")\n @ResponseWrapper(localName = \"getPatientAdmissionsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientAdmissionsResponse\")\n public List<PatientAdmission> getPatientAdmissions(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.PatientHistory>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientHistory\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientHistory\")\n @ResponseWrapper(localName = \"getPatientHistoryResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientHistoryResponse\")\n public List<PatientHistory> getPatientHistory(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Allergy>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientAllergies\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientAllergies\")\n @ResponseWrapper(localName = \"getPatientAllergiesResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientAllergiesResponse\")\n public List<Allergy> getPatientAllergies(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Allergy>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getDODVLERPatientAllergies\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetDODVLERPatientAllergies\")\n @ResponseWrapper(localName = \"getDODVLERPatientAllergiesResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetDODVLERPatientAllergiesResponse\")\n public List<Allergy> getDODVLERPatientAllergies(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.AllergyDetail\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getAllergyDetail\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetAllergyDetail\")\n @ResponseWrapper(localName = \"getAllergyDetailResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetAllergyDetailResponse\")\n public AllergyDetail getAllergyDetail(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.FreeTextReport\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientEncountersReport\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientEncountersReport\")\n @ResponseWrapper(localName = \"getPatientEncountersReportResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientEncountersReportResponse\")\n public FreeTextReport getPatientEncountersReport(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.PatientAppointments>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientAppointments\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientAppointments\")\n @ResponseWrapper(localName = \"getPatientAppointmentsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientAppointmentsResponse\")\n public List<PatientAppointments> getPatientAppointments(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Encounter>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientEncounters\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientEncounters\")\n @ResponseWrapper(localName = \"getPatientEncountersResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientEncountersResponse\")\n public List<Encounter> getPatientEncounters(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.ClinicalReminder>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientClinicalReminders\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientClinicalReminders\")\n @ResponseWrapper(localName = \"getPatientClinicalRemindersResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientClinicalRemindersResponse\")\n public List<ClinicalReminder> getPatientClinicalReminders(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.FreeTextReport\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getClinicalReminderDetail\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetClinicalReminderDetail\")\n @ResponseWrapper(localName = \"getClinicalReminderDetailResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetClinicalReminderDetailResponse\")\n public FreeTextReport getClinicalReminderDetail(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.PatientDemographics>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientDemographics\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientDemographics\")\n @ResponseWrapper(localName = \"getPatientDemographicsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientDemographicsResponse\")\n public List<PatientDemographics> getPatientDemographics(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.PatientDemographicsDetail>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientDemographicsDetail\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientDemographicsDetail\")\n @ResponseWrapper(localName = \"getPatientDemographicsDetailResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientDemographicsDetailResponse\")\n public List<PatientDemographicsDetail> getPatientDemographicsDetail(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Immunization>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientImmunizations\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientImmunizations\")\n @ResponseWrapper(localName = \"getPatientImmunizationsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientImmunizationsResponse\")\n public List<Immunization> getPatientImmunizations(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.LabOrder>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientLabs\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientLabs\")\n @ResponseWrapper(localName = \"getPatientLabsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientLabsResponse\")\n public List<LabOrder> getPatientLabs(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.LabResult>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientLabResults\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientLabResults\")\n @ResponseWrapper(localName = \"getPatientLabResultsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientLabResultsResponse\")\n public List<LabResult> getPatientLabResults(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.FreeTextReport\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientLabReport\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientLabReport\")\n @ResponseWrapper(localName = \"getPatientLabReportResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientLabReportResponse\")\n public FreeTextReport getPatientLabReport(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Medication>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientMedications\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientMedications\")\n @ResponseWrapper(localName = \"getPatientMedicationsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientMedicationsResponse\")\n public List<Medication> getPatientMedications(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Form>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientForms\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientForms\")\n @ResponseWrapper(localName = \"getPatientFormsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientFormsResponse\")\n public List<Form> getPatientForms(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.ProgressNote>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientProgressNotes\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientProgressNotes\")\n @ResponseWrapper(localName = \"getPatientProgressNotesResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientProgressNotesResponse\")\n public List<ProgressNote> getPatientProgressNotes(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.NoteImage\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getBHIENoteImage\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetBHIENoteImage\")\n @ResponseWrapper(localName = \"getBHIENoteImageResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetBHIENoteImageResponse\")\n public NoteImage getBHIENoteImage(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.ProgressNote>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientDischargeSummaries\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientDischargeSummaries\")\n @ResponseWrapper(localName = \"getPatientDischargeSummariesResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientDischargeSummariesResponse\")\n public List<ProgressNote> getPatientDischargeSummaries(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Consult>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientConsultRequests\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientConsultRequests\")\n @ResponseWrapper(localName = \"getPatientConsultRequestsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientConsultRequestsResponse\")\n public List<Consult> getPatientConsultRequests(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Order>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientOrders\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientOrders\")\n @ResponseWrapper(localName = \"getPatientOrdersResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientOrdersResponse\")\n public List<Order> getPatientOrders(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Problem>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientProblemList\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientProblemList\")\n @ResponseWrapper(localName = \"getPatientProblemListResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientProblemListResponse\")\n public List<Problem> getPatientProblemList(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.RadiologyReport>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientRads\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientRads\")\n @ResponseWrapper(localName = \"getPatientRadsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientRadsResponse\")\n public List<RadiologyReport> getPatientRads(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Vitals>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientVitals\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientVitals\")\n @ResponseWrapper(localName = \"getPatientVitalsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientVitalsResponse\")\n public List<Vitals> getPatientVitals(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.LabResult>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientLabTestResults\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientLabTestResults\")\n @ResponseWrapper(localName = \"getPatientLabTestResultsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientLabTestResultsResponse\")\n public List<LabResult> getPatientLabTestResults(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.LabResult>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getLabOrderResult\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetLabOrderResult\")\n @ResponseWrapper(localName = \"getLabOrderResultResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetLabOrderResultResponse\")\n public List<LabResult> getLabOrderResult(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.AdmissionDetail\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getAdmissionDetails\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetAdmissionDetails\")\n @ResponseWrapper(localName = \"getAdmissionDetailsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetAdmissionDetailsResponse\")\n public AdmissionDetail getAdmissionDetails(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Diagnosis>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getAdmissionDiagnosis\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetAdmissionDiagnosis\")\n @ResponseWrapper(localName = \"getAdmissionDiagnosisResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetAdmissionDiagnosisResponse\")\n public List<Diagnosis> getAdmissionDiagnosis(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Procedure>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getAdmissionProcedures\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetAdmissionProcedures\")\n @ResponseWrapper(localName = \"getAdmissionProceduresResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetAdmissionProceduresResponse\")\n public List<Procedure> getAdmissionProcedures(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.FreeTextReport>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getConsultReport\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetConsultReport\")\n @ResponseWrapper(localName = \"getConsultReportResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetConsultReportResponse\")\n public List<FreeTextReport> getConsultReport(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.User\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getProviderProfile\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderProfile\")\n @ResponseWrapper(localName = \"getProviderProfileResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderProfileResponse\")\n public User getProviderProfile(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.FreeTextReport\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getMedicationDetail\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetMedicationDetail\")\n @ResponseWrapper(localName = \"getMedicationDetailResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetMedicationDetailResponse\")\n public FreeTextReport getMedicationDetail(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.FreeTextReport\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getOrderDetail\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetOrderDetail\")\n @ResponseWrapper(localName = \"getOrderDetailResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetOrderDetailResponse\")\n public FreeTextReport getOrderDetail(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Vitals>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientCurrentVitals\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientCurrentVitals\")\n @ResponseWrapper(localName = \"getPatientCurrentVitalsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientCurrentVitalsResponse\")\n public List<Vitals> getPatientCurrentVitals(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.InsuranceBean>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getPatientInsurances\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientInsurances\")\n @ResponseWrapper(localName = \"getPatientInsurancesResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetPatientInsurancesResponse\")\n public List<InsuranceBean> getPatientInsurances(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Procedure>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getOutpatientProcedures\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetOutpatientProcedures\")\n @ResponseWrapper(localName = \"getOutpatientProceduresResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetOutpatientProceduresResponse\")\n public List<Procedure> getOutpatientProcedures(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.ProblemDetail\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getProblemDetail\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProblemDetail\")\n @ResponseWrapper(localName = \"getProblemDetailResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProblemDetailResponse\")\n public ProblemDetail getProblemDetail(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.FreeTextReport\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getProgressNote\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProgressNote\")\n @ResponseWrapper(localName = \"getProgressNoteResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProgressNoteResponse\")\n public FreeTextReport getProgressNote(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.RadiologyReport\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getRadiologyReport\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetRadiologyReport\")\n @ResponseWrapper(localName = \"getRadiologyReportResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetRadiologyReportResponse\")\n public RadiologyReport getRadiologyReport(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.VlerDocument>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getVLERDocumentList\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetVLERDocumentList\")\n @ResponseWrapper(localName = \"getVLERDocumentListResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetVLERDocumentListResponse\")\n public List<VlerDocument> getVLERDocumentList(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param vDoc\n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.VlerDocument\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getVLERDocument\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetVLERDocument\")\n @ResponseWrapper(localName = \"getVLERDocumentResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetVLERDocumentResponse\")\n public VlerDocument getVLERDocument(\n @WebParam(name = \"vDoc\", targetNamespace = \"\")\n VlerDocument vDoc,\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Vlerccda>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getDODVLERPatientCCDA\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetDODVLERPatientCCDA\")\n @ResponseWrapper(localName = \"getDODVLERPatientCCDAResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetDODVLERPatientCCDAResponse\")\n public List<Vlerccda> getDODVLERPatientCCDA(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Alert>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getUserAlerts\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetUserAlerts\")\n @ResponseWrapper(localName = \"getUserAlertsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetUserAlertsResponse\")\n public List<Alert> getUserAlerts(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.FreeTextReport\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getVisitNotes\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetVisitNotes\")\n @ResponseWrapper(localName = \"getVisitNotesResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetVisitNotesResponse\")\n public FreeTextReport getVisitNotes(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param providerIen\n * @param siteCode\n * @param endDate\n * @param userNPI\n * @param patId\n * @param requestingApp\n * @param userName\n * @param category\n * @param userIen\n * @param startDate\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @RequestWrapper(localName = \"logAudit\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.LogAudit\")\n @ResponseWrapper(localName = \"logAuditResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.LogAuditResponse\")\n public void logAudit(\n @WebParam(name = \"siteCode\", targetNamespace = \"\")\n String siteCode,\n @WebParam(name = \"userIen\", targetNamespace = \"\")\n String userIen,\n @WebParam(name = \"providerIen\", targetNamespace = \"\")\n String providerIen,\n @WebParam(name = \"userNPI\", targetNamespace = \"\")\n String userNPI,\n @WebParam(name = \"userName\", targetNamespace = \"\")\n String userName,\n @WebParam(name = \"patId\", targetNamespace = \"\")\n String patId,\n @WebParam(name = \"category\", targetNamespace = \"\")\n String category,\n @WebParam(name = \"requestingApp\", targetNamespace = \"\")\n String requestingApp,\n @WebParam(name = \"startDate\", targetNamespace = \"\")\n String startDate,\n @WebParam(name = \"endDate\", targetNamespace = \"\")\n String endDate)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.PatientAppointments>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getProviderAppointments\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderAppointments\")\n @ResponseWrapper(localName = \"getProviderAppointmentsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderAppointmentsResponse\")\n public List<PatientAppointments> getProviderAppointments(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.PatientAdmission>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getProviderAdmissions\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderAdmissions\")\n @ResponseWrapper(localName = \"getProviderAdmissionsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderAdmissionsResponse\")\n public List<PatientAdmission> getProviderAdmissions(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.PatientAdmission>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getWardAdmissions\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetWardAdmissions\")\n @ResponseWrapper(localName = \"getWardAdmissionsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetWardAdmissionsResponse\")\n public List<PatientAdmission> getWardAdmissions(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.ProgressNote>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getProviderUnsignedNotes\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderUnsignedNotes\")\n @ResponseWrapper(localName = \"getProviderUnsignedNotesResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderUnsignedNotesResponse\")\n public List<ProgressNote> getProviderUnsignedNotes(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Consult>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getProviderConsultsRequested\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderConsultsRequested\")\n @ResponseWrapper(localName = \"getProviderConsultsRequestedResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderConsultsRequestedResponse\")\n public List<Consult> getProviderConsultsRequested(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Consult>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getProviderConsultsReceived\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderConsultsReceived\")\n @ResponseWrapper(localName = \"getProviderConsultsReceivedResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderConsultsReceivedResponse\")\n public List<Consult> getProviderConsultsReceived(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Order>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getProviderOrdersPending\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderOrdersPending\")\n @ResponseWrapper(localName = \"getProviderOrdersPendingResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderOrdersPendingResponse\")\n public List<Order> getProviderOrdersPending(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Order>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getProviderOrdersResulted\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderOrdersResulted\")\n @ResponseWrapper(localName = \"getProviderOrdersResultedResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderOrdersResultedResponse\")\n public List<Order> getProviderOrdersResulted(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.LabResult>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getProviderLabAbnormalResults\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderLabAbnormalResults\")\n @ResponseWrapper(localName = \"getProviderLabAbnormalResultsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderLabAbnormalResultsResponse\")\n public List<LabResult> getProviderLabAbnormalResults(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.lang.String\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getJanusGUIConfig\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetJanusGUIConfig\")\n @ResponseWrapper(localName = \"getJanusGUIConfigResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetJanusGUIConfigResponse\")\n public String getJanusGUIConfig(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param cfg\n * @param queryBean\n * @return\n * returns boolean\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"setJanusGUIConfig\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.SetJanusGUIConfig\")\n @ResponseWrapper(localName = \"setJanusGUIConfigResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.SetJanusGUIConfigResponse\")\n public boolean setJanusGUIConfig(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean,\n @WebParam(name = \"cfg\", targetNamespace = \"\")\n String cfg)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param queryBean\n * @return\n * returns java.lang.String\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getProviderFlags\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderFlags\")\n @ResponseWrapper(localName = \"getProviderFlagsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetProviderFlagsResponse\")\n public String getProviderFlags(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param flags\n * @param queryBean\n * @return\n * returns boolean\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"setProviderFlags\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.SetProviderFlags\")\n @ResponseWrapper(localName = \"setProviderFlagsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.SetProviderFlagsResponse\")\n public boolean setProviderFlags(\n @WebParam(name = \"queryBean\", targetNamespace = \"\")\n JMeadowsQuery queryBean,\n @WebParam(name = \"flags\", targetNamespace = \"\")\n String flags)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param smartCardID\n * @param smartCardAgency\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.IehrUserProfile\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getIehrUserProfile\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetIehrUserProfile\")\n @ResponseWrapper(localName = \"getIehrUserProfileResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetIehrUserProfileResponse\")\n public IehrUserProfile getIehrUserProfile(\n @WebParam(name = \"smartCardID\", targetNamespace = \"\")\n String smartCardID,\n @WebParam(name = \"smartCardAgency\", targetNamespace = \"\")\n String smartCardAgency)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @param iehrUserProfile\n * @return\n * returns boolean\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"setIehrUserProfile\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.SetIehrUserProfile\")\n @ResponseWrapper(localName = \"setIehrUserProfileResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.SetIehrUserProfileResponse\")\n public boolean setIehrUserProfile(\n @WebParam(name = \"iehrUserProfile\", targetNamespace = \"\")\n IehrUserProfile iehrUserProfile)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Site>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getSites\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetSites\")\n @ResponseWrapper(localName = \"getSitesResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetSitesResponse\")\n public List<Site> getSites();\n\n /**\n * \n * @param cardID\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.AuditEntry>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getLoginInfo\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetLoginInfo\")\n @ResponseWrapper(localName = \"getLoginInfoResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetLoginInfoResponse\")\n public List<AuditEntry> getLoginInfo(\n @WebParam(name = \"cardID\", targetNamespace = \"\")\n String cardID)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @return\n * returns java.lang.String\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getServiceErrors\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetServiceErrors\")\n @ResponseWrapper(localName = \"getServiceErrorsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetServiceErrorsResponse\")\n public String getServiceErrors();\n\n /**\n * \n * @param authUserInfoQuery\n * @return\n * returns gov.va.med.jmeadows_2_3_1.webservice.AuthUserInfo\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getAuthUser\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetAuthUser\")\n @ResponseWrapper(localName = \"getAuthUserResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetAuthUserResponse\")\n public AuthUserInfo getAuthUser(\n @WebParam(name = \"authUserInfoQuery\", targetNamespace = \"\")\n AuthUserInfo authUserInfoQuery)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n */\n @WebMethod\n @RequestWrapper(localName = \"resetStatus\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.ResetStatus\")\n @ResponseWrapper(localName = \"resetStatusResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.ResetStatusResponse\")\n public void resetStatus();\n\n /**\n * \n * @param userId\n * @return\n * returns java.util.List<gov.va.med.jmeadows_2_3_1.webservice.Patient>\n * @throws JMeadowsException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getRecentlyViewedPatients\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetRecentlyViewedPatients\")\n @ResponseWrapper(localName = \"getRecentlyViewedPatientsResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetRecentlyViewedPatientsResponse\")\n public List<Patient> getRecentlyViewedPatients(\n @WebParam(name = \"userId\", targetNamespace = \"\")\n String userId)\n throws JMeadowsException_Exception\n ;\n\n /**\n * \n * @return\n * returns java.lang.String\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getVersion\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetVersion\")\n @ResponseWrapper(localName = \"getVersionResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetVersionResponse\")\n public String getVersion();\n\n /**\n * \n * @return\n * returns java.lang.String\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getStatus\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetStatus\")\n @ResponseWrapper(localName = \"getStatusResponse\", targetNamespace = \"http://webservice.jmeadows.DNS /\", className = \"gov.va.med.jmeadows_2_3_1.webservice.GetStatusResponse\")\n public String getStatus();\n\n}", "@Test\r\n void shouldReturnOneZeroPoints() {\r\n InsuranceRiskService insuranceRiskService = new DisabilityInsuranceRiskService();\r\n InsuranceRiskRequest insuranceRiskRequest = new InsuranceRiskRequest();\r\n insuranceRiskRequest.setAge(35);\r\n insuranceRiskRequest.setHouse(null);\r\n insuranceRiskRequest.setIncome(BigDecimal.valueOf(999999));\r\n insuranceRiskRequest.setDependents(2);\r\n insuranceRiskRequest.setMaritalStatus(\"single\");\r\n Assertions.assertEquals(2, insuranceRiskService.calculate(3, insuranceRiskRequest));\r\n }", "public static void main(String[] args) {\n\t\tMap<String, String> param = new HashMap<String, String>();\n\t\tparam.put(\"GoodsID\", \"81633\");\n\t\tString priceData = HttpUtil45.postAuth(\"http://studio69.atelier98.net/api_studio69/api_studio69.asmx/GetGoodsDetailByGoodsID\",\n\t\t\t\tparam ,new OutTimeConfig(1000*60*10,1000*60*10,1000*60*10),\"SHANGPIN\",\"2MWWKgNSxgf\");\nSystem.out.println(priceData);\n//\t\ttry {\n////\t\t\tGoodDetail goodDetail = ObjectXMLUtil.xml2Obj(GoodDetail.class, priceData);\n//\t\t\tGoodsDetail categorys = ObjectXMLUtil.xml2Obj(GoodsDetail.class, priceData);\n//\t\t\tSystem.out.println(categorys.getGoodDetials().get(0).getStock().getItemlist().size());\n//\t\t} catch (JAXBException e1) {\n//\t\t\te1.printStackTrace();\n//\t\t}\n//\t\tSystem.out.println(priceData);\n\n//\t\tMap<String, String> param = new HashMap<String, String>();\n//\t\tparam.put(\"orderID\", \"20160909121212\");\n//\t\tString buyerInfo = \"<BuyerInfo>\" +\n//\t\t\t\t\" <Name>test</Name>\" +\n//\t\t\t\t\" <Address>Via Edgardo Macrelli 107</Address>\" +\n//\t\t\t\t\" <Mobile>47521</Mobile>\" +\n//\t\t\t\t\" <Corriere>100000</Corriere>\" +\n//\t\t\t\t\" <Notes></Notes>\" +\n//\t\t\t\t\"</BuyerInfo>\";\n//\t\tString gooodsList=\"<GoodsList>\" +\n//\t\t\t\t\" <Good>\" +\n//\t\t\t\t\" <ID>36894</ID>\" +\n//\t\t\t\t\" <Size>42</Size>\" +\n//\t\t\t\t\" <Qty>1</Qty>\" +\n//\t\t\t\t\" <Price>1265</Price>\" +\n//\t\t\t\t\" </Good>\" +\n//\t\t\t\t\"</GoodsList>\";\n//\t\ttry {\n//\t\t\tbuyerInfo = URLEncoder.encode(buyerInfo,\"UTF-8\");\n//\t\t\tSystem.out.println(\"buyerInfo =\" +buyerInfo);\n//\t\t\tgooodsList = URLEncoder.encode(gooodsList,\"UTF-8\");\n//\t\t\tSystem.out.println(\"gooodsList =\" +gooodsList);\n//\t\t} catch (UnsupportedEncodingException e) {\n//\t\t\te.printStackTrace();\n//\t\t}\n//\t\tparam.put(\"buyerInfo\", buyerInfo);\n//\n//\t\tparam.put(\"goodsList\", gooodsList);\n//\n//\t\tString priceData = HttpUtil45.postAuth(\"http://studio69.atelier98.net/api_studio69/api_studio69.asmx/CreateNewOrder\",\n//\t\t\t\tparam ,new OutTimeConfig(1000*60*10,1000*60*10,1000*60*10),\"SHANGPIN\",\"2MWWKgNSxgf\");\n//\n//\t\ttry {\n////\t\t\tGoodDetail goodDetail = ObjectXMLUtil.xml2Obj(GoodDetail.class, priceData);\n//\t\t\tGoodsDetail categorys = ObjectXMLUtil.xml2Obj(GoodsDetail.class, priceData);\n//\t\t\tSystem.out.println(categorys.getGoodDetials().get(0).getStock().getItemlist().size());\n//\t\t} catch (JAXBException e1) {\n//\t\t\te1.printStackTrace();\n//\t\t}\n//\t\tSystem.out.println(priceData);\n//\n//\n//\n//\t\tFile file = new File(\"F://studio/GetGoodsDetailByGoodsID.xml\");\n//\t\tif (!file.exists()) {\n//\t\t\ttry {\n//\t\t\t\tfile.getParentFile().mkdirs();\n//\t\t\t\tfile.createNewFile();\n//\n//\t\t\t} catch (IOException e) {\n//\t\t\t\te.printStackTrace();\n//\t\t\t}\n//\t\t}\n//\t\tFileWriter fwriter = null;\n//\t\ttry {\n//\t\t\tfwriter = new FileWriter(\"F://studio/GetGoodsDetailByGoodsID.xml\");\n//\t\t\tfwriter.write(priceData);\n//\t\t} catch (IOException ex) {\n//\t\t\tex.printStackTrace();\n//\t\t} finally {\n//\t\t\ttry {\n//\t\t\t\tfwriter.flush();\n//\t\t\t\tfwriter.close();\n//\t\t\t} catch (IOException ex) {\n//\t\t\t\tex.printStackTrace();\n//\t\t\t}\n//\t\t}\n\n\n\n\n\t}", "@Test(dependsOnMethods = {\"shouldBeAbleToClick72Months\"})\n public void shouldBeAbleToInputNumericCharactersInInterestRateField() {\n //1. Enter 6 in the Interest Rate Field\n calculatePaymentPage.setInterestRateInput(\"6\");\n //2. Enter 11 in the Interest Rate Field\n calculatePaymentPage.setInterestRateInput(\"11\");\n }", "public static void main (String [] args ) {\r\n\r\n double simpleIntest = 0;\r\n int principle ;\r\n int time ;\r\n double rate ;\r\n Scanner si = new Scanner(System.in);\r\n System.out.println(\"enter principle amount::\");\r\n principle = si.nextInt();\r\n System.out.println(\"Enter time:\");\r\n time = si.nextInt();\r\n System.out.println(\"enter rate::\");\r\n rate = si.nextDouble();\r\n /**\r\n * FOrmula Begins\r\n */\r\n\r\n simpleIntest = (principle*time*rate)/100;\r\n //::::::;\r\n System.out.println(\"Simple Intest is ::\" + simpleIntest);\r\n }", "@Test\n public void HappyDailyIncomeForStore(){\n Integer productID1 = store.getProductID(\"computer\");\n tradingSystem.AddProductToCart(NconnID, storeID, productID1, 3);\n tradingSystem.subscriberPurchase(NofetID, NconnID, \"123456789\", \"4\",\"2022\" , \"123\", \"123456789\", \"Rager 101\",\"Beer Sheva\",\"Israel\",\"8458527\");\n\n Double dailyIncome = store.getDailyIncome();\n assertEquals(dailyIncome, 9000.0);\n }", "@Test\n public void testCalculateNominationCuantity2() throws FileNotFoundException {\n System.out.println(\"testCalculateNominationCuantity 2\");\n double expResult = 125.0;\n double result = calc.getChange(124d, calc.calculateDenominationCuantity(124d));\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void creditEntrySEPA() throws Exception {\n\t\ttry {\n\t\t\t// Launch the browser and load the default URL\n\t\t\tUtility.initConfiguration();\n\t\t\tThread.sleep(3000);\n\t\t\t// Login to back end and check payment method is enabled or disabled\n\t\t\tUtility.wooCommerceBackEndLogin();\n\t\t\tThread.sleep(3000);\n\t\t\tElementLocators element = PageFactory.initElements(driver, ElementLocators.class);\n\t\t\t// Title for HTML report\n\t\t\ttest = extend.createTest(\"Vendor script execution for 'CREDIT_ENTRY_SEPA'\");\n\t\t\t// Steps\n\t\t\tActions actions = new Actions(driver);\n\t\t\tactions.moveToElement(element.WooCommerce).perform();\n\t\t\tThread.sleep(3000);\n\t\t\telement.WooCommerce_Settings.click();\n\t\t\telement.Payment_Tab.click();\n\t\t\tThread.sleep(2000);\n\t\t\telement.Sepa_Payment_Display.click();\n\t\t\t// Checking payment method enabled or disabled\n\t\t\tif (!element.Sepa_Enable_Payment_Method_Checkbox.isSelected()) {\n\t\t\t\telement.Sepa_Enable_Payment_Method_Checkbox.click();\n\t\t\t\tThread.sleep(3000);\n\t\t\t}\n\t\t\t// Checking Guarantee payment enabled or disabled\n\t\t\tif (element.Sepa_Enable_Payment_Guarantee_CheckBox.isSelected()) {\n\t\t\t\telement.Sepa_Enable_Payment_Guarantee_CheckBox.click();\n\t\t\t\tThread.sleep(3000);\n\t\t\t}\n\t\t\telement.Sepa_Payment_Save_Changes.click();\n\t\t\tThread.sleep(3000);\n\t\t\tdriver.navigate().to(Constant.shopfrontendurl);\n\t\t\tThread.sleep(3000);\n\t\t\tUtility.wooCommerceCheckOutProcess();\n\t\t\tThread.sleep(4000);\n\t\t\t// Read the datafrom excel sheet\n\t\t\tMap<String, String> UserData = new HashMap<String, String>();\n\t\t\tUserData = Data.ExcelReader_PaymentMethods();\n\t\t\t// Check whether payment method is displayed in checkout page\n\t\t\tif (element.Sepa_Label.isDisplayed()) {\n\t\t\t\tif (element.Sepa_Radio_button.isDisplayed() == true) {\n\t\t\t\t\telement.Sepa_Radio_button.click();\n\t\t\t\t}\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\t\telement.Sepa_Iban_TextBox.sendKeys(UserData.get(\"SEPAIBAN\"));\n\t\t\t\telement.Place_Order.click();\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(25, TimeUnit.SECONDS);\n\t\t\t\t// After order placed successfully verify Thank you message displayed\n\t\t\t\tString thankyoumessage = element.FE_Thank_You_Page_Text.getText();\n\t\t\t\tif (thankyoumessage.equals(\"Thank you. Your order has been received.\")) {\n\t\t\t\t\tSystem.out.println(\"Order placed successfully using Direct Debit SEPA\");\n\t\t\t\t\ttest.log(Status.INFO, \"Order placed successfully using Direct Debit SEPA\");\n\t\t\t\t\tThread.sleep(3000); // Get the amount from order success page front end\n\t\t\t\t\tString totalOrderAmount = element.OrderDetails_TotalAmount.getText().replaceAll(\"[^0-9]\", \"\");\n\t\t\t\t\tString TID = element.OrderDetails_Note_TID.getText().replaceAll(\"[^0-9]\", \"\");\n\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\t\t\t// Go to callback execution site and enter vendor script URL\n\t\t\t\t\tdriver.navigate().to(Constant.vendorscripturl);\n\t\t\t\t\tThread.sleep(4000);\n\t\t\t\t\telement.Vendor_Script_Url.sendKeys((Constant.shopfrontendurl) + \"?wc-api=novalnet_callback\");\n\t\t\t\t\telement.Vendor_Id.clear();\n\t\t\t\t\telement.Vendor_Id.sendKeys(\"4\");\n\t\t\t\t\telement.Vendor_Auth_Code.clear();\n\t\t\t\t\telement.Vendor_Auth_Code.sendKeys(\"JyEtHUjjbHNJwVztW6JrafIMHQvici\");\n\t\t\t\t\telement.Product_Id.clear();\n\t\t\t\t\telement.Product_Id.sendKeys(\"14\");\n\t\t\t\t\telement.Tariff_Id.clear();\n\t\t\t\t\telement.Tariff_Id.sendKeys(\"30\");\n\t\t\t\t\telement.Payment_Type_Edit_Button.click();\n\t\t\t\t\tSelect selectpaymenttype = new Select(element.Payment_Type_Selectbox);\n\t\t\t\t\tselectpaymenttype.selectByVisibleText(\"CREDIT_ENTRY_SEPA\");\n\t\t\t\t\telement.Test_Mode.clear();\n\t\t\t\t\telement.Test_Mode.sendKeys(\"1\");\n\t\t\t\t\telement.Tid_Payment.clear();\n\t\t\t\t\telement.Tid_Payment.sendKeys(TID);\n\t\t\t\t\telement.Amount.clear();\n\t\t\t\t\telement.Amount.sendKeys(totalOrderAmount);\n\t\t\t\t\telement.Currency.clear();\n\t\t\t\t\telement.Currency.sendKeys(\"EUR\");\n\t\t\t\t\telement.Status.clear();\n\t\t\t\t\telement.Status.sendKeys(\"100\");\n\t\t\t\t\telement.Tid_Status.clear();\n\t\t\t\t\telement.Tid_Status.sendKeys(\"100\");\n\t\t\t\t\telement.Tid.clear();\n\t\t\t\t\telement.Tid.sendKeys(\"13245678945612345\");\n\t\t\t\t\telement.Execute_Button.click();\n\t\t\t\t\tString callback_message = element.callback_message.getText();\t\t\t\t\t\n\t\t\t\t\tString callback_message_updated = callback_message.substring(9, callback_message.length());\n\t\t\t\t\tSystem.out.println(\"Callback execution message: \" + callback_message_updated);\n\t\t\t\t\tif (callback_message.contains(\"Novalnet Callback Script executed successfully for the TID:\")) {\n\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t\tdriver.navigate().to(Constant.shopbackendurl);\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\tactions.moveToElement(element.WooCommerce).perform();\n\t\t\t\t\t\tThread.sleep(1500);\n\t\t\t\t\t\telement.WooCommerce_Orders.click();\n\t\t\t\t\t\telement.Backend_Order_Number.click();\n\t\t\t\t\t\tString BEOrderNotesMessage = element.BE_OrderNotes_Message.getText();\n\t\t\t\t\t\tSystem.out.println(\"Back end order note: \" + BEOrderNotesMessage);\n\t\t\t\t\t\tif (callback_message_updated.equals(BEOrderNotesMessage)) {\n\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\"TC PASSED: CREDIT_ENTRY_SEPA execution message and back end order note message text was matched successfully\");\n\t\t\t\t\t\t\ttest.log(Status.PASS,\n\t\t\t\t\t\t\t\t\t\"TC PASSED: CREDIT_ENTRY_SEPA execution message and back end order note message text was matched successfully\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\"TC FAILED: CREDIT_ENTRY_SEPA execution message and back end order note message text was not matched\");\n\t\t\t\t\t\t\ttest.log(Status.FAIL,\n\t\t\t\t\t\t\t\t\t\"TC FAILED: CREDIT_ENTRY_SEPA execution message and back end order note message text was not matched\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"ERROR: Callback response message is displayed wrongly\");\n\t\t\t\t\t\ttest.log(Status.ERROR, \"ERROR: Callback response message is displayed wrongly\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"TC FAILED: Order was not placed successfully using Direct Debit SEPA\");\n\t\t\t\t\ttest.log(Status.FAIL, \"TC FAILED: Order was not placed successfully using Direct Debit SEPA\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Close browser\n\t\t\tUtility.closeBrowser();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"ERROR: Unexpected error from 'creditEntrySEPA' method\");\n\t\t\ttest.log(Status.ERROR, \"ERROR: Unexpected error from 'creditEntrySEPA' method\");\n\t\t}\n\t}", "@Test\n public void test() {\n XssPayload payload = XssPayload.genDoubleQuoteAttributePayload(\"input\", true);\n helper.requireLoginAdmin();\n orderId = helper.createDummyOrder(payload.toString(), \"dummy\");\n helper.get(ProcedureHelper.ORDERS_EDIT_URL(orderId));\n assertPayloadNextTo(payload, \"clientName\");\n }", "public static void main(String[] args) {\n EosApi api = EosApiFactory.create(\"https://api.jungle.alohaeos.com\");\n //EosApi api = EosApiFactory.create(\"https://jungle.cryptolions.io\");\n //EosApi api = EosApiFactory.create(\"https://eos.newdex.one\");\n //System.out.println(api.getChainInfo());\n //buyRam(api, \"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\", \"bihuexwallet\", \"bihuexwallet\",15000);\n //delegate(api, \"5KD2hyi84H46ND8citJr6L84mYegnX1UKw9osLnF3qpcjoeRAAn\", \"carilking111\", \"carilking444\",\"1.5000 EOS\",\"1.5000 EOS\");\n //updateAuth(api,\"5JhoFQMN9xWGMFfUDJHHPVsuSytSDot8Q5TNv3rN6VVGPbjTrGN\",\"carilking444\",\"EOS82Psyaqk86jbSdSmGzonNCUHsBp1Xj42q37g6UkiA1UhzLe57j\",\"active\");\n //updateAuth(api,\"5JrTcSsUmzoLDxsNFcpGBRt2Wd488qTmHp5yfBPy71MbxaqSJ4g\",\"carilking555\",\"EOS5X6Sbmbc2zaJ8EHNZmdSnA26DsuTim59pdUNiNd34HugzvTp5m\",\"active\");\n //transfer(api,\"5JhoFQMN9xWGMFfUDJHHPVsuSytSDot8Q5TNv3rN6VVGPbjTrGN\", \"carilking444\",\"carilking111\",BigDecimal.valueOf(0.01),\"喵喵喵~\");\n //Object obj=api.getTransaction(new TransactionRequest(\"e5aeee319e8c767cdda35a3b6d460328f958833e58723bc18581765494018700\"));\n //System.out.println(obj);\n List<String> accounts = new ArrayList<>();\n accounts.add(\"carilking111\");\n accounts.add(\"carilking444\");\n //updateMultipleAuth(api, \"5JPNqMSZ8M567hgDGW9CmD9vr2RaDm1eWpJqHaHa2S5xKTMmFKm\", \"heydoojqgege\", 2, accounts, \"active\");\n //proposeTransfer(api, \"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\", \"bihuexwallet\", \"firstmsig152\", \"heydoojqgege\", \"carilking222\", BigDecimal.valueOf(0.2), \"test1\", accounts);\n //approveTransfer(api,\"5KD2hyi84H46ND8citJr6L84mYegnX1UKw9osLnF3qpcjoeRAAn\",\"carilking111\",\"bihuexwallet\",\"firstmsig151\");\n //execPropose(api,\"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\",\"bihuexwallet\",\"bihuexwallet\",\"firstmsig151\");\n }", "@Test(priority = 1, description = \"Test case to verify Test Scenario 1\")\n\tpublic void testScenario1() {\n\t\tw.findElement(By.id(\"amount\")).sendKeys(\"100000\");\n\n\t\t// 2. Rate of Interest (%) as \"9\"\n\t\tw.findElement(By.id(\"rate\")).sendKeys(\"9\");\n\n\t\t// 3. Period (Years) as \"2\"\n\t\tw.findElement(By.id(\"years\")).sendKeys(\"2\");\n\n\t\t// Click on \"Submit\" button\n\t\tw.findElement(By.cssSelector(\"input[name='calculate']\")).click();\n\n\t\t// Verify / Validate below value under \"EMI CALCULATOR REPORT”:\n\n\t\tString emiCalReport1 = w.findElement(By.xpath(\"//*[@id=\\\"hpcontentbox\\\"]/div[5]/div[1]/div[1]/div[4]/div/div[1]\")).getText();\n\t\tAssert.assertTrue(true);\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\"EMI CALCULATOR REPORT 1: \" + \"\\n\" + emiCalReport1);\n\n\t}", "public static void testISPIssues(){\r\n\t\ttry {\r\n\t\t\tLogFunctions.generateLogsDirectory();\t\r\n\t\t\tGlobalVariables.steps = 0;\r\n\t\t\tGlobalVariables.testCaseId = \"REST004_ISPIssues\";\r\n\t\t\t\r\n\t\t\t// Create Log Files\r\n\t\t\tGlobalVariables.testResultLogFile = LogFunctions.generateLogFile(GlobalVariables.logFile + \"_\"+ GlobalVariables.testCaseId + \".log\");\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Test Case : REST004_ISPIssues Execution Started\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") REST004_ISPIssues Execution Started\");\r\n\t\t\t\r\n\t\t\t// For managing SSL connections\r\n\t\t\tConfigurations.validateTrustManager();\r\n\t\t\t\r\n\t\t\t// Reading input data from CSV File\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tConfigurations.getTestData(\"REST004_ISPIssues.csv\");\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Reading Data From CSV File\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Reading Data From CSV File\");\r\n\r\n\t\t\t// Send Request\r\n\t\t\tString data =GlobalVariables.testData.get(\"api\").concat(\"/version/\"+GlobalVariables.testData.get(\"versionNumber\")+\"/issues\");\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tConfigurations.sendRequest(data);\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Sending Request\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Request Sent\");\r\n\t\t\t\r\n\t\t\t// Receive Response in XML File (response.xml)\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tConfigurations.getResponse();\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Getting Response\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Response Received\");\r\n\t\t\t\r\n\t\t\t// Assertion: verify that Issue.\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tboolean planIdentifierResult;\r\n\t\t\t// Verify About Id\r\n\t\t\tplanIdentifierResult=Configurations.parseResponse(\"about\",\"id\",GlobalVariables.testData.get(\"aboutId\"));\t\r\n\t\t\tAssert.assertEquals(\"About Id is\",true,planIdentifierResult);\r\n\t\t\t// Verify About Type\r\n\t\t\tplanIdentifierResult=Configurations.parseResponse(\"about\",\"type\",GlobalVariables.testData.get(\"aboutType\"));\t\r\n\t\t\tAssert.assertEquals(\"About Type is\",true,planIdentifierResult);\r\n\t\t\t// Verify About name\r\n\t\t\tplanIdentifierResult=Configurations.parseResponse(\"about\",\"name\",GlobalVariables.testData.get(\"aboutName\"));\r\n\t\t\tAssert.assertEquals(\"About name is\",true,planIdentifierResult);\r\n\t\t\t// Verify About Description\r\n\t\t\tplanIdentifierResult=Configurations.parseResponse(\"about\",\"description\",GlobalVariables.testData.get(\"aboutDescription\"));\r\n\t\t\tAssert.assertEquals(\"About Description is\",true,planIdentifierResult);\r\n\t\t\t// Verify Issue Detected\r\n\t\t\tplanIdentifierResult=Configurations.parseResponse(\"issue\",\"detected\",GlobalVariables.testData.get(\"issueDetected\"));\r\n\t\t\tAssert.assertEquals(\"Issue Detected is\",true,planIdentifierResult);\t\t\t\r\n\t\t\t// Verify Issue Type\r\n//\t\t\tplanIdentifierResult=Configurations.parseResponse(\"issue\",\"type\",GlobalVariables.testData.get(\"issueType\"));\r\n//\t\t\tAssert.assertEquals(\"Issue Type is\",planIdentifierResultissueType\")));\t\t\t\r\n\t\t\t// Verify Issue kind\r\n\t\t\tplanIdentifierResult=Configurations.parseResponse(\"issue\",\"kind\",GlobalVariables.testData.get(\"issueKind\"));\r\n\t\t\tAssert.assertEquals(\"Issue kind is\",true,planIdentifierResult);\t\t\t\r\n\t\t\t// Verify Issue waived\r\n\t\t\tplanIdentifierResult=Configurations.parseResponse(\"issue\",\"waived\",GlobalVariables.testData.get(\"issueWaived\"));\r\n\t\t\tAssert.assertEquals(\"Issue waived is\",true,planIdentifierResult);\t\t\t\r\n//\t\t\t// Verify Issue description\r\n//\t\t\tplanIdentifierResult=Configurations.parseResponse(\"issue\",\"description\",GlobalVariables.testData.get(\"issueDescription\"));\r\n//\t\t\tAssert.assertEquals(\"Issue description is\",planIdentifierResultissueDescription\")));\t\t\t\r\n\t\t\t// Verify Issue remediation\r\n\t\t\tplanIdentifierResult=Configurations.parseResponse(\"issue\",\"remediation\",GlobalVariables.testData.get(\"issueRemediation\"));\r\n\t\t\tAssert.assertEquals(\"Issue remediation is\",true,planIdentifierResult);\t\t\t\r\n\t\t\t// Verify Issue severity\r\n\t\t\tplanIdentifierResult=Configurations.parseResponse(\"issue\",\"severity\",GlobalVariables.testData.get(\"issueSeverity\"));\r\n\t\t\tAssert.assertEquals(\"Issue severity is\",true,planIdentifierResult);\t\t\t\r\n\t\t\t// Verify Issue reportedBy\r\n\t\t\tplanIdentifierResult=Configurations.parseResponse(\"issue\",\"reportedBy\",GlobalVariables.testData.get(\"issueReportedBy\"));\r\n\t\t\tAssert.assertEquals(\"Issue reportedBy is\",true,planIdentifierResult);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Plan Summary Assertion Pass\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Assertion Pass\");\r\n\t\t\t\t\t\t\r\n \t// Execution Completed\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Test Case : REST004_ISPIssues Execution Completed\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps+ \") Test Case : ISP001 Execution Completed\");\r\n\t\t\t\r\n\t\t}catch (AssertionError ar) {\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\")Assertion Failed : \");\r\n\t\t\tar.printStackTrace();\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Assertion Failed\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogFunctions.logException(e.getMessage());\r\n\t\t}\r\n\t}", "@Test\n public void eciTest() {\n assertEquals(\"0\", authResponse.getEci());\n }", "public static void main(String[] args) throws Exception {\n\t\t\n\t\tinit();\n\t\tlaunch(\"chromebrowser\");\n\t\tnavigateUrl(\"mortagecalculator\");\n\t\tdriver.findElement(By.xpath(\"//input[@name=\\\"cloanamount\\\"]\")).clear();\n driver.findElement(By.xpath(\"//input[@name=\\\"cloanamount\\\"]\")).sendKeys(\"5000000\");\n driver.findElement(By.xpath(\"//input[@name='cloanterm']\")).clear();\n driver.findElement(By.xpath(\"//input[@name='cloanterm']\")).sendKeys(\"30\");\n driver.findElement(By.xpath(\"//input[@name=\\\"cinterestrate\\\"]\")).clear();\n driver.findElement(By.xpath(\"//input[@name=\\\"cinterestrate\\\"]\")).sendKeys(\"6\");\n driver.findElement(By.id(\"cremainingyear\")).clear();\n driver.findElement(By.id(\"cremainingyear\")).sendKeys(\"20\");\n driver.findElement(By.id(\"cremainingmonth\")).clear();;\n driver.findElement(By.id(\"cremainingmonth\")).sendKeys(\"0\");\n driver.findElement(By.id(\"cpayoff1\")).click();\n boolean radioselected=driver.findElement(By.id(\"cpayoff1\")).isEnabled();\n System.out.println(\"Radio button is enabled\"+radioselected);\n boolean radioselect=driver.findElement(By.id(\"cpayoff1\")).isSelected();\n System.out.println(\"Radio button is selected\"+radioselect);\n driver.findElement(By.xpath(\"//input[@value=\\\"Calculate\\\"]\")).click();\n \n String payoffamount=driver.findElement(By.xpath(\"//h2[contains(text(),'Payoff Amount')]\")).getText();\n \n System.out.println(\"Amount to be paid\" +payoffamount);\n \n driver.close();\n \n \n \n \n\t}", "@Test\r\n\tpublic void withdraw() {\n\t\tResult<String> loanWithdraw = qddPaymentService.loanWithdraw(141227113319030002L);\r\n\t\tSystem.out.println(loanWithdraw);\r\n\t}", "@WebService(name = \"CajaUnificadaWeb\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface CajaUnificadaWeb {\n\n\n /**\n * \n * @param profileCode\n * @param stationName\n * @param userCode\n * @return\n * returns cl.imperial.cajaunificada.ws.StartupResult\n * @throws CajaUnificadaWebException\n */\n @WebMethod\n @WebResult(name = \"startupResult\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\")\n @RequestWrapper(localName = \"startup\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\", className = \"cl.imperial.cajaunificada.ws.Startup\")\n @ResponseWrapper(localName = \"startupResponse\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\", className = \"cl.imperial.cajaunificada.ws.StartupResponse\")\n @Action(input = \"http://ws.cajaunificada.imperial.cl/cajaunificada/CajaUnificadaWeb/startupRequest\", output = \"http://ws.cajaunificada.imperial.cl/cajaunificada/CajaUnificadaWeb/startupResponse\", fault = {\n @FaultAction(className = CajaUnificadaWebException.class, value = \"http://ws.cajaunificada.imperial.cl/cajaunificada/CajaUnificadaWeb/startup/Fault/CajaUnificadaWebException\")\n })\n public StartupResult startup(\n @WebParam(name = \"userCode\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\")\n String userCode,\n @WebParam(name = \"profileCode\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\")\n BigDecimal profileCode,\n @WebParam(name = \"stationName\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\")\n String stationName)\n throws CajaUnificadaWebException\n ;\n\n /**\n * \n * @param profileCode\n * @param stationName\n * @param nroInterno\n * @param codEmp\n * @param userCode\n * @return\n * returns cl.imperial.cajaunificada.ws.ValeGetResult\n * @throws CajaUnificadaWebException\n */\n @WebMethod\n @WebResult(name = \"valeGetResult\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\")\n @RequestWrapper(localName = \"valeGet\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\", className = \"cl.imperial.cajaunificada.ws.ValeGet\")\n @ResponseWrapper(localName = \"valeGetResponse\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\", className = \"cl.imperial.cajaunificada.ws.ValeGetResponse\")\n @Action(input = \"http://ws.cajaunificada.imperial.cl/cajaunificada/CajaUnificadaWeb/valeGetRequest\", output = \"http://ws.cajaunificada.imperial.cl/cajaunificada/CajaUnificadaWeb/valeGetResponse\", fault = {\n @FaultAction(className = CajaUnificadaWebException.class, value = \"http://ws.cajaunificada.imperial.cl/cajaunificada/CajaUnificadaWeb/valeGet/Fault/CajaUnificadaWebException\")\n })\n public ValeGetResult valeGet(\n @WebParam(name = \"userCode\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\")\n String userCode,\n @WebParam(name = \"profileCode\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\")\n BigDecimal profileCode,\n @WebParam(name = \"stationName\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\")\n String stationName,\n @WebParam(name = \"nroInterno\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\")\n int nroInterno,\n @WebParam(name = \"codEmp\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\")\n String codEmp)\n throws CajaUnificadaWebException\n ;\n\n /**\n * \n * @param nroInterno\n * @return\n * returns cl.imperial.cajaunificada.ws.RegistraPagoResult\n * @throws CajaUnificadaWebException\n */\n @WebMethod\n @WebResult(name = \"registraPagoResult\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\")\n @RequestWrapper(localName = \"registraPago\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\", className = \"cl.imperial.cajaunificada.ws.RegistraPago\")\n @ResponseWrapper(localName = \"registraPagoResponse\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\", className = \"cl.imperial.cajaunificada.ws.RegistraPagoResponse\")\n @Action(input = \"http://ws.cajaunificada.imperial.cl/cajaunificada/CajaUnificadaWeb/registraPagoRequest\", output = \"http://ws.cajaunificada.imperial.cl/cajaunificada/CajaUnificadaWeb/registraPagoResponse\", fault = {\n @FaultAction(className = CajaUnificadaWebException.class, value = \"http://ws.cajaunificada.imperial.cl/cajaunificada/CajaUnificadaWeb/registraPago/Fault/CajaUnificadaWebException\")\n })\n public RegistraPagoResult registraPago(\n @WebParam(name = \"nroInterno\", targetNamespace = \"http://ws.cajaunificada.imperial.cl/cajaunificada\")\n int nroInterno)\n throws CajaUnificadaWebException\n ;\n\n}", "@Test\n public void testEthPrice() throws Exception {\n RetrieveCryptoPrices retrieveCryptoPrices = new RetrieveCryptoPrices();\n retrieveCryptoPrices.setEthPrice(\"800\");\n assertEquals(\"800\", retrieveCryptoPrices.getEthPrice());\n\n }", "public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetEntrancePageResponse getEntrancePage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetEntrancePage getEntrancePage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[4].getName());\n _operationClient.getOptions().setAction(\"urn:getEntrancePage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getEntrancePage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getEntrancePage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetEntrancePageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetEntrancePageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "@WebService(name = \"IMyService\", targetNamespace = \"http://service.test01/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface IMyService {\n\n\n /**\n * \n * @param id\n * @return\n * returns test01.client.Student\n */\n @WebMethod\n @WebResult(name = \"studentById\", targetNamespace = \"\")\n @RequestWrapper(localName = \"query\", targetNamespace = \"http://service.test01/\", className = \"test01.client.Query\")\n @ResponseWrapper(localName = \"queryResponse\", targetNamespace = \"http://service.test01/\", className = \"test01.client.QueryResponse\")\n public Student query(\n @WebParam(name = \"id\", targetNamespace = \"\")\n int id);\n\n /**\n * \n * @param a\n * @param b\n * @return\n * returns int\n */\n @WebMethod\n @WebResult(name = \"plusResult\", targetNamespace = \"\")\n @RequestWrapper(localName = \"plus\", targetNamespace = \"http://service.test01/\", className = \"test01.client.Plus\")\n @ResponseWrapper(localName = \"plusResponse\", targetNamespace = \"http://service.test01/\", className = \"test01.client.PlusResponse\")\n public int plus(\n @WebParam(name = \"a\", targetNamespace = \"\")\n int a,\n @WebParam(name = \"b\", targetNamespace = \"\")\n int b);\n\n /**\n * \n * @param a\n * @param b\n * @return\n * returns int\n */\n @WebMethod\n @WebResult(name = \"minusResult\", targetNamespace = \"\")\n @RequestWrapper(localName = \"minus\", targetNamespace = \"http://service.test01/\", className = \"test01.client.Minus\")\n @ResponseWrapper(localName = \"minusResponse\", targetNamespace = \"http://service.test01/\", className = \"test01.client.MinusResponse\")\n public int minus(\n @WebParam(name = \"a\", targetNamespace = \"\")\n int a,\n @WebParam(name = \"b\", targetNamespace = \"\")\n int b);\n\n}", "@WebService\npublic interface ManualService {\n @WebMethod\n public int arrival(int regionCode, String berthCode);\n\n @WebMethod\n public int departure(int regionCode, String berthCode);\n}", "public static void main(String[] args) {\n\t\t\n\t\tString cadena = JOptionPane.showInputDialog(null, \"Escriba un numero para la operacion, \\n\"\n\t\t\t\t+ \"1: Sumar \\n\"\n\t\t\t\t+ \"2: Restar \\n\"\n\t\t\t\t+ \"3: Multiplciar \\n\"\n\t\t\t\t+ \"4: Dividir\");\n\t\tint resp = Integer.parseInt(cadena);\n\t\tCalculadoraImplService servicio = new CalculadoraImplService();\n\t\tCalculadoraImpl calImpl = servicio.getCalculadoraImplPort();\n\t\tJOptionPane.showMessageDialog(null, \"Su respuesta es: \" + calImpl.calcular(resp, 15, 10));\n\t}", "@Test\n public void testDAM31304001() {\n\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n {\n webDriverOperations.click(id(\"dam31304001\"));\n }\n\n {\n assertThat(webDriverOperations.getText(id(\"getDateResult\")), is(\n \"2016-12-29\"));\n assertThat(webDriverOperations.getText(id(\"getDateClassResult\")),\n is(\"java.time.LocalDate\"));\n assertThat(webDriverOperations.getText(id(\n \"getObjectCertification\")), is(\"true\"));\n }\n }", "public static void testISPIssuesPlan(){\r\n\t\ttry {\r\n\t\t\tLogFunctions.generateLogsDirectory();\t\r\n\t\t\tGlobalVariables.steps = 0;\r\n\t\t\tGlobalVariables.testCaseId = \"REST004_ISPIssuesPlan\";\r\n\t\t\t\r\n\t\t\t// Create Log Files\r\n\t\t\tGlobalVariables.testResultLogFile = LogFunctions.generateLogFile(GlobalVariables.logFile + \"_\"+ GlobalVariables.testCaseId + \".log\");\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Test Case : REST004_ISPIssuesPlan Execution Started\");\r\n\t\t\tSystem.out.println(\"testISPPlanPlanner Method\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") REST004_ISPIssuesPlan Execution Started\");\r\n\t\t\t\r\n\t\t\t// For managing SSL connections\r\n\t\t\tConfigurations.validateTrustManager();\t\t\t\r\n\t\t\t// Reading input data from CSV File\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tConfigurations.getTestData(\"REST004_ISPIssues.csv\");\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Reading Data From CSV File\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Reading Data From CSV File\");\r\n\r\n\t\t\t// Send Request\r\n\t\t\tString data =GlobalVariables.testData.get(\"api\")+\"/version/\"+GlobalVariables.testData.get(\"versionNumber\")+\"/issues\";\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tConfigurations.sendRequest(data);\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Sending Request\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Request Sent\");\r\n\t\t\t// Receive Response in XML File (response.xml)\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tConfigurations.getResponse();\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Getting Response\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Response Received\");\r\n\t\t\t\r\n\t\t\t// Assertion: verify that PlanSummary\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tboolean planAgentResult;\r\n\t\t\t//Verify planIdentifier release\r\n\t\t\tplanAgentResult=Configurations.parseResponse(\"planIdentifier\",\"release\",GlobalVariables.testData.get(\"release\"));\r\n\t\t\tAssert.assertEquals(\"planIdentifier release is\",true,planAgentResult);\t\t\t\r\n\t\t\t//Verify user name \r\n\t\t\tplanAgentResult=Configurations.parseResponse(\"user\",\"username\",GlobalVariables.testData.get(\"username\"));\r\n\t\t\tAssert.assertEquals(\"user name is\",true,planAgentResult);\t\t\t\r\n\t\t\t// Verify user full Name\r\n\t\t\tplanAgentResult=Configurations.parseResponse(\"user\",\"fullName\",GlobalVariables.testData.get(\"fullName\"));\t\r\n\t\t\tAssert.assertEquals(\"Full Name is\",true,planAgentResult);\r\n\t\t\t// Verify user email\r\n\t\t\tplanAgentResult=Configurations.parseResponse(\"user\",\"email\",GlobalVariables.testData.get(\"email\"));\r\n\t\t\tAssert.assertEquals(\"Email is\",true,planAgentResult);\r\n\t\t\t// Verify Agent ID\r\n\t\t\tplanAgentResult=Configurations.parseResponse(\"agent\",\"id\",GlobalVariables.testData.get(\"agentId\"));\t\r\n\t\t\tAssert.assertEquals(\"Agent is\",true,planAgentResult);\r\n\t\t\t// Verify Agent Name\r\n\t\t\tplanAgentResult=Configurations.parseResponse(\"agent\",\"name\",GlobalVariables.testData.get(\"agentName\"));\t\r\n\t\t\tAssert.assertEquals(\"Agent Name is\",true,planAgentResult);\r\n\t\t\t// Verify Agent Unique Identity\r\n\t\t\tplanAgentResult=Configurations.parseResponse(\"agent\",\"hasUniqueIdentity\",GlobalVariables.testData.get(\"hasUniqueIdentity\"));\t\r\n\t\t\tAssert.assertEquals(\"Agent Unique Identity is\",true,planAgentResult);\r\n\t\t\t// Verify Agent Anonymous\r\n\t\t\tplanAgentResult=Configurations.parseResponse(\"agent\",\"isAnonymous\",GlobalVariables.testData.get(\"isAnonymous\"));\t\r\n\t\t\tAssert.assertEquals(\"Is Agent Anonymous\",true,planAgentResult);\r\n\t\t\t// Verify Agent Kind\r\n\t\t\tplanAgentResult=Configurations.parseResponse(\"agent\",\"kind\",GlobalVariables.testData.get(\"kind\"));\t\r\n\t\t\tAssert.assertEquals(\"Agent Kind is\",true,planAgentResult);\t\t\t\r\n\t\t\t// Verify Agent Kind\r\n\t\t\tplanAgentResult=Configurations.parseResponse(\"availability\",\"always\",GlobalVariables.testData.get(\"always\"));\t\r\n\t\t\tAssert.assertEquals(\"Availability always is\",true,planAgentResult);\t\t\t\r\n\t\t\t// Verify documents type\r\n\t\t\tplanAgentResult=Configurations.parseResponse(\"documents\",\"type\",GlobalVariables.testData.get(\"documentsType\"));\r\n\t\t\tAssert.assertEquals(\"Documents type is\",true,planAgentResult);\t\t\t\r\n\t\t\t//Verify documents url\r\n\t\t\tplanAgentResult=Configurations.parseResponse(\"documents\",\"url\",GlobalVariables.testData.get(\"documentsUrl\"));\r\n\t\t\tAssert.assertEquals(\"Documents url is\",true,planAgentResult);\t\t\t\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Plan Summary Assertion Pass\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Assertion Pass\");\r\n\t\t\t\r\n\t\t\t// Execution Completed\r\n\t\t\tGlobalVariables.steps++;\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\") Test Case : REST004_ISPIssuesPlan Execution Completed\");\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps+ \") Test Case : REST004_ISPIssuesPlan Execution Completed\");\r\n\t\t\t\r\n\t\t}catch (AssertionError ar) {\r\n\t\t\tSystem.out.println(GlobalVariables.steps +\")Assertion Failed : \");\r\n\t\t\tar.printStackTrace();\r\n\t\t\tLogFunctions.logDescription(GlobalVariables.steps + \") Assertion Failed\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogFunctions.logException(e.getMessage());\r\n\t\t}\r\n\t}", "@Test\r\n public void testCalculateIndicator() throws Exception {\r\n System.out.println(\"calculateIndicator\");\r\n NDM instance = null;\r\n Double expResult = null;\r\n //Double result = instance.calculateIndicator();\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 }", "public static void main(String[] args) {\n\t\t\r\n\t\ttry {\r\n\t\tPaymentProcessorImplService service=new PaymentProcessorImplService(new URL(\"http://localhost:8080/javafirstws/paymentProcessor?wsdl\"));\r\n\t\tPaymentProcessor port=service.getPaymentProcessorImplPort();\r\n\t\tClient client=ClientProxy.getClient(port);\r\n\t\tEndpoint endpoint = client.getEndpoint();\r\n\t\tMap<String, Object> props=new HashMap<String, Object>();\r\n\t\tprops.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);\r\n\t\tprops.put(WSHandlerConstants.USER, \"cxf\");\r\n\t\tprops.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);\r\n\t\tprops.put(WSHandlerConstants.PW_CALLBACK_CLASS,UTPasswordCallback.class.getName() );\r\n\t\t//props.put(WSHandlerConstants.PW_CALLBACK_CLASS,\"cxf\" );\r\n\t\t//System.out.println(\"props hashing\"+props);\r\n\t\t\r\n\t\tWSS4JOutInterceptor wssOut=new WSS4JOutInterceptor();\r\n\t\tendpoint.getOutInterceptors().add(wssOut);\r\n\t\t\r\n\t\tPaymentProcessorResponse response=port.processPayment(new PaymentProcessorRequest());\r\n\t\tSystem.out.println(response.isResult());\r\n\t\t\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) throws AxisFault, RemoteException {\n\t\tServicioDenunciaStub oStub = new ServicioDenunciaStub();\n\t\t// AGREGA\n\t\tDenunciaVO oDenunciaVO = new DenunciaVO();\n\t\toDenunciaVO.setTipo(\"Robo\");\n\t\toDenunciaVO.setDenuncia(\"Tan robandoooo\");\n\t\toDenunciaVO.setCiudad(\"temuco\");\n\t\toDenunciaVO.setSector(\"Las Quilas\");\n\t\toDenunciaVO.setFecha_creacion(\"12/10/2014\");\n\t\toDenunciaVO.setFecha_modificacion(\"13/10/2014\");\n\t\toDenunciaVO.setUsuario_creador(\"Cachulo\");\n\t\toDenunciaVO.setUsuario_modificador(\"Admin\");\n\t\toDenunciaVO.setFecha_user_modifica(\"12/12/2014\");\n\t\toDenunciaVO.setDesactivar(0);\n\t\t\n\t\t//AgregarDenunciaResponse objResponse = oStub.agregarDenuncia();\n\t\tAgregarDenuncia oAgregarDenuncia = new AgregarDenuncia();\n\t\toAgregarDenuncia.setODenunciaVO(oDenunciaVO);\n\t\toAgregarDenuncia.setCiudad(\"temuco\");\n\t\t\n\t\tAgregarDenunciaResponse objResponse = oStub.agregarDenuncia(oAgregarDenuncia);\n\t\tSystem.out.println(objResponse.get_return());\n\t\t\n\t\t\n\t}", "public void makePayment(\n org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderIDForPayment radiologyOrderIDForPayment8\n\n ) throws java.rmi.RemoteException\n \n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n\n \n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[3].getName());\n _operationClient.getOptions().setAction(\"http://www.PAHospital.org/RadiologyService/MakePayment\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n org.apache.axiom.soap.SOAPEnvelope env = null;\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n radiologyOrderIDForPayment8,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"makePayment\")),new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"makePayment\"));\n \n\n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n _operationClient.execute(true);\n\n \n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n \n return;\n }", "@Test\n\tpublic void invalidNumYrs() {\n\t\tWebElement new_page = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\tdouble dwnpymnt = Double.valueOf(new_page.findElement(By.name(\"downpayment\")).getAttribute(\"value\"));\n\t\t\n\t\t// get initial value of interest\n\t\tdouble interest = Double.valueOf(new_page.findElement(By.name(\"interest\")).getAttribute(\"value\"));\n\t\t\n\t\t// modify number of years to non-numeric characters\n\t\tnew_page.findElement(By.name(\"year\")).clear();\n\t\tnew_page.findElement(By.name(\"year\")).sendKeys(\"abcd\");\n\t\t\n\t\tint year = 0;\n\t\tdouble price_tax = Double.valueOf(new_page.findElement(By.name(\"price_with_taxes\")).getAttribute(\"value\"));\n\t\t\n\t\tdouble price_interest = priceWithInterest(price_tax, dwnpymnt, interest, year);\n\t\tint nMnths = numMonths(year);\n\t\tdouble ttl = totalPrice(price_interest, dwnpymnt);\n\t\tdouble ttl_per_mnth = totalPricePerMonth(price_interest, nMnths);\n\t\t\n\t\t// click calculate button\n\t\tnew_page.findElement(By.name(\"calculate_payment_button\")).click();\n\t\twait(2);\n\t\t\n\t\tWebElement solutions = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\tDecimalFormat twoDForm = new DecimalFormat(\"#.##\");\n\t\t\n\t\tassertEquals(Double.valueOf(twoDForm.format(dwnpymnt)), Double.valueOf(solutions.findElement(By.id(\"total_downpayment\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl_per_mnth)), Double.valueOf(solutions.findElement(By.id(\"total_price_per_month\")).getAttribute(\"value\")));\n\t\tassertEquals(Integer.valueOf(nMnths), Integer.valueOf(solutions.findElement(By.id(\"n_of_months\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl)), Double.valueOf(solutions.findElement(By.id(\"total_price\")).getAttribute(\"value\")));\n\t}", "@WebService(targetNamespace = \"http://xmlns.oracle.com/Interface/MDMTableConditionDataNew/MDMTableConditionDataNew\", name = \"MDMTableConditionDataNew\")\n@XmlSeeAlso({ObjectFactory.class})\npublic interface MDMTableConditionDataNew {\n\n @WebMethod(action = \"process\")\n @RequestWrapper(localName = \"process\", targetNamespace = \"http://xmlns.oracle.com/Interface/MDMTableConditionDataNew/MDMTableConditionDataNew\", className = \"com.microfar.Process\")\n @ResponseWrapper(localName = \"processResponse\", targetNamespace = \"http://xmlns.oracle.com/Interface/MDMTableConditionDataNew/MDMTableConditionDataNew\", className = \"com.microfar.ProcessResponse\")\n public void process(\n\n @WebParam(name = \"IN_SYS_NAME\", targetNamespace = \"http://xmlns.oracle.com/Interface/MDMTableConditionDataNew/MDMTableConditionDataNew\")\n String inSYSNAME,\n @WebParam(name = \"IN_MASTER_TYPE\", targetNamespace = \"http://xmlns.oracle.com/Interface/MDMTableConditionDataNew/MDMTableConditionDataNew\")\n String inMASTERTYPE,\n @WebParam(name = \"IN_TABLE_NAME\", targetNamespace = \"http://xmlns.oracle.com/Interface/MDMTableConditionDataNew/MDMTableConditionDataNew\")\n String inTABLENAME,\n @WebParam(name = \"IN_FIELDS_VALUE_TABLE\", targetNamespace = \"http://xmlns.oracle.com/Interface/MDMTableConditionDataNew/MDMTableConditionDataNew\")\n HAIERMDMFIELDSVALUETABLE inFIELDSVALUETABLE,\n @WebParam(mode = WebParam.Mode.OUT, name = \"OUT_RESULT\", targetNamespace = \"http://xmlns.oracle.com/Interface/MDMTableConditionDataNew/MDMTableConditionDataNew\")\n javax.xml.ws.Holder<String> outRESULT,\n @WebParam(mode = WebParam.Mode.OUT, name = \"OUT_RETMSG\", targetNamespace = \"http://xmlns.oracle.com/Interface/MDMTableConditionDataNew/MDMTableConditionDataNew\")\n javax.xml.ws.Holder<String> outRETMSG,\n @WebParam(mode = WebParam.Mode.OUT, name = \"OUT_RETCODE\", targetNamespace = \"http://xmlns.oracle.com/Interface/MDMTableConditionDataNew/MDMTableConditionDataNew\")\n javax.xml.ws.Holder<String> outRETCODE\n );\n}", "@Test \n public void GetTrustInfoFromWizardTest(){\n\tlogger.info(\"--------------------start--GetTrustInfoFromWizardTest---------------------------------------------------------------------------------------------------\");\n// \tList<District> list=districtService.GetCityListByProvinceCode(\"110000\");\n\tList<TrustInfo> list=trustManagementService.GetTrustInfoFromWizard(\"9\");\n\tfor (TrustInfo trustInfo : list) {\n\t\tlogger.info(\"查找结果getItemValue:\" + trustInfo.getItemValue()); \n\t\tlogger.info(\"查找结果getItemAliasValue:\" + trustInfo.getItemAliasValue()); \n\t}\n logger.info(\"--------------------end----GetTrustInfoFromWizardTest-------------------------------------------------------------------------------------------------\");\n }", "@Test\n\tpublic void negativeDwnPymnt() {\n\t\tWebElement new_page = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\t//modify down-payment\n\t\tdouble dwnpymnt = -1200.00;\n\t\tnew_page.findElement(By.name(\"downpayment\")).clear();\n\t\tnew_page.findElement(By.name(\"downpayment\")).sendKeys(\"-1200.00\");\n\t\t\n\t\tdouble interest = Double.valueOf(new_page.findElement(By.name(\"interest\")).getAttribute(\"value\"));\n\t\tint year = Integer.valueOf(new_page.findElement(By.name(\"year\")).getAttribute(\"value\"));\n\t\tdouble price_tax = Double.valueOf(new_page.findElement(By.name(\"price_with_taxes\")).getAttribute(\"value\"));\n\t\t\n\t\tdouble price_interest = priceWithInterest(price_tax, dwnpymnt, interest, year);\n\t\tint nMnths = numMonths(year);\n\t\tdouble ttl = totalPrice(price_interest, dwnpymnt);\n\t\tdouble ttl_per_mnth = totalPricePerMonth(price_interest, nMnths);\n\t\t\n\t\t// click calculate button\n\t\tnew_page.findElement(By.name(\"calculate_payment_button\")).click();\n\t\twait(2);\n\t\t\n\t\tWebElement solutions = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\tDecimalFormat twoDForm = new DecimalFormat(\"#.##\");\n\n\t\tassertEquals(Double.valueOf(twoDForm.format(dwnpymnt)), Double.valueOf(solutions.findElement(By.id(\"total_downpayment\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl_per_mnth)), Double.valueOf(solutions.findElement(By.id(\"total_price_per_month\")).getAttribute(\"value\")));\n\t\tassertEquals(Integer.valueOf(nMnths), Integer.valueOf(solutions.findElement(By.id(\"n_of_months\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl)), Double.valueOf(solutions.findElement(By.id(\"total_price\")).getAttribute(\"value\")));\n\t}", "@Test(description = \"Test to validate price reminder when no price is entered\", priority = 0)\n\tpublic void UserStory1() throws HeadlessException, AWTException, IOException, InterruptedException\n\t{\n\t\tLoanCalculatorPage loan_cal = new LoanCalculatorPage();\t\t\n\t\tloan_cal.validateCalHomePage();\n\t\t//testLog.log(Status.INFO, \"Loan calculator page launched\");\n\t\tint testCaseID = 1;\n\t\t\n\t\t\n\t\t//Validate the error message when no amount is input\t\t\n\t\tloan_cal.validateNoPrice(testCaseID);\n\t}", "public WebService_Detalle_alquiler_factura() {\n }", "@WebService(name = \"ZWSVUR_UPDSTATUS\", targetNamespace = \"urn:sap-com:document:sap:rfc:functions\")\r\npublic interface ZWSVURUPDSTATUS {\r\n\r\n\r\n /**\r\n * \r\n * @param iNROLIQ\r\n * @param eRETURN\r\n * @param iESTADO\r\n * @param eMESSAGE\r\n */\r\n @WebMethod(operationName = \"ZPSCDFM_VUR_UPDSTATUS\")\r\n @RequestWrapper(localName = \"ZPSCDFM_VUR_UPDSTATUS\", targetNamespace = \"urn:sap-com:document:sap:rfc:functions\", className = \"co.com.realtech.mariner.model.ejb.ws.sap.mappers.vur_updstatus.ZPSCDFMVURUPDSTATUS\")\r\n @ResponseWrapper(localName = \"ZPSCDFM_VUR_UPDSTATUSResponse\", targetNamespace = \"urn:sap-com:document:sap:rfc:functions\", className = \"co.com.realtech.mariner.model.ejb.ws.sap.mappers.vur_updstatus.ZPSCDFMVURUPDSTATUSResponse\")\r\n public void zpscdfmVURUPDSTATUS(\r\n @WebParam(name = \"I_ESTADO\", targetNamespace = \"\")\r\n String iESTADO,\r\n @WebParam(name = \"I_NROLIQ\", targetNamespace = \"\")\r\n String iNROLIQ,\r\n @WebParam(name = \"E_MESSAGE\", targetNamespace = \"\", mode = WebParam.Mode.OUT)\r\n Holder<String> eMESSAGE,\r\n @WebParam(name = \"E_RETURN\", targetNamespace = \"\", mode = WebParam.Mode.OUT)\r\n Holder<Integer> eRETURN);\r\n\r\n}", "@WebService(wsdlLocation=\"http://portal.marketplace.losalpes.com.co:7001/soa-infra/services/default/ProcesoRetornoMaterial/returnmaterialadvice_client_ep?WSDL\",\n targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"ReturnMaterialAdvice\")\n@XmlSeeAlso(\n { co.com.losalpes.marketplace.ws.retornoMaterial.types.ObjectFactory.class })\npublic interface ReturnMaterialAdvice\n{\n @WebMethod(action=\"process\")\n @Action(input=\"process\", output=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice/ReturnMaterialAdvice/processResponse\")\n @ResponseWrapper(localName=\"processResponse\", targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n className=\"co.com.losalpes.marketplace.ws.retornoMaterial.types.ProcessResponse\")\n @RequestWrapper(localName=\"process\", targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n className=\"co.com.losalpes.marketplace.ws.retornoMaterial.types.Process\")\n @WebResult(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"numSeguimientoRMA\")\n public String process(@WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"causa\")\n String causa, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"fecha\")\n XMLGregorianCalendar fecha, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"cantidadProducto\")\n int cantidadProducto, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"valorProducto\")\n long valorProducto, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"nombreProducto\")\n String nombreProducto, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"categoriaProducto\")\n String categoriaProducto, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"referenciaProducto\")\n String referenciaProducto, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"numSeguimientoPO\")\n String numSeguimientoPO, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"numSeguimientoDA\")\n String numSeguimientoDA);\n}", "@Test\n public void testMovieDoubleVal() {\n Client client = new JaxWsClient();\n MovieService movieService =\n (MovieService) client.getClient(new ClientInfo(MovieService.class,\n \"http://localhost:9002/Movie\", false));\n\n Assert.assertEquals(1.0, movieService.testMovieDoubleVal(1.0), 0);\n }", "@WebService(name = \"zperson_communic\", targetNamespace = \"urn:sap-com:document:sap:soap:functions:mc-style\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface ZpersonCommunic {\n\n\n /**\n * \n * @param employeeId\n * @param lastnameM\n * @param fstnameM\n * @param telAts\n * @param orgtxt\n * @param job\n * @param orgUnit\n * @param jobtxt\n * @param checkCommunities\n * @param outTab\n * @return\n * returns test.Bapireturn\n */\n @WebMethod(operationName = \"ZPersonalSearch\")\n @WebResult(name = \"Return\", targetNamespace = \"\")\n @RequestWrapper(localName = \"ZPersonalSearch\", targetNamespace = \"urn:sap-com:document:sap:soap:functions:mc-style\", className = \"test.ZPersonalSearch\")\n @ResponseWrapper(localName = \"ZPersonalSearchResponse\", targetNamespace = \"urn:sap-com:document:sap:soap:functions:mc-style\", className = \"test.ZPersonalSearchResponse\")\n public Bapireturn zPersonalSearch(\n @WebParam(name = \"CheckCommunities\", targetNamespace = \"\")\n String checkCommunities,\n @WebParam(name = \"EmployeeId\", targetNamespace = \"\")\n String employeeId,\n @WebParam(name = \"FstnameM\", targetNamespace = \"\")\n String fstnameM,\n @WebParam(name = \"Job\", targetNamespace = \"\")\n String job,\n @WebParam(name = \"Jobtxt\", targetNamespace = \"\")\n String jobtxt,\n @WebParam(name = \"LastnameM\", targetNamespace = \"\")\n String lastnameM,\n @WebParam(name = \"OrgUnit\", targetNamespace = \"\")\n String orgUnit,\n @WebParam(name = \"Orgtxt\", targetNamespace = \"\")\n String orgtxt,\n @WebParam(name = \"OutTab\", targetNamespace = \"\", mode = WebParam.Mode.INOUT)\n Holder<TableOfZpernComm> outTab,\n @WebParam(name = \"TelAts\", targetNamespace = \"\")\n String telAts);\n\n}", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "@WebService(name = \"GodinezLunchPort\", targetNamespace = \"http://www.xmlns.udev.com/GodinezLunch/GL/wsdl/1.0/GodinezLunchWS\")\r\n@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)\r\n@XmlSeeAlso({\r\n ObjectFactory.class\r\n})\r\npublic interface GodinezLunchWS {\r\n\r\n\r\n /**\r\n * \r\n * @param calculateDistanceRequest\r\n * @return\r\n * returns com.mx.udev.godinez.web.types.CalculateDistanceResponse\r\n */\r\n @WebMethod(action = \"http://www.udev.com/GodinezLunchWS/calculateDistance\")\r\n @WebResult(name = \"calculateDistanceResponse\", targetNamespace = \"http://www.xmlns.udev.com/GodinezLunch/GL/datatypes/1.0\", partName = \"calculateDistanceResponse\")\r\n public CalculateDistanceResponse calculateDistance(\r\n @WebParam(name = \"calculateDistanceRequest\", targetNamespace = \"http://www.xmlns.udev.com/GodinezLunch/GL/datatypes/1.0\", partName = \"calculateDistanceRequest\")\r\n CalculateDistanceRequest calculateDistanceRequest);\r\n\r\n /**\r\n * \r\n * @param getNearbyPlacesRequest\r\n * @return\r\n * returns com.mx.udev.godinez.web.types.GetNearbyPlacesResponse\r\n */\r\n @WebMethod(action = \"http://www.udev.com/GodinezLunchWS/getNearbyPlaces\")\r\n @WebResult(name = \"getNearbyPlacesResponse\", targetNamespace = \"http://www.xmlns.udev.com/GodinezLunch/GL/datatypes/1.0\", partName = \"getNearbyPlacesResponse\")\r\n public GetNearbyPlacesResponse getNearbyPlaces(\r\n @WebParam(name = \"getNearbyPlacesRequest\", targetNamespace = \"http://www.xmlns.udev.com/GodinezLunch/GL/datatypes/1.0\", partName = \"getNearbyPlacesRequest\")\r\n GetNearbyPlacesRequest getNearbyPlacesRequest);\r\n\r\n /**\r\n * \r\n * @param getAllCategoriesRequest\r\n * @return\r\n * returns com.mx.udev.godinez.web.types.GetAllCategoriesResponse\r\n */\r\n @WebMethod(action = \"http://www.udev.com/GodinezLunchWS/getAllCategories\")\r\n @WebResult(name = \"getAllCategoriesResponse\", targetNamespace = \"http://www.xmlns.udev.com/GodinezLunch/GL/datatypes/1.0\", partName = \"getAllCategoriesResponse\")\r\n public GetAllCategoriesResponse getAllCategories(\r\n @WebParam(name = \"getAllCategoriesRequest\", targetNamespace = \"http://www.xmlns.udev.com/GodinezLunch/GL/datatypes/1.0\", partName = \"getAllCategoriesRequest\")\r\n GetAllCategoriesRequest getAllCategoriesRequest);\r\n\r\n /**\r\n * \r\n * @param getMyFavoritesRequest\r\n * @return\r\n * returns com.mx.udev.godinez.web.types.GetMyFavoritesResponse\r\n */\r\n @WebMethod(action = \"http://www.udev.com/GodinezLunchWS/getMyFavorites\")\r\n @WebResult(name = \"getMyFavoritesResponse\", targetNamespace = \"http://www.xmlns.udev.com/GodinezLunch/GL/datatypes/1.0\", partName = \"getMyFavoritesResponse\")\r\n public GetMyFavoritesResponse getMyFavorites(\r\n @WebParam(name = \"getMyFavoritesRequest\", targetNamespace = \"http://www.xmlns.udev.com/GodinezLunch/GL/datatypes/1.0\", partName = \"getMyFavoritesRequest\")\r\n GetMyFavoritesRequest getMyFavoritesRequest);\r\n\r\n}", "public static void main(String [] args) throws Exception {\n Server fnServer = new Server(new URL(\"https://fno.io/hub/api\"));\n\n double totalArea = 30528.0;\n double populationTotal = 11099981;\n\n QueryParam[] params = {new QueryParam(\"float\", new String[]{\"total population\"}), new QueryParam(\"float\", new String[]{\"area\"})};\n Query query = new Query(new String[]{\"population density\"}, params, null, null, ImplementationType.WEB_API);\n Function function = fnServer.query(query)[0];\n FunctionInstance calculatePopulationDensity = ImplementationHandler.instantiateFunctionImplementation(function, function.implementationMappings[0]);\n System.out.println(\"The population density of Belgium is: \" + calculatePopulationDensity.executeFunction((float)populationTotal, (float)totalArea));\n\n QueryParam[] reversedParams = {new QueryParam(\"float\", new String[]{\"area\"}), new QueryParam(\"float\", new String[]{\"total population\"})};\n query = new Query(new String[]{\"population density\"}, reversedParams, null, null, ImplementationType.LOCAL);\n function = fnServer.query(query)[0];\n calculatePopulationDensity = ImplementationHandler.instantiateFunctionImplementation(function, function.implementationMappings[0]);\n System.out.println(\"The population density of Belgium is: \" + calculatePopulationDensity.executeFunction((float)totalArea, (float)populationTotal));\n\n query = new Query(new String[]{\"hello world\"}, null, null, null);\n function = fnServer.query(query)[0];\n FunctionInstance helloWorld = ImplementationHandler.instantiateFunctionImplementation(function, function.implementationMappings[0]);\n System.out.println(\"Output: \" + helloWorld.executeFunction());\n\n\n }", "@Test //This is integration test\r\n\tpublic void testCalculatePrice01() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\tassertEquals(exspectedCombinationList, calcPrice.getResult());\r\n\t}", "@Test\n public void testCustomerRewardService() {\n CustomerReward customerReward = customerRewardService.calculateRewards(\"custId1\");\n\n System.out.println(\"Custormer Avg Reward: \" + customerReward.getAverageRewardsPerMonth());\n System.out.println(\"Custormer Total Reward: \" + customerReward.getTotalRewards());\n\n customerReward = customerRewardService.calculateRewards(\"custId2\");\n System.out.println(\"Custormer Avg Reward: \" + customerReward.getAverageRewardsPerMonth());\n System.out.println(\"Custormer Total Reward: \" + customerReward.getTotalRewards());\n\n\n }", "@Test\n\tpublic void negativeNumYrs() {\n\t\tWebElement new_page = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\tdouble dwnpymnt = Double.valueOf(new_page.findElement(By.name(\"downpayment\")).getAttribute(\"value\"));\n\t\tdouble interest = Double.valueOf(new_page.findElement(By.name(\"interest\")).getAttribute(\"value\"));\n\t\t\n\t\t// modify year to a negative integer\n\t\tint year = -5;\n\t\tnew_page.findElement(By.name(\"year\")).clear();\n\t\tnew_page.findElement(By.name(\"year\")).sendKeys(\"-5\");\n\t\t\n\t\tdouble price_tax = Double.valueOf(new_page.findElement(By.name(\"price_with_taxes\")).getAttribute(\"value\"));\n\t\t\n\t\tdouble price_interest = priceWithInterest(price_tax, dwnpymnt, interest, year);\n\t\tint nMnths = numMonths(year);\n\t\tdouble ttl = totalPrice(price_interest, dwnpymnt);\n\t\tdouble ttl_per_mnth = totalPricePerMonth(price_interest, nMnths);\n\t\t\n\t\t// click calculate button\n\t\tnew_page.findElement(By.name(\"calculate_payment_button\")).click();\n\t\twait(2);\n\t\t\n\t\tWebElement solutions = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\tDecimalFormat twoDForm = new DecimalFormat(\"#.##\");\n\t\t\n\t\tassertEquals(Double.valueOf(twoDForm.format(dwnpymnt)), Double.valueOf(solutions.findElement(By.id(\"total_downpayment\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl_per_mnth)), Double.valueOf(solutions.findElement(By.id(\"total_price_per_month\")).getAttribute(\"value\")));\n\t\tassertEquals(Integer.valueOf(nMnths), Integer.valueOf(solutions.findElement(By.id(\"n_of_months\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl)), Double.valueOf(solutions.findElement(By.id(\"total_price\")).getAttribute(\"value\")));\n\t}", "@WebService(name = \"ProfilePort\", targetNamespace = \"http://ws.clkio.com\")\n@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)\n@XmlSeeAlso({\n com.clkio.schemas.ObjectFactory.class,\n com.clkio.schemas.adjusting.ObjectFactory.class,\n com.clkio.schemas.clockinclockout.ObjectFactory.class,\n com.clkio.schemas.common.ObjectFactory.class,\n com.clkio.schemas.day.ObjectFactory.class,\n com.clkio.schemas.email.ObjectFactory.class,\n com.clkio.schemas.login.ObjectFactory.class,\n com.clkio.schemas.manualentering.ObjectFactory.class,\n com.clkio.schemas.profile.ObjectFactory.class,\n com.clkio.schemas.reason.ObjectFactory.class,\n com.clkio.schemas.resetpassword.ObjectFactory.class,\n com.clkio.schemas.timecard.ObjectFactory.class,\n com.clkio.schemas.user.ObjectFactory.class\n})\npublic interface ProfilePort {\n\n\n /**\n * \n * @param request\n * @param clkioLoginCode\n * @return\n * returns com.clkio.schemas.profile.ListProfileResponse\n * @throws ResponseException\n */\n @WebMethod\n @WebResult(name = \"listProfileResponse\", targetNamespace = \"http://schemas.clkio.com\", partName = \"result\")\n public ListProfileResponse list(\n @WebParam(name = \"clkioLoginCode\", targetNamespace = \"http://schemas.clkio.com\", header = true, partName = \"clkioLoginCode\")\n String clkioLoginCode,\n @WebParam(name = \"listProfileRequest\", targetNamespace = \"http://schemas.clkio.com\", partName = \"request\")\n ListProfileRequest request)\n throws ResponseException\n ;\n\n /**\n * \n * @param request\n * @param clkioLoginCode\n * @return\n * returns com.clkio.schemas.common.ResponseCreated\n * @throws ResponseException\n */\n @WebMethod\n @WebResult(name = \"responseCreated\", targetNamespace = \"http://schemas.clkio.com\", partName = \"result\")\n public ResponseCreated insert(\n @WebParam(name = \"clkioLoginCode\", targetNamespace = \"http://schemas.clkio.com\", header = true, partName = \"clkioLoginCode\")\n String clkioLoginCode,\n @WebParam(name = \"insertProfileRequest\", targetNamespace = \"http://schemas.clkio.com\", partName = \"request\")\n InsertProfileRequest request)\n throws ResponseException\n ;\n\n /**\n * \n * @param request\n * @param clkioLoginCode\n * @return\n * returns com.clkio.schemas.common.Response\n * @throws ResponseException\n */\n @WebMethod\n @WebResult(name = \"response\", targetNamespace = \"http://schemas.clkio.com\", partName = \"result\")\n public Response update(\n @WebParam(name = \"clkioLoginCode\", targetNamespace = \"http://schemas.clkio.com\", header = true, partName = \"clkioLoginCode\")\n String clkioLoginCode,\n @WebParam(name = \"updateProfileRequest\", targetNamespace = \"http://schemas.clkio.com\", partName = \"request\")\n UpdateProfileRequest request)\n throws ResponseException\n ;\n\n /**\n * \n * @param request\n * @param clkioLoginCode\n * @return\n * returns com.clkio.schemas.common.Response\n * @throws ResponseException\n */\n @WebMethod\n @WebResult(name = \"response\", targetNamespace = \"http://schemas.clkio.com\", partName = \"result\")\n public Response delete(\n @WebParam(name = \"clkioLoginCode\", targetNamespace = \"http://schemas.clkio.com\", header = true, partName = \"clkioLoginCode\")\n String clkioLoginCode,\n @WebParam(name = \"deleteProfileRequest\", targetNamespace = \"http://schemas.clkio.com\", partName = \"request\")\n DeleteProfileRequest request)\n throws ResponseException\n ;\n\n}", "public void runSample(HttpServletRequest request) {\n try {\n this.printMessage(\"<html><head><title>Simple checkout result</title></head><body><div><pre>\");\n example.addOrderReferenceDetails(request.getParameter(\"SellerNote\"),\n request.getParameter(\"OrderReferenceId\"), request.getParameter(\"CustomNote\"),\n request.getParameter(\"StoreName\"), request.getParameter(\"Subtotal\"),\n request.getParameter(\"ShippingType\"), request.getParameter(\"RequestPaymentAuthorization\"));\n\n this.printMessage(\"Order Reference is set with provided details.\");\n this.printMessage(\"Now confirming this order reference...\");\n\n example.confirmOrderReference();\n this.printMessage(\"Order Reference is confirmed and \" + \"moved to 'OPEN' state\");\n this.printMessage(\"Now getting details for Authorization...\");\n\n int authOption = Integer.parseInt(request.getParameter(\"AuthorizeOption\"));\n if (!(authOption == 1 || authOption == 2)) {\n throw new OffAmazonPaymentsServiceException(\"Invalid Authorization Option.\");\n }\n\n boolean captureNow = false;\n String captureNowString = request.getParameter(\"DirectCapture\");\n if (captureNowString != null && captureNowString.equals(\"on\")) {\n captureNow = true;\n }\n String softDescriptor = request.getParameter(\"SoftDescriptor\");\n String sellerAuthorizationNote = request.getParameter(\"SellerAuthorizationNote\");\n String providerId = request.getParameter(\"ProviderId\");\n String creditAmount = request.getParameter(\"CreditAmount\");\n\n example.authorize(captureNow, authOption, softDescriptor, sellerAuthorizationNote, providerId, creditAmount);\n AuthorizationDetails authDetails = this.waitForAuthorizationNotification(captureNow);\n\n this.getPostAuthDetails();\n\n if (captureNow) {\n this.printMessage(\"Authorization with Capture is complete\");\n } else {\n CaptureResponse captureResponse = this.capture(authDetails, request.getParameter(\"softDescriptor\"),\n request.getParameter(\"sellerCaptureNote\"), providerId, creditAmount);\n this.waitForCaptureNotification(captureResponse.getCaptureResult().getCaptureDetails()\n .getAmazonCaptureId());\n this.printMessage(\"Capture for this Order Reference is complete\");\n\n ProviderCreditSummaryList providerCreditSummaryList = null;\n if (providerId != null && creditAmount != null) {\n providerCreditSummaryList = this.waitForCaptureDetailsWithProviderCreditSummaryList(captureResponse\n .getCaptureResult().getCaptureDetails().getAmazonCaptureId());\n getProviderCreditDetails(providerCreditSummaryList);\n }\n }\n this.printMessage(\"Now Closing the Order Reference...\");\n example.closeOrder();\n this.printMessage(\"Order Refernce Moved to CLOSED state.\");\n this.printMessage(\"Simple Checkout Example is complete.\");\n\n } catch (OffAmazonPaymentsServiceException ex) {\n outStream.println(\"Caught Exception: \" + ex.getMessage());\n outStream.println(\"Response Status Code: \" + ex.getStatusCode());\n outStream.println(\"Error Code: \" + ex.getErrorCode());\n outStream.println(\"Error Type: \" + ex.getErrorType());\n outStream.println(\"Request ID: \" + ex.getRequestId());\n outStream.println(\"XML: \" + ex.getXML());\n outStream.println(\"ResponseHeaderMetadata: \" + ex.getResponseHeaderMetadata());\n ex.printStackTrace(outStream);\n } finally {\n this.printMessage(\"</pre></div></body></html>\");\n }\n\n }", "@WebService(name = \"QueryValidatorServices\", targetNamespace = \"http://app.service.validator.businesses.gboss.id5.cn\")\npublic interface QueryValidatorServices {\n\n /**\n * @param param\n * @param userName\n * @param type\n * @param password\n * @return returns java.lang.String\n */\n @WebMethod\n @WebResult(name = \"querySingleReturn\", targetNamespace = \"http://app.service.validator.businesses.gboss.id5.cn\")\n public String querySingle(String userName, String password, String type, String param);\n\n /**\n * @param param\n * @param userName\n * @param type\n * @param password\n * @return returns java.lang.String\n */\n @WebMethod\n @WebResult(name = \"queryBatchReturn\", targetNamespace = \"http://app.service.validator.businesses.gboss.id5.cn\")\n public String queryBatch(String userName, String password, String type, String param);\n\n}", "@Test\n public void testGetInteres() {\n System.out.println(\"getInteres\");\n double expResult = 0.07;\n double result = detalleAhorro.getInteres();\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@WebService(targetNamespace = \"http://payment.services.adyen.com\", name = \"PaymentPortType\")\r\n@XmlSeeAlso({com.adyen.services.common.ObjectFactory.class, ObjectFactory.class})\r\npublic interface PaymentPortType {\r\n\r\n @WebResult(name = \"captureResult\", targetNamespace = \"http://payment.services.adyen.com\")\r\n @RequestWrapper(localName = \"capture\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.Capture\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"captureResponse\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.CaptureResponse\")\r\n public com.adyen.services.payment.ModificationResult capture(\r\n @WebParam(name = \"modificationRequest\", targetNamespace = \"http://payment.services.adyen.com\")\r\n com.adyen.services.payment.ModificationRequest modificationRequest\r\n ) throws ServiceException;\r\n\r\n @WebResult(name = \"refundResult\", targetNamespace = \"http://payment.services.adyen.com\")\r\n @RequestWrapper(localName = \"refund\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.Refund\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"refundResponse\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.RefundResponse\")\r\n public com.adyen.services.payment.ModificationResult refund(\r\n @WebParam(name = \"modificationRequest\", targetNamespace = \"http://payment.services.adyen.com\")\r\n com.adyen.services.payment.ModificationRequest modificationRequest\r\n ) throws ServiceException;\r\n\r\n @WebResult(name = \"result\", targetNamespace = \"http://payment.services.adyen.com\")\r\n @RequestWrapper(localName = \"fundTransfer\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.FundTransfer\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"fundTransferResponse\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.FundTransferResponse\")\r\n public com.adyen.services.payment.FundTransferResult fundTransfer(\r\n @WebParam(name = \"request\", targetNamespace = \"http://payment.services.adyen.com\")\r\n com.adyen.services.payment.FundTransferRequest request\r\n ) throws ServiceException;\r\n\r\n @WebResult(name = \"authoriseReferralResult\", targetNamespace = \"http://payment.services.adyen.com\")\r\n @RequestWrapper(localName = \"authoriseReferral\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.AuthoriseReferral\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"authoriseReferralResponse\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.AuthoriseReferralResponse\")\r\n public com.adyen.services.payment.ModificationResult authoriseReferral(\r\n @WebParam(name = \"modificationRequest\", targetNamespace = \"http://payment.services.adyen.com\")\r\n com.adyen.services.payment.ModificationRequest modificationRequest\r\n ) throws ServiceException;\r\n\r\n @WebResult(name = \"result\", targetNamespace = \"http://payment.services.adyen.com\")\r\n @RequestWrapper(localName = \"refundWithData\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.RefundWithData\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"refundWithDataResponse\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.RefundWithDataResponse\")\r\n public com.adyen.services.payment.PaymentResult refundWithData(\r\n @WebParam(name = \"request\", targetNamespace = \"http://payment.services.adyen.com\")\r\n com.adyen.services.payment.PaymentRequest request\r\n ) throws ServiceException;\r\n\r\n @WebResult(name = \"cancelResult\", targetNamespace = \"http://payment.services.adyen.com\")\r\n @RequestWrapper(localName = \"cancel\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.Cancel\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"cancelResponse\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.CancelResponse\")\r\n public com.adyen.services.payment.ModificationResult cancel(\r\n @WebParam(name = \"modificationRequest\", targetNamespace = \"http://payment.services.adyen.com\")\r\n com.adyen.services.payment.ModificationRequest modificationRequest\r\n ) throws ServiceException;\r\n\r\n @WebResult(name = \"paymentResult\", targetNamespace = \"http://payment.services.adyen.com\")\r\n @RequestWrapper(localName = \"authorise3d\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.Authorise3D\")\r\n @WebMethod(operationName = \"authorise3d\")\r\n @ResponseWrapper(localName = \"authorise3dResponse\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.Authorise3DResponse\")\r\n public com.adyen.services.payment.PaymentResult authorise3D(\r\n @WebParam(name = \"paymentRequest3d\", targetNamespace = \"http://payment.services.adyen.com\")\r\n com.adyen.services.payment.PaymentRequest3D paymentRequest3D\r\n ) throws ServiceException;\r\n\r\n @WebResult(name = \"response\", targetNamespace = \"http://payment.services.adyen.com\")\r\n @RequestWrapper(localName = \"balanceCheck\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.BalanceCheck\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"balanceCheckResponse\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.BalanceCheckResponse\")\r\n public com.adyen.services.payment.BalanceCheckResult balanceCheck(\r\n @WebParam(name = \"request\", targetNamespace = \"http://payment.services.adyen.com\")\r\n com.adyen.services.payment.BalanceCheckRequest request\r\n ) throws ServiceException;\r\n\r\n @WebResult(name = \"response\", targetNamespace = \"http://payment.services.adyen.com\")\r\n @RequestWrapper(localName = \"directdebit\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.Directdebit\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"directdebitResponse\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.DirectdebitResponse\")\r\n public com.adyen.services.payment.DirectDebitResponse2 directdebit(\r\n @WebParam(name = \"request\", targetNamespace = \"http://payment.services.adyen.com\")\r\n com.adyen.services.payment.DirectDebitRequest request\r\n ) throws ServiceException;\r\n\r\n @WebResult(name = \"cancelOrRefundResult\", targetNamespace = \"http://payment.services.adyen.com\")\r\n @RequestWrapper(localName = \"cancelOrRefund\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.CancelOrRefund\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"cancelOrRefundResponse\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.CancelOrRefundResponse\")\r\n public com.adyen.services.payment.ModificationResult cancelOrRefund(\r\n @WebParam(name = \"modificationRequest\", targetNamespace = \"http://payment.services.adyen.com\")\r\n com.adyen.services.payment.ModificationRequest modificationRequest\r\n ) throws ServiceException;\r\n\r\n @WebResult(name = \"paymentResult\", targetNamespace = \"http://payment.services.adyen.com\")\r\n @RequestWrapper(localName = \"authorise\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.Authorise\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"authoriseResponse\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.AuthoriseResponse\")\r\n public com.adyen.services.payment.PaymentResult authorise(\r\n @WebParam(name = \"paymentRequest\", targetNamespace = \"http://payment.services.adyen.com\")\r\n com.adyen.services.payment.PaymentRequest paymentRequest\r\n ) throws ServiceException;\r\n\r\n @WebResult(name = \"paymentResult\", targetNamespace = \"http://payment.services.adyen.com\")\r\n @RequestWrapper(localName = \"checkFraud\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.CheckFraud\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"checkFraudResponse\", targetNamespace = \"http://payment.services.adyen.com\", className = \"com.adyen.services.payment.CheckFraudResponse\")\r\n public com.adyen.services.payment.PaymentResult checkFraud(\r\n @WebParam(name = \"paymentRequest\", targetNamespace = \"http://payment.services.adyen.com\")\r\n com.adyen.services.payment.PaymentRequest paymentRequest\r\n ) throws ServiceException;\r\n}", "@Test(groups=\"SMR1137\")\r\n\tpublic void smr1137(){\r\n\t\ttry {\r\n\t\t\t//final String firstName=testDataOR.get(\"mono_first_name\"),lastName=testDataOR.get(\"mono_last_name\"); \r\n\t\t\t//login(\"URLEportal\",testDataOR.get(\"mono_user_login\"),firstName,lastName);\r\n\t\t\teportalCust=testDataOR.get(\"customer\");\r\n\t\t\tfinal String firstName=testDataOR.get(\"superuser_first_name\"),lastName=testDataOR.get(\"superuser_last_name\");\r\n\t\t\tlogin(\"URLEportal\",testDataOR.get(\"superuser\"),firstName,lastName);\r\n\t\t\t//login(\"URLEverest\",testDataOR.get(\"superuser\"),firstName,lastName);\r\n\t\t\t/*logger.info(\"SMR1137 execution started\");\r\n\t\t\tfinal String customerName=testDataOR.get(\"customer\");\r\n\r\n\t\t\t//Access ePortal and 'In Store Payment' menu should be available\r\n\t\t\tlogger.info(\"Step 1 :\");\r\n\t\t\tlogger.info(\"Access eportal with superuser\");\r\n\t\t\tselUtils.verifyElementDisp(selUtils.getCommonObject(\"instorepay_tab_xpath\"), INSTOREPAY);\r\n\r\n\t\t\t//logout from eportal and login everest, select customer in eportal\r\n\t\t\tlogger.info(\"Step 2,3,4:\");\r\n\t\t\tlogoutNEvselCust(customerName);\r\n\t\t\t\r\n\t\t\t//Disable ‘ePayment’ module and validate\r\n\t\t\tlogger.info(\"Step 5:\");\r\n\t\t\tdisableModNVal(\"ep_ckbx_id\", EPAYMENT);\r\n\t\t\t\t\t\t\r\n\t\t\t//Disable 'Card Payment' module and validate\r\n\t\t\tlogger.info(\"Step 6:\");\r\n\t\t\tdisableModNVal(\"cp_ckbx_id\", CARDPAYMENT);\r\n\t\t\t\t\t\t\r\n\t\t\t//Access ePortal with a superuser and select customer\r\n\t\t\t//In Store Payment menu should not be available\r\n\t\t\tlogger.info(\"Step 7:\");\r\n\t\t\tlogoutEpSelCust(customerName);\r\n\t\t\tAssert.assertFalse(selUtils.isElementPresentCommon(\"instorepay_tab_xpath\"),INSTOREPAY+\" menu is available\");\r\n\t\t\tlogger.info(\"In store payment menu is not available\");\r\n\r\n\t\t\t//logout from eportal and login everest, select customer in eportal\r\n\t\t\tlogger.info(\"Step 8,9:\");\r\n\t\t\tlogoutNEvselCust(customerName);\r\n\t\t\t\r\n\t\t\t//Enable 'Card Payment' module and validate\r\n\t\t\tlogger.info(\"Step 10\");\r\n\t\t\tenableModNVal(\"cp_ckbx_id\", CARDPAYMENT);\r\n\t\t\r\n\t\t\t\r\n\t\t\t//Access ePortal and 'In Store Payment' menu should be available\r\n\t\t\tlogger.info(\"Step 11\");\r\n\t\t\tlogoutEpSelCust(customerName);\r\n\t\t\tselUtils.verifyElementDisp(selUtils.getCommonObject(\"instorepay_tab_xpath\"), INSTOREPAY);*/\r\n\t\t\tlogger.info(\"SMR1137 execution started\");\r\n\t\t}catch (Throwable t) {\r\n\t\t\thandleException(t);\r\n\t\t}\r\n\t}", "@Test\r\n public void testGetPaymentDetails() {\r\n }", "@Test\r\n public void testCalculateNDM() {\r\n System.out.println(\"calculateNDM\");\r\n NDM instance = null;\r\n Double expResult = null;\r\n //Double result = instance.calculateNDM();\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 }", "WebClientServiceRequest serviceRequest();", "@WebService(name = \"CreditReportServiceDelegate\", targetNamespace = \"http://webservice.icrqs.cfcc.com/\")\n@SOAPBinding(style = SOAPBinding.Style.RPC)\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface CreditReportServiceDelegate {\n\n\n /**\n * \n * @param arg0\n * @return\n * returns com.cfcc.icrqs.webservice.CuResult\n */\n @WebMethod\n @WebResult(partName = \"return\")\n public CuResult sendCuRequest(\n @WebParam(name = \"arg0\", partName = \"arg0\")\n CuSingleRequest arg0);\n\n /**\n * \n * @param arg0\n * @return\n * returns com.cfcc.icrqs.webservice.CuSingleResult\n */\n @WebMethod\n @WebResult(partName = \"return\")\n public CuSingleResult getCuResult(\n @WebParam(name = \"arg0\", partName = \"arg0\")\n CuGetResult arg0);\n\n}", "public static void main(String[] args) {\n ApplicationContext ctx = new ClassPathXmlApplicationContext(\n \"springClient.xml\");\n AccountService accountService = (AccountService) ctx\n .getBean(\"mobileAccountService\");\n String result = accountService.shoopingPayment(\"13800138000\", (byte) 5);\n log.info(result);\n\n System.out.println( \"====\" + result );\n\n\n }", "@Test\n void testCalculations() {\n double addition = calculator.add(10, 2);\n double subtraction = calculator.sub(10, 2);\n double multiplication = calculator.mul(10, 2);\n double division = calculator.div(10, 2);\n\n //Then\n assertEquals(12, addition);\n assertEquals(8, subtraction);\n assertEquals(20, multiplication);\n assertEquals(5, division);\n }" ]
[ "0.6850945", "0.6586632", "0.6425283", "0.6322757", "0.6320007", "0.6187525", "0.6140424", "0.60371715", "0.59968895", "0.59263873", "0.59120494", "0.5891494", "0.5854604", "0.5852356", "0.5849307", "0.58121765", "0.57963264", "0.57704085", "0.57545125", "0.57387346", "0.5729749", "0.56946987", "0.5694401", "0.5689578", "0.56879306", "0.56700873", "0.56694067", "0.5666387", "0.5663326", "0.5661974", "0.56032455", "0.55894715", "0.55827445", "0.55809456", "0.5579967", "0.557763", "0.5576211", "0.55669284", "0.5564884", "0.5564249", "0.5543338", "0.55403167", "0.55322385", "0.55309784", "0.5525919", "0.55212057", "0.54949653", "0.54926413", "0.54906106", "0.5488513", "0.54862064", "0.54784214", "0.54703164", "0.5463359", "0.54583937", "0.5447151", "0.5446342", "0.5441353", "0.5434361", "0.54209894", "0.541465", "0.5413867", "0.5412884", "0.5410834", "0.54011154", "0.53956693", "0.5390889", "0.5388119", "0.5385819", "0.53823304", "0.5374612", "0.5373408", "0.5372825", "0.5372587", "0.5358373", "0.53534096", "0.5348084", "0.5346538", "0.534067", "0.5333534", "0.5330525", "0.53271604", "0.53271604", "0.5324343", "0.53237957", "0.53037703", "0.5300957", "0.53006613", "0.5299527", "0.5297286", "0.5297043", "0.52969724", "0.52957994", "0.52918863", "0.52915627", "0.52903485", "0.5285544", "0.5285486", "0.52835137", "0.5282247" ]
0.6540637
2
jhipsterneedleentityaddfield JHipster will add fields here, do not remove
public Long getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addField(\n JavaSymbolName propertyName,\n JavaType propertyType,\n String columnName,\n String columnType,\n JavaType className,\n boolean id,\n boolean oneToOne, boolean oneToMany, boolean manyToOne, boolean manyToMany, String mappedBy);", "Builder addMainEntity(String value);", "@Override\n\tpublic void save(Field entity) {\n\t\t\n\t}", "public void updateNonDynamicFields() {\n\n\t}", "public void setupFields()\n {\n FieldInfo field = null;\n field = new FieldInfo(this, \"ID\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Integer.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"LastChanged\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Date.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"Deleted\", 10, null, new Boolean(false));\n field.setDataClass(Boolean.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"Description\", 25, null, null);\n field = new FieldInfo(this, \"CurrencyCode\", 3, null, null);\n field = new FieldInfo(this, \"LastRate\", 10, null, null);\n field.setDataClass(Double.class);\n field.setScale(-1);\n field = new FieldInfo(this, \"RateChangedDate\", 12, null, null);\n field.setDataClass(Date.class);\n field.setScale(Constants.DATE_ONLY);\n field = new FieldInfo(this, \"RateChangedBy\", 16, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"CostingRate\", 10, null, null);\n field.setDataClass(Double.class);\n field.setScale(-1);\n field = new FieldInfo(this, \"CostingChangedDate\", 12, null, null);\n field.setDataClass(Date.class);\n field.setScale(Constants.DATE_ONLY);\n field = new FieldInfo(this, \"CostingChangedBy\", 16, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"RoundAt\", 1, null, null);\n field.setDataClass(Short.class);\n field = new FieldInfo(this, \"IntegerDesc\", 20, null, \"Dollar\");\n field = new FieldInfo(this, \"FractionDesc\", 20, null, null);\n field = new FieldInfo(this, \"FractionAmount\", 10, null, new Integer(100));\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"Sign\", 3, null, \"$\");\n field = new FieldInfo(this, \"LanguageID\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"NaturalInteger\", 20, null, null);\n field = new FieldInfo(this, \"NaturalFraction\", 20, null, null);\n }", "public ChangeFieldEf() {\r\n\t\tthis(null, null);\r\n\t}", "@Override\r\n protected void createDbContentCreateEdit() {\n DbContentCreateEdit dbContentCreateEdit = new DbContentCreateEdit();\r\n dbContentCreateEdit.init(null);\r\n form.getModelObject().setDbContentCreateEdit(dbContentCreateEdit);\r\n dbContentCreateEdit.setParent(form.getModelObject());\r\n ruServiceHelper.updateDbEntity(form.getModelObject()); \r\n }", "Builder addMainEntity(Thing value);", "private void addFieldToBook(String config_id, GOlrField field) {\n if (!unique_fields.containsKey(field.id)) {\n unique_fields.put(field.id, field);\n } else {\n // check if defined fields are equivalent\n if (!unique_fields.get(field.id).equals(field)) {\n throw new IllegalStateException(field.id + \" is defined twice with different properties.\\n\"\n + unique_fields.get(field.id) + \"\\n\" + field);\n }\n }\n // Ensure presence of comments (description) list.\n if (!collected_comments.containsKey(field.id)) {\n collected_comments.put(field.id, new ArrayList<String>());\n }\n // And add to it if there is an available description.\n if (field.description != null) {\n ArrayList<String> comments = collected_comments.get(field.id);\n comments.add(\" \" + config_id + \": \" + field.description + \" \");\n collected_comments.put(field.id, comments);\n }\n }", "public void addField(TemplateField field)\r\n{\r\n\tfields.addElement(field);\r\n}", "@Override\r\n public void createNewEntity(String entityName) {\n\r\n }", "public PimsSysReqFieldDaoHibernate() {\n super(PimsSysReqField.class);\n }", "FieldDefinition createFieldDefinition();", "protected void addField(InstanceContainer container, Form form, MetaProperty metaProperty, boolean isReadonly) {\n MetaClass metaClass = container.getEntityMetaClass();\n Range range = metaProperty.getRange();\n\n boolean isRequired = isRequired(metaProperty);\n\n UiEntityAttributeContext attributeContext = new UiEntityAttributeContext(metaClass, metaProperty.getName());\n accessManager.applyRegisteredConstraints(attributeContext);\n\n if (!attributeContext.canView())\n return;\n\n if (range.isClass()) {\n UiEntityContext entityContext = new UiEntityContext(range.asClass());\n accessManager.applyRegisteredConstraints(entityContext);\n if (!entityContext.isViewPermitted()) {\n return;\n }\n }\n\n ValueSource valueSource = new ContainerValueSource<>(container, metaProperty.getName());\n\n ComponentGenerationContext componentContext =\n new ComponentGenerationContext(metaClass, metaProperty.getName());\n componentContext.setValueSource(valueSource);\n\n Field field = (Field) uiComponentsGenerator.generate(componentContext);\n\n if (requireTextArea(metaProperty, getItem(), MAX_TEXTFIELD_STRING_LENGTH)) {\n field = uiComponents.create(TextArea.NAME);\n }\n\n if (isBoolean(metaProperty)) {\n field = createBooleanField();\n }\n\n if (range.isClass()) {\n EntityPicker pickerField = uiComponents.create(EntityPicker.class);\n\n EntityLookupAction lookupAction = actions.create(EntityLookupAction.class);\n lookupAction.setScreenClass(EntityInspectorBrowser.class);\n lookupAction.setScreenOptionsSupplier(() -> new MapScreenOptions(\n ParamsMap.of(\"entity\", metaProperty.getRange().asClass().getName())));\n lookupAction.setOpenMode(OpenMode.THIS_TAB);\n\n pickerField.addAction(lookupAction);\n pickerField.addAction(actions.create(EntityClearAction.class));\n\n field = pickerField;\n }\n\n field.setValueSource(valueSource);\n field.setCaption(getPropertyCaption(metaClass, metaProperty));\n field.setRequired(isRequired);\n\n isReadonly = isReadonly || (disabledProperties != null && disabledProperties.contains(metaProperty.getName()));\n if (range.isClass() && !metadataTools.isEmbedded(metaProperty)) {\n field.setEditable(metadataTools.isOwningSide(metaProperty) && !isReadonly);\n } else {\n field.setEditable(!isReadonly);\n }\n\n field.setWidth(fieldWidth);\n\n if (isRequired) {\n field.setRequiredMessage(messageTools.getDefaultRequiredMessage(metaClass, metaProperty.getName()));\n }\n form.add(field);\n }", "public interface ExtendedFieldGroupFieldFactory extends FieldGroupFieldFactory\r\n{\r\n\t<T> CRUDTable<T> createTableField(Class<T> genericType, boolean manyToMany);\r\n}", "public interface JdlFieldView extends JdlField, JdlCommentView {\n //TODO This validation should be handled in JdlService\n default String getTypeName() {\n JdlFieldEnum type = getType();\n return switch (type) {\n case ENUM -> getEnumEntityName()\n .orElseThrow(() -> new IllegalStateException(\"An enum field must have its enum entity name set\"));\n default -> ((\"UUID\".equals(type.name())) ? type.name() : type.toCamelUpper());\n };\n }\n\n default String constraints() {\n List<String> constraints = new ArrayList<>();\n if (renderRequired()) constraints.add(requiredConstraint());\n if (isUnique()) constraints.add(uniqueConstraint());\n getMin().ifPresent(min -> constraints.add(minConstraint(min)));\n getMax().ifPresent(max -> constraints.add(maxConstraint(max)));\n getPattern().ifPresent(pattern -> constraints.add(patternConstraint(pattern)));\n return (!constraints.isEmpty()) ? \" \".concat(Joiner.on(\" \").join(constraints)) : null;\n }\n\n // TODO do not write required when field is primary key\n default boolean renderRequired() {\n // if (!isPrimaryKey() && isRequired() && ) constraints.add(JdlUtils.validationRequired());\n return isRequired() && !(getName().equals(\"id\") && getType().equals(JdlFieldEnum.UUID));\n }\n\n @NotNull\n default String requiredConstraint() {\n return \"required\";\n }\n\n @NotNull\n default String uniqueConstraint() {\n return \"unique\";\n }\n\n default String minConstraint(int min) {\n return switch (getType()) {\n case STRING -> validationMinLength(min);\n default -> validationMin(min);\n };\n }\n\n default String maxConstraint(int max) {\n return switch (getType()) {\n case STRING -> validationMaxLength(max);\n default -> validationMax(max);\n };\n }\n\n //TODO This validation should be handled in JdlService\n default String patternConstraint(String pattern) {\n return switch (getType()) {\n case STRING -> validationPattern(pattern);\n default -> throw new RuntimeException(\"Only String can have a pattern\");\n };\n }\n\n @NotNull\n default String validationMax(final int max) {\n return \"max(\" + max + \")\";\n }\n\n @NotNull\n default String validationMin(final int min) {\n return \"min(\" + min + \")\";\n }\n\n default String validationMaxLength(final int max) {\n return \"maxlength(\" + max + \")\";\n }\n\n @NotNull\n default String validationMinLength(final int min) {\n return \"minlength(\" + min + \")\";\n }\n\n @NotNull\n default String validationPattern(final String pattern) {\n return \"pattern(/\" + pattern + \"/)\";\n }\n}", "@attribute(value = \"\", required = true)\t\r\n\tpublic void addField(Field f) {\r\n\t\tfields.put(\"\" + fieldCount++, f);\r\n\t}", "@Override\r\n\tpublic void addField(Field field) \r\n\t{\r\n\t\tif(this.fields == null)\r\n\t\t{\r\n\t\t\tthis.fields = new ArrayList<>();\r\n\t\t}\r\n\t\tthis.fields.add(field);\r\n\t}", "void SaveBudgetKeyAdditional(BudgetKeyAdditionalEntity budgetKeyAdditionalEntity);", "public void createField(Field field) {\n Span span = this.tracer.buildSpan(\"Client.CreateField\").start();\n try {\n String path = String.format(\"/index/%s/field/%s\", field.getIndex().getName(), field.getName());\n String body = field.getOptions().toString();\n ByteArrayEntity data = new ByteArrayEntity(body.getBytes(StandardCharsets.UTF_8));\n clientExecute(\"POST\", path, data, null, \"Error while creating field\");\n } finally {\n span.finish();\n }\n }", "@Test\n\tpublic void testFieldCRUDConfig() {\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\t\tfinal String entityInputTypeName = Entity6.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix();\n\t\tfinal IntrospectionFullType entityInputType = getFullType(introspection, entityInputTypeName);\n\t\tfinal String entity6TypeName = Entity6.class.getSimpleName();\n\t\tfinal IntrospectionFullType entityType = getFullType(introspection, entity6TypeName);\n\t\t// Check field attr1 is not readable\n\t\tfinal Optional<IntrospectionTypeField> attr1Field = getOptionalField(entityType, \"attr1\");\n\t\tAssert.assertFalse(\n\t\t\t\tMessage.format(\"There shouldn't be a readable field [{}] in [{}].\", \"typeField\", entity6TypeName),\n\t\t\t\tattr1Field.isPresent());\n\t\t// Check field attr2 is not saveable\n\t\tfinal Optional<IntrospectionInputValue> attr2InputField = getOptionalInputField(entityInputType, \"attr2\");\n\t\tAssert.assertFalse(\n\t\t\t\tMessage.format(\"There shouldn't be a not saveable field [{}] in [{}].\", \"attr2\", entityInputTypeName),\n\t\t\t\tattr2InputField.isPresent());\n\t\t// Check field attr3 is not nullable\n\t\tassertInputField(entityInputType, \"attr3\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\t// Check field attr4 is not nullableForCreate\n\t\tassertInputField(entityInputType, \"attr4\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\t// Check field attr5 is not nullableForUpdate\n\t\tassertInputField(entityInputType, \"attr5\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\t// Check field attr6 is not filterable\n\t\tfinal String entityFilterTypeName = Entity6.class.getSimpleName()\n\t\t\t\t+ schemaConfig.getQueryGetListFilterEntityTypeNameSuffix();\n\t\tfinal IntrospectionFullType entityFilterInputType = getFullType(introspection, entityFilterTypeName);\n\t\tfinal Optional<IntrospectionInputValue> attr4IinputField = getOptionalInputField(entityFilterInputType,\n\t\t\t\t\"attr6\");\n\t\tAssert.assertFalse(\n\t\t\t\tMessage.format(\"There shouldn't be a filterable field [{}] in [{}].\", \"attr6\", entityFilterTypeName),\n\t\t\t\tattr4IinputField.isPresent());\n\t\t// Check field attr7 is mandatory\n\t\t// Check field attr8 is mandatory for update\n\t\t// Check field attr9 is mandatory for create\n\n\t\t// Check field attr10 is not readable for ROLE1\n\t\t// Check field attr10 is not readable for ROLE1\n\n\t\t// Check field attr11 is not saveable for ROLE1\n\n\t\t// Check field attr12 is not nullable for ROLE1\n\n\t\t// Check field attr13 is not nullable for update for ROLE1\n\n\t\t// Check field attr14 is not nullable for create for ROLE1\n\n\t\t// Check field attr15 is mandatory for ROLE1\n\n\t\t// Check field attr16 is mandatory for update for ROLE1\n\n\t\t// Check field attr17 is mandatory for create for ROLE1\n\n\t\t// Check field attr18 is not readable for ROLE1 and ROLE2\n\n\t\t// Check field attr19 is not readable for ROLE1 and ROLE2\n\n\t\t// Check field attr20 is not readable for ROLE1 and not saveable ROLE2\n\n\t\t// Check field attr21 is not readable and not nullable for ROLE1 and\n\t\t// ROLE2\n\n\t\t// Check field attr21 is readable and nullable for other roles than ROLE\n\t\t// 1 and ROLE2\n\n\t\t// Check field attr22 is readable for ROLE1\n\n\t\t// Check field attr22 is not readable for everybody except ROLE1\n\t}", "public void addField()\n {\n DefaultMutableTreeNode node = (DefaultMutableTreeNode) availableFieldsComp.getTree().getLastSelectedPathComponent();\n if (node == null || !node.isLeaf() || !(node.getUserObject() instanceof DataObjDataFieldWrapper) )\n {\n return; // not really a field that can be added, just empty or a string\n }\n\n Object obj = node.getUserObject();\n if (obj instanceof DataObjDataFieldWrapper)\n {\n DataObjDataFieldWrapper wrapper = (DataObjDataFieldWrapper) obj;\n String sep = sepText.getText();\n if (StringUtils.isNotEmpty(sep))\n {\n try\n {\n DefaultStyledDocument doc = (DefaultStyledDocument) formatEditor.getStyledDocument();\n if (doc.getLength() > 0)\n {\n doc.insertString(doc.getLength(), sep, null);\n }\n }\n catch (BadLocationException ble) {}\n \n }\n insertFieldIntoTextEditor(wrapper);\n setHasChanged(true);\n }\n }", "Builder addMainEntity(Thing.Builder value);", "public interface FieldPopulator\n{\n List<String> getCoreFields();\n\n List<String> getSupportedFields();\n\n String getUriTemplate();\n}", "void addFieldBinding( FieldBinding binding );", "@Override\n\tprotected void initializeFields() {\n\n\t}", "public void setEntityAddDate(String entityAddDate);", "@Test\n public void createCustomFieldTest() throws ApiException {\n CustomFieldDefinitionJsonBean body = null;\n FieldDetails response = api.createCustomField(body);\n\n // TODO: test validations\n }", "private void addField(JField jfield) {\n\n // Check for storage ID conflict; note we can get this legitimately when a field is declared only\n // in supertypes, where two of the supertypes are mutually unassignable from each other. In that\n // case, verify that the generated field is the same.\n JField other = this.jfields.get(jfield.storageId);\n if (other != null) {\n\n // If the descriptions differ, no need to give any more details\n if (!other.toString().equals(jfield.toString())) {\n throw new IllegalArgumentException(\"illegal duplicate use of storage ID \"\n + jfield.storageId + \" for both \" + other + \" and \" + jfield);\n }\n\n // Check whether the fields are exactly the same; if not, there is a conflict\n if (!other.isSameAs(jfield)) {\n throw new IllegalArgumentException(\"two or more methods defining \" + jfield + \" conflict: \"\n + other.getter + \" and \" + jfield.getter);\n }\n\n // OK - they are the same thing\n return;\n }\n this.jfields.put(jfield.storageId, jfield);\n\n // Check for name conflict\n if ((other = this.jfieldsByName.get(jfield.name)) != null)\n throw new IllegalArgumentException(\"illegal duplicate use of field name `\" + jfield.name + \"' in \" + this);\n this.jfieldsByName.put(jfield.name, jfield);\n jfield.parent = this;\n\n // Logging\n if (this.log.isTraceEnabled())\n this.log.trace(\"added {} to object type `{}'\", jfield, this.name);\n }", "protected void createFields()\n {\n createEffectiveLocalDtField();\n createDiscontinueLocalDtField();\n createScanTypeField();\n createContractNumberField();\n createContractTypeField();\n createProductTypeField();\n createStatusIndicatorField();\n createCivilMilitaryIndicatorField();\n createEntryUserIdField();\n createLastUpdateUserIdField();\n createLastUpdateTsField();\n }", "@Override\n public Field<?> createField(Container container, Object itemId,\n Object propertyId, Component uiContext) {\n Field<?> field = super.createField(container, itemId,\n propertyId, uiContext);\n\n // ...and just set them as immediate\n ((AbstractField<?>) field).setImmediate(true);\n\n // Also modify the width of TextFields\n if (field instanceof TextField)\n field.setWidth(\"100%\");\n field.setRequired(true);\n ((TextField) field).setInputPrompt(\"Введите назначение\");\n field.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);\n field.focus();\n\n return field;\n }", "private void setNewField(String fieldName) {\n setNewField(fieldName, DBCreator.STRING_TYPE, null);\n }", "@Mapper(componentModel = \"spring\", uses = {HopDongMapper.class})\npublic interface GhiNoMapper extends EntityMapper<GhiNoDTO, GhiNo> {\n\n @Mapping(source = \"hopDong.id\", target = \"hopDongId\")\n GhiNoDTO toDto(GhiNo ghiNo);\n\n @Mapping(source = \"hopDongId\", target = \"hopDong\")\n GhiNo toEntity(GhiNoDTO ghiNoDTO);\n\n default GhiNo fromId(Long id) {\n if (id == null) {\n return null;\n }\n GhiNo ghiNo = new GhiNo();\n ghiNo.setId(id);\n return ghiNo;\n }\n}", "private void handleIdFields(JFieldVar field, JsonNode propertyNode) {\n if (propertyNode.has(JpaConstants.IS_ID_COLUMN) && propertyNode.get(JpaConstants.IS_ID_COLUMN).asBoolean(true)) {\n field.annotate(Id.class);\n }\n\n if (propertyNode.has(JpaConstants.GENERATED_VALUE)) {\n JsonNode generatedValueNode = propertyNode.get(JpaConstants.GENERATED_VALUE);\n JAnnotationUse jAnnotationUse = field.annotate(GeneratedValue.class);\n if (generatedValueNode.has(JpaConstants.STRATEGY)) {\n jAnnotationUse.param(JpaConstants.STRATEGY, GenerationType.valueOf(generatedValueNode.get(JpaConstants.STRATEGY).asText()));\n }\n }\n }", "void addField(\n JavaSymbolName propertyName,\n JavaType propertyType,\n String columnName,\n String columnType,\n JavaType className\n );", "@Override\n\tpublic void save(List<Field> entity) {\n\t\t\n\t}", "@Test\n @Transactional\n void createCommonTableFieldWithExistingId() throws Exception {\n commonTableField.setId(1L);\n CommonTableFieldDTO commonTableFieldDTO = commonTableFieldMapper.toDto(commonTableField);\n\n int databaseSizeBeforeCreate = commonTableFieldRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restCommonTableFieldMockMvc\n .perform(\n post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(commonTableFieldDTO))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the CommonTableField in the database\n List<CommonTableField> commonTableFieldList = commonTableFieldRepository.findAll();\n assertThat(commonTableFieldList).hasSize(databaseSizeBeforeCreate);\n }", "HxField createField(final String fieldType,\n final String fieldName);", "public static CommonTableField createUpdatedEntity() {\n CommonTableField commonTableField = new CommonTableField()\n .title(UPDATED_TITLE)\n .entityFieldName(UPDATED_ENTITY_FIELD_NAME)\n .type(UPDATED_TYPE)\n .tableColumnName(UPDATED_TABLE_COLUMN_NAME)\n .columnWidth(UPDATED_COLUMN_WIDTH)\n .order(UPDATED_ORDER)\n .editInList(UPDATED_EDIT_IN_LIST)\n .hideInList(UPDATED_HIDE_IN_LIST)\n .hideInForm(UPDATED_HIDE_IN_FORM)\n .enableFilter(UPDATED_ENABLE_FILTER)\n .validateRules(UPDATED_VALIDATE_RULES)\n .showInFilterTree(UPDATED_SHOW_IN_FILTER_TREE)\n .fixed(UPDATED_FIXED)\n .sortable(UPDATED_SORTABLE)\n .treeIndicator(UPDATED_TREE_INDICATOR)\n .clientReadOnly(UPDATED_CLIENT_READ_ONLY)\n .fieldValues(UPDATED_FIELD_VALUES)\n .notNull(UPDATED_NOT_NULL)\n .system(UPDATED_SYSTEM)\n .help(UPDATED_HELP)\n .fontColor(UPDATED_FONT_COLOR)\n .backgroundColor(UPDATED_BACKGROUND_COLOR)\n .nullHideInForm(UPDATED_NULL_HIDE_IN_FORM)\n .endUsed(UPDATED_END_USED)\n .options(UPDATED_OPTIONS);\n return commonTableField;\n }", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface Record25HerfinancieeringMapper extends EntityMapper<Record25HerfinancieeringDTO, Record25Herfinancieering> {\n\n\n\n default Record25Herfinancieering fromId(Long id) {\n if (id == null) {\n return null;\n }\n Record25Herfinancieering record25Herfinancieering = new Record25Herfinancieering();\n record25Herfinancieering.setId(id);\n return record25Herfinancieering;\n }\n}", "protected synchronized void addFieldEntity(int fld_i, String entity) {\r\n // System.err.println(\"addFieldEntity(\" + fld_i + \",\\\"\" + entity + \"\\\")\");\r\n //\r\n // fld_i is used to indicate if this is a second iteration of addFieldEntity() to prevent\r\n // infinite recursion... not sure if it's correct... for example, what happens when\r\n // a post-processor transform converts a domain to an ip address - shouldn't that IP\r\n // address then be further decomposed?\r\n //\r\n if (fld_i != -1 && entity.equals(BundlesDT.NOTSET)) {\r\n ent_2_i.put(BundlesDT.NOTSET, -1); \r\n fld_dts.get(fld_i).add(BundlesDT.DT.NOTSET);\r\n\r\n //\r\n // Decompose a tag into it's basic elements\r\n //\r\n } else if (fld_i != -1 && fieldHeader(fld_i).equals(BundlesDT.TAGS)) {\r\n addFieldEntity(-1,entity); // Add the tag itself\r\n Iterator<String> it = Utils.tokenizeTags(entity).iterator();\r\n while (it.hasNext()) {\r\n String tag = it.next(); addFieldEntity(-1, tag);\r\n\tif (Utils.tagIsHierarchical(tag)) {\r\n String sep[] = Utils.tagDecomposeHierarchical(tag);\r\n\t for (int i=0;i<sep.length;i++) addFieldEntity(-1, sep[i]);\r\n\t} else if (Utils.tagIsTypeValue(tag)) {\r\n String sep[] = Utils.separateTypeValueTag(tag);\r\n\t tag_types.add(sep[0]);\r\n\t addFieldEntity(-1,sep[1]);\r\n\t}\r\n }\r\n\r\n //\r\n // Otherwise, keep track of the datatype to field correlation and run post\r\n // processors on the item to have those lookups handy.\r\n //\r\n } else {\r\n // System.err.println(\"determining datatype for \\\"\" + entity + \"\\\"\"); // DEBUG\r\n BundlesDT.DT datatype = BundlesDT.getEntityDataType(entity); if (dt_count_lu.containsKey(datatype) == false) dt_count_lu.put(datatype,0);\r\n // System.err.println(\"datatype for \\\"\" + entity + \"\\\" ==> \" + datatype); // DEBUG\r\n if (datatype != null) {\r\n// System.err.println(\"390:fld_i = \" + fld_i + \" (\" + fld_dts.containsKey(fld_i) + \")\"); // abc DEBUG\r\n// try { System.err.println(\" \" + fieldHeader(fld_i)); } catch (Throwable t) { } // abc DEBUG\r\n if (fld_i != -1) fld_dts.get(fld_i).add(datatype);\r\n if (ent_2_i.containsKey(entity) == false) {\r\n\t // Use special rules to set integer correspondance\r\n\t switch (datatype) {\r\n\t case IPv4: ent_2_i.put(entity, Utils.ipAddrToInt(entity)); break;\r\n\t case IPv4CIDR: ent_2_i.put(entity, Utils.ipAddrToInt((new StringTokenizer(entity, \"/\")).nextToken())); break;\r\n\t case INTEGER: ent_2_i.put(entity, Integer.parseInt(entity)); \r\n\t if (warn_on_float_conflict) checkForFloatConflict(fld_i);\r\n\t break;\r\n case FLOAT: ent_2_i.put(entity, Float.floatToIntBits(Float.parseFloat(entity))); \r\n\t if (warn_on_float_conflict) checkForFloatConflict(fld_i);\r\n break;\r\n\t case DOMAIN: ent_2_i.put(entity, Utils.ipAddrToInt(\"127.0.0.2\") + dt_count_lu.get(datatype)); // Put Domains In Unused IPv4 Space\r\n\t dt_count_lu.put(datatype, dt_count_lu.get(datatype) + 1);\r\n\t\t\t break;\r\n\r\n\t // Pray that these don't collide - otherwise x/y scatters will be off...\r\n\t default: ent_2_i.put(entity, dt_count_lu.get(datatype));\r\n\t dt_count_lu.put(datatype, dt_count_lu.get(datatype) + 1);\r\n\t\t\t break;\r\n }\r\n\t}\r\n\t// Map out the derivatives so that they will have values int the lookups\r\n\t// - Create the post processors\r\n\tif (post_processors == null) {\r\n\t String post_proc_strs[] = BundlesDT.listEnabledPostProcessors();\r\n\t post_processors = new PostProc[post_proc_strs.length];\r\n\t for (int i=0;i<post_processors.length;i++) post_processors[i] = BundlesDT.createPostProcessor(post_proc_strs[i], this);\r\n\t}\r\n\t// - Run all of the post procs against their correct types\r\n if (fld_i != -1) for (int i=0;i<post_processors.length;i++) {\r\n if (post_processors[i].type() == datatype) {\r\n\t String strs[] = post_processors[i].postProcess(entity);\r\n\t for (int j=0;j<strs.length;j++) {\r\n if (entity.equals(strs[j]) == false) addFieldEntity(-1, strs[j]);\r\n\t }\r\n }\r\n\t}\r\n } else if (ent_2_i.containsKey(entity) == false) {\r\n ent_2_i.put(entity, not_assoc.size());\r\n\tnot_assoc.add(entity);\r\n }\r\n }\r\n }", "void add(E entity) throws ValidationException, RepositoryException;", "private JSONObject addMetadataField(String field, String value, JSONObject metadataFields) throws JSONException{\n\t\tif (value != null && value != \"\"){\n\t\t\tmetadataFields.put(field, value);\n\t\t} return metadataFields;\n\t}", "@Label(\"Organization存储\")\npublic interface OrganizationRepository extends ModelQueryAndBatchUpdateRepository<Organization, EOrganization, Integer> {\n\n}", "public void init() {\n entityPropertyBuilders.add(new DefaultEntityComponentBuilder(environment));\n entityPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n entityPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n entityPropertyBuilders.add(new PrimaryKeyComponentBuilder(environment));\n\n // Field meta property builders\n fieldPropertyBuilders.add(new FilterPrimaryKeyComponentBuilder(environment));\n fieldPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n fieldPropertyBuilders.add(new TtlFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new CompositeParentComponentBuilder(environment));\n fieldPropertyBuilders.add(new CollectionFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MapFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new SimpleFieldComponentBuilder(environment));\n }", "public void setUWCompany(entity.UWCompany value);", "@PrePersist()\r\n\tpublic void initEntity(){\r\n\t\tthis.name = WordUtils.capitalizeFully(this.name);\r\n\t}", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "public ChangeFieldEf( EAdField<?> field,\r\n\t\t\tEAdOperation operation) {\r\n\t\tsuper();\r\n\t\tsetId(\"changeField\");\r\n\t\tthis.fields = new EAdListImpl<EAdField<?>>(EAdField.class);\r\n\t\tif (field != null)\r\n\t\t\tfields.add(field);\r\n\t\tthis.operation = operation;\r\n\t}", "private void prepareFields(Entity entity, boolean usePrimaryKey) \r\n\t\t\tthrows IllegalArgumentException, IllegalAccessException, InvocationTargetException{\r\n\t\tprimaryKeyTos = new ArrayList<FieldTO>();\r\n\t\tfieldTos = new ArrayList<FieldTO>();\r\n\t\tField[] fields = entity.getClass().getDeclaredFields();\t\r\n\t\t\r\n\t\t//trunk entity to persistence\r\n\t\tfor(int i=0; i<fields.length; i++){\r\n\t\t\tField reflectionField = fields[i];\r\n\t\t\tif(reflectionField!=null){\r\n\t\t\t\treflectionField.setAccessible(true);\r\n\t\t\t\tAnnotation annoField = reflectionField.getAnnotation(GPAField.class);\r\n\t\t\t\tAnnotation annoFieldPK = reflectionField.getAnnotation(GPAPrimaryKey.class);\r\n\t\t\t\tAnnotation annoFieldBean = reflectionField.getAnnotation(GPAFieldBean.class);\r\n\t\t\t\t/* \r\n\t\t\t\t ainda falta validar a chave primária do objeto\r\n\t\t\t\t por enquanto so esta prevendo pk usando sequence no banco\r\n\t\t\t\t objeto id sempre é gerado no banco por uma sequence\r\n\t\t\t\t*/\r\n\t\t\t\tif(annoFieldPK!=null && annoFieldPK instanceof GPAPrimaryKey){\r\n\t\t\t\t\tGPAPrimaryKey pk = (GPAPrimaryKey)annoFieldPK;\r\n\t\t\t\t\t//if(pk.ignore() == true){\r\n\t\t\t\t\t//\tcontinue;\r\n\t\t\t\t\t//}else{\r\n\t\t\t\t\tString name = pk.name();\r\n\t\t\t\t\tObject value = reflectionField.get(entity);\r\n\t\t\t\t\tfieldTos.add(new FieldTO(name, value));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t//}\r\n\t\t\t\t}\r\n\t\t\t\tif(annoField!=null && annoField instanceof GPAField){\r\n\t\t\t\t\tGPAField field = (GPAField)annoField;\r\n\t\t\t\t\tString name = field.name();\r\n\t\t\t\t\tObject value = reflectionField.get(entity);\r\n\t\t\t\t\tfieldTos.add(new FieldTO(name, value));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(annoFieldBean!=null && annoFieldBean instanceof GPAFieldBean){\r\n\t\t\t\t\tGPAFieldBean field = (GPAFieldBean)annoFieldBean;\r\n\t\t\t\t\tString name = field.name();\r\n\t\t\t\t\tObject value = reflectionField.get(entity);\r\n\t\t\t\t\tfieldTos.add(new FieldTO(name, value));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Mapper(uses ={DateComponent.class}, componentModel = \"spring\")\npublic interface CreateCodeMapper extends EntityMapper<CreateCodeDto , Code> {\n}", "public void addEntityMetadata() throws Exception {\n\n\t\tEntityMetadata entity = new EntityMetadata(entityType, false);\n\t\tentity.setRepositoryInstance(\"OperationalDB\");\n\t\tentity.setProviderType(\"RDBMSDataProvider\");\n\n\t\tMap<String, List<String>> providerParams = new HashMap<String, List<String>>();\n\t\tproviderParams.put(\"table\",\n\t\t\t\tArrays.asList(new String[] { \"APPLICATION_OBJECT\" }));\n\t\tproviderParams.put(\"id_column\", Arrays.asList(new String[] { \"ID\" }));\n\t\tproviderParams.put(\"id_type\", Arrays.asList(new String[] { \"guid\" }));\n\t\tproviderParams.put(\"optimistic_locking\",\n\t\t\t\tArrays.asList(new String[] { \"false\" }));\n\t\tproviderParams.put(\"flex_searchable_string_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"I_VC\" }));\n\t\tproviderParams.put(\"flex_non_searchable_string_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"U_VC\" }));\n\t\tproviderParams.put(\"flex_searchable_date_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"I_DT\" }));\n\t\tproviderParams.put(\"flex_non_searchable_date_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"U_DT\" }));\n\t\tproviderParams.put(\"flex_searchable_number_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"I_NUM\" }));\n\t\tproviderParams.put(\"flex_non_searchable_number_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"U_NUM\" }));\n\t\tproviderParams.put(\"flex_blob_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"U_BLOB\" }));\n\n\t\tentity.setProviderParameters(providerParams);\n\t\tentity.setContainer(false);\n\n\t\tHashMap<String, Map<String, String>> metadataAttachments = new HashMap<String, Map<String, String>>();\n\t\tMap<String, String> prop = new HashMap<String, String>();\n\t\tprop.put(\"isEncrypted\", \"false\");\n\t\tmetadataAttachments.put(\"properties\", prop);\n\t\tAttributeDefinition attrDef = null;\n\t\tFieldDefinition fieldDef = null;\n\n\t\t// parameters: name, type, description, isRequired, isSearchable, isMLS,\n\t\t// defaultValue, groupName, metadataAttachments\n\n\t\tattrDef = new AttributeDefinition(\"givenName\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"lastName\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"email\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"startDate\", \"date\", null, false,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"endDate\", \"date\", null, false,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"employeeNo\", \"number\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\n\n\t\tattrDef = new AttributeDefinition(\"__UID__\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\tfieldDef = new FieldDefinition(\"AO_UID\", \"string\",true);\n\t\tentity.addField(fieldDef);\n\t\tentity.addAttributeMapping(\"__UID__\", \"AO_UID\");\n\t\t\n\t\tattrDef = new AttributeDefinition(\"__NAME__\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\tfieldDef = new FieldDefinition(\"AO_NAME\", \"string\",true);\n\t\tentity.addField(fieldDef);\n\t\tentity.addAttributeMapping(\"__NAME__\", \"AO_NAME\");\n\n\t\t/*\n\t\t * attrDef = new AttributeDefinition(childEntityType, childEntityType,\n\t\t * null, false, true, false, null, \"Basic\", metadataAttachments);\n\t\t * entity.addChildEntityAttribute(attrDef);\n\t\t */\n\n\t\tString xmlString = getStringfromDoc(entity);\n\n\t\ttry {\n\t\t\tmgrConfig.createEntityMetadata(entity);\n\t\t\tSystem.out.println(\"Created entity type: \" + entityType);\n\n\t\t} catch (Exception e) {\n\t\t\t//fail(\"Unexpected exception: \" + getStackTrace(e));\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@ProviderType\npublic interface EmployeeModel extends BaseModel<Employee> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a employee model instance should use the {@link Employee} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this employee.\n\t *\n\t * @return the primary key of this employee\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this employee.\n\t *\n\t * @param primaryKey the primary key of this employee\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the uuid of this employee.\n\t *\n\t * @return the uuid of this employee\n\t */\n\t@AutoEscape\n\tpublic String getUuid();\n\n\t/**\n\t * Sets the uuid of this employee.\n\t *\n\t * @param uuid the uuid of this employee\n\t */\n\tpublic void setUuid(String uuid);\n\n\t/**\n\t * Returns the employee ID of this employee.\n\t *\n\t * @return the employee ID of this employee\n\t */\n\tpublic long getEmployeeId();\n\n\t/**\n\t * Sets the employee ID of this employee.\n\t *\n\t * @param employeeId the employee ID of this employee\n\t */\n\tpublic void setEmployeeId(long employeeId);\n\n\t/**\n\t * Returns the first name of this employee.\n\t *\n\t * @return the first name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getFirstName();\n\n\t/**\n\t * Sets the first name of this employee.\n\t *\n\t * @param firstName the first name of this employee\n\t */\n\tpublic void setFirstName(String firstName);\n\n\t/**\n\t * Returns the last name of this employee.\n\t *\n\t * @return the last name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getLastName();\n\n\t/**\n\t * Sets the last name of this employee.\n\t *\n\t * @param lastName the last name of this employee\n\t */\n\tpublic void setLastName(String lastName);\n\n\t/**\n\t * Returns the middle name of this employee.\n\t *\n\t * @return the middle name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getMiddleName();\n\n\t/**\n\t * Sets the middle name of this employee.\n\t *\n\t * @param middleName the middle name of this employee\n\t */\n\tpublic void setMiddleName(String middleName);\n\n\t/**\n\t * Returns the birth date of this employee.\n\t *\n\t * @return the birth date of this employee\n\t */\n\tpublic Date getBirthDate();\n\n\t/**\n\t * Sets the birth date of this employee.\n\t *\n\t * @param birthDate the birth date of this employee\n\t */\n\tpublic void setBirthDate(Date birthDate);\n\n\t/**\n\t * Returns the post ID of this employee.\n\t *\n\t * @return the post ID of this employee\n\t */\n\tpublic long getPostId();\n\n\t/**\n\t * Sets the post ID of this employee.\n\t *\n\t * @param postId the post ID of this employee\n\t */\n\tpublic void setPostId(long postId);\n\n\t/**\n\t * Returns the sex of this employee.\n\t *\n\t * @return the sex of this employee\n\t */\n\tpublic Boolean getSex();\n\n\t/**\n\t * Sets the sex of this employee.\n\t *\n\t * @param sex the sex of this employee\n\t */\n\tpublic void setSex(Boolean sex);\n\n}", "public void createFieldEditors()\n\t{\n\t}", "private void addSetter(JavaObject object, JavaModelBeanField field) {\n\t\tIJavaCodeLines arguments = getArguments(field, object.getImports());\n\t\tSetterMethod method = new SetterMethod(field.getName(), field.getType(), arguments, objectType);\n\t\tobject.addBlock(method);\n\t}", "public interface GradeMapper {\n @Select(\"select * from grade\")\n public List<Grade> getByGradeNm();\n\n @Insert(\"insert into grade(grade_nm,teacher_id) values(#{gradeNm},#{teacherId})\")\n @Options(useGeneratedKeys=true,keyColumn=\"id\",keyProperty=\"id\")//设置id自增长\n public void save(Grade grade);\n}", "@Generated(\"Speedment\")\npublic interface Employee extends Entity<Employee> {\n \n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getId()} method.\n */\n public final static ComparableField<Employee, Short> ID = new ComparableFieldImpl<>(\"id\", Employee::getId, Employee::setId);\n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getFirstname()} method.\n */\n public final static StringField<Employee> FIRSTNAME = new StringFieldImpl<>(\"firstname\", o -> o.getFirstname().orElse(null), Employee::setFirstname);\n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getLastname()} method.\n */\n public final static StringField<Employee> LASTNAME = new StringFieldImpl<>(\"lastname\", o -> o.getLastname().orElse(null), Employee::setLastname);\n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getBirthdate()} method.\n */\n public final static ComparableField<Employee, Date> BIRTHDATE = new ComparableFieldImpl<>(\"birthdate\", o -> o.getBirthdate().orElse(null), Employee::setBirthdate);\n \n /**\n * Returns the id of this Employee. The id field corresponds to the database\n * column db0.sql696688.employee.id.\n * \n * @return the id of this Employee\n */\n Short getId();\n \n /**\n * Returns the firstname of this Employee. The firstname field corresponds to\n * the database column db0.sql696688.employee.firstname.\n * \n * @return the firstname of this Employee\n */\n Optional<String> getFirstname();\n \n /**\n * Returns the lastname of this Employee. The lastname field corresponds to\n * the database column db0.sql696688.employee.lastname.\n * \n * @return the lastname of this Employee\n */\n Optional<String> getLastname();\n \n /**\n * Returns the birthdate of this Employee. The birthdate field corresponds to\n * the database column db0.sql696688.employee.birthdate.\n * \n * @return the birthdate of this Employee\n */\n Optional<Date> getBirthdate();\n \n /**\n * Sets the id of this Employee. The id field corresponds to the database\n * column db0.sql696688.employee.id.\n * \n * @param id to set of this Employee\n * @return this Employee instance\n */\n Employee setId(Short id);\n \n /**\n * Sets the firstname of this Employee. The firstname field corresponds to\n * the database column db0.sql696688.employee.firstname.\n * \n * @param firstname to set of this Employee\n * @return this Employee instance\n */\n Employee setFirstname(String firstname);\n \n /**\n * Sets the lastname of this Employee. The lastname field corresponds to the\n * database column db0.sql696688.employee.lastname.\n * \n * @param lastname to set of this Employee\n * @return this Employee instance\n */\n Employee setLastname(String lastname);\n \n /**\n * Sets the birthdate of this Employee. The birthdate field corresponds to\n * the database column db0.sql696688.employee.birthdate.\n * \n * @param birthdate to set of this Employee\n * @return this Employee instance\n */\n Employee setBirthdate(Date birthdate);\n \n /**\n * Creates and returns a {@link Stream} of all {@link Borrowed} Entities that\n * references this Entity by the foreign key field that can be obtained using\n * {@link Borrowed#getEmployeeid()}. The order of the Entities are undefined\n * and may change from time to time.\n * <p>\n * Using this method, you may \"walk the graph\" and jump directly between\n * referencing Entities without using {@code JOIN}s.<p> N.B. The current\n * implementation supports lazy-loading of the referencing Entities.\n * \n * @return a {@link Stream} of all {@link Borrowed} Entities that references\n * this Entity by the foreign key field that can be obtained using {@link\n * Borrowed#getEmployeeid()}\n */\n Stream<Borrowed> findBorrowedsByEmployeeid();\n \n /**\n * Creates and returns a <em>distinct</em> {@link Stream} of all {@link\n * Borrowed} Entities that references this Entity by a foreign key. The order\n * of the Entities are undefined and may change from time to time.\n * <p>\n * Note that the Stream is <em>distinct</em>, meaning that referencing\n * Entities will only appear once in the Stream, even though they may\n * reference this Entity by several columns.\n * <p>\n * Using this method, you may \"walk the graph\" and jump directly between\n * referencing Entities without using {@code JOIN}s.<p> N.B. The current\n * implementation supports lazy-loading of the referencing Entities.\n * \n * @return a <em>distinct</em> {@link Stream} of all {@link Borrowed}\n * Entities that references this Entity by a foreign key\n */\n Stream<Borrowed> findBorroweds();\n}", "public interface FieldDAO extends CrudRepository<Field, Integer> {\n\n}", "protected Component constructCustomField(EntityModel<U> entityModel, AttributeModel attributeModel) {\n // override in subclasses\n return null;\n }", "public EsIndexPropertyBuilder addField(String fieldName, AllowableFieldEntry field) {\n this.fieldMap.put(fieldName, field);\n return this;\n }", "public AttributeField(Field field){\n this.field = field;\n }", "public void testFields()\n {\n TestUtils.testNoAddedFields(getTestedClass(), null);\n }", "public static void insertField(Field field) {\n\t\t\n\t\ttry{\n Connection connection = getConnection();\n\n\n try {\n PreparedStatement statement = connection.prepareStatement(\"INSERT INTO template_fields (field_id, form_name, field_name, field_value, field_type, field_mandatory)\"\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" VALUES ('\"+field.getTheId()+\"', '\"+field.getTheFormName()+\"', '\"+field.getTheName()+\"', 'Here is text 424', '\"+field.getTheType()+\"', '\"+field.getTheMandatory()+\"')\"); \n statement.executeUpdate();\n\n statement.close();\n connection.close();\n } catch (SQLException ex) {\n \t//23 stands for duplicate / unique entries in db, so listen for that error and update db if so\n \tif (ex.getSQLState().startsWith(\"23\")) {\n System.out.println(\"Duplicate\");\n PreparedStatement statement = connection.prepareStatement(\"UPDATE template_fields SET \"\n \t\t+ \"field_id = '\"+field.getTheId()+\"', field_name = '\"+field.getTheName()+\"',\"\n \t\t+ \" field_value = 'here text', field_type = '\"+field.getTheType()+\"'\"\n \t\t\t\t+ \"WHERE field_id = '\"+field.getTheId()+\"' \"); \n\t\t\t\t\tstatement.executeUpdate();\n\t\t\t\t\t\n\t\t\t\t\tstatement.close();\n\t\t\t\t\tconnection.close();\n \t}\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\t}", "@Override\r\n protected void addAdditionalFormFields(AssayDomainIdForm domainIdForm, DataRegion rgn)\r\n {\n rgn.addHiddenFormField(\"providerName\", domainIdForm.getProviderName());\r\n }", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface ProgrammePropMapper extends EntityMapper<ProgrammePropDTO, ProgrammeProp> {\n\n\n\n default ProgrammeProp fromId(Long id) {\n if (id == null) {\n return null;\n }\n ProgrammeProp programmeProp = new ProgrammeProp();\n programmeProp.setId(id);\n return programmeProp;\n }\n}", "void addEntity(IViewEntity entity);", "public void addField(String fieldName, Object fieldValue, boolean forceAdd) {\n if (forceAdd\n || (this.beanMap.containsKey(fieldName)\n && this.beanMap.get(fieldName) == null && !this.deferredDescriptions\n .containsKey(fieldName))) {\n this.beanMap.put(fieldName, fieldValue);\n }\n }", "ObjectField createObjectField();", "private void createListFields(SGTable table) {\n\t\t\t\n\t\t ListGridField LIST_COLUMN_FIELD = new ListGridField(\"FIELD_ID\", Util.TI18N.LIST_COLUMN_FIELD(), 145); \n\t\t LIST_COLUMN_FIELD.setCanEdit(false);\n\t\t ListGridField LIST_COLUMN_CNAME = new ListGridField(\"FIELD_CNAME\", Util.TI18N.LIST_COLUMN_CNAME(), 105); \n\t\t LIST_COLUMN_CNAME.setCanEdit(false);\n\t\t ListGridField LIST_COLUMN_WIDTH = new ListGridField(\"FIELD_WIDTH\",Util.TI18N.LIST_COLUMN_WIDTH(),40); \n\t\t ListGridField LIST_SHOW_FLAG = new ListGridField(\"SHOW_FLAG\",Util.TI18N.LIST_SHOW_FLAG(),50);\n\t\t LIST_SHOW_FLAG.setType(ListGridFieldType.BOOLEAN);\n\t\t ListGridField MODIFY_FLAG=new ListGridField(\"MODIFY_FLAG\",\"\",50);\n\t\t MODIFY_FLAG.setType(ListGridFieldType.BOOLEAN);\n\t\t MODIFY_FLAG.setHidden(true);\n\t\t table.setFields(LIST_COLUMN_FIELD, LIST_COLUMN_CNAME, LIST_COLUMN_WIDTH, LIST_SHOW_FLAG,MODIFY_FLAG);\n\t}", "@Override\n\tpublic void entityAdded(Entity entity)\n\t{\n\t\t\n\t}", "public JsonField() {\n }", "public void buildMetaFields() {\n for (AtreusMetaEntity metaEntity : environment.getMetaManager().getEntities()) {\n Class<?> entityType = metaEntity.getEntityType();\n\n // Build the fields\n for (Field field : entityType.getDeclaredFields()) {\n\n // Execute the meta property builder rule bindValue\n for (BaseEntityMetaComponentBuilder propertyBuilder : fieldPropertyBuilders) {\n if (!propertyBuilder.acceptsField((MetaEntityImpl) metaEntity, field)) {\n continue;\n }\n propertyBuilder.validateField((MetaEntityImpl) metaEntity, field);\n if (propertyBuilder.handleField((MetaEntityImpl) metaEntity, field)) {\n break;\n }\n }\n\n }\n }\n }", "@Test(enabled = false) //ExSkip\n public void insertMergeField(final DocumentBuilder builder, final String fieldName, final String textBefore, final String textAfter) throws Exception {\n FieldMergeField field = (FieldMergeField) builder.insertField(FieldType.FIELD_MERGE_FIELD, true);\n field.setFieldName(fieldName);\n field.setTextBefore(textBefore);\n field.setTextAfter(textAfter);\n }", "protected abstract void createFieldEditors();", "public BaseField setupField(int iFieldSeq)\n {\n BaseField field = null;\n if (iFieldSeq == 0)\n field = new HotelField(this, PRODUCT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 1)\n // field = new DateField(this, START_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 2)\n // field = new DateField(this, END_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 3)\n // field = new StringField(this, DESCRIPTION, 10, null, null);\n //if (iFieldSeq == 4)\n // field = new CityField(this, CITY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 5)\n // field = new CityField(this, TO_CITY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 6)\n // field = new ContinentField(this, CONTINENT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 7)\n // field = new RegionField(this, REGION_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 8)\n // field = new CountryField(this, COUNTRY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 9)\n // field = new StateField(this, STATE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 10)\n // field = new VendorField(this, VENDOR_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 11)\n field = new HotelRateField(this, RATE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 12)\n field = new HotelClassField(this, CLASS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 13)\n // field = new DateField(this, DETAIL_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 14)\n // field = new ShortField(this, PAX, Constants.DEFAULT_FIELD_LENGTH, null, new Short((short)2));\n //if (iFieldSeq == 15)\n // field = new HotelScreenRecord_LastChanged(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 16)\n // field = new BooleanField(this, REMOTE_QUERY_ENABLED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 17)\n // field = new ShortField(this, BLOCKED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 18)\n // field = new ShortField(this, OVERSELL, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 19)\n // field = new BooleanField(this, CLOSED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 20)\n // field = new BooleanField(this, DELETE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 21)\n // field = new BooleanField(this, READ_ONLY, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 22)\n // field = new ProductSearchTypeField(this, PRODUCT_SEARCH_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 23)\n // field = new ProductTypeField(this, PRODUCT_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 24)\n field = new PaxCategorySelect(this, PAX_CATEGORY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (field == null)\n field = super.setupField(iFieldSeq);\n return field;\n }", "@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }", "private void exposeExposedFieldsToJs() {\n if (fieldsWithNameExposed.isEmpty()) {\n return;\n }\n\n MethodSpec.Builder exposeFieldMethod = MethodSpec\n .methodBuilder(\"vg$ef\")\n .addAnnotation(JsMethod.class);\n\n fieldsWithNameExposed\n .forEach(field -> exposeFieldMethod\n .addStatement(\"this.$L = $T.v()\",\n field.getName(),\n FieldsExposer.class)\n );\n\n exposeFieldMethod\n .addStatement(\n \"$T.e($L)\",\n FieldsExposer.class,\n fieldsWithNameExposed.stream()\n .map(ExposedField::getName)\n .collect(Collectors.joining(\",\"))\n );\n componentExposedTypeBuilder.addMethod(exposeFieldMethod.build());\n }", "public void addField (String label, String field) {\n addField (label, field, \"\");\n }", "@Override\r\n protected void buildEditingFields() {\r\n LanguageCodeComboBox languageCodeComboBox = new LanguageCodeComboBox();\r\n languageCodeComboBox.setAllowBlank(false);\r\n languageCodeComboBox.setToolTip(\"The translation language's code is required. It can not be null. Please select one or delete the row.\");\r\n BoundedTextField tf = new BoundedTextField();\r\n tf.setMaxLength(256);\r\n tf.setToolTip(\"This is the translation corresponding to the selected language. This field is required. It can not be null.\");\r\n tf.setAllowBlank(false);\r\n addColumnEditorConfig(languageCodeColumnConfig, languageCodeComboBox);\r\n addColumnEditorConfig(titleColumnConfig, tf);\r\n }", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface OrganisationTypeMapper extends EntityMapper<OrganisationTypeDTO, OrganisationType> {\n\n\n @Mapping(target = \"organisations\", ignore = true)\n OrganisationType toEntity(OrganisationTypeDTO organisationTypeDTO);\n\n default OrganisationType fromId(Long id) {\n if (id == null) {\n return null;\n }\n OrganisationType organisationType = new OrganisationType();\n organisationType.setId(id);\n return organisationType;\n }\n}", "public void add() {\n preAdd();\n EntitySelect<T> entitySelect = getEntitySelect();\n entitySelect.setMultiSelect(true);\n getEntitySelect().open();\n }", "@Override\n\tprotected CoreEntity createNewEntity() {\n\t\treturn null;\n\t}", "@Data\npublic class <XXX>ModelInfo extends AbstractModelInfo {\n private <Field1DataType> <Field1>;\n /**\n * @return an corresponding {@link <XXX>Transformer} for this model info\n */\n @Override\n public Transformer getTransformer() {\n return new <XXX>Transformer(this);\n }", "Ack editProperty(ProjectEntity entity, String propertyTypeName, JsonNode data);", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface EmploymentTypeMapper extends EntityMapper<EmploymentTypeDTO, EmploymentType> {\n\n\n @Mapping(target = \"people\", ignore = true)\n EmploymentType toEntity(EmploymentTypeDTO employmentTypeDTO);\n\n default EmploymentType fromId(Long id) {\n if (id == null) {\n return null;\n }\n EmploymentType employmentType = new EmploymentType();\n employmentType.setId(id);\n return employmentType;\n }\n}", "EntityBeanDescriptor createEntityBeanDescriptor();", "private void addFields(StringBuilder xml) {\n\t\tfor(FieldRequest field : fields) {\n\t\t\tstartElementWithAttributes(xml, \"Delta\");\n\t\t\taddStringAttribute(xml, \"id\", field.getId());\n\t\t\taddBooleanAttribute(xml, \"masked\", field.getMasked());\n\t\t\tcloseSimpleElementWithAttributes(xml);\n\t\t}\n\t}", "private void createUserListFields(SGTable table) {\n\t\t ListGridField LIST_COLUMN_ID = new ListGridField(\"FIELD_ID\", Util.TI18N.LIST_COLUMN_FIELD(), 145);\n\t\t LIST_COLUMN_ID.setCanEdit(false);\n\t\t ListGridField LIST_COLUMN_CNAME = new ListGridField(\"FIELD_CNAME\", Util.TI18N.LIST_COLUMN_CNAME(), 105);\n\t\t LIST_COLUMN_CNAME.setCanEdit(false);\n\t\t ListGridField COLUMN_WIDTH = new ListGridField(\"FIELD_WIDTH\", Util.TI18N.LIST_COLUMN_WIDTH(), 40);\n\t\t LIST_COLUMN_CNAME.setCanEdit(false);\n\t\t table.setFields(LIST_COLUMN_ID, LIST_COLUMN_CNAME, COLUMN_WIDTH);\n }", "@attribute(value = \"\", required = true)\t\r\n\tpublic void addCharField(CharField f) {\r\n\t\tfields.put(\"\" + fieldCount++, f);\r\n\t}", "Builder addMainEntityOfPage(String value);", "@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }", "public interface CommonEntityMethod extends ToJson,GetFieldValue,SetFieldValue{\n}", "public static void providePOJOsFieldAndGetterSetter(\n final FileWriterWrapper writer,\n final Field field)\n throws IOException {\n String javaType = mapType(field.getOriginalDataType());\n\n writer.write(\" private \" + javaType + \" \" + field.getJavaName()\n + \" = null;\\n\\n\");\n\n writer.write(\" public \" + javaType + \" \" + field.getGetterName()\n + \"() {\\n\");\n writer.write(\" return \" + field.getJavaName() + \";\\n\");\n writer.write(\" }\\n\\n\");\n\n writer.write(\" public void \" + field.getSetterName() + \"(\"\n + javaType + \" newValue) {\\n\");\n writer.write(\" \" + field.getJavaName() + \" = newValue\"\n + \";\\n\");\n writer.write(\" }\\n\\n\");\n }", "@ProviderType\npublic interface ItemShopBasketModel extends BaseModel<ItemShopBasket> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a item shop basket model instance should use the {@link ItemShopBasket} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this item shop basket.\n\t *\n\t * @return the primary key of this item shop basket\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this item shop basket.\n\t *\n\t * @param primaryKey the primary key of this item shop basket\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the item shop basket ID of this item shop basket.\n\t *\n\t * @return the item shop basket ID of this item shop basket\n\t */\n\tpublic long getItemShopBasketId();\n\n\t/**\n\t * Sets the item shop basket ID of this item shop basket.\n\t *\n\t * @param itemShopBasketId the item shop basket ID of this item shop basket\n\t */\n\tpublic void setItemShopBasketId(long itemShopBasketId);\n\n\t/**\n\t * Returns the shop basket ID of this item shop basket.\n\t *\n\t * @return the shop basket ID of this item shop basket\n\t */\n\tpublic long getShopBasketId();\n\n\t/**\n\t * Sets the shop basket ID of this item shop basket.\n\t *\n\t * @param shopBasketId the shop basket ID of this item shop basket\n\t */\n\tpublic void setShopBasketId(long shopBasketId);\n\n\t/**\n\t * Returns the name of this item shop basket.\n\t *\n\t * @return the name of this item shop basket\n\t */\n\t@AutoEscape\n\tpublic String getName();\n\n\t/**\n\t * Sets the name of this item shop basket.\n\t *\n\t * @param name the name of this item shop basket\n\t */\n\tpublic void setName(String name);\n\n\t/**\n\t * Returns the imported of this item shop basket.\n\t *\n\t * @return the imported of this item shop basket\n\t */\n\tpublic boolean getImported();\n\n\t/**\n\t * Returns <code>true</code> if this item shop basket is imported.\n\t *\n\t * @return <code>true</code> if this item shop basket is imported; <code>false</code> otherwise\n\t */\n\tpublic boolean isImported();\n\n\t/**\n\t * Sets whether this item shop basket is imported.\n\t *\n\t * @param imported the imported of this item shop basket\n\t */\n\tpublic void setImported(boolean imported);\n\n\t/**\n\t * Returns the exempt of this item shop basket.\n\t *\n\t * @return the exempt of this item shop basket\n\t */\n\tpublic boolean getExempt();\n\n\t/**\n\t * Returns <code>true</code> if this item shop basket is exempt.\n\t *\n\t * @return <code>true</code> if this item shop basket is exempt; <code>false</code> otherwise\n\t */\n\tpublic boolean isExempt();\n\n\t/**\n\t * Sets whether this item shop basket is exempt.\n\t *\n\t * @param exempt the exempt of this item shop basket\n\t */\n\tpublic void setExempt(boolean exempt);\n\n\t/**\n\t * Returns the price of this item shop basket.\n\t *\n\t * @return the price of this item shop basket\n\t */\n\tpublic Double getPrice();\n\n\t/**\n\t * Sets the price of this item shop basket.\n\t *\n\t * @param price the price of this item shop basket\n\t */\n\tpublic void setPrice(Double price);\n\n\t/**\n\t * Returns the active of this item shop basket.\n\t *\n\t * @return the active of this item shop basket\n\t */\n\tpublic boolean getActive();\n\n\t/**\n\t * Returns <code>true</code> if this item shop basket is active.\n\t *\n\t * @return <code>true</code> if this item shop basket is active; <code>false</code> otherwise\n\t */\n\tpublic boolean isActive();\n\n\t/**\n\t * Sets whether this item shop basket is active.\n\t *\n\t * @param active the active of this item shop basket\n\t */\n\tpublic void setActive(boolean active);\n\n\t/**\n\t * Returns the amount of this item shop basket.\n\t *\n\t * @return the amount of this item shop basket\n\t */\n\tpublic long getAmount();\n\n\t/**\n\t * Sets the amount of this item shop basket.\n\t *\n\t * @param amount the amount of this item shop basket\n\t */\n\tpublic void setAmount(long amount);\n\n\t/**\n\t * Returns the tax of this item shop basket.\n\t *\n\t * @return the tax of this item shop basket\n\t */\n\tpublic Double getTax();\n\n\t/**\n\t * Sets the tax of this item shop basket.\n\t *\n\t * @param tax the tax of this item shop basket\n\t */\n\tpublic void setTax(Double tax);\n\n\t/**\n\t * Returns the total of this item shop basket.\n\t *\n\t * @return the total of this item shop basket\n\t */\n\tpublic Double getTotal();\n\n\t/**\n\t * Sets the total of this item shop basket.\n\t *\n\t * @param total the total of this item shop basket\n\t */\n\tpublic void setTotal(Double total);\n\n}", "@Override\n public boolean isDisableMetadataField() {\n return false;\n }", "@SuppressWarnings(\"all\")\n public AField create(IAPresenter source, Field reflectedJavaField, AEntity entityBean) {\n AField algosField = null;\n List items = null;\n boolean nuovaEntity = text.isEmpty(entityBean.id);\n EAFieldType type = annotation.getFormType(reflectedJavaField);\n String caption = annotation.getFormFieldName(reflectedJavaField);\n AIField fieldAnnotation = annotation.getAIField(reflectedJavaField);\n String width = annotation.getWidthEM(reflectedJavaField);\n boolean required = annotation.isRequired(reflectedJavaField);\n boolean focus = annotation.isFocus(reflectedJavaField);\n boolean enabled = annotation.isFieldEnabled(reflectedJavaField, nuovaEntity);\n Class targetClazz = annotation.getComboClass(reflectedJavaField);\n// boolean visible = annotation.isFieldVisibile(reflectedJavaField, nuovaEntity);\n Object bean;\n\n //@todo RIMETTERE\n// int rows = annotation.getNumRows(reflectionJavaField);\n// boolean nullSelection = annotation.isNullSelectionAllowed(reflectionJavaField);\n// boolean newItems = annotation.isNewItemsAllowed(reflectionJavaField);\n\n if (type == EAFieldType.text.noone) {\n return null;\n }// end of if cycle\n\n //@todo RIMETTERE\n// //--non riesco (per ora) a leggere le Annotation da una classe diversa (AEntity)\n// if (fieldAnnotation == null && reflectionJavaField.getName().equals(Cost.PROPERTY_ID)) {\n// type = EAFieldType.id;\n// }// end of if cycle\n\n if (type != null) {\n algosField = fieldFactory.crea(source, type, reflectedJavaField, entityBean);\n }// end of if cycle\n\n if (type == EAFieldType.combo && targetClazz != null && algosField != null) {\n bean = context.getBean(targetClazz);\n\n if (bean instanceof AService) {\n items = ((AService) bean).findAll();\n }// end of if cycle\n\n if (array.isValid(items)) {\n ((AComboField) algosField).fixCombo(items, false, false);\n }// end of if cycle\n }// end of if cycle\n\n\n //@todo RIMETTERE\n// if (type == EAFieldType.enumeration && targetClazz != null && algosField != null) {\n// if (targetClazz.isEnum()) {\n// items = new ArrayList(Arrays.asList(targetClazz.getEnumConstants()));\n// }// end of if cycle\n//\n// if (algosField != null && algosField instanceof AComboField && items != null) {\n// ((AComboField) algosField).fixCombo(items, false, false);\n// }// end of if cycle\n// }// end of if cycle\n\n //@todo RIMETTERE\n// if (type == EAFieldType.radio && targetClazz != null && algosField != null) {\n// //@todo PATCH - PATCH - PATCH\n// if (reflectionJavaField.getName().equals(\"attivazione\") && entityBean.getClass().getName().equals(Preferenza.class.getName())) {\n// items = new ArrayList(Arrays.asList(PrefEffect.values()));\n// }// end of if cycle\n// //@todo PATCH - PATCH - PATCH\n//\n// if (items != null) {\n// ((ARadioField) algosField).fixRadio(items);\n// }// end of if cycle\n// }// end of if cycle\n\n //@todo RIMETTERE\n// if (type == EAFieldType.link && targetClazz != null && algosField != null) {\n// String lowerName = text.primaMinuscola(targetClazz.getSimpleName());\n// Object bean = context.getBean(lowerName);\n// algosField.setTarget((ApplicationListener) bean);\n// }// end of if cycle\n//\n if (algosField != null && fieldAnnotation != null) {\n// algosField.setVisible(visible);\n algosField.setEnabled(enabled);\n algosField.setRequiredIndicatorVisible(required);\n algosField.setCaption(caption);\n// if (text.isValid(width)) {\n algosField.setWidth(width);\n// }// end of if cycle\n// if (rows > 0) {\n// algosField.setRows(rows);\n// }// end of if cycle\n algosField.setFocus(focus);\n//\n// if (LibParams.displayToolTips()) {\n// algosField.setDescription(fieldAnnotation.help());\n// }// end of if cycle\n//\n// if (type == EAFieldType.dateNotEnabled) {\n// algosField.setEnabled(false);\n// }// end of if cycle\n }// end of if cycle\n\n return algosField;\n }", "@Override\n protected final Map<String, String> createFieldToPropertyMapping() {\n // get super class mapping\n final Map<String, String> mapping = super.createFieldToPropertyMapping();\n \n mapping.put(this.tableName + \".rmres_id\", \"id\");\n mapping.put(this.tableName + \".cost_rmres\", \"cost\");\n mapping.put(this.tableName + \".config_id\", \"configId\");\n mapping.put(this.tableName + \".rm_arrange_type_id\", \"arrangeTypeId\");\n mapping.put(this.tableName + \".guests_external\", \"externalGuests\");\n mapping.put(this.tableName + \".guests_internal\", \"internalGuests\");\n \n return mapping;\n }", "private void addDescriptorFields (XmlDescriptor new_desc, Vector fields) {\n\t\tfor (int i = 0; i < fields.size(); i++) {\n\t\t\tJField jf = (JField)fields.elementAt(i);\n\t\t\tif (!jf._noMarshal) {\t\t\t\t\n\t\t\t\tif (jf.isXmlAttribute())\n\t\t\t\t\tnew_desc.addAttribute (jf);\n\t\t\t\telse\n\t\t\t\t\tnew_desc.addElement (jf);\n\t\t\t} else {\n\t\t\t\t//System.out.println (\"not adding unmarshal field..\" + jf.getJavaName ());\n\t\t\t}\n\t\t}\n\t}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface ClientHeartbeatInfoMapper extends EntityMapper<ClientHeartbeatInfoDTO, ClientHeartbeatInfo> {\n\n\n\n default ClientHeartbeatInfo fromId(Long id) {\n if (id == null) {\n return null;\n }\n ClientHeartbeatInfo clientHeartbeatInfo = new ClientHeartbeatInfo();\n clientHeartbeatInfo.setId(id);\n return clientHeartbeatInfo;\n }\n}", "public EntityPropertyBean() {}", "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 }" ]
[ "0.62933207", "0.59871024", "0.59345496", "0.5807264", "0.57005894", "0.56254286", "0.56229895", "0.56043065", "0.55907774", "0.55277437", "0.55270976", "0.5502147", "0.5449934", "0.5449778", "0.5448262", "0.5438682", "0.5421909", "0.539829", "0.5392975", "0.5386786", "0.5378604", "0.5368571", "0.5365954", "0.53548914", "0.53542715", "0.5320208", "0.5299872", "0.5281769", "0.5277985", "0.5277643", "0.52720714", "0.5261695", "0.5250926", "0.5237663", "0.5232543", "0.5226736", "0.52246344", "0.52201366", "0.52098", "0.52081615", "0.5208048", "0.52047235", "0.5192572", "0.5187729", "0.51830703", "0.51454425", "0.5136857", "0.51367474", "0.5134208", "0.51329243", "0.5132539", "0.5131652", "0.5122219", "0.51200175", "0.51170164", "0.5110706", "0.50978315", "0.50843036", "0.5078298", "0.50773495", "0.50740963", "0.50712", "0.5068569", "0.50645906", "0.5061913", "0.5058393", "0.505457", "0.50536925", "0.5053569", "0.5053347", "0.50525504", "0.5050168", "0.50495523", "0.50453347", "0.50411284", "0.503058", "0.50298315", "0.50244564", "0.502122", "0.50095356", "0.5008393", "0.5006762", "0.5003892", "0.49978906", "0.49883392", "0.49701265", "0.49588418", "0.49572", "0.49551457", "0.49545777", "0.49497432", "0.49307552", "0.49283522", "0.49278754", "0.49254358", "0.49232286", "0.49127015", "0.4909568", "0.49072063", "0.4905449", "0.49016434" ]
0.0
-1
jhipsterneedleentityaddgetterssetters JHipster will add getters and setters here, do not remove
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Job job = (Job) o; if (job.getId() == null || getId() == null) { return false; } return Objects.equals(getId(), job.getId()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface CommonEntityMethod extends ToJson,GetFieldValue,SetFieldValue{\n}", "static void setPropertiesFromGetters(TableEntity entity, ClientLogger logger) {\n Class<?> myClass = entity.getClass();\n\n // Do nothing if the entity is actually a `TableEntity` rather than a subclass\n if (myClass == TableEntity.class) {\n return;\n }\n\n for (Method m : myClass.getMethods()) {\n // Skip any non-getter methods\n if (m.getName().length() < 3\n || TABLE_ENTITY_METHODS.contains(m.getName())\n || (!m.getName().startsWith(\"get\") && !m.getName().startsWith(\"is\"))\n || m.getParameterTypes().length != 0\n || void.class.equals(m.getReturnType())) {\n continue;\n }\n\n // A method starting with `is` is only a getter if it returns a boolean\n if (m.getName().startsWith(\"is\") && m.getReturnType() != Boolean.class\n && m.getReturnType() != boolean.class) {\n continue;\n }\n\n // Remove the `get` or `is` prefix to get the name of the property\n int prefixLength = m.getName().startsWith(\"is\") ? 2 : 3;\n String propName = m.getName().substring(prefixLength);\n\n try {\n // Invoke the getter and store the value in the properties map\n entity.getProperties().put(propName, m.invoke(entity));\n } catch (ReflectiveOperationException | IllegalArgumentException e) {\n logger.logThrowableAsWarning(new ReflectiveOperationException(String.format(\n \"Failed to get property '%s' on type '%s'\", propName, myClass.getName()), e));\n }\n }\n }", "public interface UnitTypeProperties extends PropertyAccess<UnitTypeDTO> {\n @Editor.Path(\"id\")\n ModelKeyProvider<UnitTypeDTO> key();\n ValueProvider<UnitTypeDTO, String> id();\n ValueProvider<UnitTypeDTO, String> name();\n @Editor.Path(\"name\")\n LabelProvider<UnitTypeDTO> nameLabel();\n}", "@ProviderType\npublic interface EmployeeModel extends BaseModel<Employee> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a employee model instance should use the {@link Employee} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this employee.\n\t *\n\t * @return the primary key of this employee\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this employee.\n\t *\n\t * @param primaryKey the primary key of this employee\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the uuid of this employee.\n\t *\n\t * @return the uuid of this employee\n\t */\n\t@AutoEscape\n\tpublic String getUuid();\n\n\t/**\n\t * Sets the uuid of this employee.\n\t *\n\t * @param uuid the uuid of this employee\n\t */\n\tpublic void setUuid(String uuid);\n\n\t/**\n\t * Returns the employee ID of this employee.\n\t *\n\t * @return the employee ID of this employee\n\t */\n\tpublic long getEmployeeId();\n\n\t/**\n\t * Sets the employee ID of this employee.\n\t *\n\t * @param employeeId the employee ID of this employee\n\t */\n\tpublic void setEmployeeId(long employeeId);\n\n\t/**\n\t * Returns the first name of this employee.\n\t *\n\t * @return the first name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getFirstName();\n\n\t/**\n\t * Sets the first name of this employee.\n\t *\n\t * @param firstName the first name of this employee\n\t */\n\tpublic void setFirstName(String firstName);\n\n\t/**\n\t * Returns the last name of this employee.\n\t *\n\t * @return the last name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getLastName();\n\n\t/**\n\t * Sets the last name of this employee.\n\t *\n\t * @param lastName the last name of this employee\n\t */\n\tpublic void setLastName(String lastName);\n\n\t/**\n\t * Returns the middle name of this employee.\n\t *\n\t * @return the middle name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getMiddleName();\n\n\t/**\n\t * Sets the middle name of this employee.\n\t *\n\t * @param middleName the middle name of this employee\n\t */\n\tpublic void setMiddleName(String middleName);\n\n\t/**\n\t * Returns the birth date of this employee.\n\t *\n\t * @return the birth date of this employee\n\t */\n\tpublic Date getBirthDate();\n\n\t/**\n\t * Sets the birth date of this employee.\n\t *\n\t * @param birthDate the birth date of this employee\n\t */\n\tpublic void setBirthDate(Date birthDate);\n\n\t/**\n\t * Returns the post ID of this employee.\n\t *\n\t * @return the post ID of this employee\n\t */\n\tpublic long getPostId();\n\n\t/**\n\t * Sets the post ID of this employee.\n\t *\n\t * @param postId the post ID of this employee\n\t */\n\tpublic void setPostId(long postId);\n\n\t/**\n\t * Returns the sex of this employee.\n\t *\n\t * @return the sex of this employee\n\t */\n\tpublic Boolean getSex();\n\n\t/**\n\t * Sets the sex of this employee.\n\t *\n\t * @param sex the sex of this employee\n\t */\n\tpublic void setSex(Boolean sex);\n\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface Record25HerfinancieeringMapper extends EntityMapper<Record25HerfinancieeringDTO, Record25Herfinancieering> {\n\n\n\n default Record25Herfinancieering fromId(Long id) {\n if (id == null) {\n return null;\n }\n Record25Herfinancieering record25Herfinancieering = new Record25Herfinancieering();\n record25Herfinancieering.setId(id);\n return record25Herfinancieering;\n }\n}", "@Mapper(componentModel = \"spring\")\npublic interface SaleMapper extends EntityMapper<SaleDto, Sale> {\n\n @Mapping(source = \"client.id\", target = \"clientId\")\n @Mapping(source = \"client.name\", target = \"clientName\")\n SaleDto toDto(Sale sale);\n\n @Mapping(source = \"clientId\", target = \"client.id\")\n Sale toEntity(SaleDto saleDTO);\n\n default Sale fromId(Long id) {\n if (id == null) {\n return null;\n }\n Sale sale = new Sale();\n sale.setId(id);\n return sale;\n }\n\n}", "public interface ResourceEntityMapperExt {\n\n List<ResourceEntity> getAllResource();\n\n Set<ResourceEntity> selectRoleResourcesByRoleId(@Param(\"roleId\") String roleId);\n\n void disable(@Param(\"resourceId\") String resourceId);\n\n void enable(@Param(\"resourceId\") String resourceId);\n\n List<Map> getParentMenusByUserId(@Param(\"userId\") String userId);\n\n List<Map> getChildrenMenusByUserId(@Param(\"userId\") String userId);\n\n List<Map> getAllParentMenus();\n\n List<Map> getAllChildrenMenus();\n\n List<Map> queryResourceList();\n\n void deleteByResourceId(@Param(\"resourceId\")String resourceId);\n\n List<String> resourcesByRoleId(@Param(\"roleId\") String roleId);\n\n List<Map> getAllChildrenMenusBySourceId(@Param(\"sourceId\")String sourceId);\n}", "@Mapper(componentModel = \"spring\", uses = {SabegheMapper.class, NoeSabegheMapper.class})\npublic interface AdamKhesaratMapper extends EntityMapper<AdamKhesaratDTO, AdamKhesarat> {\n\n @Mapping(source = \"sabeghe.id\", target = \"sabegheId\")\n @Mapping(source = \"sabeghe.name\", target = \"sabegheName\")\n @Mapping(source = \"noeSabeghe.id\", target = \"noeSabegheId\")\n @Mapping(source = \"noeSabeghe.name\", target = \"noeSabegheName\")\n AdamKhesaratDTO toDto(AdamKhesarat adamKhesarat);\n\n @Mapping(source = \"sabegheId\", target = \"sabeghe\")\n @Mapping(source = \"noeSabegheId\", target = \"noeSabeghe\")\n AdamKhesarat toEntity(AdamKhesaratDTO adamKhesaratDTO);\n\n default AdamKhesarat fromId(Long id) {\n if (id == null) {\n return null;\n }\n AdamKhesarat adamKhesarat = new AdamKhesarat();\n adamKhesarat.setId(id);\n return adamKhesarat;\n }\n}", "public void toEntity(){\n\n }", "public interface EmployeeMapper extends BaseMapper<Employee> {\n\n @Override\n @Select(\"select * from employee\")\n List<Employee> findAll();\n\n @Override\n int save(Employee employee);\n}", "public interface RepositoryJpaMetadataProvider extends\n ItdTriggerBasedMetadataProvider {\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface ProgrammePropMapper extends EntityMapper<ProgrammePropDTO, ProgrammeProp> {\n\n\n\n default ProgrammeProp fromId(Long id) {\n if (id == null) {\n return null;\n }\n ProgrammeProp programmeProp = new ProgrammeProp();\n programmeProp.setId(id);\n return programmeProp;\n }\n}", "@Mapper(componentModel = \"spring\", uses = {HopDongMapper.class})\npublic interface GhiNoMapper extends EntityMapper<GhiNoDTO, GhiNo> {\n\n @Mapping(source = \"hopDong.id\", target = \"hopDongId\")\n GhiNoDTO toDto(GhiNo ghiNo);\n\n @Mapping(source = \"hopDongId\", target = \"hopDong\")\n GhiNo toEntity(GhiNoDTO ghiNoDTO);\n\n default GhiNo fromId(Long id) {\n if (id == null) {\n return null;\n }\n GhiNo ghiNo = new GhiNo();\n ghiNo.setId(id);\n return ghiNo;\n }\n}", "@ProviderType\npublic interface LichChiTietModel\n\textends BaseModel<LichChiTiet>, GroupedModel, ShardedModel {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a lich chi tiet model instance should use the {@link LichChiTiet} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this lich chi tiet.\n\t *\n\t * @return the primary key of this lich chi tiet\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this lich chi tiet.\n\t *\n\t * @param primaryKey the primary key of this lich chi tiet\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the lich chi tiet ID of this lich chi tiet.\n\t *\n\t * @return the lich chi tiet ID of this lich chi tiet\n\t */\n\tpublic long getLichChiTietId();\n\n\t/**\n\t * Sets the lich chi tiet ID of this lich chi tiet.\n\t *\n\t * @param lichChiTietId the lich chi tiet ID of this lich chi tiet\n\t */\n\tpublic void setLichChiTietId(long lichChiTietId);\n\n\t/**\n\t * Returns the group ID of this lich chi tiet.\n\t *\n\t * @return the group ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic long getGroupId();\n\n\t/**\n\t * Sets the group ID of this lich chi tiet.\n\t *\n\t * @param groupId the group ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setGroupId(long groupId);\n\n\t/**\n\t * Returns the language of this lich chi tiet.\n\t *\n\t * @return the language of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getLanguage();\n\n\t/**\n\t * Sets the language of this lich chi tiet.\n\t *\n\t * @param language the language of this lich chi tiet\n\t */\n\tpublic void setLanguage(String language);\n\n\t/**\n\t * Returns the company ID of this lich chi tiet.\n\t *\n\t * @return the company ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic long getCompanyId();\n\n\t/**\n\t * Sets the company ID of this lich chi tiet.\n\t *\n\t * @param companyId the company ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setCompanyId(long companyId);\n\n\t/**\n\t * Returns the user ID of this lich chi tiet.\n\t *\n\t * @return the user ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic long getUserId();\n\n\t/**\n\t * Sets the user ID of this lich chi tiet.\n\t *\n\t * @param userId the user ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setUserId(long userId);\n\n\t/**\n\t * Returns the user uuid of this lich chi tiet.\n\t *\n\t * @return the user uuid of this lich chi tiet\n\t */\n\t@Override\n\tpublic String getUserUuid();\n\n\t/**\n\t * Sets the user uuid of this lich chi tiet.\n\t *\n\t * @param userUuid the user uuid of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setUserUuid(String userUuid);\n\n\t/**\n\t * Returns the user name of this lich chi tiet.\n\t *\n\t * @return the user name of this lich chi tiet\n\t */\n\t@AutoEscape\n\t@Override\n\tpublic String getUserName();\n\n\t/**\n\t * Sets the user name of this lich chi tiet.\n\t *\n\t * @param userName the user name of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setUserName(String userName);\n\n\t/**\n\t * Returns the create date of this lich chi tiet.\n\t *\n\t * @return the create date of this lich chi tiet\n\t */\n\t@Override\n\tpublic Date getCreateDate();\n\n\t/**\n\t * Sets the create date of this lich chi tiet.\n\t *\n\t * @param createDate the create date of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setCreateDate(Date createDate);\n\n\t/**\n\t * Returns the created by user of this lich chi tiet.\n\t *\n\t * @return the created by user of this lich chi tiet\n\t */\n\tpublic long getCreatedByUser();\n\n\t/**\n\t * Sets the created by user of this lich chi tiet.\n\t *\n\t * @param createdByUser the created by user of this lich chi tiet\n\t */\n\tpublic void setCreatedByUser(long createdByUser);\n\n\t/**\n\t * Returns the modified date of this lich chi tiet.\n\t *\n\t * @return the modified date of this lich chi tiet\n\t */\n\t@Override\n\tpublic Date getModifiedDate();\n\n\t/**\n\t * Sets the modified date of this lich chi tiet.\n\t *\n\t * @param modifiedDate the modified date of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setModifiedDate(Date modifiedDate);\n\n\t/**\n\t * Returns the modified by user of this lich chi tiet.\n\t *\n\t * @return the modified by user of this lich chi tiet\n\t */\n\tpublic long getModifiedByUser();\n\n\t/**\n\t * Sets the modified by user of this lich chi tiet.\n\t *\n\t * @param modifiedByUser the modified by user of this lich chi tiet\n\t */\n\tpublic void setModifiedByUser(long modifiedByUser);\n\n\t/**\n\t * Returns the gio bat dau of this lich chi tiet.\n\t *\n\t * @return the gio bat dau of this lich chi tiet\n\t */\n\tpublic Date getGioBatDau();\n\n\t/**\n\t * Sets the gio bat dau of this lich chi tiet.\n\t *\n\t * @param gioBatDau the gio bat dau of this lich chi tiet\n\t */\n\tpublic void setGioBatDau(Date gioBatDau);\n\n\t/**\n\t * Returns the mo ta of this lich chi tiet.\n\t *\n\t * @return the mo ta of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getMoTa();\n\n\t/**\n\t * Sets the mo ta of this lich chi tiet.\n\t *\n\t * @param moTa the mo ta of this lich chi tiet\n\t */\n\tpublic void setMoTa(String moTa);\n\n\t/**\n\t * Returns the nguoi tham du of this lich chi tiet.\n\t *\n\t * @return the nguoi tham du of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getNguoiThamDu();\n\n\t/**\n\t * Sets the nguoi tham du of this lich chi tiet.\n\t *\n\t * @param nguoiThamDu the nguoi tham du of this lich chi tiet\n\t */\n\tpublic void setNguoiThamDu(String nguoiThamDu);\n\n\t/**\n\t * Returns the nguoi chu tri of this lich chi tiet.\n\t *\n\t * @return the nguoi chu tri of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getNguoiChuTri();\n\n\t/**\n\t * Sets the nguoi chu tri of this lich chi tiet.\n\t *\n\t * @param nguoiChuTri the nguoi chu tri of this lich chi tiet\n\t */\n\tpublic void setNguoiChuTri(String nguoiChuTri);\n\n\t/**\n\t * Returns the selected date of this lich chi tiet.\n\t *\n\t * @return the selected date of this lich chi tiet\n\t */\n\tpublic Date getSelectedDate();\n\n\t/**\n\t * Sets the selected date of this lich chi tiet.\n\t *\n\t * @param selectedDate the selected date of this lich chi tiet\n\t */\n\tpublic void setSelectedDate(Date selectedDate);\n\n\t/**\n\t * Returns the trangthai chi tiet of this lich chi tiet.\n\t *\n\t * @return the trangthai chi tiet of this lich chi tiet\n\t */\n\tpublic int getTrangthaiChiTiet();\n\n\t/**\n\t * Sets the trangthai chi tiet of this lich chi tiet.\n\t *\n\t * @param trangthaiChiTiet the trangthai chi tiet of this lich chi tiet\n\t */\n\tpublic void setTrangthaiChiTiet(int trangthaiChiTiet);\n\n\t/**\n\t * Returns the lich cong tac ID of this lich chi tiet.\n\t *\n\t * @return the lich cong tac ID of this lich chi tiet\n\t */\n\tpublic long getLichCongTacId();\n\n\t/**\n\t * Sets the lich cong tac ID of this lich chi tiet.\n\t *\n\t * @param lichCongTacId the lich cong tac ID of this lich chi tiet\n\t */\n\tpublic void setLichCongTacId(long lichCongTacId);\n\n\t/**\n\t * Returns the address of this lich chi tiet.\n\t *\n\t * @return the address of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getAddress();\n\n\t/**\n\t * Sets the address of this lich chi tiet.\n\t *\n\t * @param address the address of this lich chi tiet\n\t */\n\tpublic void setAddress(String address);\n\n\t/**\n\t * Returns the note of this lich chi tiet.\n\t *\n\t * @return the note of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getNote();\n\n\t/**\n\t * Sets the note of this lich chi tiet.\n\t *\n\t * @param note the note of this lich chi tiet\n\t */\n\tpublic void setNote(String note);\n\n\t/**\n\t * Returns the lydo tra ve of this lich chi tiet.\n\t *\n\t * @return the lydo tra ve of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getLydoTraVe();\n\n\t/**\n\t * Sets the lydo tra ve of this lich chi tiet.\n\t *\n\t * @param lydoTraVe the lydo tra ve of this lich chi tiet\n\t */\n\tpublic void setLydoTraVe(String lydoTraVe);\n\n\t/**\n\t * Returns the organization ID of this lich chi tiet.\n\t *\n\t * @return the organization ID of this lich chi tiet\n\t */\n\tpublic long getOrganizationId();\n\n\t/**\n\t * Sets the organization ID of this lich chi tiet.\n\t *\n\t * @param organizationId the organization ID of this lich chi tiet\n\t */\n\tpublic void setOrganizationId(long organizationId);\n\n}", "private GetProperty(Builder builder) {\n super(builder);\n }", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface ClientHeartbeatInfoMapper extends EntityMapper<ClientHeartbeatInfoDTO, ClientHeartbeatInfo> {\n\n\n\n default ClientHeartbeatInfo fromId(Long id) {\n if (id == null) {\n return null;\n }\n ClientHeartbeatInfo clientHeartbeatInfo = new ClientHeartbeatInfo();\n clientHeartbeatInfo.setId(id);\n return clientHeartbeatInfo;\n }\n}", "public interface CreateEntityView<E extends SerializableEntity> extends EntityView {\r\n\r\n\t/**\r\n\t * Make save handler enabled\r\n\t * \r\n\t * @param enabled\r\n\t */\r\n\tvoid setSaveHandlerEnabled(boolean enabled);\r\n\t\r\n}", "public interface IGQLDynamicAttributeGetterSetter<ENTITY_TYPE, GETTER_ATTRIBUTE_TYPE, SETTER_ATTRIBUTE_TYPE>\n\t\textends\n\t\t\tIGQLDynamicAttributeGetter<ENTITY_TYPE, GETTER_ATTRIBUTE_TYPE>,\n\t\t\tIGQLDynamicAttributeSetter<ENTITY_TYPE, SETTER_ATTRIBUTE_TYPE> {\n\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface EmploymentTypeMapper extends EntityMapper<EmploymentTypeDTO, EmploymentType> {\n\n\n @Mapping(target = \"people\", ignore = true)\n EmploymentType toEntity(EmploymentTypeDTO employmentTypeDTO);\n\n default EmploymentType fromId(Long id) {\n if (id == null) {\n return null;\n }\n EmploymentType employmentType = new EmploymentType();\n employmentType.setId(id);\n return employmentType;\n }\n}", "public interface SaleRowDTOProperties {\n\n Vehicle.KapschVehicle getVehicle();\n\n void setVehicle(Vehicle.KapschVehicle vehicle);\n\n}", "public interface PropertyDefEntity extends javax.ejb.EJBLocalObject {\n\n /**\n * Returns a PropertyDefDto data transfer object containing all parameters of\n * this property definition instance.\n *\n * @return PropertyDefDto the data transfer object containing all parameters of this instance\n * @see #setDto\n */\n public PropertyDefDto getDto();\n\n /**\n * Sets all data members of this property definition instance to the values\n * from the specified data transfer object.\n *\n * @param dto PropertyDefDto the data transfer object containing the new\n * parameters for this instance\n * @see #getDto\n */\n public void setDto(PropertyDefDto dto);\n\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface MisteriosoMapper extends EntityMapper<MisteriosoDTO, Misterioso> {\n\n \n\n \n\n default Misterioso fromId(Long id) {\n if (id == null) {\n return null;\n }\n Misterioso misterioso = new Misterioso();\n misterioso.setId(id);\n return misterioso;\n }\n}", "@ProviderType\npublic interface PersonModel extends BaseModel<Person> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a person model instance should use the {@link Person} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this person.\n\t *\n\t * @return the primary key of this person\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this person.\n\t *\n\t * @param primaryKey the primary key of this person\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the uuid of this person.\n\t *\n\t * @return the uuid of this person\n\t */\n\t@AutoEscape\n\tpublic String getUuid();\n\n\t/**\n\t * Sets the uuid of this person.\n\t *\n\t * @param uuid the uuid of this person\n\t */\n\tpublic void setUuid(String uuid);\n\n\t/**\n\t * Returns the person ID of this person.\n\t *\n\t * @return the person ID of this person\n\t */\n\tpublic long getPersonId();\n\n\t/**\n\t * Sets the person ID of this person.\n\t *\n\t * @param personId the person ID of this person\n\t */\n\tpublic void setPersonId(long personId);\n\n\t/**\n\t * Returns the name of this person.\n\t *\n\t * @return the name of this person\n\t */\n\t@AutoEscape\n\tpublic String getName();\n\n\t/**\n\t * Sets the name of this person.\n\t *\n\t * @param name the name of this person\n\t */\n\tpublic void setName(String name);\n\n\t/**\n\t * Returns the age of this person.\n\t *\n\t * @return the age of this person\n\t */\n\tpublic int getAge();\n\n\t/**\n\t * Sets the age of this person.\n\t *\n\t * @param age the age of this person\n\t */\n\tpublic void setAge(int age);\n\n\t/**\n\t * Returns the gender of this person.\n\t *\n\t * @return the gender of this person\n\t */\n\t@AutoEscape\n\tpublic String getGender();\n\n\t/**\n\t * Sets the gender of this person.\n\t *\n\t * @param gender the gender of this person\n\t */\n\tpublic void setGender(String gender);\n\n\t/**\n\t * Returns the email ID of this person.\n\t *\n\t * @return the email ID of this person\n\t */\n\t@AutoEscape\n\tpublic String getEmailId();\n\n\t/**\n\t * Sets the email ID of this person.\n\t *\n\t * @param emailId the email ID of this person\n\t */\n\tpublic void setEmailId(String emailId);\n\n\t/**\n\t * Returns the nationality of this person.\n\t *\n\t * @return the nationality of this person\n\t */\n\t@AutoEscape\n\tpublic String getNationality();\n\n\t/**\n\t * Sets the nationality of this person.\n\t *\n\t * @param nationality the nationality of this person\n\t */\n\tpublic void setNationality(String nationality);\n\n\t/**\n\t * Returns the occupation of this person.\n\t *\n\t * @return the occupation of this person\n\t */\n\t@AutoEscape\n\tpublic String getOccupation();\n\n\t/**\n\t * Sets the occupation of this person.\n\t *\n\t * @param occupation the occupation of this person\n\t */\n\tpublic void setOccupation(String occupation);\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\n@JaversSpringDataAuditable\n\npublic interface SellContractCustomerRepository extends JpaRepository<SellContractCustomer, Long> {\n\n SellContractCustomer findByCustomer_Id(Long customerId);\n\n List<SellContractCustomer> findAllBySellContract_Id(Long sellContractId);\n\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface GradeMapper extends EntityMapper<GradeDTO, Grade> {\n\n\n @Mapping(target = \"subjects\", ignore = true)\n @Mapping(target = \"contents\", ignore = true)\n Grade toEntity(GradeDTO gradeDTO);\n\n default Grade fromId(Long id) {\n if (id == null) {\n return null;\n }\n Grade grade = new Grade();\n grade.setId(id);\n return grade;\n }\n}", "@Mapper(uses ={DateComponent.class}, componentModel = \"spring\")\npublic interface CreateCodeMapper extends EntityMapper<CreateCodeDto , Code> {\n}", "@Generated(\"Speedment\")\npublic interface Employee extends Entity<Employee> {\n \n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getId()} method.\n */\n public final static ComparableField<Employee, Short> ID = new ComparableFieldImpl<>(\"id\", Employee::getId, Employee::setId);\n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getFirstname()} method.\n */\n public final static StringField<Employee> FIRSTNAME = new StringFieldImpl<>(\"firstname\", o -> o.getFirstname().orElse(null), Employee::setFirstname);\n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getLastname()} method.\n */\n public final static StringField<Employee> LASTNAME = new StringFieldImpl<>(\"lastname\", o -> o.getLastname().orElse(null), Employee::setLastname);\n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getBirthdate()} method.\n */\n public final static ComparableField<Employee, Date> BIRTHDATE = new ComparableFieldImpl<>(\"birthdate\", o -> o.getBirthdate().orElse(null), Employee::setBirthdate);\n \n /**\n * Returns the id of this Employee. The id field corresponds to the database\n * column db0.sql696688.employee.id.\n * \n * @return the id of this Employee\n */\n Short getId();\n \n /**\n * Returns the firstname of this Employee. The firstname field corresponds to\n * the database column db0.sql696688.employee.firstname.\n * \n * @return the firstname of this Employee\n */\n Optional<String> getFirstname();\n \n /**\n * Returns the lastname of this Employee. The lastname field corresponds to\n * the database column db0.sql696688.employee.lastname.\n * \n * @return the lastname of this Employee\n */\n Optional<String> getLastname();\n \n /**\n * Returns the birthdate of this Employee. The birthdate field corresponds to\n * the database column db0.sql696688.employee.birthdate.\n * \n * @return the birthdate of this Employee\n */\n Optional<Date> getBirthdate();\n \n /**\n * Sets the id of this Employee. The id field corresponds to the database\n * column db0.sql696688.employee.id.\n * \n * @param id to set of this Employee\n * @return this Employee instance\n */\n Employee setId(Short id);\n \n /**\n * Sets the firstname of this Employee. The firstname field corresponds to\n * the database column db0.sql696688.employee.firstname.\n * \n * @param firstname to set of this Employee\n * @return this Employee instance\n */\n Employee setFirstname(String firstname);\n \n /**\n * Sets the lastname of this Employee. The lastname field corresponds to the\n * database column db0.sql696688.employee.lastname.\n * \n * @param lastname to set of this Employee\n * @return this Employee instance\n */\n Employee setLastname(String lastname);\n \n /**\n * Sets the birthdate of this Employee. The birthdate field corresponds to\n * the database column db0.sql696688.employee.birthdate.\n * \n * @param birthdate to set of this Employee\n * @return this Employee instance\n */\n Employee setBirthdate(Date birthdate);\n \n /**\n * Creates and returns a {@link Stream} of all {@link Borrowed} Entities that\n * references this Entity by the foreign key field that can be obtained using\n * {@link Borrowed#getEmployeeid()}. The order of the Entities are undefined\n * and may change from time to time.\n * <p>\n * Using this method, you may \"walk the graph\" and jump directly between\n * referencing Entities without using {@code JOIN}s.<p> N.B. The current\n * implementation supports lazy-loading of the referencing Entities.\n * \n * @return a {@link Stream} of all {@link Borrowed} Entities that references\n * this Entity by the foreign key field that can be obtained using {@link\n * Borrowed#getEmployeeid()}\n */\n Stream<Borrowed> findBorrowedsByEmployeeid();\n \n /**\n * Creates and returns a <em>distinct</em> {@link Stream} of all {@link\n * Borrowed} Entities that references this Entity by a foreign key. The order\n * of the Entities are undefined and may change from time to time.\n * <p>\n * Note that the Stream is <em>distinct</em>, meaning that referencing\n * Entities will only appear once in the Stream, even though they may\n * reference this Entity by several columns.\n * <p>\n * Using this method, you may \"walk the graph\" and jump directly between\n * referencing Entities without using {@code JOIN}s.<p> N.B. The current\n * implementation supports lazy-loading of the referencing Entities.\n * \n * @return a <em>distinct</em> {@link Stream} of all {@link Borrowed}\n * Entities that references this Entity by a foreign key\n */\n Stream<Borrowed> findBorroweds();\n}", "@ProviderType\npublic interface ItemShopBasketModel extends BaseModel<ItemShopBasket> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a item shop basket model instance should use the {@link ItemShopBasket} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this item shop basket.\n\t *\n\t * @return the primary key of this item shop basket\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this item shop basket.\n\t *\n\t * @param primaryKey the primary key of this item shop basket\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the item shop basket ID of this item shop basket.\n\t *\n\t * @return the item shop basket ID of this item shop basket\n\t */\n\tpublic long getItemShopBasketId();\n\n\t/**\n\t * Sets the item shop basket ID of this item shop basket.\n\t *\n\t * @param itemShopBasketId the item shop basket ID of this item shop basket\n\t */\n\tpublic void setItemShopBasketId(long itemShopBasketId);\n\n\t/**\n\t * Returns the shop basket ID of this item shop basket.\n\t *\n\t * @return the shop basket ID of this item shop basket\n\t */\n\tpublic long getShopBasketId();\n\n\t/**\n\t * Sets the shop basket ID of this item shop basket.\n\t *\n\t * @param shopBasketId the shop basket ID of this item shop basket\n\t */\n\tpublic void setShopBasketId(long shopBasketId);\n\n\t/**\n\t * Returns the name of this item shop basket.\n\t *\n\t * @return the name of this item shop basket\n\t */\n\t@AutoEscape\n\tpublic String getName();\n\n\t/**\n\t * Sets the name of this item shop basket.\n\t *\n\t * @param name the name of this item shop basket\n\t */\n\tpublic void setName(String name);\n\n\t/**\n\t * Returns the imported of this item shop basket.\n\t *\n\t * @return the imported of this item shop basket\n\t */\n\tpublic boolean getImported();\n\n\t/**\n\t * Returns <code>true</code> if this item shop basket is imported.\n\t *\n\t * @return <code>true</code> if this item shop basket is imported; <code>false</code> otherwise\n\t */\n\tpublic boolean isImported();\n\n\t/**\n\t * Sets whether this item shop basket is imported.\n\t *\n\t * @param imported the imported of this item shop basket\n\t */\n\tpublic void setImported(boolean imported);\n\n\t/**\n\t * Returns the exempt of this item shop basket.\n\t *\n\t * @return the exempt of this item shop basket\n\t */\n\tpublic boolean getExempt();\n\n\t/**\n\t * Returns <code>true</code> if this item shop basket is exempt.\n\t *\n\t * @return <code>true</code> if this item shop basket is exempt; <code>false</code> otherwise\n\t */\n\tpublic boolean isExempt();\n\n\t/**\n\t * Sets whether this item shop basket is exempt.\n\t *\n\t * @param exempt the exempt of this item shop basket\n\t */\n\tpublic void setExempt(boolean exempt);\n\n\t/**\n\t * Returns the price of this item shop basket.\n\t *\n\t * @return the price of this item shop basket\n\t */\n\tpublic Double getPrice();\n\n\t/**\n\t * Sets the price of this item shop basket.\n\t *\n\t * @param price the price of this item shop basket\n\t */\n\tpublic void setPrice(Double price);\n\n\t/**\n\t * Returns the active of this item shop basket.\n\t *\n\t * @return the active of this item shop basket\n\t */\n\tpublic boolean getActive();\n\n\t/**\n\t * Returns <code>true</code> if this item shop basket is active.\n\t *\n\t * @return <code>true</code> if this item shop basket is active; <code>false</code> otherwise\n\t */\n\tpublic boolean isActive();\n\n\t/**\n\t * Sets whether this item shop basket is active.\n\t *\n\t * @param active the active of this item shop basket\n\t */\n\tpublic void setActive(boolean active);\n\n\t/**\n\t * Returns the amount of this item shop basket.\n\t *\n\t * @return the amount of this item shop basket\n\t */\n\tpublic long getAmount();\n\n\t/**\n\t * Sets the amount of this item shop basket.\n\t *\n\t * @param amount the amount of this item shop basket\n\t */\n\tpublic void setAmount(long amount);\n\n\t/**\n\t * Returns the tax of this item shop basket.\n\t *\n\t * @return the tax of this item shop basket\n\t */\n\tpublic Double getTax();\n\n\t/**\n\t * Sets the tax of this item shop basket.\n\t *\n\t * @param tax the tax of this item shop basket\n\t */\n\tpublic void setTax(Double tax);\n\n\t/**\n\t * Returns the total of this item shop basket.\n\t *\n\t * @return the total of this item shop basket\n\t */\n\tpublic Double getTotal();\n\n\t/**\n\t * Sets the total of this item shop basket.\n\t *\n\t * @param total the total of this item shop basket\n\t */\n\tpublic void setTotal(Double total);\n\n}", "public void setUWCompany(entity.UWCompany value);", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface EightydMapper extends EntityMapper<EightydDTO, Eightyd> {\n\n\n\n default Eightyd fromId(Long id) {\n if (id == null) {\n return null;\n }\n Eightyd eightyd = new Eightyd();\n eightyd.setId(id);\n return eightyd;\n }\n}", "public interface MerchandiserEntities {\n\n static Entity outletEntity() {\n return new Entity(\n Entities.OUTLET_ENTITY,\n OutletModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n field(OutletModel.name),\n field(OutletModel.address),\n field(OutletModel.qrCode),\n field(OutletModel.location, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.locationGps, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.locationNetwork, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.images, JavaType.ARRAY, hasManyOutletImages())\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n Entities.OUTLET_TABLE,\n OutletTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n column(OutletModel.name, OutletTable.name),\n column(OutletModel.address, OutletTable.address),\n column(OutletModel.qrCode, OutletTable.qr_code)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n ArrayBuilder.<RelationMapping>create()\n .addAll(ImmutableList.of(\n Entities.locationMapping(OutletModel.location, OutletTable.location_id),\n Entities.locationMapping(OutletModel.locationGps, OutletTable.location_id_gps),\n Entities.locationMapping(OutletModel.locationNetwork, OutletTable.location_id_network),\n outletImagesMapping()\n ))\n .addAll(Arrays.asList(Entities.baseRelationMappingsArray()))\n .build(list -> list.toArray(new RelationMapping[list.size()]))\n )\n );\n }\n\n static Relationship hasOneLocation() {\n return new Relationship(\n Relationship.Type.MANY_TO_ONE,\n Relationship.Name.HAS_ONE,\n Entities.LOCATION_ENTITY\n );\n }\n\n static Relationship hasManyOutletImages() {\n return new Relationship(\n Relationship.Type.ONE_TO_MANY,\n Relationship.Name.HAS_MANY,\n Entities.OUTLET_IMAGE_ENTITY\n );\n }\n\n static VirtualRelationMappingImpl outletImagesMapping() {\n return new VirtualRelationMappingImpl(\n Entities.OUTLET_IMAGE_TABLE,\n Entities.OUTLET_IMAGE_ENTITY,\n ImmutableList.of(\n new ForeignColumnMapping(\n OutletImageTable.outlet_id,\n OutletTable.id\n )\n ),\n OutletModel.images,\n new RelationMappingOptionsImpl(\n RelationMappingOptions.CascadeUpsert.YES,\n RelationMappingOptions.CascadeDelete.YES,\n true\n )\n );\n }\n\n static Entity outletImageEntity() {\n return new Entity(\n Entities.OUTLET_IMAGE_ENTITY,\n OutletImageModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n field(OutletImageModel.title),\n field(OutletImageModel.description),\n field(OutletImageModel.uri),\n field(OutletImageModel.file),\n field(OutletImageModel.fileName),\n field(OutletImageModel.height),\n field(OutletImageModel.width),\n field(OutletImageModel.outlet, JavaType.OBJECT, hasOneOutlet())\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n Entities.OUTLET_IMAGE_TABLE,\n OutletImageTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n column(OutletImageModel.title, OutletImageTable.title),\n column(OutletImageModel.description, OutletImageTable.description),\n column(OutletImageModel.uri, OutletImageTable.uri),\n column(OutletImageModel.file, OutletImageTable.file),\n column(OutletImageModel.fileName, OutletImageTable.file_name),\n column(OutletImageModel.height, OutletImageTable.height),\n column(OutletImageModel.width, OutletImageTable.width)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n ArrayBuilder.<RelationMapping>create()\n .addAll(ImmutableList.of(\n new DirectRelationMappingImpl(\n OUTLET_TABLE,\n OUTLET_ENTITY,\n ImmutableList.of(\n new ForeignColumnMapping(\n OutletImageTable.outlet_id,\n OutletTable.id\n )\n ),\n OutletImageModel.outlet,\n new DirectRelationMappingOptionsImpl(\n RelationMappingOptions.CascadeUpsert.NO,\n RelationMappingOptions.CascadeDelete.NO,\n true,\n DirectRelationMappingOptions.LoadAndDelete.LOAD_AND_DELETE\n )\n )\n ))\n .addAll(Arrays.asList(Entities.baseRelationMappingsArray()))\n .build(list -> list.toArray(new RelationMapping[list.size()]))\n )\n );\n }\n\n static Relationship hasOneOutlet() {\n return new Relationship(\n Relationship.Type.MANY_TO_ONE,\n Relationship.Name.HAS_ONE,\n OUTLET_ENTITY\n );\n }\n\n static Entity locationEntity() {\n return new Entity(\n LOCATION_ENTITY,\n LocationModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n Entities.field(LocationModel.lat),\n Entities.field(LocationModel.lng),\n Entities.field(LocationModel.accuracy)\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n LOCATION_TABLE,\n LocationTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n Entities.column(LocationModel.lat, LocationTable.lat),\n Entities.column(LocationModel.lng, LocationTable.lng),\n Entities.column(LocationModel.accuracy, LocationTable.accuracy)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n Entities.baseRelationMappingsArray()\n )\n );\n }\n}", "public interface RoleMapper {\n\n @Insert(\"insert into role values (role,desc) values (#{model.role},#{model.desc})\")\n @Options(useGeneratedKeys = true,keyProperty = \"model.id\")\n int insertRole(@Param(\"model\") RoleModel model);\n\n\n /**\n * 获取所有角色信息\n * @return\n */\n @Select(\"select id,role,desc,data_added,last_modified from role\")\n List<RoleModel> getAllRoles();\n\n\n /**\n * 获取角色Id\n * @param role\n * @return\n */\n @Select(\"select id from role where role=#{role}\")\n int getRoleId(String role);\n}", "@Mapper(componentModel = \"spring\", uses = {AanvraagberichtMapper.class})\npublic interface FdnAanvragerMapper extends EntityMapper<FdnAanvragerDTO, FdnAanvrager> {\n\n @Mapping(source = \"aanvraagbericht.id\", target = \"aanvraagberichtId\")\n FdnAanvragerDTO toDto(FdnAanvrager fdnAanvrager);\n\n @Mapping(target = \"adres\", ignore = true)\n @Mapping(target = \"legitimatiebewijs\", ignore = true)\n @Mapping(target = \"werksituaties\", ignore = true)\n @Mapping(target = \"gezinssituaties\", ignore = true)\n @Mapping(target = \"financieleSituaties\", ignore = true)\n @Mapping(source = \"aanvraagberichtId\", target = \"aanvraagbericht\")\n FdnAanvrager toEntity(FdnAanvragerDTO fdnAanvragerDTO);\n\n default FdnAanvrager fromId(Long id) {\n if (id == null) {\n return null;\n }\n FdnAanvrager fdnAanvrager = new FdnAanvrager();\n fdnAanvrager.setId(id);\n return fdnAanvrager;\n }\n}", "@DSDerby\n@Repository\npublic interface HillMapper extends BaseMapper<Hill> {\n\n}", "@MapperScan\npublic interface AdminMapper{\n //------------------Add your code here---------------------\n\n //------------------以下代码自动生成-----------------------\n\n /**\n * 根据条件查询全部\n * 参数:\n * map里的key为属性名(字段首字母小写)\n * value为查询的条件,默认为等于\n * 要改动sql请修改 *Mapper 类里的 _query() 方法\n */\n @SelectProvider(type = AdminSql.class,method = \"_queryAll\")\n List<AdminEntity> _queryAll(Map pagerParam);\n\n /**\n * 检验账号密码\n * @param account\n * @param password\n * @return\n */\n @SelectProvider(type = AdminSql.class,method = \"check\")\n List<AdminEntity> check(@Param(\"account\") String account, @Param(\"password\") String password);\n\n /**\n * 按id查询\n * 参数:\n * id : 要查询的记录的id\n */\n @SelectProvider(type = AdminSql.class,method = \"_get\")\n AdminEntity _get(String id);\n\n /**\n * 删除(逻辑)\n * 参数:\n * id : 要删除的记录的id\n */\n @DeleteProvider(type = AdminSql.class,method = \"_delete\")\n int _delete(String id);\n\n /**\n * 删除(物理)\n * 参数:\n * id : 要删除的记录的id\n */\n @DeleteProvider(type = AdminSql.class,method = \"_deleteForce\")\n int _deleteForce(String id);\n\n /**\n * 新增\n * 参数:\n * map里的key为属性名(字段首字母小写)\n * value为要插入的key值\n */\n @InsertProvider(type = AdminSql.class,method = \"_add\")\n int _add(Map params);\n\n /**\n * 按实体类新增\n * 参数:\n * 实体类对象,必须有id属性\n */\n @InsertProvider(type = AdminSql.class,method = \"_addEntity\")\n int _addEntity(AdminEntity bean);\n\n /**\n * 更新\n * 参数:\n * id : 要更新的记录的id\n * 其他map里的参数,key为属性名(字段首字母小写)\n * value为要更新成的值\n */\n @InsertProvider(type = AdminSql.class,method = \"_update\")\n int _update(Map params);\n\n /**\n * 按实体类更新\n * 参数:\n * 实体类对象,必须有id属性\n */\n @InsertProvider(type = AdminSql.class,method = \"_updateEntity\")\n int _updateEntity(AdminEntity bean);\n\n}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface CountryMapper extends EntityMapper<CountryDTO, Country> {\n\n\n @Mapping(target = \"cities\", ignore = true)\n @Mapping(target = \"countryLanguages\", ignore = true)\n Country toEntity(CountryDTO countryDTO);\n\n default Country fromId(Long id) {\n if (id == null) {\n return null;\n }\n Country country = new Country();\n country.setId(id);\n return country;\n }\n}", "@Mapper(componentModel = \"spring\", uses = {TravauxMapper.class, ChantierMapper.class, EmployeMapper.class})\npublic interface AffectationMapper extends EntityMapper<AffectationDTO, Affectation> {\n\n @Mapping(source = \"travaux.id\", target = \"travauxId\")\n @Mapping(source = \"travaux.nomTrav\", target = \"travauxNomTrav\")\n @Mapping(source = \"chantier.id\", target = \"chantierId\")\n @Mapping(source = \"chantier.nomChantier\", target = \"chantierNomChantier\")\n AffectationDTO toDto(Affectation affectation);\n\n @Mapping(source = \"travauxId\", target = \"travaux\")\n @Mapping(source = \"chantierId\", target = \"chantier\")\n Affectation toEntity(AffectationDTO affectationDTO);\n\n default Affectation fromId(Long id) {\n if (id == null) {\n return null;\n }\n Affectation affectation = new Affectation();\n affectation.setId(id);\n return affectation;\n }\n}", "public interface AllergyModelProperties extends PropertyAccess<AllergyModel> {\n ModelKeyProvider<AllergyModel> id();\n}", "@Mapper(componentModel = \"spring\", uses = {UserMapper.class, })\npublic interface PeopleMapper extends EntityMapper <PeopleDTO, People> {\n\n @Mapping(source = \"user.id\", target = \"userId\")\n @Mapping(source = \"user.firstName\", target = \"userFirstName\")\n @Mapping(source = \"user.lastName\", target = \"userLastName\")\n PeopleDTO toDto(People people);\n\n @Mapping(source = \"userId\", target = \"user\")\n @Mapping(target = \"seminarsPresenteds\", ignore = true)\n @Mapping(target = \"seminarsAttendeds\", ignore = true)\n @Mapping(target = \"specialGuestAts\", ignore = true)\n People toEntity(PeopleDTO peopleDTO);\n default People fromId(Long id) {\n if (id == null) {\n return null;\n }\n People people = new People();\n people.setId(id);\n return people;\n }\n\n default String peopleName(People people) {\n String name = \"\";\n if (people == null) {\n return null;\n }\n if (people.getUser() == null) {\n return null;\n }\n String firstName = people.getUser().getFirstName();\n if (firstName != null) {\n name += firstName;\n }\n String lastName = people.getUser().getLastName();\n if (lastName != null) {\n name += \" \" + lastName;\n }\n return name;\n }\n}", "@SuppressWarnings(\"unused\")\n@Repository\n@JaversSpringDataAuditable\npublic interface ReservoirCapacityRepository extends JpaRepository<ReservoirCapacity, Long> {\n\n}", "EntityDefinitionVisitor getEntityDefinitionStateSetterVisitor();", "@Mapper\n@Repository\npublic interface ClientDao {\n\n @Insert(value = \"insert into client_information(phone_number,user_name,password) values (#{phoneNumber},#{userName},#{password})\")\n void addClient(@Param(\"userName\") String userName, @Param(\"phoneNumber\") String phoneNumber , @Param(\"password\") String password);\n\n @Update(value = \"update client_information set sex=#{sex},user_name=#{user_name},email=#{email},\" +\n \"unit=#{unit},place=#{place} where phone_number=#{phone_number}\")\n void updateClient(@Param(\"phone_number\") String phone_number,@Param(\"user_name\") String user_name,@Param(\"sex\") String sex,@Param(\"email\") String email,@Param(\"unit\") String unit,@Param(\"place\") String place);\n\n @Select(value = \"select * from client_information where phone_number=#{phoneNumber}\")\n ClientVO selectClient(String phoneNumber);\n\n @Update(value = \"update client_information set password=#{password} where phone_number=#{phone_number}\")\n void updatePass(@Param(\"phone_number\") String phone_number,@Param(\"password\") String password);\n\n}", "public sealed interface EntityMapper<D, E>permits CarMapper,\n ModelMapper, ModelOptionMapper, PricingClassMapper, UserInfoMapper,\n TownMapper, AddressMapper, RoleMapper, BookingMapper, RentMapper {\n\n E toEntity(D dto);\n\n D toDto(E entity);\n\n Collection<E> toEntity(Collection<D> dtoList);\n\n Collection<D> toDto(Collection<E> entityList);\n\n @Named(\"partialUpdate\")\n @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)\n void partialUpdate(@MappingTarget E entity, D dto);\n}", "@Bean\n\t@Lazy(false)\n\tAdditionalModelsConverter additionalModelsConverter() {\n\t\treturn new AdditionalModelsConverter();\n\t}", "@Test\n\tpublic void testSettersAddress() {\n\t\tassertTrue(beanTester.testSetters());\n\t}", "@Test\n\tpublic void testGettersAndSetters() {\n\t\tnew BeanTester().testBean(LeastCommonNodeInput.class, configuration);\n\n\t}", "@Service(name = \"CustomerService\")\n@OpenlegacyDesigntime(editor = \"WebServiceEditor\")\npublic interface CustomerServiceService {\n\n public CustomerServiceOut getCustomerService(CustomerServiceIn customerServiceIn) throws Exception;\n\n @Getter\n @Setter\n public static class CustomerServiceIn {\n \n Integer id3;\n }\n \n @ApiModel(value=\"CustomerServiceOut\", description=\"\")\n @Getter\n @Setter\n public static class CustomerServiceOut {\n \n @ApiModelProperty(value=\"Getuserdetails\")\n Getuserdetails getuserdetails;\n }\n}", "void generateWriteProperty2ContentValues(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);", "public interface SmooksTransformModel extends TransformModel {\n\n /** The \"smooks\" name. */\n public static final String SMOOKS = \"smooks\";\n\n /** The \"config\" name. */\n public static final String CONFIG = \"config\";\n \n /** The \"type\" name. */\n public static final String TYPE = \"type\";\n\n /** The \"reportPath\" name. */\n public static final String REPORT_PATH = \"reportPath\";\n \n /**\n * Gets the type attribute.\n * @return the type attribute\n */\n public String getTransformType();\n\n /**\n * Sets the type attribute.\n * @param type the type attribute\n * @return this SmooksTransformModel (useful for chaining)\n */\n public SmooksTransformModel setTransformType(String type);\n\n /**\n * Gets the config attribute.\n * @return the config attribute\n */\n public String getConfig();\n\n\n /**\n * Sets the config attribute.\n * @param config the config attribute\n * @return this SmooksTransformModel (useful for chaining)\n */\n public SmooksTransformModel setConfig(String config);\n\n /**\n * Gets the reportPath attribute.\n * @return the reportPath attribute\n */\n public String getReportPath();\n\n /**\n * Sets the reportPath attribute.\n * @param reportPath the reportPath attribute\n * @return this SmooksTransformModel (useful for chaining)\n */\n public SmooksTransformModel setReportPath(String reportPath);\n\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface TarifLineMapper extends EntityMapper <TarifLineDTO, TarifLine> {\n \n \n default TarifLine fromId(Long id) {\n if (id == null) {\n return null;\n }\n TarifLine tarifLine = new TarifLine();\n tarifLine.setId(id);\n return tarifLine;\n }\n}", "@Bean\n\tpublic ExtendedMetadata extendedMetadata() {\n\t\tExtendedMetadata extendedMetadata = new ExtendedMetadata();\n\t\textendedMetadata.setIdpDiscoveryEnabled(true);\n\t\textendedMetadata.setSignMetadata(false);\n\t\textendedMetadata.setEcpEnabled(true);\n\t\treturn extendedMetadata;\n\t}", "public EntityPropertyBean() {}", "@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime &gt;= #{higherSkuParam.startTime}\",\n \"AND s.updateTime &lt;= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}", "public void init() {\n entityPropertyBuilders.add(new DefaultEntityComponentBuilder(environment));\n entityPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n entityPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n entityPropertyBuilders.add(new PrimaryKeyComponentBuilder(environment));\n\n // Field meta property builders\n fieldPropertyBuilders.add(new FilterPrimaryKeyComponentBuilder(environment));\n fieldPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n fieldPropertyBuilders.add(new TtlFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new CompositeParentComponentBuilder(environment));\n fieldPropertyBuilders.add(new CollectionFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MapFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new SimpleFieldComponentBuilder(environment));\n }", "EntityBeanDescriptor createEntityBeanDescriptor();", "public interface GradeMapper {\n @Select(\"select * from grade\")\n public List<Grade> getByGradeNm();\n\n @Insert(\"insert into grade(grade_nm,teacher_id) values(#{gradeNm},#{teacherId})\")\n @Options(useGeneratedKeys=true,keyColumn=\"id\",keyProperty=\"id\")//设置id自增长\n public void save(Grade grade);\n}", "@Mapper(componentModel = \"spring\", uses = {ClientMapper.class, UserAppMapper.class, DistrictMapper.class})\npublic interface CampusMapper extends EntityMapper<CampusDTO, Campus> {\n\n @Mapping(source = \"client\", target = \"clientDto\")\n @Mapping(source = \"district\", target = \"districtDto\")\n CampusDTO toDto(Campus campus);\n\n @Mapping(source = \"clientDto\", target = \"client\")\n @Mapping(source = \"districtDto\", target = \"district\")\n @Mapping(target = \"fields\", ignore = true)\n Campus toEntity(CampusDTO campusDTO);\n\n default Campus fromId(Long id) {\n if (id == null) {\n return null;\n }\n Campus campus = new Campus();\n campus.setId(id);\n return campus;\n }\n}", "@Mapper(componentModel = \"spring\", uses = {ProvinciaMapper.class})\npublic interface CodigoPostalMapper extends EntityMapper<CodigoPostalDTO, CodigoPostal> {\n\n @Mapping(source = \"provincia.id\", target = \"provinciaId\")\n @Mapping(source = \"provincia.nombreProvincia\", target = \"provinciaNombreProvincia\")\n CodigoPostalDTO toDto(CodigoPostal codigoPostal);\n\n @Mapping(source = \"provinciaId\", target = \"provincia\")\n CodigoPostal toEntity(CodigoPostalDTO codigoPostalDTO);\n\n default CodigoPostal fromId(Long id) {\n if (id == null) {\n return null;\n }\n CodigoPostal codigoPostal = new CodigoPostal();\n codigoPostal.setId(id);\n return codigoPostal;\n }\n}", "@Mapper\npublic interface UserMapper {\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return int\n */\n int registerAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param baseUser\n * @return int\n */\n int registerBaseUser(BaseUser baseUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return com.example.app.entity.BaseUser\n */\n AppUser loginAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param\n * @return java.util.List<com.example.app.entity.College>\n */\n @Select(\"select * from col\")\n List<College> allCollege();\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param user\n * @return int\n */\n int hasUser(BaseUser user);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param col_id\n * @return int\n */\n int hasCol(int col_id);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param sms\n * @return int\n */\n int registerCode(SMS sms);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param code\n * @return int\n */\n int getCode(@Param(\"code\") Integer code);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrder(Order order);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrderCount(Order order);\n\n}", "public interface TdHtFuncroleRelRepository {\n\n /**\n * @Purpose 根据id查找角色id和功能id\n * @version 4.0\n * @author lizhun\n * @param map\n * @return TdHtFuncroleRelDto\n */\n public TdHtFuncroleRelDto findFuncroleRelByRoleIdAndFuncId(Map<String,Integer> map);\n\n /**\n * @Purpose 根据权限id查找角色权限关联信息\n * @version 4.0\n * @author lizhun\n * @param role_id\n * @return List<TdHtFuncroleRelDto>\n */\n public List<TdHtFuncroleRelDto> findFuncroleRelsByRoleId(int role_id);\n /**\n * @Purpose 添加角色权限关联信息\n * @version 4.0\n * @author lizhun\n * @return void\n */\n public void insertFuncroleRel(TdHtFuncroleRelDto TdHtFuncroleRelDto);\n /**\n * @Purpose 修改角色限关联信息\n * @version 4.0\n * @author lizhun\n * @return void\n */\n public void updateFuncroleRel(TdHtFuncroleRelDto TdHtFuncroleRelDto);\n /**\n * @Purpose 修改角色所有功能不可用\n * @version 4.0\n * @author lizhun\n * @return void\n */\n public void updateFuncroleRelByRoleId(int role_id);\n}", "public interface AEntityProperty {\n}", "public interface EntitySource extends IdentifiableTypeSource, ToolingHintContextContainer, EntityNamingSourceContributor {\n\t/**\n\t * Obtain the primary table for this entity.\n\t *\n\t * @return The primary table.\n\t */\n\tpublic TableSpecificationSource getPrimaryTable();\n\n\t/**\n\t * Obtain the secondary tables for this entity\n\t *\n\t * @return returns an iterator over the secondary tables for this entity\n\t */\n\tpublic Map<String,SecondaryTableSource> getSecondaryTableMap();\n\n\tpublic String getXmlNodeName();\n\n\t/**\n\t * Obtain the named custom tuplizer classes to be used.\n\t *\n\t * @return The custom tuplizer class names\n\t */\n\tpublic Map<EntityMode,String> getTuplizerClassMap();\n\n\t/**\n\t * Obtain the name of a custom persister class to be used.\n\t *\n\t * @return The custom persister class name\n\t */\n\tpublic String getCustomPersisterClassName();\n\n\t/**\n\t * Is this entity lazy (proxyable)?\n\t *\n\t * @return {@code true} indicates the entity is lazy; {@code false} non-lazy.\n\t */\n\tpublic boolean isLazy();\n\n\t/**\n\t * For {@link #isLazy() lazy} entities, obtain the interface to use in constructing its proxies.\n\t *\n\t * @return The proxy interface name\n\t */\n\tpublic String getProxy();\n\n\t/**\n\t * Obtain the batch-size to be applied when initializing proxies of this entity.\n\t *\n\t * @return returns the the batch-size.\n\t */\n\tpublic int getBatchSize();\n\n\t/**\n\t * Is the entity abstract?\n\t * <p/>\n\t * The implication is whether the entity maps to a database table.\n\t *\n\t * @return {@code true} indicates the entity is abstract; {@code false} non-abstract; {@code null}\n\t * indicates that a reflection check should be done when building the persister.\n\t */\n\tpublic Boolean isAbstract();\n\n\t/**\n\t * Did the source specify dynamic inserts?\n\t *\n\t * @return {@code true} indicates dynamic inserts will be used; {@code false} otherwise.\n\t */\n\tpublic boolean isDynamicInsert();\n\n\t/**\n\t * Did the source specify dynamic updates?\n\t *\n\t * @return {@code true} indicates dynamic updates will be used; {@code false} otherwise.\n\t */\n\tpublic boolean isDynamicUpdate();\n\n\t/**\n\t * Did the source specify to perform selects to decide whether to perform (detached) updates?\n\t *\n\t * @return {@code true} indicates selects will be done; {@code false} otherwise.\n\t */\n\tpublic boolean isSelectBeforeUpdate();\n\n\t/**\n\t * Obtain the name of a named-query that will be used for loading this entity\n\t *\n\t * @return THe custom loader query name\n\t */\n\tpublic String getCustomLoaderName();\n\n\t/**\n\t * Obtain the custom SQL to be used for inserts for this entity\n\t *\n\t * @return The custom insert SQL\n\t */\n\tpublic CustomSql getCustomSqlInsert();\n\n\t/**\n\t * Obtain the custom SQL to be used for updates for this entity\n\t *\n\t * @return The custom update SQL\n\t */\n\tpublic CustomSql getCustomSqlUpdate();\n\n\t/**\n\t * Obtain the custom SQL to be used for deletes for this entity\n\t *\n\t * @return The custom delete SQL\n\t */\n\tpublic CustomSql getCustomSqlDelete();\n\n\t/**\n\t * Obtain any additional table names on which to synchronize (auto flushing) this entity.\n\t *\n\t * @return Additional synchronized table names or 0 sized String array, never return null.\n\t */\n\tpublic String[] getSynchronizedTableNames();\n\n\t/**\n\t * Get the actual discriminator value in case of a single table inheritance\n\t *\n\t * @return the actual discriminator value in case of a single table inheritance or {@code null} in case there is no\n\t * explicit value or a different inheritance scheme\n\t */\n\tpublic String getDiscriminatorMatchValue();\n\n\t/**\n\t * @return returns the source information for constraints defined on the table\n\t */\n\tpublic Collection<ConstraintSource> getConstraints();\n\n\t/**\n\t * Obtain the filters for this entity.\n\t *\n\t * @return returns an array of the filters for this entity.\n\t */\n\tpublic FilterSource[] getFilterSources();\n\n\tpublic List<JaxbHbmNamedQueryType> getNamedQueries();\n\n\tpublic List<JaxbHbmNamedNativeQueryType> getNamedNativeQueries();\n\n\tpublic TruthValue quoteIdentifiersLocalToEntity();\n\n}", "@Override\r\n public void createNewEntity(String entityName) {\n\r\n }", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface PerformerMapper extends EntityMapper<PerformerDTO, Performer> {\n\n\n\n default Performer fromId(Long id) {\n if (id == null) {\n return null;\n }\n Performer performer = new Performer();\n performer.setId(id);\n return performer;\n }\n}", "@Test\n\tpublic void testGettersAddress() {\n\t\tassertTrue(beanTester.testGetters());\n\t}", "@Api(tags = \"Address Entity\")\n@RepositoryRestResource(collectionResourceRel = \"taxInformation\", path =\"taxInformation\")\npublic interface TaxInformationRepository extends PagingAndSortingRepository<TaxInformation,Integer> {\n}", "public interface EmployeeRepository extends ArangoRepository<Employee, String> {}", "@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface TemplateFormulaireMapper extends EntityMapper<TemplateFormulaireDTO, TemplateFormulaire> {\n\n\n @Mapping(target = \"questions\", ignore = true)\n TemplateFormulaire toEntity(TemplateFormulaireDTO templateFormulaireDTO);\n\n default TemplateFormulaire fromId(Long id) {\n if (id == null) {\n return null;\n }\n TemplateFormulaire templateFormulaire = new TemplateFormulaire();\n templateFormulaire.setId(id);\n return templateFormulaire;\n }\n}", "public void setupEntities() {\n }", "@Test\n\tpublic void testGettersAndSetters() {\n\t\tnew BeanTester().testBean(ShortestPathOutput.class, configuration);\n\t}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface OrderPaymentMapper extends EntityMapper<OrderPaymentDTO, OrderPayment> {\n\n\n\n default OrderPayment fromId(Long id) {\n if (id == null) {\n return null;\n }\n OrderPayment orderPayment = new OrderPayment();\n orderPayment.setId(id);\n return orderPayment;\n }\n}", "@Repository\n@Mapper\npublic interface AppInfoMapper extends BaseMapper<AppInfoEntity> {\n}", "public interface LevelClearRecordService {\n\n /**\n * description: 根据传入bean查询挑战记录 <br>\n * version: 1.0 <br>\n * date: 2020/3/21 23:34 <br>\n * author: zhengzhiqiang <br>\n *\n * @param selectParam\n * @return siyi.game.dao.entity.LevelClearRecord\n */\n LevelClearRecord selectByBean(LevelClearRecord selectParam);\n\n /**\n * description: 插入挑战记录信息 <br>\n * version: 1.0 <br>\n * date: 2020/3/21 23:37 <br>\n * author: zhengzhiqiang <br>\n *\n * @param insertRecord\n * @return void\n */\n void insertSelective(LevelClearRecord insertRecord);\n\n /**\n * description: 根据主键更新挑战记录信息 <br>\n * version: 1.0 <br>\n * date: 2020/3/21 23:39 <br>\n * author: zhengzhiqiang <br>\n *\n * @param levelClearRecord\n * @return void\n */\n void updateByIdSelective(LevelClearRecord levelClearRecord);\n}", "public interface HealthBlockRecordsDataService extends MotechDataService<HealthBlock> {\n\n /**\n * finds the Health Block details by its parent code\n *\n * @param stateCode\n * @param districtCode\n * @param talukaCode\n * @param healthBlockCode\n * @return HealthBlock\n */\n @Lookup\n HealthBlock findHealthBlockByParentCode(@LookupField(name = \"stateCode\") Long stateCode, @LookupField(name = \"districtCode\") Long districtCode,\n @LookupField(name = \"talukaCode\") Long talukaCode, @LookupField(name = \"healthBlockCode\") Long healthBlockCode);\n\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface TipoTelaMapper {\n\n @Mapping(source = \"direccionamientoTela.id\", target = \"direccionamientoTelaId\")\n @Mapping(source = \"direccionamientoTela.nombre\", target = \"direccionamientoTelaNombre\")\n TipoTelaDTO tipoTelaToTipoTelaDTO(TipoTela tipoTela);\n\n @Mapping(source = \"direccionamientoTelaId\", target = \"direccionamientoTela\")\n @Mapping(target = \"telaCrudas\", ignore = true)\n TipoTela tipoTelaDTOToTipoTela(TipoTelaDTO tipoTelaDTO);\n\n default DireccionamientoTela direccionamientoTelaFromId(Long id) {\n if (id == null) {\n return null;\n }\n DireccionamientoTela direccionamientoTela = new DireccionamientoTela();\n direccionamientoTela.setId(id);\n return direccionamientoTela;\n }\n}", "@Override\n public void loadEntityDetails() {\n \tsuper.loadEntityDetails();\n }", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface Owner3Mapper extends EntityMapper <Owner3DTO, Owner3> {\n \n @Mapping(target = \"car3S\", ignore = true)\n Owner3 toEntity(Owner3DTO owner3DTO); \n default Owner3 fromId(Long id) {\n if (id == null) {\n return null;\n }\n Owner3 owner3 = new Owner3();\n owner3.setId(id);\n return owner3;\n }\n}", "@Override\n public Entity getEntity() {\n return super.getEntity();\n }", "public interface ApiBaseUserRolePostSwitchPoService extends feihua.jdbc.api.service.ApiBaseService<BaseUserRolePostSwitchPo, BaseUserRolePostSwitchDto, String> {\n\n /**\n * 根据用户查询\n * @param userId\n * @return\n */\n BaseUserRolePostSwitchPo selectByUserId(String userId);\n}", "@JsonGetter(\"price_money\")\r\n public Money getPriceMoney() {\r\n return priceMoney;\r\n }", "@Override\n protected JsonUtil getJsonUtil() {\n return super.getJsonUtil();\n }", "public interface BaseService<Kiruvchi, Chiquvchi, ID> {\n\n //Create Entity\n ApiResponse addEntity(Kiruvchi kiruvchi);\n\n //Get Page<Entity>\n Page<Chiquvchi> getEntiyPageBySort(Optional<Integer> page, Optional<Integer> size, Optional<String> sortBy);\n\n //Get by id Optional<Entity> Sababi Http Status kodini tog'ri jo'natish uchun\n Optional<Chiquvchi> getEntityById(ID id);\n\n //Update Entity by id\n ApiResponse editState(ID id, Kiruvchi kiruvchi);\n\n //Delete Entity by id\n ApiResponse deleteEntityById(Integer id);\n}", "public interface ApplyOrderMapper extends CrudRepository<OrderEntity, Long> {\n}", "@Mapper(componentModel = \"spring\", uses = {UserMapper.class, CustomerMapper.class})\npublic interface WorkDayMapper extends EntityMapper<WorkDayDTO, WorkDay> {\n\n @Mapping(source = \"user.id\", target = \"userId\")\n @Mapping(source = \"user.login\", target = \"userLogin\")\n @Mapping(source = \"customer.id\", target = \"customerId\")\n WorkDayDTO toDto(WorkDay workDay);\n\n @Mapping(source = \"userId\", target = \"user\")\n @Mapping(source = \"customerId\", target = \"customer\")\n WorkDay toEntity(WorkDayDTO workDayDTO);\n\n default WorkDay fromId(Long id) {\n if (id == null) {\n return null;\n }\n WorkDay workDay = new WorkDay();\n workDay.setId(id);\n return workDay;\n }\n}", "@RepositoryRestResource\npublic interface WebsiteRepository extends JpaRepository<WebsiteEntity, Long> {\n\n}", "@Mapper\npublic interface BCategoriesMapper {\n\n @Select(\"select * from t_categories\")\n List<CategoriesPo> findAll();\n\n @Select(\"select id,categoriesName,cAbbreviate from t_categories where id=#{id}\")\n CategoriesPo getById(@Param(\"id\") int id);\n\n @Insert(\"insert ignore into t_categories(categoriesName,cAbbreviate) values(#{categoriesName},#{cAbbreviate})\")\n boolean save(@Param(\"categoriesName\") String categoriesName, @Param(\"cAbbreviate\") String cAbbreviate);\n\n @Update(\"update t_categories set categoriesName=#{categoriesName},cAbbreviate=#{cAbbreviate} where id=#{id}\")\n boolean edit(@Param(\"id\") int id, @Param(\"categoriesName\") String categoriesName, @Param(\"cAbbreviate\") String cAbbreviate);\n\n @Delete(\"delete from t_categories where id=#{id}\")\n boolean deleteById(@Param(\"id\") int id);\n}", "@FameProperty(name = \"accessors\", derived = true)\n public Collection<TWithAccesses> getAccessors() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "@JsonGetter(\"product_details\")\n public ProductData getProductDetails ( ) { \n return this.productDetails;\n }", "@Repository(\"productTypeMapper\")\npublic interface ProductTypeMapper extends CommonMapper<ProductTypeInfo> {\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface OTHERMapper extends EntityMapper<OTHERDTO, OTHER> {\n\n\n\n default OTHER fromId(Long id) {\n if (id == null) {\n return null;\n }\n OTHER oTHER = new OTHER();\n oTHER.setId(id);\n return oTHER;\n }\n}", "@JsonIgnoreProperties({\"ezdUmg\"})\npublic interface BigretUsersFilter {\n}", "@Override\n public void updateClassDescriptor(ClassDescriptor desc) {\n desc.getters = List.of();\n desc.setters = List.of();\n\n for (Iterator<Binding> iterator = desc.fields.iterator(); iterator.hasNext(); ) {\n Binding binding = iterator.next();\n \n if (!Modifier.isPublic(binding.field.getModifiers())) {\n iterator.remove();\n } else {\n Property property = getProperty(binding.annotations);\n if (property != null) {\n binding.fromNames = new String[]{property.name()};\n binding.toNames = new String[]{property.name()};\n } else {\n iterator.remove();\n }\n }\n }\n }", "@SuppressWarnings(\"deprecation\")\npublic interface SyntheticModelProviderPlugin extends Plugin<ModelContext> {\n /**\n * Creates a synthetic model\n *\n * @param context - context to create the model from\n * @return model - when the plugin indicates it supports it, it must return a model\n */\n springfox.documentation.schema.Model create(ModelContext context);\n\n /**\n * Creates a synthetic model properties\n *\n * @param context - context to create the model properties from\n * @return model - when the plugin indicates it supports it, it must provide properties by name\n */\n List<springfox.documentation.schema.ModelProperty> properties(ModelContext context);\n\n\n /**\n * Creates a synthetic model\n *\n * @param context - context to create the model from\n * @return model - when the plugin indicates it supports it, it must return a model\n */\n ModelSpecification createModelSpecification(ModelContext context);\n\n /**\n * Creates a synthetic model properties\n *\n * @param context - context to create the model properties from\n * @return model - when the plugin indicates it supports it, it must provide properties by name\n */\n List<PropertySpecification> propertySpecifications(ModelContext context);\n\n /**\n * Creates a dependencies for the synthetic model\n *\n * @param context - context to create the model dependencies from\n * @return model - when the plugin indicates it supports it, it may return dependent model types.\n */\n Set<ResolvedType> dependencies(ModelContext context);\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface TarifMapper extends EntityMapper <TarifDTO, Tarif> {\n \n \n default Tarif fromId(Long id) {\n if (id == null) {\n return null;\n }\n Tarif tarif = new Tarif();\n tarif.setId(id);\n return tarif;\n }\n}", "@Bean\n public ModelMapper modelMapper() {\n ModelMapper mapper = new ModelMapper();\n\n mapper.addMappings(new PropertyMap<Permit, PermitDto>() {\n @Override\n protected void configure() {\n Converter<List<Code>, List<Integer>> codeConverter = mappingContext -> {\n List<Integer> result = new ArrayList<>();\n mappingContext.getSource().forEach(code -> result.add(code.getId()));\n return result;\n };\n\n using(codeConverter).map(source.getCodes()).setCodeIds(null);\n }\n });\n return mapper;\n }", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ChipsAdminRepository extends JpaRepository<ChipsAdmin, Long> {}", "@Bean\n public ExtendedMetadata extendedMetadata() {\n return new ExtendedMetadata();\n }", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface MedicoCalendarioMapper extends EntityMapper<MedicoCalendarioDTO, MedicoCalendario> {\n\n\n\n default MedicoCalendario fromId(Long id) {\n if (id == null) {\n return null;\n }\n MedicoCalendario medicoCalendario = new MedicoCalendario();\n medicoCalendario.setId(id);\n return medicoCalendario;\n }\n}", "@Override\n public CalificacionEntity toEntity() {\n CalificacionEntity calificacionEntity = super.toEntity();\n if (this.getHospedaje() != null) {\n calificacionEntity.setHospedaje(this.getHospedaje().toEntity());\n }\n return calificacionEntity;\n }" ]
[ "0.63297254", "0.6107342", "0.5660554", "0.5651006", "0.55322295", "0.54640394", "0.5463225", "0.54493016", "0.5434231", "0.54148996", "0.53874224", "0.5378587", "0.53504497", "0.5342178", "0.5335634", "0.5329068", "0.53250057", "0.5322392", "0.53159934", "0.5303257", "0.52934754", "0.5277467", "0.5270243", "0.5263833", "0.52422476", "0.52404726", "0.52403295", "0.52267075", "0.5226322", "0.5207932", "0.52052426", "0.5198333", "0.5196364", "0.51940656", "0.51844966", "0.517809", "0.5170593", "0.51660615", "0.5163628", "0.51568675", "0.51563966", "0.5149911", "0.51468736", "0.5143617", "0.5141595", "0.513244", "0.51281244", "0.5125929", "0.51235604", "0.51221395", "0.5112965", "0.5105484", "0.51018643", "0.5096258", "0.5095357", "0.5092547", "0.5092064", "0.50892305", "0.50737786", "0.5069285", "0.50607955", "0.505555", "0.50525796", "0.5051799", "0.5048742", "0.50477105", "0.5038796", "0.5038599", "0.5035572", "0.5028225", "0.5028133", "0.5025232", "0.5024405", "0.50205666", "0.501867", "0.5012934", "0.5012542", "0.50116724", "0.5010877", "0.5001154", "0.49940327", "0.49922282", "0.49846742", "0.4984609", "0.49813172", "0.4978781", "0.497786", "0.49772936", "0.4972417", "0.4971019", "0.49681714", "0.49677187", "0.49663946", "0.4965758", "0.49655482", "0.49635565", "0.49633694", "0.49599627", "0.49571082", "0.4949901", "0.49489543" ]
0.0
-1
If no status gadget is provided, it uses a basic one.
public SingleUploader() { this(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String evaluateDeveloperStatus(DeveloperStatus status) {\n switch (status) {\n case AVAILABLE:\n return \"color: #449d44 !important;\";\n case HOLIDAY:\n return \"color: darkcyan !important;\";\n case LOCKED:\n return \"color: #DC143C !important;\";\n case HIRED:\n return \"color: blue !important;\";\n default:\n return \"\";\n }\n }", "private void getStatus() {\n\t\t\n\t}", "public Status getStatus();", "public String showStatus();", "public void setStatus(String status) { this.status = status; }", "public void printStatus();", "public abstract String currentStatus();", "@Override\n\tpublic void onStatusChanged(Object arg0, STATUS status) {\n\t\tSystem.out.println(status);\n\t\tswitch (status) {\n\n\t\tcase LAYER_LOADED:\n\t\t\tif (!isPathShow && goodsMap != null && goodsMap.size() > 0) {\n\t\t\t\tshelfList.clear();\n\t\t\t\tsearchTime = 0;\n\t\t\t\tqueryLocator();\n\t\t\t\tisPathShow = true;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "com.google.rpc.Status getStatus();", "com.google.rpc.Status getStatus();", "public void loadStatus (){\n\t}", "public void setStatus(Short status) {\n this.status = status;\n }", "public String getStatus(int status) {\n switch (status) {\n case 0:\n return \"FREE\";\n case 1:\n return \"IN_TRANSIT\";\n case 2:\n return \"WAITING_TO_LAND\";\n case 3:\n return \"GROUND_CLEARANCE_GRANTED\";\n case 4:\n return \"LANDING\";\n case 5:\n return \"LANDED\";\n case 6:\n return \"TAXING\";\n case 7:\n return \"UNLOADING\";\n case 8:\n return \"READY_CLEAN_AND_MAINT\";\n case 9:\n return \"FAULTY_AWAIT_CLEAN\";\n case 10:\n return \"CLEAN_AWAIT_MAINT\";\n case 11:\n return \"OK_AWAIT_CLEAN\";\n case 12:\n return \"AWAIT_REPAIR\";\n case 13:\n return \"READY_REFUEL\";\n case 14:\n return \"READY_PASSENGERS\";\n case 15:\n return \"READY_DEPART\";\n case 16:\n return \"AWAITING_TAXI\";\n case 17:\n return \"AWAITING_TAKEOFF\";\n case 18:\n return \"DEPARTING_THROUGH_LOCAL_AIRSPACE\";\n default:\n return \"UNKNOWN\";\n }//END SWITCH\n }", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "public void setStatus( Short status ) {\n this.status = status;\n }", "String status();", "String status();", "RequestStatus getStatus();", "public BugStatus getStatus(){return status;}", "void setStatus(STATUS status);", "public interface StatusCapable\n{\n /**\n * Get the status of the object.\n * @return\n * the status of the object\n */\n SummaryStatusEnum getSummaryStatus();\n}", "private void displayStatus(String status) {\n\t\tif (!status.equals(\"\")) {\n\t\t\tdouble x = LEFT_MARGIN;\n\t\t\tdouble y = nameY + IMAGE_MARGIN + IMAGE_HEIGHT + STATUS_MARGIN;\n\t\t\tGLabel pstatus = new GLabel(status);\n\t\t\tpstatus.setFont(PROFILE_STATUS_FONT);\n\t\t\tif (getElementAt(x, y) != null) {\n\t\t\t\tremove(getElementAt(x, y));\n\t\t\t}\n\t\t\tadd(pstatus, x, y);\n\t\t}\n\t}", "@Override\n\tpublic void getStatus() {\n\t\t\n\t}", "public void onStatusChanged(String provider, int status, Bundle extras) { /* Do nothing */ }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "public void setStatus(Short status) {\n\t\tthis.status = status;\n\t}", "public void setStatus(Short status) {\n\t\tthis.status = status;\n\t}", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "public abstract OnlineStatus getStatus();", "@GET(\"system/status\")\n Call<InlineResponse200> getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "void onStatusUpdate(int status);", "public void showStatus(String paramString) {\n/* 258 */ getAppletContext().showStatus(paramString);\n/* */ }", "private boolean open(final int status) {\n return Objects.equals(status, 0);\n }", "private void internalSetStatus(String status) {\n jStatusLine.setText(\"Status: \" + status);\n }", "void setStatus(java.lang.String status);", "public void setStatus(String status) {\r\n this.status = status;\r\n }", "public void setStatus(JobStatus status);", "T getStatus();", "public void setStatus(java.lang.String status) {\r\n this.status = status;\r\n }", "public void setStatus(int status) {\n\t\tswitch (status) {\r\n\t\tcase 1:\r\n\t\t\tthis.status = FRESHMAN;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tthis.status = SOPHOMORE;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tthis.status = JUNIOR;\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tthis.status = SENIOR;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void newDeviceStatus(String deviceId, Boolean statusOK);", "public void setStatus(String status) {\r\n this.status = status;\r\n }", "public void setStatus(String status) {\r\n this.status = status;\r\n }", "public void status(leapstream.scoreboard.core.model.Status status) {\n Stati stati = status.is();\n foreground(stati);\n background(stati);\n label.text(\"\" + stati);\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }" ]
[ "0.5728021", "0.56835026", "0.55855244", "0.5583542", "0.5574563", "0.5529027", "0.55271953", "0.54689336", "0.544809", "0.544809", "0.5429219", "0.54217815", "0.54068834", "0.5398489", "0.5398489", "0.5398489", "0.5398489", "0.5398489", "0.5398489", "0.5398489", "0.5398489", "0.5398489", "0.5398489", "0.5398489", "0.5397295", "0.53838176", "0.53838176", "0.5377041", "0.5360705", "0.53596485", "0.53589624", "0.5355854", "0.5354034", "0.5343916", "0.53376806", "0.53376806", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5329829", "0.5317208", "0.5317208", "0.5313525", "0.5313525", "0.5313525", "0.5313525", "0.53096503", "0.5308798", "0.530597", "0.530597", "0.530597", "0.530597", "0.530597", "0.5304887", "0.5304075", "0.53032315", "0.5301291", "0.52990216", "0.5287663", "0.52845", "0.5279276", "0.5275946", "0.5273016", "0.5272729", "0.5271255", "0.5271255", "0.5268216", "0.5267215", "0.5267215", "0.5267215", "0.5267215", "0.5267215", "0.5267215", "0.5267215", "0.5267215", "0.5267215", "0.5267215", "0.5267215", "0.5267215", "0.5267215", "0.5267215", "0.5267215", "0.5267215" ]
0.0
-1
If no submit button is provided it creates new one.
public SingleUploader(IUploadStatus status) { this(status, new Button()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected GuiTestObject button_registerNowsubmit() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"button_registerNowsubmit\"));\n\t}", "private void setupSubmitButton() {\n\t\tImageIcon submit_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"submit.png\");\n\t\tJButton submit_button = new JButton(\"\", submit_button_image);\n\t\tsubmit_button.setBorderPainted(false);\n\t\tsubmit_button.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//only enable submitting if festival has finished to avoid delayed voice prompts\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t}\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}\n\t\t});\n\t\tsubmit_button.addMouseListener(new VoxMouseAdapter(submit_button,null));\n\t\tadd(submit_button);\n\t\tsubmit_button.setBounds(32, 598, 177, 100);\n\t}", "public void createnewusersubmitbutton( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Create new user button clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"createnewuserbutton\"));\r\n\t\t\tclick(locator_split(\"createnewuserbutton\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- create new user button clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- create new user button is not clicked \"+elementProperties.getProperty(\"createnewuserbutton\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"createnewuserbutton\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "private void displaySubmitButton() {\n RegularButton submitButton = new RegularButton(\"SUBMIT\", 1000, 600);\n submitButton.setOnAction(e -> handleSubmit());\n\n sceneNodes.getChildren().add(submitButton);\n }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "private void buttonInitiation() {\n submit = new JButton(\"Submit\");\n submit.setBounds(105, 250, 90, 25);\n this.add(submit);\n goBack = new JButton(\"Return to Main Menu\");\n goBack.setBounds(205, 250, 200, 25);\n this.add(goBack);\n }", "protected javax.swing.JButton getJButtonNew() {\n\t\tif(jButton2 == null) {\n\t\t\tjButton2 = new javax.swing.JButton();\n\t\t\tjButton2.setPreferredSize(new java.awt.Dimension(85,25));\n\t\t\tjButton2.setMnemonic(java.awt.event.KeyEvent.VK_N);\n\t\t\tjButton2.setName(\"New\");\n\t\t\tjButton2.setText(\"New...\");\n\t\t\tjButton2.setToolTipText(\"Add a new play entry to the list below\");\n\t\t\tjButton2.addActionListener(new java.awt.event.ActionListener() { \n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) { \t\t\t\t\t\n\t\t\t\t\tVideoEntryEditor ed = new VideoEntryEditor(PlayListDialog.this);\n\t\t\t\t\ted.setThemeFiles( getThemeFiles() );\n\t\t\t\t\ted.show();\n\t\t\t\t\t\n\t\t\t\t\tif( ed.getResponse() == JOptionPane.OK_OPTION ) {\n\t\t\t\t\t\tgetTableModel().addRow( ed.getVideoEntry() );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButton2;\n\t}", "protected GuiTestObject nextsubmit() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"nextsubmit\"));\n\t}", "public Submit_Button()\n\t\t\t{\n\t\t\t\tsuper(\"Submit\");\n\n\t\t\t\taddActionListener(new ActionListener()\n\t\t\t\t{\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t\t\t{\n\t\t\t\t\t\tloadText();\n\n\t\t\t\t\t\t// pass ssn input into patient instance to lookup tuple\n\t\t\t\t\t\tPatient p = new Patient(ssn);\n \n String result = p.search(selected_record_type);\n \n String[] values = result.split(\"\\n\");\n \n\t\t\t\t\t\t// create new instance of output panel to display result\n\t\t\t\t\t\tdisplayNewRecordOutput(new Patient_Record_Output(values));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}", "private JButton createButtonAddKeyword() {\n\n JButton btn = new JButton(\"Add Keyword\");\n btn.setEnabled(false);\n btn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (newKeyword(JOptionPane.showInputDialog(\"Insert a Keyword\"))) {\n JOptionPane.showMessageDialog(rootPane, \"Keyword inserted sucessfully!\", \"Sucess\", JOptionPane.PLAIN_MESSAGE);\n }\n\n }\n });\n\n return btn;\n }", "public void clickCreateNewPostBtn() {\n createPostBtn.get(0).click();\n }", "public void createButtonClicked() {\n clearInputFieldStyle();\n setAllFieldsAndSliderDisabled(false);\n setButtonsDisabled(false, true, true);\n setDefaultValues();\n Storage.setSelectedRaceCar(null);\n }", "private void initSubmitBtn() throws IOException{\n\t\tBufferedImage submitBtnImage = ImageLoader.getBufferedImage(SUBMIT_BTN_IMAGE_PATH);\n\t\tsubmitBtn = new ContentPane(submitBtnImage, true, false);\n\t\tsubmitBtn.setName(SUBMIT_BTN_NAME);\n\t\t\n\t\tint windowCenter = (int)(mainWindow.getPreferredSize().getWidth() / 2);\n\t\tint submitBtnCenter = (int)(submitBtn.getPreferredSize().getWidth() / 2);\n\t\tsubmitBtnX = windowCenter - submitBtnCenter;\n\t\tint yOffset = mainWindow.getInsets().top + 10;\n\t\tsubmitBtnY = (int)(mainWindow.getPreferredSize().getHeight()\n\t\t\t\t\t\t\t\t- submitBtn.getPreferredSize().getHeight()) - yOffset;\n\t\t\n\t\tmainWindow.addLayer(submitBtn, BUTTON_LAYER, submitBtnX, submitBtnY);\n\t\tsubmitBtn.registerObserver(this);\n\t}", "protected GuiTestObject button_registerNowsubmit(TestObject anchor, long flags) \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"button_registerNowsubmit\"), anchor, flags);\n\t}", "private void createButton() {\n\t\tbtnAddTask = new JButton(\"Add Task\");\n\t\tbtnSave = new JButton(\"Save\");\n\t\tbtnCancel = new JButton(\"Cancel\");\n\n\t\tbtnAddTask.addActionListener(new ToDoAction());\n\t\tbtnSave.addActionListener(new ToDoAction());\n\t\tbtnCancel.addActionListener(new ToDoAction());\n\t}", "private JButton createButtonAddProduct() {\n\n JButton btn = new JButton(\"Add Product\");\n btn.setEnabled(false);\n btn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n // new NewProductDialog(DemonstrationApplication.this);\n }\n });\n\n return btn;\n }", "public void submit(ActionEvent actionEvent) {\n if(checkFields()) {\n try {\n newStudent = new Student(firstName.getText(), lastName.getText(),birthday.getValue(),selectImage.getImage());\n activities();\n System.out.println(\"new student: \" + newStudent);\n studentList.add(newStudent);\n viewStudent(actionEvent);\n } catch (IllegalArgumentException | IOException e){\n errorDisplay.setText(e.getMessage());\n }\n }\n }", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "private JButton getJButton() {\n\t\tif (new_button == null) {\n\t\t\tnew_button = new JButton();\n\t\t\tnew_button.setText(Locale.getString(\"NEW\"));\n\t\t\tnew_button.setMnemonic(java.awt.event.KeyEvent.VK_N);\n\t\t\tnew_button.addActionListener(new java.awt.event.ActionListener() { \n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) { \n\t\t\t\t\tSystem.out.println(\"actionPerformed()\"); // TODO Auto-generated Event stub actionPerformed()\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn new_button;\n\t}", "HasClickHandlers getCreateNewButton();", "public SelenideElement submitButton() {\n return formPageRoot().$(By.xpath (\"//button[@type='submit']\")); \n }", "private JButton makeNewMazeButton()\n {\n JButton newMaze = new JButton(\"New Maze\");\n newMaze.setToolTipText(\"Create a new maze\");\n newMaze.addActionListener(new ActionListener()\n {\n @Override\n public void actionPerformed(ActionEvent e)\n {\n newMaze();\n }\n });\n return newMaze;\n }", "@Override public void actionPerformed(java.awt.event.ActionEvent arg0) {\n\t\tJButton jb=new JButton();\n\t\t\n\t\tjb=(JButton) arg0.getSource();\n\t\t\n\t\t//TypeOfJob=jtxp1a.getText();\n\t\t\n\t\tif(jb==Submit)\n\t\t{\n\t\tTypeOfJob=(String) Kindofjobs.getSelectedItem();\n\t\tDescription=jtxp1b.getText();\n\t\t\n\t\tDatess=(String) Dates.getSelectedItem();\n\t\tMonthh=(String) Months.getSelectedItem();\n\t\t\n\t\n\t\tKindofjobs.setEnabled(false);\n\t\tjtxp1b.setEnabled(false);\n\t\tDates.setEnabled(false);\n\t\tMonths.setEnabled(false);\n\t\t\n\t\tAdd_Client(this);\n\n\n\t\tif(count==0)\n\t\t{\n\t\t\tcount++;\n\t\t\tcm1.Make_managerp();\n\t\t}\t\n\t\n\n\t}\n\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == submit) {\n int score = answerCheck();\n try {\n Submit submitButton = new Submit(userid, user.getText(), totalScore.getText(), score);\n setVisible(false);\n } catch (SQLException ex) {\n Logger.getLogger(Play.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public PostPO clickOnNewPost() {\n\t\tnewPost.click();\n\t\treturn new PostPO();\n\t}", "public void createActionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\n\t}", "public void addButton(HtmlSubmitButton b) {\r\n\t\t_buttons.add(b);\r\n\t\tadd(b, TYPE_COMP);\r\n\t}", "private JButton getLaunchButton() {\r\n\t\tif (launchButton == null) {\r\n\t\t\tlaunchButton = new JButton();\r\n\t\t\tlaunchButton.setText(Message.getMessage(\"reportmaker.process.label\"));\r\n\t\t\tlaunchButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tReportMakerController.instance.process();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn launchButton;\r\n\t}", "private JButton createAddResourceButton() {\n\n JButton addBtn = new JButton(\"Add\");\n addBtn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n\n List<Resource> resourcesList = controller.getResoucesList();\n\n for (Resource resource : controller.getDemonstration().getResourcesList()) {\n resourcesList.remove(resource);\n }\n\n if (resourcesList.isEmpty()) {\n throw new IllegalArgumentException();\n }\n\n DialogSelectable dialogoNewResource = new DialogSelectable(CreateDemonstrationUI.this, resourcesList, \"Select Resource from list:\");\n Resource selectedResource = (Resource) dialogoNewResource.getSelectedItem();\n if (selectedResource == null) {\n throw new NullPointerException();\n }\n\n if (controller.addResource(selectedResource)) {\n updateResourcesList();\n String successMessage = \"Resource added successfully!\";\n String successTitle = \"Resource added.\";\n\n JOptionPane.showMessageDialog(rootPane, successMessage, successTitle, JOptionPane.INFORMATION_MESSAGE);\n }\n } catch (NullPointerException ex) {\n\n } catch (IllegalArgumentException ex) {\n\n String warningMessage = \"There is no more resources to add\";\n String warningTitle = \"No more resources in system\";\n\n JOptionPane.showMessageDialog(rootPane, warningMessage, warningTitle, JOptionPane.WARNING_MESSAGE);\n\n } catch (Exception ex) {\n\n String warningMessage = \"Something wen't wrong please try again.\";\n String warningTitle = \"ERROR 404\";\n\n JOptionPane.showMessageDialog(rootPane, warningMessage, warningTitle, JOptionPane.WARNING_MESSAGE);\n }\n\n }\n });\n return addBtn;\n }", "Button createButton();", "private JButton getJButtonCrear() {\r\n\t\tif (jButtonCrear == null) {\r\n\t\t\tjButtonCrear = new JButton();\r\n\t\t\tjButtonCrear.setText(BOTONCREAR);\r\n\t\t\tjButtonCrear.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tcrearCuenta();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonCrear;\r\n\t}", "private JButton getSavejButton() {\r\n\t\tif (SavejButton == null) {\r\n\t\t\tSavejButton = new JButton();\r\n\t\t\tSavejButton.setBounds(new Rectangle(88, 228, 120, 120));\r\n\t\t\t\r\n\t\t\tSavejButton.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\r\n\t\t\tSavejButton.setIcon(new ImageIcon(getClass().getResource(\"/sauvegarde.png\")));\r\n\t\t\tSavejButton.setActionCommand(\"Sauvegarde\");\r\n\t\t\tSavejButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t//System.out.println(\"actionPerformed()\"); // TODO Auto-generated Event stub actionPerformed()\r\n\t\t\t\t\tif (e.getActionCommand().equals(\"Sauvegarde\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_Sauvegarde();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn SavejButton;\r\n\t}", "@WebElementLocator(webDesktop = \"//input[@type='submit']\",webPhone = \"//input[@type='submit']\")\n private static WebElement buttonSubmit() {\n return getDriver().findElement(By.xpath(new WebElementLocatorFactory().getLocator(LoginPage.class, \"buttonSubmit\")));\n }", "public DynaForm addButton(Button button) {\n\t\treturn null;\r\n\t}", "private void btnSubmit_click(ActionEvent e) {\n\t\tString subjectName=txtSubjectName.getText();\n\t\tString STATUS=txtSTATUS.getText();\n\n\t\t//为空判断\n\t\tif(SysFun.isNullOrEmpty(subjectName)) {\n\t\t\tlblMsg.setText(\"提示:用户名不得为空!\");\n\t\t\treturn;\n\t\t}\n\t\tif(STATUS==null || STATUS.isEmpty()) {\n\t\t\tlblMsg.setText(\"提示:教室号不得为空!\");\n\t\t\treturn;\n\t\t}\n\t\t\n//\t\tLong or=0L;\n//\t\tif(rdoNo.isSelected()) {\n//\t\t\tor=0L;\n//\t\t}else if(rdoYes.isSelected()) {\n//\t\t\tor=1L;\n//\t\t}\n\n\t\tSubject item=subjectService.loadByName(subjectName);\n\t\t\n\t\tif(item!=null) {\n\t\t\tlblMsg.setText(\"提示:该管理员账号已存在!\");\n\t\t\treturn;\n\t\t}\n\t\tSubject bean=new Subject();\n\t\tbean.setSubjectName(subjectName);\n\t\tbean.setSTATUS(STATUS);\n\t\t\n\t\tLong result=0L;\n\t\tString errMsg=null;\n\t\ttry {\n\t\tresult=subjectService.insert(bean);\n\t\t}catch(Exception ex) {\n\t\t\terrMsg=ex.getMessage();\n\t\t}\n\t\t\n\t\tif(result>0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"添加成功!\");\n\t\t\tif(subjectListFrm!=null) {\n\t\t\t\tsubjectListFrm.btnReset_click(null);\n\t\t\t\tsubjectListFrm.setVisible(true);\n\t\t\t}\n\t\t\tthis.dispose();\n\t\t}else {\n\t\t\tJOptionPane.showMessageDialog(null, \"添加失败!\");\n\t\t}\n\n\t\t\n\t\tif(subjectListFrm!=null) {\n\t\t\tsubjectListFrm.btnReset_click(null); \n\t\t\tsubjectListFrm.setVisible(true);\n\t\t}\n\t\tthis.dispose();\n\t}", "@Override\n public void Submit() {\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == submit) {\n createDog();\n } else if (e.getSource() == goBack) {\n doggyDayCareGui.returnFromMakeDog();\n }\n }", "public static void createButtonSelection(ActionContext actionContext){\n Thing store = actionContext.getObject(\"store\");\n store.doAction(\"openCreateForm\", actionContext);\n }", "public static void pressSubmit(){\n DriverManager.driver.findElement(Constans.SUBMIT_BUTTON_LOCATOR).click();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbtnSubmit_click(e);\n\t\t\t}", "public void newStudentButtonPushed() {\r\n String firstName = firstNameTextField.getText();\r\n String lastName = lastNameTextField.getText();\r\n LocalDate birthdayDate = birthdayDatePicker.getValue();\r\n \r\n // Firts Name Validation\r\n if (firstName != null && (firstName.length() < MIN_CHARS)) {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setTitle(\"Invalid Input\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\r\n \"First Name is not correct \"\r\n + \"(empty name or shorter that three characters)!\");\r\n alert.showAndWait();\r\n \r\n return;\r\n }\r\n \r\n // Last Name Validation\r\n if (lastName != null && (lastName.length() < MIN_CHARS)) {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setTitle(\"Invalid Input\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\r\n \"Last Name is not correct \"\r\n + \"(empty name or shorter that three characters)!\");\r\n alert.showAndWait();\r\n \r\n return;\r\n }\r\n \r\n // Date Validation\r\n if (birthdayDate == null || birthdayDate.isAfter(\r\n LocalDate.now().minusYears(MIN_YEARS_OLD))) {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setTitle(\"Invalid Input\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\r\n \"Date is not correct \"\r\n + \"(empty date or student < 17 years old)!\");\r\n alert.showAndWait();\r\n \r\n return;\r\n }\r\n \r\n // Construct new student\r\n Student newStudent = new Student(firstName, lastName, birthdayDate);\r\n \r\n try {\r\n newStudent = covidMngrService.addStudent(newStudent);\r\n \r\n // Get all the items from the table as a list, then add the \r\n // new student to the list\r\n tableView.getItems().add(newStudent);\r\n } catch (RemoteException ex) {\r\n Logger.getLogger(StudentMainCntrl.class.getName()).\r\n log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void submit() {\n driver.findElement(SUBMIT_SELECTOR).click();\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.submitBtn:\n String merchant = retrieveMerchant();\n String description = retrieveDesc();\n String date = retrieveDate();\n String cost = retrieveCost();\n if (merchant.equals(\"\") || description.equals(\"\") || date.equals(\"\") || cost.equals(\"\")) {\n return;\n }\n Date d = Utils.convertToDate(Utils.getYearFromStr(date), Utils.getMonthFromStr(date), Utils.getDayFromStr(date));\n ContentValues values = Utils.insertEntries(merchant, description, date, d, cost);\n long newRowId = _db.insert(Inventory.InventoryEntry.TABLE_NAME, null, values);\n Intent i = new Intent(AddActivity.this, MainActivity.class);\n startActivity(i);\n }\n }", "public void clickCreateButton() {\n this.action.click(this.createButton);\n }", "private void addButton()\n {\n JButton button = new JButton();\n button.setSize(200, 30);\n button.setName(\"login\");\n button.setAction(new CreateUserAction());\n add(button);\n button.setText(\"Login\");\n }", "public void toggleSubmitButton(){\n switch (mSubmitButton.getText().toString()){\n case \"Submit\":\n mSubmitButton.setText(\"Next\");\n mSubmitButton.setOnClickListener(view -> recreate());\n break;\n case \"Next\":\n mSubmitButton.setText(\"Submit\");\n mSubmitButton.setOnClickListener(view -> mGameController.checkGuess());\n break;\n }\n }", "public void clickSubmitOnly() {\r\n\t\tutilities.clickOnElement(btnSubmit);\r\n\t}", "public void actionPerformed( ActionEvent event )\r\n {\r\n createJButtonActionPerformed( event );\r\n }", "public void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == btnNewButton) {\r\n\t\t\t\t\tnew AddPatronGUI();\t\t\r\n\t\t\t\t\tbuildTable();\r\n\t\t\t\t\talphabetize();\r\n\t\t\t\t}\r\n\t\t\t}", "private JPanel makeButtonPanel()\n {\n // Create the containing panel\n JPanel buttonPanel = new JPanel();\n buttonPanel.setBackground(_backColor);\n\n // Create the CANCEL button\n JButton cancelButton = new JButton(\"CANCEL\");\n // Clear editFlag and data, then return back to main action panel if Cancel is pressed\n // TODO Remove this lambda expressionl; it produces a Javadoc error\n cancelButton.addActionListener((a) -> _hdCiv.back());\n\n // Create the SUBMIT button\n JButton submitButton = new JButton(\"SUBMIT\");\n\n // Display error message if received from submit button, or new Hero if OK\n submitButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent event)\n {\n // Call the Civ to validate the attributes. If no errors, Hero\n // is created and displayed\n EnumMap<PersonKeys, String> input = submit();\n if ((input != null) && (input.size() > 0)) {\n // Create the new Hero and display it\n Hero hero = _nhCiv.createHero(input);\n _hdCiv.displayHero(hero, true); // initial Hero needs true\n }\n }\n });\n\n // Create a little space between buttons\n JLabel space = new JLabel(SPACER);\n // Add the two buttons to the panel\n buttonPanel.add(submitButton);\n buttonPanel.add(space);\n buttonPanel.add(cancelButton);\n return buttonPanel;\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t\tMySQLConnect dal = new MySQLConnect();\r\n\t\t\ttry {\r\n\t\t\t\tString name;\r\n\t\t\t\tString date;\r\n\t\t\t\tString desc;\r\n\t\t\t\tString course;\r\n\t\t\t\tString type;\r\n\t\t\t\tString prior;\r\n\t\t\t\tScanner scan = new Scanner(System.in);\r\n\t\t\t\tSystem.out.println(\"Name: \");\r\n\t\t\t\tname = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Due Date(YYYY-MM-DD): \");\r\n\t\t\t\tdate = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Description: \");\r\n\t\t\t\tdesc = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Course: \");\r\n\t\t\t\tcourse = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Type: \");\r\n\t\t\t\ttype = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Priority: \");\r\n\t\t\t\tprior = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"The following form was added to the database:\");\r\n\t\t\t\tString[] check = dal.addForm(name.toString(),\"admin\",date.toString(),desc.toString(),course.toString(),type.toString(),prior.toString());\r\n\t\t\t\tfor(int i=0; i<check.length; i++){\r\n\t\t\t\t\tSystem.out.print(check[i] + \" \");\r\n\t\t\t\t}\r\n\t\t\t\t//test confirmation that button works\r\n\t\t\t\ttextArea.append(\"Form Submitted!\\n\");\r\n\t\t\t} catch (SQLException ex) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "private JButton getJButtonInto() {\r\n\t\tif (jButtonInto == null) {\r\n\t\t\tjButtonInto = new JButton();\r\n\t\t\tjButtonInto.setMargin(new Insets(2, 5, 2, 5));\r\n\t\t\tjButtonInto.setText(\"数据入库\");\r\n\t\t\tjButtonInto.setBounds(new Rectangle(512, 517, 70, 23));\r\n\t\t\tjButtonInto.addMouseListener(new MouseAdapter() {\r\n\t\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent e) {\r\n\t\t\t\t\tDataIntoGui.this.setVisible(false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonInto;\r\n\t}", "private void createJButtonActionPerformed( ActionEvent event )\r\n {\r\n \r\n }", "@Override\n public void onClick(View v) {\n if(checkEmptyFields()){\n //submit not successful\n }else {\n //add to database\n Toast.makeText(getApplicationContext(), \"Submit Successful\", Toast.LENGTH_SHORT).show();\n }\n }", "public JButton addActionListenerSubmitCourseBtn(JTextField courseNameTxtField, JTextField tuitionTxtField,\n JTextField salaryTxtField, JTextField maxStudentsTxtField) {\n JButton submitNewCourseBtn = new JButton(\"Add Course\");\n submitNewCourseBtn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n HomeApp.playSound(\"src/main/ui/sounds/button-30.wav\");\n try {\n String courseToAddName = courseNameTxtField.getText();\n int courseTuition = Integer.valueOf(tuitionTxtField.getText());\n int courseSalary = Integer.valueOf(salaryTxtField.getText());\n int maxStudents = Integer.valueOf(maxStudentsTxtField.getText());\n\n if (isValid(courseTuition, courseSalary, maxStudents)) {\n addCourseDecreaseMethodSize(courseToAddName, courseTuition, courseSalary, maxStudents);\n new CoursesApp(mySchool);\n frame.dispose();\n } else {\n JOptionPane.showMessageDialog(frame, \"Please enter valid positive integers.\");\n }\n } catch (Exception f) {\n JOptionPane.showMessageDialog(frame, \"Please enter valid inputs.\");\n }\n }\n });\n return submitNewCourseBtn;\n }", "private JButton getJButton() {\r\n\t\tif (jButton == null) {\r\n\t\t\tjButton = new JButton();\r\n\t\t\tjButton.setEnabled(false);\r\n\t\t\tjButton.setBounds(new Rectangle(150, 294, 73, 17));\r\n\t\t\tjButton.setText(\"Select\");\r\n\t\t\tjButton.addActionListener(new java.awt.event.ActionListener() {\r\n\r\n\t\t\t\t\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tJFileChooser selecFile = new JFileChooser();\r\n\t\t\t\t\tselecFile.addChoosableFileFilter(new BiclusterResultsFilter());\r\n\t\t\t\t\tselecFile.setCurrentDirectory(new File(defaultPath));\r\n\t\t\t\t\tint returnval = selecFile.showSaveDialog((Component)e.getSource());\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(returnval == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\t\t\tresultsFile = selecFile.getSelectedFile();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButton;\r\n\t}", "private JButton getJButtonCrearCuentaAdmin() {\r\n\t\tif (jButtonCrearCuentaAdmin == null) {\r\n\t\t\tjButtonCrearCuentaAdmin = new JButton();\r\n\t\t\tjButtonCrearCuentaAdmin.setText(BOTONCREARADMIN);\r\n\t\t\tjButtonCrearCuentaAdmin\r\n\t\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t\t\tcrearAdmin();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonCrearCuentaAdmin;\r\n\t}", "public void addButton()\n\t{\n\t\tdriver.findElement(By.xpath(\"//input[@name='Insert']\")).click();\n\t}", "private Component updateButton(){\n return updatePersonButton = new Button(\"updateButton\"){\n @Override\n public void onSubmit() {\n super.onSubmit();\n }\n };\n }", "public void selectSubmitButton() {\n\t\tel = Browser.getDriver().findElement(element_submit_button);\n\t\tuihelper.click(el);\n\t}", "public static void click_SubmitButton() {\n\t\tboolean bstatus;\n\n\t\tbstatus = clickElement(btn_Submit);\n\t\tReporter.log(bstatus, \"Submit Button is clicked\", \"Submit Button not clicked\");\n\n\t\t\n\t}", "private JButton createButton(final Box addTo, final String label) {\n JButton button = new JButton(label);\n button.setActionCommand(label);\n button.addActionListener(this);\n addTo.add(button);\n return button;\n }", "private JButton createBookButton() {\n\t\tfinal JButton bookButton = new JButton(\"Create Booking\");\n\n\t\tbookButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\n\t\t\t\thandleBooking();\n\t\t\t}\n\t\t});\n\n\t\treturn bookButton;\n\t}", "private JButton getAddButton() {\n if (addButton == null) {\n addButton = new JButton();\n addButton.setText(\"Add User\");\n addButton.setIcon(PortalLookAndFeel.getAddIcon());\n addButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n addUser();\n }\n });\n }\n return addButton;\n }", "public void saveAndCreateNew() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"saveAndCreateNewButton\").click();\n\t}", "@SuppressWarnings({ \"serial\" })\n\tprivate void newTaskButtonHandler(Button NewTaskButton)\n\t{\n\t\tif (editable)\n\t\t{\n\t\t\tNewTaskButton.addListener(new Button.ClickListener()\n\t\t\t {\n\t\t\t\t@Override\n\t\t\t\tpublic void buttonClick(com.vaadin.ui.Button.ClickEvent event) \n\t\t\t\t{\n\t\t\t\t\terrorMessages.setVisible(false);\n\t\t\t\t\tTask emptytask=new Task(--counter, project.getProjectID(), null,null, null,null,null,false, null,null, 1, null,null, \"\",\"\") ;\n\t\t\t\t\tViewEditTaskWindow wind=new ViewEditTaskWindow(\"New Task\",emptytask,true,container,table,taskManager,db,project,thisobject) ;\n\t\t\t\t\tsetProject();\n\t\t\t\t\twind.center();\n\t\t\t\t\tUI.getCurrent().addWindow(wind);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tNewTaskButton.setEnabled(false);\n\t\t}\n\t}", "private void btnPostActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnPostActionPerformed\n {//GEN-HEADEREND:event_btnPostActionPerformed\n // TODO add your handling code here:\n String name = txtName.getText();\n String message = txtMessage.getText();\n \n if (name.equals(\"\"))\n { \n JOptionPane.showMessageDialog(null, \"Please enter a name!\");\n }\n else if (message.equals(\"\"))\n {\n JOptionPane.showMessageDialog(null, \"Please enter a message!\");\n }\n else\n {\n try\n {\n db.insertEntry(name, message);\n txtName.setText(\"\");\n txtMessage.setText(\"Entry added to guestbook!\");\n } catch (SQLException ex)\n {\n Logger.getLogger(EntryForm.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void clickOnCreateButton() {\n\t\twaitForElement(createButton);\n\t\tclickOn(createButton);\n\t}", "private JButton getJButtonCreateSql() {\r\n\t\tif (jButtonCreateSql == null) {\r\n\t\t\tjButtonCreateSql = new JButton();\r\n\t\t\tjButtonCreateSql.setBounds(new Rectangle(569, 86, 75, 23));\r\n\t\t\tjButtonCreateSql.setMargin(new Insets(2, 5, 2, 5));\r\n\t\t\tjButtonCreateSql.setText(\"生成SQL\");\r\n\t\t\tjButtonCreateSql.addMouseListener(new MouseAdapter() {\r\n\t\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent e) {\r\n\t\t\t\t\tString savePath = jTextFieldSqlPath.getText();\r\n\t\t\t\t\tString dataFolder = jLabelDataDir.getText();\r\n\t\t\t\t\tString charset = jTextFieldCharset.getText();\r\n\t\t\t\t\tString fileName = DateUtil.formatDateTime(new Date());\r\n\t\t\t\t\tFileSystemUtil fsu = new FileSystemUtil();\r\n\t\t\t\t\tFile sqlFile = new File(savePath + fileName + \".sql\");\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t//生成SQL语句\r\n\t\t\t\t\t\tString sql = dbLogic.createSql\r\n\t\t\t\t\t\t\t(dataFolder, jTextAreaData.getText(),DataIntoGui.this.dataNum,charset);\r\n\t\t\t\t\t\tfsu.writeText(sql, sqlFile,charset);\r\n\t\t\t\t\t\tDialogUtil.showMessage(DataIntoGui.this, \"成功输出到文件!\\r\\n\" + sqlFile.getAbsolutePath());\r\n\t\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\tDialogUtil.showError(DataIntoGui.this, \"输出到文件错误!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonCreateSql;\r\n\t}", "private JButton getAddQuantityCardButton() {\n\t\tif (addQuantityCardButton == null) {\n\t\t\taddQuantityCardButton = new JButton();\n\t\t\taddQuantityCardButton.setText(\"Добавить\");\n\t\t\taddQuantityCardButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tDefaultListModel model = (DefaultListModel) functionList.getModel();\n\t\t\t\t\tParseElement el = new ParseElement((ListElement) cardType.getSelectedItem(), (String)condition.getSelectedItem(), (String)value.getSelectedItem());\n\n\t\t\t\t\t((DefaultListModel) functionList.getModel()).add(model.getSize(), el);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn addQuantityCardButton;\n\t}", "private void initCreateDeckBtn() {\n createBtn = new Button((editWidth - 310) / 2, 400, \"CREATE NEW DECK\", MasterGUI.green, titleField.getWidth(), titleField.getHeight());\n createBtn.setFont(MasterGUI.poppinsFont);\n createBtn.setForeground(MasterGUI.white);\n createBtn.setContentAreaFilled(true);\n createBtn.setFocusPainted(false);\n ActionListener createAction = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n createDeckFromInput();\n user.updateDeckList();\n repaintDeckCards();\n HomeView.repaintHomeView();\n }\n };\n createBtn.addActionListener(e -> {\n MainGUI.confirmDialog(createAction, \"Create new Deck?\");\n });\n editPanel.add(createBtn);\n }", "private void onClickSaveButton() {\n // Validate and save form\n if (mDynamicForm.validate()) {\n triggerSubmitForm(mDynamicForm.getForm().getAction(), mDynamicForm.save());\n }\n }", "public void submitInfoButton(View v) {\n //each entry needs a unique ID\n Business newBusiness = new Business();\n String newKey = appState.firebaseReference.push().getKey();\n newBusiness.setName(nameField.getText().toString());\n newBusiness.setPrimaryBusiness(primaryBusinessField.getText().toString());\n newBusiness.setBusinessNumber(numberField.getText().toString());\n newBusiness.setAddress(addressField.getText().toString());\n newBusiness.setProvince(provinceField.getSelectedItem().toString());\n\n appState.firebaseReference.child(newKey).setValue(newBusiness,\n new DatabaseReference.CompletionListener(){\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference){\n if(databaseError != null){\n Toast toast = Toast.makeText(appState, \"Error: Creation failed!\",\n Toast.LENGTH_LONG);\n toast.show();\n } else {\n finish();\n Toast toast = Toast.makeText(appState, \"Business entry created\",\n Toast.LENGTH_LONG);\n toast.show();\n }\n }\n });\n }", "public void makeSaveButton() {\r\n JButton save = new JButton(\"Save account details\");\r\n new Button(save, main);\r\n// save.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// save.setPreferredSize(new Dimension(2500, 100));\r\n// save.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n save.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n saveAccounts();\r\n displayMessage(\"Accounts saved to file\");\r\n }\r\n });\r\n// main.add(save);\r\n }", "public void submitButtonPushed() throws IOException {\n\n if (vehicleRegistration.getText().isEmpty() || driverLicense.getText().isEmpty()\n || insuranceProvider.getText().isEmpty() || insuranceNumber.getText().isEmpty()) {\n\n Validator.errorBox(\"Incorrect Info\",\n \"Please Enter Valid Information\");\n\n } else {\n\n Stage stage = main.MainLogin.getPrimaryStage();\n\n Parent signInParent = FXMLLoader.load(getClass()\n .getResource(\"/backgroundcheck/BackGroundCheck.fxml\"));\n\n stage.setScene(new Scene(signInParent));\n\n stage.show();\n }\n }", "protected JButton createAddButton() {\n JButton butAdd = new JButton();\n butAdd.setIcon(new ImageIcon(getClass().getClassLoader().getResource(\"image/add.jpg\")));\n butAdd.setToolTipText(\"Add a new item\");\n butAdd.addActionListener(new AddItemListener());\n return butAdd;\n }", "private void promptNewIndexFile()\n {\n JPanel message = new JPanel(new GridLayout(2, 1));\n JLabel messageLabel = new JLabel(\"Enter name for new index database\");\n JPanel defaultWrapper = new JPanel();\n JLabel defaultLabel = new JLabel(\"Make this the default index? \");\n JCheckBox makeDefault = new JCheckBox(); \n \n defaultWrapper.add(defaultLabel);\n defaultWrapper.add(makeDefault);\n message.add(defaultWrapper);\n message.add(messageLabel);\n \n String fileName = JOptionPane.showInputDialog(null, message, \"Create new index file\", JOptionPane.OK_CANCEL_OPTION);\n if(fileName != null && !fileName.equalsIgnoreCase(\"\"))\n {\n spider.setIndexer(Indexer.createIndexer(\"data/\" + fileName + \".db\"));\n searchEngine.setIndexer(spider.getIndexer());\n \n if(makeDefault.isSelected())\n {\n spider.getConfig().setDatabaseFile(\"data/\" + fileName + \".db\");\n spider.updateConfig();\n }\n }\n }", "public MainPage submitForm() {\n LOGGER.info(\"Clicked the button 'LOGIN'\");\n clickOnElement(loginButtonLocator);\n return MainPage.Instance;\n }", "private void actionNewProject ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDataController.scenarioNewProject();\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES);\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_ON);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View detected samples\");\r\n\r\n\t\t\tmainFormLink.reset();\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "void addButton_actionPerformed(ActionEvent e) {\n addButton();\n }", "private JButton getJButtonSaveInto() {\r\n\t\tif (jButtonSaveInto == null) {\r\n\t\t\tjButtonSaveInto = new JButton();\r\n\t\t\tjButtonSaveInto.setMargin(new Insets(2, 5, 2, 5));\r\n\t\t\tjButtonSaveInto.setBounds(new Rectangle(589, 517, 70, 23));\r\n\t\t\tjButtonSaveInto.setText(\"保存配置\");\r\n\t\t\tjButtonSaveInto.addMouseListener(new MouseAdapter() {\r\n\t\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent e) {\r\n\t\t\t\t\tString cfgName = (String)jComboBoxConfigName.getSelectedItem();\r\n\t\t\t\t\tString sqlTmplt = jTextAreaData.getText();\r\n\t\t\t\t\tString sqlPath = jTextFieldSqlPath.getText();\r\n\t\t\t\t\tString charset = jTextFieldCharset.getText();\r\n\t\t\t\t\tString url = jTextFieldConStr.getText();\r\n\t\t\t\t\tString user = jTextFieldUser.getText();\r\n\t\t\t\t\tString pass = new String(jTextFieldPasswd.getPassword());\r\n\t\t\t\t\t\r\n\t\t\t\t\tDbConfig dbcfgs = ConfigLogic.getDbConfig();\r\n\t\t\t\t\tif(dbcfgs.getConfigs() == null){\r\n\t\t\t\t\t\tdbcfgs.setConfigs(new ArrayList<DatabaseConfig>());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tDatabaseConfig dbCfg = (DatabaseConfig)CommonLogic.getByName(dbcfgs.getConfigs(), cfgName);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(dbCfg == null){\r\n\t\t\t\t\t\tdbCfg = new DatabaseConfig();\r\n\t\t\t\t\t\tdbcfgs.getConfigs().add(dbCfg);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tdbCfg.setName(cfgName);\r\n\t\t\t\t\tdbCfg.setSqlTmplt(sqlTmplt);\r\n\t\t\t\t\tdbCfg.setSqlPath(sqlPath);\r\n\t\t\t\t\tdbCfg.setSqlEncode(charset);\r\n\t\t\t\t\tdbCfg.setUrl(url);\r\n\t\t\t\t\tdbCfg.setUsername(user);\r\n\t\t\t\t\tdbCfg.setPassword(pass);\r\n\r\n\t\t\t\t\tConfigLogic.saveDbConfig();\r\n\t\t\t\t\tDataIntoGui.this.setVisible(false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonSaveInto;\r\n\t}", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n\t \t\n\t \tboolean custCreated = createCustomer();\n\t \t\n\t \t\t\n\t \tif(custCreated){\n\t \t\tdispose();\n\t \t\thome home = new home(cust);\n\t \t\thome.setLocationRelativeTo(null);\n\t \t\thome.setVisible(true);\n\t \t}\n\t \t\n\t \t\n\t }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\taddOrUpdate();\n\t\t\t}", "public TeacherPage submit() {\n clickSaveButton();\n return this;\n }", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "public void submit()\n\t{\n\t\tString trackCsv = trackCsvInput.getText();\n\t\tString trackName = trackNameInput.getText();\n\t\t\n\t\tRadioButton selectedButton = (RadioButton) toggleColors.getSelectedToggle();\n\t\tString color = selectedButton.getText().toUpperCase();\n\t\t\n\t\tif (addTrack(trackName, trackCsv, color)) \n\t\t{\n\t\t\tStage currStage = (Stage) trackCsvInput.getScene().getWindow();\n\t\t\tcurrStage.close();\n\t\t\tCTC.ctcController.displayTrack();\n\t\t\tCTC.ctcController.displayLegend();\n\t\t}\n\t\telse\n\t\t\terrorMessage.setVisible(true);\n\t}", "private void showSubmitBtn(){\n\t\tmainWindow.addLayer(submitBtn, BUTTON_LAYER, submitBtnX, submitBtnY);\n\t}", "public WebElement SubmitBtn() {\n\t\treturn driver.findElement(Subbtn);\n\t}", "FORM createFORM();", "public void clickSubmitButton(){\n actionsWithOurElements.clickOnElement(buttonSubmit);\n }", "private void onClickButtonSaveAndCreateAnother() {\n if (onClickButtonSave()) {\n startActivity(getIntent());\n }\n }", "private void onNew() {\r\n\t\tnewPark.setOnAction(e -> {\r\n\t\t\tif (inAction.booleanValue() == false) {\r\n\t\t\t\tinAction = true;\r\n\t\t\t\tVBox vbox = new VBox();\r\n\t\t\t\tLabel popLabel = new Label(\"This will delete your current work. Do you want to save?\");\r\n\t\t\t\tdoIt = new Button(\"Proceed\");\r\n\t\t\t\tpopLabel.setFont(Font.font(\"Calibri\",20));\r\n\t\t\t\t\r\n\t\t\t\tvbox.getChildren().addAll(popLabel, doIt);\r\n\t\t\t\tvbox.setAlignment(Pos.CENTER);\r\n\t\t\t\tvbox.setSpacing(20);\r\n\t\r\n\t\t\t\tStage popStage = new Stage();\r\n\t\t\t\tpopStage.setAlwaysOnTop(true);\r\n\t\t\t\tpopStage.setTitle(\"WARNING\");\r\n\t\t\t\tScene popScene = new Scene(vbox, 500, 100);\r\n\t\t\t\tpopStage.setScene(popScene);\r\n\t\t\t\tpopStage.showAndWait();\r\n\t\t\t\tinAction = false;\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private JButton addButton(String name) {\n JButton button = new JButton(name);\n button.setActionCommand(name);\n buttonsPanel.add(button);\n return button;\n }", "private void newTodo() {\r\n String myTodoName = \"Unknown\";\r\n for (Component component : panelSelectFile.getComponents()) {\r\n if (component instanceof JTextField) {\r\n if (component.getName().equals(\"Name\")) {\r\n JTextField textFieldName = (JTextField) component;\r\n myTodoName = textFieldName.getText();\r\n }\r\n }\r\n }\r\n if (myTodoName == null || myTodoName.isEmpty()) {\r\n JOptionPane.showMessageDialog(null, \"New Todo List name not entered!\");\r\n return;\r\n }\r\n myTodo = new MyTodoList(myTodoName);\r\n int reply = JOptionPane.showConfirmDialog(null, \"Do you want to save this todoList?\",\r\n \"Save New Todolist\", JOptionPane.YES_NO_OPTION);\r\n if (reply == JOptionPane.YES_OPTION) {\r\n saveTodo();\r\n }\r\n fileName = null;\r\n todoListGui();\r\n }", "protected JButton addAddButton(String legend) {\n if (legend != null) {\n AddButton.setText(legend);\n }\n AddButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n EditModel.insertRecord(BottomRow + 1);\n validate();\n repaint();\n }\n });\n AddButton.setEnabled(true);\n return AddButton;\n }", "public View() {\n initComponents();\n this.setTitle(\"Pet Registration\");\n this.setLocationRelativeTo(null);\n this.getRootPane().setDefaultButton(submitButton);\n this.setVisible(true);\n }", "public void addButton(int i, HtmlSubmitButton b) {\r\n _buttons.add(i,b);\r\n add(b, TYPE_COMP);\r\n\r\n }", "private void newNetworkDialogCreateButton(){\n //Create new networkData object here based on the field info\n LabData.NetworkData newNetworkData = new LabData.NetworkData(\n NetworkAddDialogNameTextfield.getText().toUpperCase(),\n NetworkAddDialogMaskTextfield.getText(),\n NetworkAddDialogGatewayTextfield.getText(),\n (int)NetworkAddDialogMacVLanExtSpinner.getValue(),\n (int)NetworkAddDialogMacVLanSpinner.getValue(),\n NetworkAddDialogIPRangeTextfield.getText(),\n NetworkAddDialogTapRadioButton.isSelected()\n );\n \n // Update the list of labs in the current UI data object\n labDataCurrent.getNetworks().add(newNetworkData);\n \n // Add the network into the UI \n addNetworkPanel(newNetworkData);\n \n // Update the Container Config dialogs to include the new network\n updateNetworkReferenceInContainerConfigDialogs(\"Add\", NetworkAddDialogNameTextfield.getText().toUpperCase(), null);\n }", "private JButton getJButton1() {\r\n\t\tif (jButton1 == null) {\r\n\t\t\tjButton1 = new JButton();\r\n\t\t\tjButton1.setBounds(new Rectangle(38, 176, 124, 30));\r\n\t\t\tjButton1.setText(\"Add\");\r\n\t\t\tjButton1.setBackground(new Color(0, 204, 0));\r\n\t\t\tjButton1.setVisible(false);\r\n\t\t\tjButton1.setEnabled(false);\r\n\t\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tString s=jTextField.getText();\r\n\t\t\t\t\tif(!validate1(s)) jTextArea.setText(\"Invalide word\");\r\n\t\t\t\t\tif(s.length()>0 && validate1(s))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(jTextArea.getText().length()>0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tload.myMap.put(s,s+\" =\"+jTextArea.getText());\r\n\t\t\t\t\t\t\t//Note. we put in the file whith space followed by \"=\"\r\n\t\t\t\t\t\t\tload.writeInFile(\"Dictionary.txt\",s+\" =\"+jTextArea.getText());\r\n\t\t\t\t\t\t\tjTextArea.setText(\"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse jTextArea.setText(\"Invalide explanations\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\tjTextArea.setText(\"Invalide word\");\r\n\t\t\t\t\tjTextField.setText(\"\");\r\n\t\t\t\t\t//jTextArea.setText(\"\");\r\n\t\t\t\t\tjTextArea.setEditable(false);\r\n\t\t\t\t\tjButton.setEnabled(true);\r\n\t\t\t\t\tjButton2.setEnabled(true);\r\n\t\t\t\t\tjButton1.setEnabled(false);\r\n\t\t\t\t\tjButton1.setVisible(false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButton1;\r\n\t}", "private JButton getJButton() {\r\n\t\tif (jButton == null) {\r\n\t\t\tjButton = new JButton();\r\n\t\t\tjButton.setBounds(new Rectangle(37, 122, 124, 32));\r\n\t\t\tjButton.setBackground(new Color(0, 204, 51));\r\n\t\t\tjButton.setText(\"Search\");\r\n\t\t\tjButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e)\r\n\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tjTextArea.setText(\"\");\r\n\t\t\t\t\tString s=jTextField.getText();\r\n\t\t\t\t\tboolean ok=validate(s);\r\n\t\t\t\t\tif(!ok) jTextArea.setText(\"Sorry. No records for '\"+s+\"'.\");\r\n\t\t\t\t\tif(s.length()>0 && ok)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString text;\r\n\t\t\t\t\t\ttext=(String)load.myMap.searchMatchesInMap(s);\r\n\t\t\t\t\t\tjTextArea.setEditable(true);\r\n\t\t\t\t\t\tif(text.compareTo(\"\")!=0)\t\t\t\t\t\r\n\t\t\t\t\t\t\tjTextArea.setText(text);\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\tjTextArea.setText(\"Sorry. No records for '\"+s+\"'.\");\r\n\t\t\t\t\t\tjTextArea.setEditable(false);\r\n\t\t\t\t\t\tjTextField.setText(\"\");\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 jButton;\r\n\t}" ]
[ "0.6550181", "0.64455765", "0.6312057", "0.6266784", "0.6231017", "0.6202274", "0.6174703", "0.6144365", "0.61223555", "0.60255855", "0.6005689", "0.59722674", "0.59345156", "0.59266937", "0.5924303", "0.591166", "0.58900225", "0.58856314", "0.58796775", "0.58704174", "0.586728", "0.58579355", "0.58290505", "0.5778912", "0.57749295", "0.57741886", "0.57223415", "0.5720495", "0.5719361", "0.57064474", "0.5688607", "0.5685006", "0.5682628", "0.5674992", "0.56617063", "0.5650285", "0.56472796", "0.5645472", "0.56436574", "0.56436145", "0.56409305", "0.56208664", "0.5612821", "0.5611455", "0.5574774", "0.55725336", "0.5566645", "0.55661356", "0.5550829", "0.55502415", "0.55498254", "0.5538806", "0.5529932", "0.55269796", "0.5517564", "0.55166435", "0.5512772", "0.5506056", "0.54955107", "0.5494001", "0.548369", "0.545972", "0.545939", "0.54556704", "0.54547423", "0.5450128", "0.54469615", "0.5434448", "0.54264873", "0.5421459", "0.54151475", "0.5414127", "0.5413189", "0.54088396", "0.5403197", "0.54022133", "0.54006886", "0.54006815", "0.5399837", "0.53971094", "0.5391723", "0.5390564", "0.53905046", "0.53885853", "0.53758615", "0.5375151", "0.53733855", "0.5371111", "0.5368467", "0.53507364", "0.53403705", "0.53381914", "0.53246677", "0.5322859", "0.5318882", "0.5291291", "0.5286603", "0.5277215", "0.52764297", "0.52752024", "0.5266115" ]
0.0
-1
Constructor for customized single uploaders.
public SingleUploader(IUploadStatus status, Button button) { this(status, button, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SingleUploader() {\n this(null);\n }", "public Uploader() {\n super();\n }", "public SingleUploader(IUploadStatus status) {\n this(status, new Button());\n }", "public UploadManager() {\n }", "public UploadSvl() {\r\n\t\tsuper();\r\n\t}", "public CompleteMultipartUploadRequest() {}", "public UploadTest() {\n super();\n setMargin(false);\n this.addComponent(uploader);\n uploader.addListener((Upload.SucceededListener) this);\n\n\n }", "public FileUploadHelper() throws IOException {\n //For using dynamic path\n }", "public S3_Upload_Image() {super(TAG);}", "public UploadedFile() {\n date = new Date();\n }", "public FileUploadService()\r\n\t{\r\n\t\tsetAccessKey(\"\");\r\n\t\tsetSecretKey(\"\");\r\n\t\tsetBucket(\"filehavendata\");\r\n\t\tdoRefreshConnection();\r\n\t}", "public interface Uploader extends BandwidthTracker {\n\n\tpublic static final int CONNECTING = 0;\n\tpublic static final int FREELOADER = 1;\n\tpublic static final int LIMIT_REACHED = 2;\n\tpublic static final int UPLOADING = 3;\n\tpublic static final int COMPLETE = 4;\n\tpublic static final int INTERRUPTED = 5;\n\tpublic static final int FILE_NOT_FOUND = 7;\n public static final int BROWSE_HOST = 8;\n public static final int QUEUED = 9;\n public static final int UPDATE_FILE = 10;\n public static final int MALFORMED_REQUEST = 11;\n public static final int PUSH_PROXY = 12;\n public static final int UNAVAILABLE_RANGE = 13;\n public static final int BANNED_GREEDY \t = 14;\n public static final int THEX_REQUEST = 15;\n public static final int BROWSER_CONTROL = 16;\n public static final int NOT_VALIDATED = 17;\n\n /**\n\t * Stops this upload. If the download is already \n\t * stopped, it does nothing.\n\t */ \n\tpublic void stop();\n \n\t/**\n\t * returns the name of the file being uploaded.\n\t */\n\tpublic String getFileName();\n\t\n\t/**\n\t * returns the length of the file being uploaded.\n\t */ \n\tpublic long getFileSize();\n\t\n\t/**\n\t * returns the length of the requested size for uploading\n\t */ \n\tpublic long getAmountRequested();\t\n\n\t/**\n\t * Returns the <tt>FileDesc</tt> for this uploader -- the file that\n\t * is being uploaded.\n\t *\n\t * @return the <tt>FileDesc</tt> for this uploader -- the file that\n\t * is being uploaded, which can be <tt>null</tt> in cases such as when\n\t * the file can't be found\n\t */\n\tpublic FileDesc getFileDesc();\n\n\t/**\n\t * returns the index of the file being uploaded.\n\t */ \n\tpublic int getIndex();\n\n\t/**\n\t * returns the amount that of data that has been uploaded.\n\t * this method was previously called \"amountRead\", but the\n\t * name was changed to make more sense.\n\t */ \n\tpublic long amountUploaded();\n\t\n\t/**\n\t * Returns the amount of data that this uploader and all previous\n\t * uploaders exchanging this file have uploaded.\n\t */\n\tpublic long getTotalAmountUploaded();\n\n\t/**\n\t * returns the string representation of the IP Address\n\t * of the host being uploaded to.\n\t */\n\tpublic String getHost();\n\n /**\n * Returns the current state of this uploader.\n */\n public int getState();\n \n /**\n * Returns the last transfer state of this uploader.\n * Transfers states are all states except INTERRUPTED, COMPLETE,\n * and CONNECTING.\n */\n public int getLastTransferState();\n\n\t/**\n\t * Sets the state of this uploader.\n\t */\n\tpublic void setState(int state);\n\n\tpublic void writeResponse() throws IOException;\n\n\t/**\n\t * returns true if chat for the host is on, false if it is not.\n\t */\n\tpublic boolean isChatEnabled();\n\t\n\t/**\n\t * returns true if browse host is enabled, false if it is not.\n\t */\n\tpublic boolean isBrowseHostEnabled();\n\t\n\t/**\n\t * return the port of the gnutella-client host (not the HTTP port)\n\t */\n\tpublic int getGnutellaPort();\n\t\n\t/** \n\t * return the userAgent\n\t */\n\tpublic String getUserAgent();\n\t\n\t/** \n\t * return whether or not the headers have been parsed\n\t */\n\tpublic boolean isHeaderParsed();\n\n public boolean supportsQueueing();\n \n /**\n * returns the current request method.\n */\n public HTTPRequestMethod getMethod();\n \n /**\n * Returns the current queue position if queued.\n */\n public int getQueuePosition();\n \n /**\n * Returns whether or not the uploader is in an inactive state.\n */\n public boolean isInactive();\n}", "@Override\n protected void upload(X x) {\n }", "public UploadPDF() {\n }", "public MultiPart(){}", "@Autowired\n public UploadHandlerImpl(UploadFolderProperties properties,\n FileHandler fileHandler, UploadUtil uploadUtil) {\n this.fileHandler = fileHandler;\n this.uploadFolder = properties.getUploadFolder();\n this.uploadUtil = uploadUtil;\n }", "public interface Uploader {\n\n public String upload(String filePath, String fileName);\n}", "public MultipartHolder(List<File> files, MediaType fileMediaType, E payload) {\n\t\tthis.filesToSend = files;\n\t\tthis.payload = payload;\n\t\tthis.fileMediaType = fileMediaType;\n\t}", "public Onlineupload() {\n initComponents();\n }", "public MimeMultipart() {\n/* 163 */ this(\"mixed\");\n/* */ }", "public DefaultStorage() {\n }", "public Photo() {\n\t\tthis(UUID.randomUUID().toString() + \".jpg\");\n\t}", "private FileManager() {}", "public handleFileUpload() {\r\n\t\tsuper();\r\n\t}", "public FileSet() {\n super();\n }", "public FilePlugin()\n {\n super();\n \n //create the data directory if it doesn't exist\n File dataDir = new File(FilenameUtils.dataDir);\n if(!dataDir.exists()) FilePersistenceUtils.makeDirs(dataDir);\n }", "UploadInfo simpleUpload(SimpleFile file);", "public ExternalFileMgrImpl()\r\n \t{\r\n \t\t\r\n \t}", "public FileDicomBaseInner() {}", "public fileServer() {\n }", "public FileUploadServlet() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "@Override\n public boolean configure(StaplerRequest req, JSONObject formData) throws FormException {\n req.bindParameters(this, \"ArtifactUploader\");\n return super.configure(req, formData);\n }", "private SimpleAttachment() {\n }", "public FileManager() {\n\t\t\n\t}", "public Model(Controller controller)\r\n {\r\n // initialise instance variables\r\n setFiles(new ArrayList<>());\r\n setController(controller);\r\n }", "public UploadOperation(DropboxAccess srv, String f, long pid, long fid) {\n super(srv, pid, fid);\n file = new File(f);\n }", "public ActionFile() {\n }", "public FileObject() {\n\t}", "public ProfileUploadHelper() throws IOException {}", "public StorageConfig() {\n }", "public Generic(){\n\t\tthis(null);\n\t}", "public UploadOperation(DropboxAccess srv, File f, long pid, long fid) {\n super(srv, pid, fid);\n file = new File(f.getPath());\n }", "static ServletFileUpload createUpload() {\n DiskFileItemFactory diskFileItemFactory = new DiskFileItemFactory();\n diskFileItemFactory.setSizeThreshold(MEM_MAX_SIZE);\n ServletFileUpload upload = new ServletFileUpload(diskFileItemFactory);\n upload.setSizeMax(FILE_MAX_SIZE);\n return upload;\n }", "@Override\n public Resource init() throws ResourceInstantiationException {\n\n // based on info from\n // http://www.iana.org/assignments/media-types/application/fastinfoset\n\n // Register XML mime type\n MimeType mime = new MimeType(\"application\", \"fastinfoset\");\n\n // Register the class handler for this mime type\n mimeString2ClassHandlerMap.put(mime.getType() + \"/\" + mime.getSubtype(),\n this);\n\n // Register the mime type with mine string\n mimeString2mimeTypeMap.put(mime.getType() + \"/\" + mime.getSubtype(), mime);\n\n // Register file sufixes for this mime type\n suffixes2mimeTypeMap.put(\"finf\", mime);\n\n // Register magic numbers for this mime type\n // this should be E0 00 00 01\n // but I can't seem to get it to work\n\n // Set the mimeType for this language resource\n setMimeType(mime);\n\n return this;\n }", "public Storage() {\n\n }", "private FileUtil() {\n \t\tsuper();\n \t}", "public FileServ() {\n\t\tsuper();\n\t}", "public StatDataFileReaderSpi(\n String vendorName,\n String version,\n String[] names,\n String[] suffixes,\n String[] MIMETypes,\n String readerClassName) {\n super(vendorName,\n version,\n names,\n suffixes,\n MIMETypes,\n readerClassName);\n dbgLog.fine(\"StatDataFileReaderSpi is called\");\n }", "public BasicLoader() {\n }", "private ImageLoader() {}", "public void startUpload() {\n if (this.uploadURL == null) {\n throw new IllegalStateException(\n \"The 'startUpload()' method was invoked before the uploader URL was provided. \"\n + \"Please call the 'setUploadURL' first.\"\n );\n }\n\n if (this.nativeFilesQueued.size() > 0) {\n JavaScriptObject nativeFile = this.nativeFilesQueued.get(0);\n\n // Initialize properties on Start\n nativeSetProperty(nativeFile, \"startTime\", System.currentTimeMillis());\n nativeSetProperty(nativeFile, \"timeSinceLastEvent\", System.currentTimeMillis());\n\n //need to keep our global stats up to date manually\n nativeSetProperty(getStats(), IN_PROGRESS, 1);\n\n //we need to fire it manually for the Ajax/XMLHttpRequest Level 2 case\n nativeUpdateFileProperties(nativeFile, File.Status.IN_PROGRESS.toInt());\n if (this.uploadStartHandler != null) {\n this.uploadStartHandler.onUploadStart(new UploadStartEvent(nativeFile.<File>cast()));\n }\n\n // Let any registered progress handlers know that we're starting at the beginning\n uploadProgressEventCallback(nativeFile.<File>cast(), 0.0,\n nativeFile.<File>cast().getSize());\n\n this.lastXMLHttpRequest =\n nativeStartAjaxUpload(nativeFile, this.ajaxUploadURL != null ? this.ajaxUploadURL : this.uploadURL,\n this.filePostName != null ? this.filePostName : \"Filedata\",\n this.postParams != null ? this.postParams.getJavaScriptObject() : null,\n this.httpHeaders != null ? this.httpHeaders.getJavaScriptObject() : null\n );\n }\n }", "public Files(String authToken){\n\t\tthis.authToken = authToken;\n\t}", "public void uploadObject() {\n\n\t}", "public BlobFilterDetails() {\n }", "public StorageConfiguration() {\n }", "public GenericDelegatorLoader() {\n this(null, null);\n }", "public FileBasedConfigSource() {\n // Intentionally empty.\n }", "public SimpleFileFilter() {\n\n this(null, false);\n }", "@Override\n public Notifier newInstance(StaplerRequest req, JSONObject formData) {\n String[] pregEx = req.getParameterValues(\"artifactuploader.patternsRegEx\");\n String[] pAnt = req.getParameterValues(\"artifactuploader.patternsAnt\");\n String[] pregExExc = req.getParameterValues(\"artifactuploader.patternsRegExExc\");\n String[] pAntExc = req.getParameterValues(\"artifactuploader.patternsAntExc\");\n String pType = Values.textOrElse(req.getParameter(\"artifactuploader.patternType\"), null);\n if (pType == null) {\n // Some versions of Jenkins rename the f:radioBlock's request parameter, but the formData JSON is named correctly.\n JSONObject radioBlock = formData.getJSONObject(\"patternType\");\n if (radioBlock != null) {\n pType = radioBlock.getString(\"value\");\n }\n }\n if (pType == null) {\n // Fallback value.\n pType = \"regEx\";\n }\n\n boolean fTip = Values.booleanOrElse(req.getParameter(\"artifactuploader.forceCheckIn\"), false);\n boolean fMerge = Values.booleanOrElse(req.getParameter(\"artifactuploader.forceTip\"), false);\n\n String oPart = Values.textOrElse(req.getParameter(\"artifactuploader.owningPart\"), null);\n boolean fAsSlave = Values.booleanOrElse(req.getParameter(\"artifactuploader.forceAsSlave\"), false);\n\n return new ArtifactUploader(pregEx, fTip, fMerge, oPart, fAsSlave, pType, pAnt, pregExExc, pAntExc);\n }", "public MonitoredMultiPartRequest(HttpServletRequest request, String saveDir, int maxSize) {\r\n \tsuper(request, saveDir, maxSize);\r\n }", "@Override\n public void setMultipartConfig(MultipartConfigElement elem) {\n }", "public MakePlugin() {\n super(\n new ExerciseBuilder(),\n new StudentFileAwareSubmissionProcessor(),\n new StudentFileAwareZipper(),\n new StudentFileAwareUnzipper());\n this.makeUtils = new MakeUtils();\n }", "private SingleObject(){}", "public void initializeFrom(WidgetDefinition definition) throws Exception {\n super.initializeFrom(definition);\n\n if (!(definition instanceof UploadDefinition)) {\n throw new FormsException(\"Ancestor definition \" + definition.getClass().getName() + \" is not an UploadDefinition.\",\n getLocation());\n }\n\n UploadDefinition other = (UploadDefinition) definition;\n\n this.required = other.required;\n this.mimeTypes = other.mimeTypes;\n this.listener = WidgetEventMulticaster.add(this.listener, other.listener);\n }", "public CompareSkusFormHandler() {\n }", "public FilePanel() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public FilesDatatype(String mime, String type) {\n\t\tsuper(Type.FILES, mime, type);\n\t}", "public SourceFieldMapper() {\n\t\tthis(Defaults.NAME, Defaults.ENABLED, Defaults.FORMAT, null, -1, Defaults.INCLUDES, Defaults.EXCLUDES);\n\t}", "public UploadForm() {\n initComponents();\n }", "public FileIOManager() {\n\t\tthis.reader = new Reader(this);\n\t\tthis.writer = new Writer(this);\n\t}", "@Override\n public void initialize(Map<String, Param> params) throws TikaConfigException {\n //params have already been set...ignore them\n //TODO -- add other params to the builder as needed\n storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService();\n }", "public StorageForm() {\n}", "private FileUtility() {\r\n\t}", "public FileBean() {}", "public PDFConversionImageHandler() {\r\n\t\tsuper(null, true);\r\n\t}", "public GenericHandler() {\n\n }", "private ShifuFileUtils() {\n }", "protected FileSystem() {\n\t}", "public ImageExtractor(String filename, RtpTypeRepository typeRepository)\r\n throws UnsupportedFormatException, IOException {\r\n super(filename,typeRepository);\r\n processor = new SimpleProcessor(getFormat(), new RGBFormat(null,\r\n Format.NOT_SPECIFIED, // maxDataLength\r\n Format.intArray, // type\r\n Format.NOT_SPECIFIED,\r\n 32, // bpp\r\n Format.NOT_SPECIFIED, Format.NOT_SPECIFIED,\r\n Format.NOT_SPECIFIED, // masks\r\n Format.NOT_SPECIFIED, Format.NOT_SPECIFIED, // strides\r\n RGBFormat.FALSE, // flipped\r\n Format.NOT_SPECIFIED)); // endian);\r\n }", "public FileObjectFactory() {\n }", "public Media() {\n\t}", "public StorageResource() {\n }", "public TFileListTransferable() {\n\t\tFList = null;\n\t\tFAMtArray = null;\n\t\tflavors = new DataFlavor[] { DataFlavor.javaFileListFlavor,\n\t\t\t\tTAMtFileListFlavor };\n\t}", "public SimplePreset(int cameraId) {\n super(cameraId);\n }", "public GenericSettingsController(Class<T> settingsClass, String settingsFileName) {\n this.settingsClass = settingsClass;\n this.settingsFileName = settingsFileName;\n gsonObject = new GsonBuilder().setPrettyPrinting().create();\n }", "public void setFileUpload(FileUpload fileUpload) {\r\n this.fileUpload = fileUpload;\r\n }", "private void addFileUploadField() {\n FileUpload upload = new FileUpload();\n upload.setName(\"fileUpload\" + i);\n fileUploadPanel.add(upload);\n i++;\n }", "public FileUploadThreadHTTP(FileData[] filesDataParam,\n UploadPolicy uploadPolicy, JProgressBar progress) {\n super(filesDataParam, uploadPolicy, progress);\n uploadPolicy.displayDebug(\"Upload done by using the \"\n + getClass().getName() + \" class\", 40);\n // Name the thread (useful for debugging)\n setName(\"FileUploadThreadHTTP\");\n this.heads = new String[filesDataParam.length];\n this.tails = new String[filesDataParam.length];\n }", "public BlobName() {}", "public FileUploadView(BrowserDriver browserDriver) {\n fileUploadContainer = PageFactory.initElements(browserDriver.getCurrentDriver(), FileUploadContainer.class);\n }", "private FSArquivo(Construtor construtor) {\n nome = construtor.nome;\n tipoMedia = construtor.tipoMedia;\n base = construtor.base;\n prefixo = construtor.prefixo;\n sufixo = construtor.sufixo;\n }", "public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}", "public FileHandlerImpl(){\n\t\tfilepath = null;\n\t}", "public Towers() {\n\t\tthis(DEFAULT_SIZE);\n\t}", "public Photo(String fileName){\n\tthis.fileName=fileName;\n}", "public ChunkFiler(SubFiler _filer) throws Exception {\n filer = _filer;\n }", "public entities.Torrent.UploadRequest.Builder getUploadRequestBuilder() {\n\n onChanged();\n return getUploadRequestFieldBuilder().getBuilder();\n }", "public Picture(String fileName)\n {\n // let the parent class handle this fileName\n super(fileName);\n }", "public Picture(String fileName)\n {\n // let the parent class handle this fileName\n super(fileName);\n }", "protected FileMessage(MessageWireType wireId) {\n super(wireId);\n }" ]
[ "0.7929994", "0.7099889", "0.6891133", "0.6644051", "0.64785653", "0.6132109", "0.57241184", "0.56131536", "0.5558317", "0.5540391", "0.5533989", "0.5503787", "0.5488352", "0.5443487", "0.54114395", "0.54102004", "0.5397561", "0.536557", "0.5358645", "0.53519106", "0.5310913", "0.52817005", "0.523808", "0.52201015", "0.52129686", "0.5198093", "0.5174144", "0.5170935", "0.51682574", "0.5135734", "0.51319456", "0.5108448", "0.51059335", "0.510281", "0.5100345", "0.50993603", "0.50957686", "0.5088252", "0.5082442", "0.5059727", "0.5052194", "0.505029", "0.5049817", "0.50469697", "0.50354797", "0.50334704", "0.5031404", "0.5031103", "0.5026381", "0.50201", "0.501789", "0.5000424", "0.49882102", "0.49880412", "0.49786755", "0.4975298", "0.49720302", "0.49709886", "0.4966072", "0.4958803", "0.4957815", "0.49538755", "0.49529138", "0.49525344", "0.49485528", "0.4942427", "0.4940019", "0.49384388", "0.4935765", "0.4933462", "0.49247876", "0.4920664", "0.4918755", "0.49182087", "0.49163947", "0.49154174", "0.49144068", "0.49121135", "0.49066785", "0.49059907", "0.49020514", "0.4900622", "0.48889455", "0.48868182", "0.48864406", "0.48847634", "0.48763442", "0.48703033", "0.4863696", "0.48386413", "0.48272237", "0.48185688", "0.48181593", "0.48100057", "0.48056078", "0.47961318", "0.47954756", "0.47925478", "0.47925478", "0.4791728" ]
0.680895
3
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.add_visiting_place, 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
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.7904669", "0.78062934", "0.77666116", "0.7727495", "0.7631956", "0.7622029", "0.75855523", "0.7530999", "0.7488249", "0.74583405", "0.74583405", "0.74391454", "0.742199", "0.7403733", "0.73921114", "0.7387281", "0.73795027", "0.73708874", "0.7363864", "0.7356251", "0.73459506", "0.7342001", "0.73306113", "0.73286015", "0.7326429", "0.73191065", "0.7317039", "0.7313901", "0.73044896", "0.73044896", "0.7301832", "0.7298614", "0.72935665", "0.7286882", "0.72838604", "0.7281134", "0.7279026", "0.7260287", "0.72602856", "0.72602856", "0.72602856", "0.72597146", "0.7250437", "0.7224467", "0.7219954", "0.7217789", "0.7204917", "0.7200529", "0.72004616", "0.71939325", "0.71854734", "0.71783715", "0.7169028", "0.7168044", "0.7154098", "0.715406", "0.7136618", "0.7135388", "0.7135388", "0.71293885", "0.7129296", "0.71248746", "0.71238405", "0.71236056", "0.7122437", "0.71178895", "0.7117577", "0.7117577", "0.7117577", "0.7117577", "0.7117551", "0.7117253", "0.7115515", "0.7112961", "0.7110418", "0.7109445", "0.7106109", "0.710037", "0.7098831", "0.70961183", "0.7094036", "0.7094036", "0.7086734", "0.7083463", "0.7081277", "0.70808643", "0.7073911", "0.70687914", "0.70622855", "0.70609766", "0.7060495", "0.7051786", "0.7037978", "0.7037978", "0.7036548", "0.70358485", "0.70358485", "0.70334274", "0.7031107", "0.70302725", "0.70190936" ]
0.0
-1
/ Uri method to get image file path
@SuppressWarnings("deprecation") public String getPath(Uri uri) { String[] projection = { MediaStore.Images.Media.DATA }; Cursor cursor = managedQuery(uri, projection, null, null, null); int column_index = cursor .getColumnIndexOrThrow(MediaStore.Images.Media.DATA); cursor.moveToFirst(); return cursor.getString(column_index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPictureUri();", "java.lang.String getImagePath();", "String getImagePath();", "String getImagePath();", "public abstract String getFotoPath();", "@SuppressLint(\"SimpleDateFormat\")\n public Uri getOutputImageFileUri(Context ctx) {\n\n String tstamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File file = new File(getTempDirectoryPath(ctx), \"IMG_\" + tstamp + \".jpg\");\n\n return Uri.fromFile(file);\n\n }", "private Uri getImageUri(String path) {\n return Uri.fromFile(new File(path));\n }", "public String getPath(Uri uri) {\n\t\tString[] projection = { MediaColumns.DATA };\n\t\tCursor cursor = managedQuery(uri, projection, null, null, null);\n\t\tcolumn_index = cursor\n\t\t.getColumnIndexOrThrow(MediaColumns.DATA);\n\t\tcursor.moveToFirst();\n\t\timagePath = cursor.getString(column_index);\n\t\treturn cursor.getString(column_index);\n\t\t\n\t}", "public static String getRealPathFromURI(Context context, Uri uri){\n Cursor cursor = null;\n String filePath = \"\";\n\n if (Build.VERSION.SDK_INT < 19) {\n // On Android Jelly Bean\n\n // Taken from https://stackoverflow.com/questions/3401579/get-filename-and-path-from-uri-from-mediastore\n try {\n String[] proj = { MediaStore.Images.Media.DATA };\n cursor = context.getContentResolver().query(uri, proj, null, null, null);\n int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n cursor.moveToFirst();\n filePath = cursor.getString(column_index);\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n } else {\n // On Android KitKat+\n\n // Taken from http://hmkcode.com/android-display-selected-image-and-its-real-path/\n String wholeID = DocumentsContract.getDocumentId(uri);\n\n // Split at colon, use second item in the array\n String id = wholeID.split(\":\")[1];\n\n String[] column = {MediaStore.Images.Media.DATA};\n\n // Where id is equal to\n String sel = MediaStore.Images.Media._ID + \"=?\";\n\n cursor = context.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,\n column, sel, new String[]{id}, null);\n\n int columnIndex = cursor.getColumnIndex(column[0]);\n\n if (cursor.moveToFirst()) {\n filePath = cursor.getString(columnIndex);\n }\n cursor.close();\n }\n return filePath;\n }", "public static String get_path_from_URI(Context context, Uri uri) {\r\n String result;\r\n Cursor cursor = context.getContentResolver().query(uri, null, null, null, null);\r\n if (cursor == null) {\r\n result = uri.getPath();\r\n } else {\r\n cursor.moveToFirst();\r\n int idx = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA);\r\n result = cursor.getString(idx);\r\n cursor.close();\r\n }\r\n return result;\r\n }", "private Uri getPicOutputUri(){\n String filePath = getExternalFilesDir(Environment.DIRECTORY_PICTURES) + File.separator + String.valueOf(System.currentTimeMillis())+\".jpg\";\n return Uri.fromFile(new File(filePath));\n }", "java.lang.String getResourceUri();", "public static String getRealPathFromURI(Context context, Uri contentUri) {\n// Log.i(\"\", \"getRealPathFromURI \" + (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT));\n\n// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n// // Will return \"image:x*\"\n// String wholeID = DocumentsContract.getDocumentId(contentUri);\n//\n// // Split at colon, use second item in the array\n// String id = wholeID.split(\":\")[1];\n//\n// String[] column = {MediaStore.Images.Media.DATA};\n//\n// // where id is equal to\n// String sel = MediaStore.Images.Media._ID + \"=?\";\n//\n// Cursor cursor = context.getContentResolver().\n// query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,\n// column, sel, new String[]{id}, null);\n//\n// String filePath = \"\";\n//\n// int columnIndex = cursor.getColumnIndex(column[0]);\n//\n// if (cursor.moveToFirst()) {\n// filePath = cursor.getString(columnIndex);\n//\n// return filePath;\n// }\n//\n// cursor.close();\n//\n// return null;\n// } else {\n Cursor cursor = null;\n try {\n String[] proj = {MediaColumns.DATA};\n cursor = context.getContentResolver().query(contentUri, proj, null,\n null, null);\n\n if (cursor != null) {\n int column_index = cursor.getColumnIndexOrThrow(MediaColumns.DATA);\n cursor.moveToFirst();\n return cursor.getString(column_index);\n } else\n return null;\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n// }\n }", "public String getPath(Uri uri) {\r\n // just some safety built in \r\n if( uri == null ) {\r\n // TODO perform some logging or show user feedback\r\n return null;\r\n }\r\n // try to retrieve the image from the media store first\r\n // this will only work for images selected from gallery\r\n String[] projection = { MediaStore.Images.Media.DATA };\r\n Cursor cursor = managedQuery(uri, projection, null, null, null);\r\n if( cursor != null ){\r\n int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\r\n cursor.moveToFirst();\r\n return cursor.getString(column_index);\r\n }\r\n // this is our fallback here\r\n return uri.getPath();\r\n }", "public Uri getImageFileUri()\n {\n imagePath = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"Tuxuri\");\n Log.d(tag, \"Find \" + imagePath.getAbsolutePath());\n\n\n if (! imagePath.exists())\n {\n if (! imagePath.mkdirs())\n {\n Log.d(\"CameraTestIntent\", \"failed to create directory\");\n return null;\n }else{\n Log.d(tag,\"create new Tux folder\");\n }\n }\n\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File image = new File(imagePath,\"TUX_\"+ timeStamp + \".jpg\");\n file = image;\n name = file.getName();\n path = imagePath;\n\n\n if(!image.exists())\n {\n try {\n image.createNewFile();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n return Uri.fromFile(image);\n }", "public static String getRealFilePath( final Context context, final Uri uri ) {\n\n if ( null == uri ) return null;\n\n final String scheme = uri.getScheme();\n String data = null;\n\n if ( scheme == null )\n data = uri.getPath();\n else if ( ContentResolver.SCHEME_FILE.equals( scheme ) ) {\n data = uri.getPath();\n } else if ( ContentResolver.SCHEME_CONTENT.equals( scheme ) ) {\n Cursor cursor = context.getContentResolver().query( uri, new String[] { Images.ImageColumns.DATA }, null, null, null );\n if ( null != cursor ) {\n if ( cursor.moveToFirst() ) {\n int index = cursor.getColumnIndex( Images.ImageColumns.DATA );\n if ( index > -1 ) {\n data = cursor.getString( index );\n }\n }\n cursor.close();\n }\n }\n return data;\n }", "public static Uri getPhotoUri() {\n Logger.d(TAG, \"getPhotoUri() entry\");\n Cursor cursor = null;\n int imageId = 0;\n try {\n cursor =\n mContext.getContentResolver().query(\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, null, null, null);\n cursor.moveToFirst();\n imageId = cursor.getInt(cursor.getColumnIndex(MediaStore.Images.ImageColumns._ID));\n } finally {\n if (cursor != null) {\n cursor.close();\n cursor = null;\n }\n }\n Uri photoUri = Uri.parse(PREFER_PHOTO_URI + imageId);\n Logger.d(TAG, \"getPhotoUri() exit with the uri \" + photoUri);\n return photoUri;\n }", "private String getImagePath(@Nullable Intent data) {\n Uri selectedImage = Objects.requireNonNull(data).getData();\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n Cursor cursor = getContentResolver().query(Objects.requireNonNull(selectedImage), filePathColumn,\n null, null, null);\n Objects.requireNonNull(cursor).moveToFirst();\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n\n String imagePath = cursor.getString(columnIndex);\n cursor.close();\n return imagePath;\n }", "public void getImagePath(String imagePath);", "private String getRealPathFromURI(Uri contentUri) {\n String[] proj = {MediaStore.Images.Media.DATA};\n CursorLoader loader = new CursorLoader(this, contentUri, proj, null, null, null);\n Cursor cursor = loader.loadInBackground();\n int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n cursor.moveToFirst();\n String result = cursor.getString(column_index);\n cursor.close();\n return result;\n }", "abstract public String imageUrl ();", "private static String getRealPathFromUri(Context context, Uri contentUri) {\n String[] proj = { MediaStore.Images.Media.DATA };\n try(Cursor cursor = context.getContentResolver().query(contentUri, proj, null, null, null)) {\n int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n cursor.moveToFirst();\n return cursor.getString(column_index);\n }\n }", "public static String getRealFilePathFromUri(final Context context, final Uri uri) {\n if (null == uri) return null;\n final String scheme = uri.getScheme();\n String data = null;\n if (scheme == null)\n data = uri.getPath();\n else if (ContentResolver.SCHEME_FILE.equals(scheme)) {\n data = uri.getPath();\n } else if (ContentResolver.SCHEME_CONTENT.equals(scheme)) {\n Cursor cursor = context.getContentResolver().query(uri, new String[]{MediaStore.Images.ImageColumns.DATA}, null, null, null);\n if (null != cursor) {\n if (cursor.moveToFirst()) {\n int index = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA);\n if (index > -1) {\n data = cursor.getString(index);\n }\n }\n cursor.close();\n }\n }\n return data;\n }", "public String getPath(Uri uri) {\n Cursor cursor = getContentResolver().query(uri, null, null, null, null);\n assert cursor != null;\n cursor.moveToFirst();\n String document_id = cursor.getString(0);\n document_id = document_id.substring(document_id.lastIndexOf(\":\") + 1);\n cursor.close();\n\n cursor = getContentResolver().query(\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI,\n null, MediaStore.Images.Media._ID + \" = ? \", new String[]{document_id}, null);\n assert cursor != null;\n cursor.moveToFirst();\n String path = cursor.getString(cursor.getColumnIndex(MediaStore.Images.Media.DATA));\n cursor.close();\n\n return path;\n }", "public String getPath(Uri uri) {\n Cursor cursor = getActivity().getContentResolver().query(uri, null, null, null, null);\n cursor.moveToFirst();\n String document_id = cursor.getString(0);\n document_id = document_id.substring(document_id.lastIndexOf(\":\") + 1);\n cursor.close();\n cursor = getActivity().getContentResolver().query(\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI,\n null, MediaStore.Images.Media._ID + \" = ? \", new String[]{document_id}, null);\n cursor.moveToFirst();\n String path = cursor.getString(cursor.getColumnIndex(MediaStore.Images.Media.DATA));\n cursor.close();\n return path;\n }", "public java.lang.String getImagePath() {\n java.lang.Object ref = imagePath_;\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 imagePath_ = s;\n }\n return s;\n }\n }", "public String getPath(Uri uri) {\n Cursor cursor = getContentResolver().query(uri, null, null, null, null);\n cursor.moveToFirst();\n String document_id = cursor.getString(0);\n document_id = document_id.substring(document_id.lastIndexOf(\":\") + 1);\n cursor.close();\n\n cursor = getContentResolver()\n .query(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null,\n MediaStore.Images.Media._ID + \" = ? \", new String[]{document_id}, null);\n cursor.moveToFirst();\n String path = cursor.getString(cursor.getColumnIndex(MediaStore.Images.Media.DATA));\n cursor.close();\n\n return path;\n }", "public String getPath(Uri uri) {\n Cursor cursor = getContentResolver().query(uri, null, null, null, null);\n cursor.moveToFirst();\n String document_id = cursor.getString(0);\n document_id = document_id.substring(document_id.lastIndexOf(\":\") + 1);\n cursor.close();\n\n cursor = getContentResolver().query(\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI,\n null, MediaStore.Images.Media._ID + \" = ? \", new String[]{document_id}, null);\n cursor.moveToFirst();\n String path = cursor.getString(cursor.getColumnIndex(MediaStore.Images.Media.DATA));\n cursor.close();\n\n return path;\n }", "public String getPath(Uri uri) {\n if( uri == null ) {\n // TODO perform some logging or show user feedback\n Log.d(\"null\",\"Uri_null\");\n return null;\n }\n // try to retrieve the image from the media store first\n // this will only work for images selected from gallery\n String[] projection = { MediaStore.Images.Media.DATA };\n Cursor cursor = managedQuery(uri, projection, null, null, null);\n if( cursor != null ){\n int column_index = cursor\n .getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n cursor.moveToFirst();\n String path = cursor.getString(column_index);\n cursor.close();\n return path;\n }\n // this is our fallback here\n return uri.getPath();\n }", "public String getImageResource() {\n \t\t// if (isWindows)\n \t\t// return \"/\" + new File(imageResource).getPath();\n \t\t// else\n \t\treturn imageResource;\n \t}", "public String getPath(Uri uri) {\n if( uri == null ) {\n // TODO perform some logging or show user feedback\n return null;\n }\n // try to retrieve the image from the media store first\n // this will only work for images selected from gallery\n String[] projection = { MediaStore.Images.Media.DATA };\n Cursor cursor = managedQuery(uri, projection, null, null, null);\n if( cursor != null ){\n int column_index = cursor\n .getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n cursor.moveToFirst();\n return cursor.getString(column_index);\n }\n // this is our fallback here\n return uri.getPath();\n }", "private String getMediaPathFromUri(final Uri uri) {\n\t\t\tString[] projection = { MediaStore.Images.Media.DATA };\n\t\t\tCursor cursor = managedQuery(uri, projection, null, null, null);\n\t\t\tcursor.moveToFirst();\n\t\t\treturn cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA));\n\t\t}", "@Override\n public String getImagePath() {\n return IMAGE_PATH;\n }", "public String getPath(Uri uri) {\n if (uri == null) {\n // TODO perform some logging or show user feedback\n return null;\n }\n // try to retrieve the image from the media store first\n // this will only work for images selected from gallery\n String[] projection = {MediaStore.Images.Media.DATA};\n Cursor cursor = ((Activity) context).managedQuery(uri, projection, null, null, null);\n if (cursor != null) {\n int column_index = cursor\n .getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n cursor.moveToFirst();\n return cursor.getString(column_index);\n }\n // this is our fallback here\n return uri.getPath();\n }", "public String getRealPathFromURI(Uri contentUri) {\r\n String[] proj = {\"*\"};\r\n Cursor cursor = managedQuery(contentUri, proj, null, null, null);\r\n int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\r\n cursor.moveToFirst();\r\n return cursor.getString(column_index);\r\n }", "public String getURI() {\n if (filePath == null) {\n return null;\n }\n int ind = filePath.lastIndexOf(\"/\");\n if (ind != -1) {\n //int ind2 = filePath.substring(0, ind-1).lastIndexOf(\"/\");\n //if (ind2 != -1)\n // return filePath.substring(ind2+1, filePath.length());\n return filePath.substring(ind+1, filePath.length());\n }\n\n return new File(filePath).getName();\n }", "java.lang.String getUri();", "java.lang.String getUri();", "public Uri getImageURI() {\n return mImageURI;\n }", "public abstract String getResUri();", "String getUri();", "public static String getPhotoPath(Intent data, Context mContext) {\n Uri selectedImage = data.getData();\n String[] filePathColumn = { MediaStore.Images.Media.DATA };\n Cursor cursor = mContext.getContentResolver().query(selectedImage, filePathColumn, null, null, null);\n cursor.moveToFirst();\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n String mCurrentPhotoPath = cursor.getString(columnIndex);\n cursor.close();\n\n return mCurrentPhotoPath;\n }", "public static Uri createImageUri() {\n \t\tUri imageFileUri;\n \t\tString folder = Environment.getExternalStorageDirectory()\n \t\t\t\t.getAbsolutePath() + \"/tmp\";\n \t\tFile folderF = new File(folder);\n \t\tif (!folderF.exists()) {\n \t\t\tfolderF.mkdir();\n \t\t}\n \n \t\tString imageFilePath = folder + \"/\"\n \t\t\t\t+ String.valueOf(System.currentTimeMillis()) + \"jpg\";\n \t\tFile imageFile = new File(imageFilePath);\n \t\timageFileUri = Uri.fromFile(imageFile);\n \n \t\treturn imageFileUri;\n \t}", "java.lang.String getImage();", "public static String getPath() {\n\t\t// Lấy đường dẫn link\n\t\tAuthentication auth1 = SecurityContextHolder.getContext().getAuthentication();\n\t\tAgentconnection cus = (Agentconnection) auth1.getPrincipal();\n\t\t \n\t\t//String PATH_STRING_REAL = fileStorageProperties.getUploadDir()+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t String PATH_STRING_REAL = \"E:/ezcloud/upload/\"+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t return PATH_STRING_REAL;\n\t}", "public java.lang.String getPhotoUri() {\n return localPhotoUri;\n }", "public java.lang.String getImagePath() {\n java.lang.Object ref = imagePath_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n imagePath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Uri getImageUri() {\n return mImageUri;\n }", "public String getRealPathFromURI(Context context, Uri contentUri) {\n Cursor cursor = null;\n try {\n String[] proj = {MediaStore.Images.Media.DATA};\n cursor = context.getContentResolver().query(contentUri, proj, null, null, null);\n int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n cursor.moveToFirst();\n return cursor.getString(column_index);\n\n }catch (IllegalArgumentException e){\n Log.e(\"getRealPathFromURI()\",\"IllegalArgumentException\");\n return null;\n }catch (NullPointerException e){\n Log.e(\"getRealPathFromURI()\",\"IllegalArgumentException\");\n return null;\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n }", "public java.lang.String getPictureUri() {\n java.lang.Object ref = pictureUri_;\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 pictureUri_ = s;\n }\n return s;\n }\n }", "String getUri( );", "public String getPathFromURI(Uri contentUri) {\n String res = null;\n String[] proj = {MediaStore.Images.Media.DATA};\n Cursor cursor = getContentResolver().query(contentUri, proj, null, null, null);\n if (cursor.moveToFirst()) {\n int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n res = cursor.getString(column_index);\n }\n cursor.close();\n return res;\n }", "java.lang.String getPackageImageURL();", "public java.lang.String getPictureUri() {\n java.lang.Object ref = pictureUri_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n pictureUri_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "abstract String getUri();", "public static String getImageResoucesPath() {\n\t\t//return \"d:\\\\PBC\\\\GitHub\\\\Theia\\\\portal\\\\WebContent\\\\images\";\n\t\treturn \"/Users/anaswhb/Documents/Eclipse/Workspace/portal/WebContent/images\";\n\t\t\n\t}", "String getBaseUri();", "public String getRealPathFromURI(Context context, Uri contentUri) {\n Cursor cursor = null;\n try {\n String[] proj = {MediaStore.Images.Media.DATA};\n cursor = context.getContentResolver().query(contentUri, proj, null, null, null);\n int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n cursor.moveToFirst();\n return cursor.getString(column_index);\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n }", "public String getUri();", "URI getMediaURI();", "public String getRealPathFromUri(Uri contentUri) {\n Cursor cursor = null;\n try {\n String[] proj = {MediaStore.Images.Media.DATA};\n cursor = getContentResolver().query(contentUri, proj, null, null, null);\n assert cursor != null;\n int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n cursor.moveToFirst();\n return cursor.getString(column_index);\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n }", "public String getImagePath() {\n\t\treturn mPath;\n\t}", "static String getFilePath(URI uri) throws Exception {\n\n\t\tString uriPath = uri.getPath();\n\t\tif (uriPath == null || uriPath.length() == 0) {\n\t\t\tthrow new Exception(\"getFilePath error: provided uri (\" + uri.toString() + \") contains no path component\");\n\t\t}\n\n\t\tString path = uri.toString();\n\t\tif (path.length() > 4 && path.substring(0, 5).equals(\"file:\"))\n\t\t\tpath = path.substring(5);\n\t\t/*\n\t\t * Pattern filePat = Pattern.compile(\"file:/[/]*(.*)\"); Matcher m =\n\t\t * filePat.matcher(uri.toString()); if (m.find()) { // prtln (\"pattern found: \"\n\t\t * + m.group(1)); path = \"/\" + m.group(1); } else { prtln(\"pattern not found\");\n\t\t * }\n\t\t */\n\t\treturn path;\n\t}", "String getImage();", "com.google.protobuf.ByteString\n getPictureUriBytes();", "public String getImage() {\n\t\tString ans=\"Data/NF.png\";\n\t\tif(image!=null)\n\t\t\tans=\"Data/Users/Pics/\"+image;\n\t\treturn ans;\n\t}", "public String getImagePath() {\n return thumbnail.path + \".\" + thumbnail.extension;\n }", "URI getUri();", "public String getPhotoFileUri(String fileName) {\n // Only continue if the SD Card is mounted\n if (isExternalStorageAvailable()) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(\n getExternalFilesDir(Environment.DIRECTORY_PICTURES), APP_TAG);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(APP_TAG, \"failed to create directory\");\n }\n\n // Return the file target for the photo based on filename\n return mediaStorageDir.getPath()+File.separator+fileName+\".JPG\";\n }\n return null;\n }", "SafeUri getDefaultImageUri();", "public String getPhotoUrl() {\n try {\n ParseFile pic = fetchIfNeeded().getParseFile(\"pic\");\n return pic.getUrl();\n }\n catch (ParseException e) {\n Log.d(TAG, \"Error in getting photo from Parse: \" + e);\n return null;\n }\n }", "private String getPathFromUri(Uri uri) {\n\n String path = \"\";\n\n String[] projection = {MediaColumns.DATA};\n Cursor cursor = getContentResolver().query(uri, projection, null, null, null);\n\n try {\n int column_index = cursor.getColumnIndexOrThrow(MediaColumns.DATA);\n if (cursor.moveToFirst()) {\n path = cursor.getString(column_index);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n cursor.close();\n\n return path;\n }", "public String getPath();", "public String getPath();", "public String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}", "public static String getRealPathFromURI(Context context, Uri contentURI) {\n String result = null;\n Cursor cursor = context.getContentResolver().query(contentURI,\n null, null, null, null);\n if (cursor != null) {\n cursor.moveToFirst();\n int idx = cursor\n .getColumnIndex(MediaStore.Images.ImageColumns.DATA);\n result = cursor.getString(idx);\n cursor.close();\n }\n return result;\n }", "public static String getPath(Context context, Uri uri) {\n String string;\n boolean bl = Build.VERSION.SDK_INT >= 19;\n if (bl && DocumentsContract.isDocumentUri((Context)context, (Uri)uri)) {\n Uri uri2;\n if (BikinFileActivity.isExternalStorageDocument(uri)) {\n String[] arrstring = DocumentsContract.getDocumentId((Uri)uri).split(\":\");\n boolean bl2 = \"primary\".equalsIgnoreCase(arrstring[0]);\n string = null;\n if (!bl2) return string;\n return (Object)Environment.getExternalStorageDirectory() + \"/\" + arrstring[1];\n }\n if (BikinFileActivity.isDownloadsDocument(uri)) {\n String string2 = DocumentsContract.getDocumentId((Uri)uri);\n return BikinFileActivity.getDataColumn(context, ContentUris.withAppendedId((Uri)Uri.parse((String)\"content://downloads/public_downloads\"), (long)Long.valueOf((String)string2)), null, null);\n }\n boolean bl3 = BikinFileActivity.isMediaDocument(uri);\n string = null;\n if (!bl3) return string;\n String[] arrstring = DocumentsContract.getDocumentId((Uri)uri).split(\":\");\n String string3 = arrstring[0];\n if (\"image\".equals((Object)string3)) {\n uri2 = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;\n } else if (\"video\".equals((Object)string3)) {\n uri2 = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;\n } else {\n boolean bl4 = \"audio\".equals((Object)string3);\n uri2 = null;\n if (bl4) {\n uri2 = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;\n }\n }\n String[] arrstring2 = new String[]{arrstring[1]};\n return BikinFileActivity.getDataColumn(context, uri2, \"_id=?\", arrstring2);\n }\n if (\"content\".equalsIgnoreCase(uri.getScheme())) {\n if (!BikinFileActivity.isGooglePhotosUri(uri)) return BikinFileActivity.getDataColumn(context, uri, null, null);\n return uri.getLastPathSegment();\n }\n boolean bl5 = \"file\".equalsIgnoreCase(uri.getScheme());\n string = null;\n if (!bl5) return string;\n return uri.getPath();\n }", "public abstract String getFullPath();", "@Override\r\n public String getPath() {\r\n if (VFS.isUriStyle()) {\r\n return absPath + getUriTrailer();\r\n }\r\n return absPath;\r\n }", "Uri getAvatarUrl();", "@TargetApi(Build.VERSION_CODES.LOLLIPOP)\n public Uri getLocalBitmapUri() {\n Drawable drawable = getResources().getDrawable(R.drawable.rp_icon3);\n Bitmap bmp = null;\n// bmp =Utility.user.getProfilePic();\n\n if (drawable instanceof BitmapDrawable){\n bmp = ((BitmapDrawable) getResources().getDrawable(R.drawable.rp_icon3)).getBitmap();\n }\n else\n {\n return null;\n }\n // Store image to default external storage directory\n Uri bmpUri = null;\n try {\n\n File file = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOWNLOADS), \"share_image_\" + System.currentTimeMillis() + \".png\");\n file.getParentFile().mkdirs();\n FileOutputStream out = new FileOutputStream(file);\n bmp.compress(Bitmap.CompressFormat.PNG, 90, out);\n out.close();\n bmpUri = Uri.fromFile(file);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return bmpUri;\n }", "@SuppressLint(\"NewApi\")\n public static String getPath(final Context context, final Uri uri) {\n if (uri == null) {\n return null;\n }\n\n final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;\n\n // DocumentProvider\n if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) {\n // ExternalStorageProvider\n if (isExternalStorageDocument(uri)) {\n final String docId = DocumentsContract.getDocumentId(uri);\n final String[] split = docId.split(\":\");\n final String type = split[0];\n\n if (\"primary\".equalsIgnoreCase(type)) {\n return Environment.getExternalStorageDirectory() + \"/\" + split[1];\n }\n\n // TODO handle non-primary volumes\n }\n // DownloadsProvider\n else if (isDownloadsDocument(uri)) {\n\n final String id = DocumentsContract.getDocumentId(uri);\n final Uri contentUri = ContentUris.withAppendedId(\n Uri.parse(\"content://downloads/public_downloads\"), Long.valueOf(id));\n\n return getDataColumn(context, contentUri, null, null);\n }\n // MediaProvider\n else if (isMediaDocument(uri)) {\n final String docId = DocumentsContract.getDocumentId(uri);\n final String[] split = docId.split(\":\");\n final String type = split[0];\n\n Uri contentUri = null;\n if (\"image\".equals(type)) {\n contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;\n } else if (\"video\".equals(type)) {\n contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;\n } else if (\"audio\".equals(type)) {\n contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;\n }\n\n final String selection = \"_id=?\";\n final String[] selectionArgs = new String[]{\n split[1]\n };\n\n return getDataColumn(context, contentUri, selection, selectionArgs);\n }\n }\n // MediaStore (and general)\n else if (\"content\".equalsIgnoreCase(uri.getScheme())) {\n String photoPath = getDataColumn(context, uri, null, null);\n if (TextUtils.isEmpty(photoPath)) {\n photoPath = copyPhotoFromContent(uri, context);// photo may be come from dropbox , google drive\n }\n if (TextUtils.isEmpty(photoPath)) { // still can't get photo path , like can't import image from OneDriver\n\n }\n return photoPath;\n }\n // File\n else if (\"file\".equalsIgnoreCase(uri.getScheme())) {\n return uri.getPath();\n }\n\n return null;\n }", "public String getImgPath() {\n return imgPath;\n }", "public static Uri getImageContentUri(Context context, java.io.File imageFile) {\n String filePath = imageFile.getAbsolutePath();\n Cursor cursor = context.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,\n new String[]{MediaStore.Images.Media._ID}, MediaStore.Images.Media.DATA + \"=? \",\n new String[]{filePath}, null);\n if (cursor != null && cursor.moveToFirst()) {\n int id = cursor.getInt(cursor.getColumnIndex(MediaStore.MediaColumns._ID));\n Uri baseUri = Uri.parse(\"content://media/external/images/media\");\n return Uri.withAppendedPath(baseUri, \"\" + id);\n } else {\n if (imageFile.exists()) {\n ContentValues values = new ContentValues();\n values.put(MediaStore.Images.Media.DATA, filePath);\n return context.getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);\n } else {\n return null;\n }\n }\n }", "public String getImageURL() \r\n\t{\r\n\t\t\r\n\t\treturn imageURL;\r\n\t\t\r\n\t}", "public com.google.protobuf.ByteString\n getPictureUriBytes() {\n java.lang.Object ref = pictureUri_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n pictureUri_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getImgpath() {\r\n return imgpath;\r\n }", "public Uri getPhotoPageUri() {\n return Uri.parse(\"https://www.flickr.com/photos/\").buildUpon()\n .appendPath(mOwner)\n .appendPath(mId)\n .build();\n }", "public File getPhotoFileUri(String fileName) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES), APP_TAG);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(APP_TAG, \"failed to create directory\");\n }\n\n // Return the file target for the photo based on filename\n File file = new File(mediaStorageDir.getPath() + File.separator + fileName);\n\n return file;\n }", "public String getImagePath() {\n\t\treturn imagePath;\n\t}", "public File getPhotoFileUri(String fileName) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES), TAG);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(TAG, \"failed to create directory\");\n }\n\n // Return the file target for the photo based on filename\n File file = new File(mediaStorageDir.getPath() + File.separator + fileName);\n\n return file;\n }", "public static String getImageURL(Bundle data) {\n // Extract the path to the image file from the Bundle, which\n // should be stored using the IMAGE_URL key.\n return data.getString(IMAGE_URL);\n }", "public Uri getLocalBitmapUri(ImageView imageView) {\n // Extract Bitmap from ImageView drawable\n Drawable drawable = imageView.getDrawable();\n Bitmap bmp = null;\n if (drawable instanceof BitmapDrawable){\n bmp = ((BitmapDrawable) imageView.getDrawable()).getBitmap();\n } else {\n return null;\n }\n // Store image to default external storage directory\n Uri bmpUri = null;\n try {\n File file = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOWNLOADS), \"share_image_\" + System.currentTimeMillis() + \".png\");\n file.getParentFile().mkdirs();\n FileOutputStream out = new FileOutputStream(file);\n bmp.compress(Bitmap.CompressFormat.PNG, 90, out);\n out.close();\n bmpUri = Uri.fromFile(file);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return bmpUri;\n }", "public File getPhotoFileUri(String fileName) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(getExternalFilesDir(Environment.DIRECTORY_PICTURES), APP_TAG);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(APP_TAG, \"failed to create directory\");\n }\n\n // Return the file target for the photo based on filename\n File file = new File(mediaStorageDir.getPath() + File.separator + fileName);\n\n return file;\n }" ]
[ "0.7706004", "0.76511556", "0.75241745", "0.75241745", "0.7331533", "0.7228246", "0.7133942", "0.706224", "0.69936204", "0.6966628", "0.68963903", "0.683157", "0.679583", "0.6795545", "0.6787967", "0.6784887", "0.67844266", "0.6779488", "0.6771424", "0.6767576", "0.66972363", "0.6696887", "0.6674668", "0.66630256", "0.6662751", "0.66416055", "0.6630792", "0.66264933", "0.6618659", "0.6615037", "0.66016006", "0.65989816", "0.65910953", "0.65599555", "0.65233266", "0.65007", "0.65001845", "0.65001845", "0.6491898", "0.6483342", "0.64731956", "0.6472561", "0.6453787", "0.6452137", "0.64401996", "0.6428694", "0.64243495", "0.6410265", "0.6408009", "0.63958436", "0.6382481", "0.6380852", "0.6363888", "0.63616425", "0.63592714", "0.63589483", "0.6349937", "0.63389075", "0.63183755", "0.63028616", "0.63021666", "0.62966293", "0.6295364", "0.6294526", "0.6288499", "0.6285936", "0.6274349", "0.6262833", "0.62606317", "0.6246835", "0.6243944", "0.624234", "0.621253", "0.621253", "0.621253", "0.62034154", "0.62034154", "0.62034154", "0.62034154", "0.62034154", "0.6194804", "0.6161009", "0.61505955", "0.61498994", "0.614716", "0.6127761", "0.6120039", "0.6101416", "0.60979056", "0.60905033", "0.60898036", "0.6088686", "0.60883814", "0.6084574", "0.60716283", "0.6069602", "0.6060279", "0.605994", "0.6055447", "0.6055218" ]
0.6747201
20
TODO Autogenerated method stub
@Override public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) { }
{ "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
Text area for displaying contents
@Override public void start(Stage primaryStage) { TextArea clientTA = new TextArea(); TextArea serverTA = new TextArea(); serverTA.setEditable(false); VBox vBox = new VBox(10); Label lblClient = new Label("Client"); Label lblServer = new Label("Server"); vBox.getChildren().addAll(lblServer, serverTA, lblClient, clientTA); vBox.setPadding(new Insets(10)); // Create a scene and place it in the stage Scene scene = new Scene(vBox, 450, 450); primaryStage.setTitle("Client"); primaryStage.setScene(scene); primaryStage.show(); // Gives the text area focus when the application starts clientTA.requestFocus(); // Send text back to the server clientTA.setOnKeyPressed(event -> { if(event.getCode() == KeyCode.ENTER){ try { String[] sa = clientTA.getText().split("\n"); toServer.writeUTF(sa[sa.length - 1]); toServer.flush(); } catch (IOException ex) { ex.printStackTrace(); } } }); try { // Create a socket to connect to the server Socket socket = new Socket("localhost", 8000); // Create an input stream to receive data from the server fromServer = new DataInputStream(socket.getInputStream()); // Create an output stream to send data to the server toServer = new DataOutputStream(socket.getOutputStream()); } catch (IOException ex) { clientTA.appendText(ex.toString() + "\n"); } new Thread(() -> { try { while (true) { // Receive text from the server String message = fromServer.readUTF(); // Display message in text area serverTA.appendText(message + "\n"); toServer.flush(); } } catch (IOException ex) { ex.printStackTrace(); } }).start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TEXTAREA createTEXTAREA();", "public TextDisplay(){\n // Default values for all TextDisplays \n fontSize = 20.0f;\n fontColor = new Color(0, 0, 0);\n fieldWidth = 100;\n fieldHeight = 30;\n drawStringX = 0;\n drawStringY = 15;\n input = \"\";\n hasBackground = false;\n \n // TextDisplays' TextArea specifics\n borderWidth = 5;\n borderHeight = 5;\n borderColor = new Color(0, 0, 0, 128);\n backgroundColor = new Color (255, 255, 255, 128);\n }", "private void generateTextArea()\n {\n //Clear the textArea\n textArea.selectAll();\n textArea.replaceSelection(\"\");\n\n MyCircle circle = panel.getCircle();\n\n //Add all of the required information to the textarea\n textArea.append(String.format(\"AREA: %.2f %n\", circle.getArea()));\n textArea.append(\"RADIUS: \"+circle.getRadius()+\"\\n\");\n textArea.append(\"DIAMETER: \"+circle.getDiameter()+\"\\n\");\n textArea.append(String.format(\"CIRCUMFERENCE: %.2f %n\", circle.getCircumference()));\n }", "JTextArea getDisplay();", "@Override\n\t\t\tpublic void run() {\n\t\t\t\ttextArea.setText(textArea.getText()+\"\\n\"+s);\n\t\t\t}", "public String getTextoArea() {\n\t\treturn textArea.getText();\n\t}", "private void setupTextArea() {\n\t\tcourseInfo = new JTextPane();\n\t\tinfoScrollPane = new JScrollPane(courseInfo);\n\t\tinfoScrollPane.setPreferredSize(new Dimension(350, 175));\n\t\tcourseInfo.setEditable(false);\n\t\tdisplay.add(infoScrollPane);\n\t}", "private JTextArea Tekstas() {\n\t JTextArea detailTA = new JTextArea();\n\t detailTA.setFont(new Font(\"Monospaced\", Font.PLAIN, 14));\n\t detailTA.setTabSize(3);\n\t detailTA.setLineWrap(true);\n\t detailTA.setWrapStyleWord(false);\n\t return (detailTA);\n\t}", "public ExtractTextByArea() throws IOException {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public TextArea()\n {\n super(AreaId.TEXT, new AsciiByteFormatter());\n }", "public TextPanel(String text) {\n\t\tthis.setLayout(new MigLayout());\n\t\tthis.text = text;\n\t\tjta = new JTextArea(text);\n\t\tjta.setEditable(false);\n\t\tjta.setLineWrap(true);\n\t\tjsp = new JScrollPane(jta);\n\n\t\tthis.add(jsp, \"push,grow\");\n\t}", "public void showInfo(String data) {\r\n\t \r\n\t \r\n\ttextArea.append(data);\r\n\t try{\r\n\t\t int len=textArea.getText().length();\r\n\t\t textArea.setCaretPosition(len);\r\n\t\t }\r\n\t\t catch(Exception E){\r\n\t\t\t E.printStackTrace();\r\n\t\t }\r\n\t\r\n this.getContentPane().validate();\r\n }", "public void setAreaText(String text) {\n description.setText(text);\n }", "private void writeTextArea(){\r\n try\r\n {\r\n //Fill in \"textArea\" with club names and results\r\n textArea.appendText(\"OK: \" + choiceHomeTeam.getValue() + \" - \" + choiceAwayTeam.getValue() + \" \" \r\n + Integer.valueOf(finalTimeHomeScore.getText()) + \":\"\r\n + Integer.valueOf(finalTimeAwayScore.getText()) + \"(\" \r\n + Integer.valueOf(halfTimeHomeScore.getText()) + \":\" \r\n + Integer.valueOf(halfTimeAwayScore.getText()) + \")\\n\");\r\n textArea.setWrapText(true);\r\n //the letters will be green\r\n textArea.setStyle(\"-fx-text-fill: #4F8A10;\"); \r\n }\r\n //Fill in \"textArea\" with erros\r\n catch(NumberFormatException e)\r\n {\r\n textArea.appendText(\"Error: \" + e.getMessage() + \"\\n\");\r\n textArea.setWrapText(true);\r\n //the letters will be red\r\n textArea.setStyle(\"-fx-text-fill: RED;\"); \r\n } \r\n }", "public static void fillTextArea() {\r\n\t\tString choice = (String) comboBox.getSelectedItem();\r\n\t\tStatement statement;\r\n\t\ttry {\r\n\t\t\tstatement = connection.createStatement();\r\n\t\t\tresults = statement\r\n\t\t\t\t\t.executeQuery(\"Select People.PeopleName,paragraph.text \"\r\n\t\t\t\t\t\t\t+ \"From People \" + \"inner join paragraph \"\r\n\t\t\t\t\t\t\t+ \"on People.peopleKey=paragraph.peopleKey \"\r\n\t\t\t\t\t\t\t+ \"where PeopleName = '\" + choice + \"'\");\r\n\r\n\t\t\tparagraphtextArea.setText(\"\");\r\n\t\t\tparagraphtextArea.setEditable(true);\r\n\t\t\twhile (results.next()) {\r\n\t\t\t\tparagraphtextArea.append(results.getString(\"text\"));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public TextArea getInputPane();", "public static void GenerateTextArea(int id)\n\t{\n\t\tareaHeight += 210;\n\t\tHome.createArticle.setPreferredSize(new Dimension(800, areaHeight));\n\t\ti++; \n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = i;\n\t\tgbc.gridwidth = 1;\n\t\tgbc.insets = new Insets(10, 0, 0, 5);\n\t\tgbc.anchor = GridBagConstraints.LINE_END;\n\t\tHome.createArticle.add(textLabels.get(id), gbc);\n\t\t\n\t\tgbc.gridx = 1;\n\t\tgbc.gridwidth = 3;\n\t\tgbc.insets = new Insets(10, 0, 0, 0);\n\t\tgbc.anchor = GridBagConstraints.LINE_START;\n\t\tgbc.weighty = 10;\n\t\tHome.createArticle.add(textAreas.get(id), gbc);\n\t}", "public static String getInputText(){\n\t\treturn textArea.getText();\n\t}", "public String getContent() {\r\n \r\n return text;\r\n }", "public void getText(){\n\t\tnoteText.setText(note.getText());\n\t}", "public MarcoAreaTexto() {\r\n \r\n super(\"Demostración JTextArea\");\r\n Box cuadro = Box.createHorizontalBox();\r\n String demo = \"Texto de ejemplo\\npara mostrar como\\n\" +\r\n \"se copia texto por\\neventoexterno (Salu2)\";\r\n \r\n areaTexto1 = new JTextArea(demo, 10, 15); \r\n cuadro.add(new JScrollPane(areaTexto1) );\r\n copiar = new JButton(\"Copiar >>> \");\r\n cuadro.add(copiar);\r\n copiar.addActionListener(\r\n \r\n new ActionListener() {\r\n \r\n public void actionPerformed(ActionEvent event) {\r\n \r\n areaTexto2.setText(areaTexto1.getSelectedText() );\r\n } //Fin del método actionPerformed\r\n } //Clase interna anónima\r\n ); //Clase interna anónima\r\n \r\n areaTexto2 = new JTextArea(10, 15);\r\n areaTexto2.setEditable(false);\r\n cuadro.add(new JScrollPane(areaTexto2) );\r\n add(cuadro);\r\n }", "@Override\r\n public void writeText(String text) {\n String[] lines = text.split(\"\\n\");\r\n JLabel[] labels = new JLabel[lines.length];\r\n for (int i = 0; i < lines.length; i++) {\r\n labels[i] = new JLabel(lines[i]);\r\n labels[i].setFont(new Font(\"Monospaced\", Font.PLAIN, 20));\r\n }\r\n JOptionPane.showMessageDialog(null, labels);\r\n }", "private void createContents() {\n // シェル\n super.createContents(this.parent, SWT.CLOSE | SWT.TITLE, false);\n this.getShell().setText(\"つぶやく\");\n this.shell = this.getShell();\n\n // レイアウト\n GridLayout glShell = new GridLayout(3, false);\n // glShell.horizontalSpacing = 1;\n glShell.marginHeight = 10;\n glShell.marginWidth = 10;\n // glShell.verticalSpacing = 1;\n this.shell.setLayout(glShell);\n\n Label thumnail = new Label(this.shell, SWT.NONE);\n GridData gdThumnail = new GridData(SWT.CENTER, SWT.CENTER, false, false, 3, 1);\n thumnail.setLayoutData(gdThumnail);\n try {\n Image orig = SwtUtils.makeImage(this.imageFile);\n thumnail.setImage(SwtUtils.scaleToFit(orig, 400, 300));\n orig.dispose();\n } catch (IOException e2) {\n SwtUtils.errorDialog(e2, TweetDialog.this.shell);\n }\n\n final Text text = new Text(this.shell, SWT.MULTI | SWT.BORDER | SWT.WRAP);\n GridData gdText = new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1);\n gdText.widthHint = SwtUtils.DPIAwareWidth(300);\n gdText.heightHint = SwtUtils.DPIAwareHeight(80);\n text.setLayoutData(gdText);\n\n Label userName = new Label(this.shell, SWT.NONE);\n userName.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\n try {\n userName.setText(TwitterClient.getInstance().getUser().getScreenName());\n } catch (TwitterException e1) {\n SwtUtils.errorDialog(e1, TweetDialog.this.shell);\n }\n\n final Label remainChars = new Label(this.shell, SWT.NONE);\n remainChars.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\n text.addModifyListener(new ModifyListener() {\n\n @Override\n public void modifyText(ModifyEvent e) {\n int remain = 117 - text.getText().length();\n remainChars.setText(String.valueOf(remain));\n }\n });\n text.setText(\"\");\n\n Button tweet = new Button(this.shell, SWT.NONE);\n GridData gdTweet = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\n gdTweet.widthHint = SwtUtils.DPIAwareWidth(100);\n tweet.setLayoutData(gdTweet);\n tweet.setText(\"つぶやく\");\n tweet.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n try {\n TwitterClient.getInstance().tweet(\n TweetDialog.this, text.getText(), TweetDialog.this.imageFile);\n TweetDialog.this.shell.close();\n ApplicationMain.logPrint(\"つぶやきました\");\n } catch (TwitterException e1) {\n SwtUtils.errorDialog(e1, TweetDialog.this.shell);\n }\n }\n });\n\n this.shell.pack();\n }", "public String getPlainText();", "public static void readFromFileToTextArea() {\n textFile = new File(field.getText());\n Scanner fileScanner;\n try {\n fileScanner = new Scanner(textFile);\n textArea.setText(\"\");\n String line = \"\";\n while (fileScanner.hasNextLine()) {\n line = fileScanner.nextLine() + (fileScanner.hasNextLine() ? \"\\n\" : \"\");\n textArea.append(line);\n originalContent += line;\n }\n fileScanner.close();\n } catch (FileNotFoundException e) {\n // TODO Notify user via GUI JPanelblahblahblah\n System.err.println(\"File '\" + textFile + \"' not found.\");\n e.printStackTrace();\n }\n frame.setTitle(textFile.toString());\n textArea.requestFocus();\n textArea.getDocument().addDocumentListener(new TextAreaChangeListener());\n }", "private ZapTextArea getTxtDescription() {\n if (txtDescription == null) {\n txtDescription = new ZapTextArea();\n txtDescription.setBorder(\n javax.swing.BorderFactory.createBevelBorder(\n javax.swing.border.BevelBorder.LOWERED));\n txtDescription.setLineWrap(true);\n }\n return txtDescription;\n }", "public OzTextArea()\n{\n\tsetLayout(new BorderLayout());\n\tJScrollPane jsp = new JScrollPane(textArea);\n\tjsp.setBorder(\n\t\tBorderFactory.createCompoundBorder(\n\t\t\tBorderFactory.createRaisedBevelBorder(),\n\t\t\tBorderFactory.createEmptyBorder(5, 5, 5, 5)));\n\tadd(jsp, \"Center\");\n}", "public TextAreaOutputStream( JTextArea control ) {\r\n textControl = control;\r\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tdisplayArea.append(messageToDisplay);\r\n\t\t\t\tdisplayArea.setCaretPosition(displayArea.getText().length());\t//把文本区域中的输入光标定位到文本区域中最后一个字符之后\r\n\t\t\t}", "private void createTextPanel()\n\t{\t\t\n\t\ttextPanel.setLayout (new BorderLayout());\n\t\ttextPanel.add(entry, BorderLayout.CENTER);\n\t\t\n\t}", "public static void editTextArea(String context) {\r\n\t\ttextArea.append(context+\"\\n\");\r\n\t}", "public static TextArea createTextArea() {\n\t\tTextArea txt = new TextArea();\n\t\ttxt.setText(\" \");\n\t\ttxt.setPrefWidth(350);\n\t\ttxt.setPrefHeight(50);\n\t\treturn txt;\n\t}", "@Override\r\n\t\t\tpublic String getText() {\n\t\t\t\treturn text;\r\n\t\t\t}", "protected void createContents() {\n\t\tsetText(\"Muokkaa asiakastietoja\");\n\t\tsetSize(800, 550);\n\n\t}", "private void appendText(String text) {\n textArea.appendText(text);\n }", "private void txt() {\n\n\t}", "public void displayText() {\n\n // Draws the border on the slideshow aswell as the text\n image(border, slideshowPosX - borderDisplace, textPosY - textMargin - borderDisplace);\n\n // color of text background\n fill(textBackground);\n\n //background for text\n rect(textPosX - textMargin, textPosY - textMargin, textSizeWidth + textMargin * 2, textSizeHeight + textMargin * 2);\n\n //draw text\n image(texts[scene], textPosX, textPosY, textSizeWidth, textSizeHeight, 0, 0 + scrolled, texts[scene].width, textSizeHeight + scrolled);\n }", "private void setupFeedbackDisplayTextArea(){\n\t\tfeedback_display = new JTextArea();\n\t\tfeedback_display.setFont(new Font(\"Calibri Light\", Font.PLAIN, 25));\n\t\tfeedback_display.setEditable(false);\n\t\tfeedback_display.setLineWrap(true);\n\t\tfeedback_display.setWrapStyleWord(true);\n\t\tfeedback_display.setOpaque(true);\n\n\t\tJScrollPane scrolling_pane = new JScrollPane(feedback_display);\n\t\tadd(scrolling_pane);\n\t\tscrolling_pane.setBounds(32, 222, 1284, 252);\n\t\tscrolling_pane.setBackground(Color.WHITE);\n\t}", "public String displayText(){\n String displayText = \"\";\n displayText = \"Title: \" + getTitle() + \"\\nAuthor: \" + getAuthor() + \"\\nDescription: \" +getDescription();\n\n return displayText;\n\n }", "private String getMessage(){\n\t\t\treturn textArea.getText();\n\t}", "public void run () {\n\t\t\t\t//This is the method that gets called everytime the GUI needs to be updated.\n\t\t\t\t\n\t\t\t\tchatWindow.append(text);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private JTextArea getJTextArea() {\r\n\t\tif (jTextArea == null) {\r\n\t\t\tjTextArea = new JTextArea();\r\n\t\t\tjTextArea.setBounds(new Rectangle(11, 5, 139, 127));\r\n\t\t\tjTextArea.setText(\"This is the stroy\\nof the hare who\\nlost his spectacles.\");\r\n\t\t}\r\n\t\treturn jTextArea;\r\n\t}", "private void syncContent() {\n \tdocument.setContent(textArea.getText());\n }", "private JTextArea getTxtInput() {\r\n\t\tif (txtInput == null) {\r\n\t\t\ttxtInput = new JTextArea();\r\n\t\t\ttxtInput.setLineWrap(true);\r\n\t\t\ttxtInput.addKeyListener(new java.awt.event.KeyAdapter() {\r\n\t\t\t\tpublic void keyTyped(java.awt.event.KeyEvent e) {\r\n\t\t\t\t\tif(e.getKeyChar() == '\\n' || e.getKeyChar() == '#') {\r\n\t\t\t\t\t\tinputReady = 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 txtInput;\r\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), SWT.MIN |SWT.APPLICATION_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(WordWatermarkDialog.class, \"/com/yc/ui/1.jpg\"));\n\t\tshell.setSize(436, 321);\n\t\tshell.setText(\"设置文字水印\");\n\t\t\n\t\tLabel label_font = new Label(shell, SWT.NONE);\n\t\tlabel_font.setBounds(38, 80, 61, 17);\n\t\tlabel_font.setText(\"字体名称:\");\n\t\t\n\t\tLabel label_style = new Label(shell, SWT.NONE);\n\t\tlabel_style.setBounds(232, 77, 61, 17);\n\t\tlabel_style.setText(\"字体样式:\");\n\t\t\n\t\tLabel label_size = new Label(shell, SWT.NONE);\n\t\tlabel_size.setBounds(38, 120, 68, 17);\n\t\tlabel_size.setText(\"字体大小:\");\n\t\t\n\t\tLabel label_color = new Label(shell, SWT.NONE);\n\t\tlabel_color.setBounds(232, 120, 68, 17);\n\t\tlabel_color.setText(\"字体颜色:\");\n\t\t\n\t\tLabel label_word = new Label(shell, SWT.NONE);\n\t\tlabel_word.setBounds(38, 38, 61, 17);\n\t\tlabel_word.setText(\"水印文字:\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(115, 35, 278, 23);\n\t\t\n\t\tButton button_confirm = new Button(shell, SWT.NONE);\n\t\t\n\t\tbutton_confirm.setBounds(313, 256, 80, 27);\n\t\tbutton_confirm.setText(\"确定\");\n\t\t\n\t\tCombo combo = new Combo(shell, SWT.NONE);\n\t\tcombo.setItems(new String[] {\"宋体\", \"黑体\", \"楷体\", \"微软雅黑\", \"仿宋\"});\n\t\tcombo.setBounds(115, 77, 93, 25);\n\t\tcombo.setText(\"黑体\");\n\t\t\n\t\tCombo combo_1 = new Combo(shell, SWT.NONE);\n\t\tcombo_1.setItems(new String[] {\"粗体\", \"斜体\"});\n\t\tcombo_1.setBounds(300, 74, 93, 25);\n\t\tcombo_1.setText(\"粗体\");\n\t\t\n\t\tCombo combo_2 = new Combo(shell, SWT.NONE);\n\t\tcombo_2.setItems(new String[] {\"1\", \"3\", \"5\", \"8\", \"10\", \"12\", \"16\", \"18\", \"20\", \"24\", \"30\", \"36\", \"48\", \"56\", \"66\", \"72\"});\n\t\tcombo_2.setBounds(115, 117, 93, 25);\n\t\tcombo_2.setText(\"24\");\n\t\t\n\t\tCombo combo_3 = new Combo(shell, SWT.NONE);\n\t\tcombo_3.setItems(new String[] {\"红色\", \"绿色\", \"蓝色\"});\n\t\tcombo_3.setBounds(300, 117, 93, 25);\n\t\tcombo_3.setText(\"红色\");\n\t\t\n\t\tButton button_cancle = new Button(shell, SWT.NONE);\n\t\t\n\t\tbutton_cancle.setBounds(182, 256, 80, 27);\n\t\tbutton_cancle.setText(\"取消\");\n\t\t\n\t\tLabel label_X = new Label(shell, SWT.NONE);\n\t\tlabel_X.setBounds(31, 161, 68, 17);\n\t\tlabel_X.setText(\"X轴偏移值:\");\n\t\t\n\t\tCombo combo_4 = new Combo(shell, SWT.NONE);\n\t\tcombo_4.setItems(new String[] {\"10\", \"20\", \"30\", \"40\", \"50\", \"80\", \"100\", \"160\", \"320\", \"640\"});\n\t\tcombo_4.setBounds(115, 158, 93, 25);\n\t\tcombo_4.setText(\"50\");\n\t\t\n\t\tLabel label_Y = new Label(shell, SWT.NONE);\n\t\tlabel_Y.setText(\"Y轴偏移值:\");\n\t\tlabel_Y.setBounds(225, 161, 68, 17);\n\t\t\n\t\tCombo combo_5 = new Combo(shell, SWT.NONE);\n\t\tcombo_5.setItems(new String[] {\"10\", \"20\", \"30\", \"40\", \"50\", \"80\", \"100\", \"160\", \"320\", \"640\"});\n\t\tcombo_5.setBounds(300, 158, 93, 25);\n\t\tcombo_5.setText(\"50\");\n\t\t\n\t\tLabel label_alpha = new Label(shell, SWT.NONE);\n\t\tlabel_alpha.setBounds(46, 204, 53, 17);\n\t\tlabel_alpha.setText(\"透明度:\");\n\t\t\n\t\tCombo combo_6 = new Combo(shell, SWT.NONE);\n\t\tcombo_6.setItems(new String[] {\"0\", \"0.1\", \"0.2\", \"0.3\", \"0.4\", \"0.5\", \"0.6\", \"0.7\", \"0.8\", \"0.9\", \"1.0\"});\n\t\tcombo_6.setBounds(115, 201, 93, 25);\n\t\tcombo_6.setText(\"0.8\");\n\t\t\n\t\t//取消按钮\n\t\tbutton_cancle.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tWordWatermarkDialog.this.shell.dispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\t//确认按钮\n\t\tbutton_confirm.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tif(text.getText().trim()==null || \"\".equals(text.getText().trim())\n\t\t\t\t\t\t||combo.getText().trim()==null || \"\".equals(combo.getText().trim()) \n\t\t\t\t\t\t\t||combo_1.getText().trim()==null || \"\".equals(combo_1.getText().trim())\n\t\t\t\t\t\t\t\t|| combo_2.getText().trim()==null || \"\".equals(combo_2.getText().trim())\n\t\t\t\t\t\t\t\t\t|| combo_3.getText().trim()==null || \"\".equals(combo_3.getText().trim())\n\t\t\t\t\t\t\t\t\t\t||combo_4.getText().trim()==null || \"\".equals(combo_4.getText().trim())\n\t\t\t\t\t\t\t\t\t\t\t||combo_5.getText().trim()==null || \"\".equals(combo_5.getText().trim())\n\t\t\t\t\t\t\t\t\t\t\t\t||combo_6.getText().trim()==null || \"\".equals(combo_6.getText().trim())){\n\t\t\t\t\tMessageDialog.openError(shell, \"错误\", \"输入框不能为空或输入空值,请确认后重新输入!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString word=text.getText().trim();\n\t\t\t\tString wordName=getFontName(combo.getText().trim());\n\t\t\t\tint wordStyle=getFonStyle(combo_1.getText().trim());\n\t\t\t\tint wordSize=Integer.parseInt(combo_2.getText().trim());\n\t\t\t\tColor wordColor=getFontColor(combo_3.getText().trim());\n\t\t\t\tint word_X=Integer.parseInt(combo_4.getText().trim());\n\t\t\t\tint word_Y=Integer.parseInt(combo_5.getText().trim());\n\t\t\t\tfloat word_Alpha=Float.parseFloat(combo_6.getText().trim());\n\t\t\t\t\n\t\t\t\tis=MeituUtils.waterMarkWord(EditorUi.filePath,word, wordName, wordStyle, wordSize, wordColor, word_X, word_Y,word_Alpha);\n\t\t\t\tCommon.image=new Image(display,is);\n\t\t\t\tWordWatermarkDialog.this.shell.dispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tcombo.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\n\t\tcombo_1.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_2.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_3.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\t\n\t\t\n\t\tcombo_4.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_5.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_6.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\".[0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\n\t}", "public void setUpTextArea() {\n noteContent.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n int remaining = NoteText.NOTE_MAX_CHARACTER_LIMIT - newValue.length();\n feedbackLabel.setStyle(\"-fx-font-size: 12; -fx-text-fill: white;\");\n feedbackLabel.setText(\"Characters remaining: \" + remaining);\n }\n });\n\n noteContent.setTextFormatter(new TextFormatter<String>(text ->\n text.getControlNewText().length() <= NoteText.NOTE_MAX_CHARACTER_LIMIT\n ? text : null));\n }", "public Info(String text) {\n //new JTextArea(text);\n super(text, SwingConstants.CENTER);\n setFont(Scheme.getFont());\n setOpaque(true);\n setSize(getFontMetrics(Scheme.getFont()).stringWidth(getText()) + 13, 25);\n setBackground(Scheme.getBackgroundColor());\n setForeground(Scheme.getForegroundColor());\n setBorder(BorderFactory.createLineBorder(Color.GRAY));\n }", "public TextAreaMessageDisplay(@NotNull final TextArea textArea) {\n super();\n Utils4J.checkNotNull(\"textArea\", textArea);\n this.textArea = textArea;\n }", "public void setMainText(String s) throws SQLException{\n\t\tReadTextFromFile r = new ReadTextFromFile();\r\n\t\t//r.load(index) this is how it should work at some point\r\n\t\tString readText = r.loadMainText(s);\r\n\t\tJPanel textPanel = new GeneralPanel();\r\n\t\ttextPanel.setLayout(new GridBagLayout());\r\n\t\tJLabel l = new JLabel(\"<html><p style=\\\"width:100px\\\">\"+readText+\"</p></html>\", SwingConstants.CENTER);\r\n\t\t\r\n\t\tGridBagConstraints c = new GridBagConstraints ();\r\n\t\tc.gridy = 1;\r\n\t\tc.insets = new Insets (5, 0, 0, 0);\r\n \r\n\t\ttextPanel.add(l , c);\r\n\t\tadd(textPanel, BorderLayout.CENTER);\r\n\t}", "public T casetextArea(textArea object) {\n\t\treturn null;\n\t}", "public String text() { return text; }", "public TextBlock() {\n writer = new StringMaker();\n writer.openForOutput();\n // blockOut = new StringBuilder();\n labels = new ArrayList();\n // writer.close();\n }", "public TextFrame(String title, String text) {\n super(title);\n initComponents();\n area.setText(text);\n }", "private void putDataToTextArea() {\n jTextArea1.setEditable(false);\n jTextArea1.setText(selectedFoods);\n }", "@Override\n\tpublic void showContents() {\n\t\tprogram.add(returnToMain);\n\t\tprogram.add(congratMessage);\n\t\tprogram.setBackground(Color.DARK_GRAY);\n\t\t\n\t}", "public void run()\n {\n //Generate text, pack and show the frame\n generateTextArea();\n pack();\n setMinimumSize(getSize());\n setVisible(true);\n }", "public String getText();", "public String getText();", "public String getText();", "public String getText();", "public void addTextArea(String text) throws BadLocationException {\n\t\tcurrentTextArea = new JTextArea(text == null ? \"\" : text);\n AbstractDocument document = (AbstractDocument) currentTextArea.getDocument();\n document.setDocumentFilter(new Filter());\n\t\tcurrentTextArea.setBorder(BorderFactory.createLineBorder(Color.white));\n\t\tcurrentTextArea.setSize(750,2);\n\t\tcontainer.add(currentTextArea);\n\t\tcurrentTextArea.requestFocusInWindow();\n\t\tcurrentTextArea.setCaretPosition(currentTextArea.getDocument().getLength());\n\n\t\tcurrentTextArea.addKeyListener(new java.awt.event.KeyAdapter() {\n\t\t\tpublic void keyPressed(java.awt.event.KeyEvent evt) {\n\t\t\t\ttry {\n\t\t\t\t\tjTextArea1WriteCommand(evt);\n\t\t\t\t} catch (BadLocationException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\trefreshView();\n\t}", "void updateTextArea(final String text) {\r\n\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tJCoresConsole.this.textArea.append(text);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "protected Text getText() {\n \t\treturn text;\n \t}", "String userInputFromTextArea();", "private void textInfoBottom(JPanel panel_TextInfo) {\n\t\tcontentPane.setLayout(gl_contentPane_1);\n\t\ttxtrPreparing = new JTextArea();\n\t\ttxtrPreparing.setBackground(Color.WHITE);\n\t\ttxtrPreparing.setText(\"Preparing... \");\n\t\t\n\t\tJTextArea textArea = new JTextArea();\n\t\ttextArea.setBackground(Color.WHITE);\n\t\ttextArea.setText(\" $10\");\n\t\tGroupLayout gl_panel_TextInfo = new GroupLayout(panel_TextInfo);\n\t\tgl_panel_TextInfo.setHorizontalGroup(\n\t\t\tgl_panel_TextInfo.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_TextInfo.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addComponent(txtrPreparing, GroupLayout.PREFERRED_SIZE, 232, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addGap(18)\n\t\t\t\t\t.addComponent(textArea, GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE))\n\t\t);\n\t\tgl_panel_TextInfo.setVerticalGroup(\n\t\t\tgl_panel_TextInfo.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_TextInfo.createSequentialGroup()\n\t\t\t\t\t.addGroup(gl_panel_TextInfo.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(txtrPreparing, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(textArea, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n\t\t);\n\t\tpanel_TextInfo.setLayout(gl_panel_TextInfo);\n\t}", "public void receberMensagem(String mensagem) {\n this.textArea.setText(textArea.getText() + mensagem);//Limpa a Tela do Computador\n this.textArea.appendText(\"\");//Descendo Scroll da tela do Computador\n }", "private JTextArea getTxtMessage() {\r\n\t\tif (txtMessage == null) {\r\n\t\t\ttxtMessage = new JTextArea();\r\n\t\t\ttxtMessage.setLineWrap(true);\r\n\t\t\ttxtMessage.setEditable(false);\r\n\t\t}\r\n\t\treturn txtMessage;\r\n\t}", "public void run()\r\n\r\n\t {\r\n\r\n\t while(true)\r\n\r\n\t {\r\n\r\n\t try{\r\n\t\t String s;\r\n\t\t s=br.readLine();\r\n\r\n\t ta.append(\"pagal: \"+s+\"\\n\");//Append to TextArea\r\n\r\n\t }catch(Exception e) {}\r\n\r\n\t }\r\n\r\n\t }", "protected Text getText()\r\n\t{\r\n\t\treturn text;\r\n\t}", "protected void createOutputTextArea() {\r\n\t\tthis.outputTextArea = new JTextArea(80, 30);\r\n\t\tthis.outputTextArea.setRows(2);\r\n\t\tthis.outputTextArea.setEditable(false);\r\n\t\tthis.outputTextArea.setLineWrap(false);\r\n\t\tthis.outputScrollPane = new JScrollPane(this.outputTextArea,\r\n\t\t\t\tVERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_AS_NEEDED);\r\n\t\t// outputTA.setBackground( Color.gray );\r\n\t\tthis.outputScrollPane.setMinimumSize(new Dimension(60, 30));\r\n\t\tthis.outputScrollPane.setPreferredSize(new Dimension(100, 30));\r\n\t}", "private JTextArea getJTextArea1() {\r\n\t\tif (jTextArea1 == null) {\r\n\t\t\tjTextArea1 = new JTextArea();\r\n\t\t\tjTextArea1.setBounds(new Rectangle(21, 331, 185, 94));\r\n\t\t\tjTextArea1.setText(\"You can use '*' or '?'.\\n If you type 'ma*' ,\" +\r\n\t\t\t\t\t\" will appear\\n all the words wich start with 'ma'.\" +\r\n\t\t\t\t\t\"\\n If you type 'm?' ,\" +\r\n\t\t\t\t\t\" will appear\\n all the words with two letters\\nwich start with 'm'.\");\r\n\t\t\tjTextArea1.setBackground(Color.green);\r\n\t\t\tjTextArea1.setEditable(false);\r\n\t\t}\r\n\t\treturn jTextArea1;\r\n\t}", "public void setGUIMode (final TextArea text)\n {\n this.text = text;\n }", "public void pasteText(){\n try{\n CharSequence text = mClipboardManager.getTextFromClipboard();\n if(text != null && mConnection != null){\n mConnection.commitText(text, 0);\n }\n }catch(Exception e){\n e.printStackTrace();\n Toast.makeText(getContext(),e.toString(),Toast.LENGTH_SHORT).show();\n }\n }", "public void textLogger(String text) {\n loggerTextarea.append(text + \"\\n\");\n }", "String getDisplayText();", "public TextArea makeInputArea (double height, double width) {\r\n TextArea cmdBox = new TextArea();\r\n cmdBox.setPrefColumnCount(INPUT_FIELD_WIDTH);\r\n cmdBox.setPrefHeight(height);\r\n cmdBox.setPrefWidth(width);\r\n return cmdBox;\r\n }", "public JTextArea createInstructions() {\n\t\tJTextArea instructions = new JTextArea(\n\t\t\t\t\"Hello. Thank you for being a wonderful and engaged volunteer. Befor you start your journey with your\"\n\t\t\t\t\t\t+ \"Youth Leader, it is essential that you have your Magic Stone. \");\n\t\t// instructions not editable\n\t\tinstructions.setEditable(false);\n\n\t\t// allows words to go to next line\n\t\tinstructions.setLineWrap(true);\n\n\t\t// prevents words from splitting\n\t\tinstructions.setWrapStyleWord(true);\n\n\t\t// change font\n\t\tinstructions.setFont(new Font(\"SANS_SERIF\", Font.PLAIN, 17));\n\n\t\t// change font color\n\t\tinstructions.setForeground(Color.white);\n\n\t\t// Insets constructor summary: (top, left, bottom, right)\n\t\tinstructions.setMargin(new Insets(30, 30, 30, 30));\n\n\t\t// Set background color\n\t\tinstructions.setOpaque(true);\n\t\tinstructions.setBackground(new Color(#00aeef));\n\n\t\treturn instructions;\n\t}", "void init(RichTextArea textArea, Config config);", "protected void createContents() {\n\t\tsetText(\"Termination\");\n\t\tsetSize(340, 101);\n\n\t}", "public String getText(){\r\n\t\treturn text;\r\n\t}", "private void draw_text() {\n\t\tcopy_text_into_buffer();\n\t\tVoteVisApp.instance().image(text_buffer_, frame_height_ / 2,\n\t\t\t-text_graphics_.height / 2);\n\t}", "public TextAreaEntropy() {\r\n initComponents();\r\n }", "public void addContent(String msg) {\n\t\tthis.textArea.append(msg + \"\\n\");\r\n\t}", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tString content = ta_content.getText().toString();\r\n\r\n\t\t\t\t\tcontent = content.replaceAll(\"\\\\p{Z}\", \"\");\r\n\r\n\t\t\t\t\tcontent = content.replaceAll(\"(^\\\\p{Z}+|\\\\p{Z}+$)\", \"\");\r\n\t\t\t\t\tfor (String str : special_characters) {\r\n\t\t\t\t\t\tcontent = content.replaceAll(str, \"\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcontent = content.trim();\r\n\t\t\t\t\tint cnt = 0;\r\n\t\t\t\t\tBreakIterator it = BreakIterator.getCharacterInstance();\r\n\t\t\t\t\tit.setText(content);\r\n\r\n\t\t\t\t\twhile (it.next() != BreakIterator.DONE) {\r\n\t\t\t\t\t\tcnt++;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttextField.setText(\"\" + cnt);\r\n\t\t\t\t}", "private void viewExtractedData() {\n txtViewer.setText(extractedData);\n }", "public void append(String text)\n{\n\ttextArea().append(text);\n}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(437, 529);\n\n\t}", "public java.lang.String getText() {\n \t\treturn text;\n \t}", "public void addTextAreaValue(String str){\n\t\tcenterPanel.addTextAreaValue(str);\n\t}", "public String getText()\n\t{\n\t\treturn text;\n\t}", "public String getText()\n\t{\n\t\treturn text;\n\t}", "public String getText()\n\t{\n\t\treturn text;\n\t}", "private static void createAndShowGUI() {\n //Create and set up the window.\n JFrame frame = new JFrame(\"FrameDemo\");\n frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n\n //main input TextArea\n JTextArea mainIn = new JTextArea(\"Type your Command here.\", 3, 1);\n \n //main Output Display Displays htmlDocuments\n JTextPane mainOut = new JTextPane(new HTMLDocument());\n mainOut.setPreferredSize(new Dimension(800, 600));\n \n //add components to Pane\n frame.getContentPane().add(mainOut);\n frame.getContentPane().add(mainIn);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "protected String getTextContent()\n {\n return super.getText().trim();\n }", "public boolean outputText(String incomingText)\n\t{\n\t\ttxtArea.append(\"[\"+getTimeStamp()+\"] \"+ incomingText +\"\\n\");\n\t\tSystem.out.println(\"[\"+getTimeStamp()+\"] \"+ incomingText +\"\\n\");//##testing##\n\t\treturn true;\n\t}", "private JPanel getTextPanel() {\n JPanel p = ProgramPresets.createPanel();\n p.setLayout(new GridLayout(0, 1));\n p.add(ProgramPresets.createCenteredLabelBold(\n \"THIS PROGRAM WAS CREATED TO HELP AUTOMATE THE PROCESS OF SKATESHOP RAFFLES\"));\n p.add(ProgramPresets.createCenteredLabelBold(\n \"LET THE GOOGLE SERVERS HANDLE THE STRESS CREATED BY HOARDS OF DUNK FANS/RESELLERS\"));\n p.add(ProgramPresets.createCenteredLabelBold(\n \"RUN THIS PROGRAM ON YOUR COMPUTER WITH THE DATA FROM YOUR GOOGLE FORMS BASED RAFFLE\"));\n p.add(ProgramPresets.createCenteredLabelBold(\n \"DO NOT HESITATE TO CONTANCT ME WITH ANY PROBLEMS YOU ENCOUNTER WHILE USING THIS PROGRAM\"));\n JPanel contact = ProgramPresets.createTitledPanel(\"CONTACT INFORMATION\");\n contact.setLayout(new GridLayout(0, 1));\n contact.add(ProgramPresets.createCenteredLabelBold(\"CADE REYNOLDSON\"));\n contact.add(ProgramPresets.createCenteredLabelBold(\"[email protected]\"));\n contact.add(ProgramPresets.createCenteredLabelBold(\"INSTAGRAM: @OLLIEHOLE\"));\n JPanel subContact = ProgramPresets.createPanel();\n subContact.setLayout(new BorderLayout());\n subContact.add(Box.createRigidArea(new Dimension(300, 0)), BorderLayout.EAST);\n subContact.add(contact);\n subContact.add(Box.createRigidArea(new Dimension(300, 0)), BorderLayout.WEST);\n p.add(subContact);\n p.add(ProgramPresets.createCenteredTitle(\n \"SEE THE LINK BELOW FOR A FULL DESCRIPTION ON HOW TO USE THIS PROGRAM\"));\n JPanel finalPanel = ProgramPresets.createPanel();\n finalPanel.setLayout(new BorderLayout());\n finalPanel.add(Box.createRigidArea(new Dimension(75, 0)), BorderLayout.WEST);\n finalPanel.add(Box.createRigidArea(new Dimension(75, 0)), BorderLayout.EAST);\n finalPanel.add(p, BorderLayout.CENTER);\n return finalPanel;\n }", "public DrawTextPanel() {\n\t\tfileChooser = new SimpleFileChooser();\n\t\tundoMenuItem = new JMenuItem(\"Remove Item\");\n\t\tundoMenuItem.setEnabled(false);\n\t\tmenuHandler = new MenuHandler();\n\t\tsetLayout(new BorderLayout(3,3));\n\t\tsetBackground(Color.BLACK);\n\t\tsetBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\n\t\tcanvas = new Canvas();\n\t\tadd(canvas, BorderLayout.CENTER);\n\t\tJPanel bottom = new JPanel();\n\t\tbottom.add(new JLabel(\"Text to add: \"));\n\t\tinput = new JTextField(\"Hello World!\", 40);\n\t\tbottom.add(input);\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t\t\n\t\tJButton button = new JButton(\"Generate Random\");\n\t\tbottom.add(button);\n\t\t\n\t\tcanvas.addMouseListener( new MouseAdapter() {\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tdoMousePress( e.getX(), e.getY() ); \n\t\t\t}\n\t\t} );\n\t\t\n\t\tbutton.addActionListener(new ActionListener() { \n\t\t\tpublic void actionPerformed(ActionEvent e) { \n\t\t\t\tfor (int i = 0; i < 150; i++) { \n\t\t\t\t\tint X = new Random().nextInt(800); \n\t\t\t\t\tint Y = new Random().nextInt(600);\n\t\t\t\t\tdoMousePress(X, Y); \n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}", "public void displayMessage(String text)\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.DISPLAY_INFO_TOAST;\r\n message.obj = text;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }", "public TextAreaEntropy(String text) {\r\n super(text);\r\n initComponents();\r\n }", "public String getText(){\r\n return text;\r\n }" ]
[ "0.71082276", "0.7104369", "0.7097269", "0.7050772", "0.70281357", "0.6799282", "0.6785119", "0.6732542", "0.67184705", "0.66220933", "0.6601622", "0.65747184", "0.6563819", "0.65401065", "0.6534503", "0.6397463", "0.63449997", "0.63246506", "0.6295549", "0.6287169", "0.6273466", "0.6271551", "0.62700194", "0.62571144", "0.62550116", "0.62503105", "0.62309146", "0.6213521", "0.6213447", "0.6203775", "0.62018263", "0.6195904", "0.6192752", "0.6172323", "0.6151476", "0.611583", "0.61133593", "0.6090749", "0.60811317", "0.6079257", "0.6077581", "0.6061189", "0.60571057", "0.60567313", "0.604086", "0.60402095", "0.6023968", "0.5998345", "0.59737396", "0.5953091", "0.59530133", "0.5949461", "0.59411466", "0.5930363", "0.5922906", "0.5907317", "0.59028363", "0.59028363", "0.59028363", "0.59028363", "0.59026974", "0.5901726", "0.5897633", "0.5896806", "0.58960193", "0.5892493", "0.5887577", "0.58867276", "0.5881633", "0.5881273", "0.5877904", "0.58572924", "0.58491135", "0.5832234", "0.58279884", "0.5824879", "0.581493", "0.5804098", "0.5792823", "0.5790927", "0.57781595", "0.5777819", "0.57721454", "0.57640684", "0.5760117", "0.57587993", "0.5757621", "0.57541466", "0.5753907", "0.57524836", "0.57524836", "0.57524836", "0.5750834", "0.57478815", "0.5745388", "0.57436216", "0.57407886", "0.57369465", "0.57363325", "0.5734245", "0.57314795" ]
0.0
-1
Add particle to engine
public void add(Particle particle) { this.particles.add(particle); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Particles particles();", "public void spawnParticle(String particle, double x, double y, double z, double dx, double dy, double dz, double speed, int count);", "protected void playParticle(){\n\t\teffectData.getPlayParticles().playParticles(effectData, effectData.getDisplayAt());\n\t}", "@External\r\n\t@ClientFunc\r\n\tpublic MetaVarCLuaParticle Add(MetaVarString materialVar,MetaVarVector positionVar);", "public void spawnParticle ( Particle particle , double x , double y , double z , int count , double offsetX ,\n\t\t\tdouble offsetY , double offsetZ , double extra ) {\n\t\tspawnParticle ( particle , x , y , z , count , offsetX , offsetY , offsetZ );\n\t}", "public void place (Particle particle)\n {\n _layer.pointToLayer(place(particle.getPosition()), true);\n }", "public void drawParticles() {}", "@Override\n public SpriteParticleSystem build(Engine engine, float fontX, float fontY)\n {\n\t final float particlesXSpawn = fontX;\n\t final float particlesYSpawn = fontY;\n\n\t //Max & min rate are the maximum particles per second and the minimum particles per second.\n\t final float maxRate = 100;\n\t final float minRate = 80;\n\n\t //This variable determines the maximum particles in the particle system.\n\t final int maxParticles = 30;\n\n\t //Particle emitter which will set all of the particles at a ertain point when they are initialized.\n\t final PointParticleEmitter pointParticleEmtitter = new PointParticleEmitter(particlesXSpawn, particlesYSpawn);\n\n\t //Creating the particle system.\n\t\tparticleSystem = new SpriteParticleSystem (pointParticleEmtitter, maxRate, minRate, maxParticles, ResourcesManager.getInstance().waterDrop, vbom);\n\n\t //And now, lets create the initiallizers and modifiers.\n\t //Velocity initiallizer - will pick a random velocity from -20 to 20 on the x & y axes. Play around with this value.\n\t particleSystem.addParticleInitializer(new VelocityParticleInitializer<Sprite>(-25, 25, 0, 150));\n\n\t //Acceleration initializer - gives all the particles the earth gravity (so they accelerate down).\n\t particleSystem.addParticleInitializer(new GravityParticleInitializer<Sprite>());\n\n\t //And now, adding an alpha modifier, so particles slowly fade out. This makes a particle go from alpha = 1 to alpha = 0 in 3 seconds, starting exactly when the particle is spawned.\n\t //particleSystem.addParticleModifier(new AlphaParticleModifier<Sprite>(1, 0, 0, 0));\n\n\t //Lastly, expire modifier. Make particles die after 3 seconds - their alpha reached 0.\n\t particleSystem.addParticleInitializer(new ExpireParticleInitializer<Sprite>(3)); \n\n\t return particleSystem;\n}", "@Override\n \t\t\t\tpublic void doCreateQuadParticle() {\n \n \t\t\t\t}", "public void spawnParticle ( Particle particle , double x , double y , double z , int count , double offsetX ,\n\t\t\tdouble offsetY , double offsetZ ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( new Location ( getWorld ( ) , x , y , z ) ,\n\t\t\t\t\t\t\t\t\t ( float ) offsetX , ( float ) offsetY , ( float ) offsetZ ,\n\t\t\t\t\t\t\t\t\t 1.0F , count , null , handle );\n\t\t} );\n\t}", "public void spawnParticle ( Particle particle , double x , double y , double z , int count ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( new Location ( getWorld ( ) , x , y , z ) ,\n\t\t\t\t\t\t\t\t\t 0.0F , 0.0F , 0.0F , 1.0F , count , null , handle );\n\t\t} );\n\t}", "public void secrete() {\n\t\t/* Instantiate a new virus particle */\n\t\tSim.lps.add(new Lambda_phage(prob_surface, prob_enzymes));\n\t}", "@Override\n \t\t\t\tpublic void doCreateLineParticle() {\n \n \t\t\t\t}", "private void createParticle(double par1, double par3, double par5, double par7, double par9, double par11, int[] par13ArrayOfInteger, int[] par14ArrayOfInteger, boolean par15, boolean par16)\n {\n EntityFireworkSparkFX entityfireworksparkfx = new EntityFireworkSparkFX(this.worldObj, par1, par3, par5, par7, par9, par11, this.theEffectRenderer);\n entityfireworksparkfx.setTrail(par15);\n entityfireworksparkfx.setTwinkle(par16);\n int i = this.rand.nextInt(par13ArrayOfInteger.length);\n entityfireworksparkfx.setColour(par13ArrayOfInteger[i]);\n\n if (par14ArrayOfInteger != null && par14ArrayOfInteger.length > 0)\n {\n entityfireworksparkfx.setFadeColour(par14ArrayOfInteger[this.rand.nextInt(par14ArrayOfInteger.length)]);\n }\n\n this.theEffectRenderer.addEffect(entityfireworksparkfx);\n }", "public VParticle addParticle(VParticle particle) {\n\t\tVParticle p = returnIfConstrained(particle);\n\t\t\n\t\t//particles.add(p);\n\t\treturn p;\n\t}", "public void spawnParticle ( Particle particle , Location location , int count ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( location , 0.0F , 0.0F , 0.0F , 1.0F , count , null , handle );\n\t\t} );\n\t}", "public void spawnParticle ( Particle particle , Location location , int count , double offsetX , double offsetY ,\n\t\t\tdouble offsetZ , double extra ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( location ,\n\t\t\t\t\t\t\t\t\t ( float ) offsetX , ( float ) offsetY , ( float ) offsetZ ,\n\t\t\t\t\t\t\t\t\t 1.0F , count , null , handle );\n\t\t} );\n\t}", "public void place (Particle particle) {\n float exp = solid ? 3f : 2f;\n float distance = FloatMath.pow(FloatMath.random(\n FloatMath.pow(nearDistance, exp), FloatMath.pow(farDistance, exp)),\n 1f / exp);\n\n // find the location of the edges at the distance\n Camera camera = layer.getCamera();\n float scale = distance / camera.getNear();\n float left = camera.getLeft() * scale;\n float right = camera.getRight() * scale;\n float bottom = camera.getBottom() * scale;\n float top = camera.getTop() * scale;\n\n // if it's solid, choose a random point in the rect; otherwise, choose an edge\n // pair according to their lengths\n Vector3f position = particle.getPosition();\n if (solid) {\n position.set(\n FloatMath.random(left, right),\n FloatMath.random(bottom, top),\n -distance);\n } else {\n float width = right - left;\n float height = top - bottom;\n Randoms r = Randoms.threadLocal();\n if (r.getFloat(width + height) < width) {\n position.set(\n r.getInRange(left, right),\n r.getBoolean() ? top : bottom,\n -distance);\n } else {\n position.set(\n r.getBoolean() ? left : right,\n r.getInRange(top, bottom),\n -distance);\n }\n }\n\n // transform into world space, then into layer space\n layer.pointToLayer(camera.getWorldTransform().transformPointLocal(position),\n false);\n }", "public void spawnParticle ( Particle particle , Location location , int count ,\n\t\t\tdouble offsetX , double offsetY , double offsetZ ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( location ,\n\t\t\t\t\t\t\t\t\t ( float ) offsetX , ( float ) offsetY , ( float ) offsetZ ,\n\t\t\t\t\t\t\t\t\t 1.0F , count , null , handle );\n\t\t} );\n\t}", "public void setParticles(int particles) {\r\n\t\tthis.particles = particles;\r\n\t}", "private static void createNewParticles(int number) {\n\t\t// The following declarations are to initialize the random range for the \n\t\t// particle's feature\n\t\tint maxX = Fountain.positionX + 3;\n\t\tint minX = Fountain.positionX - 3;\n\t\tint boundX = maxX - minX;\n\t\tint maxY = Fountain.positionY + 3;\n\t\tint minY = Fountain.positionY - 3;\n\t\tint boundY = maxY - minY;\n\t\t\n\t\tint particleCount = 0; // For counting the new particles' amount\n\n\t\t\n\t\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\t\tif (particles[i] == null) {\n\t\t\t\t\t++particleCount;\n\t\t\t\t\t\n\t\t\t\t\t// Following codes are to prepare the setting for the particle\n\t\t\t\t\tint positionX = randGen.nextInt(boundX + 1) + maxX;\n\t\t\t\t\tint positionY = randGen.nextInt(boundY + 1) + maxY;\n\t\t\t\t\tfloat xVelocity = -1 + randGen.nextFloat() * (2);\n\t\t\t\t\tfloat yVelocity = -10 + randGen.nextFloat() * (5);\n\t\t\t\t\tfloat amount = randGen.nextFloat() * 1;\n\t\t\t\t\tint color = Utility.lerpColor(Fountain.startColor, Fountain.endColor, amount);\n\t\t\t\t\tfloat size = randGen.nextFloat() * (11 - 4);\n\t\t\t\t\tint age = randGen.nextInt(40 + 1);\n\t\t\t\t\tint transparency = randGen.nextInt((96)) + 32;\n\t\t\t\t\t\n\t\t\t\t\t// TO set the new particle with random feature\n\t\t\t\t\tparticles[i] = new Particle();\n\t\t\t\t\tparticles[i].setPositionX(positionX);\n\t\t\t\t\tparticles[i].setPositionY(positionY);\n\t\t\t\t\tparticles[i].setVelocityX(xVelocity);\n\t\t\t\t\tparticles[i].setVelocityY(yVelocity);\n\t\t\t\t\tparticles[i].setSize(size);\n\t\t\t\t\tparticles[i].setColor(color);\n\t\t\t\t\tparticles[i].setAge(age);\n\t\t\t\t\tparticles[i].setTransparency(transparency);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Once after creating 10 new particles, ends this method\n\t\t\t\tif (particleCount >= number) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private static void updateParticle(int index) {\n\n\t\tfloat posX = particles[index].getPositionX(); // Current X position of the particle\n\t\tfloat posY = particles[index].getPositionY(); // Current Y position of the particle\n\t\tfloat vX = particles[index].getVelocityX(); // Current horizontal velocity of the particle\n\t\tfloat vY = particles[index].getVelocityY();\t// Current vertical velocity of the particle\n\t\tint age = particles[index].getAge();\t// Current age of the particle\n\t\t\n\t\t// Fill the circle's color and transparency\n\t\tUtility.fill(particles[index].getColor(), particles[index].getTransparency());\n\t\t\n\t\t// Draw the circle\n\t\tUtility.circle(posX, posY, particles[index].getSize());\n\t\t\n\t\t// Update vertical velocity effected by gravity\n\t\tvY = vY + 0.3f;\n\t\t// Update the particle's vertical velocity, XY positions and its age\n\t\tparticles[index].setVelocityY(vY);\n\t\tparticles[index].setPositionX(posX + vX);\n\t\tparticles[index].setPositionY(posY + vY);\n\t\tparticles[index].setAge(age + 1);\n\t\t\n\t\t// Call this method to remove the old particles\n\t\tremoveOldParticles(80);\n\t\t\n\n\t}", "@Test\n\tpublic void simpleAdvances() {\n\t\tmodel.addParticle(new Vector(300, 300), 1.0, new Vector(), 10.0);\n\t\tmodel.advance();\n\t\t//StdOut.println(\"\" + model.getParticleAt(0).getPosition().toString());\n\t}", "public Particle() {\n\t}", "public static native int OpenMM_AmoebaWcaDispersionForce_addParticle(PointerByReference target, double radius, double epsilon);", "@Override\n\tpublic ParticleSystem<Sprite> build(Engine engine, float fontX,\n\t\t\tfloat fontY, ITextureRegion texture) {\n\t\treturn null;\n\t}", "public Particle(String id, String spritename) {\r\n\t\tsuper(id);\r\n\t\tsprite = Sprite.getSprite(spritename); //FIXME: use a generic particle sprite\r\n\t}", "public Particle(int id, int xTile, int yTile, int lifetime, MovementType mType) {\n this.id = id;\n this.lifetime = lifetime;\n \n this.mType = mType;\n \n //Insert this particle type into the list of particle types\n particles[id] = this;\n \n //Calculate the indexed location of this particle on the SpriteSheet\n tileID = xTile + yTile * (Screen.TILE_SHEET_SIZE / Screen.TILE_SIZE);\n }", "public void _applyModifier(Particle particle) {\n this.particle = particle;\n life = particle.life;\n outer = particle.outer;\n texture = particle.texture;\n sprite = particle.sprite;\n isInnerScreen = particle.isInnerScreen;\n this.physicParticle = particle.physicParticle;\n x = physicParticle.x;\n y = physicParticle.y;\n mass = physicParticle.mass;\n charge = physicParticle.charge;\n\n modify();\n }", "public void onUpdate() {\n super.onUpdate();\n\n if (this.world.isRemote) {\n double d0 = this.posX + (this.rand.nextDouble() * 2.0D - 1.0D) * (double) this.width * 0.5D;\n double d1 = this.posY + 0.05D + this.rand.nextDouble() * 1.0D;\n double d2 = this.posZ + (this.rand.nextDouble() * 2.0D - 1.0D) * (double) this.width * 0.5D;\n //double d3 = (this.rand.nextDouble() * 2.0D - 1.0D) * 0.3D;\n double d4 = this.rand.nextDouble() * 0.1D;\n //double d5 = (this.rand.nextDouble() * 2.0D - 1.0D) * 0.3D;\n this.world.spawnParticle(ticksExisted % 2 == 0 ? EnumParticleTypes.FLAME : EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0, d4, 0);\n } else if (--this.lifeTicks < 0) {\n this.setDead();\n }\n }", "public ParticleEmotion(World world, Entity host, double posX, double posY, double posZ, float height, int hostType, int emoType)\r\n {\r\n super(world, posX, posY, posZ);\r\n this.host = host;\r\n this.setSize(0F, 0F);\r\n this.setPosition(posX, posY, posZ);\r\n this.prevPosX = posX;\r\n this.prevPosY = posY;\r\n this.prevPosZ = posZ;\r\n this.motionX = 0D;\r\n this.motionZ = 0D;\r\n this.motionY = 0D;\r\n this.particleType = emoType;\r\n this.particleScale = this.rand.nextFloat() * 0.05F + 0.275F;\r\n this.particleAlpha = 0F;\r\n this.playSpeed = 1F;\r\n this.playSpeedCount = 0F;\r\n this.stayTick = 10;\r\n this.stayTickCount = 0;\r\n this.fadeTick = 0;\r\n this.fadeState = 0; //0:fade in, 1:normal, 2:fade out, 3:set dead\r\n this.frameSize = 1;\r\n this.addHeight = height;\r\n this.hostType = hostType; //0:any entity, 1:entity, 2:block\r\n this.particleAge = -1; //prevent showing the emo's initial moving from posY = 0\r\n this.canCollide = false;\r\n \r\n //set icon position\r\n switch(this.particleType)\r\n {\r\n case 1: //小愛心\r\n \tthis.particleIconX = 0.0625F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 4;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n\t\t\tbreak;\r\n case 2: //噴汗\r\n \tthis.particleIconX = 0.0625F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 3;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 5;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \tbreak;\r\n case 3: //問號\r\n \tthis.particleIconX = 0.125F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n\t\t\tbreak;\r\n case 4: //驚嘆號\r\n \tthis.particleIconX = 0.125F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \tbreak;\r\n case 5: //點點點\r\n \tthis.particleIconX = 0.1875F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n\t\t\tbreak;\r\n case 6: //冒青筋\r\n \tthis.particleIconX = 0.1875F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \tbreak;\r\n case 7: //音符\r\n \tthis.particleIconX = 0.25F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 15;\r\n \tthis.playTimes = 1;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//short stay\r\n \tthis.stayTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.7F;\r\n \tbreak;\r\n case 8: //cry\r\n \tthis.particleIconX = 0.3125F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 3;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n \tbreak;\r\n case 9: //流口水\r\n \tthis.particleIconX = 0.3125F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 2;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 1;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n \tbreak;\r\n case 10: //混亂\r\n \tthis.particleIconX = 0.375F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 4;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//short stay\r\n \tthis.stayTick = 1;\r\n \tbreak;\r\n case 11: //尋找\r\n \tthis.particleIconX = 0.375F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 2;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//short stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \tbreak;\r\n case 12: //驚嚇\r\n \tthis.particleIconX = 0.4375F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 14;\r\n \tthis.playTimes = 1;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \t//large frame\r\n \tthis.frameSize = 2;\r\n \tbreak;\r\n case 13: //點頭\r\n \tthis.particleIconX = 0.5F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 2;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \tbreak;\r\n case 14: //+_+\r\n \tthis.particleIconX = 0.5F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 2;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \tbreak;\r\n case 15: //kiss\r\n \tthis.particleIconX = 0.5625F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//long stay\r\n \tthis.stayTick = 15;\r\n \t//slow play\r\n \tthis.playSpeed = 0.7F;\r\n \tbreak;\r\n case 16: //lol\r\n \tthis.particleIconX = 0.5625F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 3;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \tbreak;\r\n case 17: //奸笑\r\n \tthis.particleIconX = 0.625F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 15;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n \tbreak;\r\n case 18: //殘念\r\n \tthis.particleIconX = 0.6875F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.4F;\r\n \tbreak;\r\n case 19: //舔舔\r\n \tthis.particleIconX = 0.6875F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 3;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \tbreak;\r\n case 20: //orz\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n \tbreak;\r\n case 21: //O\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 22: //X\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.5625F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 23: //!?\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.625F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 24: //rock\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.6875F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 25: //paper\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.75F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 26: //scissors\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.8125F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 27: //-w-\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.875F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 28: //-口-\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.9375F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 29: //blink\r\n \tthis.particleIconX = 0.8125F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.35F;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \tbreak;\r\n case 30: //哼\r\n \tthis.particleIconX = 0.8125F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \t//short stay\r\n \tthis.stayTick = 3;\r\n \tbreak;\r\n case 31: //臉紅紅\r\n \tthis.particleIconX = 0.875F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 3;\r\n \tthis.particleScale += 0.2F;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \t//long stay\r\n \tthis.stayTick = 30;\r\n \tbreak;\r\n case 32: //尷尬\r\n \tthis.particleIconX = 0.875F;\r\n \tthis.particleIconY = 0.25F;\r\n \tthis.particleMaxAge = 5;\r\n \tthis.playTimes = 4;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \tbreak;\r\n case 33: //:P\r\n \tthis.particleIconX = 0.875F;\r\n \tthis.particleIconY = 0.625F;\r\n \tthis.particleMaxAge = 4;\r\n \tthis.playTimes = 1;\r\n \t//slow play\r\n \tthis.playSpeed = 0.25F;\r\n \t//long stay\r\n \tthis.stayTick = 30;\r\n \tbreak;\r\n case 34: //|||\r\n \tthis.particleIconX = 0.875F;\r\n \tthis.particleIconY = 0.9375F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.particleScale += 0.3F;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 50;\r\n \tbreak;\r\n default: //汗\r\n \tthis.particleIconX = 0F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 15;\r\n \tthis.playTimes = 1;\r\n\t\t\tbreak;\r\n }\r\n \r\n //init position\r\n this.px = posX;\r\n this.py = posY;\r\n this.pz = posZ;\r\n this.addx = 0D;\r\n this.addy = 0D;\r\n this.addz = 0D;\r\n \r\n calcParticlePosition();\r\n }", "@Override\n\tpublic void onClick(View arg0) {\n\t\tParticleSystem ps = new ParticleSystem(this, 100, R.drawable.star_pink, 800);\n\t\tps.setScaleRange(0.7f, 1.3f);\n\t\tps.setSpeedRange(0.1f, 0.25f);\n\t\tps.setAcceleration(0.0001f, 90);\n\t\tps.setRotationSpeedRange(90, 180);\n\t\tps.setFadeOut(200, new AccelerateInterpolator());\n\t\tps.oneShot(arg0, 100);\n\t}", "public ParticleSystem (GlContext ctx, Scope parentScope, ParticleSystemConfig config)\n {\n super(ctx, parentScope);\n setConfig(ctx, config);\n }", "public static native int OpenMM_AmoebaVdwForce_addParticle(PointerByReference target, int parentIndex, double sigma, double epsilon, double reductionFactor, int isAlchemical);", "public static void showParticle(Player p, Location loc, EnumParticle particle, int amount){\n PacketPlayOutWorldParticles pckt = new PacketPlayOutWorldParticles(particle, false, (float) loc.getX(), (float) loc.getY(), (float) loc.getZ(), 0f, 0f, 0f, /*speed*/0f, amount);\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(pckt);\n }", "boolean emitParticleMaybe(RenderState renderData, IParticle reusedParticle, PointF point, PointF vec);", "private void draw() {\n ctx.clearRect(0, 0, width, height);\n\n for (ImageParticle p : particles) {\n p.opacity = p.remainingLife / p.life * 0.5;\n\n // Draw particle from image\n ctx.save();\n ctx.translate(p.x, p.y);\n ctx.scale(p.size, p.size);\n //ctx.translate(p.image.getWidth() * (-0.5), p.image.getHeight() * (-0.5));\n ctx.translate(-HALF_WIDTH, -HALF_HEIGHT);\n ctx.setGlobalAlpha(p.opacity);\n ctx.drawImage(p.image, 0, 0);\n ctx.restore();\n\n //p.remainingLife--;\n p.remainingLife *= 0.98;\n //p.size *= 0.99;\n p.x += p.vX;\n p.y += p.vY;\n\n //regenerate particles\n if (p.remainingLife < 0 || p.size < 0 || p.opacity < 0.01) {\n if (running) {\n p.reInit();\n } else {\n particles.remove(p);\n }\n }\n }\n }", "public ParticleSystemPainter(EffectManager effectManager) {\r\n\t\tthis.effectManager = effectManager;\r\n\t}", "public static void update() {\n\t\t\n\t\t// Fill the background for every call\n\t\tUtility.background(Utility.color(235, 213, 186));\n\t\t\n\t\t// Create 10 new random particles\n\t\tcreateNewParticles(10);\n\t\t\n\t\t// Track every particle in the array then update their feature\n\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\tif (particles[i] != null) {\n\t\t\t\tupdateParticle(i);\n\t\t\t}\n\n\t\t}\n\n\t}", "public void mouseDragged() {\n pma_ParticleVerlet p = new pma_ParticleVerlet(mouseX,mouseY);\n p.lock();\n // if there is at least one particle and this is the current continuous line\n if (physics.particles.size() > 0 && continuous == current) {\n // get the previous particle (aka the last in the list)\n pma_ParticleVerlet prev = physics.particles.get(physics.particles.size()-1);\n // create a spring between the previous and the current particle of length 10 and strength 1\n pma_Spring s = new pma_Spring(p,prev,10,1);\n // add the spring to the physics system\n physics.addSpring(s);\n } else {\n current = continuous;\n }\n // unlock previous particle\n if (prev!=null) {\n prev.unlock();\n }\n // add the particle to the physics system\n physics.addParticle(p);\n // create a forcefield around this particle with radius 20 and force -1.5 (aka push)\n pma_i_BehaviorParticle b = new pma_BehaviorAttraction(p,20,-1.5f);\n // add the behavior to the physics system (will be applied to all particles)\n physics.addBehavior(b);\n // make current particle the previous one...\n prev=p;\n}", "public void addEntity(final Entity aEntity)\r\n\t{\r\n\t\tif ( !aEntity.isParticle() && mEntities.containsKey(aEntity.getId()))\r\n\t\t{\r\n\t\t\taEntity.init(this, aEntity.getId());\r\n\t\t\treturn;\r\n\t\t}\r\n\t\taEntity.init(this, generateId());\r\n\t\tmAddEntities.put(aEntity.getId(), aEntity);\r\n\t}", "public Particle(double xstart, double ystart, double velx, double vely, Compound c) {\r\n\t\tpos = new Vector(xstart, ystart);\r\n\t\tvel = new Vector(velx, vely);\r\n\t\tcompound = c;\r\n\t\tactivated = false;\r\n\t}", "public void addedToWorld(World w){\n PauseWorld world = (PauseWorld) w;\n world.addObject(nameLabel,this.getX(),this.getY()+itemSize/2+10);\n }", "public void addPoint(Point3d p) {\n\n\t\t// Add the new point\n\t\tpoints.add(p);\n\n\t\tgeneratePoints();\n\t}", "public static native int OpenMM_HippoNonbondedForce_addParticle(PointerByReference target, double charge, PointerByReference dipole, PointerByReference quadrupole, double coreCharge, double alpha, double epsilon, double damping, double c6, double pauliK, double pauliQ, double pauliAlpha, double polarizability, int axisType, int multipoleAtomZ, int multipoleAtomX, int multipoleAtomY);", "private void createParticleOutsideOfBB(){\n\t\tint x = 0;\n\t\tint y = 0;\n\t\tint r = randInt.getRandInt(1, 4);\n\t\tif(movementType == 0){\n\t\t\tx = randInt.getRandInt(0,xMin);\n\t\t\ty = randInt.getRandInt(0,799);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tswitch (r) {\n\t\t\tcase 1: \n\t\t\t\tx = randInt.getRandInt(0,599);\n\t\t\t\ty = randInt.getRandInt(0,yMin);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tx = randInt.getRandInt(0,599);\n\t\t\t\ty = randInt.getRandInt(yMax,799);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tx = randInt.getRandInt(0,xMin);\n\t\t\t\ty = randInt.getRandInt(0,799);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tx = randInt.getRandInt(xMax,599);\n\t\t\t\ty = randInt.getRandInt(0,799);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tparticleCollection.add(new Particle(x,y,1,1,width,height,randInt.getRandInt(0,1),randInt.getRandInt(0,1),worldMatrix));\n\t}", "public static void displaySingleParticle(Player p, float x, float y, float z, ParticleColor color){\n PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(EnumParticle.REDSTONE, true, x, y, z, color.getRed(), color.getGreen(), color.getBlue(), 1, 0, 0);\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet);\n }", "public void addNoCollisionElement(Particle p)\n {\n noCollisionElements.add(p);\n p.addNoCollisionElementFree(this);\n }", "protected void addPhoton(Photon p){\n\t\tdouble w = p.getWavelength();\n\t\t\n\t\tdouble deltaE = p.getIntensity()*Settings.HC_CONSTANT/w;\n\t\tint i = getBinIndex(w);\n\t\tif(i != -1){\n\t\t\tm_bins[i] += deltaE;\n\t\t}\n\t\tm_totalEnergy += deltaE;\n\t}", "public void subscribe(Particle p) {\n p_sub_queue.add(p);\n }", "List<? extends Particle> update(double timeDelta);", "public void addRandomParticles(int n, Compound c, double temperature) {\r\n\t\tVector dim = Vector.sub(phys.getboundBR(), phys.getboundTL());\r\n\t\tVector center = Vector.add(phys.getboundBR(), phys.getboundTL()).mul(0.5);\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tdouble angle = Math.random()*2.0*Math.PI;\r\n\t\t\tdouble speed = Math.sqrt(PhysicsSimulation.BOLTZMANN * temperature * 3.0 / c.getmass());\r\n\t\t\tParticle p = new Particle((Math.random() - 0.5)*dim.x + center.x, (Math.random() - 0.5)*dim.y + center.y, speed * Math.cos(angle), speed * Math.sin(angle), c);\r\n\t\t\tphys.addParticle(p);\r\n\r\n\t\t\t//System.out.println(p.getVelocity());\r\n\t\t\t//System.out.println(p.getPosition());\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void explosion(){\n explosionEffect.play(pitch, volume);\n }", "public static void setup() {\n\t\ttestUpdateParticle();\n\t\ttestRemoveOldParticles();\n\t\t\n\t\tif (testUpdateParticle() == true || testRemoveOldParticles() == true) {\n\t\t\tSystem.out.println(\"FAILED\");\n\t\t}\n\t\t\n\t\t// Build a new random field.\n\t\trandGen = new Random();\n\n\t\tpositionX = 400; // middle of the screen (left to right): 400\n\t\tpositionY = 300; // middle of the screen (top to bottom): 300\n\t\tstartColor = Utility.color(23, 141, 235); // blue: Utility.color(23,141,235)\n\t\tendColor = Utility.color(23, 200, 255); // lighter blue: Utility.color(23,200,255)\n\t\t\n\t\t// This array can store 800 particles\n\t\tparticles = new Particle[800];\n\n\t}", "@Override\n\tprotected void onInitializeParticle(final Particle pParticle, final float pAlpha) {\n\t\tpParticle.setAlpha(pAlpha);\n\t}", "public static native int OpenMM_AmoebaGeneralizedKirkwoodForce_addParticle(PointerByReference target, double charge, double radius, double scalingFactor);", "private void displayParticles(Player p, double radius, ParticleColor color){\n //just some math to create a circle, and send it to the player. z+0.1f so they arent inside of the bottom block.\n double part = 2 * Math.PI / particlePoints;\n for (int i = 0; i < particlePoints; i++)\n {\n double alpha = part * i;\n float x = (float) (location.getX() + radius * Math.cos(alpha));\n float z = (float) (location.getZ() + radius * Math.sin(alpha));\n float y = (float) (location.getY()+0.1f);\n PacketHelper.displaySingleParticle(p, x, y, z, color);\n }\n }", "public EntityDataParticle() {\n\t\tm_speed=0.5f;\n\t\tm_rotation=0;\n\t\tm_duration=0.5f;\n\t\tm_type=0;\n\t}", "private ParticleMesh createExplosion() {\r\n ParticleMesh pMesh = ParticleFactory.buildParticles(\"explosion\", 30);\r\n pMesh.setEmissionDirection(new Vector3f(0.0f, 1.0f, 0.0f));\r\n pMesh.setMaximumAngle(3.1415927f);\r\n pMesh.setMinimumAngle(0);\r\n pMesh.getParticleController().setSpeed(0.1f);\r\n pMesh.setMinimumLifeTime(20.0f);\r\n pMesh.setMaximumLifeTime(150.0f);\r\n pMesh.setStartSize(15);\r\n pMesh.setEndSize(2);\r\n pMesh.getParticleController().setControlFlow(false);\r\n pMesh.getParticleController().setRepeatType(Controller.RT_CLAMP);\r\n pMesh.warmUp(80);\r\n pMesh.setInitialVelocity(2.5f);\r\n pMesh.setStartColor(new ColorRGBA(1.0f, 0.312f, 0.121f, 1.0f));\r\n pMesh.setEndColor(new ColorRGBA(1.0f, 0.24313726f, 0.03137255f, 0.0f));\r\n pMesh.setRenderState(ts);\r\n pMesh.setRenderState(bs);\r\n pMesh.setRenderState(zs);\r\n\r\n rootNode.attachChild(pMesh);\r\n rootNode.updateRenderState();\r\n \r\n explosions.add(pMesh);\r\n \r\n return pMesh;\r\n }", "public void addEntity(final Entity aEntity, final int aX, final int aY)\r\n\t{\r\n\t\tif ( !aEntity.isParticle() && mEntities.containsKey(aEntity.getId()))\r\n\t\t{\r\n\t\t\taEntity.init(this, aEntity.getId());\r\n\t\t\treturn;\r\n\t\t}\r\n\t\taEntity.init(this, generateId());\r\n\t\taEntity.setX(aX);\r\n\t\taEntity.setY(aY);\r\n\t\tmAddEntities.put(aEntity.getId(), aEntity);\r\n\t}", "public static native int OpenMM_AmoebaPiTorsionForce_addPiTorsion(PointerByReference target, int particle1, int particle2, int particle3, int particle4, int particle5, int particle6, double k);", "private void addEvent() {\n String name = selectString(\"What is the name of this event?\");\n ReferenceFrame frame = selectFrame(\"Which frame would you like to define the event in?\");\n double time = selectDouble(\"When does the event occur (in seconds)?\");\n double x = selectDouble(\"Where does the event occur (in light-seconds)?\");\n world.addEvent(new Event(name, time, x, frame));\n System.out.println(\"Event added!\");\n }", "public void add(Point p) {\n add(p.xyz.x, p.xyz.y, p.xyz.z);\n }", "public void addPart() {\n\t\tengineCat.addPart(eg100);\n\t\tengineCat.addPart(eg133);\n\t\tengineCat.addPart(eg210);\n\t\tengineCat.addPart(ed110);\n\t\tengineCat.addPart(ed180);\n\t\tengineCat.addPart(eh120);\n\t\t\n\t\ttransCat.addPart(tm5);\n\t\ttransCat.addPart(tm6);\n\t\ttransCat.addPart(ta5);\n\t\ttransCat.addPart(ts6);\n\t\ttransCat.addPart(tsf7);\n\t\ttransCat.addPart(tc120);\n\t\t\n\t\textCat.addPart(xc);\n\t\textCat.addPart(xm);\n\t\textCat.addPart(xs);\n\t\t\n\t\tintCat.addPart(in);\n\t\tintCat.addPart(ih);\n\t\tintCat.addPart(is);\n\t}", "public Particle(double x, double y, int depth)\n\t{\n\t\tposition = new Vec3f(x,y,0);\n\t\tthis.depth=depth;\n\t}", "protected void onDespawn() {\r\n\r\n\t\tfor (int i = 0; i < 20; i++) {\r\n\t\t\tdouble randX = rand.nextDouble(), randZ = rand.nextDouble(), randY = rand.nextGaussian();\r\n\t\t\trandX = randX * (getEntityBoundingBox().maxX - getEntityBoundingBox().minX) + getEntityBoundingBox().minX;\r\n\t\t\trandZ = randZ * (getEntityBoundingBox().maxZ - getEntityBoundingBox().minZ) + getEntityBoundingBox().minZ;\r\n\t\t\trandY += posY;\r\n\t\t\tdouble velX = this.rand.nextGaussian() * 0.01D;\r\n\t\t\tdouble velY = Math.abs(this.rand.nextGaussian() * 0.2D);\r\n\t\t\tdouble velZ = this.rand.nextGaussian() * 0.01D;\r\n\t\t\tworld.spawnParticle(EnumParticleTypes.CLOUD, randX, randY, randZ, velX, velY, velZ);\r\n\t\t}\r\n\t}", "private static boolean testUpdateParticle() {\n\t\tparticles = new Particle[1];\n\t\tparticles[0] = new Particle(3, 3, 10, 10);\n\t\t\n\t\tparticles[0].setVelocityX(-1);\n\t\tparticles[0].setVelocityY(-2);\n\t\tupdateParticle(0);\n\t\t\n\t\tif (particles[0].getPositionX() != 2 || particles[0].getPositionY() != 1.3) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false; \n\t}", "public void draw() {\n\t\tfor (int i = 0; i < particleCount; i++) {\r\n\t\t\tif (particles[i] != null) {\r\n\t\t\t\tglBegin(GL_QUADS);\r\n\t\t\t\t{\r\n\t\t\t\t\tparticles[i].draw();\r\n\t\t\t\t}\r\n\t\t\t\tglEnd();\r\n\t\t\t}\r\n\t\t}\r\n\t\tglColor3f(1, 1, 1);\r\n\t}", "protected void updateParticles() {\n\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tif (p.neighbors == null) {\n\t\t\t\tp.neighbors = particles;\n\t\t\t}\n\t\t\tfor (BehaviorInterface b : behaviors) {\n\t\t\t\tb.apply(p);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tp.scaleVelocity(friction);\n\t\t\tp.update();\n\t\t}\n\t}", "public Particle(Point2D.Double c)\n {\n center = c;\n }", "public void updateParticles() {\n\n // Update walkingAnimation particle effect\n walkingParticleEffect.update(Gdx.graphics.getDeltaTime());\n if(walkingParticleEffect.isComplete()) {\n walkingParticleEffect.reset();\n }\n\n // Update getting hit particle effect\n if(damaged) {\n gettingHitParticleEffect.update(Gdx.graphics.getDeltaTime());\n if(gettingHitParticleEffect.isComplete() && !dead) {\n damaged = false;\n gettingHitParticleEffect.reset();\n }\n }\n }", "public Particle(int x, int y, int life) {\n this.x = x;\n this.y = y;\n this.xDouble = x;\n this.yDouble = y;\n this.zDouble = 0.0;\n this.life = life + (random.nextInt(life) - life / 2);\n this.sprite = particle_normal;\n\n // Sets the distance delta for the particle to travel to a\n // random (bell-curved) value in the range -1 to 1\n this.xDelta = random.nextGaussian() / 2;\n this.yDelta = random.nextGaussian() / 2;\n this.zDelta = random.nextFloat() + 1.5;\n }", "@Override\n\tpublic ParticleEffect load(AssetManager manager, String fileName, FileHandle file,\n\t\t\tParticleEffectParameter parameter) {\n\t\tParticleEffect effect = new ParticleEffect();\n\t\teffect.load(file, file.parent());\n\t\treturn effect;\n\t}", "public void add(Point3 p) {\r\n\t\tadd(p.x, p.y, p.z);\r\n\t}", "public synchronized void emit(int x, int y, int color) {\n int dir = 0;\n if (mType == MovementType.SINK) dir = 1;\n if (mType == MovementType.SPREAD) dir = Statc.random(3, 0);\n \n getActiveParticles().add(new ActiveParticle(x, y, dir, color, this));\n }", "public void onTick() {\n // Tick all particles\n Iterator<Particle> iterator = this.particles.iterator();\n while (iterator.hasNext()) {\n Particle particle = iterator.next();\n\n // Tick this particle\n particle.onTick();\n\n // Remove particle when removed flag is set\n if (particle.removed) {\n iterator.remove();\n }\n }\n }", "public void func_180435_a(TextureAtlasSprite p_180435_1_) {\n/* 215 */ int var2 = getFXLayer();\n/* */ \n/* 217 */ if (var2 == 1) {\n/* */ \n/* 219 */ this.particleIcon = p_180435_1_;\n/* */ }\n/* */ else {\n/* */ \n/* 223 */ throw new RuntimeException(\"Invalid call to Particle.setTex, use coordinate methods\");\n/* */ } \n/* */ }", "@Test\n public void testUpdateParticle() {\n\n pe.updateParticle(p, 0.0f, new Vector3f(), new Vector3f());\n // at the very start of the anim, the particle should be its start size\n assertThat(p.size, is(0.2f));\n // when some time has passed the particle should have a different size\n p.life -= 2.0f;\n pe.updateParticle(p, 2.0f, new Vector3f(), new Vector3f());\n assertThat(p.size, is(0.56f));\n // updating start-size should change the value\n pe.setStartSize(0.7f);\n // please note that there is no change in life here!\n pe.updateParticle(p, 0.0f, new Vector3f(), new Vector3f());\n assertThat(p.size, is(0.96000004f));\n // same goes for endSize\n pe.setEndSize(3.0f);\n pe.updateParticle(p, 0.0f, new Vector3f(), new Vector3f());\n assertThat(p.size, is(1.1600001f));\n }", "public void afterTick(ParticleField field){\n }", "void wildcardParticle(ParticleSG particle) throws SAXException;", "public Explosion(int particleNr, int x, int y) {\r\n\t\tthis.state = STATE_ALIVE;\r\n\t\tthis.particles = new Particle[particleNr];\r\n\t \tfor (int i = 0; i < this.particles.length; i++) {\r\n\t\t\tParticle p = new Particle(x, y);\r\n\t\t\tthis.particles[i] = p;\r\n\t\t}\r\n\t \tthis.size = particleNr;\r\n\t}", "public void addSpawnPoint(float pX, float pY, float pZ,float defaultRot, boolean playerSpawn) {\n //this.testTerrain.setBlockArea( new Vector3Int(5,0,47), new Vector3Int(2,1,2), CubesTestAssets.BLOCK_WOOD);\n Geometry spawnBox = new Geometry(\"Spawn\",new Box(1,2,1));\n Material mat = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\"); \n \n if(playerSpawn) {\n //If playerSpawn == true, set the global spawn point\n this.spawnPoint = new Node(\"Player Spawn Point\");\n this.spawnPoint.setUserData(\"Orientation\",defaultRot);\n mat.setColor(\"Color\", new ColorRGBA(0,0,1,0.5f));\n mat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);\n spawnBox.setMaterial(mat);\n spawnBox.setQueueBucket(Bucket.Transparent);\n this.spawnPoint.attachChild(spawnBox);\n rootNode.attachChild(this.spawnPoint);\n this.spawnPoint.setLocalTranslation((pX * this.blockScale) + (this.blockScale * 0.5f),(pY * this.blockScale) + this.blockScale,(pZ * this.blockScale) + (this.blockScale * 0.5f));\n this.spawnPointList.add(this.spawnPoint);\n } else {\n //If playerSpawn == false, add a mob spawn point\n Node spawn = new Node(\"Mob Spawn Point\");\n spawn.setUserData(\"Orientation\",defaultRot);\n mat.setColor(\"Color\", new ColorRGBA(0.5f,0.5f,0.5f,0.5f));\n mat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);\n spawnBox.setMaterial(mat);\n spawnBox.setQueueBucket(Bucket.Transparent);\n spawn.attachChild(spawnBox);\n rootNode.attachChild(spawn);\n spawn.setLocalTranslation((pX * this.blockScale) + (this.blockScale * 0.5f),(pY * this.blockScale) + this.blockScale,(pZ * this.blockScale) + (this.blockScale * 0.5f));\n this.spawnPointList.add(spawn);\n }\n \n }", "public Particle(float x, float y, float radius) {\n\t\tthis.position = new Vector2d(x, y);\n\t\tthis.radius = radius;\n\t}", "public interface IParticleProviderModel extends IBakedModel {\n\n// /**\n// * Gets the textures to use for hit particles at the given face and hit vector.\n// *\n// * @param hitVec The vector.\n// * @param faceHit The face.\n// * @param world The world.\n// * @param pos The position.\n// * @param state The state.\n// * @return The textures to use.\n// */\n// Iterable<TextureAtlasSprite> getHitEffects(Vector3 hitVec, EnumFacing faceHit, IBlockAccess world, BlockPos pos, IBlockState state);\n//\n// /**\n// * Gets the textures to use for destroy particles.\n// *\n// * @param world The world.\n// * @param pos The position.\n// * @param state The state.\n// * @return The textures to use.\n// */\n// Iterable<TextureAtlasSprite> getDestroyEffects(IBlockAccess world, BlockPos pos, IBlockState state);\n\n}", "public void update(){\n\t\tfor(ParticleEffect effect : effects){\n\t\t\teffect.update();\n\t\t}\n\t}", "@Override\n\tpublic void create() {\n\t\tGdx.gl20.glClearColor(1, 1, 1, 1);\n\n\t\t// instancia batch, asset manager e ambiente 3D\n\t\tmodelBatch = new ModelBatch();\n\t\tassets = new AssetManager();\n\t\tambiente = new Environment();\n\t\tambiente.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));\n\t\tambiente.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\n\t\t// configura a câmera\n\t\tfloat razaoAspecto = ((float) Gdx.graphics.getWidth()) / Gdx.graphics.getHeight();\n\t\tcamera = new PerspectiveCamera(67, 480f * razaoAspecto, 480f);\n\t\tcamera.position.set(1f, 1.75f, 3f);\n\t\tcamera.lookAt(0, 0.35f, 0);\n\t\tcamera.near = 1f;\n\t\tcamera.far = 300f;\n\t\tcamera.update();\n\t\tcameraController = new CameraInputController(camera);\n\t\tGdx.input.setInputProcessor(cameraController);\n\n\t\t// solicita carregamento dos 2 modelos 3D da cena\n\t\tassets.load(\"caldeirao.obj\", Model.class);\n\t\tassets.load(\"caldeirao-jogos.obj\", Model.class);\n\t\tassets.load(\"caldeirao-love.obj\", Model.class);\n\t\tassets.load(\"fogueira.obj\", Model.class);\n\n\t\t// instancia e configura 2 tipos de renderizadores de partículas:\n\t\t// 1. Billboards (para fogo)\n\t\t// 2. PointSprites (para bolhas)\n\t\tBillboardParticleBatch billboardBatch = new BillboardParticleBatch(ParticleShader.AlignMode.Screen, true, 500);\n\t\tPointSpriteParticleBatch pointSpriteBatch = new PointSpriteParticleBatch();\n\t\tsistemaParticulas = new ParticleSystem();\n\t\tbillboardBatch.setCamera(camera);\n\t\tpointSpriteBatch.setCamera(camera);\n\t\tsistemaParticulas.add(billboardBatch);\n\t\tsistemaParticulas.add(pointSpriteBatch);\n\n\t\t// solicita o carregamento dos efeitos de partículas\n\t\tParticleEffectLoader.ParticleEffectLoadParameter loadParam = new ParticleEffectLoader.ParticleEffectLoadParameter(\n\t\t\t\tsistemaParticulas.getBatches());\n\t\tassets.load(\"fogo.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"fogo-jogos.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"fogo-love.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas-jogos.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas-love.pfx\", ParticleEffect.class, loadParam);\n\n\t\t// solicita carregamento da música\n\t\tmusica = Gdx.audio.newMusic(Gdx.files.internal(\"zelda-potion-shop.mp3\"));\n\n\t\taindaEstaCarregando = true;\n\t}", "public void update()\n {\n // start from the bottom of the world\n\n for (int y = height - 1; y >= 0; --y)\n {\n // compute offset to this and next line\n\n int thisOffset = y * width;\n \n // are we at top or bottom?\n\n boolean atTop = y == 0;\n boolean atBot = y == height - 1;\n\n // process line in random order\n \n for (int x: xRndIndex[rnd.nextInt(RND_INDEX_CNT)])\n {\n // index of this pixel\n \n int ip = thisOffset + x;\n \n // value of this pixel\n\n int p = pixels[ip];\n\n // don't process inert matter\n\n if (p == AIR || p == ROCK || p == EARTH)\n continue;\n\n // are we on a left or right edge?\n\n boolean atLeft = x == 0;\n boolean atRight = x == width - 1;\n\n // indices of pixels around this particle\n\n int iuc = ip - width;\n int idc = ip + width;\n int idl = idc - 1;\n int idr = idc + 1;\n int il = ip - 1;\n int ir = ip + 1;\n\n // get pixels for each index\n\n int uc = atTop ? ROCK : pixels[iuc];\n int dc = atBot ? ROCK : pixels[idc];\n int dl = atBot || atLeft ? ROCK : pixels[idl];\n int dr = atBot || atRight ? ROCK : pixels[idr];\n int l = atLeft ? ROCK : pixels[il];\n int r = atRight ? ROCK : pixels[ir];\n \n // the following actions propogate elements around the\n // world, they do not conserve matter\n\n // if fire, propogate fire\n\n if (p == FIRE1 || p == FIRE2 || p == FIRE3 || \n p == FIRE4 || p == FIRE5 || p == FIRE6)\n {\n int[] burn = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n\n\n for (int ib: burn)\n {\n int b = pixels[ib];\n\t\t\t\t\t \n\t\t\t\t\t // fire burns plants and oil, makes steam out of water\n\t\t\t\t\t \n if ((b == PLANT || b == OIL || b == COLUMBINE) &&\n rnd.nextInt(FIRE_CHANCE_IN) == 0)\n pixels[ib] = FIRE1;\n else\n if (b == WATER)\n {\n pixels[ib] = STEAM;\n pixels[ip] = STEAM;\n\t\t\t\t\t\t pixels[iuc] = STEAM;\n p = STEAM;\n break;\n }\n }\n // move fire along\n\n if (p == FIRE1)\n {\n pixels[ip] = FIRE3;\n continue;\n }\n if (p == FIRE2)\n {\n pixels[ip] = FIRE3;\n continue;\n }\n if (p == FIRE3)\n {\n pixels[ip] = FIRE4;\n continue;\n }\n if (p == FIRE4)\n {\n pixels[ip] = FIRE5;\n continue;\n }\n if (p == FIRE5)\n {\n pixels[ip] = FIRE6;\n continue;\n }\n if (p == FIRE6)\n {\n pixels[ip] = AIR;\n continue;\n }\n }\n // if this is steam, evaporate into air\n\n if (p == STEAM)\n { pixels[ip] = AIR;\n continue;\n\t\t\t }\n\n // if this is an everything sucker\n\n if (p == AIR_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n pixels[it] = AIR;\n continue;\n }\n // if this is a water source\n\n if (p == WATER_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR &&\n rnd.nextInt(WATER_CHANCE_IN) == 0)\n pixels[it] = WATER;\n continue;\n }\n // if this is a fire source\n\n if (p == OIL_SOURCE)\n {\n int[] targets = {atRight ? ip : ir,\n atLeft ? ip : il,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR)\n pixels[it] = OIL;\n continue;\n }\n // if this is a sand source\n\n if (p == SAND_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR &&\n rnd.nextInt(SAND_CHANCE_IN) == 0)\n pixels[it] = SAND;\n continue;\n }\n // if this is a plant, propogate growth\n\n if (p == PLANT)\n {\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n int[] targets = {atLeft ? ip : il,\n atLeft || atTop ? ip : iul,\n atRight ? ip : ir,\n atRight || atTop ? ip : iur,\n atTop ? ip : iuc,\n atBot ? ip : idc,\n atBot || atLeft ? ip : idl,\n atBot || atRight ? ip : idr,\n };\n\t\t\t\t if (pixels[idl] == PLANT && pixels[idc] == PLANT && \n\t\t\t\t pixels[idr] == PLANT && pixels[ir] == PLANT && \n\t\t\t\t\t pixels[il] == PLANT && pixels[iuc] == WATER)\n\t\t\t\t\t pixels[ip] = COLUMBINE;\n for (int ix: targets)\n if (pixels[ix] == AIR)\n for (int it: targets)\n if (pixels[it] == WATER && rnd.nextInt(PLANT_CHANCE_IN) == 0)\n pixels[it] = PLANT;\n\t\t\t\t continue;\n }\n // if this is a flower\n\n if (p == COLUMBINE)\n\t\t\t {\n\t\t\t continue;\n\t\t\t }\n // if this is a fire source\n\n if (p == FIRE_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == PLANT || pixels[it] == OIL)\n pixels[it] = FIRE1;\n continue;\n }\n // all actions from this point on conserve matter\n // we only calculate the place to which this particle\n // will move, the the default is to do nothing\n\n int dest = NO_CHANGE;\n \n // if it's a oil\n\n if (p == OIL)\n {\n // compute indices for up left and up right\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n // get pixels for each index\n\n int ul = atTop || atLeft ? ROCK : pixels[iul];\n int ur = atTop || atRight ? ROCK : pixels[iur];\n\n // if there is sand/earth above, erode that\n\n if (uc == EARTH || uc == SAND)\n dest = iuc; \n\n // if pixles up left and up right sand/water\n\n else if ((ul == EARTH || ul == SAND) && \n (ur == EARTH || ur == SAND))\n dest = rnd.nextBoolean() ? iul : iur;\n\n // if air underneath, go down\n \n else if (dc == AIR)\n dest = idc;\n \n // if air on both sides below, pick one\n\n else if (dl == AIR && dr == AIR)\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR)\n dest = idr;\n\n // if air on both sides below, pick one\n\n else if ((l == AIR || l == EARTH || l == SAND) &&\n (r == AIR || r == EARTH || r == SAND))\n dest = rnd.nextBoolean() ? il : ir;\n\n // if air only down left, go left\n\n else if (l == AIR || l == EARTH || l == SAND)\n dest = il;\n\n // if air only down right, go right\n\n else if (r == AIR || r == EARTH || r == SAND)\n dest = ir;\n\n // the case where water flows out two pixels\n \n else\n {\n // get items 2 pixels on either side of this one\n\n int ill = ip - 2;\n int irr = ip + 2;\n int ll = x < 2 ? ROCK : pixels[ill];\n int rr = x > width - 3 ? ROCK : pixels[irr];\n\n // if air on both sides, pick one\n\n if (ll == AIR && rr == AIR)\n dest = rnd.nextBoolean() ? irr : ill;\n \n // if air only right right, go right right\n \n else if (rr == AIR)\n dest = irr;\n \n // if air only left left, go left left\n\n else if (ll == AIR)\n dest = ill;\n }\n }\n // if it's water\n\n else if (p == WATER)\n {\n // compute indices for up left and up right\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n // get pixels for each index\n\n int ul = atTop || atLeft ? ROCK : pixels[iul];\n int ur = atTop || atRight ? ROCK : pixels[iur];\n\n // if there is sand/earth above, erode that\n\n if (uc == EARTH || uc == SAND)\n dest = iuc; \n\n // if pixles up left and up right sand/water\n\n else if ((ul == EARTH || ul == SAND) && \n (ur == EARTH || ur == SAND))\n dest = rnd.nextBoolean() ? iul : iur;\n\n // if air underneath, go down\n \n else if (dc == AIR || dc == OIL)\n dest = idc;\n\n // if air on both sides below, pick one\n\n else if ((dl == AIR || dl == OIL) && (dr == AIR || dr == OIL))\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR || dl == OIL)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR || dr == OIL)\n dest = idr;\n\n // if air on both sides below, pick one\n\n else if ((l == AIR || l == EARTH || l == SAND) &&\n (r == AIR || r == EARTH || r == SAND))\n dest = rnd.nextBoolean() ? il : ir;\n\n // if air only down left, go left\n\n else if (l == AIR || l == EARTH || l == SAND)\n dest = il;\n\n // if air only down right, go right\n\n else if (r == AIR || r == EARTH || r == SAND)\n dest = ir;\n\n // the case where water flows out two pixels\n \n else\n {\n // get items 2 pixels on either side of this one\n\n int ill = ip - 2;\n int irr = ip + 2;\n int ll = x < 2 ? ROCK : pixels[ill];\n int rr = x > width - 3 ? ROCK : pixels[irr];\n\n // if air on both sides, pick one\n\n if (ll == AIR && rr == AIR)\n dest = rnd.nextBoolean() ? irr : ill;\n \n // if air only right right, go right right\n \n else if (rr == AIR)\n dest = irr;\n \n // if air only left left, go left left\n\n else if (ll == AIR)\n dest = ill;\n }\n }\n // all other elements behave like sand\n\n else\n {\n // if air underneath, go down\n \n if (dc == AIR || dc == WATER)\n dest = idc;\n\n // if air on both sides below, pick one\n\n else if ((dl == AIR || dl == WATER) && \n (dr == AIR || dr == WATER))\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR || dl == WATER)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR || dr == WATER)\n dest = idr;\n }\n // if a change is requried, swap pixles\n\n try\n {\n if (dest != NO_CHANGE)\n {\n if (pixels[ip] == WATER_SOURCE)\n out.println(\"swap1 WS & \" + Element.lookup(pixels[dest]));\n if (pixels[dest] == WATER_SOURCE)\n out.println(\"swap2 WS & \" + Element.lookup(pixels[ip]));\n\n pixels[ip] = pixels[dest];\n pixels[dest] = p;\n }\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n out.println(\" X: \" + x);\n out.println(\" Y: \" + y);\n out.println(\"Source: \" + Element.lookup(p));\n out.println(\"Source: \" + Element.lookup(pixels[ip]));\n out.println(\" Dest: \" + Element.lookup(pixels[dest]));\n \n }\n }\n }\n }", "public void addToWorld(World world);", "public static void main(String[] args) {\n double T = Double.parseDouble(args[0]);\n double deltaT = Double.parseDouble(args[1]);\n \n // declares double t, sets to 0\n double t = 0.0;\n \n // declares and sets gravitational constant\n double g = 6.67e-11;\n \n // declares string \"background\" for background image\n String background = \"starfield.jpg\";\n \n // read the first 2 input values from the input\n int N = StdIn.readInt();\n double R = StdIn.readDouble();\n \n // sets the size of the universe\n setUniverse(R);\n \n // declare arrays for each category, each of which has\n // N elements, one for each particle\n double[] px = new double[N]; // array for position of x\n double[] py = new double[N]; // array for position of y\n double[] vx = new double[N]; // array for velocity of x\n double[] vy = new double[N]; // array for velocity of y\n double[] mass = new double[N]; // array for mass\n String[] picture = new String[N]; // array for pictures of particles\n \n \n // fills each array with input information\n for (int i = 0; i < N; i++) {\n \n px[i] = StdIn.readDouble();\n py[i] = StdIn.readDouble();\n vx[i] = StdIn.readDouble();\n vy[i] = StdIn.readDouble();\n mass[i] = StdIn.readDouble();\n picture[i] = StdIn.readString();\n \n }\n \n // draw the universe background\n drawUniverse(background);\n \n // draw each particle in its initial position:\n for (int i = 0; i < N; i++) {\n StdDraw.picture(px[i], py[i], picture[i]);\n }\n \n// Part 3: Update the universe at each time-step\n \n // The following while loop will allow us to calculate the\n // change in position for each particle (based on the force\n // from all other particles), and then redraw the background\n // and particles. The loop also tallies how much \"time\" \n // has gone by so that once the time has summed to T, \n // the program stops executing.\n \n while (t < T) {\n \n // declare new arrays forcex and forcey for the\n // x and y components of the force for each planet\n _______________________________;\n _______________________________;\n \n // In the next section, we want to calculate the force that each\n // body experiences, from all the other bodies combined. To do this,\n // we will need to use a double for loop. It is your job to figure\n // out what happens in each for loop.\n \n // For each body x, for each body y, you'll want to calculate the force\n // that y exerts on x, which is a function of the distance between\n // x and y and the size of x and y. You'll calculate both the force\n // in the x direction and the force in the y direction.\n \n // fills the arrays, with each element\n // corresponding to a different particle\n for (______________________) {\n \n // Runs through the particles, calculating the force\n // from each particle j on the particle i in question\n for (______________________) {\n \n // declares variables for x and y distances between the bodies\n double dx = _______________;\n double dy = _______________;\n \n // calculates the distance between planets i and j\n // note: you can use a method for this!\n double distance = _____________________;\n \n // calculates the overall force between i and j\n double forcej = _______________;\n \n // calculates x and y components of force between i and j\n double forcejx = ______________________;\n double forcejy = ______________________;\n \n // keep track of the net force on particle i \n // in both x and y directions\n forcex[i] = ______________________;\n forcey[i] = ______________________;\n \n }\n }\n \n // draw the universe background\n _______________________________;\n \n // calculate the new velocity and position for each particle\n for (int i = 0; i < N; i++) {\n \n // calculates acceleration in x and y directions\n double ax = _____________________________;\n double ay = _____________________________;\n \n // calculates velocity in x and y directions\n vx[i] = _____________________________;\n vy[i] = _____________________________;\n \n // calculates new x and y coordinates\n // to determine position\n px[i] = _____________________________;\n py[i] = _____________________________;\n \n // draws each particle in its new position\n _____________________________________;\n \n }\n \n // waits 40 milliseconds before continuing\n StdDraw.show();\n StdDraw.pause(20);\n \n // increments t by deltaT\n t = t + deltaT;\n \n }\n \n \n \n \n }", "void effect(Entity e, BoardPosition bp);", "protected void initializeImpl(@NotNull final ParticleData particleData) {\n }", "public void registerBeamEffect(World world, Vector3D origin, Vector3D dest, float r, float g, float b, int lifespan){}", "public void spawnExplosion(Point3d location, double strength, boolean flames){\r\n\t\tworld.newExplosion(null, location.x, location.y, location.z, (float) strength, flames, ConfigSystem.configObject.general.blockBreakage.value);\r\n\t}", "@Action\n public void addPoint() { \n Point2D pt = randomPoint();\n PrimitiveGraphic bp = JGraphics.point(pt, RandomStyles.point());\n bp.setDefaultTooltip(\"<html><b>Point</b>: <i> \" + pt + \"</i>\");\n bp.setDragEnabled(true);\n root1.addGraphic(bp);\n }", "void simpleElementParticle(GroupSG pGroup,ParticleSG particle) throws SAXException;", "public void onLivingUpdate() {\n if (!this.onGround && this.motionY < 0.0D)\n this.motionY *= 0.6D;\n\n\n if (this.ticksExisted % 20 == 0 && this.getHealth() != this.getMaxHealth() && this.getHealth() >= 1)\n this.setHealth(this.getHealth() + 1);\n\n if (worldObj.isRemote) {\n if (this.isSitting())\n worldObj.spawnParticle(EnumParticleTypes.REDSTONE, posX, posY + 1.5, posZ, 0, 0, 0);\n }\n\n if (worldObj.isRemote) {\n MoWitchAndWizard.proxy.spawnParticles(\"air_normal\", this);\n }\n\n super.onLivingUpdate();\n }", "public ArrayList<Particle> getParticles()\n\t{\n\t\treturn particles;\n\t}", "private ParticleEffectFactory(final Node root) {\r\n explosions = new ArrayList<ParticleMesh>();\r\n asteroidTrails = new ArrayList<ParticleMesh>();\r\n missileTrails = new ArrayList<ParticleMesh>();\r\n \r\n rootNode = root;\r\n \r\n DisplaySystem display = DisplaySystem.getDisplaySystem();\r\n bs = display.getRenderer().createBlendState();\r\n bs = DisplaySystem.getDisplaySystem().getRenderer().createBlendState();\r\n bs.setBlendEnabled(true);\r\n bs.setSourceFunction(BlendState.SourceFunction.SourceAlpha);\r\n bs.setDestinationFunction(BlendState.DestinationFunction.One);\r\n bs.setTestEnabled(true);\r\n bs.setTestFunction(BlendState.TestFunction.GreaterThan);\r\n\r\n ts = display.getRenderer().createTextureState();\r\n ts.setTexture(TextureManager.loadTexture(\r\n ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_TEXTURE,\r\n \"data/textures/flaresmall.jpg\"), \r\n Texture.MinificationFilter.BilinearNoMipMaps,\r\n Texture.MagnificationFilter.Bilinear));\r\n\r\n zs = display.getRenderer().createZBufferState();\r\n zs.setWritable(false);\r\n zs.setEnabled(true);\r\n\r\n for (int i = 0; i < 5; i++) {\r\n createExplosion();\r\n }\r\n \r\n for (int i = 0; i < 5; i++) {\r\n createMissileTrail();\r\n }\r\n }", "public void addParticleBoxListener( ParticleBoxListener listener )\n\t{\n\t\tlisteners.add( listener );\n\t}", "@Override\n public void applyParticleAtAttacker(int type, Entity target, float[] vec)\n {\n \t\tTargetPoint point = new TargetPoint(this.dimension, this.posX, this.posY, this.posZ, 64D);\n \n \t\tswitch (type)\n \t\t{\n \t\tcase 1: //light cannon\n \t double shotHeight = 1.85D;\n \t \n \t if(this.isRiding() && this.getRidingEntity() instanceof BasicEntityMount)\n \t {\n \t \tshotHeight = 0.8D;\n \t }\n \t \n \t\t\tCommonProxy.channelP.sendToAllAround(new S2CSpawnParticle(this, target, shotHeight, 0D, 0D, 0, true), point);\n \t\tbreak;\n \t\tcase 2: //heavy cannon\n \t\tcase 3: //light aircraft\n \t\tcase 4: //heavy aircraft\n\t\tdefault: //melee\n\t\t\tCommonProxy.channelP.sendToAllAround(new S2CSpawnParticle(this, 0, true), point);\n\t\tbreak;\n \t\t}\n \t}" ]
[ "0.7365412", "0.7178631", "0.7113928", "0.7029262", "0.6970497", "0.69559187", "0.6900228", "0.67564696", "0.668811", "0.668033", "0.6651162", "0.65242326", "0.64870787", "0.6371064", "0.6351898", "0.6328279", "0.6323555", "0.63193333", "0.6220663", "0.61626494", "0.61371255", "0.61175996", "0.6093591", "0.60722613", "0.6037664", "0.6033809", "0.6021798", "0.6009766", "0.6004937", "0.6004551", "0.5959463", "0.5936861", "0.5902877", "0.58735347", "0.5871187", "0.58624375", "0.5857289", "0.5852043", "0.58150226", "0.5805586", "0.58044976", "0.5794473", "0.5775129", "0.57613885", "0.57605255", "0.57493955", "0.5722421", "0.5719223", "0.57096404", "0.56821847", "0.56575996", "0.5648185", "0.56340027", "0.5633177", "0.5620377", "0.5597566", "0.55936295", "0.55774933", "0.5569038", "0.55561155", "0.5554958", "0.5535711", "0.5534771", "0.55315226", "0.55307686", "0.5482121", "0.54541326", "0.5445148", "0.5442753", "0.5432336", "0.54308426", "0.5428293", "0.54220045", "0.5417329", "0.5413223", "0.53867793", "0.5369644", "0.53647274", "0.5353955", "0.5353479", "0.5340834", "0.53266734", "0.532472", "0.53059435", "0.52978194", "0.5296199", "0.52953935", "0.5295318", "0.5292088", "0.528388", "0.5267441", "0.52658564", "0.5243982", "0.524359", "0.5217929", "0.5208879", "0.5206507", "0.5204256", "0.5203664", "0.5198222" ]
0.75336474
0
Tick all particles and remove dead particles
public void onTick() { // Tick all particles Iterator<Particle> iterator = this.particles.iterator(); while (iterator.hasNext()) { Particle particle = iterator.next(); // Tick this particle particle.onTick(); // Remove particle when removed flag is set if (particle.removed) { iterator.remove(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void tick() {\n try {\n getActiveParticles().stream().filter((p) -> (p != null)).filter((p) -> (p.active)).forEach((p) -> {\n p.tick();\n });\n } catch (java.util.ConcurrentModificationException ex) {}\n }", "public void update() {\n Iterator<Particle> iter = particles.iterator();\n\n while (iter.hasNext()) {\n Particle p = iter.next();\n if (p.isDead()) {\n iter.remove();\n } else {\n p.update();\n }\n }\n }", "public void tick()\n{\n y+=speed;\n\n for(int i=0; i<game.ea.size(); i++)\n {\n EntityA tempEnt= game.ea.get(i);\n if(Physics.Coliision(this,tempEnt))\n {\n c.removeEntity(tempEnt); //zeby po trafieniu znikal pocisk\n c.removeEntity(this);\n game.setEnemy_killed(game.getEnemy_killed()+1);\n\n }\n }\n\n/*\n* If Enemy is out of bounds player get - points\n* and loses some stamina.\n*\n* Enemies are removed from list after disapears\n */\n\n if(y>(App.getHEIGHT()-20)*2)\n {\n App.addHealth(-10);\n App.addPOINTS(-3);\n c.removeEntity(this);\n }\n\n anim.runAnimation();\n\n /*\n * If App is not in game state it doesn't\n * need to have any enemies\n */\n\n if(App.State != App.STATE.GAME)\n {\n delEnemies();\n\n }\n}", "protected void onDespawn() {\r\n\r\n\t\tfor (int i = 0; i < 20; i++) {\r\n\t\t\tdouble randX = rand.nextDouble(), randZ = rand.nextDouble(), randY = rand.nextGaussian();\r\n\t\t\trandX = randX * (getEntityBoundingBox().maxX - getEntityBoundingBox().minX) + getEntityBoundingBox().minX;\r\n\t\t\trandZ = randZ * (getEntityBoundingBox().maxZ - getEntityBoundingBox().minZ) + getEntityBoundingBox().minZ;\r\n\t\t\trandY += posY;\r\n\t\t\tdouble velX = this.rand.nextGaussian() * 0.01D;\r\n\t\t\tdouble velY = Math.abs(this.rand.nextGaussian() * 0.2D);\r\n\t\t\tdouble velZ = this.rand.nextGaussian() * 0.01D;\r\n\t\t\tworld.spawnParticle(EnumParticleTypes.CLOUD, randX, randY, randZ, velX, velY, velZ);\r\n\t\t}\r\n\t}", "public void tick() {\n if (alpha > life ){\n alpha -= (life - 0.0001f);\n }else {\n handler.removeObject(this);\n }\n }", "public void checkParticles4Destruction(){\n\t\t\tif(System.nanoTime() - creationTime > 3*Math.pow(10, 9)){\n\t\t\t\t\n\t\t\t\twhile(!particles.isEmpty()){\n\t\t\t\t\tParticle p = particles.poll();\n\t\t\t\t\tp.destroy(); \n\t\t\t\t}\n\t\t\t}\n\t}", "void removeAllSpawn();", "void nuke() {\n\t\tfor (int a = 0; a < height; a++) {\n\t\t\tfor (int b = 0; b < width; b++) {\n\t\t\t\tif (FWorld[a][b] != null) {\n\t\t\t\t\tEZ.removeEZElement(FWorld[a][b]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tEZ.removeEZElement(background);\n\t\tEZ.removeEZElement(explosion);\n\t\tturtle.kill();\n\t}", "public void tick() {\n\t\tfor (Entity e : entities) {\n\t\t\te.tick();\n\t\t}\n\t}", "void onDestroy(ParticleGroup group);", "public void onUpdate() {\n super.onUpdate();\n\n if (this.world.isRemote) {\n double d0 = this.posX + (this.rand.nextDouble() * 2.0D - 1.0D) * (double) this.width * 0.5D;\n double d1 = this.posY + 0.05D + this.rand.nextDouble() * 1.0D;\n double d2 = this.posZ + (this.rand.nextDouble() * 2.0D - 1.0D) * (double) this.width * 0.5D;\n //double d3 = (this.rand.nextDouble() * 2.0D - 1.0D) * 0.3D;\n double d4 = this.rand.nextDouble() * 0.1D;\n //double d5 = (this.rand.nextDouble() * 2.0D - 1.0D) * 0.3D;\n this.world.spawnParticle(ticksExisted % 2 == 0 ? EnumParticleTypes.FLAME : EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0, d4, 0);\n } else if (--this.lifeTicks < 0) {\n this.setDead();\n }\n }", "public void addNoCollisionElementsFree(Collection<Particle> ps)\n {\n noCollisionElements.addAll(ps);\n }", "Particles particles();", "private void draw() {\n ctx.clearRect(0, 0, width, height);\n\n for (ImageParticle p : particles) {\n p.opacity = p.remainingLife / p.life * 0.5;\n\n // Draw particle from image\n ctx.save();\n ctx.translate(p.x, p.y);\n ctx.scale(p.size, p.size);\n //ctx.translate(p.image.getWidth() * (-0.5), p.image.getHeight() * (-0.5));\n ctx.translate(-HALF_WIDTH, -HALF_HEIGHT);\n ctx.setGlobalAlpha(p.opacity);\n ctx.drawImage(p.image, 0, 0);\n ctx.restore();\n\n //p.remainingLife--;\n p.remainingLife *= 0.98;\n //p.size *= 0.99;\n p.x += p.vX;\n p.y += p.vY;\n\n //regenerate particles\n if (p.remainingLife < 0 || p.size < 0 || p.opacity < 0.01) {\n if (running) {\n p.reInit();\n } else {\n particles.remove(p);\n }\n }\n }\n }", "protected void spawnDeadParticles() {\r\n\t\tfloat timed = (float) deathTicks / DeathAction.deathLingeringTicks;\r\n\t\ttimed = Math.max(0, timed - 0.1f) / 0.9f;\r\n\t\tint particleCount = (int) (20 * Math.pow(timed, 4));\r\n\t\tfor (int i = 0; i < particleCount; i++) {\r\n\t\t\tdouble randX = rand.nextDouble(), randZ = rand.nextDouble(), randY = rand.nextDouble();\r\n\t\t\trandX = randX * (this.getEntityBoundingBox().maxX - getEntityBoundingBox().minX)\r\n\t\t\t\t\t+ getEntityBoundingBox().minX;\r\n\t\t\trandZ = randZ * (getEntityBoundingBox().maxZ - getEntityBoundingBox().minZ) + getEntityBoundingBox().minZ;\r\n\t\t\trandY = Math.pow(randY, 3) * (getEntityBoundingBox().maxY - getEntityBoundingBox().minY)\r\n\t\t\t\t\t+ getEntityBoundingBox().minY;\r\n\t\t\tdouble velX = this.rand.nextGaussian() * 0.01D;\r\n\t\t\tdouble velY = Math.abs(this.rand.nextGaussian() * 0.7D);\r\n\t\t\tdouble velZ = this.rand.nextGaussian() * 0.01D;\r\n\t\t\tworld.spawnParticle(EnumParticleTypes.SUSPENDED_DEPTH, randX, randY, randZ, velX, velY, velZ);\r\n\t\t}\r\n\t}", "public void tick()\n\t{\n\t\tfor(int i = 0; i < peopleList.size(); i++) {\n\t\t\tPerson tempObject = peopleList.get(i);\n\t\t\ttempObject.tick();\n\t\t}\n\t}", "public void drawParticles() {}", "private void emitTicks() {\n if (gameModel == null || lastTickTime == 0) return; // the game is paused\n\n while (lastTickTime < System.currentTimeMillis()) {\n lastTickTime += 1000f / gameModel.ticksPerSecond();\n ;\n for (Entity go : gameModel.entities) go.tick();\n }\n }", "public void onTick(long i) {\n life--;\n y++;\n }", "public void onTick() {\n this.count = count + 1;\n if (this.count % 10 == 0) {\n this.waterHeight = waterHeight + 1;\n }\n floodCells();\n worldEnds();\n\n }", "public void removeNoCollisionElement(Particle p)\n {\n noCollisionElements.remove(p);\n p.removeNoCollisionElementFree(this);\n }", "public void setParticles(int particles) {\r\n\t\tthis.particles = particles;\r\n\t}", "private void updatePhysics() {\n long now = System.currentTimeMillis();\n // Do nothing if mLastTime is in the future.\n // This allows the game-start to delay the start of the physics\n // by 100ms or whatever.\n if (mLastTime > now) return;\n int n = particles.length;\n tree.clear();\n for (int i = 0; i < n; i++) {\n tree.insert(particles[i]);\n }\n // Determine if there are any collisions\n // http://www.kirupa.com/developer/actionscript/multiple_collision2.htm\n for (int i = 0; i < n; i++) {\n \tparticles[i].update(now);\n \tparticles[i].disappearsFromEdge(canvasWidth, canvasHeight);\n\t\t\tSet<Particle> nearBy = tree.retrieve(particles[i]);\n\t\t\tfor (Particle particle : nearBy) {\n\t\t\t\tif (particle != particles[i])\n\t\t\t\t\tparticles[i].collidesWith(particle);\n\t\t\t}\n }\n }", "public static void update() {\n\t\t\n\t\t// Fill the background for every call\n\t\tUtility.background(Utility.color(235, 213, 186));\n\t\t\n\t\t// Create 10 new random particles\n\t\tcreateNewParticles(10);\n\t\t\n\t\t// Track every particle in the array then update their feature\n\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\tif (particles[i] != null) {\n\t\t\t\tupdateParticle(i);\n\t\t\t}\n\n\t\t}\n\n\t}", "protected void cleanBullets() {\n Set<Bullet> recyclable = new HashSet<Bullet>();\n for (Bullet bullet : this.bullets) {\n bullet.update();\n if (bullet.getPositionY() < SEPARATION_LINE_HEIGHT\n || bullet.getPositionY() > this.height)\n recyclable.add(bullet);\n }\n this.bullets.removeAll(recyclable);\n //BulletPool.recycle(recyclable);\n }", "public void killAll() {\n for (Map.Entry<Integer, Enemy> entry :enemies.entrySet()) {\n if (!!!entry.getValue().isDead()) {\n entry.getValue().setHealth(0);\n }\n }\n }", "private void fadeOutandDetachSprites() {\n\t\t\t\t\tdetachChild(greenTick);\t\n\t\t\t\t\tdetachChild(redx);\n\t\t\t\t\tdetachChild(sprite1);\n\t\t\t\t\tdetachChild(sprite2);\n\t\t\t\t\tdetachChild(sprite3);\n\t\t\t\t\tdetachChild(sprite4);\n\n\t\t\t\t}", "@Override\n public void tick() {\n x+=velX;\n y+=velY;\n\n if(Dante.getInstance().getX() <= x)\n displayedImage = left;\n else\n displayedImage = right;\n\n choose = r.nextInt(50);\n\n for(int i = 0; i < Handler1.getInstance().objects.size(); i++) {\n GameObject temp = Handler1.getInstance().objects.get(i);\n\n if(temp.getId() == ID.Block||temp.getId()==ID.Door|| temp.getId() == ID.Obstacle) {\n if(getBoundsBigger().intersects(temp.getBounds())) {\n x += (velX*2) * -1;\n y += (velY*2) * -1;\n velX *= -1;\n velY *= -1;\n } else if(choose == 0) {\n velX = (r.nextInt(2 + 2) - 2) + speed;\n velY = (r.nextInt(2 + 2) - 2) + speed;\n\n if (velX!=0){\n if (velY<0){\n velY+=1;\n }else {\n velY-=1;\n }\n }\n\n if (velY!=0){\n if (velX>0){\n velX-=1;\n }else {\n velX+=1;\n }\n }\n }\n }\n if(temp.id==ID.Dante){\n if (++tickCounter % (r.nextInt(50) + 50) == 0) {\n\n Handler1.getInstance().addObject(new Bullet(x, y, ID.Bullet,\n temp.getX() +(r.nextInt( 11+11) -11),\n temp.getY()+(r.nextInt(11 +11) -11),\n 30, 1, bulletImage,30));\n }\n }\n }\n\n if(hp <= 0) {\n Random rand = new Random();\n if(rand.nextInt(100) <= 33)\n Handler1.getInstance().addObject(new Coin(x, y));\n Handler1.getInstance().removeObject(this);\n }\n }", "public void addNoCollisionElements(Collection<Particle> ps)\n {\n Iterator<Particle> p = ps.iterator();\n while (p.hasNext())\n {\n addNoCollisionElement(p.next());\n }\n }", "public void tick(){\n\t\tfor(int i=0;i<object.size(); i++){\n\t\t\ttempObject = object.get(i);\n\t\t\ttempObject.tick(object);\n\t\t\tif(tempObject.getId() == ObjectId.Player){\n\t\t\t\tif(tempObject.position.x == MouseInput.exitPosition.x&&\n\t\t\t\t tempObject.position.y == MouseInput.exitPosition.y){\n\t\t\t\t\tgame.score += game.timeLeft;\n\t\t\t\t\tSystem.out.println(\"exited\");\n\t\t\t\t\tgame.levelCompleted=true;\n\t\t\t\t}\n\t\t\t\tif(game.player.health <= 0){\n\t\t\t\t\tobject.clear();\n\t\t\t\t\tgame.gameLoop=1;\n\t\t\t\t\tgame.State=STATE.GAMEOVER;\n\t\t\t}\n\t\t}\n\t\t// bomb is null when exploded\t\t\n\t\tif(Bomb.exploded(bomb, object)){\n\t\t\tbomb=null;\t\t\t\n\t\t}\n\t\t\n\t\tif(System.currentTimeMillis()-Player.tHit < 3000){\n\t\t\tPlayer.invincible = true;\n\t\t}\n\t\telse{\n\t\t\tPlayer.invincible = false;\n\t\t}\n\t\t\n\t\tif(Power.consumed(power, object)) {\n\t\t\tpower=null;\n\t\t}\n\t\t}\n\t\t\n\t}", "public void updateWorld() {\n\t\t/*\n\t\t * The particles are created during the simulation, this prevents some strange behaviors\n\t\t * that rises when all the particles are added at the start of a simulation, for example \n\t\t * the it was noticed that the random generation for the position followed some sort of pattern\n\t\t * and this influenced the formation the DLA cluster, resulting in an unxpected formation\n\t\t * */\n\t\tif( elements < getInitialParticleNumber() ){\n\t\t\tcreateParticleOutsideOfBB();\t\t\n\t\t\telements++;\n\t\t}\n\t\t//now for the each particles that are still floating a movement update is made,\n\t\t//according to the type of movement\n\t\tfor(int i=0; i<particleCollection.size(); i++){\n\t\t\tif( particleCollection.get(i).isFloating() == false ){\n\t\t\t\tparticleCollection.remove(i);\n\t\t\t}\n\t\t\t//If the particle has gone outside of the boundaries then \n\t\t\t//a new one is created to replace it, this can happen only if the movementType is 2 or 3 (balistic or square spiral)\n\t\t\telse if( particleCollection.get(i).isOutsideOfTheWorld() == true ){\n\t\t\t\tparticleCollection.remove(i);\n\t\t\t\tcreateParticleOutsideOfBB();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tswitch(movementType){\n\t\t\t\tcase 0:\n\t\t\t\t\t/*\n\t\t\t\t\t * each movement method return a boolean if it's false it mean that the particle ha moved and\n\t\t\t\t\t * the collided to the cluster and so the static particle counter il incremented by one\n\t\t\t\t\t * */\n\t\t\t\t\tif( particleCollection.get(i).snowFlakeFallMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: \n\t\t\t\t\tif( particleCollection.get(i).randomMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tif( particleCollection.get(i).straightMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tif( particleCollection.get(i).squareSpiralMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void updateParticles() {\n\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tif (p.neighbors == null) {\n\t\t\t\tp.neighbors = particles;\n\t\t\t}\n\t\t\tfor (BehaviorInterface b : behaviors) {\n\t\t\t\tb.apply(p);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tp.scaleVelocity(friction);\n\t\t\tp.update();\n\t\t}\n\t}", "List<? extends Particle> update(double timeDelta);", "public void tick() {\n boolean shouldHaltAfterTick = false;\n\n List<Pair<Movement, Bullet>> movements = new ArrayList<>();\n\n //Bullets on nodes\n Map<Coordinate, Bullet> capturedBullets = new HashMap<>(bullets);\n capturedBullets.keySet().retainAll(nodes.keySet());\n\n //Bullets not on nodes\n Map<Coordinate, Bullet> freeBullets = new HashMap<>(bullets);\n freeBullets.keySet().removeAll(capturedBullets.keySet());\n\n //Generate movements for free bullets\n for (Map.Entry<Coordinate, Bullet> entry : freeBullets.entrySet()) {\n Bullet bullet = entry.getValue();\n Coordinate coord = entry.getKey();\n Coordinate newCoord = entry.getKey().plus(bullet.getDirection()).wrap(width, height);\n movements.add(new Pair<>(new Movement(coord, newCoord), bullet));\n }\n\n //Update captured bullets\n for (Map.Entry<Coordinate, Bullet> entry : capturedBullets.entrySet()) {\n Coordinate coordinate = entry.getKey();\n INode node = nodes.get(coordinate);\n\n // special case\n if (node instanceof NodeHalt)\n shouldHaltAfterTick = true;\n\n //TODO this brings great shame onto my family\n Direction bulletDirection = entry.getValue().getDirection();\n Direction dir = Direction.UP;\n while (dir != node.getRotation()) {\n dir = dir.clockwise();\n bulletDirection = bulletDirection.antiClockwise();\n }\n Bullet bullet = new Bullet(bulletDirection, entry.getValue().getValue());\n\n Map<Direction, BigInteger> bulletParams = node.run(bullet);\n\n for (Map.Entry<Direction, BigInteger> newBulletEntry : bulletParams.entrySet()) {\n //TODO this too\n bulletDirection = newBulletEntry.getKey();\n dir = Direction.UP;\n while (dir != node.getRotation()) {\n dir = dir.clockwise();\n bulletDirection = bulletDirection.clockwise();\n }\n\n Bullet newBullet = new Bullet(bulletDirection, newBulletEntry.getValue());\n Coordinate newCoordinate = coordinate.plus(newBullet.getDirection()).wrap(width, height);\n Movement movement = new Movement(coordinate, newCoordinate);\n movements.add(new Pair<>(movement, newBullet));\n }\n }\n\n //Remove swapping bullets\n List<Movement> read = new ArrayList<>();\n Set<Coordinate> toDelete = new HashSet<>();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Coordinate from = movement.getFrom();\n Coordinate to = movement.getTo();\n boolean foundSwaps = read.stream().anyMatch(other -> from.equals(other.getTo()) && to.equals(other.getFrom()));\n if (foundSwaps) {\n toDelete.add(from);\n toDelete.add(to);\n }\n read.add(movement);\n }\n movements.removeIf(pair -> toDelete.contains(pair.getKey().getFrom()) || toDelete.contains(pair.getKey().getTo()));\n\n //Remove bullets that end in the same place\n read.clear();\n toDelete.clear();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Coordinate to = movement.getTo();\n boolean foundSameFinal = read.stream().anyMatch(other -> to.equals(other.getTo()));\n if (foundSameFinal) {\n toDelete.add(to);\n }\n read.add(movement);\n }\n movements.removeIf(pair -> toDelete.contains(pair.getKey().getTo()));\n\n //Move bullets\n Map<Coordinate, Bullet> newBullets = new HashMap<>();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Bullet bullet = pair.getValue();\n newBullets.put(movement.getTo(), bullet);\n }\n\n bullets.clear();\n bullets.putAll(newBullets);\n\n if (shouldHaltAfterTick)\n halt();\n }", "public void act() \n {\n if(timer > 0){\n timer--;\n }else{\n Greenfoot.playSound(\"explosionSound.wav\");\n getWorld().removeObject(this);\n }\n }", "void decrementTick();", "private static void removeOldParticles(int maxAge) {\n\t\t// Track the whole array\n\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\t// If the particle is null reference, continue to track\n\t\t\tif (particles[i] == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// If the particle's age is greater than 80\n\t\t\t// change it to a null reference\n\t\t\telse if (particles[i].getAge() > maxAge) {\n\t\t\t\tparticles[i] = null;\n\t\t\t}\n\t\t}\n\t}", "public void update(int dt) {\n if(player != null) player.update(dt);\n\n // ENTITIES //\n\n // Update Entities\n for(Entity e : ents) {\n e.update(dt);\n }\n\n // Add Queued Entities\n for(Entity e : sub_queue) {\n ents.add(e);\n }\n sub_queue.clear(); // Clear the sub_queue\n\n // Remove Queued Entities\n for(Entity e : unsub_queue) {\n if(!ents.remove(e)) {\n// System.out.println(\"ERROR: Could Not Remove: \" + e.toString()); // DEBUG //\n }\n }\n unsub_queue.clear(); // Clear the unsub_queue\n\n // COLLISION BOXES //\n\n // Check for collisions\n checkCollisions();\n\n // Add Queued Collision Boxes\n for(CollisionBox e : sub_cueue) {\n cols.add(e);\n }\n sub_cueue.clear(); // Clear the sub_cueue\n\n // Remove Unsubbed Collision Boxes\n for(CollisionBox e : unsub_cueue) {\n if(e == null) continue;\n if(!cols.remove(e)) {\n // DEBUG CODE //\n// try {\n// System.out.println(\"ERROR: Could Not Remove: \" + e.toString());\n// } catch (NullPointerException ex) {\n// ex.printStackTrace();\n// }\n }\n }\n unsub_cueue.clear(); // Clear the unsub_cueue\n\n // PARTICLES //\n\n // Limit Particles to Maximum Allowed Particles\n while(particles.size() > Settings.max_particles) {\n Particle particleToRemove = particles.get(0);\n particles.remove(particleToRemove);\n }\n\n // Update Particles\n for(Particle p : particles) {\n p.update(dt);\n }\n\n // Add Queued Particles\n for(Particle p : p_sub_queue) {\n particles.add(p);\n }\n p_sub_queue.clear(); // Clear the sub_queue\n\n // Remove Queued Particles\n for(Particle p : p_unsub_queue) {\n particles.remove(p);\n }\n p_unsub_queue.clear(); // Clear the unsub_queue\n }", "public void updateParticles() {\n\n // Update walkingAnimation particle effect\n walkingParticleEffect.update(Gdx.graphics.getDeltaTime());\n if(walkingParticleEffect.isComplete()) {\n walkingParticleEffect.reset();\n }\n\n // Update getting hit particle effect\n if(damaged) {\n gettingHitParticleEffect.update(Gdx.graphics.getDeltaTime());\n if(gettingHitParticleEffect.isComplete() && !dead) {\n damaged = false;\n gettingHitParticleEffect.reset();\n }\n }\n }", "private void tick() {\n\n if (StateManager.getState() != null) {\n StateManager.getState().tick();\n }\n this.backgroundFrames--;\n if (this.backgroundFrames == 0) {\n this.backgroundFrames = Const.TOTAL_BACKGROUND_FRAMES;\n }\n//Check all changed variables for the player\n player.tick();\n long elapsed = (System.nanoTime() - time) / (Const.DRAWING_DELAY - (4000 * Enemy.getDifficulty()));\n//Check if enough time is passed to add new enemy or if spawnSpot is available\n if (elapsed > (this.delay - Enemy.getDifficulty() * 300)&& Road.isSpotAvailable()) {\n enemies.add(new Enemy());\n time = System.nanoTime();\n }\n//Loop for checking all changed variables for the enemies and check if they intersects with the player\n for (int j = 0; j < enemies.size(); j++) {\n enemies.get(j).tick();\n if(enemies.get(j).getY() > Const.ROAD_BOTTOM_BORDER + 200){\n Road.getOccupiedSpawnPoints()[Const.SPAWN_POINTS.indexOf(enemies.get(j).getX())] = false;\n player.setScore(player.getScore() + 50);\n enemies.remove(j);\n continue;\n }\n enemyBoundingBox = enemies.get(j).getEnemyRectangle();\n if (player.getBoundingBox().intersects(enemyBoundingBox)) {\n reset();\n if(player.getLives() == 0){\n gameOver();\n }\n break;\n }\n }\n }", "public void addNoCollisionElement(Particle p)\n {\n noCollisionElements.add(p);\n p.addNoCollisionElementFree(this);\n }", "@Override\n\tpublic void tick() {\n\t\tsuper.tick();\n\t\tif(isNthTick(5) && !getPlayer().hasPotionEffect(PotionEffectType.WITHER)){\n\t\t\tgetPlayer().addPotionEffect(new PotionEffect(PotionEffectType.WITHER, getRemainingTicks(), 1));\n\t\t}\n\t}", "@Override\n\tpublic void tick() {\n\t\twhile (clicks.size() > 0)\n\t\t{\n\t\t\tClick click = clicks.remove(0);\n\t\t\tSystem.out.println(click.posX + \" \" + click.posY);\n\t\t}\n\t\twhile (presses.size() > 0)\n\t\t{\n\t\t\tPress press = presses.remove(0);\n\t\t}\n\t}", "public void tick() {\n\t\tground.tick(this);\n\t\tfor(Item item : new ArrayList<>(items)) {\n\t\t\titem.tick(this);\n\t\t}\n\t}", "public void noDatUpdate(){\n\t\tint j;\n\t\tmoveEnemies();\n\t\t\t// Add Arrows\n\t\t\tif(shoot_timer > 60){\n\t\t\t\tRandom r_gen = new Random();\n\t\t\t\tfor(j=0;j<enemy_num;j++){\n\t\t\t\t\tif((r_gen.nextInt(1000)%3) != 0) {\n\t\t\t\t\t\tAddEnemyArrow(j);\n\t\t\t\t\t\tshoot_timer = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tshoot_timer ++;\n\t\t\t\tSystem.out.println(\"Incrementing Shoot Timer\");\n\t\t\t}\n\t\t\tmoveEnemyArrows();\n\t\t\n\t}", "public void tick() {\r\n\t\thunger += (10 + generateRandom());\r\n\t\tthirst += (10 + generateRandom());\r\n\t\ttemp -= (1 + generateRandom());\r\n\t\tboredom += (1 + generateRandom());\r\n\t\tcageMessiness += (1 + generateRandom());\r\n\t}", "public void tick() {\n\t\tif (Math.abs(disToPlayerX()) > Math.abs(disToPlayerY())) {\r\n\t\t\tif (disToPlayerX()<0) {\r\n\t\t\t\tx -= speed;\t//moves enemy to the left\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tx += speed; //moves enemy to the right\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (disToPlayerY()<0) {\r\n\t\t\t\ty-=speed; //moves enemy up\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ty+=speed; //moves enemy down\r\n\t\t\t}\r\n\t\t}\r\n\t\tenemyRectangle.setLocation((int)x,(int) y); //updates hitbox of enemy\r\n\r\n\t\t//checks all enemies and see if they run into player\r\n\t\tfor (int i=0;i<c.getEnemys().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(player.getRectangle().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes the enemy\r\n\t\t\t\tPlayer.health -=10; //removes 10 health\r\n\t\t\t\tbreak; //doesn't work without this BREAK. DO NOT REMOVE\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//checks all bullets if they hit an enemy\r\n\t\tfor (int i = 0;i<c.getBullets().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(c.getBullets().get(i).getRect().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes enemy\r\n\t\t\t\tc.removeBullet(c.getBullets().get(i)); //removes the bullet\r\n\t\t\t\tPlayer.score += 50; //adds 50 to the score\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void update() {\n\t\tthis.tickCounter++;\n\t\tif(tickCounter == 10) {\n\t\t\tthis.lifetime--;\n\t\t\tif(this.lifetime == 0) {\n\t\t\t\tthis.remove();\n\t\t\t}\n\t\t\tthis.tickCounter = 0;\n\t\t}\n\t}", "public void enleverTousLesObs() {\n\n\t\tobstaclesList.removeAll(obstaclesList);\n\t}", "public void tick() {\r\n }", "@Override\r\n\tpublic void update() {\n\t\tAlly.update();\r\n\t\tEnemy.update();\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tif(GroundList.get(i).kill) {\r\n\t\t\t\tGroundList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BarelList.size(); i++) {\r\n\t\t\tif(BarelList.get(i).kill) {\r\n\t\t\t\tBarelList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tif(WoodList.get(i).kill) {\r\n\t\t\t\tWoodList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tif(FireBallList.get(i).kill) {\r\n\t\t\t\tFireBallList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tif(BulletList.get(i).kill) {\r\n\t\t\t\tBulletList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tGroundList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0 ; i < BarelList.size(); i++) {\r\n\t\t\tBarelList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tBulletList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tFireBallList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tWoodList.get(i).update();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(GamePanel.updateTimes%60 == 0) {\r\n\t\t\tEnemy.PushEntity(2, new Vector2f(width*1/2, height/4),enemy);\r\n\t\t}\r\n\t\tfor(int i = 0; i < AllyDeadList.size(); i++) {\r\n\t\t\tAlly.entityList.remove(AllyDeadList.get(i)-i);\r\n\t\t}\r\n\t\tfor(int i = 0; i < EnemyDeadList.size(); i++) {\r\n\t\t\tEnemy.entityList.remove(EnemyDeadList.get(i)-i);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tAllyDeadList.clear();\r\n\t\tEnemyDeadList.clear();\r\n\t\tfor(int i = 0; i < Ally.entityList.size(); i++) {\r\n\t\t\tif(Ally.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tAllyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < Enemy.entityList.size(); i++) {\r\n\t\t\tif(Enemy.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tEnemyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void tick() {\n \t\t// Iterate over objects in the world.\n \t\tIterator<PhysicalObject> itr = myObjects.iterator();\n \t\n \t\tList<PhysicalObject> children = new LinkedList<PhysicalObject>();\n \t\t\n \t\twhile (itr.hasNext()) {\n \t\t\tCollidableObject obj = itr.next();\n \n \t\t\t// Apply forces\n \t\t\tfor (Force force : myForces) {\n \t\t\t\tforce.applyForceTo((PhysicalObject) obj);\n \t\t\t}\n \t\t\t\n \t\t\t// Update the object's state.\n \t\t\tobj.updateState(1f / UPDATE_RATE);\n \t\t\t\n \t\t\t// Spawn new objects?\n \t\t\tList<PhysicalObject> newChildren =\n \t\t\t\t((PhysicalObject) obj).spawnChildren(1f / UPDATE_RATE);\n \t\t\t\n \t\t\tif (newChildren != null) {\n \t\t\t\tchildren.addAll(newChildren);\n \t\t\t}\n \t\t}\n \t\t\n \t\t/*\n \t\t In the \"tick\" method of your application, rather than call the old form of \n \t\t resolveCollisions to completely handle a collision, you can now:\n \t\t \n \t\t \t1.Directly call CollisionDetector.calculateCollisions to receive an\n \t\t\t ArrayList<CollisionInfo> object.\n \t\t\t2.If the list is empty, then there is no collision between the pair\n \t\t\t of objects and nothing further need be done.\n \t\t\t3.If the list is not empty, then a collision has occurred and you can\n \t\t\t check whether the objects involved necessitate a transmission or a standard\n \t\t\t collision resolution (a.k.a. bounce).\n \t\t\t4.If a standard collision resolution is called for, use the new form of\n \t\t\t resolveCollisions to pass in the ArrayList<CollisionInfo> object.\n \t\t\t \n \t\t The goal of this change is to prevent the computationally expensive \n \t\t collision detection algorithm from being executed twice when objects collide.\n \t\t */\n \n \t\tfor (int i = 0; i < myObjects.size() - 1; i++) {\n \t\t\tfor (int j = i + 1; j < myObjects.size(); j++) {\n \t\t\t\tArrayList<CollisionInfo> collisions = \n \t\t\t\t\tCollisionDetector.calculateCollisions(myObjects.get(i), myObjects.get(j));\n \t\t\t\t\n \t\t\t\tif (collisions.size() > 0) {\n \t\t\t\t\tHalfSpace hs = null;\n \t\t\t\t\tPhysicalObject o = null;\n \t\t\t\t\t\n \t\t\t\t\tif (myObjects.get(i) instanceof HalfSpace) {\n \t\t\t\t\t\t// If i is a halfspace, j must be an object\n \t\t\t\t\t\ths = (HalfSpace) myObjects.get(i);\n \t\t\t\t\t\to = myObjects.get(j);\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t} else if (myObjects.get(j) instanceof HalfSpace) {\n \t\t\t\t\t\t// If j is a halfspace, i must be an object\n \t\t\t\t\t\ths = (HalfSpace) myObjects.get(j);\n \t\t\t\t\t\to = myObjects.get(i);\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Was there a halfspace involved? If so, was it a side?\n\t\t\t\t\tif (hs != null && hs.normal.y != 1 && hs.normal.y != -1 && myPeer.getPeerSize() > 0) {\n \t\t\t\t\t\t// Side collision, is there a peer?\n \t\t\t\t\t\tPeerInformation peer = myPeer.getPeerInDirection(o.getVelocity().x, -o.getVelocity().z);\n \t\t\t\t\t\t\n \t\t\t\t\t\tif (peer != null) {\n \t\t\t\t\t\t\to.switchX();\n \t\t\t\t\t\t\to.switchZ();\n \t\t\t\t\t\t\tmyPeer.sendPayloadToPeer(peer, o);\n \t\t\t\t\t\t\to.detach();\n \t\t\t\t\t\t\tmyObjects.remove(o);\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// Moving on\n \t\t\t\t\t\t\tcontinue;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Collision as usual...\n \t\t\t\t\tmyObjects.get(i).resolveCollisions(myObjects.get(j), collisions);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\t// Add new children to the world.\n \t\tfor (PhysicalObject obj : children) {\n \t\t\tmyScene.addChild(obj.getGroup());\n \t\t}\n \t\t\n \t\tmyObjects.addAll(children);\n \t}", "public void updateUniverse(int dimension)\n\t{\n\t\tfor(int i = 0; i < this.particles.size(); i++)\n\t\t{\n\t\t\tVector force = new Vector(this.dimension);\n\t\t\t\n\t\t\tfor(int x = 0; x < this.particles.size(); x++)\n\t\t\t{\n\t\t\t\tif(x == i) continue;\n\t\t\t\t\n\t\t\t\tif(checkCollision(i, x) == true)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tparticles.get(i).setVelocity(\n\t\t\t\t\t\t\tparticles.get(i).getVelocity().multiply(particles.get(i).getMass()).add(particles.get(x).getVelocity().multiply(particles.get(x).getMass())).divide(\n\t\t\t\t\t\t\t\t\tparticles.get(i).getMass()+particles.get(x).getMass())\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tthis.particles.get(i).increaseMass(this.particles.get(x).getMass());\n\t\t\t\t\tparticles.remove(x);\n\t\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble gForce = GRAV_CONST * (particles.get(i).getMass() * particles.get(x).getMass()) / Math.pow((this.particles.get(i).getPosition().distance(this.particles.get(x).getPosition())), 2);\n\t\t\t\tVector directon = particles.get(i).getPosition().direction(particles.get(x).getPosition());\n\t\t\t\t\n\t\t\t\tforce = force.add(directon.multiply(gForce));\n\t\t\t}\n\t\t\t\n\t\t\tparticles.get(i).setAcceleration(force.divide(particles.get(i).getMass()));\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < this.particles.size(); i++)\n\t\t{\n\t\t\tparticles.get(i).update(timebase);\n\t\t}\n\t\t\n\t\telapsedTime += timebase;\n\t}", "public void tick() {\n\t}", "public void tick() {\n\t}", "private void killBullet() {\r\n this.dead = true;\r\n }", "public void tick() {\n\n\t\tIterator<GameObject> sceneIterator = scene.values().iterator();\n\n\t\twhile (sceneIterator.hasNext()) {\n\t\t\tGameObject gameObject = sceneIterator.next();\n\t\t\tif (gameObject instanceof Movable)\n\t\t\t\t((Movable) gameObject).step();\n\t\t\t// Removing the bullets that are out of the scene\n\t\t\tif (gameObject instanceof Bullet && ((Bullet) gameObject).isOutOfBounds(20))\n\t\t\t\tscene.remove(gameObject.GAME_OBJECT_ID);\n\t\t}\n\t\t// Player\n\t\tfor (Player player : playerMap.values()) {\n\t\t\t// The events are generated within the player class on step and collision\n\t\t\tplayer.step();\n\t\t\tplayer.isHit(scene.values());\n\t\t}\n\t}", "private void tick() {\n keyManager.tick();\n if (keyManager.pause == false) {\n if (gameOver) {\n\n // advancing player with colision\n player.tick();\n //if there's a shot.\n\n int alienBombIndex = (int) (Math.random() * aliens.size());\n for (int i = 0; i < aliens.size(); i++) {\n Alien alien = aliens.get(i);\n alien.tick();\n if (shotVisible && shot.intersectAlien(alien)) {\n Assets.hitSound.play();\n alien.setDying(true);\n alien.setDeadCounter(6);\n shotVisible = false;\n }\n \n if(alien.isDead()){\n aliens.remove(i);\n if (aliens.size() == 0) {\n gameOver = false;\n }\n }\n\n alien.act(direction);\n }\n\n //Controlar el movimiento de los aliens\n for (Alien alien : aliens) {\n int x = alien.getX();\n if (x >= getWidth() - 30 && direction != -1) {\n direction = -1;\n alien.setDirection(-1);\n Iterator i1 = aliens.iterator();\n while (i1.hasNext()) {\n Alien a2 = (Alien) i1.next();\n a2.setY(a2.getY() + 15);\n }\n }\n if (x <= 5 && direction != 1) {\n direction = 1;\n alien.setDirection(1);\n Iterator i2 = aliens.iterator();\n while (i2.hasNext()) {\n Alien a = (Alien) i2.next();\n a.setY(a.getY() + 15);\n }\n }\n }\n\n //Controlar el spawning de las bombas\n Random generator = new Random();\n for (Alien alien : aliens) {\n int num = generator.nextInt(15);\n Bomb b = alien.getBomb();\n\n if (num == CHANCE && b.isDestroyed()) {\n b.setDestroyed(false);\n b.setX(alien.getX());\n b.setY(alien.getY());\n }\n\n b.tick();\n if (b.intersecta(player)) {\n Assets.deathSound.play();\n player.die();\n gameOver = false;\n }\n\n }\n\n if (shotVisible) {\n shot.tick();\n }\n if (!player.isDead() && keyManager.spacebar) {\n shoot();\n Assets.shotSound.play();\n }\n for (int i = 0; i < aliens.size(); i++) {\n if (aliens.get(i).getY() > 500) {\n gameOver = false;\n }\n }\n\n }\n }\n /// Save game in file\n if (keyManager.save) {\n try {\n\n vec.add(player);\n vec.add(shot);\n if(keyManager.pause){\n vec.add(new String(\"Pause\")); \n } else if (!gameOver){\n vec.add(new String(\"Game Over\"));\n } else {\n vec.add(new String(\"Active\"));\n }\n for (Alien alien : aliens) {\n vec.add(alien);\n }\n //Graba el vector en el archivo.\n grabaArchivo();\n } catch (IOException e) {\n System.out.println(\"Error\");\n }\n }\n /// Load game\n if (keyManager.load == true) {\n try {\n //Graba el vector en el archivo.\n leeArchivo();\n } catch (IOException e) {\n System.out.println(\"Error en cargar\");\n }\n }\n\n }", "public void onTick(long i) {\n for (AbstractEntity e : this.getEntities()) {\n e.onTick(0);\n }\n\n checkLavaTileUpdates();\n\n if (notGenerated) {\n createStaticEntities();\n notGenerated = false;\n }\n super.onTick(i);\n }", "@SubscribeEvent\n\tpublic void tickLifetimes(TickEvent.PlayerTickEvent event) {\n\t\tif (event.phase.equals(TickEvent.Phase.START))\n\t\t\treturn;\n\n\t\tWorld w = Minecraft.getMinecraft().theWorld;\n\n\t\t// If the world exists\n\t\tif (w == null)\n\t\t\treturn;\n\n\t\t// If ticking client player\n\t\tif (!event.player.equals(Minecraft.getMinecraft().thePlayer))\n\t\t\treturn;\n\n\t\tsynchronized (blocks) {\n\t\t\tIterator<PingBlock> it = blocks.iterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tPingBlock pb = it.next();\n\n\t\t\t\tif (--pb.lifeTime <= 0) {\n\t\t\t\t\tit.remove();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (w != null) {\n\t\t\t\t\tif (w.getBlockState(pb.pos).getBlock().equals(Blocks.AIR)) {\n\t\t\t\t\t\tit.remove();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void tick();", "void tick();", "public void afterTick(ParticleField field){\n }", "private void purgeAllOverflowEM_EM() {\n float mass = 0;\n for (GT_MetaTileEntity_Hatch_InputElemental tHatch : eInputHatches) {\n if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {\n tHatch.updateSlots();\n }\n mass += tHatch.overflowMatter;\n tHatch.overflowMatter = 0;\n }\n for (GT_MetaTileEntity_Hatch_OutputElemental tHatch : eOutputHatches) {\n if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {\n tHatch.updateSlots();\n }\n mass += tHatch.overflowMatter;\n tHatch.overflowMatter = 0;\n }\n cleanMassEM_EM(mass);\n }", "public void update()\n {\n // start from the bottom of the world\n\n for (int y = height - 1; y >= 0; --y)\n {\n // compute offset to this and next line\n\n int thisOffset = y * width;\n \n // are we at top or bottom?\n\n boolean atTop = y == 0;\n boolean atBot = y == height - 1;\n\n // process line in random order\n \n for (int x: xRndIndex[rnd.nextInt(RND_INDEX_CNT)])\n {\n // index of this pixel\n \n int ip = thisOffset + x;\n \n // value of this pixel\n\n int p = pixels[ip];\n\n // don't process inert matter\n\n if (p == AIR || p == ROCK || p == EARTH)\n continue;\n\n // are we on a left or right edge?\n\n boolean atLeft = x == 0;\n boolean atRight = x == width - 1;\n\n // indices of pixels around this particle\n\n int iuc = ip - width;\n int idc = ip + width;\n int idl = idc - 1;\n int idr = idc + 1;\n int il = ip - 1;\n int ir = ip + 1;\n\n // get pixels for each index\n\n int uc = atTop ? ROCK : pixels[iuc];\n int dc = atBot ? ROCK : pixels[idc];\n int dl = atBot || atLeft ? ROCK : pixels[idl];\n int dr = atBot || atRight ? ROCK : pixels[idr];\n int l = atLeft ? ROCK : pixels[il];\n int r = atRight ? ROCK : pixels[ir];\n \n // the following actions propogate elements around the\n // world, they do not conserve matter\n\n // if fire, propogate fire\n\n if (p == FIRE1 || p == FIRE2 || p == FIRE3 || \n p == FIRE4 || p == FIRE5 || p == FIRE6)\n {\n int[] burn = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n\n\n for (int ib: burn)\n {\n int b = pixels[ib];\n\t\t\t\t\t \n\t\t\t\t\t // fire burns plants and oil, makes steam out of water\n\t\t\t\t\t \n if ((b == PLANT || b == OIL || b == COLUMBINE) &&\n rnd.nextInt(FIRE_CHANCE_IN) == 0)\n pixels[ib] = FIRE1;\n else\n if (b == WATER)\n {\n pixels[ib] = STEAM;\n pixels[ip] = STEAM;\n\t\t\t\t\t\t pixels[iuc] = STEAM;\n p = STEAM;\n break;\n }\n }\n // move fire along\n\n if (p == FIRE1)\n {\n pixels[ip] = FIRE3;\n continue;\n }\n if (p == FIRE2)\n {\n pixels[ip] = FIRE3;\n continue;\n }\n if (p == FIRE3)\n {\n pixels[ip] = FIRE4;\n continue;\n }\n if (p == FIRE4)\n {\n pixels[ip] = FIRE5;\n continue;\n }\n if (p == FIRE5)\n {\n pixels[ip] = FIRE6;\n continue;\n }\n if (p == FIRE6)\n {\n pixels[ip] = AIR;\n continue;\n }\n }\n // if this is steam, evaporate into air\n\n if (p == STEAM)\n { pixels[ip] = AIR;\n continue;\n\t\t\t }\n\n // if this is an everything sucker\n\n if (p == AIR_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n pixels[it] = AIR;\n continue;\n }\n // if this is a water source\n\n if (p == WATER_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR &&\n rnd.nextInt(WATER_CHANCE_IN) == 0)\n pixels[it] = WATER;\n continue;\n }\n // if this is a fire source\n\n if (p == OIL_SOURCE)\n {\n int[] targets = {atRight ? ip : ir,\n atLeft ? ip : il,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR)\n pixels[it] = OIL;\n continue;\n }\n // if this is a sand source\n\n if (p == SAND_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR &&\n rnd.nextInt(SAND_CHANCE_IN) == 0)\n pixels[it] = SAND;\n continue;\n }\n // if this is a plant, propogate growth\n\n if (p == PLANT)\n {\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n int[] targets = {atLeft ? ip : il,\n atLeft || atTop ? ip : iul,\n atRight ? ip : ir,\n atRight || atTop ? ip : iur,\n atTop ? ip : iuc,\n atBot ? ip : idc,\n atBot || atLeft ? ip : idl,\n atBot || atRight ? ip : idr,\n };\n\t\t\t\t if (pixels[idl] == PLANT && pixels[idc] == PLANT && \n\t\t\t\t pixels[idr] == PLANT && pixels[ir] == PLANT && \n\t\t\t\t\t pixels[il] == PLANT && pixels[iuc] == WATER)\n\t\t\t\t\t pixels[ip] = COLUMBINE;\n for (int ix: targets)\n if (pixels[ix] == AIR)\n for (int it: targets)\n if (pixels[it] == WATER && rnd.nextInt(PLANT_CHANCE_IN) == 0)\n pixels[it] = PLANT;\n\t\t\t\t continue;\n }\n // if this is a flower\n\n if (p == COLUMBINE)\n\t\t\t {\n\t\t\t continue;\n\t\t\t }\n // if this is a fire source\n\n if (p == FIRE_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == PLANT || pixels[it] == OIL)\n pixels[it] = FIRE1;\n continue;\n }\n // all actions from this point on conserve matter\n // we only calculate the place to which this particle\n // will move, the the default is to do nothing\n\n int dest = NO_CHANGE;\n \n // if it's a oil\n\n if (p == OIL)\n {\n // compute indices for up left and up right\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n // get pixels for each index\n\n int ul = atTop || atLeft ? ROCK : pixels[iul];\n int ur = atTop || atRight ? ROCK : pixels[iur];\n\n // if there is sand/earth above, erode that\n\n if (uc == EARTH || uc == SAND)\n dest = iuc; \n\n // if pixles up left and up right sand/water\n\n else if ((ul == EARTH || ul == SAND) && \n (ur == EARTH || ur == SAND))\n dest = rnd.nextBoolean() ? iul : iur;\n\n // if air underneath, go down\n \n else if (dc == AIR)\n dest = idc;\n \n // if air on both sides below, pick one\n\n else if (dl == AIR && dr == AIR)\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR)\n dest = idr;\n\n // if air on both sides below, pick one\n\n else if ((l == AIR || l == EARTH || l == SAND) &&\n (r == AIR || r == EARTH || r == SAND))\n dest = rnd.nextBoolean() ? il : ir;\n\n // if air only down left, go left\n\n else if (l == AIR || l == EARTH || l == SAND)\n dest = il;\n\n // if air only down right, go right\n\n else if (r == AIR || r == EARTH || r == SAND)\n dest = ir;\n\n // the case where water flows out two pixels\n \n else\n {\n // get items 2 pixels on either side of this one\n\n int ill = ip - 2;\n int irr = ip + 2;\n int ll = x < 2 ? ROCK : pixels[ill];\n int rr = x > width - 3 ? ROCK : pixels[irr];\n\n // if air on both sides, pick one\n\n if (ll == AIR && rr == AIR)\n dest = rnd.nextBoolean() ? irr : ill;\n \n // if air only right right, go right right\n \n else if (rr == AIR)\n dest = irr;\n \n // if air only left left, go left left\n\n else if (ll == AIR)\n dest = ill;\n }\n }\n // if it's water\n\n else if (p == WATER)\n {\n // compute indices for up left and up right\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n // get pixels for each index\n\n int ul = atTop || atLeft ? ROCK : pixels[iul];\n int ur = atTop || atRight ? ROCK : pixels[iur];\n\n // if there is sand/earth above, erode that\n\n if (uc == EARTH || uc == SAND)\n dest = iuc; \n\n // if pixles up left and up right sand/water\n\n else if ((ul == EARTH || ul == SAND) && \n (ur == EARTH || ur == SAND))\n dest = rnd.nextBoolean() ? iul : iur;\n\n // if air underneath, go down\n \n else if (dc == AIR || dc == OIL)\n dest = idc;\n\n // if air on both sides below, pick one\n\n else if ((dl == AIR || dl == OIL) && (dr == AIR || dr == OIL))\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR || dl == OIL)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR || dr == OIL)\n dest = idr;\n\n // if air on both sides below, pick one\n\n else if ((l == AIR || l == EARTH || l == SAND) &&\n (r == AIR || r == EARTH || r == SAND))\n dest = rnd.nextBoolean() ? il : ir;\n\n // if air only down left, go left\n\n else if (l == AIR || l == EARTH || l == SAND)\n dest = il;\n\n // if air only down right, go right\n\n else if (r == AIR || r == EARTH || r == SAND)\n dest = ir;\n\n // the case where water flows out two pixels\n \n else\n {\n // get items 2 pixels on either side of this one\n\n int ill = ip - 2;\n int irr = ip + 2;\n int ll = x < 2 ? ROCK : pixels[ill];\n int rr = x > width - 3 ? ROCK : pixels[irr];\n\n // if air on both sides, pick one\n\n if (ll == AIR && rr == AIR)\n dest = rnd.nextBoolean() ? irr : ill;\n \n // if air only right right, go right right\n \n else if (rr == AIR)\n dest = irr;\n \n // if air only left left, go left left\n\n else if (ll == AIR)\n dest = ill;\n }\n }\n // all other elements behave like sand\n\n else\n {\n // if air underneath, go down\n \n if (dc == AIR || dc == WATER)\n dest = idc;\n\n // if air on both sides below, pick one\n\n else if ((dl == AIR || dl == WATER) && \n (dr == AIR || dr == WATER))\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR || dl == WATER)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR || dr == WATER)\n dest = idr;\n }\n // if a change is requried, swap pixles\n\n try\n {\n if (dest != NO_CHANGE)\n {\n if (pixels[ip] == WATER_SOURCE)\n out.println(\"swap1 WS & \" + Element.lookup(pixels[dest]));\n if (pixels[dest] == WATER_SOURCE)\n out.println(\"swap2 WS & \" + Element.lookup(pixels[ip]));\n\n pixels[ip] = pixels[dest];\n pixels[dest] = p;\n }\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n out.println(\" X: \" + x);\n out.println(\" Y: \" + y);\n out.println(\"Source: \" + Element.lookup(p));\n out.println(\"Source: \" + Element.lookup(pixels[ip]));\n out.println(\" Dest: \" + Element.lookup(pixels[dest]));\n \n }\n }\n }\n }", "private void tickPeople() {\n\t\tplayer.tick();\n\t\tfor (Councilman councilman: councilmen) {\n\t\t\tcouncilman.tick();\n\t\t}\n\t}", "public void tickBombs() {\r\n\t\tfor (int i = 0; i < bombs.length; i++) {\r\n\t\t\tBomb b = bombs[i];\r\n\t\t\tif (b != null) {\r\n\t\t\t\tif (b.isTicking()) {\r\n\t\t\t\t\tb.tick();\r\n\t\t\t\t} else if (b.isExploding()) {\r\n\t\t\t\t\tif (b.getExplosionTicks() == b.getMaxExplosionTicks()) {\r\n\t\t\t\t\t\texplodeBomb(b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tb.tick();\r\n\t\t\t\t} else if (b.hasFinished()) {\r\n\t\t\t\t\tclearExplosions(b);\r\n\t\t\t\t\tbombs[i] = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void removeSprites(){\r\n\r\n\t}", "public void run() {\n removed = 0;\n for (World world: plugin.getServer().getWorlds()) {\n for (Chunk chunk : world.getLoadedChunks()) {\n sweepChunk(chunk);\n }\n }\n if (plugin.getConfiguration().debug()) {\n plugin.getLogger().info(String.format(\"Age limit sweep removed %d entities\", removed));\n }\n }", "void dropHandler() {\n if (tickSpeed < 0) {\n if((int)random(1,6) == 1){ //every 6 medkits the handler drops a minigun\n Sprite mg = new Sprite(minigun);\n mg.moveToPoint(random(0,2048), random(0, 2048)); //moves drop to random point\n minigunDrop.add(mg);\n tickSpeed = (int)random(100,500);\n }else if((int)random(1,4) == 1){ //every 4 medkits the handler drops a coilgun\n Sprite cg = new Sprite(coilgun);\n cg.moveToPoint(random(0,2048), random(0,2048)); //moves drop to random point\n coilgunDrop.add(cg);\n tickSpeed = (int)random(100,500); //changes \n }\n else {\n \n \n Medkit hp = new Medkit();\n hp.med.moveToPoint(random(0, 2048), random(0, 2048));\n\n health.add(hp);\n\n tickSpeed = (int)random(100,500);\n }\n }\n tickSpeed--;\n for (Medkit hp: health) {\n hp.med.display();\n hp.timer--;\n\n }\n for (Sprite mg: minigunDrop){\n mg.display();\n }\n for (Sprite cg: coilgunDrop){\n cg.display();\n }\n // e.forward(5);\n}", "public void clearEnemies() {\n\t\tIterator<Entity> it = entities.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tEntity e = it.next();\n\t\t\t//Skip playerfish\n\t\t\tif (e instanceof PlayerFish) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//Kill and remove the entity\n\t\t\te.kill();\n\t\t\tit.remove();\n\t\t}\n\t\t\n\t\t//Remove all non playerfish from collidables\n\t\tcollidables.removeIf(c -> !(c instanceof PlayerFish));\n\t\tdrawables.removeIf(c -> !(c instanceof PlayerFish));\n\t}", "public void clearAllPoints() {\n\t\tpoints.clear();\n\t\tnotifyListeners();\n\t}", "private void onTickInGame()\n \t{\n \n \t\ttry\n \t\t{\n \n \t\t\tif(tickCount>100)\n \t\t\t{\n \t\t\t\ttickCount=0;\n \t\t\t\tint i=0;\n \n \n \t\t\t\twhile (i<15&&FMLCommonHandler.instance().getEffectiveSide()==Side.SERVER)\n \t\t\t\t{\n \t\t\t\t\ti++;\n \t\t\t\t\tLinkData link;\n \n \t\t\t\t\t//actually gets the random rift based on the size of the list\n \t\t\t\t\tlink = (LinkData) dimHelper.instance.getRandomLinkData(true);\n \n \n \n \t\t\t\t\tif(link!=null)\n \t\t\t\t\t{\n \n \t\t\t\t\t\tif(dimHelper.getWorld(link.locDimID)!=null)\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tWorld world=dimHelper.getWorld(link.locDimID);\n \n \t\t\t\t\t\t\tint blocktoReplace = world.getBlockId(link.locXCoord, link.locYCoord, link.locZCoord);\n \n \t\t\t\t\t\t\tif(!mod_pocketDim.blocksImmuneToRift.contains(blocktoReplace))//makes sure the rift doesn't replace a door or something\n \t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\tif(dimHelper.instance.getLinkDataFromCoords(link.locXCoord, link.locYCoord, link.locZCoord, link.locDimID)==null)\n \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\telse\n \t\t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\t\tdimHelper.getWorld(link.locDimID).setBlock(link.locXCoord, link.locYCoord, link.locZCoord, properties.RiftBlockID);\n \t\t\t\t\t\t\t\t\tTileEntityRift.class.cast(dimHelper.getWorld(link.locDimID).getBlockTileEntity(link.locXCoord, link.locYCoord, link.locZCoord)).hasGrownRifts=true;\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \n \n \t\t}\n \t\tcatch (Exception e)\n \t\t{\n \t\t\ttickCount++;\n \t\t\tSystem.out.println(\"something on tick went wrong: \" + e);\n \t\t\te.printStackTrace();\n \t\t}\n \t\ttickCount++;\n \n \t\t//this section regulates decay in Limbo- it records any blocks placed by the player and later progresss them through the decay cycle\n \t\tif(tickCount2>10&&dimHelper.blocksToDecay!=null)\n \t\t{\n \t\t\ttickCount2=0;\n \t\t\tif(!dimHelper.blocksToDecay.isEmpty()&&dimHelper.getWorld(properties.LimboDimensionID)!=null)\n \t\t\t{\n \n \n \t\t\t\tif(dimHelper.blocksToDecay.size()>rand.nextInt(400))\n \t\t\t\t{\n \t\t\t\t\tint index = rand.nextInt(dimHelper.blocksToDecay.size());\n \t\t\t\t\tPoint3D point = (Point3D) dimHelper.blocksToDecay.get(index);\n \n \t\t\t\t\tint blockID = dimHelper.getWorld(properties.LimboDimensionID).getBlockId(point.getX(), point.getY(), point.getZ());\n \t\t\t\t\tint idToSet=Block.stone.blockID;\n \n \t\t\t\t\tif(blockID==0||blockID==properties.LimboBlockID)\n \t\t\t\t\t{\n \t\t\t\t\t\tdimHelper.blocksToDecay.remove(index);\n \t\t\t\t\t}\n \t\t\t\t\telse\n \t\t\t\t\t{\n \t\t\t\t\t\tif(Block.blocksList[idToSet] instanceof BlockContainer)\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tidToSet=-1;\n \t\t\t\t\t\t\tdimHelper.blocksToDecay.remove(index); \n \t\t\t\t\t\t}\n \n \n \n \t\t\t\t\t\tif(blockID==Block.cobblestone.blockID)\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tidToSet=Block.gravel.blockID;\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif(blockID==Block.stone.blockID)\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tidToSet=Block.cobblestone.blockID;\n \n \t\t\t\t\t\t}\n \t\t\t\t\t\tif(blockID==Block.gravel.blockID&&!dimHelper.getWorld(properties.LimboDimensionID).isAirBlock(point.getX(), point.getY()-1, point.getZ()))\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tidToSet=properties.LimboBlockID;\n \t\t\t\t\t\t\tdimHelper.getWorld(properties.LimboDimensionID).scheduleBlockUpdate(point.getX(), point.getY(), point.getZ(),10, idToSet);\n \n \t\t\t\t\t\t}\n \t\t\t\t\t\telse if(blockID==Block.gravel.blockID)\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tdimHelper.blocksToDecay.remove(index);\n \t\t\t\t\t\t\tidToSet=-1;\n \n \t\t\t\t\t\t}\n \n \t\t\t\t\t\tif(idToSet!=-1)\n \t\t\t\t\t\t{\n \n \t\t\t\t\t\t\tdimHelper.getWorld(properties.LimboDimensionID).setBlock(point.getX(), point.getY(), point.getZ(), idToSet);\n \n \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\n \t\t\t}\n \t\t}\n \n \t\ttickCount2++;\n \n \t\tif(mod_pocketDim.teleTimer>0)\n \t\t{\n \t\t\tmod_pocketDim.teleTimer--;\n \t\t}\n \n \n \n \n \n \n \t}", "public void end(){\n\t\tfor(ParticleBatch<?> batch : batches)\n\t\t\tbatch.end();\n\t}", "public void clearVelocity();", "public void moveTrojans() {\n if (bigTrojan == null) {\n for (Trojan trojan : trojans) {\n //set X & Y to bigTrojan's death point.\n\n trojan.getBounds().setPosition(trojan.getX() - trojan.getxSpeed(), trojan.getY() - trojan.getySpeed());\n trojan.setY(trojan.getY() - trojan.getySpeed());\n trojan.setX(trojan.getX() + trojan.getxSpeed());\n trojan.getSprite().setPosition(trojan.getX(), trojan.getY());\n //if trojan collides with player remove player and worm section\n if (trojan.getBounds().overlaps(player.getBounds())) {\n score += trojan.getPoints() / 2;\n for (int i = 0; i < 10; i++) {\n int p = particles.spawn(ParticleManager.Type.DATA, trojan);\n particles.x[p] = (trojan.getX() + trojan.getSprite().getWidth() / 2);\n particles.y[p] = trojan.getY() + trojan.getSprite().getHeight() / 2;\n }\n int p = particles.spawn(ParticleManager.Type.EXPLOSION, trojan);\n particles.x[p] = (trojan.getX() + trojan.getSprite().getWidth() / 2);\n particles.y[p] = trojan.getY() + trojan.getSprite().getHeight() / 2;\n sfx.playSound(SoundFXManager.Type.DEATH);\n removeTrojan = trojan;\n player.setHp(player.getHp() - (trojan.getDamage() * 5));\n }\n }\n if (removeTrojan != null) {\n spawnFiles(removeTrojan.getFileDropCount(), removeTrojan.getX() + (removeTrojan.getSprite().getWidth() / 2), removeTrojan.getY() + removeTrojan.getSprite().getHeight() / 2);\n trojans.remove(removeTrojan);\n }\n }\n //Move big trojan\n else {\n bigTrojan.getBounds().setPosition(bigTrojan.getX() - bigTrojan.getxSpeed(), bigTrojan.getY() - bigTrojan.getySpeed());\n bigTrojan.setY(bigTrojan.getY() - bigTrojan.getySpeed());\n bigTrojan.setX(bigTrojan.getX() + bigTrojan.getxSpeed());\n bigTrojan.getSprite().setPosition(bigTrojan.getX(), bigTrojan.getY());\n trojanWidth = (int) bigTrojan.getX() - 150;\n trojanHeight = (int) bigTrojan.getY();\n if (bigTrojan.getBounds().overlaps(player.getBounds())) {\n score += bigTrojan.getPoints() / 2;\n player.setHp(player.getHp() - (bigTrojan.getDamage() * 10));\n for (int i = 0; i < 10; i++) {\n int p = particles.spawn(ParticleManager.Type.DATA, bigTrojan);\n particles.x[p] = (bigTrojan.getX() + bigTrojan.getSprite().getWidth() / 2);\n particles.y[p] = bigTrojan.getY() + bigTrojan.getSprite().getHeight() / 2;\n }\n int p = particles.spawn(ParticleManager.Type.EXPLOSION, bigTrojan);\n particles.x[p] = (bigTrojan.getX() + bigTrojan.getSprite().getWidth() / 2);\n particles.y[p] = bigTrojan.getY() + bigTrojan.getSprite().getHeight() / 2;\n sfx.playSound(SoundFXManager.Type.DEATH);\n bigTrojan = null;\n //Sets baby trojans to where big trojan died\n for (Trojan trojan : trojans) {\n trojan.setY(trojanHeight);\n\n trojan.setX(trojanWidth);\n trojan.getSprite().setPosition(trojan.getX(), trojan.getY());\n\n //Creates Bounding box\n trojan.setBounds(new Rectangle(trojan.getX(), trojan.getY(), trojan.getSprite().getWidth(), trojan.getSprite().getHeight()));\n trojanWidth += 200;\n }\n }\n }\n }", "public final Set<Particle> getNoCollisionElements()\n {\n return noCollisionElements;\n }", "private static boolean testRemoveOldParticles() {\n\t\tparticles = new Particle[3];\n\t\tparticles[0] = new Particle();\n\t\tparticles[1] = new Particle();\n\t\tparticles[2] = new Particle();\n\t\tparticles[0].setAge(7);\n\t\tparticles[1].setAge(7);\n\t\tparticles[2].setAge(3);\n\t\tremoveOldParticles(6);\n\t\t\n\t\tif (particles[0] != null || particles[1] != null || particles[2].getAge() != 3) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false; \n\t}", "private void step() {\n // Set up the times\n loopTime += calcFreq;\n t += dt*speedSlider.getValue();\n simDate.setTime(loopTime);\n \n if (loopTime % 250 == 0) {\n timeField.setValue(simDate);\n }\n \n mainPanel.repaint();\n \n // Check for collisions\n ArrayList<Body> toBeRemoved = new ArrayList<>();\n for (Body b1 : bodies) {\n for (Body b2 : bodies) {\n if (b1 != b2 && areTouching(b1, b2)) {\n Body big = b1.mass > b2.mass ? b1 : b2;\n Body small = b1 == big ? b2 : b1;\n \n if (toBeRemoved.contains(small)) {\n continue;\n } else {\n toBeRemoved.add(small);\n }\n \n double newvx = (big.state.vx*big.mass+small.state.vx*small.mass)/(big.mass+small.mass);\n double newvy = (big.state.vy*big.mass+small.state.vy*small.mass)/(big.mass+small.mass);\n double newvz = (big.state.vz*big.mass+small.state.vz*small.mass)/(big.mass+small.mass);\n double newden = (big.DENSITY*big.mass+small.DENSITY*small.mass)/(big.mass+small.mass);\n big.mass += small.mass;\n big.DENSITY = newden;\n big.setRadiusFromMass();\n big.state.vx = newvx;\n big.state.vy = newvy;\n big.state.vz = newvz;\n }\n }\n \n // Check for out of bounds\n if (!toBeRemoved.contains(b1)) {\n if (Math.abs(b1.state.x) > cubeL || Math.abs(b1.state.y) > cubeL\n || Math.abs(b1.state.z) > cubeL/2) {\n toBeRemoved.add(b1);\n }\n }\n }\n \n // Remove all that need to be removed\n for (Body b : toBeRemoved) {\n bodies.remove(b);\n totalBodiesCounter.setText(\"\"+bodies.size());\n bodiesComboBox.removeItem(b.name);\n }\n \n // Calculate the next position\n for (Body b : bodies) {\n if (b.moveable) {\n b.nextState.x = b.state.x;\n b.nextState.y = b.state.y;\n b.nextState.z = b.state.z;\n b.nextState.vx = b.state.vx;\n b.nextState.vy = b.state.vy;\n b.nextState.vz = b.state.vz;\n \n b.updateBody(t, dt*speedSlider.getValue());\n if (pathsComboBox.getSelectedItem().equals(\"Lines\") && loopTime % 20 == 0) {\n b.addPos();\n } else if (pathsComboBox.getSelectedItem().equals(\"Dots\") && loopTime % 100 == 0) {\n b.addPos();\n }\n }\n }\n \n // Set each next position\n for (Body b : bodies) {\n if (b.moveable) {\n b.state.x = b.nextState.x;\n b.state.y = b.nextState.y;\n b.state.z = b.nextState.z;\n b.state.vx = b.nextState.vx;\n b.state.vy = b.nextState.vy;\n b.state.vz = b.nextState.vz;\n }\n }\n \n // Update the edit window\n Body bufferedBody = selectedBody;\n if (bufferedBody != null) {\n if (loopTime % 50 == 0) {\n xFieldEdit.setValue(bufferedBody.state.x);\n yFieldEdit.setValue(bufferedBody.state.y);\n zFieldEdit.setValue(bufferedBody.state.z);\n vxFieldEdit.setValue(bufferedBody.state.vx);\n vyFieldEdit.setValue(bufferedBody.state.vy);\n vzFieldEdit.setValue(bufferedBody.state.vz);\n massFieldEdit.setValue(bufferedBody.mass);\n radiusFieldEdit.setValue(bufferedBody.r);\n }\n \n // Follow the body\n if (followBodyButton.isSelected()) {\n setWindowToBody(bufferedBody);\n }\n }\n }", "void removeSpeeds(int i);", "private static void updateParticle(int index) {\n\n\t\tfloat posX = particles[index].getPositionX(); // Current X position of the particle\n\t\tfloat posY = particles[index].getPositionY(); // Current Y position of the particle\n\t\tfloat vX = particles[index].getVelocityX(); // Current horizontal velocity of the particle\n\t\tfloat vY = particles[index].getVelocityY();\t// Current vertical velocity of the particle\n\t\tint age = particles[index].getAge();\t// Current age of the particle\n\t\t\n\t\t// Fill the circle's color and transparency\n\t\tUtility.fill(particles[index].getColor(), particles[index].getTransparency());\n\t\t\n\t\t// Draw the circle\n\t\tUtility.circle(posX, posY, particles[index].getSize());\n\t\t\n\t\t// Update vertical velocity effected by gravity\n\t\tvY = vY + 0.3f;\n\t\t// Update the particle's vertical velocity, XY positions and its age\n\t\tparticles[index].setVelocityY(vY);\n\t\tparticles[index].setPositionX(posX + vX);\n\t\tparticles[index].setPositionY(posY + vY);\n\t\tparticles[index].setAge(age + 1);\n\t\t\n\t\t// Call this method to remove the old particles\n\t\tremoveOldParticles(80);\n\t\t\n\n\t}", "public void tick() {\r\n this.platform = new Rectangle(x, y, w, h);\r\n if(y> Java2DGame.SCREENHEIGHT){\r\n delete();\r\n }\r\n if(platform.intersects(Board.darkness.deathZone)){\r\n delete();\r\n }\r\n }", "protected void playParticle(){\n\t\teffectData.getPlayParticles().playParticles(effectData, effectData.getDisplayAt());\n\t}", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "public void destroy() {\n\t\tfor (GroupPaddle groupPaddle : paddles) {\n\t\t\tPhysicsWorld.getPhysicsWorld().destroy(groupPaddle);\n\t\t}\n\t}", "public void onTick() {\r\n if (this.worklist.size() > 0) {\r\n ArrayList<ACell> tempWorklist = new ArrayList<ACell>();\r\n for (ACell c : this.worklist) {\r\n tempWorklist.add(c);\r\n }\r\n this.worklist = new ArrayList<ACell>();\r\n this.collector(tempWorklist);\r\n }\r\n else if (this.allCellsFlooded()) {\r\n if (this.worklist.size() > 0) {\r\n this.worklist = new ArrayList<ACell>();\r\n }\r\n this.drawWin();\r\n }\r\n else if (this.currTurn >= this.maxTurn) {\r\n if (this.worklist.size() > 0) {\r\n this.worklist = new ArrayList<ACell>();\r\n }\r\n this.drawLose();\r\n }\r\n }", "public void removeAll () {\n\t\teffects.clear();\n\t}", "@Override\r\n public void periodic() {\n }", "@Override\n\tpublic void periodic() {\n\t}", "private void physicsTickDead() {\n\t\t// Check the round end counter\n\t\tif (checkRoundEndCounter()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Physics stuff\n\t\tsetThrusts();\n\t\tmoveEverything(deltaTimeDead);\n\t\tageScoreMarkers(deltaTimeAlive);\n\t\tshootBullets();\n\t\t\n\t\tcollideTankToWall();\n\t\tcollideBulletToWall();\n\t}", "public void release(){\n tex_particles.release();\n }", "@Override\n public void tick() {\n super.tick();\n }", "@SuppressWarnings(\"deprecation\")\n\tpublic void gameTick() {\n\t\tBukkit.getScheduler().runTask(Plugin_MineTime.Plugin, new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\tfor (Block b: beacons) {\n\t\t\t\t\tw.playEffect(b.getLocation(), Effect.ENDER_SIGNAL, 0);\n\t\t\t\t}\n\t\t\t\tfor (Block b: gold_blocks) {\n\t\t\t\t\tw.playEffect(b.getLocation().add(0, 2, 0), Effect.FLYING_GLYPH, 100);\n\t\t\t\t\tw.playEffect(b.getLocation().add(0, 2, 0), Effect.FLYING_GLYPH, 100);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsynchronized (timers) {\n\t\t\t\t\tfor (final byte data: timers.keySet()) {\n\t\t\t\t\t\tif (timers.get(data) > 0) {\n\t\t\t\t\t\t\ttimers.put(data, timers.get(data)-1);\n\t\t\t\t\t\t\tif (!extended.get(data)) {\n\t\t\t\t\t\t\t\textended.put(data, true);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tBukkit.getScheduler().runTaskAsynchronously(Plugin_MineTime.Plugin, new Runnable() {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\tDirection d = getDirection(glass_blocks.get(data));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tboolean wand = false;\n\t\t\t\t\t\t\t\t\t\tLocation l = glass_blocks.get(data).getLocation().add(d.getVector());\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\twhile (!wand) {\n\t\t\t\t\t\t\t\t\t\t\tfinal Block change = w.getBlockAt(l);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tBukkit.getScheduler().runTask(Plugin_MineTime.Plugin, new Runnable() {\n\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\t\tchange.setType(Material.STAINED_GLASS);\n\t\t\t\t\t\t\t\t\t\t\t\t\tchange.setData(data);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tl = l.add(d.getVector());\n\t\t\t\t\t\t\t\t\t\t\tif (!(w.getBlockAt(l).getType() == Material.AIR || w.getBlockAt(l).getType() == Material.STAINED_GLASS)) {\n\t\t\t\t\t\t\t\t\t\t\t\twand = true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tThread.sleep(50);\n\t\t\t\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\t\t\n\t\t\t\t\t\t\tif (extended.get(data)) {\n\t\t\t\t\t\t\t\textended.put(data, false);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tBukkit.getScheduler().runTaskAsynchronously(Plugin_MineTime.Plugin, new Runnable() {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\tDirection d = getDirection(glass_blocks.get(data));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tboolean wand = false;\n\t\t\t\t\t\t\t\t\t\tLocation l = glass_blocks.get(data).getLocation().add(d.getVector());\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\twhile (!wand) {\n\t\t\t\t\t\t\t\t\t\t\tfinal Block change = w.getBlockAt(l);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tBukkit.getScheduler().runTask(Plugin_MineTime.Plugin, new Runnable() {\n\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\t\tchange.setType(Material.AIR);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tl = l.add(d.getVector());\n\t\t\t\t\t\t\t\t\t\t\tif (!(w.getBlockAt(l).getType() == Material.AIR || w.getBlockAt(l).getType() == Material.STAINED_GLASS)) {\n\t\t\t\t\t\t\t\t\t\t\t\twand = true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void setNoDamageTicks ( int ticks ) {\n\t\texecute ( handle -> handle.setNoDamageTicks ( ticks ) );\n\t}", "void invalidateAll();", "public void updateTick(World world, int x, int y, int z, Random rand)\n {\n if (!world.isRemote)\n {\n int l = world.getBlockMetadata(x, y, z);\n\n if ((l & 8) != 0 && (l & 4) == 0)\n {\n byte b0 = 4;\n int i1 = b0 + 1;\n byte b1 = 32;\n int j1 = b1 * b1;\n int k1 = b1 / 2;\n\n if (this.decayThingy == null)\n {\n this.decayThingy = new int[b1 * b1 * b1];\n }\n\n int l1;\n\n if (world.checkChunksExist(x - i1, y - i1, z - i1, x + i1, y + i1, z + i1))\n {\n int i2;\n int j2;\n\n for (l1 = -b0; l1 <= b0; ++l1)\n {\n for (i2 = -b0; i2 <= b0; ++i2)\n {\n for (j2 = -b0; j2 <= b0; ++j2)\n {\n Block block = world.getBlock(x + l1, y + i2, z + j2);\n\n if (block != ForbiddenBlocks.taintLog)\n {\n if (block.isLeaves(world, x + l1, y + i2, z + j2))\n {\n this.decayThingy[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = -2;\n }\n else\n {\n this.decayThingy[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = -1;\n }\n }\n else\n {\n this.decayThingy[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = 0;\n }\n }\n }\n }\n\n for (l1 = 1; l1 <= 4; ++l1)\n {\n for (i2 = -b0; i2 <= b0; ++i2)\n {\n for (j2 = -b0; j2 <= b0; ++j2)\n {\n for (int k2 = -b0; k2 <= b0; ++k2)\n {\n if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1] == l1 - 1)\n {\n if (this.decayThingy[(i2 + k1 - 1) * j1 + (j2 + k1) * b1 + k2 + k1] == -2)\n {\n this.decayThingy[(i2 + k1 - 1) * j1 + (j2 + k1) * b1 + k2 + k1] = l1;\n }\n\n if (this.decayThingy[(i2 + k1 + 1) * j1 + (j2 + k1) * b1 + k2 + k1] == -2)\n {\n this.decayThingy[(i2 + k1 + 1) * j1 + (j2 + k1) * b1 + k2 + k1] = l1;\n }\n\n if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1 - 1) * b1 + k2 + k1] == -2)\n {\n this.decayThingy[(i2 + k1) * j1 + (j2 + k1 - 1) * b1 + k2 + k1] = l1;\n }\n\n if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1 + 1) * b1 + k2 + k1] == -2)\n {\n this.decayThingy[(i2 + k1) * j1 + (j2 + k1 + 1) * b1 + k2 + k1] = l1;\n }\n\n if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + (k2 + k1 - 1)] == -2)\n {\n this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + (k2 + k1 - 1)] = l1;\n }\n\n if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1 + 1] == -2)\n {\n this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1 + 1] = l1;\n }\n }\n }\n }\n }\n }\n }\n\n l1 = this.decayThingy[k1 * j1 + k1 * b1 + k1];\n\n if (l1 >= 0)\n {\n world.setBlockMetadataWithNotify(x, y, z, l & -9, 4);\n }\n else\n {\n this.removeLeaves(world, x, y, z);\n }\n }\n }\n }", "private void collideWithBall() {\n die();\n }", "void kill()\n\t{\n\t\tfor(GameObject G : ObjectList)\n\t\t{\n\t\t\tG.kill();\n\t\t}\n\t}" ]
[ "0.7423599", "0.68614215", "0.64476395", "0.62709546", "0.6242126", "0.62121993", "0.6206372", "0.6136727", "0.61242974", "0.602945", "0.6023285", "0.60172254", "0.60085195", "0.5951178", "0.59414846", "0.59387875", "0.5926092", "0.5866054", "0.58593184", "0.5803565", "0.57883185", "0.57862985", "0.56956697", "0.56861967", "0.56857026", "0.56813735", "0.5654037", "0.564862", "0.56433916", "0.5641803", "0.563776", "0.5629689", "0.5594924", "0.5571149", "0.556047", "0.55397683", "0.5530002", "0.5515429", "0.55078435", "0.547463", "0.54733056", "0.5470381", "0.5468475", "0.5464633", "0.5463227", "0.5460384", "0.5452536", "0.54428", "0.5437978", "0.54377306", "0.5434825", "0.54320395", "0.54314613", "0.54298323", "0.54298323", "0.54258174", "0.5423484", "0.5423361", "0.5418547", "0.54175544", "0.54077566", "0.54077566", "0.54070115", "0.53945315", "0.5392474", "0.53869957", "0.53848433", "0.53821415", "0.537805", "0.53764784", "0.5362172", "0.5358243", "0.5356483", "0.53551686", "0.535276", "0.5348103", "0.53475446", "0.5343544", "0.5343481", "0.5343243", "0.53406125", "0.5339898", "0.532966", "0.5323456", "0.5323456", "0.5323456", "0.53223085", "0.53195906", "0.5307596", "0.5296603", "0.52936745", "0.52882516", "0.52877283", "0.5285158", "0.5279545", "0.527771", "0.5276411", "0.5272244", "0.5268638", "0.5266659" ]
0.7755452
0
Get user input from editor and save product into database.
private void saveProduct() { // Read from input fields // Use trim to eliminate leading or trailing white space String nameString = mNameEditText.getText().toString().trim(); String InfoString = mDescriptionEditText.getText().toString().trim(); String PriceString = mPriceEditText.getText().toString().trim(); String quantityString = mQuantityEditText.getText().toString().trim(); // Check if this is supposed to be a new Product // and check if all the fields in the editor are blank if (mCurrentProductUri == null && TextUtils.isEmpty(nameString) && TextUtils.isEmpty(InfoString) && TextUtils.isEmpty(PriceString) && TextUtils.isEmpty(quantityString)) { // Since no fields were modified, we can return early without creating a new Product. // No need to create ContentValues and no need to do any ContentProvider operations. return; } // Create a ContentValues object where column names are the keys, // and Product attributes from the editor are the values. ContentValues values = new ContentValues(); values.put(ProductContract.productEntry.COLUMN_product_NAME, nameString); values.put(ProductContract.productEntry.COLUMN_Product_description, InfoString); int price = 0; if (!TextUtils.isEmpty(PriceString)) { price = Integer.parseInt(PriceString); } values.put(ProductContract.productEntry.COLUMN_product_price, price); int quantity = 0; if (!TextUtils.isEmpty(quantityString)) { quantity = Integer.parseInt(quantityString); } values.put(productEntry.COLUMN_product_Quantity, quantity); // image Bitmap icLanucher = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher); Bitmap bitmap = ((BitmapDrawable) mImageView.getDrawable()).getBitmap(); if (!equals(icLanucher, bitmap) && mImageURI != null) { values.put(ProductContract.productEntry.COLUMN_product_image, mImageURI.toString()); } // validate all the required information if (TextUtils.isEmpty(nameString) || (quantityString.equalsIgnoreCase("0")) || TextUtils.isEmpty(PriceString)) { Toast.makeText(this, getString(R.string.insert_Product_failed), Toast.LENGTH_SHORT).show(); } else { // Determine if this is a new or existing Product by checking if mCurrentProductUri is null or not if (mCurrentProductUri == null) { // This is a NEW Product, so insert a new pet into the provider, // returning the content URI for the new Product. Uri newUri = getContentResolver().insert(ProductContract.productEntry.CONTENT_URI, values); // Show a toast message depending on whether or not the insertion was successful. if (newUri == null) { // If the new content URI is null, then there was an error with insertion. Toast.makeText(this, getString(R.string.editor_insert_Product_failed), Toast.LENGTH_SHORT).show(); } else { // Otherwise, the insertion was successful and we can display a toast. Toast.makeText(this, getString(R.string.editor_insert_Product_successful), Toast.LENGTH_SHORT).show(); } } else { // Otherwise this is an EXISTING Product, so update the Product with content URI: mCurrentProductUri // and pass in the new ContentValues. Pass in null for the selection and selection args // because mCurrentProductUri will already identify the correct row in the database that // we want to modify. int rowsAffected = getContentResolver().update(mCurrentProductUri, values, null, null); // Show a toast message depending on whether or not the update was successful. if (rowsAffected == 0) { // If no rows were affected, then there was an error with the update. Toast.makeText(this, getString(R.string.editor_update_Product_failed), Toast.LENGTH_SHORT).show(); } else { // Otherwise, the update was successful and we can display a toast. Toast.makeText(this, getString(R.string.editor_update_Product_successful), Toast.LENGTH_SHORT).show(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveProduct() {\n //Delegating to the Presenter to trigger focus loss on listener registered Views,\n //in order to persist their data\n mPresenter.triggerFocusLost();\n\n //Retrieving the data from the views and the adapter\n String productName = mEditTextProductName.getText().toString().trim();\n String productSku = mEditTextProductSku.getText().toString().trim();\n String productDescription = mEditTextProductDescription.getText().toString().trim();\n ArrayList<ProductAttribute> productAttributes = mProductAttributesAdapter.getProductAttributes();\n mCategoryOtherText = mEditTextProductCategoryOther.getText().toString().trim();\n\n //Delegating to the Presenter to initiate the Save process\n mPresenter.onSave(productName,\n productSku,\n productDescription,\n mCategoryLastSelected,\n mCategoryOtherText,\n productAttributes\n );\n }", "public void saveButtonPressed(ActionEvent actionEvent) throws IOException{\n validateInputs(actionEvent);\n\n if (isInputValid) {\n //creates a new Product object with identifier currentProduct\n currentProduct = new Product(productNameInput, productInventoryLevel, productPriceInput, maxInventoryLevelInput, minInventoryLevelInput);\n\n //passes currentProduct as the argument for the .addMethod.\n Inventory.getAllProducts().add(currentProduct);\n\n //utilizes the associatedPartsTableviewHolder wiht a for loop to pass each element as an argument\n //for the .addAssociatedPart method.\n for (Part part : associatedPartTableViewHolder) {\n currentProduct.addAssociatedPart(part);\n }\n\n //calls the returnToMainMen() method.\n mainMenuWindow.returnToMainMenu(actionEvent);\n }\n else {\n isInputValid = true;\n }\n\n }", "void saveProduct(Product product);", "public void saveProduct(Product product);", "@FXML\n void saveModifyProductButton(ActionEvent event) throws IOException {\n\n try {\n int id = selectedProduct.getId();\n String name = productNameText.getText();\n Double price = Double.parseDouble(productPriceText.getText());\n int stock = Integer.parseInt(productInventoryText.getText());\n int min = Integer.parseInt(productMinText.getText());\n int max = Integer.parseInt(productMaxText.getText());\n\n if (name.isEmpty()) {\n AlartMessage.displayAlertAdd(5);\n } else {\n if (minValid(min, max) && inventoryValid(min, max, stock)) {\n\n Product newProduct = new Product(id, name, price, stock, min, max);\n\n assocParts.forEach((part) -> {\n newProduct.addAssociatedPart(part);\n });\n\n Inventory.addProduct(newProduct);\n Inventory.deleteProduct(selectedProduct);\n mainScreen(event);\n }\n }\n } catch (IOException | NumberFormatException e){\n AlartMessage.displayAlertAdd(1);\n }\n }", "private void addProduct()\n {\n System.out.println(\"|➕| Add new Product:\\n\");\n System.out.println(\"|➕| Enter ID\\n\");\n int id = Integer.parseInt(reader.getInput());\n System.out.println(\"|➕| Enter Name\\n\");\n String name = reader.getInput();\n manager.addProduct(id, name);\n }", "public void openProductEditor()\n {\n ArrayList<GenericEditor.GERow> rows = new ArrayList<>();\n rows.add(new GenericEditor.GERow(\"Product\", \"Product Name\", this));\n rows.add(new GenericEditor.GERow(\"Store\", \"Store Name\", this));\n rows.add(new GenericEditor.GERow(\"Deal\", \"Deal Description\", this));\n rows.add(new GenericEditor.GERow(\"Price\", \"$$$\", this));\n\n\n GenericEditor pEditor = new GenericEditor(\"Product Editor\", rows);\n pEditor.setOnInputListener(productEditorListener);\n\n pEditor.show(getSupportFragmentManager(), \"ProductEditor\");\n }", "Product editProduct(Product product);", "private void saveProduct() {\n Product product;\n String name = productName.getText().toString();\n if (name.isEmpty()) {\n productName.setError(getResources().getText(R.string.product_name_error));\n return;\n }\n String brandStr = brand.getText().toString();\n String brandOwnerStr = brandOwner.getText().toString();\n if (dbProduct == null) {\n product = new Product();\n product.setGtin(gtin);\n product.setLanguage(language);\n } else {\n product = dbProduct;\n }\n if (!name.isEmpty()) {\n product.setName(name);\n }\n if (!brandStr.isEmpty()) {\n product.setBrand(brandStr);\n }\n if (!brandOwnerStr.isEmpty()) {\n product.setBrandOwner(brandOwnerStr);\n }\n product.setCategory(selectedCategoryKey);\n LoadingIndicator.show();\n // TODO enable/disable save button\n PLYCompletion<Product> completion = new PLYCompletion<Product>() {\n @Override\n public void onSuccess(Product result) {\n Log.d(\"SavePDetailsCallback\", \"Product details saved\");\n dbProduct = result;\n LoadingIndicator.hide();\n if (isNewProduct) {\n SnackbarUtil.make(getActivity(), getView(), R.string.product_saved, Snackbar\n .LENGTH_LONG).show();\n DataChangeListener.productCreate(result);\n } else {\n SnackbarUtil.make(getActivity(), getView(), R.string.product_edited, Snackbar\n .LENGTH_LONG).show();\n DataChangeListener.productUpdate(result);\n }\n }\n\n @Override\n public void onPostSuccess(Product result) {\n FragmentActivity activity = getActivity();\n if (activity != null) {\n activity.onBackPressed();\n }\n }\n\n @Override\n public void onError(PLYAndroid.QueryError error) {\n Log.d(\"SavePDetailsCallback\", error.getMessage());\n if (isNewProduct || !error.isHttpStatusError() || !error.hasInternalErrorCode\n (PLYStatusCodes.OBJECT_NOT_UPDATED_NO_CHANGES_CODE)) {\n SnackbarUtil.make(getActivity(), getView(), error.getMessage(), Snackbar.LENGTH_LONG)\n .show();\n }\n LoadingIndicator.hide();\n }\n\n @Override\n public void onPostError(PLYAndroid.QueryError error) {\n if (!isNewProduct && error.isHttpStatusError() && error.hasInternalErrorCode(PLYStatusCodes\n .OBJECT_NOT_UPDATED_NO_CHANGES_CODE)) {\n FragmentActivity activity = getActivity();\n if (activity != null) {\n activity.onBackPressed();\n }\n }\n }\n };\n if (dbProduct == null) {\n ProductService.createProduct(sequentialClient, product, completion);\n } else {\n ProductService.updateProduct(sequentialClient, product, completion);\n }\n }", "@FXML void onActionModifyProductSave(ActionEvent event) throws IOException {\n\n try{\n //obtain user generated data\n String productName = productNameField.getText();\n int productInv = Integer.parseInt(productInvField.getText());\n Double productPrice = Double.parseDouble(productPriceField.getText());\n int productMax = Integer.parseInt(productMaxField.getText());\n int productMin = Integer.parseInt(productMinField.getText());\n\n if(productMax < productMin){\n Alert alert = new Alert(Alert.AlertType.ERROR, \"Max must be greater than min.\");\n alert.setTitle(\"Invalid entries\");\n alert.showAndWait();\n } else if(productInv < productMin || productInv > productMax) {\n Alert alert = new Alert(Alert.AlertType.ERROR, \"Inv must be between min and max.\");\n alert.setTitle(\"Invalid entries\");\n alert.showAndWait();\n } else {\n\n //save the updated data into the inventory\n Product newProduct = new Product(Integer.parseInt(productIdField.getText()), productName, productPrice,productInv, productMin, productMax);\n\n //save the updated list of associated parts to the product\n newProduct.getAllAssociatedParts().addAll(tmpAssociatedParts);\n\n //save the updated product to inventory\n Inventory.updateProduct(newProduct);\n\n // switch the screen\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n //load the new scene\n scene = FXMLLoader.load(getClass().getResource(\"/view/MainMenu.fxml\"));\n stage.setScene(new Scene(scene));\n stage.show();\n }\n } catch(NumberFormatException e){\n Alert alert = new Alert(Alert.AlertType.WARNING);\n alert.setTitle(\"Invalid Entries\");\n alert.setContentText(\"Please enter a valid value for each text field. All entries must be numeric except Name.\");\n alert.showAndWait();\n }\n\n }", "Product storeProduct(Product product);", "public void addProduct() {\n Product result;\n String prodName = getToken(\"Enter product name: \");\n double price = getDouble(\"Enter price per unit: $\");\n result = warehouse.addProduct(prodName, price);\n if (result != null) {\n System.out.println(result);\n }\n else {\n System.out.println(\"Product could not be added.\");\n }\n }", "private void storeInputInDatabase(){\n // get the {@userInfoValues} as inputs of userInfo that needs to be inserted in the table {@ user_info}\n // get the {@productInfoValues} as inputs of user Product details that needs to be inserted in the table {@ product_info}\n // This is called when user clicks on add new client.\n if (firstName == null && location == null) {\n ContentValues userInfoValues = storeUserInfo();\n /**\n * {@user_info_insertion_uri} {@product_info_insertion_uri} returns a Uri with the last inserted row number after the insertion of the content values,\n * {@user_info_insertion_uri} last character which is {@ID} is then used by {@productInfoValues} for it's foreign key.\n * ContentUris.parseId(uri) find the id from the uri and return it.\n * */\n Uri user_info_insertion_uri = getContentResolver().insert(clientContract.ClientEntry.CONTENT_URI, userInfoValues);\n ContentValues productInfoValues = storeProductInfo(ContentUris.parseId(user_info_insertion_uri));\n Uri product_info_insertion_uri = getContentResolver().insert(clientContract.ClientInfo.CONTENT_URI,productInfoValues);\n Toast.makeText(AddNewClient.this,\"Added\",Toast.LENGTH_SHORT).show();\n\n }// when clients client buys a new item so this will add it to the product_info\n // currentClientUri is the Uri received from MainActivity.\n else if( (firstName != null && location != null) && payMode == null && product_pk_id == -2) {\n ContentValues productInfoValues = storeProductInfo(ContentUris.parseId(currentClientUri));\n Uri uris = getContentResolver().insert(clientContract.ClientInfo.CONTENT_URI_PRODUCT_INFO_INSERT_ITEM,productInfoValues);\n Toast.makeText(AddNewClient.this,\"Added\",Toast.LENGTH_SHORT).show();\n }else if (firstName != null && location != null && payMode != null && product_pk_id != -2){\n ContentValues productInfoValues = storeProductInfo(product_pk_id);\n int rows = getContentResolver().update(clientContract.ClientInfo.CONTENT_URI,productInfoValues,clientContract.ClientInfo.COLUMN_PK_ID+\"=\"+product_pk_id,null);\n if (rows == 0){\n Toast.makeText(this,\"Error\",Toast.LENGTH_SHORT).show();\n }else{\n Toast.makeText(this,\"Updated\",Toast.LENGTH_SHORT).show();\n }\n }\n }", "private void editProduct() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter Product Id - \");\n\t\t\tint productId = getValidInteger(\"Enter Product Id -\");\n\t\t\twhile (!CartController.getInstance().isProductPresentInCart(\n\t\t\t\t\tproductId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id - \");\n\t\t\t\tproductId = getValidInteger(\"Enter Product Id -\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter new Quantity of Product\");\n\t\t\tint quantity = getValidInteger(\"Enter new Quantity of Product\");\n\t\t\tCartController.getInstance().editProductFromCart(productId,\n\t\t\t\t\tquantity);\n\t\t} else {\n\t\t\tDisplayOutput.getInstance().displayOutput(\n\t\t\t\t\t\"\\n-----Cart Is Empty----\\n\");\n\t\t}\n\t}", "private void savePhone() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String brandString = mBrandEditText.getText().toString().trim();\n String modelString = mModelEditText.getText().toString().trim();\n String storageSizeString = mStorageSizeEditText.getText().toString().trim();\n String quantityString = mQuantityEditText.getText().toString().trim();\n String priceString = mPriceEditText.getText().toString().trim();\n\n // Check if this is supposed to be a new pet\n // and check for user validation\n if (TextUtils.isEmpty(brandString) || TextUtils.isEmpty(modelString)\n || priceString.equalsIgnoreCase(\"\") || quantityString.equalsIgnoreCase(\"\")\n || storageSizeString.equalsIgnoreCase(\"\")) {\n // Since no fields were modified, we can return early without creating a new inventory.\n // No need to create ContentValues and no need to do any ContentProvider operations.\n Toast.makeText(getApplicationContext(),\"Please fill in all input values\",\n Toast.LENGTH_LONG).show();\n return;\n }\n\n int price = 0;\n if(!priceString.equalsIgnoreCase(\"\")) {\n price = Integer.valueOf(priceString);\n }\n int quantity = 0;\n if(!quantityString.equalsIgnoreCase(\"\")) {\n quantity = Integer.valueOf(priceString);\n }\n int storageSize = 0;\n if(!storageSizeString.equalsIgnoreCase(\"\")) {\n storageSize = Integer.valueOf(priceString);\n }\n\n if(mProductPhoto.getDrawable() == null) {\n Toast.makeText(this,\"You must upload an image.\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n Bitmap imageBitMap = ((BitmapDrawable)mProductPhoto.getDrawable()).getBitmap();\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n imageBitMap.compress(Bitmap.CompressFormat.PNG, 100, bos);\n byte[] imageByteArray = bos.toByteArray();\n\n // Create a ContentValues object where column names are the keys,\n // and Phone attributes from the editor are the values.\n ContentValues values = new ContentValues();\n values.put(PhoneEntry.COLUMN_PHONE_BRAND, brandString);\n values.put(PhoneEntry.COLUMN_PHONE_MODEL, modelString);\n values.put(PhoneEntry.COLUMN_PHONE_PRICE, price);\n values.put(PhoneEntry.COLUMN_PHONE_QUANTITY, quantity);\n values.put(PhoneEntry.COLUMN_PHONE_MEMORY, storageSize);\n values.put(PhoneEntry.COLUMN_PHONE_COLOUR, mColour);\n values.put(PhoneEntry.COLUMN_PHONE_PICTURE,imageByteArray);\n\n // Determine if this is a new or existing pet by checking if mCurrentPhoneUri is null or not\n if (mCurrentPhoneUri == null) {\n // This is a NEW pet, so insert a new pet into the provider,\n // returning the content URI for the new pet.\n Uri newUri = getContentResolver().insert(PhoneEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the new content URI is null, then there was an error with insertion.\n Toast.makeText(this, getString(R.string.editor_insert_phone_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_insert_phone_successful),\n Toast.LENGTH_SHORT).show();\n }\n } else {\n // Otherwise this is an EXISTING pet, so update the pet with content URI: mCurrentPetUri\n // and pass in the new ContentValues. Pass in null for the selection and selection args\n // because mCurrentPetUri will already identify the correct row in the database that\n // we want to modify.\n int rowsAffected = getContentResolver().update(mCurrentPhoneUri, values, null, null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsAffected == 0) {\n // If no rows were affected, then there was an error with the update.\n Toast.makeText(this, getString(R.string.editor_update_phone_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_update_phone_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n }", "public void addButtonClicked(){\n Products products = new Products(buckysInput.getText().toString());\n dbHandler.addProduct(products);\n printDatabase();\n }", "@Override\r\n\tpublic void ManageProduct() {\n\t\tint id = this.view.enterId();\r\n\t\tString name = this.view.enterName();\r\n\t\tfloat price = this.view.enterPrice();\r\n\t\tint quantity = this.view.enterQuantity();\r\n\t\t\r\n\t\tthis.model.updProduct(id, name, price, quantity);\r\n\t}", "public void purchaseProduct(ActionEvent actionEvent) {\r\n try {\r\n //Initialises a text input dialog.\r\n TextInputDialog dialog = new TextInputDialog(\"\");\r\n dialog.setHeaderText(\"Enter What Is Asked Below!\");\r\n dialog.setContentText(\"Please Enter A Product Name:\");\r\n dialog.setResizable(true);\r\n dialog.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\r\n\r\n //Takes in the users value\r\n Optional<String> result = dialog.showAndWait();\r\n //Makes the purchase and adds the transaction.\r\n String theResult = controller.purchaseProduct(result.get());\r\n //If the product isn't found.\r\n if (theResult.equals(\"Product Doesn't Match\")) {\r\n //Display an error message.\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.initStyle(StageStyle.UTILITY);\r\n alert.setHeaderText(\"Read Information Below!\");\r\n alert.setContentText(\"PRODUCT NOT FOUND! - CONTACT ADMINISTRATOR!\");\r\n alert.setResizable(true);\r\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\r\n alert.showAndWait();\r\n //If it is found.\r\n } else if (theResult.equals(\"Product Match!\")) {\r\n //Display a message saying that the product is found.\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.initStyle(StageStyle.UTILITY);\r\n alert.setHeaderText(\"Read Information Below!\");\r\n alert.setContentText(\"PRODUCT PURCHASED!\");\r\n alert.setResizable(true);\r\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\r\n alert.showAndWait();\r\n }//END IF/ELSE\r\n } catch (HibernateException e){\r\n //If the database disconnects then display an error message.\r\n ErrorMessage message = new ErrorMessage();\r\n message.errorMessage(\"DATABASE DISCONNECTED! - SYSTEM SHUTDOWN!\");\r\n System.exit(0);\r\n } //END TRY/CATCH\r\n }", "public boolean save(Product product);", "Product save(Product product);", "public Product inputProduct() {\n Scanner in = new Scanner(System.in);\n System.out.println(\"Description:\");\n String dscrp = in.next();\n p.setName(dscrp);\n System.out.println(\"Price:\");\n double Price = in.nextDouble();\n p.setPrice(Price);\n System.out.println(\"Quantity:\");\n int Quantity = in.nextInt();\n p.setQuantity(Quantity);\n\n return new Product(p.getName(), p.getPrice(), p.getQuantity());\n }", "@FXML\r\n void onActionSaveProduct(ActionEvent event) throws IOException {\r\n\r\n int id = Inventory.ProductCounter();\r\n String name = AddProductName.getText();\r\n int stock = Integer.parseInt(AddProductStock.getText());\r\n Double price = Double.parseDouble(AddProductPrice.getText());\r\n int max = Integer.parseInt(AddProductMax.getText());\r\n int min = Integer.parseInt(AddProductMin.getText());\r\n\r\n Inventory.addProduct(new Product(id, name, price, stock, min, max, product.getAllAssociatedParts()));\r\n\r\n\r\n //EXCEPTION SET 1 REQUIREMENT\r\n if(min > max){\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"ERROR\");\r\n alert.setContentText(\"Quantity minimum is larger than maximum.\");\r\n alert.showAndWait();\r\n return;\r\n } if (stock > max){\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"ERROR\");\r\n alert.setContentText(\"Inventory quantity exceeds maximum stock allowed.\");\r\n alert.showAndWait();\r\n return;\r\n }\r\n changeScreen(event, \"MainScreen.fxml\");\r\n }", "public void updateDb(View view) {\n String productName = getIntent().getStringExtra(\"product\");\n Product p = db.getProductByName(productName);\n p.setName(name.getText().toString());\n p.setAvail(availSpinner.getSelectedItem().toString());\n p.setDescription(desc.getText().toString());\n p.setPrice(new BigDecimal(price.getText().toString()));\n p.setWeight(Double.parseDouble(weight.getText().toString()));\n db.updateProduct(p);\n finish();\n }", "public void saveNewProduct(Product product) throws BackendException;", "public void addToDatabaseProduct() {\n // Database credentials\n String pass = \"\";\n\n InputStream passPath = Controller.class.getResourceAsStream(\"/password.txt\");\n if (passPath == null) {\n System.out.println(\"Could not find password in resources folder\");\n }\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(passPath));\n String line = null;\n while (true) {\n try {\n if (!((line = reader.readLine()) != null)) {\n break;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(line);\n if (line != null) {\n pass = line;\n System.out.println(\"Password login: \" + line);\n break;\n }\n }\n Connection conn = null; //Temporary\n PreparedStatement stmt = null; //Temporary\n\n try {\n // STEP 1: Register JDBC driver\n Class.forName(\"org.h2.Driver\");\n\n //STEP 2: Open a connection\n conn = DriverManager.getConnection(\"jdbc:h2:./res/HR\", \"\",\n pass);\n\n final String sqlProductName = txtProductName.getText();\n String sqlManufName = txtManufacturer.getText();\n ItemType sqlItemType = choiceType.getValue();\n\n stmt = conn.prepareStatement(\"INSERT INTO Product(type, manufacturer, name) VALUES (?, ?, ?)\",\n Statement.RETURN_GENERATED_KEYS);\n stmt.setString(1, sqlItemType.toString());\n stmt.setString(2, sqlManufName);\n stmt.setString(3, sqlProductName);\n\n stmt.executeUpdate();\n\n stmt.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void saveProduct(Product product) throws Exception {\n\r\n\t}", "public void save()throws Exception{\n if(!pname1.getText().isEmpty() && !qty1.getText().isEmpty() && !prc1.getText().isEmpty() && !rsp1.getText().isEmpty() ){\r\n s_notif1.setId(\"hide\");\r\n ArrayList<Product> ar = new ArrayList<>();\r\n com.mysql.jdbc.Connection conn = db.getConnection();\r\n Statement stm = conn.createStatement();\r\n int rs = stm.executeUpdate(\"UPDATE products SET \"\r\n + \"name='\"+pname1.getText()+\"', \"\r\n + \"qty='\"+qty1.getText()+\"', \"\r\n + \"price='\"+prc1.getText()+\"',\"\r\n + \"re_stock_point='\"+rsp1.getText()+\"' WHERE ID ='\"+S_ID+\"';\");\r\n if(rs > 0){\r\n s_notif1.setId(\"show\");\r\n }\r\n }\r\n loadData();\r\n }", "public void onAddButtonClick(View view) {\n\n if (view.getId() == R.id.Badd) {\n\n EditText a = (EditText) findViewById(R.id.TFenterName);\n\n String b = a.getText().toString();\n product.setProductName(b);\n\n a = (EditText) findViewById(R.id.TFenterPrice);\n b = a.getText().toString();\n product.setPrice(b);\n\n a = (EditText) findViewById(R.id.TFenterQuantity);\n b = a.getText().toString();\n product.setQuantity(b);\n\n a = (EditText) findViewById(R.id.TFLocation);\n b = a.getText().toString();\n product.setLocation(b);\n\n a = (EditText) findViewById(R.id.TFExpiration);\n b = a.getText().toString();\n product.setExpiration(b);\n\n helper.insertProduct(product);\n\n Intent i = new Intent(AddProduct.this, WasAdded.class);\n i.putExtra(\"product\", product.getProductName());\n startActivity(i);\n\n }\n }", "Product updateProductInStore(Product product);", "protected void saveInput() {\r\n value = valueText.getText();\r\n }", "private void saveBook() {\n // Read the data from the fields\n String productName = productNameEditText.getText().toString().trim();\n String price = priceEditText.getText().toString().trim();\n String quantity = Integer.toString(bookQuantity);\n String supplierName = supplierNameEditText.getText().toString().trim();\n String supplierPhone = supplierPhoneEditText.getText().toString().trim();\n\n // Check if any fields are empty, throw error message and return early if so\n if (productName.isEmpty() || price.isEmpty() ||\n quantity.isEmpty() || supplierName.isEmpty() ||\n supplierPhone.isEmpty()) {\n Toast.makeText(this, R.string.editor_activity_empty_message, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Format the price so it has 2 decimal places\n String priceFormatted = String.format(java.util.Locale.getDefault(), \"%.2f\", Float.parseFloat(price));\n\n // Create the ContentValue object and put the information in it\n ContentValues contentValues = new ContentValues();\n contentValues.put(BookEntry.COLUMN_BOOK_PRODUCT_NAME, productName);\n contentValues.put(BookEntry.COLUMN_BOOK_PRICE, priceFormatted);\n contentValues.put(BookEntry.COLUMN_BOOK_QUANTITY, quantity);\n contentValues.put(BookEntry.COLUMN_BOOK_SUPPLIER_NAME, supplierName);\n contentValues.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER, supplierPhone);\n\n // Save the book data\n if (currentBookUri == null) {\n // New book, so insert into the database\n Uri newUri = getContentResolver().insert(BookEntry.CONTENT_URI, contentValues);\n\n // Show toast if successful or not\n if (newUri == null)\n Toast.makeText(this, getString(R.string.editor_insert_book_failed), Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, getString(R.string.editor_insert_book_successful), Toast.LENGTH_SHORT).show();\n } else {\n // Existing book, so save changes\n int rowsAffected = getContentResolver().update(currentBookUri, contentValues, null, null);\n\n // Show toast if successful or not\n if (rowsAffected == 0)\n Toast.makeText(this, getString(R.string.editor_update_book_failed), Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, getString(R.string.editor_update_book_successful), Toast.LENGTH_SHORT).show();\n\n }\n\n finish();\n }", "@Override\n public void saveButtonListener() {\n // Resets Error Label for resubmit.\n productErrorLabel.setVisible(false);\n productErrorLabel.setText(\"\");\n // If super's error checks are true for any changes to text fields.\n // Then set new values and update product.\n if (getFieldValues()) {\n this.product.setName(this.productName);\n this.product.setPrice(this.productPrice);\n this.product.setStock(this.productInv);\n this.product.setMax(this.productMax);\n this.product.setMin(this.productMin);\n Inventory.updateProduct(productIndex, this.product);\n // Close window\n Stage stage = (Stage) productSaveButton.getScene().getWindow();\n stage.close();\n }\n }", "public void insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public void addProduct(){\n\t\tSystem.out.println(\"Company:\");\n\t\tSystem.out.println(theHolding.fabricationCompanies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Code:\");\n\t\t\tString code = reader.nextLine();\n\t\t\tSystem.out.println(\"Water quantity require:\");\n\t\t\tdouble waterQuantity = reader.nextDouble();\n\t\t\treader.nextLine();\n\t\t\tSystem.out.println(\"Inventory:\");\n\t\t\tint inventory = reader.nextInt();\n\t\t\treader.nextLine();\n\t\t\tProduct toAdd = new Product(name, code, waterQuantity, inventory);\n\t\t\ttheHolding.addProduct(selected, toAdd);\n\t\t\tSystem.out.println(\"The product were added successfuly\");\n\t\t}\n\t}", "private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }", "public String editProduct() {\n ConversationContext<Product> ctx = ProductController.newEditContext(products.getSelectedRow());\n ctx.setLabelWithKey(\"part_products\");\n ctx.setCallBack(editProductCallBack);\n getCurrentConversation().setNextContextSub(ctx);\n return ctx.view();\n }", "@FXML\n\t private void insertProduct (ActionEvent actionEvent) throws SQLException, ClassNotFoundException {\n\t try {\n\t ProductDAO.insertProd(denumireText.getText(),producatorText.getText(),pretText.getText(),marimeText.getText(),culoareText.getText());\n\t resultArea.setText(\"Product inserted! \\n\");\n\t } catch (SQLException e) {\n\t resultArea.setText(\"Problem occurred while inserting product \" + e);\n\t throw e;\n\t }\n\t }", "private void saveBook() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String productName = etTitle.getText().toString().trim();\n String author = etAuthor.getText().toString().trim();\n String price = etPrice.getText().toString().trim();\n String quantity = etEditQuantity.getText().toString().trim();\n String supplier = etSupplier.getText().toString().trim();\n String supplierPhoneNumber = etPhoneNumber.getText().toString().trim();\n\n // If this is a new book and all of the fields are blank.\n if (currentBookUri == null &&\n TextUtils.isEmpty(productName) && TextUtils.isEmpty(author) &&\n TextUtils.isEmpty(price) && quantity.equals(getString(R.string.zero)) &&\n TextUtils.isEmpty(supplier) && TextUtils.isEmpty(supplierPhoneNumber)) {\n // Exit the activity without saving a new book.\n finish();\n return;\n }\n\n // Make sure the book title is entered.\n if (TextUtils.isEmpty(productName)) {\n Toast.makeText(this, R.string.enter_title, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the author is entered.\n if (TextUtils.isEmpty(author)) {\n Toast.makeText(this, R.string.enter_author, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the price is entered.\n if (TextUtils.isEmpty(price)) {\n Toast.makeText(this, R.string.enter_price, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the quantity is entered if it is a new book.\n // Can be zero when editing book, in case the book is out of stock and user wants to change\n // other information, but hasn't received any new inventory yet.\n if (currentBookUri == null && (quantity.equals(getString(R.string.zero)) ||\n quantity.equals(\"\"))) {\n Toast.makeText(this, R.string.enter_quantity, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the supplier is entered.\n if (TextUtils.isEmpty(supplier)) {\n Toast.makeText(this, R.string.enter_supplier, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the supplier's phone number is entered.\n if (TextUtils.isEmpty(supplierPhoneNumber)) {\n Toast.makeText(this, R.string.enter_suppliers_phone_number,\n Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Convert the price to a double.\n double bookPrice = Double.parseDouble(price);\n\n // Convert the quantity to an int, if there is a quantity entered, if not set it to zero.\n int bookQuantity = 0;\n if (!quantity.equals(\"\")) {\n bookQuantity = Integer.parseInt(quantity);\n }\n\n // Create a new map of values, where column names are the keys\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_PRODUCT_NAME, productName);\n values.put(BookEntry.COLUMN_BOOK_AUTHOR, author);\n values.put(BookEntry.COLUMN_BOOK_PRICE, bookPrice);\n values.put(BookEntry.COLUMN_BOOK_QUANTITY, bookQuantity);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER, supplier);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER, supplierPhoneNumber);\n\n // Check if this is a new or existing book.\n if (currentBookUri == null) {\n // Insert a new book into the provider, returning the content URI for the new book.\n Uri newUri = getContentResolver().insert(BookEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the row ID is null, then there was an error with insertion.\n Toast.makeText(this, R.string.save_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful, display a toast.\n Toast.makeText(this, R.string.save_successful, Toast.LENGTH_SHORT).show();\n }\n } else {\n // Check to see if any updates were made if not, no need to update the database.\n if (!bookHasChanged) {\n // Exit the activity without updating the book.\n finish();\n } else {\n // Update the book.\n int rowsUpdated = getContentResolver().update(currentBookUri, values, null,\n null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsUpdated == 0) {\n // If no rows were updated, then there was an error with the update.\n Toast.makeText(this, R.string.update_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful, display a toast.\n Toast.makeText(this, R.string.update_successful,\n Toast.LENGTH_SHORT).show();\n }\n }\n }\n\n // Exit the activity, called here so the user can enter all of the required fields.\n finish();\n }", "public void doSave(VideogameBean prod) throws SQLException {\n\n\t\tDatabaseConnector connector = new DatabaseConnector();\n\t\tconnector.startConnection();\n\t\tPreparedStatement state = null;\n\t\tstate = connector.getJdbcConnection()\n\t\t\t\t.prepareStatement(\"insert into Videogioco values (?, ?, ?, ?, ?, ?, ?, ?)\");\n\n\t\tstate.setInt(1, prod.getVideogameCode());\n\t\tstate.setString(2, prod.getTitle());\n\t\tstate.setString(3, prod.getDescription());\n\t\tstate.setString(4, prod.getConsole());\n\t\tstate.setDouble(5, prod.getPrice());\n\t\tstate.setInt(6, prod.getAvailability());\n\t\tstate.setInt(7, prod.getShipment());\n\t\tstate.setString(8, prod.getImgPath());\n\t\tstate.executeUpdate();\n\t\tconnector.closeConnection();\n\n\t}", "public void addProduct(){\n input.nextLine();\n System.out.print(\"Enter the Product Name: \");\n String productName = input.nextLine();\n System.out.print(\"Enter the Product Code: \");\n int productCode = input.nextInt();\n System.out.print(\"Enter the Unit Cost: \");\n double unitCost = input.nextDouble();\n System.out.print(\"Is this product in your current line (y/n): \");\n char currentProduct = input.next().charAt(0);\n boolean inCurrentProductLine = false;\n if ((currentProduct == 'y') || (currentProduct == 'Y'))\n inCurrentProductLine = true;\n\n store.add(new Product(productName, productCode, unitCost, inCurrentProductLine));}", "void saveOrUpdate(Product product);", "private void saveChanges() {\n product.setName(productName);\n product.setPrice(price);\n\n viewModel.updateProduct(product, new OnAsyncEventListener() {\n @Override\n public void onSuccess() {\n Log.d(TAG, \"updateProduct: success\");\n Intent intent = new Intent(EditProductActivity.this, MainActivity.class);\n startActivity(intent);\n }\n\n @Override\n public void onFailure(Exception e) {\n Log.d(TAG, \"updateProduct: failure\", e);\n final androidx.appcompat.app.AlertDialog alertDialog = new androidx.appcompat.app.AlertDialog.Builder(EditProductActivity.this).create();\n alertDialog.setTitle(\"Can not save\");\n alertDialog.setCancelable(true);\n alertDialog.setMessage(\"Cannot edit this product\");\n alertDialog.setButton(androidx.appcompat.app.AlertDialog.BUTTON_NEGATIVE, \"ok\", (dialog, which) -> alertDialog.dismiss());\n alertDialog.show();\n }\n });\n }", "public void addButtonClicked(View view) {\n\n Products product = new Products(johnsInput.getText().toString());\n\n dbHandler.addProduct(product);\n printDatabase();\n }", "@FXML\n\tpublic void createProduct(ActionEvent event) {\n\t\tif (!txtProductName.getText().equals(\"\") && !txtProductPrice.getText().equals(\"\")\n\t\t\t\t&& ComboSize.getValue() != null && ComboType.getValue() != null && selectedIngredients.size() != 0) {\n\n\t\t\tProduct objProduct = new Product(txtProductName.getText(), ComboSize.getValue(), txtProductPrice.getText(),\n\t\t\t\t\tComboType.getValue(), selectedIngredients);\n\n\t\t\ttry {\n\t\t\t\trestaurant.addProduct(objProduct, empleadoUsername);\n\n\t\t\t\ttxtProductName.setText(null);\n\t\t\t\ttxtProductPrice.setText(null);\n\t\t\t\tComboSize.setValue(null);\n\t\t\t\tComboType.setValue(null);\n\t\t\t\tChoiceIngredients.setValue(null);\n\t\t\t\tselectedIngredients.clear();\n\t\t\t\tproductOptions.clear();\n\t\t\t\tproductOptions.addAll(restaurant.getStringReferencedIdsProducts());\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar los datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "Product addNewProductInStore(Product newProduct);", "private void saveInventoryItem() {\n String productName = mProductName.getText().toString().trim();\n String productPrice = mProductPrice.getText().toString().trim();\n String productQuantity = mProductQuantity.getText().toString().trim();\n String productImage = imageViewUri;\n String supplierEmail = mSupplierEmail.getText().toString().trim();\n\n // Create a content values object where the column names are the keys and\n // the values from the fields in the editor activity are the keys\n ContentValues contentValues = new ContentValues();\n contentValues.put(InventoryContract.InventoryEntry.COLUMN_INVENTORY_ITEM_NAME, productName);\n contentValues.put(InventoryContract.InventoryEntry.COLUMN_INVENTORY_ITEM_PRICE, productPrice);\n contentValues.put(InventoryContract.InventoryEntry.COLUMN_INVENTORY_ITEM_QUANTITY, productQuantity);\n contentValues.put(InventoryContract.InventoryEntry.COLUMN_INVENTORY_ITEM_IMAGE, productImage);\n contentValues.put(InventoryContract.InventoryEntry.COLUMN_INVENTORY_SUPPLIER_EMAIL, supplierEmail);\n\n if (mCurrentInventoryUri == null) {\n\n Uri inventoryUri = null;\n\n try {\n inventoryUri = getContentResolver().insert(InventoryContract.InventoryEntry.CONTENT_URI, contentValues);\n } catch (IllegalArgumentException arg) {\n Log.v(LOG_TAG, \"Exception has been thrown trying to insert to db - check data has been entered into all fields\");\n arg.printStackTrace();\n }\n\n if (inventoryUri == null) {\n // If the new content URI is null, then there was an error with insertion.\n Toast.makeText(this, getString(R.string.saving_inventory_failed),\n Toast.LENGTH_SHORT).show();\n Toast.makeText(this, getString(R.string.check_fields_prompt), Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.saving_inventory_succeeded),\n Toast.LENGTH_SHORT).show();\n }\n } else {\n\n // Otherwise this is an EXISTING inventory item, so update the inventory item with content URI: mCurrentInventoryUri\n // and pass in the new ContentValues. Pass in null for the selection and selection args\n // because mCurrentInventoryUri will already identify the correct row in the database that\n // we want to modify.\n int rowsAffected = 0;\n try {\n rowsAffected = getContentResolver().update(mCurrentInventoryUri, contentValues, null, null);\n } catch (IllegalArgumentException iae) {\n Log.v(LOG_TAG, \"Illegal argument exception was thrown. One of the fields entered in the form was invalid\");\n }\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsAffected == 0) {\n // If no rows were affected, then there was an error with the update.\n Toast.makeText(this, getString(R.string.editor_update_inventory_failed),\n Toast.LENGTH_SHORT).show();\n Toast.makeText(this, \"One of the fields in the edit form was invalid\", Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.saving_inventory_succeeded),\n Toast.LENGTH_SHORT).show();\n }\n\n }\n }", "public void Editproduct(Product objproduct) {\n\t\t\n\t}", "private ContentValues storeProductInfo(int id){\n EditText et_product_dews = findViewById(R.id.et_client_dews);\n EditText et_product_actual_price = findViewById(R.id.et_client_product_actualPrice);\n EditText et_product_selling_price = findViewById(R.id.et_client_product_sellingPrice);\n EditText et_product_size = findViewById(R.id.et_client_product_size);\n String size = et_product_size.getText().toString().isEmpty()?\"null\":et_product_size.getText().toString();\n\n int actualPrice = Integer.parseInt(String.valueOf(et_product_actual_price.getText()).trim());\n int sellingPrice = Integer.parseInt(String.valueOf(et_product_selling_price.getText()).trim());\n // This content value is then inserted in the product info\n ContentValues productInfoValues = new ContentValues();\n productInfoValues.put(clientContract.ClientInfo.COLUMN_PRODUCT_SIZE,size);\n productInfoValues.put(clientContract.ClientInfo.COLUMN_ACTUAL_PRICE, actualPrice);\n productInfoValues.put(clientContract.ClientInfo.COLUMN_SELLING_PRICE,sellingPrice);\n productInfoValues.put(clientContract.ClientInfo.COLUMN_PROFIT,sellingPrice-actualPrice);\n productInfoValues.put(clientContract.ClientInfo.COLUMN_PAYMENT_MODE,mPaymentMode);\n productInfoValues.put(clientContract.ClientInfo.COLUMN_PRODUCT_IMAGE,getImage());\n String strDews = et_product_dews.getText().toString().trim();\n int dews = 0;\n if(!strDews.isEmpty()){\n dews = Integer.parseInt(et_product_dews.getText().toString().trim());\n }\n productInfoValues.put(clientContract.ClientInfo.COLUMN_PENDING,dews);\n return productInfoValues;\n }", "public JavaproductModel postproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Insert the new product to database*/\n int productId = (Integer) hibernateSession.save(oJavaproductModel);\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n\n /* Return the JavaproductModel with updated productId*/\n oJavaproductModel.setproductId(productId);\n return oJavaproductModel;\n }", "private void saveGoal() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String descriptionString = mDescriptionEditText.getText().toString().trim();\n\n\n // Check if this is supposed to be a new product\n // and check if all the fields in the editor are blank\n if (mCurrentGoalUri == null && (TextUtils.isEmpty(descriptionString) )) {\n Toast.makeText(this, \"Please add info to all the fields\",\n Toast.LENGTH_SHORT).show();\n // Since no fields were modified, we can return early without creating a new goal.\n // No need to create ContentValues and no need to do any ContentProvider operations.\n return;\n }\n\n // Create a ContentValues object where column names are the keys,\n // and goal attributes from the editor are the values.\n ContentValues values = new ContentValues();\n values.put(GoalandTaskMatcherContract.GoalEntry.COLUMN_GOAL_DESCRIPTION, descriptionString);\n\n // Determine if this is a new or existing goal by checking if mCurrentGoalUri is null or not\n if (mCurrentGoalUri == null) {\n // This is a NEW goal, so insert a new goal into the provider,\n // returning the content URI for the new goal.\n Uri newUri = getContentResolver().insert(GoalandTaskMatcherContract.GoalEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the new content URI is null, then there was an error with insertion.\n Toast.makeText(this, getString(R.string.editor_insert_goal_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_insert_goal_successful),\n Toast.LENGTH_SHORT).show();\n }\n } else {\n // Otherwise this is an EXISTING goal, so update the goal with content URI: mCurrentGoalUri\n // and pass in the new ContentValues. Pass in null for the selection and selection args\n // because mCurrentGoalUri will already identify the correct row in the database that\n // we want to modify.\n int rowsAffected = getContentResolver().update(mCurrentGoalUri, values, null, null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsAffected == 0) {\n // If no rows were affected, then there was an error with the update.\n Toast.makeText(this, getString(R.string.editor_update_goal_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_update_goal_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n }", "private ContentValues storeProductInfo(long id) {\n // Reference to the Edit Text Field in the AddClient xml to the the user TYPE INPUT\n EditText et_product_name = findViewById(R.id.et_client_product);\n EditText et_product_dews = findViewById(R.id.et_client_dews);\n EditText et_product_actual_price = findViewById(R.id.et_client_product_actualPrice);\n EditText et_product_selling_price = findViewById(R.id.et_client_product_sellingPrice);\n EditText et_product_size = findViewById(R.id.et_client_product_size);\n String size = et_product_size.getText().toString().isEmpty()?\"null\":et_product_size.getText().toString();\n\n // this has the current date when the client as been has brought the product.\n String strTodayDate = getTodayDate();\n int actualPrice = Integer.parseInt(String.valueOf(et_product_actual_price.getText()).trim());\n int sellingPrice = Integer.parseInt(String.valueOf(et_product_selling_price.getText()).trim());\n // This content value is then inserted in the product info\n ContentValues productInfoValues = new ContentValues();\n productInfoValues.put(clientContract.ClientInfo.COLUMN_FK_ID,id);\n productInfoValues.put(clientContract.ClientInfo.COLUMN_PRODUCT_NAME,et_product_name.getText().toString().trim());\n productInfoValues.put(clientContract.ClientInfo.COLUMN_PRODUCT_SIZE,size);\n productInfoValues.put(clientContract.ClientInfo.COLUMN_ACTUAL_PRICE, actualPrice);\n productInfoValues.put(clientContract.ClientInfo.COLUMN_SELLING_PRICE,sellingPrice);\n productInfoValues.put(clientContract.ClientInfo.COLUMN_PROFIT,sellingPrice-actualPrice);\n productInfoValues.put(clientContract.ClientInfo.COLUMN_PROFILE_DATE,strTodayDate);\n productInfoValues.put(clientContract.ClientInfo.COLUMN_PAYMENT_MODE,mPaymentMode);\n productInfoValues.put(clientContract.ClientInfo.COLUMN_PRODUCT_IMAGE,getImage());\n String strDews = et_product_dews.getText().toString().trim();\n int dews = 0;\n if(!strDews.isEmpty()){\n dews = Integer.parseInt(et_product_dews.getText().toString().trim());\n }\n productInfoValues.put(clientContract.ClientInfo.COLUMN_PENDING,dews);\n return productInfoValues;\n }", "@FXML\r\n public void onActionToModifyProductScreen(ActionEvent actionEvent) throws IOException {\r\n\r\n try {\r\n\r\n //Get product information from the Product Controller in order to populate the modify screen text fields\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(\"/View_Controller/modifyProduct.fxml\"));\r\n loader.load();\r\n\r\n ProductController proController = loader.getController();\r\n\r\n if (productsTableView.getSelectionModel().getSelectedItem() != null) {\r\n proController.sendProduct(productsTableView.getSelectionModel().getSelectedItem());\r\n\r\n Stage stage = (Stage) ((Button) actionEvent.getSource()).getScene().getWindow();\r\n Parent scene = loader.getRoot();\r\n stage.setTitle(\"Modify In-house Part\");\r\n stage.setScene(new Scene(scene));\r\n stage.showAndWait();\r\n }\r\n else {\r\n Alert alert2 = new Alert(Alert.AlertType.ERROR);\r\n alert2.setContentText(\"Click on an item to modify.\");\r\n alert2.showAndWait();\r\n }\r\n } catch (IllegalStateException e) {\r\n //ignore\r\n }\r\n catch (NullPointerException n) {\r\n //ignore\r\n }\r\n }", "public void btnAddClicked(View view){\n List list = new List(input.getText().toString());\n dbHandler.addProduct(list);\n printDatabase();\n }", "Product postProduct(Product product);", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString input = (String)comboBoxProductTitle.getSelectedItem();\n\t\t\t\t//String input = productTitleTextField.getText();\n\t\t\t\t\n\t\t\t\tif(input.trim().equals(\"Select\")){ \n\t\t\t\t\tproductTextArea.setText(\"\");\n\t\t\t\t\tproductTextArea.setCaretPosition(0);\n\t\t\t\t\tlistOfProdIds.setSelectedItem(\"Select\");\n\t\t\t\t\tlistOfProductAuthor.setSelectedItem(\"Select\");\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select Product Title From Drop Down Menu\");\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\tproductTextArea.setText(product.viewProductByTitle(input, products));\t//viewInvoiceByCustomer() is in the Invoice class\n\t\t\t\t\tproductTextArea.setCaretPosition(0);\n\t\t\t\t\tlistOfProdIds.setSelectedItem(\"Select\");\n\t\t\t\t\tlistofProductTitle.setSelectedItem(\"Select\");\n\t\t\t\t\tlistOfProductAuthor.setSelectedItem(\"Select\");\n\t\t\t\t\tpriceRange.clearSelection();\n\t\t\t\t\tquantity.clearSelection();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}", "public void handleAddProducts()\n {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/UI/Views/product.fxml\"));\n Parent root = null;\n try {\n root = (Parent) fxmlLoader.load();\n\n // Get controller and configure controller settings\n ProductController productController = fxmlLoader.getController();\n productController.setModifyProducts(false);\n productController.setInventory(inventory);\n productController.setHomeController(this);\n productController.updateParts();\n\n // Spin up product form\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.initStyle(StageStyle.DECORATED);\n stage.setTitle(\"Add Products\");\n stage.setScene(new Scene(root));\n stage.show();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void receiveData()\n {\n Intent i = getIntent();\n productSelected = Paper.book().read(Prevalent.currentProductKey);\n vendorID = i.getStringExtra(\"vendorID\");\n if (productSelected != null) {\n\n productName = i.getStringExtra(\"productName\");\n productImage = i.getStringExtra(\"imageUrl\");\n productLongDescription = i.getStringExtra(\"productLongDescription\");\n productCategory = i.getStringExtra(\"productCategory\");\n productPrice = i.getStringExtra(\"productPrice\");\n productSizesSmall = i.getStringExtra(\"productSizesSmall\");\n productSizesMedium = i.getStringExtra(\"productSizesMedium\");\n productSizesLarge = i.getStringExtra(\"productSizesLarge\");\n productSizesXL = i.getStringExtra(\"productSizesXL\");\n productSizesXXL = i.getStringExtra(\"productSizesXXL\");\n productSizesXXXL = i.getStringExtra(\"productSizesXXXL\");\n productQuantity = i.getStringExtra(\"productQuantity\");\n }\n }", "private void saveInput() {\n\t rateId = txtRateId.getText();\t \n\t startSize = txtStartSize.getText();\n\t endSize = txtEndSize.getText();\n\t }", "private void insertProduct() {\n\n Uri imageforDummyProductURI = Uri.parse(\"android.resource://com.ezyro.uba_inventory/drawable/img_audi_a3\");\n\n\n // Create a ContentValues objecURI\n ContentValues values = new ContentValues();\n values.put(ProductEntry.COLUMN_PRODUCT_NAME, \"ford\");\n values.put(ProductEntry.COLUMN_PRODUCT_UNIT_PRICE, 25000);\n values.put(ProductEntry.COLUMN_PRODUCT_QUANTITY, 1);\n values.put(ProductEntry.COLUMN_PRODUCT_IMAGE_PATH, String.valueOf(imageforDummyProductURI));\n values.put(ProductEntry.COLUMN_PRODUCT_CATEGORY_NAME,\"Car\");\n values.put(ProductEntry.COLUMN_PRODUCT_SUPPLIER_ID,1);\n // values.put(ProductEntry.COLUMN_PRODUCT_SUPPLIER_NAME, \"Audi\");\n // values.put(ProductEntry.COLUMN_PRODUCT_SUPPLIER_EMAIL, \"[email protected]\");\n\n Uri newUri = getContentResolver().insert(ProductEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the new content URI is null, then there was an error with insertion.\n Toast.makeText(this, getString(R.string.editor_insert_product_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_insert_product_successful),\n Toast.LENGTH_SHORT).show();\n }\n }", "public void saveNew() {\r\n String name, compName;\r\n double price;\r\n int id, inv, max, min, machId;\r\n //Gets the ID of the last part in the inventory and adds 1 to it \r\n id = Inventory.getAllParts().get(Inventory.getAllParts().size() - 1).getId() + 1;\r\n name = nameField.getText();\r\n inv = Integer.parseInt(invField.getText());\r\n price = Double.parseDouble(priceField.getText());\r\n max = Integer.parseInt(maxField.getText());\r\n min = Integer.parseInt(minField.getText());\r\n\r\n if (inHouseSelected) {\r\n machId = Integer.parseInt(machineOrCompanyField.getText());\r\n Part newPart = new InHouse(id, name, price, inv, min, max, machId);\r\n Inventory.addPart(newPart);\r\n } else {\r\n compName = machineOrCompanyField.getText();\r\n Part newPart = new Outsourced(id, name, price, inv, min, max, compName);\r\n Inventory.addPart(newPart);\r\n }\r\n\r\n }", "public void saveExisting() {\r\n Part modifiedPart = null;\r\n for (Part part : Inventory.getAllParts()) {\r\n if (Integer.parseInt(iDfield.getText()) == part.getId()) {\r\n modifiedPart = part;\r\n }\r\n }\r\n if (modifiedPart instanceof Outsourced && inHouseSelected) {\r\n replacePart(modifiedPart);\r\n\r\n } else if (modifiedPart instanceof InHouse && !inHouseSelected) {\r\n replacePart(modifiedPart);\r\n } else {\r\n modifiedPart.setName(nameField.getText());\r\n modifiedPart.setStock(Integer.parseInt(invField.getText()));\r\n modifiedPart.setPrice(Double.parseDouble(priceField.getText()));\r\n modifiedPart.setMax(Integer.parseInt(maxField.getText()));\r\n modifiedPart.setMin(Integer.parseInt(minField.getText()));\r\n if (inHouseSelected) {\r\n ((InHouse) modifiedPart).setMachineId(Integer.parseInt(machineOrCompanyField.getText()));\r\n } else {\r\n ((Outsourced) modifiedPart).setCompanyName(machineOrCompanyField.getText());\r\n }\r\n\r\n Inventory.updatePart(Inventory.getAllParts().indexOf(modifiedPart), modifiedPart);\r\n }\r\n\r\n }", "Product addOneProduct(String name, String imgNameBarcode, String imgName, String barcode) throws Exception;", "private void saveInstrument() {\n String instrument = mInstrument.getText().toString().trim();\n String brand = mBrand.getText().toString().trim();\n String serial = mSerial.getText().toString().trim();\n int quantity = mQuantity.getValue();\n String priceString = mPrice.getText().toString().trim();\n if(TextUtils.isEmpty(instrument) && TextUtils.isEmpty(brand) && TextUtils.isEmpty(serial) &&\n TextUtils.isEmpty(priceString) && quantity == 0){\n return;\n }\n float price = 0;\n if(!TextUtils.isEmpty(priceString)){\n price = Float.parseFloat(priceString);\n }\n //Retrieve selected supplier from Spinner\n String suppName = mSpinner.getSelectedItem().toString();\n //A query request to get the id of the selected supplier\n String [] projection = {SupplierEntry._ID, SupplierEntry.COLUMN_NAME};\n String selection = SupplierEntry.COLUMN_NAME + \"=?\";\n String [] selectionArgs = {suppName};\n Cursor cursor = getContentResolver().query(SupplierEntry.CONTENT_SUPPLIER_URI, projection, selection, selectionArgs, null);\n int idSupplier = 0;\n try {\n int idColumnIndex = cursor.getColumnIndex(SupplierEntry._ID);\n //move the cursor to the 0th position, before you start extracting out column values from it\n if (cursor.moveToFirst()) {\n idSupplier = cursor.getInt(idColumnIndex);\n }\n }finally {\n cursor.close();\n }\n ContentValues values = new ContentValues();\n values.put(InstrumentEntry.COLUMN_NAME, instrument);\n values.put(InstrumentEntry.COLUMN_BRAND, brand);\n values.put(InstrumentEntry.COLUMN_SERIAL, serial);\n values.put(InstrumentEntry.COLUMN_PRICE, price);\n values.put(InstrumentEntry.COLUMN_NB, quantity);\n values.put(InstrumentEntry.COLUMN_SUPPLIER_ID, idSupplier);\n Uri uri = getContentResolver().insert(InstrumentEntry.CONTENT_INSTRUMENT_URI, values);\n if(uri != null){\n Toast.makeText(this, \"Instrument successfully inserted\", Toast.LENGTH_SHORT);\n }else\n Toast.makeText(this, \"Instrument insertion failed\", Toast.LENGTH_SHORT);\n }", "public void handleModifyProducts()\n {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/UI/Views/product.fxml\"));\n Parent root = null;\n try {\n root = (Parent) fxmlLoader.load();\n\n if (getProductToModify() != null)\n {\n // Get controller and configure controller settings\n ProductController productController = fxmlLoader.getController();\n productController.setModifyProducts(true);\n productController.setProductToModify(getProductToModify());\n productController.setInventory(inventory);\n productController.setHomeController(this);\n productController.updateParts();\n\n // Spin up product form\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.initStyle(StageStyle.DECORATED);\n stage.setTitle(\"Modify Products\");\n stage.setScene(new Scene(root));\n stage.show();\n }\n else\n {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Input Invalid\");\n alert.setHeaderText(\"No product was selected!\");\n alert.setContentText(\"Please select a product to modify from the product table!\");\n alert.show();\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void save() {\n ProductData.saveData(tree);\n }", "private void buyProduct() {\n\t\tSystem.out.println(\"Enter Number of Product :- \");\n\t\tint numberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\twhile (!StoreController.getInstance().isValidNumberOfProduct(\n\t\t\t\tnumberOfProduct)) {\n\t\t\tSystem.out.println(\"Enter Valid Number of Product :- \");\n\t\t\tnumberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\t}\n\t\tfor (int number = 1; number <= numberOfProduct; number++) {\n\t\t\tSystem.out.println(\"Enter \" + number + \" Product Id\");\n\t\t\tint productId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\twhile (!StoreController.getInstance().isValidProductId(productId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id\");\n\t\t\t\tproductId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter product Quantity\");\n\t\t\tint quantity = getValidInteger(\"Enter product Quantity\");\n\t\t\tCartController.getInstance().addProductToCart(productId, quantity);\n\t\t}\n\t}", "private void savePet() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String nameString = mNameEditText.getText().toString().trim();\n String breedString = mBreedEditText.getText().toString().trim();\n String weightString = mWeightEditText.getText().toString().trim();\n\n if (mCurrentPetUri == null && TextUtils.isEmpty(nameString) && TextUtils.isEmpty(breedString) &&\n TextUtils.isEmpty(weightString) && mGender == PetContract.PetEntry.GENDER_UNKNOWN) {\n return;\n }\n\n // Create a ContentValues object where column names are the keys,\n // and pet attributes from the editor are the values.\n ContentValues values = new ContentValues();\n values.put(PetContract.PetEntry.COLUMN_PET_NAME, nameString);\n values.put(PetContract.PetEntry.COLUMN_PET_BREED, breedString);\n values.put(PetContract.PetEntry.COLUMN_PET_GENDER, mGender);\n\n int weight = 0;\n if (!TextUtils.isEmpty(weightString)) {\n weight = Integer.parseInt(weightString);\n }\n values.put(PetContract.PetEntry.COLUMN_PET_WEIGHT, weight);\n\n if (mCurrentPetUri == null) {\n\n Uri newUri = getContentResolver().insert(PetContract.PetEntry.CONTENT_URI, values);\n if (newUri == null) {\n Toast.makeText(this, \"Failed to save Pet\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, \"Save successfully\", Toast.LENGTH_SHORT).show();\n }\n\n } else {\n\n int rowsAffected = getContentResolver().update(mCurrentPetUri, values, null, null);\n if (rowsAffected == 0) {\n Toast.makeText(this, \"Failed to update Pet\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, \"Update Successfully \", Toast.LENGTH_SHORT).show();\n }\n\n\n Toast.makeText(this, \"Successfully saved pet\", Toast.LENGTH_SHORT).show();\n }\n }", "public void saveProduct(View view) {\n String name = this.name.getText().toString();\n String desc = this.desc.getText().toString();\n String ref = this.ref.getText().toString();\n // Validamos que los campos del form no esten vacios\n if (name.equals(\"\")) {\n this.name.setError(\"Campo obligatorio\");\n } else if (desc.equals(\"\")) {\n this.desc.setError(\"Campo obligatorio\");\n } else if (ref.equals(\"\")) {\n this.ref.setError(\"Campo obligatorio\");\n } else {\n progressDialog.setTitle(\"Cargando...\");\n progressDialog.setMessage(\"Subiendo producto\");\n progressDialog.setCancelable(false);\n progressDialog.show();\n // Creamos un producto y le asignamos los valores del formulario\n final Product product = new Product();\n product.setId(UUID.randomUUID().toString());\n product.setName(name.toLowerCase());\n product.setDescription(desc);\n product.setRef(ref);\n // Si la uri de la imagen no esta vacia, guardamos la imagen en el store de la base de datos\n if (uriImage != null) {\n final StorageReference filePath = storageReference.child(\"images\").child(uriImage.getLastPathSegment());\n filePath.putFile(uriImage).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n // Si se ha subido la imagen correctamente, sacamos la url de descarga y se la setteamos a nuestro producto, y guardamos el producto en la base de datos\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n filePath.getDownloadUrl().addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n String downloadUrl = task.getResult().toString();\n product.setImage(downloadUrl);\n databaseReference.child(\"productos\").child(product.getId()).setValue(product);\n progressDialog.dismiss();\n Intent mainActivityView = new Intent(AddProduct.this, MainActivity.class);\n AddProduct.this.startActivity(mainActivityView);\n Toast.makeText(AddProduct.this, \"¡Producto guardado con éxito!\", Toast.LENGTH_LONG).show();\n }\n });\n }\n });\n }\n }\n }", "public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }", "private void submitItem()\n {\n \n if(verifyData())\n {\n if(isItemExist(jTextFieldNumber.getText()))\n {\n String itemName = jTextFieldName.getText();\n String itemNumber = jTextFieldNumber.getText();\n String itemClass = jComboBox1.getSelectedItem().toString();\n String itemDesc = jTextArea1.getText();\n\n //this is for getting the items that are entered by the keyboard\n try {\n jSpinnerprice.commitEdit();\n\n jSpinnerQuantity.commitEdit();\n } catch (ParseException ex) {\n Logger.getLogger(AddItem.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n int itemPrice = (Integer)jSpinnerprice.getValue();\n int itemQuantity = (Integer)jSpinnerQuantity.getValue();\n String itemModel = jTextFieldModel.getText();\n \n byte [] img = null;\n \n\n try {\n Path pth = Paths.get(imagePth);\n img = Files.readAllBytes(pth);\n } catch (FileNotFoundException ex) {\n Logger.getLogger(AddItem.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(AddItem.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n String itemSupplier = jTextFieldSupplier.getText();\n\n \n Items i = new Items(itemModel, itemName, itemNumber, itemClass, img, itemDesc, itemQuantity, itemPrice, adminName, itemSupplier);\n\n ItemQuery Iq = new ItemQuery();\n Iq.insertItem(i);\n \n //Refresh the jtable\n refreshJTable(); \n \n jTextFieldName.setText(\"\");\n jTextFieldNumber.setText(\"\");\n jTextFieldSupplier.setText(\"\");\n jTextArea1.setText(\"\");\n jTextFieldModel.setText(\"\");\n \n \n }\n }\n }", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"新增商品\",\"输入商品信息,用空格分开,例如:001 方便面 6.8\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\tString str[]=input.split(\" \");\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"insert into Goods values('\"+str[0]+\"','\"+str[1]+\"','\"+str[2]+\"')\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsShow.dispose();\t\t\t\t\r\n\t\t\t\tcreateCompositeGoodsShow();\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsMange.layout(true);\r\n\t\t\t\t//compositeGoodsShow.layout(true);\r\n\t\t\r\n\t\t\t}", "private void savePet() {\n String xtasyidString = xtasyid.getText().toString().trim();\n String nameString = name.getText().toString().trim();\n String emailString = email.getText().toString().trim();\n String collegeString = college.getText().toString().trim();\n String contactString = contact.getText().toString().trim();\n String genderString = gender.getText().toString().trim();\n String extrasString = extras.getText().toString().trim();\n\n // Check if this is supposed to be a new pet\n // and check if all the fields in the editor are blank\n if (mCurrentPetUri == null && TextUtils.isEmpty(nameString) && TextUtils.isEmpty(emailString) ) {\n // Since no fields were modified, we can return early without creating a new pet.\n // No need to create ContentValues and no need to do any ContentProvider operations.\n return;\n }\n\n // Create a ContentValues object where column names are the keys,\n // and pet attributes from the editor are the values.\n ContentValues values = new ContentValues();\n values.put(PetEntry.COLUMN_PET_ID, xtasyidString);\n values.put(PetEntry.COLUMN_PET_NAME, nameString);\n values.put(PetEntry.COLUMN_PET_EMAIL, emailString);\n values.put(PetEntry.COLUMN_PET_COLLEGE, collegeString);\n values.put(PetEntry.COLUMN_PET_CONTACT, contactString);\n values.put(PetEntry.COLUMN_PET_GENDER, genderString);\n values.put(PetEntry.COLUMN_PET_EXTRAS, extrasString);\n\n // Determine if this is a new or existing pet by checking if mCurrentPetUri is null or not\n if (mCurrentPetUri == null) {\n // This is a NEW pet, so insert a new pet into the provider,\n // returning the content URI for the new pet.\n Uri newUri = getContentResolver().insert(PetEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the new content URI is null, then there was an error with insertion.\n Toast.makeText(this, getString(R.string.editor_insert_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_insert_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n } else {\n // Otherwise this is an EXISTING pet, so update the pet with content URI: mCurrentPetUri\n // and pass in the new ContentValues. Pass in null for the selection and selection args\n // because mCurrentPetUri will already identify the correct row in the database that\n // we want to modify.\n int rowsAffected = getContentResolver().update(mCurrentPetUri, values, null, null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsAffected == 0) {\n // If no rows were affected, then there was an error with the update.\n Toast.makeText(this, getString(R.string.editor_update_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_update_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n }", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "public void retrieveProduct(Product product) {\n // Place string values in TextFields.\n productIdField.setPromptText(String.valueOf(product.getId()));\n productNameField.setText(product.getName());\n productInvField.setText(String.valueOf(product.getStock()));\n productPriceField.setText(String.valueOf(product.getPrice()));\n productMaxField.setText(String.valueOf(product.getMax()));\n productMinField.setText(String.valueOf(product.getMin()));\n // load the TableViews after copying necessary values to instance.\n associatedPartsCopyMachine(product);\n this.product.setId(product.getId());\n super.initialize();\n }", "@Override\n\tpublic void saveProduct(Product product) {\n\t\t productRepository.save(product);\n\t\t\n\t}", "public void save(){\r\n if (inputValidation()) {\r\n if (modifyingPart) {\r\n saveExisting();\r\n } else {\r\n saveNew();\r\n }\r\n closeWindow();\r\n }\r\n\r\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\n\t\t\tString name=\"\";\n\t\t\tname=view.getNameTF().getText();\n\t\t\tString price=\"\";\n\t\t\tprice=view.getPriceTF().getText();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif(name.equals(\"\") ||price.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tthrow new BadInput(\"Nu au fost completate toate casutele pentru a se putea realiza CREATE!\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble p=Double.parseDouble(price);\n\t\t\t\t\n\t\t\t\tMenuItem nou=new BaseProduct(name,p);\n\t\t\t\t\n\t\t\t\trestaurant.createMenuItem(nou);\n\t\t\t\tview.updateList(name);\n\t\t\t\t\n\t\t\t}catch(NumberFormatException ex)\n\t\t\t{\n\t\t\t\tview.showError(\"Nu s-a introdus o valoare valida pentru pret!\");\n\t\t\t}\n\t\t\tcatch(BadInput ex)\n\t\t\t{\n\t\t\t\tview.showError(ex.getMessage());\n\t\t\t}\n\t\t\tcatch(AssertionError er)\n\t\t\t{\n\t\t\t\tview.showError(\"Nu se poate adauga produsul deoarece acesta EXISTA deja!!!\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "private void updateDatFile() {\n\t\tIOService<?> ioManager = new IOService<Entity>();\n\t\ttry {\n\t\t\tioManager.writeToFile(FileDataWrapper.productMap.values(), new Product());\n\t\t\tioManager = null;\n\t\t} catch (Exception ex) {\n\t\t\tDisplayUtil.displayValidationError(buttonPanel, StoreConstants.ERROR + \" saving new product\");\n\t\t\tioManager = null;\n\t\t}\n\t}", "public void saveToDatabase(View view) {\n // new implementation\n EditText recipeName = findViewById(R.id.input_Name);\n EditText recipeDirections = findViewById(R.id.input_Directions);\n EditText recipeNotes = findViewById(R.id.input_Notes);\n\n\n if (!(recipeName.getText().toString().equals(\"\"))) {\n newRecipe.setName(recipeName.getText().toString());\n newRecipe.setDirections(recipeDirections.getText().toString());\n newRecipe.setNotes(recipeNotes.getText().toString());\n\n dbHandler.addRecipe(newRecipe);\n\n finish();\n }\n else {\n Toast.makeText(this, \"You must enter a name for your recipe!\", Toast.LENGTH_SHORT).show();\n }\n }", "public void saveJpmProductSaleNew(JpmProductSaleNew jpmProductSaleNew);", "public void purchase(){\n\t\t\n\t\t//Ask the user for notes about the item\n\t\tSystem.out.println(\"Please enter any special requests regarding your \" +\n\t\t\t\t\t\t\t\"food item for our staff to see while they prepare it.\");\n\t\tScanner scan = new Scanner(System.in);\n\t\tString foodNotes = scan.nextLine();\n\t\tnotes = foodNotes;\n\t\t\n\t\t//Add this item's price to the order total\n\t\tMenu.orderPrice += price;\n\t\t\n\t}", "private void saveEmployee() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String nameString = mNameEditText.getText().toString().trim();\n String addressString = mAddressEditText.getText().toString().trim();\n String numberString = mNumberEditText.getText().toString().trim();\n String birthDateString = mBirthTextView.getText().toString().trim();\n\n // Check if this is supposed to be a new pet\n // and check if all the fields in the editor are blank\n if (mCurrentPetUri == null &&\n TextUtils.isEmpty(nameString) &&\n mImagePath.isEmpty()) {\n // Since no fields were modified, we can return early without creating a new pet.\n // No need to create ContentValues and no need to do any ContentProvider operations.\n return;\n }\n\n // Create a ContentValues object where column names are the keys,\n // and employee attributes from the editor are the values.\n ContentValues values = new ContentValues();\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_NAME, nameString);\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_ADDRESS, addressString);\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_BIRTH_DAY, birthDateString);\n\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_PHOTOS, mImagePath);\n\n // If the number is not provided by the user, don't try to parse the string into an\n // integer value. Use 0 by default.\n int number = 0;\n if (!TextUtils.isEmpty(numberString)) {\n number = Integer.parseInt(numberString);\n }\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_NUMBER, number);\n\n // Determine if this is a new or existing pet by checking if mCurrentPetUri is null or not\n if (mCurrentPetUri == null) {\n // This is a NEW employee, so insert a new employee into the provider,\n // returning the content URI for the new pet.\n Uri newUri = getContentResolver().insert(EmployeeEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the new content URI is null, then there was an error with insertion.\n Toast.makeText(this, getString(R.string.editor_insert_employee_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_insert_employee_successful),\n Toast.LENGTH_SHORT).show();\n }\n } else {\n // Otherwise this is an EXISTING pet, so update the pet with content URI: mCurrentPetUri\n // and pass in the new ContentValues. Pass in null for the selection and selection args\n // because mCurrentPetUri will already identify the correct row in the database that\n // we want to modify.\n int rowsAffected = getContentResolver().update(mCurrentPetUri, values, null, null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsAffected == 0) {\n // If no rows were affected, then there was an error with the update.\n Toast.makeText(this, getString(R.string.editor_update_employee_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_update_employee_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n }", "public void saveSupplier(Supplier e){ \n\t template.save(e); \n\t}", "public void save() {\n if (AppUtil.isEmpty(txtName.getText().toString())) {\n AppUtil.alertMessage(mainActivity,\"Please enter valid recipe name.\");\n txtName.requestFocus();\n } else if (AppUtil.isEmpty(txtDesc.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter recipe description.\");\n txtDesc.requestFocus();\n } else if (AppUtil.isEmpty(txtIng.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter ingredient/s.\");\n txtIng.requestFocus();\n } else if (AppUtil.isEmpty(txtSteps.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter preparation steps.\");\n txtSteps.requestFocus();\n } else {\n try {\n if (MainActivity.checkNetwork(mainActivity)) {\n SaveAsyncTask task = new SaveAsyncTask();\n task.execute();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "static void searchProductDB() {\n\n int productID = Validate.readInt(ASK_PRODUCTID); // store product ID of user entry\n\n\n productDB.findProduct(productID); // use user entry as parameter for the findProduct method and if found will print details of product\n\n }", "private void storeInLocal(){\n\t\t\t question = questionTxt.getText().toString();\n\t\t\t \n\t\t\t if (question.length() == 0) {\n\t\t\t\t\tif (TextUtils.isEmpty(question)) {\n\t\t\t\t\t\tquestionTxt.setError(getString(R.string.error_field_required));\n\t\t\t\t\t\tfocusView = questionTxt;\n\t\t\t\t\t\tcancel = true;\n\t\t\t\t\t}\n\t\t }\n\t\t\t else{\n\t\t\t ContentValues values = new ContentValues();\n\t\t values.put(QuestionsTable.QUESTION, question);\n\t\t\t values.put(QuestionsTable.NURSE_ID, NurseLogin.mUsername);\n\t\t\t \n\t\t todoUri = getContentResolver().insert(QuestionsContentProvider.CONTENT_URI, values);\n\t\t\t }\n\t\t }", "@Override\r\n\t\t\tpublic void handle(CellEditEvent<Products, String> arg0) {\n\t\t\t\targ0.getTableView().getItems().get(arg0.getTablePosition().getRow()).setName(arg0.getNewValue());\r\n\t\t\t\tProducts data=(Products) tbl_view.getSelectionModel().getSelectedItem();\r\n\t\t\t\tSystem.out.println(data.toString());\r\n\t\t\t\tConnectionManager.queryInsert(conn, \"UPDATE dbo.product SET name='\"+data.getName()+\"' WHERE id=\"+data.getId());\r\n\t\t\t\ttxt_cost.clear();\r\n\t\t\t\ttxt_date.clear();\r\n\t\t\t\ttxt_name.clear();\r\n\t\t\t\ttxt_price.clear();\r\n\t\t\t\ttxt_qty.clear();\r\n\t\t\t\ttxt_reorder.clear();\r\n\t\t\t\ttxt_search.clear();\r\n\t\t\t\tfetchData(FETCH_DATA);\r\n\t\t\t}", "public void saveData(){\n reporter.info(\"Save edited form\");\n clickOnElement(LOCATORS.getBy(COMPONENT_NAME,\"SAVE_BUTTON\"));\n }", "@FXML private void handleAddProdAdd(ActionEvent event) {\n if (fxidAddProdAvailableParts.getSelectionModel().getSelectedItem() != null) {\n //get the selected part from the available list\n Part tempPart = fxidAddProdAvailableParts.getSelectionModel().getSelectedItem();\n //save it to our temporary observable list\n partToSave.add(tempPart);\n //update the selected parts list\n fxidAddProdSelectedParts.setItems(partToSave); \n } else {\n Alert partSearchError = new Alert(Alert.AlertType.INFORMATION);\n partSearchError.setHeaderText(\"Error!\");\n partSearchError.setContentText(\"Please select a part to add.\");\n partSearchError.showAndWait();\n }\n }", "void storeEditorData(int userid,String name,Object bodyContent){\n dbConnection();\n try{\n PGobject editorData = new PGobject();\n editorData.setType(\"json\");\n editorData.setValue(bodyContent.toString());\n\n stmt = con.prepareStatement(\"INSERT INTO editorData(name,bodyContent,userid)VALUES(?,?,?)\");\n stmt.setString(1,name);\n stmt.setObject(2,editorData);\n stmt.setInt(3,userid);\n\n stmt.executeUpdate();\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n closeConnection();\n }\n \n }", "@FXML\n\tprivate void handleOk(){\n\t\tif(isInputValid()){\n\t\t\tproduct.setName(nameField.getText());\n\t\t\tproduct.setAmountAvailable(Integer.parseInt(amountAvailableField.getText()));\n\t\t\tproduct.setAmountSold(Integer.parseInt(amountSoldField.getText()));\n\t\t\tproduct.setPriceEach(Integer.parseInt(priceEachField.getText()));\n\t\t\tproduct.setPriceMake(Integer.parseInt(priceMakeField.getText()));\n\t\t\t// Converts the values to ints and then subtracts\n\t\t\tproduct.setProfit(Integer.parseInt(priceEachField.getText())-Integer.parseInt(priceMakeField.getText()));\n\t\t\t// Converts the values to ints, subtracts, and then multiplies\n\t\t\tproduct.setMoney((Integer.parseInt(priceEachField.getText())-Integer.parseInt(priceMakeField.getText()))*Integer.parseInt(amountSoldField.getText()));\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\t\n\t\t}\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\t\tif (qtyProductField.getText().isEmpty() || customerList.getSelectedIndex() == -1 || productList.getSelectedIndex() == -1) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(AddInvoiceForm.this, String.format(\n\t\t\t\t\t\t\t\t\"One or more empty field(s), will not add to database\", event.getActionCommand()));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// get customer value\n\t\t\t\t\t\tString customerIdstr = customerList.getSelectedItem().toString();\n\t\t\t\t\t\tcustomerIdstr = customerIdstr.substring(customerIdstr.indexOf(\"(\") + 1, customerIdstr.indexOf(\")\"));\n\t\t\t\t\t\tint customerId = Integer.parseInt(customerIdstr);\n\n\t\t\t\t\t\t// get product value\n\t\t\t\t\t\tString productIdstr = productList.getSelectedItem().toString();\n\t\t\t\t\t\tproductIdstr = productIdstr.substring(productIdstr.indexOf(\"(\") + 1, productIdstr.indexOf(\")\"));\n\t\t\t\t\t\tint productId = Integer.parseInt(productIdstr);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check if the quantity input is a valid number\n\t\t\t\t\t\tif (qtyProductField.getText().matches(\"^[0-9]+\") == false) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(AddInvoiceForm.this, \n\t\t\t\t\t\t\t\t\tString.format(\"Invalid quantity input, please try again\", event.getActionCommand()));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// check if the quantity input is no less than 1 and not more than 100\n\t\t\t\t\t\telse if (Integer.parseInt(qtyProductField.getText()) < 1 || Integer.parseInt(qtyProductField.getText()) > 100) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(AddInvoiceForm.this, \n\t\t\t\t\t\t\t\t\tString.format(\"Please enter a quantity 1-100, no more, no less\", event.getActionCommand()));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// else execute insert\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// get quantity value and parse it into integer format\n\t\t\t\t\t\t\tint qtyProduct = Integer.parseInt(qtyProductField.getText());\n\n\t\t\t\t\t\t\tSimpleDateFormat formatDate = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\t\t\tSimpleDateFormat formatTime = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\t\t\t\t\tDate d = new Date();\n\t\t\t\t\t\t\tTimeZone.setDefault(TimeZone.getTimeZone(\"UTC\"));\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tConnection connection = null;\n\t\t\t\t\t\t\tStatement statement = null;\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconnection = DriverManager.getConnection(DATABASE_URL, UserName_SQL, Password_SQL);\n\t\t\t\t\t\t\t\tstatement = connection.createStatement();\n\t\t\t\t\t\t\t\tstatement.executeUpdate(\n\t\t\t\t\t\t\t\t\t\t\"INSERT INTO invoice (customerId, productId, qtyProduct, invoiceDate, invoiceTime)\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ \" VALUES \" + \"(\" + customerId + \",\" + productId + \",\" + qtyProduct + \",'\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ formatDate.format(d) + \"','\" + formatTime.format(d) + \"')\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcatch (SQLException sqlException) {\n\t\t\t\t\t\t\t\tsqlException.printStackTrace();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tstatement.close();\n\t\t\t\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tcatch (Exception exception) {\n\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Created New Record\");\n\t\t\t\t\t\t\trefreshJTable();\n\t\t\t\t\t\t\tcustomerList.setSelectedIndex(-1);\n\t\t\t\t\t\t\tproductList.setSelectedIndex(-1);\n\t\t\t\t\t\t\tqtyProductField.setText(\"\");\n\t\t\t\t\t\t} // end inner else\n\t\t\t\t\t} // end outer else\n\t\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString input = ((String)comboBoxProductAuthor.getSelectedItem()).toLowerCase();\n\t\t\t\t//String input = (productAuthorTextField.getText()).toLowerCase();\t// Convert input text to lower case. \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//All names in array should be stored in lower case.\n\t\t\t\t\n\t\t\t\tif(input.trim().equals(\"select\")){ \t// If no value is selected\n\t\t\t\t\tproductTextArea.setText(\"\");\n\t\t\t\t\tproductTextArea.setCaretPosition(0);\n\t\t\t\t\tlistOfProdIds.setSelectedItem(\"Select\");\n\t\t\t\t\tlistofProductTitle.setSelectedItem(\"Select\");\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select Product Author From Drop Down Menu\");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}else{\t\t\t\t\t\t\t// Take in String and Search for it.\n\t\t\t\t\tproductTextArea.setText(product.viewProductByAuthor(input, products));\t\n\t\t\t\t\tproductTextArea.setCaretPosition(0);\t\t// This sets the position of the scroll bar to the top of the page.\n\t\t\t\t\tlistOfProdIds.setSelectedItem(\"Select\");\n\t\t\t\t\tlistofProductTitle.setSelectedItem(\"Select\");\n\t\t\t\t\tlistOfProductAuthor.setSelectedItem(\"Select\");\n\t\t\t\t\tpriceRange.clearSelection();\n\t\t\t\t\tquantity.clearSelection();\n\t\t\t\t}\n\t\t\t}", "private static void addPhone() {\n\n Phone newPhone = new Phone(); // create new Phone object\n\n String make = Validate.readString(ASK_MAKE_PHONE); // Ask for and set the make\n\n newPhone.setMake(make); // set make of phone based on user input\n\n String model = Validate.readString(ASK_MODEL_PHONE); // Ask for and set the model\n\n newPhone.setModel(model); // set model of phone based on user input\n\n int storage = Validate.readInt(ASK_STORAGE_PHONE); // Ask for and set the storage\n\n newPhone.setStorage(storage); // set storage of phone based on user input\n\n double price = Validate.readDouble(ASK_PRICE_PHONE); // Ask for and set the price\n\n newPhone.setPrice(price); // set price of phone based on user input\n\n ProductDB.addProduct(newPhone); // add new Phone to the product DB\n\n newPhone.savePhone(); // saves new phone to productDB text file\n }", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_editor);\n\n // Check the intent that was passed to this activity to see if a book was supplied\n Intent intent = getIntent();\n currentBookUri = intent.getData();\n\n // If the intent doesn't have any data, change the title to \"Add a Book\"\n if (currentBookUri == null) {\n setTitle(getString(R.string.editor_activity_title_add_a_book));\n invalidateOptionsMenu();\n } else {\n getLoaderManager().initLoader(EDITOR_LOADER, null, this);\n }\n\n // Grab the views from the layout\n productNameEditText = findViewById(R.id.activity_editor_product_name_edit_text);\n priceEditText = findViewById(R.id.activity_editor_price_edit_text);\n supplierNameEditText = findViewById(R.id.activity_editor_supplier_name_edit_text);\n supplierPhoneEditText = findViewById(R.id.activity_editor_supplier_phone_edit_text);\n minusButton = findViewById(R.id.activity_editor_minus_button);\n plusButton = findViewById(R.id.activity_editor_plus_button);\n quantityTextView = findViewById(R.id.activity_editor_quantity_text_view);\n orderButton = findViewById(R.id.activity_editor_order_button);\n\n // Set up the OnTouchListener for the input fields\n productNameEditText.setOnTouchListener(touchListener);\n priceEditText.setOnTouchListener(touchListener);\n supplierNameEditText.setOnTouchListener(touchListener);\n supplierPhoneEditText.setOnTouchListener(touchListener);\n\n // Set up the minus button click listener\n View.OnClickListener minusOnClickListener = new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // If quantity is already zero, don't decrease it\n if (bookQuantity > 0) bookQuantity--;\n quantityTextView.setText(Integer.toString(bookQuantity));\n bookHasChanged = true;\n }\n };\n minusButton.setOnClickListener(minusOnClickListener);\n\n // Set up the plus button click listener\n View.OnClickListener plusOnClickListener = new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n bookQuantity++;\n quantityTextView.setText(Integer.toString(bookQuantity));\n bookHasChanged = true;\n }\n };\n plusButton.setOnClickListener(plusOnClickListener);\n\n // Set up the order button to dial the vendor, if it's a new entry hide the order button\n if (currentBookUri == null) {\n orderButton.setVisibility(View.GONE);\n } else {\n View.OnClickListener orderOnClickListener = new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // Start phone dial intent\n String phoneNumber = supplierPhoneEditText.getText().toString().trim();\n Intent intent = new Intent(Intent.ACTION_DIAL);\n intent.setData(Uri.parse(\"tel:\" + phoneNumber));\n startActivity(intent);\n }\n };\n orderButton.setOnClickListener(orderOnClickListener);\n }\n }", "@Override\r\n\t\tpublic void onClick(View view) {\n\t\t\tEditText description = (EditText)findViewById(R.id.description);\r\n\t\t\tEditText quantity = (EditText)findViewById(R.id.number_text);\r\n\t\t\tEditText price = (EditText)findViewById(R.id.price);\r\n\t\t\tCheckBox taxFree = (CheckBox)findViewById(R.id.tax_free);\r\n\t\t\tCheckBox hasCoupon = (CheckBox)findViewById(R.id.has_coupon);\r\n\t\t\tEditText couponAmount = (EditText)findViewById(R.id.coupon_amount);\r\n\t\t\tEditText couponNote = (EditText)findViewById(R.id.coupon_note);\r\n\t\t\tEditText note = (EditText)findViewById(R.id.note);\r\n\t\t\t\r\n\t\t\tContentValues values = new ContentValues();\r\n\t\t\tvalues.put(Product.DESCRIPTION,description.getText().toString());\r\n\t\t\tvalues.put(Product.LIST_ID,\"1\");\r\n\t\t\tvalues.put(Product.QUANTITY,quantity.getText().toString());\r\n\t\t\tvalues.put(Product.PRICE,price.getText().toString());\r\n\t\t\tvalues.put(Product.TAX_FREE, taxFree.isChecked()? \"1\":\"0\");\r\n\t\t\tvalues.put(Product.HAS_COUPON, hasCoupon.isChecked()? \"1\":\"0\");\r\n\t\t\tvalues.put(Product.COUPON_AMOUNT,couponAmount.getText().toString());\r\n\t\t\tvalues.put(Product.COUPON_NOTE,couponNote.getText().toString());\r\n\t\t\tvalues.put(Product.NOTE, note.getText().toString());\r\n\t\t\tvalues.put(Product.DONE, \"0\");\r\n\t\t\t\r\n\t\t\tlong now = System.currentTimeMillis();\r\n\t\t\tTime time = new Time();\r\n\t\t\ttime.set(now);\r\n\t\t\ttime.normalize(true);\r\n\t\t\tvalues.put(Product.CREATED, time.format(\"YYMMDD:HH:MM:SS\"));\r\n\t\t\tvalues.put(Product.MODIFIED, time.format(\"YYMMDD:HH:MM:SS\"));\r\n\t\t\t\r\n\t\t\tgetContentResolver().insert(Product.CONTENT_URI,values);\r\n\t\t\tfinish();\r\n\t\t}", "private static void actOnUsersChoice(MenuOption option) {\n switch (option) {\n case VIEW_LIST_OF_ALL_PRODUCTS:\n viewListOfProductsInStore();\n System.out.println(\"Store has \" + productRepository.count() + \" products.\");\n break;\n case CHECK_IF_PRODUCT_EXISTS_IN_STORE:\n System.out.println(ENTER_SEARCHED_PRODUCT_NAME);\n System.out.println((isProductAvailable())\n ? SEARCHED_PRODUCT_IS_AVAILABLE\n : ERROR_NO_SUCH_PRODUCT_AVAILABLE);\n break;\n case ADD_PRODUCT_TO_ORDER:\n addProductToOrder();\n break;\n case VIEW_ORDER_ITEMS:\n viewOrderItems(order.getOrderItems());\n break;\n case REMOVE_ITEM_FROM_ORDER:\n removeItemFromOrder();\n break;\n case ADD_PRODUCT_TO_STORE:\n if (userIsAdmin) {\n addProductToStore();\n }\n break;\n case EDIT_PRODUCT_IN_STORE:\n if (userIsAdmin) {\n System.out.println(ENTER_PRODUCT_NAME_TO_BE_UPDATED);\n Optional<Product> productToBeModified = getProductByName();\n\n if (productToBeModified.isPresent()) {\n switch (productToBeModified.get().getType()) {\n\n case FOOD:\n Optional<Food> food = InputManager.DataWrapper.createFoodFromInput();\n if (food.isPresent()) {\n Food newFood = food.get();\n productRepository.update(productToBeModified.get().getName(), newFood);\n }\n break;\n\n case DRINK:\n Optional<Drink> drink = InputManager.DataWrapper.createDrinkFromInput();\n if (drink.isPresent()) {\n Drink newDrink = drink.get();\n productRepository.update(productToBeModified.get().getName(), newDrink);\n }\n break;\n }\n } else {\n System.err.println(ERROR_NO_SUCH_PRODUCT_AVAILABLE);\n }\n }\n break;\n case REMOVE_PRODUCT_FROM_STORE:\n if (userIsAdmin) {\n tryToDeleteProduct();\n }\n break;\n case RELOG:\n userIsAdmin = false;\n start();\n break;\n case EXIT:\n onExit();\n break;\n default:\n break;\n }\n }", "@FXML\n\tprivate void saveButtonAction(ActionEvent clickEvent) throws IOException {\n\t\t\n\t\tint idGen;\n\t\tdouble price;\n\t\tint inv, min, max;\n\t\tdouble totalPartsPrice;\n\t\t/*\n\t\tAdded functionality:\n\t\tCatch any errors and dont leave the page\n\t\tremove all fields or hightlight incorrectly filled fields\n\t\t\n\t\t*/\n\t\t\n\t\tdefaultStyle();\n\t\t\n\t\t\n\t\ttry {\n\t\t\tinv = Integer.parseInt(invField.getText());\n\t\t} catch (NumberFormatException ex) {\n\t\t\t\n\t\t\tSceneSelector.alertPopup(invField);\n\t\t\tSystem.out.println(\"input:\" + invField.getText() + \" Inventory: input not a integer\");\n\t\t\tSystem.out.println(\"Exception: \" + ex);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tprice = Double.parseDouble(priceField.getText());\n\t\t} catch (NumberFormatException ex) {\n\t\t\t\n\t\t\tSceneSelector.alertPopup(priceField);\n\t\t\tSystem.out.println(\"input:\" + priceField.getText() + \" Price: input not a double\");\n\t\t\tSystem.out.println(\"Exception: \" + ex);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tmin = Integer.parseInt(minField.getText());\n\t\t} catch (NumberFormatException ex) {\n\t\t\t\n\t\t\tSceneSelector.alertPopup(minField);\n\t\t\tSystem.out.println(\"input:\" + minField.getText() + \" Min: input not a integer\");\n\t\t\tSystem.out.println(\"Exception: \" + ex);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tmax = Integer.parseInt(maxField.getText());\n\t\t} catch (NumberFormatException ex) {\n\t\t\t\n\t\t\tSceneSelector.alertPopup(maxField);\n\t\t\tSystem.out.println(\"input:\" + maxField.getText() + \" Max: input not a integer\");\n\t\t\tSystem.out.println(\"Exception: \" + ex);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (inv > max || inv < min || min < 0) {\n\t\t\t\n\t\t\tSceneSelector.alertPopup(min, max, inv);\n\t\t\tSystem.out.println(\"input:\" + max + \" > \" + inv + \" > \" + min + \" Inv: value is incorrectly matched between Max. and Min. values and/or min is less than 0\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttotalPartsPrice = 0;\n\t\t\n\t\tfor (Part addedPart : dummyList) {\n\t\t\t\n\t\t\ttotalPartsPrice += addedPart.getPrice();\n\t\t}\n\t\t\n\t\tif (price <= totalPartsPrice || totalPartsPrice < 0) {\n\t\t\t\n\t\t\tSceneSelector.alertPopup(price, totalPartsPrice);\n\t\t\tSystem.out.println(\"input:\" + price + \">\" + totalPartsPrice + \" Price: Doesn't meet a realistic profitable value.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (productNameField.getText().trim().equals(\"\")) {\n\t\t\tSceneSelector.alertPopup(productNameField);\n\t\t\tSystem.out.println(\"input:\" + productNameField.getText() + \" ProductName: Doesn't meet the proper criteria for a name.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (new Scanner(idField.getText()).hasNextInt()) {\n\t\t\t\n\t\t\tidGen = Integer.parseInt(idField.getText());\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tidGen = InventoryManagementSystem.productGenId++;\n\t\t}\n\t\t\n\t\t/*\n\t\tAfter all value checks, finally assign the product to the inventory.\n\t\t*/\n\t\t\n\t\tProduct product = new Product(idGen, productNameField.getText(), price, inv, min, max);\n\t\t\n\t\tfor (Part addedPart : dummyList) {\n\t\t\t\n\t\t\tproduct.addAssociatedPart(addedPart);\n\t\t}\n\t\t\n\t\tif (Inventory.lookupProduct(idGen) == null) {\n\t\t\t\n\t\t\tInventory.addProduct(product);\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tInventory.updateProduct(product.getId(), product);\n\t\t}\n\t\t\n\t\t//convert event from button to buttonId\n\t\tString buttonId = ((Button)clickEvent.getSource()).getId();\n\t\t\n\t\tSceneSelector.loadScene(buttonId);\n\t}", "@Override\r\n\t\t\tpublic void handle(CellEditEvent<Products, String> arg0) {\n\t\t\t\targ0.getTableView().getItems().get(arg0.getTablePosition().getRow()).setPrice(arg0.getNewValue());\r\n\t\t\t\tProducts data=(Products) tbl_view.getSelectionModel().getSelectedItem();\r\n\t\t\t\tSystem.out.println(data.toString());\r\n\t\t\t\tConnectionManager.queryInsert(conn, \"UPDATE dbo.product SET price='\"+data.getPrice()+\"' WHERE id=\"+data.getId());\r\n\t\t\t\ttxt_cost.clear();\r\n\t\t\t\ttxt_date.clear();\r\n\t\t\t\ttxt_name.clear();\r\n\t\t\t\ttxt_price.clear();\r\n\t\t\t\ttxt_qty.clear();\r\n\t\t\t\ttxt_reorder.clear();\r\n\t\t\t\ttxt_search.clear();\r\n\t\t\t\tfetchData(FETCH_DATA);\r\n\t\t\t}", "public void saveProduit(Produit theProduit);" ]
[ "0.68007874", "0.65214807", "0.6517788", "0.6463681", "0.6402775", "0.64019495", "0.6360598", "0.6271974", "0.62365603", "0.6138098", "0.60731095", "0.6061702", "0.6054978", "0.604112", "0.5970389", "0.59290636", "0.58968025", "0.5873313", "0.58669883", "0.58656764", "0.5827645", "0.5816283", "0.5798021", "0.57744795", "0.57697254", "0.57678765", "0.5760825", "0.5745006", "0.5721088", "0.57134336", "0.5686892", "0.56844366", "0.56796634", "0.5655264", "0.5631831", "0.5620887", "0.56042784", "0.5604155", "0.56022453", "0.5601897", "0.55708206", "0.5553277", "0.5528541", "0.5519632", "0.5510417", "0.5496544", "0.54779035", "0.5469906", "0.5467378", "0.5466762", "0.5462972", "0.54559976", "0.54316866", "0.5413162", "0.54099977", "0.54096603", "0.54038185", "0.5397127", "0.5391427", "0.53885716", "0.5381713", "0.53693706", "0.5368786", "0.5353479", "0.5351664", "0.5348146", "0.534605", "0.5332147", "0.5313319", "0.5308815", "0.5305398", "0.53036845", "0.53027236", "0.53011084", "0.5280655", "0.5276786", "0.5270576", "0.5261551", "0.5252936", "0.52509254", "0.52465045", "0.52424526", "0.52399474", "0.5234566", "0.5230926", "0.52236843", "0.52151006", "0.5204809", "0.52038425", "0.52035314", "0.5199421", "0.51973534", "0.5193588", "0.5190195", "0.51814234", "0.51722825", "0.5171597", "0.51638055", "0.5158022", "0.5152494" ]
0.70651025
0
Inflate the menu options from the res/menu/menu_editor.xml file. This adds menu items to the app bar.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_editor, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.editor_options_menu, menu);\n\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_editor, menu);\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_editor,menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.editor_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.editor_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_editorpage, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n // Inflate the menu options from the res/menu/menu_editor.xml file.\n // This adds menu items to the app bar.\n getMenuInflater().inflate(R.menu.menu_editor, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.actions_save, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.save_menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@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 public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.edit, menu);\n\t\treturn true;\n\t}", "@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\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.edit_item, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.edit_item, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.edit_item, menu);\n\t\treturn true;\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.stock_picking_options, menu);\n }", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n\t public boolean onCreateOptionsMenu(Menu menu) {\n\t getMenuInflater().inflate(R.menu.edit_menu, menu);\n\t return true;\n\t }", "@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.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\tsuper.onCreateOptionsMenu(menu, inflater);\n\tinflater.inflate(R.menu.menu_main, menu);\n\tmenu.findItem(R.id.action_edit).setVisible(false);\n\tmenu.findItem(R.id.action_share).setVisible(false);\n\tmenu.findItem(R.id.action_settings).setVisible(true);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.language, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.administrator_appbar_buttons_add_edit_pet, 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.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_create_edit, menu);\n return true;\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 public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.ficha_contenedor, 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 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.holiday_details_add, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_principal, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu)\n \t{\n \t\tgetMenuInflater().inflate(R.menu.edit_recipe, menu);\n \t\treturn true;\n \t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_edit, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_edit_item, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n\n\n\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.edit_menu, menu);\n return true;\n }", "private void createMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(flp.getString(\"file\"));\n\t\tmenuBar.add(fileMenu);\n\n\t\tfileMenu.add(new JMenuItem(new ActionNewDocument(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionOpen(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSave(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSaveAs(flp, this)));\n\t\tfileMenu.addSeparator();\n\t\tfileMenu.add(new JMenuItem(new ActionExit(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionStatistics(flp, this)));\n\n\t\teditMenu = new JMenu(flp.getString(\"edit\"));\n\n\t\teditMenu.add(new JMenuItem(new ActionCut(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionCopy(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionPaste(flp, this)));\n\n\t\ttoolsMenu = new JMenu(flp.getString(\"tools\"));\n\n\t\titemInvert = new JMenuItem(new ActionInvertCase(flp, this));\n\t\titemInvert.setEnabled(false);\n\t\ttoolsMenu.add(itemInvert);\n\n\t\titemLower = new JMenuItem(new ActionLowerCase(flp, this));\n\t\titemLower.setEnabled(false);\n\t\ttoolsMenu.add(itemLower);\n\n\t\titemUpper = new JMenuItem(new ActionUpperCase(flp, this));\n\t\titemUpper.setEnabled(false);\n\t\ttoolsMenu.add(itemUpper);\n\n\t\tsortMenu = new JMenu(flp.getString(\"sort\"));\n\t\tsortMenu.add(new JMenuItem(new ActionSortAscending(flp, this)));\n\t\tsortMenu.add(new JMenuItem(new ActionSortDescending(flp, this)));\n\n\t\tmenuBar.add(editMenu);\n\t\tmenuBar.add(createLanguageMenu());\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(sortMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflate = getMenuInflater();\n \tinflate.inflate(R.menu.options, menu);\n \t\n \t\n \treturn true;\n }", "@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 void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@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 boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_runtime_editing, menu);\n return true;\n }", "@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\n public boolean onCreateOptionsMenu(Menu menu){\n getMenuInflater().inflate(R.menu.indi_menu, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_snippet, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n boolean result = super.onCreateOptionsMenu(menu);\n menu.add(0, MENU_ADD_ID, 0, R.string.menu_category_add).setIcon(\n android.R.drawable.ic_menu_add);\n menu.add(0, MENU_VISUALIZE_ID, 0, R.string.menu_visualize)\n .setIcon(R.drawable.graph);\n menu.add(0, MENU_EDIT_ID, 0, R.string.menu_entry_edit).setIcon(\n android.R.drawable.ic_menu_edit);\n menu.add(0, MENU_PREFS_ID, 0, R.string.menu_app_prefs).setIcon(\n android.R.drawable.ic_menu_preferences);\n menu.add(0, MENU_HELP_ID, 0, R.string.menu_app_help).setIcon(\n android.R.drawable.ic_menu_help);\n return result;\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\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 public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_edit_taman, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@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 boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.res_menu, menu);\n return true;\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.optionsbar, menu);\n \treturn super.onPrepareOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_editor, menu);\n //Hiding Delete Menu option for Add Item\n if (mCurrentItemInfoUri == null) {\n MenuItem deleteMenuItem = menu.findItem(R.id.action_delete);\n deleteMenuItem.setVisible(false);\n }\n return true;\n }", "@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 boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) \n{\n\tgetMenuInflater().inflate(R.menu.update_entry, menu);\n\treturn true;\n}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n\t\tinflater.inflate(R.menu.forecastfragment, menu );\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n // This method initialize the contents of the Activity's options menu.\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.regioni, menu);\r\n\t\treturn true;\r\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\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater=getMenuInflater();\n inflater.inflate(R.menu.my_options_menu, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.toolbar, menu);\n super.onCreateOptionsMenu(menu, inflater);\n\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{\n\t\tgetMenuInflater().inflate(R.menu.files, 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 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 }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\r\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.uptionsmenu, menu);\r\n\t\treturn true;\r\n\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.my_notes_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n MenuItem languageItem = menu.findItem(R.id.toolbar_ic_language);\n MenuItem currencyItem = menu.findItem(R.id.toolbar_ic_currency);\n MenuItem profileItem = menu.findItem(R.id.toolbar_edit_profile);\n MenuItem searchItem = menu.findItem(R.id.toolbar_ic_search);\n MenuItem cartItem = menu.findItem(R.id.toolbar_ic_cart);\n profileItem.setVisible(false);\n languageItem.setVisible(false);\n currencyItem.setVisible(false);\n searchItem.setVisible(false);\n cartItem.setVisible(false);\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\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\tinflater=this.getActivity().getMenuInflater();\n\tSupportMenu menu_=(SupportMenu) menu;\n\tsuper.onCreateOptionsMenu(menu_, inflater);\n\tinflater.inflate(R.menu.event_adding, menu_);\n\t\t\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}" ]
[ "0.7636142", "0.733963", "0.7312602", "0.7290822", "0.7290822", "0.72191536", "0.71036094", "0.69624186", "0.68234146", "0.68234146", "0.67736095", "0.6749282", "0.6712346", "0.6693496", "0.6682906", "0.6682906", "0.6680154", "0.6680154", "0.6680154", "0.6677035", "0.6668066", "0.6659419", "0.6644225", "0.66308284", "0.66290486", "0.66206104", "0.6617834", "0.6608417", "0.66038823", "0.66016835", "0.6599086", "0.65905607", "0.6584209", "0.6582652", "0.65820634", "0.65769124", "0.65711987", "0.6570423", "0.6567228", "0.65660125", "0.65593964", "0.65586525", "0.65526783", "0.6548657", "0.65417904", "0.65396434", "0.6536432", "0.65300274", "0.6527944", "0.65273243", "0.6526615", "0.6524502", "0.652336", "0.65161866", "0.6506578", "0.6505222", "0.6504256", "0.6494621", "0.649404", "0.6492518", "0.6482631", "0.64821607", "0.64803416", "0.6480237", "0.6479911", "0.6478961", "0.6471632", "0.6470484", "0.64670265", "0.64660794", "0.6462471", "0.6462099", "0.6460693", "0.6459878", "0.6457901", "0.64538527", "0.64531904", "0.64531904", "0.6448228", "0.6446727", "0.6445868", "0.64449424", "0.64449424", "0.64449424", "0.64449424", "0.6444268", "0.64418054", "0.6437616", "0.6437616", "0.6437616" ]
0.7269258
12
This method is called after invalidateOptionsMenu(), so that the menu can be updated (some menu items can be hidden or made visible).
@Override public boolean onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); // If this is a new Product, hide the "Delete" menu item. if (mCurrentProductUri == null) { MenuItem menuItem = menu.findItem(R.id.action_delete); menuItem.setVisible(false); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.order_list_actions,menu);\n if(isFinalized){\n MenuItem item = menu.findItem(R.id.action_finalized);\n item.setVisible(false);\n //this.invalidateOptionsMenu();\n }\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onPrepareOptionsMenu (Menu menu) {\n \n return super.onPrepareOptionsMenu (menu);\n \n }", "@Override\n public boolean onPrepareOptionsMenu(android.view.Menu menu) {\n\n return super.onPrepareOptionsMenu(menu);\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n return super.onPrepareOptionsMenu(menu);\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n return super.onPrepareOptionsMenu(menu);\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n\n return true;\n }", "private void updateMenu() {\n if(customMenu || !menuDirty) {\n return;\n }\n \n // otherwise, reset up the menu.\n menuDirty = false;\n menu.removeAll();\n Icon emptyIcon = null; \n for(Action action : actions) {\n if(action.getValue(Action.SMALL_ICON) != null) {\n emptyIcon = new EmptyIcon(16, 16);\n break;\n }\n }\n \n selectedComponent = null;\n selectedLabel = null;\n \n for (Action action : actions) {\n \n // We create the label ourselves (instead of using JMenuItem),\n // because JMenuItem adds lots of bulky insets.\n\n ActionLabel menuItem = new ActionLabel(action);\n JComponent panel = wrapItemForSelection(menuItem);\n \n if (action != selectedAction) {\n panel.setOpaque(false);\n menuItem.setForeground(UIManager.getColor(\"MenuItem.foreground\"));\n } else {\n selectedComponent = panel;\n selectedLabel = menuItem;\n selectedComponent.setOpaque(true);\n selectedLabel.setForeground(UIManager.getColor(\"MenuItem.selectionForeground\"));\n }\n \n if(menuItem.getIcon() == null) {\n menuItem.setIcon(emptyIcon);\n }\n attachListeners(menuItem);\n decorateMenuComponent(menuItem);\n menuItem.setBorder(BorderFactory.createEmptyBorder(0, 6, 2, 6));\n\n menu.add(panel);\n }\n \n if (getText() == null) {\n menu.add(Box.createHorizontalStrut(getWidth()-4));\n } \n \n for(MenuCreationListener listener : menuCreationListeners) {\n listener.menuCreated(this, menu);\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n MenuItem item = menu.findItem(R.id.refresh);\n item.setVisible(false);\n this.invalidateOptionsMenu();\n return true;\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n\treturn super.onPrepareOptionsMenu(menu);\n\n }", "@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\treturn super.onPrepareOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n Log.i(\"Menus\", \"onPrepareOptionsMenu\");\n //Get MenuItem for 'show archived', change the text if its already visible\n MenuItem showArchivedMenu = menu.findItem(R.id.show_archived);\n if (mArchivedItemsList.getVisibility() == View.VISIBLE)\n showArchivedMenu.setTitle(\"Hide Archived\");\n else\n showArchivedMenu.setTitle(\"Show Archived\");\n\n return true;\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n menu.removeItem(R.id.action_settings);\n return super.onPrepareOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu2, menu);\n this.menu=menu;\n if(idName!=null) {menu.getItem(1).setVisible(false);\n menu.getItem(2).setVisible(true);}\n if(create) menu.getItem(0).setVisible(false);\n else menu.getItem(0).setVisible(true);\n /* if(extrasBundle!=null) if(extrasBundle.getBoolean(\"From Option\")==true) {\n menu.getItem(1).setVisible(false);\n menu.getItem(0).setVisible(true);\n\n }*/\n return true;\n }", "public void updateMenus() {\n\t\tSystem.out.println(\"BarGraphDisplayer.updateMenus\");\n\t\tCommandRegistrar.gRegistrar.checkAction(\"barGraph\");\n\t\tCommandRegistrar.gRegistrar.enableAction(\"viewOptions\");\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n this.menu = menu;\n publicMenuItem = menu.findItem(R.id.action_public_invites);\n privateMenuItem = menu.findItem(R.id.action_private_invites);\n if(savedDbQuery){\n publicMenuItem.setVisible(true);\n privateMenuItem.setVisible(false);\n }else{\n publicMenuItem.setVisible(false);\n privateMenuItem.setVisible(true);\n }\n publicMenuItem = menu.findItem(R.id.action_public_invites);\n privateMenuItem = menu.findItem(R.id.action_private_invites);\n return true;\n }", "@Override\r\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\tboolean drawerOpened = drawerLayout.isDrawerOpen(drawerList);\r\n\r\n\t\tmenu.findItem(R.id.settingsMenuItem).setVisible(!drawerOpened);\r\n\r\n\t\tif (drawerOpened)\r\n\t\t\tmenu.findItem(R.id.refreshMenuItem).setVisible(false);\r\n\t\telse {\r\n\t\t\tif (selectedItem == 0)\r\n\t\t\t\tmenu.findItem(R.id.refreshMenuItem).setVisible(true);\r\n\t\t\telse\r\n\t\t\t\tmenu.findItem(R.id.refreshMenuItem).setVisible(false);\r\n\t\t}\r\n\r\n\t\treturn super.onPrepareOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n if (fragments[SELECTION].isVisible()) {\n if (menu.size() == 0) {\n settings = menu.add(R.string.settings);\n }\n return true;\n } else {\n menu.clear();\n settings = null;\n }\n return false;\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.optionsbar, menu);\n \treturn super.onPrepareOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n invalidateOptionsMenu();\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n //return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n //getMenuInflater().inflate(R.menu.activity_main, menu);\n \tsuper.onCreateOptionsMenu(menu);\n getSupportMenuInflater().inflate(R.menu.actionbar, menu);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n BatteryIcon = (MenuItem)menu.findItem(R.id.acb_battery);\n setActBarBatteryIcon(Callbacksplit.getsavedBatteryStateIcon());\n ConnectIcon = (MenuItem)menu.findItem(R.id.acb_connect);\n setActBarConnectIcon();\n \n ((MenuItem)menu.findItem(R.id.acb_m_5)).setVisible(false);\n\n return true;\n }", "public void updateMenu() {\n updateMenuGroupError = true;\n if (menu.updateMenu()) {\n deleteMenuError = false;\n createMenuError = false;\n updateMenuError = true;\n } else {\n setName(menu.name);\n updateMenuError = false;\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_update, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\tsuper.onCreateOptionsMenu(menu, inflater);\n\tinflater.inflate(R.menu.menu_main, menu);\n\tmenu.findItem(R.id.action_edit).setVisible(false);\n\tmenu.findItem(R.id.action_share).setVisible(false);\n\tmenu.findItem(R.id.action_settings).setVisible(true);\n }", "private void updateMenuItems()\r\n\t {\r\n\t\t setListAdapter(new ArrayAdapter<String>(this,\r\n\t\t android.R.layout.simple_list_item_1, home_menu));\r\n\t\t \t \r\n\t }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n MenuItem languageItem = menu.findItem(R.id.toolbar_ic_language);\n MenuItem currencyItem = menu.findItem(R.id.toolbar_ic_currency);\n MenuItem profileItem = menu.findItem(R.id.toolbar_edit_profile);\n MenuItem searchItem = menu.findItem(R.id.toolbar_ic_search);\n MenuItem cartItem = menu.findItem(R.id.toolbar_ic_cart);\n profileItem.setVisible(false);\n languageItem.setVisible(false);\n currencyItem.setVisible(false);\n searchItem.setVisible(false);\n cartItem.setVisible(false);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.settings, menu);\n MenuItem settings = menu.findItem(R.id.settings);\n if(currentScreenGameState == GameState.STOPPED ){\n settings.setVisible(true);\n }else{\n settings.setVisible(false);\n }\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n menu.add(0, 0, 0, \"Refresh\");\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n return true;\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n menu.findItem(R.id.settingButton).setVisible(false);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_admin, menu);\n this.menu = menu;\n menu.findItem(R.id.action_editar).setVisible(false);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\n menu.findItem(R.id.action_switch_provider).setVisible(true);\n menu.findItem(R.id.action_save_scheme).setVisible(false);\n super.onCreateOptionsMenu(menu, inflater);\n\n //return true;\n }", "@Override\n public void onPrepareOptionsMenu(Menu menu) {\n if (mShowOptionsMenu && ViewConfiguration.get(getActivity()).hasPermanentMenuKey() &&\n isLayoutReady() && mDialpadChooser != null) {\n setupMenuItems(menu);\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n\n return true;\n }", "public boolean onPrepareOptionsMenu(Menu menu) {\n try {\n super.onPrepareOptionsMenu (menu);\n int maxLength = 11;\n int numOfItemsToRemove = maxLength - GlobalVariables.namesCity.length;\n while (numOfItemsToRemove > 0) {\n menu.getItem (maxLength - 1).setVisible (false);\n numOfItemsToRemove--;\n maxLength--;\n }\n } catch (Exception e) {\n Log.e (e.toString (), \"On Prepare Method Exception\");\n }\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(TAG, \"onCreateOptionMenu\");\n super.onCreateOptionsMenu(menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.update_activity_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.enter_update_info, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n super.onPrepareOptionsMenu(menu);\n //If this is a new item, hide the \"Delete\" menu item.\n if(mCurrentItemUri == null){\n MenuItem menuItem = menu.findItem(R.id.action_delete);\n menuItem.setVisible(true);\n }\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n menu.findItem(R.id.action_settings).setVisible(false);\n menu.findItem(R.id.action_cambiar_pass).setVisible(false);\n menu.findItem(R.id.action_ayuda).setVisible(false);\n menu.findItem(R.id.action_settings).setVisible(false);\n menu.findItem(R.id.action_cancel).setVisible(false);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n menu.getItem(0).setVisible(false);\n return true;\n }", "private void updateMenuItems(){\n String awayState = mStructure.getAway();\n MenuItem menuAway = menu.findItem(R.id.menu_away);\n if (KEY_AUTO_AWAY.equals(awayState) || KEY_AWAY.equals(awayState)) {\n menuAway.setTitle(R.string.away_state_home);\n } else if (KEY_HOME.equals(awayState)) {\n menuAway.setTitle(R.string.away_state_away);\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n super.onCreateOptionsMenu(menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n mOption = menu;\n getMenuInflater().inflate(R.menu.menu, menu);\n int menunya = sharedpreferences.getInt(\"menu\", 0);\n SharedPreferences.Editor editor = sharedpreferences.edit();\n if (menunya == 0) {\n editor.putInt(\"menu\", 2);\n editor.commit();\n f2.setVisibility(View.VISIBLE);\n f3.setVisibility(View.GONE);\n navigation.setSelectedItemId(R.id.navigation_dashboard);\n } else if (menunya == 2) {\n f2.setVisibility(View.VISIBLE);\n f3.setVisibility(View.GONE);\n navigation.setSelectedItemId(R.id.navigation_dashboard);\n } else if (menunya == 3) {\n f2.setVisibility(View.GONE);\n f3.setVisibility(View.VISIBLE);\n navigation.setSelectedItemId(R.id.navigation_notifications);\n } else {\n editor.putInt(\"menu\", 2);\n editor.commit();\n f2.setVisibility(View.VISIBLE);\n f3.setVisibility(View.GONE);\n }\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_update_name, menu);\n return true;\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n super.onCreateOptionsMenu(menu);\n MenuItem helpButton = menu.findItem(R.id.menu1);\n helpButton.setVisible(true);\n return true;\n }", "@Override\r\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\r\n\t\tmenu.clear();\r\n\t\tinflater.inflate(R.menu.browsecourse, menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.update, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\t// if nav drawer is opened, hide the action items\n\t\tboolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n\t\t// menu.findItem(R.id.action_settings).setVisible(!drawerOpen);\n\t\treturn super.onPrepareOptionsMenu(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 onPrepareOptionsMenu(Menu menu) {\n // if nav drawer is opened, hide the action items\n boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n menu.findItem(R.id.action_settings).setVisible(!drawerOpen);\n return super.onPrepareOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n getMenuInflater().inflate(R.menu.menu, menu); //Recibe como parametro el menu donde se situan las acciones\r\n return true; //Para que la barra sea visible\r\n }", "private void updateEnableStatus()\n {\n this.menu.setEnabled(this.menu.getItemCount() > 0);\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\treturn true;\n \t}", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n //boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n //menu.findItem(<MENU_ITEMS>).setVisible(!drawerOpen);\n return super.onPrepareOptionsMenu(menu);\n }", "protected void updateMenuItemsVisibility(Menu menu) {\n\n MenuItem deleteItem = menu.findItem(R.id.action_delete);\n MenuItem editItem = menu.findItem(R.id.action_edit);\n MenuItem saveItem = menu.findItem(R.id.action_save);\n\n if( (deleteItem == null) || (editItem == null) || (saveItem == null) ) {\n return;\n }\n\n switch(mAction) {\n case NDEFEditorFragment.ADD_NDEF_RECORD:\n deleteItem.setVisible(false);\n editItem.setVisible(false);\n saveItem.setVisible(true);\n break;\n\n case NDEFEditorFragment.VIEW_NDEF_RECORD:\n deleteItem.setVisible(true);\n editItem.setVisible(true);\n saveItem.setVisible(false);\n break;\n\n case NDEFEditorFragment.EDIT_NDEF_RECORD:\n deleteItem.setVisible(false);\n editItem.setVisible(false);\n saveItem.setVisible(true);\n break;\n }\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n super.onPrepareOptionsMenu(menu);\n // If this is a new fruit, hide the \"Delete\" menu item.\n if (mCurrentFruitUri == null) {\n MenuItem menuItem = menu.findItem(R.id.action_delete);\n menuItem.setVisible(false);\n }\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@SuppressLint({ \"NewApi\", \"InlinedApi\" })\n\t@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tLog.d(SmartConstants.APP_NAME, \"SmartViewActivity->onCreateOptionsMenu->actionbar:\" + actionbar);\n\t\tboolean prepareOptionsMenu = true;\n\t\tif ((isICSOrHigher) && (actionbar != null)) {\n\t\t\tmenu.clear();\n\t\t\t// Need to add menu options only once and need to update menu\n\t\t\t// items\n\t\t\t// only\n\t\t\t// when a notification 'APP_NOTIFY_CREATE_MENU' has been\n\t\t\t// received\n\t\t\tLog.d(SmartConstants.APP_NAME, \"SmartViewActivity->onCreateOptionsMenu->menuInformation:\" + menuInformation);\n\t\t\tif (menuInformation != null && menuInformation.length() > 0) {\n\t\t\t\tprepareOptionsMenu = addMenuItemsToScreen(menu, menuInformation);\n\t\t\t}\n\t\t\t// ----------------------------------------\n\t\t}\n\n\t\treturn prepareOptionsMenu;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n menu.clear();\n getMenuInflater().inflate(R.menu.top_menu, menu);\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu)\n {\n // If the nav drawer is open, hide action items related to the content view\n boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n return super.onPrepareOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n MenuItem settings = menu.findItem(R.id.action_settings);\n settings.setVisible(false);\n return true;\n }", "@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\t// if nav drawer is opened, hide the action items\n\t\tboolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerView);\n\t\tmenu.findItem(R.id.action_settings).setVisible(!drawerOpen);\n\t\treturn super.onPrepareOptionsMenu(menu);\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) \n{\n\tgetMenuInflater().inflate(R.menu.update_entry, menu);\n\treturn true;\n}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n\n // MyApp myApp = MyApp.getInstance();\n\n MenuItem item = menu.findItem(R.id.action_matches);\n item.setVisible(false);\n\n return true;\n }", "@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\t// If the nav drawer is open, hide action items related to the content\n\t\t// view\n\t\tboolean drawerOpen = mDrawerLayout.isDrawerOpen(mLinearLayout);\n\t\tmenu.findItem(R.id.action_search).setVisible(drawerOpen);\n\t\tmenu.findItem(R.id.action_settings).setVisible(drawerOpen);\n//\t\tactionBar.setDisplayShowTitleEnabled(drawerOpen);\n\t\t\n\t\tif (mItemPosition == 0 || mItemPosition == 2 || mItemPosition == 4) {\n\t\t\tmenu.findItem(R.id.action_add).setVisible(false);\n\t\t\t\n\t\t\tif (drawerOpen) {\n\n\t\t\t\tif (OverviewFragment.item != null) {\n\t\t\t\t\tOverviewFragment.item.setVisible(false);\n\t\t\t\t}\n\n\t\t\t\tif (OverViewFragmentMonth.item != null) {\n\t\t\t\t\tOverViewFragmentMonth.item.setVisible(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (CategorysReportFragment.item != null) {\n\t\t\t\t\tCategorysReportFragment.item.setVisible(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (CashReportFragment.item != null) {\n\t\t\t\t\tCashReportFragment.item.setVisible(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tmenu.findItem(R.id.action_add).setVisible(!drawerOpen);\n\t\t}\n\n\t\tif (mItemPosition == 1 && drawerOpen == false) {\n\n\t\t\tif (AccountsFragment.item0 != null\n\t\t\t\t\t&& AccountsFragment.sortCheck == 1) {\n\t\t\t\tAccountsFragment.item1.setVisible(false);\n\t\t\t\tAccountsFragment.item0.setVisible(true);\n\t\t\t}\n\t\t}\n\n\t\treturn super.onPrepareOptionsMenu(menu);\n\t}", "public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.seach_history_menu, menu);\n\n menu.findItem(R.id.clean_history);\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n\n onResume();\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n menu.getItem(2).setEnabled(false);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return false;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return false;\n }", "public void refreshMenu() {\n\t\tthis.Menu.setSize(this.Menu.getWidth(), this.Items.size() * (this.textSize + 4) + 4);\r\n\t\tthis.Menu.Camera.setPosition(0, 0);\r\n\t\tthis.anchorX();\r\n\t\tthis.anchorY();\r\n\t\t//println(\"----------\");\r\n\t\tthis.Menu.reposition((int) menuAnchor.x, (int) menuAnchor.y);\r\n\r\n\t\tfor (uTextButton t : this.Items) {\r\n\t\t\tt.setPosition(t.getX(), (this.Items.indexOf(t) * t.getHeight()));\r\n\t\t}\r\n\r\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\treturn super.onCreateOptionsMenu(menu);\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\n }" ]
[ "0.7736288", "0.7474999", "0.73780805", "0.73699236", "0.73699236", "0.72821057", "0.72796696", "0.72352916", "0.72136414", "0.71982384", "0.7131405", "0.7123961", "0.7085168", "0.7082515", "0.70753133", "0.70728153", "0.703503", "0.7032985", "0.70290244", "0.7027776", "0.6988882", "0.69848675", "0.6984739", "0.69794285", "0.69750434", "0.6970814", "0.6970814", "0.6970814", "0.6970814", "0.6970814", "0.6968019", "0.69628733", "0.6960671", "0.6956908", "0.6946078", "0.6915577", "0.6915577", "0.69130003", "0.69098777", "0.6908867", "0.6905569", "0.6905393", "0.6896466", "0.6895685", "0.6893136", "0.6887603", "0.68826085", "0.68826085", "0.68820834", "0.6877805", "0.6876972", "0.6876229", "0.68720496", "0.6862656", "0.68625", "0.68586606", "0.685393", "0.685393", "0.685393", "0.685393", "0.685393", "0.685393", "0.6838444", "0.68375313", "0.6830646", "0.6830492", "0.6829796", "0.6829796", "0.6829796", "0.68256104", "0.6813775", "0.6813234", "0.681294", "0.68036884", "0.6798446", "0.67911536", "0.67852294", "0.67819214", "0.6779278", "0.67756855", "0.6774694", "0.676938", "0.67677206", "0.6762168", "0.67591673", "0.67549694", "0.67515117", "0.67468554", "0.6744744", "0.673767", "0.6735936", "0.672279", "0.6719847", "0.6718683", "0.6716445", "0.67163604", "0.6714261", "0.6714261", "0.67118067", "0.6709132", "0.67078346" ]
0.0
-1
User clicked on a menu option in the app bar overflow menu
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { // Respond to a click on the "Save" menu option case R.id.action_save: // Save Product to database saveProduct(); String nameString = mNameEditText.getText().toString().trim(); String PriceString = mPriceEditText.getText().toString().trim(); String quantityString = mQuantityEditText.getText().toString().trim(); // validate all the required information if (!(TextUtils.isEmpty(nameString) || (quantityString.equalsIgnoreCase("0")) || TextUtils.isEmpty(PriceString))) { // Exit activity finish(); } return true; // Respond to a click on the "Delete" menu option case R.id.action_delete: // Pop up confirmation dialog for deletion showDeleteConfirmationDialog(); return true; // Respond to a click on the "Up" arrow button in the app bar case android.R.id.home: // If the pet hasn't changed, continue with navigating up to parent activity // which is the {@link CatalogActivity}. if (!mPetHasChanged) { NavUtils.navigateUpFromSameTask(EditorActivity.this); return true; } // Otherwise if there are unsaved changes, setup a dialog to warn the user. // Create a click listener to handle the user confirming that // changes should be discarded. DialogInterface.OnClickListener discardButtonClickListener = new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { // User clicked "Discard" button, navigate to parent activity. NavUtils.navigateUpFromSameTask(EditorActivity.this); } }; // Show a dialog that notifies the user they have unsaved changes showUnsavedChangesDialog(discardButtonClickListener); return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onMenuItemClicked();", "void clickFmFromMenu();", "void clickAmFromMenu();", "public void menuClicked(MenuItem menuItemSelected);", "public void menuItemClicked( Menu2DEvent e );", "@Override\n public void onMenuClick() {\n Toast.makeText(activity.getApplicationContext(), \"Menu click\",\n Toast.LENGTH_LONG).show();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n super.onCreateOptionsMenu(menu);\n MenuItem helpButton = menu.findItem(R.id.menu1);\n helpButton.setVisible(true);\n return true;\n }", "private void optionSelected(MenuActionDataItem action){\n \t\tString systemAction = action.getSystemAction();\n \t\tif(!systemAction.equals(\"\")){\n \t\t\t\n \t\t\tif(systemAction.equals(\"back\")){\n \t\t\t\tonBackPressed();\n \t\t\t}else if(systemAction.equals(\"home\")){\n \t\t\t\tIntent launchHome = new Intent(this, CoverActivity.class);\t\n \t\t\t\tstartActivity(launchHome);\n \t\t\t}else if(systemAction.equals(\"tts\")){\n \t\t\t\ttextToSearch();\n \t\t\t}else if(systemAction.equals(\"search\")){\n \t\t\t\tshowSearch();\n \t\t\t}else if(systemAction.equals(\"share\")){\n \t\t\t\tshowShare();\n \t\t\t}else if(systemAction.equals(\"map\")){\n \t\t\t\tshowMap();\n \t\t\t}else\n \t\t\t\tLog.e(\"CreateMenus\", \"No se encuentra el el tipo de menu: \" + systemAction);\n \t\t\t\n \t\t}else{\n \t\t\tNextLevel nextLevel = action.getNextLevel();\n \t\t\tshowNextLevel(this, nextLevel);\n \t\t\t\n \t\t}\n \t\t\n \t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n Intent intent = new Intent(this, aboutApp.class);\n startActivity(intent);\n return true;\n }\n\n if (id == R.id.scrollView) {\n Intent intent1 = new Intent(this, aboutAuthers.class);\n startActivity(intent1);\n\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n ActivityOptionsService activityOptionsService = new ActivityOptionsService();\n activityOptionsService.openActivity(this ,id);\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n case MENU_HELP:\r\n help();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return ApplicationData.contextMenu(this, item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void menuSelected(MenuEvent e) {\n \n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n MenuItem helpButton = menu.findItem(R.id.menu1);\n helpButton.setVisible(true);\n return true;\n }", "@Override\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\n\t\t\tcase 1:\n\t\t\t\t//Toast msg = Toast.makeText(orgDetails.this, \"Menu 1\", Toast.LENGTH_LONG);\n\t\t\t\t//msg.show();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}", "@Override\n public boolean onMenuItemClick(MenuItem item) {\n return true;\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n return super.onOptionsItemSelected(item);\r\n }", "private void showActionOverflowMenu() {\n try {\n ViewConfiguration config = ViewConfiguration.get(this);\n Field menuKeyField = ViewConfiguration.class.getDeclaredField(\"sHasPermanentMenuKey\");\n if (menuKeyField != null) {\n menuKeyField.setAccessible(true);\n menuKeyField.setBoolean(config, false);\n }\n } catch (Exception e) {\n Log.d(TAG, e.getLocalizedMessage());\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t\tswitch (item.getItemId()) {\r\n\t\t\tcase R.id.menu_panico:\r\n\t\t\t\tws.Panico();\r\n\t\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t getMenuInflater().inflate(R.menu.event_history, menu);\n\t \n\t if (ViewConfiguration.get(this).hasPermanentMenuKey()) {\n\t \t\n\t } else {\n\t new ShowcaseView.Builder(this, true)\n\t .setTarget(new ActionViewTarget(this, ActionViewTarget.Type.OVERFLOW))\n\t .setContentTitle(\"Täältä voit vaihtaa jaksoa\")\n\t .setContentText(\"Klikkaamalla tästä voit valita jakson, jonka suunnitelmat näytetään.\")\n\t .hideOnTouchOutside()\n\t .setStyle(R.style.ShowcaseView)\n\t .singleShot(CHANGE_SPRINT_HELP)\n\t .build();\n\t }\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmenu.toggle();\r\n\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "public void clickOnMenu() {\n\t\tgetAndroidmenubtn().isPresent();\n\t\tgetAndroidmenubtn().click();\n\t\twaitForPageToLoad();\n\t}", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t\treturn onMenuItemSelected(item.getItemId());\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n getMenuInflater().inflate(R.menu.main, menu);\r\n if (userType.equalsIgnoreCase(\"TSE\")) {\r\n MenuItem item = menu.findItem(R.id.home_button);\r\n item.setVisible(false);\r\n }\r\n return true;\r\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == R.id.menu1) {\n alt.show();\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n /*Grabs the information from the overflow_menu resource in the menu folder and sets them\n to the action bar*/\n try {\n getMenuInflater().inflate(R.menu.overflow_menu, menu);\n return true;\n } catch ( Exception e ) {\n Toast.makeText(getApplicationContext(),\"EXCEPTION \" + e + \" occurred!\",Toast.LENGTH_SHORT).show();\n return false;\n }\n }", "@Override\n public void onMenuClick() {\n Toast.makeText(SearchActivity_.this, \"Menu click\", Toast.LENGTH_LONG).show();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_Home) {\n Intent inte = new Intent(EquiationsSystems.this,MainActivity.class);\n startActivity(inte);\n }\n\n if (id == R.id.action_OneVariable) {\n Intent inte = new Intent(EquiationsSystems.this,OneVariable.class);\n startActivity(inte);\n }\n\n if (id == R.id.action_EquationsSystems) {\n return true;\n }\n\n if (id == R.id.action_Interpolation) {\n Intent inte = new Intent(EquiationsSystems.this,Interpolation.class);\n startActivity(inte);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "default public void clickMenu() {\n\t\tremoteControlAction(RemoteControlKeyword.MENU);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n Intent i;\n switch (id) {\n case R.id.action_search:\n break;\n case R.id.overflow1:\n i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(\"http://advanced.shifoo.in/site/appterms-and-conditions\"));\n startActivity(i);\n break;\n case R.id.overflow2:\n i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(\"http://www.shifoo.in/site/privacy-policy\"));\n startActivity(i);\n break;\n default:\n return super.onOptionsItemSelected(item);\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n \n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n\n\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item){\n super.onOptionsItemSelected(item);\n return true;\n }", "public void pressMainMenu() {\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\n\t\tswitch (item.getItemId()) {\n\t\t\n\t\tdefault:\n\t\t\t\n\t\t\tbreak;\n\n\t\t}//switch (item.getItemId())\n\n\t\t\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (MainAct.longClicked) {\n DebugUtil.showDebug(\"MainAct.onCreateOptionsMenu(), when item longClicked\");\n getMenuInflater().inflate(R.menu.menu_main_long_clicked, menu);\n } else {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == R.id.badges) {\n\t\t\tgoToBadges(item.getActionView());\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n\n // MyApp myApp = MyApp.getInstance();\n\n MenuItem item = menu.findItem(R.id.action_matches);\n item.setVisible(false);\n\n return true;\n }", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tmenu.setMouseClick(true);\n\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n //HouseKeeper handles menu item click event\n mHouseKeeper.onOptionsItemSelected(item);\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onMenuItemSelected(int featureId, MenuItem item) {\n\t\tOptionsMenu.selectItem(item,getApplicationContext());\n\t\treturn super.onMenuItemSelected(featureId, item);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\r\n\t\tinflater.inflate(R.menu.main_activity_actions, menu);\r\n\r\n\r\n\t\tif(tv==null) {\r\n\t\t\tRelativeLayout badgeLayout = (RelativeLayout) menu.findItem(R.id.action_notification).getActionView();\r\n\t\t\ttv = (TextView) badgeLayout.findViewById(R.id.hotlist_hot);\r\n\t\t\ttv.setText(\"12\");\r\n\t\t}\r\n\r\n\t\t/*menu.findItem(R.id.action_notification).getActionView().setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\r\n\t\t\t\t\tSystem.out.println(\"clicked\");\r\n\t\t\t\t\ttv.setEnabled(false);\r\n\t\t\t\t\ttv.setBackground(null);\r\n\t\t\t\t\ttv.setBackgroundDrawable(null);\r\n\t\t\t\t\ttv.setText(null);\r\n\t\t\t\t\tintent = new Intent(getApplicationContext(), Notification.class);\r\n\t\t\t\t\tstartActivity(intent);\r\n\r\n\t\t\t}\r\n\t\t});*/\r\n\t\t//getActionBar().setCustomView(R.layout.menu_example);\r\n\t\t//getActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_HOME_AS_UP);\r\n\t\t//getActionBar().setIcon(android.R.color.transparent);\r\n\t\treturn true;\r\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetSupportMenuInflater().inflate(R.menu.activity_display_selected_scripture,\n \t\t\t\tmenu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.home_page, menu);\n final MenuItem menuItem = menu.findItem(R.id.message);\n View actionView = menuItem.getActionView();\n textCartItemCount = (TextView) actionView.findViewById(R.id.cart_badge);\n setupBadge();\n\n actionView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n onOptionsItemSelected(menuItem);\n\n }\n });\n return true;\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n \r\n \tint id = item.getItemId();\r\n switch (id) {\r\n case R.id.action_settings:\r\n \topenSettings();\r\n return true;\r\n case R.id.action_about:\r\n \topenAbout();\r\n \treturn true;\r\n case R.id.action_exit:\r\n \tExit();\r\n \treturn true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@FXML protected void MainMenuButtonClicked(ActionEvent event) {\n this.mainMenuCB.launchMainMenu();\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t case R.id.developer:\n\t openMyApps();\n\t return true;\t \n\t \n\t default:\n\t return super.onOptionsItemSelected(item);\n\t }\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonSlideMenuFragmentEventListener.onSlideMenuFragmentEvent(MENU_HELP);\n\t\t\t}", "@Override\n public void onClick(View view) {\n listener.menuButtonClicked(view.getId());\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_window, menu);\n MenuItem m = menu.add(2,4,9,\"Debug Service\");\n m.setCheckable(true);\n m.setChecked(GRClient.getInstance().isDebug());\n\n menu.add(3,9,1, (isSocalConnected) ? \"Sign Out\" : \"Sign In\");\n menu.add(3,8,100,\"Send Feedback\");\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected (MenuItem item)\n {\n int id = item.getItemId();\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == R.id.action_dial) {\n makePhoneCall();\n return true;\n }\n else if (id == R.id.action_browse_web) {\n showBlogSite();\n return true;\n }\n else if (id == R.id.action_browse_disk) {\n browseDisk();\n return true;\n }\n else if (id == R.id.action_indoor_map) {\n openInddorMap();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_settings:\n\n startActivity(new Intent(ListViewCompany.this, Help.class));\n\n return true;\n\n default:\n\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }" ]
[ "0.7620624", "0.74582714", "0.7439771", "0.73414093", "0.7304234", "0.69976187", "0.69085217", "0.68530345", "0.685259", "0.6851725", "0.6815219", "0.679749", "0.679749", "0.679749", "0.679749", "0.67555887", "0.6752884", "0.6752234", "0.6744205", "0.6739605", "0.67380905", "0.6723918", "0.6723241", "0.67232275", "0.6719357", "0.67118335", "0.67030317", "0.66994816", "0.66994816", "0.66767424", "0.66696113", "0.66634077", "0.66594887", "0.66594887", "0.66594887", "0.66594887", "0.66594887", "0.66594887", "0.6650731", "0.6649395", "0.6648034", "0.66451967", "0.66350055", "0.66296506", "0.66296506", "0.66296506", "0.66296506", "0.66296506", "0.66296506", "0.6605565", "0.66030914", "0.6600104", "0.6599557", "0.6599557", "0.6599557", "0.6595652", "0.659199", "0.65809005", "0.6575369", "0.65753055", "0.65753055", "0.6570329", "0.6570329", "0.6570329", "0.6570329", "0.6570329", "0.6570329", "0.6570329", "0.6570329", "0.65590745", "0.6556847", "0.6554041", "0.65461123", "0.654517", "0.6534524", "0.6530115", "0.6527208", "0.6525505", "0.65235895", "0.6523476", "0.65173596", "0.65169376", "0.65120167", "0.6511782", "0.65090984", "0.65054345", "0.65014267", "0.6497809", "0.6497106", "0.6495456", "0.6495342", "0.64943045", "0.64860845", "0.64860845", "0.64851356", "0.6481025", "0.6481025", "0.6481025", "0.6481025", "0.6481025", "0.6481025" ]
0.0
-1
User clicked "Discard" button, navigate to parent activity.
@Override public void onClick(DialogInterface dialogInterface, int i) { NavUtils.navigateUpFromSameTask(EditorActivity.this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onDiscardClick(){\n if (mHomeChecked){ // at Home Checkmark\n NavUtils.navigateUpFromSameTask(EditSymptomActivity.this);\n }\n if (!mHomeChecked) { // at BackPressed\n finish();\n }\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tfinish();\r\n\t\t\t\tsetResult(RESULT_CANCELED);\r\n\t\t\t}", "@Override\n public void onBackPressed() {\n Intent viewIntent = new Intent(this, ViewPatientDetails.class);\n setResult(RESULT_CANCELED, viewIntent);\n finish();\n }", "@Override\n public void onPositiveClick() {\n quitThisActivity();\n }", "public void onCancelPressed(View view) {\n finish();\n }", "public void onClickCancel(View view) {\n this.finish();\n }", "public void cancelButtonPressed(View view) {\r\n\t\tthis.finish();\r\n\t}", "public void onCancel() {\r\n parentController.switchView();\r\n }", "public void cancel (View view) {\n this.onBackPressed();\n }", "public void onBackPressed() {\n Intent i = new Intent();\n i.putExtra(\"listCanceled\", true);\n setResult(Activity.RESULT_OK, i);\n finish();\n }", "public void onCancelClicked(View v) {\n goBackToStart();\n }", "public void onCancelClicked(View v) {\n goBackToStart();\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tif (cmd == ConstantTool.PAY_SUCCESS) {\r\n\t\t\tIntent intent = new Intent(OrderList.this, Homemenu.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t}\r\n\t}", "public void onCancelPressed(View v) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Intent intent = getIntent();\n finish();\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n if (dialog.isShowing()) {\n dialog.cancel();\n onBackPressed();\n }\n }", "@Override\n public void onBackPressed(){\n cancel();\n }", "public void skipIn(View view) {\n Intent i = new Intent(this,DonorActivity.class);\n startActivity(i);\n }", "public void onCancelClicked(View view) {\n //ends activity\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = getIntent();\n finish();\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdismiss();\n\t\t\t}", "private void gotoOtherActivity() {\n finish();\n }", "@Override\r\n public void onBackPressed() {\r\n \t// Handle the back button click event such that if user \r\n \t// is performing an IMCI or CCM assessment then a confirmation dialog \r\n \t// will be displayed to confirm that the user wishes to exit the \r\n \t// patient assessment\r\n \texitAssessmentDialogHandler();\r\n }", "@Override\n public void onClick(View v) {\n StopMediaPlayer();\n Intent intent = new Intent(ResultActivity.this, ArenaActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n transitionTo(intent);\n }", "@Override\n public void onClick(View view) {\n switch (view.getId())\n {\n case R.id.activity_slider_btn_skip:\n Intent loginIntent = new Intent(IntroductionActivity.this, MainActivity.class);\n loginIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(loginIntent);\n finish();\n break;\n }\n }", "@Override\n public void onClick(View v) {\n startActivity(finishIntent);\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tIntent i = new Intent(this, PayOptions.class);\n\t\tstartActivity(i);\n\t\treturn;\n\t}", "private void returnToBrowse()\n {\n Intent intent = new Intent(this, BrowseActivity.class);\n startActivity(intent);\n }", "private void returnToPriviousActivityWithoutDevice(){\r\n \tIntent finishIntent = new Intent();\r\n finishIntent.putExtra(EXTRA_DEVICE_ADDRESS, \"finish\");\r\n setResult(Activity.RESULT_CANCELED, finishIntent);\r\n BluetoothActivity.this.finish();\r\n }", "@Override\r\n public void onClick(View v) {\n switch (v.getId()) {\r\n case R.id.ok:\r\n dismiss();\r\n // c.finishActivity(1);\r\n Intent i = new Intent(SMS1.this, BookingSelection.class);\r\n\r\n //Intent i = new Intent(Bookingconfirmation1.this,BookingSelection.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);\r\n\r\n\r\n break;\r\n\r\n }\r\n\r\n }", "public void onCancel(View view) {\n finish();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBorrowProcessDialog.this.dismiss();\n\t\t\t}", "public void cancelButtonClicked(View view){\n setResult(RESULT_CANCELED, null);\n finish();\n }", "public void onBackPressed() {\n // do nothing. We want to force user to stay in this activity and not drop out.\n }", "public void Back(View view) // back button pressed - go back to previous class\n {\n Intent intent = new Intent(ImportingOCR.this, AddedCmc.class); // back to previous page--which should be addedcmc.class and not importing manual(i change to Addedcmc.class)\n intent.putExtra(\"personid\", personid);\n intent.putExtra(\"amount\", amount);\n intent.putExtra(\"date\", date);\n intent.putExtra(\"username\", uploader);\n startActivity(intent);\n }", "@Override\n public void onBackPressed() {\n Intent intent = new Intent(getApplicationContext(), MerchantJobs.class);\n startActivity(intent);\n finish();\n\n return;\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish(); // go back to previous activity when item not cascade deleted\n\n }", "protected void onDiscard() {\r\n this.setActive(false);\r\n }", "@Override\n public void onBackPressed() {\n new AlertDialog.Builder(this)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .setTitle(\"Leaving page\")\n .setMessage(\"You have not saved this new flat. Press Yes to discard or No to remain on page.\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n\n })\n .setNegativeButton(\"No\", null)\n .show();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View v)\n {\n finish();\n }", "@Override\n public void onClick(View v) {\n Log.d(\"Notification-debug\", \"Ignore button\");\n finish();\n }", "@Override\n public void onBackPressed() {\n if (!mItemDetailsHasChanged) {\n super.onBackPressed();\n return;\n }\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\r\n\t\t\t\tdialog.dismiss();\r\n\r\n\t\t\t\tstartActivity(new Intent(Receipt.this, MainActivity4.class));\r\n\t\t\t\tfinish();\r\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\r\n\t\t\t}", "@Override\n public void onPositiveClick() {\n AbDialogUtil.removeDialog(ApplyAcitivity.this);\n quitThisActivity();\n }", "@Override\n public void onBackPressed() {\n confirmExit();\n }", "public void Cancel(View v)\n\t{\n\t\tfinish();\n\t}", "@Override\r\n public void onClick(View arg0) {\n finish();\r\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\r\n public void onClick(View v) {\n finish();\r\n IntentToStartView();\r\n }", "@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tfinish();\n\t\t\t\t}", "@Override\n\t public void onClick(View arg0) {\n\t\tfinish();\n\t }", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent intent = new Intent(AccountRemainActivity.this,\r\n\t\t\t\t\t\t\t\t\t\t\t\t ConfirmIdentityActivity.class);\r\n\t\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}", "@Override\n public void onBackPressed() {\n //intent that references this class\n Intent intent = new Intent(this, MedplanActivity.class);\n startActivity(intent);\n }", "@Override\n\tpublic void onBackPressed() {\n\t\treturn;\n\t}", "@Override\n public void onClick(View arg0) {\n finish();\n }", "@Override\n public void onClick(View v) {\n finish();\n }", "@Override\n public void onBackPressed()\n {\n \t//Emulate the progressDialog.setCancelable(false) behavior\n \t//If the first view is being shown\n \tif(viewSwitcher.getDisplayedChild() == 0)\n \t{\n \t\t//Do nothing\n \t\treturn;\n \t}\n \telse\n \t{\n \t\t//Finishes the current Activity\n \t\tsuper.onBackPressed();\n \t}\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\r\n\r\n\t\t\t}", "@Override\n public void onClick(View view) {\n isFromResultActivity=false;\n finish();\n }", "private void proceed() {\n finish();\n Intent onReturnView = new Intent(ChatMessage.this, MainActivity.class);\n startActivity(onReturnView);\n }", "protected void goBack() {\r\n\t\tfinish();\r\n\t}", "@Override\n public void onClick(View v)\n {\n finish();\n }", "@Override\n public void onClick(View v)\n {\n finish();\n }", "@Override\n public void onBackPressed() {\n \tsetResult(RESULT_OK, getIntent());\n \tfinish();\n }", "public void clickedCancel(View view) {\n \treturnResult(Activity.RESULT_CANCELED);\n }", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\n\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\n\t\t\t\t\tfinish();\n\t\t\t\t}", "@Override\n public void onBackPressed() {\n OrderDataService.cancelOrder(eventUid, isMarkedSeats, order);\n\n // Go back to seats / no-seats activity\n finish();\n }", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tfinish();\r\n\t\t\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(MainActivity.this, NewNoDoActivity.class);\n\n // Starts a new activity -- moves from the current activity (main activity) to\n // the NewNoDoActivity. Also, the request code is passed to the new activity.\n startActivityForResult(intent, NEW_NODO_REQUEST_CODE);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdismiss();\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n NavUtils.navigateUpFromSameTask(EditoryActivity.this);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n unsavedChanges = false;\n //continue with back button\n onBackPressed();\n }", "@Override\r\n public void onClick(View v) {\n finish();\r\n }", "@Override\r\n public void onClick(View v) {\n finish();\r\n }" ]
[ "0.77920556", "0.6648744", "0.66188097", "0.65739435", "0.6562168", "0.65511334", "0.65176535", "0.65063024", "0.6470091", "0.64457875", "0.6432481", "0.6432481", "0.64202315", "0.63834745", "0.63798004", "0.63708395", "0.6368377", "0.636595", "0.6365485", "0.6363731", "0.63538045", "0.63538045", "0.63500077", "0.63489133", "0.6331583", "0.6328632", "0.6312569", "0.6306383", "0.62964225", "0.6292784", "0.62861097", "0.62782127", "0.6277713", "0.62768227", "0.6276614", "0.62724525", "0.6262344", "0.62611747", "0.625454", "0.62523615", "0.62203956", "0.6211698", "0.6206435", "0.6197195", "0.61945957", "0.619412", "0.619412", "0.619412", "0.619412", "0.6190788", "0.618762", "0.61858076", "0.6185435", "0.61754763", "0.61754763", "0.61754763", "0.61754763", "0.61754763", "0.61754763", "0.61754763", "0.61754763", "0.61754763", "0.61745554", "0.6168526", "0.6166273", "0.61660373", "0.61545587", "0.6153703", "0.6153429", "0.615318", "0.6152114", "0.6148664", "0.61478436", "0.61478436", "0.61478436", "0.61478436", "0.61478436", "0.61478436", "0.61478436", "0.61478436", "0.61478436", "0.61478436", "0.61478436", "0.6145875", "0.61424166", "0.61421245", "0.6140268", "0.61386913", "0.61386913", "0.61379457", "0.6132104", "0.6129338", "0.6128764", "0.6126101", "0.61251134", "0.61213356", "0.61213356", "0.6121124", "0.61202997", "0.6118441", "0.6118441" ]
0.0
-1
This method is called when the back button is pressed.
@Override public void onBackPressed() { // If the pet hasn't changed, continue with handling back button press if (!mPetHasChanged) { super.onBackPressed(); return; } // Otherwise if there are unsaved changes, setup a dialog to warn the user. // Create a click listener to handle the user confirming that changes should be discarded. DialogInterface.OnClickListener discardButtonClickListener = new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { // User clicked "Discard" button, close the current activity. finish(); } }; // Show dialog that there are unsaved changes showUnsavedChangesDialog(discardButtonClickListener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n // Detect when the back button is pressed\n public void onBackPressed() {\n\n // Let the system handle the back button\n\n super.onBackPressed();\n\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tBack();\n\t}", "@Override\r\n\tpublic void backButton() {\n\t\t\r\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\t\n\t}", "@Override\n public void onBackPressed() {\n backToHome();\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t}", "@Override\n public void onBackPressed() {}", "@Override\n\tpublic void onBackPressed()\n\t\t{\n\t\tbackPressed();\n\t\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tbackButtonHandler();\r\n\t\treturn;\r\n\t}", "public void onBackPressed() {\n backbutton();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\n\t\t\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\r\n public void onBackPressed() {\n }", "@Override\n\tpublic void onBackPressed()\n\t{\n\t}", "public void back() {\n Views.goBack();\n }", "@Override\n\tpublic void onBackPressed() {\n\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n public void onBackPressed() { }", "@Override\n \tpublic void onBackPressed() {\n \t}", "public void onBackPressed() {\r\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tdoBack();\r\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void backButton() {\n\n\t}", "@Override\n public void backButton() {\n\n\n }", "void onGoBackButtonClick();", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}", "@Override\n public void onBackPressed()\n {\n\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}", "@Override\n public void backPressed(){\n }", "@Override\n public void onBackPressed()\n {\n mIsBackButtonPressed = true;\n super.onBackPressed();\n \n }", "@Override\n public void onBackPressed(){\n System.out.println(\"---------------- No debe hacer nada -------------------------------\");\n }", "@Override\n public void onBackPressed()\n {\n super.onBackPressed();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\treturn;\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tthis.finish();\n\t}", "@Override\n public void onBackPressed() {\n exitReveal();\n\n super.onBackPressed();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tthis.finish();\n\t\tsuper.onBackPressed();\n\t}", "@Override\n public void handleOnBackPressed() {\n }", "public void onBackPressed()\n {\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tupdata();\n\t\tsuper.onBackPressed();\n\t}", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n\n }", "@Override\n\tpublic void onBackPressed() {\n\treturn;\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\texitApplication().onClick(null);\n\t\tsuper.onBackPressed();\n\t}", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n this.finish();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n this.finish();\n }", "@Override\n public void onBackPressed( ) {\n update_storage( );\n super.onBackPressed( );\n }", "@Override\n\tpublic void onBackPressed() {\n\t\treturn;\n\t}", "@Override\n public void onBackPressed() {\n\n\n super.onBackPressed();\n\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\t\n\t\tremoveClickList();\n\t\tfinish();\n\t}", "@Override\n public void onBackPressed(){\n }", "@Override\n public void onBackPressed() {\n LogHelper.logD(TAG, \"onBackPressed called\");\n }", "@Override\n public void onBackPressed() {\n //super.onBackPressed();\n goBack();\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tmoveTaskToBack(true);\r\n\t\tsuper.onBackPressed();\r\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\t finish();\n\t}", "@Override\n public void onBackPressed() {\n if(web.canGoBack()){\n web.goBack();\n } else {\n super.onBackPressed();\n }\n }", "@Override\n public void onBackPressed() {\n return;\n }", "@Override\n public void onBackPressed() {\n return;\n }", "@Override\n public void onBackPressed() {\n return;\n }", "@Override\n public void onBackPressed() {\n return;\n }", "@Override\n public void onBackPressed() {\n return;\n }", "@Override\n public void onBackPressed() {\n this.finish();\n }", "@Override\n public void onBackPressed() {\n Intent intent = getIntent();\n setResult(0,intent);\n\n super.onBackPressed();\n }" ]
[ "0.8694827", "0.85572207", "0.8540487", "0.85141873", "0.850545", "0.8492643", "0.8492643", "0.8490665", "0.84883857", "0.8469986", "0.8461182", "0.8454182", "0.84454715", "0.84454715", "0.84454715", "0.84454715", "0.84454715", "0.84454715", "0.84454715", "0.84454715", "0.844337", "0.8407431", "0.840647", "0.83903164", "0.8387811", "0.8387811", "0.8387811", "0.8387811", "0.83834606", "0.83726215", "0.83677983", "0.83624697", "0.83624697", "0.83624697", "0.83624697", "0.83624697", "0.83624697", "0.83624697", "0.83624697", "0.83624697", "0.83624697", "0.83624697", "0.83624697", "0.83624697", "0.83624697", "0.83624697", "0.83624697", "0.8359521", "0.83556455", "0.83556455", "0.83498234", "0.8344501", "0.8343173", "0.83388996", "0.83388996", "0.83388996", "0.83388996", "0.83388996", "0.83388996", "0.83388996", "0.83338416", "0.83338416", "0.83338416", "0.83322364", "0.8330735", "0.8330735", "0.8326876", "0.8326876", "0.8317937", "0.8309822", "0.83043474", "0.8296226", "0.8294101", "0.8266726", "0.8264301", "0.8258403", "0.8253606", "0.824212", "0.8236847", "0.822826", "0.82061523", "0.8198943", "0.81969726", "0.81969726", "0.818438", "0.81718713", "0.81622297", "0.81542647", "0.8136475", "0.81269836", "0.8126901", "0.81166023", "0.8102745", "0.81019706", "0.8100977", "0.8100977", "0.8100977", "0.8100977", "0.8073833", "0.8070581", "0.80636454" ]
0.0
-1
User clicked "Discard" button, close the current activity.
@Override public void onClick(DialogInterface dialogInterface, int i) { finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onClickCancel(View view) {\n this.finish();\n }", "@Override\n public void onPositiveClick() {\n quitThisActivity();\n }", "public void onCancelClicked() {\n close();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBorrowProcessDialog.this.dismiss();\n\t\t\t}", "public void onCancelClicked(View view) {\n //ends activity\n finish();\n }", "public void onDiscardClick(){\n if (mHomeChecked){ // at Home Checkmark\n NavUtils.navigateUpFromSameTask(EditSymptomActivity.this);\n }\n if (!mHomeChecked) { // at BackPressed\n finish();\n }\n }", "@Override\n public void onPositiveClick() {\n AbDialogUtil.removeDialog(ApplyAcitivity.this);\n quitThisActivity();\n }", "public void onCancelButtonClick() {\n close();\n }", "protected void onDiscard() {\r\n this.setActive(false);\r\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tdialog_app.dismiss();\n\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tdialog_app.dismiss();\n\t\t\t\t\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdismiss();\n\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\tdialog_app.dismiss();\n\t\t\t\t\t\t}", "public void cancel() { Common.exitWindow(cancelBtn); }", "@Override\n public void onNegativeClick() {\n AbDialogUtil.removeDialog(ApplyAcitivity.this);\n }", "@Override\n public void onNegativeClick() {\n AbDialogUtil.removeDialog(ApplyAcitivity.this);\n }", "@Override\n public void onNegativeClick() {\n AbDialogUtil.removeDialog(ApplyAcitivity.this);\n }", "public void Cancel(View v)\n\t{\n\t\tfinish();\n\t}", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\n\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\n\t\t\t\t\tfinish();\n\t\t\t\t}", "public void cancelButtonPressed(View view) {\r\n\t\tthis.finish();\r\n\t}", "@Override\n public void onClick(View view) {\n dismiss();\n }", "public void closeClick(View view) {\n this.finish();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdismiss();\n\t\t\t}", "@Override\n public void onClick(View view) {\n pw.dismiss(); // dismiss the window\n }", "public void onCancelClicked(View v) {\n\t\tToast.makeText(getApplicationContext(), \"Cancelled\", Toast.LENGTH_SHORT)\n\t\t\t\t.show();\n\t\t// Close the activity.\n\t\t/*\n\t\t * if (MainActivity.sharedPreferences.getBoolean(MainActivity.MY_BOO,\n\t\t * true)){ Intent i = new Intent(this, MainActivity.class);\n\t\t * MainActivity.sharedPreferences.edit().putBoolean(MainActivity.MY_BOO,\n\t\t * true).commit(); startActivity(i); finish(); } else{ finish(); }\n\t\t */\n\t\tfinish();\n\t}", "public void onCancelPressed(View view) {\n finish();\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "public void cancel(View view) {\n\t\tfinish();\n\t}", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tmydialog.dismiss();\n\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdia.dismiss();\n\t\t\t}", "private void close() {\n startActivity(new Intent(BaseActivity.this, ChooserActivity.class));\n Log.d(TAG, \"Finish BaseActivity\");\n finish();\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "public void cancel(View v) {\n finish();\n }", "public void onCancel(View view) {\n finish();\n }", "@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\t\n\t\t\t\tfinish();\n\t\t\t\t\n\t\t\t\tmApplication.exit();\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdialog.dismiss();\r\n\r\n\t\t\t}", "public void cancelButtonClicked(View view){\n setResult(RESULT_CANCELED, null);\n finish();\n }", "@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tfinish();\r\n\t\t\t\tsetResult(RESULT_CANCELED);\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n dismiss();\n }", "@Override\r\n\tpublic void onClick(View v) {\n\t\tthis.dismiss();\r\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n // dismiss the progress dialog\n MyTask.this.cancel(true);\n finish();\n pDialog.dismiss();\n // Tell the system about cancellation\n\n }", "void closeActivity();", "public void exitActivity() {\n\n finish();\n\n }", "@Override\r\n public void onClick(View arg0) {\n dialog.dismiss();\r\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tpopupWindow.dismiss();\n\t\t\t}", "@Override\r\n public void onClick(DialogInterface arg0, int arg1) {\n finish();\r\n System.exit(0);\r\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n finish();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tParkingLotBidDialog.this.dismiss();\n\t\t\t}", "@Override\n public void onClick(View v) {\n\n\n dismiss();\n\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tgetDialog().dismiss();\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.dismiss();\n\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n public void onClick(View v) {\n b.dismiss();\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\r\n\r\n\t\t\t}", "private void cancel() {\n\t\tfinish();\n\t}", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t}", "@Override\n public void onClick(View view) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n finish();\n System.exit(0);\n }", "@Override\n public void onClick(View v) {\n finish();\n System.exit(0);\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.dismiss();\n }", "public void onCancelPressed(View v) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\r\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\tcancel(true);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}" ]
[ "0.7094227", "0.7030127", "0.70030695", "0.69513863", "0.69374704", "0.6918861", "0.6903609", "0.688826", "0.6832851", "0.6728755", "0.6728755", "0.67005914", "0.67005914", "0.6698896", "0.66313297", "0.662211", "0.662211", "0.66169196", "0.6605242", "0.66011524", "0.65958", "0.65944207", "0.65837044", "0.6575414", "0.6575414", "0.65735", "0.6541968", "0.654036", "0.65374", "0.65374", "0.6534511", "0.6513521", "0.6512676", "0.65118587", "0.649984", "0.64955264", "0.649503", "0.64932966", "0.64829147", "0.6482808", "0.64826626", "0.6468933", "0.64684707", "0.6452987", "0.64516675", "0.6447396", "0.6445328", "0.6410912", "0.64083713", "0.6407568", "0.6406523", "0.6400218", "0.6389828", "0.6389745", "0.6389074", "0.6386887", "0.6384833", "0.63700646", "0.63700646", "0.63700646", "0.63700646", "0.63655543", "0.6364971", "0.63644814", "0.63641626", "0.63641626", "0.63627833", "0.6359877", "0.6359877", "0.6359696", "0.63534266", "0.63534266", "0.6345745", "0.6344193", "0.63426006", "0.63395035", "0.6338903", "0.6338903", "0.6338903", "0.6338903", "0.6338903", "0.6338903", "0.63357604", "0.63357604", "0.6331115", "0.63302064", "0.63302064", "0.6329897", "0.6329897", "0.6329897", "0.6329897", "0.6329897", "0.6329897", "0.6329431", "0.6329431", "0.6329431", "0.6328594", "0.63190013", "0.63175213", "0.63150096", "0.63150096" ]
0.0
-1
Since the editor shows all Product attributes, define a projection that contains all columns from the Product table
@Override public Loader<Cursor> onCreateLoader(int i, Bundle bundle) { String[] projection = { ProductContract.productEntry._ID, productEntry.COLUMN_product_NAME, ProductContract.productEntry.COLUMN_Product_description, ProductContract.productEntry.COLUMN_product_price, ProductContract.productEntry.COLUMN_product_Quantity, ProductContract.productEntry.COLUMN_product_image}; // This loader will execute the ContentProvider's query method on a background thread return new CursorLoader(this, // Parent activity context mCurrentProductUri, // Query the content URI for the current Product projection, // Columns to include in the resulting Cursor null, // No selection clause null, // No selection arguments null); // Default sort order }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String[] columnProjection() {\n\n\t\treturn new String[]{KEY_ID, KEY_ADDRESS, KEY_NAME, KEY_VOLUME, KEY_POOL_LOCALE, KEY_FINISH, KEY_SANITIZER, KEY_PUMP_BRAND, KEY_PUMP_MODEL, KEY_FILTER, KEY_CLEANER_BRAND, KEY_CLEANER_MODEL, KEY_TRAFFIC, KEY_MIN_DEPTH, KEY_MAX_DEPTH, KEY_TILING, KEY_COVER, KEY_ATTACHED_SPA, KEY_HEATER, KEY_DIVING_BOARD, KEY_SLIDE, KEY_LADDER, KEY_FOUNTAINS, KEY_ROCK_WATERFALL, KEY_LIGHTS, KEY_INFINITY, KEY_SPORTING_EQUIPMENT, KEY_BEACH_ENTRY, KEY_SAND, KEY_IMAGE, KEY_WEATHER_NOTIFICATIONS, KEY_WATER_TEST_REMINDERS, KEY_FILTER_REMINDERS, KEY_SAFETY_NOTIFICATIONS, KEY_MAINTENANCE_REMINDERS, KEY_CUSTOM_NOTIFICATIONS, KEY_COUPON_NOTIFICATIONS};\n\t}", "public static String[] concreteColumnProjection() {\n\n\t\treturn new String[]{CONCRETE_ID, CONCRETE_ADDRESS, CONCRETE_NAME, CONCRETE_VOLUME, CONCRETE_POOL_LOCALE, CONCRETE_FINISH, CONCRETE_SANITIZER, CONCRETE_PUMP_BRAND, CONCRETE_PUMP_MODEL, CONCRETE_FILTER, CONCRETE_CLEANER_BRAND, CONCRETE_CLEANER_MODEL, CONCRETE_TRAFFIC, CONCRETE_MIN_DEPTH, CONCRETE_MAX_DEPTH, CONCRETE_TILING, CONCRETE_COVER, CONCRETE_ATTACHED_SPA, CONCRETE_HEATER, CONCRETE_DIVING_BOARD, CONCRETE_SLIDE, CONCRETE_LADDER, CONCRETE_FOUNTAINS, CONCRETE_ROCK_WATERFALL, CONCRETE_LIGHTS, CONCRETE_INFINITY, CONCRETE_SPORTING_EQUIPMENT, CONCRETE_BEACH_ENTRY, CONCRETE_SAND, CONCRETE_IMAGE, CONCRETE_WEATHER_NOTIFICATIONS, CONCRETE_WATER_TEST_REMINDERS, CONCRETE_FILTER_REMINDERS, CONCRETE_SAFETY_NOTIFICATIONS, CONCRETE_MAINTENANCE_REMINDERS, CONCRETE_CUSTOM_NOTIFICATIONS, CONCRETE_COUPON_NOTIFICATIONS};\n\t}", "@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}", "@Override\n\tpublic List<ProductVo> selectAll() {\n\t\tList<ProductVo> list = sqlSession.selectList(\"product.selectAll\");\n\t\treturn list;\n\t}", "TbProductAttributes selectByPrimaryKey(Integer productAttributesId);", "@Override\n\t@Transactional\n\n\tpublic void initProjection() {\n\t\tdouble[] prices=new double[] {30,50,60,70,90,100};//\n\t\tvilleRepository.findAll().forEach(ville->{\n\t\tville.getCinemas().forEach(cinema->{\n\t\tcinema.getSalles().forEach(salle->{\n\t\tfilmRepository.findAll().forEach(film->{\n\t\tseanceRepository.findAll().forEach(seance->{\n\t\tProjection projection=new Projection();\n\t\tprojection.setDateProjection(new Date());\n\t\tprojection.setFilm(film);\n\t\tprojection.setPrix(prices[new Random().nextInt(prices.length)]);\n\t\tprojection.setSalle(salle);\n\t\tprojection.setSeance(seance);\n\t\tprojectionRepository.save(projection);\n\t\t});\n\t\t});\n\t\t});\n\t\t});\n\t\t});\n\t\t\n\t}", "@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "public List<Object[]> select() {\n return selectColumns(metadata.getColumns());\n }", "@Test\n public void twoColumns_and_projection() {\n for (Tuple row : query().from(Constants.survey).select(Constants.survey.id, Constants.survey.name, new QIdName(Constants.survey.id, Constants.survey.name)).fetch()) {\n Assert.assertEquals(3, row.size());\n Assert.assertEquals(Integer.class, row.get(0, Object.class).getClass());\n Assert.assertEquals(String.class, row.get(1, Object.class).getClass());\n Assert.assertEquals(IdName.class, row.get(2, Object.class).getClass());\n }\n }", "@Test\n public void projection_and_twoColumns() {\n for (Tuple row : query().from(Constants.survey).select(new QIdName(Constants.survey.id, Constants.survey.name), Constants.survey.id, Constants.survey.name).fetch()) {\n Assert.assertEquals(3, row.size());\n Assert.assertEquals(IdName.class, row.get(0, Object.class).getClass());\n Assert.assertEquals(Integer.class, row.get(1, Object.class).getClass());\n Assert.assertEquals(String.class, row.get(2, Object.class).getClass());\n }\n }", "private ProjectionOperation getVehicleProjection() {\n return project()\n .andInclude(bind(\"_id\", \"cars.vehicles.id\"))\n .andInclude(bind(\"make\", \"cars.vehicles.make\"))\n .andInclude(bind(\"model\", \"cars.vehicles.model\"))\n .andInclude(bind(\"year_model\", \"cars.vehicles.year\"))\n .andInclude(bind(\"price\", \"cars.vehicles.price\"))\n .andInclude(bind(\"licensed\", \"cars.vehicles.licensed\"))\n .andInclude(bind(\"date_added\", \"cars.vehicles.dateAdded\"))\n .andInclude(bind(\"warehouse\", \"name\"))\n .andInclude(bind(\"location\", \"cars.location\"))\n .andInclude(bind(\"latitude\", \"location.latitude\"))\n .andInclude(bind(\"longitude\", \"location.longitude\"));\n }", "@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}", "public static String[] detailsColumnProjection() {\n\n\t\treturn new String[]{KEY_ID, KEY_ADDRESS, KEY_NAME, KEY_VOLUME};\n\t}", "SmtOrderProductAttributes selectByPrimaryKey(Long id);", "@Projection(name = \"studentProjection\", types = Student.class)\npublic interface StudentProjection {\n String getName();\n\n Long getId();\n}", "@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }", "Product getPProducts();", "@Override\n\tpublic List<Product> getAll() throws SQLException {\n\t\treturn null;\n\t}", "@Select(FIND_ALL)\r\n public List<CProducto> findAll();", "@Override\n\tpublic List<ProductDTO> viewAllProducts() throws ProductException {\n\t\tCollection<Product> products = ProductStore.map.values();\n\t\tList<ProductDTO> list = new ArrayList();\n\n\t\tfor (Product product : products) {\n\t\t\tProductDTO product1 = ProductUtil.convertToProductDto(product);\n\t\t\tlist.add(product1);\n\t\t}\n\n\t\treturn list;\n\t}", "QueryProjection<R> getProjection();", "ProductProperties productProperties();", "public java.util.List<ProductSpecificationMapping> findAll();", "@Select({\n \"select\",\n \"ID, SDATE, STYPE, SMONEY, TOUCHING, ACCOUNT, CHECKSTATUS, DEMO1, DEMO2, DEMO3\",\n \"from PURCHASE\"\n })\n @ConstructorArgs({\n @Arg(column=\"ID\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL, id=true),\n @Arg(column=\"SDATE\", javaType=Date.class, jdbcType=JdbcType.TIMESTAMP),\n @Arg(column=\"STYPE\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"SMONEY\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"TOUCHING\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"ACCOUNT\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"CHECKSTATUS\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"DEMO1\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"DEMO2\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"DEMO3\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL)\n })\n List<Purchase> selectAll();", "@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}", "@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}", "@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}", "ItoProduct selectByPrimaryKey(Integer id);", "private static HashMap<String,String> buildColumnMapCar() {\r\n HashMap<String,String> map = new HashMap<String,String>();\r\n map.put(KEY_POINTS, KEY_POINTS);\r\n\r\n map.put(BaseColumns._ID, \"rowid AS \" +\r\n BaseColumns._ID);\r\n\r\n return map;\r\n }", "@Override\n\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}", "@Projection(name = \"reportProjection\", types = ItemEntity.class)\npublic interface ReportProjection {\n Integer getRecordNumber();\n\n String getFileName();\n\n String getType();\n\n Date getCreatedDate();\n\n String getInstitutionName();\n\n List<ReportDataEntity> getReportDataEntities();\n}", "@Override\r\n\tpublic List<Product> showAll() throws Exception {\n\t\treturn this.dao.showAll();\r\n\t}", "@Override\r\n public List<Product> findAll() {\r\n return productRepository.findAll();\r\n }", "public Object getProjection() {\n return getValue(PROP_PROJECTION);\n }", "public String getProjection() {\n return projection;\n }", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<Product> getProductFindAll() {\n return em.createNamedQuery(\"Product.findAll\", Product.class).getResultList();\n }", "public Product() { \n initComponents();\n table();\n \n }", "@Override\n public Map<String, String> createFieldToPropertyMapping() {\n final Map<String, String> mapping = super.createFieldToPropertyMapping();\n mapping.put(this.tableName + \".rsres_id\", \"id\");\n mapping.put(this.tableName + \".resource_id\", \"resourceId\");\n mapping.put(this.tableName + \".quantity\", QUANTITY);\n mapping.put(this.tableName + \".cost_rsres\", \"cost\");\n\n return mapping;\n }", "@Override\r\n\tpublic List<Product> getallProducts() {\n\t\treturn dao.getallProducts();\r\n\t}", "public void showAllProducts() {\n try {\n System.out.println(Constants.DECOR+\"ALL PRODUCTS IN STORE\"+Constants.DECOR_END);\n List<Product> products = productService.getProducts();\n System.out.println(Constants.PRODUCT_HEADER);\n for (Product product : products) { \n System.out.println((product.getName()).concat(\"\\t\\t\").concat(product.getDescription()).concat(\"\\t\\t\")\n .concat(String.valueOf(product.getId()))\n .concat(\"\\t\\t\").concat(product.getSKU()).concat(\"\\t\").concat(String.valueOf(product.getPrice()))\n .concat(\"\\t\").concat(String.valueOf(product.getMaxPrice())).concat(\"\\t\")\n .concat(String.valueOf(product.getStatus()))\n .concat(\"\\t\").concat(product.getCreated()).concat(\"\\t\\t\").concat(product.getModified())\n .concat(\"\\t\\t\").concat(String.valueOf(product.getUser().getUserId())));\n }\n } catch (ProductException ex) {\n System.out.println(ex);\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}", "private static void getAttributes(productCategory product) {\n PreparedStatement stmt = null;\n ResultSet myRst = null;\n\n try {\n //we can use DESCRIBE query if we hard code the tale name.\n //swap the parameterized statement for a normal statement\n //object since we will not take dynamic input\n\n //String pstmt = \"DESCRIBE ?;\";\n\n String pstmt = \"SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ?\";\n\n stmt = DBConnectionManager.con.prepareStatement(pstmt);\n stmt.setString(1, product.categoryName.getValue());\n myRst = stmt.executeQuery();\n\n while (myRst.next()) {\n product.attributes.add(myRst.getString(4));\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n try {\n if (myRst != null) myRst.close();\n } catch (Exception ignored) {\n }\n try {\n if (stmt != null) stmt.close();\n } catch (Exception ignored) {\n }\n }\n\n }", "public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}", "@Projection(name = \"experiencetaskinfo\", types = {ExperienceTask.class})\npublic interface ExperienceTaskProjection {\n\n int getId();\n\n String getName();\n\n int getExperience();\n\n String getDescription();\n\n int getLimitPeriod();\n\n int getLimitTimes();\n}", "@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}", "TbProductAttributes selectByPrimaryKeySelective(@Param(\"productAttributesId\") Integer productAttributesId, @Param(\"selective\") TbProductAttributes.Column ... selective);", "List<Product> getAllProducts() throws PersistenceException;", "public ArrayList<Product> viewAllProduct() throws ProductException{\r\n\t\t\tArrayList<Product> products=new ArrayList<Product>();\r\n\t\t\tif(ProductRepository.productsList.isEmpty()) {\r\n\t\t\t\tthrow new ProductException(\"there are no products in the store\");\r\n\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\r\n\t\t\tproducts.addAll(pDoa.viewProductsDoa());\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn products;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "public List<Product> getAll() {\n\t\treturn productRepository.findAll();\n\n\t}", "@Projection(name=\"summary\", types = TvSeriesSummary.class)\npublic interface TvSeriesSummaryProjection {\n Date getLastUpdateDate();\n}", "@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}", "public void setProjection(String projection) {\n this.projection = projection;\n }", "public List<Product> getAll() {\n List<Product> list = new ArrayList<>();\n String selectQuery = \"SELECT * FROM \" + PRODUCT_TABLE;\n SQLiteDatabase database = this.getReadableDatabase();\n try (Cursor cursor = database.rawQuery(selectQuery, null)) {\n if (cursor.moveToFirst()) {\n do {\n int id = cursor.getInt(0);\n String name = cursor.getString(1);\n String url = cursor.getString(2);\n double current = cursor.getDouble(3);\n double change = cursor.getDouble(4);\n String date = cursor.getString(5);\n double initial = cursor.getDouble(6);\n Product item = new Product(name, url, current, change, date, initial, id);\n list.add(item);\n }\n while (cursor.moveToNext());\n }\n }\n return list;\n }", "@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\n\tpublic ProductBean view(String pname) {\n\t\treturn session.selectOne(namespace+\".view\", pname);\n\t}", "public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}", "private boolean includePrimaryKeyColumns() {\n\t\treturn false;\r\n\t}", "@Mapper\npublic interface ProductMapper {\n\n @Select(\"select * from t_product\")\n List<Product> findAll();\n\n void save(String productName, Integer productInventory);\n\n void save(Product product);\n}", "@Select({\n \"select\",\n \"ID, SDATE, STYPE, SMONEY, TOUCHING, ACCOUNT, CHECKSTATUS, DEMO1, DEMO2, DEMO3\",\n \"from PURCHASE\",\n \"where ID = #{id,jdbcType=DECIMAL}\"\n })\n @ConstructorArgs({\n @Arg(column=\"ID\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL, id=true),\n @Arg(column=\"SDATE\", javaType=Date.class, jdbcType=JdbcType.TIMESTAMP),\n @Arg(column=\"STYPE\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"SMONEY\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"TOUCHING\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"ACCOUNT\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"CHECKSTATUS\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"DEMO1\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),\n @Arg(column=\"DEMO2\", javaType=String.class, jdbcType=JdbcType.VARCHAR),\n @Arg(column=\"DEMO3\", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL)\n })\n Purchase selectByPrimaryKey(BigDecimal id);", "public String getDatabaseProduct();", "public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "@Override\n public List<FecetProrrogaOrden> findAll() {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper());\n\n }", "public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}", "protected SqlExpression getFieldsSqlExpression() {\n\t\tSqlCollectionExpression fields = new SqlCollectionExpression();\n\t\t\n\t\tCollection variables = new HashSet(this.variableToDatabaseMapping.values());\t\t\n\t\tIterator i = variables.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tfields.add(new SqlStringExpression((String) i.next()));\n\t\t}\n\t\treturn fields;\n\t}", "@Override\n\tpublic List<ProductDto> getAllActiveProducts() throws Exception {\n\t\tList<ProductDto> productDtoList = new ArrayList<ProductDto>();\n\t\tList<Product> productList = (List<Product>) this.getHibernateTemplate()\n\t\t\t\t.findByNamedQuery(\"Product.getAllActiveProducts\");\n\t\tfor(Product product: productList){\n\t\t\tProductDto productDto = new ProductDto();\n\t\t\tCommonUtils.copyProperties(productDto, product);\n\t\t\tproductDtoList.add(productDto);\n\t\t}\n\t\tCollections.sort(productDtoList,ProductDto.productNameComparator);\n\t\treturn productDtoList;\n\t}", "public ShowProductListLimited() {\n initComponents();\n List<Product> products = WinkelApplication.getQueryManager().getProductList();\n DefaultTableModel model = (DefaultTableModel) this.jTable1.getModel();\n for (Product product : products) {\n model.addRow(new Object[]{new Integer(product.getProductId()),\n product.getCategorieId(),\n product.getName(),\n product.getPrice(),\n product.getDescription()});\n }\n }", "public List<Product> findAll();", "public Coordinates projection() {\n return projection;\n }", "@Projection(name = \"inlineParameterData\", types = Parameter.class)\n@SuppressWarnings(\"unused\")\npublic interface InlineParameterData extends InlineAliasesProjection {\n Long getId();\n\n String getNomenclature();\n\n @Value(\"#{target.aliases.![nomenclature]}\")\n Set<String> getAliases();\n\n String getCas();\n\n @Value(\"#{target.type.nomenclature}\")\n String getType();\n}", "List<RcProdCatSkuProp> select(RcProdCatSkuProp record);", "List<TbProductAttributes> selectByExample(TbProductAttributesExample example);", "@Override\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }", "public static void projections(){\r\n\t\tSession session = factory.openSession();\r\n\t\tTransaction tx = null; \r\n\t\ttry{ \r\n\t\t\ttx = session.beginTransaction();\r\n\t\t\tCriteria cr = session.createCriteria(Employees.class);\r\n\t\t\t// To get total row count. \r\n//\t\t\tcr.setProjection(Projections.rowCount()); \r\n\t\t\t// To get average of a property. \r\n//\t\t\tcr.setProjection(Projections.avg(\"salary\")); \r\n//\t\t\t// To get distinct count of a property. \r\n//\t\t\tcr.setProjection(Projections.countDistinct(\"firstName\")); \r\n//\t\t\t// To get maximum of a property. \r\n//\t\t\tcr.setProjection(Projections.max(\"salary\")); \r\n//\t\t\t// To get minimum of a property. \r\n//\t\t\tcr.setProjection(Projections.min(\"salary\")); \r\n//\t\t\t// To get sum of a property. \r\n//\t\t\tcr.setProjection(Projections.sum(\"salary\"));\r\n\t\t\t\r\n//\t\t\tselect department_id, count(*),max(salary) as salary from employees group by DEPARTMENT_ID order by salary desc\r\n\t\t\tList rows = cr.setProjection(Projections.projectionList()\r\n\t\t\t\t\t//.add(Projections.property(\"departmentId\"))\r\n\t\t\t\t\t.add(Projections.rowCount(),\"count\")\r\n\t\t\t\t\t.add(Projections.max(\"salary\"),\"salary\")\r\n\t\t\t\t\t.add(Projections.groupProperty(\"departmentId\"),\"departmentId\"))\r\n\t\t\t\t.addOrder(Order.desc(\"salary\")).list();\r\n\t\t\t\r\n\t\t\tfor (Iterator iterator = rows.iterator(); iterator.hasNext();){ \r\n\t\t\t\tObject[] employee = (Object[]) iterator.next(); \r\n\t\t\t\tSystem.out.println(employee[0] +\" \" + employee[1] + \" \"+ employee[2]); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\trows = cr.list();\r\n\t\t\tSystem.out.println(\"Total Count: \" + rows.get(0));\r\n\t\t\tSystem.out.println(\"Rows : \" + rows);\r\n\t\t\t\r\n\t\t\ttx.commit();\r\n\t\t}catch(HibernateException exp){\r\n\t\t\texp.printStackTrace();\r\n\t\t}\r\n\t}", "public List<Product> getFullProductList(){\n\t\t/*\n\t\t * La lista dei prodotti da restituire.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\t\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella PRODOTTO.\n\t\t */\n\t\tStatement productStm = null;\n\t\tResultSet productRs = null;\n\t\t\n\t\ttry{\n\t\t\tproductStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM PRODOTTO;\";\n\t\t\tproductRs = productStm.executeQuery(sql);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tproductList = this.getProductListFromRs(productRs);\n\t\t\tproductStm.close(); // Chiude anche il ResultSet productRs\n\t\t\tConnector.releaseConnection(connection);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"ResultSet issue 2: failed to retrive data from ResultSet.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\treturn productList;\n\t}", "@GetMapping(\"/view-all\")\r\n\tpublic List<ProductDetails> viewAllProducts() {\r\n\r\n\t\treturn productUtil.toProductDetailsList(productService.viewAllProducts());\r\n\t}", "@NonNull\n public List<Product> findAll() {\n return productRepository.findAll();\n }", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "Product selectByPrimaryKey(Long id);", "private List<Product> extractProducts() {\r\n\t\t//load products from hidden fields\r\n\t\tif (this.getListProduct() != null){\r\n\t\t\tfor(String p : this.getListProduct()){\r\n\t\t\t\tProduct product = new Product();\r\n\t\t\t\tproduct.setId(Long.valueOf(p));\r\n\t\t\t\tthis.products.add(product);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.products;\r\n\t}", "public void testProductAttributeQuery() {\n\n String\tsql\t= \"SELECT p.M_Product_ID, p.Discontinued, p.Value, p.Name, BOM_Qty_Available(p.M_Product_ID,?) AS QtyAvailable, bomQtyList(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceList, bomQtyStd(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceStd, BOM_Qty_OnHand(p.M_Product_ID,?) AS QtyOnHand, BOM_Qty_Reserved(p.M_Product_ID,?) AS QtyReserved, BOM_Qty_Ordered(p.M_Product_ID,?) AS QtyOrdered, bomQtyStd(p.M_Product_ID, pr.M_PriceList_Version_ID)-bomQtyLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS Margin, bomQtyLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceLimit, pa.IsInstanceAttribute FROM M_Product p INNER JOIN M_ProductPrice pr ON (p.M_Product_ID=pr.M_Product_ID) LEFT OUTER JOIN M_AttributeSet pa ON (p.M_AttributeSet_ID=pa.M_AttributeSet_ID) WHERE p.IsSummary='N' AND p.IsActive='Y' AND pr.IsActive='Y' AND pr.M_PriceList_Version_ID=? AND p.M_AttributeSetInstance_ID IN (SELECT M_AttributeSetInstance_ID FROM M_AttributeInstance WHERE (M_Attribute_ID=100 AND M_AttributeValue_ID=101)) ORDER BY QtyAvailable DESC, Margin DESC\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[M_AttributeInstance|M_Product=p,M_ProductPrice=pr,M_AttributeSet=pa|1]\", fixture.toString());\n }", "public abstract List<ColumnSpecification> metadata();", "@SqlQuery(\"SELECT attrdetail.project_id, attrdetail.attribute_id,project_attribute.Name, attrdetail.sub_attribute_name, attrdetail.sub_attribute_value from project_attribute_details as attrdetail INNER JOIN project_attribute on attrdetail.attribute_id=project_attribute.id AND attrdetail.project_id= :Project_ID;\")\n\t@Mapper(ProjectMapper.class)\n\tList<ProjectDetails> getProjectDetails(@Bind(\"Project_ID\")long projectKey);", "List<Product> findAll();", "List<Product> findAll();", "private TableModel getTableModelProduto() {\n\t\tString[] columnNames = { \"cod_p\", \"cod_barra\", \"categoria\", \"descricao\", \"unidade\", \"custo\", \"marge_lucro\" };\n\n\t\tObject[][] data = new Object[listaP.size()][7];\n\t\tfor (int i = 0; i < listaP.size(); i++) {\n\t\t\tint j = 0;\n\t\t\tdata[i][j++] = Long.valueOf(listaP.get(i).getCod());\n\t\t\tdata[i][j++] = listaP.get(i).getCodBarra();\n\t\t\tdata[i][j++] = listaP.get(i).getCategoria();\n\t\t\tdata[i][j++] = listaP.get(i).getDescricao();\n\t\t\tdata[i][j++] = listaP.get(i).getUnidade();\n\t\t\tdata[i][j++] = listaP.get(i).getCusto();\n\t\t\tdata[i][j++] = listaP.get(i).getMargenLucro();\n\t\t}\n\t\treturn new DefaultTableModel(data, columnNames);\n\t}", "Iterator<Column> nonPrimaryKeyBaseColumns();", "public List<Products> getProductsDetails() {\n\t\treturn productsRepo.findAll();\n\t}", "public void testProductInstanceAttributeQuery() {\n\n String\tsql\t= \"SELECT p.M_Product_ID, p.Discontinued, p.Value, p.Name, BOM_Qty_Available(p.M_Product_ID,?) AS QtyAvailable, bomQtyList(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceList, bomQtyStd(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceStd, BOM_Qty_OnHand(p.M_Product_ID,?) AS QtyOnHand, BOM_Qty_Reserved(p.M_Product_ID,?) AS QtyReserved, BOM_Qty_Ordered(p.M_Product_ID,?) AS QtyOrdered, bomQtyStd(p.M_Product_ID, pr.M_PriceList_Version_ID)-bomQtyLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS Margin, bomQtyLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceLimit, pa.IsInstanceAttribute FROM M_Product p INNER JOIN M_ProductPrice pr ON (p.M_Product_ID=pr.M_Product_ID) LEFT OUTER JOIN M_AttributeSet pa ON (p.M_AttributeSet_ID=pa.M_AttributeSet_ID) WHERE p.IsSummary='N' AND p.IsActive='Y' AND pr.IsActive='Y' AND pr.M_PriceList_Version_ID=? AND EXISTS (SELECT * FROM M_Storage s INNER JOIN M_AttributeSetInstance asi ON (s.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) WHERE s.M_Product_ID=p.M_Product_ID AND asi.SerNo LIKE '33' AND asi.Lot LIKE '33' AND asi.M_Lot_ID=101 AND TRUNC(asi.GuaranteeDate)<TO_DATE('2003-10-16','YYYY-MM-DD') AND asi.M_AttributeSetInstance_ID IN (SELECT M_AttributeSetInstance_ID FROM M_AttributeInstance WHERE (M_Attribute_ID=103 AND Value LIKE '33') AND (M_Attribute_ID=102 AND M_AttributeValue_ID=106))) AND p.M_AttributeSetInstance_ID IN (SELECT M_AttributeSetInstance_ID FROM M_AttributeInstance WHERE (M_Attribute_ID=101 AND M_AttributeValue_ID=105) AND (M_Attribute_ID=100 AND M_AttributeValue_ID=102)) AND p.AD_Client_ID IN(0,11) AND p.AD_Org_ID IN(0,11,12) ORDER BY QtyAvailable DESC, Margin DESC\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[M_AttributeInstance|M_Storage=s,M_AttributeSetInstance=asi|M_AttributeInstance|M_Product=p,M_ProductPrice=pr,M_AttributeSet=pa|3]\", fixture.toString());\n }", "public List<Product> readAll() {\n\t\treturn null;\n\t}", "@Override\n protected final Map<String, String> createFieldToPropertyMapping() {\n // get super class mapping\n final Map<String, String> mapping = super.createFieldToPropertyMapping();\n \n mapping.put(this.tableName + \".rmres_id\", \"id\");\n mapping.put(this.tableName + \".cost_rmres\", \"cost\");\n mapping.put(this.tableName + \".config_id\", \"configId\");\n mapping.put(this.tableName + \".rm_arrange_type_id\", \"arrangeTypeId\");\n mapping.put(this.tableName + \".guests_external\", \"externalGuests\");\n mapping.put(this.tableName + \".guests_internal\", \"internalGuests\");\n \n return mapping;\n }", "Product selectByPrimaryKey(Integer id);", "@Override\r\n\tpublic List<ProductDAO> list() {\n\t\treturn null;\r\n\t}", "public PcProductpropertyExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "private void init() {\n dao = new ProductDAO();\n model = new DefaultTableModel();\n \n try {\n showAll();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n \n }", "public interface RegionColumns extends ExtendedColumns {\n\n String NAME = \"name\";\n String COUNTRY_ID = \"country_id\";\n}", "@Override\r\n\tpublic HashMap<String, Object> selectProductById(String productId) {\n\t\tHashMap<String, Object> map = new HashMap<>();\r\n\t\tmap.put(\"product\", dao.selectProductById(productId));\r\n\t\tmap.put(\"optionList\", dao.selectOptionById(productId));\r\n\t\treturn map;\r\n\t}" ]
[ "0.65377563", "0.6403727", "0.63849664", "0.61936885", "0.6189415", "0.6141305", "0.6063587", "0.60475737", "0.6046991", "0.5981325", "0.5955626", "0.59126407", "0.588205", "0.588194", "0.5857915", "0.58164096", "0.58086693", "0.57724285", "0.57702214", "0.57478046", "0.5743061", "0.57273495", "0.570781", "0.57005996", "0.56974834", "0.5697196", "0.5674312", "0.5674312", "0.5672149", "0.5662245", "0.5627741", "0.56251866", "0.55854625", "0.5577024", "0.5573899", "0.55704814", "0.55433035", "0.5518808", "0.549947", "0.5470414", "0.5460164", "0.5458861", "0.5449757", "0.5445373", "0.5438576", "0.54324186", "0.5424514", "0.5423826", "0.5418822", "0.5417092", "0.54107463", "0.54073507", "0.54059446", "0.54007703", "0.5394667", "0.5392185", "0.53820354", "0.5380135", "0.53737134", "0.53723407", "0.53650564", "0.5332191", "0.5330176", "0.5330176", "0.5330176", "0.5326354", "0.5324817", "0.53230417", "0.5315627", "0.53094304", "0.53047323", "0.52975076", "0.5290922", "0.52772886", "0.5276628", "0.5276485", "0.5270975", "0.52697295", "0.52597517", "0.5258475", "0.52564824", "0.525584", "0.5252615", "0.52516913", "0.5251046", "0.52501786", "0.52474767", "0.52370924", "0.52370924", "0.5236017", "0.5232832", "0.5215216", "0.52140146", "0.5209309", "0.5208288", "0.5202701", "0.52025974", "0.51968664", "0.5195084", "0.5194007", "0.5189684" ]
0.0
-1
Bail early if the cursor is null or there is less than 1 row in the cursor
@Override public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) { if (cursor == null || cursor.getCount() < 1) { return; } // Proceed with moving to the first row of the cursor and reading data from it // (This should be the only row in the cursor) if (cursor.moveToFirst()) { // Find the columns of pet attributes that we're interested in int nameColumnIndex = cursor.getColumnIndex(productEntry.COLUMN_product_NAME); int infoColumnIndex = cursor.getColumnIndex(ProductContract.productEntry.COLUMN_Product_description); int priceColumnIndex = cursor.getColumnIndex(productEntry.COLUMN_product_price); int quantityColumnIndex = cursor.getColumnIndex(ProductContract.productEntry.COLUMN_product_Quantity); int imageColumnIndex = cursor.getColumnIndex(ProductContract.productEntry.COLUMN_product_image); // Extract out the value from the Cursor for the given column index String name = cursor.getString(nameColumnIndex); String info = cursor.getString(infoColumnIndex); int price = cursor.getInt(priceColumnIndex); int quantity = cursor.getInt(quantityColumnIndex); String imageURI = cursor.getString(imageColumnIndex); // Update the views on the screen with the values from the database mNameEditText.setText(name); mDescriptionEditText.setText(info); mPriceEditText.setText(Integer.toString(price)); mQuantityEditText.setText(Integer.toString(quantity)); if (imageURI != null) { mImageView.setImageURI(Uri.parse(imageURI)); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isBeforeFirst() throws SQLException {\n/* 151 */ return (this.currentPositionInEntireResult < 0);\n/* */ }", "public boolean isFirst() throws SQLException {\n/* 208 */ return (this.currentPositionInEntireResult == 0);\n/* */ }", "@Override\n public boolean isEmpty() {\n return mCursor == null || mCursor.getCount() < 1;\n }", "private boolean isCursorValid(Cursor cursor) {\n if (cursor.isClosed() || cursor.isBeforeFirst() || cursor.isAfterLast()) {\n return false;\n }\n return true;\n }", "public boolean isFirst() throws SQLException {\n\n try {\n debugCodeCall(\"isFirst\");\n checkClosed();\n int row = result.getRowId();\n return row == 0 && row < result.getRowCount();\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "R getFirstRowOrThrow();", "@Override\n public boolean isCurrent() { return cursor != null; }", "private String getFirstEntryOfResultSet(Cursor cursor) {\n\n\t\t//\n\t\t// are there any data\n\t\t//\n\t\tif (!cursor.moveToFirst())\n\t\t\treturn null;\n\n\t\t//\n\t\t// get first string\n\t\t//\n\t\tString result = cursor.getString(0);\n\n\t\t//\n\t\t// are there more entries\n\t\t//\n\t\tif (cursor.moveToNext()) {\n\t\t\t//\n\t\t\t// BUG: duplicate entries\n\t\t\t//\n\t\t\tLogger.e(\"Duplicate entries found: \");\n\t\t\tStackTraceElement[] elements = Thread.currentThread()\n\t\t\t\t\t.getStackTrace();\n\t\t\tfor (StackTraceElement element : elements)\n\t\t\t\tLogger.e(\" at \" + element.getClassName() + \".\"\n\t\t\t\t\t\t+ element.getMethodName() + \"(\" + element.getFileName()\n\t\t\t\t\t\t+ \":\" + element.getLineNumber() + \")\");\n\t\t}\n\n\t\t//\n\t\t// done\n\t\t//\n\t\treturn result;\n\t}", "private void verifyCursorPosition(long expectedCurrentRow) throws SQLException {\n\t\tif (verifyCursorPosition) {\n\t\t\tif (expectedCurrentRow != this.rs.getRow()) {\n\t\t\t\tthrow new InvalidDataAccessResourceUsageException(\"Unexpected cursor position change.\");\n\t\t\t}\n\t\t}\n\t}", "private void resetCursorToMaxBufferedRowsPlus1() {\n if (cursorPosition > rows.size() + 1) {\n cursorPosition = rows.size() + 1;\n }\n }", "@Override\n public boolean isOpen() {\n return rows != null;\n }", "protected void checkScrollability() throws HibernateException {\n \t\t// Allows various loaders (ok mainly the QueryLoader :) to check\n \t\t// whether scrolling of their result set should be allowed.\n \t\t//\n \t\t// By default it is allowed.\n \t\treturn;\n \t}", "public int maDBCursorNext(int cursorHandle)\n \t{\n \t\tif (!hasCursor(cursorHandle))\n \t\t{\n \t\t\treturn MA_DB_ERROR;\n \t\t}\n \n \t\ttry\n \t\t{\n \t\t\tif (getCursor(cursorHandle).next())\n \t\t\t{\n \t\t\t\treturn MA_DB_OK;\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\treturn MA_DB_NO_ROW;\n \t\t\t}\n \t\t}\n \t\tcatch (SQLiteException ex)\n \t\t{\n \t\t\tlogStackTrace(ex);\n \t\t\treturn MA_DB_ERROR;\n \t\t}\n \t}", "public boolean isBeforeFirst() throws SQLException {\n\n try {\n debugCodeCall(\"isBeforeFirst\");\n checkClosed();\n return result.getRowId() < 0;\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public boolean first() throws SQLException {\n\n try {\n debugCodeCall(\"first\");\n checkClosed();\n if (result.getRowId() < 0) { return nextRow(); }\n resetResult();\n return nextRow();\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public void beforeFirst() throws SQLException {\n\n try {\n debugCodeCall(\"beforeFirst\");\n checkClosed();\n if (result.getRowId() >= 0) {\n resetResult();\n }\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "@Nullable\n\tprotected abstract T readCursor(ResultSet rs, int currentRow) throws SQLException;", "protected void handleNoRowFound()\r\n/* 37: */ throws DataAccessException\r\n/* 38: */ {\r\n/* 39: 92 */ throw new EmptyResultDataAccessException(\r\n/* 40: 93 */ \"LobStreamingResultSetExtractor did not find row in database\", 1);\r\n/* 41: */ }", "private void moveCursorToRow(int row) {\n\t\ttry {\n\t\t\tint count = 0;\n\t\t\twhile (row != count && rs.next()) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException se) {\n\t\t\tthrow getExceptionTranslator().translate(\"Attempted to move ResultSet to last committed row\", getSql(), se);\n\t\t}\n\t}", "private boolean isEmptyAndLoading(Cursor cursor) {\n return (cursor.getCount() == 0)\n && mRefreshManager.isMessageListRefreshing(mMailbox.mId);\n }", "private boolean checkCurrentIterator(Iterator<Integer> iter) {\n return iter != null;\n }", "DBCursor execute();", "protected void checkRow(int row) {\n\tif (row < 0 || row >= rows) throw new IndexOutOfBoundsException(\"Attempted to access \"+toStringShort()+\" at row=\"+row);\n}", "@Override\n public int getCount() {\n return mCursor == null ? 0: mCursor.getCount();\n }", "public boolean hasNext()\r\n {\r\n return cursor != null;\r\n }", "public boolean hasRemaining() {\r\n\t\treturn cursor < limit - 1;\r\n\t}", "@Override\n public boolean getMoreResults() throws SQLException {\n\n return (result != null);\n\n }", "public boolean isEmpty() {\r\n return lastCursor - firstCursor == 1;\r\n }", "private void advance(final ResultSet rs, final RowSelection selection)\n \t\t\tthrows SQLException {\n \n-\t\tfinal int firstRow = getFirstRow( selection );\n+\t\tfinal int firstRow = LimitHelper.getFirstRow( selection );\n \t\tif ( firstRow != 0 ) {\n \t\t\tif ( getFactory().getSettings().isScrollableResultSetsEnabled() ) {\n \t\t\t\t// we can go straight to the first required row\n \t\t\t\trs.absolute( firstRow );\n \t\t\t}\n \t\t\telse {\n \t\t\t\t// we need to step through the rows one row at a time (slow)\n \t\t\t\tfor ( int m = 0; m < firstRow; m++ ) rs.next();\n \t\t\t}\n \t\t}\n \t}", "private boolean checkScanFinished() {\n\t\treturn trimToEmpty(getCursor().getCursor()).equalsIgnoreCase(\"0\");\n\t}", "public Cursor getCursorWithRowsAsNull() {\n Cursor cursor = new SimpleCursor(Query.QueryResult.newBuilder()\n .addFields(Query.Field.newBuilder().setName(\"col1\").setType(Query.Type.INT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col2\").setType(Query.Type.UINT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col3\").setType(Query.Type.INT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col4\").setType(Query.Type.UINT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col5\").setType(Query.Type.INT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col6\").setType(Query.Type.UINT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col7\").setType(Query.Type.INT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col8\").setType(Query.Type.UINT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col9\").setType(Query.Type.INT64).build())\n .addFields(Query.Field.newBuilder().setName(\"col10\").setType(Query.Type.UINT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col11\").setType(Query.Type.FLOAT32).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col12\").setType(Query.Type.FLOAT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col13\").setType(Query.Type.TIMESTAMP).build())\n .addFields(Query.Field.newBuilder().setName(\"col14\").setType(Query.Type.DATE).build())\n .addFields(Query.Field.newBuilder().setName(\"col15\").setType(Query.Type.TIME).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col16\").setType(Query.Type.DATETIME).build())\n .addFields(Query.Field.newBuilder().setName(\"col17\").setType(Query.Type.YEAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col18\").setType(Query.Type.DECIMAL).build())\n .addFields(Query.Field.newBuilder().setName(\"col19\").setType(Query.Type.TEXT).build())\n .addFields(Query.Field.newBuilder().setName(\"col20\").setType(Query.Type.BLOB).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col21\").setType(Query.Type.VARCHAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col22\").setType(Query.Type.VARBINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col23\").setType(Query.Type.CHAR).build())\n .addFields(Query.Field.newBuilder().setName(\"col24\").setType(Query.Type.BINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col25\").setType(Query.Type.BIT).build())\n .addFields(Query.Field.newBuilder().setName(\"col26\").setType(Query.Type.ENUM).build())\n .addFields(Query.Field.newBuilder().setName(\"col27\").setType(Query.Type.SET).build())\n .addRows(Query.Row.newBuilder().addLengths(\"-50\".length()).addLengths(\"50\".length())\n .addLengths(\"-23000\".length()).addLengths(\"23000\".length())\n .addLengths(\"-100\".length()).addLengths(\"100\".length()).addLengths(\"-100\".length())\n .addLengths(\"100\".length()).addLengths(\"-1000\".length()).addLengths(\"1000\".length())\n .addLengths(\"24.52\".length()).addLengths(\"100.43\".length())\n .addLengths(\"2016-02-06 14:15:16\".length()).addLengths(\"2016-02-06\".length())\n .addLengths(\"12:34:56\".length()).addLengths(\"2016-02-06 14:15:16\".length())\n .addLengths(\"2016\".length()).addLengths(\"1234.56789\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"N\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"1\".length()).addLengths(\"val123\".length()).addLengths(-1).setValues(\n ByteString.copyFromUtf8(\n \"-5050-2300023000-100100-100100-1000100024.52100.432016-02-06 \" +\n \"14:15:162016-02-0612:34:562016-02-06 14:15:1620161234.56789HELLO TDS TEAMHELLO TDS \"\n +\n \"TEAMHELLO TDS TEAMHELLO TDS TEAMNHELLO TDS TEAM1val123\"))).build());\n return cursor;\n }", "public static void m1040a(Cursor cursor) {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }", "public void beforeFirst() throws TuplesException {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Resetting \" + getRowCount() + \" rows of \" +\n tuples.getClass() + \" with columns \" +\n Arrays.asList(tuples.getVariables()));\n }\n \n tuples.beforeFirst();\n beforeEnd = true;\n }", "protected void handleMultipleRowsFound()\r\n/* 44: */ throws DataAccessException\r\n/* 45: */ {\r\n/* 46:103 */ throw new IncorrectResultSizeDataAccessException(\r\n/* 47:104 */ \"LobStreamingResultSetExtractor found multiple rows in database\", 1);\r\n/* 48: */ }", "private boolean shouldExecuteDbFirst() throws ServiceException {\n DbSearchConstraints.Leaf top = getTopLeafConstraint();\n if (top.convId > 0 || !top.itemIds.isEmpty()) {\n return true;\n }\n\n if (luceneOp != null && luceneOp.shouldExecuteDbFirst()) {\n return true;\n }\n\n return constraints.tryDbFirst(context.getMailbox());\n }", "public ResultSetRow next() throws SQLException {\n/* 338 */ if (this.fetchedRows == null && this.currentPositionInEntireResult != -1) {\n/* 339 */ throw SQLError.createSQLException(Messages.getString(\"ResultSet.Operation_not_allowed_after_ResultSet_closed_144\"), \"S1000\", this.mysql.getExceptionInterceptor());\n/* */ }\n/* */ \n/* */ \n/* 343 */ if (!hasNext()) {\n/* 344 */ return null;\n/* */ }\n/* */ \n/* 347 */ this.currentPositionInEntireResult++;\n/* 348 */ this.currentPositionInFetchedRows++;\n/* */ \n/* */ \n/* 351 */ if (this.fetchedRows != null && this.fetchedRows.size() == 0) {\n/* 352 */ return null;\n/* */ }\n/* */ \n/* 355 */ if (this.fetchedRows == null || this.currentPositionInFetchedRows > this.fetchedRows.size() - 1) {\n/* 356 */ fetchMoreRows();\n/* 357 */ this.currentPositionInFetchedRows = 0;\n/* */ } \n/* */ \n/* 360 */ ResultSetRow row = this.fetchedRows.get(this.currentPositionInFetchedRows);\n/* */ \n/* 362 */ row.setMetadata(this.metadata);\n/* */ \n/* 364 */ return row;\n/* */ }", "private synchronized void assertCursorIsOpen() {\n\t\tif (isReady() || isFinished()) {\n\t\t\tthrow new RuntimeException(\"Cannot access closed cursor. Did you forget to call open()?\");\n\t\t}\n\t}", "R getOneRowOrThrow();", "public boolean hasNext() throws SQLException {\n/* 285 */ if (this.fetchedRows != null && this.fetchedRows.size() == 0) {\n/* 286 */ return false;\n/* */ }\n/* */ \n/* 289 */ if (this.owner != null && this.owner.owningStatement != null) {\n/* 290 */ int maxRows = this.owner.owningStatement.maxRows;\n/* */ \n/* 292 */ if (maxRows != -1 && this.currentPositionInEntireResult + 1 > maxRows) {\n/* 293 */ return false;\n/* */ }\n/* */ } \n/* */ \n/* 297 */ if (this.currentPositionInEntireResult != -1) {\n/* */ \n/* 299 */ if (this.currentPositionInFetchedRows < this.fetchedRows.size() - 1)\n/* 300 */ return true; \n/* 301 */ if (this.currentPositionInFetchedRows == this.fetchedRows.size() && this.lastRowFetched) {\n/* 302 */ return false;\n/* */ }\n/* */ \n/* 305 */ fetchMoreRows();\n/* */ \n/* 307 */ return (this.fetchedRows.size() > 0);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 313 */ fetchMoreRows();\n/* */ \n/* 315 */ return (this.fetchedRows.size() > 0);\n/* */ }", "@Test\n public void testSelectSpecificRowThatDoesNotExist() throws SQLException {\n // Arrange\n CommitStructure commit = getSampleCommit();\n String commitID = commit.getCommitID() + \"A\";\n // Act\n mysqlDatabase.insertCommitToDatabase(commit);\n CommitStructure commits = mysqlDatabase.selectSpecificRow(commitID);\n // Assert\n assertNull(commits);\n }", "@Test(timeout = 4000)\n public void test033() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.currentLine((ResultSet) 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.DBUtil\", e);\n }\n }", "public boolean isBeforeFirst() throws SQLException\n {\n return m_rs.isBeforeFirst();\n }", "public boolean queryAfterZeroResults() {\n/* 264 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private SimpleHashtable.TableEntry<K, V> findNextNonNullTableRowEntry() {\r\n\t\t\tcurrentRow++;\r\n\r\n\t\t\twhile (currentRow < table.length) {\r\n\t\t\t\tif (table[currentRow] != null) {\r\n\t\t\t\t\treturn table[currentRow];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcurrentRow++;\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t}", "public int getCurrentRowNumber() throws SQLException {\n/* 174 */ return this.currentPositionInEntireResult + 1;\n/* */ }", "private void checkClosedResultSet() {\n if(closed) {\n throw new IllegalStateException(\"Resultset is already closed\");\n }\n }", "int index(){\n\n\t\t\n\t\tif (cursor == null) \n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\treturn index;\n\t}", "public int getCursor() { return curs; }", "public abstract long getCursor();", "@Override\n\t\tpublic boolean hasMoreElements() {\n\t\t\treturn cursor != size();\n\t\t}", "private void printCursor(Cursor cursor)\n {\n \tif(cursor == null) return;\n \tif(cursor.getCount() == 0) return;\n \t\n \tcursor.moveToFirst();\n \tint index = 1;\n \tint keyIndex = cursor.getColumnIndex(KEY_FIELD);\n\t\tint valueIndex = cursor.getColumnIndex(VALUE_FIELD);\n\n\t\tLog.d(\"window_shopper\",\"row_\"+index+\"::\"+cursor.getString(keyIndex)+\"::\"+cursor.getString(valueIndex));\n\t\tindex++;\n\t\twhile(cursor.moveToNext())\n \t{\n \t\tLog.d(\"window_shopper\",\"row_\"+index+\"::\"+cursor.getString(keyIndex)+\":\"+cursor.getString(valueIndex));\n \t\tindex++;\n \t}\n \tcursor.moveToFirst();\n \tcursor.close();\n \treturn;\n }", "@Test(expected = IllegalStateException.class)\n public void getRowWidthOne() {\n this.reset();\n this.bps.getRowWidth(0);\n }", "public boolean hasMore() {\n if (currentCursor != null && !NULL.equalsIgnoreCase(currentCursor)) {\n return true;\n } else {\n return false;\n }\n }", "@Override\n\tprotected Account obtenerDesdeCursor(Cursor cursor) {\n\t\treturn null;\n\t}", "public boolean hasNext() {\n return cursor < size(); \n }", "public static boolean m29804a(Cursor cursor) {\n if (cursor != null) {\n try {\n cursor.close();\n } catch (Exception unused) {\n return false;\n }\n }\n return true;\n }", "@Override\n public int getCount() {\n return mCursor != null ? mCursor.getCount() : 0;\n }", "@Override\n public boolean callCheck() {\n return last == null;\n }", "private void checkAndThrowReceivedEndqryrm(int lastValidBytePositionBeforeFetch) {\n if (lastValidBytePosition_ > lastValidBytePositionBeforeFetch) {\n return;\n }\n checkAndThrowReceivedEndqryrm();\n }", "private boolean selectContactInRowSet() {\r\n int index = getContactSelection().getMinSelectionIndex();\r\n if (index != -1) {\r\n try {\r\n rowSet.absolute(index+1);\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n }\r\n }\r\n return (index != -1);\r\n }", "public SingleRowCursor(Row row) {\n this.row = row;\n }", "public void beforeFirst() throws SQLException {\n/* 251 */ notSupported();\n/* */ }", "public boolean hasNext() {\n\t\t\treturn cursor != size();\n\t\t}", "@Override\n public int size() {\n int size = 0;\n if (this.cursor == 1) {\n size = 1;\n } else {\n size = this.cursor - 1;\n }\n return size;\n }", "@Override\n\tpublic void onPostExecute(boolean isValidCursor)\n\t{\n\t\t\n\t}", "public void checkIfNoConversations(Cursor cursor)\n\t{\n\t\tif(!cursor.moveToFirst())\n\t\t{\n\t\t\tnoConversations.setVisibility(TextView.VISIBLE);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnoConversations.setVisibility(TextView.GONE);\n\t\t}\n\t}", "static public void validateCursor(ContentValues expectedValues, Cursor valueCursor)\n {\n Set<Map.Entry<String,Object>> valueSet = expectedValues.valueSet();\n\n for(Map.Entry<String, Object> entry : valueSet)\n {\n String columnName = entry.getKey();\n int idx = valueCursor.getColumnIndex(columnName);\n assertFalse( -1 == idx );\n String expectedValue = entry.getValue().toString();\n assertEquals(expectedValue, valueCursor.getString(idx));\n }\n\n }", "public int resultCount(){\n\n int c = 0;\n\n try{\n if(res.last()){\n c = res.getRow();\n res.beforeFirst();\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return c;\n }", "@Override\n public int getItemCount() {\n if (null == mCursor) return 1;\n return mCursor.getCount() + 1;\n }", "private void checkForSplitRowAndComplete(int length, int index) {\n // For singleton select, the complete row always comes back, even if\n // multiple query blocks are required, so there is no need to drive a\n // flowFetch (continue query) request for singleton select.\n //while ((position_ + length) > lastValidBytePosition_) {\n while (dataBuffer_.readableBytes() > lastValidBytePosition_) {\n // Check for ENDQRYRM, throw SQLException if already received one.\n checkAndThrowReceivedEndqryrm();\n\n // Send CNTQRY to complete the row/rowset.\n int lastValidByteBeforeFetch = completeSplitRow(index);\n\n // If lastValidBytePosition_ has not changed, and an ENDQRYRM was\n // received, throw a SQLException for the ENDQRYRM.\n checkAndThrowReceivedEndqryrm(lastValidByteBeforeFetch);\n }\n }", "private void findNextBlock(MatrixIndex cursor) {\n while (isFreeBlock(cursor) || !inBounds(cursor)){\n incrementMatrixIndex(cursor);\n }\n }", "public boolean first() throws SQLException\n {\n return m_rs.first();\n }", "public Cursor fetchCourse(long rowId) throws SQLException\r\n{\r\nCursor mCursor = database.query(true, DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CATEGORY, KEY_COURSENAME, KEY_ASSIGNMENTNAME, KEY_DESCRIPTION, KEY_DUEDATE, KEY_COMPLETED }, null, null, null,\r\nnull, null, null);\r\nif (mCursor != null)\r\n{\r\nmCursor.moveToFirst();\r\n}\r\nreturn mCursor;\r\n}", "public ResultSetRow getAt(int ind) throws SQLException {\n/* 138 */ notSupported();\n/* */ \n/* 140 */ return null;\n/* */ }", "private boolean setNextObject() {\n while (iterator.hasNext()) {\n final int row = iterator.next();\n if (!rowIsDeleted(row)) {\n rowNumber = row;\n nextRowSet = true;\n return true;\n }\n }\n return false;\n }", "public Cursor getCursor()\n {\n// Object localObject1;\n// if (!this.mCursorValid)\n// {\n// this.mCursor = new EsMatrixCursor(PROJECTION);\n// this.mCursorValid = true;\n// if ((this.mLocalProfilesLoaded) && (this.mGaiaIdsAndCirclesLoaded))\n// {\n// localObject1 = new HashSet();\n// HashSet localHashSet = new HashSet();\n// Object localObject3 = this.mLocalProfiles.iterator();\n// while (true)\n// {\n// long l1;\n// if (!((Iterator)localObject3).hasNext())\n// {\n// localObject5 = this.mContacts.iterator();\n// while (true)\n// {\n// if (!((Iterator)localObject5).hasNext())\n// {\n// localObject2 = this.mPublicProfiles.iterator();\n// while (true)\n// {\n// if (!((Iterator)localObject2).hasNext())\n// {\n// localObject3 = this.mPublicProfiles.iterator();\n// while (true)\n// {\n// if (!((Iterator)localObject3).hasNext())\n// {\n// localObject1 = this.mCursor;\n// break;\n// }\n// localObject4 = (PublicProfile)((Iterator)localObject3).next();\n// localObject2 = ((PublicProfile)localObject4).gaiaId;\n// if (((HashSet)localObject1).contains(localObject2))\n// continue;\n// localObject5 = this.mCursor;\n// arrayOfObject = new Object[11];\n// l1 = this.mNextId;\n// this.mNextId = (1L + l1);\n// arrayOfObject[0] = Long.valueOf(l1);\n// arrayOfObject[1] = ((PublicProfile)localObject4).personId;\n// arrayOfObject[2] = null;\n// arrayOfObject[3] = localObject2;\n// arrayOfObject[4] = ((PublicProfile)localObject4).name;\n// arrayOfObject[5] = null;\n// arrayOfObject[6] = null;\n// arrayOfObject[7] = null;\n// arrayOfObject[8] = null;\n// arrayOfObject[9] = null;\n// arrayOfObject[10] = ((PublicProfile)localObject4).snippet;\n// ((EsMatrixCursor)localObject5).addRow(arrayOfObject);\n// }\n// }\n// localObject3 = (PublicProfile)((Iterator)localObject2).next();\n// localObject5 = ((PublicProfile)localObject3).gaiaId;\n// localObject4 = (String)this.mGaiaIdsAndCircles.get(localObject5);\n// if ((((HashSet)localObject1).contains(localObject5)) || (TextUtils.isEmpty((CharSequence)localObject4)))\n// continue;\n// ((HashSet)localObject1).add(localObject5);\n// localObject6 = this.mCursor;\n// Object[] arrayOfObject = new Object[11];\n// l1 = this.mNextId;\n// this.mNextId = (1L + l1);\n// arrayOfObject[0] = Long.valueOf(l1);\n// arrayOfObject[1] = ((PublicProfile)localObject3).personId;\n// arrayOfObject[2] = null;\n// arrayOfObject[3] = localObject5;\n// arrayOfObject[4] = ((PublicProfile)localObject3).name;\n// arrayOfObject[5] = localObject4;\n// arrayOfObject[6] = null;\n// arrayOfObject[7] = null;\n// arrayOfObject[8] = null;\n// arrayOfObject[9] = null;\n// arrayOfObject[10] = null;\n// ((EsMatrixCursor)localObject6).addRow(arrayOfObject);\n// }\n// }\n// localObject3 = (Contact)((Iterator)localObject5).next();\n// if (l1.contains(((Contact)localObject3).name))\n// continue;\n// localObject2 = this.mCursor;\n// localObject4 = new Object[11];\n// l2 = this.mNextId;\n// this.mNextId = (1L + l2);\n// localObject4[0] = Long.valueOf(l2);\n// localObject4[1] = ((Contact)localObject3).personId;\n// localObject4[2] = ((Contact)localObject3).lookupKey;\n// localObject4[3] = null;\n// localObject4[4] = ((Contact)localObject3).name;\n// localObject4[5] = null;\n// localObject4[6] = null;\n// localObject4[7] = ((Contact)localObject3).email;\n// localObject4[8] = ((Contact)localObject3).phoneNumber;\n// localObject4[9] = ((Contact)localObject3).phoneType;\n// localObject4[10] = null;\n// ((EsMatrixCursor)localObject2).addRow(localObject4);\n// }\n// }\n// Object localObject6 = (LocalProfile)((Iterator)localObject3).next();\n// Object localObject2 = ((LocalProfile)localObject6).gaiaId;\n// ((HashSet)localObject1).add(localObject2);\n// l1.add(((LocalProfile)localObject6).name);\n// Object localObject4 = this.mCursor;\n// Object localObject5 = new Object[11];\n// long l2 = this.mNextId;\n// this.mNextId = (1L + l2);\n// localObject5[0] = Long.valueOf(l2);\n// localObject5[1] = ((LocalProfile)localObject6).personId;\n// localObject5[2] = null;\n// localObject5[3] = localObject2;\n// localObject5[4] = ((LocalProfile)localObject6).name;\n// localObject5[5] = ((LocalProfile)localObject6).packedCircleIds;\n// localObject5[6] = ((LocalProfile)localObject6).email;\n// localObject5[7] = null;\n// localObject5[8] = ((LocalProfile)localObject6).phoneNumber;\n// localObject5[9] = ((LocalProfile)localObject6).phoneType;\n// localObject5[10] = null;\n// ((EsMatrixCursor)localObject4).addRow(localObject5);\n// }\n// }\n// localObject1 = this.mCursor;\n// }\n// else\n// {\n// localObject1 = this.mCursor;\n// }\n// return (Cursor)(Cursor)(Cursor)(Cursor)(Cursor)(Cursor)localObject1;\n return null;\n }", "@Override\n public long readBatchData() throws SQLException {\n return (-1);\n }", "@Override\n public boolean getMoreResults(int current) throws SQLException {\n return false;\n }", "@Override\n public void setCursorName(String unused) throws SQLException {\n throw new SQLException(\"tinySQL does not support cursors.\");\n }", "private void validate() {\n for (DBRow row : rows) {\n for (DBColumn column : columns) {\n Cell cell = Cell.at(row, column);\n DBValue value = values.get(cell);\n notNull(value,\"Cell \" + cell);\n }\n }\n }", "@Override\n\tprotected Serializable parseDataCursor(Cursor cursor) {\n\t\treturn null;\n\t}", "public boolean isLast() throws SQLException {\n/* 219 */ return (this.lastRowFetched && this.currentPositionInFetchedRows == this.fetchedRows.size() - 1);\n/* */ }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.nextLine((ResultSet) 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.DBUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.renderColumn((DBColumn) 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 }", "public boolean isAfterLast() {\n/* 125 */ return (this.lastRowFetched && this.currentPositionInFetchedRows > this.fetchedRows.size());\n/* */ }", "private Integer idFromCursor(Cursor cursor) {\n\t\treturn cursor.getInt(0);\n\t}", "public boolean isFirst() throws SQLException\n {\n return m_rs.isFirst();\n }", "public static boolean isRowEmpty(BaseDocument doc, int offset)\n throws BadLocationException {\n Element lineElement = doc.getParagraphElement(offset);\n return (lineElement.getStartOffset() + 1 == lineElement.getEndOffset());\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.parseResultRow((ResultSet) 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.DBUtil\", e);\n }\n }", "public void beforeLast() throws SQLException {\n/* 261 */ notSupported();\n/* */ }", "public void beforeFirst() throws SQLException\n {\n m_rs.beforeFirst();\n }", "@Override\r\n public Boolean moreRecords()\r\n {\r\n Boolean blnRet = false;\r\n try\r\n {\r\n blnRet = dbRecordset.next();\r\n }\r\n catch (Exception e)\r\n {\r\n blnRet = false;\r\n }\r\n return blnRet; // only one RETURN in each function!\r\n }", "public boolean isEmpty() throws SQLException {\n/* 197 */ return (isBeforeFirst() && isAfterLast());\n/* */ }", "public int cursor();", "public void validateScrollability() throws HibernateException {\n \t\tif ( getCollectionPersisters() != null ) {\n \t\t\tthrow new HibernateException( \"Cannot scroll queries which initialize collections\" );\n \t\t}\n \t}", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.renderColumn((DBColumn) 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 }", "public boolean fetchNext(Transaction trans, DatasetCursor cursor,\n DBObject obj, Filter filter, boolean forUpdate)\n throws StorageException, LockConflict {\n Rowid rowid = cursor.getRowid();\n int index = rowid.getIndex();\n\n while (true) {\n ++index;\n\n if (index < 0 || index >= dir.getCount())\n return false;\n\n rowid.setIndex((short) index);\n\n if (_read(trans, obj, index, forUpdate, filter))\n return true;\n }\n }", "public boolean prefire() throws IllegalActionException {\n\t\ttry {\n\t\t\tif (that.isEndOfResultset()) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tthrow new IllegalActionException(\n\t\t\t\t\t\"Unable to determine end of result set\");\n\t\t}\n\n\t}", "public boolean next() throws SQLException {\n\n try {\n debugCodeCall(\"next\");\n checkClosed();\n return nextRow();\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public Cursor getCursor() throws RelationException;", "@Override\n public int nextPosition() {\n if (++p < tuples.size()) {\n lastTuple = tuples.get(p);\n return 0; // position is invalid in this scorer, returns 0\n }\n return NO_MORE_POS;\n }" ]
[ "0.66999406", "0.666759", "0.6425951", "0.6304414", "0.6164789", "0.61238295", "0.6053333", "0.5955592", "0.5923776", "0.58544356", "0.5844428", "0.5842813", "0.580352", "0.5764128", "0.57490855", "0.5709863", "0.56662697", "0.5627093", "0.56225795", "0.5620485", "0.5581462", "0.5554271", "0.551897", "0.551331", "0.5492326", "0.5465244", "0.54302126", "0.5425615", "0.53970677", "0.5393027", "0.5373247", "0.5368334", "0.5363678", "0.5363528", "0.5348152", "0.53456575", "0.53435266", "0.53361803", "0.5324577", "0.5321021", "0.5320995", "0.53162795", "0.5291316", "0.52858394", "0.5280999", "0.5266174", "0.5260052", "0.5259414", "0.52577186", "0.52501476", "0.5229132", "0.5219586", "0.51930726", "0.5181884", "0.5172707", "0.51671386", "0.5160045", "0.5153535", "0.515176", "0.5144529", "0.5133887", "0.51252526", "0.511804", "0.51124495", "0.51091677", "0.5106526", "0.5105453", "0.5104798", "0.51036406", "0.50881803", "0.5071466", "0.5057707", "0.5055069", "0.5048339", "0.5044718", "0.5036887", "0.5036717", "0.5034845", "0.50297487", "0.50283664", "0.5025881", "0.50221527", "0.5019971", "0.50166255", "0.50161266", "0.50140876", "0.50120276", "0.5011193", "0.5009778", "0.50086015", "0.4998683", "0.49965483", "0.49928248", "0.49906412", "0.4983119", "0.49782747", "0.49732155", "0.49715033", "0.49690276", "0.49679962", "0.49670476" ]
0.0
-1
If the loader is invalidated, clear out all the data from the input fields.
@Override public void onLoaderReset(Loader<Cursor> loader) { mNameEditText.setText(""); mDescriptionEditText.setText(""); mPriceEditText.setText(""); mQuantityEditText.setText(""); mImageView.setImageDrawable(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mNameEditText.setText(\"\");\n mAddressEditText.setText(\"\");\n mNumberEditText.setText(\"\");\n mBirthTextView.setText(\"\");\n mImagePathTextView.setText(\"\");\n\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mBrandEditText.setText(\"\");\n mModelEditText.setText(\"\");\n mPriceEditText.setText(\"\");\n mQuantityEditText.setText(\"\");\n mColourSpinner.setSelection(0);\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mNameEditText.setText(\"\");\n }", "@Override\n public void onLoaderReset(@NonNull Loader<Cursor> loader) {\n mTitleEditText.setText(\"\");\n mPriceEditText.setText(\"\");\n mQuantityEditText.setText(\"\");\n mSupplierNameEditText.setText(\"\");\n mSupplierPhoneEditText.setText(\"\");\n\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mPriceEditText.setText(\"\");\n mQuantityEditText.setText(\"\");\n mSupplierEditText.setText(\"\");\n mTypeSpinner.setSelection(0); // Select \"NOT SELECTED\"\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mDescriptionEditText.setText(\"\");\n\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mEditSymptomText.setText(\"\");\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n etTitle.setText(\"\");\n etAuthor.setText(\"\");\n etPrice.setText(\"\");\n etEditQuantity.setText(\"\");\n etSupplier.setText(\"\");\n etPhoneNumber.setText(\"\");\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n xtasyid.setText(\"\");\n name.setText(\"\");\n email.setText(\"\");\n college.setText(\"\");\n contact.setText(\"\");\n gender.setText(\"\");\n extras.setText(\"\");\n }", "private void clearValidationError() {\n\n\t\tdataValid = false;\n\n\t\tvalidationErrorPending = false;\n\t\tvalidationErrorParent = null;\n\t\tvalidationErrorTitle = null;\n\t\tvalidationErrorMessage = null;\n\t\tvalidationErrorType = 0;\n\t}", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mNameTextView.setText(\"\");\n mQuantityTextView.setText(\"\");\n mPriceTextView.setText(\"\");\n mSupplierTextView.setText(\"\");\n mPhoneTextView.setText(\"\");\n mEmailTextView.setText(\"\");\n }", "public void unload() {\n this.currentRooms.clear();\n // Zero the info panel.\n this.roomNameField.setText(\"\");\n this.includeField.setText(\"\");\n this.inheritField.setText(\"\");\n this.streetNameField.setSelectedIndex(0);\n this.determinateField.setText(\"\");\n this.lightField.setText(\"\");\n this.shortDescriptionField.setText(\"\");\n this.longDescriptionField.setText(\"\");\n this.exitPanel.removeAll();\n }", "private void clean() {\n ((EditText)findViewById(R.id.textName)).getText().clear();\n ((EditText)findViewById(R.id.textPhone)).getText().clear();\n ((Spinner)findViewById(R.id.spinnerSchooling)).setSelection(0);\n ((RadioButton)findViewById(R.id.radioMale)).setChecked(true);\n ((AutoCompleteTextView)findViewById(R.id.autoTextBooks)).getEditableText().clear();\n ((CheckedTextView)findViewById(R.id.checkedTextView)).setChecked(false);\n }", "public void invalidateAll() {\n segment.clear();\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n nameTextView.setText(\"\");\n ingredientsTextView.setText(\"\");\n recipeTextView.setText(\"\");\n }", "@Override\n protected void onReset() {\n onStopLoading();\n\n // At this point we can release resources\n if( mData != null ) {\n releaseResources( mData );\n mData = null;\n }\n\n // The loader is being reset, so we should stop monitoring for changes\n if( mObserver != null ) {\n resolver.unregisterContentObserver( mObserver );\n mObserver = null;\n }\n }", "@Override\n\tpublic void clear() {\n\n\t\tDisplay.findDisplay(uiThread).syncExec(new Runnable() {\n\n\t\t\tpublic void run() {\n\t\t\t\tclearInputs();\n\t\t\t\tsetDefaultValues();\n\t\t\t}\n\t\t});\n\n\t}", "@Override\n public void onLoaderReset(Loader<List<EarthQuake>> loader) {\n mAdapter.clear();\n }", "public void invalidate() {\n\t\tthis.invalidated = true;\n\t}", "@Override\n public void clear() {\n validations.remove();\n }", "@Override\n\tpublic void onReset() {\n\t\tonStopLoading();\n\n\t\t// At this point we can release the resources associated with 'mData'.\n\t\tif (mData != null) {\n\t\t\tonReleaseResources(mData);\n\t\t\tmData = null;\n\t\t}\n\t\t// The Loader is being reset so we need to unregister Observer\n\t\tunregisterObserver();\n\t}", "public void clearData() {\n\t\tdrawnRect.clear();\n\t\tboxList.setListData(drawnRect);\n\t\tcurrRect = null;\n\t\ttextField.setText(\"\");\n\t}", "public void onLoaderReset(Loader<List<Book>> loader) {\n mAdapter.clear();\n }", "@Override\n protected void onReset() {\n onStopLoading();\n\n // At this point we can release the resources associated with 'mData'.\n if (mData != null) {\n releaseResources(mData);\n mData = null;\n }\n }", "public void reset() {\n _valueLoaded = false;\n _value = null;\n }", "protected void clearData() {\n getValues().clear();\n getChildIds().clear();\n getBTreeMetaData().setDirty(this);\n }", "private void clearData() {}", "@Override\n public void onLoaderReset(Loader<List<StockPicking>> loader) {\n mAdapter.clear();\n }", "private void invalidateData() {\n mDashboardListAdapter.invalidateData();\n }", "public void clearData() {\r\n\t\tdata = null;\r\n\t}", "protected abstract void resetInputFields();", "@Override\n public void onLoaderReset(Loader<List<Book>> loader) {\n mAdapter.clear();\n }", "@Override\n protected void onReset() {\n // Ensure the loader has been stopped.\n onStopLoading();\n // At this point we can release the resources.\n if (mCursor != null) {\n ReleaseResources(mCursor);\n mCursor = null;\n }\n }", "private void reset() {\n\t\tdata.clear();\n\t}", "protected void clearFields(){\n\t\tsetFormReady(false);\n\t\tskipSpin.setValue(1);\n\t\tsetFormReady(true);\n\t}", "public synchronized void clear() {\n _setModel(null);\n _lastParseTime = -1;\n }", "private void clearForm() {\n mViewerSalutation.setText(getString(R.string.viewer_info_salutation) + \" \" + Integer.toString(mViewers.size() + 1) + \",\");\n mNameEditText.setText(null);\n mEmailEditText.setText(null);\n mNameEditText.requestFocus();\n }", "@Override\n public void onLoaderReset(Loader<ArrayList<Book>> loader) {\n adapter.clear();\n Log.i(LOG_TAG,\"onLoaderReset\");\n }", "private void cleanup() {\n mCategory = null;\n mAccount = null;\n mCal = null;\n\n /* Reset value */\n etAmount.setText(\"\");\n tvCategory.setText(\"\");\n tvPeople.setText(\"\");\n tvDescription.setText(\"\");\n tvAccount.setText(\"\");\n tvEvent.setText(\"\");\n }", "@Override\n public void clearData() {\n }", "@Override\n public void clear() {\n isLoaded = false;\n }", "public void clean() {\n\tmTaskCompletedCallback = null;\n\tmTaskUpdateCallback = null;\n\tmIsDirty = false;\n }", "public void reset() {\n resetData();\n postInvalidate();\n }", "public void clearLoadingPanel(){\n this.loadingPanel.clear();\n }", "@Override\n protected void onReset() {\n onStopLoading();\n\n // At this point we can release the resources associated with 'mData'.\n if (mResult != null) {\n mResult = null;\n }\n\n }", "private void clear() {\n \tnameEditText.setText(\"\");\n \tidEditText.setText(\"\");\n \tdiscoveryDateEdit.setValue(null);\n \tcoordinatesEditText.setText(\"\");\n \t\n \ttableCivilizations.getItems().clear();\n \ttableStars.getItems().clear();\n \ttablePlanets.getItems().clear();\n \t\n \tcivilizationsTemp = new ArrayList<>();\n \tstarsTemp = new ArrayList<>();\n \tplanetsTemp = new ArrayList<>();\n \t\n \tnewCivilizationNameTextField.clear();\n \tnewPlanetTextField.clear();\n \tnewStarTextField.clear();\n \t\n \tt1.setSelected(false);\n \tt2.setSelected(false);\n \tt3.setSelected(false); \n \tnameEditCB.setSelected(false);\n \tcivilizationsEditCB.setSelected(false);\n \tdiscoveryDateEditCB.setSelected(false);\n \tcoordinatesEditCB.setSelected(false);\n \tplanetsEditCB.setSelected(false);\n \tstarsEditCB.setSelected(false);\n \t\n }", "@Override\r\n public void onLoaderReset(Loader<Cursor> loader) {\n mCursorAdapter.swapCursor(null);\r\n\r\n }", "public void lost() {\n\t\tremoveAll();\n\t\tvalidate();\n\t\trepaint();\n\t}", "@Override\n public void onLoaderReset(Loader<List<Pokemon>> loader) {\n mAdapter.clear();\n }", "public void clear() {\r\n\t\tdata.clear();\r\n\r\n\t}", "public void clear() {\n\t\tdestName.setText(\"\");\n\t\tedtTextZip.setText(\"\");\n\t\tedtTextMemos.setText(\"\");\n\t\tedtTextStreetAdress.setText(\"\");\n\t\tedtTextCity.setText(\"\");\n\t}", "@Override\n protected void clearForm() {\n this.total = 0;\n this.pesanan = new JSONArray();\n this.renderPesanan();\n label_total.setText(Integer.toString(this.total));\n }", "public void clearFileds() {\r\n\t\tthis.jPanelFormClient.clearFields();\r\n\t}", "public void clean() {\n\t\tdata = new ServerData();\n\t\tdataSaver.clean();\n\t}", "@Override\n protected void onReset() {\n super.onReset();\n\n // Ensure the loader is stopped\n onStopLoading();\n\n // At this point we can release the resources associated with 'apps' if needed.\n if (mData != null) {\n onReleaseResources(mData);\n mData = null;\n }\n }", "@Override\n public void onLoaderReset(Loader<List<TutorialModel>> loader) {\n mTutorialAdapter.clear();\n progressDialog.toggleDialog(false);\n }", "public void clearData()\r\n {\r\n \r\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mCursorAdapter.swapCursor(null);\n }", "@Override\n public void onLoaderReset(Loader<ArrayList<NewsItem>> loader) {\n newsAdapter.clear();\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n // Clear the Cursor we were using with another call to the swapCursor()\n adapter.swapCursor(null);\n }", "public void clean() {\r\n\t\t\r\n\t\tlogger.trace(\"Enter clean\");\r\n\t\t\r\n\t\tdata.clear();\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit clean\");\r\n\t}", "public void invalidate() {}", "protected synchronized void clearURLLoader() {\r\n currentLoader = null;\r\n }", "@Override\n\tpublic void clearForm() {\n\t\t\n\t}", "@Override\n public void onLoaderReset(Loader loader) {\n mAdapter.swapCursor(null);\n }", "private void clear() {\n\t\ttxtId.setText(\"\");\n\t\ttxtAlert.setText(\"\");\n\t\ttxtNbMax.setText(\"\");\n\t\t\n\t}", "public void canelDataUpdate() {\n dataModel.cancelDataLoading();\n }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mAdapter.swapCursor(null);\n }", "public void invalidateData() {\n Log.d(TAG, \"mama MessagesListRepository invalidateData \");\n //messagesRepository.setInitialKey(null);\n messagesRepository.invalidateData();\n }", "public void clean()\r\n {\r\n this.mostrarVuelta = null;\r\n this.mostrarVueltaValueList = null;\r\n this.mostrarVueltaLabelList = null;\r\n this.titulo = null;\r\n this.tituloValueList = null;\r\n this.tituloLabelList = null;\r\n this.busquedaSimpleAvanzada = null;\r\n this.busquedaSimpleAvanzadaValueList = null;\r\n this.busquedaSimpleAvanzadaLabelList = null;\r\n this.identificadorODE = null;\r\n this.identificadorODEValueList = null;\r\n this.identificadorODELabelList = null;\r\n this.idioma = null;\r\n this.idiomaValueList = null;\r\n this.idiomaLabelList = null;\r\n this.tipoLayoutBuscador = null;\r\n this.tipoLayoutBuscadorValueList = null;\r\n this.tipoLayoutBuscadorLabelList = null;\r\n this.formato = null;\r\n this.formatoValueList = null;\r\n this.formatoLabelList = null;\r\n this.tipoBusqueda = null;\r\n this.tipoBusquedaValueList = null;\r\n this.tipoBusquedaLabelList = null;\r\n }", "@Override\n\tpublic void onLoaderReset(Loader<Cursor> loader) {\n\t\tsetListAdapter(null);\n\t}", "@Override\n protected void onReset() {\n super.onReset();\n // Ensure the loader is stopped\n onStopLoading();\n // At this point we can release the resources associated with 'apps'\n // if needed.\n if (mData != null) {\n onReleaseResources(mData);\n mData = null;\n }\n unregisterObserver();\n }", "@Override\n\t\tprotected void revalidate() {\n\t\t\tvalid = true;\n\t\t}", "private void clearFields(){\n\t\tmiMatriculaLabel.setText(\"-\");\n\t\tmatriculaSearch.setText(\"\");\n\t\tmarcaText.setText(\"\");\n\t\tmodeloText.setText(\"\");\n\t\tanioText.setText(\"\");\n\t\titvText.setText(\"\");\n\t\tvehiculoSelected = null;\n\t\tchangeFieldsState(false);\n\t}", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mPurseAdapter.swapCursor(null);\n }", "@Override\r\n public void onLoaderReset(Loader<Cursor> loader) {\n mLocationCursor.close();\r\n mLocationCursor = null;\r\n }", "public void reset() {\n\t\t\t// clear the field\n\t\t\ttextField.setValue(null);\n\t\t}", "@Override\r\n public void invalidate() {\r\n }", "public void clearFields()\r\n {\r\n\t txtID.setText(\"\");\r\n\t txtName.setText(\"\");\r\n\t txtYear.setText(\"\");\r\n\t txtMonth.setText(\"\");\r\n\t txtPDate.setText(\"\");\r\n txtFees.setText(\"0\");\r\n }", "public void clear() {\n this.data().clear();\n }", "@Override \n\t protected void onReset() {\n\t super.onReset();\n\n\t // Ensure the loader is stopped\n\t onStopLoading();\n\t \n\t mChildList = null;\n\t }", "@Override \n\t protected void onReset() {\n\t super.onReset();\n\n\t // Ensure the loader is stopped\n\t onStopLoading();\n\t \n\t mChildList = null;\n\t }", "public void invalidate() {\n\t\t\n\t}", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n mProductName.setText(\"\");\n mProductPrice.setText(\"\");\n mProductQuantity.setText(\"\");\n // Select \"Unknown\" gender\n }", "private void refreshView() {\n if (!wasInvalidatedBefore) {\n wasInvalidatedBefore = true;\n invalidate();\n }\n }", "private void clearFields() {\r\n jTextFieldID.setText(\"\");\r\n jTextFieldNome.setText(\"\");\r\n jTextFieldPreco.setText(\"\");\r\n jTextFieldDescricao.setText(\"\");\r\n }", "@Override\n\tpublic void onLoaderReset(Loader<Cursor> loader) {\n\t\tmAdapter.swapCursor(null);\n\t}", "public void invalidate() {\n/* 327 */ if (isValid()) {\n/* 328 */ invalidateSD();\n/* 329 */ super.invalidate();\n/* */ } \n/* */ }", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n adapter.swapCursor(null);\n }", "@Override\r\n public void revalidate() {\r\n }", "private void clearOldErrorsFromViews() {\n clearGrid(nonFieldErrorGrid);\n clearGrid(fieldErrorGrid);\n showErrorBox(nonFieldErrorBox);\n showErrorBox(fieldErrorBox);\n }", "void invalidate() {\n\t\tinvalid = true;\n\t}", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n bookAdapter.swapCursor(null);\n }", "public void clearData(){\n\r\n\t}", "public void clearFields()\n {\n txtDate.setText(\"\");\n txtIC.setText(\"\");\n txtBrand.setText(\"\");\n txtSerial.setText(\"\");\n txtCPT.setText(\"\");\n txtRMB.setText(\"\");\n txtRTYP.setText(\"\");\n txtCap.setText(\"\");\n txtSpeed.setText(\"\");\n txtWar.setText(\"\");\n txtRemarks.setText(\"\");\n }", "void resetComponents() {\n Utilitarios.fechaActual(jdcFechaInicio);\n Utilitarios.fechaActual(jdcFechaFin);\n if (oMedicoAtiendeReal != null) {\n oMedicoAtiendeReal = null;\n }\n if (oComprobanteDetalle != null) {\n oComprobanteDetalle = null;\n }\n oModeloRegistrarPagoMedicos.clear();\n personalizaVistaTabla();\n txfMedicoDeriva.setText(\"\");\n txfMedicoAtiende.setText(\"\");\n if(oMedico != null){\n oMedico = null;\n }\n txfMedico.setText(\"\");\n }", "public void clearFields() {\n\t\tid.clear();\n\t\tfn.clear();\n\t\tln.clear();\n\t\tage.clear();\n\t\tun.clear();\n\t\tpass.clear();\n\t\tdate.setValue(null);\n\t}", "@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n this.goalAdapter.swapCursor(null);\n }", "@Override public void onLoaderReset(Loader<Cursor> loader) {\n\t\t}", "protected void reset()\n {\n this.shapeDataCache.removeAllEntries();\n this.sector = null;\n }" ]
[ "0.7020653", "0.6931106", "0.68739367", "0.67665035", "0.6637083", "0.6539127", "0.6513346", "0.6471275", "0.64172286", "0.6357172", "0.63501793", "0.63462865", "0.6291218", "0.6248721", "0.6245697", "0.62371016", "0.6169398", "0.6146195", "0.6143728", "0.61139643", "0.61007077", "0.6087829", "0.60821325", "0.6074529", "0.60669935", "0.6055051", "0.6047234", "0.60454035", "0.60442674", "0.6007264", "0.6002623", "0.59945405", "0.59936064", "0.5981573", "0.5978782", "0.5968112", "0.5949773", "0.5942981", "0.59286135", "0.592491", "0.59162015", "0.5915394", "0.59138167", "0.591351", "0.5894171", "0.5892968", "0.58902305", "0.5885902", "0.5885349", "0.58833545", "0.58827686", "0.5881126", "0.5879778", "0.58684987", "0.58603525", "0.5856592", "0.585325", "0.5844382", "0.58425015", "0.58408874", "0.58369607", "0.58062863", "0.58033407", "0.5801784", "0.5801743", "0.5798412", "0.5797527", "0.5789519", "0.57865715", "0.5782709", "0.5779624", "0.5779204", "0.5776125", "0.5775292", "0.57717186", "0.5767489", "0.5764742", "0.57554156", "0.57541835", "0.57460636", "0.5731908", "0.5731908", "0.57319003", "0.5731104", "0.57294285", "0.5724642", "0.5724463", "0.57187986", "0.5718296", "0.5715326", "0.57119954", "0.57079506", "0.570552", "0.5702723", "0.5700568", "0.5696424", "0.5695343", "0.5689245", "0.56810635", "0.56719697" ]
0.6767762
3
Show a dialog that warns the user there are unsaved changes that will be lost if they continue leaving the editor.
private void showUnsavedChangesDialog( DialogInterface.OnClickListener discardButtonClickListener) { // Create an AlertDialog.Builder and set the message, and click listeners // for the postivie and negative buttons on the dialog. AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(R.string.unsaved_changes_dialog_msg); builder.setPositiveButton(R.string.discard, discardButtonClickListener); builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { // User clicked the "Keep editing" button, so dismiss the dialog // and continue editing the Product. if (dialog != null) { dialog.dismiss(); } } }); // Create and show the AlertDialog AlertDialog alertDialog = builder.create(); alertDialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showUnsavedChangesDialog() {\n // Create an AlertDialog.Builder and set the message and click listeners for the positive\n // and negative buttons.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.you_have_unsaved_messages_dialog);\n\n // Leave the page if user clicks \"Leave\"\n builder.setPositiveButton(R.string.leave, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n\n // Stay on the page if user clicks \"Stay\"\n builder.setNegativeButton(R.string.stay, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog() {\n //create the builder\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n //add message and button functionality\n builder.setMessage(\"Discard your changes and quit?\")\n .setPositiveButton(\"Discard\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //make the sdiscard boolean false and go to back pressed to follow normal hierarchical back\n unsavedChanges = false;\n //continue with back button\n onBackPressed();\n }\n })\n .setNegativeButton(\"Keep Editing\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //close the dialog\n dialog.dismiss();\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "private void showUnsavedChangesDialog( DialogInterface.OnClickListener discardButtonClickListener ) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(DialogInterface.OnClickListener discardButtonClickListener) {\n //Create a AlertDialog.Builder and set the message\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n //Make the dialog disappear\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n //Creates the dialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(\r\n DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(\"Discard your changes and quit editing?\");\r\n builder.setPositiveButton(\"Discard\", discardButtonClickListener);\r\n builder.setNegativeButton(\"Keep Editing\", new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n // User clicked the \"Keep editing\" button, so dismiss the dialog\r\n // and continue editing the pet.\r\n if (dialog != null) {\r\n dialog.dismiss();\r\n }\r\n }\r\n });\r\n\r\n // Create and show the AlertDialog\r\n AlertDialog alertDialog = builder.create();\r\n alertDialog.show();\r\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Discard your changes and quit editing?\");\n builder.setPositiveButton(\"Discard\", discardButtonClickListener);\n builder.setNegativeButton(\"Keep Editing\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the fruit.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener){\n //Create an AlertDialog.Builder and set the message, and click listeners\n //for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Discard your changes and quit editing?\");\n builder.setPositiveButton(\"Discard\", discardButtonClickListener);\n builder.setNegativeButton(\"Keep Editing\", new DialogInterface.OnClickListener(){\n public void onClick(DialogInterface dialog, int id) {\n //User clicked the \"Keep editing\" button, so dismiss the dialog\n //and continue editing the item.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n //Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n // Set the message.\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n\n // Handle the button clicks.\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the item.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChnageDialog(DialogInterface.OnClickListener discardButtonClickListener) {\r\n //create an alert dialog box and set a message for the user\r\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(R.string.unsaved_changes_message);\r\n builder.setPositiveButton(R.string.discard_button, discardButtonClickListener);\r\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n //user has clicked the keep editing button\r\n if (dialogInterface != null) {\r\n dialogInterface.dismiss();\r\n }\r\n }\r\n });\r\n //create dialog\r\n AlertDialog alertDialog = builder.create();\r\n alertDialog.show();\r\n }", "private void showUnsavedChangesDialog(DialogInterface.OnClickListener discardButtonClickListener) {\n // Create an AlertDialog.Builder and set the message and click listeners\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.editor_activity_discard_changes_message);\n builder.setPositiveButton(R.string.editor_activity_discard_changes_positive, discardButtonClickListener);\n builder.setNegativeButton(R.string.editor_activity_discard_changes_negative, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (dialog != null)\n dialog.dismiss();\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the inventory item\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "protected boolean showUnsavedChanges ()\n {\n return showConfirm(\"m.unsaved_changes\", \"t.unsaved_changes\");\n }", "private void confirmExit() {\n if (hasChanges()) {\n new AlertDialog.Builder(this).\n setMessage(R.string.dialog_discard_msg).\n setNegativeButton(R.string.dialog_discard_neg, (dialog, which) -> {}).\n setPositiveButton(R.string.dialog_discard_pos, (dialog, which) -> finish()).\n create().\n show();\n }\n else {\n showToast(R.string.toast_no_changes);\n finish();\n }\n }", "private void checkUnsavedChanges()\n {\n if (hasChanges) {\n DialogActivity.showConfirmDialog(mContext,\n R.string.service_gui_UNSAVED_CHANGES_TITLE,\n R.string.service_gui_UNSAVED_CHANGES,\n R.string.service_gui_SAVE, this);\n }\n else {\n cancel();\n }\n }", "protected boolean promptToDiscardChanges() {\n if (!boxChanged) {\n return false;\n }\n switch (JOptionPane.showConfirmDialog(this,\n bundle.getString(\"Do_you_want_to_discard_the_changes_to_\")\n + boxFile.getName() + \"?\",\n APP_NAME, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE)) {\n case JOptionPane.YES_OPTION:\n return true;\n default:\n return false;\n }\n }", "@Override\n public void showDiscardDialog() {\n //Creating an AlertDialog with a message, and listeners for the positive, neutral and negative buttons\n AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity());\n //Set the Message\n builder.setMessage(R.string.product_config_unsaved_changes_dialog_message);\n //Set the Positive Button and its listener\n builder.setPositiveButton(R.string.product_config_unsaved_changes_dialog_positive_text, mUnsavedDialogOnClickListener);\n //Set the Negative Button and its listener\n builder.setNegativeButton(R.string.product_config_unsaved_changes_dialog_negative_text, mUnsavedDialogOnClickListener);\n //Set the Neutral Button and its listener\n builder.setNeutralButton(R.string.product_config_unsaved_changes_dialog_neutral_text, mUnsavedDialogOnClickListener);\n //Lock the Orientation\n OrientationUtility.lockCurrentScreenOrientation(requireActivity());\n //Create and display the AlertDialog\n builder.create().show();\n }", "private static void checkSaveOnExit() {\n\t\tif(!saved && !config.isUpdateDB()) {\n \t\tint option = JOptionPane.showOptionDialog(frame,\n \t\t\t\t\"There are unsaved changes\\nDo you want to save them now?\",\n \t\t\t\t\"Unsaved changes\",JOptionPane.YES_NO_CANCEL_OPTION,\n \t\t\t\tJOptionPane.WARNING_MESSAGE, null, null, 0);\n \t\tswitch(option) {\n \t\tcase 0:\n \t\t\tportfolio.save(WORKING_FILE);\n \t\tcase 1:\n \t\t\tframe.dispose();\n \t\tdefault:\n \t\t\tbreak; \t \t\t\n \t\t}\n \t\tSystem.out.println(\"unsaved changes \" + option);\n \t} else {\n \t\tframe.dispose();\n \t}\n\t\t\n\t}", "public static void closeSaveChangesDialog() {\n\t\twaitForSwing();\n\t\tOptionDialog dialog = getDialogComponent(OptionDialog.class);\n\t\tif (dialog == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tString title = dialog.getTitle();\n\t\tboolean isSavePrompt = StringUtils.containsAny(title, \"Changed\", \"Saved\");\n\t\tif (!isSavePrompt) {\n\t\t\tthrow new AssertionError(\"Unexpected dialog with title '\" + title + \"'; \" +\n\t\t\t\t\"Expected a dialog alerting to program changes\");\n\t\t}\n\n\t\tif (StringUtils.contains(title, \"Program Changed\")) {\n\t\t\t// the program is read-only or not in a writable project\n\t\t\tpressButtonByText(dialog, \"Continue\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (StringUtils.contains(title, \"Save Program?\")) {\n\t\t\tpressButtonByText(dialog, \"Cancel\");\n\t\t\treturn;\n\t\t}\n\n\t\tthrow new AssertionError(\"Unexpected dialog with title '\" + title + \"'; \" +\n\t\t\t\"Expected a dialog alerting to program changes\");\n\t}", "private void savedDialog() {\n\t\tTextView tv = new TextView(this);\n\t\ttv.setText(\"Changes to the current recipe have been saved.\");\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(this);\n\t\talert.setTitle(\"Success\");\n\t\talert.setView(tv);\n\t\talert.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\talert.show();\n\t}", "public void getSaveConfMess() {\n JOptionPane.showMessageDialog(this, \"Your changes have been saved.\", \"Changes Confirmed\", PLAIN_MESSAGE);\n }", "protected boolean promptToSave() {\n if (!boxChanged) {\n return true;\n }\n switch (JOptionPane.showConfirmDialog(this,\n bundle.getString(\"Do_you_want_to_save_the_changes_to_\")\n + (boxFile == null ? bundle.getString(\"Untitled\") : boxFile.getName()) + \"?\",\n APP_NAME, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE)) {\n case JOptionPane.YES_OPTION:\n return saveAction();\n case JOptionPane.NO_OPTION:\n return true;\n default:\n return false;\n }\n }", "@Override\n public void onBackPressed() {\n if (!bookHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, exit the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "@Override\n public void onBackPressed() {\n if (!mBookHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "protected boolean showCantUndo ()\n {\n return showConfirm(\"m.cant_undo\", \"t.cant_undo\");\n }", "@Override\n public void onBackPressed() {\n if (!mPetHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "public int windowClosing() {\n if(changed) {\n current = this;\n return JOptionPane.showConfirmDialog(null, \"Do you want to save changes to \" + name + \"?\"); \n }\n return 1;\n }", "private void dialogChanged()\n {\n // Checking if a Schema Project is open\n if ( Activator.getDefault().getSchemaHandler() == null )\n {\n displayErrorMessage( Messages.getString( \"ImportCoreSchemasWizardPage.ErrorNoSchemaProjectOpen\" ) ); //$NON-NLS-1$\n return;\n }\n\n displayErrorMessage( null );\n }", "@Override\n public void onBackPressed() {\n if (!mItemHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "protected boolean handleDirtyConflict() {\r\n\t\treturn MessageDialog.openQuestion(getSite().getShell(),\r\n\t\t\t\tgetString(\"_UI_FileConflict_label\"),\r\n\t\t\t\tgetString(\"_WARN_FileConflict\"));\r\n\t}", "private void savedMessageFrame() {\r\n\t\tcreateWarning(2000, \"MESSAGE SAVED\"); //show warning message\r\n\t\t\r\n\t\twarningFrame.dispose(); //close warning window\r\n\t}", "@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}", "private void dialogChanged() {\n\t\tIResource container = ResourcesPlugin.getWorkspace().getRoot()\n\t\t\t\t.findMember(new Path(getContainerName().get(\"ProjectPath\")));\n\n\t\tif(!containerSourceText.getText().isEmpty() && !containerTargetText.getText().isEmpty())\n\t\t{\n\t\t\tokButton.setEnabled(true);\n\t\t}\n\n\t\tif (getContainerName().get(\"ProjectPath\").length() == 0) {\n\t\t\tupdateStatus(\"File container must be specified\");\n\t\t\treturn;\n\t\t}\n\t\tif (container == null\n\t\t\t\t|| (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {\n\t\t\tupdateStatus(\"File container must exist\");\n\t\t\treturn;\n\t\t}\n\t\tif (!container.isAccessible()) {\n\t\t\tupdateStatus(\"Project must be writable\");\n\t\t\treturn;\n\t\t}\n\t\tupdateStatus(null);\n\t}", "@Override\n public void onBackPressed() {\n // If the goal hasn't changed, continue with handling back button press\n if (!mGoalHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "private void promptToSaveBeforeClosing() {\r\n int userChoice = JOptionPane.showConfirmDialog(this,\r\n \"You have unsaved work. Would you like to save before exiting?\",\r\n \"Save before quitting?\",\r\n JOptionPane.YES_NO_CANCEL_OPTION);\r\n\r\n if (userChoice == JOptionPane.YES_OPTION) {\r\n String saveFile = graph.getFilename();\r\n if (saveFile == null || saveFile.length() == 0)\r\n saveFile = GraphIO.chooseSaveFile(graph.getFilename());\r\n GraphIO.saveGraph(graph, saveFile);\r\n }\r\n\r\n if (userChoice != JOptionPane.CANCEL_OPTION)\r\n dispose();\r\n }", "public boolean checkForSave(String msg) {\r\n \t\t// Checks if there's an old graph to save\r\n \t\tif (model != null && model.toBeSaved()) {\r\n \t\t\tint resultValue = JOptionPane.showConfirmDialog(mainWindow, msg, \"JMODEL - Warning\", JOptionPane.YES_NO_CANCEL_OPTION,\r\n \t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n \t\t\tif (resultValue == JOptionPane.YES_OPTION) {\r\n \t\t\t\tsaveModel();\r\n \t\t\t\treturn true;\r\n \t\t\t}\r\n \t\t\tif (resultValue == JOptionPane.CANCEL_OPTION) {\r\n \t\t\t\treturn true;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn false;\r\n \t}", "@Override\n public void onBackPressed() {\n if (!mItemDetailsHasChanged) {\n super.onBackPressed();\n return;\n }\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "protected boolean requestClose()\n\t{\n\t\t\n\t\tif (!dirty.get())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tString filename = getFile() == null ? \"Untitled\" : getFile().getName();\n\t\tString filepath = getFile() == null ? \"\" : getFile().getAbsolutePath();\n\t\t\n\t\tAlertWrapper alert = new AlertWrapper(AlertType.CONFIRMATION)\n\t\t\t\t.setTitle(filename + \" has changes\")\n\t\t\t\t.setHeaderText(\"There are unsaved changes. Do you want to save them?\")\n\t\t\t\t.setContentText(filepath + \"\\nAll unsaved changes will be lost.\");\n\t\talert.getButtonTypes().setAll(ButtonType.YES, ButtonType.NO, ButtonType.CANCEL);\n\t\t\n\t\talert.showAndWait();\n\t\t\n\t\tif (alert.getResult() == ButtonType.YES)\n\t\t{\n\t\t\tboolean success = save();\n\t\t\t\n\t\t\tif (!success)\n\t\t\t{\n\t\t\t\tAlertWrapper errorAlert = new AlertWrapper(AlertType.ERROR)\n\t\t\t\t\t\t.setTitle(\"Couldn't save file!\")\n\t\t\t\t\t\t.setHeaderText(\"There was an error while saving!\")\n\t\t\t\t\t\t.setContentText(\"The file was not closed.\");\n\t\t\t\t\n\t\t\t\terrorAlert.showAndWait();\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (alert.getResult() == ButtonType.CANCEL)\n\t\t\treturn false; // A false return value is used to consume the closing event.\n\t\t\n\t\t\n\t\treturn true;\n\t}", "private void confirmExit () {\n\t\tint ret = JOptionPane.showConfirmDialog(this, \"Save game before exiting?\");\n\t\tif (ret == 0) {\n\t\t\tcloseAfterSave = true;\n\t\t\tEngine.requestSync();\n\t\t} else if (ret == 1) {\n\t\t\tkill();\n\t\t}\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\tint response = JOptionPane.showConfirmDialog(Window.getFrame(),\n\t\t\t\t\"Do you really want to quit the level editor ?\\nThe\"\n\t\t\t\t+ \" unsaved modifications are going to be lost.\",\n\t\t\t\t\"Need confirmation\", JOptionPane.OK_CANCEL_OPTION);\n\t\t\tif(response == JOptionPane.OK_OPTION)\n\t\t\t\tWindow.affect(new LevelEditorList(),Window.DIM_STANDARD);\n\t\t}", "private void errorPopUp() {\n new AlertDialog.Builder(mActivity)\n .setTitle(\"Oops\")\n .setMessage(\"Please choose an emotional state or enter a date and time\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Go back without changing anything\n dialogInterface.dismiss();\n }\n })\n .create()\n .show();\n }", "protected void exitSafely() {\n for (int i = 0, numberOfTabs = tabs.getTabCount(); i < numberOfTabs; i++) {\n DocumentTab selectedDocument = (DocumentTab)tabs.getComponentAt(i);\n if (selectedDocument.isModified()) {\n tabs.setSelectedIndex(i);\n int answer = JOptionPane.showConfirmDialog(\n appWindow,\n \"File \" + selectedDocument.getName() + \" is modified.\\n\" +\n \"Do you want to save the file before closing?\",\n \"Warning\",\n JOptionPane.YES_NO_CANCEL_OPTION,\n JOptionPane.WARNING_MESSAGE);\n if (answer == JOptionPane.CANCEL_OPTION) {\n return;\n } else if (answer == JOptionPane.YES_OPTION) {\n saveCurrentTab(SaveMode.SAVE);\n }\n }\n }\n\n appWindow.dispose();\n }", "@Override\n public void onBackPressed() {\n showUnsavedChangesDialog();\n }", "@Override\n public void onCancel(AmbilWarnaDialog dialog) {\n }", "@Override\n public void onCancel(AmbilWarnaDialog dialog) {\n }", "@Override\n public void onBackPressed() {\n // If the pet hasn't changed, continue with handling back button press\n if (!mPetHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "private void doExit() {\n\t\tif (userMadeChanges()) {\n showSaveChangesBeforeExitPrompt();\n\t\t} else {\n\t\t\tfinish();\n\t\t}\n\t}", "@Override\n public void onBackPressed() {\n // If the fruit hasn't changed, continue with handling back button press\n if (!mFruitHasChanged) {\n super.onBackPressed();\n return;\n }\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "private void dialogChanged() {\n\t\tString fileName = getFileName();\n\t\tString dirStr = getPathStr();\n\n\t\tif (dirStr.length() == 0) {\n\t\t\tupdateStatus(\"Directory must be specified\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (fileName == null || fileName.length() == 0) {\n\t\t\tupdateStatus(\"File name must be specified\");\n\t\t\treturn;\n\t\t}\n\t\tif (fileName.replace('\\\\', '/').indexOf('/', 1) > 0) {\n\t\t\tupdateStatus(\"File name must be valid\");\n\t\t\treturn;\n\t\t}\n\t\tupdateStatus(null);\n\t}", "@Override\n public void onBackPressed() {\n if (!mEditSymptomChanged) {\n super.onBackPressed();\n return;\n }\n //otherwise if there are unsaved changes setup a dialog to warn the user\n //handles the user confirming that changes should be made\n mHomeChecked = false;\n showUnsavedChangesDialogFragment();\n }", "public boolean promptToSave()\r\n {\r\n // PROMPT THE USER TO SAVE UNSAVED WORK\r\n AnimatedSpriteEditorGUI gui = AnimatedSpriteEditor.getEditor().getGUI();\r\n int selection =JOptionPane.showOptionDialog(gui, \r\n PROMPT_TO_SAVE_TEXT, PROMPT_TO_SAVE_TITLE_TEXT, \r\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, \r\n null, null, null);\r\n \r\n // IF THE USER SAID YES, THEN SAVE BEFORE MOVING ON\r\n if (selection == JOptionPane.YES_OPTION)\r\n {\r\n poseIO.savePose(currentFile, false);\r\n poseIO.savePoseImage(currentPoseName, poseID);\r\n saved = true;\r\n }\r\n \r\n // IF THE USER SAID CANCEL, THEN WE'LL TELL WHOEVER\r\n // CALLED THIS THAT THE USER IS NOT INTERESTED ANYMORE\r\n else if (selection == JOptionPane.CANCEL_OPTION)\r\n {\r\n return false;\r\n }\r\n\r\n // IF THE USER SAID NO, WE JUST GO ON WITHOUT SAVING\r\n // BUT FOR BOTH YES AND NO WE DO WHATEVER THE USER\r\n // HAD IN MIND IN THE FIRST PLACE\r\n return true;\r\n }", "@Override\n public void onBackPressed() {\n if (!bookHasChanged) {\n super.onBackPressed();\n return;\n }\n\n DialogInterface.OnClickListener discardButtonClickListener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }\n };\n\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "private void showGameOverDialog() {\n this.computerPaquetView.showOnceHiddenCards();\n int dialogResult = JOptionPane.showConfirmDialog (null, String.format(\"%s, you have lost!\\nPlay again?\", this.blackjackController.getHumanPlayer().getName()),\"\", JOptionPane.YES_NO_OPTION);\n if(dialogResult == JOptionPane.YES_OPTION){\n this.blackjackController.getHumanPlayer().resetBudget();\n this.startGame();\n } else {\n this.dispose();\n }\n }", "@Override\n public void onBackPressed() {\n if (!mHasProductInfoChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteAllBooks();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void confirmationAlert() {\n\t\tAlert confirm = new Alert( AlertType.CONFIRMATION, \"You Will Not Be Able To Change Your Name\\nAfter You Press 'OK'.\");\n\t\tconfirm.setHeaderText(\"Are You Sure?\");\n confirm.setTitle(\"Confirm Name\");\n confirm.showAndWait().ifPresent(response -> {\n if (response == ButtonType.OK) {\n \tbackground.remove( pointer );\n \tkeyStrokes = keyStrokes.replace(\" \", \"-\");\n\t\t\t\tinsertNewHiScore();\n\t\t\t\tnewHighScore = false;\n }\n });\n\t}", "private void confirmerSuppressionCourse() {\n new AlertDialog.Builder(this)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .setTitle(R.string.activity_course_dialog_suppr_title)\n .setMessage(R.string.activity_course_dialog_suppr_message)\n .setPositiveButton(R.string.activity_course_dialog_suppr_yes, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n DbHelper.getInstance(CourseDetails.this).deleteCourse(course);\n finish();\n }\n })\n .setNegativeButton(R.string.activity_course_dialog_suppr_no, null).show();\n }", "void okButton_actionPerformed(ActionEvent e)\n\t{\n\t\tpropertiesEditPanel.saveChanges();\n\t\tcloseDlg();\n\t\tokPressed = true;\n }", "private void performWindowClosing() {\r\n if (dataChanged) {\r\n try {\r\n int result = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\r\n \"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n CoeusOptionPane.DEFAULT_YES);\r\n if (result == JOptionPane.YES_OPTION) {\r\n saveRolodexInfo();\r\n }else if (result == JOptionPane.NO_OPTION){\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }catch(Exception e){\r\n CoeusOptionPane.showErrorDialog(e.getMessage());\r\n }\r\n }else {\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }", "@Override\n public void onBackPressed() {\n // If the pet hasn't changed, continue with handling back button press\n if (!mEmployeeHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "private void showThatNotEditable() {\n\t\tTextView tv = new TextView(this);\n\t\ttv.setText(\"Only the original creator may edit their recipe!\");\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(this);\n\t\talert.setTitle(\"Sorry\");\n\t\talert.setView(tv);\n\t\talert.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t}\n\t\t});\n\t\talert.show();\n\t}", "private void endingAction() {\n this.detectChanges();\n if (this.isModifed) {\n //System.out.println(JOptionPane.showConfirmDialog(null, \"Do you want to save unsaved changes?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION));\n switch (JOptionPane.showConfirmDialog(null, \"Do you want to save current data?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION)) {\n case 0: {\n if (this.file != null) {\n INSTANCE.saveData();\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n case 1: {\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n //cancel op 2\n //no op 1\n //yes op 0\n } else {\n INSTANCE.dispose();\n System.exit(0);\n }\n }", "@SuppressWarnings(\"deprecation\")\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tMyButtonEditor.this.fireEditingCanceled(); \n\t\t\t\tnew WarningDialog(jtb).jd.show();\n\t\t\t}", "@Override\n public void onCancel(AmbilWarnaDialog dialog){\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder to display a confirmation message about deleting the book\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.editor_activity_delete_message);\n builder.setPositiveButton(getString(R.string.editor_activity_delete_message_positive),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Delete\"\n deleteBook();\n }\n });\n\n builder.setNegativeButton(getString(R.string.editor_activity_delete_message_negative),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Cancel\"\n if (dialogInterface != null)\n dialogInterface.dismiss();\n }\n });\n\n // Create and show the dialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void incorrectDialog() {\n // Update score.\n updateScore(scoreDecrease);\n\n // Show Dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"TRUMPED! This Tweet is \" + (realTweet ? \"real\" : \"fake\"));\n //builder.setPositiveButton(\"OK\", (dialog, which) -> chooseRandomTweet());\n builder.setOnDismissListener(unused -> chooseRandomTweet());\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n unsavedChanges = false;\n //continue with back button\n onBackPressed();\n }", "@Override\n public void onBackPressed() {\n if (!mProductHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "public void actionPerformed(ActionEvent evt) {\n\t\tsetEnabled(true);\n\t\t\n\t\tSwingUtils.showCentered(getFrame(), getDialog());\n\n\t\tif (ButtonConstants.OK == getDialog().getTerminatingButton()) {\t\t\n\t\t\tSystem.out.println(\"abandon changes in model\");\n\t\t\n\t\t\tsetEnabled(false);\n\t\t}\n\t}", "public void dismissSavingHint() {\n if (this.mProgressDialog != null && this.mProgressDialog.isShowing()) {\n this.mProgressDialog.dismiss();\n }\n }", "public void popupWarning(ValidationResult vr) {\r\n JOptionPane.showMessageDialog(this, vr.message, \"VALIDATION WARNING\", JOptionPane.WARNING_MESSAGE);\r\n }", "private void showCancelEditDialog() {\n AppDialog dialog = new AppDialog();\n Bundle args = new Bundle();\n args.putInt(AppDialog.DIALOG_ID, DIALOG_ID_CANCEL_EDIT);\n args.putString(AppDialog.DIALOG_TITLE, \"Quit?\");\n args.putString(AppDialog.DIALOG_MESSAGE, getString(R.string.cancelEditDiag_message));\n args.putInt(AppDialog.DIALOG_POSITIVE_RID, R.string.cancelEditDiag_positive_caption);\n args.putInt(AppDialog.DIALOG_NEGATIVE_RID, R.string.cancelEditDiag_negative_caption);\n dialog.setArguments(args);\n dialog.show(fragmentManager, null);\n }", "public void undoableEditHappened() { }", "public void undoableEditHappened() { }", "private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {\r\n if (dataChanged) {\r\n /* Ask for confirmation by the user to save the information entered\r\n * in the database */\r\n int resultConfirm = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\r\n \"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n CoeusOptionPane.DEFAULT_YES);\r\n if (resultConfirm == 0) {\r\n try {\r\n saveRolodexInfo();\r\n }catch(Exception e){\r\n releaseUpdateLock();\r\n CoeusOptionPane.showErrorDialog(e.getMessage());\r\n }\r\n }else if (resultConfirm == 1) {\r\n dataSaved = false;\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }else {\r\n return;\r\n }\r\n }else{\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }", "public void save () {\r\n String[] options = {\"Word List\", \"Puzzle\", \"Cancel\"};\r\n int result = JOptionPane.showOptionDialog (null, \"What Do You Want To Save?\", \"Save\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);\r\n if (result == 0) {\r\n fileManager.saveWords (words);\r\n } else if (result == 1){\r\n fileManager.savePuzzle (puzzle);\r\n }\r\n }", "public ConfirmationDialog getDialog() {\n\t\tif (null == fDlg) {\n\t\t\tfDlg = new ConfirmationDialog(getFrame(), getConfig(), \"dlg.abandonChanges\");\n\n\t\t\tString[] values = { ((Questionaire) getApp()).getCurrentDoc().getTitle() };\n\t\t\t\n\t\t\tString title = fDlg.getTitle();\n\t\t\t\t\t\t\n\t\t\ttitle = SwingCreator.replacePlaceHolders(title, values);\n\t\t\t\t\t\t\n\t\t\tfDlg.setTitle(title);\n\t\t\t\t\t\t\n\t\t\t((Questionaire) getApp()).getCurrentDoc().addPropertyChangeListener(\"title\", new PropertyChangeListener() {\n\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\n\t\t\t\t\tString[] values = { (String) evt.getNewValue() };\n\t\t\t\t\tString title = getConfig(\"dlg.abandonChanges.title\");\n\t\t\t\t\t\n\t\t\t\t\ttitle = SwingCreator.replacePlaceHolders(title, values);\n\t\t\t\t\t\n\t\t\t\t\tgetDialog().setTitle(title);\n\t\t\t\t}\n\t\t\t});\t\t\t\n\t\t}\n\n\t\treturn fDlg;\n\t}", "private void saveAndCloseWindow() {\n String tempNote = noteContent.getText();\n\n if (!tempNote.trim().isEmpty()) {\n note.setNoteText(new NoteText(tempNote));\n dialogStage.close();\n } else {\n displayFeedbackLabelEmptyMessage();\n }\n }", "public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n Toast.makeText(getApplicationContext(),\"You Don't want to restore\",\n Toast.LENGTH_SHORT).show();\n }", "public void showUnsolvableMessage() {\n\t\tJOptionPane.showMessageDialog(frame, \"Det angivna sudokut är olösbart\");\n\t}", "public void actionPerformed(java.awt.event.ActionEvent evt) {\n if (!askSave()) {\n return;\n }\n setSaveTitle(\"*untilted\");\n text.setText(\"\");\n file = null;\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (!askSave()) {\n return;\n }\n System.exit(0);\n }", "private boolean askSave() {\n if (isNeedSaving()) {\n int option = JOptionPane.showConfirmDialog(form,\n \"Do you want to save the change?\", \"Save\", JOptionPane.YES_NO_CANCEL_OPTION);\n //direct code base on user choice\n switch (option) {\n case JOptionPane.YES_OPTION:\n //check if file is null\n if (file == null) {\n //check if user cancel save option\n if (!saveAs()) {\n return false;\n }\n } else {\n //check if user cancel save option\n if (!save()) {\n return false;\n }\n }\n break;\n case JOptionPane.CANCEL_OPTION:\n return false;\n }\n }\n return true;\n }", "private boolean checkProgramChanged(int i)\r\n\t{\r\n\t\tBoolean bool = true;\r\n\t\tif (isPaneModified(i)) {\r\n\t\t\tparentFrame.showProgram();\r\n\t\t\tsetSelectedIndex(i);\r\n\t\t\tString message = Messages\r\n\t\t\t\t.getString(\"EditorFrame.tab.discardChanges.confirm\"); //$NON-NLS-1$\r\n\t\t\tString title = Messages\r\n\t\t\t\t.getString(\"EditorFrame.program.discardChanges.confirmTitle\"); //$NON-NLS-1$\r\n\t\t\tObject[] options = { Messages.getString(\"tangara.yes\"), //$NON-NLS-1$\r\n\t\t\t\tMessages.getString(\"tangara.cancel\") }; //$NON-NLS-1$\r\n\t\t\tint answer = JOptionPane.showOptionDialog(this, message, title,\r\n\t\t\t\tJOptionPane.OK_CANCEL_OPTION,\r\n\t\t\t\tJOptionPane.QUESTION_MESSAGE,\r\n\t\t\t\tnull, // do not use a custom Icon\r\n\t\t\t\toptions, // the titles of buttons\r\n\t\t\t\toptions[0]);\r\n\t\t\tif (answer != JOptionPane.OK_OPTION)\r\n\t\t\t\tbool = false;\r\n\t\t}\r\n\t\treturn bool;\r\n\t}", "public void warning() {\n\t\tLog.i(TAG, \"SafeSpeed.warning()\");\n\t\tLog.i(TAG, \"Screen on: \" + pm.isScreenOn() + \" isOpen: \" + !settings.getBoolean(\"isOpen\", false));\n\t\n\t\tif(pm.isScreenOn() && !settings.getBoolean(\"isOpen\", false)) {\n\t\t\teditor.putBoolean(\"isOpen\", true);\n\t\t editor.commit();\n\t\t \n\t\t alert.show(); \n\t\t}\n\t}", "private void saveAsButton(){\n SaveAsLabNameTextField.setText(\"\");\n SaveAsErrorLabel.setVisible(false);\n SaveAsDialog.setVisible(true);\n }", "public void doRevertToSaved()\n {\n super.doRevertToSaved();\n revalidateSyntax();\n }", "public void onClick(DialogInterface dialog, int id) {\n editor.putBoolean(getResources().getString(R.string.dont_ask_again), true);\n editor.commit();\n dialog.cancel();\n }", "private void openExitWindowConfirmation() {\n\t\t// int opcion = JOptionPane.showConfirmDialog(this, \"Desea salir del\n\t\t// Chat\", \"Confirmación\",\n\t\t// JOptionPane.YES_NO_OPTION);\n\t\t// if (opcion == JOptionPane.YES_OPTION) {\n\t\tthis.setVisible(false);\n\t\t// }\n\t}", "public void windowClosing(WindowEvent e) {\n if (!askSave()) {\n return;\n }\n System.exit(0);\n }", "@Override\n\tprotected void okPressed() {\n\t\tfor (int i = 0; i < LAST_USED_PREF_IDS.length; i++) {\n\t\t\tlatencyPrefs.setValue(LAST_USED_PREF_IDS[i], localValues.get(LAST_USED_PREF_IDS[i]));\n\t\t}\n\t\t// Save the show dialog pref\n\t\tlatencyPrefs.setValue(Constants.DONT_SHOW_DIALOG, dontShowDialog);\n\t\tsavePreferences();\n\n\t\tsuper.okPressed();\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (ta.getText().trim().length() > 0) {\n\t\t\t\t\tint re = -1;\n\t\t\t\t\tif (isChanged)\n\t\t\t\t\t\tre = JOptionPane.showConfirmDialog(f, \"변경된 내용을 저장하시겠습니까?\", \"확인\",\n\t\t\t\t\t\t\t\tJOptionPane.YES_NO_CANCEL_OPTION);\n\n\t\t\t\t\tSystem.out.println(\"new \" + re);\n\t\t\t\t\tif (re == 0) {\n\t\t\t\t\t\tsaveFile();\n\t\t\t\t\t\tfile = null;\n\t\t\t\t\t\tta.setText(\"\");\n\t\t\t\t\t} else if (re == 1) {\n\t\t\t\t\t\tfile = null;\n\t\t\t\t\t\tta.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t\tta.setText(\"\");\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tInvoker.getInstance()\n\t\t\t\t\t.executeCommand(new GraphicElementEditCommitCommand(model, dialog.getGraphicElement()));\n\t\t\tdialog.setVisible(false);\n\t\t}", "protected void actionPerformedCancel ()\n {\n Preferences rootPreferences = Preferences.systemRoot ();\n PreferencesTableModel rootPrefTableModel = new PreferencesTableModel (rootPreferences);\n rootPrefTableModel.undo ();\n Preferences userPreferences = Preferences.userRoot ();\n PreferencesTableModel userPrefTableModel = new PreferencesTableModel (userPreferences);\n userPrefTableModel.undo ();\n this.setVisible (false);\n this.dispose ();\n }" ]
[ "0.77142215", "0.76993936", "0.75571877", "0.7502584", "0.7493065", "0.7473395", "0.7473395", "0.7473395", "0.74687225", "0.746612", "0.74489826", "0.7439147", "0.7435423", "0.7427428", "0.74236125", "0.74143314", "0.7381002", "0.7315648", "0.7284008", "0.71627575", "0.71132153", "0.6791111", "0.6784029", "0.65965396", "0.65870357", "0.6578097", "0.6331846", "0.62154937", "0.6109792", "0.6077881", "0.60678804", "0.60154015", "0.6008292", "0.59908414", "0.598417", "0.5944766", "0.59389246", "0.5906846", "0.5891521", "0.5876573", "0.587585", "0.5875448", "0.5873102", "0.5866409", "0.58653694", "0.58450866", "0.5842318", "0.5830321", "0.58122057", "0.57591265", "0.57591265", "0.573255", "0.5726939", "0.5726822", "0.572299", "0.5722191", "0.5709404", "0.57082254", "0.570033", "0.56942403", "0.5689373", "0.56656104", "0.5661566", "0.5660388", "0.5652955", "0.5647391", "0.56461644", "0.56460774", "0.56420165", "0.56364924", "0.5632772", "0.5622617", "0.56124985", "0.56056845", "0.5600431", "0.55930513", "0.55781764", "0.5571818", "0.5571767", "0.5571767", "0.5567749", "0.5563514", "0.5560098", "0.5553127", "0.5544009", "0.55322224", "0.5512511", "0.55117685", "0.5503428", "0.55027235", "0.54909027", "0.5488266", "0.54841065", "0.54714733", "0.54679185", "0.5460185", "0.54589915", "0.5454144", "0.5449033", "0.544663" ]
0.7328069
17
User clicked the "Keep editing" button, so dismiss the dialog and continue editing the Product.
public void onClick(DialogInterface dialog, int id) { if (dialog != null) { dialog.dismiss(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void editProduct() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter Product Id - \");\n\t\t\tint productId = getValidInteger(\"Enter Product Id -\");\n\t\t\twhile (!CartController.getInstance().isProductPresentInCart(\n\t\t\t\t\tproductId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id - \");\n\t\t\t\tproductId = getValidInteger(\"Enter Product Id -\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter new Quantity of Product\");\n\t\t\tint quantity = getValidInteger(\"Enter new Quantity of Product\");\n\t\t\tCartController.getInstance().editProductFromCart(productId,\n\t\t\t\t\tquantity);\n\t\t} else {\n\t\t\tDisplayOutput.getInstance().displayOutput(\n\t\t\t\t\t\"\\n-----Cart Is Empty----\\n\");\n\t\t}\n\t}", "@FXML\n void cancelModifyProductButton(ActionEvent event) throws IOException {\n\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Alert\");\n alert.setContentText(\"Are you sure you want cancel changes and return to the main screen?\");\n Optional<ButtonType> result = alert.showAndWait();\n\n if (result.isPresent() && result.get() == ButtonType.OK) {\n mainScreen(event);\n }\n }", "@FXML\n\tprivate void handleEditProducts() {\n\t\tboolean okClicked = showProducts();\n\t\tsaveCurrentAcknowledgment();\n\t\tsetAcknowledgment(acknowledgment);\n\t}", "public void editProduct(SiteProduct product) {\n showForm(product != null);\n //form.editProduct(product);\n }", "Product editProduct(Product product);", "private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}", "@Override\n\tpublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n\t\tIEditProductDialogListener activity = (IEditProductDialogListener)getActivity();\n\t\tactivity.onFinishEditDescription(editDiscription.getText().toString());\n\t\tthis.dismiss();\n return true;\n\n\t}", "@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}", "@Override\n public void onBackPressed() {\n if (!mProductHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "@FXML\n\tpublic void disableProduct(ActionEvent event) {\n\t\tif (!txtNameDisableProduct.getText().equals(\"\")) {\n\t\t\tList<Product> searchedProducts = restaurant.findSameProduct(txtNameDisableProduct.getText());\n\t\t\tif (!searchedProducts.isEmpty()) {\n\t\t\t\ttry {\n\t\t\t\t\tfor (int i = 0; i < searchedProducts.size(); i++) {\n\t\t\t\t\t\tsearchedProducts.get(i).setCondition(Condition.INACTIVE);\n\t\t\t\t\t}\n\t\t\t\t\trestaurant.saveProductsData();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"El producto ha sido deshabilitado\");\n\t\t\t\t\tdialog.setTitle(\"Producto Deshabilitado\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t\ttxtNameDisableProduct.setText(\"\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los productos\");\n\t\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Este Producto no existe\");\n\t\t\t\tdialog.setTitle(\"Error, objeto no existente\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Debe ingresar el nombre del producto\");\n\t\t\tdialog.setTitle(\"Error\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to a click on the \"Save\" menu option\n case R.id.action_save:\n // Save Product to database\n saveProduct();\n String nameString = mNameEditText.getText().toString().trim();\n String PriceString = mPriceEditText.getText().toString().trim();\n String quantityString = mQuantityEditText.getText().toString().trim();\n // validate all the required information\n if (!(TextUtils.isEmpty(nameString) || (quantityString.equalsIgnoreCase(\"0\")) || TextUtils.isEmpty(PriceString))) {\n // Exit activity\n finish();\n }\n\n return true;\n // Respond to a click on the \"Delete\" menu option\n case R.id.action_delete:\n // Pop up confirmation dialog for deletion\n showDeleteConfirmationDialog();\n return true;\n // Respond to a click on the \"Up\" arrow button in the app bar\n case android.R.id.home:\n // If the pet hasn't changed, continue with navigating up to parent activity\n // which is the {@link CatalogActivity}.\n if (!mPetHasChanged) {\n NavUtils.navigateUpFromSameTask(EditorActivity.this);\n return true;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that\n // changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, navigate to parent activity.\n NavUtils.navigateUpFromSameTask(EditorActivity.this);\n }\n };\n\n // Show a dialog that notifies the user they have unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tInvoker.getInstance().executeCommand(\n\t\t\t\t\tnew GraphicElementEditCancelCommand(model, dialog.getGraphicElement(), previousShapes));\n\t\t\tGraphicElementInvoker.getInstance().abortSession();\n\t\t\tdialog.setVisible(false);\n\t\t}", "public String editProduct() {\n ConversationContext<Product> ctx = ProductController.newEditContext(products.getSelectedRow());\n ctx.setLabelWithKey(\"part_products\");\n ctx.setCallBack(editProductCallBack);\n getCurrentConversation().setNextContextSub(ctx);\n return ctx.view();\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the Product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public void handleDeleteProducts()\n {\n Product productToDelete = getProductToModify();\n\n if (productToDelete != null)\n {\n // Ask user for confirmation to remove the product from product table\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation\");\n alert.setHeaderText(\"Delete Confirmation\");\n alert.setContentText(\"Are you sure you want to delete this product?\");\n ButtonType confirm = new ButtonType(\"Yes\", ButtonBar.ButtonData.YES);\n ButtonType deny = new ButtonType(\"No\", ButtonBar.ButtonData.NO);\n ButtonType cancel = new ButtonType(\"Cancel\", ButtonBar.ButtonData.CANCEL_CLOSE);\n alert.getButtonTypes().setAll(confirm, deny, cancel);\n alert.showAndWait().ifPresent(type ->{\n if (type == confirm)\n {\n // User cannot delete products with associated parts\n if (productToDelete.getAllAssociatedParts().size() > 0)\n {\n Alert alert2 = new Alert(Alert.AlertType.ERROR);\n alert2.setTitle(\"Action is Forbidden!\");\n alert2.setHeaderText(\"Action is Forbidden!\");\n alert2.setContentText(\"Products with associated parts cannot be deleted!\\n \" +\n \"Please remove associated parts from product and try again!\");\n alert2.show();\n }\n else\n {\n // delete the product\n inventory.deleteProduct(productToDelete);\n updateProducts();\n productTable.getSelectionModel().clearSelection();\n }\n }\n });\n }\n else\n {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Input Invalid\");\n alert.setHeaderText(\"No product was selected!\");\n alert.setContentText(\"Please select a product to delete from the part table!\");\n alert.show();\n }\n this.productTable.getSelectionModel().clearSelection();\n }", "private void endingAction() {\n this.detectChanges();\n if (this.isModifed) {\n //System.out.println(JOptionPane.showConfirmDialog(null, \"Do you want to save unsaved changes?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION));\n switch (JOptionPane.showConfirmDialog(null, \"Do you want to save current data?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION)) {\n case 0: {\n if (this.file != null) {\n INSTANCE.saveData();\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n case 1: {\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n //cancel op 2\n //no op 1\n //yes op 0\n } else {\n INSTANCE.dispose();\n System.exit(0);\n }\n }", "public void onCancelClicked(View view) {\n\n if(mEditMode){\n //remove the item from database\n getContentResolver().delete(SavingsContentProvider.CONTENT_URI, SavingsItemEntry._ID + \"=\" + mSavingsBean.getId(), null);\n Log.d(Constants.LOG_TAG, \"Edit Mode, delete existing savings item:\");\n Log.d(Constants.LOG_TAG, mSavingsBean.toString());\n //Go back to Dashboard\n Utils.gotoDashBoard(this);\n finish();\n }else{\n finish();\n }\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tInvoker.getInstance()\n\t\t\t\t\t.executeCommand(new GraphicElementEditCommitCommand(model, dialog.getGraphicElement()));\n\t\t\tdialog.setVisible(false);\n\t\t}", "protected void exitEditMode(){\n editName.setEnabled(false);\n editEmail.setEnabled(false);\n saveButton.setVisibility(View.INVISIBLE);\n }", "private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {\r\n if (dataChanged) {\r\n /* Ask for confirmation by the user to save the information entered\r\n * in the database */\r\n int resultConfirm = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\r\n \"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n CoeusOptionPane.DEFAULT_YES);\r\n if (resultConfirm == 0) {\r\n try {\r\n saveRolodexInfo();\r\n }catch(Exception e){\r\n releaseUpdateLock();\r\n CoeusOptionPane.showErrorDialog(e.getMessage());\r\n }\r\n }else if (resultConfirm == 1) {\r\n dataSaved = false;\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }else {\r\n return;\r\n }\r\n }else{\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }", "private void showUnsavedChangesDialog(DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void confirmExit() {\n if (hasChanges()) {\n new AlertDialog.Builder(this).\n setMessage(R.string.dialog_discard_msg).\n setNegativeButton(R.string.dialog_discard_neg, (dialog, which) -> {}).\n setPositiveButton(R.string.dialog_discard_pos, (dialog, which) -> finish()).\n create().\n show();\n }\n else {\n showToast(R.string.toast_no_changes);\n finish();\n }\n }", "@Override\r\n\t\tpublic boolean editItem() {\n\t\t\treturn false;\r\n\t\t}", "@Override\n public void showDiscardDialog() {\n //Creating an AlertDialog with a message, and listeners for the positive, neutral and negative buttons\n AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity());\n //Set the Message\n builder.setMessage(R.string.product_config_unsaved_changes_dialog_message);\n //Set the Positive Button and its listener\n builder.setPositiveButton(R.string.product_config_unsaved_changes_dialog_positive_text, mUnsavedDialogOnClickListener);\n //Set the Negative Button and its listener\n builder.setNegativeButton(R.string.product_config_unsaved_changes_dialog_negative_text, mUnsavedDialogOnClickListener);\n //Set the Neutral Button and its listener\n builder.setNeutralButton(R.string.product_config_unsaved_changes_dialog_neutral_text, mUnsavedDialogOnClickListener);\n //Lock the Orientation\n OrientationUtility.lockCurrentScreenOrientation(requireActivity());\n //Create and display the AlertDialog\n builder.create().show();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish(); // go back to previous activity when item not cascade deleted\n\n }", "public void Editproduct(Product objproduct) {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\tUpdateActivity.this.finish();\r\n\t\t\t}", "@Override\n public void onBackPressed() {\n if (!mHasProductInfoChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "@FXML\n\tpublic void updateProduct(ActionEvent event) {\n\t\tProduct productToUpdate = restaurant.returnProduct(LabelProductName.getText());\n\t\tif (!txtUpdateProductName.getText().equals(\"\") && !txtUpdateProductPrice.getText().equals(\"\")\n\t\t\t\t&& selectedIngredients.isEmpty() == false) {\n\n\t\t\ttry {\n\t\t\t\tproductToUpdate.setName(txtUpdateProductName.getText());\n\t\t\t\tproductToUpdate.setPrice(txtUpdateProductPrice.getText());\n\t\t\t\tproductToUpdate.setSize(ComboUpdateSize.getValue());\n\t\t\t\tproductToUpdate.setType(toProductType(ComboUpdateType.getValue()));\n\t\t\t\tproductToUpdate.setIngredients(toIngredient(selectedIngredients));\n\n\t\t\t\tproductToUpdate.setEditedByUser(restaurant.returnUser(empleadoUsername));\n\n\t\t\t\trestaurant.saveProductsData();\n\t\t\t\tproductOptions.clear();\n\t\t\t\tproductOptions.addAll(restaurant.getStringReferencedIdsProducts());\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Producto actualizado satisfactoriamente\");\n\t\t\t\tdialog.setTitle(\"Proceso Satisfactorio\");\n\t\t\t\tdialog.show();\n\n\t\t\t\ttxtUpdateProductName.setText(\"\");\n\t\t\t\ttxtUpdateProductPrice.setText(\"\");\n\t\t\t\tComboUpdateSize.setValue(\"\");\n\t\t\t\tComboUpdateType.setValue(\"\");\n\t\t\t\tChoiceUpdateIngredients.setValue(\"\");\n\t\t\t\tLabelProductName.setText(\"\");\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los productos\");\n\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tFXMLLoader optionsFxml = new FXMLLoader(getClass().getResource(\"Options-window.fxml\"));\n\t\t\t\toptionsFxml.setController(this);\n\t\t\t\tParent opWindow = optionsFxml.load();\n\t\t\t\tmainPaneLogin.getChildren().setAll(opWindow);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "public void deleteProduct()\n {\n ObservableList<Product> productRowSelected;\n productRowSelected = productTableView.getSelectionModel().getSelectedItems();\n int index = productTableView.getSelectionModel().getFocusedIndex();\n Product product = productTableView.getItems().get(index);\n if(productRowSelected.isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"Please select the Product you want to delete.\");\n alert.show();\n } else if (!product.getAllAssociatedParts().isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"This Product still has a Part associated with it. \\n\" +\n \"Please modify the Product and remove the Part.\");\n alert.show();\n } else {\n alert.setAlertType(Alert.AlertType.CONFIRMATION);\n alert.setContentText(\"Are you sure you want to delete this Product?\");\n alert.showAndWait();\n ButtonType result = alert.getResult();\n if(result == ButtonType.OK)\n {\n Inventory.deleteProduct(product);\n }\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n // if result code 100\n if (resultCode == 100) {\n // if result code 100 is received\n // means user edited/deleted product\n // reload this screen again\n\n }\n\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n // if result code 100\n if (resultCode == 100) {\n // if result code 100 is received\n // means user edited/deleted product\n // reload this screen again\n\n }\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdgView.stopEditMode();\n\t\t\t\tbtn_edit_com.setVisibility(View.GONE);\n\t\t\t}", "private void editButtonMouseClicked(java.awt.event.MouseEvent evt) {\n if(storeStock.size() == 0){\n JOptionPane.showMessageDialog(this, \"No Stock Present To Edit\", \"\", JOptionPane.ERROR_MESSAGE);\n return;\n }\n //End Bug Fix : Nothing Shown In \"EDIT EXISTING STOCK\" If Store Does Not Have Any Stock\n current = 0;\n medicineIdField.setEditable(false);\n addButton.setVisible(false);\n editButton.setVisible(false);\n displayCurrentStock();\n showFields(true);\n updateInventorySaveButton.setText(\"Done Editing\");\n updateInventorySaveButton.setVisible(true);\n previousButton.setVisible(true);\n nextButton.setVisible(true);\n }", "private void toggleSave() {\n mNameBox.setEnabled(!mIsEditMode);\n mPriceBox.setEnabled(!mIsEditMode);\n if (mIsEditMode) {\n if (!mIsError) {\n applyChanges();\n } else {\n mIsError = false;\n }\n mEditButton.setText(R.string.edit);\n mImm.hideSoftInputFromWindow(mNameBox.getWindowToken(), 0);\n mDeleteText.setVisibility(View.VISIBLE);\n } else {\n mEditButton.setText(R.string.save);\n mImm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);\n mDeleteText.setVisibility(View.GONE);\n }\n mIsEditMode = !mIsEditMode;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to a click on the \"Save\" menu option\n case R.id.action_insert_new_product:\n if(currentProductUri == null) {\n insertNewProduct();\n }else {\n updateProduct();\n }\n return true;\n // Respond to a click on the \"Delete\" menu option\n case R.id.action_delete_product:\n showDeleteConfirmationDialog();\n return true;\n // Respond to a click on the \"Up\" arrow button in the app bar\n case android.R.id.home: {\n // If the product hasn't changed, continue with navigating up to parent activity\n // which is the {@link MainActivity}.\n if (!mProductHasChanged) {\n NavUtils.navigateUpFromSameTask(EditorActivity.this);\n return true;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that\n // changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, navigate to parent activity.\n NavUtils.navigateUpFromSameTask(EditorActivity.this);\n }\n };\n\n // Show a dialog that notifies the user they have unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n return true;\n }\n case R.id.action_contact_supplier:{\n contactSupplier();\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@FXML\n\tprivate void handleOk(){\n\t\tif(isInputValid()){\n\t\t\tproduct.setName(nameField.getText());\n\t\t\tproduct.setAmountAvailable(Integer.parseInt(amountAvailableField.getText()));\n\t\t\tproduct.setAmountSold(Integer.parseInt(amountSoldField.getText()));\n\t\t\tproduct.setPriceEach(Integer.parseInt(priceEachField.getText()));\n\t\t\tproduct.setPriceMake(Integer.parseInt(priceMakeField.getText()));\n\t\t\t// Converts the values to ints and then subtracts\n\t\t\tproduct.setProfit(Integer.parseInt(priceEachField.getText())-Integer.parseInt(priceMakeField.getText()));\n\t\t\t// Converts the values to ints, subtracts, and then multiplies\n\t\t\tproduct.setMoney((Integer.parseInt(priceEachField.getText())-Integer.parseInt(priceMakeField.getText()))*Integer.parseInt(amountSoldField.getText()));\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\t\n\t\t}\n\t}", "@FXML\n public void exit(){\n try {\n InventoryData.getInstance().storePartIdIndex();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Stage stage = (Stage) cancelButton.getScene().getWindow();\n stage.close();\n PassableData.setIsModifyPart(false);\n }", "@Override\n public void onClick(View v) {\n String note = edit_note.getText().toString().trim();\n noteDialog.dismiss();\n setNote(note);\n }", "@Override\n public void onClick(View v) {\n ClearInputTextFields();\n enterAnotherJob.setEnabled(false);\n compareCurrent.setEnabled(false);\n saveJobOffer.setEnabled(true);\n cancel.setEnabled(true);\n }", "private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {\n PAK_ISSUE_SALE_DB data= new PAK_ISSUE_SALE_DB();\n if(data.chech_qty(connAA,invNo.getText())){\n// if(data.chech_order_or_sale(connAA,invNo.getText())){// invno present in Customer leger or not\n forBackBtnEnable(false); recEditBtnEnable(false);textFieldsEditable(true);saveUpdateBtnVisible(\"update\", true);sellers1=(String)suppName.getSelectedItem();refNo1=refNo.getText();remarks1=remarks.getText();\n// }else{\n// JFrame j=new JFrame();j.setAlwaysOnTop(true);\n// JOptionPane.showMessageDialog(j,\n// \"You can not edit the delivered stock because it is generated from Sales Order\",\n// \"InfoBox: \", JOptionPane.INFORMATION_MESSAGE);\n }else{\n JFrame j=new JFrame();j.setAlwaysOnTop(true);\n JOptionPane.showMessageDialog(j,\n \"You can't Edit or Delete this invoice Due to Entry Of Sales Return.\"\n + \"\\nFor Edit or Delete First Go to the Return Page & Set text '0' in Issue Adjustment\",\n \"InfoBox: \", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "private void cancel(ActionEvent e){\r\n // Clear textfields\r\n clearFields();\r\n // If coming from appt management screen, go back there\r\n if (fromAppt){\r\n goToManageApptScreen();\r\n }\r\n // Otherwise, set the current client to null and go to the landing page \r\n else {\r\n currClient = null;\r\n LandingPage.returnToLandingPage();\r\n }\r\n }", "public void handleModifyProducts()\n {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/UI/Views/product.fxml\"));\n Parent root = null;\n try {\n root = (Parent) fxmlLoader.load();\n\n if (getProductToModify() != null)\n {\n // Get controller and configure controller settings\n ProductController productController = fxmlLoader.getController();\n productController.setModifyProducts(true);\n productController.setProductToModify(getProductToModify());\n productController.setInventory(inventory);\n productController.setHomeController(this);\n productController.updateParts();\n\n // Spin up product form\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.initStyle(StageStyle.DECORATED);\n stage.setTitle(\"Modify Products\");\n stage.setScene(new Scene(root));\n stage.show();\n }\n else\n {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Input Invalid\");\n alert.setHeaderText(\"No product was selected!\");\n alert.setContentText(\"Please select a product to modify from the product table!\");\n alert.show();\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener){\n //Create an AlertDialog.Builder and set the message, and click listeners\n //for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Discard your changes and quit editing?\");\n builder.setPositiveButton(\"Discard\", discardButtonClickListener);\n builder.setNegativeButton(\"Keep Editing\", new DialogInterface.OnClickListener(){\n public void onClick(DialogInterface dialog, int id) {\n //User clicked the \"Keep editing\" button, so dismiss the dialog\n //and continue editing the item.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n //Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (!askSave()) {\n return;\n }\n System.exit(0);\n }", "@Override\n public void showDeleteProductDialog() {\n //Creating an AlertDialog with a message, and listeners for the positive and negative buttons\n AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity());\n //Set the Message\n builder.setMessage(R.string.product_config_delete_product_confirm_dialog_message);\n //Set the Positive Button and its listener\n builder.setPositiveButton(android.R.string.yes, mProductDeleteDialogOnClickListener);\n //Set the Negative Button and its listener\n builder.setNegativeButton(android.R.string.no, mProductDeleteDialogOnClickListener);\n //Lock the Orientation\n OrientationUtility.lockCurrentScreenOrientation(requireActivity());\n //Create and display the AlertDialog\n builder.create().show();\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\temerdialog.dismiss();\t\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\t\td5.dispose();\r\n\t\t\t\t\t\t\t\ttextField_productID_input.requestFocusInWindow();\r\n\t\t\t\t\t\t\t}", "public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n Toast.makeText(getApplicationContext(),\"You Don't want to restore\",\n Toast.LENGTH_SHORT).show();\n }", "private void showUnsavedChangesDialog(\r\n DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(\"Discard your changes and quit editing?\");\r\n builder.setPositiveButton(\"Discard\", discardButtonClickListener);\r\n builder.setNegativeButton(\"Keep Editing\", new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n // User clicked the \"Keep editing\" button, so dismiss the dialog\r\n // and continue editing the pet.\r\n if (dialog != null) {\r\n dialog.dismiss();\r\n }\r\n }\r\n });\r\n\r\n // Create and show the AlertDialog\r\n AlertDialog alertDialog = builder.create();\r\n alertDialog.show();\r\n }", "@FXML\n void saveModifyProductButton(ActionEvent event) throws IOException {\n\n try {\n int id = selectedProduct.getId();\n String name = productNameText.getText();\n Double price = Double.parseDouble(productPriceText.getText());\n int stock = Integer.parseInt(productInventoryText.getText());\n int min = Integer.parseInt(productMinText.getText());\n int max = Integer.parseInt(productMaxText.getText());\n\n if (name.isEmpty()) {\n AlartMessage.displayAlertAdd(5);\n } else {\n if (minValid(min, max) && inventoryValid(min, max, stock)) {\n\n Product newProduct = new Product(id, name, price, stock, min, max);\n\n assocParts.forEach((part) -> {\n newProduct.addAssociatedPart(part);\n });\n\n Inventory.addProduct(newProduct);\n Inventory.deleteProduct(selectedProduct);\n mainScreen(event);\n }\n }\n } catch (IOException | NumberFormatException e){\n AlartMessage.displayAlertAdd(1);\n }\n }", "@FXML void onActionModifyProductCancel(ActionEvent event) throws IOException {\n //cast as a button then as a stage to get the stage for the button\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n //load the new scene\n scene = FXMLLoader.load(getClass().getResource(\"/view/MainMenu.fxml\"));\n stage.setScene(new Scene(scene));\n stage.show();\n }", "@Override\n public void onBackPressed() {\n //If no changes occur, leave the app's activity\n if (!mPhoneProductHasChanged) {\n super.onBackPressed();\n return;\n }\n //Otherwise, if there are changes to the activity, display a dialog which prompts the user\n //whether he wants to enforce changes or not\n DialogInterface.OnClickListener discardButtonClickListener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //User clicked the \"discard\" button, exit the activity\n finish();\n }\n };\n showUnsavedChangesDialog(discardButtonClickListener);\n\n }", "public void purchaseProduct(ActionEvent actionEvent) {\r\n try {\r\n //Initialises a text input dialog.\r\n TextInputDialog dialog = new TextInputDialog(\"\");\r\n dialog.setHeaderText(\"Enter What Is Asked Below!\");\r\n dialog.setContentText(\"Please Enter A Product Name:\");\r\n dialog.setResizable(true);\r\n dialog.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\r\n\r\n //Takes in the users value\r\n Optional<String> result = dialog.showAndWait();\r\n //Makes the purchase and adds the transaction.\r\n String theResult = controller.purchaseProduct(result.get());\r\n //If the product isn't found.\r\n if (theResult.equals(\"Product Doesn't Match\")) {\r\n //Display an error message.\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.initStyle(StageStyle.UTILITY);\r\n alert.setHeaderText(\"Read Information Below!\");\r\n alert.setContentText(\"PRODUCT NOT FOUND! - CONTACT ADMINISTRATOR!\");\r\n alert.setResizable(true);\r\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\r\n alert.showAndWait();\r\n //If it is found.\r\n } else if (theResult.equals(\"Product Match!\")) {\r\n //Display a message saying that the product is found.\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.initStyle(StageStyle.UTILITY);\r\n alert.setHeaderText(\"Read Information Below!\");\r\n alert.setContentText(\"PRODUCT PURCHASED!\");\r\n alert.setResizable(true);\r\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\r\n alert.showAndWait();\r\n }//END IF/ELSE\r\n } catch (HibernateException e){\r\n //If the database disconnects then display an error message.\r\n ErrorMessage message = new ErrorMessage();\r\n message.errorMessage(\"DATABASE DISCONNECTED! - SYSTEM SHUTDOWN!\");\r\n System.exit(0);\r\n } //END TRY/CATCH\r\n }", "public void oncancel() {\r\n Users user = ui.getUser();\r\n newRating = ratingEJB.findByUserAndRecipe(user, recipe);\r\n\r\n if (newRating != null) {\r\n ratingEJB.removeRecipeRating(newRating);\r\n }\r\n }", "public void onEditAgendaItem() {\n AgendaItem agendaItem = outputAgendaItemsPreparation.getSelectionModel().getSelectedItem();\n\n if (agendaItem == null) {\n AlertHelper.showError(LanguageKey.ERROR_AGENDAITEM_NULL, null);\n return;\n }\n\n AgendaItemDialog agendaItemDialog = AgendaItemDialog.getNewInstance(agendaItem);\n if (agendaItemDialog == null) {\n // Exception already handled\n return;\n }\n Optional<AgendaItem> result = agendaItemDialog.showAndWait();\n if (!result.isPresent()) {\n return;\n }\n\n if (controller.editAgendaItem(result.get())) {\n return;\n }\n\n AlertHelper.showError(LanguageKey.ERROR_AGENDAITEM_EDIT, null);\n }", "@Override\n public void onClick(View v) {\n newdialog.dismiss();\n if (isForcedUpdate) {// 需要强制更新的时候,点击取消按钮,会退出程序\n loadingAct.finish();\n } else {\n loadingAct.goNextActivity();\n }\n }", "@Override\n public void onClick(View v) {\n for (ObjectStock s : product.getStocks()) {\n stockDataSource.deleteStock(s);\n }\n\n productDataSource.deleteProduct(product);\n popupWindowIsOn = false;\n popupWindow.dismiss();\n Toast toast = Toast.makeText(getBaseContext(),\n R.string.product_deleted, Toast.LENGTH_LONG);\n\n toast.show();\n\n finish();\n Intent i = new Intent(getBaseContext(), MyProducts.class);\n startActivity(i);\n }", "@Action\n public void acCancel() {\n setChangeObj(false);\n }", "@Action\n public void acCancel() {\n setChangeObj(false);\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the inventory item\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Discard your changes and quit editing?\");\n builder.setPositiveButton(\"Discard\", discardButtonClickListener);\n builder.setNegativeButton(\"Keep Editing\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@FXML private void handleAddProdDelete(ActionEvent event) {\n Part partDeleting = fxidAddProdSelectedParts.getSelectionModel().getSelectedItem();\n \n if (partDeleting != null) {\n //Display Confirm Box\n Alert confirmDelete = new Alert(Alert.AlertType.CONFIRMATION);\n confirmDelete.setHeaderText(\"Are you sure?\");\n confirmDelete.setContentText(\"Are you sure you want to remove the \" + partDeleting.getName() + \" part?\");\n Optional<ButtonType> result = confirmDelete.showAndWait();\n //If they click OK\n if (result.get() == ButtonType.OK) {\n //Delete the part.\n partToSave.remove(partDeleting);\n //Refresh the list view.\n fxidAddProdSelectedParts.setItems(partToSave);\n\n Alert successDelete = new Alert(Alert.AlertType.CONFIRMATION);\n successDelete.setHeaderText(\"Confirmation\");\n successDelete.setContentText(partDeleting.getName() + \" has been removed from product.\");\n successDelete.showAndWait();\n }\n } \n }", "@Override\n public void onClick(View v) {\n if (editEventId == null && proposal==null){\n if(canGoNext()){\n dialog = UbiQuoBusinessUtils.defaultProgressBar(\"Caricamento in corso\",getActivity());\n dialog.show();\n updateStaticData();\n submitEvent();\n }\n }\n\n if(editEventId != null){\n dialog = UbiQuoBusinessUtils.defaultProgressBar(\"Caricamento in corso\",getActivity());\n dialog.show();\n updateStaticData();\n editEvent(editEventId,editEventCity);\n }\n\n if(proposal != null){\n dialog = UbiQuoBusinessUtils.defaultProgressBar(\"Caricamento in corso\",getActivity());\n dialog.show();\n updateStaticData();\n submitProposal(proposal.getString(\"id\"));\n }\n }", "@Override\n public void onPositiveClick() {\n AbDialogUtil.removeDialog(ApplyAcitivity.this);\n quitThisActivity();\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.update_save:\n try {\n DialogUpdateNote(title);\n } catch (IOException e) {\n e.printStackTrace();\n }\n break;\n case R.id.update_cancel:\n dialog.dismiss();\n break;\n default:\n break;\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tisNewProduct = true;\n\t\t\t\tIntent intent = new Intent(context,AddProductActivity.class);\n\t\t\t\tstartActivityForResult(intent, REQUEST_SETPRODUCTITEM);\n\t\t\t}", "public void onClick(View view) {\n\n InputNameDialogListener activity = (InputNameDialogListener) getActivity() ;\n if(IsOnEditMode)\n {\n activity.onFinishBudgetDialog(new BudgetItemModel(BudgetItemModel.BudgetType.valueOf(type.getText().toString()) ,txtname.getText().toString(),Integer.parseInt(amount.getText().toString())),listPosition);\n\n }\n else\n {\n activity.onFinishBudgetDialog(new BudgetItemModel(BudgetItemModel.BudgetType.valueOf(type.getText().toString()) ,txtname.getText().toString(),Integer.parseInt(amount.getText().toString())));\n\n }\n\n //---dismiss the alert\n dismiss();\n }", "@FXML\n void cancelModifiedParts(MouseEvent event) {\n Alert alert = new Alert(AlertType.CONFIRMATION);\n alert.setTitle(\"\");\n alert.setHeaderText(\"Cancel modify part\");\n alert.setContentText(\"Are you sure you want to cancel?\");\n\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.OK) {\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/View/FXMLmain.fxml\"));\n View.MainScreenController controller = new MainScreenController(inventory);\n\n loader.setController(controller);\n Parent root = loader.load();\n Scene scene = new Scene(root);\n Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n stage.setScene(scene);\n stage.setResizable(false);\n stage.show();\n } catch (IOException e) {\n\n }\n } else {\n return;\n }\n\n }", "@Override\r\n\tpublic void onClick(View v) {\r\n\t\tif (v == okButton){\r\n\t\t\tif(dontShow.isChecked()){\r\n\t\t\tAlertDialog builder2 = new AlertDialog.Builder(this.parentcontext)\r\n .setTitle(\"Confirmation\")\r\n .setMessage(\"Are you sure about disabling instruction from next use\")\r\n .setPositiveButton(\"Submit\", new Dialog.OnClickListener() {\r\n\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n // Mark this version as read.\r\n \t\r\n \t\t\t\tSharedPreferences.Editor editor = prefs.edit();\r\n editor.putBoolean(CustomizeDialog.this.key, true);\r\n editor.commit();\r\n //dialogInterface.dismiss();\r\n \t\t\t}\r\n \r\n })\r\n .setNegativeButton(\"Cancel\", new Dialog.OnClickListener() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\t\t// Close the activity as they have declined the EULA\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n \t\r\n })\r\n .show();}\t\t\t\r\n\t\t\r\n\t\t\tdismiss();\r\n\t\t}\r\n\t}", "@Override\n public void onClick(View v) {\n LayoutInflater layoutInflater =\n (LayoutInflater) getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);\n View popupView =\n layoutInflater.inflate(R.layout.activity_popup_ok_cancel, null);\n popupWindow = new PopupWindow(popupView,\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.MATCH_PARENT);\n\n popupWindowIsOn = true;\n\n // Catch the elements of the pop-up Window\n TextView txtQuestion = (TextView) popupView.findViewById(R.id.txtQuestion);\n Button buttonOk = (Button) popupView.findViewById(R.id.buttonOk);\n Button buttonCancel = (Button) popupView.findViewById(R.id.buttonCancel);\n\n // Set actions to the elements of the pop up window\n txtQuestion.setText(R.string.suppress_product_are_you_sure);\n buttonOk.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // suppress all stocks linked with the product\n for (ObjectStock s : product.getStocks()) {\n stockDataSource.deleteStock(s);\n }\n\n productDataSource.deleteProduct(product);\n popupWindowIsOn = false;\n popupWindow.dismiss();\n Toast toast = Toast.makeText(getBaseContext(),\n R.string.product_deleted, Toast.LENGTH_LONG);\n\n toast.show();\n\n finish();\n Intent i = new Intent(getBaseContext(), MyProducts.class);\n startActivity(i);\n }\n });\n\n buttonCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n popupWindowIsOn = false;\n popupWindow.dismiss();\n }\n });\n\n buttonSuppress.post(new Runnable() {\n @Override\n public void run() {\n popupWindow.showAsDropDown(txtQuantityStorage, 0, -100);\n }\n });\n\n\n }", "public void popEditEntity()throws IOException {\n final Stage dialog = new Stage();\n dialog.setTitle(\"Editar entidad\");\n \n Parent root = FXMLLoader.load(getClass().getResource(\"/view/PopEditEntity.fxml\"));\n \n Scene xscene = new Scene(root);\n \n dialog.setResizable(false);\n dialog.initModality(Modality.APPLICATION_MODAL);\n dialog.initOwner((Stage) root.getScene().getWindow());\n \n dialog.setScene(xscene);\n dialog.showAndWait();\n dialog.resizableProperty().setValue(Boolean.FALSE);\n dialog.setResizable(false);\n dialog.close();\n\n }", "@FXML\n\tpublic void deleteProduct(ActionEvent event) {\n\t\tif (!txtDeleteProductName.getText().equals(\"\")) {\n\t\t\ttry {\n\n\t\t\t\tList<Product> productToDelete = restaurant.findSameProduct(txtDeleteProductName.getText());\n\t\t\t\tboolean delete = restaurant.deleteProduct(txtDeleteProductName.getText());\n\t\t\t\tif (delete == true) {\n\t\t\t\t\tfor (int i = 0; i < productOptions.size(); i++) {\n\t\t\t\t\t\tfor (int j = 0; j < productToDelete.size(); j++) {\n\t\t\t\t\t\t\tif (productOptions.get(i) != null && productOptions.get(i)\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(productToDelete.get(j).getReferenceId())) {\n\t\t\t\t\t\t\t\tproductOptions.remove(productToDelete.get(j).getReferenceId());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttxtDeleteProductName.setText(\"\");\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los productos\");\n\t\t\t\tdialog.setTitle(\"Error guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the item.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public void actionPerformed(ActionEvent ae) {\r\n //----Valida txt de Intentario---//\r\n validaTxt();\r\n //----Valida txt de Intentario---//\r\n int i = JOptionPane.showConfirmDialog(II, \"¿Seguro quiere modificar este producto?\");\r\n if (i == 0) {\r\n modificaDato();\r\n DTM.setRowCount(0);\r\n llenartabla();\r\n }\r\n }", "@Override\n public void onClick(View v)\n {\n begindialog.cancel();\n }", "@FXML void onActionModifyProductRemovePart(ActionEvent event) {\n Part selectedPart = associatedPartTableView.getSelectionModel().getSelectedItem();\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Do you want to delete this part?\");\n Optional<ButtonType> result = alert.showAndWait();\n if(result.isPresent() && result.get() == ButtonType.OK) {\n tmpAssociatedParts.remove(selectedPart);\n }\n }", "@Override\n \t\tpublic void onClick(View v) {\n \t\t mvalidateDialog.dismiss();\n \t\t}", "private void onCancelEditing() {\n setResponsePage(responsePage);\n }", "@FXML\n\tprivate void handleEdit() {\n\t\tCustomer customer = customerTable.getSelectionModel().getSelectedItem();\n\t\tshowCustomerInfoDialog(customer);\n\t}", "@Override\n\t\t\t\t\t\tpublic void doCancel() {\n\t\t\t\t\t\t\tcommonDialog.dismiss();\n\t\t\t\t\t\t}", "public void actionPerformed(ActionEvent evt) {\n\t\tsetEnabled(true);\n\t\t\n\t\tSwingUtils.showCentered(getFrame(), getDialog());\n\n\t\tif (ButtonConstants.OK == getDialog().getTerminatingButton()) {\t\t\n\t\t\tSystem.out.println(\"abandon changes in model\");\n\t\t\n\t\t\tsetEnabled(false);\n\t\t}\n\t}", "@FXML\n\tpublic void enableProduct(ActionEvent event) {\n\t\tif (!txtNameDisableProduct.getText().equals(\"\")) {\n\t\t\tList<Product> searchedProducts = restaurant.findSameProduct(txtNameDisableProduct.getText());\n\t\t\tif (!searchedProducts.isEmpty()) {\n\t\t\t\ttry {\n\t\t\t\t\tfor (int i = 0; i < searchedProducts.size(); i++) {\n\t\t\t\t\t\tsearchedProducts.get(i).setCondition(Condition.ACTIVE);\n\t\t\t\t\t}\n\t\t\t\t\trestaurant.saveProductsData();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"El producto ha sido habilitado\");\n\t\t\t\t\tdialog.setTitle(\"Producto Deshabilitado\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t\ttxtNameDisableProduct.setText(\"\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los productos\");\n\t\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\t\tdialog.show();\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Este producto no existe\");\n\t\t\t\tdialog.setTitle(\"Error\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Debe ingresar el nombre del producto\");\n\t\t\tdialog.setTitle(\"Error\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "public void onClick(DialogInterface dialog, int id) {\n editor.putBoolean(getResources().getString(R.string.dont_ask_again), true);\n editor.commit();\n dialog.cancel();\n }", "@Override\n public void saveButtonListener() {\n // Resets Error Label for resubmit.\n productErrorLabel.setVisible(false);\n productErrorLabel.setText(\"\");\n // If super's error checks are true for any changes to text fields.\n // Then set new values and update product.\n if (getFieldValues()) {\n this.product.setName(this.productName);\n this.product.setPrice(this.productPrice);\n this.product.setStock(this.productInv);\n this.product.setMax(this.productMax);\n this.product.setMin(this.productMin);\n Inventory.updateProduct(productIndex, this.product);\n // Close window\n Stage stage = (Stage) productSaveButton.getScene().getWindow();\n stage.close();\n }\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\teditRecipe(recipeString);\n\t\t\t\t\t\t\t\t\t\tsavedDialog();\n\t\t\t\t\t\t\t\t\t}", "private void cancel(){\n\t\tSPSSDialog.instance = null;\n\t\thide();\n\t}", "public Product getProductToModify()\n {\n if (productTable.getSelectionModel().getSelectedItem() != null)\n {\n return ((Product) productTable.getSelectionModel().getSelectedItem());\n }\n return null;\n }", "@Override\r\n\t \t\t\tpublic void onClick(View v) {\n\t \t\t\t\tdialogDetailConfirm.cancel();\r\n\t \t\t\t}", "public void verificaAlteracao() {\r\n if (produto != null) {\r\n dialog.getTfNome().setText(produto.getNome());\r\n dialog.getTfCodigoBarra().setText(produto.getCodigoBarra());\r\n dialog.getTfPrecoCompra().setText(produto.getPrecoCompra().toString());\r\n dialog.getTfPrecoVenda().setText(produto.getPrecoVenda().toString());\r\n dialog.getCbCategoria().setSelectedItem(produto.getCategoriaId());\r\n dialog.getCbFornecedor().setSelectedItem(produto.getFornecedorId());\r\n }\r\n }", "@FXML\r\n void actionCancelButton(ActionEvent event) throws IOException {\r\n\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Alert\");\r\n alert.setContentText(\"Do you want to cancel your changes and return to the main screen?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n returnToMainScreen(event);\r\n }\r\n }", "public void handleYesConfirmButtonAction(ActionEvent event) {\n if (updateItemPane.isVisible()){\n deleteItem();\n this.clearUpdateItemFields();\n }\n else if(updateCopyPane.isVisible()){\n deleteCopy();\n this.clearUpdateCopyFields();\n }\n maskPane.setVisible(false);\n confirmPane.setVisible(false);\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@Override\n public void onClick(View v) {\n noteDialog.dismiss();\n }", "private void saveChanges() {\n product.setName(productName);\n product.setPrice(price);\n\n viewModel.updateProduct(product, new OnAsyncEventListener() {\n @Override\n public void onSuccess() {\n Log.d(TAG, \"updateProduct: success\");\n Intent intent = new Intent(EditProductActivity.this, MainActivity.class);\n startActivity(intent);\n }\n\n @Override\n public void onFailure(Exception e) {\n Log.d(TAG, \"updateProduct: failure\", e);\n final androidx.appcompat.app.AlertDialog alertDialog = new androidx.appcompat.app.AlertDialog.Builder(EditProductActivity.this).create();\n alertDialog.setTitle(\"Can not save\");\n alertDialog.setCancelable(true);\n alertDialog.setMessage(\"Cannot edit this product\");\n alertDialog.setButton(androidx.appcompat.app.AlertDialog.BUTTON_NEGATIVE, \"ok\", (dialog, which) -> alertDialog.dismiss());\n alertDialog.show();\n }\n });\n }", "private void showUnsavedChangesDialog( DialogInterface.OnClickListener discardButtonClickListener ) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tbizOrder.SaveOrder(order);\r\n\t\t\t\t\t\t\t\t\tbizApp.CloseOrder(order);\r\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t\t\t\t\tdialog2.dismiss();\r\n\t\t\t\t\t\t\t\t\tfinish();\r\n\t\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(\r\n\t\t\t\t\t\t\t\t\t\t\tUITable.this);\r\n\t\t\t\t\t\t\t\t\tbuilder.setTitle(\r\n\t\t\t\t\t\t\t\t\t\t\t\"Please reinstall the software\")\r\n\t\t\t\t\t\t\t\t\t\t\t.show();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}", "@FXML\n public void cancelCust(ActionEvent event) {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Add Customer\");\n alert.setHeaderText(\"Confirmation\");\n alert.setContentText(\"Do you want to cancel your update to the customer?\");\n\n //Lambda expression used to receive confirmation from the user to leave the modify customer.\n alert.showAndWait().ifPresent((response ->\n {\n if (response == ButtonType.OK) {\n stage = (Stage)((Button) event.getSource()).getScene().getWindow();\n try {\n scene = FXMLLoader.load(getClass().getResource(\"../View_Controller/MainScreen.fxml\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n stage.setScene(new Scene(scene));\n stage.show();\n }\n }));\n }", "@Override\r\n\tpublic void ManageProduct() {\n\t\tint id = this.view.enterId();\r\n\t\tString name = this.view.enterName();\r\n\t\tfloat price = this.view.enterPrice();\r\n\t\tint quantity = this.view.enterQuantity();\r\n\t\t\r\n\t\tthis.model.updProduct(id, name, price, quantity);\r\n\t}" ]
[ "0.6809409", "0.6644516", "0.65843433", "0.63709575", "0.6355368", "0.62948585", "0.62882394", "0.62557274", "0.62338424", "0.62111115", "0.61921024", "0.6149299", "0.614346", "0.61380124", "0.61345536", "0.6110909", "0.6099003", "0.6096115", "0.6081563", "0.6070885", "0.60523385", "0.6035624", "0.6024656", "0.6014872", "0.60124606", "0.6005805", "0.6001771", "0.5985786", "0.5978897", "0.5974523", "0.59556574", "0.59556574", "0.5941342", "0.5936115", "0.5930093", "0.5924508", "0.59212416", "0.5916924", "0.5913749", "0.59049207", "0.5897468", "0.58846897", "0.5880291", "0.5874933", "0.5872973", "0.5858663", "0.58475685", "0.5845146", "0.5843084", "0.5838594", "0.58260375", "0.5824953", "0.5824416", "0.58207923", "0.58202016", "0.5798839", "0.57972556", "0.57963675", "0.57848", "0.57848", "0.5781353", "0.5776032", "0.577316", "0.5772632", "0.5768966", "0.5761694", "0.57614267", "0.5755064", "0.57462627", "0.5740459", "0.5719441", "0.57133234", "0.5712607", "0.5711046", "0.5705667", "0.5703072", "0.56963044", "0.56925035", "0.5690151", "0.5687414", "0.5684376", "0.5684332", "0.56810105", "0.5679463", "0.56724745", "0.56688774", "0.5668785", "0.56687784", "0.56652534", "0.56618166", "0.5659491", "0.565791", "0.56524265", "0.56524265", "0.56524265", "0.56477845", "0.564626", "0.5643366", "0.5641713", "0.5638339", "0.5635633" ]
0.0
-1
Prompt the user to confirm that they want to delete this Product.
private void showDeleteConfirmationDialog() { // Create an AlertDialog.Builder and set the message, and click listeners // for the positive and negative buttons on the dialog. AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(R.string.delete_dialog_msg); builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { // User clicked the "Delete" button, so delete the pet. deleteProduct(); } }); builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { // User clicked the "Cancel" button, so dismiss the dialog // and continue editing the Product. if (dialog != null) { dialog.dismiss(); } } }); // Create and show the AlertDialog AlertDialog alertDialog = builder.create(); alertDialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the product.\n deleteProduct();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public void deleteProduct()\n {\n ObservableList<Product> productRowSelected;\n productRowSelected = productTableView.getSelectionModel().getSelectedItems();\n int index = productTableView.getSelectionModel().getFocusedIndex();\n Product product = productTableView.getItems().get(index);\n if(productRowSelected.isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"Please select the Product you want to delete.\");\n alert.show();\n } else if (!product.getAllAssociatedParts().isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"This Product still has a Part associated with it. \\n\" +\n \"Please modify the Product and remove the Part.\");\n alert.show();\n } else {\n alert.setAlertType(Alert.AlertType.CONFIRMATION);\n alert.setContentText(\"Are you sure you want to delete this Product?\");\n alert.showAndWait();\n ButtonType result = alert.getResult();\n if(result == ButtonType.OK)\n {\n Inventory.deleteProduct(product);\n }\n }\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_products);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete products.\n deleteAllProducts();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_products_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the product.\n deleteAllProducts();\n }\n });\n builder.setNegativeButton(R.string.cancel, null);\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@Override\n public void showDeleteProductDialog() {\n //Creating an AlertDialog with a message, and listeners for the positive and negative buttons\n AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity());\n //Set the Message\n builder.setMessage(R.string.product_config_delete_product_confirm_dialog_message);\n //Set the Positive Button and its listener\n builder.setPositiveButton(android.R.string.yes, mProductDeleteDialogOnClickListener);\n //Set the Negative Button and its listener\n builder.setNegativeButton(android.R.string.no, mProductDeleteDialogOnClickListener);\n //Lock the Orientation\n OrientationUtility.lockCurrentScreenOrientation(requireActivity());\n //Create and display the AlertDialog\n builder.create().show();\n }", "public static void confirmSingleDeletion(final Context context, final Uri selectedProduct) {\n // create a dialog builder\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n\n // set the correct message\n builder.setMessage(context.getResources().getString(R.string.catalog_confirmation_delete_single));\n\n // delete on positive response\n builder.setPositiveButton(context.getResources().getString(R.string.catalog_confirmation_delete_single_pos), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n int rowsDeleted = context.getContentResolver().delete(selectedProduct, null, null);\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then display an error\n Toast.makeText(context, context.getResources().getString(R.string.catalog_data_clear_failed_toast),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, display a success messaGE\n Toast.makeText(context, context.getResources().getString(R.string.catalog_data_cleared_toast),\n Toast.LENGTH_SHORT).show();\n }\n // finish activity\n ((Activity) context).finish();\n }\n });\n\n // return on negative response\n builder.setNegativeButton(R.string.confirmation_dialog_cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@FXML private void handleAddProdDelete(ActionEvent event) {\n Part partDeleting = fxidAddProdSelectedParts.getSelectionModel().getSelectedItem();\n \n if (partDeleting != null) {\n //Display Confirm Box\n Alert confirmDelete = new Alert(Alert.AlertType.CONFIRMATION);\n confirmDelete.setHeaderText(\"Are you sure?\");\n confirmDelete.setContentText(\"Are you sure you want to remove the \" + partDeleting.getName() + \" part?\");\n Optional<ButtonType> result = confirmDelete.showAndWait();\n //If they click OK\n if (result.get() == ButtonType.OK) {\n //Delete the part.\n partToSave.remove(partDeleting);\n //Refresh the list view.\n fxidAddProdSelectedParts.setItems(partToSave);\n\n Alert successDelete = new Alert(Alert.AlertType.CONFIRMATION);\n successDelete.setHeaderText(\"Confirmation\");\n successDelete.setContentText(partDeleting.getName() + \" has been removed from product.\");\n successDelete.showAndWait();\n }\n } \n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the goal.\n deleteGoal();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@FXML\n\tpublic void deleteProduct(ActionEvent event) {\n\t\tif (!txtDeleteProductName.getText().equals(\"\")) {\n\t\t\ttry {\n\n\t\t\t\tList<Product> productToDelete = restaurant.findSameProduct(txtDeleteProductName.getText());\n\t\t\t\tboolean delete = restaurant.deleteProduct(txtDeleteProductName.getText());\n\t\t\t\tif (delete == true) {\n\t\t\t\t\tfor (int i = 0; i < productOptions.size(); i++) {\n\t\t\t\t\t\tfor (int j = 0; j < productToDelete.size(); j++) {\n\t\t\t\t\t\t\tif (productOptions.get(i) != null && productOptions.get(i)\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(productToDelete.get(j).getReferenceId())) {\n\t\t\t\t\t\t\t\tproductOptions.remove(productToDelete.get(j).getReferenceId());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttxtDeleteProductName.setText(\"\");\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los productos\");\n\t\t\t\tdialog.setTitle(\"Error guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "public void handleDeleteProducts()\n {\n Product productToDelete = getProductToModify();\n\n if (productToDelete != null)\n {\n // Ask user for confirmation to remove the product from product table\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation\");\n alert.setHeaderText(\"Delete Confirmation\");\n alert.setContentText(\"Are you sure you want to delete this product?\");\n ButtonType confirm = new ButtonType(\"Yes\", ButtonBar.ButtonData.YES);\n ButtonType deny = new ButtonType(\"No\", ButtonBar.ButtonData.NO);\n ButtonType cancel = new ButtonType(\"Cancel\", ButtonBar.ButtonData.CANCEL_CLOSE);\n alert.getButtonTypes().setAll(confirm, deny, cancel);\n alert.showAndWait().ifPresent(type ->{\n if (type == confirm)\n {\n // User cannot delete products with associated parts\n if (productToDelete.getAllAssociatedParts().size() > 0)\n {\n Alert alert2 = new Alert(Alert.AlertType.ERROR);\n alert2.setTitle(\"Action is Forbidden!\");\n alert2.setHeaderText(\"Action is Forbidden!\");\n alert2.setContentText(\"Products with associated parts cannot be deleted!\\n \" +\n \"Please remove associated parts from product and try again!\");\n alert2.show();\n }\n else\n {\n // delete the product\n inventory.deleteProduct(productToDelete);\n updateProducts();\n productTable.getSelectionModel().clearSelection();\n }\n }\n });\n }\n else\n {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Input Invalid\");\n alert.setHeaderText(\"No product was selected!\");\n alert.setContentText(\"Please select a product to delete from the part table!\");\n alert.show();\n }\n this.productTable.getSelectionModel().clearSelection();\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder to display a confirmation message about deleting the book\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.editor_activity_delete_message);\n builder.setPositiveButton(getString(R.string.editor_activity_delete_message_positive),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Delete\"\n deleteBook();\n }\n });\n\n builder.setNegativeButton(getString(R.string.editor_activity_delete_message_negative),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Cancel\"\n if (dialogInterface != null)\n dialogInterface.dismiss();\n }\n });\n\n // Create and show the dialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the inventory item.\n deleteItem();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the inventory item.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void confirmDelete(){\n\t\tAlertDialog.Builder dialog = new AlertDialog.Builder(this);\n\t\tdialog.setIcon(R.drawable.warning);\n\t\tdialog.setTitle(\"Confirm\");\n\t\tdialog.setMessage(\"Are you sure you want to Delete Selected Bookmark(s).?\");\n\t\tdialog.setCancelable(false);\n\t\tdialog.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdeleteBookmark();\n\t\t\t}\n\t\t});\n\t\tdialog.setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Pack and show\n\t\tAlertDialog alert = dialog.create();\n\t\talert.show();\n\t}", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteBook();\n finish();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteFav();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the fruit.\n deleteFruit();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the fruit.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deletePet();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg_course);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteCourse();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(R.string.delete_dialog_msg);\r\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n // User clicked the \"Delete\" button, so delete the pet.\r\n// deletePet();\r\n }\r\n });\r\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n // User clicked the \"Cancel\" button, so dismiss the dialog\r\n // and continue editing.\r\n if (dialog != null) {\r\n dialog.dismiss();\r\n }\r\n }\r\n });\r\n\r\n // Create and show the AlertDialog\r\n AlertDialog alertDialog = builder.create();\r\n alertDialog.show();\r\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteEmployee();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public void onActionDeleteProduct(ActionEvent actionEvent) throws IOException {\r\n\r\n try {\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to delete the selected item?\");\r\n\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n\r\n if (productsTableView.getSelectionModel().getSelectedItem() != null) {\r\n Product product = productsTableView.getSelectionModel().getSelectedItem();\r\n if (product.getAllAssociatedParts().size() == 0) {\r\n\r\n Inventory.deleteProduct(productsTableView.getSelectionModel().getSelectedItem());\r\n Parent root = FXMLLoader.load(getClass().getResource(\"/View_Controller/mainScreen.fxml\"));\r\n Stage stage = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow();\r\n Scene scene = new Scene(root, 1062, 498);\r\n stage.setTitle(\"Main Screen\");\r\n stage.setScene(scene);\r\n stage.show();\r\n } else {\r\n Alert alert2 = new Alert(Alert.AlertType.ERROR);\r\n alert2.setContentText(\"Products with associated parts cannot be deleted.\");\r\n alert2.showAndWait();\r\n }\r\n }\r\n else {\r\n Alert alert3 = new Alert(Alert.AlertType.ERROR);\r\n alert3.setContentText(\"Click on an item to delete.\");\r\n alert3.showAndWait();\r\n }\r\n }\r\n }\r\n catch (NullPointerException n) {\r\n //ignore\r\n }\r\n }", "public boolean getUserConfirmation() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation Box\");\n alert.setHeaderText(\"Are you sure you want to delete?\");\n alert.setResizable(false);\n Optional<ButtonType> result = alert.showAndWait();\n ButtonType button = result.orElse(ButtonType.CANCEL);\n\n if (button == ButtonType.OK) {\n return true;\n } else {\n return false;\n }\n }", "public void showSucceedDeleteDialog() {\n\t\tString msg = getApplicationContext().getResources().getString(\n\t\t\t\tR.string.MSG_DLG_LABEL_DELETE_ITEM_SUCCESS);\n\t\tfinal AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n\t\t\t\tthis);\n\t\talertDialogBuilder\n\t\t\t\t.setMessage(msg)\n\t\t\t\t.setCancelable(false)\n\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\tgetApplicationContext().getResources().getString(\n\t\t\t\t\t\t\t\tR.string.MSG_DLG_LABEL_OK),\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\tstartActivity(getIntent());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\tAlertDialog alertDialog = alertDialogBuilder.create();\n\t\talertDialog.show();\n\n\t}", "private void deleteProduct() {\n // Only perform the delete if this is an existing product.\n if (currentProductUri != null) {\n // Call the ContentResolver to delete the product at the given content URI.\n // Pass in null for the selection and selection args because the currentProductUri\n // content URI already identifies the product that we want.\n int rowsDeleted = getContentResolver().delete(currentProductUri, null, null);\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.no_deleted_products),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_product_successful), Toast.LENGTH_SHORT).show();\n }\n }\n finish();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n // Set the message.\n builder.setMessage(R.string.delete_dialog_msg);\n\n // Handle the button clicks.\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteBook();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteBook();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public void showDeleteConfirmationDialog(){\n //Create an AlertDialog.Builder and set the message, and click listeners\n //for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Delete this item?\");\n builder.setPositiveButton(\"Delete\", new DialogInterface.OnClickListener(){\n public void onClick(DialogInterface dialog, int id){\n //User clicked the \"Delete\" button, so delete the item.\n deleteItem();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener(){\n public void onClick(DialogInterface dialog, int id){\n //User clicked the \"Cancel\" button, so dismiss the dialog\n //and continue editing the item.\n if(dialog != null){\n dialog.dismiss();\n }\n }\n });\n\n //Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@FXML\n\tprivate void deleteButtonAction(ActionEvent clickEvent) {\n\t\t\n\t\tPart deletePartFromProduct = partListProductTable.getSelectionModel().getSelectedItem();\n\t\t\n\t\tif (deletePartFromProduct != null) {\n\t\t\t\n\t\t\tAlert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Pressing OK will remove the part from the product.\\n\\n\" + \"Are you sure you want to remove the part?\");\n\t\t\n\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\n\t\t\tif (result.isPresent() && result.get() == ButtonType.OK) {\n\t\t\t\n\t\t\t\tdummyList.remove(deletePartFromProduct);\n\n\t\t\t}\n\t\t}\n\t}", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteAllBooks();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message\n // This also creates click listeners for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the phone.\n deletePhone();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the phone.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(R.string.delete_book_warning);\r\n builder.setPositiveButton(R.string.delete_button, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n deletebook();\r\n }\r\n });\r\n builder.setNegativeButton(R.string.cancel_button, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n if (dialogInterface != null) {\r\n dialogInterface.dismiss();\r\n }\r\n }\r\n });\r\n\r\n //show alert dialog upon deletion\r\n AlertDialog alertDialog = builder.create();\r\n alertDialog.show();\r\n }", "@FXML\n\tprivate void handleDelete() {\n\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\talert.getButtonTypes().clear();\n\t\talert.getButtonTypes().addAll(ButtonType.YES, ButtonType.NO);\n\t\talert.setHeaderText(lang.getString(\"deleteCustomerMessage\"));\n\t\talert.initOwner(stage);\n\t\talert.showAndWait()\n\t\t.filter(answer -> answer == ButtonType.YES)\n\t\t.ifPresent(answer -> {\n\t\t\tCustomer customer = customerTable.getSelectionModel().getSelectedItem();\n\t\t\tdeleteCustomer(customer);\n\t\t});\n\t}", "public void deleteProduct() {\n deleteButton.click();\n testClass.waitTillElementIsVisible(emptyShoppingCart);\n Assert.assertEquals(\n \"Message is not the same as expected\",\n MESSAGE_EMPTY_SHOPPING_CART,\n emptyShoppingCart.getText());\n }", "@FXML\r\n public void onDelete() {\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Mensagem\");\r\n alert.setHeaderText(\"\");\r\n alert.setContentText(\"Deseja excluir?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.get() == ButtonType.OK) {\r\n AlunoModel alunoModel = tabelaAluno.getItems().get(tabelaAluno.getSelectionModel().getSelectedIndex());\r\n\r\n if (AlunoDAO.executeUpdates(alunoModel, AlunoDAO.DELETE)) {\r\n tabelaAluno.getItems().remove(tabelaAluno.getSelectionModel().getSelectedIndex());\r\n alert(\"Excluido com sucesso!\");\r\n desabilitarCampos();\r\n } else {\r\n alert(\"Não foi possivel excluir\");\r\n }\r\n }\r\n }", "@FXML\n\t private void deleteProduct (ActionEvent actionEvent) throws SQLException, ClassNotFoundException {\n\t try {\n\t ProductDAO.deleteProdWithId(prodIdText.getText());\n\t resultArea.setText(\"Product deleted! Product id: \" + prodIdText.getText() + \"\\n\");\n\t } catch (SQLException e) {\n\t resultArea.setText(\"Problem occurred while deleting product \" + e);\n\t throw e;\n\t }\n\t }", "private void addConfirmDialog() {\n builder = UIUtil.getConfirmDialog(getContext(),\"You are about to delete data for this payment. proceed ?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n boolean isDeleted = mydb.deletePayment(paymentId);\n if(isDeleted) {\n Bundle bundle = new Bundle();\n bundle.putString(\"orderId\", String.valueOf(orderId));\n FragmentViewPayments mfragment = new FragmentViewPayments();\n UIUtil.refreshFragment(mfragment,bundle, getFragmentManager());\n } else {\n Toast.makeText(getContext(),\"Error deleting data!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "void confirm();", "private void deleteProduct() {\n // Only perform the delete if this is an existing Product.\n if (mCurrentProductUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentProductUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentProductUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_product_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_product_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "public void verifyProduct() throws Throwable{\r\n\t\twdlib.waitForElement(getProductText());\r\n\t\t\r\n\t\tif(!getProductText().getText().equals(\"None Included\"))\r\n\t\t{\r\n\t\t\tReporter.log(getProductText().getText()+\" was deleted\",true);\r\n\t\t\tdeleteProduct();\r\n\t\t}\r\n\t\t\r\n\t}", "@FXML\r\n void onActionDeletePart(ActionEvent event) {\r\n\r\n Part part = TableView2.getSelectionModel().getSelectedItem();\r\n if(part == null)\r\n return;\r\n\r\n //EXCEPTION SET 2 REQUIREMENT\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setHeaderText(\"You are about to delete the product you have selected!\");\r\n alert.setContentText(\"Are you sure you wish to continue?\");\r\n\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.get() == ButtonType.OK){\r\n product.deleteAssociatedPart(part.getId());\r\n }\r\n }", "public void deletePart()\n {\n ObservableList<Part> partRowSelected;\n partRowSelected = partTableView.getSelectionModel().getSelectedItems();\n if(partRowSelected.isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"Please select the Part you want to delete.\");\n alert.show();\n } else {\n int index = partTableView.getSelectionModel().getFocusedIndex();\n Part part = Inventory.getAllParts().get(index);\n alert.setAlertType(Alert.AlertType.CONFIRMATION);\n alert.setContentText(\"Are you sure you want to delete this Part?\");\n alert.showAndWait();\n ButtonType result = alert.getResult();\n if (result == ButtonType.OK) {\n Inventory.deletePart(part);\n }\n }\n }", "@FXML void onActionModifyProductRemovePart(ActionEvent event) {\n Part selectedPart = associatedPartTableView.getSelectionModel().getSelectedItem();\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Do you want to delete this part?\");\n Optional<ButtonType> result = alert.showAndWait();\n if(result.isPresent() && result.get() == ButtonType.OK) {\n tmpAssociatedParts.remove(selectedPart);\n }\n }", "private void showConfirmationDeleteDialog(\n DialogInterface.OnClickListener yesButtonClickListener) {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.are_you_sure);\n builder.setPositiveButton(R.string.yes, yesButtonClickListener);\n builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the Item.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public void deleteButtonClicked(View view) {\n String inputText = johnsInput.getText().toString();\n dbHandler.deleteProduct(inputText);\n printDatabase();\n }", "public String confirm()\n\t{\n\t\tconfirm = true;\n\t\treturn su();\n\t}", "@FXML\r\n private void deletePartAction() throws IOException {\r\n \r\n if (!partsTbl.getSelectionModel().isEmpty()) {\r\n Part selected = partsTbl.getSelectionModel().getSelectedItem();\r\n \r\n Alert message = new Alert(Alert.AlertType.CONFIRMATION);\r\n message.setTitle(\"Confirm delete\");\r\n message.setHeaderText(\" Are you sure you want to delete part ID: \" + selected.getId() + \", name: \" + selected.getName() + \"?\" );\r\n message.setContentText(\"Please confirm your selection\");\r\n \r\n Optional<ButtonType> response = message.showAndWait();\r\n if (response.get() == ButtonType.OK)\r\n {\r\n stock.deletePart(selected);\r\n partsTbl.setItems(stock.getAllParts());\r\n partsTbl.refresh();\r\n displayMessage(\"The part \" + selected.getName() + \" was successfully deleted\");\r\n }\r\n else {\r\n displayMessage(\"Deletion cancelled by user. Part not deleted.\");\r\n }\r\n }\r\n else {\r\n displayMessage(\"No part selected for deletion\");\r\n }\r\n }", "private void actionDelete() {\r\n showDeleteDialog();\r\n }", "public void Confirm(){\n new AlertDialog.Builder(MapsActivity.this)\n .setTitle(\"Confirm Location\")\n .setMessage(\"Are you sure about this location?\")\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // continue with delete\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // do nothing\n }\n })\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }", "private void confirmationAlert() {\n\t\tAlert confirm = new Alert( AlertType.CONFIRMATION, \"You Will Not Be Able To Change Your Name\\nAfter You Press 'OK'.\");\n\t\tconfirm.setHeaderText(\"Are You Sure?\");\n confirm.setTitle(\"Confirm Name\");\n confirm.showAndWait().ifPresent(response -> {\n if (response == ButtonType.OK) {\n \tbackground.remove( pointer );\n \tkeyStrokes = keyStrokes.replace(\" \", \"-\");\n\t\t\t\tinsertNewHiScore();\n\t\t\t\tnewHighScore = false;\n }\n });\n\t}", "private void showConfirmDeletionDialog(){\n //give builder our custom dialog fragment style\n new AlertDialog.Builder(this, R.style.dialogFragment_title_style)\n .setMessage(getString(R.string.powerlist_confirmRemoval))\n .setTitle(getString(R.string.powerList_confirmRemoval_title))\n .setPositiveButton(getString(R.string.action_remove),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n myActionListener.userDeletingPowersFromList(\n PowerListActivity.this.adapter.getSelectedSpells());\n deleteButton.setVisibility(View.GONE);\n //tell adapter to switch selection mode off\n PowerListActivity.this.adapter.endSelectionMode();\n }\n })\n .setNegativeButton(getString(R.string.action_cancel), null)\n .show();\n }", "public String btn_confirm_delete_action()\n {\n //delete the accession\n getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n deleteSemental(\n getgermplasm$SementalSessionBean().getDeleteSemental());\n //refresh the list\n getgermplasm$SementalSessionBean().getPagination().deleteItem();\n getgermplasm$SementalSessionBean().getPagination().refreshList();\n getgermplasm$SemenGatheringSessionBean().setPagination(null);\n \n //show and hidde panels\n this.getMainPanel().setRendered(true);\n this.getAlertMessage().setRendered(false);\n MessageBean.setSuccessMessageFromBundle(\"delete_semental_success\", this.getMyLocale());\n \n return null;\n }", "@FXML\n public void confirmStudentDelete(ActionEvent e) {\n Student s = handledStudent;\n DBhandler db = new DBhandler();\n String title =\"Confirm delete\";\n String HeaderText = \"Student will be permanently deleted\";\n String ContentText = \"Are you sure you want to delete this student?\";\n\n AlertHandler ah = new AlertHandler();\n\n if (ah.getConfirmation(title, HeaderText, ContentText) == ButtonType.OK) {\n System.out.println(\"Ok pressed\");\n db.deleteStudentFromDatabase(s);\n Cancel(new ActionEvent());\n } else {\n System.out.println(\"Cancel pressed\");\n }\n }", "public void execute() {\n if (myItemSelection.getSize() > 0) {\n confirmationDialogbox = new ConfirmationDialogbox(constants.deleteRolesDialogbox(), patterns.deleteRolesWarn( myItemSelection.getSelectedItems().size()), constants.okButton(), constants.cancelButton());\n confirmationDialogbox.addCloseHandler(new CloseHandler<PopupPanel>(){\n public void onClose(CloseEvent<PopupPanel> event) {\n if(confirmationDialogbox.getConfirmation()){\n deleteSelectedItems();\n }\n }} );\n } else {\n if (myMessageDataSource != null) {\n myMessageDataSource.addWarningMessage(messages.noRoleSelected());\n }\n } \n \n }", "private void delete() {\n DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n switch (which){\n case DialogInterface.BUTTON_POSITIVE:\n setResult(RESULT_OK, null);\n datasource.deleteContact(c);\n dbHelper.commit();\n finish();\n break;\n\n case DialogInterface.BUTTON_NEGATIVE:\n //Do Nothing\n break;\n }\n }\n };\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(getString(R.string.confirm_delete) + (c==null?\"\":c.getName()) + \"?\").setPositiveButton(getString(R.string.yes), dialogClickListener)\n .setNegativeButton(getString(R.string.no), dialogClickListener).show();\n }", "public void handleRemoveItem(ActionEvent actionEvent) {\n\t\tString id = txtDisID.getText();\n\n\t\tAlert alert = new Alert(Alert.AlertType.CONFIRMATION);\n\t\talert.setTitle(\"Confirmation Dialog\");\n\t\talert.setHeaderText(\"Are you sure, you want to remove this item?\");\n\t\talert.setContentText(\"this item will remove permanently from the database.\");\n\n\t\tif(!id.isEmpty() && id != null){\n\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\tif (result.get() == ButtonType.OK){\n\t\t\t\ttry {\n\t\t\t\t\tItemDAO.deleteItemById(id);\n\t\t\t\t\trefreshTable();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tExp.displayException(e);\n\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\tExp.displayException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\talert = new Alert(Alert.AlertType.ERROR);\n\t\t\talert.setTitle(\"Error\");\n\t\t\talert.setHeaderText(\"There is no selected item to Remove\");\n\t\t\talert.setContentText(\"Please select the item before remove !\");\n\n\t\t\talert.showAndWait();\n\t\t}\n\t}", "@FXML\n\tpublic void deleteProductType(ActionEvent event) {\n\t\tif (!txtDeleteProductTypeName.getText().equals(\"\")) {\n\t\t\ttry {\n\t\t\t\tboolean remove = restaurant.deleteproductType(txtDeleteProductTypeName.getText());\n\t\t\t\tif (remove == true) {\n\t\t\t\t\ttypeOptions.remove(txtDeleteProductTypeName.getText());\n\t\t\t\t\ttxtDeleteProductTypeName.setText(\"\");\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los datos\");\n\t\t\t\tdialog.setTitle(\"Error guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}", "public static Boolean confirmDeletion() {\n final AtomicReference<Boolean> reference = new AtomicReference<>(false);\n\n TopsoilNotification.showNotification(\n TopsoilNotification.NotificationType.VERIFICATION,\n \"Delete Table\",\n \"Do you really want to delete this table?\\n\"\n + \"This operation can not be undone.\"\n ).ifPresent(response -> {\n if (response == ButtonType.OK) {\n reference.set(true);\n }\n });\n\n return reference.get();\n }", "private void confirmDeleteLog() {\n new AlertDialog.Builder(this)\n .setTitle(R.string.confirm_delete_log_title)\n .setMessage(R.string.confirm_delete_log_message)\n .setPositiveButton(R.string.btn_delete_log, (dialog, which) -> {\n service.deleteEntireAuditLog();\n dialog.dismiss();\n })\n .setNegativeButton(R.string.btn_cancel, (dialog, which) -> dialog.dismiss())\n .show();\n }", "@FXML\n private void confirmDeletionOfRecords(){\n ObservableList<Record> recordsToBeDeleted = tbvRecords.getSelectionModel().getSelectedItems();\n\n DBhandler db = new DBhandler();\n String title =\"Confirm delete\";\n String HeaderText = \"Record(s) will be permanently deleted\";\n String ContentText = \"Are you sure you want to delete this data?\";\n AlertHandler ah = new AlertHandler();\n\n if(recordsToBeDeleted.isEmpty()){\n ah.getTableError();\n }\n else{\n if (ah.getConfirmation(title, HeaderText, ContentText) == ButtonType.OK) {\n System.out.println(\"Ok pressed\");\n db.deleteRecordsFromDatabase(recordsToBeDeleted);\n populateRecords();\n } else {\n System.out.println(\"Cancel pressed\");\n }\n }}", "public void buttonDelete(View view) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(UserEditActivity.this);\n builder.setMessage(R.string.text_delete_confirmation)\n .setTitle(R.string.text_attention_title)\n .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Delete the record confirmed\n deleteRecord();\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "@FXML\n private void handleBookDeleteOption(ActionEvent event) {\n Book selectedItem = tableViewBook.getSelectionModel().getSelectedItem();\n if (selectedItem == null) {\n AlertMaker.showErrorMessage(\"No book selected\", \"Please select book for deletion.\");\n return;\n }\n if (DatabaseHandler.getInstance().isBookAlreadyIssued(selectedItem)) {\n AlertMaker.showErrorMessage(\"Cant be deleted\", \"This book is already issued and cant be deleted.\");\n return;\n }\n //confirm the opertion\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Deleting Book\");\n Stage stage = (Stage) alert.getDialogPane().getScene().getWindow();\n UtilitiesBookLibrary.setStageIcon(stage);\n alert.setHeaderText(null);\n alert.setContentText(\"Are u sure u want to Delete the book ?\");\n Optional<ButtonType> response = alert.showAndWait();\n if (response.get() == ButtonType.OK) {\n \n boolean result = dbHandler.deleteBook(selectedItem);\n if (result == true) {\n AlertMaker.showSimpleAlert(\"Book delete\", selectedItem.getTitle() + \" was deleted successfully.\");\n observableListBook.remove(selectedItem);\n } else {\n AlertMaker.showSimpleAlert(\"Failed\", selectedItem.getTitle() + \" unable to delete.\");\n\n }\n } else {\n AlertMaker.showSimpleAlert(\"Deletion Canclled\", \"Deletion process canclled.\");\n\n }\n\n }", "@FXML\n\tpublic void deleteIngredient(ActionEvent event) {\n\t\tif (!txtDeleteIngredientName.getText().equals(\"\")) {\n\t\t\ttry {\n\t\t\t\tboolean delete = restaurant.deleteIngredient(txtDeleteIngredientName.getText());\n\t\t\t\tif (delete == true) {\n\t\t\t\t\tingredientsOptions.remove(txtDeleteIngredientName.getText());\n\t\t\t\t\ttxtDeleteIngredientName.setText(\"\");\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los datos\");\n\t\t\t\tdialog.setTitle(\"Error guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t} else {\n\t\t\ttxtDeleteIngredientName.setText(null);\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "public void handleDeleteParts()\n {\n Part partToDelete = getPartToModify();\n\n if (partToDelete != null) {\n\n // Ask user for confirmation to remove the product from part table\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation\");\n alert.setHeaderText(\"Delete Confirmation\");\n alert.setContentText(\"Are you sure you want to delete this part?\");\n ButtonType confirm = new ButtonType(\"Yes\", ButtonBar.ButtonData.YES);\n ButtonType deny = new ButtonType(\"No\", ButtonBar.ButtonData.NO);\n ButtonType cancel = new ButtonType(\"Cancel\", ButtonBar.ButtonData.CANCEL_CLOSE);\n alert.getButtonTypes().setAll(confirm, deny, cancel);\n alert.showAndWait().ifPresent(type ->{\n if (type == confirm)\n {\n inventory.deletePart(partToDelete);\n updateParts();\n }\n });\n\n } else {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Input Invalid\");\n alert.setHeaderText(\"No part was selected!\");\n alert.setContentText(\"Please select a part to delete from the part table!\");\n alert.show();\n }\n // Unselect parts in table after part is deleted\n partTable.getSelectionModel().clearSelection();\n }", "public String promptForEventId() throws KolinuxException {\n String id = getReplyFromPrompt();\n if (id.equalsIgnoreCase(NO)) {\n logger.log(Level.INFO, \"User cancelled the planner delete operation.\");\n throw new KolinuxException(CANCEL_DELETE_ERROR);\n }\n return id;\n }", "public void confirmarBusqueda(){\n\t\tList<Producto> productos=productoService.getByAll();\n\t\tfor(Producto p: productos){\n\t\t\tProductoEmpresa proEmpr = new ProductoEmpresa();\n\t\t\tproEmpr.setCantidad(p.getCantidad()==null?0.0:p.getCantidad());\n\t\t\tproEmpr.setPrecio(p.getCostoPublico()==null?0.0:p.getCostoPublico());\n\t\t\tEmpresa empr=new Empresa();\n\t\t\tempr.setEmpresaId(getEmpresaId());\n\t\t\tproEmpr.setEmpresaId(empr);\n\t\t\tproEmpr.setFechaRegistro(new Date());\n\t\t\tproEmpr.setProductoId(p);\n\t\t\tgetProductoEmpresaList().add(proEmpr);\n\t\t\tproductoEmpresaService.save(proEmpr);\t\t\n\t\t\tRequestContext.getCurrentInstance().execute(\"PF('confirmarBusqueda').hide();\");\n\t\t}\n\t\tFacesContext.getCurrentInstance().addMessage(null, new FacesMessage(\"Productos creados Exitosamente para la sucursal seleccionada\"));\n\t\tsetProductoEmpresaList(productoEmpresaService.getByEmpresa(getEmpresaId()));\n\t}", "public void showDeleteConfirmationAlertDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n //builder.setTitle(\"AlertDialog\");\n builder.setMessage(R.string.income_deletion_confirmation);\n\n // add the buttons\n builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n if (mIncome.getReceiptPic() != null) {\n if (!mIncome.getReceiptPic().equals(\"\")) {\n new File(mIncome.getReceiptPic()).delete();\n }\n }\n mDatabaseHandler.setPaymentLogEntryInactive(mIncome);\n //IncomeListFragment.incomeListAdapterNeedsRefreshed = true;\n setResult(MainActivity.RESULT_DATA_WAS_MODIFIED);\n IncomeViewActivity.this.finish();\n }\n });\n builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n }\n });\n\n // create and show the alert mDialog\n mDialog = builder.create();\n mDialog.show();\n }", "void deletePodcast(ActionEvent event){\n //removes context menu that was displaed\n cm.hide();\n //Creates and shows a pop-up that will prompt user to decide what happens to podcast\n Alert alert = new Alert(Alert.AlertType.NONE, \"Delete \"+this.podcast.getTitle()+\"?\", ButtonType.YES, ButtonType.NO, ButtonType.CANCEL);\n alert.showAndWait();\n\n //CASE: YES, deletes podcast\n if(alert.getResult() == ButtonType.YES){\n if(model.DEBUG)\n System.err.println(\"[LibCell] Deleting \"+this.podcast.getTitle());\n\n Main.model.deletePodcast(this.podcast);\n //CASE: NO, hides alert\n } else {\n alert.hide();\n }\n }", "private void delete(ActionEvent e){\r\n if (client != null){\r\n ConfirmBox.display(\"Confirm Deletion\", \"Are you sure you want to delete this entry?\");\r\n if (ConfirmBox.response){\r\n Client.deleteClient(client);\r\n AlertBox.display(\"Delete Client\", \"Client Deleted Successfully\");\r\n // Refresh view\r\n refresh();\r\n \r\n }\r\n }\r\n }", "@Override\n\t\t\tpublic void handle(ActionEvent arg0) {\n\n\t\t\t\tAlert alert = new Alert(AlertType.CONFIRMATION);\n\t\t\t\talert.setTitle(\"Confirm\");\n\t\t\t\talert.setHeaderText(null);\n\t\t\t\talert.setContentText(\"Delete this accout?\");\n\t\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\t\tif (result.get() == ButtonType.OK) {\n\t\t\t\t\tUser employee = table.getSelectionModel().getSelectedItem();\n\n\t\t\t\t\tif (employee == null) {\n\t\t\t\t\t\tAlert alert1 = new Alert(AlertType.INFORMATION);\n\t\t\t\t\t\talert1.setHeaderText(null);\n\t\t\t\t\t\talert1.setTitle(\"Customer Remove\");\n\t\t\t\t\t\talert1.setContentText(\"Please select a row in the table\");\n\t\t\t\t\t\talert1.showAndWait();\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tint username = employee.getId();\n\n\t\t\t\t\t\tuser.deleteUser(\"\" + username);\n\n\t\t\t\t\t\tObservableList<User> data = FXCollections.observableArrayList(employeeManager.getAllEmployees());\n\n\t\t\t\t\t\ttable.setItems(data);\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}", "public String productOpenNewDelete() {\n\t\tactionStartTime = new Date();\n\t\tresetToken(result);\n\t\ttry {\n\t\t\tpromotionProgramMgr.deletePromotionProductOpen(id);\n\t\t} catch (Exception e) {\n\t\t\tLogUtility.logErrorStandard(e, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.productOpenNewDelete\"), createLogErrorStandard(actionStartTime));\n\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_SYSTEM));\n\t\t\tresult.put(ERROR, true);\n\t\t}\n\t\treturn SUCCESS;\n\t}", "public void deleteRequest(Request request) {\n String title = \"Confirm delete of request(Y/N): \";\n if (Validation.confirmAction(title)) {\n if (Database.deleteRequest(request)) System.out.println(\"Request deleted successfully\");\n else System.out.println(\"Failed to delete request\");\n }else System.out.println(\"Delete of request aborted\");\n }", "public abstract boolean confirm();", "public void confirmRemove(View view) {\n if(networkID == null || networkID.equals(\"Select a Network\"))\n {\n Toast.makeText(getApplicationContext(), \"You must select a network\", Toast.LENGTH_LONG).show();\n return;\n }\n if(gatewayID == null || gatewayID.length() == 0)\n {\n Toast.makeText(getApplicationContext(), \"You must select a gateway\", Toast.LENGTH_LONG).show();\n return;\n }\n AlertDialog.Builder alert = new AlertDialog.Builder(RemoveGatewayActivity.this);\n alert.setTitle(\"Delete\");\n alert.setMessage(\"Are you sure you want to delete \" + gatewayName + \"?\");\n\n alert.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n removeGateway();\n dialog.dismiss();\n }\n });\n\n alert.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n alert.show();\n }", "@FXML\r\n void onActionDelete(ActionEvent event) throws IOException {\r\n\r\n Customer customerToDelete = customerTable.getSelectionModel().getSelectedItem();\r\n\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to delete customer ID# \" + customerToDelete.getID() + \", Name: \" + customerToDelete.getName());\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n\r\n DBCustomer.deleteCustomer(customerToDelete.getID());\r\n\r\n //Alert alert1 = new Alert(Alert.AlertType.WARNING, \"You have deleted customer ID# \" + customerToDelete.getID() + \", Name: \" + customerToDelete.getName());\r\n //Optional<ButtonType> result1 = alert.showAndWait();\r\n\r\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"/view/MainScreen.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n }\r\n\r\n }", "public void onClick(DialogInterface dialog, int id) {\n deleteProduct();\n }", "public void onClick(DialogInterface dialog, int id) {\n deleteProduct();\n }", "public void deleteProduct() throws ApplicationException {\n Menu deleteProduct = new Menu();\n deleteProduct.setIdProduct(menuFxObjectPropertyEdit.getValue().getIdProduct());\n\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n\n try {\n session.beginTransaction();\n session.delete(deleteProduct);\n session.getTransaction().commit();\n } catch (RuntimeException e) {\n session.getTransaction().rollback();\n SQLException sqlException = getCauseOfClass(e, SQLException.class);\n throw new ApplicationException(sqlException.getMessage());\n }\n\n initMenuList();\n }", "private void deleteDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.warmhint));\n\t\tbuilder.setMessage(getString(R.string.changequestion2));\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdeleteAllTag();\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\tgetString(R.string.successdelete),\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}", "private void removeProduct() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter Product Id - \");\n\t\t\tint productId = getValidInteger(\"Enter Product Id - \");\n\t\t\twhile (!CartController.getInstance().isProductPresentInCart(\n\t\t\t\t\tproductId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id - \");\n\t\t\t\tproductId = getValidInteger(\"Enter Product Id - \");\n\t\t\t}\n\t\t\tCartController.getInstance().removeProductFromCart(productId);\n\t\t} else {\n\t\t\tDisplayOutput.getInstance().displayOutput(\n\t\t\t\t\t\"\\n-----Cart Is Empty----\\n\");\n\t\t}\n\t}", "@Override\r\n\tpublic boolean deleteProduct(ProductDAO product) {\n\t\treturn false;\r\n\t}", "public void Deleteproduct(Product objproduct) {\n\t\t\n\t}", "private boolean promptNewOrder(String productName) {\r\n System.out.println(\"It doesn't look like you've placed this order before. \"\r\n + \"Would you like to place a new order for - \" + productName + \"?\\n\"\r\n + \"ENTER \\\"YES\\\" to Place a New Order or \\\"NO\\\" to continue.\");\r\n boolean responseIsYes;\r\n try {\r\n responseIsYes = scan.next().equalsIgnoreCase(\"yes\");\r\n } \r\n //if the user does not type anything, default to \"Yes\"\r\n catch(java.util.NoSuchElementException e){\r\n responseIsYes = true;\r\n }\r\n if (responseIsYes) {\r\n System.out.println(\"Thank you! A new Order will be placed.\\n\"\r\n + \"----------------------------------------------------------\");\r\n return true;\r\n }\r\n System.out.println(\"Thank you! This order has been cancelled.\\n\"\r\n + \"----------------------------------------------------------\");\r\n return false;\r\n }", "public void onPressDelete() {\r\n new ActionConfirmationFragment(this, this)\r\n .setTitle(getString(R.string.event_confirmation_delete_event))\r\n .setMessage(getString(R.string.action_confirmation_cannot_be_undone))\r\n .setRequestID(REQUEST_CONFIRMATION_DELETE_EVENT)\r\n .show(getSupportFragmentManager(), null);\r\n }", "@Override\r\n\tpublic int deleteProduct(Product product) {\n\t\treturn 0;\r\n\t}", "private void showDeleteDialog(String yesLabel, String noLabel, String messageText, final int parameterId){\n AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this,R.style.AppTheme_Dialog));\n builder.setMessage(messageText)\n .setPositiveButton(yesLabel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n new DeleteAquariumTask(parameterId).execute();\n }\n })\n .setNegativeButton(noLabel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n builder.create();\n builder.show();\n }", "@FXML\n void confirmDelete () {\n\n// cycles through all Elements to be deleted\n for (Element element : app.deleteElements) {\n\n// if it is a Timeline, it removes it\n if (element instanceof Timeline) {\n app.timelines.remove(element);\n }\n\n// if it is an Event, it finds the relevant Timeline, then removes the Event\n if (element instanceof Event) {\n for (Timeline timeline : app.timelines) {\n if (timeline == ((Event) element).timeline) {\n timeline.events.remove(element);\n }\n }\n }\n }\n\n exitDeleteWindow();\n\n// creates a message for the user\n setMessage(\"Exited Delete Mode: \" + app.deleteElements.size() + \" elements deleted\", false);\n }", "private void DeletebuttonActionPerformed(ActionEvent e) {\n int row = userTable.getSelectedRow();\n\n if (row == -1) {\n JOptionPane.showMessageDialog(ListUserForm.this, \"Vui lòng chọn user\", \"lỗi\", JOptionPane.ERROR_MESSAGE);\n } else {\n int confirm = JOptionPane.showConfirmDialog(ListUserForm.this, \"Bạn có chắc chắn xoá?\");\n\n if (confirm == JOptionPane.YES_OPTION) {\n\n int userid = Integer.parseInt(String.valueOf(userTable.getValueAt(row, 0)));\n\n userService.deleteUser(userid);\n\n defaultTableModel.setRowCount(0);\n setData(userService.getAllUsers());\n }\n }\n }", "private void handleConfirmEvent() {\n this.confirm = new Button(\"Add Food\");\n confirm.setOnAction(e2 -> {\n boolean valid = checkInputValidity();\n // if the inputs failed the validation test\n // return without calling refresh method to add a new food data\n if (valid == false)\n return;\n else\n addNewFoodItemRefresh(); // call the method to add a food item\n });\n\n }", "public void handleUpdateItemDeleteButtonAction(ActionEvent event) {\n confirmHeader.setText(\"Confirm delete action\");\n String text = \"are you sure you want to update this item?\";\n confirmText.setText(text);\n confirmPane.setVisible(true);\n maskPane.setVisible(true);\n this.handleOnShowAnimation(confirmMessageHolderPane);\n }", "@Step(\"Delete Account\")\n public void deleteAccount() {\n Driver.waitForElement(10).until(ExpectedConditions.visibilityOf(deleteAccountButton));\n deleteAccountButton.click();\n Driver.waitForElement(10).until(ExpectedConditions.visibilityOf(confirmDeleteButton));\n confirmDeleteButton.click();\n }", "public void confirmExit() {\n int resposta = JOptionPane.showConfirmDialog(this,\n \"Really exit?\", \"Exit\",\n JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE);\n if (resposta == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }", "@FXML\r\n void onActionDelete(ActionEvent event) throws IOException {\r\n\r\n Appointment toDelete = appointmentsTable.getSelectionModel().getSelectedItem();\r\n\r\n\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to delete appointment ID# \" + toDelete.getAppointmentID() + \" Title: \" + toDelete.getTitle()\r\n + \" Type: \" + toDelete.getType());\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n\r\n DBAppointments.deleteAppointment(toDelete.getAppointmentID());\r\n\r\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"/view/appointments.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n }\r\n }", "public void purchaseProduct(ActionEvent actionEvent) {\r\n try {\r\n //Initialises a text input dialog.\r\n TextInputDialog dialog = new TextInputDialog(\"\");\r\n dialog.setHeaderText(\"Enter What Is Asked Below!\");\r\n dialog.setContentText(\"Please Enter A Product Name:\");\r\n dialog.setResizable(true);\r\n dialog.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\r\n\r\n //Takes in the users value\r\n Optional<String> result = dialog.showAndWait();\r\n //Makes the purchase and adds the transaction.\r\n String theResult = controller.purchaseProduct(result.get());\r\n //If the product isn't found.\r\n if (theResult.equals(\"Product Doesn't Match\")) {\r\n //Display an error message.\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.initStyle(StageStyle.UTILITY);\r\n alert.setHeaderText(\"Read Information Below!\");\r\n alert.setContentText(\"PRODUCT NOT FOUND! - CONTACT ADMINISTRATOR!\");\r\n alert.setResizable(true);\r\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\r\n alert.showAndWait();\r\n //If it is found.\r\n } else if (theResult.equals(\"Product Match!\")) {\r\n //Display a message saying that the product is found.\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.initStyle(StageStyle.UTILITY);\r\n alert.setHeaderText(\"Read Information Below!\");\r\n alert.setContentText(\"PRODUCT PURCHASED!\");\r\n alert.setResizable(true);\r\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\r\n alert.showAndWait();\r\n }//END IF/ELSE\r\n } catch (HibernateException e){\r\n //If the database disconnects then display an error message.\r\n ErrorMessage message = new ErrorMessage();\r\n message.errorMessage(\"DATABASE DISCONNECTED! - SYSTEM SHUTDOWN!\");\r\n System.exit(0);\r\n } //END TRY/CATCH\r\n }", "private void delete_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_delete_btnActionPerformed\n // pull current table model\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n if (remindersTable.getSelectedRow() == -1) {\n if (remindersTable.getRowCount() == 0) {\n dm.messageEmptyTable();\n } else {\n dm.messageSelectLine();\n }\n } else {\n int input = JOptionPane.showConfirmDialog(frame, \"Do you want to Delete!\");\n // 0 = yes, 1 = no, 2 = cancel\n if (input == 0) {\n model.removeRow(remindersTable.getSelectedRow());\n dm.messageReminderDeleted();// user message;\n saveDataToFile();// Save changes to file\n getSum(); // Update projected balance\n } else {\n // delete canceled\n }\n }\n }", "@RequestMapping(value = \"delete/{id}\", method = RequestMethod.POST)\r\n\tpublic ModelAndView deleteConfirm(@ModelAttribute Person deletedPerson, @PathVariable int id) \r\n\t{\r\n\t\tString fullName = deletedPerson.getFirstName() + \" \" + deletedPerson.getLastName();\r\n\t\tpersonService.deletePerson(deletedPerson);\r\n\t\treturn new ModelAndView(\"deleteConfirm\", \"fullName\", fullName);\r\n\t}", "void delete(Product product) throws IllegalArgumentException;", "@FXML\n public void deleteSet(MouseEvent e) {\n //confirm first\n Alert confirmAlert = new Alert(AlertType.CONFIRMATION, \"\", ButtonType.YES, ButtonType.NO);\n confirmAlert.setHeaderText(\"Are you sure you want to delete this set?\");\n Optional<ButtonType> result = confirmAlert.showAndWait();\n if (result.get() == ButtonType.YES) {\n //delete from database\n try (\n Connection conn = dao.getConnection();\n PreparedStatement stmt = conn.prepareStatement(\"DELETE FROM Theory WHERE Title = ?\");\n ) {\n conn.setAutoCommit(false);\n stmt.setString(1, txtTitle.getText());\n stmt.executeUpdate();\n conn.commit();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n //delete from interface\n VBox vbxCards = (VBox) apnSetRow.getParent();\n vbxCards.getChildren().remove(apnSetRow);\n }\n }", "public void clickConfirmDeleteButton() {\n // GeneralUtilities.waitSomeSeconds(1);\n // validateElementText(titleConfirmDeleteToDo, \"Delete To-Do?\");\n // validateElementText(titleConfirmDeleteToDoDescription, \"Are you sure you'd like to delete these To-Dos? Once deleted, you will not be able to retrieve any documents uploaded on the comments in the selected To-Dos.\");\n // waitForCssValueChanged(divConfirmDeleteToDo, \"Div Confirm Delete ToDo\", \"display\", \"block\");\n //\n // hoverElement(buttonConfirmDeleteToDo, \"Button Confirm Delete ToDo\");\n waitForAnimation(divConfirmDeleteToDoAnimate, \"Div Confirm Delete ToDo Animation\");\n clickElement(buttonConfirmDeleteToDo, \"Button Confirm Delete ToDo\");\n waitForCssValueChanged(divConfirmDeleteToDo, \"Div Confirm Delete ToDo\", \"display\", \"none\");\n }" ]
[ "0.806434", "0.7422203", "0.74027663", "0.72269696", "0.7161068", "0.71523416", "0.7103145", "0.70911556", "0.7048825", "0.691969", "0.6859437", "0.6853279", "0.68409705", "0.6811377", "0.6782016", "0.6766541", "0.6760986", "0.67266566", "0.6715106", "0.6711705", "0.67083234", "0.6694946", "0.66668105", "0.6642625", "0.6634116", "0.66197675", "0.6600663", "0.6594574", "0.6527412", "0.65266514", "0.6511932", "0.64999676", "0.6460473", "0.6444353", "0.64354044", "0.6421075", "0.64033127", "0.63548136", "0.6354213", "0.6349461", "0.63477826", "0.634473", "0.62952554", "0.62516344", "0.62124956", "0.61952204", "0.6194116", "0.6183722", "0.6175587", "0.6174513", "0.61372364", "0.6126503", "0.6112022", "0.60972995", "0.60655737", "0.6042136", "0.60371876", "0.6031853", "0.6026376", "0.6007917", "0.5985888", "0.59768414", "0.596164", "0.5956119", "0.59548247", "0.5952537", "0.59505457", "0.5949671", "0.594252", "0.59258", "0.5911085", "0.5908707", "0.59076744", "0.58791286", "0.58764726", "0.5873067", "0.58658147", "0.58658147", "0.5864935", "0.58549327", "0.5852574", "0.5843624", "0.5842289", "0.5841135", "0.5839901", "0.583956", "0.58356166", "0.58236486", "0.58172464", "0.5816261", "0.58002245", "0.57986265", "0.57939756", "0.57938963", "0.5792828", "0.57913244", "0.5774758", "0.5767646", "0.57670194", "0.5764808" ]
0.7449902
1
User clicked the "Delete" button, so delete the pet.
public void onClick(DialogInterface dialog, int id) { deleteProduct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deletePet() {\r\n // Only perform the delete if this is an existing pet.\r\n// if (mCurrentPetUri != null) {\r\n// // Call the ContentResolver to delete the pet at the given content URI.\r\n// // Pass in null for the selection and selection args because the mCurrentPetUri\r\n// // content URI already identifies the pet that we want.\r\n// int rowsDeleted = getContentResolver().delete(mCurrentPetUri, null, null);\r\n// // Show a toast message depending on whether or not the delete was successful.\r\n// if (rowsDeleted == 0) {\r\n// // If no rows were deleted, then there was an error with the delete.\r\n// Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\r\n// Toast.LENGTH_SHORT).show();\r\n// } else {\r\n// // Otherwise, the delete was successful and we can display a toast.\r\n// Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\r\n// Toast.LENGTH_SHORT).show();\r\n// }\r\n// }\r\n\r\n }", "private void deletePet() {\n if (mCurrentPetUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentPetUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentPetUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "private void deletePet(){\n if(mCurrentPetUri != null){\n int rowsDeleted = getContentResolver().delete(mCurrentPetUri,null,null);\n if(rowsDeleted == 0){\n Toast.makeText(this, \"Error with deleting pet\", Toast.LENGTH_SHORT).show();\n }else {\n Toast.makeText(this, \"Pet deleted\", Toast.LENGTH_SHORT).show();\n }\n }\n finish();\n }", "public void onClick(DialogInterface dialog, int id) {\n deletePet();\n }", "public String deleterPetDetails(int petId);", "private void deleteEmployee() {\n // Only perform the delete if this is an existing pet.\n if (mCurrentPetUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentPetUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentPetUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "void deleteButton_actionPerformed(ActionEvent e) {\n doDelete();\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 }", "int deleteByPrimaryKey(Integer petid);", "public void deleteButtonClicked(View view) {\n String inputText = johnsInput.getText().toString();\n dbHandler.deleteProduct(inputText);\n printDatabase();\n }", "@FXML\n\tpublic void deleteIngredient(ActionEvent event) {\n\t\tif (!txtDeleteIngredientName.getText().equals(\"\")) {\n\t\t\ttry {\n\t\t\t\tboolean delete = restaurant.deleteIngredient(txtDeleteIngredientName.getText());\n\t\t\t\tif (delete == true) {\n\t\t\t\t\tingredientsOptions.remove(txtDeleteIngredientName.getText());\n\t\t\t\t\ttxtDeleteIngredientName.setText(\"\");\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los datos\");\n\t\t\t\tdialog.setTitle(\"Error guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t} else {\n\t\t\ttxtDeleteIngredientName.setText(null);\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "public void buttonDelete(ActionEvent event) {\n\t\tObservableList<Player> allProduct, SinglePlayer;\n\t\tallProduct = tableview.getItems();\n\t\tSinglePlayer = tableview.getSelectionModel().getSelectedItems();\n\t\tSinglePlayer.forEach(allProduct::remove);\n\t}", "private void actionDelete() {\r\n showDeleteDialog();\r\n }", "int deleteByExample(PetExample example);", "public void clickedSpeakerDelete() {\n\t\tif(mainWindow.getSelectedRowSpeaker().length <= 0) ApplicationOutput.printLog(\"YOU DID NOT SELECT ANY PRESENTATION\");\n\t\telse if(mainWindow.getSelectedRowSpeaker().length > 1) ApplicationOutput.printLog(\"Please select only one presentation to edit\");\n\t\telse {\n\t\t\tint tmpSelectedRow = mainWindow.getSelectedRowSpeaker()[0];\n\t\t\tSpeakers tmpSpeaker = speakersList.remove(tmpSelectedRow);\t\t\t\n\t\t\tappDriver.hibernateProxy.deleteSpeaker(tmpSpeaker);\t\n\t\t\trefreshSpeakerTable();\t\t\t\n\t\t}\n\t}", "private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}", "@Transactional\n\tpublic boolean deletePet(long id, String userName) {\n\t\tPet pet = petRepository.findPetById(id);\n\t\tUser user = userRepository.findUserByUserName(userName);\n\t\tif (user == null) {\n\t\t\tthrow new PetException(\"Cannot delete: User does not exist.\");\n\t\t} else if (pet == null) {\n\t\t\tthrow new PetException(\"Cannot delete: Pet does not exist.\");\n\t\t} else if (user.getPets() == null || !(user.getPets().contains(pet))) {\n\t\t\tthrow new PetException(\"Cannot delete: The requester is not the owner of the pet.\");\n\t\t} else {\n\t\t\tAdvertisement petAd = pet.getAdvertisement();\n\t\t\tif (petAd != null) {\n\t\t\t\tadvertisementService.deleteAdvertisement(advertisementService.convertToDTO(petAd));\n\t\t\t}\n\t\t\tSet<Pet> userPet = user.getPets();\n\t\t\tuserPet.remove(pet);\n\t\t\tuser.setPets(userPet);\n\t\t\tuserRepository.save(user);\n\t\t\tpetRepository.delete(pet);\n\n\t\t\treturn true;\n\t\t}\n\t}", "public void deleteTag(ActionEvent event) {\n\t\tObservableList<Tag> list;\n\t\tlist = TagListDisplay.getSelectionModel().getSelectedItems();\n\t\t\n\t\tif(list.isEmpty() == true) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.setTitle(\"Error!\");\n\t\t\talert.setHeaderText(\"No Tag Selected\");\n\t\t\talert.setContentText(\"No tag selected. Delete Failed!\");\n\t\t\talert.showAndWait();\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\tAlert alert2 = new Alert(AlertType.CONFIRMATION);\n\t\talert2.setTitle(\"Confirmation Dialog\");\n\t\talert2.setHeaderText(\"Confirm Action\");\n\t\talert2.setContentText(\"Are you sure?\");\n\t\tOptional<ButtonType> result = alert2.showAndWait();\n\t\t\n\t\tif(result.get() == ButtonType.OK) {\n\t\t\tTag tag = (Tag) TagListDisplay.getSelectionModel().getSelectedItem();\n\t\t\t\n\t\t\tImageView img = (ImageView) PhotoListDisplay.getSelectionModel().getSelectedItem();\n\t\t\tPhoto p = AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getPhotoFromImage(img);\n\t\t\tArrayList<Tag> listTags = p.getTags();\n\t\t\t\n\t\t\tlistTags.remove(tag);\n\t\t\t\n\t\t\ttagObsList = FXCollections.observableList(listTags);\n\t\t\tTagListDisplay.setItems(tagObsList);\n\t\t}else {\n\t\t\treturn;\n\t\t}\n\t\n\t\ttry {\n\t\t\tserializeUsers(AccessibleUsersList.masterUserList);\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\n\t\t/*\n\t\ttry {\n\t\t\tserializeUsers(AccessibleUsersList.masterUserList);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t*/\n\t}", "private void delete(ActionEvent e){\r\n if (client != null){\r\n ConfirmBox.display(\"Confirm Deletion\", \"Are you sure you want to delete this entry?\");\r\n if (ConfirmBox.response){\r\n Client.deleteClient(client);\r\n AlertBox.display(\"Delete Client\", \"Client Deleted Successfully\");\r\n // Refresh view\r\n refresh();\r\n \r\n }\r\n }\r\n }", "@FXML\r\n public void onDelete() {\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Mensagem\");\r\n alert.setHeaderText(\"\");\r\n alert.setContentText(\"Deseja excluir?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.get() == ButtonType.OK) {\r\n AlunoModel alunoModel = tabelaAluno.getItems().get(tabelaAluno.getSelectionModel().getSelectedIndex());\r\n\r\n if (AlunoDAO.executeUpdates(alunoModel, AlunoDAO.DELETE)) {\r\n tabelaAluno.getItems().remove(tabelaAluno.getSelectionModel().getSelectedIndex());\r\n alert(\"Excluido com sucesso!\");\r\n desabilitarCampos();\r\n } else {\r\n alert(\"Não foi possivel excluir\");\r\n }\r\n }\r\n }", "void deletePodcast(ActionEvent event){\n //removes context menu that was displaed\n cm.hide();\n //Creates and shows a pop-up that will prompt user to decide what happens to podcast\n Alert alert = new Alert(Alert.AlertType.NONE, \"Delete \"+this.podcast.getTitle()+\"?\", ButtonType.YES, ButtonType.NO, ButtonType.CANCEL);\n alert.showAndWait();\n\n //CASE: YES, deletes podcast\n if(alert.getResult() == ButtonType.YES){\n if(model.DEBUG)\n System.err.println(\"[LibCell] Deleting \"+this.podcast.getTitle());\n\n Main.model.deletePodcast(this.podcast);\n //CASE: NO, hides alert\n } else {\n alert.hide();\n }\n }", "@FXML\n\tprivate void deleteButtonAction(ActionEvent clickEvent) {\n\t\t\n\t\tPart deletePartFromProduct = partListProductTable.getSelectionModel().getSelectedItem();\n\t\t\n\t\tif (deletePartFromProduct != null) {\n\t\t\t\n\t\t\tAlert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Pressing OK will remove the part from the product.\\n\\n\" + \"Are you sure you want to remove the part?\");\n\t\t\n\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\n\t\t\tif (result.isPresent() && result.get() == ButtonType.OK) {\n\t\t\t\n\t\t\t\tdummyList.remove(deletePartFromProduct);\n\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.out.println(\"btnDelete\");\n\t\t\t\tint i = table.getSelectedRow();\n\t\t\t\tif (i >= 0) {\n\t\t\t\t\tSystem.out.println(\"row-Delete\" + i);\n\t\t\t\t\tSystem.out.println(\"row-Delete\" + textSuppD.getText());\n\t\t\t\t\tint suppID = Integer.parseInt(textSuppD.getText().trim());\n\n\t\t\t\t\tDatabase db = new Database();\n\t\t\t\t\tSuppliersDAO suppDAO = new SuppliersDAO(db);\n\t\t\t\t\tSuppliersModel suppModel = new SuppliersModel();\n\t\t\t\t\tsuppModel.setSuppliers_id(suppID);\n\t\t\t\t\tsuppDAO.Delete(suppModel);\n\t\t\t\t\tdb.commit();\n\t\t\t\t\tdb.close();\n\n\t\t\t\t\tmodel.removeRow(i);\n\t\t\t\t} else {\n\t\t\t\t}\n\t\t\t}", "@FXML\n private void handleDeletePerson() {\n int selectedIndex = personTable.getSelectionModel().getSelectedIndex();\n if (selectedIndex >= 0) {\n personTable.getItems().remove(selectedIndex);\n } else {\n // Nothing selected.\n Alert alert = new Alert(AlertType.WARNING);\n alert.initOwner(mainApp.getPrimaryStage());\n alert.setTitle(\"No Selection\");\n alert.setHeaderText(\"No Shops Selected\");\n alert.setContentText(\"Please select a person in the table.\");\n \n alert.showAndWait();\n }\n }", "public void delete() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"deleteButton\").click();\n\t}", "@Override\r\n\tpublic void delete(Person p) \r\n\t{\n\t\t\r\n\t}", "public void deletePerson(){\r\n\r\n\t/*get values from text fields*/\r\n\tname = tfName.getText();\r\n\r\n\tif(name.equals(\"\"))\r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null,\"Please enter person name to delete.\");\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/*remove Person of the given name*/\r\n\t\tint no = pDAO.removePerson(name);\r\n\t\tJOptionPane.showMessageDialog(null, no + \" Record(s) deleted.\");\r\n\t}\r\n }", "public void clickedPresentationDelete() {\n\t\tif(mainWindow.getSelectedRowPresentation().length <= 0) ApplicationOutput.printLog(\"YOU DID NOT SELECT ANY PRESENTATION\");\n\t\telse if(mainWindow.getSelectedRowPresentation().length > 1) ApplicationOutput.printLog(\"Please select only one presentation to edit\");\n\t\telse {\n\t\t\tint tmpSelectedRow = mainWindow.getSelectedRowPresentation()[0];\n\t\t\tPresentations tmpPresentation = presentationList.remove(tmpSelectedRow);\t\t\t\n\t\t\tappDriver.hibernateProxy.deletePresentation(tmpPresentation);\t\n\t\t\trefreshPresentationTable();\t\t\t\n\t\t}\n\t}", "@FXML\r\n public void deleteTreatmentButton(){\r\n int sIndex = treatmentTabletv.getSelectionModel().getSelectedIndex();\r\n String sID = treatmentData.get(sIndex).getIdProperty();\r\n\r\n String deleteTreatment = \"delete from treatment where treatmentID = ?\";\r\n try{\r\n ps = mysql.prepareStatement(deleteTreatment);\r\n ps.setString(1,sID);\r\n ps.executeUpdate();\r\n ps.close();\r\n ps = null;\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n //maybe more in this exception\r\n }\r\n\r\n treatmentData.remove(sIndex);\r\n }", "public void delete()\n {\n call(\"Delete\");\n }", "@FXML\r\n void onActionDelete(ActionEvent event) throws IOException {\r\n\r\n Appointment toDelete = appointmentsTable.getSelectionModel().getSelectedItem();\r\n\r\n\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to delete appointment ID# \" + toDelete.getAppointmentID() + \" Title: \" + toDelete.getTitle()\r\n + \" Type: \" + toDelete.getType());\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n\r\n DBAppointments.deleteAppointment(toDelete.getAppointmentID());\r\n\r\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"/view/appointments.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n }\r\n }", "void onDeleteClicked();", "@Override\n\tpublic void delete(Recipe entity) {\n\t\t\n\t}", "private void delete() {\n AltDatabase.getInstance().getAlts().remove(getCurrentAsEditable());\n if (selectedAccountIndex > 0)\n selectedAccountIndex--;\n updateQueried();\n updateButtons();\n }", "@FXML\n private void deleteUser(ActionEvent event) throws IOException {\n User selectedUser = table.getSelectionModel().getSelectedItem();\n\n boolean userWasRemoved = selectedUser.delete();\n\n if (userWasRemoved) {\n userList.remove(selectedUser);\n UsermanagementUtilities.setFeedback(event,selectedUser.getName().getFirstName()+\" \"+LanguageHandler.getText(\"userDeleted\"),true);\n } else {\n UsermanagementUtilities.setFeedback(event,LanguageHandler.getText(\"userNotDeleted\"),false);\n }\n }", "@FXML\n private void handleDeleteFilm() {\n int selectedIndex = filmTable.getSelectionModel().getSelectedIndex();\n if (selectedIndex >= 0) {\n \tfilmTable.getItems().remove(selectedIndex);\n \tsave();\n } else {\n // Nothing selected.\n Dialogs.create()\n .title(\"No Selection\")\n .masthead(\"No Person Selected\")\n .message(\"Please select a person in the table.\")\n .showWarning();\n }\n }", "@FXML private void handleAddProdDelete(ActionEvent event) {\n Part partDeleting = fxidAddProdSelectedParts.getSelectionModel().getSelectedItem();\n \n if (partDeleting != null) {\n //Display Confirm Box\n Alert confirmDelete = new Alert(Alert.AlertType.CONFIRMATION);\n confirmDelete.setHeaderText(\"Are you sure?\");\n confirmDelete.setContentText(\"Are you sure you want to remove the \" + partDeleting.getName() + \" part?\");\n Optional<ButtonType> result = confirmDelete.showAndWait();\n //If they click OK\n if (result.get() == ButtonType.OK) {\n //Delete the part.\n partToSave.remove(partDeleting);\n //Refresh the list view.\n fxidAddProdSelectedParts.setItems(partToSave);\n\n Alert successDelete = new Alert(Alert.AlertType.CONFIRMATION);\n successDelete.setHeaderText(\"Confirmation\");\n successDelete.setContentText(partDeleting.getName() + \" has been removed from product.\");\n successDelete.showAndWait();\n }\n } \n }", "public void deleteButtonPushed() {\r\n ObservableList<Student> allStudents;\r\n Student selectedRow;\r\n allStudents = tableView.getItems();\r\n \r\n // This gives us the row that was selected\r\n selectedRow = tableView.getSelectionModel().getSelectedItems().get(0);\r\n \r\n\r\n try {\r\n covidMngrService.deleteStudent(selectedRow);\r\n \r\n // Remove the Student object from the table\r\n allStudents.remove(selectedRow);\r\n } catch (RemoteException ex) {\r\n Logger.getLogger(SecretaryStudentsTableCntrl.class.getName()).\r\n log(Level.SEVERE, null, ex);\r\n }\r\n }", "private void buttonToDeleteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buttonToDeleteMouseClicked\n ActivityService activityService = new ActivityService();\n activityService\n .setId(this.id)\n .setUser(this.dashboard.user);\n try {\n activityService.delete();\n this.setVisible(false);\n this.dashboard.refreshUI();\n }catch (Exception err) {\n this.alert.showMessageDialog(null, \"gagal menghapus data\");\n }\n }", "@FXML\n\tpublic void delete(ActionEvent event) throws IOException {\n\t\tMgr_du.remove_goods(g.getIndex());\n\t\tSeller_du.getShop().remove_goods(g.getIndex());\n\t\tMgr_du.save_shop();\n\t\tMgr_du.save_seller();\n\t\tStageMgr.STAGES.get(\"Goods_seller\").close();\n\t\tStageMgr.STAGES.remove(\"Goods_seller\");\n\t\t\n\t\tStageMgr.STAGES.remove(\"Seller_main\");\n\t\tLogin_du.load_seller(Seller_du.getUser_name());\n\t\tStage stage=new Stage();\n\t\tParent root = null;\n\t\troot = FXMLLoader.load(getClass().getResource(\"Seller_main.fxml\"));\n\t\tstage.setTitle(\"Seller\");\n\t\tStageMgr.STAGES.put(\"Seller_main\", stage);\n\t\tstage.setScene(new Scene(root));\n\t\tstage.show();\n\t}", "@Override\r\n\tpublic void delete(Plate entity) {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdelete();\n\t\t\t}", "private boolean actionDelete()\n {\n Debug.enter();\n onDeleteListener.onDelete();\n dismiss();\n Debug.leave();\n return true;\n }", "@FXML public void deleteBT_handler(ActionEvent e) {\n\t\tif(list.getSelectionModel().getSelectedIndex() == -1) {\n\t\t\tAlert error = new Alert(AlertType.ERROR, \"Nothing Selected.\\nPlease select correctly or add new User\", ButtonType.OK);\n\t error.showAndWait();\n\t\t}\n\t\telse {\n\t\t\tAlert warning = new Alert(AlertType.WARNING,\"Delete this User from list?\", ButtonType.YES, ButtonType.NO);\n\t warning.showAndWait();\n\t if(warning.getResult() == ButtonType.NO){\n\t return;\n\t }\n\t\n\t int idx = list.getSelectionModel().getSelectedIndex();\n\t if(list.getSelectionModel().getSelectedItem().getUserName().equals(\"stock\")) {\n\t \tAlert error = new Alert(AlertType.ERROR, \"You can't delete stock username\", ButtonType.OK);\n\t error.showAndWait();\n\t \treturn;\n\t }\n\t obs.remove(idx);\n\t mgUsr.arrList.remove(idx);\n\t\t}\n\t}", "private void deleteButtonActionPerformed() {//GEN-FIRST:event_deleteButtonActionPerformed\r\n if (this.fileList.getSelectedIndex() >= 0) {\r\n this.controller.OnDeletePhoto(listFiles.get(fileList.getSelectedIndex()));\r\n } else {\r\n this.ShowErrorMessage(\"No file selected to delete\");\r\n }\r\n }", "@Override\n\tpublic void delete(CorsoDiLaurea corso) {\n\t\t\n\t}", "@FXML\n public void handleDeleteButton(ActionEvent event) {\n if (cList.getItems().size() == 0) {\n alert(\"Error\", \"Invalid selection.\", \"The list is already empty.\");\n return;\n }\n\n String s = (String) cList.getSelectionModel().getSelectedItem();\n\n if (cList.getSelectionModel().getSelectedIndex() == -1) {\n alert(\"Error\", \"Invalid selection.\", \"Please select an item to delete.\");\n return;\n }\n\n String parts[] = s.split(\"=\");\n Tag delete = null;\n for (Tag t : tags) {\n if (t.getType().equals(parts[0]) && t.getValue().equals(parts[1])) {\n obsList.remove(s);\n }\n }\n tags.remove(delete);\n cList.setItems(obsList);\n\n\n }", "public void deleteFood() {\n\t\tif(!food.isEmpty()) {\n\t\t\tSystem.out.println(\"Choose one what you want delete food number.\");\n\t\t\tdisplayMessage();\n\t\t\tScanner scan = new Scanner(System.in);\n\t\t\tint select = scan.nextInt();\n\t\t\ttry {\n\t\t\t\tfood.remove(select - 1);\n\t\t\t\tSystem.out.println(\"Successfully deleted from refrigerator.\");\n\t\t\t} catch (IndexOutOfBoundsException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.out.println(\"You chosen wrong number.\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Stoarge is empty.\");\n\t\t}\n\t\t\n\t}", "void deletePokemon(Long pokemonId);", "void deleteRecipe(RecipeObject recipe);", "@Override\r\n public void onClick(DialogInterface dialog, int which) {\n Preferences preferences = new Preferences(TelaPet.this);\r\n String identificadorUsuarioLogado = preferences.getIdentificador();\r\n\r\n //EXCLUIR CONVERSAS\r\n DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference();\r\n databaseReference = databaseReference.child(\"PETs\")\r\n .child(identificadorUsuarioLogado)\r\n .child(idPet); //Pegando id do pet\r\n\r\n startActivity(new Intent(TelaPet.this, ListarPets.class));\r\n Toast.makeText(getApplicationContext(), \"Pet excluido com sucesso!!\", Toast.LENGTH_SHORT).show();\r\n databaseReference.removeValue();\r\n finish();\r\n\r\n\r\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tdelete();\n\t\t}", "protected void deleteClicked(View view){\n PriceFinder pf = new PriceFinder();\n pf = this.itm.getItem(this.position);\n this.itm.removeItem(pf);\n try {\n save();\n } catch (IOException e) {\n e.printStackTrace();\n }\n finish();\n }", "public void addPet() {\n floatingActionButton.hide();\n changeFragment(getFragment(RegisterPetFragment.class));\n toolbar.setTitle(getString(R.string.register_new_pet));\n }", "@FXML\r\n\tprivate void deleteEmployee(ActionEvent event) {\r\n\t\teraseFieldsContent();\r\n\t\tEmployee e = listaStaff.getSelectionModel().getSelectedItem();\r\n\t\tservice.deleteEmployee(e);\r\n\t\tlistaStaff.getItems().remove(e);\r\n\t\tbtDelete.setDisable(true);\r\n\t\tbtEditar.setDisable(true);\r\n\t\tupdateList();\r\n\t}", "private void handleDeletePressed() {\n if (mCtx == Context.CREATE) {\n finish();\n return;\n }\n\n DialogFactory.deletion(this, getString(R.string.dialog_note), () -> {\n QueryService.awaitInstance(service -> deleteNote(service, mNote.id()));\n }).show();\n }", "public void deleteTeam(ActionEvent actionEvent) {}", "@Override\n\tpublic void delete(Pedido arg0) {\n\n\t}", "private void deleteButtonClicked(){\n\t\tif (theDialogClient != null) theDialogClient.dialogFinished(DialogClient.operation.DELETEING);\n\t\tdispose();\n\t}", "@FXML\n\t private void deleteProduct (ActionEvent actionEvent) throws SQLException, ClassNotFoundException {\n\t try {\n\t ProductDAO.deleteProdWithId(prodIdText.getText());\n\t resultArea.setText(\"Product deleted! Product id: \" + prodIdText.getText() + \"\\n\");\n\t } catch (SQLException e) {\n\t resultArea.setText(\"Problem occurred while deleting product \" + e);\n\t throw e;\n\t }\n\t }", "@FXML\n\tpublic void deleteUser(ActionEvent e) {\n\t\tint i = userListView.getSelectionModel().getSelectedIndex();\n//\t\tUser deletMe = userListView.getSelectionModel().getSelectedItem();\n//\t\tuserList.remove(deletMe); this would work too just put the admin warning\n\t\tdeleteUser(i);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to a click on the \"Insert dummy data\" menu option\n case R.id.action_insert_dummy_data:\n insertPet();\n return true;\n // Respond to a click on the \"Delete all entries\" menu option\n case R.id.action_delete_all_entries:\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setCancelable(true);\n builder.setTitle(\"delete all\");\n builder.setMessage(\"do want to delete all entries \");\n builder.setPositiveButton(\"Confirm\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n int delt = getContentResolver().delete(PetContract.PetEntry.CONTENT_URI, null,null);\n }\n });\n builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n// int delt = getContentResolver().delete(PetContract.PetEntry.CONTENT_URI, null,null);\n// Toast.makeText(this, delt+\"deleted\", Toast.LENGTH_SHORT).show();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@FXML\n private void handleDeletePerson() {\n //remove the client from the view\n int selectedIndex = informationsClients.getSelectionModel().getSelectedIndex();\n if (selectedIndex >= 0) {\n //remove the client from the database\n ClientManager cManager = new ClientManager();\n cManager.deleteClient(informationsClients.getSelectionModel().getSelectedItem().getId());\n informationsClients.getItems().remove(selectedIndex);\n } else {\n // Nothing selected.\n Alert alert = new Alert(AlertType.WARNING);\n alert.initOwner(mainApp.getPrimaryStage());\n alert.setTitle(\"Erreur : Pas de selection\");\n alert.setHeaderText(\"Aucun client n'a été selectionné\");\n alert.setContentText(\"Veuillez selectionnez un client.\");\n alert.showAndWait();\n }\n }", "private void delete() {\n\n\t}", "void deletePatient(Patient target);", "@FXML\n\tprivate void handleDelete() {\n\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\talert.getButtonTypes().clear();\n\t\talert.getButtonTypes().addAll(ButtonType.YES, ButtonType.NO);\n\t\talert.setHeaderText(lang.getString(\"deleteCustomerMessage\"));\n\t\talert.initOwner(stage);\n\t\talert.showAndWait()\n\t\t.filter(answer -> answer == ButtonType.YES)\n\t\t.ifPresent(answer -> {\n\t\t\tCustomer customer = customerTable.getSelectionModel().getSelectedItem();\n\t\t\tdeleteCustomer(customer);\n\t\t});\n\t}", "@Override\n\tpublic void deleteClick(int id) {\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 }", "@FXML\n private void removeCarButtonPress(){\n database.getCurrentUser().removeCar(carListView.getSelectionModel().getSelectedIndex());\n }", "public void onActionDeleteProduct(ActionEvent actionEvent) throws IOException {\r\n\r\n try {\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to delete the selected item?\");\r\n\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n\r\n if (productsTableView.getSelectionModel().getSelectedItem() != null) {\r\n Product product = productsTableView.getSelectionModel().getSelectedItem();\r\n if (product.getAllAssociatedParts().size() == 0) {\r\n\r\n Inventory.deleteProduct(productsTableView.getSelectionModel().getSelectedItem());\r\n Parent root = FXMLLoader.load(getClass().getResource(\"/View_Controller/mainScreen.fxml\"));\r\n Stage stage = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow();\r\n Scene scene = new Scene(root, 1062, 498);\r\n stage.setTitle(\"Main Screen\");\r\n stage.setScene(scene);\r\n stage.show();\r\n } else {\r\n Alert alert2 = new Alert(Alert.AlertType.ERROR);\r\n alert2.setContentText(\"Products with associated parts cannot be deleted.\");\r\n alert2.showAndWait();\r\n }\r\n }\r\n else {\r\n Alert alert3 = new Alert(Alert.AlertType.ERROR);\r\n alert3.setContentText(\"Click on an item to delete.\");\r\n alert3.showAndWait();\r\n }\r\n }\r\n }\r\n catch (NullPointerException n) {\r\n //ignore\r\n }\r\n }", "@Override\n\tpublic void delete(Object entidade) {\n\t\t\n\t}", "public void deleteSong(ActionEvent delEvent) {\r\n\t\tButton deleteButton = (Button) delEvent.getSource();\r\n\t\tif(deleteButton == delete) {\r\n\t\t\tSong deleteSong = listView.getSelectionModel().getSelectedItem();\r\n\t\t\tint temp = listView.getSelectionModel().getSelectedIndex();\r\n\t\t\tAlert deleteAlert = new Alert(AlertType.CONFIRMATION);\r\n\t\t\tdeleteAlert.setTitle(\"Confirmation:\");\r\n\t\t\tdeleteAlert.setHeaderText(\"Delete song?\");\r\n\t\t\tdeleteAlert.setContentText(\"Are you sure, you want to delete the following song?\\n\"\r\n\t\t\t\t\t+ \"Name: \" + deleteSong.getName() + \"\\n\" + \"Artsit: \"+ deleteSong.getArtist() + \"\\n\"\r\n\t\t\t\t\t+ \"Album: \" + deleteSong.getAlbum() + \"\\n\" + \"Year: \" + deleteSong.getYear() + \"\\n\");\r\n\t\t\tOptional<ButtonType> confirm = deleteAlert.showAndWait();\r\n\t\t\t\tif(confirm.get() == ButtonType.OK) {\r\n\t\t\t\t\tint listSize = songList.size();\r\n\t\t\t\t\tif(listSize == 1) {\r\n\t\t\t\t\t\tsongList.remove(temp);\r\n\t\t\t\t\t\tsaveToCatalog(songList);\r\n\t\t\t\t\t\tobsList.remove(temp);\r\n\t\t\t\t\t\tobsList = FXCollections.observableArrayList(songList);\r\n\t\t\t\t\t\tlistView.setItems(obsList);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tsongList.remove(temp);\r\n\t\t\t\t\t\tsaveToCatalog(songList);\r\n\t\t\t\t\t\tobsList.remove(temp);\r\n\t\t\t\t\t\tobsList = FXCollections.observableArrayList(songList);\r\n\t\t\t\t\t\tlistView.setItems(obsList);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(temp < (songList.size())) {\r\n\t\t\t\t\t\t\tlistView.getSelectionModel().select(temp);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlistView.getSelectionModel().select(temp - 1);\r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t//do nothing\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "@FXML\n\tpublic void deleteProduct(ActionEvent event) {\n\t\tif (!txtDeleteProductName.getText().equals(\"\")) {\n\t\t\ttry {\n\n\t\t\t\tList<Product> productToDelete = restaurant.findSameProduct(txtDeleteProductName.getText());\n\t\t\t\tboolean delete = restaurant.deleteProduct(txtDeleteProductName.getText());\n\t\t\t\tif (delete == true) {\n\t\t\t\t\tfor (int i = 0; i < productOptions.size(); i++) {\n\t\t\t\t\t\tfor (int j = 0; j < productToDelete.size(); j++) {\n\t\t\t\t\t\t\tif (productOptions.get(i) != null && productOptions.get(i)\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(productToDelete.get(j).getReferenceId())) {\n\t\t\t\t\t\t\t\tproductOptions.remove(productToDelete.get(j).getReferenceId());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttxtDeleteProductName.setText(\"\");\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los productos\");\n\t\t\t\tdialog.setTitle(\"Error guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "public void delete() {\n\n\t}", "@Override\r\n\tpublic void delete(Person person) {\n\r\n\t}", "protected abstract void onDelete(Person person);", "public void IntripDelete()\n\t{\n\t\tdriver.findElementById(OR.getProperty(\"Delete\")).click();\n\t}", "private void btnDelete1ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {// GEN-FIRST:event_btnDelete1ActionPerformed\n\t\t// TODO add your handling code here:\n\t\tint i = tblBollard.getSelectedRow();\n\t\tif (i >= 0) {\n\t\t\tint option = JOptionPane.showConfirmDialog(rootPane, \"Are you sure you want to Delete?\",\n\t\t\t\t\t\"Delete confirmation\", JOptionPane.YES_NO_OPTION);\n\t\t\tif (option == 0) {\n\t\t\t\tTableModel model = tblBollard.getModel();\n\n\t\t\t\tString id = model.getValueAt(i, 0).toString();\n\t\t\t\tif (tblBollard.getSelectedRows().length == 1) {\n\t\t\t\t\t\n\t\t\t\t\tdelete(id,client);\n\t\t\t\t\t\n\t\t\t\t\tDefaultTableModel model1 = (DefaultTableModel) tblBollard.getModel();\n\t\t\t\t\tmodel1.setRowCount(0);\n\t\t\t\t\tfetch(client);\n\t\t\t\t\t//client.stopConnection();\n\t\t\t\t\tclear();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\talert(\"Please select a row to delete\");\n\t\t}\n\t}", "private void deleteProduct() {\n // Only perform the delete if this is an existing Product.\n if (mCurrentProductUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentProductUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentProductUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_product_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_product_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "@Override\r\n\tpublic void delete(Plant plant) throws Exception {\n\r\n\t}", "@FXML\r\n private void deletePartAction() throws IOException {\r\n \r\n if (!partsTbl.getSelectionModel().isEmpty()) {\r\n Part selected = partsTbl.getSelectionModel().getSelectedItem();\r\n \r\n Alert message = new Alert(Alert.AlertType.CONFIRMATION);\r\n message.setTitle(\"Confirm delete\");\r\n message.setHeaderText(\" Are you sure you want to delete part ID: \" + selected.getId() + \", name: \" + selected.getName() + \"?\" );\r\n message.setContentText(\"Please confirm your selection\");\r\n \r\n Optional<ButtonType> response = message.showAndWait();\r\n if (response.get() == ButtonType.OK)\r\n {\r\n stock.deletePart(selected);\r\n partsTbl.setItems(stock.getAllParts());\r\n partsTbl.refresh();\r\n displayMessage(\"The part \" + selected.getName() + \" was successfully deleted\");\r\n }\r\n else {\r\n displayMessage(\"Deletion cancelled by user. Part not deleted.\");\r\n }\r\n }\r\n else {\r\n displayMessage(\"No part selected for deletion\");\r\n }\r\n }", "public void deleteItem(ActionEvent actionEvent) {\n // find the list that the item belongs in\n // removeItem() from its parenting list\n }", "void deleteCatFood(Long catId, Long foodId);", "public void onDeleteButton(View view){\n if (db.getAllRecipes().size() <= 0) {\n Toast.makeText(this, \"There are no recipes in database!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n // We have to add a confirmation here before delete all recipes.\n AlertDialog.Builder dialog = new AlertDialog.Builder(RecipesActivity.this);\n dialog.setTitle(\"Delete?\")\n .setMessage(\"Are you sure you want to delete ALL recipes?\")\n .setNegativeButton(\"Cancel\", null)\n .setPositiveButton(\"Delete\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int which) {\n /// Remove all recipes from database\n db.deleteAll();\n recipes.clear();\n adapter.notifyDataSetChanged();\n }\n })\n .setIcon(R.drawable.ic_dialog_alert)\n .show();\n }", "@Override\n\tpublic void delete(Integer deptno) {\n\t\t\n\t}", "public void adoptPet(String removedPet) {\n\t\tshelterPets.remove(removedPet);\n\t}", "@Override\r\n\tpublic String delete() {\n\t\treturn \"delete\";\r\n\t}", "@Override\n\tpublic void deleteClick(Object id) {\n\t\t\n\t}", "void deleteVehicle(String vehicleID);", "@Override\n\tpublic void deletePerson(Person p) {\n\n\t}", "@FXML\n public void deleteSet(MouseEvent e) {\n //confirm first\n Alert confirmAlert = new Alert(AlertType.CONFIRMATION, \"\", ButtonType.YES, ButtonType.NO);\n confirmAlert.setHeaderText(\"Are you sure you want to delete this set?\");\n Optional<ButtonType> result = confirmAlert.showAndWait();\n if (result.get() == ButtonType.YES) {\n //delete from database\n try (\n Connection conn = dao.getConnection();\n PreparedStatement stmt = conn.prepareStatement(\"DELETE FROM Theory WHERE Title = ?\");\n ) {\n conn.setAutoCommit(false);\n stmt.setString(1, txtTitle.getText());\n stmt.executeUpdate();\n conn.commit();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n //delete from interface\n VBox vbxCards = (VBox) apnSetRow.getParent();\n vbxCards.getChildren().remove(apnSetRow);\n }\n }", "public void onClick(DialogInterface dialog, int id) {\n deleteFruit();\n }", "@FXML\r\n void onActionDeletePart(ActionEvent event) {\r\n\r\n Part part = TableView2.getSelectionModel().getSelectedItem();\r\n if(part == null)\r\n return;\r\n\r\n //EXCEPTION SET 2 REQUIREMENT\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setHeaderText(\"You are about to delete the product you have selected!\");\r\n alert.setContentText(\"Are you sure you wish to continue?\");\r\n\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.get() == ButtonType.OK){\r\n product.deleteAssociatedPart(part.getId());\r\n }\r\n }", "private void jbtn_deleteActionPerformed(ActionEvent evt) {\n\t\tDefaultTableModel RecordTable=(DefaultTableModel)jTable1.getModel();\n\t\tint Selectedrow=jTable1.getSelectedRow();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tid=RecordTable.getValueAt(Selectedrow,0).toString();\n\t\t\tdeleteItem=JOptionPane.showConfirmDialog(this,\"Confirm if you want to delete the record\",\"Warning\",JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(deleteItem==JOptionPane.YES_OPTION)\n\t\t\t{\n\t\t\t\tconn cc=new conn();\n\t\t\t\tpst=cc.c.prepareStatement(\"delete from medicine where medicine_name=?\");\n\t\t\t pst.setString(1,id);\n\t\t\t\tpst.executeUpdate();\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Record Updated\");\n\t\t\t\tupDateDB();\n\t\t\t\ttxtblank();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t}", "private void deleteFruit() {\n // Only perform the delete if this is an existing fruit.\n if (mCurrentFruitUri != null) {\n // Call the ContentResolver to delete the fruit at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentfruitUri\n // content URI already identifies the fruit that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentFruitUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_fruit_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_fruit_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n // Close the activity\n finish();\n }", "private void deleteActionPerformed(ActionEvent evt) throws Exception {\n String teaID = this.teaIDText.getText();\n if(StringUtil.isEmpty(teaID)){\n JOptionPane.showMessageDialog(null, \"请先选择一条老师信息!\");\n return;\n }\n int confirm = JOptionPane.showConfirmDialog(null, \"确认删除?\");\n if(confirm == 0){//确认删除\n Connection con = dbUtil.getConnection();\n int delete = teacherInfo.deleteInfo(con, teaID);\n if(delete == 1){\n JOptionPane.showMessageDialog(null, \"删除成功!\");\n resetValues();\n }\n else{\n JOptionPane.showMessageDialog(null, \"删除失败!\");\n return;\n }\n initTable(new Teacher());//初始化表格\n }\n }", "public void deletePhoto(ActionEvent event) {\n\t\tObservableList<ImageView> pho;\n\t\tpho = PhotoListDisplay.getSelectionModel().getSelectedItems();\n\t\t\n\t\t//System.out.println(\"before deletion: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\n\t\tif(pho.isEmpty() == true) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.setTitle(\"Error!\");\n\t\t\talert.setHeaderText(\"No Photo Selected\");\n\t\t\talert.setContentText(\"No photo selected. Delete Failed!\");\n\t\t\talert.showAndWait();\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(ImageView p: pho) {\n\t\t\t//delUsername.setText(name.getUsername());\n\t\t\t//this is a confirmation\n\t\t\tAlert alert2 = new Alert(AlertType.CONFIRMATION);\n\t\t\talert2.setTitle(\"Confirmation Dialog\");\n\t\t\talert2.setHeaderText(\"Confirm Action\");\n\t\t\talert2.setContentText(\"Are you sure?\");\n\t\t\tOptional<ButtonType> result = alert2.showAndWait();\n\t\t\t\n\t\t\tif(result.get() == ButtonType.OK) {\n\t\t\t\t//removed it from observable list\n\t\t\t\tlistOfPhotos.remove(p);\n\t\t\t\tdisplayedPhoto.remove(0);\n\t\t\t\t\n\t\t\t\t//removing photo from the master list\n\t\t\t\tPhoto getPhoto = AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getPhotoFromImage(p);\n\t\t\t\t//System.out.println(\"Path to this image is: \" + getPhoto.getPathToPhoto());\n\t\t\t\tAccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum().remove(getPhoto);\n\t\t\t\t\n\t\t\t\t//System.out.println(\"removing album\");\n\t\t\t\tdisplayedPhoto.clear();\n\t\t\t\tdisplayedPhoto = FXCollections.observableArrayList();\n\t\t\t\tDisplayedImage.setItems(displayedPhoto);\n\t\t\t\t\n\t\t\t\tPhotoCaptionDisplay.setText(\"\");\n\t\t\t\tOldCaptionText.setText(\"\");\n\t\t\t\t\n\t\t\t\tArrayList<Tag> list = new ArrayList<Tag>();\n\t\t\t\ttagObsList = FXCollections.observableList(list);\n\t\t\t\tTagListDisplay.setItems(tagObsList);\n\t\t\t\t\n\t\t\t\t//System.out.println(\"after: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//*******************CHECK FOR BUG HERE, (deleting newly added user creates zombie photos\n\t\t\t\t//System.out.println(\"1: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\t\t//System.out.println(\"2: \" + listOfPhotos);\n\t\t\t\t//System.out.println(\"3: \" + displayedPhoto);\n\t\t\t}else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\trefreshPhotos();\n\t\t\n\t\t//Note: MUST SERIALIZE AFTER DELETING (also after adding)\n\t\t\n\t\t//updates permanent list(Serialized List) of users\n\t\ttry {\n\t\t\tserializeUsers(AccessibleUsersList.masterUserList);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic void delete() {\n\t\tSystem.out.println(\"no goin\");\n\t\t\n\t}", "@Override\n public void onClickDelete() {\n new DeleteDialog(this.getActivity(), this).show();\n }", "@And ( \"find Prescription: (.+) click delete\" )\r\n public void deletePrescription ( final String drug ) {\r\n // wait.until( ExpectedConditions.visibilityOfElementLocated( By.name(\r\n // \"list\" ) ) );\r\n // final WebElement element = driver.findElement( By.name( \"list\" ) );\r\n // final Select selection = new Select( element );\r\n // selection.selectByVisibleText( drug );\r\n // final WebElement submit = driver.findElement( By.name( \"submit\" ) );\r\n // submit.click();\r\n\r\n }", "@Override\n public void delete(SideDishEntity entity) {\n\n }" ]
[ "0.8247127", "0.81115407", "0.74936056", "0.7325145", "0.7299699", "0.69814867", "0.6930065", "0.6834753", "0.67988676", "0.67277855", "0.66399103", "0.6633959", "0.6633388", "0.6629005", "0.6592829", "0.65926254", "0.6551436", "0.65251756", "0.6501324", "0.64729685", "0.64668703", "0.64632523", "0.63198847", "0.6317646", "0.63065535", "0.62918586", "0.62872225", "0.62823737", "0.6277077", "0.6274619", "0.6270374", "0.6267456", "0.62601626", "0.625512", "0.6251888", "0.6247179", "0.6235433", "0.62348616", "0.62274384", "0.62238705", "0.6218968", "0.621579", "0.6201805", "0.62017643", "0.6188837", "0.6187152", "0.6180619", "0.61670893", "0.6158282", "0.6157729", "0.61552185", "0.61410534", "0.613787", "0.6131007", "0.61197704", "0.60968155", "0.60894644", "0.6088539", "0.60853475", "0.6063092", "0.60590106", "0.6054675", "0.60494304", "0.6044792", "0.60389286", "0.60372585", "0.6024077", "0.6024021", "0.60207033", "0.601896", "0.6016277", "0.6015806", "0.6015106", "0.6011855", "0.600746", "0.59928036", "0.5989503", "0.59873974", "0.5986281", "0.59773684", "0.59771466", "0.59759605", "0.597452", "0.5970269", "0.5969562", "0.5969351", "0.5964486", "0.59580445", "0.59557116", "0.5953538", "0.5947497", "0.59446293", "0.5944056", "0.5942487", "0.59379286", "0.5937075", "0.5936196", "0.59309673", "0.5929671", "0.5922527", "0.5922264" ]
0.0
-1
User clicked the "Cancel" button, so dismiss the dialog and continue editing the Product.
public void onClick(DialogInterface dialog, int id) { if (dialog != null) { dialog.dismiss(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n void cancelModifyProductButton(ActionEvent event) throws IOException {\n\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Alert\");\n alert.setContentText(\"Are you sure you want cancel changes and return to the main screen?\");\n Optional<ButtonType> result = alert.showAndWait();\n\n if (result.isPresent() && result.get() == ButtonType.OK) {\n mainScreen(event);\n }\n }", "private void editProduct() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter Product Id - \");\n\t\t\tint productId = getValidInteger(\"Enter Product Id -\");\n\t\t\twhile (!CartController.getInstance().isProductPresentInCart(\n\t\t\t\t\tproductId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id - \");\n\t\t\t\tproductId = getValidInteger(\"Enter Product Id -\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter new Quantity of Product\");\n\t\t\tint quantity = getValidInteger(\"Enter new Quantity of Product\");\n\t\t\tCartController.getInstance().editProductFromCart(productId,\n\t\t\t\t\tquantity);\n\t\t} else {\n\t\t\tDisplayOutput.getInstance().displayOutput(\n\t\t\t\t\t\"\\n-----Cart Is Empty----\\n\");\n\t\t}\n\t}", "private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {\r\n if (dataChanged) {\r\n /* Ask for confirmation by the user to save the information entered\r\n * in the database */\r\n int resultConfirm = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\r\n \"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n CoeusOptionPane.DEFAULT_YES);\r\n if (resultConfirm == 0) {\r\n try {\r\n saveRolodexInfo();\r\n }catch(Exception e){\r\n releaseUpdateLock();\r\n CoeusOptionPane.showErrorDialog(e.getMessage());\r\n }\r\n }else if (resultConfirm == 1) {\r\n dataSaved = false;\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }else {\r\n return;\r\n }\r\n }else{\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }", "@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}", "@Override\n public void onCancel(DialogInterface dialog) {\n cancel(true);\n }", "private void cancel(){\n if(isFormEmpty()){\n finish();\n }else{\n // Confirmation dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.cancel_booking_creation_confirmation));\n // When users confirms dialog, end activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n finish();\n });\n\n // Do nothing if cancel\n builder.setNegativeButton(android.R.string.cancel, null);\n\n AlertDialog dialog = builder.create();\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n Button negativeButton = dialog.getButton(AlertDialog.BUTTON_NEGATIVE);\n negativeButton.setTextColor(getColor(R.color.colorPrimary));\n }\n }", "@Override\n public void onCancel(DialogInterface arg0) {\n\n }", "public void onCancelClicked(View view) {\n\n if(mEditMode){\n //remove the item from database\n getContentResolver().delete(SavingsContentProvider.CONTENT_URI, SavingsItemEntry._ID + \"=\" + mSavingsBean.getId(), null);\n Log.d(Constants.LOG_TAG, \"Edit Mode, delete existing savings item:\");\n Log.d(Constants.LOG_TAG, mSavingsBean.toString());\n //Go back to Dashboard\n Utils.gotoDashBoard(this);\n finish();\n }else{\n finish();\n }\n }", "@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void doCancel() {\n\t\t\t\t\t\t\tcommonDialog.dismiss();\n\t\t\t\t\t\t}", "@Override\n public void onCancel(DialogInterface dialog) {\n }", "@Override\r\n\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\tUpdateActivity.this.finish();\r\n\t\t\t}", "public void oncancel() {\r\n Users user = ui.getUser();\r\n newRating = ratingEJB.findByUserAndRecipe(user, recipe);\r\n\r\n if (newRating != null) {\r\n ratingEJB.removeRecipeRating(newRating);\r\n }\r\n }", "public void handleCancel() {\n\t\tdialogStage.close();\n\t}", "@Override\n public void OnCancelButtonPressed() {\n }", "public void cancel() throws Exception {\n\t\tgetControl(\"cancelButton\").click();\n\t}", "@Override\r\n\t \t\t\tpublic void onClick(View v) {\n\t \t\t\t\tdialogDetailConfirm.cancel();\r\n\t \t\t\t}", "@Override\n public void onClick(View v)\n {\n begindialog.cancel();\n }", "@Override\n\tpublic void onCancel(DialogInterface arg0) {\n\t\t\n\t}", "private void cancel(){\n\t\tSPSSDialog.instance = null;\n\t\thide();\n\t}", "@Override\n public void OnCancelButtonPressed() {\n }", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\n\t\t}", "@Action\n public void acCancel() {\n setChangeObj(false);\n }", "@Action\n public void acCancel() {\n setChangeObj(false);\n }", "private void cancel(ActionEvent e){\r\n // Clear textfields\r\n clearFields();\r\n // If coming from appt management screen, go back there\r\n if (fromAppt){\r\n goToManageApptScreen();\r\n }\r\n // Otherwise, set the current client to null and go to the landing page \r\n else {\r\n currClient = null;\r\n LandingPage.returnToLandingPage();\r\n }\r\n }", "@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}", "@Override\n\tprotected void cancel() {\n\t\tsuper.cancel();\n\t\tif(ELSComfirmDialog.showConfirmDlg(GetPanelUtil.getFunctionPanel(this),\n\t\t\t\t\"取消添加\", \"确认退出新增界面?\")){\n\t\t\tback();\n\t\t}\n\t}", "private void dataReservationTypeCancelHandle() {\n reservationController.dialogStage.close();\r\n }", "public void onCancelClick()\r\n {\r\n\r\n }", "Product editProduct(Product product);", "@FXML private void handleCancel() {\r\n\t\tvastaus = null;\r\n\t\tModalController.closeStage(textVastaus);\r\n\t}", "public void cancelDialog() {dispose();}", "private void onCancelEditing() {\n setResponsePage(responsePage);\n }", "public void onCancelButtonClick() {\n close();\n }", "@FXML\n\tprivate void handleEditProducts() {\n\t\tboolean okClicked = showProducts();\n\t\tsaveCurrentAcknowledgment();\n\t\tsetAcknowledgment(acknowledgment);\n\t}", "public void clickOnCancelButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Cancel\"));\r\n\t}", "public String editProduct() {\n ConversationContext<Product> ctx = ProductController.newEditContext(products.getSelectedRow());\n ctx.setLabelWithKey(\"part_products\");\n ctx.setCallBack(editProductCallBack);\n getCurrentConversation().setNextContextSub(ctx);\n return ctx.view();\n }", "@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\tcancel(true);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}", "private void showCancelEditDialog() {\n AppDialog dialog = new AppDialog();\n Bundle args = new Bundle();\n args.putInt(AppDialog.DIALOG_ID, DIALOG_ID_CANCEL_EDIT);\n args.putString(AppDialog.DIALOG_TITLE, \"Quit?\");\n args.putString(AppDialog.DIALOG_MESSAGE, getString(R.string.cancelEditDiag_message));\n args.putInt(AppDialog.DIALOG_POSITIVE_RID, R.string.cancelEditDiag_positive_caption);\n args.putInt(AppDialog.DIALOG_NEGATIVE_RID, R.string.cancelEditDiag_negative_caption);\n dialog.setArguments(args);\n dialog.show(fragmentManager, null);\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tInvoker.getInstance().executeCommand(\n\t\t\t\t\tnew GraphicElementEditCancelCommand(model, dialog.getGraphicElement(), previousShapes));\n\t\t\tGraphicElementInvoker.getInstance().abortSession();\n\t\t\tdialog.setVisible(false);\n\t\t}", "@Override\n public void onClick(View v) {\n\n dialog.cancel();\n }", "@Override\n public void onClick(View v) {\n\n dialog.cancel();\n }", "public void tryCancel() throws Exception {\r\n\t\tif (! _displayOnly && isDataModified()) {\r\n\t\t\tscrollToMe();\r\n if (getValidator().getUseAlertsForErrors()) {\r\n addConfirmScript(_okToCancelQuestion, _okToCancelValue);\r\n }\r\n else {\r\n _validator.setErrorMessage(_okToCancelQuestion, null, -1, _okToCancel);\r\n }\r\n\t\t}\r\n else {\r\n\t\t\tdoCancel();\r\n }\r\n\t}", "public void handleDeleteProducts()\n {\n Product productToDelete = getProductToModify();\n\n if (productToDelete != null)\n {\n // Ask user for confirmation to remove the product from product table\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation\");\n alert.setHeaderText(\"Delete Confirmation\");\n alert.setContentText(\"Are you sure you want to delete this product?\");\n ButtonType confirm = new ButtonType(\"Yes\", ButtonBar.ButtonData.YES);\n ButtonType deny = new ButtonType(\"No\", ButtonBar.ButtonData.NO);\n ButtonType cancel = new ButtonType(\"Cancel\", ButtonBar.ButtonData.CANCEL_CLOSE);\n alert.getButtonTypes().setAll(confirm, deny, cancel);\n alert.showAndWait().ifPresent(type ->{\n if (type == confirm)\n {\n // User cannot delete products with associated parts\n if (productToDelete.getAllAssociatedParts().size() > 0)\n {\n Alert alert2 = new Alert(Alert.AlertType.ERROR);\n alert2.setTitle(\"Action is Forbidden!\");\n alert2.setHeaderText(\"Action is Forbidden!\");\n alert2.setContentText(\"Products with associated parts cannot be deleted!\\n \" +\n \"Please remove associated parts from product and try again!\");\n alert2.show();\n }\n else\n {\n // delete the product\n inventory.deleteProduct(productToDelete);\n updateProducts();\n productTable.getSelectionModel().clearSelection();\n }\n }\n });\n }\n else\n {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Input Invalid\");\n alert.setHeaderText(\"No product was selected!\");\n alert.setContentText(\"Please select a product to delete from the part table!\");\n alert.show();\n }\n this.productTable.getSelectionModel().clearSelection();\n }", "@Override\n public void onClick(View v) {\n dialog.cancel();\n }", "@Override\r\n\tpublic void onCancel(DialogInterface dialog) {\n\r\n\t}", "@FXML\n\tprivate void handleCancel() {\n\t\tdialogStage.close();\n\t}", "@FXML\n\tprivate void handleCancel() {\n\t\tdialogStage.close();\n\t}", "@FXML\n\tprivate void handleCancel() {\n\t\tdialogStage.close();\n\t}", "@FXML\n\tprivate void handleCancel() {\n\t\tdialogStage.close();\n\t}", "public void handleCancelButton(ActionEvent e) {\n\t\tclose();\n\t}", "@Override\n\t\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}", "@Override\n public void onCancel(DialogInterface dialog) {\n\n }", "@FXML\r\n void actionCancelButton(ActionEvent event) throws IOException {\r\n\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Alert\");\r\n alert.setContentText(\"Do you want to cancel your changes and return to the main screen?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n returnToMainScreen(event);\r\n }\r\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }", "@Override\n public void onBackPressed() {\n if (!mProductHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "public void cancel() { Common.exitWindow(cancelBtn); }", "@FXML\n\tprivate void handleOk(){\n\t\tif(isInputValid()){\n\t\t\tproduct.setName(nameField.getText());\n\t\t\tproduct.setAmountAvailable(Integer.parseInt(amountAvailableField.getText()));\n\t\t\tproduct.setAmountSold(Integer.parseInt(amountSoldField.getText()));\n\t\t\tproduct.setPriceEach(Integer.parseInt(priceEachField.getText()));\n\t\t\tproduct.setPriceMake(Integer.parseInt(priceMakeField.getText()));\n\t\t\t// Converts the values to ints and then subtracts\n\t\t\tproduct.setProfit(Integer.parseInt(priceEachField.getText())-Integer.parseInt(priceMakeField.getText()));\n\t\t\t// Converts the values to ints, subtracts, and then multiplies\n\t\t\tproduct.setMoney((Integer.parseInt(priceEachField.getText())-Integer.parseInt(priceMakeField.getText()))*Integer.parseInt(amountSoldField.getText()));\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\t\n\t\t}\n\t}", "void cancelButton_actionPerformed(ActionEvent e)\n\t{\n\t\tcloseDlg();\n }", "public void onCancel(DialogInterface arg0) {\n mRemovePosition = -1;\n mRemoveConfirmDialog = null;\n }", "private void cancel(){\n\t\trefreshInformationsFromTableView(null);\n\t\thidePassword();\n\t\tclearFields();\n\t\tchangeCancelButton.setText(\"Zmień hasło\");\n\t\tnewUser = false;\n\t}", "void onCancelClicked();", "@FXML\n\tpublic void disableProduct(ActionEvent event) {\n\t\tif (!txtNameDisableProduct.getText().equals(\"\")) {\n\t\t\tList<Product> searchedProducts = restaurant.findSameProduct(txtNameDisableProduct.getText());\n\t\t\tif (!searchedProducts.isEmpty()) {\n\t\t\t\ttry {\n\t\t\t\t\tfor (int i = 0; i < searchedProducts.size(); i++) {\n\t\t\t\t\t\tsearchedProducts.get(i).setCondition(Condition.INACTIVE);\n\t\t\t\t\t}\n\t\t\t\t\trestaurant.saveProductsData();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"El producto ha sido deshabilitado\");\n\t\t\t\t\tdialog.setTitle(\"Producto Deshabilitado\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t\ttxtNameDisableProduct.setText(\"\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los productos\");\n\t\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Este Producto no existe\");\n\t\t\t\tdialog.setTitle(\"Error, objeto no existente\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Debe ingresar el nombre del producto\");\n\t\t\tdialog.setTitle(\"Error\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "@Override\n public void onCancel(DialogInterface dialog) {\n finish();\n }", "@Override\n\t\t\t\tpublic boolean onCancel() {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "public void editProduct(SiteProduct product) {\n showForm(product != null);\n //form.editProduct(product);\n }", "@FXML\r\n\tprivate void handleCancel() {\r\n\t\tdialogStage.close();\r\n\t}", "@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }", "@Override\n\tpublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n\t\tIEditProductDialogListener activity = (IEditProductDialogListener)getActivity();\n\t\tactivity.onFinishEditDescription(editDiscription.getText().toString());\n\t\tthis.dismiss();\n return true;\n\n\t}", "void onCancelButtonPressed();", "public void onCancelClicked() {\n close();\n }", "public void onClickCancel()\n\t{\n\t\tsetVisible(false);\n\t\tdispose();\t\n\t}", "@Override\n public void onCancel() {\n Log.d(TAG, \"User cancelled Edit Profile.\");\n Toast.makeText(getBaseContext(), getString(R.string.editFailure), Toast.LENGTH_SHORT)\n .show();\n }", "public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n Toast.makeText(getApplicationContext(),\"You Don't want to restore\",\n Toast.LENGTH_SHORT).show();\n }", "public void deleteProduct()\n {\n ObservableList<Product> productRowSelected;\n productRowSelected = productTableView.getSelectionModel().getSelectedItems();\n int index = productTableView.getSelectionModel().getFocusedIndex();\n Product product = productTableView.getItems().get(index);\n if(productRowSelected.isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"Please select the Product you want to delete.\");\n alert.show();\n } else if (!product.getAllAssociatedParts().isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"This Product still has a Part associated with it. \\n\" +\n \"Please modify the Product and remove the Part.\");\n alert.show();\n } else {\n alert.setAlertType(Alert.AlertType.CONFIRMATION);\n alert.setContentText(\"Are you sure you want to delete this Product?\");\n alert.showAndWait();\n ButtonType result = alert.getResult();\n if(result == ButtonType.OK)\n {\n Inventory.deleteProduct(product);\n }\n }\n }", "@FXML\r\n private void cancelAction(ActionEvent event) {\n integerProperty.set(-1);\r\n searchFieldComboBox.getSelectionModel().select(0);\r\n companiesComboBox.setText(\"\");\r\n actionsComboBox.setText(\"\");\r\n yearValue.setText(\"\");\r\n mounthValue.setText(\"\");\r\n dayValue.setText(\"\");\r\n valueText.setText(\"\");\r\n relationComboBox.getSelectionModel().select(0);\r\n searchFieldComboBox.requestFocus();\r\n event.consume();\r\n }", "@Override\n public void onClick(DialogInterface dialog, int arg1) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n }", "@Override\r\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\r\n\r\n }", "@Override\n public int cancelTransaction() {\n System.out.println(\"Please make a selection first\");\n return 0;\n }", "private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}", "private void handleCancelEvent() {\n // if the cancel button has been pressed, the stage will automatically be closed\n this.cancel = new Button(\"Cancel\");\n cancel.setOnAction(e2 -> {\n this.close(); // close the addfood stage\n });\n\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.cancel();\n }", "void cancelButton_actionPerformed(ActionEvent e) {\n setUserAction(CANCELLED);\n setVisible(false);\n }", "private void showUnsavedChangesDialog(\n DialogInterface.OnClickListener discardButtonClickListener) {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.unsaved_changes_dialog_msg);\n builder.setPositiveButton(R.string.discard, discardButtonClickListener);\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the Product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "public void cancelarRegistro() {\n this.departamento = new Departamento();\n this.materia = new Materia();\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaCreateDlg').hide()\");\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n // if result code 100\n if (resultCode == 100) {\n // if result code 100 is received\n // means user edited/deleted product\n // reload this screen again\n\n }\n\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n // if result code 100\n if (resultCode == 100) {\n // if result code 100 is received\n // means user edited/deleted product\n // reload this screen again\n\n }\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish(); // go back to previous activity when item not cascade deleted\n\n }", "protected void cancel() {\n abort();\n if(cancelAction != null) {\n cancelAction.accept(getObject());\n }\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "@Override\r\n public void onCancel(DialogInterface dialogInterface) {\n finish();\r\n }", "@FXML\r\n private void handleCancel() {\r\n dialogStage.close();\r\n }", "@FXML\r\n private void handleCancel() {\r\n dialogStage.close();\r\n }", "@FXML\r\n private void handleCancel() {\r\n dialogStage.close();\r\n }", "@FXML\r\n private void handleCancel() {\r\n dialogStage.close();\r\n }", "@Override\n public void onCancel() {\n Log.w(tag, \"post cancel\" + this.getRequestURI());\n cancelmDialog();\n super.onCancel();\n }", "@FXML\n void OnActionCancel(ActionEvent event) throws IOException {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"This will clear text field values. Would you like to proceed?\");\n Optional<ButtonType> result = alert.showAndWait();\n if (result.isPresent() && result.get() == ButtonType.OK){\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/view/MainScreen.fxml\"));\n stage.setTitle(\"Inventory Management System\");\n stage.setScene(new Scene(scene));\n stage.show();\n }\n }" ]
[ "0.6952182", "0.66363525", "0.66037416", "0.6591888", "0.65794337", "0.65644795", "0.6561736", "0.6538497", "0.65334535", "0.65328985", "0.651411", "0.64887834", "0.64811856", "0.64779526", "0.64442015", "0.6440377", "0.6437297", "0.64318264", "0.64262533", "0.6421147", "0.64131474", "0.6404654", "0.6401472", "0.6390618", "0.6390618", "0.63841337", "0.63840705", "0.63831794", "0.63697636", "0.6362537", "0.6346448", "0.63386", "0.63299775", "0.63138837", "0.6310495", "0.6306976", "0.63041884", "0.6270981", "0.6268475", "0.62650156", "0.62608385", "0.6259165", "0.6244339", "0.6244339", "0.62416077", "0.6237421", "0.62295216", "0.6228219", "0.6218885", "0.6218885", "0.6218885", "0.6218885", "0.6204755", "0.61954165", "0.6191286", "0.6181308", "0.6175838", "0.6168455", "0.6164518", "0.6160492", "0.6150635", "0.6149632", "0.61454916", "0.61433554", "0.613645", "0.6131806", "0.6130426", "0.6128096", "0.6126455", "0.61252695", "0.612383", "0.6122345", "0.61110103", "0.61072624", "0.61057055", "0.61048114", "0.6103485", "0.6096235", "0.6086943", "0.60849655", "0.60826033", "0.6082515", "0.6080437", "0.6079942", "0.60783005", "0.60757035", "0.6075698", "0.6073947", "0.6072608", "0.6070371", "0.6070371", "0.6068621", "0.6068064", "0.6066419", "0.6056701", "0.60565794", "0.60565794", "0.60565794", "0.60565794", "0.6048916", "0.60486495" ]
0.0
-1
Perform the deletion of the pet in the database.
private void deleteProduct() { // Only perform the delete if this is an existing Product. if (mCurrentProductUri != null) { // Call the ContentResolver to delete the pet at the given content URI. // Pass in null for the selection and selection args because the mCurrentProductUri // content URI already identifies the pet that we want. int rowsDeleted = getContentResolver().delete(mCurrentProductUri, null, null); // Show a toast message depending on whether or not the delete was successful. if (rowsDeleted == 0) { // If no rows were deleted, then there was an error with the delete. Toast.makeText(this, getString(R.string.editor_delete_product_failed), Toast.LENGTH_SHORT).show(); } else { // Otherwise, the delete was successful and we can display a toast. Toast.makeText(this, getString(R.string.editor_delete_product_successful), Toast.LENGTH_SHORT).show(); } } // Close the activity finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deletePet() {\r\n // Only perform the delete if this is an existing pet.\r\n// if (mCurrentPetUri != null) {\r\n// // Call the ContentResolver to delete the pet at the given content URI.\r\n// // Pass in null for the selection and selection args because the mCurrentPetUri\r\n// // content URI already identifies the pet that we want.\r\n// int rowsDeleted = getContentResolver().delete(mCurrentPetUri, null, null);\r\n// // Show a toast message depending on whether or not the delete was successful.\r\n// if (rowsDeleted == 0) {\r\n// // If no rows were deleted, then there was an error with the delete.\r\n// Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\r\n// Toast.LENGTH_SHORT).show();\r\n// } else {\r\n// // Otherwise, the delete was successful and we can display a toast.\r\n// Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\r\n// Toast.LENGTH_SHORT).show();\r\n// }\r\n// }\r\n\r\n }", "private void deletePet() {\n if (mCurrentPetUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentPetUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentPetUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "private void deletePet(){\n if(mCurrentPetUri != null){\n int rowsDeleted = getContentResolver().delete(mCurrentPetUri,null,null);\n if(rowsDeleted == 0){\n Toast.makeText(this, \"Error with deleting pet\", Toast.LENGTH_SHORT).show();\n }else {\n Toast.makeText(this, \"Pet deleted\", Toast.LENGTH_SHORT).show();\n }\n }\n finish();\n }", "public String deleterPetDetails(int petId);", "int deleteByPrimaryKey(Integer petid);", "private void deleteEmployee() {\n // Only perform the delete if this is an existing pet.\n if (mCurrentPetUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentPetUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentPetUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\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 }", "int deleteByExample(PetExample example);", "@DELETE\n public void delete() {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n deleteEntity(getEntity());\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n }\n }", "@Override\r\n\tpublic void delete(Plate entity) {\n\t\t\r\n\t}", "@Test\n void delete() {\n petTypeSDJpaService.delete(petType);\n\n //Then\n verify(petTypeRepository).delete(petType);\n }", "void deletePokemon(Long pokemonId);", "@Override\r\n\tpublic void deletePost(Post post) {\n\t\tgetHibernateTemplate().delete(post);\r\n\t}", "@Override\n\tpublic void delete(Recipe entity) {\n\t\t\n\t}", "private void deleteAllPets() {\n// int rowsDeleted = getContentResolver().delete(ArtistsContracts.GenderEntry.CONTENT_URI, null, null);\n// Log.v(\"CatalogActivity\", rowsDeleted + \" rows deleted from pet database\");\n }", "@Override\r\n\tpublic void delete(Plant plant) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void delete(Person p) \r\n\t{\n\t\t\r\n\t}", "@Transactional\n\tpublic boolean deletePet(long id, String userName) {\n\t\tPet pet = petRepository.findPetById(id);\n\t\tUser user = userRepository.findUserByUserName(userName);\n\t\tif (user == null) {\n\t\t\tthrow new PetException(\"Cannot delete: User does not exist.\");\n\t\t} else if (pet == null) {\n\t\t\tthrow new PetException(\"Cannot delete: Pet does not exist.\");\n\t\t} else if (user.getPets() == null || !(user.getPets().contains(pet))) {\n\t\t\tthrow new PetException(\"Cannot delete: The requester is not the owner of the pet.\");\n\t\t} else {\n\t\t\tAdvertisement petAd = pet.getAdvertisement();\n\t\t\tif (petAd != null) {\n\t\t\t\tadvertisementService.deleteAdvertisement(advertisementService.convertToDTO(petAd));\n\t\t\t}\n\t\t\tSet<Pet> userPet = user.getPets();\n\t\t\tuserPet.remove(pet);\n\t\t\tuser.setPets(userPet);\n\t\t\tuserRepository.save(user);\n\t\t\tpetRepository.delete(pet);\n\n\t\t\treturn true;\n\t\t}\n\t}", "@Test\n void deleteById() {\n petTypeSDJpaService.deleteById(petType.getId());\n\n //Then\n verify(petTypeRepository).deleteById(petType.getId());\n }", "@DELETE\n public void delete() {\n try {\n dao.delete(dao.retrieveById(id));\n } catch (EntityInUse eiu) {\n throw new WebApplicationException(WSUtils.buildError(400, EntityInUse.ERROR_MESSAGE));\n }\n }", "@Override\n\tpublic boolean deletePoor(int pId) {\n\t\tif (this.poorDAO.deleteByPrimaryKey(pId) > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "void delete(Entity entity);", "public void deleteRecord() {\n// foods.clear();\n// try {\n// FoodRecordDao dao = new FoodRecordDao();\n// dao.saveFoodRecords(foods);\n// } catch (DaoException ex) {\n// Logger.getLogger(FoodLogViewController.class.getName()).log(Level.SEVERE, null, ex);\n// }\n }", "public final void delete() {\n\t\tOllie.delete(this);\n\t\tOllie.removeEntity(this);\n\t\tnotifyChange();\n\t\tid = null;\n\t}", "public void deleteByPrimaryKey(Long tagId) {\n }", "public void delete(RutaPk pk) throws RutaDaoException;", "void deleteCatFood(Long catId, Long foodId);", "void delete(T entity);", "void delete(T entity);", "@Delete(\"DELETE from patients WHERE id_patient=#{patientId}\")\n void deletePatient(int patientId);", "public void delete() throws EntityPersistenceException {\n\n }", "@Override\n\tpublic void delete(Object entidade) {\n\t\t\n\t}", "public void delete(NominaPuestoPk pk) throws NominaPuestoDaoException;", "@Override\n\tpublic int delete(Tags tag) {\n\t\tentityMgr.remove(tag);\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic boolean delete(Pilote obj) {\r\n\t\tboolean succes=true;\r\n\t\tString req = \"delete from \" + TABLE + \" where numPil= ?\" + \";\";\r\n\t\tPreparedStatement pst;\r\n\t\ttry {\r\n\t\t\tpst = Connexion.getInstance().prepareStatement(req);\r\n\t\t\tpst.setInt(1, obj.getNumPil());\r\n\t\t\tpst.executeUpdate();\r\n\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tsucces=false;\r\n\t\t\tSystem.out.println(\"Echec de la tentative delete pilote : \" + e.getMessage()) ;\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn succes;\r\n\t}", "@Override\n\tpublic void delete(CorsoDiLaurea corso) {\n\t\t\n\t}", "public void delete() {\n\t\ttry {\n\t\t\tStatement stmt = m_db.m_conn.createStatement();\n\t\t\tString sqlString;\n\t\t\tString ret;\n\n\t\t\tsqlString = \"DELETE from country WHERE countryid=\" + m_country_id;\n\t\t\tm_db.runSQL(sqlString, stmt);\n\t\t\tstmt.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\">>>>>>>> EXCEPTION <<<<<<<<\");\n\t\t\tSystem.out.println(\"An Exception occured in delete().\");\n\t\t\tSystem.out.println(\"MESSAGE: \" + e.getMessage());\n\t\t\tSystem.out.println(\"LOCALIZED MESSAGE: \" + e.getLocalizedMessage());\n\t\t\tSystem.out.println(\"CLASS.TOSTRING: \" + e.toString());\n\t\t\tSystem.out.println(\">>>>>>>>>>>>>-<<<<<<<<<<<<<\");\n\t\t}\n\t}", "public void delete() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.delete(this);\r\n\t}", "@Override\n\tpublic void delete(Field entity) {\n\t\t\n\t}", "public void onClick(DialogInterface dialog, int id) {\n deletePet();\n }", "@Override\n\tpublic void delete(T entity) {\n\t}", "@Delete\n Single<Integer> delete(Collection<Plant> plant);", "public void delete() throws Exception\n {\n dao.delete(this);\n }", "<T> void delete(T persistentObject);", "public void delete() {\n\n\t}", "@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\tpublic void deletePerson(Person p) {\n\n\t}", "@Override\r\n\tpublic void delete(Person person) {\n\r\n\t}", "@FXML\r\n public void deleteTreatmentButton(){\r\n int sIndex = treatmentTabletv.getSelectionModel().getSelectedIndex();\r\n String sID = treatmentData.get(sIndex).getIdProperty();\r\n\r\n String deleteTreatment = \"delete from treatment where treatmentID = ?\";\r\n try{\r\n ps = mysql.prepareStatement(deleteTreatment);\r\n ps.setString(1,sID);\r\n ps.executeUpdate();\r\n ps.close();\r\n ps = null;\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n //maybe more in this exception\r\n }\r\n\r\n treatmentData.remove(sIndex);\r\n }", "void delete(E entity);", "void delete(E entity);", "@Override\r\n public void delete(Vehicle vehicle) {\n }", "@Override\n\tpublic void delete(Oglas oglas) {\n\t\trepository.delete(oglas);\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 }", "@DELETE\n public void delete() {\n }", "@DELETE\n public void delete() {\n }", "public void deleteCar(Car car) {\n DatabaseManager.deleteCar(car);\n }", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "public void delete()\n {\n call(\"Delete\");\n }", "void delete(T obj) throws PersistException;", "void delete(Object entity);", "@Override\n\tpublic void delete(Integer deptno) {\n\t\t\n\t}", "void delete(T persistentObject);", "void deleteRecipe(RecipeObject recipe);", "public void delete(Repeater repeater)\n {\n new DeleteRepeaterAsyncTask(repeaterDao).execute(repeater);\n }", "void delete(int entityId);", "@Delete\n void deleteEggDaily(EggDaily eggDaily);", "@Delete({\n \"delete from dept\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int deleteByPrimaryKey(Integer id);", "public <T> boolean delete(T entity);", "public void delete(PostDTO p) {\n refreshState();\n ctrl.deletePost(p.getId());\n refreshState();\n }", "public void delete() {\n\t\tif(verificaPermissao() ) {\n\t\t\tentidades = EntidadesDAO.find(idEntidades);\n\t\t\tEntidadesDAO.delete(entidades);\n\t\t\tentidades.setAtiva(false);\n\t\t}\t\n\t}", "boolean delete(T entity) throws Exception;", "public void delete(Personne pers) {\n\t\ttry{\n\t\t\tString req = \"DELETE FROM PERSONNE WHERE id = ?\";\n\t\t\tPreparedStatement ps = connect.prepareStatement(req);\n\t\t\tps.setInt(1, pers.getId());\n\t\t\tps.executeUpdate();\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void delete(T entity) {\n\t\tbaseDaoImpl.delete(entity);\n\t}", "@Override\n\tpublic void delete(T entity) {\n\t\tbaseDaoImpl.delete(entity);\n\t}", "public void delete(Employee employee){\n employeeRepository.delete(employee);\n }", "public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }", "public void delete(){\r\n\r\n }", "private void deleteItem()\n {\n Category categoryToDelete = dataCategories.get(dataCategories.size()-1);\n AppDatabase db = Room.databaseBuilder(getApplicationContext(),\n AppDatabase.class, \"database-name\").allowMainThreadQueries().build();\n db.categoryDao().delete(categoryToDelete);\n testDatabase();\n }", "@Override\r\npublic int delete(int id) {\n\treturn detalle_pedidoDao.delete(id);\r\n}", "void deleteRecipe(Recipe recipe) throws ServiceFailureException;", "void deleteVehicle(String vehicleID);", "public void delete(PersonEntity person) {\n new Thread(new DeleteRunnable(dao, person)).start();\n }", "private void deletePlayer(Player p) \r\n\t{\n\t\tlogger.info(\"Deleting player ; '\" + p.getName() +\"'\");\r\n\t\tplayerDao.remove(p);\r\n\t}", "public void delete(RelacionConceptoEmbalajePk pk) throws RelacionConceptoEmbalajeDaoException;", "@Override\n\tpublic PersonelContract Delete(PersonelContract entity) {\n\t\treturn null;\n\t}", "int deleteByPrimaryKey(Long tagid);", "public void deletePokemon(Pokemon pokemon) {\n String key = pokemon.getKey();\n myPokemonDbRef.child(key).removeValue();\n }", "private void delete() {\n\n\t}", "public void delEmployee(String person){\n System.out.println(\"Attempt to delete \" + person);\n try {\n String delete =\"DELETE FROM JEREMY.EMPLOYEE WHERE NAME='\" + person+\"'\"; \n stmt.executeUpdate(delete);\n \n \n } catch (Exception e) {\n System.out.println(person +\" may not exist\" + e);\n }\n \n }", "public void deletePatientByPrimaryKey(long id) throws PatientExn;", "@Override\n\tpublic void delete(Long primaryKey) {\n\t\t\n\t}", "@DELETE\n public void delete() {\n }", "protected void deleteRecord() throws DAOException {\r\n\t\t// Elimina relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\tsedrelcoDao.delete(relco);\r\n\t\t}\r\n\t\t// Elimina objeto\r\n\t\tobjectDao.delete(object);\r\n\t}", "@Override\n\tpublic void delete(Audit entity) {\n\t\t\n\t}", "@Override\n\tpublic void delete(T t) {\n\t\thibernateTemplate.delete(t);\n\t}", "public void doDelete(T objectToDelete) throws SQLException;", "Boolean delete(T entity);", "@Override\n\t\tpublic void delete() {\n\t\t\tSystem.out.println(\"새로운 삭제\");\n\t\t}", "@Override\n public void delete(SideDishEntity entity) {\n\n }" ]
[ "0.8152022", "0.80165654", "0.7595751", "0.75055355", "0.74316025", "0.69439244", "0.6940839", "0.67958134", "0.66999906", "0.6642893", "0.6600595", "0.65644544", "0.6486312", "0.64754343", "0.64398295", "0.6406081", "0.6401575", "0.6391305", "0.63539565", "0.63520706", "0.6351728", "0.6350693", "0.6325615", "0.6316816", "0.63148504", "0.6311399", "0.63090307", "0.6308081", "0.6308081", "0.62981427", "0.62951344", "0.6291911", "0.62894106", "0.62888306", "0.62489915", "0.6243516", "0.6242234", "0.6236365", "0.6229655", "0.622906", "0.62150633", "0.62044924", "0.6201187", "0.61849505", "0.6179848", "0.61742395", "0.61711645", "0.6157842", "0.61443627", "0.6136847", "0.6136847", "0.61348283", "0.6132571", "0.61318755", "0.61311376", "0.61311376", "0.6124236", "0.6118577", "0.61177915", "0.61161906", "0.61148703", "0.61140484", "0.61133605", "0.6112917", "0.61092323", "0.6100223", "0.60936433", "0.60929507", "0.6091712", "0.6089111", "0.60826874", "0.6077747", "0.6073715", "0.6069332", "0.6069332", "0.6067712", "0.6062207", "0.6058714", "0.6053694", "0.6051895", "0.6045497", "0.6040537", "0.6039759", "0.6038551", "0.6038041", "0.60376954", "0.6036137", "0.603478", "0.6032231", "0.6030123", "0.60299635", "0.60278094", "0.60277677", "0.6024175", "0.60222596", "0.6022016", "0.6021809", "0.6019528", "0.60132354", "0.60115343" ]
0.6046166
80
get result data from selecting an image
public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == PermissionUtils.MY_PERMISSIONS_READ_EXTERNAL_STORAGE && resultCode == Activity.RESULT_OK) { Uri selectedImage = data.getData(); mImageURI = Uri.parse(selectedImage.toString()); mImageView.setImageURI(selectedImage); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BufferedImage getSelectedImage();", "public BufferedImage readImage(String id) {\n BufferedImage bufImg = null;\n try {\n PreparedStatement pstmt = conn.prepareStatement(\n \"SELECT photo FROM vehicles WHERE veh_reg_no = ?\");\n pstmt.setString(1, id);\n System.out.println(pstmt); // for debugging\n ResultSet rset = pstmt.executeQuery();\n // Only one result expected\n rset.next();\n // Read image via InputStream\n InputStream in = rset.getBinaryStream(\"photo\"); \n // Decode the inputstream as BufferedImage\n bufImg = ImageIO.read(in); \n } catch(Exception ex) {\n ex.printStackTrace();\n }\n return bufImg;\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n // sanity check and see whether the result is coming from the appropriate intent\n if (requestCode == 0 && resultCode == RESULT_OK && null != data) {\n Uri selectedImage = data.getData();\n\n // we fetch the column index of the selected image {MediaStore.Images.Media.DATA}\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n\n // To get the exact path of the image, we make use of the Cursor class\n Cursor cursor = getContentResolver().query(selectedImage,\n filePathColumn, null, null, null);\n cursor.moveToFirst();\n\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n String picturePath = cursor.getString(columnIndex);\n cursor.close();\n\n // get measurement\n currentMeasurement = pupilDetector.doMeasurement(picturePath, eyeColorSelection);\n displayProcessedImage(currentMeasurement);\n }\n }", "String avatarImageSelected();", "byte[] getRecipeImage(CharSequence query);", "java.lang.String getImage();", "void selectImage(String path);", "@Override\r\n\tpublic ArrayList<theaterImageVo> selectImage() {\n\t\treturn theaterRentalDaoImpl.selectImage();\r\n\t}", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();", "private void doNetGetImg() {\n\t\tString url = UploadUtils.PATIENTAPP_FILE_URL + CommonUtils.getTokenParam(activity) +\"&patientId=\"+orderMoreDetails.getPatientId()+\"&reportType=mr\";\n\t\tQJNetUICallback2 callback = new QJNetUICallback2<QjResult<HashMap<String,List<ImgQiNiuEntity>>>>(activity) {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tif (result != null\n\t\t\t\t\t\t&& result.getResults() != null) {\n\t\t\t\t\tList<ImgQiNiuEntity> list = result.getResults().get(\"files\");\n\t\t\t\t\tif (list != null) {\n\n\t\t\t\t\t\tif (list.size()>=9) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbtn_upcase.setVisibility(View.GONE);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tbtn_upcase.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int i = 0; i < list.size(); i ++){\n\t\t\t\t\t\t\tImageItem item = new ImageItem();\n\t\t\t\t\t\t\titem.imagePath = list.get(i).getThumbnailUrl();\n\t\t\t\t\t\t\titem.upImagePath = list.get(i).getAbsFileUrl();\n\t\t\t\t\t\t\tdataChoosed.add(item);\n\t\t\t\t\t\t\tnoScrollgridview.setAdapter(adapter);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic void onError(Exception e, QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tsuper.onError(e, result);\n\t\t\t\tToastUtil.showToast(activity, \"获取失败!\",Toast.LENGTH_LONG);\n\t\t\t}\n\n\t\t\tpublic void onCompleted(Exception e, QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tsuper.onCompleted(e, result);\n\t\t\t}\n\t\t};\n\t\tNetOld.with(activity).fetch( url ,null, new TypeToken<QjResult<HashMap<String,List<ImgQiNiuEntity>>>>() {}, callback);\n\t}", "public int getImage();", "String getImage();", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\r\n if (resultCode == Activity.RESULT_OK)\r\n switch (requestCode) {\r\n case 0:\r\n //data.getData return the content URI for the selected Image\r\n Uri selectedImage = data.getData();\r\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\r\n // Get the cursor\r\n Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null);\r\n // Move to first row\r\n cursor.moveToFirst();\r\n //Get the column index of MediaStore.Images.Media.DATA\r\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\r\n\r\n //Gets the String value in the column\r\n image = cursor.getString(columnIndex);\r\n cursor.close();\r\n // Set the Image in ImageView after decoding the String\r\n // imageView.setImageBitmap(BitmapFactory.decodeFile(imgDecodableString));\r\n\r\n textView.setText(image);\r\n\r\n break;\r\n\r\n }\r\n }", "public void showimg()\n {\n try{\n String s1=VoterSignUpForm.id;\n System.out.println(s1);\n Class.forName(\"com.mysql.jdbc.Driver\");//.newInstance();\n Connection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/votingsystem\", \"root\", \"\" );\n Statement st=conn.createStatement();\n ResultSet rs=st.executeQuery(\"select image from voterimg where id='\"+s1+\"'\");\n byte[] bytes = null;\n if(rs.next()){\n //String name=rs.getString(\"name\");\n //text1.setText(name);\n //String address=rs.getString(\"address\");\n //text2.setText(address);\n // name.setText(rs.getString(\"name\"));\n bytes = rs.getBytes(\"image\");\n Image image = img.getToolkit().createImage(bytes);\n ImageIcon icon=new ImageIcon(image);\n img.setIcon(icon);\n }\n }catch(Exception e)\n {}\n }", "private void selectImage() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(\n Intent.createChooser(\n intent,\n \"Select Image from here...\"),\n PICK_IMAGE_REQUEST);\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t//打开图片\n\t\tif(resultCode == RESULT_OK && requestCode == IMAGE_OPEN) {\n\t\t\tUri uri = data.getData();\n\t\t\t//查询选择图片\n\t\t\tif(!TextUtils.isEmpty(uri.getAuthority())) {\n\t\t\t\tCursor cursor = getContentResolver().query(uri, new String[]{MediaStore.Images.Media.DATA}, null, null, null);\n\n\t\t\t\tif(null == cursor){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t//光标移动至开头 获取图片路径;\n\t\t\t\tcursor.moveToFirst();\n\t\t\t\tpathImage = cursor.getString(cursor.getColumnIndex(MediaStore.Images.Media.DATA));\n\t\t\t}\n\n\t\t}//end if\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == TAKE_IMAGE && resultCode == RESULT_OK) {\n Bundle extra = data.getExtras();\n bitmap = (Bitmap) extra.get(\"data\");\n saveImage(bitmap);\n imageView.setImageBitmap(bitmap);\n } else if (requestCode == SELECT_IMAGE && resultCode == RESULT_OK) {\n Uri targetUri = data.getData();\n Toast.makeText(getApplicationContext(), targetUri.toString(), Toast.LENGTH_LONG).show();\n Bitmap bitmap;\n try {\n\n bitmap = BitmapFactory.decodeStream(getContentResolver().openInputStream(targetUri));\n\n imageView.setImageBitmap(bitmap);\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {\r\n Uri selectedImageURI = data.getData();\r\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\r\n\r\n Cursor cursor = getContentResolver().query(selectedImageURI,\r\n filePathColumn, null, null, null);\r\n cursor.moveToFirst();\r\n\r\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\r\n String picturePath = cursor.getString(columnIndex);\r\n cursor.close();\r\n\r\n selectedImage.setVisibility(View.VISIBLE);\r\n selectedImage.setImageBitmap(BitmapFactory.decodeFile(picturePath));\r\n\r\n //get the bytes from image that will be uploaded\r\n selectedImage.setDrawingCacheEnabled(true);\r\n selectedImage.buildDrawingCache();\r\n Bitmap bitmap = ((BitmapDrawable) selectedImage.getDrawable()).getBitmap();\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);\r\n imageBytes = baos.toByteArray();\r\n }\r\n }", "private byte[] queryImageAnswer() throws IOException\r\n {\r\n assertEquals(TimeSpan.get(myQueryTime, Milliseconds.ONE), EasyMock.getCurrentArguments()[1]);\r\n ByteArrayOutputStream out = new ByteArrayOutputStream();\r\n ImageIO.write(ImageUtil.LOADING_IMAGE, \"png\", out);\r\n\r\n return out.toByteArray();\r\n }", "public void loadInputImage()\n{\n selectInput(\"Select a file to process:\", \"imageLoader\"); // select image window -> imageLoader()\n}", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 7 && resultCode == RESULT_OK) {\n\n Bitmap bitmap = (Bitmap) data.getExtras().get(\"data\");\n currentBitMap = bitmap;\n imageView.setImageBitmap(bitmap);\n }\n\n try {\n if (requestCode == IMG_RESULT && resultCode == RESULT_OK && data != null) {\n Uri URI = data.getData();\n String[] FILE = {MediaStore.Images.Media.DATA};\n\n Cursor cursor = getContentResolver().query(URI, FILE, null, null, null);\n cursor.moveToFirst();\n\n int columnIndex = cursor.getColumnIndex(FILE[0]);\n String ImageDecode = cursor.getString(columnIndex);\n cursor.close();\n\n currentBitMap = BitmapFactory.decodeFile(ImageDecode);\n imageView.setImageBitmap(currentBitMap);\n }\n } catch (Exception e) {\n Toast.makeText(this, \"Please try again\", Toast.LENGTH_LONG)\n .show();\n }\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n case SELECTED_PICTURE:\n if (resultCode == RESULT_OK) {\n uri = data.getData();\n\n\n Log.e(\"Image path is \", \"\" + uri);\n String[] projection = {MediaStore.Images.Media.DATA};\n\n Cursor cursor = getContentResolver().query(uri, projection,\n null, null, null);\n cursor.moveToFirst();\n\n int columnIndex = cursor.getColumnIndex(projection[0]);\n String filePath = cursor.getString(columnIndex);\n String path = filePath;\n img = path;\n\n cursor.close();\n\n\n Bitmap yourSelectedImage = BitmapFactory.decodeFile(filePath);\n\n Drawable d = new BitmapDrawable(yourSelectedImage);\n\n newImage.setImageDrawable(d);\n Toast.makeText(getApplicationContext(), filePath,\n Toast.LENGTH_SHORT).show();\n\n\n\n }\n break;\n\n default:\n break;\n }\n }", "public void gettingImageInput(){\n Bitmap bm = getYourInputImage();\n int z;\n if(res==2) { z=50; }\n else { z=224; }\n Bitmap bitmap = Bitmap.createScaledBitmap(bm, z, z, true);\n input = ByteBuffer.allocateDirect(z * z * 3 * 4).order(ByteOrder.nativeOrder());\n for (int y = 0; y < z; y++) {\n for (int x = 0; x < z; x++) {\n int px = bitmap.getPixel(x, y);\n\n // Get channel values from the pixel value.\n int r = Color.red(px);\n int g = Color.green(px);\n int b = Color.blue(px);\n\n // Normalize channel values to [-1.0, 1.0]. This requirement depends\n // on the model. For example, some models might require values to be\n // normalized to the range [0.0, 1.0] instead.\n float rf = (r) / 255.0f;\n float gf = (g) / 255.0f;\n float bf = (b) / 255.0f;\n\n input.putFloat(rf);\n input.putFloat(gf);\n input.putFloat(bf);\n }\n }\n }", "private void getImage() {\n\n Intent intent = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n //intent.setType(\"text/xls\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n\n try {\n startActivityForResult(\n Intent.createChooser(intent, \"Complete action using\"),\n MY_INTENT_CLICK);\n }catch (Exception e) {\n e.getMessage();\n }\n }", "@Override\n protected void onActivityResult(int id, int result, Intent data) {\n if(result == RESULT_OK)\n {\n //check if its the choose image activity\n if(id == CHOOSE_IMAGE_ID)\n {\n Uri imageAddress = data.getData();\n //used to read image data\n InputStream inStream;\n\n try\n {\n inStream = getContentResolver().openInputStream(imageAddress);\n\n teamLogo = BitmapFactory.decodeStream(inStream);\n imageButton.setImageBitmap(teamLogo);\n }\n catch (FileNotFoundException e)\n {\n e.printStackTrace();\n }\n }\n }\n }", "com.google.protobuf.ByteString getImgData(int index);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == RESULT_OK) {\n if (requestCode == CommenString.TAKE_PHOTO) {\n cameraUtil.photoZoomFromTake(CropperImageScale.square);\n } else if (requestCode == CommenString.LOCAL_PHOTO) {\n List<String> selectedImage = data.getStringArrayListExtra(\"paths\");\n cameraUtil.photoZoomFromMapStorage(selectedImage.get(0),\n CropperImageScale.square);\n } else if (requestCode == CommenString.PHOTO_RESULT) {\n Bundle extras = data.getExtras();\n if (extras != null) {\n headBitmap = extras.getParcelable(\"data\");\n image_up.setImageBitmap(headBitmap);\n }\n } else {\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {\n Uri selectedImage = data.getData();\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n Cursor cursor = getContentResolver().query(selectedImage,\n filePathColumn, null, null, null);\n cursor.moveToFirst();\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n picturePath = cursor.getString(columnIndex);\n cursor.close();\n Bitmap bitmap = BitmapFactory.decodeFile(picturePath);\n mItemImageView.setImageBitmap(bitmap);\n }\n }", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (resultCode == Activity.RESULT_OK) {\n\t\t\tif (requestCode == SELECT_PICTURE) {\n\t\t\t\tUri selectedImageUri = data.getData();\n\n\t\t\t\t//OI FILE Manager\n\t\t\t\tfilemanagerstring = selectedImageUri.getPath();\n\n\t\t\t\t//MEDIA GALLERY\n\t\t\t\tselectedImagePath = getPath(selectedImageUri);\n\t\t\t\timg2.setImageURI(selectedImageUri);\n\n\n\t\t\t\t//img.setImageURI(selectedImageUri);\n\n\t\t\t\timagePath.getBytes();\n\n\t\t\t\timagePath=(imagePath.toString());\n\t\t\t\tSystem.out.println(\"MY PATH: \"+imagePath);\n\t\t\t\tBitmap bm = BitmapFactory.decodeFile(imagePath);\n\n\t\t\t}\n\n\t\t}\n\n\t}", "void imageChooser() {\n\n // create an instance of the\n // intent of the type image\n Intent i = new Intent();\n i.setType(\"image/*\");\n i.setAction(Intent.ACTION_GET_CONTENT);\n\n\n // pass the constant to compare it\n // with the returned requestCode\n startActivityForResult(Intent.createChooser(i, \"Select Picture\"), SELECT_PICTURE);\n }", "@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == RESULT_OK) {\n if (requestCode == 1) {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n String txt = getTextFromImage(bitmap);\n searchByPhoto(txt);\n }else if(requestCode == 2){\n Bitmap bm=null;\n if (data != null) {\n try {\n bm = MediaStore.Images.Media.getBitmap(getApplicationContext().getContentResolver(), data.getData());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n String txt = getTextFromImage(bm);\n searchByPhoto(txt);\n }\n }\n }", "private byte[] getGroupImage(Group group) {\n trGetGroupImage.setUser(user);\n trGetGroupImage.setGroup(group);\n trGetGroupImage.execute();\n\n return trGetGroupImage.getResult();\n }", "String getItemImage();", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\r\n Bitmap b=(Bitmap)data.getExtras().get(\"data\");\r\n i1.setImageBitmap(b);\r\n\r\n }", "byte[] getProfileImage();", "private void invokeGetPhoto() {\n // invoke the image gallery using an implicit intent.\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n // Show only images, no videos or anything else\n photoPickerIntent.setType(\"image/*\");\n photoPickerIntent.setAction(Intent.ACTION_GET_CONTENT);\n // Always show the chooser (if there are multiple options available)\n startActivityForResult(Intent.createChooser(photoPickerIntent, \"Choose a picture\"), REQUEST_IMAGE_CAPTURE);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n // choose a image\n if (requestCode == RequestCode.CHOOSE_IMAGE) {\n if (resultCode == RESULT_OK) {\n if (data != null) {\n Uri dataUri = data.getData();\n if (dataUri != null) {\n // get a random name\n File imgFile = SpaceUtils.newUsableFile();\n mSelectPath = imgFile.getPath();\n Log.v(\"path\",mSelectPath);\n // the image intent just return a simple image\n // the Ucrop(裁剪) is solved after the image intent\n UCrop.Options options = new UCrop.Options();\n options.setCompressionQuality(100);\n UCrop.of(dataUri, Uri.fromFile(imgFile))\n .withOptions(options)\n .withMaxResultSize(mImageSize.x, mImageSize.y)\n .withAspectRatio(3, 4)\n .start(this, RequestCode.CROP_IMAGE);\n }\n }\n }\n } else if (requestCode == RequestCode.CROP_IMAGE) {\n // crop a image\n if (resultCode == RESULT_OK) {\n if (data != null) {\n Glide.with(this).load(mSelectPath).into(mImageViews.get(mCurrentIndex));\n startDetectFaceInfo();\n }\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();", "public void call1()\n\t{\n\t\tIntent intent = new Intent();\n\t\tintent.setType(\"image/*\");\n\t\tintent.setAction(Intent.ACTION_GET_CONTENT);\n\t\tstartActivityForResult(Intent.createChooser(intent,\n\t\t\t\t\"Select Picture\"), SELECT_PICTURE);\n\n\n\t}", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (resultCode == RESULT_OK) {\n if (requestCode == SELECT_PICTURE) {\n\n Uri selectedImageURI = data.getData();\n\n image_uri.setText(selectedImageURI.toString());\n Picasso.with(getBaseContext()).load(selectedImageURI).noPlaceholder().centerCrop().fit()\n .into((ImageView) findViewById(R.id.imageViewCountry));\n\n }\n }\n }", "public BufferedImage getDati()\n { \n return imgDati;\n }", "private void displaySelectedImage(Intent data) {\n if (data == null) {\n return;\n }\n\n // checkPicture = true; depreciated, try catch to catch if photo exists\n Uri selectedImage = data.getData();\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n Cursor cursor = getContentResolver().query(selectedImage,\n filePathColumn, null, null, null);\n cursor.moveToFirst();\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n currentPhotoPath = cursor.getString(columnIndex);\n cursor.close();\n Bitmap temp = fixOrientation(BitmapFactory.decodeFile(currentPhotoPath));\n bitmapForAnalysis = temp;\n imageView.setImageBitmap(temp);\n }", "public void getPhoto() {\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n //for startActivityForResult, the second parameter, requestCode is used to identify this particular intent\n startActivityForResult(intent, 1);\n }", "@Override\n\t protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t if(requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {\n\t \tprofile_photo.setVisibility(View.VISIBLE);\n\t \tUri selectedImage = data.getData();\n\t String[] filePathColumn = { MediaStore.Images.Media.DATA };\n\n\t Cursor cursor = getContentResolver().query(selectedImage,\n\t filePathColumn, null, null, null);\n\t cursor.moveToFirst();\n\n\t int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n\t String picturePath = cursor.getString(columnIndex);\n\t cursor.close();\n\t \n\t ImageView imageView = (ImageView) findViewById(R.id.profile_photo);\n\t imageView.setImageBitmap(BitmapFactory.decodeFile(picturePath));\n\t }\n\t }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_CANCELED)\n return;\n\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case SELECT_LOCATION_REQUEST:\n String coordResult = (String) data.getExtras().get(\"selectedCoord\");\n geo_key.setText(coordResult);\n break;\n case PICK_IMAGE_REQUEST:\n Uri uri = data.getData();\n try {\n Bitmap imageBitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uri);\n Log.v(\"StegoCrypto-Image\", String.valueOf(imageBitmap));\n\n selectedImageIV.setImageBitmap(ImageUtility.getResizedBitmap(imageBitmap, ImageUtility.MAX_IMAGE_SIZE));\n } catch (IOException e) {e.printStackTrace();}\n break;\n case CAMERA_REQUEST:\n if (cameraFileUri != null) {\n try {\n Bitmap cameraBitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), cameraFileUri);\n selectedImageIV.setImageBitmap(ImageUtility.getResizedBitmap(cameraBitmap, ImageUtility.MAX_IMAGE_SIZE));\n } catch (IOException e) {e.printStackTrace();}\n }\n break;\n case DRAW_REQUEST:\n Bitmap drawBitmap = data.getParcelableExtra(\"drawingBitmap\");\n selectedImageIV.setImageBitmap(ImageUtility.getResizedBitmap(drawBitmap, ImageUtility.MAX_IMAGE_SIZE));\n break;\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_PICKER && resultCode == RESULT_OK && data != null) {\n images = data.getParcelableArrayListExtra(ImagePickerActivity.INTENT_EXTRA_SELECTED_IMAGES);\n if (images.size() > 0){\n imgButtonAddCustomerImage.setImageBitmap(BitmapFactory.decodeFile(images.get(0).getPath()));\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n //here we are applying the condition\n if(requestCode==50 && resultCode==RESULT_OK){\n //here it will Get the url from data\n Uri selectedImageUri = data.getData();\n if (null != selectedImageUri) {\n //displays image\n imageView.setImageURI(selectedImageUri);\n }\n }\n }", "private void programImgRetriever(Program p) {\n\n SwingWorker<ImageIcon, Void> sw = new SwingWorker<>() {\n @Override\n protected ImageIcon doInBackground() {\n\n return p.getImage();\n }\n\n @Override\n protected void done() {\n\n try {\n var tmp = get();\n view.setOptionDialog(p.getDescription(), tmp);\n isUpdating.set(false);\n\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n }\n };\n sw.execute();\n\n }", "void imageChooser() {\n\n\n Intent i = new Intent();\n i.setType(\"image/*\");\n i.setAction(Intent.ACTION_GET_CONTENT);\n\n\n startActivityForResult(Intent.createChooser(i, \"Select Picture\"), SELECT_PICTURE);\n }", "public YuiImage getSelectedImg() {\r\n\t\treturn selectedImg;\r\n\t}", "private void queryAndSetPicture() {\n StorageReference storageRef = mStorage.getReference().child(user.getId());\n final long ONE_MEGABYTE = 1024 * 1024;\n storageRef.getBytes(ONE_MEGABYTE).addOnSuccessListener(new OnSuccessListener<byte[]>() {\n @Override\n public void onSuccess(byte[] bytes) {\n // Data for \"images/island.jpg\" is returns, use this as needed\n mImageByteArray = bytes;\n mImageBitmap = BitmapFactory.decodeByteArray(mImageByteArray, 0, mImageByteArray.length);\n mUserimage.setImageBitmap(mImageBitmap);\n mUserimage.setBackgroundColor(80000000);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n // Handle any errors\n// mUserimage.setBackgroundColor(80000000);\n }\n });\n\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == -1 && requestCode == 1) {\n final Uri imageUri = data.getData();\n InputStream imageStream = null;\n try {\n imageStream = getContentResolver().openInputStream(imageUri);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n final Bitmap selectedImage = BitmapFactory.decodeStream(imageStream);\n Cursor cursor = getContentResolver().query(imageUri, null, null, null, null);\n /*\n * Get the column indexes of the data in the Cursor,\n * move to the first row in the Cursor, get the data,\n * and display it.\n */\n int nameIndex = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME);\n int column_index = cursor.getColumnIndex(MediaStore.Images.Media.DATA);\n cursor.moveToFirst();\n Log.d(\"test\", cursor.getString(nameIndex));\n// Log.d(\"test\", getRealPathFromURI(imageUri));\n // try {\n// String[] proj = { MediaStore.Images.Media.DATA };\n// cursor = getContentResolver().query(imageUri, proj, null, null, null);\n// int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n// cursor.moveToFirst();\n// Log.d(\"test\", cursor.getString(column_index) + \"\");\n// } finally {\n// if (cursor != null) {\n// cursor.close();\n// }\n// }\n this.selectedImage = cursor.getString(nameIndex);\n this.currentImageVew.setImageBitmap(selectedImage);\n this.currentImageVew.setContentDescription(imageUri.getPath());\n // CALL THIS METHOD TO GET THE URI FROM THE BITMAP\n Uri tempUri = getImageUri(getApplicationContext(), selectedImage);\n\n // CALL THIS METHOD TO GET THE ACTUAL PATH\n File finalFile = new File(getRealPathFromURI(tempUri));\n\n System.out.println(finalFile.getAbsoluteFile());\n System.out.println(finalFile.getName());\n try {\n System.out.println(finalFile.getCanonicalPath());\n } catch (IOException e) {\n e.printStackTrace();\n }\n this.currentImageVew.setContentDescription(finalFile.getPath());\n this.currentImageVew.setTag(\"0\");\n\n Log.d(\"test\", \"selectedImage \" + selectedImage);\n Log.d(\"test\", \"imageUri.getPath() \" + imageUri.getPath());\n\n }\n }", "public Image getOne();", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case SELECT_PHOTO:\n if (resultCode == RESULT_OK) {\n // imABoolean=true;\n try {\n filePath = data.getData();\n bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), filePath);\n\n logo.setImageBitmap(bitmap);\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n break;\n }\n }\n\n\n }", "public void selectImage(View view){\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(intent,PICK_IMAGE);\n }", "public Image getQuaverRest();", "public void onActivityResult(int requestCode,int resultCode,Intent data){\n if (resultCode == Activity.RESULT_OK)\n switch (requestCode){\n case GALLERY_REQUEST_CODE:\n //data.getData return the content URI for the selected Image\n Uri selectedImage = data.getData();\n String[] filePathColumn = { MediaStore.Images.Media.DATA };\n // Get the cursor\n Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null);\n // Move to first row\n cursor.moveToFirst();\n //Get the column index of MediaStore.Images.Media.DATA\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n //Gets the String value in the column\n String imgDecodableString = cursor.getString(columnIndex);\n cursor.close();\n Log.d(gallery.class.getSimpleName(), \"imgDecodableString : \" + imgDecodableString);\n uploadToServer(imgDecodableString);\n break;\n case CAMERA_REQUEST_CODE:\n Log.d(gallery.class.getSimpleName(), \"cameraFilePath : \" + cameraFilePath);\n uploadToServer(cameraFilePath);\n break;\n }\n }", "int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}", "private void fetchdriverimg(String result) throws IOException, JSONException {\n\n String url = \"http://www.mucaddam.pk/abdullah/vanapp/\" + result;\n Picasso.with(this).load(url).placeholder(R.drawable.driverico).error(R.drawable.driverico).into(dri_img, new com.squareup.picasso.Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n\n }\n });\n\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (resultCode == RESULT_OK) {\n\n // compare the resultCode with the\n // SELECT_PICTURE constant\n if (requestCode == SELECT_PICTURE) {\n Uri selectedImageURI = data.getData();\n// File imageFile = new File(getRealPathFromURI(selectedImageURI));\n Uri selectedImageUri = data.getData( );\n String picturePath = getPath( getApplicationContext( ), selectedImageUri );\n Log.d(\"Picture Path\", picturePath);\n\n // Get the url of the image from data\n selectedImageUri = data.getData();\n if (null != selectedImageUri) {\n bitmap = null;\n // update the preview image in the layout\n try {\n bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImageUri);\n } catch (IOException e) {\n e.printStackTrace();\n }\n// IVPreviewImage.setImageURI(selectedImageUri);\n// runTextRecognition(bitmap);\n IVPreviewImage.setImageBitmap(bitmap);\n\n }\n }\n\n if (requestCode == 123) {\n\n\n Bitmap photo = (Bitmap) data.getExtras()\n .get(\"data\");\n\n // Set the image in imageview for display\n IVPreviewImage.setImageBitmap(photo);\n runTextRecognition(photo);\n\n }\n\n }\n }", "public void loadImage1(View view) {\n Intent intent = new Intent(this, SelectImageActivity.class);\n startActivityForResult(intent, REQUEST_SELECT_IMAGE_1);\n }", "private void selectImageFromGallery() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.select_picture)),\n REQUEST_IMAGE_OPEN);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == PICK_IMAGE && resultCode == RESULT_OK && data != null && data.getData() != null) {\n filePath = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);\n Image_brand.setImageBitmap(bitmap);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "private void imagePic(){\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"),1);\n\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent,\n \"Select Picture\"), IMG_RESULT);\n\n }", "public Uri onSelectFromGalleryResult(Intent data) {\n\n Bitmap bm = null;\n if (data != null) {\n try {\n bm = MediaStore.Images.Media.getBitmap(context.getContentResolver(), data.getData());\n\n// profileImageUri\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n Uri imageUri = getImageUri(context, bm);\n Utils.d(\"debug\", \"PROFILE IMAGE URI 12:\" + getImageUri(context, bm));\n return imageUri;\n }", "public void getImage(int index) {\n\t\tcurrentIndex = index;\n Intent pickPhoto = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(pickPhoto, 1);//one can be replaced with any action code\n }", "public TE doInBackground(byte[]... data) {\n return PhotoModule.this.convertN21ToBitmap(data[0]);\n }", "public List<HashMap<String, Object>> imgListSel() {\n\t\treturn sql.selectList(\"imageMapper.imgListSel\", null);\n\t}", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n imageView = (ImageView) findViewById(R.id.contactImg);\n\n if (resultCode == RESULT_OK) {\n if (requestCode == SELECT_PICTURE) {\n selectedImageUri = data.getData();\n\n if (null != selectedImageUri) {\n saveImage(selectedImageUri.toString());\n imageView.setImageURI(selectedImageUri);\n setSelectedImgURI(selectedImageUri);\n\n }\n\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n switch (requestCode) {\n case REQUEST_SELECT_IMAGE_1:\n if (resultCode == RESULT_OK) {\n // If image is selected successfully, set the image URI and bitmap.\n mImageUri1 = null;\n mBitmap1 = null;\n mImageUri1 = data.getData();\n mBitmap1 = ImageHelper.loadSizeLimitedBitmapFromUri(\n mImageUri1, getContentResolver());\n if (mBitmap1 != null) {\n // Show the image on screen.\n ImageView imageView = (ImageView) findViewById(R.id.image_0);\n imageView.setImageBitmap(mBitmap1);\n\n }\n // Clear the information panel.\n setInfo(\"\");\n\n // Enable button \"show baby\" as the image to detect is not selected.\n setShowButtonsEnabledStatus(true);\n }\n break;\n case REQUEST_SELECT_IMAGE_2:\n if (resultCode == RESULT_OK) {\n // If image is selected successfully, set the image URI and bitmap.\n mImageUri2 = null;\n mBitmap2 = null;\n mImageUri2 = data.getData();\n mBitmap2 = ImageHelper.loadSizeLimitedBitmapFromUri(\n mImageUri2, getContentResolver());\n if (mBitmap2 != null) {\n // Show the image on screen.\n ImageView imageView = (ImageView) findViewById(R.id.image_1);\n imageView.setImageBitmap(mBitmap2);\n\n }\n // Clear the information panel.\n setInfo(\"\");\n\n // Enable button \"show baby\" as the image to detect is not selected.\n setShowButtonsEnabledStatus(true);\n }\n break;\n default:\n break;\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK && data != null && data.getData() != null) {\n filePath = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public void listarImg(int id, HttpServletResponse response) {\n\n String sql = \"select foto from producto where idProducto=?;\";\n\n InputStream inputStream = null;\n OutputStream outputStream = null;\n BufferedInputStream bufferedInputStream = null;\n BufferedOutputStream bufferedOutputStream = null;\n response.setContentType(\"image/*\"); //que hace esto?? uu\n\n try (Connection conn = getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sql);) {\n outputStream = response.getOutputStream();\n\n pstmt.setInt(1, id);\n\n try (ResultSet rs = pstmt.executeQuery()) {\n if (rs.next()) {\n inputStream = rs.getBinaryStream(\"foto\");\n }\n }\n bufferedInputStream = new BufferedInputStream(inputStream);\n bufferedOutputStream = new BufferedOutputStream(outputStream);\n\n int i = 0;\n while ((i = bufferedInputStream.read()) != -1) {\n bufferedOutputStream.write(i);\n }\n bufferedOutputStream.flush();\n\n } catch (SQLException | IOException e) {\n e.printStackTrace();\n }\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index);", "public ImageData getImageData() {\n\t\treturn this.data.getImageData();\n\t}", "PicInfo selectByPrimaryKey(Integer r_p_i);", "@Override\r\n protected void onActivityResult( int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\r\n if (requestCode == 1 && resultCode == RESULT_OK && data != null && data.getData() != null) {\r\n\r\n Uri selectedImageUri = data.getData();\r\n try {\r\n selectBitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), selectedImageUri);\r\n uploadImage();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n }", "private void selectImage() {\n final CharSequence[] options = { \"Take Photo\", \"Choose from Gallery\",\"Cancel\" };\n AlertDialog.Builder builder = new AlertDialog.Builder(EventsActivity.this);\n\n builder.setTitle(\"Search Events By Photo\");\n\n builder.setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n if(options[item].equals(\"Take Photo\")){\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (intent.resolveActivity(getPackageManager()) != null) {\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n\n }\n if (photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(context,\n \"com.example.android.fileprovider\",\n photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(intent, 1);\n }\n }\n }\n else if(options[item].equals(\"Choose from Gallery\")) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select File\"),2);\n }\n else if(options[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n builder.show();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tActivityDataRequest.getImage(MainActivity.this, img1);\n\t\t\t}", "private void choseImage() {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(intent, GALLERY_REQ_CODE);\n } else {\n Toast.makeText(this, R.string.no_image_picker, Toast.LENGTH_SHORT).show();\n }\n }", "public String getImage() { return image; }", "private Image getImage(boolean isSelected) {\n\t\tString key = isSelected ? CHECKED_IMAGE : UNCHECKED_IMAGE;\n\t\treturn imageRegistry.get(key);\n\t}", "ImageContentData findContentData(String imageId);", "private void pickFromCamera() {\n Intent startCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startCamera.putExtra(MediaStore.EXTRA_OUTPUT, uriImage);\n startActivityForResult(startCamera, IMAGE_PICK_CAMERA_CODE);\n\n }", "public abstract Image getImage();", "public abstract Image getImage();", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(\"pic\", new DataPart(imagename + \".jpg\", getFileDataFromDrawable(bitmap)));\n return params;\n }", "public List<Result> recognize(IplImage image);", "public void getImage(){\n Cursor c = db.rawQuery(\"SELECT * FROM Stories\",null);\n if(c.moveToNext()){\n byte[] image = c.getBlob(0);\n Bitmap bmp = BitmapFactory.decodeByteArray(image,0,image.length);\n }\n}", "private byte[] getImageOne() {\n Bitmap icon = BitmapFactory.decodeResource(getApplicationContext().getResources(),\n R.drawable.image0);\n return ImageConvert.convertImage2ByteArray(icon);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n // image k selection k liey requesting code jo hai upar vo 1234 hai ye dena hota hai\n startActivityForResult(Intent.createChooser(intent, \"Select Image\"), REQUEST_CODE);\n }", "public Bitmap getFinalShapesImage();", "@Override\r\n\tpublic ArrayList<theaterImageVo> selectImageView(int bnum) {\n\t\treturn theaterRentalDaoImpl.selectImageView(bnum);\r\n\t}", "SysPic selectByPrimaryKey(Integer id);", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent returnedIntent) {\r\n super.onActivityResult(requestCode, resultCode, returnedIntent);\r\n try {\r\n // When an Image is picked\r\n if (resultCode == RESULT_OK && null != returnedIntent) {\r\n // Get the Image from data\r\n Uri imageLocation = returnedIntent.getData();\r\n InputStream imageStream = getContentResolver().openInputStream(imageLocation);\r\n Bitmap selectedImage = BitmapFactory.decodeStream(imageStream);\r\n selectedImage = getResizedBitmap(selectedImage,1080/4,1920/4);\r\n currentUserEdit.setImageBitmap(selectedImage);\r\n currentSaveCharacter.setImage(selectedImage);\r\n saveCharacters(context);\r\n }\r\n } catch (Exception e) {\r\n Toast.makeText(this, \"ImageGet ERROR\", Toast.LENGTH_LONG)\r\n .show();\r\n Log.d(\"ImageGet ERROR\", e.toString());\r\n }\r\n\r\n }" ]
[ "0.68985426", "0.67200035", "0.636553", "0.636553", "0.636553", "0.62051225", "0.6198043", "0.6131745", "0.6131434", "0.6129003", "0.6119684", "0.61177593", "0.6094517", "0.60819644", "0.6054358", "0.6051018", "0.60291374", "0.60079366", "0.59770274", "0.5941887", "0.5935576", "0.59189695", "0.59125066", "0.58762014", "0.5865548", "0.58494014", "0.58262897", "0.5822355", "0.5819464", "0.58026147", "0.57988083", "0.57881135", "0.57862055", "0.5759327", "0.5758817", "0.57488334", "0.5736483", "0.5697178", "0.5682", "0.5668663", "0.5662981", "0.56618375", "0.5651878", "0.56515115", "0.5650651", "0.5649351", "0.5646229", "0.5646112", "0.5645653", "0.5644068", "0.5636996", "0.563255", "0.5627753", "0.56207865", "0.56188893", "0.5616409", "0.5610096", "0.5609241", "0.56077313", "0.5597122", "0.5590568", "0.55753314", "0.55745983", "0.5572524", "0.55677086", "0.5561293", "0.5557899", "0.55544406", "0.5550567", "0.55483794", "0.5542498", "0.55369025", "0.5531948", "0.55259675", "0.551516", "0.5508093", "0.5499065", "0.5495825", "0.54950994", "0.5492661", "0.54909086", "0.5490354", "0.54871726", "0.54860055", "0.54743516", "0.54739374", "0.5472908", "0.54722255", "0.5469215", "0.54615325", "0.54596514", "0.54596514", "0.5457983", "0.54558146", "0.5450094", "0.54476917", "0.5446213", "0.5442814", "0.5442596", "0.54383475", "0.5434709" ]
0.0
-1
the method checks if two bitmaps are the same
public boolean equals(Bitmap bitmap1, Bitmap bitmap2) { ByteBuffer buffer1 = ByteBuffer.allocate(bitmap1.getHeight() * bitmap1.getRowBytes()); bitmap1.copyPixelsToBuffer(buffer1); ByteBuffer buffer2 = ByteBuffer.allocate(bitmap2.getHeight() * bitmap2.getRowBytes()); bitmap2.copyPixelsToBuffer(buffer2); return Arrays.equals(buffer1.array(), buffer2.array()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean areImagesSame(Image a, Image b) {\n if(a.getWidth() == b.getWidth() && a.getHeight() == b.getHeight()) {\n for(int x=0; x<(int) a.getWidth(); x++) {\n for(int y=0; y<(int) a.getHeight(); y++) {\n // If even a single pixel doesn't match color then it will return false\n if(!a.getPixelReader().getColor(x, y).equals(b.getPixelReader().getColor(x, y))) return false;\n }\n }\n }\n return true;\n }", "@Test\n public void equality() {\n ImageReference expected = createSampleImage();\n\n assertEquals(expected, createSampleImage());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(\"content://bar\")\n .setIsTintable(true)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(1, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(TEST_WIDTH, 1)\n .build());\n\n assertEquals(expected.hashCode(), new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(true)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build()\n .hashCode());\n }", "private boolean imageStatsEquals(ImageStatistics a, ImageStatistics b)\n\t{\n\t\tif (!Arrays.equals(a.histogram, b.histogram))\n\t\t\treturn false;\n\n\t\tif (a.pixelCount != b.pixelCount)\n\t\t\treturn false;\n\n\t\tif (a.mode != b.mode)\n\t\t\treturn false;\n\n\t\tif (a.dmode != b.dmode)\n\t\t\treturn false;\n\n\t\tif (a.area != b.area)\n\t\t\treturn false;\n\n\t\tif (a.min != b.min)\n\t\t\treturn false;\n\n\t\tif (a.max != b.max)\n\t\t\treturn false;\n\n\t\tif (a.mean != b.mean)\n\t\t\treturn false;\n\n\t\tif (a.median != b.median)\n\t\t\treturn false;\n\n\t\tif (a.stdDev != b.stdDev)\n\t\t\treturn false;\n\n\t\tif (a.skewness != b.skewness)\n\t\t\treturn false;\n\n\t\tif (a.kurtosis != b.kurtosis)\n\t\t\treturn false;\n\n\t\tif (a.xCentroid != b.xCentroid)\n\t\t\treturn false;\n\n\t\tif (a.yCentroid != b.yCentroid)\n\t\t\treturn false;\n\n\t\tif (a.xCenterOfMass != b.xCenterOfMass)\n\t\t\treturn false;\n\n\t\tif (a.yCenterOfMass != b.yCenterOfMass)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "private Boolean equalWebItemImages(WebItemImage webItemImageOne, WebItemImage webItemImageTwo) {\n\t\tif (webItemImageOne==null && webItemImageTwo==null) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tif (webItemImageOne==null || webItemImageTwo==null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (webItemImageOne.getSourceURL() == webItemImageTwo.getSourceURL()) {\r\n\t\t\treturn true;\r\n\t\t } else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static boolean compareImages(String image1, String image2) {\n \t\tboolean equals = false;\n \t\ttry {\n \t\t\tExifInterface exif1 = new ExifInterface(image1);\n \t\t\tExifInterface exif2 = new ExifInterface(image2);\n \t\t\t\n \t\t\tfinal String datetime1 = exif1.getAttribute(ExifInterface.TAG_DATETIME);\n \t\t\tfinal String datetime2 = exif2.getAttribute(ExifInterface.TAG_DATETIME);\n \t\t\t\n \t\t\tif (!TextUtils.isEmpty(datetime1) && !TextUtils.isEmpty(datetime1)) {\n \t\t\t\tequals = datetime1.equals(datetime2);\n \t\t\t} else {\n \t\t\t\tLog.d(TAG, \"Datetime is null or empty. The MD5 checksum will be compared\");\n \t\t\t\tequals = compareFilesChecksum(image1, image2);\n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\tLog.e(TAG, e.getMessage());\n \t\t}\n \t\t\n \t\treturn equals;\n \t}", "public static Bitmap recycleOldBitmapIfDifferent(Bitmap oldBitmap, Bitmap newBitmap) {\n if (oldBitmap != newBitmap) {\n recycle(oldBitmap);\n }\n return newBitmap;\n }", "public static void compareImage( BufferedImage expectedImage, BufferedImage calculatedImage) {\n\n // take buffer data from botm image files //\n DataBuffer dbA = expectedImage.getData().getDataBuffer();\n int dataTypeSizeA= dbA.getDataTypeSize(DataBuffer.TYPE_BYTE);\n\n DataBuffer dbB =calculatedImage.getData().getDataBuffer();\n int dataTypeSizeB = dbB.getDataTypeSize(DataBuffer.TYPE_BYTE);\n\n\n //validate the image size\n Assert.assertEquals(dataTypeSizeA, dataTypeSizeB);\n Assert.assertEquals(dbA.getSize(), dbB.getSize());\n\n\n if (expectedImage.getWidth() == calculatedImage.getWidth() && expectedImage.getHeight() == calculatedImage.getHeight()) {\n for (int x = 0; x < calculatedImage.getWidth(); x++) {\n for (int y = 0; y < calculatedImage.getHeight(); y++) {\n Assert.assertEquals(expectedImage.getRGB(x, y), calculatedImage.getRGB(x, y));\n\n }\n }\n }\n\n\n }", "private void areEquals(FileInfo a, FileInfo b)\n\t{\n\t\t// will test a subset for now\n\n\t\tassertEquals(a.width,b.width);\n\t\tassertEquals(a.height,b.height);\n\t\tassertEquals(a.nImages,b.nImages);\n\t\tassertEquals(a.whiteIsZero,b.whiteIsZero);\n\t\tassertEquals(a.intelByteOrder,b.intelByteOrder);\n\t\tassertEquals(a.pixels,b.pixels);\n\t\tassertEquals(a.pixelWidth,b.pixelWidth,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.pixelHeight,b.pixelHeight,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.unit,b.unit);\n\t\tassertEquals(a.pixelDepth,b.pixelDepth,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.frameInterval,b.frameInterval,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.calibrationFunction,b.calibrationFunction);\n\t\tAssert.assertDoubleArraysEqual(a.coefficients,b.coefficients,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.valueUnit,b.valueUnit);\n\t\tassertEquals(a.fileType,b.fileType);\n\t\tassertEquals(a.lutSize,b.lutSize);\n\t\tassertArrayEquals(a.reds,b.reds);\n\t\tassertArrayEquals(a.greens,b.greens);\n\t\tassertArrayEquals(a.blues,b.blues);\n\t}", "public static void assertBitmapsAreSimilar(\n Bitmap expectedBitmap, Bitmap actualBitmap, double psnrThresholdDb) {\n assertThat(getPsnr(expectedBitmap, actualBitmap)).isAtLeast(psnrThresholdDb);\n }", "private static boolean areEqual (byte[] a, byte[] b) {\r\n int aLength = a.length;\r\n if (aLength != b.length)\r\n return false;\r\n for (int i = 0; i < aLength; i++)\r\n if (a[i] != b[i])\r\n return false;\r\n return true;\r\n }", "@Test\n\tpublic void doEqualsTestSameMapDifferentInstances() {\n\t\tassertTrue(bigBidiMap.equals(bigBidiMap_other));\n\n\t}", "private Comparison compareImages(SimpleNode first, SimpleNode second) {\n if (first instanceof JexlNode) {\n String firstImage = ((JexlNode) first).image;\n String secondImage = ((JexlNode) second).image;\n if (!Objects.equals(firstImage, secondImage)) {\n return Comparison.notEqual(\"Node images differ: \" + firstImage + \" vs \" + secondImage);\n }\n }\n return Comparison.IS_EQUAL;\n }", "private boolean slowEquals(byte[] a, byte[] b)\n {\n int diff = a.length ^ b.length;\n for(int i = 0; i < a.length && i < b.length; i++)\n diff |= a[i] ^ b[i];\n return diff == 0;\n }", "private static boolean slowEquals(byte[] a, byte[] b) {\n\t int diff = a.length ^ b.length;\n\t for(int i = 0; i < a.length && i < b.length; i++)\n\t diff |= a[i] ^ b[i];\n\t return diff == 0;\n\t }", "private static boolean slowEquals(final byte[] a, final byte[] b) {\n int diff = a.length ^ b.length;\n for (int i = 0; i < a.length && i < b.length; i++) {\n diff |= a[i] ^ b[i];\n }\n return diff == 0;\n }", "private static boolean slowEquals(byte[] a, byte[] b) {\r\n int diff = a.length ^ b.length;\r\n for (int i = 0; i < a.length && i < b.length; i++) {\r\n diff |= a[i] ^ b[i];\r\n }\r\n return diff == 0;\r\n }", "private static boolean compare(BufferedInputStream b1, BufferedInputStream b2) throws IOException {\n\t\tint cmp1 = 0, cmp2;\r\n\t\tbyte[] i = new byte[100];\r\n\t\tbyte[] j = new byte[100];\r\n\t\t\r\n\t\twhile(cmp1 != -1){\r\n\t\t\tcmp1 = b1.read(i, 0, i.length);\r\n\t\t\tcmp2 = b2.read(j, 0, j.length);\r\n\t\t\tif(cmp1 != cmp2){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(int k = 0; k < cmp1; k++){\r\n\t\t\t\tif(i[k] != j[k]){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private static boolean isMirrorImage(Tree left, Tree right){\n if(left==null || right == null){\n return (left==null && right==null);\n }\n\n return left.data==right.data && isMirrorImage(left.left,right.right) && isMirrorImage(left.right,right.left);\n}", "public boolean colorEquals(MagipicPuzzle other) {\r\n if (this.squares.size() != other.squares.size()) {\r\n return false;\r\n } else {\r\n for (int i : Interval.zeroUpTo(this.squares.size())) {\r\n if (!this.squares.get(i).colorEquals(other.squares.get(i))) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }", "void compare(BufferedImage bi0, BufferedImage bi1, int biType, Color c) {\n for (int x=0; x<wid; x++) {\n for (int y=0; y<hgt; y++) {\n int rgb0 = bi0.getRGB(x, y);\n int rgb1 = bi1.getRGB(x, y);\n if (rgb0 == rgb1) continue;\n int r0 = (rgb0 & 0xff0000) >> 16;\n int r1 = (rgb1 & 0xff0000) >> 16;\n int rdiff = r0-r1; if (rdiff<0) rdiff = -rdiff;\n int g0 = (rgb0 & 0x00ff00) >> 8;\n int g1 = (rgb1 & 0x00ff00) >> 8;\n int gdiff = g0-g1; if (gdiff<0) gdiff = -gdiff;\n int b0 = (rgb0 & 0x0000ff);\n int b1 = (rgb1 & 0x0000ff);\n int bdiff = b0-b1; if (bdiff<0) bdiff = -bdiff;\n if (rdiff > 1 || gdiff > 1 || bdiff > 1) {\n throw new RuntimeException(\n \"Images differ for type \"+biType + \" col=\"+c +\n \" at x=\" + x + \" y=\"+ y + \" \" +\n Integer.toHexString(rgb0) + \" vs \" +\n Integer.toHexString(rgb1));\n }\n }\n }\n\n }", "@Test\n\tpublic void equalsSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tboolean equals = key1.equals(key2);\n\t\tSystem.out.println();\n\t\tAssert.assertTrue(equals);\n\t}", "public void testEquals() {\n XYBlockRenderer r1 = new XYBlockRenderer();\n XYBlockRenderer r2 = new XYBlockRenderer();\n r1.setBlockHeight(2.0);\n r2.setBlockHeight(2.0);\n r1.setBlockWidth(2.0);\n r2.setBlockWidth(2.0);\n r1.setPaintScale(new GrayPaintScale(0.0, 1.0));\n r2.setPaintScale(new GrayPaintScale(0.0, 1.0));\n }", "public void compareTwoImages(WebDriver driver, String expectedImageFileName) throws Throwable {\n\t\t\n\t\tBufferedImage expectedImages = ImageIO.read(new File(constantValues.getSavedImagesFolderPath() + \"\\\\\" + expectedImageFileName + \".png\"));\n\t\t\n\t\tRandom randomVal = new Random();\n\t\tboolean comapareReturnValue = Shutterbug.shootPage(driver, ScrollStrategy.WHOLE_PAGE).withName(String.valueOf(randomVal.nextInt(1000))).equals(expectedImages);\n\t\tAssert.assertTrue(comapareReturnValue);\n\t\tlogger.info(\"Both imanges are matching as expected\");\n\t}", "@Override\n\tpublic boolean equals(Object o) {\n\t\tif (o == null)\n\t\t\treturn false;\n\t\tif (o == this)\n\t\t\treturn true;\n\t\tif (o instanceof EWAHCompressedBitmap) {\n\t\t\tEWAHCompressedBitmap other = (EWAHCompressedBitmap) o;\n\t\t\tif (this.sizeinbits == other.sizeinbits\n\t\t\t\t\t&& this.actualsizeinwords == other.actualsizeinwords\n\t\t\t\t\t&& this.rlw.position == other.rlw.position) {\n\t\t\t\tfor (int k = 0; k < this.actualsizeinwords; ++k)\n\t\t\t\t\tif (this.buffer[k] != other.buffer[k])\n\t\t\t\t\t\treturn false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tif (o instanceof IBitSet) {\n\t\t\tIBitSet b = (IBitSet) o;\n\t\t\tif (this.sizeinbits != b.sizeInBits())\n\t\t\t\treturn false;\n\t\t\tIntIterator i = intIterator();\n\t\t\tIntIterator j = b.intIterator();\n\n\t\t\twhile (i.hasNext())\n\t\t\t\tif (i.next() != j.next())\n\t\t\t\t\treturn false;\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "boolean hasSameAs();", "@Test\n\tpublic void doEqualsTestDifferentMaps() {\n\t\tassertFalse(bigBidiMap.equals(leftChildMap));\n\n\t}", "private static boolean compareByteArray(byte[] a1, byte[] a2, int length){\n for (int i = 0 ; i < length ; i++){\n if(a1[i] != a2[i])\n return false;\n else\n System.out.println(\"-------------------GOOD ---[ \"+ i);// log feedback\n }\n return true;\n }", "public static boolean slowEquals(byte[] a, byte[] b) {\n int diff = a.length ^ b.length;\n for (int i = 0; i < a.length && i < b.length; i++)\n diff |= a[i] ^ b[i];\n return diff == 0;\n }", "@Override\n public int compare(Camera.Size lhs, Camera.Size rhs) {\n return Long.signum((long) lhs.width * lhs.height -\n (long) rhs.width * rhs.height);\n }", "@Override\n public int compare(Camera.Size lhs, Camera.Size rhs) {\n return Long.signum((long) lhs.width * lhs.height -\n (long) rhs.width * rhs.height);\n }", "private boolean _no_transformation_needed(int[] src_size, double[] src_bbox, int[] dst_size, double[] dst_bbox){\n\n double xres = (dst_bbox[2]-dst_bbox[0])/dst_size[0];\n double yres = (dst_bbox[3]-dst_bbox[1])/dst_size[1];\n\n\n return (equals(src_size, dst_size) &&\n equals(this.src_srs, this.dst_srs) &&\n SRS.bbox_equals(src_bbox, dst_bbox, xres/10, yres/10));\n /*\n xres = (dst_bbox[2]-dst_bbox[0])/dst_size[0]\n yres = (dst_bbox[3]-dst_bbox[1])/dst_size[1]\n return (src_size == dst_size and\n self.src_srs == self.dst_srs and\n bbox_equals(src_bbox, dst_bbox, xres/10, yres/10))\n */\n }", "public static boolean same(int[] a, int[] b) {\r\n \treturn (a[0] == b[0] && a[1] == b[1]) || (a[0] == b[1] && a[1] == b[0]);\r\n }", "public void assertIconsEqual(Icon expected, Icon actual) {\n\t\tif (expected.equals(actual)) {\n\t\t\treturn;\n\t\t}\n\t\tURL url1 = getURL(expected);\n\t\tURL url2 = getURL(actual);\n\n\t\tif (url1 != null && url1.equals(url2)) {\n\t\t\treturn;\n\t\t}\n\t\tfail(\"Expected icon [\" + expected.getClass().getSimpleName() + \"]\" + expected.toString() +\n\t\t\t\", but got: [\" + actual.getClass().getSimpleName() + \"]\" + actual.toString());\n\t}", "public ArrayList<Bitmap> createBitmap(CanvasView src, CanvasView dst, ArrayList<Difference> difference) {\n Bitmap blank;\n Drawable view1Immutable = src.getBackground(); //get both backgrounds\n Bitmap view1Background = ((BitmapDrawable) view1Immutable).getBitmap();\n ArrayList<Bitmap> frames = new ArrayList<>();\n\n view1Background = Bitmap.createScaledBitmap(view1Background, 400, 400, false);\n double newX, newY;\n int width = view1.getWidth();\n int height = view1.getHeight();\n for (int i = 1; i <= frameCount; i++) { //for each frame\n ArrayList<Line> temp = new ArrayList();\n blank = Bitmap.createBitmap(400, 400, Bitmap.Config.ARGB_8888);\n for (int q = 0; q < view1.lines.size(); q++) {\n Line srcLine = dst.lines.get(q);\n Difference d = difference.get(q);\n Line l = new Line(srcLine.startX - Math.round(d.X1 * i), srcLine.startY - Math.round(d.Y1 * i), srcLine.stopX - Math.round(d.X2 * i), srcLine.stopY - Math.round(d.Y2 * i));\n temp.add(l);\n }\n\n for (int x = 0; x < width; x++) { //for each x pixel\n for (int y = 0; y < height; y++) { //for each y pixel\n double totalWeight = 0;\n double xDisplacement = 0;\n double yDisplacement = 0;\n for (int l = 0; l < view1.lines.size(); l++) { //for each line\n Line dest = view2.lines.get(l);\n Line srcLine = temp.get(l);\n double ptx = dest.startX - x;\n double pty = dest.startY - y;\n double nx = dest.yLength * -1;\n double ny = dest.xLength;\n\n double d = ((nx * ptx) + (ny * pty)) / ((Math.sqrt(nx * nx + ny * ny)));\n double fp = ((dest.xLength * (ptx * -1)) + (dest.yLength * (pty * -1)));\n fp = fp / (Math.sqrt(dest.xLength * dest.xLength + dest.yLength * dest.yLength));\n fp = fp / (Math.sqrt(dest.xLength * dest.xLength + dest.yLength * dest.yLength));\n\n nx = srcLine.yLength * -1;\n ny = srcLine.xLength;\n\n newX = ((srcLine.startX) + (fp * srcLine.xLength)) - ((d * nx / (Math.sqrt(nx * nx + ny * ny))));\n newY = ((srcLine.startY) + (fp * srcLine.yLength)) - ((d * ny / (Math.sqrt(nx * nx + ny * ny))));\n\n double weight = (1 / (0.01 + Math.abs(d)));\n totalWeight += weight;\n xDisplacement += (newX - x) * weight;\n yDisplacement += (newY - y) * weight;\n }\n\n newX = x + (xDisplacement / totalWeight);\n newY = y + (yDisplacement / totalWeight);\n\n if (xDisplacement == x - newX)\n newX = x - xDisplacement;\n\n if (yDisplacement == y - newY)\n newY = y - yDisplacement;\n\n if (newX < 0)\n newX = 0;\n if (newY < 0)\n newY = 0;\n if (newY >= 400)\n newY = 399;\n if (newX >= 400)\n newX = 399;\n blank.setPixel(x, y, view1Background.getPixel((int) Math.abs(newX), (int) Math.abs(newY)));\n }\n }\n frames.add(blank);\n }\n return frames;\n }", "private boolean m6545a(Canvas canvas) {\n Bitmap d = m6552d();\n Bitmap e = m6554e();\n if (d != null) {\n if (e != null) {\n m6547b(new Canvas(d));\n canvas.drawBitmap(d, 0.0f, 0.0f, this.f5067d);\n m6550c(new Canvas(e));\n canvas.drawBitmap(e, 0.0f, 0.0f, null);\n return true;\n }\n }\n return null;\n }", "public boolean almostEqual(Coordinates a, Coordinates b);", "@Test\n\tpublic void equalsSameObject() {\n\t\tProductScanImageURIKey key = this.getDefaultKey();\n\t\tboolean equals = key.equals(key);\n\t\tAssert.assertTrue(equals);\n\t}", "static native boolean areFontsTheSame(int font1, int font2);", "private boolean compareLumaPanes()\n {\n int d;\n int e;\n int f = 0;\n\n for (int j = 0; j < NB_DECODED; j++)\n {\n for (int i = 0; i < size; i += 10)\n {\n d = (initialImage[i] & 0xFF) - (decodedVideo[j][i] & 0xFF);\n e = (initialImage[i + 1] & 0xFF) - (decodedVideo[j][i + 1] & 0xFF);\n d = d < 0 ? -d : d;\n e = e < 0 ? -e : e;\n if (d > 50 && e > 50)\n {\n decodedVideo[j] = null;\n f++;\n break;\n }\n }\n }\n\n return f <= NB_DECODED / 2;\n }", "public static void main(String [] args) throws Exception{\n\t\tBufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n\t\tSystem.out.print(\"Enter first image path : \");\n\t String imgPath1 = bufferRead.readLine();\n\t System.out.print(\"Enter second image path : \");\n\t String imgPath2 = bufferRead.readLine();\n\t\tboolean res = compare(imgPath1, imgPath2);\n\t\tif(res)\n\t\t\tSystem.out.println(\"SAME\");\n\t\telse\n\t\t\tSystem.out.println(\"NOT SAME\");\n\t}", "@Test\n public void anotherEqualsTest(){\n //another 'random' equals test\n\n InputStream url2a= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_2a.json\");\n InputStream url2b= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_2b.json\");\n\n Backup backup_a = Backup.initFromFile(url2a);\n Backup backup_b = Backup.initFromFile(url2b);\n\n assertEquals(backup_a, backup_b);\n }", "private boolean checkBarcodeImg(Barcode barcode) {\n//\t\tif(barcode.getImg())\n\t\treturn true;\n\t}", "public static boolean compareFilesByteForByte(File file1, File file2) throws FileNotFoundException, IOException {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.compareFilesByteForByte\");\n boolean compareResult = true;\n if (file1.exists() && file2.exists()) {\n if (file1.length() == file2.length()) {\n FileInputStream file2InputStream;\n try (FileInputStream file1InputStream = new FileInputStream(file1)) {\n BufferedInputStream buffered1InputStream = new BufferedInputStream(file1InputStream);\n file2InputStream = new FileInputStream(file2);\n BufferedInputStream buffered2InputStream = new BufferedInputStream(file2InputStream);\n byte[] file1Buffer = new byte[(int) file1.length()];\n byte[] file2Buffer = new byte[(int) file2.length()];\n buffered1InputStream.read(file1Buffer);\n buffered2InputStream.read(file2Buffer);\n for (int i = 0; i < file1.length(); i++) {\n if (file1Buffer[i] != file2Buffer[i]) {\n compareResult = false;\n break;\n }\n }\n }\n file2InputStream.close();\n } else {\n compareResult = false;\n }\n } else if (file1.exists() && !file2.exists()) {\n compareResult = false;\n } else {\n compareResult = file1.exists() || !file2.exists();\n }\n return compareResult;\n }", "static int compareBytes(byte[] bs1, byte[] bs2) {\n int size = Math.min(bs1.length, bs2.length);\n int ret = compare(bs1, bs2, size);\n if (ret != 0) {\n return ret;\n }\n\n ret = bs1.length - bs2.length;\n if (ret != 0) {\n byte[] bs = (ret > 0) ? bs1 : bs2;\n for (int i = size; i < bs.length; i++) {\n if (bs[i] != (byte)0x0) {\n return ret;\n }\n }\n }\n return 0;\n }", "public static boolean simpleByteArrayCompare(byte[] byt1, byte[] byt2)\n\t{\n\t\tif (byt1.length != byt2.length)\n\t\t\treturn false;\n\t\tfor (int i = 0; i < byt2.length; i++)\n\t\t\tif (byt1[i] != byt2[i])\n\t\t\t\treturn false;\n\t\treturn true;\n\t}", "@Test\n public void getPicture_Exists(){\n Bitmap image = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_add);\n testRecipe.setImage(image, appContext);\n Bitmap retrieved = testRecipe.getImage(appContext);\n assertNotEquals(\"getPicture - Not Null\", null, retrieved);\n }", "boolean areTheyEqual(int[] array_a, int[] array_b) {\n if(array_a == null || array_b == null || array_a.length!=array_b.length) return false;\n\n HashMap<Integer,Integer> count = new HashMap<>();\n for(int x : array_a){\n count.put(x, count.getOrDefault(x,0)+1);\n }\n for(int y : array_b){\n count.put(y, count.getOrDefault(y,0)-1);\n if(count.get(y)==0) count.remove(y);\n }\n return count.size()==0;\n }", "public boolean mo25013a(Format other) {\n if (this.f16509i.size() != other.f16509i.size()) {\n return false;\n }\n for (int i = 0; i < this.f16509i.size(); i++) {\n if (!Arrays.equals((byte[]) this.f16509i.get(i), (byte[]) other.f16509i.get(i))) {\n return false;\n }\n }\n return true;\n }", "private Comparison checkEquality(SimpleNode node1, SimpleNode node2) {\n // Compare the classes.\n Comparison comparison = compareClasses(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the values.\n comparison = compareValues(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the images.\n comparison = compareImages(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the children.\n return compareChildren(node1, node2);\n }", "@Test\n public void editPicture_NotNull(){\n Bitmap originalImage = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_add);\n testRecipe.setImage(originalImage, appContext);\n Bitmap newImage = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_cart);\n testRecipe.setImage(newImage, appContext);\n assertNotEquals(\"editPicture - New Image Not Null\", null, testRecipe.getImage(appContext));\n }", "public void mo8098a(Bitmap bitmap, Bitmap bitmap2) {\n if (bitmap2 != null) {\n C2342x.m9083a((View) this, (Drawable) new BitmapDrawable(getContext().getResources(), bitmap2));\n } else {\n C2342x.m9082a((View) this, 0);\n }\n if (bitmap != null) {\n this.f6228b = bitmap.getWidth();\n this.f6229c = bitmap.getHeight();\n this.f6227a.setImageBitmap(Bitmap.createBitmap(bitmap));\n return;\n }\n this.f6227a.setImageDrawable(null);\n }", "@Test\n\tpublic void hashCodeSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tAssert.assertEquals(key1.hashCode(), key2.hashCode());\n\t}", "private boolean twoCornersWithSameColor(OthelloBitBoard board) {\r\n\t\tlong playerBoard = board.getBitBoardOf(playerColor);\r\n\t\tlong opponentBoard = board.getBitBoardOf(opponentColor);\r\n\t\treturn Long.bitCount(playerBoard & CORNER_MASK) > 1 || Long.bitCount(opponentBoard & CORNER_MASK) > 1;\r\n\t}", "private boolean compareMatrix(int[][] result , int[][] expected){\n if(result.length != expected.length || result[0].length != expected[0].length){\n return false;\n }\n for(int i=0;i<result.length;i++){\n for(int j=0;j<result[0].length;j++){\n\n if(result[i][j] != expected[i][j]){\n return false;\n }\n }\n }\n return true;\n }", "private static boolean areTheyEqual(int[][] tempArray, int[][] array2) {\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tif (tempArray[i][j] != array2[i][j]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isEqual(MatchingCardsTile other){\n return this.getNumber() == other.getNumber();\n }", "private boolean eq(int[] a,int[] b){\n\t\tboolean eq = true;\n\t\tif(a.length != b.length) return false;\n\t\tfor(int i=0;i<a.length;i++){\n\t\t\tif( a[i] != b[i] ){\n\t\t\t\teq = false;\n\t\t\t\tbreak;\n\t\t\t}else{\n\n\t\t\t}\n\t\t}\n\t\treturn eq;\n\t}", "Bitmap m7900a(Bitmap bitmap);", "public void showbitmap2() {\n \t\tImageView i = (ImageView)findViewById(R.id.frame2);\n \t\ti.setImageBitmap(mBitmap2);\n \t}", "@Test\n public void testEqualsTrue() {\n Rectangle r5 = new Rectangle(7, 4, new Color(255, 0, 0), new Position2D(50, 75));\n Rectangle r6 = new Rectangle(0, 4, new Color(255, 255, 255),\n new Position2D(-50, 75));\n Rectangle r7 = new Rectangle(7, 0, new Color(255, 255, 0), new Position2D(50, -75));\n Rectangle r8 = new Rectangle(0, 0, new Color(200, 150, 133),\n new Position2D(-50, -75));\n\n assertEquals(r1, r5);\n assertEquals(r2, r6);\n assertEquals(r3, r7);\n assertEquals(r4, r8);\n }", "@Test\n public void testKeyEquivalence() throws Exception {\n ScanResultMatchInfo matchInfo1 = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo1Prime = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo2 = ScanResultMatchInfo.fromWifiConfiguration(mConfig2);\n assertFalse(matchInfo1 == matchInfo1Prime); // Checking assumption\n MacAddress mac1 = MacAddressUtils.createRandomUnicastAddress();\n MacAddress mac2 = MacAddressUtils.createRandomUnicastAddress();\n assertNotEquals(mac1, mac2); // really tiny probability of failing here\n\n WifiCandidates.Key key1 = new WifiCandidates.Key(matchInfo1, mac1, 1);\n\n assertFalse(key1.equals(null));\n assertFalse(key1.equals((Integer) 0));\n // Same inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1, mac1, 1));\n // Equal inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1Prime, mac1, 1));\n // Hash codes of equal things should be equal\n assertEquals(key1.hashCode(), key1.hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1, mac1, 1).hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1Prime, mac1, 1).hashCode());\n\n // Unequal inputs should give unequal results\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo2, mac1, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac2, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac1, 2)));\n }", "private boolean isEqual(int[] x, int[] y) {\n for (int i = 0; i < 3; i++) {\n if (x[i] != y[i]) {\n return false;\n }\n }\n return true;\n }", "private Bitmap ensureGLCompatibleBitmap(Bitmap bitmap) {\n\t\tif (bitmap == null || bitmap.getConfig() != null) {\n\t\t\treturn bitmap;\n\t\t}\n\t\tBitmap newBitmap = bitmap.copy(Config.ARGB_8888, false);\n\t\tbitmap.recycle();\n\t\tSystem.gc();\n\t\t//Log.i(TAG, \"***bitmap**\" + (bitmap == null) + \" \" + (newBitmap == null));\n\t\treturn newBitmap;\n\t}", "void mo12205a(Bitmap bitmap);", "public boolean equals( Matriz matriz2 )\n {\n //definir dados\n boolean answer = true;\n int lin;\n int col;\n int lin2;\n int col2;\n int i, j;\n int x, y;\n\n //verificar se matrizes sao validas\n if( table == null || matriz2 == null )\n {\n IO.println(\"ERRO: Matrize(s) invalida(s). \");\n } //end\n else\n {\n //obter dimensoes\n lin = lines();\n col = columns();\n lin2 = lines();\n col2 = columns();\n\n //verificar se dimensoes sao validas\n\n if( lin <= 0 || col <= 0 || lin2 <= 0 || col2 <= 0 )\n {\n IO.println(\"ERRO: Tamanhos invalidos. \");\n } //end\n else\n {\n if( lin == lin2 && col == col2 )\n {\n for (i = 0; i < lin; i++)\n {\n for (j = 0; j < col; j++)\n {\n\n x = IO.getint(matriz2.table[i][j]);\n y = IO.getint(table[i][j]);\n if(x != y)\n {\n answer = false;\n } //end\n } //end repetir\n } //end repetir\n } //end\n else\n {\n answer = false;\n } //end se\n } //end se\n } //end se\n //retornar resposta\n return ( answer );\n }", "public static boolean isByteArraySame(byte[] bin1, byte[] bin2) {\n if (bin1 == null || bin2 == null) {\n return false;\n }\n if (bin1.length == 0 || bin2.length == 0) {\n return false;\n }\n if (bin1.length != bin2.length) {\n return false;\n }\n\n boolean same = true;\n for (int i = 0; i < bin1.length; i++) {\n if (bin1[i] != bin2[i]) {\n same = false;\n }\n }\n\n return same;\n }", "public static boolean equalByteArrays(byte[] lhs, byte[] rhs) {\n if(lhs == null && rhs == null) {\n return true;\n }\n if(lhs == null || rhs == null) {\n return false;\n }\n if(lhs.length != rhs.length) {\n return false;\n }\n for(int i = 0; i < lhs.length; ++i) {\n if(lhs[i] != rhs[i]) {\n return false;\n }\n }\n return true;\n }", "@Test\n\tpublic void hashCodeDifferentId() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setId(2);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}", "protected boolean isSameSnakSet(Iterator<Snak> snaks1, Iterator<Snak> snaks2) {\n\t\tArrayList<Snak> snakList1 = new ArrayList<>(5);\n\t\twhile (snaks1.hasNext()) {\n\t\t\tsnakList1.add(snaks1.next());\n\t\t}\n\n\t\tint snakCount2 = 0;\n\t\twhile (snaks2.hasNext()) {\n\t\t\tsnakCount2++;\n\t\t\tSnak snak2 = snaks2.next();\n\t\t\tboolean found = false;\n\t\t\tfor (int i = 0; i < snakList1.size(); i++) {\n\t\t\t\tif (snak2.equals(snakList1.get(i))) {\n\t\t\t\t\tsnakList1.set(i, null);\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn snakCount2 == snakList1.size();\n\t}", "private static boolean areBundlesEqual(Bundle lhs, Bundle rhs) {\n if (!lhs.keySet().equals(rhs.keySet())) {\n // Keys differ - bundles are not equal.\n return false;\n }\n for (String key : lhs.keySet()) {\n if (!areEqual(lhs.get(key), rhs.get(key))) {\n return false;\n }\n }\n return true;\n }", "int match(ArrayList<ImageCell> images);", "public static boolean similar(BinaryTreeNode t1, BinaryTreeNode t2) {\n\t\t\n \n\t\tif (isPlaceHolder(t1) && isPlaceHolder(t2))\n\t\treturn true;\n\n\t\telse if (isPlaceHolder(t1) || isPlaceHolder(t2))\n\t\treturn false;\n\n\t\treturn similar(t1.getLeft(),t2.getLeft()) && similar(t1.getRight(),t2.getRight()); \n\n\n }", "private void checkCardMatch(Card card1, Card card2) {\n if(card1.getColor().getColor() == card2.getColor().getColor()){\n card1.setCardState(CardState.MATCHED);\n card2.setCardState(CardState.MATCHED);\n\n playerManager.incrementScore();\n } else{\n card1.flipCard();\n card2.flipCard();\n }\n cardsClicked = new Card[2];\n switchPlayer();\n setRandomColors();\n checkGameOver();\n }", "static boolean byteMatch(byte[] a, int aOff, int aLen,\n byte[] b, int bOff, int bLen) {\n if ((aLen != bLen) || (a.length < aOff + aLen) ||\n (b.length < bOff + bLen)) {\n return false;\n }\n \n for (int i = 0; i < aLen; i++) {\n if (a[i + aOff] != b[i + bOff]) {\n return false;\n }\n }\n\n return true;\n }", "boolean equals(GameState b) {\n for (int i = 0; i < SIZE; i++) {\n for (int j = 0; j < SIZE; j++) {\n if (board[i][j] != b.board[i][j]) {\n return false;\n }\n }\n }\n return true;\n\n }", "@Test\n public void equalsBetweenDifferentBackups(){\n //backup_1 and backup_1b differs from\n InputStream url1= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1.json\");\n InputStream url1b= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1b.json\");\n\n Backup backup_a = Backup.initFromFile(url1);\n Backup backup_b = Backup.initFromFile(url1b);\n\n assertNotEquals(backup_a, backup_b);\n }", "private static boolean subBandsMatch(int[] sourceBands, int[] destinationBands) {\n/* 108 */ if (sourceBands == null && destinationBands == null)\n/* 109 */ return true; \n/* 110 */ if (sourceBands != null && destinationBands != null) {\n/* 111 */ if (sourceBands.length != destinationBands.length)\n/* */ {\n/* 113 */ return false;\n/* */ }\n/* 115 */ for (int i = 0; i < sourceBands.length; i++) {\n/* 116 */ if (sourceBands[i] != destinationBands[i]) {\n/* 117 */ return false;\n/* */ }\n/* */ } \n/* 120 */ return true;\n/* */ } \n/* */ \n/* 123 */ return false;\n/* */ }", "@Test\n\tpublic void equalsNullIdBoth() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tkey1.setId(LONG_ZERO);\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey2.setId(LONG_ZERO);\n\t\tboolean equals = key1.equals(key2);\n\t\tAssert.assertTrue(equals);\n\t}", "@Test\n public void equals_DifferentObjects_Test() {\n Assert.assertFalse(bq1.equals(ONE));\n }", "@Test\n public void equalsBetweenBackupsFromIdenticalFiles(){\n //backup_1 and backup_1b contain exactly the same text\n InputStream url= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1.json\");\n\n Backup backup_a = Backup.initFromFile(url);\n Backup backup_b = Backup.initFromFile(getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1.json\"));\n\n assertEquals(backup_a, backup_b);\n assertTrue(backup_a.equals(backup_b));\n }", "public static BufferedImage getDifferenceImage(BufferedImage img1, BufferedImage img2) {\n int width1 = img1.getWidth(); // Change - getWidth() and getHeight() for BufferedImage\n int width2 = img2.getWidth(); // take no arguments\n int height1 = img1.getHeight();\n int height2 = img2.getHeight();\n if ((width1 != width2) || (height1 != height2)) {\n System.err.println(\"Error: Images dimensions mismatch\");\n System.exit(1);\n }\n\n // NEW - Create output Buffered image of type RGB\n BufferedImage outImg = new BufferedImage(width1, height1, BufferedImage.TYPE_INT_RGB);\n\n // Modified - Changed to int as pixels are ints\n int diff;\n int result; // Stores output pixel\n for (int i = 0; i < height1; i++) {\n for (int j = 0; j < width1; j++) {\n int rgb1 = img1.getRGB(j, i);\n int rgb2 = img2.getRGB(j, i);\n int r1 = (rgb1 >> 16) & 0xff;\n int g1 = (rgb1 >> 8) & 0xff;\n int b1 = (rgb1) & 0xff;\n int r2 = (rgb2 >> 16) & 0xff;\n int g2 = (rgb2 >> 8) & 0xff;\n int b2 = (rgb2) & 0xff;\n diff = Math.abs(r1 - r2); // Change\n diff += Math.abs(g1 - g2);\n diff += Math.abs(b1 - b2);\n diff /= 3; // Change - Ensure result is between 0 - 255\n // Make the difference image gray scale\n // The RGB components are all the same\n result = (diff << 16) | (diff << 8) | diff;\n outImg.setRGB(j, i, result); // Set result\n }\n }\n\n // Now return\n return outImg;\n}", "public boolean areBothFieldsSet()\r\n {\r\n if ((!(isEditText1Empty)) && (!(isEditText2Empty))) {\r\n this.button1.setImageResource(R.drawable.login); // THIS NEEDS DIFFERENT SRC\r\n return true;\r\n } else {\r\n this.button1.setImageResource(R.drawable.login);\r\n return false;\r\n }\r\n }", "protected final boolean isDifferentColor(Card cardOne, Card cardTwo)\n {\n return cardOne.getColor() != cardTwo.getColor();\n }", "private static void m17787a(Bitmap bitmap, byte[] bArr) {\n int i;\n int i2 = 0;\n int[] iArr = new int[(bitmap.getWidth() - 2)];\n bitmap.getPixels(iArr, 0, iArr.length, 1, bitmap.getHeight() - 1, iArr.length, 1);\n for (i = 0; i < iArr.length; i++) {\n if (-16777216 == iArr[i]) {\n C5225r.m17789a(bArr, 12, i);\n break;\n }\n }\n for (i = iArr.length - 1; i >= 0; i--) {\n if (-16777216 == iArr[i]) {\n C5225r.m17789a(bArr, 16, (iArr.length - i) - 2);\n break;\n }\n }\n int[] iArr2 = new int[(bitmap.getHeight() - 2)];\n bitmap.getPixels(iArr2, 0, 1, bitmap.getWidth() - 1, 0, 1, iArr2.length);\n while (i2 < iArr2.length) {\n if (-16777216 == iArr2[i2]) {\n C5225r.m17789a(bArr, 20, i2);\n break;\n }\n i2++;\n }\n for (i = iArr2.length - 1; i >= 0; i--) {\n if (-16777216 == iArr2[i]) {\n C5225r.m17789a(bArr, 24, (iArr2.length - i) - 2);\n return;\n }\n }\n }", "public synchronized boolean compare(bitMap other) {\n\tfor (int i = 0; i < map.size(); i++) {\r\n\t if (other.getbitMap().get(i) == true && map.get(i) == false) {\r\n\t\treturn true;\r\n\t }\r\n\t}\r\n\treturn false;\r\n }", "public boolean Equals( AbstractBoard other )\n\t{\n\t\tif( this.getSize( ) != other.getSize( ) || this.getWidth( ) != other.getWidth( ) )\n\t\t\treturn false;\n\t\t\n\t\tfor( int i = 0; i < this.getSize( ); i++ )\n\t\t{\n\t\t\tfor( int j = 0; j < this.getWidth( ); j++ )\n\t\t\t{\n\t\t\t\tif( this.cell( i, j ) != other.cell( i, j ) )\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private static boolean haveSameSkeleton(JsonObject object1, JsonObject object2){\n\t\tboolean res = (object1.entrySet().size() == object2.entrySet().size());\n\t\tSystem.err.println(res);\n\t\tif (res){\n\t\t\tfor(java.util.Map.Entry<String, JsonElement> entry : object1.entrySet()){\n\t\t\t\tif (!object2.has(entry.getKey())) return false;\n\t\t\t}\n\t\t\treturn true;\t\t\t\n\t\t}\n\t\telse return false;\n\t}", "private android.graphics.Bitmap getMaskBitmap() {\n /*\n r20 = this;\n r0 = r20;\n r1 = r0.f5066b;\n if (r1 == 0) goto L_0x0009;\n L_0x0006:\n r1 = r0.f5066b;\n return r1;\n L_0x0009:\n r1 = r0.f5069f;\n r2 = r20.getWidth();\n r1 = r1.m6537a(r2);\n r2 = r0.f5069f;\n r3 = r20.getHeight();\n r2 = r2.m6539b(r3);\n r3 = m6543a(r1, r2);\n r0.f5066b = r3;\n r4 = new android.graphics.Canvas;\n r3 = r0.f5066b;\n r4.<init>(r3);\n r3 = com.facebook.shimmer.ShimmerFrameLayout.C18663.f5049a;\n r5 = r0.f5069f;\n r5 = r5.f5059i;\n r5 = r5.ordinal();\n r3 = r3[r5];\n r5 = 4611686018427387904; // 0x4000000000000000 float:0.0 double:2.0;\n r7 = 2;\n if (r3 == r7) goto L_0x0074;\n L_0x003b:\n r3 = com.facebook.shimmer.ShimmerFrameLayout.C18663.f5050b;\n r8 = r0.f5069f;\n r8 = r8.f5051a;\n r8 = r8.ordinal();\n r3 = r3[r8];\n r8 = 0;\n switch(r3) {\n case 2: goto L_0x0055;\n case 3: goto L_0x0051;\n case 4: goto L_0x004f;\n default: goto L_0x004b;\n };\n L_0x004b:\n r9 = r1;\n r3 = 0;\n L_0x004d:\n r10 = 0;\n goto L_0x0058;\n L_0x004f:\n r3 = r2;\n goto L_0x0053;\n L_0x0051:\n r8 = r1;\n r3 = 0;\n L_0x0053:\n r9 = 0;\n goto L_0x004d;\n L_0x0055:\n r10 = r2;\n r3 = 0;\n r9 = 0;\n L_0x0058:\n r19 = new android.graphics.LinearGradient;\n r12 = (float) r8;\n r13 = (float) r3;\n r14 = (float) r9;\n r15 = (float) r10;\n r3 = r0.f5069f;\n r16 = r3.m6538a();\n r3 = r0.f5069f;\n r17 = r3.m6540b();\n r18 = android.graphics.Shader.TileMode.REPEAT;\n r11 = r19;\n r11.<init>(r12, r13, r14, r15, r16, r17, r18);\n r3 = r19;\n goto L_0x009c;\n L_0x0074:\n r3 = r1 / 2;\n r8 = r2 / 2;\n r16 = new android.graphics.RadialGradient;\n r10 = (float) r3;\n r11 = (float) r8;\n r3 = java.lang.Math.max(r1, r2);\n r8 = (double) r3;\n r12 = java.lang.Math.sqrt(r5);\n r8 = r8 / r12;\n r12 = (float) r8;\n r3 = r0.f5069f;\n r13 = r3.m6538a();\n r3 = r0.f5069f;\n r14 = r3.m6540b();\n r15 = android.graphics.Shader.TileMode.REPEAT;\n r9 = r16;\n r9.<init>(r10, r11, r12, r13, r14, r15);\n r3 = r16;\n L_0x009c:\n r8 = r0.f5069f;\n r8 = r8.f5052b;\n r9 = r1 / 2;\n r9 = (float) r9;\n r10 = r2 / 2;\n r10 = (float) r10;\n r4.rotate(r8, r9, r10);\n r9 = new android.graphics.Paint;\n r9.<init>();\n r9.setShader(r3);\n r5 = java.lang.Math.sqrt(r5);\n r3 = java.lang.Math.max(r1, r2);\n r10 = (double) r3;\n r5 = r5 * r10;\n r3 = (int) r5;\n r3 = r3 / r7;\n r5 = -r3;\n r6 = (float) r5;\n r1 = r1 + r3;\n r7 = (float) r1;\n r2 = r2 + r3;\n r8 = (float) r2;\n r5 = r6;\n r4.drawRect(r5, r6, r7, r8, r9);\n r1 = r0.f5066b;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.shimmer.ShimmerFrameLayout.getMaskBitmap():android.graphics.Bitmap\");\n }", "boolean hasImageByTransform();", "@Test\n\tpublic void hashCodeSameObject() {\n\t\tProductScanImageURIKey key = this.getDefaultKey();\n\t\tAssert.assertEquals(key.hashCode(), key.hashCode());\n\t}", "@Test\n public void testHashcodeReturnsSameValueForIdenticalRecords() {\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(true));\n }", "@Test\n\tpublic void test_equals2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertFalse(t1.equals(t2));\n }", "public boolean checkEquality(){\n boolean flag = true;\n for (int i = 0; i < boardRows ; i++) {\n for (int j = 0; j < boardColumns; j++) {\n if(this.currentBoardState[i][j] != this.goalBoardState[i][j]){\n flag = false;\n }\n }\n }\n return flag;\n }", "public boolean equals(Object obj) {\n\t\tMercator p;\n\t\ttry {\n\t\t\tp = (Mercator)obj;\n\t\t} catch (ClassCastException ex) {\n\t\t\treturn false;\n\t\t}\n\t\tif(!super.equals(p))return false;\n\t\treturn (refY==p.refY) && (scaleY==p.scaleY);\n\t}", "public static boolean compareFilesChecksum(String path1, String path2) {\n \t\tfinal String checksum1 = getMD5Checksum(path1);\n \t\tfinal String checksum2 = getMD5Checksum(path2);\n \t\t\n \t\tif (!TextUtils.isEmpty(checksum1) && !TextUtils.isEmpty(checksum2)) {\n \t\t\treturn checksum1.equals(checksum2);\n \t\t}\n \t\t\n \t\treturn false;\n \t}", "@Test\n\tpublic void testSampleEquals() {\n\n\t\tassertTrue(square.equals(squareRotate));\n\t\t\n\t\tassertTrue(pyr1.equals(pyr5));\n\t\t\n\t\tassertTrue(s.equals(sInitial));\n\t\tassertFalse(stick.equals(stickRotated));\n\t\tassertFalse(s.equals(sRotated));\n\n\n\t}", "@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings().hashCode(), settings.hashCode());\n }", "public static boolean compare(byte[] a, byte[] b) {\n\t\tif (a.length!=b.length) return false;\n\t\tfor (int i=0; i<a.length; i++)\n\t\t\tif (a[i]!=b[i]) return false;\n\t\treturn true;\n\t}", "public static boolean doPixelsOverlap(int x1, int width1, int x2, int width2){\n\t\treturn\tx1 < x2 + width2 && x1 + width1 > x2;\n\t}", "private static boolean equals(int[] array1, int[] array2) {\n if(array1.length != array2.length)\n return false;\n \n Arrays.sort(array1);\n Arrays.sort(array2);\n \n int i = 0;\n for(; i < array1.length; ++i) {\n if(array1[i] != array2[i])\n break;\n }\n \n return (i == array1.length);\n }" ]
[ "0.69470924", "0.6403489", "0.6401763", "0.63533187", "0.6171845", "0.6115203", "0.60992295", "0.60880154", "0.60442674", "0.5994034", "0.5980506", "0.59778243", "0.5964834", "0.5936396", "0.59275573", "0.5897309", "0.588923", "0.58817536", "0.5814345", "0.581433", "0.577784", "0.57544935", "0.5748206", "0.5673859", "0.5654011", "0.5634665", "0.56298846", "0.56140286", "0.5602698", "0.5602698", "0.55809057", "0.5579674", "0.555871", "0.55485994", "0.551704", "0.5515171", "0.5514115", "0.55021745", "0.55012006", "0.5494036", "0.5492245", "0.5491789", "0.5481024", "0.5479424", "0.54192996", "0.5417068", "0.5414319", "0.5412707", "0.5401295", "0.54003704", "0.5396137", "0.53913", "0.53906506", "0.53893745", "0.53846204", "0.5384268", "0.5368217", "0.536592", "0.5360986", "0.5353538", "0.5350521", "0.53457123", "0.53438795", "0.53391343", "0.53377795", "0.5330787", "0.53263664", "0.53148913", "0.5313798", "0.52957785", "0.5295106", "0.52942663", "0.52896595", "0.52874744", "0.52569747", "0.5254736", "0.5245955", "0.524559", "0.5242619", "0.5237671", "0.5232068", "0.5230282", "0.521798", "0.5213139", "0.5207442", "0.52037925", "0.5202763", "0.5201888", "0.5197811", "0.51966923", "0.5189691", "0.51843756", "0.51832384", "0.51784045", "0.51774853", "0.51711595", "0.5168235", "0.51668525", "0.5162168", "0.51615804" ]
0.7588333
0
Unmodifiable view of EndTimes
public interface ReadOnlyEndTimes { /** * Returns an unmodifiable view of the endTimes list. * This list will not contain any duplicate endTimes. */ ObservableList<EndTime> getEndTimeList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Date getEndTime() {\n return endTime;\n }", "public int getTimeEnd() {\r\n return timeEnd;\r\n }", "long getEndTime() {\n return endTime;\n }", "public long getEndTs() {\n return this.startTimestamp + this.resolution * this.size;\n }", "@Override\n\tpublic float getEndTime() \n\t{\n\t\treturn _tend;\n\t}", "int getEndTime();", "int getEndTime();", "int getEndTime();", "public double getEndTime() {\n return endTime;\n }", "public int getEndTime()\n {\n if (isRepeated()) return end;\n else return time;\n }", "net.opengis.gml.x32.TimeInstantPropertyType getEnd();", "public Integer getEndTime() {\n return endTime;\n }", "public Date getEndTime() {\n return endTime;\n }", "public Date getEndTime() {\n return endTime;\n }", "public Date getEndTime() {\n return endTime;\n }", "public long getEndTime() {\r\n return endTime;\r\n }", "public long getEndTimestamp();", "public abstract long getEndTimestamp();", "public OffsetDateTime endTime() {\n return this.endTime;\n }", "public Date getEndTime() {\r\n return this.endTime;\r\n }", "public long getEndTime() {\n return endTime;\n }", "public long getEndTime() {\n return endTime;\n }", "public java.lang.Long getEndTime() {\n return end_time;\n }", "private Time(int end) {\r\n\t\tcurrentTime = 0;\r\n\t\tendOfTime = end;\r\n\t\tobservers = new ArrayList<TimeObserver>();\r\n\t}", "public Date getEndtime() {\n return endtime;\n }", "public long getEnd_time() {\n return end_time;\n }", "public long getTimeEnd()\n {\n return this.timeEnd;\n }", "public Date getEndTime() {\n return this.endTime;\n }", "public M csmiUpdateTimeEnd(Object end){this.put(\"csmiUpdateTimeEnd\", end);return this;}", "public abstract Date getEndTime();", "public java.lang.Long getEndTime() {\n return end_time;\n }", "public M csseUpdateTimeEnd(Object end){this.put(\"csseUpdateTimeEnd\", end);return this;}", "public LocalTime getEnd() {\n\treturn end;\n }", "public Long getTimestampEnd();", "public String getEndTime();", "public String getEndTime();", "public String getEndTime() {\n/* 34 */ return this.endTime;\n/* */ }", "long getVisitEndtime();", "long getVisitEndtime();", "public List<TimeSpan> getRequestedTimes()\r\n {\r\n return myRequestedTimes;\r\n }", "Instant getEnd();", "public String getEndtime() {\n return endtime;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "void setEndTime(Time endTime) {\n this.endTime = endTime;\n }", "public Date getEndTime() {\n\t\treturn endTime;\n\t}", "ObservableList<EndTime> getEndTimeList();", "public long getEndTime() {\n\t\treturn endTime;\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "public String getEndTime(){return endTime;}", "public String getEndTime() {\n return endTime;\n }", "public M csseAddTimeEnd(Object end){this.put(\"csseAddTimeEnd\", end);return this;}", "public M csmiAddTimeEnd(Object end){this.put(\"csmiAddTimeEnd\", end);return this;}", "public String getEndTime() {\r\n return endTime;\r\n }", "public Date getEndTimestamp() {\r\n return endTimestamp;\r\n }", "public LocalTime getEndTime () {\n\t\treturn DateUtils.toLocalTime(this.end);\n\t}", "public DateTime getEnd() {\r\n return new DateTime(getEndMillis(), getChronology());\r\n }", "void setEnd(net.opengis.gml.x32.TimeInstantPropertyType end);", "public java.util.Date getEndTime() {\n return endTime;\n }", "@Override\r\n\tpublic Date getEventEndTime() {\n\t\treturn null;\r\n\t}", "public OffsetDateTime usageEnd() {\n return this.usageEnd;\n }", "public void setEndTime(long value) {\r\n this.endTime = value;\r\n }", "public M csolAddTimeEnd(Object end){this.put(\"csolAddTimeEnd\", end);return this;}", "public java.lang.String getTime_end() {\r\n return time_end;\r\n }", "public java.util.Date getEndedAt() {\n return this.endedAt;\n }", "public String getEndTime() {\n return endTime;\n }", "public String getEndTime() {\n return endTime;\n }", "public String getEndTime() {\n return endTime;\n }", "@Override\n\tpublic int getTimeSlice() {\n\t\treturn 0;\n\t}", "public LocalDateTime getEndTime() {\n\t\treturn endTime;\n\t}", "public String getEndTime()\n {\n return this.endTime;\n }", "public java.util.Date getEndTime() {\n return this.endTime;\n }", "public java.util.Date getEndTime() {\n return this.endTime;\n }", "public double getSecondsEnd() {\n return secondsEnd;\n }", "OffsetDateTime usageEnd();", "net.opengis.gml.x32.TimePositionType getEndPosition();", "public Calendar getEndTime() {\r\n\t\treturn endTime;\r\n\t}", "public void setEndTime(String time){endTime = time;}", "public void setTimeEnd(int timeEnd) {\r\n this.timeEnd = timeEnd;\r\n }", "public int getEndHour() {\n\treturn end.getHour();// s\n }", "public long getEndTimestamp() {\n\t\treturn this.endTimestamp;\n\t}", "Date getEndedOn();", "public String getEndTime() {\n return this.EndTime;\n }", "public Date getEndTimeDate() {\n return endTimeDate;\n }", "net.opengis.gml.x32.TimeInstantPropertyType addNewEnd();", "public void setTimeEnd(long te)\n {\n this.timeEnd = (te > 0L)? te : -1L;\n }", "java.util.Calendar getEndTime();", "public void setEndTime(Integer endTime) {\n this.endTime = endTime;\n }", "public long duration() {\n\t\treturn end - start;\n\t}", "@Override\n\tpublic TimerValuesInterface getTimes() {\n\t\treturn timer;\n\t}", "void setEnd(Instant instant);", "public ArrayList<Time> getTimes() {\n\t\treturn times;\n\t}", "@Override\n\tpublic void setEndTime(float t) \n\t{\n\t\t_tend = t;\n\t}", "public long getVisitEndtime() {\n return visitEndtime_;\n }", "public long getVisitEndtime() {\n return visitEndtime_;\n }", "default void onCustomEndTimeChanged(LocalTime endTime) {}", "public Rational getEndTime ()\r\n {\r\n if (isWholeDuration()) {\r\n return null;\r\n }\r\n\r\n Rational chordDur = getDuration();\r\n\r\n if (chordDur == null) {\r\n return null;\r\n } else {\r\n return startTime.plus(chordDur);\r\n }\r\n }", "public OffsetDateTime finishTime() {\n return this.finishTime;\n }", "public java.util.Date getEndDateTime() {\n return this.endDateTime;\n }" ]
[ "0.67622596", "0.6670086", "0.6635485", "0.65608704", "0.6559543", "0.6545695", "0.6545695", "0.6545695", "0.65390676", "0.6530279", "0.65266794", "0.6473788", "0.64493454", "0.64493454", "0.64493454", "0.6440894", "0.6401497", "0.6389848", "0.6377362", "0.63768214", "0.635526", "0.635526", "0.6351646", "0.6339947", "0.6330851", "0.6328394", "0.63145185", "0.6314232", "0.6312649", "0.6302834", "0.62906015", "0.6261942", "0.6255065", "0.62441623", "0.6225317", "0.6225317", "0.6224726", "0.6202089", "0.6202089", "0.61875105", "0.61857456", "0.61799854", "0.6179152", "0.6179152", "0.6175978", "0.6158785", "0.61533356", "0.6151068", "0.61454964", "0.61454964", "0.61418545", "0.6137071", "0.6120369", "0.61077565", "0.6100345", "0.60954374", "0.60885257", "0.60846156", "0.6083049", "0.6049503", "0.6049502", "0.60399437", "0.60333467", "0.6021887", "0.6013635", "0.60121214", "0.600117", "0.600117", "0.600117", "0.5996245", "0.59765977", "0.59664935", "0.59611756", "0.59611756", "0.59588414", "0.5957841", "0.59572506", "0.59510046", "0.5946106", "0.59407306", "0.5938138", "0.59336513", "0.5928123", "0.592078", "0.59114313", "0.59060466", "0.5904199", "0.58931553", "0.5876044", "0.5871527", "0.5855102", "0.5849728", "0.58464724", "0.5845965", "0.5842284", "0.5842284", "0.5823732", "0.5820061", "0.5808675", "0.57884663" ]
0.6253936
33
Returns an unmodifiable view of the endTimes list. This list will not contain any duplicate endTimes.
ObservableList<EndTime> getEndTimeList();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getEndTs() {\n return this.startTimestamp + this.resolution * this.size;\n }", "@Override\n public Date getEndTime() {\n return endTime;\n }", "public ArrayList<Time> getTimes() {\n\t\treturn times;\n\t}", "public interface ReadOnlyEndTimes {\n\n /**\n * Returns an unmodifiable view of the endTimes list.\n * This list will not contain any duplicate endTimes.\n */\n ObservableList<EndTime> getEndTimeList();\n\n}", "public java.lang.Long getEndTime() {\n return end_time;\n }", "public Date getEndtime() {\n return endtime;\n }", "public java.lang.Long getEndTime() {\n return end_time;\n }", "public ArrayList<Long> getListOfTimes()\r\n {\r\n return this.listOfTimes;\r\n }", "public Date getEndTime() {\n return endTime;\n }", "public Date getEndTime() {\n return endTime;\n }", "public Date getEndTime() {\n return endTime;\n }", "public LocalTime getEndTime () {\n\t\treturn DateUtils.toLocalTime(this.end);\n\t}", "public DateTime getEnd() {\r\n return new DateTime(getEndMillis(), getChronology());\r\n }", "public ArrayList<String> getEditedTimeList() {\n return editedTimeList;\n }", "public OffsetDateTime endTime() {\n return this.endTime;\n }", "public int getTimeEnd() {\r\n return timeEnd;\r\n }", "public Date getEndTime() {\n\t\treturn endTime;\n\t}", "public java.util.Date getEndDateTime() {\n return this.endDateTime;\n }", "public LocalDateTime getEndTime() {\n\t\treturn endTime;\n\t}", "public TimeDateComponents getEventEndDate() {\n return getEventDates().getEndDate();\n }", "public Date getEndTime() {\r\n return this.endTime;\r\n }", "public Date getEndTimestamp() {\r\n return endTimestamp;\r\n }", "public int getEndTime()\n {\n if (isRepeated()) return end;\n else return time;\n }", "public java.util.Date getEndTime() {\n return endTime;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "public long getEnd_time() {\n return end_time;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }", "public Date getEndTime() {\n return this.endTime;\n }", "public long getEndTimestamp() {\n\t\treturn this.endTimestamp;\n\t}", "public List<Double> getTimeList()\n\t{\n\t\treturn this.timeList;\n\t}", "public List<models.garaDB.tables.pojos.Ride> fetchByEndtime(Timestamp... values) {\n return fetch(Ride.RIDE.ENDTIME, values);\n }", "public List<MaintenanceWindowTimeRange> timeRanges() {\n return this.timeRanges;\n }", "public String getEndtime() {\n return endtime;\n }", "public long getEndTimestamp();", "public Date getEndTimeDate() {\n return endTimeDate;\n }", "net.opengis.gml.x32.TimeInstantPropertyType getEnd();", "public long getTimeEnd()\n {\n return this.timeEnd;\n }", "public long getEndTime() {\r\n return endTime;\r\n }", "public LocalTime getEnd() {\n\treturn end;\n }", "public Calendar getEndTime() {\r\n\t\treturn endTime;\r\n\t}", "Collection<AssociationEnd> getSpecifiedEnds();", "public java.util.Date getEndTime() {\n return this.endTime;\n }", "public java.util.Date getEndTime() {\n return this.endTime;\n }", "public ArrayList<String> endsWithE() {\n return list;\n }", "public java.lang.String getTime_end() {\r\n return time_end;\r\n }", "public long getEndTime() {\n return endTime;\n }", "public long getEndTime() {\n return endTime;\n }", "public double getEndTime() {\n return endTime;\n }", "public Integer getEndTime() {\n return endTime;\n }", "public Collection<TimePeriod> getTimeSlots() {\n\t\treturn null;\n\t}", "public long getEndTime() {\n\t\treturn endTime;\n\t}", "public List<TimeSpan> getRequestedTimes()\r\n {\r\n return myRequestedTimes;\r\n }", "@Override\n\tpublic float getEndTime() \n\t{\n\t\treturn _tend;\n\t}", "public M csmiAddTimeEnd(Object end){this.put(\"csmiAddTimeEnd\", end);return this;}", "public java.util.List<referential.store.v2.TimeRange> getTuesdayTimeRanges() {\n return tuesdayTimeRanges;\n }", "void setEndTime(Time endTime) {\n this.endTime = endTime;\n }", "long getEndTime() {\n return endTime;\n }", "public java.util.List<referential.store.v2.TimeRange> getTuesdayTimeRanges() {\n return tuesdayTimeRanges;\n }", "public Long getTimestampEnd();", "public M csmiUpdateTimeEnd(Object end){this.put(\"csmiUpdateTimeEnd\", end);return this;}", "@ApiModelProperty(value = \"An array of each component of the event end date\")\n public DateDetails getEndDateDetails() {\n return endDateDetails;\n }", "public String getEndTime() {\r\n return endTime;\r\n }", "net.opengis.gml.x32.TimePositionType getEndPosition();", "@ApiModelProperty(value = \"An array of each component of the event end date in UTC time\")\n public DateDetails getUtcEndDateDetails() {\n return utcEndDateDetails;\n }", "public String getEndTime() {\n return endTime;\n }", "public java.util.Date getEndedAt() {\n return this.endedAt;\n }", "public List<LocalDateTime> getAllTimes() {\n\t\tList<LocalDateTime> allTimes = new ArrayList<LocalDateTime>();\n\t\tallTimes.add(shiftStartTime);\n\t\tallTimes.add(bedtime);\n\t\tallTimes.add(shiftEndTime);\n\t\treturn allTimes;\n\t}", "public String getEndTimeString() {\n return endTimeString;\n }", "public String getEndTime() {\n return endTime;\n }", "public String getEndTime() {\n return endTime;\n }", "public String getEndTime() {\n return endTime;\n }", "public M csseAddTimeEnd(Object end){this.put(\"csseAddTimeEnd\", end);return this;}", "public java.util.List<org.landxml.schema.landXML11.TimingDocument.Timing> getTimingList()\r\n {\r\n final class TimingList extends java.util.AbstractList<org.landxml.schema.landXML11.TimingDocument.Timing>\r\n {\r\n public org.landxml.schema.landXML11.TimingDocument.Timing get(int i)\r\n { return IntersectionImpl.this.getTimingArray(i); }\r\n \r\n public org.landxml.schema.landXML11.TimingDocument.Timing set(int i, org.landxml.schema.landXML11.TimingDocument.Timing o)\r\n {\r\n org.landxml.schema.landXML11.TimingDocument.Timing old = IntersectionImpl.this.getTimingArray(i);\r\n IntersectionImpl.this.setTimingArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.TimingDocument.Timing o)\r\n { IntersectionImpl.this.insertNewTiming(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.TimingDocument.Timing remove(int i)\r\n {\r\n org.landxml.schema.landXML11.TimingDocument.Timing old = IntersectionImpl.this.getTimingArray(i);\r\n IntersectionImpl.this.removeTiming(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfTimingArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new TimingList();\r\n }\r\n }", "public Long getLastEndTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getEndTime();\n }\n }", "public String getAllEditTime() {\n StringBuilder sb = new StringBuilder();\n for (String date: editedTimeList) {\n sb.append(date + \", \\n\");\n }\n return sb.toString();\n }", "public Date getjEndtime() {\n return jEndtime;\n }", "public void setEndTime(Date endTime) {\r\n this.endTime = endTime;\r\n }", "public abstract long getEndTimestamp();", "public Date getDtEnd() {\r\n return dtEnd;\r\n }", "public void setTimeEnd(int timeEnd) {\r\n this.timeEnd = timeEnd;\r\n }", "public List<Double> getArrivalTime() {\n return new ArrayList<Double>(arrivalTime);\n }", "public com.twc.bigdata.views.avro.viewing_info.Builder clearEndTime() {\n end_time = null;\n fieldSetFlags()[1] = false;\n return this;\n }", "public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }", "public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }", "public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }", "public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }", "public Rational getEndTime ()\r\n {\r\n if (isWholeDuration()) {\r\n return null;\r\n }\r\n\r\n Rational chordDur = getDuration();\r\n\r\n if (chordDur == null) {\r\n return null;\r\n } else {\r\n return startTime.plus(chordDur);\r\n }\r\n }", "void setEnd(net.opengis.gml.x32.TimeInstantPropertyType end);", "public M csseUpdateTimeEnd(Object end){this.put(\"csseUpdateTimeEnd\", end);return this;}", "public ArrayList<TimeLineEvent> getTimeLineEvents() {\n\t\treturn info;\n\t}", "public M csolAddTimeEnd(Object end){this.put(\"csolAddTimeEnd\", end);return this;}", "public java.util.List<referential.store.v2.TimeRange> getWednesdayTimeRanges() {\n return wednesdayTimeRanges;\n }", "public void setEndTime(String EndTime) {\n this.EndTime = EndTime;\n }", "public void setEndTime(long endTime) {\n this.endTime = endTime;\n }", "public Temporal getEndRecurrence() { return endRecurrence; }", "public java.util.List<referential.store.v2.TimeRange> getWednesdayTimeRanges() {\n return wednesdayTimeRanges;\n }", "@Override\n\tpublic List<ShowTime> getShowTimes() {\n\t\treturn moviesListed;\n\t}", "public java.util.List<java.lang.Long>\n getSinceTimeMsList() {\n return ((bitField0_ & 0x00000002) != 0) ?\n java.util.Collections.unmodifiableList(sinceTimeMs_) : sinceTimeMs_;\n }" ]
[ "0.6287446", "0.6008628", "0.59542537", "0.5946941", "0.5933246", "0.5927113", "0.59252375", "0.5920071", "0.59100735", "0.59100735", "0.59100735", "0.59046334", "0.5903111", "0.58995485", "0.5899185", "0.5890172", "0.5881276", "0.58803314", "0.58725655", "0.58372325", "0.5789799", "0.5783121", "0.57825595", "0.5778817", "0.5775722", "0.5775722", "0.57647496", "0.576366", "0.576366", "0.5759354", "0.5757229", "0.57474357", "0.57325304", "0.5724249", "0.5721885", "0.57185036", "0.5718306", "0.5709418", "0.56942284", "0.5671939", "0.5670349", "0.56699723", "0.56649256", "0.5648325", "0.5648325", "0.5647713", "0.5644372", "0.5625484", "0.5625484", "0.5619605", "0.56194663", "0.56152195", "0.55956215", "0.5580029", "0.55672336", "0.55559826", "0.5527217", "0.55129474", "0.54946095", "0.54889494", "0.54810834", "0.547741", "0.54707736", "0.5450377", "0.5438846", "0.5426436", "0.54242486", "0.540797", "0.5395091", "0.5392733", "0.53826934", "0.53826934", "0.53826934", "0.5373674", "0.53639686", "0.5356731", "0.53422", "0.53387743", "0.53361905", "0.53308576", "0.53285754", "0.5328185", "0.5324506", "0.5324387", "0.53091025", "0.53091025", "0.53091025", "0.53091025", "0.53079623", "0.5307641", "0.52965117", "0.5287784", "0.52842766", "0.5280886", "0.5274462", "0.5273835", "0.5273513", "0.5273293", "0.5269388", "0.52678144" ]
0.6737837
0
Enable or disable the phone's vibration
public void setVibrate(Boolean vibrate_on){ this.vibrate_on = vibrate_on; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setVibrationOff() {\n\n }", "public void setVibrationOn() {\n\n }", "static void vibrate() {\n String currentState = SettingDetail.settingDetails.get(VIBRATION_SETTING).getCurrentState();\n int ringerMode = audioManager.getRingerMode();\n if (currentState.equals(context.getString(R.string.enabled))\n || (currentState.equals(context.getString(R.string.followSystem))\n && (ringerMode == AudioManager.RINGER_MODE_NORMAL || ringerMode == AudioManager.RINGER_MODE_VIBRATE))) {\n vibrator.vibrate(VibrationEffect.createOneShot(100, VibrationEffect.DEFAULT_AMPLITUDE));\n }\n }", "public boolean getVibrationEnabled() {\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n return prefs.getBoolean(\"vibration_switch\", true);\n }", "public void enableSystemSound() {\n if (this.mAppContext != null) {\n Log.m19d(TAG, \"enableSystemSound\");\n try {\n StatusBarProvider.getInstance().disable(this.mAppContext, 0);\n setStreamMute(false);\n if (getRecorderState() != 3 && this.mAudioManager.getRingerMode() == 2) {\n this.mAudioManager.adjustStreamVolume(2, 100, 0);\n Settings.System.putInt(this.mAppContext.getContentResolver(), \"vibrate_when_ringing\", this.mVibrateWhileRingingState);\n }\n } catch (SecurityException e) {\n Log.m32w(TAG, \"enableSystemSound : \" + e);\n }\n }\n }", "@SuppressLint(\"MissingPermission\")\n protected void vibrate() {\n if (ContextCompat.checkSelfPermission(getContext(), Manifest.permission.VIBRATE)\n == PackageManager.PERMISSION_GRANTED && vibratingEnabled) {\n vibrator.vibrate(VIBRATION_DURATION);\n }\n }", "private void vibrate() {\n this.sexyVibrator.vibrate(400);\n }", "private void vibrateContinually(){\n vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\n long[] pattern = new long[]{0,400,1000,600,1000,800,1000};\n\n if (Build.VERSION.SDK_INT >= 26) {\n vibrator.vibrate(VibrationEffect.createWaveform(pattern, 0));\n } else {\n vibrator.vibrate(pattern, 0);\n }\n }", "private void setUpRingtoneAndVibration(int vibration) {\n AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n am.setStreamVolume(AudioManager.STREAM_ALARM, am.getStreamMaxVolume(AudioManager.STREAM_ALARM), AudioManager.FLAG_PLAY_SOUND);\n\n Uri alarmUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);\n if (alarmUri == null) {\n alarmUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n }\n try {\n mediaPlayer.setDataSource(this, alarmUri);\n mediaPlayer.setLooping(true);\n mediaPlayer.setAudioStreamType(AudioManager.STREAM_ALARM);\n mediaPlayer.prepare();\n mediaPlayer.start();\n if (vibration == 1) {\n vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\n vibrator.vibrate(vibrationPattern, 0);\n }\n } catch (Exception e) {\n\n }\n }", "public void enableMic(boolean enable);", "private void vibrate() {\r\n Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\r\n vibrator.vibrate(300); //vibrates for 300 milliseconds.\r\n }", "private void setAudioProfilModem() {\n int ringerMode = mAudioManager.getRingerModeInternal();\n ContentResolver mResolver = mContext.getContentResolver();\n Vibrator vibrator = (Vibrator) mContext\n .getSystemService(Context.VIBRATOR_SERVICE);\n boolean hasVibrator = vibrator == null ? false : vibrator.hasVibrator();\n if (AudioManager.RINGER_MODE_SILENT == ringerMode) {\n if (hasVibrator) {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 0);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_VIBRATE);\n /* @} */\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_RINGER,\n AudioManager.VIBRATE_SETTING_ON);\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_NOTIFICATION,\n AudioManager.VIBRATE_SETTING_ON);\n } else {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 1);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);\n /* @} */\n }\n } else if (AudioManager.RINGER_MODE_VIBRATE == ringerMode) {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 1);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_OUTDOOR);\n /* @} */\n }else if (AudioManager.RINGER_MODE_OUTDOOR == ringerMode) {//add by wanglei for outdoor mode\n Settings.System.putInt(mResolver,Settings.System.SOUND_EFFECTS_ENABLED, 1);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);\n }else {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 0);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_SILENT);\n /* @} */\n if (hasVibrator) {\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_RINGER,\n AudioManager.VIBRATE_SETTING_OFF);\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_NOTIFICATION,\n AudioManager.VIBRATE_SETTING_OFF);\n }\n }\n }", "public void vibrate() {\n if ((deltaX > vibrateThreshold) || (deltaY > vibrateThreshold) || (deltaZ > vibrateThreshold)) {\n v.vibrate(50);\n status = true;\n } else {\n status = false;\n }\n }", "private void startHwVibrate(int vibrateMode) {\n if (!(isKeyguardLocked() || (this.mHapticEnabled ^ 1) != 0 || StorageUtils.SDCARD_ROMOUNTED_STATE.equals(SystemProperties.get(\"runtime.mmitest.isrunning\", StorageUtils.SDCARD_RWMOUNTED_STATE)) || this.mVibrator == null)) {\n Log.d(TAG, \"startVibrateWithConfigProp:\" + vibrateMode);\n this.mVibrator.vibrate((long) vibrateMode);\n }\n }", "public void enableSound() {\n soundToggle = true;\n }", "public static void enableSound() {\n\t\tvelocity = 127;\n\t}", "private void VibrateButton(){\n\t\t\n\t\tvbrate = (Vibrator)PurchaseTicket.this.getSystemService(Context.VIBRATOR_SERVICE);\n\t\tvbrate.vibrate(100);\n\t}", "private void setVibrate(@NonNull NotificationCompat.Builder builder) {\n if (mFplReminder.isNotificationVibration()) {\n builder.setVibrate(getDefaultVibratePattern());\n }\n }", "public void stopVibration() {\n this.mVibrator.cancel();\n LtUtil.log_i(\"GripSensorTestTouchIc\", \"stopVibration\", \"Vibration stop\");\n }", "private void turnOn(View v) {\n bluetoothAdapter.enable();\n }", "public void disable()\n {\n // Verify service is connected\n assertService();\n \n try {\n \tmLedService.disable(mBinder);\n } catch (RemoteException e) {\n Log.e(TAG, \"disable failed\");\n }\n }", "public void disableSound() {\n soundToggle = false;\n }", "private static void sendVibrateIntent() {\n\t\tIntent intent = new Intent(\"org.metawatch.manager.VIBRATE\");\n\t\tBundle b = new Bundle();\n\t\tb.putInt(\"vibrate_on\", 500);\n\t\tb.putInt(\"vibrate_off\", 500);\n\t\tb.putInt(\"vibrate_cycles\", 3);\n\t\tintent.putExtras(b);\n\t\tcontext.sendBroadcast(intent);\n\t\treturn;\n\t}", "@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif (isChecked)\n\t\t\t\t{\n\t\t\t\t\tsilent.setChecked(false);\n\t\t\t\t\tmPrefsEditor.putBoolean(\"silent\", false);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tmPrefsEditor.putBoolean(\"vibration\", true);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Vibration Mode\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsilent.setChecked(true);\n\t\t\t\t\tmPrefsEditor.putBoolean(\"silent\", true);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tmPrefsEditor.putBoolean(\"vibration\", false);\n\t\t\t\t\tmPrefsEditor.apply();\t\t\t\t\t\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Silent Mode\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public void startAlarm() {\n\n vibri.vibrate(pattern, 0);\n ringring.play();\n timer.cancel();\n }", "public void putSilentOn() {\n StartupService.mode.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n }", "void disablePWM();", "public void disable() {\n disabled = true;\n circuit.disable();\n updateSign(true);\n notifyChipDisabled();\n }", "void enableDigital();", "public void m6656s() {\n if (Build.VERSION.SDK_INT >= 26 && this.f5405Y.getRingerMode() != 0) {\n this.f5432na.vibrate(VibrationEffect.createOneShot(12, 75));\n }\n }", "@Override\n\t\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\t\tif(!isChecked ){\n \t\t \n \t vibratorv = 0;\n\t\t\t\t\t\tv.setValue(0);\n \t }else{\n \t vibratorv = 1;\n \t \tv.setValue(1);\n \t }\n\t\t\t\t\t}", "public void volumeDown(){\n Intent intent = new Intent(getApplicationContext(), TouchController.class);\n intent.setAction(Constant.ACTION_VOLUME_DOWN);\n startService(intent);\n }", "OnOffSwitch alarmSwitch();", "public void enableLime(LimeState val);", "public void onToggleClicked(View view) {\n\t boolean on = ((ToggleButton) view).isChecked();\n\t \n\t if (on) {\n\t // Enable vibrate\n\t } else {\n\t // Disable vibrate\n\t }\n\t}", "@Override\n public void onDisabled(Context context) {\n SetAlarm(context,1,mywidget.class);\n\n }", "public boolean setVibrate() {\n boolean isVibrate = checkVibrate();\n editor.putBoolean(Constans.KeyPreference.TURN_VIBRATE, !isVibrate);\n editor.commit();\n return !isVibrate;\n }", "private void turnOff(View v) {\n bluetoothAdapter.disable();\n }", "public abstract void onDisable();", "public static void triggerHushMute(Context context) {\n // We can't call AudioService#silenceRingerModeInternal from here, so this is a partial copy of it\n int silenceRingerSetting = Settings.Secure.getIntForUser(context.getContentResolver(),\n Settings.Secure.VOLUME_HUSH_GESTURE, Settings.Secure.VOLUME_HUSH_OFF,\n UserHandle.USER_CURRENT);\n\n int ringerMode;\n int toastText;\n if (silenceRingerSetting == Settings.Secure.VOLUME_HUSH_VIBRATE) {\n ringerMode = AudioManager.RINGER_MODE_VIBRATE;\n toastText = com.android.internal.R.string.volume_dialog_ringer_guidance_vibrate;\n } else {\n // VOLUME_HUSH_MUTE and VOLUME_HUSH_OFF\n ringerMode = AudioManager.RINGER_MODE_SILENT;\n toastText = com.android.internal.R.string.volume_dialog_ringer_guidance_silent;\n }\n AudioManager audioMan = (AudioManager)\n context.getSystemService(Context.AUDIO_SERVICE);\n audioMan.setRingerModeInternal(ringerMode);\n Toast.makeText(context, toastText, Toast.LENGTH_SHORT).show();\n }", "public void mute() {\n this.tv.setVolume(0);\r\n }", "@Override\r\n\tpublic void onClick(View v) {\n\t\tString vsn=Context.VIBRATOR_SERVICE;\r\n\t\tVibrator vib;\r\n\t\tvib=(Vibrator)getSystemService(vsn);\r\n\t\tvib.vibrate(100);\r\n\t\t\r\n\t\tfinish();\r\n\t}", "private void disableSensor() {\n if (DEBUG) Log.w(TAG, \"<<< Sensor \" + getEmulatorFriendlyName() + \" is disabled.\");\n mEnabledByEmulator = false;\n mValue = \"Disabled by emulator\";\n\n Message msg = Message.obtain();\n msg.what = SENSOR_STATE_CHANGED;\n msg.obj = MonitoredSensor.this;\n notifyUiHandlers(msg);\n }", "public void enableKillSwitch(){\n isClimbing = false;\n isClimbingArmDown = false;\n Robot.isKillSwitchEnabled = true;\n }", "private static native void triggerVibration(long pointer,\n long controllerHandle,\n short leftSpeed,\n short rightSpeed);", "public void setRingDuringIncomingEarlyMedia(boolean enable);", "@Override\n\t\tpublic void onClick(View v) {\n\t\t if(btAdapt.isEnabled()){\n\t\t \tbtAdapt.disable();\n\t\t }else {\n\t\t\t\tIntent intent =new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t}", "public void onDisable()\n {\n }", "@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif (isChecked)\n\t\t\t\t{\n\t\t\t\t\tselect.setChecked(false);\n\t\t\t\t\tmPrefsEditor.putBoolean(\"silent\", true);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tmPrefsEditor.putBoolean(\"vibration\", false);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Silent Mode\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tselect.setChecked(true);\n\t\t\t\t\tmPrefsEditor.putBoolean(\"silent\", false);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tmPrefsEditor.putBoolean(\"vibration\", true);\n\t\t\t\t\tmPrefsEditor.apply();\t\t\t\t\t\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Vibration Mode\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "protected void enableActionMute()\n {\n Action action = new Action(\"Mute\");\n action.addOutputParameter(new ParameterRelated(\"Value\", iPropertyMute));\n iDelegateMute = new DoMute();\n enableAction(action, iDelegateMute);\n }", "public void onClick(View v) {\n is_enabled=!is_enabled;\n if(!is_enabled){\n textView_current_Status.setText(R.string.switcher_is_being_enabled_please_wait);\n //sayHello();\n Set_Switch_On();\n }else{\n textView_current_Status.setText(R.string.switcher_is_currently_disabled);\n Set_Switch_Off();\n }\n }", "public static void toggleMute()\n\t{\n\t\tmute = !mute;\n\t\tif (mute)\n\t\t{\n\t\t\t// Stop all sounds\n\t\t\tmusic.stop();\n\t\t\tlaserContinuous.stop();\n\t\t\tlaser.stop();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Start sounds\n\t\t\tstartMusic();\n\t\t\tif (laserRunning)\n\t\t\t{\n\t\t\t\tlaserContinuous.loop();\n\t\t\t}\n\t\t}\n\t}", "protected void enableActionSetMute()\n {\n Action action = new Action(\"SetMute\");\n action.addInputParameter(new ParameterRelated(\"Value\", iPropertyMute));\n iDelegateSetMute = new DoSetMute();\n enableAction(action, iDelegateSetMute);\n }", "void setShutterLEDState(boolean on);", "public void enableVideoCapture(boolean enable);", "public void onDisable() {\n }", "public void onDisable() {\n }", "public void onDisable() {\n }", "public void toggleAntiThief(boolean isOn) {\n if (!isOn) {\n DeviceUtils.sendSms(GlobalConstant.DEVICE_PHONE_NUMBER,GlobalConstant.CONTENT_UNLOCK);\n }else {\n DeviceUtils.sendSms(GlobalConstant.DEVICE_PHONE_NUMBER,GlobalConstant.CONTENT_LOCK);\n }\n }", "public void onDisable() {\r\n }", "@Override\n\tpublic void onEnable() {\n\t\tSystem.out.println(\"Modus: Forcedown\");\n\t\tArduinoInstruction.getInst().enable();\n\t\tArduinoInstruction.getInst().setControl((byte)0x40);\n\t}", "@Override\n public void onDisabled(Context context) {\n Log.d(TAG, \"onDisabled\");\n //Class clazz = WidgetBroadcastReceiver.class;\n\n PackageManager pm = context.getPackageManager();\n pm.setComponentEnabledSetting(new ComponentName(\"org.nilriri.LunarCalendar\", \".widget.BroadcastReceiver\"), PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);\n }", "public void onEnable() {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);\n vibrator.vibrate(4000);\n \n \n \tIntent i = new Intent(context, AlarmclockActivity.class); \n \ti.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); \n \tcontext.startActivity(i);\n \n\tMediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.alarm);\n\tmediaPlayer.start();\n\t\n\t\n\t\n PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);\n PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, \"DoNjfdhotDimScreen\");\n wl.acquire();\n \n }", "public void enablePropertyMute()\n {\n iPropertyMute = new PropertyBool(new ParameterBool(\"Mute\"));\n addProperty(iPropertyMute);\n }", "@Override\n public void onSetMute(int result) {\n Log.d(\"DLNA\", \"onSetMute result:\" + result);\n }", "public void toggleEnable();", "void onVoiceImeEnabledStatusChange();", "@Override\n public void onClick(View v) {\n BluetoothAdapter myBleAdapter = BluetoothAdapter.getDefaultAdapter();\n myBleAdapter.enable();\n\n if (myBleWrapper.isBtEnabled() == true) {\n tV1.setTextColor(Color.parseColor(\"#000000\"));\n tV1.setText(\"Yo ble is on\");\n }\n// else\n// {\n// tV1.setText(\"ble is off\");\n// }\n }", "public static void vibrate(Context context, int duration) {\n Vibrator v = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);\n v.vibrate(duration);\n }", "@Override\n public void onEnabled(Context context) {\n SetAlarm(context,1,mywidget.class);\n\n }", "void disable();", "void disable();", "@Override\n boolean disable() {\n return altingChannel.disable();\n }", "public boolean getMute();", "private static void remind(Context context, String message) { \n Toast.makeText(context, message, Toast.LENGTH_LONG).show();\n Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);\n vibrator.vibrate(VIBRATE_MILLIS);\n }", "public void enableAdaptiveRateControl(boolean enabled);", "@Override\n\tpublic void onDisable() {\n\t\tArduinoInstruction.getInst().disable();\n\t}", "public void enableReading(){\n active = true;\n registerBroadcastReceiver();\n }", "public void vibrate(long period)\n {\n Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\n v.vibrate(period);\n }", "public void turnOff() {\n\t\tOn = false;\n\t\tVolume = 1;\n\t\tChannel = 1;\n\t}", "public void setMute(boolean mute);", "@Override\n public void onReceiveSetting() {\n showAdButton.setEnabled(true);\n Toast.makeText(this, \"onReceiveSetting\", Toast.LENGTH_SHORT).show();\n }", "public void enable() {\n disabled = false;\n updateSign(true);\n circuit.enable();\n notifyChipEnabled();\n }", "public abstract void onEnable();", "public void enableAudioAdaptiveJittcomp(boolean enable);", "public int getVibrationState() {\n return -1;\n }", "public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }", "public void setSoundEnabled(final boolean sEnabled) { soundEnabled = sEnabled; }", "void disable() {\n }", "public void enableAudioMulticast(boolean yesno);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(isSpeaker) {\n\t\t\t\t\t//当前是扬声器模式,需切换为听筒模式\n\t\t\t\t\talert.dismiss();\n\t\t\t\t\taudioManager.setMode(AudioManager.MODE_IN_CALL);\n\t\t\t\t\tisSpeaker = false;\n\t\t\t\t\teditor.putInt(\"mode\", AudioManager.MODE_IN_CALL);\n\t\t\t\t\teditor.commit();\n\n\t\t\t\t}else {\n\t\t\t\t\talert.dismiss();\n\t\t\t\t\taudioManager.setMode(AudioManager.MODE_NORMAL);\n\t\t\t\t\tisSpeaker = true;\n\t\t\t\t\teditor.putInt(\"mode\", AudioManager.MODE_NORMAL);\n\t\t\t\t\teditor.commit();\n\n\t\t\t\t}\n\t\t\t\thandler.sendEmptyMessage(0x777);\n\n\t\t\t}", "public void ActiveVibrate(int intensity) {\n startVibration(intensity);\n new Timer().schedule(new TimerTask() {\n public void run() {\n }\n }, 500);\n }", "@Override\r\n\tprotected int _enableScanningOnOff(boolean onOff) throws NotOpenSerialException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t SerialPortErrorException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t SendTimeoutException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t RecvTimeoutException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ResponseCodeException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ProtocolParsingException {\r\n\t\treturn 0;\r\n\t}", "public void onEnabled() {\r\n }", "public static void shakeItBaby(Context context) {\n try {\n if (Build.VERSION.SDK_INT >= 26) {\n ((Vibrator) context.getSystemService(VIBRATOR_SERVICE)).vibrate(VibrationEffect.createOneShot(\n 150, VibrationEffect.DEFAULT_AMPLITUDE));\n } else {\n ((Vibrator) context.getSystemService(VIBRATOR_SERVICE)).vibrate(150);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onClick(View v) {\n if (mBluetoothConnection.isConnected()) {\n mBluetoothConnection.changeState(BluetoothConnection.STATE_IMAGE_RECEIVING);\n mBluetoothConnection.write(\"open_settings\");\n buttonSettings.setEnabled(false);\n } else {\n Toast.makeText(getBaseContext(), \"Device not connected\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onClick(View v) {\n Log.d(TAG, \"Set LCD mute ON. (display OFF)\");\n mDisplayControl.setMute(true);\n try{\n Thread.sleep(3000); //3000É~ÉäïbSleepÇ∑ÇÈ\n }catch(InterruptedException e){}\n\n Log.d(TAG, \"Set LCD mute OFF. (display ON)\");\n mDisplayControl.setMute(false);\n }", "public void enable(){\r\n\t\tthis.activ = true;\r\n\t}", "public void disable();" ]
[ "0.8086496", "0.79745364", "0.72394854", "0.719436", "0.71925306", "0.70339197", "0.68982655", "0.6800028", "0.6554775", "0.654955", "0.64985424", "0.64677304", "0.64636123", "0.64079326", "0.6374393", "0.6290031", "0.62613404", "0.6235523", "0.61874485", "0.618217", "0.61702037", "0.61215043", "0.6063898", "0.6061885", "0.60575074", "0.6056414", "0.6040949", "0.5934709", "0.59235525", "0.59227335", "0.5921311", "0.58877397", "0.58667296", "0.5840079", "0.583341", "0.5801761", "0.5795994", "0.5769069", "0.5757243", "0.5742638", "0.57355416", "0.5729893", "0.5728082", "0.57211816", "0.5721086", "0.57203656", "0.571432", "0.5707303", "0.5705935", "0.569903", "0.569517", "0.56898326", "0.5689315", "0.56820226", "0.56713957", "0.56695944", "0.56695944", "0.56675464", "0.56656444", "0.5663598", "0.5648946", "0.5647086", "0.56423044", "0.5642127", "0.5641582", "0.56400305", "0.563572", "0.5631978", "0.5629933", "0.5626773", "0.5623905", "0.56141084", "0.56141084", "0.56125075", "0.56076306", "0.56072617", "0.5590032", "0.5576818", "0.5571129", "0.55692565", "0.55685043", "0.55633724", "0.55619645", "0.55617195", "0.5561098", "0.55599445", "0.55470616", "0.5543825", "0.5536936", "0.5535955", "0.55291474", "0.5522752", "0.55196184", "0.55098885", "0.55009186", "0.5500402", "0.5499133", "0.5494217", "0.5490002", "0.5486612" ]
0.6800082
7
Enable or disable the app's sound
public void setSound(Boolean sound_on){ this.sound_on = sound_on; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void enableSound() {\n soundToggle = true;\n }", "public void enableSystemSound() {\n if (this.mAppContext != null) {\n Log.m19d(TAG, \"enableSystemSound\");\n try {\n StatusBarProvider.getInstance().disable(this.mAppContext, 0);\n setStreamMute(false);\n if (getRecorderState() != 3 && this.mAudioManager.getRingerMode() == 2) {\n this.mAudioManager.adjustStreamVolume(2, 100, 0);\n Settings.System.putInt(this.mAppContext.getContentResolver(), \"vibrate_when_ringing\", this.mVibrateWhileRingingState);\n }\n } catch (SecurityException e) {\n Log.m32w(TAG, \"enableSystemSound : \" + e);\n }\n }\n }", "public void disableSound() {\n soundToggle = false;\n }", "public void setSoundEnabled(final boolean sEnabled) { soundEnabled = sEnabled; }", "public static void enableSound() {\n\t\tvelocity = 127;\n\t}", "public void toggleSound() { \n\t\tif (mSoundEnable) {\n\t\t\tmSoundEnable = false; \n\t\t\tif (ResourceManager.getInstance().gameMusic.isPlaying())\n\t\t\t\tResourceManager.getInstance().gameMusic.pause();\n\t\t}\n\t\telse {\n\t\t\tmSoundEnable = true;\n\t\t\tif (!ResourceManager.getInstance().gameMusic.isPlaying()) {\n\t\t\t\tResourceManager.getInstance().gameMusic.play();\n\t\t\t}\n\t\t}\n\t}", "public void toggleSound()\n\t{\n\t\tif (sound)\n\t\t\tsound = false;\n\t\telse\n\t\t\tsound = true;\n\t\tnotifyObservers();\n\t}", "public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}", "public boolean getSoundEnabled() { return soundEnabled; }", "public boolean isSoundEnabled() {\n return soundToggle;\n }", "private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }", "public static boolean toggleSound()\r\n\t{\r\n\t\tSettings.setSoundOn( !Settings.isSoundOn() );\r\n\t\treturn Settings.isSoundOn();\r\n\t}", "void setSound(boolean b){\r\n\t\tgc.setSound(b);\r\n\t}", "protected void muteSounds()\n {\n if(confused.isPlaying())\n confused.stop();\n }", "private void playHintAudio() {\n AudioManager audioManager = (AudioManager)getContext().getSystemService(Context.AUDIO_SERVICE);\n int mode = audioManager.getRingerMode();\n Log.d(TAG,\"mode = \" + mode);\n\n if(mode != AudioManager.RINGER_MODE_SILENT && mode != AudioManager.RINGER_MODE_VIBRATE) {\n // prize modify for bug 44603 by zhaojian 20171205 start\n mMediaPlayer = MediaPlayer.create(getContext(),R.raw.hb_sound2);\n Log.d(\"debug\",\"isNotifySound = \" + getConfig().isNotifySound());\n if(getConfig().isNotifySound()) {\n mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n @Override\n public void onPrepared(MediaPlayer mp) {\n mp.start();\n }\n });\n mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n mp.release();\n }\n });\n mMediaPlayer.start();\n }\n // prize modify for bug 44603 by zhaojian 20171205 end\n }\n }", "public static void setSound(boolean tempSound) {\n sound = tempSound;\n }", "public void setSoundNotificationEnabled(boolean isSoundEnabled)\r\n {\r\n this.isSoundNotificationEnabled = isSoundEnabled;\r\n }", "public void putSilentOn() {\n StartupService.mode.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(bSound){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tms.prepare();\n\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tms.start();\n\t\t\t\t\tbSound = true;\n\t\t\t\t}else{\n\t\t\t\t\tbSound = false;\n\t\t\t\t\tms.reset();\n\t\t\t\t}\n\t\t\t}", "@Override\n public void makeSound() {\n\n }", "@Override\n public void makeSound() {\n\n }", "public void setSoundPlaybackEnabled(boolean isSoundEnabled)\r\n {\r\n this.isSoundPlaybackEnabled = isSoundEnabled;\r\n }", "boolean getShutterSoundPref();", "public void playSound(SoundType type) {\n if (!gameController.getGameStatPanel().getUserData().isSoundDisabled()) soundMap.get(type).play();\n }", "@Override\n public void playSound(int soundId) {\n\n }", "public void enableAudioMulticast(boolean yesno);", "public void registerSounds()\n {\n }", "public void sendAllSoundsOff()\n {\n super.sendAllSoundsOff();\n }", "public synchronized boolean getEnabled() {\r\n return this.soundOn;\r\n }", "public void playAmbientSound() {\n if (!this.isClosed()) {\n super.playAmbientSound();\n }\n\n }", "private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}", "public void setSoundShot(final boolean sShot) { soundShot = sShot; }", "public void startShower(){\n Log.d(LOGTAG,\"Shower is on.\");\n playSound();\n\n\n }", "public boolean isSound() {\n\t\treturn true;\n\t}", "public void PauseSound();", "private synchronized void playBackgroundSound(boolean state) {\r\n // enable/disable the background sound\r\n if (this.backgroundSound != null) {\r\n\r\n // stop the sound in case that is already playing\r\n if (this.backgroundSound.isPlaying()) {\r\n this.backgroundSound.stop();\r\n this.backgroundSound.close();\r\n }\r\n\r\n // wait for the above sound to complete the stop request\r\n while (this.backgroundSound.isPlaying()) {\r\n try {\r\n Thread.sleep(50);\r\n Thread.yield();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n // play the sound if the sound was enabled\r\n if (this.soundOn && state && !this.runSimulationState) {\r\n this.backgroundSound.setSoundFileAutoLoop(true);\r\n this.backgroundSound.play();\r\n }\r\n }\r\n }", "public static void toggleMute()\n\t{\n\t\tmute = !mute;\n\t\tif (mute)\n\t\t{\n\t\t\t// Stop all sounds\n\t\t\tmusic.stop();\n\t\t\tlaserContinuous.stop();\n\t\t\tlaser.stop();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Start sounds\n\t\t\tstartMusic();\n\t\t\tif (laserRunning)\n\t\t\t{\n\t\t\t\tlaserContinuous.loop();\n\t\t\t}\n\t\t}\n\t}", "public void playThemeSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, THEME);\n\t}", "public void enableMic(boolean enable);", "public synchronized void playExclaimSound()\n {\n if (PLAY_EXCLAIM_SOUND_RUNNABLE == null)\n {\n PLAY_EXCLAIM_SOUND_RUNNABLE = (Runnable)Toolkit.getDefaultToolkit().getDesktopProperty(EXCLAIM_SOUND_PROPERTY_NAME);\n }\n if (PLAY_EXCLAIM_SOUND_RUNNABLE != null)\n {\n PLAY_EXCLAIM_SOUND_RUNNABLE.run();\n }\n }", "@FXML\n\tpublic void recorderPlayAudio() {\n\t\tcontroller.audioRecorderPlayAudio();\n\t\trecorderButtonPlay.setDisable(true);\n\t\trecorderButtonPause.setDisable(false);\n\t\trecorderButtonStop.setDisable(false);\n\t}", "void setValueMixerSound(int value);", "private void setUpSound() {\n\t\tAssetManager am = getActivity().getAssets();\n\t\t// activity only stuff\n\t\tgetActivity().setVolumeControlStream(AudioManager.STREAM_MUSIC);\n\n\t\tAudioManager audioManager = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE);\n\t\tsp = new SPPlayer(am, audioManager);\n\t}", "private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }", "public void actionPerformed(ActionEvent e){\n\t\tSystem.out.println(\"SOUND ON/OFF\");\n\t\tgame.toggleSound();\n\t}", "public void playBeep(){\n //https://stackoverflow.com/questions/2618182/how-to-play-ringtone-alarm-sound-in-android\n try{\n //gets notification sound then plays it.\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);\n\n r.play();\n TimeUnit.MILLISECONDS.sleep(300);\n r.stop();\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }", "void InitSound() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n //Use the newer SoundPool.Builder\n //Set the audio attributes, SONIFICATION is for interaction events\n //uses builder pattern\n AudioAttributes aa = new AudioAttributes.Builder()\n .setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)\n .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)\n .build();\n\n //default max streams is 1\n //also uses builder pattern\n dice_sound= new SoundPool.Builder().setAudioAttributes(aa).build();\n\n } else {\n // Running on device earlier than Lollipop\n //Use the older SoundPool constructor\n dice_sound=PreLollipopSoundPool.NewSoundPool();\n }\n //Load the dice sound\n sound_id=dice_sound.load(this,R.raw.shake_dice,1);\n alarm_sound_id=dice_sound.load(this,R.raw.on_time,1);\n }", "public void toggleMusic() {\n this.musicEnabled = !this.musicEnabled;\n }", "public static void stopSound() {\n if(mAudioManager != null) {\n mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, originalVolume, 0);\n }\n if (mp != null) {\n mp.stop();\n Log.d(TAG, \"Stop Sound\");\n }\n }", "public void specialSong()\n {\n if(!mute)\n {\n try {\n \n bclip.stop();\n \n // Open an audio input stream.\n //URL url = this.getClass().getClassLoader().getResource(\"Glitzville.wav\"); \n //if(lastpowerUp.equals(\"RAINBOW\"))\n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Starman.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n sclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n sclip.open(audioIn); \n \n sclip.start();\n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } \n }\n }", "public static void playSound(Context context) {\n mAudioManager = (AudioManager) context.getSystemService(AUDIO_SERVICE);\n assert mAudioManager != null;\n originalVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);\n Log.d(TAG, \"originalVolume: \"+ originalVolume);\n mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC), 0);\n mAudioManager.setMode(AudioManager.STREAM_MUSIC);\n mAudioManager.setSpeakerphoneOn(true);\n\n if (mp != null) {\n mp.stop();\n }\n\n mp = MediaPlayer.create(context, R.raw.ringingsound);\n mp.setLooping(true);\n mp.start();\n\n }", "void setupSounds() {\n soundSwitch = new Switch(Switch.CHILD_NONE);\n soundSwitch.setCapability(Switch.ALLOW_SWITCH_WRITE);\n\n // Set up the sound media container\n java.net.URL soundURL = null;\n String soundFile = \"res/sounds/Get_up_on_your_feet_mixdown2.wav\";\n try {\n soundURL = new java.net.URL(codeBaseString + soundFile);\n } catch (java.net.MalformedURLException ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n if (soundURL == null) { // application, try file URL\n try {\n soundURL = new java.net.URL(\"file:./\" + soundFile);\n } catch (java.net.MalformedURLException ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n }\n //System.out.println(\"soundURL = \" + soundURL);\n MediaContainer soundMC = new MediaContainer(soundURL);\n\n // set up the Background Sound\n soundBackground = new BackgroundSound();\n soundBackground.setCapability(Sound.ALLOW_ENABLE_WRITE);\n soundBackground.setSoundData(soundMC);\n soundBackground.setSchedulingBounds(infiniteBounds);\n soundBackground.setEnable(false);\n soundBackground.setLoop(Sound.INFINITE_LOOPS);\n soundSwitch.addChild(soundBackground);\n\n // set up the point sound\n soundPoint = new PointSound();\n soundPoint.setCapability(Sound.ALLOW_ENABLE_WRITE);\n soundPoint.setSoundData(soundMC);\n soundPoint.setSchedulingBounds(infiniteBounds);\n soundPoint.setEnable(false);\n soundPoint.setLoop(Sound.INFINITE_LOOPS);\n soundPoint.setPosition(-5.0f, 5.0f, 0.0f);\n Point2f[] distGain = new Point2f[2];\n // set the attenuation to linearly decrease volume from max at\n // source to 0 at a distance of 15m\n distGain[0] = new Point2f(0.0f, 1.0f);\n distGain[1] = new Point2f(15.0f, 0.0f);\n soundPoint.setDistanceGain(distGain);\n soundSwitch.addChild(soundPoint);\n\n // Create the chooser GUI\n String[] soundNames = { \"None\", \"Background\", \"Point\", };\n\n soundChooser = new IntChooser(\"Sound:\", soundNames);\n soundChooser.addIntListener(new IntListener() {\n public void intChanged(IntEvent event) {\n int value = event.getValue();\n // Should just be able to use setWhichChild on\n // soundSwitch, have to explictly enable/disable due to\n // bug.\n switch (value) {\n case 0:\n soundSwitch.setWhichChild(Switch.CHILD_NONE);\n soundBackground.setEnable(false);\n soundPoint.setEnable(false);\n break;\n case 1:\n soundSwitch.setWhichChild(0);\n soundBackground.setEnable(true);\n soundPoint.setEnable(false);\n break;\n case 2:\n soundSwitch.setWhichChild(1);\n soundBackground.setEnable(false);\n soundPoint.setEnable(true);\n break;\n }\n }\n });\n soundChooser.setValue(Switch.CHILD_NONE);\n\n }", "private void setAudioProfilModem() {\n int ringerMode = mAudioManager.getRingerModeInternal();\n ContentResolver mResolver = mContext.getContentResolver();\n Vibrator vibrator = (Vibrator) mContext\n .getSystemService(Context.VIBRATOR_SERVICE);\n boolean hasVibrator = vibrator == null ? false : vibrator.hasVibrator();\n if (AudioManager.RINGER_MODE_SILENT == ringerMode) {\n if (hasVibrator) {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 0);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_VIBRATE);\n /* @} */\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_RINGER,\n AudioManager.VIBRATE_SETTING_ON);\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_NOTIFICATION,\n AudioManager.VIBRATE_SETTING_ON);\n } else {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 1);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);\n /* @} */\n }\n } else if (AudioManager.RINGER_MODE_VIBRATE == ringerMode) {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 1);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_OUTDOOR);\n /* @} */\n }else if (AudioManager.RINGER_MODE_OUTDOOR == ringerMode) {//add by wanglei for outdoor mode\n Settings.System.putInt(mResolver,Settings.System.SOUND_EFFECTS_ENABLED, 1);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);\n }else {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 0);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_SILENT);\n /* @} */\n if (hasVibrator) {\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_RINGER,\n AudioManager.VIBRATE_SETTING_OFF);\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_NOTIFICATION,\n AudioManager.VIBRATE_SETTING_OFF);\n }\n }\n }", "public void setSoundAmbience(final boolean sAmbience) { soundAmbience = sAmbience; }", "private void initSounds() {\n\n\n\t}", "@FXML\n\tpublic void handleAudioManipulatorPlayButton() {\n\t\tcontroller.audioManipulatorPlayAudio();\n\t\tbuttonPlay.setDisable(true);\n\t\tbuttonPause.setDisable(false);\n\t\tbuttonStop.setDisable(false);\n\t\tpaneMixerMainControls.setDisable(true);\n\t\tsliderLowPass.setDisable(true);\n\t\ttextFieldLowPass.setDisable(true);\n\t}", "private void soundClicked() {\n Sounds.setVolume(Sounds.getVolume() == 0 ? 1 : 0);\n setSoundButtonColor(Sounds.getVolume() == 0, sound);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n am.playSoundEffect(Sounds.DISALLOWED);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n am.playSoundEffect(Sounds.DISALLOWED);\n }", "public void playBeep() {\n // Cách 1: Sử dụng audio có sẵn của android\n// ToneGenerator toneGenerator = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 500);\n// toneGenerator.startTone(ToneGenerator.TONE_PROP_PROMPT);\n\n // Cách 2: Sử dụng audio của mình\n Uri beepSound = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + File.pathSeparator\n + File.separator + getPackageName() + \"/raw/notifications.mp3\");\n Ringtone ringtone = RingtoneManager.getRingtone(this, beepSound);\n ringtone.play();\n }", "public void playSound() {\n\t\tmediaPlayer.play();\n\t}", "public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }", "public static void playSound(){\r\n try{\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(AudioSystem.getAudioInputStream(new File(\"Cheering.wav\")));\r\n clip.start();\r\n }\r\n catch (Exception exc){\r\n exc.printStackTrace(System.out);\r\n } \r\n }", "public void stopSound() {\n metaObject.stopSound();\n }", "PlaySound getSound();", "public void buttonSound()\n {\n InputStream pathSoundFile = getClass().getResourceAsStream(\"Button.wav\");\n playSound(pathSoundFile);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n sound_handler = menu.findItem(R.id.action_mute);\n if (!HelperClass.Sounds.app_sounds){\n sound_handler.setIcon(getResources().getDrawable(R.drawable.ic_action_volume_muted));\n } else{\n sound_handler.setIcon(getResources().getDrawable(R.drawable.ic_action_volume_on));\n }\n return true;\n }", "public static boolean isSound() {\n return sound;\n }", "public synchronized void stopSound() {\r\n running = false;\r\n }", "public void playSound() {\n if (this.mIsSupportVibrator) {\n this.mVibratorEx.setHwVibrator(\"haptic.control.time_scroll\");\n }\n if (this.mSoundPool == null || this.mSoundId == 0 || !this.mSoundLoadFinished) {\n Log.w(TAG, \"SoundPool is not initialized properly!\");\n } else {\n this.mSoundPool.play(this.mSoundId, 1.0f, 1.0f, 0, 0, 1.0f);\n }\n }", "public void stopThemeSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.stopSound(MUSIC_FOLDER, THEME);\n\n\t}", "public void reloadSoundDevices();", "public boolean playsSound() {\r\n\t\treturn playsSound;\r\n\t}", "public static void GameOverCrashSound(){\n if(soundActivated) {\n if(!crashSoundDone) {\n AudioManager audioManager = (AudioManager) mActivity.getSystemService(AUDIO_SERVICE);\n float actualVolume = (float) audioManager\n .getStreamVolume(AudioManager.STREAM_MUSIC);\n float maxVolume = (float) audioManager\n .getStreamMaxVolume(AudioManager.STREAM_MUSIC);\n float volume = actualVolume / maxVolume;\n mSound.play(soundCrash, volume, volume, 1, 0, 1f);\n\n crashSoundDone = true;\n\n }\n }\n }", "public void setUpSound() {\n try {\n generateTone();\n setFrequencyLabel();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "public boolean soundResourcesLocked();", "private void setSound(@NonNull NotificationCompat.Builder builder) {\n if (mFplReminder.isNotificationSound()) {\n Uri soundUri = RingtoneManager.getDefaultUri(TYPE_NOTIFICATION);\n builder.setSound(soundUri);\n }\n }", "public void playAudio() {\n\n }", "public void playClickSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, CLICK);\n\t}", "public void startSound()\n \n {try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Start 2.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n startClip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n startClip.open(audioIn); \n \n startClip.start();\n \n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n \n }", "public boolean isSoundNotificationEnabled()\r\n {\r\n return isSoundNotificationEnabled;\r\n }", "public void soundPressed() {\n // display\n TextLCD.print(SOUND);\n // sound\n Sound.beep();\n }", "private void playSound() {\n\t\tif (controllerVars.isLoaded() && !controllerVars.isPlays()) {\n\t\t\tcontrollerVars.getSoundPool().play(controllerVars.getSoundID(), controllerVars.getVolume(), controllerVars.getVolume(), 1, 0, 1f);\n\t\t\tcontrollerVars.COUNTER++;\n\t\t\t//Toast.makeText(act, \"Played sound\", Toast.LENGTH_SHORT).show();optional Playing message \n\t\t\tcontrollerVars.setPlays(true);\n\t\t\tonComplete(controllerVars.getMediaPlayer().getDuration());\n\t\t}\n\t\t//controllerVars.getMediaPlayer().start();\n\t\t//controllerVars.setPlays(true);\n\t}", "public void pauseSound() {\n\t\tclip.stop();\n\t}", "private void setAudioState(boolean muted) {\n mMuted = muted;\n mRtcEngine.muteLocalAudioStream(mMuted);\n if (mMuted) {\n mMuteBtn.setImageResource(R.drawable.btn_mic_muted);\n } else {\n mMuteBtn.setImageResource(R.drawable.btn_mic_unmuted);\n }\n }", "public void togglePlay() { }", "protected void stopTheSound(){\n mp.stop();\n }", "public void loopSound(){\n for (int i=0;i<5;i++) {\n //if it's a modern device, play tone, otherwise use notification sound\n if(!legacyBeep) {\n playSound();\n }\n else {\n playBeep();\n if (i==2)\n break;\n }\n }\n }", "public boolean sendAllSoundsOffWhenWindowChanges()\n {\n return true;\n }", "void setAudioAllowedToPlayInBackground(boolean allowed);", "@Override\n\tpublic void playLivingSound() {\n\t\tgetSoundManager().playLivingSound();\n\t}", "public boolean isSoundPlaybackEnabled()\r\n {\r\n return isSoundPlaybackEnabled;\r\n }", "public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void gameSound(int attack){\n switch (attack){\n case 1:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_lightattack);\n break;\n case 2:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_strongattack);\n break;\n case 3:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_brutalattack);\n break;\n }\n mediaPlayer.start();\n }", "public void playWinSound()\n {\n InputStream pathSoundFile = getClass().getResourceAsStream(\"bellringing.wav\");\n playSound(pathSoundFile);\n }", "public void pauseSong()\n {\n if(!mute)\n {\n try{ \n //bclip.stop();\n \n URL url = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n pclip.open(audioIn); \n pclip.start();\n pclip.loop(Clip.LOOP_CONTINUOUSLY);\n }catch(Exception e){}\n }\n }", "public boolean isAudio()\n {return false ;\n }", "@Override\n protected String produceSound(){\n return \"BauBau\";\n\n }", "private void playSilence(){\n frameIterator = SilentMediaReader.getInstance();\n updateCurrentMedia(null);\n status = Status.PLAYING_SILENCE;\n for (StreamListener listener : streamListeners) {\n listener.mediaChanged();\n }\n }", "private void generateAudio() {\n soundHandler.generateTone();\n }" ]
[ "0.8306414", "0.78307724", "0.778906", "0.7669581", "0.74396986", "0.735329", "0.7345842", "0.7310475", "0.72214484", "0.7082853", "0.7076029", "0.7032358", "0.70001984", "0.6993688", "0.6838216", "0.6787152", "0.67538786", "0.67080307", "0.6648724", "0.6604866", "0.6604866", "0.6548091", "0.6536814", "0.6494854", "0.64832604", "0.646795", "0.64541703", "0.64512926", "0.6422922", "0.6416302", "0.640236", "0.6395469", "0.63900954", "0.6388827", "0.63885754", "0.63881963", "0.63816607", "0.6370979", "0.63645923", "0.63478017", "0.6327705", "0.6326373", "0.6325291", "0.63252294", "0.63150555", "0.63016886", "0.62862945", "0.62739354", "0.6273771", "0.6269661", "0.62534606", "0.62522495", "0.62482", "0.6240562", "0.6240453", "0.622871", "0.6196803", "0.6196635", "0.6196635", "0.6185398", "0.6174436", "0.6166535", "0.6152795", "0.61506253", "0.6148431", "0.6146961", "0.61439294", "0.6140734", "0.61369616", "0.6125609", "0.61161447", "0.6098511", "0.6096645", "0.6091101", "0.6080164", "0.607583", "0.6064721", "0.6046459", "0.6045983", "0.6041545", "0.6035641", "0.60337365", "0.60287666", "0.60261226", "0.60226244", "0.6020412", "0.60202926", "0.5991522", "0.59906137", "0.59894824", "0.5984423", "0.59839267", "0.5976171", "0.59734607", "0.5970755", "0.5968965", "0.59634745", "0.59631395", "0.5958966", "0.5955948" ]
0.7389944
5
creates a new AudioController
public AudioController(){ sounds = new LinkedList<>(); removables = new LinkedList<>(); availableIds = new HashSet<>(); populateIds(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static SoundController getInstance() {\n\t\tif (controller == null) {\n\t\t\tcontroller = new SoundController();\n\t\t}\n\t\treturn controller;\n\t}", "private Audio() {}", "protected AudioController(SoundSource source) {\r\n\t\tthis.source = source;\r\n\t}", "public SoundController() {\r\n // initialize the module libraries\r\n this.initModuleLibraries();\r\n\r\n // in this moment no sonification map is defined\r\n this.sonificationMap = new HashMap<String, SonificationMap>();\r\n\r\n // in this moment we have an empty soundMap\r\n this.soundsMap = new HashMap<String, Sound>();\r\n\r\n // in this moment no type names are defined\r\n this.soundEventsTypeNameMap = new HashMap<String, String>();\r\n\r\n // create the GUI component\r\n this.tabSound = new TabSound(this);\r\n\r\n // create the sounds-events active state empty map\r\n this.soundEventActiveStateMap = new HashMap<String, Boolean>();\r\n\r\n // enable sound\r\n this.setEnabled(true);\r\n\r\n // the sound is active by default\r\n soundOn = true;\r\n\r\n // empty events queue\r\n eventQ = new ConcurrentLinkedQueue<EnvironmentEvent>();\r\n\r\n // the module thread is not running yet\r\n running = false;\r\n\r\n this.soundThread = new Thread(this);\r\n }", "private SoundController() {\n\t\tsoundbank = new HashMap<String, Sound>();\n\t\tmusicbank = new HashMap<String, Music>();\n\t\tactives = new IdentityMap<String,ActiveSound>();\n\t\tcollection = new Array<String>();\n\t\tcooldown = DEFAULT_COOL;\n\t\ttimeLimit = DEFAULT_LIMIT;\n\t\tframeLimit = DEFAULT_FRAME;\n\t\tcurrent = 0;\n\t}", "public AudioChannel() {\r\n\t\t// Default temporary location file has to be picked.\r\n\t\tString defalultFileName = getFileName(null, \"wav\");\r\n\t\tfile = new File( defalultFileName );\r\n\t}", "public AudioList(){}", "public static final AudioClip newAudioClip(URL paramURL) {\n/* 313 */ return (AudioClip)new AppletAudioClip(paramURL);\n/* */ }", "public TestWav()\r\n {\r\n super(\"AudioPlayer\");\r\n player = new Playback();\r\n String[] audioFileNames = findFiles(AUDIO_DIR, null);\r\n makeFrame(audioFileNames);\r\n }", "private void setController() {\n if (controller == null) {\n controller = new MusicController(this);\n }\n controller.setPrevNextListeners(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n playNext();\n }\n }, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n playPrev();\n }\n }\n );\n\n controller.setMediaPlayer(this);\n controller.setAnchorView(findViewById(R.id.song_list));\n controller.setEnabled(true);\n }", "Builder addAudio(AudioObject value);", "private void generateAudio() {\n soundHandler.generateTone();\n }", "Builder addAudio(AudioObject.Builder value);", "public Audio createAudio(Audio audio, long audioBook) {\n\t\treturn null;\n\t}", "@Override\n public void makeSound() {\n\n }", "@Override\n public void makeSound() {\n\n }", "@Override\r\n\tprotected ICardController createController() {\n\t\treturn new ClientCtrl();\r\n\t}", "public void setAudioDescriptor( AudioDescriptor audioDescriptor );", "Builder addAudio(String value);", "public MusicPlayer() {\n player = new BasicPlayer();\n controller = (BasicController) player;\n volume = -1.0; // indicates that gain has yet to be initialized\n }", "public void playAudio() {\n\n }", "public Sound createSound(String file);", "public abstract void makeSound();", "public static ID3Audio getInstance(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getInstance(model, instanceResource, ID3Audio.class);\r\n\t}", "public interface Audio {\r\n\r\n\t//******************************GETS*****************************\r\n//\tpublic FileOutputStream getAudioByBitRate(String bitrate);\r\n\t/**\r\n\t * If the file was uploaded in a rate of 128 kbits/s then streaming at 320 kbits/s provides no benefits.\r\n\t * This method allows the client to check what bitrates exist and choose the adequate one.\t\r\n\t * @return String with all the BitRates accessible.\r\n\t */\r\n\tpublic ArrayList<Integer> getAccessibleBitRates();\r\n\t/**\r\n\t * Returns a Stream with the Audio in the default BitRate.\r\n\t * @return Audio stream.\r\n\t */\r\n//\tpublic FileOutputStream getAudio();\r\n\t/**\r\n\t * Evaluates if the Bitrate \"bitrate\" is allowed for audio and returns a Stream if it is.\r\n\t * @param bitrate \r\n\t * @return FileOutputStream\r\n\t */\r\n//\tpublic FileOutputStream getAudioByBitRate(int bitrate);\r\n\tpublic String getDir();\r\n\tpublic String getFileName();\r\n\t//******************************ACTIONS*****************************\r\n\t/**\r\n\t * Sets the bitRate for the value that comes as parameter.\r\n\t * @return\r\n\t */\r\n\tpublic boolean setDefaultBitRate(String bitrate);\r\n\t/**\r\n\t * Converts the Audio to the default system type, mp3. \r\n\t * @return The type of the file. If it failed returns a null String.\r\n\t */\r\n\tpublic boolean convertAudioTypeToDefault();\r\n\tboolean convertAudioTypeToDefault(String dir, long size,\r\n\t\t\tint defaultBitRate, String type);\r\n\tpublic boolean setAudioType(String type);\r\n\tpublic void setMaxBitRate(String bitRate);\r\n\tpublic Response download(String appId, String audioId, String dir);\r\n\tpublic void setDir(String dir);\r\n\tpublic void setSize(long size);\r\n\tpublic void setCreationDate(String creationDate);\r\n\tpublic void setFileName(String fileName);\r\n\tpublic void setLocation(String location);\r\n}", "void startMusic(AudioTrack newSong);", "private SoundClip createStream(String audioFilename){\n SoundClip audio = null;\n try {\n // IDE\n //AudioInputStream ais = AudioSystem.getAudioInputStream(new File(audioFilename).getAbsoluteFile());\n // JAR\n AudioInputStream ais = AudioSystem.getAudioInputStream(ClassLoader.getSystemResource(audioFilename));\n DataLine.Info info = new DataLine.Info(Clip.class, ais.getFormat());\n Clip c = (Clip) AudioSystem.getLine(info);\n audio = new SoundClip(null,c,ais);\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return audio;\n }", "public DataSource getAudioSource();", "public AudioFragment() {\n }", "private void setUpSound() {\n\t\tAssetManager am = getActivity().getAssets();\n\t\t// activity only stuff\n\t\tgetActivity().setVolumeControlStream(AudioManager.STREAM_MUSIC);\n\n\t\tAudioManager audioManager = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE);\n\t\tsp = new SPPlayer(am, audioManager);\n\t}", "@Override\n public void create() {\n Gdx.app.setLogLevel(Application.LOG_DEBUG);\n // Load assets\n Assets.instance.init(new AssetManager());\n // Load preferences for audio settings and start playing music\n GamePreferences.instance.load();\n AudioManager.instance.play(Assets.instance.music.song01);\n // Start game at menu screen\n setScreen(new MenuScreen(this, adsController));\n //If we are connected via wifi the game will display ads\n if (adsController.isConnected()) {\n adsController.showBannerAd();\n }\n }", "public Voice() {\n }", "public Controller() {\n\t\tplaylist = new ArrayList<>();\n\t\tshowingMore = false;\n\t\tstage = Main.getStage();\n\t}", "public Sound(Context context) {\r\n\t\tthis.mp = MediaPlayer.create(context, R.raw.baby);\r\n\t\r\n\t}", "private void createGameController() {\n\t\tLog.i(LOG_TAG, \"createGameController\");\n\n\t\tBundle intent = this.getIntent().getExtras();\n\t\t\n\t\tthis.punchMode = intent.getString(\"punchMode\");\n\t\t\n\t\tthis.gameController = new TimeTrialGameController( this.timerTextView,\n\t\t\t\tthis.numberOfPunchesCounterTextView, this.punchMode);\n\t\t\n\t\tthis.gameController.addObserver(this);\n\t}", "protected AudioPlaybackConfiguration createAudioPlaybackConfiguration(\n AudioAttributes audioAttributes) {\n if (RuntimeEnvironment.getApiLevel() >= S) {\n PlayerBase.PlayerIdCard playerIdCard =\n ReflectionHelpers.callConstructor(\n PlayerBase.PlayerIdCard.class,\n ReflectionHelpers.ClassParameter.from(int.class, 0), /* type */\n ReflectionHelpers.ClassParameter.from(AudioAttributes.class, audioAttributes),\n ReflectionHelpers.ClassParameter.from(IPlayer.class, null),\n ReflectionHelpers.ClassParameter.from(int.class, 0) /* sessionId */);\n AudioPlaybackConfiguration config =\n ReflectionHelpers.callConstructor(\n AudioPlaybackConfiguration.class,\n ReflectionHelpers.ClassParameter.from(PlayerBase.PlayerIdCard.class, playerIdCard),\n ReflectionHelpers.ClassParameter.from(int.class, 0), /* piid */\n ReflectionHelpers.ClassParameter.from(int.class, 0), /* uid */\n ReflectionHelpers.ClassParameter.from(int.class, 0) /* pid */);\n ReflectionHelpers.setField(\n config, \"mPlayerState\", AudioPlaybackConfiguration.PLAYER_STATE_STARTED);\n return config;\n } else {\n PlayerBase.PlayerIdCard playerIdCard =\n ReflectionHelpers.callConstructor(\n PlayerBase.PlayerIdCard.class,\n from(int.class, 0), /* type */\n from(AudioAttributes.class, audioAttributes),\n from(IPlayer.class, null));\n AudioPlaybackConfiguration config =\n ReflectionHelpers.callConstructor(\n AudioPlaybackConfiguration.class,\n from(PlayerBase.PlayerIdCard.class, playerIdCard),\n from(int.class, 0), /* piid */\n from(int.class, 0), /* uid */\n from(int.class, 0) /* pid */);\n ReflectionHelpers.setField(\n config, \"mPlayerState\", AudioPlaybackConfiguration.PLAYER_STATE_STARTED);\n return config;\n }\n }", "@Override\n public void create()\n {\n Gdx.app.setLogLevel(Application.LOG_DEBUG);\n \n // Load assets\n Assets.instance.init(new AssetManager());\n \n // Load preferences for audio settings, and start playing music\n GamePreferences.instance.load();\n AudioManager.instance.play(Assets.instance.music.song01);\n \n // Start game at menu screen\n setScreen(new MenuScreen(this));\n }", "PolicyController createPolicyController(String name, Properties properties);", "public InitialConfiguration audioState(AudioState audioState) {\n this.audioState = audioState;\n return this;\n }", "protected MediaCodec createCodec(MediaExtractor media_extractor, int track_index, MediaFormat format) throws IOException, IllegalArgumentException {\n/* 73 */ MediaCodec codec = super.createCodec(media_extractor, track_index, format);\n/* 74 */ if (codec != null) {\n/* 75 */ ByteBuffer[] buffers = codec.getOutputBuffers();\n/* 76 */ int sz = buffers[0].capacity();\n/* 77 */ if (sz <= 0) {\n/* 78 */ sz = this.mAudioInputBufSize;\n/* */ }\n/* 80 */ this.mAudioOutTempBuf = new byte[sz];\n/* */ try {\n/* 82 */ this.mAudioTrack = new AudioTrack(3, this.mAudioSampleRate, (this.mAudioChannels == 1) ? 4 : 12, 2, this.mAudioInputBufSize, 1);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 88 */ this.mAudioTrack.play();\n/* 89 */ } catch (Exception e) {\n/* 90 */ Log.e(this.TAG, \"failed to start audio track playing\", e);\n/* 91 */ if (this.mAudioTrack != null) {\n/* 92 */ this.mAudioTrack.release();\n/* 93 */ this.mAudioTrack = null;\n/* */ } \n/* 95 */ throw e;\n/* */ } \n/* */ } \n/* 98 */ return codec;\n/* */ }", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "AudioGenerator() {\n minim = new Minim(this);\n // use the getLineOut method of the Minim object to get an AudioOutput object\n out = minim.getLineOut();\n }", "public void start()\n\t{\n\t\tString name = getAudioFileName();\n\t\ttry\n\t\t{\t\t\t\n\t\t\tInputStream in = getAudioStream();\n\t\t\tAudioDevice dev = getAudioDevice();\n\t\t\tplay(in, dev);\n\t\t}\n\t\tcatch (JavaLayerException ex)\n\t\t{\n\t\t\tsynchronized (System.err)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Unable to play \"+name);\n\t\t\t\tex.printStackTrace(System.err);\n\t\t\t}\n\t\t}\n\t}", "public Controller() {\n\t\tenabled = false;\n\t\tloop = new Notifier(new ControllerTask(this));\n\t\tloop.startPeriodic(DEFAULT_PERIOD);\n\t}", "public AudioDescriptor getAudioDescriptor();", "@FXML\r\n void btnspeechClick(MouseEvent event) {\n \t\r\n \t setService();\r\n setHeader();\r\n \r\n System.out.println(service);\r\n \r\n InputStream stream = service.synthesize(\r\n taContent.getText(), // 변경할 문자열\r\n \tVoice.EN_LISA, // voice 선택\r\n \tAudioFormat.WAV // 출력할 오디오 포멧 형식 \r\n ).execute();\r\n // 음성데이터를 저장하기\r\n try {\r\n InputStream in = WaveUtils.reWriteWaveHeader(stream);\r\n //WaveUtils.\r\n \r\n OutputStream os = new FileOutputStream(\"d:/d_other/AIData/test12.wav\");\r\n \r\n byte[] tmp = new byte[1024];\r\n int len = 0;\r\n \r\n while((len = in.read(tmp)) != -1) {\r\n os.write(tmp, 0, len);\r\n }\r\n os.flush();\r\n \r\n os.close();\r\n in.close();\r\n stream.close();\r\n \r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n \r\n music();\r\n\r\n }", "private void playAudio(int audioIndex) {\n if (!serviceBound) {\n //Store Serializable audioList to SharedPreferences\n\n new StorageUtil(QuranListenActivity.this).storeAudio(audios);\n new StorageUtil(QuranListenActivity.this).storeAudioIndex(audioIndex);\n\n Intent playerIntent = new Intent(this, MediaPlayerService.class);\n startService(playerIntent);\n bindService(playerIntent, serviceConnection, Context.BIND_AUTO_CREATE);\n } else {\n //Store the new audioIndex to SharedPreferences\n // Log.e(\"servvv\",\"SERVICE IS ACTIVE\");\n new StorageUtil(QuranListenActivity.this).storeAudio(audios);\n new StorageUtil(QuranListenActivity.this).storeAudioIndex(audioIndex);\n\n //Service is active\n //Send a broadcast to the service -> PLAY_NEW_AUDIO\n Intent broadcastIntent = new Intent(Broadcast_PLAY_NEW_AUDIO);\n sendBroadcast(broadcastIntent);\n }\n }", "public Controller()\n\t{\n\n\t}", "public ID3Audio ( Model model, org.ontoware.rdf2go.model.node.Resource instanceIdentifier, boolean write ) {\r\n\t\tsuper(model, RDFS_CLASS, instanceIdentifier, write);\r\n\t}", "@Override\n\tprotected AbstractManageController createController() {\n\t\tif (m_ctrl == null)\n\t\t\tm_ctrl = new BankKeepController();\n\t\treturn m_ctrl;\n\t}", "public void start() {\n ToneControl control = null;\n try {\n myPlayer = Manager.createPlayer(Manager.TONE_DEVICE_LOCATOR);\n // do the preliminary set-up:\n myPlayer.realize();\n // set a listener to listen for the end of the tune:\n myPlayer.addPlayerListener(this);\n // get the ToneControl object in order to set the tune data:\n control = (ToneControl) myPlayer.getControl(\"ToneControl\");\n control.setSequence(myTune);\n // set the volume to the highest possible volume:\n VolumeControl vc = (VolumeControl) myPlayer\n .getControl(\"VolumeControl\");\n vc.setLevel(100);\n } catch (Exception e) {\n // the music isn't necessary, so we ignore exceptions.\n }\n }", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public AudioPlayer() {\n\t\tselectMixer(0);\n\n\t\tcreateListenerOnCondition(onFinishRunnables, (event) -> \n\t\t\tevent.getType() == LineEvent.Type.STOP && getRemainingTime() <= 0.0 && !isRepeating\n\t\t);\n\t\tcreateListenerOnCondition(onEndRunnables, (event) -> \n\t\t\tevent.getType() == LineEvent.Type.STOP && getRemainingTime() <= 0.0\n\t\t);\n\t\tcreateListenerOnCondition(onLoadRunnables, (event) -> \n\t\t\tevent.getType() == LineEvent.Type.OPEN\n\t\t);\n\t\tcreateListenerOnCondition(onPlayRunnables, (event) -> \n\t\t\tevent.getType() == LineEvent.Type.START\n\t\t);\n\t}", "public WaveSystem()\n\t{\n\t\t\n\t}", "public IfController()\n\t{\n\n\t}", "protected ID3Audio ( Model model, URI classURI, org.ontoware.rdf2go.model.node.Resource instanceIdentifier, boolean write ) {\r\n\t\tsuper(model, classURI, instanceIdentifier, write);\r\n\t}", "public Music createMusic(String file);", "public void createChain(){\r\n Oscillator wt = new Oscillator(this, Oscillator.SAWTOOTH_WAVE, this.sampleRate, this.channels);\r\n Filter filt = new Filter(wt, this.filterCutoff, Filter.LOW_PASS);\r\n Envelope env = new Envelope(filt, \r\n new double[] {0.0, 0.0, 0.05, 1.0, 0.3, 0.4, 1.0, 0.0});\r\n\t\tVolume vol = new Volume(env);\r\n//\t\tSampleOut sout = new SampleOut(vol);\r\n\t}", "private void makeNewMusic() {\n File f = music.getFile();\n boolean playing = music.isPlaying();\n music.stop();\n music = new MP3(f);\n if (playing) {\n music.play(nextStartTime);\n }\n }", "public void create() {\n connect();\n batch = new SpriteBatch();\n font = new BitmapFont();\n\n audioManager.preloadTracks(\"midlevelmusic.wav\", \"firstlevelmusic.wav\", \"finallevelmusic.wav\", \"mainmenumusic.wav\");\n\n mainMenuScreen = new MainMenuScreen(this);\n pauseMenuScreen = new PauseMenuScreen(this);\n settingsScreen = new SettingsScreen(this);\n completeLevelScreen = new CompleteLevelScreen(this);\n completeGameScreen = new CompleteGameScreen(this);\n\n setScreen(mainMenuScreen);\n }", "private File createAudioFile() throws IOException{\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String audioFileName = \"Audio_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_MUSIC);\n File image = File.createTempFile(\n audioFileName, /* prefix */\n \".3gp\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }", "public AudioFormat genAudioFormat(){\n\t\treturn new AudioFormat(\n\t\t\t\tAudioFormat.Encoding.PCM_SIGNED, MicTest.SAMPLE_RATE, 8 *MicTest.FRAME, 1, MicTest.FRAME, MicTest.SAMPLE_RATE,\n\t\t\t\tfalse);\n\n\t}", "public AudioSettings() {\n this.emulator = NEmuSUnified.getInstance().getEmulator();\n }", "public void createPlayer() {\n mainHandler = new Handler();\n videoTrackSelectionFactory = new AdaptiveTrackSelection.Factory(bandwidthMeter);\n trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory);\n player = ExoPlayerFactory.newSimpleInstance(this, trackSelector);\n }", "public HandController(SessionController parent) {\n\tinitComponents();\n\t\n\tthis.sessionController = parent;\n\t\n\tthis.hand = new Hand(this);\n }", "private void initAudioFormat() {\n\t\tfloat rate = 44100.0f;\n\t\t//float rate = 8000.0f;\n\t\t//int sampleSize = 8;\n\t\tint sampleSize = 16;\n\t\tint channels = 1;\n\t\tboolean bigEndian = true;\n\n\t\taudioFormat = new AudioFormat(rate, sampleSize, channels, bigEndian, bigEndian);\n\t\t// audioFormat = new AudioFormat(encoding, rate, sampleSize, channels, (sampleSize / 8)\n\t\t// * channels, rate, bigEndian);\n\n\t}", "public void create () \n\t{ \n\t\t// Set Libgdx log level to DEBUG\n\t\tGdx.app.setLogLevel(Application.LOG_DEBUG);\n\t\t// Load assets\n\t\tAssets.instance.init(new AssetManager());\n\t\tpaused = false;\n\t\t// Load preferences for audio settings and start playing music\n\t\tGamePreferences.instance.load();\n\t\tAudioManager.instance.play(Assets.instance.music.song01);\n\t\t// Start game at menu screen\n\t\tsetScreen(new MenuScreen(this));\n\t\t\n\t}", "@FXML\n\tvoid goToAudio(ActionEvent event) throws IOException {\n\t\tAnchorPane loader = (AnchorPane)FXMLLoader.load(getClass().getResource(\"/application/view/Audio.fxml\"));\n\t\tStage stage = (Stage) switchAudio.getScene().getWindow();\n\t\tScene scene = new Scene(loader,600,400);\n\t\tstage.setScene(scene);\n\t}", "public AudioService(Context context) {\n this.sharedPreferences = context.getSharedPreferences(\"SPOTIFY\", 0);\n queue = Volley.newRequestQueue(context);\n }", "static Controller makeController(MusicEditorModel model, ViewModel vm, NonGuiViewAdapter view) {\n return new NonGuiController(model, vm, view);\n }", "@SuppressWarnings(\"deprecation\")\n\tprivate void setControllerVariables() {\n\t\tcontrollerVars.setAudioManager((AudioManager) act.getSystemService(Context.AUDIO_SERVICE));\n\t\tcontrollerVars.setActVolume((float) controllerVars.getAudioManager().getStreamVolume(AudioManager.STREAM_MUSIC));\n\t\tcontrollerVars.setMaxVolume((float) controllerVars.getAudioManager().getStreamMaxVolume(AudioManager.STREAM_MUSIC));\n\t\tcontrollerVars.setVolume(controllerVars.getActVolume() / controllerVars.getMaxVolume());\n\n\t\t//Hardware buttons setting to adjust the media sound\n\t\tact.setVolumeControlStream(AudioManager.STREAM_MUSIC);\n\n\t\t// the counter will help us recognize the stream id of the sound played now\n\t\tcontrollerVars.setCounter(0);\n\n\t\t// Load the sounds\n\t\tcontrollerVars.setSoundPool(new SoundPool(20, AudioManager.STREAM_MUSIC, 0));\n\t\tcontrollerVars.getSoundPool().setOnLoadCompleteListener(new OnLoadCompleteListener() {\n\t\t @Override\n\t\t public void onLoadComplete(SoundPool soundPool, int sampleId, int status) {\n\t\t \tcontrollerVars.setLoaded(true);\n\t\t }\n\t\t});\t\t\n\t}", "public static SinglController getController(){\n if (scl==null) {\n TemperatureSensor tmpsen = new TemperatureSensor(\"Kitchen\");\n LightSensor lsen = new LightSensor (\"Kitchen\");\n scl=new SinglController(tmpsen,lsen);\n }\n return scl;\n }", "private Controller() {\n\t\tthis.gui = GUI.getInstance();\n\t\tthis.gui.setController(this);\n\t}", "public void setUpSound() {\n try {\n generateTone();\n setFrequencyLabel();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "@AutoGenerated\r\n\tprivate Panel buildAudioPanel() {\n\t\taudioPanel = new Panel();\r\n\t\taudioPanel.setWidth(\"100.0%\");\r\n\t\taudioPanel.setHeight(\"100.0%\");\r\n\t\taudioPanel.setImmediate(false);\r\n\t\t\r\n\t\t// verticalLayout_4\r\n\t\tverticalLayout_4 = buildVerticalLayout_4();\r\n\t\taudioPanel.setContent(verticalLayout_4);\r\n\t\t\r\n\t\treturn audioPanel;\r\n\t}", "ABcontroller(){\n\t\tsuper(50);\n\t\ttimer = new Timer();\n\t}", "@RequiresApi(Build.VERSION_CODES.O)\n private void createChannel() {\n NotificationManager\n mNotificationManager =\n (NotificationManager) this\n .getSystemService(NOTIFICATION_SERVICE);\n // The id of the channel.\n String id = CHANNEL_ID;\n // The user-visible name of the channel.\n CharSequence name = \"Media playback\";\n // The user-visible description of the channel.\n String description = \"Media playback controls\";\n int importance = NotificationManager.IMPORTANCE_LOW;\n NotificationChannel mChannel = new NotificationChannel(id, name, importance);\n // Configure the notification channel.\n mChannel.setDescription(description);\n mChannel.setShowBadge(false);\n mChannel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);\n mNotificationManager.createNotificationChannel(mChannel);\n }", "private void setupController() {\n setupWriter();\n Controller controller1 = new Controller(writer);\n controller = controller1;\n }", "public CreateDocumentController() {\n }", "private void initAudioIn(){\n ArrayList<String> actived = new ArrayList<String>();\n ArrayList<String> mAudioInputChannels = mAudioManagerEx.getAudioDevices(AudioManagerEx.AUDIO_INPUT_TYPE);\n int i = 0;\n for(i = 0; i < mAudioInputChannels.size(); i++){\n String device = mAudioInputChannels.get(i);\n if(device.contains(\"USB\")){\n actived.add(device);\n break;\n }\n }\n //otherwise use codec by default\n if(i == mAudioInputChannels.size()){\n actived.add(AudioManagerEx.AUDIO_NAME_CODEC);\n }\n mAudioManagerEx.setAudioDeviceActive(actived, AudioManagerEx.AUDIO_INPUT_ACTIVE);\n }", "public AudioPlayer getAudioPlayer() {\n if (audioPlayer == null) {\n try {\n audioPlayer = getDefaultAudioPlayer();\n } catch (InstantiationException e) {\n e.printStackTrace();\n }\n }\n\treturn audioPlayer;\n }", "public void start() {\n AudioPlayer.player.start(cas);\n playing = true;\n }", "private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }", "public static EventController getInstance()\n {\n if(controller == null)\n {\n controller = new EventController();\n }\n return controller;\n }", "public GameController() {\n\t\t\n\t\t\n\t\tGameController.gc = this;\n\t}", "private static CompanyController initializeController() {\n\n controller = new CompanyController();\n return controller;\n }", "public void StartSound(ISoundOrigin origin, int sound_id);", "public WfController()\n {\n }", "public WavPlayer(String track) {\n\t\tthis.wavMusicFile = track;\n\t\t//startSound();\n\n\t}", "public abstract void initController();", "@Override\n public void create() {\n\n batch = new SpriteBatch();\n manager = new AssetManager();\n\n manager.load(\"audio/main_theme.mp3\", Music.class);\n // manager.load(\"String sonido\", Sound.class);\n manager.load(\"sprites/dragon.pack\", TextureAtlas.class);\n manager.load(\"sprites/vanyr.pack\", TextureAtlas.class);\n manager.finishLoading();\n\n setScreen(new PlayScreen(this));\n\n }", "private void startPlaying() {\n try {\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(audioFile.getAbsolutePath());\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"prepare() failed\");\n }\n showTimer(false);\n } catch (Exception e) {\n logException(e, \"MicManualFragment_startPlaying()\");\n }\n\n }", "public Controller() {\n\t\tthis(null);\n\t}", "@Override\n public void action(HB hb) {\n hb.reset();\n hb.setStatus(this.getClass().getSimpleName() + \" Loaded\");\n\n final float MAX_PLAYBACK_RATE = 2;\n final float START_PLAY_RATE = 1;\n\n\n // define the duration of our sample. We will set this when the sample is loaded\n float sampleDuration = 0;\n /**************************************************************\n * Load a sample and play it\n *\n * simply type samplePLayer-basic to generate this code and press <ENTER> for each parameter\n **************************************************************/\n\n final float INITIAL_VOLUME = 1; // define how loud we want the sound\n Glide audioVolume = new Glide(INITIAL_VOLUME);\n\n // Define our sample name\n final String SAMPLE_NAME = \"data/audio/long/1979.wav\";\n\n // create our actual sample\n Sample sample = SampleManager.sample(SAMPLE_NAME);\n\n // test if we opened the sample successfully\n if (sample != null) {\n // Create our sample player\n SamplePlayer samplePlayer = new SamplePlayer(sample);\n // Samples are killed by default at end. We will stop this default actions so our sample will stay alive\n samplePlayer.setKillOnEnd(false);\n\n // Connect our sample player to audio\n Gain gainAmplifier = new Gain(HB.getNumOutChannels(), audioVolume);\n gainAmplifier.addInput(samplePlayer);\n HB.getAudioOutput().addInput(gainAmplifier);\n\n /******** Write your code below this line ********/\n\n // we need to assign this new samplePlayer to our class samplePlayer\n this.samplePlayer = samplePlayer;\n\n // Create an on Off Control\n\n // type booleanControl to generate this code \n BooleanControl stopPlayControl = new BooleanControl(this, \"Play\", true) {\n @Override\n public void valueChanged(Boolean control_val) {// Write your DynamicControl code below this line \n // if true, we will play\n samplePlayer.pause(!control_val);\n\n // if we are going to play, we will create the updateThread, otherwise we will kill it\n\n if (control_val){\n // create a new thread if one does not exists\n if (updateThread == null) {\n updateThread = createUpdateThread();\n }\n }\n else\n {\n // if we have a thread, kill it\n if (updateThread != null)\n {\n updateThread.interrupt();\n updateThread = null;\n }\n }\n\n // Write your DynamicControl code above this line \n }\n };// End DynamicControl stopPlayControl code \n\n\n // get our sample duration\n sampleDuration = (float)sample.getLength();\n\n // make our sampleplay a looping type\n samplePlayer.setLoopType(SamplePlayer.LoopType.LOOP_FORWARDS);\n\n // Define what our directions are\n final int PLAY_FORWARD = 1;\n final int PLAY_REVERSE = -1;\n\n // define our playbackRate control\n Glide playbackRate = new Glide(START_PLAY_RATE);\n // define our sample rate\n Glide playbackDirection = new Glide(PLAY_FORWARD); // We will control this with yaw\n\n // This function will be used to set the playback rate of the samplePlayer\n // The playbackDirection will have a value of -1 when it is in reverse, and 1 in forward\n // This is multiplied by the playbackRate to get an absolute value\n Function calculatedRate = new Function(playbackRate, playbackDirection) {\n @Override\n public float calculate() {\n return x[0] * x[1];\n }\n };\n\n // now set the rate to the samplePlayer\n samplePlayer.setRate(calculatedRate);\n\n // Use a Buddy control to change the PlaybackRate\n // Simply type floatBuddyControl to generate this code\n FloatControl playbackRateControl = new FloatControl(this, \"Playback Rate\", START_PLAY_RATE) {\n @Override\n public void valueChanged(double control_val) {// Write your DynamicControl code below this line\n playbackRate.setValue((float)control_val);\n // Write your DynamicControl code above this line\n }\n }.setDisplayRange(0, MAX_PLAYBACK_RATE, DynamicControl.DISPLAY_TYPE.DISPLAY_ENABLED_BUDDY);// End DynamicControl playbackRateControl code\n\n\n // create a checkbox to make it play forward or reverse\n // type booleanControl to generate this code\n BooleanControl directionControl = new BooleanControl(this, \"Reverse\", false) {\n @Override\n public void valueChanged(Boolean control_val) {// Write your DynamicControl code below this line\n if (!control_val){\n playbackDirection.setValue(PLAY_FORWARD);\n }\n else{\n playbackDirection.setValue(PLAY_REVERSE);\n }\n // Write your DynamicControl code above this line\n }\n };// End DynamicControl directionControl code\n\n\n\n // display a slider for position\n // Type floatSliderControl to generate this code \n FloatControl audioPosition = new FloatControl(this, \"Audio Position\", 0) {\n @Override\n public void valueChanged(double control_val) {// Write your DynamicControl code below this line \n samplePlayer.setPosition(control_val);\n setAudioTextPosition(control_val);\n // Write your DynamicControl code above this line \n }\n }.setDisplayRange(0, sampleDuration, DynamicControl.DISPLAY_TYPE.DISPLAY_DEFAULT);// End DynamicControl audioPosition code\n\n\n // set our newly created control to the class reference\n audioSliderPosition = audioPosition;\n\n // Type textControl to generate this code \n TextControl audioPositionText = new TextControl(this, \"Audio Position\", \"\") {\n @Override\n public void valueChanged(String control_val) {// Write your DynamicControl code below this line \n // we will decode our string value to audio position\n\n // we only want to do this if we are stopped\n if (samplePlayer.isPaused()) {\n // our string will be hh:mm:ss.m\n try {\n String[] units = control_val.split(\":\"); //will break the string up into an array\n int hours = Integer.parseInt(units[0]); //first element\n int minutes = Integer.parseInt(units[1]); //second element\n float seconds = Float.parseFloat(units[2]); // thirsd element\n float audio_seconds = 360 * hours + 60 * minutes + seconds; //add up our values\n\n float audio_position = audio_seconds * 1000;\n setAudioSliderPosition(audio_position);\n } catch (Exception ex) {\n }\n }\n // Write your DynamicControl code above this line \n }\n };// End DynamicControl audioPositionText code \n\n\n\n // set newly create DynamicControl to our class variable\n\n audioTextPosition = audioPositionText;\n // create a thread to update our position while we are playing\n // This is done in a function\n updateThread = createUpdateThread();\n\n // We will set sample Start and End points\n // define our start and end points\n Glide loop_start = new Glide(0);\n Glide loop_end = new Glide(sampleDuration);\n\n samplePlayer.setLoopStart(loop_start);\n samplePlayer.setLoopEnd(loop_end);\n\n // Simply type floatBuddyControl to generate this code \n FloatControl loopStartControl = new FloatControl(this, \"Loop start\", 0) {\n @Override\n public void valueChanged(double control_val) {// Write your DynamicControl code below this line \n float current_audio_position = (float)samplePlayer.getPosition();\n\n if (current_audio_position < control_val){\n samplePlayer.setPosition(control_val);\n }\n loop_start.setValue((float)control_val);\n // Write your DynamicControl code above this line \n }\n }.setDisplayRange(0, sampleDuration, DynamicControl.DISPLAY_TYPE.DISPLAY_ENABLED_BUDDY);// End DynamicControl loopStartControl code\n\n\n\n // Simply type floatBuddyControl to generate this code \n FloatControl loopEndControl = new FloatControl(this, \"Loop End\", sampleDuration) {\n @Override\n public void valueChanged(double control_val) {// Write your DynamicControl code below this line \n loop_end.setValue((float)control_val);\n // Write your DynamicControl code above this line \n }\n }.setDisplayRange(0, sampleDuration, DynamicControl.DISPLAY_TYPE.DISPLAY_ENABLED_BUDDY);// End DynamicControl loopEndControl code\n\n\n // Add a control to make sample player start at loop start position\n\n // Type triggerControl to generate this code \n TriggerControl startLoop = new TriggerControl(this, \"Start Loop\") {\n @Override\n public void triggerEvent() {// Write your DynamicControl code below this line \n samplePlayer.setPosition(loop_start.getCurrentValue());\n // Write your DynamicControl code above this line \n }\n };// End DynamicControl startLoop code \n\n\n /******** Write your code above this line ********/\n } else {\n HB.HBInstance.setStatus(\"Failed sample \" + SAMPLE_NAME);\n }\n /*** End samplePlayer code ***/\n\n }", "@Override\n protected String produceSound(){\n return \"BauBau\";\n\n }", "public Controller(IView view) {\n\t\tengine = new Engine(this);\n\t\tclock = new Clock();\n\t\tsoundEmettor = new SoundEmettor();\n\t\tthis.view = view;\n\t}", "public abstract void addWordAudio(WordAudio audio) throws IOException;", "Player createPlayer();", "public Music()\n {\n this(0, \"\", \"\", \"\", \"\", \"\");\n }" ]
[ "0.6654493", "0.6647912", "0.6416208", "0.62134635", "0.6151284", "0.61296475", "0.59957826", "0.5985416", "0.5865886", "0.58320993", "0.57645744", "0.5720727", "0.5671496", "0.5671203", "0.56172794", "0.56172794", "0.5607064", "0.56009066", "0.55529445", "0.55419856", "0.553924", "0.54510766", "0.5449559", "0.5446939", "0.5439016", "0.5428254", "0.54272854", "0.54189533", "0.5395687", "0.5390723", "0.53900397", "0.53780663", "0.5339733", "0.53190506", "0.52976996", "0.5285666", "0.5285007", "0.52812225", "0.5229417", "0.5227075", "0.52081585", "0.52078086", "0.5203582", "0.5202928", "0.5202116", "0.5200041", "0.5198651", "0.5194162", "0.5187412", "0.51871645", "0.51784724", "0.51778835", "0.51778835", "0.5175044", "0.5172651", "0.51714283", "0.5170562", "0.51699513", "0.51695406", "0.5162119", "0.5161335", "0.5155429", "0.51431304", "0.51411855", "0.5129268", "0.51244956", "0.5122512", "0.51201296", "0.5117546", "0.51156926", "0.5111938", "0.5107127", "0.51039267", "0.5103643", "0.5102283", "0.5102119", "0.50910693", "0.5087062", "0.5086577", "0.50745624", "0.5068698", "0.50593054", "0.5035171", "0.5024956", "0.5022488", "0.5013533", "0.5011834", "0.50117433", "0.50050163", "0.5004761", "0.49966672", "0.49949816", "0.4992389", "0.49904874", "0.4981403", "0.49804625", "0.49724796", "0.49673107", "0.49663034", "0.496286" ]
0.7124925
0
stops and terminates the current Background Sound and starts a new one based on the given path
public void playBackground(String path){ stopBackground(); loopingSound = new Sound("/res/sounds/" + path,-1,true); activeSounds++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void backgroundMusic(String path) {\n if (Objects.equals(playingFile, path)) return;\n playingFile = path;\n\n\n // stop if playing\n stop();\n\n if (path == null) {\n // nothing to play\n playingClip = null;\n return;\n }\n\n try {\n\n // find file\n final AudioInputStream stream = AudioSystem.getAudioInputStream(new File(path));\n\n // create player\n playingClip = AudioSystem.getClip();\n playingClip.open(stream);\n playingClip.loop(playingClip.LOOP_CONTINUOUSLY);\n\n // play\n playingClip.start();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public synchronized void playAbruptLoop(String path){\r\n if(currentLoop0){\r\n if(backgroundMusicLoop0!=null) backgroundMusicLoop0.stopClip();\r\n currentLoop0 = false;\r\n backgroundMusicLoop1 = new MusicThread(path, currentLoop0);\r\n backgroundMusicLoop1.start();\r\n }else{\r\n if(backgroundMusicLoop1!=null) backgroundMusicLoop1.stopClip();\r\n currentLoop0 = true;\r\n backgroundMusicLoop0 = new MusicThread(path, currentLoop0);\r\n backgroundMusicLoop0.start();\r\n }\r\n }", "public void startSound()\n \n {try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Start 2.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n startClip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n startClip.open(audioIn); \n \n startClip.start();\n \n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n \n }", "public static void playBackGroundMusic(String path) {\n if (musicPlayer != null && musicPlayer.getSourceLocation() != null) {\n if (musicPlayer.getSourceLocation().equals(path)) {\n if (musicPlayer.isEndOfMediaReached()) {\n musicPlayer.seek(0);\n musicPlayer.play();\n }\n return;\n }\n musicPlayer.stop();\n }\n musicPlayer = new Player();\n musicPlayer.setSourceLocation(path);\n musicPlayer.play();\n }", "public void continueSound() {\n\t\tclip.start();\n\t}", "public static void playSoundEffect(String path) {\n Thread thread = new Thread(() -> {\n Player soundEffectPlayer = new Player();\n soundEffectPlayer.setSourceLocation(path);\n soundEffectPlayer.play();\n });\n thread.setDaemon(true);\n thread.start();\n }", "public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void run() \n {\n try\n {\n Clip clip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(getClass().getResource(sound));\n clip = AudioSystem.getClip();\n clip.open(inputStream);\n clip.start(); \n } catch (UnsupportedAudioFileException e) {\n \t\t\te.printStackTrace();\n } catch (IOException e) {\n \t\t\te.printStackTrace();\n } catch (LineUnavailableException e) {\n \t\t\te.printStackTrace();\n }\n }", "public static void playSound(){\r\n try{\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(AudioSystem.getAudioInputStream(new File(\"Cheering.wav\")));\r\n clip.start();\r\n }\r\n catch (Exception exc){\r\n exc.printStackTrace(System.out);\r\n } \r\n }", "private synchronized void playBackgroundSound(boolean state) {\r\n // enable/disable the background sound\r\n if (this.backgroundSound != null) {\r\n\r\n // stop the sound in case that is already playing\r\n if (this.backgroundSound.isPlaying()) {\r\n this.backgroundSound.stop();\r\n this.backgroundSound.close();\r\n }\r\n\r\n // wait for the above sound to complete the stop request\r\n while (this.backgroundSound.isPlaying()) {\r\n try {\r\n Thread.sleep(50);\r\n Thread.yield();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n // play the sound if the sound was enabled\r\n if (this.soundOn && state && !this.runSimulationState) {\r\n this.backgroundSound.setSoundFileAutoLoop(true);\r\n this.backgroundSound.play();\r\n }\r\n }\r\n }", "public synchronized void playSmoothLoop(String path){\r\n if(currentLoop0){\r\n if(backgroundMusicLoop0!=null) backgroundMusicLoop0.fadeOut();\r\n currentLoop0 = false;\r\n if(backgroundMusicLoop1==null){\r\n backgroundMusicLoop1 = new MusicThread(path, currentLoop0);\r\n backgroundMusicLoop1.startOnFadeIn();\r\n }else backgroundMusicLoop1.fadeIn();\r\n }else{\r\n if(backgroundMusicLoop1!=null) backgroundMusicLoop1.fadeOut();\r\n currentLoop0 = true;\r\n if(backgroundMusicLoop0==null){\r\n backgroundMusicLoop0 = new MusicThread(path, currentLoop0);\r\n backgroundMusicLoop0.startOnFadeIn();\r\n }else backgroundMusicLoop0.fadeIn();\r\n }\r\n }", "public void keepLooping() {\n\t\tif(!clip.isActive()) {\n\t\t\tstartSound();\n\t\t}\n\t}", "static void PlaySound(File Sound)\n {\n try{\n Clip clip = AudioSystem.getClip();\n clip.open(AudioSystem.getAudioInputStream(Sound));\n clip.start();\n //BGM = new AudioStream(new FileInputStream(\"OST.WAV\"));\n //MD = BGM.getData();\n //loop = new ContinuousAudioDataStream(MD);\n }catch(Exception e) {}\n //MGP.start(loop); \n }", "public void run() {\n\t\t try {\n\t\t Clip clip = AudioSystem.getClip();\n\t\t //AudioInputStream inputStream = AudioSystem.getAudioInputStream(\n\t\t //Main.class.getResourceAsStream(\"/path/to/sounds/\" + url));\n\t\t //clip.open(inputStream);\n\t\t clip.start(); \n\t\t } catch (Exception e) {\n\t\t System.err.println(e.getMessage());\n\t\t }\n\t\t }", "public static void SFX(String path){\r\n Main.soundSystem.playSFX(path);\r\n }", "public void addSound(String path, boolean loop){\r\n\t\t\r\n\t\tif(enabled){\r\n\t\t\tSonido sound = new Sonido(path, loop);\r\n\t\t\tif(loop)\r\n\t\t\t\tsonido = sound;\r\n\t\t}\r\n\t\tif(loop)\r\n\t\t\tthis.path = path;\r\n\t}", "public void diskAddedsound()\n {\n InputStream pathSoundFile = getClass().getResourceAsStream(\"diskplacement.wav\");\n playSound(pathSoundFile);\n }", "public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}", "public BackgroundSound loadBackgroundSound( String filename, float gain ) throws IOException\n {\n SoundContainer container = loadSound( filename );\n \n return ( new BackgroundSound( container, gain ) );\n }", "public void stopBackground(){\n\t if(loopingSound != null){\n\t loopingSound.terminate();\n\t }\n\t\tloopingSound = null;\n\t\tactiveSounds--;\n\t}", "public static void clic_sound() {\n\t\tm_player_clic.start();\n\t\tm_player_clic.setMediaTime(new Time(0));\n\t}", "@Override\r\n \tpublic void play() {\n \t\tFile file = new File(location);\r\n \t\tlong audioFileLength = file.length();\r\n \t\tAudioInputStream audioInputStream;\r\n \t\ttry {\r\n \t\t\taudioInputStream = AudioSystem.getAudioInputStream(file);\r\n \r\n \t\t\tAudioFormat format = audioInputStream.getFormat();\r\n \r\n \t\t\tint frameSize = format.getFrameSize();\r\n \t\t\tfloat frameRate = format.getFrameRate();\r\n \t\t\tdurationInSeconds = (audioFileLength / (frameSize * frameRate));\r\n \r\n \r\n \t\t\tLine.Info linfo = new Line.Info(Clip.class);\r\n \t\t\tLine line = AudioSystem.getLine(linfo);\r\n \t\t\tclip = (Clip) line;\r\n \t\t\t//clip.addLineListener(this);\r\n \t\t\tclip.open(audioInputStream);\r\n \t\t\tclip.start();\r\n \r\n \t\t} catch (UnsupportedAudioFileException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (IOException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (LineUnavailableException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t}\t\r\n \r\n \t}", "public void playAmbientSound() {\n if (!this.isClosed()) {\n super.playAmbientSound();\n }\n\n }", "public synchronized void stopBackgroundAbruptly(){\r\n if(currentLoop0) backgroundMusicLoop0.stopClip();\r\n else backgroundMusicLoop1.stopClip();\r\n }", "public Sound createSound(String file);", "public static void music (String fileName)\r\n {\r\n\tAudioPlayer MGP = AudioPlayer.player;\r\n\tAudioStream BGM;\r\n\tAudioData MD;\r\n\r\n\tContinuousAudioDataStream loop = null;\r\n\r\n\ttry\r\n\t{\r\n\t InputStream test = new FileInputStream (\"lamarBackgroundMusic.wav\");\r\n\t BGM = new AudioStream (test);\r\n\t AudioPlayer.player.start (BGM);\r\n\r\n\t}\r\n\tcatch (FileNotFoundException e)\r\n\t{\r\n\t System.out.print (e.toString ());\r\n\t}\r\n\tcatch (IOException error)\r\n\t{\r\n\t System.out.print (error.toString ());\r\n\t}\r\n\tMGP.start (loop);\r\n }", "public static void musicFirstLevel(){\n\t\ttry {\r\n\t\t\tbgmusicLevel = new Music(\"res/sound/firstLevel.wav\");\r\n\t\t\tbgmusicLevel.loop(1f, 0.1f);\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void StartSound(ISoundOrigin origin, sfxenum_t sound_id);", "public Sound play(String path)\n\t{\n\t//\tSystem.out.println(\"Playing sound: \" + path);\n\t\t\t\n\t\tSound newSound;\n\t\t\n\t\tif(volume == 0)\n\t\t\treturn null;\n\t\t\n\t\tif(sounds.containsKey(path))\n\t\t{\n\t\t//\tSystem.out.println(\"\\tSound loaded from sound cache\");\n\t\t\tnewSound = sounds.get(path);\n\t\t}\n\t\telse\n\t\t{\n\t\t//\tSystem.out.println(\"\\tloading sound into sound cache\");\n\t\t\tnewSound = new Sound(path);\n\t\t\tsounds.put(path,newSound);\n\t\t}\n\n\t\tnewSound.play(volume);\n\t\t\n\t\treturn newSound;\n\t}", "public static void playSoundOOSrc(String path, boolean loop) {\r\n\t\t\r\n\t\tif (debugMode) {\r\n\t\t\tSystem.out.println(\"Try to play sound...\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif (!debugMode) {\r\n\t\t\t AudioInputStream audioInput = AudioSystem.getAudioInputStream(new File(path));\r\n\t\t\t\tClip clip = AudioSystem.getClip();\r\n\t\t\t\t\r\n\t\t\t\t//stopAllClips();\r\n\t\t\t\tclips.add(clip);\r\n\t\t\t\tclip.open(audioInput);\r\n\t\t\t\tif (loop) {\r\n\t\t\t\t\tclip.loop(Clip.LOOP_CONTINUOUSLY);\r\n\t\t\t\t}\r\n\t\t\t\tclip.start();\r\n\t\t\t\tif (debugMode) {\r\n\t\t\t\t\tSystem.out.println(\"Successfully played sound!\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (debugMode) {\r\n\t\t\t\t\tSystem.out.println(\"Can't find sound file.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tif (debugMode) {\r\n\t\t\t\tSystem.out.println(\"Can't play sound.\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void portail_sound() {\n\t\tm_player_portail.start();\n\t\tm_player_portail.setMediaTime(new Time(0));\n\t}", "public BackgroundSound loadBackgroundSound( InputStream in, float gain ) throws IOException\n {\n SoundContainer container = loadSound( in );\n \n return ( new BackgroundSound( container, gain ) );\n }", "public void play() {\n\t\ttry {\n\t\t\taudioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void stopBackgroundMusic()\n {\n background.stop();\n }", "private void playSound(@NonNull final String path, @Nullable AssetFileDescriptor assetFileDescriptor) {\n\t\tif (mMode == PLAY_SINGLE) {\n\t\t\tstopAll();\n\t\t}\n\n\t\t// sound already playing\n\t\tif (mMediaMap.containsKey(path)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// stop all currently playing sounds\n\t\tif (mMode == PLAY_SINGLE_CONTINUE) {\n\t\t\tstopAll();\n\t\t}\n\n\t\t// init media player\n\t\tMediaPlayer mediaPlayer;\n\t\ttry {\n\t\t\tmediaPlayer = new MediaPlayer();\n\t\t\tmMediaMap.put(path, mediaPlayer);\n\n\t\t\t// data source\n\t\t\tif (assetFileDescriptor != null) {\n\t\t\t\tmediaPlayer.setDataSource(assetFileDescriptor.getFileDescriptor(), assetFileDescriptor.getStartOffset(), assetFileDescriptor.getLength());\n\t\t\t} else {\n\t\t\t\tmediaPlayer.setDataSource(path);\n\t\t\t}\n\n\t\t\tmediaPlayer.prepareAsync();\n\t\t} catch (@NonNull IllegalArgumentException | IllegalStateException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n\t\t// play sound\n\t\tmediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n\t\t\t@Override\n\t\t\tpublic void onPrepared(@NonNull MediaPlayer mediaPlayer) {\n\t\t\t\tmediaPlayer.start();\n\t\t\t}\n\t\t});\n\n\t\t// release media player\n\t\tmediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\t\t\t@Override\n\t\t\tpublic void onCompletion(@Nullable MediaPlayer mediaPlayer) {\n\t\t\t\tmMediaMap.remove(path);\n\t\t\t\tif (mediaPlayer != null) {\n\t\t\t\t\tmediaPlayer.release();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private void playSound(String sound) {\r\n try {\r\n BufferedInputStream soundFileStream = new BufferedInputStream(this\r\n .getClass().getResourceAsStream(sound));\r\n AudioInputStream audioInputStream = AudioSystem\r\n .getAudioInputStream(soundFileStream);\r\n AudioFormat audioFormat = audioInputStream.getFormat();\r\n DataLine.Info dataLineInfo = new DataLine.Info(Clip.class, audioFormat);\r\n Clip clip = (Clip) AudioSystem.getLine(dataLineInfo);\r\n clip.open(audioInputStream);\r\n clip.start();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public SoundEffects(String soundPath)\n\t{\n\t\ttry \n\t\t{\n\t\t\tFile url = new File(soundPath);\n\t\t\tthis.audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\tthis.clip = AudioSystem.getClip();\n\t\t\tthis.clip.open(audioIn);\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void pauseSound() {\n\t\tclip.stop();\n\t}", "public synchronized void stopSound() {\r\n running = false;\r\n }", "void setupSounds() {\n soundSwitch = new Switch(Switch.CHILD_NONE);\n soundSwitch.setCapability(Switch.ALLOW_SWITCH_WRITE);\n\n // Set up the sound media container\n java.net.URL soundURL = null;\n String soundFile = \"res/sounds/Get_up_on_your_feet_mixdown2.wav\";\n try {\n soundURL = new java.net.URL(codeBaseString + soundFile);\n } catch (java.net.MalformedURLException ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n if (soundURL == null) { // application, try file URL\n try {\n soundURL = new java.net.URL(\"file:./\" + soundFile);\n } catch (java.net.MalformedURLException ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n }\n //System.out.println(\"soundURL = \" + soundURL);\n MediaContainer soundMC = new MediaContainer(soundURL);\n\n // set up the Background Sound\n soundBackground = new BackgroundSound();\n soundBackground.setCapability(Sound.ALLOW_ENABLE_WRITE);\n soundBackground.setSoundData(soundMC);\n soundBackground.setSchedulingBounds(infiniteBounds);\n soundBackground.setEnable(false);\n soundBackground.setLoop(Sound.INFINITE_LOOPS);\n soundSwitch.addChild(soundBackground);\n\n // set up the point sound\n soundPoint = new PointSound();\n soundPoint.setCapability(Sound.ALLOW_ENABLE_WRITE);\n soundPoint.setSoundData(soundMC);\n soundPoint.setSchedulingBounds(infiniteBounds);\n soundPoint.setEnable(false);\n soundPoint.setLoop(Sound.INFINITE_LOOPS);\n soundPoint.setPosition(-5.0f, 5.0f, 0.0f);\n Point2f[] distGain = new Point2f[2];\n // set the attenuation to linearly decrease volume from max at\n // source to 0 at a distance of 15m\n distGain[0] = new Point2f(0.0f, 1.0f);\n distGain[1] = new Point2f(15.0f, 0.0f);\n soundPoint.setDistanceGain(distGain);\n soundSwitch.addChild(soundPoint);\n\n // Create the chooser GUI\n String[] soundNames = { \"None\", \"Background\", \"Point\", };\n\n soundChooser = new IntChooser(\"Sound:\", soundNames);\n soundChooser.addIntListener(new IntListener() {\n public void intChanged(IntEvent event) {\n int value = event.getValue();\n // Should just be able to use setWhichChild on\n // soundSwitch, have to explictly enable/disable due to\n // bug.\n switch (value) {\n case 0:\n soundSwitch.setWhichChild(Switch.CHILD_NONE);\n soundBackground.setEnable(false);\n soundPoint.setEnable(false);\n break;\n case 1:\n soundSwitch.setWhichChild(0);\n soundBackground.setEnable(true);\n soundPoint.setEnable(false);\n break;\n case 2:\n soundSwitch.setWhichChild(1);\n soundBackground.setEnable(false);\n soundPoint.setEnable(true);\n break;\n }\n }\n });\n soundChooser.setValue(Switch.CHILD_NONE);\n\n }", "abstract public void setSoundResourcesDir(String path);", "public void openAlienDestroyedSound() {\r\n\t\tif (clipAlienDestroyed.isOpen()) {\r\n\t\t\tclipAlienDestroyed.start();\r\n\t\t}\r\n\r\n\t\tif (!(clipAlienDestroyed.isActive())) {\r\n\t\t\t/*\r\n\t\t\t * clip.stop(); clip.flush();\r\n\t\t\t */\r\n\t\t\tclipAlienDestroyed.setFramePosition(0);\r\n\t\t}\r\n\r\n\t}", "private void playMusic(File filepath) {\r\n\t\ttry {\r\n\t\t AudioInputStream song = AudioSystem.getAudioInputStream(filepath);\r\n\t\t\tAudioFormat format = song.getFormat();\r\n\t\t DataLine.Info info = new DataLine.Info(Clip.class, format);\r\n\t\t Clip clip = (Clip) AudioSystem.getLine(info);\r\n\t\t clip.open(song);\r\n\t\t clip.start();\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tthrow new ErrorException(ex);\r\n\t\t}\r\n\t}", "public void StartSound(ISoundOrigin origin, int sound_id);", "public void playWinSounds(){\r\n try {\r\n File mFile = new File(Filepath3);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput4 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip4 = AudioSystem.getClip();\r\n clip4.open(audioInput4);\r\n FloatControl gainControl4 = (FloatControl) clip4.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl4.setValue(-10.0f); //reduces the volume by 10 decibels\r\n clip4.start();\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "private void makeNewMusic() {\n File f = music.getFile();\n boolean playing = music.isPlaying();\n music.stop();\n music = new MP3(f);\n if (playing) {\n music.play(nextStartTime);\n }\n }", "public void endSound()\n {\n if(!mute)\n {\n try {\n if(lastpowerUp.equals(\"RAINBOW\"))\n {\n sclip.stop();\n bclip.start();\n bclip.loop(Clip.LOOP_CONTINUOUSLY);\n }\n // Open an audio input stream.\n URL url = this.getClass().getClassLoader().getResource(\"Silence.wav\"); \n \n if(lastpowerUp.equals(\"BLUE\"))\n url = this.getClass().getClassLoader().getResource(\"Out Of Bounds Stop.wav\");\n else if(lastpowerUp.equals(\"YELLOW\")||lastpowerUp.equals(\"DOUBLE\") || lastpowerUp.equals(\"WHITE\") || (lastpowerUp.equals(\"TROLL\") && modeT))\n url = this.getClass().getClassLoader().getResource(\"Mushroom Down.wav\") ;\n else if(lastpowerUp.equals(\"BLACK\") || lastpowerUp.equals(\"TROLL\"))\n url = this.getClass().getClassLoader().getResource(\"Invisible Off.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n Clip clip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n clip.open(audioIn); \n \n clip.start();\n \n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n \n } \n }\n }", "public void play() { \r\n if (midi) \r\n sequencer.start(); \r\n else \r\n clip.start(); \r\n timer.start(); \r\n play.setText(\"Stop\"); \r\n playing = true; \r\n }", "public void start() {\n background.playMusic();\n createTimer();\n timer.start();\n }", "public Sound loadSound(String file);", "public Sound load(String path)\n\t{\n\t//\tSystem.out.println(\"Loading sound: \" + path);\n\t\t\t\n\t\tSound newSound;\n\t\t\n\t\tif(sounds.containsKey(path))\n\t\t{\n\t\t\tnewSound = sounds.get(path);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnewSound = new Sound(path);\n\t\t\tsounds.put(path,newSound);\n\t\t}\n\t\treturn newSound;\n\t}", "public void playSound() {\n String path = \"Data\\\\\\\\Acceptance.wav\";\n InputStream success;\n try {\n success = new FileInputStream(new File(path));\n AudioStream audioStream = new AudioStream(success);\n AudioPlayer.player.start(audioStream);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error playing sounds\");\n }\n }", "public static synchronized void playSound(final String url) {\n\t\t new Thread(new Runnable() {\n\t\t public void run() {\n\t\t try {\n\t\t Clip clip = AudioSystem.getClip();\n\t\t AudioInputStream inputStream = AudioSystem.getAudioInputStream(\n\t\t Main.class.getResourceAsStream(\"/res/\" + url));\n\t\t clip.open(inputStream);\n\t\t clip.start(); \n\t\t } catch (Exception e) {\n\t\t System.err.println(e.getMessage());\n\t\t }\n\t\t }\n\t\t }).start();\n\t\t}", "public void PauseSound();", "public void playSound(String fileName){\n \n Random rand = new Random();\n if (fileName == null) {\n int nextSongNumber = rand.nextInt(soundList.size());\n while(nextSongNumber == currentSongNumber){\n nextSongNumber = rand.nextInt(soundList.size());\n }\n currentSongNumber = nextSongNumber;\n fileName = soundList.get(currentSongNumber);\n }\n \n try {\n \n \n soundSequencer = MidiSystem.getSequencer();\n soundSequencer.open();\n \n soundSequencer.setSequence(this.getClass().getResourceAsStream(fileName));\n soundSequencer.setLoopCount(Sequencer.LOOP_CONTINUOUSLY);\n soundSequencer.start();\n \n } catch (IOException | InvalidMidiDataException | MidiUnavailableException ex) {\n //Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static void beginCurrentSoundtrack() {\n\t\t\n\t\tif (GameFrame.settingsPanel.musicOn() && soundtrack[GameBoardModel.getLevel()-1] != null) {\n\t\t\t\n\t\t\t// In case a new game is started before the victory jingle is finished\n\t\t\t// from a previous game (rare occurrence, but possible)\n\t\t\tif (victoryFanfare.isRunning()) victoryFanfare.stop();\t\t\t\n\t\t\t\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].setFramePosition(0);\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].loop(Clip.LOOP_CONTINUOUSLY);\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void stopSound(){\n p.stop(as);\n }", "@Override\n public void makeSound() {\n\n }", "@Override\n public void makeSound() {\n\n }", "public void soundClipTest()\n {\n //this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n //this.setTitle(\"Test Sound Clip\");\n //this.setSize(300, 200);\n //this.setVisible(true);\n \n try {\n // Open an audio input stream.\n URL url = this.getClass().getClassLoader().getResource(\"Silence.wav\");\n if(difficult.equals(\"YOU WILL NOT SURVIVE\")) \n url = this.getClass().getClassLoader().getResource(\"Koopa Bros.wav\"); \n else if(difficult.equals(\"HARD\"))\n url = this.getClass().getClassLoader().getResource(\"Epic One Piece.wav\");//\"Stand Up Be Strong.wav\"); \"Halo.wav\" \n else if(difficult.equals(\"MEDIUM\"))\n url = this.getClass().getClassLoader().getResource(\"Epic One Piece.wav\");\n else if(difficult.equals(\"EASY\"))\n url = this.getClass().getClassLoader().getResource(\"Bowsers Castle.wav\");\n else if(difficult.equals(\"GHOST\"))\n url = this.getClass().getClassLoader().getResource(\"Paper Mario- Crystal Palace Crawl.wav\");\n else if(difficult.equals(\"TROLL\"))\n url = this.getClass().getClassLoader().getResource(\"Troll Song.wav\"); //\"Mario Kart 64.wav\"\n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n bclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n bclip.open(audioIn);\n \n \n //try{Thread.sleep(2000);} catch(InterruptedException e) {}\n if(!mute)\n {\n bclip.start();\n //clip.loop(Clip.LOOP_CONTINUOUSLY);\n bclip.loop(Clip.LOOP_CONTINUOUSLY);\n \n }\n if(pause)\n {\n try{bclip.wait();} catch(InterruptedException e) {}\n \n URL url2 = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn2 = AudioSystem.getAudioInputStream(url2);\n // Get a sound clip resource.\n Clip pclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n pclip.open(audioIn2);\n \n if(!mute)\n pclip.start(); \n }\n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n }\n \n }", "public SimpleAudioPlayer(String filePath) \r\n throws UnsupportedAudioFileException, \r\n IOException, LineUnavailableException \r\n { \r\n // create AudioInputStream object \r\n audioInputStream = \r\n AudioSystem.getAudioInputStream(new File(filePath).getAbsoluteFile()); \r\n \r\n // create clip reference \r\n clip = AudioSystem.getClip(); \r\n \r\n // open audioInputStream to the clip \r\n clip.open(audioInputStream); \r\n \r\n clip.loop(Clip.LOOP_CONTINUOUSLY); \r\n }", "public static void resumeCurrentSoundtrack() {\n\t\tif (GameFrame.settingsPanel.musicOn() && soundtrack[GameBoardModel.getLevel()-1] != null)\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].loop(Clip.LOOP_CONTINUOUSLY);\n\t}", "public void playSound(File soundFile);", "protected void startNextSound() {\n\t\tsoundIndex = (soundIndex < audioFiles.length - 1) ? soundIndex + 1 : 0;\t\n\t\tString nextSoundId = audioFiles[soundIndex];\n\t\tstartPlayer(nextSoundId);\n\t}", "public static void get_background_and_sound(String[] message) {\n Log.d(TAG, \"get_background_and_sound: Lets set BACKGROUND ........\");\n int song = 0;\n int drawable = 0;\n // background image\n switch(message[2]){\n case \"forest_leafy_a\":\n MainPlayer.setTypeOfSurrounding(\"forest_leafy\");\n drawable = R.drawable.forest_leafy_a;\n if(GameSound.getClipsSounds().size() == 0)GameSound.setMainSound(\"forest_leafy\", 1, false);\n else GameSound.changeCurrentSong(20);\n GameSound.setCurrentWalkSound(R.raw.walk_forest);\n break;\n case \"cliff_a\":\n MainPlayer.setTypeOfSurrounding(\"cliff\");\n drawable = R.drawable.cliff_a;\n if(GameSound.getClipsSounds().size() == 0)GameSound.setMainSound(\"cliff\", 1, false);\n else GameSound.changeCurrentSong(80);\n GameSound.setCurrentWalkSound(R.raw.walk_cliff);\n break;\n }\n SetActivity.setBackgroundAndSound(drawable, song, message[2]);\n }", "private void playGameOverSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\ringout.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "private void reproducirAudio() {\n try{\n audioInputStream = AudioSystem.getAudioInputStream(new File(\"Sonidos/Inicio.wav\").getAbsoluteFile());\n clip = AudioSystem.getClip();\n clip.open(audioInputStream);\n clip.start();\n }\n catch (UnsupportedAudioFileException | IOException | LineUnavailableException ex){\n ex.printStackTrace();\n }\n }", "public void playDonkeySounds(){\r\n try {\r\n File mFile = new File(Filepath2);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput3 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip3 = AudioSystem.getClip();\r\n clip3.open(audioInput3);\r\n FloatControl gainControl3 = (FloatControl) clip3.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl3.setValue(-10.0f); //reduces the volume by 10 decibels\r\n clip3.start();\r\n\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "private void playYouWinSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\tada.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "public BackgroundSound loadBackgroundSound( URL url, float gain ) throws IOException\n {\n SoundContainer container = loadSound( url );\n \n return ( new BackgroundSound( container, gain ) );\n }", "private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}", "public static void loop(String filename) {\r\n\r\n InputStream path=load(filename);\r\n\r\n \r\n try\r\n {\r\n stop();\r\n soundLoop=AudioSystem.getClip();\r\n soundLoop.open(AudioSystem.getAudioInputStream(new BufferedInputStream(path)));\r\n soundLoop.loop(javax.sound.sampled.Clip.LOOP_CONTINUOUSLY);\r\n\r\n }catch(Exception fallo)\r\n {\r\n \r\n\r\n }\r\n \r\n }", "public void play() {\n\t\tplay(true, true);\n\t}", "private void playSound(String soundFile){\n try {\n AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File(soundFile).getAbsoluteFile());\n Clip clip = AudioSystem.getClip();\n clip.open(audioInputStream);\n clip.start();\n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void playSound() {\n\t\tif (controllerVars.isLoaded() && !controllerVars.isPlays()) {\n\t\t\tcontrollerVars.getSoundPool().play(controllerVars.getSoundID(), controllerVars.getVolume(), controllerVars.getVolume(), 1, 0, 1f);\n\t\t\tcontrollerVars.COUNTER++;\n\t\t\t//Toast.makeText(act, \"Played sound\", Toast.LENGTH_SHORT).show();optional Playing message \n\t\t\tcontrollerVars.setPlays(true);\n\t\t\tonComplete(controllerVars.getMediaPlayer().getDuration());\n\t\t}\n\t\t//controllerVars.getMediaPlayer().start();\n\t\t//controllerVars.setPlays(true);\n\t}", "public void open(String path)\n\t\t{\n\t\t\tsynchronized (this)\n\t\t\t{\n\t\t\t\tif (path == null)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (mPlayer != null)\n\t\t\t\t{\n\t\t\t\t\tmPlayer.stop();\n\t\t\t\t\tmPlayer.setHandler(mMediaPlayerHandler);\n\t\t\t\t\tmPlayer.setDataSource(path, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void playBeep(){\n //https://stackoverflow.com/questions/2618182/how-to-play-ringtone-alarm-sound-in-android\n try{\n //gets notification sound then plays it.\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);\n\n r.play();\n TimeUnit.MILLISECONDS.sleep(300);\n r.stop();\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }", "public static void game_sound() {\n\t\tm_player_game.start();\n\t\tm_player_game.setMediaTime(new Time(0));\n\t}", "public String getSoundPath();", "public void playLaneSounds(){\r\n try {\r\n File mFile = new File(Filepath5);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput6 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip6 = AudioSystem.getClip();\r\n clip6.open(audioInput6);\r\n FloatControl gainControl6 = (FloatControl) clip6.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl6.setValue(-10.0f); //reduces the volume by 10 decibels\r\n clip6.start();\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "public void playMusic() {\r\n try {\r\n File mFile = new File(Filepath);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(audioInput);\r\n FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl.setValue(-25.0f); //reduces the volume by 25 decibels\r\n clip.start();\r\n clip.loop(Clip.LOOP_CONTINUOUSLY);\r\n\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "public static void charge_sound() {\n\t\tm_player_charge.start();\n\t\tm_player_charge.setMediaTime(new Time(0));\n\t}", "public synchronized void stopBackgroundSmoothly(){\r\n if(currentLoop0) backgroundMusicLoop0.fadeOut();\r\n else backgroundMusicLoop1.fadeOut();\r\n }", "public static void play(String filename) {\r\n javax.sound.sampled.Clip sonido;\r\n InputStream path=load(filename);\r\n \r\n try\r\n {\r\n sonido=AudioSystem.getClip();\r\n sonido.open(AudioSystem.getAudioInputStream(new BufferedInputStream(path)));\r\n sonido.start();\r\n\r\n }catch(Exception fallo)\r\n {\r\n \r\n }\r\n }", "public synchronized void resume(){\r\n if(currentLoop0) backgroundMusicLoop0.unpause();\r\n else backgroundMusicLoop1.unpause();\r\n }", "private void to(){\n\tmediaPlayer = new android.media.MediaPlayer();\n\ttry{\n\t mediaPlayer.setDataSource(sdPath);\n\t mediaPlayer.prepare();\n\t mediaPlayer.start();\n\t Thread.sleep(1000);\n\t}\n\tcatch(Exception e){}\n }", "public void playAndStop(String audioFilePath, Long milliseconds) {\n play(audioFilePath);\n try {\n Thread.sleep(milliseconds);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n clip.stop();\n }", "public synchronized void startPlayingSong(final Song selectedSong, final String path) {\n try {\n if (path != null) {\n PatariSingleton.getInstance().getMediaPlayer().setDataSource(path);\n MusicService.this.sendBroadcast(new Intent(Utils.BR_ACTION_NEW_SONG_PLAYED));\n PatariSingleton.getInstance().getMediaPlayer().prepareAsync();\n } else if (Utils.isOnline(this)) {\n PatariSingleton.getInstance().getMediaPlayer().setDataSource(selectedSong.getAudio());\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n IS_PROGRESS = true;\n PatariSingleton.getInstance().getMediaPlayer().prepareAsync();\n MusicService.this.sendBroadcast(new Intent(Utils.BR_ACTION_NEW_SONG_PLAYED));\n } else {\n sendBroadcast(new Intent(MainActivity.TAG_LOADING).putExtra(\"status\", false));\n stopSelf();\n AppDialog.showToast(getApplicationContext(), getString(R.string.internet_required_alert));\n }\n } catch (Exception e) {\n PLog.showLog(\"PlaySong()\", e.getMessage());\n }\n }", "public void cenaSounds()\n {\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setTitle(\"Test Sound Clip\");\n this.setSize(300, 200);\n this.setVisible(false);\n\n try {\n // Open an audio input stream.\n //URL url = this.getClass().getClassLoader().getResource(\"gameover.wav\");\n //AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\n URL url= new URL(\"http://shortmp3.mobi/u/files/WAV/39603-John_Cena_Msg_Alert_(ShortMp3.com).wav\");\n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n \n //You can change this URL to be whatever .wav file you want\n\n // Get a sound clip resource.\n Clip clip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n clip.open(audioIn);\n clip.start();\n\n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n }\n\n }", "public void pauseSong()\n {\n if(!mute)\n {\n try{ \n //bclip.stop();\n \n URL url = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n pclip.open(audioIn); \n pclip.start();\n pclip.loop(Clip.LOOP_CONTINUOUSLY);\n }catch(Exception e){}\n }\n }", "public void playRecording() {\n\t\tString command = \"aplay foo.wav\";\n\t\t\n\t\tProcessBuilder pb = new ProcessBuilder(\"bash\" , \"-c\" , command );\n\t\ttry {\n\t\t\t\n\t\t\tProcess playProcess = pb.start();\n\t\t\t\n\t\t\tplayProcess.waitFor();\n\t\t\t\n\t\t\tplayProcess.destroy();\n\t\t\t\n\t\t\t\n\t\t}catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}catch (InterruptedException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t}", "public void playSoundtrack() {\n if(this.musicEnabled) {\n try {\n Clip soundtrackClip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new BufferedInputStream(Assets.soundTrack));\n soundtrackClip.open(inputStream);\n soundtrackClip.start();\n soundtrackClip.loop(Clip.LOOP_CONTINUOUSLY);\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n }\n }\n }", "public void Play() {\n superPlaneGodMode = false;\r\n if (!musicPlaying)\r\n backgroundMusic.pause();\r\n if (musicPlaying)\r\n backgroundMusic.start();\r\n paused = false;\r\n }", "public void playDeadSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, DEAD);\n\t}", "private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }", "public void playSound(String sound) {\n\t\t \n\t\t // open the sound file as a Java input stream\n\t\tString soundFile = null;\n\t\tswitch (sound) {\n\t\tcase \"opening\":\n\t\t\tsoundFile = \"ConfigFiles\\\\opening.wav\";\n\t\t\tbreak;\n\t\tcase \"ending\":\n\t\t\tsoundFile = \"ConfigFiles\\\\ending.wav\";\n\t\t\tbreak;\n\t\tcase \"shop\":\n\t\t\tsoundFile = \"ConfigFiles\\\\shop.wav\";\n\t\t\tbreak;\n\t\tcase \"monsterbattle\":\n\t\t\tsoundFile = \"ConfigFiles\\\\monsterbattle.wav\";\n\t\t\tbreak;\n\t\tcase \"battlewin\":\n\t\t\tsoundFile = \"ConfigFiles\\\\monstervictory.wav\";\n\t\t\tbreak;\n\t\tcase \"trainerbattle\":\n\t\t\tsoundFile = \"ConfigFiles\\\\trainerBattle.wav\";\n\t\t\tbreak;\n\t\tcase \"trainerbattlewin\":\n\t\t\tsoundFile = \"ConfigFiles\\\\trainerVictory.wav\";\n\t\t\tbreak;\n\t\tcase \"map\":\n\t\t\tsoundFile = \"ConfigFiles\\\\map.wav\";\n\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t \n\t\t InputStream in = null;\n\t\t\ttry {\n\t\t\t\tin = new FileInputStream(soundFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t \n\t\t\tif(audioStream != null ) {\n\t\t\t\tAudioPlayer.player.stop(audioStream);\n\t\t\t}\n\t\t\t // create an audiostream from the inputstream\n\t\t\ttry {\n\t\t\t\taudioStream = new AudioStream(in);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t // play the audio clip with the audioplayer class\n\t\t\t\n\t\t AudioPlayer.player.start(audioStream);\n\t\t \n\t}", "public static void musicMainMenu(){\n\t\ttry {\r\n\t\t\tbgmusic = new Music(\"res/otherSounds/Menu.wav\");\r\n\t\t\tbgmusic.loop(1f, 0.2f);\r\n\t\t\t//System.out.println(bgmusic.getVolume()); \t\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void stop() {\n\t\tsound.stop();\n\t}", "public void specialSong()\n {\n if(!mute)\n {\n try {\n \n bclip.stop();\n \n // Open an audio input stream.\n //URL url = this.getClass().getClassLoader().getResource(\"Glitzville.wav\"); \n //if(lastpowerUp.equals(\"RAINBOW\"))\n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Starman.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n sclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n sclip.open(audioIn); \n \n sclip.start();\n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } \n }\n }", "public static void pop_sound() {\n\t\tm_player_pop.start();\n\t\tm_player_pop.setMediaTime(new Time(0));\n\t}" ]
[ "0.7537355", "0.6800943", "0.6771454", "0.6763308", "0.66586685", "0.6604939", "0.6481024", "0.64543855", "0.64157313", "0.6401415", "0.63830215", "0.63435864", "0.63156223", "0.6275047", "0.6259141", "0.61889255", "0.61829215", "0.61815304", "0.6179533", "0.61759704", "0.61388016", "0.61336076", "0.6105271", "0.6093313", "0.60792917", "0.6056553", "0.604718", "0.60309875", "0.6022797", "0.60213983", "0.60021657", "0.59932566", "0.59927887", "0.5986527", "0.5966555", "0.59584635", "0.5956747", "0.5949169", "0.5934394", "0.5933368", "0.59263086", "0.59181803", "0.59156156", "0.59137267", "0.5895109", "0.5866909", "0.58585596", "0.58540434", "0.5853372", "0.58306485", "0.5811237", "0.5807785", "0.57972884", "0.57890654", "0.57572407", "0.5750051", "0.5744997", "0.57448643", "0.57448643", "0.57427937", "0.57407194", "0.5736663", "0.5731803", "0.5729054", "0.5724466", "0.57238764", "0.57227343", "0.57205236", "0.57112634", "0.57107395", "0.57083344", "0.57025445", "0.5700351", "0.5691006", "0.5690381", "0.56893206", "0.568122", "0.56772923", "0.5670322", "0.566979", "0.5669546", "0.5668567", "0.56663543", "0.56644285", "0.5652873", "0.5649498", "0.56487817", "0.5639323", "0.56289566", "0.56280094", "0.56279284", "0.562205", "0.5601701", "0.56014735", "0.5598134", "0.55969876", "0.55897605", "0.5588934", "0.55823934", "0.5581795" ]
0.78476775
0
Stops any playing background sound
public void stopBackground(){ if(loopingSound != null){ loopingSound.terminate(); } loopingSound = null; activeSounds--; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stop() {\n\t\tsound.stop();\n\t}", "public synchronized void stopSound() {\r\n running = false;\r\n }", "public void stopBackgroundMusic()\n {\n background.stop();\n }", "public static void stop() {\r\n\r\n if (soundLoop!=null)\r\n {\r\n soundLoop.stop();\r\n }\r\n }", "public void stopSound(){\n p.stop(as);\n }", "public void stopSound() {\n metaObject.stopSound();\n }", "private void stopAudio() {\r\n // stop playback if possible here!\r\n }", "public synchronized void stopBackgroundAbruptly(){\r\n if(currentLoop0) backgroundMusicLoop0.stopClip();\r\n else backgroundMusicLoop1.stopClip();\r\n }", "protected void stopTheSound(){\n mp.stop();\n }", "public void stop()\n {\n audioClip.stop();\n }", "@Override\n public void stopSound(){\n gameMusic.stop();\n }", "public synchronized void stop() {\n if(running) {\n this.running = false;\n try {\n this.soundThread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void StopSound() {\r\n\t\tif (this.mp.isPlaying()) {\r\n\t\t\tmp.pause();\r\n\t\t}\r\n\t}", "public void stopPlaying() {\n seq.stop();\n }", "public void stop() {\n\t\tmusic.stop();\n\t}", "public synchronized void stopBackgroundSmoothly(){\r\n if(currentLoop0) backgroundMusicLoop0.fadeOut();\r\n else backgroundMusicLoop1.fadeOut();\r\n }", "public void stop()\n {\n if(AudioDetector.getInstance().isNoAudio() || musicPlayer == null)\n {\n return;\n }\n\n\n musicPlayer.stop();\n }", "public void stop() {\n\t\tstop(!playing);\n\t}", "public void stop() {\n\t\tplaybin.stop();\n\t}", "public void stopCurrentSound() {\n\t\tif (midiSound != null) {\n\t\t\tmidiSound.stop();\n\t\t}\n\t\tif (functionSound != null) {\n\t\t\tfunctionSound.pause(true);\n\t\t}\n\t}", "public void StopSound(ISoundOrigin origin);", "public void stop() {\n AudioPlayer.player.stop(cas);\n playing = false;\n }", "private void stop() {\n Log.i(\"TTS\", \"Stopping\");\n mSpeechQueue.clear();\n \n nativeSynth.stop();\n mIsSpeaking = false;\n if (mPlayer != null) {\n try {\n mPlayer.stop();\n } catch (IllegalStateException e) {\n // Do nothing, the player is already stopped.\n }\n }\n Log.i(\"TTS\", \"Stopped\");\n }", "public void pauseSound() {\n\t\tclip.stop();\n\t}", "public static void stopSound() {\n if(mAudioManager != null) {\n mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, originalVolume, 0);\n }\n if (mp != null) {\n mp.stop();\n Log.d(TAG, \"Stop Sound\");\n }\n }", "public void stop() {\n if (playingClip != null)\n playingClip.stop();\n }", "public void stopThemeSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.stopSound(MUSIC_FOLDER, THEME);\n\n\t}", "public void stop()\n {\n mediaPlayer.stop();\n }", "public void stopAudio() {\n\t\tif(audioStream != null ) {\n\t\t\tAudioPlayer.player.stop(audioStream);\n\t\t}\n\t}", "public void stopPlaying() {\n \t\tisPlaying = false;\n \t}", "private void stopSounds(){\n\t\tsoundPool.autoPause();\n\t\tsoundPool.release();\n\t}", "public void stop() { \r\n timer.stop(); \r\n if (midi) \r\n sequencer.stop(); \r\n else \r\n clip.stop(); \r\n play.setText(\"Play\"); \r\n playing = false; \r\n }", "public void stopSound(ISound sound) {\n/* 354 */ if (this.loaded) {\n/* */ \n/* 356 */ String s = this.invPlayingSounds.get(sound);\n/* */ \n/* 358 */ if (s != null)\n/* */ {\n/* 360 */ this.sndSystem.stop(s);\n/* */ }\n/* */ } \n/* */ }", "private void stop(){ player.stop();}", "public void stop() {\n try {\n mIsIdle = true;\n mIsLooping = false;\n if (mCurPlayer != null) \n {\n mCurPlayer.stop(); \n Thread.sleep(100);\n// mCurPlayer.setMediaTime(0);\n mIsPlaying = false;\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void stopSounds()\n {\n zWalk.stop();\n hitObst.stop();\n combust.stop();\n walkSound.stop();\n runSound.stop();\n }", "public static void stopSong()\n {\n JSoundsMainWindowViewController.iAmPlaying = true;\n JSoundsMainWindowViewController.iAmPausing = false;\n JSoundsMainWindowViewController.iAmResuming = false;\n \n MusicPlayerControl.stopSong();\n }", "public void stop(String key) {\n\t\t// Get the active sound for the key\n\t\tif (!actives.containsKey(key)) {\n\t\t\t//System.out.println(\"Returned\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tActiveSound snd = actives.get(key);\n\t\t\n\t\t// This is a workaround for the OS X sound bug\n\t\t//snd.sound.stop(snd.id);\n\t\tsnd.sound.setLooping(snd.id,false); // Will eventually garbage collect\n\t\tsnd.sound.setVolume(snd.id, 0.0f); \n\t\tactives.remove(key);\n\t}", "public void stopPlayThread() {\n ms.stop();\n }", "public void stopPlaying()\n {\n player.stop();\n }", "public void stopSounds() {\n\t\tCollection<SoundInfo> sounds = soundList.values();\n for(SoundInfo sound: sounds){\n \tif (sound.isStoppable())\n \t\tsound.stop();\n }\n\t}", "void stopMusic();", "public static void stopCurrentSoundtrack() {\n\t\tif (soundtrack[GameBoardModel.getLevel()-1] != null)\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].stop();\n\t}", "public void stop() {\n SystemClock.sleep(500);\n\n releaseAudioTrack();\n }", "private void stop()\r\n {\r\n player.stop();\r\n }", "public void stop() {\n\t\tmAudioManager.abandonAudioFocus(mOuterEventsListener);\n\t\tinternalStop();\n\t}", "public void stopRandomSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.stopSound(MUSIC_FOLDER, SOUND_FILES[SOUND_FILES.length - 1]);\n\t}", "public void keepLooping() {\n\t\tif(!clip.isActive()) {\n\t\t\tstartSound();\n\t\t}\n\t}", "private void stop()\n {\n mPlayer.stop();\n mPlayer = MediaPlayer.create(this, audioUri);\n }", "public void stopSound ( Sound sound ) {\n\t\texecute ( handle -> handle.stopSound ( sound ) );\n\t}", "protected static void stopAllSounds() {\r\n\t\tSoundManager.stopAll(GameSound.effects);\r\n\t\tSoundManager.stopAll(GameSound.music);\r\n\t\tSoundManager.stopAll(GameSound.melodies);\r\n\t}", "public void endSound()\n {\n if(!mute)\n {\n try {\n if(lastpowerUp.equals(\"RAINBOW\"))\n {\n sclip.stop();\n bclip.start();\n bclip.loop(Clip.LOOP_CONTINUOUSLY);\n }\n // Open an audio input stream.\n URL url = this.getClass().getClassLoader().getResource(\"Silence.wav\"); \n \n if(lastpowerUp.equals(\"BLUE\"))\n url = this.getClass().getClassLoader().getResource(\"Out Of Bounds Stop.wav\");\n else if(lastpowerUp.equals(\"YELLOW\")||lastpowerUp.equals(\"DOUBLE\") || lastpowerUp.equals(\"WHITE\") || (lastpowerUp.equals(\"TROLL\") && modeT))\n url = this.getClass().getClassLoader().getResource(\"Mushroom Down.wav\") ;\n else if(lastpowerUp.equals(\"BLACK\") || lastpowerUp.equals(\"TROLL\"))\n url = this.getClass().getClassLoader().getResource(\"Invisible Off.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n Clip clip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n clip.open(audioIn); \n \n clip.start();\n \n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n \n } \n }\n }", "@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n private void stopAudio() {\n //stop audio\n playBtn.setImageDrawable(getActivity().getResources().getDrawable(R.drawable.sharp_play_arrow_black_36, null));\n playerHeader.setText(\"Stopped\");\n isPlaying = false;\n mediaPlayer.stop();\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);\n seekBarHandler.removeCallbacks(updateSeekBar);\n }", "public static void stopMusic() {\n\t\tcurrentMusic.stop();\n\t}", "public void stopSound ( String sound ) {\n\t\texecute ( handle -> handle.stopSound ( sound ) );\n\t}", "public void stop() {\n if (started && thread != null) {\n stopRequested = true;\n thread.interrupt();\n if (audio != null) {\n audio.stop();\n }\n }\n }", "public void stopSound(int id){\n\t for(Sound s: sounds){\n\t if(s.getId() == id){\n\t s.terminate();\n\t }\n\t removables.add(s);\n\t }\n\t}", "public void sendAllSoundsOff()\n {\n super.sendAllSoundsOff();\n }", "@Override\n protected void onStop() {\n super.onStop();\n stopMusic();\n }", "public void StopMusic();", "public void stop() {\n mMediaPlayer.stop();\n setPlayerState(State.STOPPED);\n notifyPlaying();\n }", "@Override\n public void playStop() {\n }", "public void stop() {\n\t\tif (player == null)\n\t\t\treturn;\n\t\t\n\t\tif (listener != null)\n\t\t\tlistener.setLooping(false);\n\t\t\n\t\t// This will invoke playbackFinished, which will decrement currentlyPlaying\n\t\t// and set player to null.\n\t\tplayer.stop();\n\t}", "public void stopAllSounds() {\n/* 218 */ if (this.loaded) {\n/* */ \n/* 220 */ for (String s : this.playingSounds.keySet())\n/* */ {\n/* 222 */ this.sndSystem.stop(s);\n/* */ }\n/* */ \n/* 225 */ this.playingSounds.clear();\n/* 226 */ this.delayedSounds.clear();\n/* 227 */ this.tickableSounds.clear();\n/* 228 */ this.categorySounds.clear();\n/* 229 */ this.playingSoundsStopTime.clear();\n/* */ } \n/* */ }", "protected void muteSounds()\n {\n if(confused.isPlaying())\n confused.stop();\n }", "private void stop()\n\t\t{\n\t\t\tif (mMediaPlayer != null)\n\t\t\t{\n\t\t\t\tmMediaPlayer.stop();\n\t\t\t\tmMediaPlayer.reset();\n\t\t\t}\n\t\t}", "@Override\n protected void onStop() {\n super.onStop();\n // when the activity is stopped, release the media player resources because we won't\n // be playing any more sounds.\n releaseMediaPlayer();\n }", "@Override\n\tpublic void stop() {\n\t\tif (player != null) {\n\t\t\tplayer.close();\n\n\t\t\tpauseLocation = 0;\n\t\t\tsetSongTotalLenght(0);\n\t\t}\n\t}", "public void stop(StarObjectClass self){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn;\r\n \t\tmediaplayer.stop();\r\n \t}", "public void stop()\n\t{\n\t\ttry\n\t\t{\n\t\t\tstopPlayer();\n\t\t}\n\t\tcatch (JavaLayerException ex)\n\t\t{\n\t\t\tSystem.err.println(ex);\n\t\t}\n\t}", "private void stopPlayback() {\n // stop player service using intent\n Intent intent = new Intent(mActivity, PlayerService.class);\n intent.setAction(ACTION_STOP);\n mActivity.startService(intent);\n LogHelper.v(LOG_TAG, \"Stopping player service.\");\n }", "public void close() {\n\t\tcurrentClip.stop();\n\t\tcurrentClip.close();\n\t\tisPlaying = false;\n\t}", "public void stopPlaying(){\r\n\t\tsongsToPlay.clear();\r\n\t\tselectedPreset = -1;\r\n\t\tselectedSource = \"\";\r\n\t\ttry{\r\n\t\t\tplayer.stop();\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.err.println(\"ERROR: BASICPLAYER STOP CODE HAS FAULTED.\");\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void stopAllAudio() {\n MainActivity.logger(context.getString(R.string.audio_check_10));\n if (audioRecord != null) {\n if (audioRecord.getRecordingState() == AudioRecord.RECORDSTATE_RECORDING) {\n audioRecord.stop();\n }\n audioRecord.release();\n MainActivity.logger(context.getString(R.string.audio_check_11));\n }\n else {\n MainActivity.logger(context.getString(R.string.audio_check_12));\n }\n }", "private void stopPlaying() {\n Log.e(TAG, \"Stop playing file: \" + curRecordingFileName);\n if (null != mPlayer) {\n if (mPlayer.isPlaying())\n mPlayer.stop();\n mPlayer.release();\n mPlayer = null;\n }\n\n }", "public void unloadSoundSystem() {\n/* 205 */ if (this.loaded) {\n/* */ \n/* 207 */ stopAllSounds();\n/* 208 */ this.sndSystem.cleanup();\n/* 209 */ this.loaded = false;\n/* */ } \n/* */ }", "public void stop()\n {\n if (this.mediaPlayer != null && mediaPlayer.getStatus().equals(MediaPlayer.Status.PLAYING))\n {\n this.mediaPlayer.stop();\n }\n }", "public void stop() {\n synchronized (lock) {\n isRunning = false;\n if (rawAudioFileOutputStream != null) {\n try {\n rawAudioFileOutputStream.close();\n } catch (IOException e) {\n Log.e(TAG, \"Failed to close file with saved input audio: \" + e);\n }\n rawAudioFileOutputStream = null;\n }\n fileSizeInBytes = 0;\n }\n }", "public void stop() {\n if (clip == null) return;\n clip.stop();\n }", "public void playDeadSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, DEAD);\n\t}", "public void StopClip() {\n clip.stop();\n }", "public void PauseSound();", "public void stopPlayBack() {\n\t\tif (android.os.Environment.getExternalStorageState().equals(\n\t\t\t\tandroid.os.Environment.MEDIA_MOUNTED)) {\n\t\t\tif (mPlayer.isPlaying())\n\t\t\t\tmPlayer.stop();\n\t\t} else {\n\t\t\tToast.makeText(mContext, \"sdcard not available\", Toast.LENGTH_LONG).show();\n\t\t}\n\t}", "private void interrupt() {\n final ScreenSpeakService service = ScreenSpeakService.getInstance();\n if (service == null) {\n LogUtils.log(Log.ERROR, \"Failed to get ScreenSpeakService instance.\");\n return;\n }\n\n final SpeechController speechController = service.getSpeechController();\n speechController.interrupt();\n }", "public void continueSound() {\n\t\tclip.start();\n\t}", "public void disableSound() {\n soundToggle = false;\n }", "protected void stop() {\r\n\t\tif (active) {\r\n\t\t\tsource.stop();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void stopped(MediaPlayer mediaPlayer)\r\n\t{\n\r\n\t}", "public void stop() {}", "private void stopButtonActionPerformed(java.awt.event.ActionEvent evt) {\n for(AudioVisualMaterial currentAudio : audio){ //iterates through audio array\n currentAudio.setupSoundClip(); //sets up sound clip\n //currentAudio.stopSoundClip(); //stops audio sound clip\n }\n\n //enhanced for loop stops any video soundClip playing\n for(AudioVisualMaterial currentVideo : video){ //iterates through video array\n currentVideo.setupSoundClip(); //sets up sound clip\n //currentVideo.stopSoundClip(); //stops video sound clip\n }\n }", "public void stop() {\n\t\tlog.finer(\"Stopping node audio channel\");\n\t // always close Minim audio classes when you are done with them\n\t tone.close();\n\t minim.stop();\n\t}", "public synchronized void pause(){\r\n if(currentLoop0) backgroundMusicLoop0.pause();\r\n else backgroundMusicLoop1.pause();\r\n }", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();" ]
[ "0.82430655", "0.8221393", "0.81638956", "0.80895936", "0.80806017", "0.8036974", "0.7984207", "0.7981991", "0.79243195", "0.7820947", "0.7794422", "0.7703817", "0.76942575", "0.7614164", "0.7587384", "0.756347", "0.7561789", "0.75452834", "0.75450885", "0.7513754", "0.7500232", "0.74934715", "0.7431098", "0.7413906", "0.7366573", "0.7353609", "0.73414314", "0.73021877", "0.72986543", "0.7282033", "0.72758347", "0.7273317", "0.7243743", "0.7211119", "0.7197598", "0.7196354", "0.719323", "0.7174856", "0.71495837", "0.7144254", "0.71419513", "0.7106986", "0.71041876", "0.7101421", "0.70967317", "0.70816714", "0.70780545", "0.7073812", "0.7066169", "0.7059915", "0.7057707", "0.7022351", "0.69347394", "0.6918471", "0.6905256", "0.6865725", "0.68570733", "0.6843764", "0.6841689", "0.6809825", "0.6774042", "0.6765084", "0.6761605", "0.6753919", "0.6738466", "0.6728093", "0.6717709", "0.66890574", "0.66865975", "0.66830885", "0.66828895", "0.6676699", "0.66630787", "0.6643736", "0.66381824", "0.66305286", "0.66179055", "0.6612965", "0.6578813", "0.65685123", "0.65465456", "0.65405995", "0.65392184", "0.65347725", "0.6534544", "0.65091735", "0.650613", "0.64708257", "0.6464645", "0.64616686", "0.6455805", "0.64544195", "0.6443126", "0.6443126", "0.6443126", "0.6443126", "0.6443126", "0.6443126", "0.6443126", "0.6443126" ]
0.84986025
0
does internal housekeeping like terminating and destroying finished Sounds
public void update(){ Sound s; for (Sound sound : sounds) { s = sound; if (s.isFinished() && !removables.contains(s)) { removables.add(s); } } for(Sound temp : removables){ temp.terminate(); sounds.remove(temp); availableIds.add(temp.getId()); activeSounds--; } removables = new LinkedList<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void EndTalk() {\n this.mDeleteF = true;\n this.mReadingF = false;\n }", "public void cleanup() {\n sendBuffer(baos);\n shutdown();\n }", "protected void terminate(){\r\n\t\tsetTerminate(true);\r\n\t\tHolder holder = this.getDirectHolder();\r\n\t\tsetHolder(null);\r\n\t\tholder.removeItem(this);\r\n\t}", "public void unloadSoundSystem() {\n/* 205 */ if (this.loaded) {\n/* */ \n/* 207 */ stopAllSounds();\n/* 208 */ this.sndSystem.cleanup();\n/* 209 */ this.loaded = false;\n/* */ } \n/* */ }", "public synchronized void dispose() {\n\n\t\tthis.direction = -1;\n\t\tGameMethods.playSound(\"spell_disolve.wav\");\n\t\tanimator.setAnimation(\"/images/weapons_sprites/spell_off.png\", 50, 11);\n\t}", "@Override\n public void playEnd() {\n }", "public void endSound()\n {\n if(!mute)\n {\n try {\n if(lastpowerUp.equals(\"RAINBOW\"))\n {\n sclip.stop();\n bclip.start();\n bclip.loop(Clip.LOOP_CONTINUOUSLY);\n }\n // Open an audio input stream.\n URL url = this.getClass().getClassLoader().getResource(\"Silence.wav\"); \n \n if(lastpowerUp.equals(\"BLUE\"))\n url = this.getClass().getClassLoader().getResource(\"Out Of Bounds Stop.wav\");\n else if(lastpowerUp.equals(\"YELLOW\")||lastpowerUp.equals(\"DOUBLE\") || lastpowerUp.equals(\"WHITE\") || (lastpowerUp.equals(\"TROLL\") && modeT))\n url = this.getClass().getClassLoader().getResource(\"Mushroom Down.wav\") ;\n else if(lastpowerUp.equals(\"BLACK\") || lastpowerUp.equals(\"TROLL\"))\n url = this.getClass().getClassLoader().getResource(\"Invisible Off.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n Clip clip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n clip.open(audioIn); \n \n clip.start();\n \n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n \n } \n }\n }", "public void cleanup()\n {\n \tsuper.cleanup();\n _channelHandler.cleanup();\n }", "public void endMessage()\n\t{\n\t}", "protected void finalize() throws Throwable {\n\t\tcleanup();\n\n\t\t//kill the scsynth\n\t\t_scsynthLauncher.killScsynth();\n\t\t\n\t\t// free the UDP port from JavaOSC\n\t\tif (_receiver != null)\n\t\t\t_receiver.close();\n\n\t}", "public void stopAllSounds() {\n/* 218 */ if (this.loaded) {\n/* */ \n/* 220 */ for (String s : this.playingSounds.keySet())\n/* */ {\n/* 222 */ this.sndSystem.stop(s);\n/* */ }\n/* */ \n/* 225 */ this.playingSounds.clear();\n/* 226 */ this.delayedSounds.clear();\n/* 227 */ this.tickableSounds.clear();\n/* 228 */ this.categorySounds.clear();\n/* 229 */ this.playingSoundsStopTime.clear();\n/* */ } \n/* */ }", "protected void end()\n\t{\n\t\tstop();\n\t}", "public void unloadRounds ()\n {\n log.info(\"Unloading Rounds\");\n\n Scheduler scheduler = Scheduler.getScheduler();\n scheduler.unloadRounds(true);\n }", "private void stopSounds(){\n\t\tsoundPool.autoPause();\n\t\tsoundPool.release();\n\t}", "public abstract void end();", "public synchronized void stopSound() {\r\n running = false;\r\n }", "protected void cleanup() {\n this.dead = true;\n this.overflow = null;\n this.headerBuffer = null;\n this.expectBuffer = null;\n this.expectHandler = null;\n this.unfragmentedBufferPool = null;\n this.fragmentedBufferPool = null;\n this.state = null;\n this.currentMessage = null;\n \n /*\n this.onerror = null;\n this.ontext = null;\n this.onbinary = null;\n this.onclose = null;\n this.onping = null;\n this.onpong = null;*/\n}", "@Override\n\tprotected void onTermination() throws SimControlException {\n\t\t\n\t}", "void complete() {\n try {\n try {\n subscriber.onComplete();\n } catch (Throwable e) {\n Exceptions.handleUncaught(Conformance.onCompleteThrew(e));\n }\n } finally {\n // no need to remove ourselves from psm.\n terminate();\n }\n }", "protected void finalize() { \n \tstopSelf(); \n }", "public void handleAuctionEnd();", "protected void onDispose() {\n\t\t/* Shutdown procedure */\n\t\tshutDown();\n\t}", "public void end() {\n\t\tsigue = false;\n\t}", "public void killMusic() {\n\t\t// Stop the sources\n\t\talSourceStop(musicSourceIndex);\n\t\talSourceStop(reverseSourceIndex);\n\t\talSourceStop(flangeSourceIndex);\n\t\talSourceStop(revFlangeSourceIndex);\n\t\talSourceStop(wahSourceIndex);\n\t\talSourceStop(revWahSourceIndex);\n\t\talSourceStop(wahFlangeSourceIndex);\n\t\talSourceStop(revWahFlangeSourceIndex);\n\t\talSourceStop(distortSourceIndex);\n\t\talSourceStop(revDistortSourceIndex);\n\t\talSourceStop(distortFlangeSourceIndex);\n\t\talSourceStop(revDistortFlangeSourceIndex);\n\t\talSourceStop(wahDistortSourceIndex);\n\t\talSourceStop(revWahDistortSourceIndex);\n\t\talSourceStop(wahDistortFlangeSourceIndex);\n\t\talSourceStop(revWahDistortFlangeSourceIndex);\n\t\t// Delete the sources\n\t\talDeleteSources(musicSourceIndex);\n\t\talDeleteSources(reverseSourceIndex);\n\t\talDeleteSources(flangeSourceIndex);\n\t\talDeleteSources(revFlangeSourceIndex);\n\t\talDeleteSources(wahSourceIndex);\n\t\talDeleteSources(revWahSourceIndex);\n\t\talDeleteSources(wahFlangeSourceIndex);\n\t\talDeleteSources(revWahFlangeSourceIndex);\n\t\talDeleteSources(distortSourceIndex);\n\t\talDeleteSources(revDistortSourceIndex);\n\t\talDeleteSources(distortFlangeSourceIndex);\n\t\talDeleteSources(revDistortFlangeSourceIndex);\n\t\talDeleteSources(wahDistortSourceIndex);\n\t\talDeleteSources(revWahDistortSourceIndex);\n\t\talDeleteSources(wahDistortFlangeSourceIndex);\n\t\talDeleteSources(revWahDistortFlangeSourceIndex);\n\t\t// Delete the buffers\n\t\talDeleteBuffers(musicBufferIndex);\n\t\talDeleteBuffers(reverseBufferIndex);\n\t\talDeleteBuffers(wahBufferIndex);\n\t\talDeleteBuffers(revWahBufferIndex);\n\t\talDeleteBuffers(distortBufferIndex);\n\t\talDeleteBuffers(revDistortBufferIndex);\n\t\talDeleteBuffers(wahDistortBufferIndex);\n\t\talDeleteBuffers(revWahDistortBufferIndex);\n\t}", "protected void stopTheSound(){\n mp.stop();\n }", "protected abstract boolean end();", "public void sendAllSoundsOff()\n {\n super.sendAllSoundsOff();\n }", "public void run() {\n\t\twhile (frontIsClear()) {\n\t\t\tmove();\n\n\t\t\tif (noBeepersPresent()) {\n\t\t\t\tremoveChad();\n\t\t\t}\n\t\t //if (beepersPresent()){\n\t\t\t\t// collectBeeper();\n\t\t\t//}\t\n\t\t \n\t\t\tmove();\n\t\t}}", "@Override\n public void contractCompletedMethod(Messages.CompletedContract msg) {\n runningContracts.remove(msg.contID);\n if (isLeaving && runningContracts.size() == 0) {\n stop();\n }\n }", "public static void clearSounds() {\r\n\t\tMain.soundBags = \"\";\r\n\t\tMain.soundSet = \"\";\r\n\t\tMain.soundWin = \"\";\r\n\t\tMain.soundLose = \"\";\r\n\t\tMain.soundGameStart= \"\";\r\n\t}", "@Override\r\n public void dispose()\r\n {\r\n\t_level.disposeData();\r\n\t_printText = null;\r\n\t_coin = null;\r\n\tSoundLibrary.getInstance().stop(MUSIC_LEVEL);\r\n\tCamera.getInstance().clearObservers();\r\n }", "protected void processDestroy()\n {\n }", "public void close() {\n/* 325 */ synchronized (this.mixer) {\n/* 326 */ if (isOpen()) {\n/* */ \n/* */ \n/* */ \n/* 330 */ setOpen(false);\n/* */ \n/* */ \n/* 333 */ implClose();\n/* */ \n/* */ \n/* 336 */ this.mixer.close(this);\n/* */ } \n/* */ } \n/* */ }", "public void endHold();", "@ForOverride\n public void onTerminated(InternalSubchannel internalSubchannel) {\n }", "@Override\n public synchronized void term() {\n if (terminated) {\n return;\n }\n\n messageState.closeAll();\n context.term();\n\n terminated = true;\n }", "public void stopSound(ISound sound) {\n/* 354 */ if (this.loaded) {\n/* */ \n/* 356 */ String s = this.invPlayingSounds.get(sound);\n/* */ \n/* 358 */ if (s != null)\n/* */ {\n/* 360 */ this.sndSystem.stop(s);\n/* */ }\n/* */ } \n/* */ }", "private void shutdown() {\n\t\ttry {\n\t\t\tsock.close();\n\t\t\tgame.handleExit(this);\n\t\t\tstopped = true;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "protected void end() {\n \t// theres nothing to end\n }", "public void i() {\n if (this.e != null) {\n this.e.cancel();\n this.e = null;\n }\n if (this.d != null) {\n this.d.cancel();\n this.d.purge();\n this.d = null;\n }\n }", "public void openAlienDestroyedSound() {\r\n\t\tif (clipAlienDestroyed.isOpen()) {\r\n\t\t\tclipAlienDestroyed.start();\r\n\t\t}\r\n\r\n\t\tif (!(clipAlienDestroyed.isActive())) {\r\n\t\t\t/*\r\n\t\t\t * clip.stop(); clip.flush();\r\n\t\t\t */\r\n\t\t\tclipAlienDestroyed.setFramePosition(0);\r\n\t\t}\r\n\r\n\t}", "protected void end() {\n\r\n\t}", "@Override\n public void onCatalystInstanceDestroy() {\n super.onCatalystInstanceDestroy();\n\n Set<Map.Entry<Integer, PlayerInfo>> entries = playerPool.entrySet();\n for (Map.Entry<Integer, PlayerInfo> entry : entries) {\n PlayerInfo info = entry.getValue();\n if (info == null) {\n continue;\n }\n AudioPlayer player = info.audioPlayer;\n if (player == null) {\n continue;\n }\n try {\n player.setOnCompletionListener(null);\n player.setOnPreparedListener(null);\n player.setOnErrorListener(null);\n if (player.isPlaying()) {\n player.pause();\n }\n player.reset();\n player.release();\n } catch (Exception ex) {\n Log.e(\"RNSoundModule\", \"Exception when closing audios during app exit. \", ex);\n }\n }\n entries.clear();\n }", "protected void close()\n {\n stopped = true;\n }", "public void cleanUp() {\n\t\tfor (int i = 0; i < 24; i++) {\r\n\t\t\tPlayerAssistant.itemOnInterface(c, 26099, i, -1, -1);\r\n\t\t}\r\n\t\tc.getPA().sendNewString(\"0\", 26013);\r\n\t}", "private void shutDown() {\r\n\t\t\r\n\t\t// send shutdown to children\r\n\t\tlogger.debug(\"BagCheck \"+ this.lineNumber+\" has sent an EndOfDay message to it's Security.\");\r\n\t\tthis.securityActor.tell(new EndOfDay(1));\r\n\r\n\t\t// clear all references\r\n\t\tthis.securityActor = null;\r\n\t}", "public void cancel(){\n\t\tstartTime = -1;\n\t\tplayersFinished = new ArrayList<>();\n\t\tplayersFinishedMarked = new ArrayList<Player>();\n\t\tDNFs = new ArrayList<>();\n\t\ttempNumber = 0;\n\t\tmarkedNum = 0;\n\t\t//normally we'd mark started racers as such, but we are don't know how many started.\n\t}", "protected void handleCleanup() {\r\n\t\t// Implement in subclass\r\n\t}", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "public void stopSound(){\n p.stop(as);\n }", "void conversationEnding(Conversation conversation);", "protected void end()\n\t{\n\t}", "public void finished() {\n Object obj = get();\n if (obj instanceof Exception)\n mCallback.run(null, (Exception)obj, mRock);\n else\n mCallback.run(obj, null, mRock);\n }", "public void stopSounds() {\n\t\tCollection<SoundInfo> sounds = soundList.values();\n for(SoundInfo sound: sounds){\n \tif (sound.isStoppable())\n \t\tsound.stop();\n }\n\t}", "@Override\r\n public void simulationEnded() {\n this.soundThread = null;\r\n\r\n // end the module thread\r\n this.running = false;\r\n\r\n // the simulation is not running\r\n this.runSimulationState = false;\r\n\r\n // play the background sound\r\n this.playBackgroundSound(true);\r\n }", "@Override\n protected void onDestroy() {\n unBoundAudioService();\n super.onDestroy();\n }", "default void free() {\n setState(Audio.AudioState.STOPPED);\n }", "void finalizeBath(boolean isCancelled);", "@Override\n\tpublic void dispose() {\n\t\tbox.close();\n\t\tthis.myThready.interrupt();\n\t\tSystem.exit(0);\n\t}", "public void StopSound(ISoundOrigin origin);", "@Override\n\t\tpublic void endService() {\n\t\t\t\n\t\t}", "public void quit() {\r\n\t\trunning = false;\r\n\t\tt= null;\r\n\t}", "@Override\n public void stopSound(){\n gameMusic.stop();\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void cleanUpAndExit() {\n Enumeration<Sender> senderEnum = getSenders().elements();\n\n while (senderEnum.hasMoreElements()) {\n Sender nextSender = senderEnum.nextElement();\n try {\n nextSender.close();\n } catch (IOException e) {\n // TODO: better error output here?\n e.printStackTrace();\n }\n }\n\n System.exit(0);\n }", "public void cleanup() {\r\n }", "@Override\r\n\tpublic void cleanup() {\n\t\t\r\n\t}" ]
[ "0.6292909", "0.6275575", "0.62056553", "0.6082889", "0.59405345", "0.5900776", "0.58998704", "0.5879129", "0.58489615", "0.584283", "0.58299965", "0.5824158", "0.5816447", "0.5815597", "0.58090323", "0.5803321", "0.5788671", "0.57789224", "0.5762564", "0.57621574", "0.57575536", "0.5755149", "0.5747444", "0.57397175", "0.5727244", "0.5715147", "0.57029444", "0.5696419", "0.56909966", "0.56899685", "0.56804055", "0.5673751", "0.5670943", "0.5669245", "0.5662431", "0.56619245", "0.5661761", "0.5646935", "0.5645976", "0.56405526", "0.56320745", "0.562464", "0.56168693", "0.56134015", "0.56018704", "0.5599243", "0.5593169", "0.5588064", "0.55863804", "0.55863804", "0.55863804", "0.55863804", "0.55794173", "0.55752784", "0.5572213", "0.55578935", "0.5549631", "0.55426687", "0.5540767", "0.5535676", "0.55355835", "0.55321914", "0.5524159", "0.55238676", "0.551287", "0.55058664", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.54997563", "0.5493112", "0.5491642", "0.5491085" ]
0.59370995
5
Stops, terminates and removes the sound with the given id
public void stopSound(int id){ for(Sound s: sounds){ if(s.getId() == id){ s.terminate(); } removables.add(s); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void StopMusic(int id) {\n\t\t\n\t\tif(id == 1) {\n if(!bm.equals(null)) {\n\n \tbm.stop();\n }\n\t\t}else if(id == 2) {\n\t\t\n if(!bmwin.equals(null)) {\n bmwin.stop();\n }\n\t\t}else if(id == 3) {\n\n if(!bmdead.equals(null)) {\n \tbmdead.stop();\n }\n\t\t}\n \n\t}", "public void stopSound(){\n p.stop(as);\n }", "public void stop() {\n\t\tsound.stop();\n\t}", "public void stopSound() {\n metaObject.stopSound();\n }", "protected void stopTheSound(){\n mp.stop();\n }", "private void stopAudio() {\r\n // stop playback if possible here!\r\n }", "public void stopSound(ISound sound) {\n/* 354 */ if (this.loaded) {\n/* */ \n/* 356 */ String s = this.invPlayingSounds.get(sound);\n/* */ \n/* 358 */ if (s != null)\n/* */ {\n/* 360 */ this.sndSystem.stop(s);\n/* */ }\n/* */ } \n/* */ }", "public synchronized void stopSound() {\r\n running = false;\r\n }", "public void StopSound(ISoundOrigin origin);", "public void StopSound() {\r\n\t\tif (this.mp.isPlaying()) {\r\n\t\t\tmp.pause();\r\n\t\t}\r\n\t}", "public void stop(String key) {\n\t\t// Get the active sound for the key\n\t\tif (!actives.containsKey(key)) {\n\t\t\t//System.out.println(\"Returned\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tActiveSound snd = actives.get(key);\n\t\t\n\t\t// This is a workaround for the OS X sound bug\n\t\t//snd.sound.stop(snd.id);\n\t\tsnd.sound.setLooping(snd.id,false); // Will eventually garbage collect\n\t\tsnd.sound.setVolume(snd.id, 0.0f); \n\t\tactives.remove(key);\n\t}", "public void stopRandomSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.stopSound(MUSIC_FOLDER, SOUND_FILES[SOUND_FILES.length - 1]);\n\t}", "public static void stop() {\r\n\r\n if (soundLoop!=null)\r\n {\r\n soundLoop.stop();\r\n }\r\n }", "public void stop()\n {\n audioClip.stop();\n }", "@Override\n public void stopSound(){\n gameMusic.stop();\n }", "public void stopSound ( String sound ) {\n\t\texecute ( handle -> handle.stopSound ( sound ) );\n\t}", "public void stop() {\n\t\tmusic.stop();\n\t}", "void stopMusic();", "public synchronized void stop() {\n if(running) {\n this.running = false;\n try {\n this.soundThread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void stop() {\n AudioPlayer.player.stop(cas);\n playing = false;\n }", "public void pauseSound() {\n\t\tclip.stop();\n\t}", "public void stopSound ( Sound sound ) {\n\t\texecute ( handle -> handle.stopSound ( sound ) );\n\t}", "public static void stopSound() {\n if(mAudioManager != null) {\n mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, originalVolume, 0);\n }\n if (mp != null) {\n mp.stop();\n Log.d(TAG, \"Stop Sound\");\n }\n }", "public void StopMusic();", "private void stop()\n {\n mPlayer.stop();\n mPlayer = MediaPlayer.create(this, audioUri);\n }", "private void stopSounds(){\n\t\tsoundPool.autoPause();\n\t\tsoundPool.release();\n\t}", "public void stopPlaying() {\n seq.stop();\n }", "public void stop() {\n\t\tplaybin.stop();\n\t}", "public void stopCurrentSound() {\n\t\tif (midiSound != null) {\n\t\t\tmidiSound.stop();\n\t\t}\n\t\tif (functionSound != null) {\n\t\t\tfunctionSound.pause(true);\n\t\t}\n\t}", "public void stopAudio() {\n\t\tif(audioStream != null ) {\n\t\t\tAudioPlayer.player.stop(audioStream);\n\t\t}\n\t}", "private void stop() {\n Log.i(\"TTS\", \"Stopping\");\n mSpeechQueue.clear();\n \n nativeSynth.stop();\n mIsSpeaking = false;\n if (mPlayer != null) {\n try {\n mPlayer.stop();\n } catch (IllegalStateException e) {\n // Do nothing, the player is already stopped.\n }\n }\n Log.i(\"TTS\", \"Stopped\");\n }", "public void deleteSound(int keyCode) {\n\t\tif (soundList.containsKey(keyCode)) {\n\t\t\tSoundInfo sound = soundList.get(keyCode);\n\t\t\tsound.close();\n\t\t\tsoundList.remove(keyCode);\n\t\t\tprojectModified = true;\n\t\t}\n\t}", "public void removeMusic(Integer[]id) {\n\t\tmusicdao.deleteMusic(id);\r\n\t}", "public static void stopSong()\n {\n JSoundsMainWindowViewController.iAmPlaying = true;\n JSoundsMainWindowViewController.iAmPausing = false;\n JSoundsMainWindowViewController.iAmResuming = false;\n \n MusicPlayerControl.stopSong();\n }", "public static void stopMusic() {\n\t\tcurrentMusic.stop();\n\t}", "public void stop() {\n\t\tstop(!playing);\n\t}", "public void stop()\n {\n mediaPlayer.stop();\n }", "public void endSound()\n {\n if(!mute)\n {\n try {\n if(lastpowerUp.equals(\"RAINBOW\"))\n {\n sclip.stop();\n bclip.start();\n bclip.loop(Clip.LOOP_CONTINUOUSLY);\n }\n // Open an audio input stream.\n URL url = this.getClass().getClassLoader().getResource(\"Silence.wav\"); \n \n if(lastpowerUp.equals(\"BLUE\"))\n url = this.getClass().getClassLoader().getResource(\"Out Of Bounds Stop.wav\");\n else if(lastpowerUp.equals(\"YELLOW\")||lastpowerUp.equals(\"DOUBLE\") || lastpowerUp.equals(\"WHITE\") || (lastpowerUp.equals(\"TROLL\") && modeT))\n url = this.getClass().getClassLoader().getResource(\"Mushroom Down.wav\") ;\n else if(lastpowerUp.equals(\"BLACK\") || lastpowerUp.equals(\"TROLL\"))\n url = this.getClass().getClassLoader().getResource(\"Invisible Off.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n Clip clip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n clip.open(audioIn); \n \n clip.start();\n \n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n \n } \n }\n }", "public void stop()\n {\n if(AudioDetector.getInstance().isNoAudio() || musicPlayer == null)\n {\n return;\n }\n\n\n musicPlayer.stop();\n }", "public void stop() { \r\n timer.stop(); \r\n if (midi) \r\n sequencer.stop(); \r\n else \r\n clip.stop(); \r\n play.setText(\"Play\"); \r\n playing = false; \r\n }", "public void killMusic() {\n\t\t// Stop the sources\n\t\talSourceStop(musicSourceIndex);\n\t\talSourceStop(reverseSourceIndex);\n\t\talSourceStop(flangeSourceIndex);\n\t\talSourceStop(revFlangeSourceIndex);\n\t\talSourceStop(wahSourceIndex);\n\t\talSourceStop(revWahSourceIndex);\n\t\talSourceStop(wahFlangeSourceIndex);\n\t\talSourceStop(revWahFlangeSourceIndex);\n\t\talSourceStop(distortSourceIndex);\n\t\talSourceStop(revDistortSourceIndex);\n\t\talSourceStop(distortFlangeSourceIndex);\n\t\talSourceStop(revDistortFlangeSourceIndex);\n\t\talSourceStop(wahDistortSourceIndex);\n\t\talSourceStop(revWahDistortSourceIndex);\n\t\talSourceStop(wahDistortFlangeSourceIndex);\n\t\talSourceStop(revWahDistortFlangeSourceIndex);\n\t\t// Delete the sources\n\t\talDeleteSources(musicSourceIndex);\n\t\talDeleteSources(reverseSourceIndex);\n\t\talDeleteSources(flangeSourceIndex);\n\t\talDeleteSources(revFlangeSourceIndex);\n\t\talDeleteSources(wahSourceIndex);\n\t\talDeleteSources(revWahSourceIndex);\n\t\talDeleteSources(wahFlangeSourceIndex);\n\t\talDeleteSources(revWahFlangeSourceIndex);\n\t\talDeleteSources(distortSourceIndex);\n\t\talDeleteSources(revDistortSourceIndex);\n\t\talDeleteSources(distortFlangeSourceIndex);\n\t\talDeleteSources(revDistortFlangeSourceIndex);\n\t\talDeleteSources(wahDistortSourceIndex);\n\t\talDeleteSources(revWahDistortSourceIndex);\n\t\talDeleteSources(wahDistortFlangeSourceIndex);\n\t\talDeleteSources(revWahDistortFlangeSourceIndex);\n\t\t// Delete the buffers\n\t\talDeleteBuffers(musicBufferIndex);\n\t\talDeleteBuffers(reverseBufferIndex);\n\t\talDeleteBuffers(wahBufferIndex);\n\t\talDeleteBuffers(revWahBufferIndex);\n\t\talDeleteBuffers(distortBufferIndex);\n\t\talDeleteBuffers(revDistortBufferIndex);\n\t\talDeleteBuffers(wahDistortBufferIndex);\n\t\talDeleteBuffers(revWahDistortBufferIndex);\n\t}", "private void stop(){ player.stop();}", "public void unloadSoundSystem() {\n/* 205 */ if (this.loaded) {\n/* */ \n/* 207 */ stopAllSounds();\n/* 208 */ this.sndSystem.cleanup();\n/* 209 */ this.loaded = false;\n/* */ } \n/* */ }", "public void deleteSong(Long id) {\n\t\tSong deleteSong = this.findSong(id);\n\t\tlookifyRepository.delete(deleteSong);\n\t}", "public void stopPlaying()\n {\n player.stop();\n }", "public void stopSound(int sample) {\n\t\t\tm_soundManager.stopSound(sample);\n\t\t}", "public void stopBackgroundMusic()\n {\n background.stop();\n }", "public void stopThemeSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.stopSound(MUSIC_FOLDER, THEME);\n\n\t}", "public void stopPlaying(){\r\n\t\tsongsToPlay.clear();\r\n\t\tselectedPreset = -1;\r\n\t\tselectedSource = \"\";\r\n\t\ttry{\r\n\t\t\tplayer.stop();\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.err.println(\"ERROR: BASICPLAYER STOP CODE HAS FAULTED.\");\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void stop() {\n if (playingClip != null)\n playingClip.stop();\n }", "public void stopSound ( Sound sound , SoundCategory category ) {\n\t\texecute ( handle -> handle.stopSound ( sound , category ) );\n\t}", "public void stop(Integer id) throws DynamicCallException, ExecutionException{\n call(\"stop\", id).get();\n }", "private void stop()\r\n {\r\n player.stop();\r\n }", "@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n private void stopAudio() {\n //stop audio\n playBtn.setImageDrawable(getActivity().getResources().getDrawable(R.drawable.sharp_play_arrow_black_36, null));\n playerHeader.setText(\"Stopped\");\n isPlaying = false;\n mediaPlayer.stop();\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);\n seekBarHandler.removeCallbacks(updateSeekBar);\n }", "public static void stopCurrentSoundtrack() {\n\t\tif (soundtrack[GameBoardModel.getLevel()-1] != null)\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].stop();\n\t}", "public void stopSound ( String sound , SoundCategory category ) {\n\t\texecute ( handle -> handle.stopSound ( sound , category ) );\n\t}", "public void StartSound(ISoundOrigin origin, sfxenum_t sound_id);", "@Override\n public void playSound(int soundId) {\n\n }", "@Override\n\tpublic String removeSong(int id) {\n\t\tsongRepository.deleteById(id);\n\t\treturn id+\" is deleted successfully\";\n\t}", "public void soundSeek(int id,int time)\n\t{\n\t\tif (correct_main.isPlaying())\n\t\t{\n\t\t\tcorrect_main.stop();\n\t\t}\n\t\tMediaPlayer correct = MediaPlayer.create(this, id);\t\n\t\tcorrect.seekTo(time);\n\t\tcorrect.start();\n\t}", "public static void pop_sound() {\n\t\tm_player_pop.start();\n\t\tm_player_pop.setMediaTime(new Time(0));\n\t}", "public void openAlienDestroyedSound() {\r\n\t\tif (clipAlienDestroyed.isOpen()) {\r\n\t\t\tclipAlienDestroyed.start();\r\n\t\t}\r\n\r\n\t\tif (!(clipAlienDestroyed.isActive())) {\r\n\t\t\t/*\r\n\t\t\t * clip.stop(); clip.flush();\r\n\t\t\t */\r\n\t\t\tclipAlienDestroyed.setFramePosition(0);\r\n\t\t}\r\n\r\n\t}", "public void stopBackground(){\n\t if(loopingSound != null){\n\t loopingSound.terminate();\n\t }\n\t\tloopingSound = null;\n\t\tactiveSounds--;\n\t}", "public void stop(Integer id) throws CallError, InterruptedException{\n if (isAsynchronous)\n service.call(\"stop\", id);\n else\n service.call(\"stop\", id).get();\n }", "public void StartSound(ISoundOrigin origin, int sound_id);", "public void play(int soundID) {\n System.out.println(\"PlaySound: \" + soundID);\n// if (soundID == SOUND_EAT)\n// return;\n play(soundID, 1);\n }", "public void stopSounds() {\n\t\tCollection<SoundInfo> sounds = soundList.values();\n for(SoundInfo sound: sounds){\n \tif (sound.isStoppable())\n \t\tsound.stop();\n }\n\t}", "public static void stopSounds()\n {\n zWalk.stop();\n hitObst.stop();\n combust.stop();\n walkSound.stop();\n runSound.stop();\n }", "public void stop() {\n SystemClock.sleep(500);\n\n releaseAudioTrack();\n }", "public void stop() {\n synchronized (lock) {\n isRunning = false;\n if (rawAudioFileOutputStream != null) {\n try {\n rawAudioFileOutputStream.close();\n } catch (IOException e) {\n Log.e(TAG, \"Failed to close file with saved input audio: \" + e);\n }\n rawAudioFileOutputStream = null;\n }\n fileSizeInBytes = 0;\n }\n }", "public void loop(int soundID) {\n play(soundID, -1);\n }", "private void soundAlarm(long alarmId) {\n AlarmSettings settings = db.readAlarmSettings(alarmId);\n if (settings.getVibrate()) {\n MediaSingleton.INSTANCE.vibrate();\n }\n\n volumeIncreaseCallback.reset(settings);\n MediaSingleton.INSTANCE.normalizeVolume(\n NotificationService.this, volumeIncreaseCallback.volume());\n MediaSingleton.INSTANCE.play(NotificationService.this, settings.getTone());\n //Store getTone value for notification activity\n currentTone = settings.getTone();\n // Start periodic events for handling this notification.\n handler.post(volumeIncreaseCallback);\n handler.post(soundCheck);\n handler.post(notificationBlinker);\n // Set up a canceler if this notification isn't acknowledged by the timeout.\n int timeoutMillis = 60 * 1000 * AppSettings.alarmTimeOutMins(NotificationService.this);\n handler.postDelayed(autoCancel, timeoutMillis);\n }", "void unsubscribe(String id);", "public static void stopMusic()\n\t{\n\t\tif (music != null && currentMusicFile != -1)\n\t\t{\n\t\t\tmusic.get(currentMusicFile).stop();\n\t\t\tcurrentMusicFile = -1;\n\t\t}\n\t}", "@Override\n\tpublic void stop() {\n\t\tif (player != null) {\n\t\t\tplayer.close();\n\n\t\t\tpauseLocation = 0;\n\t\t\tsetSongTotalLenght(0);\n\t\t}\n\t}", "public void stopPlaying() {\n \t\tisPlaying = false;\n \t}", "public void PauseSound();", "public void playDeadSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, DEAD);\n\t}", "public void stopAllSounds() {\n/* 218 */ if (this.loaded) {\n/* */ \n/* 220 */ for (String s : this.playingSounds.keySet())\n/* */ {\n/* 222 */ this.sndSystem.stop(s);\n/* */ }\n/* */ \n/* 225 */ this.playingSounds.clear();\n/* 226 */ this.delayedSounds.clear();\n/* 227 */ this.tickableSounds.clear();\n/* 228 */ this.categorySounds.clear();\n/* 229 */ this.playingSoundsStopTime.clear();\n/* */ } \n/* */ }", "public void stop(StarObjectClass self){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn;\r\n \t\tmediaplayer.stop();\r\n \t}", "public void stopPlayThread() {\n ms.stop();\n }", "private void stopPlaying() {\n Log.e(TAG, \"Stop playing file: \" + curRecordingFileName);\n if (null != mPlayer) {\n if (mPlayer.isPlaying())\n mPlayer.stop();\n mPlayer.release();\n mPlayer = null;\n }\n\n }", "public void sonidoDisparar() {\n\t\ttry {\n\t\t\t\n\t\t\tClip disparo = AudioSystem.getClip();\n\t\t\tdisparo.open(AudioSystem\n\t\t\t\t\t.getAudioInputStream(getClass().getResource(\"/RercursosWAV/disparo_normal.wav\")));\n\t\t\tdisparo.start();\n\n\t\t} catch (LineUnavailableException | IOException | UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t\te.getMessage();\n\t\t\tSystem.out.println(\"error audio\");\n\t\t}\n\t}", "void stop( String profileId );", "public void update(){\n\t Sound s;\n\t\tfor (Sound sound : sounds) {\n\t\t\ts = sound;\n\t\t\tif (s.isFinished() && !removables.contains(s)) {\n\t\t\t\tremovables.add(s);\n\t\t\t}\n\t\t}\n\t\tfor(Sound temp : removables){\n\t\t temp.terminate();\n\t\t\tsounds.remove(temp);\n\t\t\tavailableIds.add(temp.getId());\n\t\t\tactiveSounds--;\n\t\t}\n removables = new LinkedList<>();\n\t}", "private void stop()\n\t\t{\n\t\t\tif (mMediaPlayer != null)\n\t\t\t{\n\t\t\t\tmMediaPlayer.stop();\n\t\t\t\tmMediaPlayer.reset();\n\t\t\t}\n\t\t}", "public void removeAIObject(String id) {\n aiObjects.remove(id);\n }", "public void playAndStop(String audioFilePath, Long milliseconds) {\n play(audioFilePath);\n try {\n Thread.sleep(milliseconds);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n clip.stop();\n }", "private void stopRecording() {\r\n\t\tisRecording = false;\r\n\t\ttry {\r\n\t\t\ttimer.cancel();\r\n\t\t\tbuttonRecord.setText(\"Record\");\r\n\t\t\tbuttonRecord.setIcon(iconRecord);\r\n\t\t\t\r\n\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\r\n\r\n\t\t\trecorder.stop();\r\n\r\n\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\r\n\t\t\tsaveFile();\r\n\r\n\t\t} catch (IOException ex) {\r\n\t\t\tJOptionPane.showMessageDialog(SwingSoundRecorder.this, \"Error\",\r\n\t\t\t\t\t\"Error stopping sound recording!\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "@DeleteMapping(\"/delete/{id}\")\n\tpublic void deleteById(@PathVariable(\"id\") int id) {\n\t\tSong song = songService.findById(id);\n\t\tif (song == null) {\n\t\t\tSystem.out.println(\"Not exsit ID! Don't delete!\");\n\t\t\treturn;\n\t\t}\n\t\tsongService.delete(id);\n\t\tSystem.out.println(\"Deleted id: \" + id);\n\t}", "protected void muteSounds()\n {\n if(confused.isPlaying())\n confused.stop();\n }", "void remove(String id);", "void remove(String id);", "void remove(String id);", "public static void stopMidi()\r\n {\r\n if (sequencer!=null)\r\n {\r\n sequencer.stop();\r\n }\r\n }", "@Override\n public void onCompletion(MediaPlayer mp) {\n stopMedia();\n //stop the service\n stopSelf();\n }", "public static void clic_sound() {\n\t\tm_player_clic.start();\n\t\tm_player_clic.setMediaTime(new Time(0));\n\t}", "public void stop() {\n stop = true;\n //index--;\n line.flush();\n line.close();\n try {\n decodedInput.close();\n } catch (IOException ex) {\n Logger.getLogger(MP3Player.class.getName()).log(Level.SEVERE, null, ex);\n }\n Runtime.getRuntime().gc();\n }", "public void stopSpeak() {\n if (mSynthesizer != null && mSynthesizer.isSpeaking()) {\n mSynthesizer.stopSpeaking();\n }\n }", "public void stopSong() {\n\t\tStatus status = mediaview.getMediaPlayer().getStatus();\n\t\t\n\t\tif (status == Status.PLAYING) {\n\t\t\tmediaview.getMediaPlayer().stop();\n\t\t\tplaying = false;\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t}" ]
[ "0.751854", "0.73507917", "0.71885425", "0.7159962", "0.7145412", "0.6991262", "0.69445735", "0.6908245", "0.6891899", "0.6861674", "0.6859263", "0.67708564", "0.67611074", "0.6742738", "0.6638266", "0.65221936", "0.65150577", "0.6495857", "0.64545643", "0.6448806", "0.6433502", "0.640194", "0.6384521", "0.63744974", "0.6353274", "0.63468826", "0.6336625", "0.63351804", "0.6317128", "0.6249183", "0.62123597", "0.62024176", "0.6195558", "0.6184076", "0.61766464", "0.61661434", "0.6154735", "0.613846", "0.61351293", "0.6102078", "0.6088185", "0.6064882", "0.6063033", "0.605943", "0.60109943", "0.6010633", "0.5988119", "0.59669507", "0.59646463", "0.59578884", "0.5953027", "0.595098", "0.59482086", "0.5926025", "0.59167856", "0.5915858", "0.5912246", "0.5902193", "0.58924294", "0.58918303", "0.5888703", "0.5880496", "0.5877434", "0.5870795", "0.5869969", "0.58610594", "0.5843554", "0.58389515", "0.58367497", "0.5834823", "0.583257", "0.5830715", "0.5814932", "0.58073145", "0.5789686", "0.57794154", "0.57558995", "0.5744369", "0.5690151", "0.56813127", "0.56777436", "0.5676489", "0.5674166", "0.56588656", "0.56560475", "0.56402594", "0.5638999", "0.56293714", "0.5628633", "0.56265914", "0.56141865", "0.5613568", "0.5613568", "0.5613568", "0.56048065", "0.559686", "0.5580479", "0.5576629", "0.55753845", "0.55727357" ]
0.83438635
0
TODO Autogenerated method stub
@Override public boolean onSingleTapUp(MotionEvent arg0) { 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